Skip to content

Commit 369a12a

Browse files
committed
Fix: ui misclick in coalition_20251120
1 parent ae9d64c commit 369a12a

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

module/coalition/coalition.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ def run(self, event='', mode='', fleet='', total=0):
166166
logger.info(f'Count: {self.run_count}')
167167

168168
# UI switches
169-
if self.config.SERVER in ['tw']:
170-
self.ui_goto(page_campaign_menu)
171-
if self.triggered_stop_condition(oil_check=True):
172-
break
169+
# if self.config.SERVER in ['tw']:
170+
# self.ui_goto(page_campaign_menu)
171+
# if self.triggered_stop_condition(oil_check=True):
172+
# break
173173
self.device.stuck_record_clear()
174174
self.device.click_record_clear()
175175
self.ui_goto_coalition()

module/coalition/ui.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ def coalition_map_exit(self, event):
293293
logger.info(f'{fleet_preparation} -> {NEONCITY_PREPARATION_EXIT}')
294294
self.device.click(NEONCITY_PREPARATION_EXIT)
295295
continue
296+
if self.appear_then_click(DAL_DIFFICULTY_EXIT, offset=(20, 20), interval=3):
297+
logger.info(f'{DAL_DIFFICULTY_EXIT} -> {DAL_DIFFICULTY_EXIT}')
298+
continue
296299

297300
def enter_map(self, event, stage, mode, skip_first_screenshot=True):
298301
"""
@@ -313,6 +316,7 @@ def enter_map(self, event, stage, mode, skip_first_screenshot=True):
313316
button_difficulty = None
314317
fleet_preparation = self.coalition_get_fleet_preparation(event)
315318
campaign_timer = Timer(5)
319+
campaign_difficulty_timer = Timer(5)
316320
fleet_timer = Timer(5)
317321
campaign_click = 0
318322
campaign_difficulty_click = 0
@@ -365,10 +369,10 @@ def enter_map(self, event, stage, mode, skip_first_screenshot=True):
365369
campaign_timer.reset()
366370
continue
367371
if event in ['coalition_20251120']:
368-
if campaign_timer.reached() and self.in_coalition_20251120_difficulty_selection() and button_difficulty:
372+
if campaign_difficulty_timer.reached() and self.in_coalition_20251120_difficulty_selection() and button_difficulty:
369373
self.device.click(button_difficulty)
370374
campaign_difficulty_click += 1
371-
campaign_timer.reset()
375+
campaign_difficulty_timer.reset()
372376
continue
373377

374378
# Fleet preparation

module/ui/ui.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from module.base.button import Button
22
from module.base.decorator import run_once
33
from module.base.timer import Timer
4-
from module.coalition.assets import NEONCITY_FLEET_PREPARATION, NEONCITY_PREPARATION_EXIT
4+
from module.coalition.assets import NEONCITY_FLEET_PREPARATION, NEONCITY_PREPARATION_EXIT, DAL_DIFFICULTY_EXIT
55
from module.combat.assets import GET_ITEMS_1, GET_ITEMS_2, GET_SHIP
66
from module.event_hospital.assets import HOSIPITAL_CLUE_CHECK, HOSPITAL_BATTLE_EXIT
77
from module.exception import (GameNotRunningError, GamePageUnknownError,
@@ -559,9 +559,12 @@ def ui_additional(self, get_ship=True):
559559
# if self.appear_then_click(HOSPITAL_BATTLE_EXIT, offset=(20, 20), interval=2):
560560
# return True
561561
# Neon city (coalition_20250626)
562-
if self.appear(NEONCITY_FLEET_PREPARATION, offset=(20, 20), interval=3):
563-
logger.info(f'{NEONCITY_FLEET_PREPARATION} -> {NEONCITY_PREPARATION_EXIT}')
564-
self.device.click(NEONCITY_PREPARATION_EXIT)
562+
# if self.appear(NEONCITY_FLEET_PREPARATION, offset=(20, 20), interval=3):
563+
# logger.info(f'{NEONCITY_FLEET_PREPARATION} -> {NEONCITY_PREPARATION_EXIT}')
564+
# self.device.click(NEONCITY_PREPARATION_EXIT)
565+
# return True
566+
# DATE A LANE (coalition_20251120)
567+
if self.appear_then_click(DAL_DIFFICULTY_EXIT, offset=(20, 20), interval=3):
565568
return True
566569

567570
# Idle page

0 commit comments

Comments
 (0)