From e2aaabbc1687167bf20ff4806d9f04e4138ff4c9 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 30 Sep 2019 16:40:48 +0300 Subject: [PATCH] Do not let jamming strength exceed 100% --- eos/effects.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eos/effects.py b/eos/effects.py index 3bfd67b42..9989c27ea 100644 --- a/eos/effects.py +++ b/eos/effects.py @@ -563,7 +563,7 @@ class Effect101(BaseEffect): # Lockbreaker Bombs ecmStrengthBonus = src.getModifiedChargeAttr('scan{0}StrengthBonus'.format(fit.scanType)) if ecmStrengthBonus: - strModifier = 1 - ecmStrengthBonus / fit.scanStrength + strModifier = 1 - min(1, ecmStrengthBonus / fit.scanStrength) fit.ecmProjectedStr *= strModifier @@ -27449,7 +27449,7 @@ class Effect6437(BaseEffect): if 'effect' in kwargs: from eos.modifiedAttributeDict import ModifiedAttributeDict strength *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) - chanceModifier = 1 - strength / fit.scanStrength + chanceModifier = 1 - min(1, strength / fit.scanStrength) fit.ecmProjectedStr *= chanceModifier @@ -27623,7 +27623,7 @@ class Effect6470(BaseEffect): if 'effect' in kwargs: from eos.modifiedAttributeDict import ModifiedAttributeDict strength *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) - chanceModifier = 1 - strength / fit.scanStrength + chanceModifier = 1 - min(1, strength / fit.scanStrength) fit.ecmProjectedStr *= chanceModifier @@ -28114,7 +28114,7 @@ class Effect6513(BaseEffect): if 'effect' in kwargs: from eos.modifiedAttributeDict import ModifiedAttributeDict strength *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) - chanceModifier = 1 - strength / fit.scanStrength + chanceModifier = 1 - min(1, strength / fit.scanStrength) fit.ecmProjectedStr *= chanceModifier @@ -30731,7 +30731,7 @@ class Effect6685(BaseEffect): if 'effect' in kwargs: from eos.modifiedAttributeDict import ModifiedAttributeDict strength *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) - chanceModifier = 1 - strength / fit.scanStrength + chanceModifier = 1 - min(1, strength / fit.scanStrength) fit.ecmProjectedStr *= chanceModifier @@ -30991,7 +30991,7 @@ class Effect6695(BaseEffect): if 'effect' in kwargs: from eos.modifiedAttributeDict import ModifiedAttributeDict strength *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) - chanceModifier = 1 - strength / fit.scanStrength + chanceModifier = 1 - min(1, strength / fit.scanStrength) fit.ecmProjectedStr *= chanceModifier @@ -31292,7 +31292,7 @@ class Effect6714(BaseEffect): if 'effect' in kwargs: from eos.modifiedAttributeDict import ModifiedAttributeDict strength *= ModifiedAttributeDict.getResistance(fit, kwargs['effect']) - chanceModifier = 1 - strength / fit.scanStrength + chanceModifier = 1 - min(1, strength / fit.scanStrength) fit.ecmProjectedStr *= chanceModifier