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)
| 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 | /** |
no test coverage detected