summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-13 19:17:09 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:27 +0100
commit5b0cc5b4caea40125c24cae8aeb243e857ac891e (patch)
tree0b27caca073e7a8b56b3d81abb9b7309e70200ca
parent19c0a7a39a01b3803a391b46cdf64548eae6b8ca (diff)
downloadrommel-in-the-desert-5b0cc5b4caea40125c24cae8aeb243e857ac891e.tar.gz
Note full or partial retreats and pursuit fire in log.
And print move summary after retreats too.
-rw-r--r--rules.js14
1 files 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 => {