From 5b0cc5b4caea40125c24cae8aeb243e857ac891e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 13 Sep 2022 19:17:09 +0200 Subject: Note full or partial retreats and pursuit fire in log. And print move summary after retreats too. --- rules.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index b5aa38e..99a31cc 100644 --- a/rules.js +++ b/rules.js @@ -2872,6 +2872,7 @@ function push_move_summary(from, to, via, forced) { } function flush_move_summary() { + log_br() if (!game.from1 && !game.from2) { log(`Passed.`) } else if (!game.from2 && !game.to1) { @@ -3210,6 +3211,7 @@ states.regroup_move_destination = { } function end_movement() { + flush_move_summary() game.group = null game.regroup = null game.withdraw = null @@ -3436,7 +3438,6 @@ states.move = { } }, end_move() { - flush_move_summary() end_movement() } } @@ -4121,6 +4122,7 @@ function apply_retreat() { full_retreat = false }) if (full_retreat) { + log_h4(`Full retreat from #${game.retreat}`) goto_pursuit_fire_during_retreat(game.retreat) } else { set_add(game.partial_retreats, game.retreat) @@ -4138,6 +4140,7 @@ states.provoke_probe_combat = { gen_action('pass') }, probe() { + log_h3(`Probe Combat at #${game.retreat}`) set_active_player() game.state = 'probe_fire' game.battle = game.retreat @@ -4159,10 +4162,13 @@ function end_probe() { if (!set_has(game.retreat_units, u)) shielded = true }) - if (shielded) + if (shielded) { + log_h4(`Partial retreat from #${game.retreat}.`) goto_retreat_move() - else + } else { + log_h4(`Full retreat from #${game.retreat}`) goto_pursuit_fire_during_retreat(game.retreat) + } } function goto_retreat_move() { @@ -4377,7 +4383,7 @@ function goto_rout(from, enemy, after) { if (enemy) set_enemy_player() - log_h4(`Rout at #${from}`) + log_h4(`Routed at #${from}`) // RULES: Will be disrupted again, so won't be able to recover. for_each_friendly_unit_in_hex(from, u => { -- cgit v1.2.3