summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-09 18:40:55 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-09 18:40:55 +0200
commit393be54dbfd5897574cb8f3f38020138194274ff (patch)
tree4764365a83269beac7ea4e62b2c86e42041c11ee
parent322eacc74f72f69625bb5d281ce6a5e5c1dd7cf3 (diff)
downloadwashingtons-war-393be54dbfd5897574cb8f3f38020138194274ff.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))