Skip to content

Commit

Permalink
feat: 添加对1.4版本部分新游戏内容的支持 (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO authored Oct 24, 2023
2 parents 51655d6 + 2cf9ead commit affcf58
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 22 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions assets/resource/pipeline/activity/ThePrisonerintheCave.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"ThePrisonerintheCave": {
"next": [
"ThePrisonerintheCaveEnterTheShow",
"Sub_StartUp"
]
},
"ThePrisonerintheCaveEnterTheShow": {
"recognition": "TemplateMatch",
"template": "Combat/Activity/ThePrisonerintheCaveEnterTheShow.png",
"roi": [
880,
130,
287,
168
],
"action": "Click",
"post_wait_freezes": 1,
"next": [
"ThePrisonerintheCaveEnterTheShow",
"ThePrisonerintheCaveTheProofs"
]
},
"ThePrisonerintheCaveTheProofs": {
"recognition": "TemplateMatch",
"template": "Combat/Activity/ThePrisonerintheCaveTheProofs.png",
"roi": [
997,
296,
201,
136
],
"action": "Click",
"next": [
"ThePrisonerintheCaveTheProofs",
"ThePrisonerintheCaveTargetStageName"
]
},
"ThePrisonerintheCaveTargetStageName": {
"recognition": "OCR",
"text": [
"证明启示V"
],
"roi": [
1014,
331,
227,
144
],
"action": "Click",
"next": [
"ThePrisonerintheCaveReadyForAction"
]
},
"ThePrisonerintheCaveReadyForAction": {
"recognition": "OCR",
"text": [
"开始行动"
],
"roi": [
762,
404,
213,
149
],
"action": "Click",
"next": [
"SwitchToReplay",
"AllIn",
"OpenReplaysTimes"
]
}
}
21 changes: 20 additions & 1 deletion assets/resource/pipeline/awards.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Awards": {
"next": [
"Sub_MailBadge",
"Sub_JukeboxBadge",
"Sub_JukeboxBadge_MysteryBoxCarnival",
"Sub_DailyBadge",
"HomeFlag",
"Sub_ObtainedAwards",
Expand Down Expand Up @@ -165,6 +165,25 @@
"HomeFlag"
]
},
"Sub_JukeboxBadge_MysteryBoxCarnival": {
"is_sub": true,
"recognition": "TemplateMatch",
"template": "Awards/JukeboxBadge.png",
"roi": [
288,
0,
111,
114
],
"action": "Click",
"post_wait_freezes": 1,
"next": [
"Sub_CollectJukeboxExp",
"Sub_JukeboxAwardsBadge",
"Sub_BackButton",
"HomeFlag"
]
},
"Sub_CollectJukeboxExp": {
"is_sub": true,
"recognition": "TemplateMatch",
Expand Down
103 changes: 83 additions & 20 deletions assets/resource/pipeline/combat.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,49 +27,96 @@
"next_doc": "Set in code."
},
"MainChapter_1": {
"doc": "主线第一章 在我们的时代里",
"next": [
"MainChapter_1Enter",
"Sub_SwipeLeftForChapter"
]
},
"MainChapter_1Enter": {
"recognition": "TemplateMatch",
"template": "Combat/MainChapter_1.png",
"template": "Combat/MainChapter_1Enter.png",
"roi": [
60,
98,
318,
455
0,
90,
1280,
460
],
"action": "Click",
"next": "SwipeLeftAndFindStage"
},
"MainChapter_2": {
"doc": "主线第二章 夜色温柔",
"next": [
"MainChapter_2Enter",
"Sub_SwipeLeftForChapter"
]
},
"MainChapter_2Enter": {
"recognition": "TemplateMatch",
"template": "Combat/MainChapter_2.png",
"template": "Combat/MainChapter_2Enter.png",
"roi": [
340,
99,
310,
452
0,
90,
1280,
460
],
"action": "Click",
"next": "SwipeLeftAndFindStage"
},
"MainChapter_3": {
"doc": "主线第三章 故事一无所有",
"next": [
"MainChapter_3Enter",
"Sub_SwipeLeftForChapter"
]
},
"MainChapter_3Enter": {
"recognition": "TemplateMatch",
"template": "Combat/MainChapter_3.png",
"template": "Combat/MainChapter_3Enter.png",
"roi": [
618,
98,
313,
455
0,
90,
1280,
460
],
"action": "Click",
"next": "SwipeLeftAndFindStage"
},
"MainChapter_4": {
"doc": "主线第四章 老虎的金黄",
"next": [
"MainChapter_4Enter",
"Sub_SwipeLeftForChapter"
]
},
"MainChapter_4Enter": {
"recognition": "TemplateMatch",
"template": "Combat/MainChapter_4Enter.png",
"roi": [
0,
90,
1280,
460
],
"action": "Click",
"next": "SwipeLeftAndFindStage"
},
"MainChapter_5": {
"doc": "主线第五章 洞穴的囚徒",
"next": [
"MainChapter_5Enter",
"Sub_SwipeLeftForChapter"
]
},
"MainChapter_5Enter": {
"recognition": "TemplateMatch",
"template": "Combat/MainChapter_4.png",
"template": "Combat/MainChapter_5Enter.png",
"roi": [
897,
108,
316,
444
0,
90,
1280,
460
],
"action": "Click",
"next": "SwipeLeftAndFindStage"
Expand Down Expand Up @@ -278,6 +325,22 @@
100
]
},
"Sub_SwipeLeftForChapter": {
"is_sub": true,
"action": "Swipe",
"begin": [
100,
300,
100,
100
],
"end": [
1100,
300,
100,
100
]
},
"SwipeLeftAndFindStage": {
"next": [
"TargetStageName",
Expand Down
17 changes: 16 additions & 1 deletion source/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ json::value combat_param(int index)
difficulty = "ActivityStageDifficulty";
times = "1";
break;

case 20:
//"20. 活动:洞穴的囚徒 证明启示 05\n"
// 选择该关卡的界面UI布局不同于既有的关卡在进入章节后通过底部滑动条选择关卡,部分pipeline没有复用
chapter = "dummyThePrisonerintheCave";
stage = "dummy证明启示V";
difficulty = "dummyStageDifficulty_None";
times = "1";
break;
}

return param;
Expand Down Expand Up @@ -370,7 +379,8 @@ bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string
"16. 深林之形 06(洞悉 林)\n"
"17. 荒兽之野 06(洞悉 兽)\n"
"18. 活动:绿湖噩梦 17 艰难(活动已结束)\n"
"19. 活动:行至摩卢旁卡 16 艰难\n")
"19. 活动:行至摩卢旁卡 16 艰难(活动已结束)\n"
"20. 活动:洞穴的囚徒 证明启示 05\n")
<< std::endl
<< std::endl
<< utf8_to_crt("请输入要执行的任务序号,可自定义顺序,以空格分隔,例如 1 2 4 12 3: ") << std::endl;
Expand Down Expand Up @@ -435,6 +445,11 @@ bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string
task_obj.param = combat_param(id);
break;

case 20:
task_obj.type = "ThePrisonerintheCave";
task_obj.param = combat_param(id);
break;

default:
std::cout << "Unknown task: " << id << std::endl;
return false;
Expand Down

0 comments on commit affcf58

Please sign in to comment.