feat: 绿票、黄票、活动商店 (#12586)

* feat: 绿票、黄票商店

* i18n: EN fix

* feat: 活动商店

* perf: baseTask

* perf: 非代币关联性模板

* chore: Auto update by pre-commit hooks [skip changelog]

* perf: baseTask

* chore: sub

* chore: 修改截图

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 第一页买完之后无法进行活动商店购买

* fix: 买完皮肤、干员之后的 swipe

* chore: 修改描述

* perf: 购买商品确认next优化

* perf: 模板图复用

* chore: Auto update by pre-commit hooks [skip changelog]

* perf: 合并部分task

* fix: 代币不足

* fix: 代币不足 ocr

---------

Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
This commit is contained in:
晓丶梦丶仁
2025-05-12 21:45:19 +08:00
committed by GitHub
parent bf9312f071
commit 12d5463eeb
21 changed files with 239 additions and 5 deletions

View File

@@ -14,5 +14,64 @@
"action": "ClickSelf",
"postDelay": 2000,
"roi": [505, 57, 462, 628]
},
"SS@Store@Begin": {
"doc": "当期活动商店",
"algorithm": "JustReturn",
"next": ["SS@Store@ClickItem", "SS@Store@Swipe"]
},
"SS@Store@ClickItem": {
"action": "ClickSelf",
"doc": "匹配物品用的模板, 用roi排除最后一列",
"roi": [0, 200, 1200, 520],
"maskRange": [1, 255],
"next": ["SS@Store@ChooseMaxAmount", "SS@Store@Purchase"]
},
"SS@Store@ChooseMaxAmount": {
"roi": [986, 352, 164, 139],
"next": ["SS@Store@UnderfundedOCR", "SS@Store@Purchase"]
},
"SS@Store@UnderfundedOCR": {
"roi": [878, 397, 82, 48]
},
"SS@Store@Purchase": {
"text": ["支付"],
"roi": [772, 476, 292, 144],
"next": ["SS@Store@PurchasedConfirm", "SS@Store@RecruitSkip", "SS@Store@Underfunded"]
},
"SS@Store@Underfunded": {
"template": "ReceivedAllMail.png",
"roi": [909, 33, 166, 165],
"method": "HSVCount",
"colorScales": [[250, 255]],
"next": ["Stop"]
},
"SS@Store@RecruitSkip": {
"roi": [1143, 0, 137, 150],
"next": ["SS@Store@RecruitSkipClick"]
},
"SS@Store@RecruitSkipClick": {
"algorithm": "JustReturn",
"action": "ClickRect",
"specificRect": [1197, 23, 53, 45],
"next": ["SS@Store@RecruitSkipped", "SS@Store@RecruitSkipClick"]
},
"SS@Store@RecruitSkipped": {
"algorithm": "OcrDetect",
"text": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
"roi": [1160, 16, 97, 42],
"next": ["SS@Store@ClickItem", "SS@Store@Swipe"]
},
"SS@Store@PurchasedConfirm": {
"baseTask": "CreditShop-Bought",
"template": "CreditShop-Bought.png",
"next": ["SS@Store@PurchasedConfirm", "SS@Store@ClickItem", "SS@Store@Swipe"]
},
"SS@Store@Swipe": {
"baseTask": "SlowlySwipeToTheRight",
"postDelay": 1000,
"next": ["SS@Store@ClickItem", "#self"],
"maxTimes": 10,
"exceededNext": ["Stop"]
}
}

View File

@@ -2139,6 +2139,7 @@
"next": ["Mall@ReturnButtons#next", "Mall", "Mall@CloseAnnos#next"]
},
"Mall": {
"doc": "请同步更新 Store@EnterStore 的 template",
"template": [
"Mall.png",
"MallDark.png",
@@ -5013,5 +5014,142 @@
"Tank@UseSupportUnit-RoleSelected": {},
"Tank@UseSupportUnit-SelectRole": {},
"Warrior@UseSupportUnit-RoleSelected": {},
"Warrior@UseSupportUnit-SelectRole": {}
"Warrior@UseSupportUnit-SelectRole": {},
"Store@Begin": {
"doc": "绿票、黄票商店",
"algorithm": "JustReturn",
"next": ["Store@EnterStore", "Store@EnterTicketStore"]
},
"Store@EnterStore": {
"baseTask": "Mall",
"template": [
"Mall.png",
"MallDark.png",
"MallSami.png",
"MallMistCity.png",
"MallSiege.png",
"MallSarkaz.png",
"MallDelicious.png",
"MallGaming.png",
"MallDahuangCity.png"
],
"next": ["Store@EnterTicketStore"]
},
"Store@EnterTicketStore": {
"algorithm": "OcrDetect",
"action": "ClickSelf",
"text": ["凭证交易所"],
"roi": [730, 38, 215, 134],
"next": ["Store@ChooseTicketType"]
},
"Store@ChooseTicketType": {
"algorithm": "JustReturn",
"doc": "base_task"
},
"Store@ChooseMaxAmount": {
"algorithm": "OcrDetect",
"text": ["最多"],
"action": "ClickSelf"
},
"Store@UnderfundedOCR": {
"algorithm": "OcrDetect",
"text": ["0", "o", "O"]
},
"Store@Purchase": {
"algorithm": "OcrDetect",
"action": "ClickSelf",
"text": ["购买物品"],
"roi": [872, 556, 137, 48],
"postDelay": 1000
},
"GreenTicket@Store@ChooseTicketType": {
"algorithm": "OcrDetect",
"action": "ClickSelf",
"text": ["资质凭证区"],
"roi": [108, 163, 124, 56],
"next": ["GreenTicket@Store@ClickFirstFloor"]
},
"GreenTicket@Store@ClickFirstFloor": {
"algorithm": "OcrDetect",
"text": ["1", "T", "I"],
"action": "ClickSelf",
"roi": [263, 196, 35, 73],
"sub": ["SlowlySwipeToTheLeft"],
"postDelay": 1000,
"next": ["GreenTicket@Store@ClickItem", "GreenTicket@Store@ClickSecondFloor"]
},
"GreenTicket@Store@ClickItem": {
"template": [
"GreenTicket@Store@ClickItem_Headhunting_Permit",
"GreenTicket@Store@ClickItem_Orundum",
"GreenTicket@Store@ClickItem_LMD",
"GreenTicket@Store@ClickItem_Furniture_Part",
"GreenTicket@Store@ClickItem_Recruitment_Permit",
"GreenTicket@Store@ClickItem_Tactical_Battle_Record",
"GreenTicket@Store@ClickItem_Pure_Gold"
],
"action": "ClickSelf",
"roi": [318, 139, 956, 484],
"next": ["GreenTicket@Store@ChooseMaxAmount"]
},
"GreenTicket@Store@ChooseMaxAmount": {
"roi": [1027, 405, 79, 53],
"next": ["GreenTicket@Store@UnderfundedOCR", "GreenTicket@Store@Purchase"]
},
"GreenTicket@Store@UnderfundedOCR": {
"roi": [876, 405, 85, 51]
},
"GreenTicket@Store@Purchase": {
"next": ["GreenTicket@Store@PurchasedConfirm"]
},
"GreenTicket@Store@PurchasedConfirm": {
"baseTask": "CreditShop-Bought",
"template": "CreditShop-Bought.png",
"next": [
"GreenTicket@Store@PurchasedConfirm",
"GreenTicket@Store@ClickItem",
"GreenTicket@Store@ClickSecondFloor",
"Stop"
]
},
"GreenTicket@Store@ClickSecondFloor": {
"algorithm": "OcrDetect",
"text": ["2"],
"action": "ClickSelf",
"roi": [262, 364, 38, 58],
"maxTimes": 1,
"sub": ["SlowlySwipeToTheLeft*3"],
"postDelay": 1000,
"next": ["GreenTicket@Store@ClickItem", "Stop"]
},
"YellowTicket@Store@ChooseTicketType": {
"algorithm": "OcrDetect",
"action": "ClickSelf",
"text": ["高级凭证区"],
"roi": [108, 267, 124, 47],
"postDelay": 1000,
"next": ["YellowTicket@Store@ClickItem", "YellowTicket@Store@Swipe"]
},
"YellowTicket@Store@Swipe": {
"algorithm": "JustReturn",
"sub": ["SlowlySwipeToTheLeft*6"],
"next": ["YellowTicket@Store@ClickItem", "Stop"]
},
"YellowTicket@Store@ClickItem": {
"template": [
"YellowTicket@Store@ClickItem_Headhunting_Permit",
"YellowTicket@Store@ClickItem_Ten-roll_Headhunting_Permit"
],
"action": "ClickSelf",
"roi": [318, 139, 956, 484],
"next": ["YellowTicket@Store@Purchase"]
},
"YellowTicket@Store@Purchase": {
"next": ["YellowTicket@Store@PurchasedConfirm"]
},
"YellowTicket@Store@PurchasedConfirm": {
"baseTask": "CreditShop-Bought",
"template": "CreditShop-Bought.png",
"next": ["YellowTicket@Store@PurchasedConfirm", "YellowTicket@Store@ClickItem", "Stop"]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -175,6 +175,7 @@
<None Include="..\..\resource\tasks\Roguelike\Sami.json" />
<None Include="..\..\resource\tasks\Roguelike\Sarkaz.json" />
<None Include="..\..\resource\tasks\Stages\AS.json" />
<None Include="..\..\resource\tasks\Stages\base.json" />
<None Include="..\..\resource\tasks\Stages\BB.json" />
<None Include="..\..\resource\tasks\Stages\BP.json" />
<None Include="..\..\resource\tasks\Stages\CF.json" />
@@ -205,7 +206,6 @@
<None Include="..\..\resource\tasks\Stages\RS.json" />
<None Include="..\..\resource\tasks\Stages\SL.json" />
<None Include="..\..\resource\tasks\Stages\SN.json" />
<None Include="..\..\resource\tasks\Stages\SS.json" />
<None Include="..\..\resource\tasks\Stages\Supplies.json" />
<None Include="..\..\resource\tasks\Stages\WB.json" />
<None Include="..\..\resource\tasks\Stages\ZT.json" />

View File

@@ -277,9 +277,6 @@
<None Include="..\..\resource\tasks\Stages\SN.json">
<Filter>Resource\tasks\base\Stages</Filter>
</None>
<None Include="..\..\resource\tasks\Stages\SS.json">
<Filter>Resource\tasks\base\Stages</Filter>
</None>
<None Include="..\..\resource\tasks\Stages\Supplies.json">
<Filter>Resource\tasks\base\Stages</Filter>
</None>
@@ -703,6 +700,9 @@
<None Include="..\..\resource\tasks\Stages\MT.json">
<Filter>Resource\tasks\base\Stages</Filter>
</None>
<None Include="..\..\resource\tasks\Stages\base.json">
<Filter>Resource\tasks\base\Stages</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\AsstCaller.h">

View File

@@ -693,6 +693,12 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
<system:String x:Key="MiniGameName">Mini Game Name</system:String>
<system:String x:Key="MiniGameNameGreenGrass">Contest Channel: Green Grass City (Unofficial)</system:String>
<system:String x:Key="MiniGameNameGreenGrassTip" xml:space="preserve">Manually skip the tutorial dialogue, then you can exit directly.&#10;Start the task from the event screen (there is a 「Join Event」 button in the bottom right corner).&#10;&#10;Follow the Duck Lord's choice.</system:String>
<system:String x:Key="MiniGameNameGreenTicketStore">Green Ticket Store</system:String>
<system:String x:Key="MiniGameNameGreenTicketStoreTip" xml:space="preserve">Buy everything on the 1st floor.&#10;Buy Headhunting Permits and Recruitment Permits on the 2nd floor.</system:String>
<system:String x:Key="MiniGameNameYellowTicketStore">Yellow Ticket Store</system:String>
<system:String x:Key="MiniGameNameYellowTicketStoreTip" xml:space="preserve">Please ensure you have at least 258 yellow tickets.</system:String>
<system:String x:Key="MiniGameNameSsStore">Event Shop</system:String>
<system:String x:Key="MiniGameNameSsStoreTip" xml:space="preserve">Please start from the event shop page.&#10;Won't buy items with unlimited purchase quantities.</system:String>
<!-- !小游戏 -->
<!-- Logs -->
<system:String x:Key="Identifying">Identifying……</system:String>

View File

@@ -696,6 +696,12 @@ C:\\leidian\\LDPlayer9
<system:String x:Key="MiniGameName">ミニゲーム名</system:String>
<system:String x:Key="MiniGameNameGreenGrass">対決チャンネル:グリーングラスシティ(非公式)</system:String>
<system:String x:Key="MiniGameNameGreenGrassTip" xml:space="preserve">手動でチュートリアルの会話をスキップし、直接退出することができます。&#10;イベント画面(右下角に「イベントに参加」ボタンがあります)でタスクを開始します。&#10;&#10;ダック卿の選択をフォローする。</system:String>
<system:String x:Key="MiniGameNameGreenTicketStore">緑チケット商店</system:String>
<system:String x:Key="MiniGameNameGreenTicketStoreTip" xml:space="preserve">1階は全部購入。&#10;2階は訪問証と募集許可を購入。</system:String>
<system:String x:Key="MiniGameNameYellowTicketStore">黄チケット商店</system:String>
<system:String x:Key="MiniGameNameYellowTicketStoreTip" xml:space="preserve">少なくとも258枚の黄チケットを持っていることを確認してください。</system:String>
<system:String x:Key="MiniGameNameSsStore">イベントショップ</system:String>
<system:String x:Key="MiniGameNameSsStoreTip" xml:space="preserve">イベントのショップページからのみ始めてください。&#10;購入数量無制限のアイテムは購入しないでください。</system:String>
<!-- !小游戏 -->
<!-- Logs -->
<system:String x:Key="Identifying">認識中……</system:String>

View File

@@ -696,6 +696,12 @@ C:\\leidian\\LDPlayer9
<system:String x:Key="MiniGameName">미니 게임 이름</system:String>
<system:String x:Key="MiniGameNameGreenGrass">대결 채널: 그린그래스 시티 (비공식)</system:String>
<system:String x:Key="MiniGameNameGreenGrassTip" xml:space="preserve">튜토리얼 대화를 수동으로 건너뛴 후, 바로 종료할 수 있습니다.&#10;이벤트 메인 화면(오른쪽 아래에 「이벤트 참가」 표시 있음)에서 임무를 시작하세요.&#10;&#10;덕로드만 믿고 따라가면 손해는 없을거에요.</system:String>
<system:String x:Key="MiniGameNameGreenTicketStore">녹색 티켓 상점</system:String>
<system:String x:Key="MiniGameNameGreenTicketStoreTip" xml:space="preserve">1층은 전부 구매.&#10;2층은 방문 증서와 모집 허가를 구매.</system:String>
<system:String x:Key="MiniGameNameYellowTicketStore">황색 티켓 상점</system:String>
<system:String x:Key="MiniGameNameYellowTicketStoreTip" xml:space="preserve">최소한 258장의 노란색 티켓을 가지고 있는지 확인하세요.</system:String>
<system:String x:Key="MiniGameNameSsStore">이벤트 상점</system:String>
<system:String x:Key="MiniGameNameSsStoreTip" xml:space="preserve">이벤트 상점 페이지에서만 시작하세요.&#10;구매 수량이 무제한인 아이템은 구매하지 마세요.</system:String>
<!-- !小游戏 -->
<!-- 로그 -->
<system:String x:Key="Identifying">인식 중……</system:String>

View File

@@ -697,6 +697,12 @@ C:\\leidian\\LDPlayer9。\n
<system:String x:Key="MiniGameName">小游戏名称</system:String>
<system:String x:Key="MiniGameNameGreenGrass">争锋频道:青草城</system:String>
<system:String x:Key="MiniGameNameGreenGrassTip" xml:space="preserve">手动跳过教程对话,然后可以直接退出。&#10;在活动主界面(右下角有 「加入赛事」 处)开始任务。&#10;&#10;跟着鸭总喝口汤。</system:String>
<system:String x:Key="MiniGameNameGreenTicketStore">绿票商店</system:String>
<system:String x:Key="MiniGameNameGreenTicketStoreTip" xml:space="preserve">1层全买。&#10;2层买寻访凭证和招聘许可。</system:String>
<system:String x:Key="MiniGameNameYellowTicketStore">黄票商店</system:String>
<system:String x:Key="MiniGameNameYellowTicketStoreTip" xml:space="preserve">请确保自己至少有258张黄票。</system:String>
<system:String x:Key="MiniGameNameSsStore">活动商店</system:String>
<system:String x:Key="MiniGameNameSsStoreTip" xml:space="preserve">请在活动商店页面开始。&#10;不买无限池。</system:String>
<!-- !小游戏 -->
<!-- 日志 -->
<system:String x:Key="Identifying">正在识别……</system:String>

View File

@@ -694,6 +694,13 @@ C:\\leidian\\LDPlayer9。\n
<!-- 小游戏 -->
<system:String x:Key="MiniGameName">小遊戲名稱</system:String>
<system:String x:Key="MiniGameNameGreenGrass">爭鋒頻道:青草城</system:String>
<system:String x:Key="MiniGameNameGreenGrassTip" xml:space="preserve">手動跳過教程對話,然後可以直接退出。&#10;在活動主界面(右下角有「加入賽事」處)開始任務。&#10;&#10;跟著鴨總喝口湯。</system:String>
<system:String x:Key="MiniGameNameGreenTicketStore">綠票商店</system:String>
<system:String x:Key="MiniGameNameGreenTicketStoreTip" xml:space="preserve">1層全買。&#10;2層買尋訪憑證和招聘許可。</system:String>
<system:String x:Key="MiniGameNameYellowTicketStore">黃票商店</system:String>
<system:String x:Key="MiniGameNameYellowTicketStoreTip" xml:space="preserve">請確保自己至少有258張黃票。</system:String>
<system:String x:Key="MiniGameNameSsStore">活動商店</system:String>
<system:String x:Key="MiniGameNameSsStoreTip" xml:space="preserve">請在活動商店頁面開始。&#10;不購買無限量物品。</system:String>
<!-- !小游戏 -->
<!-- 日誌 -->
<system:String x:Key="Identifying">正在辨識……</system:String>

View File

@@ -1061,6 +1061,9 @@ namespace MaaWpfGui.ViewModels.UI
[
new() { Display = LocalizationHelper.GetString("NotSelected"), Value = "Stop" },
new() { Display = LocalizationHelper.GetString("MiniGameNameGreenGrass"), Value = "GreenGrass@DuelChannel@Begin" },
new() { Display = LocalizationHelper.GetString("MiniGameNameGreenTicketStore"), Value = "GreenTicket@Store@Begin" },
new() { Display = LocalizationHelper.GetString("MiniGameNameYellowTicketStore"), Value = "YellowTicket@Store@Begin" },
new() { Display = LocalizationHelper.GetString("MiniGameNameSsStore"), Value = "SS@Store@Begin" },
];
private string _miniGameTaskName = ConfigurationHelper.GetGlobalValue(ConfigurationKeys.MiniGameTaskName, "Stop");
@@ -1093,6 +1096,9 @@ namespace MaaWpfGui.ViewModels.UI
return name switch
{
"GreenGrass@DuelChannel@Begin" => LocalizationHelper.GetString("MiniGameNameGreenGrassTip"),
"GreenTicket@Store@Begin" => LocalizationHelper.GetString("MiniGameNameGreenTicketStoreTip"),
"YellowTicket@Store@Begin" => LocalizationHelper.GetString("MiniGameNameYellowTicketStoreTip"),
"SS@Store@Begin" => LocalizationHelper.GetString("MiniGameNameSsStoreTip"),
_ => string.Empty,
};
}