From 8359d4bdc8a432e58431d167db65f072737ab1f7 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 21 Apr 2023 14:10:06 +0200 Subject: fixup --- rules.js | 16 +++++----------- 1 file 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, -- cgit v1.2.3