fix: improve potion management by filling belt from inventory and adjusting consumable handling
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
; Gear targets: ~350+ AR, ~20+ ED, ~50%+ HR, ~60%+ FCR,
|
||||
; ~150% IAS on weapon. Full Rejuv belt recommended.
|
||||
; If you chicken/die repeatedly, drop to Nightmare first.
|
||||
difficulty=hell
|
||||
difficulty=nightmare
|
||||
; name: bot profile name used in logs/messages and mod launch option replacement
|
||||
name=fistman
|
||||
; randomize_runs: 0 = run in listed order, 1 = shuffle run order
|
||||
@@ -67,6 +67,10 @@ d2r_path=C:\Program Files (x86)\Diablo II Resurrected
|
||||
max_consecutive_fails=5
|
||||
; max_game_length_s: emergency timeout per run/game
|
||||
max_game_length_s=600
|
||||
; 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.
|
||||
auto_downgrade_threshold=40
|
||||
|
||||
; if you set this field to 1, botty will attempt to restart d2 after a crash or failure
|
||||
restart_d2r_when_stuck=1
|
||||
|
||||
@@ -199,6 +199,7 @@ class Config:
|
||||
"name": _default_iff(self._select_val("general", "name"), "", "botty"),
|
||||
"max_game_length_s": float(self._select_val("general", "max_game_length_s")),
|
||||
"max_consecutive_fails": int(self._select_val("general", "max_consecutive_fails")),
|
||||
"auto_downgrade_threshold": int(self._select_optional("general", "auto_downgrade_threshold", "0")),
|
||||
"max_runtime_before_break_m": float(_default_iff(self._select_val("general", "max_runtime_before_break_m"), '', 0)),
|
||||
"break_length_m": float(_default_iff(self._select_val("general", "break_length_m"), '', 0)),
|
||||
"randomize_runs": bool(int(self._select_val("general", "randomize_runs"))),
|
||||
|
||||
@@ -95,6 +95,8 @@ class GameStats:
|
||||
self._last_status_report_run = 0
|
||||
self._last_failure_reason = None
|
||||
self._merc_resurrect_failed = False
|
||||
# Auto-downgrade tracking: timestamps of chickens+deaths
|
||||
self._downgrade_events: deque[float] = deque()
|
||||
os.makedirs("log/stats", exist_ok=True)
|
||||
|
||||
def set_failure_reason(self, reason: str):
|
||||
|
||||
Reference in New Issue
Block a user