MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / applyDamage

Function applyDamage

graphs/data/fitDamageStats/getter.py:31–41  ·  view source on GitHub ↗
(dmgMap, applicationMap, tgtResists, tgtFullHp)

Source from the content-addressed store, hash-verified

29
30
31def applyDamage(dmgMap, applicationMap, tgtResists, tgtFullHp):
32 total = DmgTypes.default()
33 for key, dmg in dmgMap.items():
34 total += dmg * applicationMap.get(key, 0)
35 if not GraphSettings.getInstance().get('ignoreResists'):
36 emRes, thermRes, kinRes, exploRes = tgtResists
37 else:
38 emRes = thermRes = kinRes = exploRes = 0
39 total.profile = TargetProfile(
40 emAmount=emRes, thermalAmount=thermRes, kineticAmount=kinRes, explosiveAmount=exploRes, hp=tgtFullHp)
41 return total
42
43
44# Y mixins

Callers 5

_calculatePointMethod · 0.85
getRangeMethod · 0.85
getPointMethod · 0.85
_calculatePointMethod · 0.85
_calculatePointMethod · 0.85

Calls 5

TargetProfileClass · 0.90
defaultMethod · 0.80
itemsMethod · 0.80
getMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected