diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-17 17:11:20 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:48 +0100 |
commit | 3a564d1ecff1bb68d7646fd0fd427ca775c7924d (patch) | |
tree | cb26c4427e5229b879cac8ec050396a4997ce5a1 /rules.js | |
parent | a18f1e41541b4e206c54af13733aef394458b8ca (diff) | |
download | table-battles-3a564d1ecff1bb68d7646fd0fd427ca775c7924d.tar.gz |
Shortcut confirm for Screen/Absorb/Counterattack.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -3268,6 +3268,7 @@ states.screen = { prompt() { view.prompt = "Screen attack from " + card_name(game.selected) + "." view.actions.screen = 1 + gen_action_card(game.selected) }, screen() { log("Screen\nC" + game.target) @@ -3279,6 +3280,9 @@ states.screen = { end_reaction() }, + card(c) { + this.screen() + }, } // === ABSORB === @@ -3344,6 +3348,7 @@ states.absorb = { prompt() { view.prompt = "Absorb attack from " + card_name(game.selected) + "." view.actions.absorb = 1 + gen_action_card(game.selected) }, absorb() { log("Absorb\nC" + game.target) @@ -3351,6 +3356,9 @@ states.absorb = { pay_for_action(game.target) end_reaction() }, + card(c) { + this.absorb() + }, } // === COUNTERATTACK === @@ -3408,6 +3416,7 @@ states.counterattack = { prompt() { view.prompt = "Counterattack " + card_name(game.selected) + "." view.actions.counterattack = 1 + gen_action_card(game.selected) }, counterattack() { log("Counterattack\nC" + game.target) @@ -3415,6 +3424,9 @@ states.counterattack = { pay_for_action(game.target) end_reaction() }, + card(c) { + this.counterattack() + }, } // === ATTACK EFFECTS === |