diff --git a/assets/cn/coalition/DATEALANE_AREA1.png b/assets/cn/coalition/DATEALANE_AREA1.png deleted file mode 100644 index 585f2a267..000000000 Binary files a/assets/cn/coalition/DATEALANE_AREA1.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_AREA2.png b/assets/cn/coalition/DATEALANE_AREA2.png deleted file mode 100644 index 37015ee79..000000000 Binary files a/assets/cn/coalition/DATEALANE_AREA2.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_AREA3.png b/assets/cn/coalition/DATEALANE_AREA3.png deleted file mode 100644 index b2e46ff65..000000000 Binary files a/assets/cn/coalition/DATEALANE_AREA3.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_AREA4.png b/assets/cn/coalition/DATEALANE_AREA4.png deleted file mode 100644 index a3e17ec04..000000000 Binary files a/assets/cn/coalition/DATEALANE_AREA4.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_AREA5.png b/assets/cn/coalition/DATEALANE_AREA5.png deleted file mode 100644 index ca028de14..000000000 Binary files a/assets/cn/coalition/DATEALANE_AREA5.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_AREA6.png b/assets/cn/coalition/DATEALANE_AREA6.png deleted file mode 100644 index 0ee3ebbe7..000000000 Binary files a/assets/cn/coalition/DATEALANE_AREA6.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_COALITION_CHECK.png b/assets/cn/coalition/DATEALANE_COALITION_CHECK.png deleted file mode 100644 index d5c4cb709..000000000 Binary files a/assets/cn/coalition/DATEALANE_COALITION_CHECK.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_FLEET_PREPARATION.png b/assets/cn/coalition/DATEALANE_FLEET_PREPARATION.png deleted file mode 100644 index 40ff8512e..000000000 Binary files a/assets/cn/coalition/DATEALANE_FLEET_PREPARATION.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_MODE_HARD.png b/assets/cn/coalition/DATEALANE_MODE_HARD.png deleted file mode 100644 index 6a4b020c0..000000000 Binary files a/assets/cn/coalition/DATEALANE_MODE_HARD.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_MODE_NORMAL.png b/assets/cn/coalition/DATEALANE_MODE_NORMAL.png deleted file mode 100644 index 76699dd13..000000000 Binary files a/assets/cn/coalition/DATEALANE_MODE_NORMAL.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_PREPARATION_EXIT.png b/assets/cn/coalition/DATEALANE_PREPARATION_EXIT.png deleted file mode 100644 index 3e7f959d8..000000000 Binary files a/assets/cn/coalition/DATEALANE_PREPARATION_EXIT.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_PT_OCR.png b/assets/cn/coalition/DATEALANE_PT_OCR.png deleted file mode 100644 index 2b982399d..000000000 Binary files a/assets/cn/coalition/DATEALANE_PT_OCR.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_SWITCH_MULTI.png b/assets/cn/coalition/DATEALANE_SWITCH_MULTI.png deleted file mode 100644 index a9cd328d9..000000000 Binary files a/assets/cn/coalition/DATEALANE_SWITCH_MULTI.png and /dev/null differ diff --git a/assets/cn/coalition/DATEALANE_SWITCH_SINGLE.png b/assets/cn/coalition/DATEALANE_SWITCH_SINGLE.png deleted file mode 100644 index 9621d109c..000000000 Binary files a/assets/cn/coalition/DATEALANE_SWITCH_SINGLE.png and /dev/null differ diff --git a/config/template.json b/config/template.json index 57e2d9cda..f97a39da2 100644 --- a/config/template.json +++ b/config/template.json @@ -726,8 +726,7 @@ "AmbushEvade": true }, "Coalition": { - "Mode": "AREA-1", - "MapMode": "normal", + "Mode": "hard", "Fleet": "single" }, "StopCondition": { @@ -1314,8 +1313,7 @@ "AmbushEvade": true }, "Coalition": { - "Mode": "AREA-1", - "MapMode": "normal", + "Mode": "sp", "Fleet": "single" }, "StopCondition": { diff --git a/module/coalition/assets.py b/module/coalition/assets.py index da1649f35..28c8f5325 100644 --- a/module/coalition/assets.py +++ b/module/coalition/assets.py @@ -21,20 +21,6 @@ COALITION_ACADEMY_GOTO_CAMPAIGN = Button(area={'cn': (1123, 615, 1159, 651), 'en COALITION_ACADEMY_HOME = Button(area={'cn': (1221, 48, 1244, 73), 'en': (1221, 48, 1244, 73), 'jp': (1221, 48, 1244, 73), 'tw': (1221, 48, 1244, 73)}, color={'cn': (182, 197, 203), 'en': (182, 197, 203), 'jp': (182, 197, 203), 'tw': (182, 197, 203)}, button={'cn': (1221, 48, 1244, 73), 'en': (1221, 48, 1244, 73), 'jp': (1221, 48, 1244, 73), 'tw': (1221, 48, 1244, 73)}, file={'cn': './assets/cn/coalition/COALITION_ACADEMY_HOME.png', 'en': './assets/en/coalition/COALITION_ACADEMY_HOME.png', 'jp': './assets/jp/coalition/COALITION_ACADEMY_HOME.png', 'tw': './assets/tw/coalition/COALITION_ACADEMY_HOME.png'}) COALITION_ACADEMY_MAIN_CHECK = Button(area={'cn': (132, 57, 163, 92), 'en': (164, 57, 221, 78), 'jp': (112, 44, 145, 86), 'tw': (346, 48, 427, 89)}, color={'cn': (143, 202, 205), 'en': (205, 189, 166), 'jp': (142, 155, 153), 'tw': (178, 145, 124)}, button={'cn': (132, 57, 163, 92), 'en': (164, 57, 221, 78), 'jp': (112, 44, 145, 86), 'tw': (346, 48, 427, 89)}, file={'cn': './assets/cn/coalition/COALITION_ACADEMY_MAIN_CHECK.png', 'en': './assets/en/coalition/COALITION_ACADEMY_MAIN_CHECK.png', 'jp': './assets/jp/coalition/COALITION_ACADEMY_MAIN_CHECK.png', 'tw': './assets/tw/coalition/COALITION_ACADEMY_MAIN_CHECK.png'}) COALITION_REWARD_CONFIRM = Button(area={'cn': (814, 611, 877, 637), 'en': (788, 612, 902, 634), 'jp': (814, 611, 876, 637), 'tw': (814, 611, 877, 637)}, color={'cn': (155, 186, 227), 'en': (162, 189, 226), 'jp': (143, 176, 219), 'tw': (150, 181, 221)}, button={'cn': (814, 611, 877, 637), 'en': (788, 612, 902, 634), 'jp': (814, 611, 876, 637), 'tw': (814, 611, 877, 637)}, file={'cn': './assets/cn/coalition/COALITION_REWARD_CONFIRM.png', 'en': './assets/en/coalition/COALITION_REWARD_CONFIRM.png', 'jp': './assets/jp/coalition/COALITION_REWARD_CONFIRM.png', 'tw': './assets/tw/coalition/COALITION_REWARD_CONFIRM.png'}) -DATEALANE_AREA1 = Button(area={'cn': (170, 478, 265, 573), 'en': (170, 478, 265, 573), 'jp': (170, 478, 265, 573), 'tw': (170, 478, 265, 573)}, color={'cn': (37, 90, 92), 'en': (37, 90, 92), 'jp': (37, 90, 92), 'tw': (37, 90, 92)}, button={'cn': (170, 478, 265, 573), 'en': (170, 478, 265, 573), 'jp': (170, 478, 265, 573), 'tw': (170, 478, 265, 573)}, file={'cn': './assets/cn/coalition/DATEALANE_AREA1.png', 'en': './assets/cn/coalition/DATEALANE_AREA1.png', 'jp': './assets/cn/coalition/DATEALANE_AREA1.png', 'tw': './assets/cn/coalition/DATEALANE_AREA1.png'}) -DATEALANE_AREA2 = Button(area={'cn': (420, 360, 515, 455), 'en': (420, 360, 515, 455), 'jp': (420, 360, 515, 455), 'tw': (420, 360, 515, 455)}, color={'cn': (52, 85, 88), 'en': (52, 85, 88), 'jp': (52, 85, 88), 'tw': (52, 85, 88)}, button={'cn': (420, 360, 515, 455), 'en': (420, 360, 515, 455), 'jp': (420, 360, 515, 455), 'tw': (420, 360, 515, 455)}, file={'cn': './assets/cn/coalition/DATEALANE_AREA2.png', 'en': './assets/cn/coalition/DATEALANE_AREA2.png', 'jp': './assets/cn/coalition/DATEALANE_AREA2.png', 'tw': './assets/cn/coalition/DATEALANE_AREA2.png'}) -DATEALANE_AREA3 = Button(area={'cn': (770, 471, 865, 566), 'en': (770, 471, 865, 566), 'jp': (770, 471, 865, 566), 'tw': (770, 471, 865, 566)}, color={'cn': (51, 78, 81), 'en': (51, 78, 81), 'jp': (51, 78, 81), 'tw': (51, 78, 81)}, button={'cn': (770, 471, 865, 566), 'en': (770, 471, 865, 566), 'jp': (770, 471, 865, 566), 'tw': (770, 471, 865, 566)}, file={'cn': './assets/cn/coalition/DATEALANE_AREA3.png', 'en': './assets/cn/coalition/DATEALANE_AREA3.png', 'jp': './assets/cn/coalition/DATEALANE_AREA3.png', 'tw': './assets/cn/coalition/DATEALANE_AREA3.png'}) -DATEALANE_AREA4 = Button(area={'cn': (902, 228, 997, 323), 'en': (902, 228, 997, 323), 'jp': (902, 228, 997, 323), 'tw': (902, 228, 997, 323)}, color={'cn': (50, 83, 85), 'en': (50, 83, 85), 'jp': (50, 83, 85), 'tw': (50, 83, 85)}, button={'cn': (902, 228, 997, 323), 'en': (902, 228, 997, 323), 'jp': (902, 228, 997, 323), 'tw': (902, 228, 997, 323)}, file={'cn': './assets/cn/coalition/DATEALANE_AREA4.png', 'en': './assets/cn/coalition/DATEALANE_AREA4.png', 'jp': './assets/cn/coalition/DATEALANE_AREA4.png', 'tw': './assets/cn/coalition/DATEALANE_AREA4.png'}) -DATEALANE_AREA5 = Button(area={'cn': (535, 113, 630, 208), 'en': (535, 113, 630, 208), 'jp': (535, 113, 630, 208), 'tw': (535, 113, 630, 208)}, color={'cn': (49, 89, 88), 'en': (49, 89, 88), 'jp': (49, 89, 88), 'tw': (49, 89, 88)}, button={'cn': (535, 113, 630, 208), 'en': (535, 113, 630, 208), 'jp': (535, 113, 630, 208), 'tw': (535, 113, 630, 208)}, file={'cn': './assets/cn/coalition/DATEALANE_AREA5.png', 'en': './assets/cn/coalition/DATEALANE_AREA5.png', 'jp': './assets/cn/coalition/DATEALANE_AREA5.png', 'tw': './assets/cn/coalition/DATEALANE_AREA5.png'}) -DATEALANE_AREA6 = Button(area={'cn': (644, 283, 739, 378), 'en': (644, 283, 739, 378), 'jp': (644, 283, 739, 378), 'tw': (644, 283, 739, 378)}, color={'cn': (51, 89, 90), 'en': (51, 89, 90), 'jp': (51, 89, 90), 'tw': (51, 89, 90)}, button={'cn': (644, 283, 739, 378), 'en': (644, 283, 739, 378), 'jp': (644, 283, 739, 378), 'tw': (644, 283, 739, 378)}, file={'cn': './assets/cn/coalition/DATEALANE_AREA6.png', 'en': './assets/cn/coalition/DATEALANE_AREA6.png', 'jp': './assets/cn/coalition/DATEALANE_AREA6.png', 'tw': './assets/cn/coalition/DATEALANE_AREA6.png'}) -DATEALANE_COALITION_CHECK = Button(area={'cn': (117, 12, 172, 40), 'en': (117, 12, 172, 40), 'jp': (117, 12, 172, 40), 'tw': (117, 12, 172, 40)}, color={'cn': (143, 161, 204), 'en': (143, 161, 204), 'jp': (143, 161, 204), 'tw': (143, 161, 204)}, button={'cn': (117, 12, 172, 40), 'en': (117, 12, 172, 40), 'jp': (117, 12, 172, 40), 'tw': (117, 12, 172, 40)}, file={'cn': './assets/cn/coalition/DATEALANE_COALITION_CHECK.png', 'en': './assets/cn/coalition/DATEALANE_COALITION_CHECK.png', 'jp': './assets/cn/coalition/DATEALANE_COALITION_CHECK.png', 'tw': './assets/cn/coalition/DATEALANE_COALITION_CHECK.png'}) -DATEALANE_FLEET_PREPARATION = Button(area={'cn': (1016, 529, 1100, 550), 'en': (1016, 529, 1100, 550), 'jp': (1016, 529, 1100, 550), 'tw': (1016, 529, 1100, 550)}, color={'cn': (135, 215, 236), 'en': (135, 215, 236), 'jp': (135, 215, 236), 'tw': (135, 215, 236)}, button={'cn': (1016, 529, 1100, 550), 'en': (1016, 529, 1100, 550), 'jp': (1016, 529, 1100, 550), 'tw': (1016, 529, 1100, 550)}, file={'cn': './assets/cn/coalition/DATEALANE_FLEET_PREPARATION.png', 'en': './assets/cn/coalition/DATEALANE_FLEET_PREPARATION.png', 'jp': './assets/cn/coalition/DATEALANE_FLEET_PREPARATION.png', 'tw': './assets/cn/coalition/DATEALANE_FLEET_PREPARATION.png'}) -DATEALANE_MODE_HARD = Button(area={'cn': (925, 587, 999, 607), 'en': (925, 587, 999, 607), 'jp': (925, 587, 999, 607), 'tw': (925, 587, 999, 607)}, color={'cn': (239, 170, 188), 'en': (239, 170, 188), 'jp': (239, 170, 188), 'tw': (239, 170, 188)}, button={'cn': (925, 587, 999, 607), 'en': (925, 587, 999, 607), 'jp': (925, 587, 999, 607), 'tw': (925, 587, 999, 607)}, file={'cn': './assets/cn/coalition/DATEALANE_MODE_HARD.png', 'en': './assets/cn/coalition/DATEALANE_MODE_HARD.png', 'jp': './assets/cn/coalition/DATEALANE_MODE_HARD.png', 'tw': './assets/cn/coalition/DATEALANE_MODE_HARD.png'}) -DATEALANE_MODE_NORMAL = Button(area={'cn': (634, 587, 706, 606), 'en': (634, 587, 706, 606), 'jp': (634, 587, 706, 606), 'tw': (634, 587, 706, 606)}, color={'cn': (150, 218, 193), 'en': (150, 218, 193), 'jp': (150, 218, 193), 'tw': (150, 218, 193)}, button={'cn': (634, 587, 706, 606), 'en': (634, 587, 706, 606), 'jp': (634, 587, 706, 606), 'tw': (634, 587, 706, 606)}, file={'cn': './assets/cn/coalition/DATEALANE_MODE_NORMAL.png', 'en': './assets/cn/coalition/DATEALANE_MODE_NORMAL.png', 'jp': './assets/cn/coalition/DATEALANE_MODE_NORMAL.png', 'tw': './assets/cn/coalition/DATEALANE_MODE_NORMAL.png'}) -DATEALANE_PREPARATION_EXIT = Button(area={'cn': (1208, 71, 1244, 107), 'en': (1208, 71, 1244, 107), 'jp': (1208, 71, 1244, 107), 'tw': (1208, 71, 1244, 107)}, color={'cn': (121, 158, 173), 'en': (121, 158, 173), 'jp': (121, 158, 173), 'tw': (121, 158, 173)}, button={'cn': (1208, 71, 1244, 107), 'en': (1208, 71, 1244, 107), 'jp': (1208, 71, 1244, 107), 'tw': (1208, 71, 1244, 107)}, file={'cn': './assets/cn/coalition/DATEALANE_PREPARATION_EXIT.png', 'en': './assets/cn/coalition/DATEALANE_PREPARATION_EXIT.png', 'jp': './assets/cn/coalition/DATEALANE_PREPARATION_EXIT.png', 'tw': './assets/cn/coalition/DATEALANE_PREPARATION_EXIT.png'}) -DATEALANE_PT_OCR = Button(area={'cn': (1188, 135, 1272, 157), 'en': (1188, 135, 1272, 157), 'jp': (1188, 135, 1272, 157), 'tw': (1188, 135, 1272, 157)}, color={'cn': (100, 101, 70), 'en': (100, 101, 70), 'jp': (100, 101, 70), 'tw': (100, 101, 70)}, button={'cn': (1188, 135, 1272, 157), 'en': (1188, 135, 1272, 157), 'jp': (1188, 135, 1272, 157), 'tw': (1188, 135, 1272, 157)}, file={'cn': './assets/cn/coalition/DATEALANE_PT_OCR.png', 'en': './assets/cn/coalition/DATEALANE_PT_OCR.png', 'jp': './assets/cn/coalition/DATEALANE_PT_OCR.png', 'tw': './assets/cn/coalition/DATEALANE_PT_OCR.png'}) -DATEALANE_SWITCH_MULTI = Button(area={'cn': (1060, 473, 1204, 500), 'en': (1060, 473, 1204, 500), 'jp': (1060, 473, 1204, 500), 'tw': (1060, 473, 1204, 500)}, color={'cn': (225, 225, 225), 'en': (225, 225, 225), 'jp': (225, 225, 225), 'tw': (225, 225, 225)}, button={'cn': (1060, 473, 1204, 500), 'en': (1060, 473, 1204, 500), 'jp': (1060, 473, 1204, 500), 'tw': (1060, 473, 1204, 500)}, file={'cn': './assets/cn/coalition/DATEALANE_SWITCH_MULTI.png', 'en': './assets/cn/coalition/DATEALANE_SWITCH_MULTI.png', 'jp': './assets/cn/coalition/DATEALANE_SWITCH_MULTI.png', 'tw': './assets/cn/coalition/DATEALANE_SWITCH_MULTI.png'}) -DATEALANE_SWITCH_SINGLE = Button(area={'cn': (910, 473, 1055, 500), 'en': (910, 473, 1055, 500), 'jp': (910, 473, 1055, 500), 'tw': (910, 473, 1055, 500)}, color={'cn': (223, 223, 223), 'en': (223, 223, 223), 'jp': (223, 223, 223), 'tw': (223, 223, 223)}, button={'cn': (910, 473, 1055, 500), 'en': (910, 473, 1055, 500), 'jp': (910, 473, 1055, 500), 'tw': (910, 473, 1055, 500)}, file={'cn': './assets/cn/coalition/DATEALANE_SWITCH_SINGLE.png', 'en': './assets/cn/coalition/DATEALANE_SWITCH_SINGLE.png', 'jp': './assets/cn/coalition/DATEALANE_SWITCH_SINGLE.png', 'tw': './assets/cn/coalition/DATEALANE_SWITCH_SINGLE.png'}) EMPTY_FLAGSHIP = Button(area={'cn': (247, 237, 277, 267), 'en': (247, 237, 277, 267), 'jp': (247, 237, 277, 267), 'tw': (247, 237, 277, 267)}, color={'cn': (76, 64, 56), 'en': (76, 64, 56), 'jp': (76, 64, 56), 'tw': (76, 64, 56)}, button={'cn': (247, 237, 277, 267), 'en': (247, 237, 277, 267), 'jp': (247, 237, 277, 267), 'tw': (247, 237, 277, 267)}, file={'cn': './assets/cn/coalition/EMPTY_FLAGSHIP.png', 'en': './assets/cn/coalition/EMPTY_FLAGSHIP.png', 'jp': './assets/cn/coalition/EMPTY_FLAGSHIP.png', 'tw': './assets/cn/coalition/EMPTY_FLAGSHIP.png'}) EMPTY_VANGUARD = Button(area={'cn': (515, 237, 545, 267), 'en': (515, 237, 545, 267), 'jp': (515, 237, 545, 267), 'tw': (515, 237, 545, 267)}, color={'cn': (52, 52, 53), 'en': (52, 52, 53), 'jp': (52, 52, 53), 'tw': (52, 52, 53)}, button={'cn': (515, 237, 545, 267), 'en': (515, 237, 545, 267), 'jp': (515, 237, 545, 267), 'tw': (515, 237, 545, 267)}, file={'cn': './assets/cn/coalition/EMPTY_VANGUARD.png', 'en': './assets/cn/coalition/EMPTY_VANGUARD.png', 'jp': './assets/cn/coalition/EMPTY_VANGUARD.png', 'tw': './assets/cn/coalition/EMPTY_VANGUARD.png'}) FLEET_NOT_PREPARED = Button(area={'cn': (1008, 310, 1110, 334), 'en': (1008, 310, 1110, 334), 'jp': (1008, 310, 1110, 334), 'tw': (1008, 310, 1110, 334)}, color={'cn': (106, 106, 112), 'en': (106, 106, 112), 'jp': (106, 106, 112), 'tw': (108, 107, 112)}, button={'cn': (1008, 310, 1110, 334), 'en': (1008, 310, 1110, 334), 'jp': (1008, 310, 1110, 334), 'tw': (1008, 310, 1110, 334)}, file={'cn': './assets/cn/coalition/FLEET_NOT_PREPARED.png', 'en': './assets/cn/coalition/FLEET_NOT_PREPARED.png', 'jp': './assets/cn/coalition/FLEET_NOT_PREPARED.png', 'tw': './assets/tw/coalition/FLEET_NOT_PREPARED.png'}) diff --git a/module/coalition/coalition.py b/module/coalition/coalition.py index 9e98fe296..3a16dfd2f 100644 --- a/module/coalition/coalition.py +++ b/module/coalition/coalition.py @@ -44,8 +44,6 @@ class Coalition(CoalitionCombat, CampaignEvent): elif event == 'coalition_20250626': # use generic ocr model ocr = Digit(NEONCITY_PT_OCR, name='OCR_PT', lang='cnocr', letter=(208, 208, 208), threshold=128) - elif event == 'coalition_20251120': - ocr = Digit(DATEALANE_PT_OCR, name='OCR_PT', letter=(250, 213, 69), threshold=128) else: logger.error(f'ocr object is not defined in event {event}') raise ScriptError @@ -103,13 +101,12 @@ class Coalition(CoalitionCombat, CampaignEvent): return False - def coalition_execute_once(self, event, stage, fleet, map_mode): + def coalition_execute_once(self, event, stage, fleet): """ Args: event: stage: fleet: - map_mode: Pages: in: in_coalition @@ -135,29 +132,27 @@ class Coalition(CoalitionCombat, CampaignEvent): self.coalition_map_exit(event) raise - - self.enter_map(event=event, stage=stage, mode=fleet, map_mode=map_mode) - oil_check_boolean = True if self.config.SERVER not in ['tw'] else False - # if self.triggered_stop_condition(oil_check=oil_check_boolean): - # self.coalition_map_exit(event) - # raise ScriptEnd + self.enter_map(event=event, stage=stage, mode=fleet) + oil_check_boolean=True if self.config.SERVER not in ['tw'] else False + if self.triggered_stop_condition(oil_check=oil_check_boolean): + self.coalition_map_exit(event) + raise ScriptEnd self.coalition_combat() @staticmethod def handle_stage_name(event, stage): stage = re.sub('[ \t\n]', '', str(stage)).lower() - if event in ['coalition_20230323', 'coalition_20251120']: + if event == 'coalition_20230323': stage = stage.replace('-', '') return event, stage - def run(self, event='', mode='', fleet='', map_mode='normal', total=0): + def run(self, event='', mode='', fleet='', total=0): event = event if event else self.config.Campaign_Event mode = mode if mode else self.config.Coalition_Mode fleet = fleet if fleet else self.config.Coalition_Fleet - map_mode = self.config.Coalition_MapMode - if not event or not mode or not fleet or not map_mode: - raise ScriptError(f'Coalition arguments unfilled. name={event}, mode={mode}, fleet={fleet}, map_mode={map_mode}') + if not event or not mode or not fleet: + raise ScriptError(f'Coalition arguments unfilled. name={event}, mode={mode}, fleet={fleet}') event, mode = self.handle_stage_name(event, mode) self.run_count = 0 @@ -194,7 +189,7 @@ class Coalition(CoalitionCombat, CampaignEvent): self.device.stuck_record_clear() self.device.click_record_clear() try: - self.coalition_execute_once(event=event, stage=mode, fleet=fleet, map_mode=map_mode) + self.coalition_execute_once(event=event, stage=mode, fleet=fleet) except ScriptEnd as e: logger.hr('Script end') logger.info(str(e)) diff --git a/module/coalition/ui.py b/module/coalition/ui.py index 26bd792af..5570735a0 100644 --- a/module/coalition/ui.py +++ b/module/coalition/ui.py @@ -46,9 +46,6 @@ class CoalitionUI(Combat): mode_switch = NeoncitySwitch('CoalitionMode', offset=(20, 20)) mode_switch.add_state('story', NEONCITY_MODE_STORY) mode_switch.add_state('battle', NEONCITY_MODE_BATTLE) - elif event == 'coalition_20251120': - # coalition 20251120 has no story mode - return True else: logger.error(f'MODE_SWITCH is not defined in event {event}') raise ScriptError @@ -79,9 +76,6 @@ class CoalitionUI(Combat): elif event == 'coalition_20250626': fleet_switch.add_state('single', NEONCITY_SWITCH_SINGLE) fleet_switch.add_state('multi', NEONCITY_SWITCH_MULTI) - elif event == 'coalition_20251120': - fleet_switch.add_state('single', DATEALANE_SWITCH_SINGLE) - fleet_switch.add_state('multi', DATEALANE_SWITCH_MULTI) else: logger.error(f'FLEET_SWITCH is not defined in event {event}') raise ScriptError @@ -121,13 +115,6 @@ class CoalitionUI(Combat): ('coalition_20250626', 'hard'): NEONCITY_HARD, ('coalition_20250626', 'sp'): NEONCITY_SP, ('coalition_20250626', 'ex'): NEONCITY_EX, - - ('coalition_20251120', 'area1'): DATEALANE_AREA1, - ('coalition_20251120', 'area2'): DATEALANE_AREA2, - ('coalition_20251120', 'area3'): DATEALANE_AREA3, - ('coalition_20251120', 'area4'): DATEALANE_AREA4, - ('coalition_20251120', 'area5'): DATEALANE_AREA5, - ('coalition_20251120', 'area6'): DATEALANE_AREA6, } stage = stage.lower() try: @@ -164,13 +151,6 @@ class CoalitionUI(Combat): ('coalition_20250626', 'hard'): 3, ('coalition_20250626', 'sp'): 4, ('coalition_20250626', 'ex'): 5, - - ('coalition_20251120', 'area1'): 2, - ('coalition_20251120', 'area2'): 3, - ('coalition_20251120', 'area3'): 3, - ('coalition_20251120', 'area4'): 3, - ('coalition_20251120', 'area5'): 3, - ('coalition_20251120', 'area6'): 4, } stage = stage.lower() try: @@ -194,33 +174,10 @@ class CoalitionUI(Combat): return ACEDEMY_FLEET_PREPARATION elif event == 'coalition_20250626': return NEONCITY_FLEET_PREPARATION - elif event == 'coalition_20251120': - return DATEALANE_FLEET_PREPARATION else: logger.error(f'FLEET_PREPARATION is not defined in event {event}') raise ScriptError - def coalition_get_mode_switch(self, event, mode): - """ - Args: - event (str): Event name. - mode (str): 'normal' or 'hard' - - Returns: - Button: - """ - if event == 'coalition_20251120': - if mode == 'normal': - return DATEALANE_MODE_NORMAL - elif mode == 'hard': - return DATEALANE_MODE_HARD - else: - logger.error(f'Mode switch is not defined in event {event}') - raise ScriptError - else: - logger.error(f'Mode switch is not defined in event {event}') - raise ScriptError - def handle_fleet_preparation(self, event, stage, mode): """ Args: @@ -265,16 +222,17 @@ class CoalitionUI(Combat): logger.info(f'{BATTLE_PREPARATION} -> {BACK_ARROW}') self.device.click(BACK_ARROW) continue - if self.appear_then_click(DATEALANE_PREPARATION_EXIT, offset=(50, 100), interval=1): + if self.appear(fleet_preparation, offset=(20, 20), interval=3): + logger.info(f'{fleet_preparation} -> {NEONCITY_PREPARATION_EXIT}') + self.device.click(NEONCITY_PREPARATION_EXIT) continue - def enter_map(self, event, stage, mode, map_mode='normal', skip_first_screenshot=True): + def enter_map(self, event, stage, mode, skip_first_screenshot=True): """ Args: event (str): Event name such as 'coalition_20230323' stage (str): Stage name such as 'TC3' mode (str): 'single' or 'multi' - map_mode (str): 'normal' or 'hard' skip_first_screenshot: Pages: @@ -283,13 +241,10 @@ class CoalitionUI(Combat): """ button = self.coalition_get_entrance(event, stage) fleet_preparation = self.coalition_get_fleet_preparation(event) - mode_switch = self.coalition_get_mode_switch(event, map_mode) campaign_timer = Timer(5) - mode_timer = Timer(5) fleet_timer = Timer(5) campaign_click = 0 fleet_click = 0 - mode_click = 0 while 1: if skip_first_screenshot: skip_first_screenshot = False @@ -309,9 +264,6 @@ class CoalitionUI(Combat): "This stage can only be farmed once a day, " "but it's the second time that you are entering") raise RequestHumanTakeover - if mode_click > 5: - logger.critical(f"Failed to enter {button}, too many click on {mode_switch}") - raise RequestHumanTakeover if self.appear(FLEET_NOT_PREPARED, offset=(20, 20)): logger.critical('FLEET_NOT_PREPARED') logger.critical('Please prepare you fleets before running coalition battles') @@ -337,14 +289,6 @@ class CoalitionUI(Combat): campaign_timer.reset() continue - # Stage mode - if mode_timer.reached() and self.appear(mode_switch, offset=(20, 20)): - self.device.click(mode_switch) - mode_click += 1 - mode_timer.reset() - campaign_timer.reset() - continue - # Fleet preparation if fleet_timer.reached() and self.appear(fleet_preparation, offset=(20, 50)): self.handle_fleet_preparation(event, stage, mode) diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 99c5fb625..b06ff933a 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -3638,22 +3638,12 @@ "Coalition": { "Mode": { "type": "select", - "value": "AREA-1", - "option": [ - "AREA-1", - "AREA-2", - "AREA-3", - "AREA-4", - "AREA-5", - "AREA-6" - ] - }, - "MapMode": { - "type": "select", - "value": "normal", + "value": "hard", "option": [ + "easy", "normal", - "hard" + "hard", + "ex" ] }, "Fleet": { @@ -6900,23 +6890,15 @@ "Coalition": { "Mode": { "type": "select", - "value": "AREA-1", - "option": [ - "AREA-1", - "AREA-2", - "AREA-3", - "AREA-4", - "AREA-5", - "AREA-6" - ] - }, - "MapMode": { - "type": "select", - "value": "normal", + "value": "sp", "option": [ + "easy", "normal", - "hard" - ] + "hard", + "sp", + "ex" + ], + "display": "hide" }, "Fleet": { "type": "select", diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index 770da4f87..886b537a2 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -337,11 +337,8 @@ MaritimeEscort: Enable: true Coalition: Mode: - value: AREA-1 - option: [ AREA-1, AREA-2, AREA-3, AREA-4, AREA-5, AREA-6 ] - MapMode: - value: normal - option: [ normal, hard ] + value: hard + option: [ easy, normal, hard, sp, ex ] Fleet: value: single option: [ single, multi ] diff --git a/module/config/argument/override.yaml b/module/config/argument/override.yaml index d2db5454c..1bdffbd22 100644 --- a/module/config/argument/override.yaml +++ b/module/config/argument/override.yaml @@ -261,6 +261,9 @@ Coalition: UseAutoSearch: false Use2xBook: false AmbushEvade: true + Coalition: + Mode: + option: [ easy, normal, hard, ex ] StopCondition: MapAchievement: non_stop StageIncrease: false diff --git a/module/config/config_generated.py b/module/config/config_generated.py index 278fe700a..91ce85c34 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -195,8 +195,7 @@ class GeneratedConfig: MaritimeEscort_Enable = True # Group `Coalition` - Coalition_Mode = 'AREA-1' # AREA-1, AREA-2, AREA-3, AREA-4, AREA-5, AREA-6 - Coalition_MapMode = 'normal' # normal, hard + Coalition_Mode = 'hard' # easy, normal, hard, sp, ex Coalition_Fleet = 'single' # single, multi # Group `Commission` diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index b1e00ed55..556cd7118 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -1398,18 +1398,11 @@ "Mode": { "name": "Mode", "help": "SP needs to use event daily SP to run", - "AREA-1": "AREA-1", - "AREA-2": "AREA-2", - "AREA-3": "AREA-3", - "AREA-4": "AREA-4", - "AREA-5": "AREA-5", - "AREA-6": "AREA-6" - }, - "MapMode": { - "name": "Coalition.MapMode.name", - "help": "Coalition.MapMode.help", - "normal": "normal", - "hard": "hard" + "easy": "Easy", + "normal": "Normal", + "hard": "Hard", + "sp": "SP", + "ex": "EX" }, "Fleet": { "name": "Fleet", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index ec9379f92..43552f7de 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -1398,18 +1398,11 @@ "Mode": { "name": "Coalition.Mode.name", "help": "Coalition.Mode.help", - "AREA-1": "AREA-1", - "AREA-2": "AREA-2", - "AREA-3": "AREA-3", - "AREA-4": "AREA-4", - "AREA-5": "AREA-5", - "AREA-6": "AREA-6" - }, - "MapMode": { - "name": "Coalition.MapMode.name", - "help": "Coalition.MapMode.help", + "easy": "easy", "normal": "normal", - "hard": "hard" + "hard": "hard", + "sp": "sp", + "ex": "ex" }, "Fleet": { "name": "Coalition.Fleet.name", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 76d6dc017..1e8f4c405 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -83,7 +83,7 @@ "help": "" }, "Coalition": { - "name": "DATE A LANE", + "name": "迷彩都市的寻踪者", "help": "" }, "MaritimeEscort": { @@ -119,7 +119,7 @@ "help": "" }, "CoalitionSp": { - "name": "DATE A LANE SP", + "name": "迷彩都市的寻踪者SP", "help": "" }, "Commission": { @@ -1396,20 +1396,13 @@ "help": "出击前必须在游戏内手动配队" }, "Mode": { - "name": "关卡名称", - "help": "", - "AREA-1": "AREA-1", - "AREA-2": "AREA-2", - "AREA-3": "AREA-3", - "AREA-4": "AREA-4", - "AREA-5": "AREA-5", - "AREA-6": "AREA-6" - }, - "MapMode": { "name": "难度", - "help": "", + "help": "SP图需要使用活动每日SP运行", + "easy": "简单", "normal": "普通", - "hard": "困难" + "hard": "困难", + "sp": "SP", + "ex": "EX" }, "Fleet": { "name": "出击队伍", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index 8ce663ad0..22bbb9590 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -1398,18 +1398,11 @@ "Mode": { "name": "難度", "help": "SP圖需要使用活動每日SP運行", - "AREA-1": "AREA-1", - "AREA-2": "AREA-2", - "AREA-3": "AREA-3", - "AREA-4": "AREA-4", - "AREA-5": "AREA-5", - "AREA-6": "AREA-6" - }, - "MapMode": { - "name": "Coalition.MapMode.name", - "help": "Coalition.MapMode.help", - "normal": "normal", - "hard": "hard" + "easy": "簡單", + "normal": "普通", + "hard": "困難", + "sp": "sp", + "ex": "EX" }, "Fleet": { "name": "出擊隊伍", diff --git a/module/ui/page.py b/module/ui/page.py index b634c0a12..eddc77d76 100644 --- a/module/ui/page.py +++ b/module/ui/page.py @@ -145,14 +145,9 @@ page_campaign.link(button=CAMPAIGN_GOTO_EVENT, destination=page_sp) # page_campaign_menu.link(button=CAMPAIGN_MENU_GOTO_EVENT, destination=page_coalition) # page_coalition_menu.link(button=COALITION_ACADEMY_GOTO_CAMPAIGN, destination=page_coalition) # NEONCITY -# page_coalition = Page(NEONCITY_COALITION_CHECK) -# page_coalition.link(button=NEONCITY_UI_HOME, destination=page_main) -# page_coalition.link(button=NEONCITY_UI_BACK, destination=page_campaign) -# page_campaign_menu.link(button=CAMPAIGN_MENU_GOTO_EVENT, destination=page_coalition) -# DATEALANE -page_coalition = Page(DATEALANE_COALITION_CHECK) -page_coalition.link(button=GOTO_MAIN, destination=page_main) -page_coalition.link(button=BACK_ARROW, destination=page_campaign) +page_coalition = Page(NEONCITY_COALITION_CHECK) +page_coalition.link(button=NEONCITY_UI_HOME, destination=page_main) +page_coalition.link(button=NEONCITY_UI_BACK, destination=page_campaign) page_campaign_menu.link(button=CAMPAIGN_MENU_GOTO_EVENT, destination=page_coalition) # Operation Siren