diff --git a/tasks/combat/combat.py b/tasks/combat/combat.py index a15477dff..827e29f57 100644 --- a/tasks/combat/combat.py +++ b/tasks/combat/combat.py @@ -18,6 +18,7 @@ from tasks.map.control.joystick import MapControlJoystick class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSupport, CombatSkill, CombatObtain, MapControlJoystick): dungeon: DungeonList | None = None + is_doing_planner: bool = False def handle_combat_prepare(self): """ @@ -243,8 +244,13 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo return True # Stamina if self.config.stored.TrailblazePower.value < self.combat_wave_cost: - logger.info('Current trailblaze power is not enough for next run') - return False + if self.is_doing_planner: + logger.info('Current trailblaze power is not enough for next run, ' + 're-enter combat to check obtained items') + return True + else: + logger.info('Current trailblaze power is not enough for next run') + return False # Wave limit if self.combat_wave_limit: if self.combat_wave_done < self.combat_wave_limit: diff --git a/tasks/dungeon/dungeon.py b/tasks/dungeon/dungeon.py index f5e42d9db..b9614c9c1 100644 --- a/tasks/dungeon/dungeon.py +++ b/tasks/dungeon/dungeon.py @@ -231,8 +231,10 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat): dungeon = DungeonList.find(self.config.Dungeon_NameAtDoubleCalyx) if planner is not None: dungeon = planner + self.is_doing_planner = True self.running_double = True self.dungeon_run(dungeon=dungeon, wave_limit=self.config.stored.DungeonDouble.calyx) + self.is_doing_planner = False # Double relic if self.config.stored.DungeonDouble.relic > 0: logger.info('Run double relic') @@ -256,6 +258,7 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat): planner = self.planner.get_dungeon() if planner is not None: final = planner + self.is_doing_planner = True # Check daily if self.achieved_daily_quest: @@ -271,6 +274,7 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat): if self.require_compulsory_support(): logger.info('Run dungeon with support once as stamina is rogue prioritized') self.dungeon_run(dungeon=final, wave_limit=1) + self.is_doing_planner = False # Store immersifiers logger.info('Prioritize stamina for simulated universe, skip dungeon') amount = 0 @@ -290,6 +294,7 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat): else: # Combat self.dungeon_run(final) + self.is_doing_planner = False self.delay_dungeon_task(final) def delay_dungeon_task(self, dungeon: DungeonList):