Skip to content

Commit

Permalink
Fix #199
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzmann committed Nov 13, 2014
1 parent 9de8fe5 commit 7a6e3ac
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions eos/graph/fitDps.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@ def calcDps(self, data):

for attr, values in ew.iteritems():
val = data[attr]
for i in xrange(len(values)):
bonus = values[i]
val *= 1 + (bonus - 1) * exp(- i ** 2 / 7.1289)
data[attr] = val
try:
for i in xrange(len(values)):
bonus = values[i]
val *= 1 + (bonus - 1) * exp(- i ** 2 / 7.1289)
data[attr] = val
except:
pass

for mod in fit.modules:
dps, _ = mod.damageStats(fit.targetResists)
Expand All @@ -70,7 +73,6 @@ def calcDps(self, data):
multiplier = 1 if drone.getModifiedItemAttr("maxVelocity") > 0 else self.calculateTurretMultiplier(drone, data)
dps = drone.damageStats(fit.targetResists)
total += dps * multiplier

return total

def calculateMissileMultiplier(self, mod, data):
Expand All @@ -87,6 +89,7 @@ def calculateMissileMultiplier(self, mod, data):
velocityFactor = (explosionVelocity / explosionRadius * targetSigRad / targetVelocity) ** (log(damageReductionFactor) / log(damageReductionSensitivity))
else:
velocityFactor = 1

return min(sigRadiusFactor, velocityFactor, 1)

def calculateTurretMultiplier(self, mod, data):
Expand Down

0 comments on commit 7a6e3ac

Please sign in to comment.