Fix: Handle mis-clicked to page_exercise (#4434)

This commit is contained in:
LmeSzinc 2024-12-20 22:58:34 +08:00
parent be48eca020
commit c9fff1efa2

View File

@ -1,21 +1,21 @@
import numpy as np
from module.base.timer import Timer
from module.base.utils import get_color, color_similar
from module.base.utils import color_similar, get_color
from module.combat.assets import *
from module.combat_ui.assets import *
from module.combat.combat_auto import CombatAuto
from module.combat.combat_manual import CombatManual
from module.combat.hp_balancer import HPBalancer
from module.combat.level import Level
from module.combat.submarine import SubmarineCall
from module.combat_ui.assets import *
from module.handler.auto_search import AutoSearchHandler
from module.logger import logger
from module.map.assets import MAP_OFFENSIVE
from module.retire.retirement import Retirement
from module.statistics.azurstats import DropImage
from module.template.assets import TEMPLATE_COMBAT_LOADING
from module.ui.assets import BACK_ARROW, MUNITIONS_CHECK
from module.ui.assets import BACK_ARROW, EXERCISE_CHECK, MUNITIONS_CHECK
class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatManual, AutoSearchHandler):
@ -423,7 +423,12 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
Returns:
bool:
"""
if self.appear(MUNITIONS_CHECK, offset=(20, 20), interval=2):
if self.appear(MUNITIONS_CHECK, offset=(20, 20), interval=5):
logger.info(f'{MUNITIONS_CHECK} -> {BACK_ARROW}')
self.device.click(BACK_ARROW)
return True
if self.appear(EXERCISE_CHECK, offset=(20, 20), interval=5):
logger.info(f'{EXERCISE_CHECK} -> {BACK_ARROW}')
self.device.click(BACK_ARROW)
return True