From d0b5f3ad7812d576020da6f8955d431e4389b141 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Tue, 2 Dec 2014 00:50:02 -0500 Subject: [PATCH] Fixed Confessor Prop mode effects and added Defense / Sharpshooter mode effects --- config.py | 2 +- eos/effects/modeagilitypostdiv.py | 3 +-- eos/effects/modearmorresonancepostdiv.py | 11 +++++++++++ eos/effects/modesigradiuspostdiv.py | 5 +++++ eos/effects/modevelocitypostdiv.py | 3 +-- eos/effects/shipmodemaxtargetrangepostdiv.py | 4 ++++ eos/effects/shipmodescanrespostdiv.py | 4 ++++ eos/effects/shipmodescanstrengthpostdiv.py | 4 ++++ eos/effects/shipmodesetoptimalrangepostdiv.py | 5 +++++ 9 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 eos/effects/modearmorresonancepostdiv.py create mode 100644 eos/effects/modesigradiuspostdiv.py create mode 100644 eos/effects/shipmodemaxtargetrangepostdiv.py create mode 100644 eos/effects/shipmodescanrespostdiv.py create mode 100644 eos/effects/shipmodescanstrengthpostdiv.py create mode 100644 eos/effects/shipmodesetoptimalrangepostdiv.py diff --git a/config.py b/config.py index 495bc7fe6..db7c21167 100644 --- a/config.py +++ b/config.py @@ -8,7 +8,7 @@ except ImportError: configforced = None # Turns on debug mode -debug = False +debug = True # Defines if our saveddata will be in pyfa root or not saveInRoot = False diff --git a/eos/effects/modeagilitypostdiv.py b/eos/effects/modeagilitypostdiv.py index 9f21a7805..8251e2852 100644 --- a/eos/effects/modeagilitypostdiv.py +++ b/eos/effects/modeagilitypostdiv.py @@ -1,5 +1,4 @@ type = "passive" def handler(fit, module, context): - # @todo: most likely have to fix this on release - fit.ship.boostItemAttr("agility", module.getModifiedItemAttr("modeAgilityPostDiv"), + fit.ship.multiplyItemAttr("agility", 1/module.getModifiedItemAttr("modeAgilityPostDiv"), stackingPenalties = True, penaltyGroup="postDiv") diff --git a/eos/effects/modearmorresonancepostdiv.py b/eos/effects/modearmorresonancepostdiv.py new file mode 100644 index 000000000..56e4bef1e --- /dev/null +++ b/eos/effects/modearmorresonancepostdiv.py @@ -0,0 +1,11 @@ +type = "passive" +def handler(fit, module, context): + for resType in ("Em", "Explosive", "Kinetic"): + fit.ship.multiplyItemAttr("armor{0}DamageResonance".format(resType), + 1/module.getModifiedItemAttr("mode{0}ResistancePostDiv".format(resType)), + stackingPenalties = True, penaltyGroup="postDiv") + + # Thermal != Thermic + fit.ship.multiplyItemAttr("armorThermalDamageResonance", + 1/module.getModifiedItemAttr("modeThermicResistancePostDiv"), + stackingPenalties = True, penaltyGroup="postDiv") diff --git a/eos/effects/modesigradiuspostdiv.py b/eos/effects/modesigradiuspostdiv.py new file mode 100644 index 000000000..20e530328 --- /dev/null +++ b/eos/effects/modesigradiuspostdiv.py @@ -0,0 +1,5 @@ +type = "passive" +def handler(fit, module, context): + level = fit.character.getSkill("Minmatar Destroyer").level + fit.ship.multiplyItemAttr("signatureRadius", 1/module.getModifiedItemAttr("modeSignatureRadiusPostDiv"), + stackingPenalties = True, penaltyGroup="postDiv") diff --git a/eos/effects/modevelocitypostdiv.py b/eos/effects/modevelocitypostdiv.py index 03809319e..91dc341cd 100644 --- a/eos/effects/modevelocitypostdiv.py +++ b/eos/effects/modevelocitypostdiv.py @@ -1,5 +1,4 @@ type = "passive" def handler(fit, module, context): - # @todo: most likely have to fix this on release - fit.ship.boostItemAttr("maxVelocity", module.getModifiedItemAttr("modeVelocityPostDiv"), + fit.ship.multiplyItemAttr("maxVelocity", 1/module.getModifiedItemAttr("modeVelocityPostDiv"), stackingPenalties = True, penaltyGroup="postDiv") diff --git a/eos/effects/shipmodemaxtargetrangepostdiv.py b/eos/effects/shipmodemaxtargetrangepostdiv.py new file mode 100644 index 000000000..0a7d0304a --- /dev/null +++ b/eos/effects/shipmodemaxtargetrangepostdiv.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, module, context): + fit.ship.multiplyItemAttr("maxTargetRange", 1/module.getModifiedItemAttr("modeMaxTargetRangePostDiv"), + stackingPenalties = True, penaltyGroup="postDiv") diff --git a/eos/effects/shipmodescanrespostdiv.py b/eos/effects/shipmodescanrespostdiv.py new file mode 100644 index 000000000..2df22198c --- /dev/null +++ b/eos/effects/shipmodescanrespostdiv.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, module, context): + fit.ship.multiplyItemAttr("scanResolution", 1/module.getModifiedItemAttr("modeScanResPostDiv"), + stackingPenalties = True, penaltyGroup="postDiv") diff --git a/eos/effects/shipmodescanstrengthpostdiv.py b/eos/effects/shipmodescanstrengthpostdiv.py new file mode 100644 index 000000000..3dbc07954 --- /dev/null +++ b/eos/effects/shipmodescanstrengthpostdiv.py @@ -0,0 +1,4 @@ +type = "passive" +def handler(fit, module, context): + fit.ship.multiplyItemAttr("scanRadarStrength", 1/module.getModifiedItemAttr("modeRadarStrengthPostDiv"), + stackingPenalties = True, penaltyGroup="postDiv") diff --git a/eos/effects/shipmodesetoptimalrangepostdiv.py b/eos/effects/shipmodesetoptimalrangepostdiv.py new file mode 100644 index 000000000..baf3f6864 --- /dev/null +++ b/eos/effects/shipmodesetoptimalrangepostdiv.py @@ -0,0 +1,5 @@ +type = "passive" +def handler(fit, module, context): + fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Small Energy Turret"), + "maxRange", 1/module.getModifiedItemAttr("modeMaxRangePostDiv"), + stackingPenalties=True, penaltyGroup="postDiv")