MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / hpBeforeReload

Method hpBeforeReload

eos/saveddata/module.py:264–275  ·  view source on GitHub ↗

If item is some kind of repairer with charges, calculate HP it reps before going into reload.

(self)

Source from the content-addressed store, hash-verified

262
263 @property
264 def hpBeforeReload(self):
265 """
266 If item is some kind of repairer with charges, calculate
267 HP it reps before going into reload.
268 """
269 cycles = self.numShots
270 armorRep = self.getModifiedItemAttr("armorDamageAmount") or 0
271 shieldRep = self.getModifiedItemAttr("shieldBonus") or 0
272 if not cycles or (not armorRep and not shieldRep):
273 return 0
274 hp = round((armorRep + shieldRep) * cycles)
275 return hp
276
277 def __calculateAmmoShots(self):
278 if self.charge is not None:

Callers

nothing calls this directly

Calls 1

getModifiedItemAttrMethod · 0.45

Tested by

no test coverage detected