From 0ef50f6dc9393af6af12cb180dc28eda0ec05f81 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 16 Apr 2024 18:18:46 +0200 Subject: Fix "Tudor Banners". --- rules.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 19c502f..9690e6a 100644 --- a/rules.js +++ b/rules.js @@ -10437,16 +10437,11 @@ function tudor_banner_eligible() { return true } } - else - return false + return false } function goto_lancaster_event_tudor_banners() { - let can_play = false if (tudor_banner_eligible()) { - can_play = true - } - if (can_play) { game.state = "tudor_banners" game.who = NOBODY } else { @@ -10459,13 +10454,15 @@ states.tudor_banners = { inactive: "Tudor banners", prompt() { view.prompt = `Select locales adjacent to Henry to make them Lancastrian` + let done = true for (let next of data.locales[get_lord_locale(LORD_HENRY_TUDOR)].adjacent) { if (!has_enemy_lord(next) && !has_favourl_marker(next)) { gen_action_locale(next) - } else { - view.actions.done = 1 + done = false } } + if (done) + view.actions.done = 1 }, locale(loc) { push_undo() -- cgit v1.2.3