mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-29 05:55:31 +08:00
Fix: Misuse emergency_repair after retirement
This commit is contained in:
@@ -96,7 +96,6 @@ class Combat(HPBalancer, EnemySearchingHandler, Retirement, SubmarineCall, Comba
|
|||||||
self.emotion.wait(fleet=fleet_index)
|
self.emotion.wait(fleet=fleet_index)
|
||||||
if balance_hp:
|
if balance_hp:
|
||||||
self.hp_balance()
|
self.hp_balance()
|
||||||
# logger.info('start combat')
|
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
@@ -105,7 +104,12 @@ class Combat(HPBalancer, EnemySearchingHandler, Retirement, SubmarineCall, Comba
|
|||||||
if self.handle_combat_automation_set(auto=auto):
|
if self.handle_combat_automation_set(auto=auto):
|
||||||
continue
|
continue
|
||||||
if self.handle_retirement():
|
if self.handle_retirement():
|
||||||
continue
|
if self.config.ENABLE_HP_BALANCE:
|
||||||
|
self.wait_until_appear(BATTLE_PREPARATION)
|
||||||
|
# When re-entering battle_preparation page, the emergency icon is active by default, even if
|
||||||
|
# nothing to use. After a short animation, everything shows as usual.
|
||||||
|
self.device.sleep(0.5) # Wait animation.
|
||||||
|
continue
|
||||||
if self.handle_combat_low_emotion():
|
if self.handle_combat_low_emotion():
|
||||||
continue
|
continue
|
||||||
if self.handle_emergency_repair_use():
|
if self.handle_emergency_repair_use():
|
||||||
@@ -157,6 +161,8 @@ class Combat(HPBalancer, EnemySearchingHandler, Retirement, SubmarineCall, Comba
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def handle_emergency_repair_use(self):
|
def handle_emergency_repair_use(self):
|
||||||
|
if not self.config.ENABLE_HP_BALANCE:
|
||||||
|
return False
|
||||||
if self.appear_then_click(EMERGENCY_REPAIR_CONFIRM, offset=True):
|
if self.appear_then_click(EMERGENCY_REPAIR_CONFIRM, offset=True):
|
||||||
self.device.sleep(0.5) # Animation: hp increase and emergency_repair amount decrease.
|
self.device.sleep(0.5) # Animation: hp increase and emergency_repair amount decrease.
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user