Add assualt damage control effect

This commit is contained in:
blitzmann
2018-02-05 23:12:58 -05:00
parent 8a0f8ae609
commit 96828a5611

View File

@@ -0,0 +1,12 @@
type = "active"
runTime = "early"
def handler(fit, src, 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)
src.forceItemAttr(booster, src.getModifiedItemAttr("resistanceMultiplier"))