MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / _missileApplication

Function _missileApplication

graphs/data/fitDamageEnvelope/getter.py:58–73  ·  view source on GitHub ↗
(snapshot, distance, tgtSpeed, tgtSigRadius)

Source from the content-addressed store, hash-verified

56
57
58def _missileApplication(snapshot, distance, tgtSpeed, tgtSigRadius):
59 rangeData = snapshot['missileMaxRangeData']
60 if rangeData is None:
61 return 0
62 lowerRange, higherRange, higherChance = rangeData
63 if distance is None or distance <= lowerRange:
64 distanceFactor = 1
65 elif lowerRange < distance <= higherRange:
66 distanceFactor = higherChance
67 else:
68 distanceFactor = 0
69 if distanceFactor == 0:
70 return 0
71 applicationFactor = _calcMissileFactor(atkEr=snapshot['aoeCloudSize'], atkEv=snapshot['aoeVelocity'],
72 atkDrf=snapshot['aoeDamageReductionFactor'], tgtSpeed=tgtSpeed, tgtSigRadius=tgtSigRadius)
73 return distanceFactor * applicationFactor
74
75
76def _snapshotTurret(mod, dmgTyped, charge):

Callers 2

_pruneDominatedFunction · 0.85
_bestWeaponDpsAtDistanceFunction · 0.85

Calls 1

_calcMissileFactorFunction · 0.90

Tested by

no test coverage detected