From 1ba3882eafe1ebdb5ee2c452e99a4f1d21b4b07f Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Tue, 2 Jan 2024 03:54:54 +0800 Subject: [PATCH] Fix: Combat should return wave count --- tasks/combat/combat.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tasks/combat/combat.py b/tasks/combat/combat.py index 124214be8..3ba806dad 100644 --- a/tasks/combat/combat.py +++ b/tasks/combat/combat.py @@ -318,7 +318,6 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo self.combat_wave_limit = wave_limit self.combat_wave_done = 0 - run_count = 0 while 1: logger.hr('Combat', level=2) logger.info(f'Combat, team={team}, wave={self.combat_wave_done}/{self.combat_wave_limit}') @@ -333,9 +332,8 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo finish = self.combat_finish() if self._combat_should_reenter(): continue - run_count += 1 if finish: break - logger.attr('CombatRunCount', run_count) - return run_count + logger.attr('combat_wave_done', self.combat_wave_done) + return self.combat_wave_done