Fix tele rebuy after failed tele (#237)

This commit is contained in:
aeon0
2021-12-08 21:41:40 +01:00
committed by GitHub
parent ea8fc96f83
commit 69870e73c5
2 changed files with 7 additions and 6 deletions
+3 -1
View File
@@ -275,9 +275,11 @@ class Bot:
def on_end_run(self):
self._pre_buffed = True
success = self._char.tp_town()
self._tps_left -= 1
if success:
self._tps_left -= 1
self._curr_loc = self._town_manager.wait_for_tp(self._curr_loc)
if self._curr_loc:
return self.trigger_or_stop("maintenance")
if not self._ui_manager.has_tps():
self._tps_left = 0
self.trigger_or_stop("end_game", failed=True)
+4 -5
View File
@@ -117,11 +117,10 @@ class Hammerdin(IChar):
self._pather.traverse_nodes([226], self, time_out=2.5)
self._cast_hammers(atk_len)
# move a bit to the top
for _ in range(2):
pos_m = self._screen.convert_abs_to_monitor((45, -30))
self.pre_move()
self.move(pos_m, force_move=True)
self._cast_hammers(atk_len)
pos_m = self._screen.convert_abs_to_monitor((45, -30))
self.pre_move()
self.move(pos_m, force_move=True)
self._cast_hammers(atk_len)
self._do_redemption()
return True