From e86233712f02bed10af1bbda41e6804d34091a9f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 22 Mar 2024 22:54:04 +0100 Subject: Fix Edgecote Moor scenario rule. --- rules.js | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/rules.js b/rules.js index 50ab89d..d37679c 100644 --- a/rules.js +++ b/rules.js @@ -3146,10 +3146,6 @@ states.command = { card(c) { log("Command\nC" + game.selected + "\nC" + c) - let p = player_index() - set_delete(game.reserve[p], c) - set_add(game.front[p], c) - if (game.scenario === S4_BOSWORTH_FIELD) { if (c === S4_THE_STANLEYS) { if (is_card_in_play_or_reserve(S4_NORTHUMBERLAND)) { @@ -3159,6 +3155,14 @@ states.command = { } } + if (game.scenario === S13_EDGECOTE_MOOR) { + if (game.reserve[0].length === 2 && game.reserve[1].length === 1) { + let p = player_index() + log("Gained a second morale cube.") + game.morale[p] += 1 + } + } + if (game.scenario === S37_INKERMAN) { if (c === S37_PAULOFFS_LEFT) { log("Morale Cube added to Russian side.") @@ -3166,17 +3170,9 @@ states.command = { } } - if (game.scenario === S13_EDGECOTE_MOOR) { - // TODO: pay all 3 cubes? remove cards from play? - if (game.reserve[0].length === 0 && game.reserve[1].length > 0) { - log("Gained a second morale cube.") - game.morale[0] += 1 - } - if (game.reserve[1].length === 0 && game.reserve[0].length > 0) { - log("Gained a second morale cube.") - game.morale[1] += 1 - } - } + let p = player_index() + set_delete(game.reserve[p], c) + set_add(game.front[p], c) if (game.scenario === S44_HOHENFRIEDBERG) { // one at a time -- cgit v1.2.3