Skip to content

Commit

Permalink
Merge pull request #110 from shenxian66ya/master
Browse files Browse the repository at this point in the history
日服活动自动挑战关
  • Loading branch information
pur1fying committed Jul 11, 2024
2 parents 1fbda6c + c3c117d commit 15842e0
Show file tree
Hide file tree
Showing 4 changed files with 355 additions and 14 deletions.
13 changes: 7 additions & 6 deletions develop_tools/explore_task_data_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ def get_team_info():
pos = get_one_position()
teams.append([temp, pos])
cnt -= 1
valid_team_attr[char] = False
valid_team_attr[temp] = False
else:
temp = char2attr[char] + "2"
if valid_team_attr[temp]:
print("Please enter the position : ")
pos = tuple(map(int, get_input().split()))
teams.append([temp, pos])
cnt -= 1
valid_team_attr[char] = False
valid_team_attr[temp] = False
else:
print("Invalid team attribute")
continue
Expand Down Expand Up @@ -162,14 +162,15 @@ def get_actions(team_cnt):
for i in range(p_cnt):
one_action["p"].append(get_one_position())

if team_cnt > 1:
if team_cnt > 1 and one_action['t'] != 'choose_and_change':
print("Will formation number change after this action ? [y/n]")
if get_y_n():
one_action["ec"] = True
if one_action['t'] != 'choose_and_change':
print("Need wait-over after this action ? [y/n]")
if get_y_n():
one_action["wait-over"] = True

print("Need wait-over after this action ? [y/n]")
if get_y_n():
one_action["wait-over"] = True
print("please enter the desc : ")
one_action["desc"] = get_input()
print("current action : \n", one_action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def preprocess_activity_sweep_times(times):
return times


def get_stage_data():
module_path = 'src.explore_task_data.activities.iveAlive'
def get_stage_data(self):
module_path = 'src.explore_task_data.activities.' + self.current_game_activity
stage_module = importlib.import_module(module_path)
stage_data = getattr(stage_module, 'stage_data', None)
return stage_data
Expand Down Expand Up @@ -217,12 +217,10 @@ def explore_challenge(self):
self.quick_method_to_main_page()
to_activity(self, "challenge", True, True)
tasks = [
"challenge2_sss",
"challenge4_sss",
"challenge2_task",
"challenge4_task",
"challenge2_sss_task",
"challenge4_sss_task",
]
stage_data = get_stage_data()
stage_data = get_stage_data(self)
for i in range(0, len(tasks)):
data = tasks[i].split("_")
task_number = int(data[0].replace("challenge", ""))
Expand Down
3 changes: 2 additions & 1 deletion module/explore_normal_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def start_action(self, actions):
if type(op) is str:
op = [op]
if 'p' in act:
if type(act['p']) is tuple:
if type(act['p']) is tuple or (len(act['p']) == 2 and type(act['p'][0]) is int):
act['p'] = [act['p']]
skip_first_screenshot = False
for j in range(0, len(op)):
Expand Down Expand Up @@ -517,6 +517,7 @@ def common_gird_method(self, current_task_stage_data):
img_possibles = {
'normal_task_help': (1017, 131),
'normal_task_task-info': (946, 540),
'activity_task-info': (946, 540),
"plot_menu": (1205, 34),
"plot_skip-plot-button": (1213, 116),
"plot_skip-plot-notice": (766, 520),
Expand Down
Loading

0 comments on commit 15842e0

Please sign in to comment.