mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-24 09:33:34 +00:00
Fix: Trailblaze power extract should before setting waves
This commit is contained in:
parent
1c914a8854
commit
6044946b7b
@ -31,8 +31,15 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
|
||||
in: COMBAT_PREPARE
|
||||
"""
|
||||
self.combat_waves = 1
|
||||
current = self.combat_get_trailblaze_power()
|
||||
cost = self.combat_get_wave_cost()
|
||||
if self.config.stored.TrailblazePower.value < self.combat_wave_cost:
|
||||
if self._try_get_more_trablaize_power(self.combat_wave_cost):
|
||||
current = self.config.stored.TrailblazePower.value
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
current = self.combat_get_trailblaze_power()
|
||||
|
||||
if cost == 10:
|
||||
# Calyx
|
||||
self.combat_waves = min(current // self.combat_wave_cost, 6)
|
||||
@ -54,7 +61,7 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
|
||||
|
||||
# Check limits
|
||||
if self.config.stored.TrailblazePower.value < self.combat_wave_cost:
|
||||
return self._try_get_more_trablaize_power(self.combat_wave_cost)
|
||||
return False
|
||||
if self.combat_waves <= 0:
|
||||
logger.info('Combat wave limited, cannot continue combat')
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user