If item is some kind of repairer with charges, calculate HP it reps before going into reload.
(self)
| 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: |
nothing calls this directly
no test coverage detected