Files
pyfa/eos/effects/effect2302.py
2019-03-16 14:08:20 -04:00

16 lines
648 B
Python

# damageControl
#
# Used by:
# Modules from group: Damage Control (22 of 27)
type = "passive"
def handler(fit, module, context):
for layer, attrPrefix in (('shield', 'shield'), ('armor', 'armor'), ('hull', '')):
for damageType in ('Kinetic', 'Thermal', 'Explosive', 'Em'):
bonus = "%s%sDamageResonance" % (attrPrefix, damageType)
bonus = "%s%s" % (bonus[0].lower(), bonus[1:])
booster = "%s%sDamageResonance" % (layer, damageType)
fit.ship.multiplyItemAttr(bonus, module.getModifiedItemAttr(booster),
stackingPenalties=True, penaltyGroup="preMul")