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

Function getBombMult

graphs/data/fitDamageStats/calc/application.py:238–254  ·  view source on GitHub ↗
(mod, src, tgt, distance, tgtSigRadius)

Source from the content-addressed store, hash-verified

236
237
238def getBombMult(mod, src, tgt, distance, tgtSigRadius):
239 modRange = mod.maxRange
240 if modRange is None:
241 return 0
242 blastRadius = mod.getModifiedChargeAttr('explosionRange')
243 atkRadius = src.getRadius()
244 tgtRadius = tgt.getRadius()
245 # Bomb starts in the center of the ship
246 # Also here we assume that it affects target as long as blast
247 # touches its surface, not center - I did not check this
248 if distance is not None and distance < max(0, modRange - atkRadius - tgtRadius - blastRadius):
249 return 0
250 if distance is not None and distance > max(0, modRange - atkRadius + tgtRadius + blastRadius):
251 return 0
252 return _calcBombFactor(
253 atkEr=mod.getModifiedChargeAttr('aoeCloudSize'),
254 tgtSigRadius=tgtSigRadius)
255
256
257def getGuidedBombMult(mod, src, distance, tgtSigRadius):

Callers 1

getApplicationPerKeyFunction · 0.85

Calls 3

_calcBombFactorFunction · 0.85
getModifiedChargeAttrMethod · 0.80
getRadiusMethod · 0.80

Tested by

no test coverage detected