summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-22 11:39:24 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:39 +0100
commit220c14fc4d2ec803a8fecb11e81b6d005239281c (patch)
treeba3f8b5031d8795ddd1fb79027aaa4ac2e078bac
parent12075d7532c9597d3cc7817e91a891ce888514ca (diff)
downloadnevsky-220c14fc4d2ec803a8fecb11e81b6d005239281c.tar.gz
Fix Avoid Battle with multiple ways.
-rw-r--r--rules.js5
1 files 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()
},
}