summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-09 18:40:55 +0200
committerTor Andersson <tor@ccxvii.net>2024-08-21 00:28:20 +0200
commit0781f61d10e510ac4edfc3d4abb1637fbda36fdc (patch)
tree75977ce6ea6cb8105fd127c8250d15e08fb14b40
parent4e575a3795d5a76bc3db68848b23e2b609a51fec (diff)
downloadwashingtons-war-0781f61d10e510ac4edfc3d4abb1637fbda36fdc.tar.gz
remove british cu event
-rw-r--r--rules.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index e68d51f..b00798d 100644
--- a/rules.js
+++ b/rules.js
@@ -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))