summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/rules.ts b/rules.ts
index 1d719b9..f1f71da 100644
--- a/rules.ts
+++ b/rules.ts
@@ -235,6 +235,7 @@ interface State {
sail?(): void,
stronghold?(): void,
supply?(): void,
+ take_all?(): void,
take_cart?(): void,
take_prov?(): void,
take_ship?(): void,
@@ -5485,6 +5486,8 @@ function prompt_spoils() {
view.actions.take_prov = 1
if (game.spoils[CART] > 0)
view.actions.take_cart = 1
+ if (game.spoils[PROV] > 0 || game.spoils[CART] > 0)
+ view.actions.take_all = 1
}
function take_spoils(type: Asset) {
@@ -5494,6 +5497,13 @@ function take_spoils(type: Asset) {
game.who = NOBODY
}
+function take_all_spoils() {
+ add_lord_assets(game.who, PROV, game.spoils[PROV])
+ add_lord_assets(game.who, CART, game.spoils[CART])
+ game.spoils = [ 0, 0, 0 ]
+ game.who = NOBODY
+}
+
function goto_exile_spoils() {
round_spoils()
if (has_any_spoils()) {
@@ -5549,6 +5559,11 @@ states.exile_spoils = {
take_spoils(CART)
},
+ take_all() {
+ push_undo_without_who()
+ take_all_spoils()
+ },
+
end_spoils() {
end_exile_spoils()
},
@@ -7789,6 +7804,11 @@ states.battle_spoils = {
take_spoils(CART)
},
+ take_all() {
+ push_undo_without_who()
+ take_all_spoils()
+ },
+
end_spoils() {
end_battle_spoils()
},
@@ -12294,6 +12314,10 @@ states.rebel_supply_depot = {
push_undo_without_who()
take_spoils(PROV)
},
+ take_all() {
+ push_undo_without_who()
+ take_all_spoils()
+ },
end_spoils() {
push_undo_without_who()
end_rebel_supply_depot()