From f67d27d450268b48bd35b0c0b1eab5cea11ce138 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Wed, 11 Sep 2024 21:20:33 +0800 Subject: [PATCH] Fix: Stamina was used in ornament --- tasks/ornament/combat.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasks/ornament/combat.py b/tasks/ornament/combat.py index 5d880ea2d..5ff1b1460 100644 --- a/tasks/ornament/combat.py +++ b/tasks/ornament/combat.py @@ -126,12 +126,16 @@ class OrnamentCombat(Dungeon, RouteLoader, DungeonState): Pages: in: COMBAT_PREPARE or COMBAT_REPEAT """ + logger.info(f'Ornament_UseStamina={self.config.Ornament_UseStamina}, ' + f'DungeonDouble.rogue={self.config.stored.DungeonDouble.rogue}') before = self.get_equivalent_stamina() + logger.info(f'equivalent_stamina: {before}') after = before for _ in range(3): self.update_stamina_status() after = self.get_equivalent_stamina() + logger.info(f'equivalent_stamina: {after}') if expect_reduce: if before > after: break @@ -140,6 +144,13 @@ class OrnamentCombat(Dungeon, RouteLoader, DungeonState): return after + def _try_get_more_trablaize_power(self, cost): + if self.config.Ornament_UseStamina or self.config.stored.DungeonDouble.rogue > 0: + return super()._try_get_more_trablaize_power(cost) + else: + logger.info('Skip _try_get_more_trablaize_power') + return False + def is_trailblaze_power_exhausted(self): flag = self.get_equivalent_stamina() < self.combat_wave_cost logger.attr('TrailblazePowerExhausted', flag)