Search in sources :

Example 21 with SpellProhibitor

use of pcgen.core.SpellProhibitor in project pcgen by PCGen.

the class ChoiceTokenTest method getConstant.

private static SpellProhibitor getConstant(ProhibitedSpellType type, String args) {
    SpellProhibitor spellProb = new SpellProhibitor();
    spellProb.setType(type);
    spellProb.addValue(args);
    return spellProb;
}
Also used : SpellProhibitor(pcgen.core.SpellProhibitor)

Example 22 with SpellProhibitor

use of pcgen.core.SpellProhibitor in project pcgen by PCGen.

the class ChoiceTokenTest method testUnparseLegalSchool.

@Test
public void testUnparseLegalSchool() throws PersistenceLayerException {
    SpellProhibitor o = getConstant(ProhibitedSpellType.SCHOOL, "Public");
    primaryProf.put(getObjectKey(), o);
    expectSingle(getToken().unparse(primaryContext, primaryProf), "SCHOOL|Public");
}
Also used : SpellProhibitor(pcgen.core.SpellProhibitor) Test(org.junit.Test)

Aggregations

SpellProhibitor (pcgen.core.SpellProhibitor)22 TreeSet (java.util.TreeSet)6 Test (org.junit.Test)6 PCClass (pcgen.core.PCClass)6 StringTokenizer (java.util.StringTokenizer)4 ProhibitedSpellType (pcgen.util.enumeration.ProhibitedSpellType)4 ArrayList (java.util.ArrayList)2 SubClass (pcgen.core.SubClass)2 PCLevelInfo (pcgen.core.pclevelinfo.PCLevelInfo)2 CharID (pcgen.cdom.enumeration.CharID)1 PCClassLevel (pcgen.cdom.inst.PCClassLevel)1 Domain (pcgen.core.Domain)1 SpecialAbility (pcgen.core.SpecialAbility)1 SpellSupportForPCClass (pcgen.core.SpellSupportForPCClass)1 BonusObj (pcgen.core.bonus.BonusObj)1 CDOMChooserFacadeImpl (pcgen.core.chooser.CDOMChooserFacadeImpl)1 PCLevelInfoStat (pcgen.core.pclevelinfo.PCLevelInfoStat)1 Prerequisite (pcgen.core.prereq.Prerequisite)1 Gui2InfoFactory (pcgen.gui2.facade.Gui2InfoFactory)1 HtmlInfoBuilder (pcgen.gui2.util.HtmlInfoBuilder)1