Fix: Handle combat_waves <= 0 in _combat_can_again

This commit is contained in:
LmeSzinc 2024-08-26 22:42:05 +08:00
parent 6044946b7b
commit a39a7d95f6

View File

@ -220,6 +220,9 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
if self.obtain_frequent_check: if self.obtain_frequent_check:
logger.info('Exit combat to check obtained items') logger.info('Exit combat to check obtained items')
return False return False
if self.combat_waves <= 0:
logger.warning(f'combat_waves {self.combat_waves} <= 0 in _combat_can_again, revise to 1')
self.combat_waves = 1
# Wave limit # Wave limit
if self.combat_wave_limit: if self.combat_wave_limit:
if self.combat_wave_done + self.combat_waves > self.combat_wave_limit: if self.combat_wave_done + self.combat_waves > self.combat_wave_limit: