MCPcopy Create free account
hub / github.com/PCGen/pcgen / getAcpOutput

Method getAcpOutput

code/src/java/pcgen/io/exporttoken/SkillToken.java:545–557  ·  view source on GitHub ↗

Process the Armour Check Penalty tag. Syntax: SKILL.%.ACPfoo,bar,baz,bot where foo, bar, baz, and bot are strings of unfixed length. Behavior: tests for armor check penalty interaction with this skill. foo is printed if the skill is not affected by ACP. bar is printed if the skill is affected by ACP

(Skill aSkill, String property)

Source from the content-addressed store, hash-verified

543 * @return The ACP tag output.
544 */
545 public static String getAcpOutput(Skill aSkill, String property)
546 {
547 final StringTokenizer aTok = new StringTokenizer(property.substring(3), ",");
548 int numArgs = aTok.countTokens();
549 int acp = aSkill.getSafe(ObjectKey.ARMOR_CHECK).ordinal();
550 String[] acpText = new String[numArgs];
551
552 for (int i = 0; aTok.hasMoreTokens(); i++)
553 {
554 acpText[i] = aTok.nextToken();
555 }
556 return acp < numArgs ? acpText[acp] : "";
557 }
558
559 // ================== Inner class =======================
560 /**

Callers 2

getSkillPropValueMethod · 0.95
getSkillPropValueMethod · 0.95

Calls 4

ordinalMethod · 0.80
getSafeMethod · 0.80
hasMoreTokensMethod · 0.80
nextTokenMethod · 0.80

Tested by

no test coverage detected