When calculating the capactitor need of an energy nosferatu the amount was being modified incorrectly by the energy warfare resistance of the ship. Change to only apply energy warfare resitance modifier if this is a projected effect.
22 lines
650 B
Python
22 lines
650 B
Python
# energyNosferatuFalloff
|
|
#
|
|
# Used by:
|
|
# Modules from group: Energy Nosferatu (51 of 51)
|
|
from eos.modifiedAttributeDict import ModifiedAttributeDict
|
|
|
|
type = "active", "projected"
|
|
runTime = "late"
|
|
|
|
|
|
def handler(fit, src, context, **kwargs):
|
|
amount = src.getModifiedItemAttr("powerTransferAmount")
|
|
time = src.getModifiedItemAttr("duration")
|
|
|
|
if 'effect' in kwargs and "projected" in context:
|
|
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
|
|
|
|
if "projected" in context:
|
|
fit.addDrain(src, time, amount, 0)
|
|
elif "module" in context:
|
|
src.itemModifiedAttributes.force("capacitorNeed", -amount)
|