diff --git a/assets/cn/coalition/FLEET_PREPARATION.BUTTON.png b/assets/cn/coalition/FLEET_PREPARATION.BUTTON.png deleted file mode 100644 index 1d31e2728..000000000 Binary files a/assets/cn/coalition/FLEET_PREPARATION.BUTTON.png and /dev/null differ diff --git a/assets/cn/event_hospital/GET_CLUE_TEXT.png b/assets/cn/event_hospital/GET_CLUE_TEXT.png new file mode 100644 index 000000000..9f8186e94 Binary files /dev/null and b/assets/cn/event_hospital/GET_CLUE_TEXT.png differ diff --git a/assets/en/war_archives/TEMPLATE_MOONLIT_OVERTURE.png b/assets/cn/war_archives/TEMPLATE_MOONLIT_OVERTURE.png similarity index 100% rename from assets/en/war_archives/TEMPLATE_MOONLIT_OVERTURE.png rename to assets/cn/war_archives/TEMPLATE_MOONLIT_OVERTURE.png diff --git a/assets/en/reward/MAIL_ENTER.png b/assets/en/reward/MAIL_ENTER.png deleted file mode 100644 index 391d857d7..000000000 Binary files a/assets/en/reward/MAIL_ENTER.png and /dev/null differ diff --git a/assets/jp/tactical/REWAED_2.BUTTON.png b/assets/jp/tactical/REWAED_2.BUTTON.png deleted file mode 100644 index 066434cc3..000000000 Binary files a/assets/jp/tactical/REWAED_2.BUTTON.png and /dev/null differ diff --git a/assets/tw/event_hospital/HOSPITAL_BATTLE_PREPARE.png b/assets/tw/event_hospital/HOSPITAL_BATTLE_PREPARE.png new file mode 100644 index 000000000..d36a5ab2d Binary files /dev/null and b/assets/tw/event_hospital/HOSPITAL_BATTLE_PREPARE.png differ diff --git a/assets/tw/event_hospital/TEMPLATE_INVEST.png b/assets/tw/event_hospital/TEMPLATE_INVEST.png new file mode 100644 index 000000000..09778a02d Binary files /dev/null and b/assets/tw/event_hospital/TEMPLATE_INVEST.png differ diff --git a/assets/tw/event_hospital/TEMPLATE_REMAIN_CURRENT.png b/assets/tw/event_hospital/TEMPLATE_REMAIN_CURRENT.png new file mode 100644 index 000000000..a5ef7424e Binary files /dev/null and b/assets/tw/event_hospital/TEMPLATE_REMAIN_CURRENT.png differ diff --git a/assets/tw/event_hospital/TEMPLATE_REMAIN_TIMES.png b/assets/tw/event_hospital/TEMPLATE_REMAIN_TIMES.png new file mode 100644 index 000000000..74cbcdb57 Binary files /dev/null and b/assets/tw/event_hospital/TEMPLATE_REMAIN_TIMES.png differ diff --git a/config/template.maa.json b/config/template.maa.json index 23a15567d..14280f197 100644 --- a/config/template.maa.json +++ b/config/template.maa.json @@ -55,7 +55,7 @@ "Medicine": 0, "Stone": 0, "Times": 5, - "Series": 1, + "Series": 0, "Drops": null, "DrGrandet": false }, @@ -79,7 +79,7 @@ "Medicine": null, "Stone": null, "Times": null, - "Series": 1, + "Series": 0, "Drops": null, "DrGrandet": false }, @@ -103,7 +103,7 @@ "Medicine": null, "Stone": null, "Times": null, - "Series": 1, + "Series": 0, "Drops": null, "DrGrandet": false }, diff --git a/module/commission/commission.py b/module/commission/commission.py index c1f657d56..552dfa682 100644 --- a/module/commission/commission.py +++ b/module/commission/commission.py @@ -553,11 +553,12 @@ class RewardCommission(UI, InfoHandler): continue if self.ui_main_appear_then_click(page_reward, interval=3): self.interval_reset(GET_SHIP) - click_timer.reset() + # no need to reset click_timer, just instant click REWARD_1 + # click_timer.reset() continue # Check GET_SHIP at last to handle random white background at page_main for button in [GET_SHIP]: - if self.appear(button, interval=1): + if click_timer.reached() and self.appear(button, interval=1): self.ensure_no_info_bar(timeout=1) drop.add(self.device.image) diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 054bb71c5..436bcd54a 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -334,6 +334,8 @@ "cn_android-23", "cn_android-24", "cn_android-25", + "cn_android-26", + "cn_android-27", "cn_ios-0", "cn_ios-1", "cn_ios-2", diff --git a/module/config/config_generated.py b/module/config/config_generated.py index f405490ac..4be9856ac 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -20,7 +20,7 @@ class GeneratedConfig: # Group `Emulator` Emulator_Serial = 'auto' Emulator_PackageName = 'auto' # auto, com.bilibili.azurlane, com.YoStarEN.AzurLane, com.YoStarJP.AzurLane, com.hkmanjuu.azurlane.gp, com.bilibili.blhx.huawei, com.bilibili.blhx.mi, com.tencent.tmgp.bilibili.blhx, com.bilibili.blhx.baidu, com.bilibili.blhx.qihoo, com.bilibili.blhx.nearme.gamecenter, com.bilibili.blhx.vivo, com.bilibili.blhx.mz, com.bilibili.blhx.dl, com.bilibili.blhx.lenovo, com.bilibili.blhx.uc, com.bilibili.blhx.mzw, com.yiwu.blhx.yx15, com.bilibili.blhx.m4399, com.bilibili.blhx.bilibiliMove, com.hkmanjuu.azurlane.gp.mc - Emulator_ServerName = 'disabled' # disabled, cn_android-0, cn_android-1, cn_android-2, cn_android-3, cn_android-4, cn_android-5, cn_android-6, cn_android-7, cn_android-8, cn_android-9, cn_android-10, cn_android-11, cn_android-12, cn_android-13, cn_android-14, cn_android-15, cn_android-16, cn_android-17, cn_android-18, cn_android-19, cn_android-20, cn_android-21, cn_android-22, cn_android-23, cn_android-24, cn_android-25, cn_ios-0, cn_ios-1, cn_ios-2, cn_ios-3, cn_ios-4, cn_ios-5, cn_ios-6, cn_ios-7, cn_ios-8, cn_ios-9, cn_ios-10, cn_channel-0, cn_channel-1, cn_channel-2, cn_channel-3, cn_channel-4, en-0, en-1, en-2, en-3, en-4, en-5, jp-0, jp-1, jp-2, jp-3, jp-4, jp-5, jp-6, jp-7, jp-8, jp-9, jp-10, jp-11, jp-12, jp-13, jp-14, jp-15, jp-16, jp-17 + Emulator_ServerName = 'disabled' # disabled, cn_android-0, cn_android-1, cn_android-2, cn_android-3, cn_android-4, cn_android-5, cn_android-6, cn_android-7, cn_android-8, cn_android-9, cn_android-10, cn_android-11, cn_android-12, cn_android-13, cn_android-14, cn_android-15, cn_android-16, cn_android-17, cn_android-18, cn_android-19, cn_android-20, cn_android-21, cn_android-22, cn_android-23, cn_android-24, cn_android-25, cn_android-26, cn_android-27, cn_ios-0, cn_ios-1, cn_ios-2, cn_ios-3, cn_ios-4, cn_ios-5, cn_ios-6, cn_ios-7, cn_ios-8, cn_ios-9, cn_ios-10, cn_channel-0, cn_channel-1, cn_channel-2, cn_channel-3, cn_channel-4, en-0, en-1, en-2, en-3, en-4, en-5, jp-0, jp-1, jp-2, jp-3, jp-4, jp-5, jp-6, jp-7, jp-8, jp-9, jp-10, jp-11, jp-12, jp-13, jp-14, jp-15, jp-16, jp-17 Emulator_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, nemu_ipc, ldopengl Emulator_ControlMethod = 'MaaTouch' # ADB, uiautomator2, minitouch, Hermit, MaaTouch Emulator_ScreenshotDedithering = False diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index 4d182fbe5..52d9e404d 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -447,6 +447,8 @@ "cn_android-23": "[国服] 长戟计划", "cn_android-24": "[国服] 暴雨行动", "cn_android-25": "[国服] 水仙行动", + "cn_android-26": "[国服] 冬月计划", + "cn_android-27": "[国服] 长弓计划", "cn_ios-0": "[国服] 夏威夷", "cn_ios-1": "[国服] 珊瑚海", "cn_ios-2": "[国服] 中途岛", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index cdbc5fc4f..37c5d991a 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -447,6 +447,8 @@ "cn_android-23": "[国服] 长戟计划", "cn_android-24": "[国服] 暴雨行动", "cn_android-25": "[国服] 水仙行动", + "cn_android-26": "[国服] 冬月计划", + "cn_android-27": "[国服] 长弓计划", "cn_ios-0": "[国服] 夏威夷", "cn_ios-1": "[国服] 珊瑚海", "cn_ios-2": "[国服] 中途岛", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index eeee4c391..5aa861154 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -447,6 +447,8 @@ "cn_android-23": "[国服] 长戟计划", "cn_android-24": "[国服] 暴雨行动", "cn_android-25": "[国服] 水仙行动", + "cn_android-26": "[国服] 冬月计划", + "cn_android-27": "[国服] 长弓计划", "cn_ios-0": "[国服] 夏威夷", "cn_ios-1": "[国服] 珊瑚海", "cn_ios-2": "[国服] 中途岛", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index 6b5d3bd44..bc28fb586 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -447,6 +447,8 @@ "cn_android-23": "[国服] 长戟计划", "cn_android-24": "[国服] 暴雨行动", "cn_android-25": "[国服] 水仙行动", + "cn_android-26": "[国服] 冬月计划", + "cn_android-27": "[国服] 长弓计划", "cn_ios-0": "[国服] 夏威夷", "cn_ios-1": "[国服] 珊瑚海", "cn_ios-2": "[国服] 中途岛", diff --git a/module/config/server.py b/module/config/server.py index 85f3b0758..ae9f92ab8 100644 --- a/module/config/server.py +++ b/module/config/server.py @@ -72,7 +72,8 @@ VALID_SERVER_LIST = { '杜立特空袭', '地狱犬行动', '开罗宣言', '奥林匹克行动', '小王冠行动', '波茨坦公告', '白色方案', '瓦尔基里行动', '曼哈顿计划', '八月风暴', '秋季旅行', '水星行动', '莱茵河卫兵', - '北极光计划', '长戟计划', '暴雨行动', '水仙行动', + '北极光计划', '长戟计划', '暴雨行动', '水仙行动', '冬月计划', + '长弓计划' ], 'cn_ios': [ '夏威夷', '珊瑚海', '中途岛', '铁底湾', '所罗门', '马里亚纳', diff --git a/module/event_hospital/assets.py b/module/event_hospital/assets.py index a29b9505e..80aca00e1 100644 --- a/module/event_hospital/assets.py +++ b/module/event_hospital/assets.py @@ -9,11 +9,12 @@ CLUE_LIST = Button(area={'cn': (98, 156, 247, 616), 'en': (98, 156, 247, 616), ' DAILY_RED_DOT = Button(area={'cn': (1014, 658, 1051, 671), 'en': (1014, 658, 1051, 671), 'jp': (1014, 658, 1051, 671), 'tw': (1014, 658, 1051, 671)}, color={'cn': (61, 50, 52), 'en': (61, 50, 52), 'jp': (61, 50, 52), 'tw': (61, 50, 52)}, button={'cn': (1014, 658, 1051, 671), 'en': (1014, 658, 1051, 671), 'jp': (1014, 658, 1051, 671), 'tw': (1014, 658, 1051, 671)}, file={'cn': './assets/cn/event_hospital/DAILY_RED_DOT.png', 'en': './assets/cn/event_hospital/DAILY_RED_DOT.png', 'jp': './assets/cn/event_hospital/DAILY_RED_DOT.png', 'tw': './assets/cn/event_hospital/DAILY_RED_DOT.png'}) DAILY_REWARD_RECEIVE = Button(area={'cn': (874, 620, 1157, 677), 'en': (874, 620, 1157, 677), 'jp': (874, 620, 1157, 677), 'tw': (874, 620, 1157, 677)}, color={'cn': (46, 57, 90), 'en': (46, 57, 90), 'jp': (46, 57, 90), 'tw': (46, 57, 90)}, button={'cn': (874, 620, 1157, 677), 'en': (874, 620, 1157, 677), 'jp': (874, 620, 1157, 677), 'tw': (874, 620, 1157, 677)}, file={'cn': './assets/cn/event_hospital/DAILY_REWARD_RECEIVE.png', 'en': './assets/cn/event_hospital/DAILY_REWARD_RECEIVE.png', 'jp': './assets/cn/event_hospital/DAILY_REWARD_RECEIVE.png', 'tw': './assets/cn/event_hospital/DAILY_REWARD_RECEIVE.png'}) GET_CLUE = Button(area={'cn': (617, 80, 653, 106), 'en': (617, 80, 653, 106), 'jp': (617, 80, 653, 106), 'tw': (617, 80, 653, 106)}, color={'cn': (92, 99, 107), 'en': (92, 99, 107), 'jp': (92, 99, 107), 'tw': (92, 99, 107)}, button={'cn': (570, 593, 710, 627), 'en': (570, 593, 710, 627), 'jp': (570, 593, 710, 627), 'tw': (570, 593, 710, 627)}, file={'cn': './assets/cn/event_hospital/GET_CLUE.png', 'en': './assets/cn/event_hospital/GET_CLUE.png', 'jp': './assets/cn/event_hospital/GET_CLUE.png', 'tw': './assets/cn/event_hospital/GET_CLUE.png'}) +GET_CLUE_TEXT = Button(area={'cn': (607, 105, 651, 126), 'en': (607, 105, 651, 126), 'jp': (607, 105, 651, 126), 'tw': (607, 105, 651, 126)}, color={'cn': (140, 140, 142), 'en': (140, 140, 142), 'jp': (140, 140, 142), 'tw': (140, 140, 142)}, button={'cn': (607, 105, 651, 126), 'en': (607, 105, 651, 126), 'jp': (607, 105, 651, 126), 'tw': (607, 105, 651, 126)}, file={'cn': './assets/cn/event_hospital/GET_CLUE_TEXT.png', 'en': './assets/cn/event_hospital/GET_CLUE_TEXT.png', 'jp': './assets/cn/event_hospital/GET_CLUE_TEXT.png', 'tw': './assets/cn/event_hospital/GET_CLUE_TEXT.png'}) HOSIPITAL_CHECK = Button(area={'cn': (37, 26, 74, 60), 'en': (37, 26, 74, 60), 'jp': (37, 26, 74, 60), 'tw': (37, 26, 74, 60)}, color={'cn': (105, 104, 105), 'en': (105, 104, 105), 'jp': (105, 104, 105), 'tw': (105, 104, 105)}, button={'cn': (37, 26, 74, 60), 'en': (37, 26, 74, 60), 'jp': (37, 26, 74, 60), 'tw': (37, 26, 74, 60)}, file={'cn': './assets/cn/event_hospital/HOSIPITAL_CHECK.png', 'en': './assets/cn/event_hospital/HOSIPITAL_CHECK.png', 'jp': './assets/cn/event_hospital/HOSIPITAL_CHECK.png', 'tw': './assets/cn/event_hospital/HOSIPITAL_CHECK.png'}) HOSIPITAL_CLUE_CHECK = Button(area={'cn': (1167, 90, 1207, 126), 'en': (1167, 90, 1207, 126), 'jp': (1167, 90, 1207, 126), 'tw': (1167, 90, 1207, 126)}, color={'cn': (197, 148, 150), 'en': (197, 148, 150), 'jp': (197, 148, 150), 'tw': (197, 148, 150)}, button={'cn': (1167, 90, 1207, 126), 'en': (1167, 90, 1207, 126), 'jp': (1167, 90, 1207, 126), 'tw': (1167, 90, 1207, 126)}, file={'cn': './assets/cn/event_hospital/HOSIPITAL_CLUE_CHECK.png', 'en': './assets/cn/event_hospital/HOSIPITAL_CLUE_CHECK.png', 'jp': './assets/cn/event_hospital/HOSIPITAL_CLUE_CHECK.png', 'tw': './assets/cn/event_hospital/HOSIPITAL_CLUE_CHECK.png'}) HOSIPITAL_GOTO_CLUE = Button(area={'cn': (1087, 662, 1126, 697), 'en': (1087, 662, 1126, 697), 'jp': (1087, 662, 1126, 697), 'tw': (1087, 662, 1126, 697)}, color={'cn': (80, 82, 83), 'en': (80, 82, 83), 'jp': (80, 82, 83), 'tw': (80, 82, 83)}, button={'cn': (1087, 662, 1126, 697), 'en': (1087, 662, 1126, 697), 'jp': (1087, 662, 1126, 697), 'tw': (1087, 662, 1126, 697)}, file={'cn': './assets/cn/event_hospital/HOSIPITAL_GOTO_CLUE.png', 'en': './assets/cn/event_hospital/HOSIPITAL_GOTO_CLUE.png', 'jp': './assets/cn/event_hospital/HOSIPITAL_GOTO_CLUE.png', 'tw': './assets/cn/event_hospital/HOSIPITAL_GOTO_CLUE.png'}) HOSPITAL_BATTLE_EXIT = Button(area={'cn': (1097, 112, 1137, 147), 'en': (1097, 112, 1137, 147), 'jp': (1097, 112, 1137, 147), 'tw': (1097, 112, 1137, 147)}, color={'cn': (210, 161, 165), 'en': (210, 161, 165), 'jp': (210, 161, 165), 'tw': (210, 161, 165)}, button={'cn': (1097, 112, 1137, 147), 'en': (1097, 112, 1137, 147), 'jp': (1097, 112, 1137, 147), 'tw': (1097, 112, 1137, 147)}, file={'cn': './assets/cn/event_hospital/HOSPITAL_BATTLE_EXIT.png', 'en': './assets/cn/event_hospital/HOSPITAL_BATTLE_EXIT.png', 'jp': './assets/cn/event_hospital/HOSPITAL_BATTLE_EXIT.png', 'tw': './assets/cn/event_hospital/HOSPITAL_BATTLE_EXIT.png'}) -HOSPITAL_BATTLE_PREPARE = Button(area={'cn': (964, 503, 1028, 532), 'en': (879, 507, 967, 531), 'jp': (965, 504, 1026, 533), 'tw': (964, 503, 1028, 532)}, color={'cn': (115, 113, 118), 'en': (104, 102, 106), 'jp': (121, 119, 125), 'tw': (115, 113, 118)}, button={'cn': (964, 503, 1028, 532), 'en': (879, 507, 967, 531), 'jp': (965, 504, 1026, 533), 'tw': (964, 503, 1028, 532)}, file={'cn': './assets/cn/event_hospital/HOSPITAL_BATTLE_PREPARE.png', 'en': './assets/en/event_hospital/HOSPITAL_BATTLE_PREPARE.png', 'jp': './assets/jp/event_hospital/HOSPITAL_BATTLE_PREPARE.png', 'tw': './assets/cn/event_hospital/HOSPITAL_BATTLE_PREPARE.png'}) +HOSPITAL_BATTLE_PREPARE = Button(area={'cn': (964, 503, 1028, 532), 'en': (879, 507, 967, 531), 'jp': (965, 504, 1026, 533), 'tw': (963, 503, 1028, 533)}, color={'cn': (115, 113, 118), 'en': (104, 102, 106), 'jp': (121, 119, 125), 'tw': (123, 121, 126)}, button={'cn': (964, 503, 1028, 532), 'en': (879, 507, 967, 531), 'jp': (965, 504, 1026, 533), 'tw': (963, 503, 1028, 533)}, file={'cn': './assets/cn/event_hospital/HOSPITAL_BATTLE_PREPARE.png', 'en': './assets/en/event_hospital/HOSPITAL_BATTLE_PREPARE.png', 'jp': './assets/jp/event_hospital/HOSPITAL_BATTLE_PREPARE.png', 'tw': './assets/tw/event_hospital/HOSPITAL_BATTLE_PREPARE.png'}) HOSPITAL_GOTO_DAILY = Button(area={'cn': (900, 658, 928, 688), 'en': (900, 658, 928, 688), 'jp': (900, 658, 928, 688), 'tw': (900, 658, 928, 688)}, color={'cn': (117, 119, 120), 'en': (117, 119, 120), 'jp': (117, 119, 120), 'tw': (117, 119, 120)}, button={'cn': (900, 658, 928, 688), 'en': (900, 658, 928, 688), 'jp': (900, 658, 928, 688), 'tw': (900, 658, 928, 688)}, file={'cn': './assets/cn/event_hospital/HOSPITAL_GOTO_DAILY.png', 'en': './assets/cn/event_hospital/HOSPITAL_GOTO_DAILY.png', 'jp': './assets/cn/event_hospital/HOSPITAL_GOTO_DAILY.png', 'tw': './assets/cn/event_hospital/HOSPITAL_GOTO_DAILY.png'}) INVEST_REWARD_RECEIVE = Button(area={'cn': (1113, 666, 1236, 690), 'en': (1113, 666, 1236, 690), 'jp': (1113, 666, 1236, 690), 'tw': (1113, 666, 1236, 690)}, color={'cn': (97, 99, 117), 'en': (97, 99, 117), 'jp': (97, 99, 117), 'tw': (97, 99, 117)}, button={'cn': (1113, 666, 1236, 690), 'en': (1113, 666, 1236, 690), 'jp': (1113, 666, 1236, 690), 'tw': (1113, 666, 1236, 690)}, file={'cn': './assets/cn/event_hospital/INVEST_REWARD_RECEIVE.png', 'en': './assets/cn/event_hospital/INVEST_REWARD_RECEIVE.png', 'jp': './assets/cn/event_hospital/INVEST_REWARD_RECEIVE.png', 'tw': './assets/cn/event_hospital/INVEST_REWARD_RECEIVE.png'}) INVEST_SCROLL = Button(area={'cn': (1200, 153, 1203, 642), 'en': (1200, 153, 1203, 642), 'jp': (1200, 153, 1203, 642), 'tw': (1200, 153, 1203, 642)}, color={'cn': (148, 136, 148), 'en': (148, 136, 148), 'jp': (148, 136, 148), 'tw': (148, 136, 148)}, button={'cn': (1200, 153, 1203, 642), 'en': (1200, 153, 1203, 642), 'jp': (1200, 153, 1203, 642), 'tw': (1200, 153, 1203, 642)}, file={'cn': './assets/cn/event_hospital/INVEST_SCROLL.png', 'en': './assets/cn/event_hospital/INVEST_SCROLL.png', 'jp': './assets/cn/event_hospital/INVEST_SCROLL.png', 'tw': './assets/cn/event_hospital/INVEST_SCROLL.png'}) @@ -27,9 +28,7 @@ SIDEBAR_NIGHT = Button(area={'cn': (24, 399, 54, 448), 'en': (24, 399, 54, 448), SIDEBAR_NOON = Button(area={'cn': (24, 320, 54, 365), 'en': (24, 320, 54, 365), 'jp': (24, 320, 54, 365), 'tw': (24, 320, 54, 365)}, color={'cn': (78, 82, 75), 'en': (78, 82, 75), 'jp': (78, 82, 75), 'tw': (78, 82, 75)}, button={'cn': (24, 320, 54, 365), 'en': (24, 320, 54, 365), 'jp': (24, 320, 54, 365), 'tw': (24, 320, 54, 365)}, file={'cn': './assets/cn/event_hospital/SIDEBAR_NOON.png', 'en': './assets/cn/event_hospital/SIDEBAR_NOON.png', 'jp': './assets/cn/event_hospital/SIDEBAR_NOON.png', 'tw': './assets/cn/event_hospital/SIDEBAR_NOON.png'}) TAB_CHARACTER = Button(area={'cn': (263, 93, 409, 122), 'en': (263, 93, 409, 122), 'jp': (263, 93, 409, 122), 'tw': (263, 93, 409, 122)}, color={'cn': (185, 180, 191), 'en': (185, 180, 191), 'jp': (185, 180, 191), 'tw': (185, 180, 191)}, button={'cn': (263, 93, 409, 122), 'en': (263, 93, 409, 122), 'jp': (263, 93, 409, 122), 'tw': (263, 93, 409, 122)}, file={'cn': './assets/cn/event_hospital/TAB_CHARACTER.png', 'en': './assets/cn/event_hospital/TAB_CHARACTER.png', 'jp': './assets/cn/event_hospital/TAB_CHARACTER.png', 'tw': './assets/cn/event_hospital/TAB_CHARACTER.png'}) TAB_LOCATION = Button(area={'cn': (89, 93, 240, 121), 'en': (89, 93, 240, 121), 'jp': (89, 93, 240, 121), 'tw': (89, 93, 240, 121)}, color={'cn': (73, 108, 198), 'en': (73, 108, 198), 'jp': (73, 108, 198), 'tw': (73, 108, 198)}, button={'cn': (89, 93, 240, 121), 'en': (89, 93, 240, 121), 'jp': (89, 93, 240, 121), 'tw': (89, 93, 240, 121)}, file={'cn': './assets/cn/event_hospital/TAB_LOCATION.png', 'en': './assets/cn/event_hospital/TAB_LOCATION.png', 'jp': './assets/cn/event_hospital/TAB_LOCATION.png', 'tw': './assets/cn/event_hospital/TAB_LOCATION.png'}) -TAB_RECORD = Button(area={'cn': (416, 93, 509, 121), 'en': (416, 93, 509, 121), 'jp': (416, 93, 509, 121), 'tw': (416, 93, 509, 121)}, color={'cn': (185, 177, 187), 'en': (185, 177, 187), 'jp': (185, 177, 187), 'tw': (185, 177, 187)}, button={'cn': (416, 93, 509, 121), 'en': (416, 93, 509, 121), 'jp': (416, 93, 509, 121), 'tw': (416, 93, 509, 121)}, file={'cn': './assets/cn/event_hospital/TAB_RECORD.png', 'en': './assets/cn/event_hospital/TAB_RECORD.png', 'jp': './assets/cn/event_hospital/TAB_RECORD.png', 'tw': './assets/cn/event_hospital/TAB_RECORD.png'}) -TAB_SECRET = Button(area={'cn': (572, 95, 652, 119), 'en': (572, 95, 652, 119), 'jp': (572, 95, 652, 119), 'tw': (572, 95, 652, 119)}, color={'cn': (171, 166, 178), 'en': (171, 166, 178), 'jp': (171, 166, 178), 'tw': (171, 166, 178)}, button={'cn': (572, 95, 652, 119), 'en': (572, 95, 652, 119), 'jp': (572, 95, 652, 119), 'tw': (572, 95, 652, 119)}, file={'cn': './assets/cn/event_hospital/TAB_SECRET.png', 'en': './assets/cn/event_hospital/TAB_SECRET.png', 'jp': './assets/cn/event_hospital/TAB_SECRET.png', 'tw': './assets/cn/event_hospital/TAB_SECRET.png'}) -TEMPLATE_INVEST = Template(file={'cn': './assets/cn/event_hospital/TEMPLATE_INVEST.png', 'en': './assets/en/event_hospital/TEMPLATE_INVEST.png', 'jp': './assets/jp/event_hospital/TEMPLATE_INVEST.png', 'tw': './assets/cn/event_hospital/TEMPLATE_INVEST.png'}) +TEMPLATE_INVEST = Template(file={'cn': './assets/cn/event_hospital/TEMPLATE_INVEST.png', 'en': './assets/en/event_hospital/TEMPLATE_INVEST.png', 'jp': './assets/jp/event_hospital/TEMPLATE_INVEST.png', 'tw': './assets/tw/event_hospital/TEMPLATE_INVEST.png'}) TEMPLATE_INVEST2 = Template(file={'cn': './assets/cn/event_hospital/TEMPLATE_INVEST2.png', 'en': './assets/cn/event_hospital/TEMPLATE_INVEST2.png', 'jp': './assets/cn/event_hospital/TEMPLATE_INVEST2.png', 'tw': './assets/cn/event_hospital/TEMPLATE_INVEST2.png'}) -TEMPLATE_REMAIN_CURRENT = Template(file={'cn': './assets/cn/event_hospital/TEMPLATE_REMAIN_CURRENT.png', 'en': './assets/en/event_hospital/TEMPLATE_REMAIN_CURRENT.png', 'jp': './assets/jp/event_hospital/TEMPLATE_REMAIN_CURRENT.png', 'tw': './assets/cn/event_hospital/TEMPLATE_REMAIN_CURRENT.png'}) -TEMPLATE_REMAIN_TIMES = Template(file={'cn': './assets/cn/event_hospital/TEMPLATE_REMAIN_TIMES.png', 'en': './assets/en/event_hospital/TEMPLATE_REMAIN_TIMES.png', 'jp': './assets/jp/event_hospital/TEMPLATE_REMAIN_TIMES.png', 'tw': './assets/cn/event_hospital/TEMPLATE_REMAIN_TIMES.png'}) +TEMPLATE_REMAIN_CURRENT = Template(file={'cn': './assets/cn/event_hospital/TEMPLATE_REMAIN_CURRENT.png', 'en': './assets/en/event_hospital/TEMPLATE_REMAIN_CURRENT.png', 'jp': './assets/jp/event_hospital/TEMPLATE_REMAIN_CURRENT.png', 'tw': './assets/tw/event_hospital/TEMPLATE_REMAIN_CURRENT.png'}) +TEMPLATE_REMAIN_TIMES = Template(file={'cn': './assets/cn/event_hospital/TEMPLATE_REMAIN_TIMES.png', 'en': './assets/en/event_hospital/TEMPLATE_REMAIN_TIMES.png', 'jp': './assets/jp/event_hospital/TEMPLATE_REMAIN_TIMES.png', 'tw': './assets/tw/event_hospital/TEMPLATE_REMAIN_TIMES.png'}) diff --git a/module/event_hospital/ui.py b/module/event_hospital/ui.py index 3785e9bfd..463548882 100644 --- a/module/event_hospital/ui.py +++ b/module/event_hospital/ui.py @@ -18,6 +18,10 @@ class HospitalUI(UI): """ if self.appear_then_click(GET_CLUE, offset=(20, 20), interval=1): return True + if self.appear(GET_CLUE_TEXT, offset=(20, 20), interval=1): + logger.info(f'{GET_CLUE_TEXT} -> {GET_CLUE}') + self.device.click(GET_CLUE) + return True return False def handle_clue_exit(self): diff --git a/module/map/map_fleet_preparation.py b/module/map/map_fleet_preparation.py index 590286acf..c2c373cb1 100644 --- a/module/map/map_fleet_preparation.py +++ b/module/map/map_fleet_preparation.py @@ -340,7 +340,11 @@ class FleetPreparation(InfoHandler): return False # Submarine. - if submarine.allow(): + # cache submarine.allow() to avoid inconsistency after setting fleet_2 + # because the expanded fleet_2 may cover submarine buttons + map_allow_submarine = submarine.allow() + logger.attr('map_allow_submarine', map_allow_submarine) + if map_allow_submarine: if self.config.Submarine_Fleet: submarine.ensure_to_be(self.config.Submarine_Fleet) else: @@ -364,14 +368,12 @@ class FleetPreparation(InfoHandler): fleet_1.ensure_to_be(self.config.Fleet_Fleet1) # Check if submarine is empty again. - if submarine.allow(): - logger.attr('map_allow_submarine', True) + if map_allow_submarine: if self.config.Submarine_Fleet: pass else: submarine.clear() else: - logger.attr('map_allow_submarine', False) self.config.SUBMARINE = 0 if self.appear(FLEET_1_CLEAR, offset=(-20, -80, 20, 5)): diff --git a/module/os_handler/strategic.py b/module/os_handler/strategic.py index d996fc0e5..63f0e8dfa 100644 --- a/module/os_handler/strategic.py +++ b/module/os_handler/strategic.py @@ -98,8 +98,8 @@ class StrategicSearchHandler(MapEventHandler): logger.attr('encounter_merchant', 'continue') self.device.click(STRATEGIC_SEARCH_MERCHANT_STOP) continue - if self.appear(STRATEGIC_SEARCH_ZONEMODE_REPEAT) \ - and self.appear(STRATEGIC_SEARCH_MERCHANT_STOP): + if self._strategy_option_selected(STRATEGIC_SEARCH_ZONEMODE_REPEAT) \ + and self._strategy_option_selected(STRATEGIC_SEARCH_MERCHANT_STOP): logger.attr('zone_mode', 'repeat') logger.attr('encounter_merchant', 'stop') skip_first_screenshot = True diff --git a/module/storage/storage.py b/module/storage/storage.py index c9d03760c..d12cc1896 100644 --- a/module/storage/storage.py +++ b/module/storage/storage.py @@ -132,7 +132,7 @@ class StorageHandler(StorageUI): for _ in self.loop(): # End - if success and self._storage_in_material(): + if success and self._storage_in_material() and not self.appear(EQUIP_CONFIRM_2, offset=(20, 20)): break # use @@ -146,13 +146,11 @@ class StorageHandler(StorageUI): logger.info(f'{GET_ITEMS_1} -> {MATERIAL_ENTER}') self.device.click(MATERIAL_ENTER) self.interval_reset(MATERIAL_CHECK) - success = True continue if self.appear(GET_ITEMS_2, offset=(5, 5), interval=5): logger.info(f'{GET_ITEMS_2} -> {MATERIAL_ENTER}') self.device.click(MATERIAL_ENTER) self.interval_reset(MATERIAL_CHECK) - success = True continue # use match_template_color on BOX_AMOUNT_CONFIRM # a long animation that opens a box, will be on the top of BOX_AMOUNT_CONFIRM @@ -169,6 +167,9 @@ class StorageHandler(StorageUI): # GET_ITEMS_* don't appear that fast self.interval_reset(MATERIAL_CHECK) self.interval_clear([GET_ITEMS_1, GET_ITEMS_2]) + # EQUIP_CONFIRM_2 -> GET_ITEMS -> _storage_in_material + # mark EQUIP_CONFIRM_2 as the last + success = True continue # Storage full @@ -249,9 +250,11 @@ class StorageHandler(StorageUI): else: MATERIAL_SCROLL.set_top(main=self) - while amount > used: + while 1: logger.hr('Use boxes in page') - used += self._storage_use_box_in_page(rarity=rarity, amount=amount - used) + used += self._storage_use_box_in_page(rarity=rarity, amount=max(amount - used, 0)) + if used >= amount: + break if MATERIAL_SCROLL.at_bottom(main=self): logger.info('Scroll bar reached end, stop') break @@ -425,15 +428,30 @@ class StorageHandler(StorageUI): break self._storage_enter_material() - boxes = self._storage_use_box_execute(rarity=rarity, amount=amount - disassembled) - if boxes <= 0: - logger.warning('No more boxes to use, disassemble equipment end') + try: + boxes = self._storage_use_box_execute(rarity=rarity, amount=amount - disassembled) + if boxes <= 0: + logger.warning('No more boxes to use, disassemble equipment end') + self.storage_has_boxes = False + break + # since 2025.05.20, equipments in boxes get disassembled automatically + disassembled += boxes + # use bos success, check total again + continue + except StorageFull: + pass + # handle storage full + self._storage_enter_disassemble() + equip = self._storage_disassemble_equipment_execute(rarity=rarity, amount=amount) + disassembled += equip + if equip <= 0: + logger.warning('StorageFull but unable to disassemble, ' + 'probably because storage is full of rare equipments or above, ' + 'disassemble equipment end') + logger.warning('Please manually disassemble some equipments to free up storage') self.storage_has_boxes = False break - # since 2025.05.20, equipments in boxes get disassembled automatically - disassembled += boxes - return disassembled def storage_use_box(self, rarity=1, amount=40): diff --git a/module/ui/ui.py b/module/ui/ui.py index 3acf55af4..f85bea141 100644 --- a/module/ui/ui.py +++ b/module/ui/ui.py @@ -169,9 +169,7 @@ class UI(InfoHandler): if self.config.Emulator_ControlMethod == "uiautomator2": self.device.uninstall_minicap() - @run_once - def rotation_check(): - self.device.get_orientation() + orientation_timer = Timer(5) timeout = Timer(10, count=20).start() while 1: @@ -212,7 +210,10 @@ class UI(InfoHandler): app_check() minicap_check() - rotation_check() + # continuously check rotation + if orientation_timer.reached(): + self.device.get_orientation() + orientation_timer.reset() # Unknown page, need manual switching logger.warning("Unknown ui page") @@ -548,6 +549,7 @@ class UI(InfoHandler): if self.appear(MEOWFFICER_BUY, offset=(30, 30), interval=3): logger.info(f'UI additional: {MEOWFFICER_BUY} -> {BACK_ARROW}') self.device.click(BACK_ARROW) + self.interval_reset(GET_SHIP) return True # Campaign preparation diff --git a/module/war_archives/assets.py b/module/war_archives/assets.py index 6d73d709b..79bd184cc 100644 --- a/module/war_archives/assets.py +++ b/module/war_archives/assets.py @@ -24,6 +24,7 @@ TEMPLATE_IRIS_OF_LIGHT_AND_DARK = Template(file={'cn': './assets/cn/war_archives TEMPLATE_KHOROVOD_OF_DAWNS_RIME = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_KHOROVOD_OF_DAWNS_RIME.png', 'en': './assets/cn/war_archives/TEMPLATE_KHOROVOD_OF_DAWNS_RIME.png', 'jp': './assets/cn/war_archives/TEMPLATE_KHOROVOD_OF_DAWNS_RIME.png', 'tw': './assets/cn/war_archives/TEMPLATE_KHOROVOD_OF_DAWNS_RIME.png'}) TEMPLATE_MICROLAYER_MEDLEY = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_MICROLAYER_MEDLEY.png', 'en': './assets/en/war_archives/TEMPLATE_MICROLAYER_MEDLEY.png', 'jp': './assets/cn/war_archives/TEMPLATE_MICROLAYER_MEDLEY.png', 'tw': './assets/tw/war_archives/TEMPLATE_MICROLAYER_MEDLEY.png'}) TEMPLATE_MIRROR_INVOLUTION = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_MIRROR_INVOLUTION.png', 'en': './assets/cn/war_archives/TEMPLATE_MIRROR_INVOLUTION.png', 'jp': './assets/cn/war_archives/TEMPLATE_MIRROR_INVOLUTION.png', 'tw': './assets/cn/war_archives/TEMPLATE_MIRROR_INVOLUTION.png'}) +TEMPLATE_MOONLIT_OVERTURE = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_MOONLIT_OVERTURE.png', 'en': './assets/cn/war_archives/TEMPLATE_MOONLIT_OVERTURE.png', 'jp': './assets/cn/war_archives/TEMPLATE_MOONLIT_OVERTURE.png', 'tw': './assets/cn/war_archives/TEMPLATE_MOONLIT_OVERTURE.png'}) TEMPLATE_NORTHERN_OVERTURE = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_NORTHERN_OVERTURE.png', 'en': './assets/en/war_archives/TEMPLATE_NORTHERN_OVERTURE.png', 'jp': './assets/cn/war_archives/TEMPLATE_NORTHERN_OVERTURE.png', 'tw': './assets/cn/war_archives/TEMPLATE_NORTHERN_OVERTURE.png'}) TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT.png', 'en': './assets/cn/war_archives/TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT.png', 'jp': './assets/cn/war_archives/TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT.png', 'tw': './assets/cn/war_archives/TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT.png'}) TEMPLATE_PRELUDE_UNDER_THE_MOON = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png', 'en': './assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png', 'jp': './assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png', 'tw': './assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png'}) diff --git a/submodule/AlasMaaBridge/module/config/argument/args.json b/submodule/AlasMaaBridge/module/config/argument/args.json index a04dfc952..68b106180 100644 --- a/submodule/AlasMaaBridge/module/config/argument/args.json +++ b/submodule/AlasMaaBridge/module/config/argument/args.json @@ -215,8 +215,10 @@ }, "Series": { "type": "select", - "value": 1, + "value": 0, "option": [ + -1, + 0, 1, 2, 3, @@ -328,8 +330,10 @@ }, "Series": { "type": "select", - "value": 1, + "value": 0, "option": [ + -1, + 0, 1, 2, 3, @@ -441,8 +445,10 @@ }, "Series": { "type": "select", - "value": 1, + "value": 0, "option": [ + -1, + 0, 1, 2, 3, diff --git a/submodule/AlasMaaBridge/module/config/argument/argument.yaml b/submodule/AlasMaaBridge/module/config/argument/argument.yaml index d0df371a8..53209e386 100644 --- a/submodule/AlasMaaBridge/module/config/argument/argument.yaml +++ b/submodule/AlasMaaBridge/module/config/argument/argument.yaml @@ -67,8 +67,8 @@ MaaFight: Stone: null Times: null Series: - value: 1 - option: [ 1,2,3,4,5,6 ] + value: 0 + option: [ -1,0,1,2,3,4,5,6 ] Drops: value: null type: textarea diff --git a/submodule/AlasMaaBridge/module/config/config_generated.py b/submodule/AlasMaaBridge/module/config/config_generated.py index fff36ce6e..ba4e71757 100644 --- a/submodule/AlasMaaBridge/module/config/config_generated.py +++ b/submodule/AlasMaaBridge/module/config/config_generated.py @@ -46,7 +46,7 @@ class GeneratedConfig: MaaFight_Medicine = None MaaFight_Stone = None MaaFight_Times = None - MaaFight_Series = 1 # 1, 2, 3, 4, 5, 6 + MaaFight_Series = 0 # -1, 0, 1, 2, 3, 4, 5, 6 MaaFight_Drops = None MaaFight_DrGrandet = False diff --git a/submodule/AlasMaaBridge/module/config/i18n/en-US.json b/submodule/AlasMaaBridge/module/config/i18n/en-US.json index c3bb6ba62..6d8e812f9 100644 --- a/submodule/AlasMaaBridge/module/config/i18n/en-US.json +++ b/submodule/AlasMaaBridge/module/config/i18n/en-US.json @@ -226,7 +226,9 @@ }, "Series": { "name": "Series", - "help": "arknights native repeat stage option", + "help": "Arknights native repeat stage option.\n\"DISABLE\" does not adjust the in-game repeat count setting. If there is not enough sanity to complete the current in-game setting, the task will end directly.\n\"AUTO\" automatically identifies the maximum repeat count for the level, maintaining the maximum repeat count without overflowing sanity.\n\"1-6\" perform the selected number of repetitions. If the current sanity is not enough to complete the set number (such as only enough for 5 times but set to 6 times), the task will end directly.", + "-1": "DISABLE", + "0": "AUTO", "1": "1", "2": "2", "3": "3", diff --git a/submodule/AlasMaaBridge/module/config/i18n/ja-JP.json b/submodule/AlasMaaBridge/module/config/i18n/ja-JP.json index a92851e17..876068ae6 100644 --- a/submodule/AlasMaaBridge/module/config/i18n/ja-JP.json +++ b/submodule/AlasMaaBridge/module/config/i18n/ja-JP.json @@ -225,8 +225,10 @@ "help": "MaaFight.Times.help" }, "Series": { - "name": "MaaFight.Series.name", - "help": "MaaFight.Series.help", + "name": "連戦回数", + "help": "アークナイツのネイティブ連戦回数オプション\n\"DISABLE\"はゲーム内の連戦回数設定を調整せず、現在の設定に十分な理性がない場合、タスクが直接終了します\n\"AUTO\"はステージの最大連戦回数を自動的に識別し、理性があふれないように最大連戦回数を維持します\n\"1-6\"は設定された回数で連戦を実行しますが、現在の理性が設定された回数を完了するのに十分でない場合(例えば、5回分の理性しかないのに6回に設定した場合)、タスクは直接終了します", + "-1": "DISABLE", + "0": "AUTO", "1": "1", "2": "2", "3": "3", diff --git a/submodule/AlasMaaBridge/module/config/i18n/zh-CN.json b/submodule/AlasMaaBridge/module/config/i18n/zh-CN.json index 9d6a6c4c3..d3b51bcca 100644 --- a/submodule/AlasMaaBridge/module/config/i18n/zh-CN.json +++ b/submodule/AlasMaaBridge/module/config/i18n/zh-CN.json @@ -226,7 +226,9 @@ }, "Series": { "name": "连战次数", - "help": "", + "help": "明日方舟原生的连战次数选项\n\"DISABLE\"不调整游戏内连战次数设置,若理智不足完成游戏内当前设定次数,直接结束任务\n\"AUTO\"表示自动识别关卡最大连战次数, 保持最大连战次数且理智不溢出\n\"1-6\"按设定次数执行连战,若当前理智不足完成设定次数(如仅够5次但设为6次), 会直接结束任务", + "-1": "DISABLE", + "0": "AUTO", "1": "1", "2": "2", "3": "3", diff --git a/submodule/AlasMaaBridge/module/config/i18n/zh-TW.json b/submodule/AlasMaaBridge/module/config/i18n/zh-TW.json index c98c13b96..b53f17a2b 100644 --- a/submodule/AlasMaaBridge/module/config/i18n/zh-TW.json +++ b/submodule/AlasMaaBridge/module/config/i18n/zh-TW.json @@ -225,8 +225,10 @@ "help": "MaaFight.Times.help" }, "Series": { - "name": "MaaFight.Series.name", - "help": "MaaFight.Series.help", + "name": "連戰次數", + "help": "明日方舟原生的連戰次數選項\n\"DISABLE\"不調整遊戲內連戰次數設置,若理智不足完成遊戲內當前設定次數,直接結束任務\n\"AUTO\"表示自動識別關卡最大連戰次數, 保持最大連戰次數且理智不溢出\n\"1-6\"按設定次數執行連戰,若當前理智不足完成設定次數(如僅夠5次但設為6次), 會直接結束任務", + "-1": "DISABLE", + "0": "AUTO", "1": "1", "2": "2", "3": "3",