battle_calcs.lua: fix bug in relative_damage_map()

This commit is contained in:
mattsc 2019-12-07 19:08:48 -08:00
parent c93b1db30a
commit 6a3015f0e2

View file

@ -1251,7 +1251,7 @@ function battle_calcs.relative_damage_map(units, enemies, cache)
best_enemy = enemy
end
end
unit_ratings[i] = { rating = max_rating, unit_id = u.id, enemy_id = best_enemy.id }
unit_ratings[i] = { rating = max_rating, unit_id = unit.id, enemy_id = best_enemy.id }
end
-- Then we want the same thing for all of the enemy units (for the counter attack on enemy turn)