MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / _calcTurretMult

Function _calcTurretMult

graphs/data/fitDamageStats/calc/application.py:363–375  ·  view source on GitHub ↗

Calculate damage multiplier for turret-based weapons.

(chanceToHit)

Source from the content-addressed store, hash-verified

361# Turret-specific math
362@lru_cache(maxsize=50)
363def _calcTurretMult(chanceToHit):
364 """Calculate damage multiplier for turret-based weapons."""
365 # https://wiki.eveuniversity.org/Turret_mechanics#Damage
366 wreckingChance = min(chanceToHit, 0.01)
367 wreckingPart = wreckingChance * 3
368 normalChance = chanceToHit - wreckingChance
369 if normalChance > 0:
370 avgDamageMult = (0.01 + chanceToHit) / 2 + 0.49
371 normalPart = normalChance * avgDamageMult
372 else:
373 normalPart = 0
374 totalMult = normalPart + wreckingPart
375 return totalMult
376
377
378@lru_cache(maxsize=1000)

Callers 3

_turretApplicationFunction · 0.90
getTurretMultFunction · 0.85
getDroneMultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected