From c9dca6cd2a18665e902687f8552cb42f9ac220ab Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 31 May 2014 19:16:15 +0400 Subject: [PATCH] Implement remaining changes - besides new modules and ships --- eos/effects/carriercaldarifightersandbomberssig1.py | 5 +++++ eos/effects/dronemwdspeedbonus.py | 4 ++++ eos/effects/eliteindustrialwarpspeedbonus1.py | 4 ++++ ...iceharvestergasharvestersurveyscannermaxrangebonus.py | 9 +++++++++ eos/effects/scripttrackingcomputerfalloffbonusbonus.py | 3 +++ eos/effects/scripttrackingcomputermaxrangebonusbonus.py | 1 - eos/gamedata.py | 2 +- eos/saveddata/module.py | 2 +- 8 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 eos/effects/carriercaldarifightersandbomberssig1.py create mode 100644 eos/effects/dronemwdspeedbonus.py create mode 100644 eos/effects/eliteindustrialwarpspeedbonus1.py create mode 100644 eos/effects/gangmininglasericeharvestergasharvestersurveyscannermaxrangebonus.py create mode 100644 eos/effects/scripttrackingcomputerfalloffbonusbonus.py diff --git a/eos/effects/carriercaldarifightersandbomberssig1.py b/eos/effects/carriercaldarifightersandbomberssig1.py new file mode 100644 index 000000000..b0a20984c --- /dev/null +++ b/eos/effects/carriercaldarifightersandbomberssig1.py @@ -0,0 +1,5 @@ +type = "passive" +def handler(fit, ship, context): + level = fit.character.getSkill("Caldari Carrier").level + fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Fighters") or drone.item.requiresSkill("Fighter Bombers"), + "signatureRadius", ship.getModifiedItemAttr("carrierCaldariBonus1") * level) diff --git a/eos/effects/dronemwdspeedbonus.py b/eos/effects/dronemwdspeedbonus.py new file mode 100644 index 000000000..7f2375cf6 --- /dev/null +++ b/eos/effects/dronemwdspeedbonus.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, module, context): + fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Drones"), "maxVelocity", + module.getModifiedItemAttr("speedFactor"), stackingPenalties = True) diff --git a/eos/effects/eliteindustrialwarpspeedbonus1.py b/eos/effects/eliteindustrialwarpspeedbonus1.py new file mode 100644 index 000000000..41281ca48 --- /dev/null +++ b/eos/effects/eliteindustrialwarpspeedbonus1.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, ship, context): + level = fit.character.getSkill("Transport Ships").level + fit.ship.boostItemAttr("warpSpeedMultiplier", ship.getModifiedItemAttr("eliteBonusIndustrial1") * level) diff --git a/eos/effects/gangmininglasericeharvestergasharvestersurveyscannermaxrangebonus.py b/eos/effects/gangmininglasericeharvestergasharvestersurveyscannermaxrangebonus.py new file mode 100644 index 000000000..8235ef531 --- /dev/null +++ b/eos/effects/gangmininglasericeharvestergasharvestersurveyscannermaxrangebonus.py @@ -0,0 +1,9 @@ +type = "gang", "active" +gangBoost = "miningMaxRange" +def handler(fit, module, context): + if "gang" not in context: return + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Gas Cloud Harvesting") or mod.item.requiresSkill("Ice Harvesting") or mod.item.requiresSkill("Mining"), + "maxRange", module.getModifiedItemAttr("commandBonus"), + stackingPenalties = True) + fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("CPU Management"), + "surveyScanRange", module.getModifiedItemAttr("commandBonus")) diff --git a/eos/effects/scripttrackingcomputerfalloffbonusbonus.py b/eos/effects/scripttrackingcomputerfalloffbonusbonus.py new file mode 100644 index 000000000..ff381ab26 --- /dev/null +++ b/eos/effects/scripttrackingcomputerfalloffbonusbonus.py @@ -0,0 +1,3 @@ +type = "passive" +def handler(fit, module, context): + module.boostItemAttr("falloffBonus", module.getModifiedChargeAttr("falloffBonusBonus")) diff --git a/eos/effects/scripttrackingcomputermaxrangebonusbonus.py b/eos/effects/scripttrackingcomputermaxrangebonusbonus.py index e2a49b59d..aa8b2f8bc 100755 --- a/eos/effects/scripttrackingcomputermaxrangebonusbonus.py +++ b/eos/effects/scripttrackingcomputermaxrangebonusbonus.py @@ -4,4 +4,3 @@ type = "passive" def handler(fit, module, context): module.boostItemAttr("maxRangeBonus", module.getModifiedChargeAttr("maxRangeBonusBonus")) - module.boostItemAttr("falloffBonus", module.getModifiedChargeAttr("falloffBonusBonus")) diff --git a/eos/gamedata.py b/eos/gamedata.py index c514a051b..694b1e585 100755 --- a/eos/gamedata.py +++ b/eos/gamedata.py @@ -359,4 +359,4 @@ class Unit(EqBase): pass class Traits(EqBase): - pass \ No newline at end of file + pass diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index c27f065da..41b267d84 100755 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -372,7 +372,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): if shipType is not None: fitsOnType.add(shipType) - for i in xrange(1, 5): + for i in xrange(1, 6): shipType = self.getModifiedItemAttr("canFitShipType%d" % i) if shipType is not None: fitsOnType.add(shipType)