Use correct formula. \o/

(cherry picked from commit b20b6c1)
This commit is contained in:
Ebag333
2017-03-23 14:48:17 -07:00
parent 4a9638767d
commit 13305d9ee1
3 changed files with 1034 additions and 6 deletions

View File

@@ -29,7 +29,8 @@ pyfalog = Logger(__name__)
class SettingsProvider(object):
BASE_PATH = os.path.join(config.savePath, 'settings')
if config.savePath:
BASE_PATH = os.path.join(config.savePath, 'settings')
settings = {}
_instance = None

View File

@@ -32,8 +32,8 @@ def test_multiply_stacking_penalties(DB, Saveddata, RifterFit):
calculated_resist = RifterFit.ship.getModifiedItemAttr("shieldEmDamageResonance")
else:
# Calculate what our next resist should be
# See: http://wiki.eveuniversity.org/Eve_Math#Stacking_Penalties
current_effectiveness = math.pow(0.5, (math.pow(0.45 * (_ - 1), 2)))
# Denominator: [math.exp((i / 2.67) ** 2.0) for i in xrange(8)]
current_effectiveness = 1 / math.exp(((_ - 1) / 2.67) ** 2.0)
new_item_modifier = 1 + ((item_modifer * current_effectiveness) / 100)
calculated_resist = (em_resist * new_item_modifier)
@@ -46,7 +46,5 @@ def test_multiply_stacking_penalties(DB, Saveddata, RifterFit):
em_resist = RifterFit.ship.getModifiedItemAttr("shieldEmDamageResonance")
# Ohnoes! Our stacking penalty calculations are off! Round off because the ones in Eos are probably wrong after four decimal places.
# TODO: Remove the round when Eos calcs are fixed
assert round(em_resist, 4) == round(calculated_resist, 4)
assert em_resist == calculated_resist
# print(str(em_resist) + "==" + str(calculated_resist))

File diff suppressed because it is too large Load Diff