fix: buy consumables at A4 Jamella when in A5 (Malah unreliable in current patch)

Malah wanders and her body templates predate the patch; the hunt fails
most games and the failed-hunt position strands the char. Jamella is
static and detects at 0.99+. Travel cost ~30s vs a lost game.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
alex
2026-06-10 14:24:49 +02:00
co-authored by Claude Fable 5
parent 0b8d67b4e4
commit a7b12bc8a3
+13 -1
View File
@@ -537,7 +537,19 @@ class Bot:
Logger.info("Buy consumables and/or sell items")
self._maintenance_step = "buy_consumables"
prev_buy_loc = self._curr_loc
self._curr_loc, result_items = self._town_manager.buy_consumables(self._curr_loc, items = items)
# A5 Malah is unreliable in the current patch (wandering NPC, stale body
# templates — fails most games). Buy at A4 Jamella instead when in A5.
buy_loc = self._curr_loc
if TownManager.get_act_from_location(buy_loc) == Location.A5_TOWN_START:
Logger.info("Buy consumables: in A5 — traveling to A4 Jamella (Malah unreliable)")
a4_loc = self._town_manager.go_to_act(4, buy_loc)
if a4_loc:
buy_loc = a4_loc
self._curr_loc = a4_loc
prev_buy_loc = a4_loc
else:
Logger.warning("Buy consumables: travel to A4 failed — trying A5 Malah anyway")
self._curr_loc, result_items = self._town_manager.buy_consumables(buy_loc, items = items)
if self._curr_loc:
items = result_items
sell_items = any([item.sell for item in items]) if items else None