Get Attack Information for a PC. This will return the attack token value requested for the supplied character. Note the return value is always a formatted string such as +8 or +8/+3 @param pc The character to retrieve the attack value for. @param attackType The type of attack to be returned
(PlayerCharacter pc, AttackType attackType, String modifier)
| 43 | * @return The token value. |
| 44 | */ |
| 45 | public static String getAttackInfo(PlayerCharacter pc, AttackType attackType, String modifier) |
| 46 | { |
| 47 | if (modifier.equals("TOTAL")) |
| 48 | { |
| 49 | if (attackType.equals(AttackType.RANGED)) |
| 50 | { |
| 51 | int total = getTotalToken(pc, attackType); |
| 52 | return pc.getAttackString(AttackType.RANGED, total); |
| 53 | } |
| 54 | else if (attackType.equals(AttackType.UNARMED)) |
| 55 | { |
| 56 | int total = getTotalToken(pc, AttackType.MELEE); |
| 57 | // TODO: Is this correct for 3.0 also? |
| 58 | return pc.getAttackString(AttackType.MELEE, total); |
| 59 | //return pc.getAttackString(Constants.ATTACKSTRING_UNARMED, total); |
| 60 | } |
| 61 | else |
| 62 | { |
| 63 | int total = getTotalToken(pc, attackType); |
| 64 | return pc.getAttackString(AttackType.MELEE, total); |
| 65 | } |
| 66 | } |
| 67 | return getSubToken(pc, attackType, modifier); |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Get total ATTACK token |
no test coverage detected