use of pcgen.core.Race in project pcgen by PCGen.
the class StatIntegrationTest method testUnlockOverrideLockComplex.
@Test
public void testUnlockOverrideLockComplex() {
testNonAbilityUnset();
Race r = new Race();
causeLock(r, stat1, 13);
rfacet.set(id, r);
PCTemplate t1 = new PCTemplate();
causeUnlock(t1, stat1);
tfacet.add(id, t1, tsource);
testNonAbilityUnset();
testLockUnsetConditional();
}
use of pcgen.core.Race in project pcgen by PCGen.
the class StatIntegrationTest method testUnlockOverrideNonAbilityLockSimple.
@Test
public void testUnlockOverrideNonAbilityLockSimple() {
Race r1 = new Race();
causeLockNonAbility(r1, stat2);
causeUnLockNonAbility(r1, stat2);
rfacet.set(id, r1);
testNonAbilityUnset();
testLockUnsetConditional();
}
use of pcgen.core.Race in project pcgen by PCGen.
the class StatIntegrationTest method testLockNonAbilityInRace.
@Test
public void testLockNonAbilityInRace() {
Race r = new Race();
causeLockNonAbility(r, stat1);
rfacet.set(id, r);
assertFalse(nonAbilityFacet.isNonAbility(id, stat2));
assertTrue(nonAbilityFacet.isNonAbility(id, stat1));
assertFalse(nonAbilityFacet.isNonAbility(altid, stat1));
// Make sure cleans up when race changed
rfacet.set(id, new Race());
testNonAbilityUnset();
testLockUnset();
}
use of pcgen.core.Race in project pcgen by PCGen.
the class StatIntegrationTest method testLockComplex.
@Test
public void testLockComplex() {
Race r = new Race();
causeLock(r, stat1, 14);
rfacet.set(id, r);
testNonAbilityUnset();
assertEquals(14, lockFacet.getLockedStat(id, stat1));
assertNull(lockFacet.getLockedStat(id, stat2));
PCTemplate t1 = new PCTemplate();
causeLock(t1, stat1, 15);
tfacet.add(id, t1, tsource);
testNonAbilityUnset();
assertEquals(15, lockFacet.getLockedStat(id, stat1));
assertNull(lockFacet.getLockedStat(id, stat2));
// Make sure cleans up when template removed
tfacet.remove(id, t1, tsource);
testNonAbilityUnset();
assertEquals(14, lockFacet.getLockedStat(id, stat1));
assertNull(lockFacet.getLockedStat(id, stat2));
}
use of pcgen.core.Race in project pcgen by PCGen.
the class StatIntegrationTest method testLockNonAbilityInTemplate.
@Test
public void testLockNonAbilityInTemplate() {
Race r = new Race();
rfacet.set(id, r);
testNonAbilityUnset();
PCTemplate t1 = new PCTemplate();
causeLockNonAbility(t1, stat1);
tfacet.add(id, t1, tsource);
assertFalse(nonAbilityFacet.isNonAbility(id, stat2));
assertTrue(nonAbilityFacet.isNonAbility(id, stat1));
assertFalse(nonAbilityFacet.isNonAbility(altid, stat1));
// Make sure cleans up when template removed
tfacet.remove(id, t1, tsource);
testNonAbilityUnset();
testLockUnset();
}
Aggregations