Skip to content

Commit

Permalink
add Down Contrib PCT of Damage to damage overview table
Browse files Browse the repository at this point in the history
  • Loading branch information
Drevarr committed Jul 29, 2024
1 parent 00778c8 commit 94a4a0f
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions TW5_parse_top_stats_detailed.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
'againstDownedDamage': "Dmg to Downed",
'againstDownedCount': "Hits to Downed",
'downs': "Enemies Downed",
'kills': "Enemies Killed"
'kills': "Enemies Killed",
'dcPct': "Down Contrib PCT of Damage"
}

large_items = [
Expand Down Expand Up @@ -2145,8 +2146,16 @@
durationActive = player.duration_fights_present
details = "|"+name+" | {{"+prof+"}} | "+my_value(durationActive)
for stat in DmgOverviewTable:
curStat = round(player.total_stats[stat], 1)
details += "| "+my_value(curStat)
if stat == 'dcPct':
if player.total_stats['dmg'] == 0:
curStat = 0.0
details += "| "+my_value(curStat)+"%"
else:
curStat = round((player.total_stats['downContribution']/player.total_stats['dmg'])*100, 1)
details += "| "+my_value(curStat)+"%"
else:
curStat = round(player.total_stats[stat], 1)
details += "| "+my_value(curStat)
details += "|"
myprint(output, details)
myprint(output, "</$reveal>\n")
Expand All @@ -2169,8 +2178,16 @@
durationActive = player.duration_fights_present
details = "|"+name+" | {{"+prof+"}} | "+my_value(durationActive)
for stat in DmgOverviewTable:
curStat = round(player.average_stats[stat], 3)
details += "| "+"{:,.2f}".format(curStat)
if stat == 'dcPct':
if player.average_stats['dmg'] == 0:
curStat = 0.0
details += "| "+my_value(curStat)+"%"
else:
curStat = round((player.average_stats['downContribution']/player.average_stats['dmg'])*100, 1)
details += "| "+my_value(curStat)+"%"
else:
curStat = round(player.average_stats[stat], 3)
details += "| "+"{:,.2f}".format(curStat)
details += "|"
myprint(output, details)
myprint(output, "</$reveal>\n")
Expand Down

0 comments on commit 94a4a0f

Please sign in to comment.