(mod, distance, tgtSpeed, tgtSigRadius)
| 175 | |
| 176 | |
| 177 | def getLauncherMult(mod, distance, tgtSpeed, tgtSigRadius): |
| 178 | missileMaxRangeData = mod.missileMaxRangeData |
| 179 | if missileMaxRangeData is None: |
| 180 | return 0 |
| 181 | # The ranges already consider ship radius |
| 182 | lowerRange, higherRange, higherChance = missileMaxRangeData |
| 183 | if distance is None or distance <= lowerRange: |
| 184 | distanceFactor = 1 |
| 185 | elif lowerRange < distance <= higherRange: |
| 186 | distanceFactor = higherChance |
| 187 | else: |
| 188 | distanceFactor = 0 |
| 189 | applicationFactor = _calcMissileFactor( |
| 190 | atkEr=mod.getModifiedChargeAttr('aoeCloudSize'), |
| 191 | atkEv=mod.getModifiedChargeAttr('aoeVelocity'), |
| 192 | atkDrf=mod.getModifiedChargeAttr('aoeDamageReductionFactor'), |
| 193 | tgtSpeed=tgtSpeed, |
| 194 | tgtSigRadius=tgtSigRadius) |
| 195 | return distanceFactor * applicationFactor |
| 196 | |
| 197 | |
| 198 | def getBreacherMult(mod, distance): |
no test coverage detected