diff options
-rw-r--r-- | rules.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1520,12 +1520,13 @@ function goto_attack_resolution() { } function attack_influence_shift() { - // TODO: Must be linked to pieces removed, not hits scored. let up = null, down = null - if (game.cmd.a_hit > game.cmd.d_hit) { + let score_a = Math.min(game.cmd.a_hit, game.cmd.n_units[1]) + let score_d = Math.min(game.cmd.d_hit, game.cmd.n_units[0]) + if (score_a > score_d) { up = game.cmd.attacker down = game.cmd.target - } else if (game.cmd.a_hit < game.cmd.d_hit) { + } else if (score_a < score_d) { down = game.cmd.attacker up = game.cmd.target } |