Search in sources :

Example 21 with DataSetID

use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.

the class ClassListToken method allow.

@Override
public boolean allow(PlayerCharacter pc, Spell spell) {
    ClassSpellList list = spelllist.get();
    DataSetID datasetID = pc.getCharID().getDatasetID();
    for (AvailableSpell availSpell : masterAvailableSpellFacet.getMatchingSpellsInList(list, datasetID, spell)) {
        int level = availSpell.getLevel();
        if (level >= 0 && allow(pc, level, "", spell, list)) {
            return true;
        }
    }
    return false;
}
Also used : AvailableSpell(pcgen.cdom.helper.AvailableSpell) ClassSpellList(pcgen.cdom.list.ClassSpellList) DataSetID(pcgen.cdom.enumeration.DataSetID)

Example 22 with DataSetID

use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.

the class DomainListToken method allow.

@Override
public boolean allow(PlayerCharacter pc, Spell spell) {
    DomainSpellList list = spelllist.get();
    DataSetID datasetID = pc.getCharID().getDatasetID();
    for (AvailableSpell availSpell : masterAvailableSpellFacet.getMatchingSpellsInList(list, datasetID, spell)) {
        int level = availSpell.getLevel();
        if (level >= 0 && allow(pc, level, "", spell, list)) {
            return true;
        }
    }
    return false;
}
Also used : DomainSpellList(pcgen.cdom.list.DomainSpellList) AvailableSpell(pcgen.cdom.helper.AvailableSpell) DataSetID(pcgen.cdom.enumeration.DataSetID)

Example 23 with DataSetID

use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.

the class LocalAddedSkillCostFacetTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    DataSetID cid = DataSetID.getID();
    id = CharID.getID(cid);
    altid = CharID.getID(cid);
    class1 = new PCClass();
    class1.setName("Cl1");
    class2 = new PCClass();
    class2.setName("Cl2");
    class3 = new PCClass();
    class3.setName("Cl3");
}
Also used : DataSetID(pcgen.cdom.enumeration.DataSetID) PCClass(pcgen.core.PCClass)

Example 24 with DataSetID

use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.

the class ClassFacetTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    DataSetID cid = DataSetID.getID();
    id = CharID.getID(cid);
    altid = CharID.getID(cid);
    facet.addDataFacetChangeListener(classListener);
    facet.addLevelChangeListener(classListener);
}
Also used : DataSetID(pcgen.cdom.enumeration.DataSetID)

Example 25 with DataSetID

use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.

the class GlobalAddedSkillCostFacetTest method setUp.

@Override
public void setUp() {
    DataSetID cid = DataSetID.getID();
    id = CharID.getID(cid);
    altid = CharID.getID(cid);
    source1 = new PCTemplate();
    source1.setName("T1");
}
Also used : DataSetID(pcgen.cdom.enumeration.DataSetID) PCTemplate(pcgen.core.PCTemplate)

Aggregations

DataSetID (pcgen.cdom.enumeration.DataSetID)37 PCClass (pcgen.core.PCClass)5 AvailableSpell (pcgen.cdom.helper.AvailableSpell)3 Skill (pcgen.core.Skill)3 CharID (pcgen.cdom.enumeration.CharID)2 SkillCost (pcgen.cdom.enumeration.SkillCost)2 FormulaResolvingFacet (pcgen.cdom.facet.FormulaResolvingFacet)2 ClassSpellList (pcgen.cdom.list.ClassSpellList)2 DomainSpellList (pcgen.cdom.list.DomainSpellList)2 ArrayList (java.util.ArrayList)1 Before (org.junit.Before)1 VariableLibrary (pcgen.base.formula.base.VariableLibrary)1 SplitFormulaSetup (pcgen.base.solver.SplitFormulaSetup)1 AssociatedPrereqObject (pcgen.cdom.base.AssociatedPrereqObject)1 CDOMList (pcgen.cdom.base.CDOMList)1 CDOMReference (pcgen.cdom.base.CDOMReference)1 MasterListInterface (pcgen.cdom.base.MasterListInterface)1 CNAbility (pcgen.cdom.content.CNAbility)1 NonAbilityFacet (pcgen.cdom.facet.analysis.NonAbilityFacet)1 NonStatStatFacet (pcgen.cdom.facet.analysis.NonStatStatFacet)1