Skip to content

Commit

Permalink
fix : normal_task and hard region error
Browse files Browse the repository at this point in the history
  • Loading branch information
pur1fying committed Jul 21, 2024
1 parent 21caf68 commit a64bba6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions module/explore_normal_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def implement(self):
choose_region(self, region)
self.swipe(917, 220, 917, 552, duration=0.1, post_sleep_time=1)
normal_task_y_coordinates = [242, 341, 439, 537, 611]
to_mission_info(self, normal_task_y_coordinates[mission - 1], True)
res = to_mission_info(self, normal_task_y_coordinates[mission - 1], True)
self.stage_data = get_stage_data(region)
mission = str(region) + "-" + str(mission)
current_task_stage_data = self.stage_data[mission]
Expand Down Expand Up @@ -47,7 +47,7 @@ def implement(self):
continue
choose_region(self, region)
self.stage_data = get_stage_data(region)
for k in range(0, 13):
for k in range(0, 13): # 5 grid to walk and 8 sub task
mission = calc_need_fight_stage(self, region, self.config['explore_normal_task_force_sss'])
if mission == "ALL MISSION SWEEP AVAILABLE":
self.logger.critical("ALL MISSION AVAILABLE TO SWEEP")
Expand Down Expand Up @@ -336,9 +336,12 @@ def start_mission(self):

def to_mission_info(self, y, skip_first_screenshot=False):
rgb_possibles = {"event_normal": (1114, y), }
img_end = "normal_task_task-info"
img_possible = {'normal_task_select-area': (1114, y)}
picture.co_detect(self, None, rgb_possibles, img_end, img_possible, skip_first_screenshot)
img_end = [
"normal_task_task-info",
"normal_task_SUB",
]
return picture.co_detect(self, None, rgb_possibles, img_end, img_possible, skip_first_screenshot)


def wait_formation_change(self, force_index):
Expand Down
2 changes: 1 addition & 1 deletion module/hard_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def readOneHardTask(task_string):
if task_string.count('-') != 2:
raise ValueError("[ " + task_string + " ] format error.")
mainline_available_missions = list(range(1, 4))
mainline_available_regions = list(range(1, 26))
mainline_available_regions = list(range(1, 27))
temp = task_string.split('-')
region = temp[0]
mission = temp[1]
Expand Down
2 changes: 1 addition & 1 deletion module/normal_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def readOneNormalTask(task_string):
if task_string.count('-') != 2:
raise ValueError("[ " + task_string + " ] format error.")
mainline_available_missions = list(range(1, 6))
mainline_available_regions = list(range(5, 26))
mainline_available_regions = list(range(5, 27))
mainline_available_regions.append("tutorial")
temp = task_string.split('-')
region = temp[0]
Expand Down

0 comments on commit a64bba6

Please sign in to comment.