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; } }
@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)); }
public void addRejectedBackgrounds(String[] backgroundIds) { this.rejectedBackgroundIds = net.sf.anathema.lib.lang.ArrayUtilities.concat( String.class, this.rejectedBackgroundIds, rejectedBackgroundIds); }
@Override public boolean isRejected(IBackgroundTemplate backgroundTemplate) { return net.sf.anathema.lib.lang.ArrayUtilities.containsValue( rejectedBackgroundIds, backgroundTemplate.getId()); }
public void addMagicPools(IAdditionalMagicLearnPool[] magicPools) { this.magicPools = net.sf.anathema.lib.lang.ArrayUtilities.concat( IAdditionalMagicLearnPool.class, this.magicPools, magicPools); }
public void addAdditionalEssencePools(IAdditionalEssencePool[] pools) { this.essencePools = net.sf.anathema.lib.lang.ArrayUtilities.concat( IAdditionalEssencePool.class, this.essencePools, pools); }
public void addCompulsiveCharmIds(String[] compulsiveCharmIds) { this.compulsiveCharmIds = net.sf.anathema.lib.lang.ArrayUtilities.concat( String.class, this.compulsiveCharmIds, compulsiveCharmIds); }
@Override public final boolean isCompulsiveCharm(ICharm charm) { String[] compulsiveCharmIDs = context.getAdditionalRules().getCompulsiveCharmIDs(); return net.sf.anathema.lib.lang.ArrayUtilities.containsValue(compulsiveCharmIDs, charm.getId()); }