diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-08-05 21:51:13 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-08-07 15:56:29 +0200 |
commit | be34836e93d0456b6d1651386260c188bb2f7e4c (patch) | |
tree | d59fe2c51909e41b325b8acefb2a8e85c9a40c6a /rules.js | |
parent | 9fc7a4ba2f4da39bfe1df6f88c4b42578f0c53cf (diff) | |
download | hammer-of-the-scots-master.tar.gz |
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -411,6 +411,10 @@ function reset_border_limits() { game.border_limit.length = 0 } +function reset_border_last_used() { + game.last_used.length = 0 +} + function count_friendly(where) { let p = game.active let count = 0 @@ -877,7 +881,7 @@ function start_game_turn() { // Reset movement and attack tracking state game.truce = false reset_border_limits() - game.last_used = [] + reset_border_last_used() game.attacker = [] game.reserves = [] game.moved = [] @@ -2196,15 +2200,15 @@ states.regroup = { delete game.battle_active if (game.battle_reason === 'herald') { delete game.battle_reason - game.last_used = [] + reset_border_last_used() end_player_turn() } else if (game.battle_reason === 'pillage') { delete game.battle_reason - game.last_used = [] + reset_border_last_used() end_player_turn() } else if (game.battle_reason === 'coronation') { delete game.battle_reason - game.last_used = [] + reset_border_last_used() resume_coronation() } else { delete game.battle_reason @@ -2296,6 +2300,8 @@ function goto_winter_turn() { log("") log(".h1 Winter of " + game.year) log("") + reset_border_limits() + reset_border_last_used() english_nobles_go_home() } |