Get reach token Formula is as follows: REACH:(RACEREACH+(max(0,EQUIPREACH-5))) EQUIPREACHMULT @param pc the player @param eq the equipment @return reach token
(PlayerCharacter pc, Equipment eq)
| 1046 | * @return reach token |
| 1047 | */ |
| 1048 | private static String getReachToken(PlayerCharacter pc, Equipment eq) |
| 1049 | { |
| 1050 | String eqReach = pc.getControl("EQREACH"); |
| 1051 | int sum; |
| 1052 | if (eqReach == null) |
| 1053 | { |
| 1054 | int dist = eq.getVariableValue(SettingsHandler.getGameAsProperty().get().getWeaponReachFormula(), "", pc).intValue(); |
| 1055 | String profName = getProfName(eq); |
| 1056 | int iAdd = (int) pc.getTotalBonusTo("WEAPONPROF=" + profName, "REACH") |
| 1057 | + getWeaponProfTypeBonuses(pc, eq, "REACH", WPTYPEBONUS_PC); |
| 1058 | sum = dist + iAdd; |
| 1059 | } |
| 1060 | else |
| 1061 | { |
| 1062 | sum = ((Number) eq.getLocalVariable(pc.getCharID(), eqReach)).intValue(); |
| 1063 | } |
| 1064 | return Globals.getGameModeUnitSet().displayDistanceInUnitSet(sum); |
| 1065 | } |
| 1066 | |
| 1067 | /** |
| 1068 | * Get weight in set token |
no test coverage detected