From be34836e93d0456b6d1651386260c188bb2f7e4c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 5 Aug 2024 21:51:13 +0200 Subject: Reset border limit display at start of winter. --- rules.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index 716c1fd..319f1a0 100644 --- a/rules.js +++ b/rules.js @@ -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() } -- cgit v1.2.3