コード例 #1
0
 @Test
 public void testParsesMaximumNecromancyCircle() throws Exception {
   String celestialXml =
       "<magicTemplate>"
           + //$NON-NLS-1$
           "<spellTemplate maximumSorceryCircle=\"Solar\" maximumNecromancyCircle=\"Labyrinth\"/>" //$NON-NLS-1$
           + "</magicTemplate>"; //$NON-NLS-1$
   Element templateElement = DocumentUtilities.read(celestialXml).getRootElement();
   GenericMagicTemplate template = parser.parseTemplate(templateElement);
   assertTrue(
       net.sf.anathema.lib.lang.ArrayUtilities.containsValue(
           template.getSpellMagic().getNecromancyCircles(), CircleType.Shadowlands));
   assertTrue(
       net.sf.anathema.lib.lang.ArrayUtilities.containsValue(
           template.getSpellMagic().getNecromancyCircles(), CircleType.Labyrinth));
   assertFalse(
       net.sf.anathema.lib.lang.ArrayUtilities.containsValue(
           template.getSpellMagic().getNecromancyCircles(), CircleType.Void));
 }
コード例 #2
0
 @Override
 public boolean isRejected(IBackgroundTemplate backgroundTemplate) {
   return net.sf.anathema.lib.lang.ArrayUtilities.containsValue(
       rejectedBackgroundIds, backgroundTemplate.getId());
 }
コード例 #3
0
 @Override
 public final boolean isCompulsiveCharm(ICharm charm) {
   String[] compulsiveCharmIDs = context.getAdditionalRules().getCompulsiveCharmIDs();
   return net.sf.anathema.lib.lang.ArrayUtilities.containsValue(compulsiveCharmIDs, charm.getId());
 }