Fix: Update obtain_frequent_check before deside again or exit

This commit is contained in:
LmeSzinc 2024-05-30 20:26:45 +08:00
parent ac7be3e950
commit a40b9d69fd
2 changed files with 5 additions and 2 deletions

View File

@ -296,6 +296,8 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
# Game client might slow to response COMBAT_AGAIN clicks
if self.appear(COMBAT_AGAIN, interval=5):
add_wave_done()
# Update obtain_frequent_check
self.obtained_is_full(dungeon=self.dungeon, wave_done=self.combat_wave_done, obtain_get=False)
# Cache the result of _combat_can_again() as no expected stamina reduce during retry
if combat_can_again is None:
combat_can_again = self._combat_can_again()

View File

@ -253,7 +253,7 @@ class CombatObtain(PlannerMixin):
self.planner_write()
return items
def obtained_is_full(self, dungeon: DungeonList | None, wave_done=0) -> bool:
def obtained_is_full(self, dungeon: DungeonList | None, wave_done=0, obtain_get=True) -> bool:
if dungeon is None:
self.obtain_frequent_check = False
return False
@ -263,6 +263,7 @@ class CombatObtain(PlannerMixin):
return False
# Update
if obtain_get:
self.obtain_get(dungeon)
# Check progress