summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-21 14:10:06 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commit8359d4bdc8a432e58431d167db65f072737ab1f7 (patch)
treef53390425f54457955e4937c25d622e8cd73b2ea /rules.js
parentc499061ae2b86458b134ec83f16aa572b85905c1 (diff)
downloadandean-abyss-8359d4bdc8a432e58431d167db65f072737ab1f7.tar.gz
fixup
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js16
1 files changed, 5 insertions, 11 deletions
diff --git a/rules.js b/rules.js
index b787e1a..937791d 100644
--- a/rules.js
+++ b/rules.js
@@ -7535,12 +7535,9 @@ states.vm_free_rally_attack_terror = {
prompt() {
event_prompt(`Free Rally, Attack, or Terror in ${space_name[game.vm.s]}.`)
view.where = game.vm.s
- view.actions.rally = 1
- if (has_enemy_piece(game.vm.s))
- view.actions.attack = 1
- else
- view.actions.attack = 0
- view.actions.terror = 1
+ view.actions.rally = can_rally_in_space(game.vm.s) ? 1 : 0
+ view.actions.attack = can_attack_in_space(game.vm.s) ? 1 : 0
+ view.actions.terror = can_terror_in_space(game.vm.s) ? 1 : 0
},
rally: vm_free_rally,
attack: vm_free_attack,
@@ -7551,11 +7548,8 @@ states.vm_free_attack_terror = {
prompt() {
event_prompt(`Free Attack or Terror in ${space_name[game.vm.s]}.`)
view.where = game.vm.s
- if (has_enemy_piece(game.vm.s))
- view.actions.attack = 1
- else
- view.actions.attack = 0
- view.actions.terror = 1
+ view.actions.attack = can_attack_in_space(game.vm.s) ? 1 : 0
+ view.actions.terror = can_terror_in_space(game.vm.s) ? 1 : 0
},
attack: vm_free_attack,
terror: vm_free_terror,