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

Method getSR

code/src/java/pcgen/core/EquipmentModifier.java:252–266  ·  view source on GitHub ↗
(Equipment parent, PlayerCharacter aPC)

Source from the content-addressed store, hash-verified

250 }
251
252 public int getSR(Equipment parent, PlayerCharacter aPC)
253 {
254 SpellResistance sr = get(ObjectKey.SR);
255 if (sr == null)
256 {
257 return 0;
258 }
259
260 if (sr.getReduction().equals(CHOICE_FORMULA) && parent.hasAssociations(this))
261 {
262 return Delta.parseInt(parent.getFirstAssociation(this));
263 }
264
265 return sr.getReduction().resolve(parent, true, aPC, getQualifiedKey()).intValue();
266 }
267
268 /**
269 * lets this object compare to others.

Callers

nothing calls this directly

Calls 9

getReductionMethod · 0.95
parseIntMethod · 0.95
getFirstAssociationMethod · 0.80
intValueMethod · 0.80
getMethod · 0.65
equalsMethod · 0.65
hasAssociationsMethod · 0.65
resolveMethod · 0.65
getQualifiedKeyMethod · 0.45

Tested by

no test coverage detected