Skip to content

Commit

Permalink
fix explore
Browse files Browse the repository at this point in the history
  • Loading branch information
pur1fying committed Jan 5, 2024
1 parent 9ef4d81 commit 94ca87b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion module/explore_hard_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def start_action(self, actions):
self.logger.info("wait move available")
wait_over(self)
time.sleep(2)
if i != len(actions) - 1:
if i != len(actions) - 1 and 'ensure-ui' not in act:
to_normal_task_mission_operating_page(self)


Expand Down
2 changes: 1 addition & 1 deletion module/explore_normal_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def start_action(self, gk, stage_data):
self.logger.info("wait move available")
wait_over(self)
time.sleep(2)
if i != len(actions) - 1:
if i != len(actions) - 1 and 'ensure-ui' not in act:
to_normal_task_mission_operation_page(self)


Expand Down
11 changes: 10 additions & 1 deletion module/hard_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ def to_hard_event(self, skip_first_screenshot=False):
image.detect(self, end=None, possibles=possibles, pre_func=color.detect_rgb_one_time,
pre_argv=(self, click_pos, los, ["event_hard"]), skip_first_screenshot=skip_first_screenshot)
elif self.server == 'Global':
possibles = {
'normal_task_fight-complete-confirm': (1160, 666),
'normal_task_reward-acquired-confirm': (800, 660),
'normal_task_mission-conclude-confirm': (1042, 671),
}
end = [
"normal_task_select-area",
]
click_pos = [
[1077, 98],
[1186, 165],
Expand Down Expand Up @@ -168,7 +176,8 @@ def to_hard_event(self, skip_first_screenshot=False):
ends = [
"event_hard",
]
color.common_rgb_detect_method(self, click_pos, los, ends, skip_first_screenshot)
image.detect(self, end=end, possibles=possibles, pre_func=color.detect_rgb_one_time,
pre_argv=(self, click_pos, los, ends), skip_first_screenshot=skip_first_screenshot)


def to_task_info(self, x, y):
Expand Down
1 change: 1 addition & 0 deletions module/normal_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def to_normal_event(self, skip_first_screenshot=False):
image.detect(self, end=None, possibles=possibles, pre_func=color.detect_rgb_one_time,
pre_argv=(self, click_pos, los, ["event_normal"]), skip_first_screenshot=skip_first_screenshot)
elif self.server == 'Global':
print(1)
possibles = {
'normal_task_fight-complete-confirm': (1160, 666),
'normal_task_reward-acquired-confirm': (800, 660),
Expand Down
2 changes: 1 addition & 1 deletion src/explore_task_data/hard_task/hard_task_15.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
{'t': 'click', 'p': (905, 375), 'wait-over': True, 'desc': "1 right"},

{'t': 'click', 'p': (905, 380), 'ec': True, 'desc': "1 right"},
{'t': 'click', 'p': (500, 425), 'desc': "choose self"},
{'t': 'click', 'p': (500, 425), 'desc': "choose self", 'ensure-ui': False},
{'t': 'move', 'wait-over': True, 'desc': "teleport"},
{'t': 'click', 'p': (645, 155), 'desc': "2 upper right"},
{'t': 'move', 'wait-over': True, 'desc': "teleport"},
Expand Down
4 changes: 2 additions & 2 deletions src/explore_task_data/normal_task/normal_task_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'action': [
{'t': 'click', 'p': (581, 345), "desc": "upper right"},
{'t': 'move', "wait-over": True, "desc": "teleport"},
{'t': 'click', 'p': (656, 338), "desc": "choose self"},
{'t': 'click', 'p': (656, 338), "desc": "choose self", 'ensure-ui': False},
{'t': 'move', "wait-over": True, "desc": "teleport"},
{'t': 'click', 'p': (626, 380), "desc": "lower right"},
]
Expand Down Expand Up @@ -70,7 +70,7 @@
},
'action': [
{'t': 'click', 'p': (719, 474), "wait-over": True, 'desc': "right"},
{'t': 'click', 'p': (634, 452), "desc": "choose self"},
{'t': 'click', 'p': (634, 452), "desc": "choose self", 'ensure-ui': False},
{'t': 'move', "wait-over": True, "desc": "teleport"},
{'t': 'click', 'p': (524, 293), "wait-over": True, "desc": 'left'},
{'t': 'click', 'p': (419, 305), "desc": "left"}
Expand Down

0 comments on commit 94ca87b

Please sign in to comment.