diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-09 18:40:55 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-09 18:40:55 +0200 |
commit | 393be54dbfd5897574cb8f3f38020138194274ff (patch) | |
tree | 4764365a83269beac7ea4e62b2c86e42041c11ee | |
parent | 322eacc74f72f69625bb5d281ce6a5e5c1dd7cf3 (diff) | |
download | washingtons-war-393be54dbfd5897574cb8f3f38020138194274ff.tar.gz |
remove british cu event
-rw-r--r-- | rules.js | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -2491,6 +2491,29 @@ function gen_remove_american_cu() { } } +events.remove_british_cu = function (c, card) { + play_card(c); + game.state = 'remove_british_cu'; + game.count = card.count +} + +states.remove_british_cu = { + prompt: function (current) { + view.prompt = "Remove " + game.count + " British CU from any space."; + gen_pass(); + gen_remove_british_cu(); + }, + remove_cu: function (where) { + let cu = find_british_cu(where) + remove_cu(cu.owner, where, 1); + if (--game.count === 0) + end_strategy_card(); + }, + pass: function () { + end_strategy_card(); + }, +} + function gen_remove_british_cu() { for (let space in SPACES) { if (has_british_cu(space)) |