Ejemplo n.º 1
0
 private boolean characterStillHasCorrespondingSpecialty(IEquipmentStatsOption option) {
   try {
     AbilityType trait = AbilityType.valueOf(option.getType());
     INamedGenericTrait[] specialties = dataProvider.getSpecialties(trait);
     ArrayUtilities.indexOf(specialties, option.getUnderlyingTrait());
     return true;
   } catch (IllegalArgumentException e) {
     return false;
   }
 }
Ejemplo n.º 2
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));
 }
Ejemplo n.º 3
0
 public void addRejectedBackgrounds(String[] backgroundIds) {
   this.rejectedBackgroundIds =
       net.sf.anathema.lib.lang.ArrayUtilities.concat(
           String.class, this.rejectedBackgroundIds, rejectedBackgroundIds);
 }
Ejemplo n.º 4
0
 @Override
 public boolean isRejected(IBackgroundTemplate backgroundTemplate) {
   return net.sf.anathema.lib.lang.ArrayUtilities.containsValue(
       rejectedBackgroundIds, backgroundTemplate.getId());
 }
Ejemplo n.º 5
0
 public void addMagicPools(IAdditionalMagicLearnPool[] magicPools) {
   this.magicPools =
       net.sf.anathema.lib.lang.ArrayUtilities.concat(
           IAdditionalMagicLearnPool.class, this.magicPools, magicPools);
 }
Ejemplo n.º 6
0
 public void addAdditionalEssencePools(IAdditionalEssencePool[] pools) {
   this.essencePools =
       net.sf.anathema.lib.lang.ArrayUtilities.concat(
           IAdditionalEssencePool.class, this.essencePools, pools);
 }
Ejemplo n.º 7
0
 public void addCompulsiveCharmIds(String[] compulsiveCharmIds) {
   this.compulsiveCharmIds =
       net.sf.anathema.lib.lang.ArrayUtilities.concat(
           String.class, this.compulsiveCharmIds, compulsiveCharmIds);
 }
Ejemplo n.º 8
0
 @Override
 public final boolean isCompulsiveCharm(ICharm charm) {
   String[] compulsiveCharmIDs = context.getAdditionalRules().getCompulsiveCharmIDs();
   return net.sf.anathema.lib.lang.ArrayUtilities.containsValue(compulsiveCharmIDs, charm.getId());
 }