From 220c14fc4d2ec803a8fecb11e81b6d005239281c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 22 Jan 2023 11:39:24 +0100 Subject: Fix Avoid Battle with multiple ways. --- rules.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index 4155a52..0e47695 100644 --- a/rules.js +++ b/rules.js @@ -4959,10 +4959,11 @@ states.avoid_battle_way = { let to = game.march.avoid_to let ways = list_ways(from, to) for (let i = 1; i < ways.length; ++i) - gen_action_way(ways[i]) + if (can_avoid_battle(to, ways[i])) + gen_action_way(ways[i]) }, way(way) { - game.avoid_way = way + game.march.avoid_way = way avoid_battle_1() }, } -- cgit v1.2.3