Add fighters to dps vs range graph
This commit is contained in:
@@ -151,6 +151,10 @@ class Fighter(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
||||
def abilities(self):
|
||||
return self.__abilities or []
|
||||
|
||||
@property
|
||||
def abilityMap(self):
|
||||
return {a.effectID: a for a in self.abilities}
|
||||
|
||||
@property
|
||||
def charge(self):
|
||||
return self.__charge
|
||||
|
||||
@@ -117,7 +117,19 @@ class FitDamageStatsGraph(FitGraph):
|
||||
tgtSpeed=miscInputMap['tgtSpeed'],
|
||||
tgtAngle=miscInputMap['tgtAngle'],
|
||||
tgtSigRadius=tgtSigRad)
|
||||
|
||||
for fighter in fit.fighters:
|
||||
if not fighter.isDealingDamage():
|
||||
continue
|
||||
abilityMap = fighter.abilityMap
|
||||
for effectID, abilityDps in fighter.getDpsPerEffect().items():
|
||||
ability = abilityMap[effectID]
|
||||
totalDps += abilityDps.total * getFighterAbilityMult(
|
||||
fighter=fighter,
|
||||
ability=ability,
|
||||
fit=fit,
|
||||
distance=distance,
|
||||
tgtSpeed=miscInputMap['tgtSpeed'],
|
||||
tgtSigRadius=tgtSigRad)
|
||||
xs.append(distance)
|
||||
ys.append(totalDps)
|
||||
return xs, ys
|
||||
|
||||
Reference in New Issue
Block a user