Fixed DuelStatsView power totals including future units.

This commit is contained in:
Nick Winter 2015-09-04 17:21:33 -07:00
parent b3496cbf6b
commit a13ccb7360

View file

@ -89,7 +89,7 @@ module.exports = class DuelStatsView extends CocoView
palisade: 10
peasant: 50
powers = humans: 0, ogres: 0
for thang in @options.thangs when thang.health > 0
for thang in @options.thangs when thang.health > 0 and thang.exists
powers[thang.team] += @costTable[thang.type] or 0 if powers[thang.team]?
for player in @players
utils.replaceText @$find(player.team, '.power-value'), powers[player.team]