Add DD support to dps graph
This commit is contained in:
@@ -67,6 +67,21 @@ def getSmartbombMult(mod, distance):
|
||||
return 1
|
||||
|
||||
|
||||
def getDoomsdayMult(mod, tgt, distance, tgtSigRadius):
|
||||
modRange = mod.maxRange
|
||||
# Single-target DDs have no range limit
|
||||
if modRange and distance > modRange:
|
||||
return 0
|
||||
# Single-target titan DDs are vs capitals only
|
||||
if {'superWeaponAmarr', 'superWeaponCaldari', 'superWeaponGallente', 'superWeaponMinmatar'}.intersection(mod.item.effects):
|
||||
if not tgt.ship.item.requiresSkill('Capital Ships'):
|
||||
return 0
|
||||
damageSig = mod.getModifiedItemAttr('doomsdayDamageRadius') or mod.getModifiedItemAttr('signatureRadius')
|
||||
if not damageSig:
|
||||
return 1
|
||||
return min(1, tgtSigRadius / damageSig)
|
||||
|
||||
|
||||
def getBombMult(mod, fit, tgt, distance, tgtSigRadius):
|
||||
modRange = mod.maxRange
|
||||
if modRange is None:
|
||||
|
||||
@@ -27,7 +27,7 @@ from service.const import GraphCacheCleanupReason
|
||||
from service.settings import GraphSettings
|
||||
from .calc import (
|
||||
getTurretMult, getLauncherMult, getDroneMult, getFighterAbilityMult,
|
||||
getSmartbombMult, getBombMult, getGuidedBombMult,
|
||||
getSmartbombMult, getDoomsdayMult, getBombMult, getGuidedBombMult,
|
||||
getWebbedSpeed, getTpMult)
|
||||
from .projectedCache import ProjectedDataCache
|
||||
from .timeCache import TimeCache
|
||||
@@ -484,6 +484,12 @@ class FitDamageStatsGraph(FitGraph):
|
||||
fit=fit,
|
||||
distance=distance,
|
||||
tgtSigRadius=tgtSigRadius)
|
||||
elif mod.item.group.name in ('Super Weapon', 'Structure Doomsday Weapon'):
|
||||
applicationMap[mod] = getDoomsdayMult(
|
||||
mod=mod,
|
||||
tgt=tgt,
|
||||
distance=distance,
|
||||
tgtSigRadius=tgtSigRadius)
|
||||
for drone in fit.drones:
|
||||
if not drone.isDealingDamage():
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user