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

Method getEqDamage

code/src/java/pcgen/io/exporttoken/WeaponToken.java:2417–2445  ·  view source on GitHub ↗
(PlayerCharacter pc, Equipment eq)

Source from the content-addressed store, hash-verified

2415 }
2416
2417 private static String getEqDamage(PlayerCharacter pc, Equipment eq)
2418 {
2419 String retString = eq.getDamage(pc);
2420
2421 if (pc == null)
2422 {
2423 return retString;
2424 }
2425
2426 String profKey = getProfName(eq);
2427 if (eq.isNatural())
2428 {
2429 int eqSize = pc.racialSizeInt();
2430 int iMod = pc.sizeInt();
2431 iMod += (int) pc.getTotalBonusTo("WEAPONPROF=" + profKey, "DAMAGESIZE");
2432 iMod += (int) pc.getTotalBonusTo("COMBAT", "DAMAGESIZE");
2433 retString = Globals.adjustDamage(retString, iMod - eqSize);
2434 }
2435 else
2436 {
2437 int eqSize = eq.sizeInt();
2438 int iMod = eqSize;
2439 iMod += (int) pc.getTotalBonusTo("WEAPONPROF=" + profKey, "DAMAGESIZE");
2440 iMod += (int) pc.getTotalBonusTo("COMBAT", "DAMAGESIZE");
2441 retString = Globals.adjustDamage(retString, iMod - eqSize);
2442 }
2443
2444 return retString;
2445 }
2446
2447 private static Equipment getAmmoUser(PlayerCharacter pc, Equipment eq, int ammo)
2448 {

Callers 1

getDamageMethod · 0.95

Calls 7

getProfNameMethod · 0.95
adjustDamageMethod · 0.95
isNaturalMethod · 0.80
getDamageMethod · 0.65
racialSizeIntMethod · 0.45
sizeIntMethod · 0.45
getTotalBonusToMethod · 0.45

Tested by

no test coverage detected