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

Method getMaxDexTokenInt

code/src/java/pcgen/io/exporttoken/EqToken.java:854–863  ·  view source on GitHub ↗

Get Max DEX Token as int @param pc @param eq @return Max DEX Token as int

(PlayerCharacter pc, Equipment eq)

Source from the content-addressed store, hash-verified

852 * @return Max DEX Token as int
853 */
854 public static int getMaxDexTokenInt(PlayerCharacter pc, Equipment eq)
855 {
856 String maxDexVar = ControlUtilities.getControlToken(Globals.getContext(), CControl.EQMAXDEX);
857 if (maxDexVar == null)
858 {
859 int mdex = eq.getSafe(IntegerKey.MAX_DEX) + (int) eq.bonusTo(pc, "EQMARMOR", "MAXDEX", true);
860 return Math.min(Constants.MAX_MAXDEX, Math.max(0, mdex));
861 }
862 return ((Number) eq.getLocalVariable(pc.getCharID(), maxDexVar)).intValue();
863 }
864
865 /**
866 * Get Move Token

Callers 7

getTokenMethod · 0.95
getTokenMethod · 0.95
getTokenMethod · 0.95
writeArmorPropertyMethod · 0.95
getEquipmentHtmlInfoMethod · 0.95
processOldMaxDexMethod · 0.95
getEqTokenMethod · 0.95

Calls 9

getControlTokenMethod · 0.95
getContextMethod · 0.95
getSafeMethod · 0.80
intValueMethod · 0.80
getCharIDMethod · 0.65
bonusToMethod · 0.45
minMethod · 0.45
maxMethod · 0.45
getLocalVariableMethod · 0.45

Tested by

no test coverage detected