From 337ce4a7442ef18fed5bacea3011d27090cad8b8 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Tue, 11 Feb 2025 19:39:37 +0000 Subject: Fix Tyrant with no spaces for Ceausescus --- rules.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/rules.js b/rules.js index 301d7fb..43999f4 100644 --- a/rules.js +++ b/rules.js @@ -7834,11 +7834,16 @@ states.vm_the_chinese_solution = { states.vm_the_tyrant_is_gone = { prompt() { - view.prompt = 'The Tyrant is Gone: Select a space in Romania for the Ceausescus to flee to.' - for (let space_id of game.valid_spaces) { - if (!space_id) - continue - gen_action_space(space_id) + if (game.valid_spaces.length === 0) { + view.prompt = 'The Tyrant is Gone: No space available.' + gen_action('pass') + } else { + view.prompt = 'The Tyrant is Gone: Select a space in Romania for the Ceausescus to flee to.' + for (let space_id of game.valid_spaces) { + if (!space_id) + continue + gen_action_space(space_id) + } } }, space(space) { @@ -7848,6 +7853,10 @@ states.vm_the_tyrant_is_gone = { game.valid_spaces = [] vm_next() }, + pass() { + push_undo() + vm_next() + } } states.vm_the_wall_must_go = { -- cgit v1.2.3