use of pcgen.core.Ability in project pcgen by PCGen.
the class QualifyTokenTest method testRoundRobinFeatSpell.
@Test
public void testRoundRobinFeatSpell() throws PersistenceLayerException {
Ability a = primaryContext.getReferenceContext().constructCDOMObject(Ability.class, "My Feat");
primaryContext.getReferenceContext().reassociateCategory(AbilityCategory.FEAT, a);
a = secondaryContext.getReferenceContext().constructCDOMObject(Ability.class, "My Feat");
secondaryContext.getReferenceContext().reassociateCategory(AbilityCategory.FEAT, a);
primaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Lightning Bolt");
secondaryContext.getReferenceContext().constructCDOMObject(Spell.class, "Lightning Bolt");
runRoundRobin("ABILITY=FEAT|My Feat", "SPELL|Lightning Bolt");
}
use of pcgen.core.Ability in project pcgen by PCGen.
the class AbilityLstTest method testRoundRobinWithEqualType.
@Test
public void testRoundRobinWithEqualType() throws PersistenceLayerException {
construct(primaryContext, "TestWP1");
construct(primaryContext, "TestWP2");
construct(secondaryContext, "TestWP1");
construct(secondaryContext, "TestWP2");
Ability a = construct(primaryContext, "Typed1");
a.addToListFor(ListKey.TYPE, Type.getConstant("OtherTestType"));
Ability b = construct(secondaryContext, "Typed1");
b.addToListFor(ListKey.TYPE, Type.getConstant("OtherTestType"));
Ability c = construct(primaryContext, "Typed2");
c.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
Ability d = construct(secondaryContext, "Typed2");
d.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
runRoundRobin("FEAT|VIRTUAL|TestWP1|TestWP2|TYPE=OtherTestType|TYPE=TestType");
}
use of pcgen.core.Ability in project pcgen by PCGen.
the class AbilityLstTest method testRoundRobinTestEqualThree.
@Test
public void testRoundRobinTestEqualThree() throws PersistenceLayerException {
Ability a = construct(primaryContext, "TestWP1");
a.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
a.addToListFor(ListKey.TYPE, Type.getConstant("TestAltType"));
a.addToListFor(ListKey.TYPE, Type.getConstant("TestThirdType"));
Ability b = construct(secondaryContext, "TestWP1");
b.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
b.addToListFor(ListKey.TYPE, Type.getConstant("TestAltType"));
b.addToListFor(ListKey.TYPE, Type.getConstant("TestThirdType"));
runRoundRobin("FEAT|VIRTUAL|TYPE=TestAltType.TestThirdType.TestType");
}
use of pcgen.core.Ability in project pcgen by PCGen.
the class AbilityLstTest method testRoundRobinTestEquals.
@Test
public void testRoundRobinTestEquals() throws PersistenceLayerException {
Ability a = construct(primaryContext, "TestWP1");
a.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
Ability b = construct(secondaryContext, "TestWP1");
b.addToListFor(ListKey.TYPE, Type.getConstant("TestType"));
runRoundRobin("FEAT|VIRTUAL|TYPE=TestType");
}
use of pcgen.core.Ability in project pcgen by PCGen.
the class AbilityLstTest method construct.
//
private static Ability construct(LoadContext context, String name) {
Ability ab = context.getReferenceContext().constructCDOMObject(Ability.class, name);
context.getReferenceContext().reassociateCategory(AbilityCategory.FEAT, ab);
return ab;
}
Aggregations