mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 09:48:20 +08:00
Opt: Reuse screenshots in combat_status
This commit is contained in:
@@ -197,11 +197,7 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
|
||||
if balance_hp:
|
||||
self.hp_balance()
|
||||
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
for _ in self.loop():
|
||||
|
||||
if self.appear(BATTLE_PREPARATION, offset=(20, 20)):
|
||||
if self.handle_combat_automation_set(auto=auto == 'combat_auto'):
|
||||
@@ -328,8 +324,7 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
|
||||
confirm_timer = Timer(10)
|
||||
confirm_timer.start()
|
||||
|
||||
while 1:
|
||||
self.device.screenshot()
|
||||
for _ in self.loop():
|
||||
|
||||
if not confirm_timer.reached():
|
||||
if self.handle_combat_automation_confirm():
|
||||
@@ -518,8 +513,7 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
|
||||
self.device.click_record_clear()
|
||||
battle_status = False
|
||||
exp_info = False # This is for the white screen bug in game
|
||||
while 1:
|
||||
self.device.screenshot()
|
||||
for _ in self.loop():
|
||||
|
||||
# Expected end
|
||||
if isinstance(expected_end, str):
|
||||
|
||||
Reference in New Issue
Block a user