From 3d5e4a5144ca8d522661087609523c9cfbc348ce Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 3 Jul 2023 19:14:42 +0200 Subject: Pax Deorum clear undo. --- rules.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rules.js b/rules.js index 164f6da..c82f25c 100644 --- a/rules.js +++ b/rules.js @@ -1060,15 +1060,18 @@ function eliminate_barbarian(id) { if (is_barbarian_leader(id) && game.combat) { if (id === CNIVA) { log("Cniva killed!") - game.combat.killed |= CNIVA_BONUS + if (game.combat) + game.combat.killed |= CNIVA_BONUS } if (id === ARDASHIR) { log("Ardashir killed!") - game.combat.killed |= ARDASHIR_BONUS + if (game.combat) + game.combat.killed |= ARDASHIR_BONUS } if (id === SHAPUR) { log("Shapur killed!") - game.combat.killed |= SHAPUR_BONUS + if (game.combat) + game.combat.killed |= SHAPUR_BONUS } set_barbarian_location(id, AVAILABLE) } else { @@ -1364,6 +1367,7 @@ states.pax_deorum_done = { view.actions.done = 1 }, done() { + clear_undo() if (game.current === game.count) { goto_take_actions() } else { @@ -1580,7 +1584,6 @@ function goto_palmyra_allies() { } function resume_palmyra_allies() { - // TODO: barbarian leaders if ( (find_active_barbarian_of_tribe(SASSANIDS, GALATIA) >= 0) || (find_active_barbarian_of_tribe(SASSANIDS, SYRIA) >= 0) || @@ -1597,6 +1600,7 @@ states.palmyra_allies = { prompt("Palmyra Allies: Remove " + game.count + " active Sassanids.") let id, where + // Allow targeting leaders specifically where = get_barbarian_location(SHAPUR) if (where === GALATIA || where === SYRIA || where === SASSANIDS_HOMELAND) gen_action_barbarian(SHAPUR) @@ -2176,7 +2180,8 @@ function remove_governor(where) { remove_quaestor(where) remove_emperor_token(where) - // TODO: manual? + // NOTE: Automated removal because it can be called from too many places. + // This should be a very rare occurence, so let's not worry about it. if (is_seat_of_power(where)) auto_remove_pretender_empire(where) remove_breakaway(where) @@ -3195,7 +3200,6 @@ states.force_march_who = { if (is_region(where) && has_general_battled(id) && !has_general_force_marched(id)) gen_action_general(id) } - // TODO: Militia + Force March ? }, general(id) { log("Force March.") @@ -3391,7 +3395,6 @@ states.mobile_vulgus = { function play_triumph() { log("Triumph.") - // TODO } // CARD: Demagogue -- cgit v1.2.3