diff --git a/core/Baas_thread.py b/core/Baas_thread.py index e36c70b8a..4b1a6ac7e 100644 --- a/core/Baas_thread.py +++ b/core/Baas_thread.py @@ -413,6 +413,7 @@ def quick_method_to_main_page(self, skip_first_screenshot=False): 'normal_task_skip-sweep-complete': (643, 506), "normal_task_charge-challenge-counts": (887, 164), "purchase_ap_notice": (919, 165), + "purchase_ap_notice-localized": (919, 165), "normal_task_task-operating-feature": (1000, 660), 'normal_task_mission-operating-task-info': (1000, 664), 'normal_task_mission-operating-task-info-notice': (416, 595), diff --git a/core/picture.py b/core/picture.py index eee323f0c..aa79c7497 100644 --- a/core/picture.py +++ b/core/picture.py @@ -139,7 +139,8 @@ def deal_with_pop_ups(self, rgb_pop_ups, img_pop_ups): 'CN': { 'main_page_news': (1142, 104), 'main_page_news2': (1142, 104), - 'main_page_item-expire': (925, 119) + 'main_page_item-expire': (925, 119), + 'main_page_renewal-month-card': (927, 109), }, 'JP': { 'main_page_news': (1142, 104), diff --git a/develop_tools/ActivityInfomations.txt b/develop_tools/ActivityInfomations.txt new file mode 100644 index 000000000..f81826366 --- /dev/null +++ b/develop_tools/ActivityInfomations.txt @@ -0,0 +1,13 @@ +1.活动名称 +core/default_config.json +"current_game_activity" 字段, 一般来说以国际服英文名为准, 如果国际服未出这个活动, 自己起一个暂用 +英文名应该去掉所有标点,每个单词首字母大写,连在一起 + +2.一个活动图片数据的储存: +①图片路径: +src/images/(服务器)/activity/(活动名)/ +②图片坐标信息路径: +src/images/(服务器)/x_y_range/(活动名).py + + +3.有活动内容的信息: diff --git a/main.py b/main.py index c1a4c25af..90a5de014 100644 --- a/main.py +++ b/main.py @@ -99,7 +99,7 @@ def operate_item(self, item): if __name__ == '__main__': t = Main(ocr_needed=["NUM", "CN", "Global"]) t.init_static_config() - config = ConfigSet(config_dir="1708232489") + config = ConfigSet(config_dir="1708148000") tt = Baas_thread(config, None, None, None) tt.static_config = t.static_config tt.init_all_data() @@ -107,16 +107,16 @@ def operate_item(self, item): # tt.solve("refresh_uiautomator2") # tt.solve("explore_activity_challenge") # tt.solve("activity_sweep") - # tt.solve("explore_activity_mission") - # tt.solve("explore_activity_story") + tt.solve("explore_activity_mission") + tt.solve("explore_activity_story") # tt.solve("common_shop") # tt.solve("total_assault") # tt.solve("cafe_reward") # tt.solve("momo_talk") # tt.solve("explore_normal_task") - tt.solve("explore_hard_task") - tt.solve("normal_task") - tt.solve("hard_task") + # tt.solve("explore_hard_task") + # tt.solve("normal_task") + # tt.solve("hard_task") # tt.solve("arena") # tt.solve("lesson") # tt.solve("group") @@ -124,6 +124,7 @@ def operate_item(self, item): # tt.solve("collect_reward") # tt.solve("main_story") # tt.solve("group_story") + # tt.solve("mini_story") # tt.solve("clear_special_task_power") # tt.solve("scrimmage") # tt.solve("rewarded_task") diff --git a/module/activities/AbydosResortRestorationCommittee.py b/module/activities/AbydosResortRestorationCommittee.py index 483f3536f..4d20b2cb9 100644 --- a/module/activities/AbydosResortRestorationCommittee.py +++ b/module/activities/AbydosResortRestorationCommittee.py @@ -258,6 +258,7 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), 'purchase_ap_notice': (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": task_info[self.server], @@ -363,20 +364,16 @@ def to_formation_edit_i(self, i, lo=(0, 0), skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] - img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + img_possibles = { + "normal_task_task-info": (941, 411) + } + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", diff --git a/module/activities/Battle_Before_the_New_Years_Dinner_Let_Us_Play_For_The_Victory.py b/module/activities/Battle_Before_the_New_Years_Dinner_Let_Us_Play_For_The_Victory.py index cebdcd109..09ef835e9 100644 --- a/module/activities/Battle_Before_the_New_Years_Dinner_Let_Us_Play_For_The_Victory.py +++ b/module/activities/Battle_Before_the_New_Years_Dinner_Let_Us_Play_For_The_Victory.py @@ -254,6 +254,7 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), 'purchase_ap_notice': (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": task_info[self.server], @@ -351,20 +352,14 @@ def to_formation_edit_i(self, i, lo, skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", diff --git a/module/activities/SummerSkysWishes.py b/module/activities/SummerSkysWishes.py index 41a7ea1ae..b2e57ad7e 100644 --- a/module/activities/SummerSkysWishes.py +++ b/module/activities/SummerSkysWishes.py @@ -263,6 +263,7 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), 'purchase_ap_notice': (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": task_info[self.server], @@ -368,20 +369,14 @@ def to_formation_edit_i(self, i, lo=(0, 0), skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", diff --git a/module/activities/SummerSpecialOperationsRABBITPlatoonAndTheMysteryOfTheMissingShrimp.py b/module/activities/SummerSpecialOperationsRABBITPlatoonAndTheMysteryOfTheMissingShrimp.py index 2e6b2184b..0920259a4 100644 --- a/module/activities/SummerSpecialOperationsRABBITPlatoonAndTheMysteryOfTheMissingShrimp.py +++ b/module/activities/SummerSpecialOperationsRABBITPlatoonAndTheMysteryOfTheMissingShrimp.py @@ -262,6 +262,7 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), 'purchase_ap_notice': (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "activity_task-info": (task_info_x[self.server],141), @@ -362,22 +363,16 @@ def to_formation_edit_i(self, i, lo=(0, 0), skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ - "purchase_ap_notice", + 'purchase_ap_notice', + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = { "activity_task-info": (941, 411), } - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", diff --git a/module/activities/SweetSecretsAndGunfightsATaleOfAfterSchoolSweets.py b/module/activities/SweetSecretsAndGunfightsATaleOfAfterSchoolSweets.py index e87eed3a0..95a724032 100644 --- a/module/activities/SweetSecretsAndGunfightsATaleOfAfterSchoolSweets.py +++ b/module/activities/SweetSecretsAndGunfightsATaleOfAfterSchoolSweets.py @@ -264,7 +264,8 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): 'activity_fight-success-confirm': (640, 663), "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), - 'purchase_ap_notice': (919, 168), + "purchase_ap_notice": (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": task_info[self.server], @@ -370,20 +371,14 @@ def to_formation_edit_i(self, i, lo=(0, 0), skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self,None,None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", diff --git a/module/activities/anUnconcealedHeart.py b/module/activities/anUnconcealedHeart.py index 9b378e8bd..65e36c8c3 100644 --- a/module/activities/anUnconcealedHeart.py +++ b/module/activities/anUnconcealedHeart.py @@ -256,6 +256,7 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), 'purchase_ap_notice': (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": task_info[self.server], @@ -356,20 +357,14 @@ def to_formation_edit_i(self, i, lo=(0, 0), skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", diff --git a/module/activities/bunnyChaserOnTheShip.py b/module/activities/bunnyChaserOnTheShip.py index bac79256b..233d819cc 100644 --- a/module/activities/bunnyChaserOnTheShip.py +++ b/module/activities/bunnyChaserOnTheShip.py @@ -288,6 +288,7 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), 'purchase_ap_notice': (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": task_info[self.server], @@ -386,20 +387,14 @@ def to_formation_edit_i(self, i, lo=(0, 0), skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "buy_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", diff --git a/module/activities/iveAlive.py b/module/activities/iveAlive.py index 2481f1e8c..b0e7b1fb1 100644 --- a/module/activities/iveAlive.py +++ b/module/activities/iveAlive.py @@ -260,7 +260,8 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): 'activity_fight-success-confirm': (640, 663), "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), - 'purchase_ap_notice': (919, 168), + "purchase_ap_notice": (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "activity_task-info": (task_info_x[self.server],141), @@ -365,23 +366,14 @@ def to_formation_edit_i(self, i, lo=(0, 0), skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] - img_possibles = { - "normal_task_task-info": (941, 411), - "activity_task-info": (941, 411), - } - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + img_possibles = {"normal_task_task-info": (941, 411)} + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "buy_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", diff --git a/module/activities/livelyAndJoyfulWalkingTour.py b/module/activities/livelyAndJoyfulWalkingTour.py index f2478fc76..a9e887ab1 100644 --- a/module/activities/livelyAndJoyfulWalkingTour.py +++ b/module/activities/livelyAndJoyfulWalkingTour.py @@ -260,7 +260,8 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): 'activity_fight-success-confirm': (640, 663), "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), - 'purchase_ap_notice': (919, 168), + "purchase_ap_notice": (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": task_info[self.server], @@ -360,20 +361,14 @@ def to_formation_edit_i(self, i, lo, skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "buy_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", @@ -389,6 +384,7 @@ def start_sweep(self, skip_first_screenshot=False): return "sweep_complete" + def calc_need_fight_stage(self): for i in range(1, 6): if image.compare_image(self, 'normal_task_SUB'): diff --git a/module/activities/no_68_spring_wild_dream.py b/module/activities/no_68_spring_wild_dream.py index 50f4c475a..68b56da06 100644 --- a/module/activities/no_68_spring_wild_dream.py +++ b/module/activities/no_68_spring_wild_dream.py @@ -110,7 +110,8 @@ def to_no_69_spring_wild_dream(self, region, skip_first_screenshot=False): 'activity_fight-success-confirm': (640, 663), "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), - 'purchase_ap_notice': (919, 168), + "purchase_ap_notice": (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": (1087, 141), @@ -181,20 +182,14 @@ def to_formation_edit_i(self, i, lo, skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "buy_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", @@ -210,6 +205,7 @@ def start_sweep(self, skip_first_screenshot=False): return "sweep_complete" + def to_exchange(self, skip_first_screenshot=False): img_possibles = { "activity_menu": (230, 639), diff --git a/module/activities/pleasant_Valentines_Day_in_schale.py b/module/activities/pleasant_Valentines_Day_in_schale.py index 59022a6cb..425656102 100644 --- a/module/activities/pleasant_Valentines_Day_in_schale.py +++ b/module/activities/pleasant_Valentines_Day_in_schale.py @@ -109,7 +109,8 @@ def to_pleasant_Valentines_Day_in_schale(self, region, skip_first_screenshot=Fal 'activity_fight-success-confirm': (640, 663), "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), - 'purchase_ap_notice': (919, 168), + "purchase_ap_notice": (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": (1087, 141), @@ -193,20 +194,14 @@ def to_formation_edit_i(self, i, lo, skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "buy_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", @@ -225,3 +220,4 @@ def start_sweep(self, skip_first_screenshot=False): + diff --git a/module/activities/reckless_nun_and_the_witch_in_the_old_library.py b/module/activities/reckless_nun_and_the_witch_in_the_old_library.py index cd123a776..f23896951 100644 --- a/module/activities/reckless_nun_and_the_witch_in_the_old_library.py +++ b/module/activities/reckless_nun_and_the_witch_in_the_old_library.py @@ -236,7 +236,8 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): 'activity_fight-success-confirm': (640, 663), "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), - 'purchase_ap_notice': (919, 168), + "purchase_ap_notice": (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": (1087, 141), @@ -328,20 +329,14 @@ def to_formation_edit_i(self, i, lo, skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "buy_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", @@ -355,3 +350,4 @@ def start_sweep(self, skip_first_screenshot=False): img_possibles = {"normal_task_start-sweep-notice": (765, 501)} picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) return "sweep_complete" + diff --git a/module/activities/revolutionKupalaNight.py b/module/activities/revolutionKupalaNight.py index 084661504..78245c18b 100644 --- a/module/activities/revolutionKupalaNight.py +++ b/module/activities/revolutionKupalaNight.py @@ -236,7 +236,8 @@ def to_activity(self, region, skip_first_screenshot=False, need_swipe=False): 'activity_fight-success-confirm': (640, 663), "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), - 'purchase_ap_notice': (919, 168), + "purchase_ap_notice": (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": (1087, 141), @@ -321,20 +322,14 @@ def to_formation_edit_i(self, i, lo, skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "buy_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", @@ -350,6 +345,7 @@ def start_sweep(self, skip_first_screenshot=False): return "sweep_complete" + def calc_need_fight_stage(self): for i in range(1, 6): if image.compare_image(self, 'normal_task_SUB'): diff --git a/module/activities/sakura_flowing_chaos_in_the_gala.py b/module/activities/sakura_flowing_chaos_in_the_gala.py index 8428b4486..2f58d1909 100644 --- a/module/activities/sakura_flowing_chaos_in_the_gala.py +++ b/module/activities/sakura_flowing_chaos_in_the_gala.py @@ -181,7 +181,8 @@ def to_activity(self, region, skip_first_screenshot=False): 'activity_fight-success-confirm': (640, 663), "plot_menu": (1205, 34), "plot_skip-plot-button": (1213, 116), - 'purchase_ap_notice': (919, 168), + "purchase_ap_notice": (919, 168), + 'purchase_ap_notice-localized': (919, 168), "plot_skip-plot-notice": (766, 520), "normal_task_help": (1017, 131), "normal_task_task-info": (1087, 141), @@ -280,20 +281,14 @@ def to_formation_edit_i(self, i, lo, skip_first_screenshot=False): def start_sweep(self, skip_first_screenshot=False): - rgb_ends = [ - "purchase_ap_notice", - "start_sweep_notice", - ] - rgb_possibles = { - "mission_info": (941, 411), - } img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} - res = picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) + if res == "purchase_ap_notice-localized" or res == "buy_ap_notice": return "inadequate_ap" rgb_ends = [ "skip_sweep_complete", @@ -307,3 +302,4 @@ def start_sweep(self, skip_first_screenshot=False): img_possibles = {"normal_task_start-sweep-notice": (765, 501)} picture.co_detect(self, rgb_ends, rgb_possibles, img_ends, img_possibles, skip_first_screenshot) return "sweep_complete" + diff --git a/module/clear_special_task_power.py b/module/clear_special_task_power.py index 4f2c3ca44..5e679357e 100644 --- a/module/clear_special_task_power.py +++ b/module/clear_special_task_power.py @@ -45,11 +45,12 @@ def implement(self): def start_sweep(self, skip_first_screenshot=False): img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"special_task_task-info": (941, 411)} res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice" or res == "buy_ap_notice": + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return "inadequate_ap" img_ends = [ "normal_task_skip-sweep-complete", diff --git a/module/hard_task.py b/module/hard_task.py index 0c674e7f2..2bd25eacf 100644 --- a/module/hard_task.py +++ b/module/hard_task.py @@ -63,10 +63,11 @@ def implement(self): self.logger.info("Hard task All Finished") return True + def to_hard_event(self, skip_first_screenshot=False): task_info_lo = { 'CN': (1087, 140), - 'Global': (1128,140), + 'Global': (1128, 140), 'JP': (1128, 130) } rgb_ends = 'event_hard' @@ -84,6 +85,7 @@ def to_hard_event(self, skip_first_screenshot=False): "normal_task_task-info": task_info_lo[self.server], 'normal_task_skip-sweep-complete': (643, 506), "purchase_ap_notice": (919, 165), + "purchase_ap_notice-localized": (919, 165), 'normal_task_task-finish': (1038, 662), 'normal_task_prize-confirm': (776, 655), 'normal_task_fight-confirm': (1168, 659), @@ -103,6 +105,7 @@ def to_task_info(self, x, y, skip_first_screenshot=False): ] return picture.co_detect(self, None, rgb_possibles, img_ends, None, skip_first_screenshot) + def readOneHardTask(task_string): if task_string.count('-') != 2: raise ValueError("[ " + task_string + " ] format error.") @@ -133,12 +136,13 @@ def readOneHardTask(task_string): def start_sweep(self, skip_first_screenshot=False): img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", "normal_task_charge-challenge-counts", ] img_possibles = {"normal_task_task-info": (941, 411)} res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice": + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return "inadequate_ap" if res == "normal_task_charge-challenge-counts": return "charge_challenge_counts" diff --git a/module/normal_task.py b/module/normal_task.py index 8e443b4a1..77599a7f1 100644 --- a/module/normal_task.py +++ b/module/normal_task.py @@ -125,6 +125,7 @@ def to_normal_event(self, skip_first_screenshot=False): "normal_task_unlock-notice": (887, 164), "normal_task_task-info": task_info_lo[self.server], 'normal_task_skip-sweep-complete': (643, 506), + "purchase_ap_notice-localized": (919, 165), "purchase_ap_notice": (919, 165), 'normal_task_task-finish': (1038, 662), 'normal_task_prize-confirm': (776, 655), @@ -154,11 +155,12 @@ def to_task_info(self, x, y): def start_sweep(self, skip_first_screenshot=False): img_ends = [ "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"normal_task_task-info": (941, 411)} res = picture.co_detect(self, None, None, img_ends, img_possibles, skip_first_screenshot) - if res == "purchase_ap_notice": + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": return False rgb_ends = [ "skip_sweep_complete", diff --git a/module/scrimmage.py b/module/scrimmage.py index 854c537c0..c117737ac 100644 --- a/module/scrimmage.py +++ b/module/scrimmage.py @@ -43,6 +43,7 @@ def start_sweep(self): img_ends = [ "scrimmage_purchase-scrimmage-ticket", "purchase_ap_notice", + "purchase_ap_notice-localized", "normal_task_start-sweep-notice", ] img_possibles = {"scrimmage_task-info": (932, 408)} @@ -50,7 +51,7 @@ def start_sweep(self): if res == "scrimmage_purchase-scrimmage-ticket": self.logger.warning("INADEQUATE TICKET") return "inadequate_ticket" - if res == "purchase_ap_notice": + if res == "purchase_ap_notice-localized" or res == "purchase_ap_notice": self.logger.warning("INADEQUATE AP") return "inadequate_ap" rgb_possibles = {"level_up": (640, 200)} diff --git a/src/images/CN/main_page/renewal-month-card.png b/src/images/CN/main_page/renewal-month-card.png new file mode 100644 index 000000000..6fbb3b882 Binary files /dev/null and b/src/images/CN/main_page/renewal-month-card.png differ diff --git a/src/images/CN/purchase_ap/notice-localized.png b/src/images/CN/purchase_ap/notice-localized.png new file mode 100644 index 000000000..ce7ca133d Binary files /dev/null and b/src/images/CN/purchase_ap/notice-localized.png differ diff --git a/src/images/CN/purchase_ap/notice.png b/src/images/CN/purchase_ap/notice.png index ce7ca133d..1702025de 100644 Binary files a/src/images/CN/purchase_ap/notice.png and b/src/images/CN/purchase_ap/notice.png differ diff --git a/src/images/CN/x_y_range/main_page.py b/src/images/CN/x_y_range/main_page.py index 07e4929a2..acb3f7294 100644 --- a/src/images/CN/x_y_range/main_page.py +++ b/src/images/CN/x_y_range/main_page.py @@ -16,6 +16,7 @@ 'skip-notice': (569, 309, 701, 353), 'item-expire': (428, 100, 836, 283), 'net-work-unstable': (400, 280, 880, 390), - 'privacy-policy':(260, 200, 980, 550), - 'get-character':(800, 183, 1094, 219) + 'privacy-policy': (260, 200, 980, 550), + 'get-character': (800, 183, 1094, 219), + 'renewal-month-card': (400, 420, 900, 600), } diff --git a/src/images/CN/x_y_range/purchase_ap.py b/src/images/CN/x_y_range/purchase_ap.py index 6258ca502..1de10581c 100644 --- a/src/images/CN/x_y_range/purchase_ap.py +++ b/src/images/CN/x_y_range/purchase_ap.py @@ -1,6 +1,6 @@ prefix = 'purchase_ap' path = 'purchase_ap' x_y_range = { + 'notice-localized': (500, 151, 800, 182), 'notice': (500, 151, 800, 182), - 'notice1': (500, 151, 800, 182), }