diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-11-24 13:31:21 +0100 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-11-24 13:31:21 +0100 |
commit | 6f1a3ae0ae68bcca7df261662ded93474f4912f2 (patch) | |
tree | f1d55aa16cda7718c7e39a9f8466464ba9d35810 | |
parent | f6b23c2e03ba1d38cfa392a9d1d069c5af1a6473 (diff) | |
download | votes-for-women-6f1a3ae0ae68bcca7df261662ded93474f4912f2.tar.gz |
remove end event prompt. fix add campaigner
-rw-r--r-- | events.txt | 2 | ||||
-rw-r--r-- | rules.js | 15 |
2 files changed, 9 insertions, 8 deletions
@@ -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 @@ -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 ], ] |