summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-03-22 22:54:04 +0100
committerTor Andersson <tor@ccxvii.net>2024-03-22 22:54:04 +0100
commite86233712f02bed10af1bbda41e6804d34091a9f (patch)
treef9bccd7ddbcc892c3e5874c99880e89dce86fd6c
parent745dd8e4a523750c462ede15a57d47ddfdccc94b (diff)
downloadtable-battles-e86233712f02bed10af1bbda41e6804d34091a9f.tar.gz
Fix Edgecote Moor scenario rule.
-rw-r--r--rules.js26
1 files 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