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

Method getMiscToken

code/src/java/pcgen/core/analysis/AttackInfo.java:136–148  ·  view source on GitHub ↗

Get the misc ATTACK token @param pc @param at @return misc ATTACK token

(PlayerCharacter pc, AttackType at)

Source from the content-addressed store, hash-verified

134 * @return misc ATTACK token
135 */
136 public static int getMiscToken(PlayerCharacter pc, AttackType at)
137 {
138 int tohitBonus = ((int) pc.getTotalBonusTo("TOHIT", "TOHIT") + (int) pc.getTotalBonusTo("TOHIT", "TYPE." + at))
139 - (int) pc.getDisplay().getStatBonusTo("TOHIT", "TYPE." + at)
140 - (int) pc.getSizeAdjustmentBonusTo("TOHIT", "TOHIT");
141 int miscBonus =
142 ((int) pc.getTotalBonusTo("COMBAT", "TOHIT") + (int) pc.getTotalBonusTo("COMBAT", "TOHIT." + at))
143 - (int) pc.getDisplay().getStatBonusTo("COMBAT", "TOHIT." + at)
144 - (int) pc.getSizeAdjustmentBonusTo("COMBAT", "TOHIT")
145 - (int) pc.getSizeAdjustmentBonusTo("COMBAT", "TOHIT." + at)
146 - (int) pc.getBonusDueToType("COMBAT", "TOHIT", "EPIC");
147 return miscBonus + tohitBonus;
148 }
149
150 /**
151 * Get the size ATTACK token

Callers 1

getSubTokenMethod · 0.95

Calls 5

getTotalBonusToMethod · 0.45
getStatBonusToMethod · 0.45
getDisplayMethod · 0.45
getBonusDueToTypeMethod · 0.45

Tested by

no test coverage detected