use of pcgen.io.exporttoken.SkillToken in project pcgen by PCGen.
the class ExportHandler method populateTokenMap.
/**
* Populate the token map (if not already done so), e.g. Add all
* of the types of Output Tokens to the map
*/
private static void populateTokenMap() {
if (!tokenMapPopulated) {
addToTokenMap(new AbilityToken());
addToTokenMap(new AbilityListToken());
addToTokenMap(new BonusToken());
addToTokenMap(new EqToken());
addToTokenMap(new EqTypeToken());
addToTokenMap(new GameModeToken());
addToTokenMap(new MovementToken());
addToTokenMap(new SkillToken());
addToTokenMap(new SkillpointsToken());
addToTokenMap(new StatToken());
addToTokenMap(new TotalToken());
addToTokenMap(new WeaponToken());
addToTokenMap(new WeaponhToken());
tokenMapPopulated = true;
}
}
use of pcgen.io.exporttoken.SkillToken in project pcgen by PCGen.
the class SkillTokenTest method testSkillTypeToken.
/**
* Test the SKILLTYPE token.
*/
public void testSkillTypeToken() {
PlayerCharacter character = getCharacter();
SkillToken token = new SkillTypeToken();
// First test each sub token
assertEquals("SkillTypeToken", "Balance", token.getToken("SKILLTYPE.0.DEX.NAME", character, null));
assertEquals("SkillTypeToken", "10", token.getToken("SKILLTYPE.1.DEX.TOTAL", character, null));
}
use of pcgen.io.exporttoken.SkillToken in project pcgen by PCGen.
the class SkillTokenTest method testSkillToken.
/**
* Test the SKILL token.
*/
public void testSkillToken() {
PlayerCharacter character = getCharacter();
SkillToken token = new SkillToken();
// First test each sub token
assertEquals("SkillToken", "Balance", token.getToken("SKILL.0", character, null));
assertEquals("SkillToken", "DEX", token.getToken("SKILL.0.ABILITY", character, null));
assertEquals("SkillToken", "9", token.getToken("SKILL.0.TOTAL", character, null));
assertEquals("SkillToken", "3", token.getToken("SKILL.0.ABMOD", character, null));
assertEquals("SkillToken", "4.0", token.getToken("SKILL.0.RANK", character, null));
assertEquals("SkillToken", "2", token.getToken("SKILL.0.MISC", character, null));
assertEquals("SkillToken", "N", token.getToken("SKILL.0.EXCLUSIVE", character, null));
assertEquals("SkillToken", "Y", token.getToken("SKILL.0.UNTRAINED", character, null));
assertEquals("SkillToken", "9", token.getToken("SKILL.0.EXCLUSIVE_TOTAL", character, null));
assertEquals("SkillToken", "9", token.getToken("SKILL.0.TRAINED_TOTAL", character, null));
assertEquals("SkillToken", "+2[TUMBLE|Balance] +3[STAT]", token.getToken("SKILL.0.EXPLAIN", character, null));
// Test the indexed retrieval
assertEquals("SkillToken", "Tumble", token.getToken("SKILL.3", character, null));
// Test the named retrieval
assertEquals("SkillToken", "Tumble", token.getToken("SKILL.TUMBLE", character, null));
}
use of pcgen.io.exporttoken.SkillToken in project pcgen by PCGen.
the class SkillTokenTest method testSkillSubsetToken.
/**
* Test the SKILLSUBSET token.
*/
public void testSkillSubsetToken() {
PlayerCharacter character = getCharacter();
SkillToken token = new SkillSubsetToken();
// First test each sub token
assertEquals("SkillSubsetToken", "KNOWLEDGE (RELIGION)", token.getToken("SKILLSUBSET.1.KNOWLEDGE.NAME", character, null));
assertEquals("SkillSubsetToken", "8.0", token.getToken("SKILLSUBSET.0.KNOWLEDGE.RANK", character, null));
}
use of pcgen.io.exporttoken.SkillToken in project pcgen by PCGen.
the class SkillTokenTest method testSkillLevelToken.
/**
* Test the SKILLLEVEL token.
*/
public void testSkillLevelToken() {
PlayerCharacter character = getCharacter();
SkillToken token = new SkillLevelToken();
// First test each sub token
assertEquals("SKILLLEVEL.1.TOTAL", "6", token.getToken("SKILLLEVEL.1.TOTAL", character, null));
}
Aggregations