summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--events.txt2
-rw-r--r--rules.js15
2 files changed, 9 insertions, 8 deletions
diff --git a/events.txt b/events.txt
index 1af104a..06b2122 100644
--- a/events.txt
+++ b/events.txt
@@ -374,7 +374,7 @@ CARD 70 - Old Dixie
CARD 71 - NAOWS Forms
# Add 1 :red_campaigner in the Northeast region. Receive 2 :button.
- add_campaigner NORTHEAST
+ add_campaigner RED NORTHEAST
receive_buttons 2
CARD 72 - Woman and the Republic
diff --git a/rules.js b/rules.js
index 4e961de..bb0d0f4 100644
--- a/rules.js
+++ b/rules.js
@@ -187,14 +187,14 @@ function us_state_region(s) {
return US_STATES[s].region
}
-function free_campaigner(campaigners, color) {
- const start = color === YELLOW ? 2 : color === RED ? 4 : 0
- const index = campaigners.indexOf(0, start)
- return index > start + 1 ? -1 : index
+function free_campaigner(color) {
+ const start = (color === YELLOW) ? 2 : color === RED ? 4 : 0
+ const index = game.campaigners.indexOf(0, start)
+ return index > (start + 1) ? -1 : index
}
function add_campaigner(color, region) {
- const index = free_campaigner(game.campaigners, color)
+ const index = free_campaigner(color)
if (index !== -1) {
game.campaigners[index] = region
} else {
@@ -1767,7 +1767,8 @@ function vm_goto() {
}
function vm_return() {
- game.state = "vm_return"
+ // game.state = "vm_return"
+ end_event()
}
states.vm_return = {
@@ -3467,7 +3468,7 @@ CODE[70] = [ // Old Dixie
]
CODE[71] = [ // NAOWS Forms
- [ vm_add_campaigner, NORTHEAST ],
+ [ vm_add_campaigner, RED, NORTHEAST ],
[ vm_receive_buttons, 2 ],
[ vm_return ],
]