Files
pyfa/eos/effects/warpscrambleblockmwdwithnpceffect.py
blitzmann 1efcc8d3ef style
2018-03-10 12:09:51 -05:00

24 lines
684 B
Python

# warpScrambleBlockMWDWithNPCEffect
#
# Used by:
# Modules named like: Warp Scrambler (26 of 26)
from eos.saveddata.module import State
runTime = "early"
type = "projected", "active"
def handler(fit, module, context):
if "projected" not in context:
return
fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
# this is such a dirty hack
for mod in fit.modules:
if not mod.isEmpty and mod.state > State.ONLINE and (
mod.item.requiresSkill("Micro Jump Drive Operation")
or mod.item.requiresSkill("High Speed Maneuvering")
):
mod.state = State.ONLINE