Search in sources :

Example 1 with SkillToken

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;
    }
}
Also used : AbilityListToken(pcgen.io.exporttoken.AbilityListToken) SkillpointsToken(pcgen.io.exporttoken.SkillpointsToken) EqTypeToken(pcgen.io.exporttoken.EqTypeToken) MovementToken(pcgen.io.exporttoken.MovementToken) AbilityToken(pcgen.io.exporttoken.AbilityToken) SkillToken(pcgen.io.exporttoken.SkillToken) GameModeToken(pcgen.io.exporttoken.GameModeToken) WeaponhToken(pcgen.io.exporttoken.WeaponhToken) EqToken(pcgen.io.exporttoken.EqToken) BonusToken(pcgen.io.exporttoken.BonusToken) TotalToken(pcgen.io.exporttoken.TotalToken) WeaponToken(pcgen.io.exporttoken.WeaponToken) StatToken(pcgen.io.exporttoken.StatToken)

Example 2 with SkillToken

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));
}
Also used : PlayerCharacter(pcgen.core.PlayerCharacter) SkillToken(pcgen.io.exporttoken.SkillToken)

Example 3 with SkillToken

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));
}
Also used : PlayerCharacter(pcgen.core.PlayerCharacter) SkillToken(pcgen.io.exporttoken.SkillToken)

Example 4 with SkillToken

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));
}
Also used : PlayerCharacter(pcgen.core.PlayerCharacter) SkillToken(pcgen.io.exporttoken.SkillToken)

Example 5 with SkillToken

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));
}
Also used : PlayerCharacter(pcgen.core.PlayerCharacter) SkillToken(pcgen.io.exporttoken.SkillToken)

Aggregations

SkillToken (pcgen.io.exporttoken.SkillToken)5 PlayerCharacter (pcgen.core.PlayerCharacter)4 AbilityListToken (pcgen.io.exporttoken.AbilityListToken)1 AbilityToken (pcgen.io.exporttoken.AbilityToken)1 BonusToken (pcgen.io.exporttoken.BonusToken)1 EqToken (pcgen.io.exporttoken.EqToken)1 EqTypeToken (pcgen.io.exporttoken.EqTypeToken)1 GameModeToken (pcgen.io.exporttoken.GameModeToken)1 MovementToken (pcgen.io.exporttoken.MovementToken)1 SkillpointsToken (pcgen.io.exporttoken.SkillpointsToken)1 StatToken (pcgen.io.exporttoken.StatToken)1 TotalToken (pcgen.io.exporttoken.TotalToken)1 WeaponToken (pcgen.io.exporttoken.WeaponToken)1 WeaponhToken (pcgen.io.exporttoken.WeaponhToken)1