diff --git a/config/params.ini b/config/params.ini index 7ee363f..040c1e5 100644 --- a/config/params.ini +++ b/config/params.ini @@ -78,7 +78,7 @@ max_game_length_s=900 ; max_maintenance_time_s: if the town maintenance loop (heal/buy/stash/repair) takes ; longer than this many seconds, save-and-exit and rejoin a fresh game. ; Prevents the bot staying stuck in A5 town forever when NPCs or pathing fail. -max_maintenance_time_s=120 +max_maintenance_time_s=240 ; auto_downgrade_threshold: if combined chickens+deaths exceed this number within 1 hour, ; bot automatically lowers difficulty by one tier (hell->nightmare->normal) and restarts. ; Set to 0 to disable. (NOTE: feature is parsed but not yet active in bot logic) diff --git a/src/bot.py b/src/bot.py index a025fa2..99bdab3 100644 --- a/src/bot.py +++ b/src/bot.py @@ -587,13 +587,14 @@ class Bot: sell_items = any([item.sell for item in items]) if items else None Logger.debug(f"Needs: {consumables.get_needs()}") else: - reason = "Maintenance failed [step: buy_consumables] — vendor NPC not found after retry" - Logger.error(reason) + # NON-FATAL: buying pots is optional (belt refills from drops), but + # STASHING loot is the whole point of the run. Do NOT end the game + # here — that skips the stash step and strands picked-up runes/items + # in inventory forever. Re-anchor and fall through to stash. + reason = "Buy consumables failed (vendor not found) — continuing to stash without buying" + Logger.warning(reason) self._save_error_screenshot("maintenance", reason) - if not self._game_stats.get_failure_reason(): - self._game_stats.set_failure_reason(reason) - self.trigger_or_stop("end_game", failed=True) - return + self._curr_loc = self._verify_town_location(prev_buy_loc) elif meters.get_health(img) <= Config().char["take_rejuv_potion_health"] or meters.get_mana(img) <= Config().char["take_rejuv_potion_mana"]: Logger.info("Healing at next possible Vendor") self._maintenance_step = "heal"