From 4d8e67c536683ff536d6b69ec6337b2e134f814b Mon Sep 17 00:00:00 2001 From: Aurora Date: Wed, 18 Feb 2026 10:26:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8Dpipeline?= =?UTF-8?q?=E8=A7=84=E5=88=99=E4=B8=BAv5=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\346\210\230\350\257\225\347\202\274.json" | 694 ++--- ...\345\212\250\346\270\270\346\210\217.json" | 275 +- .../pipeline/\345\221\250\346\234\254.json" | 1278 +++++---- .../pipeline/\345\237\272\345\273\272.json" | 2468 ++++++++--------- ...\346\213\237\345\206\233\346\274\224.json" | 399 ++- ...\350\264\271\347\244\274\345\214\205.json" | 158 +- ...\346\227\245\346\216\242\347\264\242.json" | 720 +++-- ...345\212\250-\345\244\217\346\264\273.json" | 646 +++-- ...\346\275\256\345\233\236\345\223\215.json" | 500 ++-- ...347\224\250-\346\211\253\350\215\241.json" | 11 +- .../pipeline/\351\200\232\347\224\250.json" | 559 ++-- ...\346\227\266\350\264\270\346\230\223.json" | 146 +- ...\345\217\226\345\245\226\345\212\261.json" | 892 +++--- tools/migrate_pipeline_v5.py | 797 ++++++ 14 files changed, 5155 insertions(+), 4388 deletions(-) create mode 100644 tools/migrate_pipeline_v5.py diff --git "a/assets/resource/base/pipeline/\345\216\206\346\210\230\350\257\225\347\202\274.json" "b/assets/resource/base/pipeline/\345\216\206\346\210\230\350\257\225\347\202\274.json" index ea06626..59a55bc 100644 --- "a/assets/resource/base/pipeline/\345\216\206\346\210\230\350\257\225\347\202\274.json" +++ "b/assets/resource/base/pipeline/\345\216\206\346\210\230\350\257\225\347\202\274.json" @@ -1,347 +1,347 @@ -{ - "历战试炼": { - "next": [ - "活动探索-首页-出击", - "历战试炼-关卡选择" - ], - "interrupt": "通用-返回主页" - }, - "历战试炼-关卡选择": { - "recognition": "OCR", - "expected": [ - "列表视图" - ], - "pre_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "roi": [ - 1034, - 571, - 156, - 66 - ], - "action": "Click", - "next": [ - "历战试炼-高进度(暂时为大于10)", - "历战试炼-限时boss" - ] - }, - "历战试炼-高进度(暂时为大于10)": { - "recognition": "OCR", - "expected": "^ (1 [1-9]| [2-9]d+) (.d+)?$", - "roi": [ - 374, - 207, - 23, - 25 - ], - "action": "DoNothing", - "next": "通用-返回主页" - }, - "历战试炼-限时boss": { - "recognition": "OCR", - "expected": [ - "关闭任务" - ], - "pre_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "roi": [ - 75, - 118, - 1131, - 434 - ], - "threshold": 0.7, - "action": "Click", - "next": [ - "历战试炼-boss难度选择" - ] - }, - "历战试炼-boss难度选择": { - "recognition": "TemplateMatch", - "template": "历战试炼-锁定.png", - "post_delay": 300, - "roi": [ - 269, - 588, - 554, - 78 - ], - "order_by": "Horizontal", - "index": 1, - "action": "Click", - "target": true, - "target_offset": [ - -160, - 0, - 0, - 0 - ], - "next": [ - "历战试炼-开始战斗" - ] - }, - "历战试炼-开始战斗": { - "recognition": "OCR", - "expected": "开始战斗", - "roi": [ - 902, - 581, - 319, - 81 - ], - "pre_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "action": "Click", - "next": [ - "历战试炼-开始行动" - ] - }, - "历战试炼-开始行动": { - "recognition": "OCR", - "expected": "开始行动", - "roi": [ - 915, - 614, - 316, - 85 - ], - "pre_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "action": "Click", - "next": [ - "历战试炼_战斗中" - ] - }, - "历战试炼_战斗中": { - "recognition": "TemplateMatch", - "template": "Combat/Combat_Combating.png", - "roi": [ - 1169, - 27, - 105, - 59 - ], - "rate_limit": 5000, - "timeout": 1200000, - "next": [ - "跳过boss演出动画", - "战斗_自动战斗", - "战斗_启用二倍速", - "历战试炼_战斗结束", - "历战试炼_战斗中" - ] - }, - "历战试炼_战斗结束": { - "recognition": "OCR", - "expected": [ - "等级" - ], - "roi": [ - 210, - 481, - 97, - 82 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "历战试炼-下一难度", - "历战试炼-boss挑战难度", - "历战演练-任务奖励领取", - "通用-返回主页" - ] - }, - "历战试炼-下一难度": { - "recognition": "TemplateMatch", - "template": "历战试炼-挑战锁定.png", - "roi": [ - 271, - 596, - 540, - 60 - ], - "action": "DoNothing", - "next": [ - "历战试炼-boss难度选择" - ] - }, - "历战演练-任务奖励领取": { - "recognition": "OCR", - "expected": "任务目标", - "roi": [ - 38, - 593, - 155, - 51 - ], - "action": "Click", - "post_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "next": [ - "历战演练-一键领取", - "历战演练-无奖励可领", - "历战演练-任务奖励领取" - ] - }, - "历战演练-一键领取": { - "recognition": "OCR", - "expected": "一键领取", - "roi": [ - 1025, - 86, - 154, - 57 - ], - "action": "Click", - "post_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "next": [ - "子任务_获得物品", - "通用-返回主页" - ] - }, - "历战演练-无奖励可领": { - "recognition": "TemplateMatch", - "template": "历战演练-无奖励可领.png", - "roi": [ - 1005, - 75, - 190, - 79 - ], - "next": [ - "通用-返回主页" - ] - }, - "历战试炼-boss挑战难度": { - "recognition": "OCR", - "expected": "挑战", - "roi": [ - 306, - 596, - 482, - 68 - ], - "threshold": 0.7, - "action": "Click", - "next": [ - "历战试炼-boss挑战难度-选择" - ], - "interrupt": "历战试炼-boss挑战难度-选择-右滑" - }, - "历战试炼-boss挑战难度-选择": { - "recognition": "OCR", - "expected": "1", - "pre_delay": 200, - "roi": [ - 891, - 493, - 356, - 84 - ], - "action": "Click", - "next": [ - "历战试炼-boss挑战难度-开始战斗" - ] - }, - "历战试炼-boss挑战难度-选择-右滑": { - "target": [ - 1080, - 503, - 43, - 52 - ], - "post_wait_freezes": { - "target": [ - 891, - 493, - 356, - 84 - ], - "time": 1000, - "threshold": 0.95 - } - }, - "历战试炼-boss挑战难度-开始战斗": { - "recognition": "OCR", - "expected": "开始战斗", - "roi": [ - 908, - 62, - 310, - 84 - ], - "pre_delay": 200, - "action": "Click", - "post_delay": 1000, - "next": [ - "历战试炼-boss挑战难度-开始行动" - ] - }, - "历战试炼-boss挑战难度-开始行动": { - "recognition": "OCR", - "expected": "开始行动", - "roi": [ - 915, - 614, - 316, - 85 - ], - "pre_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "action": "Click", - "next": [ - "历战试炼-boss挑战难度-战斗中" - ] - }, - "历战试炼-boss挑战难度-战斗中": { - "recognition": "TemplateMatch", - "template": "Combat/Combat_Combating.png", - "roi": [ - 1169, - 27, - 105, - 59 - ], - "rate_limit": 5000, - "timeout": 1200000, - "next": [ - "跳过boss演出动画", - "战斗_自动战斗", - "战斗_启用二倍速", - "历战试炼-boss挑战难度-战斗结束", - "历战试炼-boss挑战难度-战斗中" - ] - }, - "历战试炼-boss挑战难度-战斗结束": { - "recognition": "OCR", - "expected": [ - "等级" - ], - "roi": [ - 210, - 481, - 97, - 82 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "历战演练-任务奖励领取" - ] - } -} \ No newline at end of file +{ + "历战试炼": { + "next": [ + "活动探索-首页-出击", + "历战试炼-关卡选择", + "[JumpBack]通用-返回主页" + ] + }, + "历战试炼-关卡选择": { + "recognition": "OCR", + "expected": [ + "列表视图" + ], + "pre_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "roi": [ + 1034, + 571, + 156, + 66 + ], + "action": "Click", + "next": [ + "历战试炼-高进度(暂时为大于10)", + "历战试炼-限时boss" + ] + }, + "历战试炼-高进度(暂时为大于10)": { + "recognition": "OCR", + "expected": "^ (1 [1-9]| [2-9]d+) (.d+)?$", + "roi": [ + 374, + 207, + 23, + 25 + ], + "action": "DoNothing", + "next": ["通用-返回主页"] + }, + "历战试炼-限时boss": { + "recognition": "OCR", + "expected": [ + "关闭任务" + ], + "pre_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "roi": [ + 75, + 118, + 1131, + 434 + ], + "threshold": 0.7, + "action": "Click", + "next": [ + "历战试炼-boss难度选择" + ] + }, + "历战试炼-boss难度选择": { + "recognition": "TemplateMatch", + "template": "历战试炼-锁定.png", + "post_delay": 300, + "roi": [ + 269, + 588, + 554, + 78 + ], + "order_by": "Horizontal", + "index": 1, + "action": "Click", + "target": true, + "target_offset": [ + -160, + 0, + 0, + 0 + ], + "next": [ + "历战试炼-开始战斗" + ] + }, + "历战试炼-开始战斗": { + "recognition": "OCR", + "expected": "开始战斗", + "roi": [ + 902, + 581, + 319, + 81 + ], + "pre_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "action": "Click", + "next": [ + "历战试炼-开始行动" + ] + }, + "历战试炼-开始行动": { + "recognition": "OCR", + "expected": "开始行动", + "roi": [ + 915, + 614, + 316, + 85 + ], + "pre_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "action": "Click", + "next": [ + "历战试炼_战斗中" + ] + }, + "历战试炼_战斗中": { + "recognition": "TemplateMatch", + "template": "Combat/Combat_Combating.png", + "roi": [ + 1169, + 27, + 105, + 59 + ], + "rate_limit": 5000, + "timeout": 1200000, + "next": [ + "[JumpBack]跳过boss演出动画", + "[JumpBack]战斗_自动战斗", + "[JumpBack]战斗_启用二倍速", + "历战试炼_战斗结束", + "历战试炼_战斗中" + ] + }, + "历战试炼_战斗结束": { + "recognition": "OCR", + "expected": [ + "等级" + ], + "roi": [ + 210, + 481, + 97, + 82 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "历战试炼-下一难度", + "历战试炼-boss挑战难度", + "历战演练-任务奖励领取", + "通用-返回主页" + ] + }, + "历战试炼-下一难度": { + "recognition": "TemplateMatch", + "template": "历战试炼-挑战锁定.png", + "roi": [ + 271, + 596, + 540, + 60 + ], + "action": "DoNothing", + "next": [ + "历战试炼-boss难度选择" + ] + }, + "历战演练-任务奖励领取": { + "recognition": "OCR", + "expected": "任务目标", + "roi": [ + 38, + 593, + 155, + 51 + ], + "action": "Click", + "post_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "next": [ + "历战演练-一键领取", + "历战演练-无奖励可领", + "历战演练-任务奖励领取" + ] + }, + "历战演练-一键领取": { + "recognition": "OCR", + "expected": "一键领取", + "roi": [ + 1025, + 86, + 154, + 57 + ], + "action": "Click", + "post_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "next": [ + "[JumpBack]子任务_获得物品", + "通用-返回主页" + ] + }, + "历战演练-无奖励可领": { + "recognition": "TemplateMatch", + "template": "历战演练-无奖励可领.png", + "roi": [ + 1005, + 75, + 190, + 79 + ], + "next": [ + "通用-返回主页" + ] + }, + "历战试炼-boss挑战难度": { + "recognition": "OCR", + "expected": "挑战", + "roi": [ + 306, + 596, + 482, + 68 + ], + "threshold": 0.7, + "action": "Click", + "next": [ + "历战试炼-boss挑战难度-选择", + "[JumpBack]历战试炼-boss挑战难度-选择-右滑" + ] + }, + "历战试炼-boss挑战难度-选择": { + "recognition": "OCR", + "expected": "1", + "pre_delay": 200, + "roi": [ + 891, + 493, + 356, + 84 + ], + "action": "Click", + "next": [ + "历战试炼-boss挑战难度-开始战斗" + ] + }, + "历战试炼-boss挑战难度-选择-右滑": { + "target": [ + 1080, + 503, + 43, + 52 + ], + "post_wait_freezes": { + "target": [ + 891, + 493, + 356, + 84 + ], + "time": 1000, + "threshold": 0.95 + } + }, + "历战试炼-boss挑战难度-开始战斗": { + "recognition": "OCR", + "expected": "开始战斗", + "roi": [ + 908, + 62, + 310, + 84 + ], + "pre_delay": 200, + "action": "Click", + "post_delay": 1000, + "next": [ + "历战试炼-boss挑战难度-开始行动" + ] + }, + "历战试炼-boss挑战难度-开始行动": { + "recognition": "OCR", + "expected": "开始行动", + "roi": [ + 915, + 614, + 316, + 85 + ], + "pre_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "action": "Click", + "next": [ + "历战试炼-boss挑战难度-战斗中" + ] + }, + "历战试炼-boss挑战难度-战斗中": { + "recognition": "TemplateMatch", + "template": "Combat/Combat_Combating.png", + "roi": [ + 1169, + 27, + 105, + 59 + ], + "rate_limit": 5000, + "timeout": 1200000, + "next": [ + "[JumpBack]跳过boss演出动画", + "[JumpBack]战斗_自动战斗", + "[JumpBack]战斗_启用二倍速", + "历战试炼-boss挑战难度-战斗结束", + "历战试炼-boss挑战难度-战斗中" + ] + }, + "历战试炼-boss挑战难度-战斗结束": { + "recognition": "OCR", + "expected": [ + "等级" + ], + "roi": [ + 210, + 481, + 97, + 82 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "历战演练-任务奖励领取" + ] + } +} diff --git "a/assets/resource/base/pipeline/\345\220\257\345\212\250\346\270\270\346\210\217.json" "b/assets/resource/base/pipeline/\345\220\257\345\212\250\346\270\270\346\210\217.json" index c2e95e5..aaf62f8 100644 --- "a/assets/resource/base/pipeline/\345\220\257\345\212\250\346\270\270\346\210\217.json" +++ "b/assets/resource/base/pipeline/\345\220\257\345\212\250\346\270\270\346\210\217.json" @@ -1,138 +1,137 @@ -{ - "进入首页": { - "next": [ - "首页标志2", - "首页标志1", - "子任务_点击首页按钮", - "子任务_点击返回", - "子任务_获得物品", - "子任务_点击取消", - "子任务_点击确认", - "子任务_关闭公告", - "子任务_关闭周年公告", - "签到", - "开始游戏", - "NERI", - "启动游戏" - ] - }, - "NERI": { - "recognition": "TemplateMatch", - "template": "StartUp/NERI.png", - "roi": [ - 325, - 214, - 662, - 354 - ], - "next": [ - "下载资源", - "开始游戏", - "NERI" - ] - }, - "下载资源": { - "recognition": "OCR", - "expected": [ - "下载" - ], - "roi": [ - 859, - 645, - 78, - 54 - ], - "next": [ - "开始游戏", - "下载资源" - ] - }, - "开始游戏": { - "recognition": "OCR", - "expected": [ - "开始游戏" - ], - "roi": [ - 580, - 462, - 121, - 40 - ], - "action": "Click", - "next": [ - "首页标志1", - "子任务_关闭公告", - "子任务_关闭周年公告", - "签到", - "开始游戏" - ] - }, - "签到": { - "recognition": "OCR", - "expected": [ - "签到" - ], - "roi": [ - 1053, - 554, - 211, - 105 - ], - "action": "Click", - "next": [ - "首页标志1", - "子任务_点击首页按钮", - "子任务_点击返回", - "子任务_获得物品", - "子任务_点击取消", - "子任务_关闭公告", - "子任务_关闭周年公告", - "签到" - ] - }, - "首页标志1": { - "recognition": "OCR", - "expected": [ - "补给站" - ], - "roi": [ - 934, - 582, - 176, - 127 - ], - "post_delay": 1000, - "next": [ - "子任务_点击首页按钮", - "子任务_点击返回", - "子任务_获得物品", - "子任务_点击取消", - "子任务_关闭公告", - "签到", - "首页标志2", - "首页标志1" - ] - }, - "首页标志2": { - "recognition": "TemplateMatch", - "template": "StartUp/HomeFlag1.png", - "roi": [ - 118, - 357, - 82, - 317 - ], - "action": "Click", - "target": [ - 620, - 350, - 20, - 20 - ] - }, - "启动游戏": { - "is_sub": true, - "action": "StartApp", - "package": "com.megagame.crosscore" - } -} \ No newline at end of file +{ + "进入首页": { + "next": [ + "首页标志2", + "首页标志1", + "[JumpBack]子任务_点击首页按钮", + "[JumpBack]子任务_点击返回", + "[JumpBack]子任务_获得物品", + "[JumpBack]子任务_点击取消", + "[JumpBack]子任务_点击确认", + "[JumpBack]子任务_关闭公告", + "[JumpBack]子任务_关闭周年公告", + "签到", + "开始游戏", + "NERI", + "[JumpBack]启动游戏" + ] + }, + "NERI": { + "recognition": "TemplateMatch", + "template": "StartUp/NERI.png", + "roi": [ + 325, + 214, + 662, + 354 + ], + "next": [ + "下载资源", + "开始游戏", + "NERI" + ] + }, + "下载资源": { + "recognition": "OCR", + "expected": [ + "下载" + ], + "roi": [ + 859, + 645, + 78, + 54 + ], + "next": [ + "开始游戏", + "下载资源" + ] + }, + "开始游戏": { + "recognition": "OCR", + "expected": [ + "开始游戏" + ], + "roi": [ + 580, + 462, + 121, + 40 + ], + "action": "Click", + "next": [ + "首页标志1", + "[JumpBack]子任务_关闭公告", + "[JumpBack]子任务_关闭周年公告", + "签到", + "开始游戏" + ] + }, + "签到": { + "recognition": "OCR", + "expected": [ + "签到" + ], + "roi": [ + 1053, + 554, + 211, + 105 + ], + "action": "Click", + "next": [ + "首页标志1", + "[JumpBack]子任务_点击首页按钮", + "[JumpBack]子任务_点击返回", + "[JumpBack]子任务_获得物品", + "[JumpBack]子任务_点击取消", + "[JumpBack]子任务_关闭公告", + "[JumpBack]子任务_关闭周年公告", + "签到" + ] + }, + "首页标志1": { + "recognition": "OCR", + "expected": [ + "补给站" + ], + "roi": [ + 934, + 582, + 176, + 127 + ], + "post_delay": 1000, + "next": [ + "[JumpBack]子任务_点击首页按钮", + "[JumpBack]子任务_点击返回", + "[JumpBack]子任务_获得物品", + "[JumpBack]子任务_点击取消", + "[JumpBack]子任务_关闭公告", + "签到", + "首页标志2", + "首页标志1" + ] + }, + "首页标志2": { + "recognition": "TemplateMatch", + "template": "StartUp/HomeFlag1.png", + "roi": [ + 118, + 357, + 82, + 317 + ], + "action": "Click", + "target": [ + 620, + 350, + 20, + 20 + ] + }, + "启动游戏": { + "action": "StartApp", + "package": "com.megagame.crosscore" + } +} diff --git "a/assets/resource/base/pipeline/\345\221\250\346\234\254.json" "b/assets/resource/base/pipeline/\345\221\250\346\234\254.json" index 2af7605..816e07f 100644 --- "a/assets/resource/base/pipeline/\345\221\250\346\234\254.json" +++ "b/assets/resource/base/pipeline/\345\221\250\346\234\254.json" @@ -1,641 +1,637 @@ -{ - "WeekInstance": { - "next": [ - "首页_出击", - "子任务_进入首页" - ] - }, - "ActivityExploration": { - "recognition": "OCR", - "expected": [ - "活动探索" - ], - "roi": [ - 540, - 98, - 215, - 95 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "ActivityExploration_1", - "ActivityExploration" - ] - }, - "ActivityExploration_1": { - "recognition": "OCR", - "expected": [ - "碎星虚影" - ], - "roi": [ - 450, - 443, - 302, - 98 - ], - "action": "Click", - "post_delay": 3000, - "next": [ - "ActivityExploration_Exist", - "ActivityExploration_2", - "ActivityExploration_1" - ] - }, - "ActivityExploration_2": { - "recognition": "OCR", - "expected": [ - "戈里刻虚影" - ], - "roi": [ - 100, - 333, - 500, - 154 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "ActivityExploration_第五关", - "ActivityExploration_SwipeDown", - "ActivityExploration_2" - ] - }, - "ActivityExploration_3": { - "recognition": "OCR", - "expected": [ - "虚影阿瑞斯" - ], - "roi": [ - 653, - 204, - 180, - 55 - ], - "action": "Click", - "next": [ - "ActivityExploration_Exist", - "ActivityExploration_Start" - ] - }, - "ActivityExploration_第五关": { - "recognition": "OCR", - "expected": [ - "虚影宙斯" - ], - "roi": [ - 682, - 456, - 180, - 180 - ], - "action": "Click", - "next": [ - "ActivityExploration_Exist", - "ActivityExploration_第五关Start" - ] - }, - "ActivityExploration_Exist": { - "recognition": "OCR", - "expected": [ - "600/600", - "6007600", - "6001600" - ], - "roi": [ - 86, - 623, - 152, - 40 - ], - "action": "Click", - "target": [ - 208, - 37, - 20, - 20 - ] - }, - "ActivityExploration_Start": { - "recognition": "OCR", - "expected": [ - "开始战斗" - ], - "roi": [ - 1057, - 615, - 200, - 89 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "ActivityExploration_Comfirm", - "ActivityExploration_关闭第二队", - "ActivityExploration_Start_1", - "ActivityExploration_Start", - "ActivityExploration_Step_1" - ] - }, - "ActivityExploration_第五关Start": { - "recognition": "OCR", - "expected": [ - "开始战斗" - ], - "roi": [ - 1057, - 615, - 200, - 89 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "ActivityExploration_Comfirm", - "ActivityExploration_关闭第二队", - "ActivityExploration_第五关Start_1", - "ActivityExploration_第五关Start", - "ActivityExploration_第五关Step_1" - ] - }, - "ActivityExploration_Comfirm": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "开启" - ], - "roi": [ - 722, - 405, - 190, - 94 - ], - "action": "Click", - "post_delay": 2000 - }, - "ActivityExploration_关闭第二队": { - "is_sub": true, - "recognition": "ColorMatch", - "roi": [ - 1153, - 380, - 21, - 14 - ], - "method": 4, - "lower": [ - 220, - 180, - 60 - ], - "upper": [ - 255, - 220, - 100 - ], - "count": 1, - "action": "Click" - }, - "ActivityExploration_Start_1": { - "recognition": "OCR", - "expected": [ - "开始行动" - ], - "roi": [ - 1057, - 615, - 200, - 89 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "ActivityExploration_Step_1", - "ActivityExploration_Start_1" - ] - }, - "ActivityExploration_第五关Start_1": { - "recognition": "OCR", - "expected": [ - "开始行动" - ], - "roi": [ - 1057, - 615, - 200, - 89 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "ActivityExploration_第五关Step_1", - "ActivityExploration_第五关Start_1" - ] - }, - "ActivityExploration_Step_1": { - "recognition": "OCR", - "expected": [ - "行动" - ], - "roi": [ - 1052, - 11, - 130, - 64 - ], - "pre_delay": 2000, - "action": "Click", - "target": [ - 705, - 284, - 20, - 20 - ], - "post_delay": 3000, - "next": [ - "ActivityExploration_Step_2" - ] - }, - "ActivityExploration_第五关Step_1": { - "recognition": "OCR", - "expected": [ - "行动" - ], - "roi": [ - 1052, - 11, - 130, - 64 - ], - "pre_delay": 2000, - "action": "Click", - "target": [ - 538, - 564, - 20, - 20 - ], - "post_delay": 3000, - "next": [ - "ActivityExploration_第五关Step_2" - ] - }, - "ActivityExploration_Step_2": { - "recognition": "OCR", - "expected": [ - "行动" - ], - "roi": [ - 1052, - 11, - 130, - 64 - ], - "pre_delay": 2000, - "action": "Click", - "target": [ - 588, - 221, - 20, - 20 - ], - "post_delay": 3000, - "next": [ - "ActivityExploration_Combating1", - "ActivityExploration_Step_2" - ] - }, - "ActivityExploration_第五关Step_2": { - "recognition": "OCR", - "expected": [ - "行动" - ], - "roi": [ - 1052, - 11, - 130, - 64 - ], - "pre_delay": 2000, - "action": "Click", - "target": [ - 415, - 384, - 20, - 20 - ], - "post_delay": 3000, - "next": [ - "ActivityExploration_第五关Step_3" - ] - }, - "ActivityExploration_Step_3": { - "recognition": "OCR", - "expected": [ - "行动" - ], - "roi": [ - 1052, - 11, - 130, - 64 - ], - "pre_delay": 2000, - "action": "Click", - "target": [ - 777, - 331, - 20, - 20 - ], - "post_delay": 3000, - "next": [ - "ActivityExploration_Combating2", - "ActivityExploration_Step_3" - ] - }, - "ActivityExploration_第五关Step_3": { - "recognition": "ColorMatch", - "roi": [ - 375, - 415, - 40, - 40 - ], - "method": 4, - "lower": [ - 80, - 135, - 55 - ], - "upper": [ - 120, - 180, - 120 - ], - "count": 1, - "pre_delay": 2000, - "action": "Click", - "target": [ - 332, - 260, - 20, - 20 - ], - "post_delay": 3000, - "next": [ - "ActivityExploration_第五关Step_4" - ] - }, - "ActivityExploration_第五关Step_4": { - "recognition": "ColorMatch", - "roi": [ - 377, - 419, - 40, - 40 - ], - "method": 4, - "lower": [ - 80, - 135, - 55 - ], - "upper": [ - 120, - 180, - 120 - ], - "count": 1, - "pre_delay": 2000, - "action": "Click", - "target": [ - 503, - 295, - 20, - 20 - ], - "post_delay": 3000, - "next": [ - "ActivityExploration_第五关Step_5" - ] - }, - "ActivityExploration_Step_4": { - "recognition": "OCR", - "expected": [ - "行动" - ], - "roi": [ - 1052, - 11, - 130, - 64 - ], - "pre_delay": 2000, - "action": "Click", - "target": [ - 592, - 186, - 20, - 20 - ], - "post_delay": 3000, - "next": [ - "ActivityExploration_Step_5" - ] - }, - "ActivityExploration_第五关Step_5": { - "recognition": "ColorMatch", - "roi": [ - 808, - 291, - 40, - 40 - ], - "method": 4, - "lower": [ - 80, - 135, - 55 - ], - "upper": [ - 120, - 180, - 120 - ], - "count": 1, - "pre_delay": 2000, - "action": "Click", - "target": [ - 680, - 224, - 20, - 20 - ], - "timeout": 40000, - "next": [ - "ActivityExploration_Combating3", - "ActivityExploration_第五关Step_5" - ] - }, - "ActivityExploration_Step_5": { - "recognition": "OCR", - "expected": [ - "行动" - ], - "roi": [ - 1052, - 11, - 130, - 64 - ], - "pre_delay": 2000, - "action": "Click", - "target": [ - 592, - 186, - 20, - 20 - ], - "timeout": 40000, - "next": [ - "ActivityExploration_Combating3", - "ActivityExploration_Step_5" - ] - }, - "ActivityExploration_Combating1": { - "recognition": "TemplateMatch", - "template": "Combat/Combat_Combating.png", - "roi": [ - 1169, - 27, - 105, - 59 - ], - "next": [ - "战斗_自动战斗", - "战斗_启用二倍速", - "ActivityExploration_CombatEnd1", - "ActivityExploration_Combating1" - ] - }, - "ActivityExploration_CombatEnd1": { - "recognition": "OCR", - "expected": [ - "等级" - ], - "roi": [ - 210, - 410, - 97, - 152 - ], - "action": "Click", - "next": [ - "子任务_获得物品", - "ActivityExploration_Step_3", - "ActivityExploration_CombatEnd1" - ] - }, - "ActivityExploration_Combating2": { - "recognition": "TemplateMatch", - "template": "Combat/Combat_Combating.png", - "roi": [ - 1169, - 27, - 105, - 59 - ], - "next": [ - "战斗_自动战斗", - "战斗_启用二倍速", - "ActivityExploration_CombatEnd2", - "ActivityExploration_Combating2" - ] - }, - "ActivityExploration_CombatEnd2": { - "recognition": "OCR", - "expected": [ - "等级" - ], - "roi": [ - 210, - 410, - 97, - 152 - ], - "action": "Click", - "next": [ - "子任务_获得物品", - "ActivityExploration_Step_4", - "ActivityExploration_CombatEnd2" - ] - }, - "ActivityExploration_Combating3": { - "recognition": "TemplateMatch", - "template": "Combat/Combat_Combating.png", - "roi": [ - 1169, - 27, - 105, - 59 - ], - "next": [ - "子任务_获得物品", - "战斗_自动战斗", - "战斗_启用二倍速", - "ActivityExploration_CombatEnd3", - "ActivityExploration_Combating3" - ] - }, - "ActivityExploration_CombatEnd3": { - "recognition": "OCR", - "expected": [ - "等级" - ], - "roi": [ - 210, - 410, - 97, - 152 - ], - "action": "Click", - "next": [ - "子任务_获得物品", - "ActivityExploration_第五关", - "ActivityExploration_CombatEnd3" - ] - }, - "ActivityExploration_SwipeUp": { - "is_sub": true, - "action": "Swipe", - "begin": [ - 617, - 196, - 40, - 40 - ], - "end": [ - 617, - 385, - 40, - 40 - ] - }, - "ActivityExploration_SwipeDown": { - "is_sub": true, - "action": "Swipe", - "begin": [ - 617, - 385, - 40, - 40 - ], - "end": [ - 617, - 196, - 40, - 40 - ] - } -} +{ + "WeekInstance": { + "next": [ + "首页_出击", + "[JumpBack]子任务_进入首页" + ] + }, + "ActivityExploration": { + "recognition": "OCR", + "expected": [ + "活动探索" + ], + "roi": [ + 540, + 98, + 215, + 95 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "ActivityExploration_1", + "ActivityExploration" + ] + }, + "ActivityExploration_1": { + "recognition": "OCR", + "expected": [ + "碎星虚影" + ], + "roi": [ + 450, + 443, + 302, + 98 + ], + "action": "Click", + "post_delay": 3000, + "next": [ + "ActivityExploration_Exist", + "ActivityExploration_2", + "ActivityExploration_1" + ] + }, + "ActivityExploration_2": { + "recognition": "OCR", + "expected": [ + "戈里刻虚影" + ], + "roi": [ + 100, + 333, + 500, + 154 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "ActivityExploration_第五关", + "[JumpBack]ActivityExploration_SwipeDown", + "ActivityExploration_2" + ] + }, + "ActivityExploration_3": { + "recognition": "OCR", + "expected": [ + "虚影阿瑞斯" + ], + "roi": [ + 653, + 204, + 180, + 55 + ], + "action": "Click", + "next": [ + "ActivityExploration_Exist", + "ActivityExploration_Start" + ] + }, + "ActivityExploration_第五关": { + "recognition": "OCR", + "expected": [ + "虚影宙斯" + ], + "roi": [ + 682, + 456, + 180, + 180 + ], + "action": "Click", + "next": [ + "ActivityExploration_Exist", + "ActivityExploration_第五关Start" + ] + }, + "ActivityExploration_Exist": { + "recognition": "OCR", + "expected": [ + "600/600", + "6007600", + "6001600" + ], + "roi": [ + 86, + 623, + 152, + 40 + ], + "action": "Click", + "target": [ + 208, + 37, + 20, + 20 + ] + }, + "ActivityExploration_Start": { + "recognition": "OCR", + "expected": [ + "开始战斗" + ], + "roi": [ + 1057, + 615, + 200, + 89 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]ActivityExploration_Comfirm", + "[JumpBack]ActivityExploration_关闭第二队", + "ActivityExploration_Start_1", + "ActivityExploration_Start", + "ActivityExploration_Step_1" + ] + }, + "ActivityExploration_第五关Start": { + "recognition": "OCR", + "expected": [ + "开始战斗" + ], + "roi": [ + 1057, + 615, + 200, + 89 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]ActivityExploration_Comfirm", + "[JumpBack]ActivityExploration_关闭第二队", + "ActivityExploration_第五关Start_1", + "ActivityExploration_第五关Start", + "ActivityExploration_第五关Step_1" + ] + }, + "ActivityExploration_Comfirm": { + "recognition": "OCR", + "expected": [ + "开启" + ], + "roi": [ + 722, + 405, + 190, + 94 + ], + "action": "Click", + "post_delay": 2000 + }, + "ActivityExploration_关闭第二队": { + "recognition": "ColorMatch", + "roi": [ + 1153, + 380, + 21, + 14 + ], + "method": 4, + "lower": [ + 220, + 180, + 60 + ], + "upper": [ + 255, + 220, + 100 + ], + "count": 1, + "action": "Click" + }, + "ActivityExploration_Start_1": { + "recognition": "OCR", + "expected": [ + "开始行动" + ], + "roi": [ + 1057, + 615, + 200, + 89 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "ActivityExploration_Step_1", + "ActivityExploration_Start_1" + ] + }, + "ActivityExploration_第五关Start_1": { + "recognition": "OCR", + "expected": [ + "开始行动" + ], + "roi": [ + 1057, + 615, + 200, + 89 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "ActivityExploration_第五关Step_1", + "ActivityExploration_第五关Start_1" + ] + }, + "ActivityExploration_Step_1": { + "recognition": "OCR", + "expected": [ + "行动" + ], + "roi": [ + 1052, + 11, + 130, + 64 + ], + "pre_delay": 2000, + "action": "Click", + "target": [ + 705, + 284, + 20, + 20 + ], + "post_delay": 3000, + "next": [ + "ActivityExploration_Step_2" + ] + }, + "ActivityExploration_第五关Step_1": { + "recognition": "OCR", + "expected": [ + "行动" + ], + "roi": [ + 1052, + 11, + 130, + 64 + ], + "pre_delay": 2000, + "action": "Click", + "target": [ + 538, + 564, + 20, + 20 + ], + "post_delay": 3000, + "next": [ + "ActivityExploration_第五关Step_2" + ] + }, + "ActivityExploration_Step_2": { + "recognition": "OCR", + "expected": [ + "行动" + ], + "roi": [ + 1052, + 11, + 130, + 64 + ], + "pre_delay": 2000, + "action": "Click", + "target": [ + 588, + 221, + 20, + 20 + ], + "post_delay": 3000, + "next": [ + "ActivityExploration_Combating1", + "ActivityExploration_Step_2" + ] + }, + "ActivityExploration_第五关Step_2": { + "recognition": "OCR", + "expected": [ + "行动" + ], + "roi": [ + 1052, + 11, + 130, + 64 + ], + "pre_delay": 2000, + "action": "Click", + "target": [ + 415, + 384, + 20, + 20 + ], + "post_delay": 3000, + "next": [ + "ActivityExploration_第五关Step_3" + ] + }, + "ActivityExploration_Step_3": { + "recognition": "OCR", + "expected": [ + "行动" + ], + "roi": [ + 1052, + 11, + 130, + 64 + ], + "pre_delay": 2000, + "action": "Click", + "target": [ + 777, + 331, + 20, + 20 + ], + "post_delay": 3000, + "next": [ + "ActivityExploration_Combating2", + "ActivityExploration_Step_3" + ] + }, + "ActivityExploration_第五关Step_3": { + "recognition": "ColorMatch", + "roi": [ + 375, + 415, + 40, + 40 + ], + "method": 4, + "lower": [ + 80, + 135, + 55 + ], + "upper": [ + 120, + 180, + 120 + ], + "count": 1, + "pre_delay": 2000, + "action": "Click", + "target": [ + 332, + 260, + 20, + 20 + ], + "post_delay": 3000, + "next": [ + "ActivityExploration_第五关Step_4" + ] + }, + "ActivityExploration_第五关Step_4": { + "recognition": "ColorMatch", + "roi": [ + 377, + 419, + 40, + 40 + ], + "method": 4, + "lower": [ + 80, + 135, + 55 + ], + "upper": [ + 120, + 180, + 120 + ], + "count": 1, + "pre_delay": 2000, + "action": "Click", + "target": [ + 503, + 295, + 20, + 20 + ], + "post_delay": 3000, + "next": [ + "ActivityExploration_第五关Step_5" + ] + }, + "ActivityExploration_Step_4": { + "recognition": "OCR", + "expected": [ + "行动" + ], + "roi": [ + 1052, + 11, + 130, + 64 + ], + "pre_delay": 2000, + "action": "Click", + "target": [ + 592, + 186, + 20, + 20 + ], + "post_delay": 3000, + "next": [ + "ActivityExploration_Step_5" + ] + }, + "ActivityExploration_第五关Step_5": { + "recognition": "ColorMatch", + "roi": [ + 808, + 291, + 40, + 40 + ], + "method": 4, + "lower": [ + 80, + 135, + 55 + ], + "upper": [ + 120, + 180, + 120 + ], + "count": 1, + "pre_delay": 2000, + "action": "Click", + "target": [ + 680, + 224, + 20, + 20 + ], + "timeout": 40000, + "next": [ + "ActivityExploration_Combating3", + "ActivityExploration_第五关Step_5" + ] + }, + "ActivityExploration_Step_5": { + "recognition": "OCR", + "expected": [ + "行动" + ], + "roi": [ + 1052, + 11, + 130, + 64 + ], + "pre_delay": 2000, + "action": "Click", + "target": [ + 592, + 186, + 20, + 20 + ], + "timeout": 40000, + "next": [ + "ActivityExploration_Combating3", + "ActivityExploration_Step_5" + ] + }, + "ActivityExploration_Combating1": { + "recognition": "TemplateMatch", + "template": "Combat/Combat_Combating.png", + "roi": [ + 1169, + 27, + 105, + 59 + ], + "next": [ + "[JumpBack]战斗_自动战斗", + "[JumpBack]战斗_启用二倍速", + "ActivityExploration_CombatEnd1", + "ActivityExploration_Combating1" + ] + }, + "ActivityExploration_CombatEnd1": { + "recognition": "OCR", + "expected": [ + "等级" + ], + "roi": [ + 210, + 410, + 97, + 152 + ], + "action": "Click", + "next": [ + "[JumpBack]子任务_获得物品", + "ActivityExploration_Step_3", + "ActivityExploration_CombatEnd1" + ] + }, + "ActivityExploration_Combating2": { + "recognition": "TemplateMatch", + "template": "Combat/Combat_Combating.png", + "roi": [ + 1169, + 27, + 105, + 59 + ], + "next": [ + "[JumpBack]战斗_自动战斗", + "[JumpBack]战斗_启用二倍速", + "ActivityExploration_CombatEnd2", + "ActivityExploration_Combating2" + ] + }, + "ActivityExploration_CombatEnd2": { + "recognition": "OCR", + "expected": [ + "等级" + ], + "roi": [ + 210, + 410, + 97, + 152 + ], + "action": "Click", + "next": [ + "[JumpBack]子任务_获得物品", + "ActivityExploration_Step_4", + "ActivityExploration_CombatEnd2" + ] + }, + "ActivityExploration_Combating3": { + "recognition": "TemplateMatch", + "template": "Combat/Combat_Combating.png", + "roi": [ + 1169, + 27, + 105, + 59 + ], + "next": [ + "[JumpBack]子任务_获得物品", + "[JumpBack]战斗_自动战斗", + "[JumpBack]战斗_启用二倍速", + "ActivityExploration_CombatEnd3", + "ActivityExploration_Combating3" + ] + }, + "ActivityExploration_CombatEnd3": { + "recognition": "OCR", + "expected": [ + "等级" + ], + "roi": [ + 210, + 410, + 97, + 152 + ], + "action": "Click", + "next": [ + "[JumpBack]子任务_获得物品", + "ActivityExploration_第五关", + "ActivityExploration_CombatEnd3" + ] + }, + "ActivityExploration_SwipeUp": { + "action": "Swipe", + "begin": [ + 617, + 196, + 40, + 40 + ], + "end": [ + 617, + 385, + 40, + 40 + ] + }, + "ActivityExploration_SwipeDown": { + "action": "Swipe", + "begin": [ + 617, + 385, + 40, + 40 + ], + "end": [ + 617, + 196, + 40, + 40 + ] + } +} diff --git "a/assets/resource/base/pipeline/\345\237\272\345\273\272.json" "b/assets/resource/base/pipeline/\345\237\272\345\273\272.json" index 9b712a6..d3a6bd1 100644 --- "a/assets/resource/base/pipeline/\345\237\272\345\273\272.json" +++ "b/assets/resource/base/pipeline/\345\237\272\345\273\272.json" @@ -1,1237 +1,1231 @@ -{ - "Infrastructures": { - "next": [ - "Base", - "Infr_收取资源", - "子任务_进入首页" - ] - }, - "Infrastructures_Deal": { - "next": [ - "Base_Deal", - "Infr_DealDefaltYes", - "子任务_进入首页" - ] - }, - "Base_Deal": { - "recognition": "OCR", - "expected": [ - "基地" - ], - "roi": [ - 1020, - 619, - 167, - 93 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_收取资源_不换班", - "Infr_DealDefaltYes", - "Base_Deal" - ] - }, - "Base": { - "recognition": "TemplateMatch", - "template": "Infrastructures/Infr_JD.png", - "roi": [ - 543, - 561, - 168, - 147 - ], - "action": "Click", - "post_delay": 3000, - "next": [ - "Infr_收取资源", - "Infr_驻员状况", - "Base" - ] - }, - "Infr_收取资源": { - "recognition": "TemplateMatch", - "template": "Infrastructures/Infr_Recourse.png", - "roi": [ - 422, - 423, - 145, - 140 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "子任务_获得物品", - "Infr_驻员状况" - ] - }, - "Infr_收取资源_不换班": { - "recognition": "TemplateMatch", - "template": "Infrastructures/Infr_Recourse.png", - "roi": [ - 412, - 425, - 331, - 288 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "子任务_获得物品", - "Infr_收取资源_不换班", - "Infr_DealDefaltYes" - ] - }, - "Infr_驻员状况": { - "recognition": "OCR", - "expected": [ - "驻员", - "状况" - ], - "roi": [ - 54, - 554, - 176, - 89 - ], - "action": "Click", - "post_delay": 1000, - "next": [ - "Infr_驻员预设1", - "Infr_驻员状况" - ] - }, - "Infr_驻员预设1": { - "recognition": "OCR", - "expected": [ - "驻员", - "预设" - ], - "roi": [ - 960, - 180, - 120, - 90 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_使用", - "Infr_驻员预设2" - ] - }, - "Infr_驻员预设2": { - "recognition": "OCR", - "expected": [ - "驻员", - "预设" - ], - "roi": [ - 960, - 320, - 120, - 90 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_使用", - "Infr_驻员预设3" - ] - }, - "Infr_驻员预设3": { - "recognition": "OCR", - "expected": [ - "驻员", - "预设" - ], - "roi": [ - 960, - 460, - 120, - 90 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_使用", - "Infr_驻员预设4" - ] - }, - "Infr_驻员预设4": { - "recognition": "OCR", - "expected": [ - "驻员", - "预设" - ], - "roi": [ - 960, - 600, - 120, - 90 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_使用", - "Infr_BackButton" - ] - }, - "Infr_BackButton": { - "recognition": "TemplateMatch", - "template": "StartUp/BackButton.png", - "roi": [ - 14, - 10, - 126, - 72 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_Deal", - "Infr_Exit", - "Infr_BackButton" - ] - }, - "Infr_使用": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "使用" - ], - "roi": [ - 847, - 201, - 215, - 356 - ], - "action": "Click", - "post_delay": 2000 - }, - "Infr_GetResources": { - "recognition": "OCR", - "expected": [ - "收取资源" - ], - "roi": [ - 342, - 575, - 227, - 134 - ], - "action": "Click", - "post_delay": 1000, - "next": [ - "Infr_GetAll", - "Infr_GetResources" - ] - }, - "Infr_GetAll": { - "recognition": "OCR", - "expected": [ - "全部收取" - ], - "roi": [ - 498, - 539, - 329, - 145 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_Occupancy", - "子任务_获得物品", - "子任务_点击返回" - ] - }, - "Infr_Occupancy": { - "recognition": "ColorMatch", - "roi": [ - 678, - 629, - 32, - 36 - ], - "method": 4, - "lower": [ - 230, - 178, - 60 - ], - "upper": [ - 255, - 200, - 80 - ], - "count": 4, - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_Substitute1", - "Infr_Occupancy" - ] - }, - "Infr_Substitute1": { - "recognition": "OCR", - "expected": [ - "设施详情" - ], - "roi": [ - 240, - 77, - 188, - 75 - ], - "action": "Click", - "target": [ - 885, - 189, - 37, - 27 - ], - "next": [ - "Infr_Substitute1_0", - "Infr_Substitute1" - ] - }, - "Infr_Substitute1_0": { - "recognition": "TemplateMatch", - "template": "Infrastructures/Infr_Substitute1.png", - "roi": [ - 418, - 124, - 811, - 91 - ], - "action": "Click", - "next": [ - "Infr_Substitute1_0", - "Infr_Substitute1_1" - ] - }, - "Infr_Substitute1_1": { - "action": "Click", - "target": [ - 950, - 237, - 50, - 50 - ], - "next": [ - "Infr_Substitute1_2" - ] - }, - "Infr_Substitute1_2": { - "action": "Click", - "target": [ - 1110, - 240, - 50, - 50 - ], - "next": [ - "Infr_Substitute1_3" - ] - }, - "Infr_Substitute1_3": { - "action": "Click", - "target": [ - 473, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute1_4" - ] - }, - "Infr_Substitute1_4": { - "action": "Click", - "target": [ - 625, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute1_5" - ] - }, - "Infr_Substitute1_5": { - "action": "Click", - "target": [ - 780, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute2", - "Infr_SubstituteComfirm", - "子任务_点击返回" - ] - }, - "Infr_SubstituteComfirm": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "确定" - ], - "roi": [ - 889, - 627, - 218, - 87 - ], - "action": "Click" - }, - "Infr_Substitute2": { - "recognition": "OCR", - "expected": [ - "设施详情" - ], - "roi": [ - 240, - 77, - 188, - 75 - ], - "action": "Click", - "target": [ - 885, - 328, - 37, - 27 - ], - "next": [ - "Infr_Substitute2_0", - "Infr_Substitute2" - ] - }, - "Infr_Substitute2_0": { - "recognition": "TemplateMatch", - "template": "Infrastructures/Infr_Substitute1.png", - "roi": [ - 418, - 124, - 811, - 91 - ], - "action": "Click", - "next": [ - "Infr_Substitute2_0", - "Infr_Substitute2_1" - ] - }, - "Infr_Substitute2_1": { - "action": "Click", - "target": [ - 950, - 237, - 50, - 50 - ], - "next": [ - "Infr_Substitute2_2" - ] - }, - "Infr_Substitute2_2": { - "action": "Click", - "target": [ - 1110, - 240, - 50, - 50 - ], - "next": [ - "Infr_Substitute2_3" - ] - }, - "Infr_Substitute2_3": { - "action": "Click", - "target": [ - 473, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute2_4" - ] - }, - "Infr_Substitute2_4": { - "action": "Click", - "target": [ - 625, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute2_5" - ] - }, - "Infr_Substitute2_5": { - "action": "Click", - "target": [ - 780, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute3", - "Infr_SubstituteComfirm", - "子任务_点击返回" - ] - }, - "Infr_Substitute3": { - "recognition": "OCR", - "expected": [ - "设施详情" - ], - "roi": [ - 240, - 77, - 188, - 75 - ], - "action": "Click", - "target": [ - 702, - 468, - 37, - 27 - ], - "next": [ - "Infr_Substitute3_0", - "Infr_Substitute3" - ] - }, - "Infr_Substitute3_0": { - "recognition": "TemplateMatch", - "template": "Infrastructures/Infr_Substitute1.png", - "roi": [ - 418, - 124, - 811, - 91 - ], - "action": "Click", - "next": [ - "Infr_Substitute3_0", - "Infr_Substitute3_1" - ] - }, - "Infr_Substitute3_1": { - "action": "Click", - "target": [ - 473, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute3_2" - ] - }, - "Infr_Substitute3_2": { - "action": "Click", - "target": [ - 625, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute3_3" - ] - }, - "Infr_Substitute3_3": { - "action": "Click", - "target": [ - 789, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute3_4" - ] - }, - "Infr_Substitute3_4": { - "action": "Click", - "target": [ - 950, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute3_5" - ] - }, - "Infr_Substitute3_5": { - "action": "Click", - "target": [ - 1100, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute4_0" - ] - }, - "Infr_Substitute4_0": { - "action": "Swipe", - "begin": [ - 890, - 610, - 4, - 4 - ], - "end": [ - 890, - 298, - 4, - 4 - ], - "duration": 3000, - "next": [ - "Infr_Substitute4_1" - ] - }, - "Infr_Substitute4_1": { - "action": "Click", - "target": [ - 473, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute4_2" - ] - }, - "Infr_Substitute4_2": { - "action": "Click", - "target": [ - 625, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute4_3" - ] - }, - "Infr_Substitute4_3": { - "action": "Click", - "target": [ - 789, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute4_4" - ] - }, - "Infr_Substitute4_4": { - "action": "Click", - "target": [ - 950, - 496, - 50, - 50 - ], - "next": [ - "Infr_Substitute4_5" - ] - }, - "Infr_Substitute4_5": { - "action": "Click", - "target": [ - 1100, - 496, - 50, - 50 - ], - "next": [ - "Infr_SubstituteComfirm", - "Infr_Deal", - "Infr_Exit", - "子任务_点击返回" - ] - }, - "Infr_Exit": { - "recognition": "OCR", - "expected": [ - "研发中心" - ], - "roi": [ - 523, - 282, - 155, - 51 - ], - "post_delay": 2000, - "next": [ - "进入首页" - ] - }, - "Infr_Deal": { - "enabled": true, - "recognition": "TemplateMatch", - "template": "Infrastructures/Infr_Deal.png", - "roi": [ - 980, - 225, - 263, - 235 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_制作素材", - "Infr_DealmySelf", - "Infr_Deal" - ] - }, - "Infr_DealDefaltYes": { - "recognition": "TemplateMatch", - "template": "Infrastructures/Infr_Deal.png", - "roi": [ - 980, - 225, - 263, - 235 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Infr_行星指挥部_返回", - "Infr_DealDefaltYes", - "Infr_制作素材" - ] - }, - "Infr_DealmySelf": { - "post_wait_freezes": { - "time": 2000, - "threshold": 0.95 - }, - "next": [ - "Infr_DealSelf1", - "Infr_DealSelf2", - "Infr_DealSelf3", - "Infr_DealNextFriends", - "通用-返回主页" - ] - }, - "Infr_Dealothers": { - "post_wait_freezes": { - "time": 2000, - "threshold": 0.95 - }, - "next": [ - "Infr_DealNextFriends_End", - "Infr_DealSelf1", - "Infr_DealSelf2", - "Infr_DealSelf3", - "Infr_DealNextFriends_VisitNext" - ], - "on_error": "通用-返回主页" - }, - "Infr_DealSelf1": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": [ - "InfrastructureS/构建订单3.png", - "InfrastructureS/构建订单1.png", - "InfrastructureS/构建订单4.png" - ], - "threshold": 0.90, - "roi": [ - 272, - 89, - 909, - 603 - ], - "action": "Click", - "target": true, - "target_offset": [ - 90, - 128, - -90, - -128 - ], - "post_delay": 1000, - "next": [ - "Infr_DealSelf_Yes", - "Infr_DealSelf_No", - "子任务_获得物品", - "Infr_1号物品售罄" - ] - }, - "Infr_DealSelf2": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "InfrastructureS/星币120000.png", - "threshold": 0.95, - "roi": [ - 272, - 89, - 909, - 603 - ], - "action": "Click", - "target": true, - "target_offset": [ - 90, - 128, - -90, - -128 - ], - "post_delay": 1000, - "next": [ - "Infr_DealSelf_Yes", - "Infr_DealSelf_No", - "子任务_获得物品", - "Infr_2号物品售罄" - ] - }, - "Infr_DealSelf3": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "InfrastructureS/经验120000.png", - "threshold": 0.95, - "roi": [ - 272, - 89, - 909, - 603 - ], - "action": "Click", - "target": true, - "target_offset": [ - 90, - 128, - -90, - -128 - ], - "post_delay": 1000, - "next": [ - "Infr_DealSelf_Yes", - "Infr_DealSelf_No", - "子任务_获得物品", - "Infr_3号物品售罄" - ] - }, - "Infr_1号物品售罄": { - "recognition": "ColorMatch", - "roi": "Infr_DealSelf1", - "method": 4, - "lower": [ - 0, - 0, - 0 - ], - "upper": [ - 50, - 50, - 50 - ], - "count": 300 - }, - "Infr_2号物品售罄": { - "recognition": "ColorMatch", - "roi": "Infr_DealSelf2", - "method": 4, - "lower": [ - 0, - 0, - 0 - ], - "upper": [ - 50, - 50, - 50 - ], - "count": 100 - }, - "Infr_3号物品售罄": { - "recognition": "ColorMatch", - "roi": "Infr_DealSelf3", - "method": 4, - "lower": [ - 0, - 0, - 0 - ], - "upper": [ - 50, - 50, - 50 - ], - "count": 100 - }, - "Infr_DealSelf_Yes": { - "recognition": "OCR", - "expected": [ - "是否确认提交订单" - ], - "roi": [ - 489, - 277, - 340, - 126 - ], - "pre_wait_freezes": 100, - "action": "Click", - "post_delay": 1000, - "target": [ - 767, - 428, - 70, - 36 - ] - }, - "Infr_DealSelf_No": { - "recognition": "OCR", - "expected": [ - "订单兑换", - "是否进行合成" - ], - "roi": [ - 392, - 261, - 543, - 154 - ], - "pre_wait_freezes": 100, - "action": "Click", - "post_delay": 1000, - "target": [ - 447, - 431, - 65, - 36 - ] - }, - "Infr_DealNextFriends": { - "recognition": "TemplateMatch", - "template": "好友交付记录.png", - "roi": [ - 75, - 474, - 106, - 76 - ], - "action": "Click", - "target": [ - 96, - 607, - 62, - 56 - ], - "post_delay": 1000, - "next": [ - "Infr_DealNextFriends1", - "Infr_DealNextFriends" - ] - }, - "Infr_DealNextFriends1": { - "recognition": "OCR", - "expected": [ - "好友列表" - ], - "roi": [ - 173, - 126, - 229, - 80 - ], - "action": "Click", - "target": [ - 276, - 497, - 136, - 37 - ], - "post_delay": 1000, - "next": [ - "Infr_Dealothers", - "Infr_DealNextFriends1" - ] - }, - "Infr_DealNextFriends_VisitNext": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "向右箭头.png", - "roi": [ - 92, - 595, - 134, - 82 - ], - "action": "Click" - }, - "Infr_DealNextFriends_End": { - "recognition": "TemplateMatch", - "template": "好友交付记录.png", - "roi": [ - 75, - 474, - 106, - 76 - ], - "threshold": 0.9, - "post_delay": 1000, - "next": [ - "通用-返回主页" - ] - }, - "Infr_制作素材": { - "recognition": "OCR", - "expected": [ - "制作素材" - ], - "roi": [ - 42, - 99, - 108, - 34 - ], - "action": "Click", - "post_delay": 1000, - "target": [ - 53, - 358, - 79, - 73 - ], - "next": [ - "Infr_制作素材", - "Infr_制作素材_材料不足", - "Infr_制作素材_材料充足" - ] - }, - "Infr_制作素材_材料充足": { - "recognition": "ColorMatch", - "roi": [ - 461, - 520, - 85, - 28 - ], - "lower": [ - 59, - 65, - 74 - ], - "upper": [ - 99, - 97, - 107 - ], - "action": "Click", - "post_delay": 2000, - "target": [ - 272, - 525, - 145, - 140 - ], - "next": [ - "Infr_制作素材_材料充足_合成", - "Infr_制作素材_材料充足" - ] - }, - "Infr_制作素材_材料不足": { - "recognition": "ColorMatch", - "roi": [ - 461, - 520, - 85, - 28 - ], - "lower": [ - 33, - 20, - 33 - ], - "upper": [ - 57, - 32, - 49 - ], - "post_delay": 1000, - "next": [ - "Infr_制作素材_返回" - ] - }, - "Infr_制作素材_材料充足_合成": { - "recognition": "OCR", - "expected": [ - "合成份数" - ], - "roi": [ - 901, - 95, - 106, - 33 - ], - "action": "Click", - "post_delay": 1000, - "target": [ - 1159, - 342, - 67, - 33 - ], - "next": [ - "Infr_制作素材_材料充足_最大", - "Infr_制作素材_材料充足_合成" - ] - }, - "Infr_制作素材_材料充足_最大": { - "recognition": "ColorMatch", - "roi": [ - 414, - 308, - 405, - 107 - ], - "lower": [ - 33, - 20, - 33 - ], - "upper": [ - 57, - 32, - 49 - ], - "post_delay": 1000, - "next": [ - "Infr_制作素材_材料充足_确定" - ] - }, - "Infr_制作素材_材料充足_确定": { - "recognition": "OCR", - "expected": [ - "合成份数" - ], - "roi": [ - 896, - 94, - 111, - 35 - ], - "action": "Click", - "post_delay": 1000, - "target": [ - 1020, - 603, - 90, - 39 - ], - "next": [ - "子任务_获得物品", - "Infr_制作素材_合成_返回" - ] - }, - "Infr_制作素材_合成_返回": { - "action": "Click", - "recognition": "TemplateMatch", - "template": [ - "合成菜单.png" - ], - "roi": [ - 274, - 97, - 88, - 27 - ], - "target": [ - 44, - 29, - 120, - 39 - ], - "post_delay": 1000, - "next": [ - "子任务_获得物品", - "Infr_制作素材_返回", - "Infr_换取页面", - "Infr_制作素材_合成_返回" - ] - }, - "Infr_制作素材_返回": { - "action": "Click", - "recognition": "TemplateMatch", - "template": [ - "InfrastructureS/Infr_JDSC.png" - ], - "roi": [ - 1, - 458, - 235, - 104 - ], - "target": [ - 44, - 29, - 120, - 39 - ], - "post_delay": 1000, - "next": [ - "Infr_换取页面", - "Infr_制作素材_返回" - ] - }, - "Infr_换取页面": { - "recognition": "OCR", - "expected": [ - "制作素材" - ], - "roi": [ - 44, - 44, - 100, - 100 - ], - "post_delay": 1000, - "next": [ - "Infr_DealmySelf" - ] - }, - "Infr_行星指挥部_返回": { - "recognition": "OCR", - "expected": [ - "行星指挥部" - ], - "roi": [ - 137, - 105, - 143, - 35 - ], - "action": "Click", - "post_delay": 1000, - "target": [ - 52, - 24, - 102, - 43 - ], - "next": [ - "Infr_DealDefaltYes", - "Infr_行星指挥部_返回" - ] - } -} \ No newline at end of file +{ + "Infrastructures": { + "next": [ + "Base", + "Infr_收取资源", + "[JumpBack]子任务_进入首页" + ] + }, + "Infrastructures_Deal": { + "next": [ + "Base_Deal", + "Infr_DealDefaltYes", + "[JumpBack]子任务_进入首页" + ] + }, + "Base_Deal": { + "recognition": "OCR", + "expected": [ + "基地" + ], + "roi": [ + 1020, + 619, + 167, + 93 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "Infr_收取资源_不换班", + "Infr_DealDefaltYes", + "Base_Deal" + ] + }, + "Base": { + "recognition": "TemplateMatch", + "template": "Infrastructures/Infr_JD.png", + "roi": [ + 543, + 561, + 168, + 147 + ], + "action": "Click", + "post_delay": 3000, + "next": [ + "Infr_收取资源", + "Infr_驻员状况", + "Base" + ] + }, + "Infr_收取资源": { + "recognition": "TemplateMatch", + "template": "Infrastructures/Infr_Recourse.png", + "roi": [ + 422, + 423, + 145, + 140 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]子任务_获得物品", + "Infr_驻员状况" + ] + }, + "Infr_收取资源_不换班": { + "recognition": "TemplateMatch", + "template": "Infrastructures/Infr_Recourse.png", + "roi": [ + 412, + 425, + 331, + 288 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]子任务_获得物品", + "Infr_收取资源_不换班", + "Infr_DealDefaltYes" + ] + }, + "Infr_驻员状况": { + "recognition": "OCR", + "expected": [ + "驻员", + "状况" + ], + "roi": [ + 54, + 554, + 176, + 89 + ], + "action": "Click", + "post_delay": 1000, + "next": [ + "Infr_驻员预设1", + "Infr_驻员状况" + ] + }, + "Infr_驻员预设1": { + "recognition": "OCR", + "expected": [ + "驻员", + "预设" + ], + "roi": [ + 960, + 180, + 120, + 90 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]Infr_使用", + "Infr_驻员预设2" + ] + }, + "Infr_驻员预设2": { + "recognition": "OCR", + "expected": [ + "驻员", + "预设" + ], + "roi": [ + 960, + 320, + 120, + 90 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]Infr_使用", + "Infr_驻员预设3" + ] + }, + "Infr_驻员预设3": { + "recognition": "OCR", + "expected": [ + "驻员", + "预设" + ], + "roi": [ + 960, + 460, + 120, + 90 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]Infr_使用", + "Infr_驻员预设4" + ] + }, + "Infr_驻员预设4": { + "recognition": "OCR", + "expected": [ + "驻员", + "预设" + ], + "roi": [ + 960, + 600, + 120, + 90 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]Infr_使用", + "Infr_BackButton" + ] + }, + "Infr_BackButton": { + "recognition": "TemplateMatch", + "template": "StartUp/BackButton.png", + "roi": [ + 14, + 10, + 126, + 72 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "Infr_Deal", + "Infr_Exit", + "Infr_BackButton" + ] + }, + "Infr_使用": { + "recognition": "OCR", + "expected": [ + "使用" + ], + "roi": [ + 847, + 201, + 215, + 356 + ], + "action": "Click", + "post_delay": 2000 + }, + "Infr_GetResources": { + "recognition": "OCR", + "expected": [ + "收取资源" + ], + "roi": [ + 342, + 575, + 227, + 134 + ], + "action": "Click", + "post_delay": 1000, + "next": [ + "Infr_GetAll", + "Infr_GetResources" + ] + }, + "Infr_GetAll": { + "recognition": "OCR", + "expected": [ + "全部收取" + ], + "roi": [ + 498, + 539, + 329, + 145 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "Infr_Occupancy", + "[JumpBack]子任务_获得物品", + "[JumpBack]子任务_点击返回" + ] + }, + "Infr_Occupancy": { + "recognition": "ColorMatch", + "roi": [ + 678, + 629, + 32, + 36 + ], + "method": 4, + "lower": [ + 230, + 178, + 60 + ], + "upper": [ + 255, + 200, + 80 + ], + "count": 4, + "action": "Click", + "post_delay": 2000, + "next": [ + "Infr_Substitute1", + "Infr_Occupancy" + ] + }, + "Infr_Substitute1": { + "recognition": "OCR", + "expected": [ + "设施详情" + ], + "roi": [ + 240, + 77, + 188, + 75 + ], + "action": "Click", + "target": [ + 885, + 189, + 37, + 27 + ], + "next": [ + "Infr_Substitute1_0", + "Infr_Substitute1" + ] + }, + "Infr_Substitute1_0": { + "recognition": "TemplateMatch", + "template": "Infrastructures/Infr_Substitute1.png", + "roi": [ + 418, + 124, + 811, + 91 + ], + "action": "Click", + "next": [ + "Infr_Substitute1_0", + "Infr_Substitute1_1" + ] + }, + "Infr_Substitute1_1": { + "action": "Click", + "target": [ + 950, + 237, + 50, + 50 + ], + "next": [ + "Infr_Substitute1_2" + ] + }, + "Infr_Substitute1_2": { + "action": "Click", + "target": [ + 1110, + 240, + 50, + 50 + ], + "next": [ + "Infr_Substitute1_3" + ] + }, + "Infr_Substitute1_3": { + "action": "Click", + "target": [ + 473, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute1_4" + ] + }, + "Infr_Substitute1_4": { + "action": "Click", + "target": [ + 625, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute1_5" + ] + }, + "Infr_Substitute1_5": { + "action": "Click", + "target": [ + 780, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute2", + "[JumpBack]Infr_SubstituteComfirm", + "[JumpBack]子任务_点击返回" + ] + }, + "Infr_SubstituteComfirm": { + "recognition": "OCR", + "expected": [ + "确定" + ], + "roi": [ + 889, + 627, + 218, + 87 + ], + "action": "Click" + }, + "Infr_Substitute2": { + "recognition": "OCR", + "expected": [ + "设施详情" + ], + "roi": [ + 240, + 77, + 188, + 75 + ], + "action": "Click", + "target": [ + 885, + 328, + 37, + 27 + ], + "next": [ + "Infr_Substitute2_0", + "Infr_Substitute2" + ] + }, + "Infr_Substitute2_0": { + "recognition": "TemplateMatch", + "template": "Infrastructures/Infr_Substitute1.png", + "roi": [ + 418, + 124, + 811, + 91 + ], + "action": "Click", + "next": [ + "Infr_Substitute2_0", + "Infr_Substitute2_1" + ] + }, + "Infr_Substitute2_1": { + "action": "Click", + "target": [ + 950, + 237, + 50, + 50 + ], + "next": [ + "Infr_Substitute2_2" + ] + }, + "Infr_Substitute2_2": { + "action": "Click", + "target": [ + 1110, + 240, + 50, + 50 + ], + "next": [ + "Infr_Substitute2_3" + ] + }, + "Infr_Substitute2_3": { + "action": "Click", + "target": [ + 473, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute2_4" + ] + }, + "Infr_Substitute2_4": { + "action": "Click", + "target": [ + 625, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute2_5" + ] + }, + "Infr_Substitute2_5": { + "action": "Click", + "target": [ + 780, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute3", + "[JumpBack]Infr_SubstituteComfirm", + "[JumpBack]子任务_点击返回" + ] + }, + "Infr_Substitute3": { + "recognition": "OCR", + "expected": [ + "设施详情" + ], + "roi": [ + 240, + 77, + 188, + 75 + ], + "action": "Click", + "target": [ + 702, + 468, + 37, + 27 + ], + "next": [ + "Infr_Substitute3_0", + "Infr_Substitute3" + ] + }, + "Infr_Substitute3_0": { + "recognition": "TemplateMatch", + "template": "Infrastructures/Infr_Substitute1.png", + "roi": [ + 418, + 124, + 811, + 91 + ], + "action": "Click", + "next": [ + "Infr_Substitute3_0", + "Infr_Substitute3_1" + ] + }, + "Infr_Substitute3_1": { + "action": "Click", + "target": [ + 473, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute3_2" + ] + }, + "Infr_Substitute3_2": { + "action": "Click", + "target": [ + 625, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute3_3" + ] + }, + "Infr_Substitute3_3": { + "action": "Click", + "target": [ + 789, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute3_4" + ] + }, + "Infr_Substitute3_4": { + "action": "Click", + "target": [ + 950, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute3_5" + ] + }, + "Infr_Substitute3_5": { + "action": "Click", + "target": [ + 1100, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute4_0" + ] + }, + "Infr_Substitute4_0": { + "action": "Swipe", + "begin": [ + 890, + 610, + 4, + 4 + ], + "end": [ + 890, + 298, + 4, + 4 + ], + "duration": 3000, + "next": [ + "Infr_Substitute4_1" + ] + }, + "Infr_Substitute4_1": { + "action": "Click", + "target": [ + 473, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute4_2" + ] + }, + "Infr_Substitute4_2": { + "action": "Click", + "target": [ + 625, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute4_3" + ] + }, + "Infr_Substitute4_3": { + "action": "Click", + "target": [ + 789, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute4_4" + ] + }, + "Infr_Substitute4_4": { + "action": "Click", + "target": [ + 950, + 496, + 50, + 50 + ], + "next": [ + "Infr_Substitute4_5" + ] + }, + "Infr_Substitute4_5": { + "action": "Click", + "target": [ + 1100, + 496, + 50, + 50 + ], + "next": [ + "[JumpBack]Infr_SubstituteComfirm", + "Infr_Deal", + "Infr_Exit", + "[JumpBack]子任务_点击返回" + ] + }, + "Infr_Exit": { + "recognition": "OCR", + "expected": [ + "研发中心" + ], + "roi": [ + 523, + 282, + 155, + 51 + ], + "post_delay": 2000, + "next": [ + "进入首页" + ] + }, + "Infr_Deal": { + "enabled": true, + "recognition": "TemplateMatch", + "template": "Infrastructures/Infr_Deal.png", + "roi": [ + 980, + 225, + 263, + 235 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "Infr_制作素材", + "Infr_DealmySelf", + "Infr_Deal" + ] + }, + "Infr_DealDefaltYes": { + "recognition": "TemplateMatch", + "template": "Infrastructures/Infr_Deal.png", + "roi": [ + 980, + 225, + 263, + 235 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "Infr_行星指挥部_返回", + "Infr_DealDefaltYes", + "Infr_制作素材" + ] + }, + "Infr_DealmySelf": { + "post_wait_freezes": { + "time": 2000, + "threshold": 0.95 + }, + "next": [ + "[JumpBack]Infr_DealSelf1", + "[JumpBack]Infr_DealSelf2", + "[JumpBack]Infr_DealSelf3", + "Infr_DealNextFriends", + "通用-返回主页" + ] + }, + "Infr_Dealothers": { + "post_wait_freezes": { + "time": 2000, + "threshold": 0.95 + }, + "next": [ + "Infr_DealNextFriends_End", + "[JumpBack]Infr_DealSelf1", + "[JumpBack]Infr_DealSelf2", + "[JumpBack]Infr_DealSelf3", + "[JumpBack]Infr_DealNextFriends_VisitNext" + ], + "on_error": ["通用-返回主页"] + }, + "Infr_DealSelf1": { + "recognition": "TemplateMatch", + "template": [ + "InfrastructureS/构建订单3.png", + "InfrastructureS/构建订单1.png", + "InfrastructureS/构建订单4.png" + ], + "threshold": 0.90, + "roi": [ + 272, + 89, + 909, + 603 + ], + "action": "Click", + "target": true, + "target_offset": [ + 90, + 128, + -90, + -128 + ], + "post_delay": 1000, + "next": [ + "Infr_DealSelf_Yes", + "Infr_DealSelf_No", + "[JumpBack]子任务_获得物品", + "Infr_1号物品售罄" + ] + }, + "Infr_DealSelf2": { + "recognition": "TemplateMatch", + "template": "InfrastructureS/星币120000.png", + "threshold": 0.95, + "roi": [ + 272, + 89, + 909, + 603 + ], + "action": "Click", + "target": true, + "target_offset": [ + 90, + 128, + -90, + -128 + ], + "post_delay": 1000, + "next": [ + "Infr_DealSelf_Yes", + "Infr_DealSelf_No", + "[JumpBack]子任务_获得物品", + "Infr_2号物品售罄" + ] + }, + "Infr_DealSelf3": { + "recognition": "TemplateMatch", + "template": "InfrastructureS/经验120000.png", + "threshold": 0.95, + "roi": [ + 272, + 89, + 909, + 603 + ], + "action": "Click", + "target": true, + "target_offset": [ + 90, + 128, + -90, + -128 + ], + "post_delay": 1000, + "next": [ + "Infr_DealSelf_Yes", + "Infr_DealSelf_No", + "[JumpBack]子任务_获得物品", + "Infr_3号物品售罄" + ] + }, + "Infr_1号物品售罄": { + "recognition": "ColorMatch", + "roi": "Infr_DealSelf1", + "method": 4, + "lower": [ + 0, + 0, + 0 + ], + "upper": [ + 50, + 50, + 50 + ], + "count": 300 + }, + "Infr_2号物品售罄": { + "recognition": "ColorMatch", + "roi": "Infr_DealSelf2", + "method": 4, + "lower": [ + 0, + 0, + 0 + ], + "upper": [ + 50, + 50, + 50 + ], + "count": 100 + }, + "Infr_3号物品售罄": { + "recognition": "ColorMatch", + "roi": "Infr_DealSelf3", + "method": 4, + "lower": [ + 0, + 0, + 0 + ], + "upper": [ + 50, + 50, + 50 + ], + "count": 100 + }, + "Infr_DealSelf_Yes": { + "recognition": "OCR", + "expected": [ + "是否确认提交订单" + ], + "roi": [ + 489, + 277, + 340, + 126 + ], + "pre_wait_freezes": 100, + "action": "Click", + "post_delay": 1000, + "target": [ + 767, + 428, + 70, + 36 + ] + }, + "Infr_DealSelf_No": { + "recognition": "OCR", + "expected": [ + "订单兑换", + "是否进行合成" + ], + "roi": [ + 392, + 261, + 543, + 154 + ], + "pre_wait_freezes": 100, + "action": "Click", + "post_delay": 1000, + "target": [ + 447, + 431, + 65, + 36 + ] + }, + "Infr_DealNextFriends": { + "recognition": "TemplateMatch", + "template": "好友交付记录.png", + "roi": [ + 75, + 474, + 106, + 76 + ], + "action": "Click", + "target": [ + 96, + 607, + 62, + 56 + ], + "post_delay": 1000, + "next": [ + "Infr_DealNextFriends1", + "Infr_DealNextFriends" + ] + }, + "Infr_DealNextFriends1": { + "recognition": "OCR", + "expected": [ + "好友列表" + ], + "roi": [ + 173, + 126, + 229, + 80 + ], + "action": "Click", + "target": [ + 276, + 497, + 136, + 37 + ], + "post_delay": 1000, + "next": [ + "Infr_Dealothers", + "Infr_DealNextFriends1" + ] + }, + "Infr_DealNextFriends_VisitNext": { + "recognition": "TemplateMatch", + "template": "向右箭头.png", + "roi": [ + 92, + 595, + 134, + 82 + ], + "action": "Click" + }, + "Infr_DealNextFriends_End": { + "recognition": "TemplateMatch", + "template": "好友交付记录.png", + "roi": [ + 75, + 474, + 106, + 76 + ], + "threshold": 0.9, + "post_delay": 1000, + "next": [ + "通用-返回主页" + ] + }, + "Infr_制作素材": { + "recognition": "OCR", + "expected": [ + "制作素材" + ], + "roi": [ + 42, + 99, + 108, + 34 + ], + "action": "Click", + "post_delay": 1000, + "target": [ + 53, + 358, + 79, + 73 + ], + "next": [ + "Infr_制作素材", + "Infr_制作素材_材料不足", + "Infr_制作素材_材料充足" + ] + }, + "Infr_制作素材_材料充足": { + "recognition": "ColorMatch", + "roi": [ + 461, + 520, + 85, + 28 + ], + "lower": [ + 59, + 65, + 74 + ], + "upper": [ + 99, + 97, + 107 + ], + "action": "Click", + "post_delay": 2000, + "target": [ + 272, + 525, + 145, + 140 + ], + "next": [ + "Infr_制作素材_材料充足_合成", + "Infr_制作素材_材料充足" + ] + }, + "Infr_制作素材_材料不足": { + "recognition": "ColorMatch", + "roi": [ + 461, + 520, + 85, + 28 + ], + "lower": [ + 33, + 20, + 33 + ], + "upper": [ + 57, + 32, + 49 + ], + "post_delay": 1000, + "next": [ + "Infr_制作素材_返回" + ] + }, + "Infr_制作素材_材料充足_合成": { + "recognition": "OCR", + "expected": [ + "合成份数" + ], + "roi": [ + 901, + 95, + 106, + 33 + ], + "action": "Click", + "post_delay": 1000, + "target": [ + 1159, + 342, + 67, + 33 + ], + "next": [ + "Infr_制作素材_材料充足_最大", + "Infr_制作素材_材料充足_合成" + ] + }, + "Infr_制作素材_材料充足_最大": { + "recognition": "ColorMatch", + "roi": [ + 414, + 308, + 405, + 107 + ], + "lower": [ + 33, + 20, + 33 + ], + "upper": [ + 57, + 32, + 49 + ], + "post_delay": 1000, + "next": [ + "Infr_制作素材_材料充足_确定" + ] + }, + "Infr_制作素材_材料充足_确定": { + "recognition": "OCR", + "expected": [ + "合成份数" + ], + "roi": [ + 896, + 94, + 111, + 35 + ], + "action": "Click", + "post_delay": 1000, + "target": [ + 1020, + 603, + 90, + 39 + ], + "next": [ + "[JumpBack]子任务_获得物品", + "Infr_制作素材_合成_返回" + ] + }, + "Infr_制作素材_合成_返回": { + "action": "Click", + "recognition": "TemplateMatch", + "template": [ + "合成菜单.png" + ], + "roi": [ + 274, + 97, + 88, + 27 + ], + "target": [ + 44, + 29, + 120, + 39 + ], + "post_delay": 1000, + "next": [ + "[JumpBack]子任务_获得物品", + "Infr_制作素材_返回", + "Infr_换取页面", + "Infr_制作素材_合成_返回" + ] + }, + "Infr_制作素材_返回": { + "action": "Click", + "recognition": "TemplateMatch", + "template": [ + "InfrastructureS/Infr_JDSC.png" + ], + "roi": [ + 1, + 458, + 235, + 104 + ], + "target": [ + 44, + 29, + 120, + 39 + ], + "post_delay": 1000, + "next": [ + "Infr_换取页面", + "Infr_制作素材_返回" + ] + }, + "Infr_换取页面": { + "recognition": "OCR", + "expected": [ + "制作素材" + ], + "roi": [ + 44, + 44, + 100, + 100 + ], + "post_delay": 1000, + "next": [ + "Infr_DealmySelf" + ] + }, + "Infr_行星指挥部_返回": { + "recognition": "OCR", + "expected": [ + "行星指挥部" + ], + "roi": [ + 137, + 105, + 143, + 35 + ], + "action": "Click", + "post_delay": 1000, + "target": [ + 52, + 24, + 102, + 43 + ], + "next": [ + "Infr_DealDefaltYes", + "Infr_行星指挥部_返回" + ] + } +} diff --git "a/assets/resource/base/pipeline/\346\250\241\346\213\237\345\206\233\346\274\224.json" "b/assets/resource/base/pipeline/\346\250\241\346\213\237\345\206\233\346\274\224.json" index 2570935..aa0c663 100644 --- "a/assets/resource/base/pipeline/\346\250\241\346\213\237\345\206\233\346\274\224.json" +++ "b/assets/resource/base/pipeline/\346\250\241\346\213\237\345\206\233\346\274\224.json" @@ -1,200 +1,199 @@ -{ - "模拟军演": { - "next": [ - "首页_出击", - "子任务_进入首页" - ] - }, - "模拟军演_入口": { - "recognition": "OCR", - "expected": [ - "模拟军演" - ], - "roi": [ - 185, - 282, - 280, - 174 - ], - "action": "Click", - "next": [ - "模拟军演_二级入口", - "模拟军演_入口" - ] - }, - "模拟军演_二级入口": { - "recognition": "OCR", - "expected": [ - "镜像竞技" - ], - "roi": [ - 356, - 355, - 301, - 154 - ], - "action": "Click", - "next": [ - "模拟军演_刷新对手", - "模拟军演_选择对手", - "模拟军演_二级入口" - ] - }, - "模拟军演_刷新对手": { - "recognition": "OCR", - "expected": "^[1-9]\\d{4}$", - "roi": [ - 964, - 74, - 160, - 140 - ], - "action": "Click", - "target": [ - 1200, - 110, - 10, - 10 - ], - "next": [ - "模拟军演_刷新上线", - "模拟军演_刷新对手", - "模拟军演_选择对手", - "模拟军演_开始挑战" - ] - }, - "模拟军演_刷新上线": { - "recognition": "OCR", - "expected": [ - "操作" - ], - "roi": [ - 400, - 250, - 400, - 200 - ], - "next": [ - "模拟军演_选择对手" - ] - }, - "模拟军演_选择对手": { - "recognition": "OCR", - "expected": [ - "积分" - ], - "roi": [ - 0, - 0, - 0, - 0 - ], - "action": "Click", - "post_delay": 2000, - "target": [ - 956, - 236, - 200, - 60 - ], - "next": [ - "模拟军演_开始挑战", - "模拟军演_无挑战次数", - "模拟军演_刷新对手", - "模拟军演_选择对手" - ] - }, - "模拟军演_无挑战次数": { - "recognition": "OCR", - "expected": [ - "模拟次数购买" - ], - "roi": [ - 207, - 146, - 233, - 92 - ], - "action": "Click", - "target": [ - 228, - 49, - 10, - 10 - ], - "next": [ - "进入首页" - ] - }, - "模拟军演_开始挑战": { - "recognition": "OCR", - "expected": [ - "挑战" - ], - "roi": [ - 600, - 360, - 600, - 360 - ], - "action": "Click", - "next": [ - "模拟军演_战斗中", - "模拟军演_开始挑战" - ] - }, - "模拟军演_战斗中": { - "recognition": "TemplateMatch", - "template": "Combat/Combat_Combating.png", - "roi": [ - 1169, - 27, - 105, - 59 - ], - "next": [ - "战斗_自动战斗", - "战斗_启用二倍速", - "模拟军演_战斗中_战斗结束", - "模拟军演_战斗中" - ] - }, - "模拟军演_战斗中_战斗结束": { - "recognition": "OCR", - "expected": [ - "等级" - ], - "roi": [ - 210, - 481, - 97, - 82 - ], - "action": "Click", - "post_delay": 3000, - "next": [ - "子任务_获得物品", - "模拟军演_阶段提升", - "模拟军演_刷新对手", - "模拟军演_选择对手", - "模拟军演_战斗中_战斗结束" - ] - }, - "模拟军演_阶段提升": { - "post_delay": 2000, - "is_sub": true, - "recognition": "OCR", - "expected": [ - "提升", - "新的", - "阶段" - ], - "roi": [ - 404, - 110, - 525, - 124 - ], - "action": "Click" - } -} \ No newline at end of file +{ + "模拟军演": { + "next": [ + "首页_出击", + "[JumpBack]子任务_进入首页" + ] + }, + "模拟军演_入口": { + "recognition": "OCR", + "expected": [ + "模拟军演" + ], + "roi": [ + 185, + 282, + 280, + 174 + ], + "action": "Click", + "next": [ + "模拟军演_二级入口", + "模拟军演_入口" + ] + }, + "模拟军演_二级入口": { + "recognition": "OCR", + "expected": [ + "镜像竞技" + ], + "roi": [ + 356, + 355, + 301, + 154 + ], + "action": "Click", + "next": [ + "模拟军演_刷新对手", + "模拟军演_选择对手", + "模拟军演_二级入口" + ] + }, + "模拟军演_刷新对手": { + "recognition": "OCR", + "expected": "^[1-9]\\d{4}$", + "roi": [ + 964, + 74, + 160, + 140 + ], + "action": "Click", + "target": [ + 1200, + 110, + 10, + 10 + ], + "next": [ + "模拟军演_刷新上线", + "模拟军演_刷新对手", + "模拟军演_选择对手", + "模拟军演_开始挑战" + ] + }, + "模拟军演_刷新上线": { + "recognition": "OCR", + "expected": [ + "操作" + ], + "roi": [ + 400, + 250, + 400, + 200 + ], + "next": [ + "模拟军演_选择对手" + ] + }, + "模拟军演_选择对手": { + "recognition": "OCR", + "expected": [ + "积分" + ], + "roi": [ + 0, + 0, + 0, + 0 + ], + "action": "Click", + "post_delay": 2000, + "target": [ + 956, + 236, + 200, + 60 + ], + "next": [ + "模拟军演_开始挑战", + "模拟军演_无挑战次数", + "模拟军演_刷新对手", + "模拟军演_选择对手" + ] + }, + "模拟军演_无挑战次数": { + "recognition": "OCR", + "expected": [ + "模拟次数购买" + ], + "roi": [ + 207, + 146, + 233, + 92 + ], + "action": "Click", + "target": [ + 228, + 49, + 10, + 10 + ], + "next": [ + "进入首页" + ] + }, + "模拟军演_开始挑战": { + "recognition": "OCR", + "expected": [ + "挑战" + ], + "roi": [ + 600, + 360, + 600, + 360 + ], + "action": "Click", + "next": [ + "模拟军演_战斗中", + "模拟军演_开始挑战" + ] + }, + "模拟军演_战斗中": { + "recognition": "TemplateMatch", + "template": "Combat/Combat_Combating.png", + "roi": [ + 1169, + 27, + 105, + 59 + ], + "next": [ + "[JumpBack]战斗_自动战斗", + "[JumpBack]战斗_启用二倍速", + "模拟军演_战斗中_战斗结束", + "模拟军演_战斗中" + ] + }, + "模拟军演_战斗中_战斗结束": { + "recognition": "OCR", + "expected": [ + "等级" + ], + "roi": [ + 210, + 481, + 97, + 82 + ], + "action": "Click", + "post_delay": 3000, + "next": [ + "[JumpBack]子任务_获得物品", + "[JumpBack]模拟军演_阶段提升", + "模拟军演_刷新对手", + "模拟军演_选择对手", + "模拟军演_战斗中_战斗结束" + ] + }, + "模拟军演_阶段提升": { + "post_delay": 2000, + "recognition": "OCR", + "expected": [ + "提升", + "新的", + "阶段" + ], + "roi": [ + 404, + 110, + 525, + 124 + ], + "action": "Click" + } +} diff --git "a/assets/resource/base/pipeline/\346\257\217\346\227\245\345\205\215\350\264\271\347\244\274\345\214\205.json" "b/assets/resource/base/pipeline/\346\257\217\346\227\245\345\205\215\350\264\271\347\244\274\345\214\205.json" index 8af84a5..8ed3e4c 100644 --- "a/assets/resource/base/pipeline/\346\257\217\346\227\245\345\205\215\350\264\271\347\244\274\345\214\205.json" +++ "b/assets/resource/base/pipeline/\346\257\217\346\227\245\345\205\215\350\264\271\347\244\274\345\214\205.json" @@ -1,79 +1,79 @@ -{ - "Shopping": { - "next": [ - "子任务_关闭公告", - "Shop", - "子任务_进入首页" - ] - }, - "Shop": { - "recognition": "OCR", - "expected": [ - "补给站" - ], - "roi": [1008, 593, 111, 118], - "action": "Click", - "next": [ - "DailyGift", - "Shop" - ] - }, - "DailyGift": { - "recognition": "OCR", - "expected": [ - "礼包" - ], - "roi": [ - 362, - 57, - 166, - 89 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyGiftYes", - - "进入首页" - ] - }, - "DailyGiftYes": { - "recognition": "OCR", - "expected": "免费", - "roi": [273, 522, 985, 79], - "action":"Click", - "next": [ - "ForFree", - "进入首页" - ] - }, - "ForFree": { - "recognition": "OCR", - "expected": [ - "免费" - ], - "roi": [163, 9, 409, 239], - "next": [ - "Purchase", - "ForFree" - ] - }, - "Purchase": { - "recognition": "OCR", - "expected": [ - "购买" - ], - "roi": [ - 758, - 513, - 191, - 75 - ], - "action": "Click", - "post_delay": 1000, - "next": [ - "子任务_获得物品", - "进入首页" - ] - } -} \ No newline at end of file +{ + "Shopping": { + "next": [ + "[JumpBack]子任务_关闭公告", + "Shop", + "[JumpBack]子任务_进入首页" + ] + }, + "Shop": { + "recognition": "OCR", + "expected": [ + "补给站" + ], + "roi": [1008, 593, 111, 118], + "action": "Click", + "next": [ + "DailyGift", + "Shop" + ] + }, + "DailyGift": { + "recognition": "OCR", + "expected": [ + "礼包" + ], + "roi": [ + 362, + 57, + 166, + 89 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyGiftYes", + + "进入首页" + ] + }, + "DailyGiftYes": { + "recognition": "OCR", + "expected": "免费", + "roi": [273, 522, 985, 79], + "action":"Click", + "next": [ + "ForFree", + "进入首页" + ] + }, + "ForFree": { + "recognition": "OCR", + "expected": [ + "免费" + ], + "roi": [163, 9, 409, 239], + "next": [ + "Purchase", + "ForFree" + ] + }, + "Purchase": { + "recognition": "OCR", + "expected": [ + "购买" + ], + "roi": [ + 758, + 513, + 191, + 75 + ], + "action": "Click", + "post_delay": 1000, + "next": [ + "[JumpBack]子任务_获得物品", + "进入首页" + ] + } +} diff --git "a/assets/resource/base/pipeline/\346\257\217\346\227\245\346\216\242\347\264\242.json" "b/assets/resource/base/pipeline/\346\257\217\346\227\245\346\216\242\347\264\242.json" index 77d078e..0ff1e06 100644 --- "a/assets/resource/base/pipeline/\346\257\217\346\227\245\346\216\242\347\264\242.json" +++ "b/assets/resource/base/pipeline/\346\257\217\346\227\245\346\216\242\347\264\242.json" @@ -1,361 +1,359 @@ -{ - "DailyExplore": { - "next": [ - "首页_出击", - "子任务_进入首页" - ] - }, - "DailyExplore_Entry": { - "recognition": "OCR", - "expected": [ - "每日探索" - ], - "roi": [ - 874, - 294, - 218, - 132 - ], - "action": "Click", - "post_delay": 2000, - "next_doc": "Set in code." - }, - "DailyExplore_ReAc": { - "recognition": "OCR", - "expected": [ - "资源采集" - ], - "roi": [ - 259, - 205, - 243, - 70 - ], - "action": "Click", - "post_delay": 2000, - "next_doc": "Set in code." - }, - "DailyExplore_ReAc_Skill": { - "recognition": "OCR", - "expected": [ - "技能磨砺" - ], - "roi": [ - 830, - 127, - 190, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_ReAc_Money": { - "recognition": "OCR", - "expected": [ - "星币开采" - ], - "roi": [ - 838, - 237, - 176, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_ReAc_Experience": { - "recognition": "OCR", - "expected": [ - "技术解析" - ], - "roi": [ - 838, - 347, - 176, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_ReAc_Token": { - "recognition": "OCR", - "expected": [ - "荒墟拾遗" - ], - "roi": [ - 838, - 455, - 176, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_LevelSelect": { - "recognition": "OCR", - "text_doc": "Set in code.", - "roi": [ - 1147, - 258, - 93, - 365 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_MopUp" - ] - }, - "DailyExplore_MopUp": { - "recognition": "OCR", - "expected": [ - "扫荡" - ], - "roi": [ - 843, - 559, - 115, - 91 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_MopUpStart", - "DailyExplore_MopUp" - ] - }, - "DailyExplore_MopUpStart": { - "recognition": "OCR", - "expected": [ - "开始战斗" - ], - "roi": [ - 943, - 521, - 159, - 85 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_MopUpDoubleMarkup", - "DailyExplore_MopUpAwards", - "DailyExplore_NoFuel", - "DailyExplore_MopUpStart" - ] - }, - "DailyExplore_NoFuel": { - "recognition": "OCR", - "expected": [ - "燃料补给" - ], - "roi": [ - 212, - 139, - 180, - 60 - ], - "action": "Click", - "post_delay": 2000, - "target": [ - 584, - 57, - 10, - 10 - ], - "next": [ - "进入首页" - ] - }, - "DailyExplore_MopUpAwards": { - "recognition": "OCR", - "expected": [ - "扫荡奖励" - ], - "roi": [ - 569, - 5, - 181, - 66 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelUp", - "DailyExplore_MopUp", - "DailyExplore_MopUpAwards" - ] - }, - "DailyExplore_LevelUp": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "Combat/DailyExplore_LevelUp.png", - "roi": [ - 540, - 242, - 207, - 91 - ], - "action": "Click" - }, - "DailyExplore_MopUpDoubleMarkup": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "开启" - ], - "roi": [ - 702, - 398, - 252, - 100 - ], - "action": "Click", - "post_delay": 2000, - "next": [] - }, - "DailyExplore_ChEm": { - "recognition": "OCR", - "expected": [ - "芯片嵌合" - ], - "roi": [ - 287, - 372, - 205, - 64 - ], - "action": "Click", - "post_delay": 2000, - "next_doc": "Set in code." - }, - "DailyExplore_ChEm_1": { - "recognition": "OCR", - "expected": [ - "鼓军嵌合" - ], - "roi": [ - 830, - 127, - 190, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_ChEm_2": { - "recognition": "OCR", - "expected": [ - "光" - ], - "roi": [ - 830, - 241, - 190, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_ChEm_3": { - "recognition": "OCR", - "expected": [ - "注" - ], - "roi": [ - 830, - 341, - 190, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_UpAc": { - "recognition": "OCR", - "expected": [ - "跃升行动" - ], - "roi": [ - 287, - 534, - 205, - 64 - ], - "action": "Click", - "post_delay": 2000, - "next_doc": "Set in code." - }, - "DailyExplore_UpAc_1": { - "recognition": "OCR", - "expected": [ - "自然" - ], - "roi": [ - 830, - 127, - 190, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_UpAc_2": { - "recognition": "OCR", - "expected": [ - "人造" - ], - "roi": [ - 830, - 241, - 190, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - }, - "DailyExplore_UpAc_3": { - "recognition": "OCR", - "expected": [ - "生命" - ], - "roi": [ - 830, - 341, - 190, - 60 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyExplore_LevelSelect" - ] - } -} +{ + "DailyExplore": { + "next": [ + "首页_出击", + "[JumpBack]子任务_进入首页" + ] + }, + "DailyExplore_Entry": { + "recognition": "OCR", + "expected": [ + "每日探索" + ], + "roi": [ + 874, + 294, + 218, + 132 + ], + "action": "Click", + "post_delay": 2000, + "next_doc": "Set in code." + }, + "DailyExplore_ReAc": { + "recognition": "OCR", + "expected": [ + "资源采集" + ], + "roi": [ + 259, + 205, + 243, + 70 + ], + "action": "Click", + "post_delay": 2000, + "next_doc": "Set in code." + }, + "DailyExplore_ReAc_Skill": { + "recognition": "OCR", + "expected": [ + "技能磨砺" + ], + "roi": [ + 830, + 127, + 190, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_ReAc_Money": { + "recognition": "OCR", + "expected": [ + "星币开采" + ], + "roi": [ + 838, + 237, + 176, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_ReAc_Experience": { + "recognition": "OCR", + "expected": [ + "技术解析" + ], + "roi": [ + 838, + 347, + 176, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_ReAc_Token": { + "recognition": "OCR", + "expected": [ + "荒墟拾遗" + ], + "roi": [ + 838, + 455, + 176, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_LevelSelect": { + "recognition": "OCR", + "text_doc": "Set in code.", + "roi": [ + 1147, + 258, + 93, + 365 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_MopUp" + ] + }, + "DailyExplore_MopUp": { + "recognition": "OCR", + "expected": [ + "扫荡" + ], + "roi": [ + 843, + 559, + 115, + 91 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_MopUpStart", + "DailyExplore_MopUp" + ] + }, + "DailyExplore_MopUpStart": { + "recognition": "OCR", + "expected": [ + "开始战斗" + ], + "roi": [ + 943, + 521, + 159, + 85 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]DailyExplore_MopUpDoubleMarkup", + "DailyExplore_MopUpAwards", + "DailyExplore_NoFuel", + "DailyExplore_MopUpStart" + ] + }, + "DailyExplore_NoFuel": { + "recognition": "OCR", + "expected": [ + "燃料补给" + ], + "roi": [ + 212, + 139, + 180, + 60 + ], + "action": "Click", + "post_delay": 2000, + "target": [ + 584, + 57, + 10, + 10 + ], + "next": [ + "进入首页" + ] + }, + "DailyExplore_MopUpAwards": { + "recognition": "OCR", + "expected": [ + "扫荡奖励" + ], + "roi": [ + 569, + 5, + 181, + 66 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]DailyExplore_LevelUp", + "DailyExplore_MopUp", + "DailyExplore_MopUpAwards" + ] + }, + "DailyExplore_LevelUp": { + "recognition": "TemplateMatch", + "template": "Combat/DailyExplore_LevelUp.png", + "roi": [ + 540, + 242, + 207, + 91 + ], + "action": "Click" + }, + "DailyExplore_MopUpDoubleMarkup": { + "recognition": "OCR", + "expected": [ + "开启" + ], + "roi": [ + 702, + 398, + 252, + 100 + ], + "action": "Click", + "post_delay": 2000, + "next": [] + }, + "DailyExplore_ChEm": { + "recognition": "OCR", + "expected": [ + "芯片嵌合" + ], + "roi": [ + 287, + 372, + 205, + 64 + ], + "action": "Click", + "post_delay": 2000, + "next_doc": "Set in code." + }, + "DailyExplore_ChEm_1": { + "recognition": "OCR", + "expected": [ + "鼓军嵌合" + ], + "roi": [ + 830, + 127, + 190, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_ChEm_2": { + "recognition": "OCR", + "expected": [ + "光" + ], + "roi": [ + 830, + 241, + 190, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_ChEm_3": { + "recognition": "OCR", + "expected": [ + "注" + ], + "roi": [ + 830, + 341, + 190, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_UpAc": { + "recognition": "OCR", + "expected": [ + "跃升行动" + ], + "roi": [ + 287, + 534, + 205, + 64 + ], + "action": "Click", + "post_delay": 2000, + "next_doc": "Set in code." + }, + "DailyExplore_UpAc_1": { + "recognition": "OCR", + "expected": [ + "自然" + ], + "roi": [ + 830, + 127, + 190, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_UpAc_2": { + "recognition": "OCR", + "expected": [ + "人造" + ], + "roi": [ + 830, + 241, + 190, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + }, + "DailyExplore_UpAc_3": { + "recognition": "OCR", + "expected": [ + "生命" + ], + "roi": [ + 830, + 341, + 190, + 60 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyExplore_LevelSelect" + ] + } +} diff --git "a/assets/resource/base/pipeline/\346\264\273\345\212\250-\345\244\217\346\264\273.json" "b/assets/resource/base/pipeline/\346\264\273\345\212\250-\345\244\217\346\264\273.json" index ce27c86..9e09e21 100644 --- "a/assets/resource/base/pipeline/\346\264\273\345\212\250-\345\244\217\346\264\273.json" +++ "b/assets/resource/base/pipeline/\346\264\273\345\212\250-\345\244\217\346\264\273.json" @@ -1,324 +1,322 @@ -{ - "夏活": { - "next": [ - "夏活_入口", - "子任务_进入首页" - ] - }, - "夏活_入口": { - "recognition": "OCR", - "action": "Click", - "expected": "夏日", - "roi": [ - 848, - 145, - 66, - 123 - ], - "next": [ - "夏活_任务奖励入口", - "夏活_入口" - ] - }, - "夏活_任务奖励入口": { - "recognition": "OCR", - "action": "Click", - "expected": "海", - "roi": [ - 883, - 129, - 241, - 117 - ], - "next": "夏活_任务奖励_点击领取" - }, - "夏活_任务奖励_点击领取": { - "recognition": "OCR", - "action": "Click", - "expected": "领取", - "roi": [ - 1029, - 93, - 145, - 44 - ], - "next": [ - "夏活_任务奖励_奖励弹框", - "夏活_任务奖励_领取完成", - "夏活_任务奖励_点击领取" - ] - }, - "夏活_任务奖励_奖励弹框": { - "recognition": "OCR", - "action": "Click", - "expected": "获得物品", - "roi": [ - 527, - 160, - 214, - 68 - ], - "next": [ - "夏活_任务奖励_领取完成", - "夏活_任务奖励_奖励弹框" - ] - }, - "夏活_任务奖励_领取完成": { - "recognition": "OCR", - "expected": "已完成", - "roi": [ - 1051, - 210, - 105, - 41 - ], - "next": "夏活_任务奖励_返回" - }, - "夏活_任务奖励_返回": { - "recognition": "OCR", - "expected": "任务奖励", - "roi": [ - 132, - 90, - 151, - 52 - ], - "action": "Click", - "target": [ - 44, - 34, - 120, - 32 - ], - "next": [ - "夏活_进入关卡", - "夏活_任务奖励_返回" - ] - }, - "夏活_进入关卡": { - "recognition": "OCR", - "expected": "夏日", - "roi": [ - 268, - 191, - 199, - 65 - ], - "action": "Click", - "target": [ - 905, - 504, - 198, - 104 - ], - "next": [ - "夏活_关卡_难度选择", - "夏活_进入关卡" - ] - }, - "夏活_关卡_难度选择": { - "recognition": "OCR", - "action": "Click", - "expected": "困难", - "roi": [ - 12, - 193, - 144, - 34 - ], - "next": [ - "夏活_关卡_选择关卡", - "夏活_关卡_难度选择" - ] - }, - "夏活_关卡_选择关卡": { - "recognition": "OCR", - "action": "Click", - "expected": "海", - "roi": [ - 106, - 599, - 119, - 33 - ], - "next": [ - "夏活_扫荡", - "夏活_关卡_选择关卡" - ] - }, - "夏活_扫荡": { - "recognition": "OCR", - "expected": [ - "扫荡" - ], - "roi": [ - 843, - 559, - 115, - 91 - ], - "action": "Click", - "next": [ - "夏活_扫荡开始", - "夏活_扫荡" - ] - }, - "夏活_扫荡奖励": { - "recognition": "OCR", - "expected": [ - "扫荡奖励" - ], - "roi": [ - 569, - 5, - 181, - 66 - ], - "action": "Click", - "next": [ - "夏活_扫荡升级", - "夏活_扫荡", - "夏活_扫荡奖励" - ] - }, - "夏活_扫荡升级": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "Combat/DailyExplore_LevelUp.png", - "roi": [ - 540, - 242, - 207, - 91 - ], - "action": "Click" - }, - "夏活_扫荡开始": { - "recognition": "OCR", - "expected": [ - "开始战斗" - ], - "roi": [ - 943, - 521, - 159, - 85 - ], - "action": "Click", - "next": [ - "夏活_扫荡双倍标记", - "夏活_扫荡", - "夏活_扫荡奖励", - "夏活_无票券", - "夏活_扫荡开始" - ] - }, - "夏活_扫荡双倍标记": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "开启" - ], - "roi": [ - 702, - 398, - 252, - 100 - ], - "action": "Click" - }, - "夏活_无票券": { - "recognition": "OCR", - "expected": [ - "取消" - ], - "roi": [ - 422, - 431, - 107, - 35 - ], - "action": "Click", - "next": [ - "夏活_返回首页", - "夏活_无票券" - ] - }, - "夏活_首页标识": { - "recognition": "OCR", - "expected": [ - "夏日" - ], - "roi": [ - 272, - 186, - 189, - 68 - ], - "next": [ - "夏活_活动奖励", - "夏活_首页标识" - ] - }, - "夏活_返回首页": { - "next": [ - "夏活_首页标识", - "子任务_点击返回", - "夏活_返回首页" - ] - }, - "夏活_活动奖励": { - "recognition": "OCR", - "expected": [ - "夏日" - ], - "roi": [ - 272, - 186, - 189, - 68 - ], - "target": [ - 952, - 303, - 260, - 92 - ], - "action": "Click", - "next": [ - "夏活_活动奖励_点击领取", - "夏活_活动奖励_领取完成", - "夏活_活动奖励" - ] - }, - "夏活_活动奖励_点击领取": { - "recognition": "OCR", - "expected": [ - "领取" - ], - "roi": [ - 1090, - 280, - 115, - 33 - ], - "action": "Click", - "next": [ - "子任务_获得物品", - "夏活_活动奖励_领取完成", - "夏活_活动奖励_点击领取" - ] - }, - "夏活_活动奖励_领取完成": { - "recognition": "OCR", - "expected": [ - "获取" - ], - "roi": [ - 1094, - 282, - 105, - 32 - ] - } -} \ No newline at end of file +{ + "夏活": { + "next": [ + "夏活_入口", + "[JumpBack]子任务_进入首页" + ] + }, + "夏活_入口": { + "recognition": "OCR", + "action": "Click", + "expected": "夏日", + "roi": [ + 848, + 145, + 66, + 123 + ], + "next": [ + "夏活_任务奖励入口", + "夏活_入口" + ] + }, + "夏活_任务奖励入口": { + "recognition": "OCR", + "action": "Click", + "expected": "海", + "roi": [ + 883, + 129, + 241, + 117 + ], + "next": ["夏活_任务奖励_点击领取"] + }, + "夏活_任务奖励_点击领取": { + "recognition": "OCR", + "action": "Click", + "expected": "领取", + "roi": [ + 1029, + 93, + 145, + 44 + ], + "next": [ + "夏活_任务奖励_奖励弹框", + "夏活_任务奖励_领取完成", + "夏活_任务奖励_点击领取" + ] + }, + "夏活_任务奖励_奖励弹框": { + "recognition": "OCR", + "action": "Click", + "expected": "获得物品", + "roi": [ + 527, + 160, + 214, + 68 + ], + "next": [ + "夏活_任务奖励_领取完成", + "夏活_任务奖励_奖励弹框" + ] + }, + "夏活_任务奖励_领取完成": { + "recognition": "OCR", + "expected": "已完成", + "roi": [ + 1051, + 210, + 105, + 41 + ], + "next": ["夏活_任务奖励_返回"] + }, + "夏活_任务奖励_返回": { + "recognition": "OCR", + "expected": "任务奖励", + "roi": [ + 132, + 90, + 151, + 52 + ], + "action": "Click", + "target": [ + 44, + 34, + 120, + 32 + ], + "next": [ + "夏活_进入关卡", + "夏活_任务奖励_返回" + ] + }, + "夏活_进入关卡": { + "recognition": "OCR", + "expected": "夏日", + "roi": [ + 268, + 191, + 199, + 65 + ], + "action": "Click", + "target": [ + 905, + 504, + 198, + 104 + ], + "next": [ + "夏活_关卡_难度选择", + "夏活_进入关卡" + ] + }, + "夏活_关卡_难度选择": { + "recognition": "OCR", + "action": "Click", + "expected": "困难", + "roi": [ + 12, + 193, + 144, + 34 + ], + "next": [ + "夏活_关卡_选择关卡", + "夏活_关卡_难度选择" + ] + }, + "夏活_关卡_选择关卡": { + "recognition": "OCR", + "action": "Click", + "expected": "海", + "roi": [ + 106, + 599, + 119, + 33 + ], + "next": [ + "夏活_扫荡", + "夏活_关卡_选择关卡" + ] + }, + "夏活_扫荡": { + "recognition": "OCR", + "expected": [ + "扫荡" + ], + "roi": [ + 843, + 559, + 115, + 91 + ], + "action": "Click", + "next": [ + "夏活_扫荡开始", + "夏活_扫荡" + ] + }, + "夏活_扫荡奖励": { + "recognition": "OCR", + "expected": [ + "扫荡奖励" + ], + "roi": [ + 569, + 5, + 181, + 66 + ], + "action": "Click", + "next": [ + "[JumpBack]夏活_扫荡升级", + "夏活_扫荡", + "夏活_扫荡奖励" + ] + }, + "夏活_扫荡升级": { + "recognition": "TemplateMatch", + "template": "Combat/DailyExplore_LevelUp.png", + "roi": [ + 540, + 242, + 207, + 91 + ], + "action": "Click" + }, + "夏活_扫荡开始": { + "recognition": "OCR", + "expected": [ + "开始战斗" + ], + "roi": [ + 943, + 521, + 159, + 85 + ], + "action": "Click", + "next": [ + "[JumpBack]夏活_扫荡双倍标记", + "夏活_扫荡", + "夏活_扫荡奖励", + "夏活_无票券", + "夏活_扫荡开始" + ] + }, + "夏活_扫荡双倍标记": { + "recognition": "OCR", + "expected": [ + "开启" + ], + "roi": [ + 702, + 398, + 252, + 100 + ], + "action": "Click" + }, + "夏活_无票券": { + "recognition": "OCR", + "expected": [ + "取消" + ], + "roi": [ + 422, + 431, + 107, + 35 + ], + "action": "Click", + "next": [ + "夏活_返回首页", + "夏活_无票券" + ] + }, + "夏活_首页标识": { + "recognition": "OCR", + "expected": [ + "夏日" + ], + "roi": [ + 272, + 186, + 189, + 68 + ], + "next": [ + "夏活_活动奖励", + "夏活_首页标识" + ] + }, + "夏活_返回首页": { + "next": [ + "夏活_首页标识", + "[JumpBack]子任务_点击返回", + "夏活_返回首页" + ] + }, + "夏活_活动奖励": { + "recognition": "OCR", + "expected": [ + "夏日" + ], + "roi": [ + 272, + 186, + 189, + 68 + ], + "target": [ + 952, + 303, + 260, + 92 + ], + "action": "Click", + "next": [ + "夏活_活动奖励_点击领取", + "夏活_活动奖励_领取完成", + "夏活_活动奖励" + ] + }, + "夏活_活动奖励_点击领取": { + "recognition": "OCR", + "expected": [ + "领取" + ], + "roi": [ + 1090, + 280, + 115, + 33 + ], + "action": "Click", + "next": [ + "[JumpBack]子任务_获得物品", + "夏活_活动奖励_领取完成", + "夏活_活动奖励_点击领取" + ] + }, + "夏活_活动奖励_领取完成": { + "recognition": "OCR", + "expected": [ + "获取" + ], + "roi": [ + 1094, + 282, + 105, + 32 + ] + } +} diff --git "a/assets/resource/base/pipeline/\346\264\273\345\212\250-\346\265\252\346\275\256\345\233\236\345\223\215.json" "b/assets/resource/base/pipeline/\346\264\273\345\212\250-\346\265\252\346\275\256\345\233\236\345\223\215.json" index 9c73c21..4c54b95 100644 --- "a/assets/resource/base/pipeline/\346\264\273\345\212\250-\346\265\252\346\275\256\345\233\236\345\223\215.json" +++ "b/assets/resource/base/pipeline/\346\264\273\345\212\250-\346\265\252\346\275\256\345\233\236\345\223\215.json" @@ -1,251 +1,249 @@ -{ - "活动": { - "next": [ - "活动_入口", - "子任务_进入首页" - ] - }, - "活动_入口": { - - "action": "Click", - "target" : [1115,465,132,45], - "post_delay":2000, - "next": [ - "活动_任务奖励入口", - "活动_入口" - ] - }, - "活动_任务奖励入口": { - "recognition": "TemplateMatch", - "action": "Click", - "template" : "StartUp/浪潮回响.png", - "recommended roi" : [167, 510, 292, 195], - "post_delay":1000, - "next": [ - "活动_任务奖励_点击领取", - "活动_任务奖励_领取完成" - ] - }, - "活动_任务奖励_点击领取": { - "recognition": "OCR", - "action": "Click", - "expected": "领取", - "recommended roi" : [956,53,269,129], - "next": [ - "活动_任务奖励_奖励弹框", - "活动_任务奖励_领取完成", - "活动_任务奖励_点击领取" - ] - }, - "活动_任务奖励_奖励弹框": { - "recognition": "OCR", - "action": "Click", - "expected": "获得物品", - "roi": [ - 527, - 160, - 214, - 68 - ], - "next": [ - "活动_任务奖励_领取完成", - "活动_任务奖励_奖励弹框" - ] - }, - "活动_任务奖励_领取完成": { - "recognition": "ColorMatch", - "recommended roi" : [1026,88,150,52], - "upper" : [90,77,58], - "lower" : [8,4,8], - "method" : 4, - "action":"Click", - "next": ["活动_任务奖励_返回", - "活动_任务奖励_领取完成"] - }, - "活动_任务奖励_返回": { - "recognition": "TemplateMatch", - "template": "StartUp/lingqujieshu.png", - "roi" : [1014, 75, 180, 74], - "action": "Click", - "target": [ - 44, - 34, - 120, - 32 - ], - "next": [ - "活动_进入关卡", - "活动_任务奖励_返回" - ] - }, - "活动_进入关卡": { - "recognition": "OCR", - "expected" : "海滨", - "recommended roi" : [914, 543, 337, 171], - "action": "Click", - "target": [1016, 570, 101, 101], - "next": [ - "活动_关卡_难度选择", - "活动_进入关卡" - ] - }, - "活动_关卡_难度选择": { - "recognition": "OCR", - "action": "Click", - "expected": "模式", - "roi" : [4, 198, 118, 51], - "next": [ - "活动_关卡_选择关卡1", - "活动_关卡_难度选择" - ] - }, - "活动_关卡_选择关卡1": { - "recognition": "OCR", - "action": "Swipe", - "expected" : "漆黑", - "recommended roi" : [996, 605, 94, 39], - "begin": [1095, 625, 10, 10], - "end": [39, 625,10, 10], - "next":[ - "活动_关卡_选择关卡2"] - }, - "活动_关卡_选择关卡2":{ - "recognition":"OCR", - "action":"Click", - "expected":"幻海之主", - "next": [ - "活动_扫荡" - ] - }, - "活动_扫荡": { - "recognition": "OCR", - "expected": [ - "扫荡" - ], - "roi" : [794, 546, 92, 84], - "action": "Click", - "next": [ - "活动_扫荡开始" - ] - }, - "活动_扫荡奖励": { - "recognition": "OCR", - "expected": [ - "扫荡成功" - ], - "roi":[7, 9, 482, 153], - "pre_delay":200, - "action": "Click", - "next": [ - "活动_扫荡升级", - "活动_扫荡", - "活动_扫荡奖励" - ] - }, - "活动_扫荡升级": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "Combat/DailyExplore_LevelUp.png", - "roi": [ - 540, - 242, - 207, - 91 - ], - "action": "Click" - }, - "活动_扫荡开始": { - "recognition": "OCR", - "expected": [ - "开始战斗" - ], - "roi" : [811,535,260,48], - "action": "Click", - "timeout":3000, - "next": [ - "活动_无票券1", - "活动_无票券2", - "活动_扫荡双倍标记", - "活动_扫荡奖励" - ] - }, - "活动_扫荡双倍标记": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "开启" - ], - "roi": [ - 702, - 398, - 252, - 100 - ], - "action": "Click" - }, - "活动_无票券1": { - "recognition": "OCR", - "expected": - "取消", - "action": "Click", - "next": "活动_无票券1.1" - }, - "活动_无票券1.1": { - "recognition": "OCR", - "expected": - "扫荡", - "roi" : [174, 105, 102, 53], - "action":"Click", - "target": [46, 30, 117, 38], - "pre_wait_freezes":500, - "next": "活动_无票券2.1" - }, - "活动_无票券2": { - "recognition": "OCR", - "expected":"兑换" , - "roi":[10, 81, 157, 68], - "action":"Click", - "target":[43, 29, 118, 36], - "pre_wait_freezes":500, - "next":"活动_无票券2.1" - }, - "活动_无票券2.1": { - "recognition": "OCR", - "expected": "扫荡", - "roi" : [794, 546, 92, 84], - "action": "Click", - "target":[25, 20, 150, 59], - "pre_wait_freezes":500, - "next":"活动_无票券2.2" - }, - "活动_无票券2.2": { - "recognition":"OCR", - "expected":"幻海之主", - "roi":[742, 588, 224, 101], - "action": "Click", - "target":[25, 20, 150, 59], - "pre_wait_freezes":500, - "next":"活动_领取奖励" - }, - "活动_领取奖励":{ - "recognition":"OCR", - "expected":"碧波", - "roi":[74, 429, 224, 128], - "action":"Click", - "next":["活动_领取奖励1","活动_领取奖励2"] - }, - "活动_领取奖励1":{ - "recognition":"OCR", - "expected":"领取", - "roi":[1027, 249, 241, 85], - "action":"Click", - "next":"通用-返回主页" - }, - "活动_领取奖励2":{ - "recognition":"OCR", - "expected":"获取", - "roi":[1027, 249, 241, 85], - "target": [46, 30, 117, 38], - "next":"通用-返回主页" - } -} \ No newline at end of file +{ + "活动": { + "next": [ + "活动_入口", + "[JumpBack]子任务_进入首页" + ] + }, + "活动_入口": { + + "action": "Click", + "target" : [1115,465,132,45], + "post_delay":2000, + "next": [ + "活动_任务奖励入口", + "活动_入口" + ] + }, + "活动_任务奖励入口": { + "recognition": "TemplateMatch", + "action": "Click", + "template" : "StartUp/浪潮回响.png", + "recommended roi" : [167, 510, 292, 195], + "post_delay":1000, + "next": [ + "活动_任务奖励_点击领取", + "活动_任务奖励_领取完成" + ] + }, + "活动_任务奖励_点击领取": { + "recognition": "OCR", + "action": "Click", + "expected": "领取", + "recommended roi" : [956,53,269,129], + "next": [ + "活动_任务奖励_奖励弹框", + "活动_任务奖励_领取完成", + "活动_任务奖励_点击领取" + ] + }, + "活动_任务奖励_奖励弹框": { + "recognition": "OCR", + "action": "Click", + "expected": "获得物品", + "roi": [ + 527, + 160, + 214, + 68 + ], + "next": [ + "活动_任务奖励_领取完成", + "活动_任务奖励_奖励弹框" + ] + }, + "活动_任务奖励_领取完成": { + "recognition": "ColorMatch", + "recommended roi" : [1026,88,150,52], + "upper" : [90,77,58], + "lower" : [8,4,8], + "method" : 4, + "action":"Click", + "next": ["活动_任务奖励_返回", + "活动_任务奖励_领取完成"] + }, + "活动_任务奖励_返回": { + "recognition": "TemplateMatch", + "template": "StartUp/lingqujieshu.png", + "roi" : [1014, 75, 180, 74], + "action": "Click", + "target": [ + 44, + 34, + 120, + 32 + ], + "next": [ + "活动_进入关卡", + "活动_任务奖励_返回" + ] + }, + "活动_进入关卡": { + "recognition": "OCR", + "expected" : "海滨", + "recommended roi" : [914, 543, 337, 171], + "action": "Click", + "target": [1016, 570, 101, 101], + "next": [ + "活动_关卡_难度选择", + "活动_进入关卡" + ] + }, + "活动_关卡_难度选择": { + "recognition": "OCR", + "action": "Click", + "expected": "模式", + "roi" : [4, 198, 118, 51], + "next": [ + "活动_关卡_选择关卡1", + "活动_关卡_难度选择" + ] + }, + "活动_关卡_选择关卡1": { + "recognition": "OCR", + "action": "Swipe", + "expected" : "漆黑", + "recommended roi" : [996, 605, 94, 39], + "begin": [1095, 625, 10, 10], + "end": [39, 625,10, 10], + "next":[ + "活动_关卡_选择关卡2"] + }, + "活动_关卡_选择关卡2":{ + "recognition":"OCR", + "action":"Click", + "expected":"幻海之主", + "next": [ + "活动_扫荡" + ] + }, + "活动_扫荡": { + "recognition": "OCR", + "expected": [ + "扫荡" + ], + "roi" : [794, 546, 92, 84], + "action": "Click", + "next": [ + "活动_扫荡开始" + ] + }, + "活动_扫荡奖励": { + "recognition": "OCR", + "expected": [ + "扫荡成功" + ], + "roi":[7, 9, 482, 153], + "pre_delay":200, + "action": "Click", + "next": [ + "[JumpBack]活动_扫荡升级", + "活动_扫荡", + "活动_扫荡奖励" + ] + }, + "活动_扫荡升级": { + "recognition": "TemplateMatch", + "template": "Combat/DailyExplore_LevelUp.png", + "roi": [ + 540, + 242, + 207, + 91 + ], + "action": "Click" + }, + "活动_扫荡开始": { + "recognition": "OCR", + "expected": [ + "开始战斗" + ], + "roi" : [811,535,260,48], + "action": "Click", + "timeout":3000, + "next": [ + "活动_无票券1", + "活动_无票券2", + "[JumpBack]活动_扫荡双倍标记", + "活动_扫荡奖励" + ] + }, + "活动_扫荡双倍标记": { + "recognition": "OCR", + "expected": [ + "开启" + ], + "roi": [ + 702, + 398, + 252, + 100 + ], + "action": "Click" + }, + "活动_无票券1": { + "recognition": "OCR", + "expected": + "取消", + "action": "Click", + "next": ["活动_无票券1.1"] + }, + "活动_无票券1.1": { + "recognition": "OCR", + "expected": + "扫荡", + "roi" : [174, 105, 102, 53], + "action":"Click", + "target": [46, 30, 117, 38], + "pre_wait_freezes":500, + "next": ["活动_无票券2.1"] + }, + "活动_无票券2": { + "recognition": "OCR", + "expected":"兑换" , + "roi":[10, 81, 157, 68], + "action":"Click", + "target":[43, 29, 118, 36], + "pre_wait_freezes":500, + "next": ["活动_无票券2.1"] + }, + "活动_无票券2.1": { + "recognition": "OCR", + "expected": "扫荡", + "roi" : [794, 546, 92, 84], + "action": "Click", + "target":[25, 20, 150, 59], + "pre_wait_freezes":500, + "next": ["活动_无票券2.2"] + }, + "活动_无票券2.2": { + "recognition":"OCR", + "expected":"幻海之主", + "roi":[742, 588, 224, 101], + "action": "Click", + "target":[25, 20, 150, 59], + "pre_wait_freezes":500, + "next": ["活动_领取奖励"] + }, + "活动_领取奖励":{ + "recognition":"OCR", + "expected":"碧波", + "roi":[74, 429, 224, 128], + "action":"Click", + "next":["活动_领取奖励1","活动_领取奖励2"] + }, + "活动_领取奖励1":{ + "recognition":"OCR", + "expected":"领取", + "roi":[1027, 249, 241, 85], + "action":"Click", + "next": ["通用-返回主页"] + }, + "活动_领取奖励2":{ + "recognition":"OCR", + "expected":"获取", + "roi":[1027, 249, 241, 85], + "target": [46, 30, 117, 38], + "next": ["通用-返回主页"] + } +} diff --git "a/assets/resource/base/pipeline/\351\200\232\347\224\250-\346\211\253\350\215\241.json" "b/assets/resource/base/pipeline/\351\200\232\347\224\250-\346\211\253\350\215\241.json" index 44794ae..33e0f25 100644 --- "a/assets/resource/base/pipeline/\351\200\232\347\224\250-\346\211\253\350\215\241.json" +++ "b/assets/resource/base/pipeline/\351\200\232\347\224\250-\346\211\253\350\215\241.json" @@ -22,10 +22,8 @@ "enabled": true, "next": [ "检查体力-红", - "检查体力-白" - ], - "interrupt": [ - "重连网络" + "检查体力-白", + "[JumpBack]重连网络" ] }, "增加次数": { @@ -315,13 +313,12 @@ }, "action": "Click", "next": [ - "扫荡升级", + "[JumpBack]扫荡升级", "扫荡成功-检查", "扫荡结束" ] }, "扫荡升级": { - "is_sub": true, "recognition": "TemplateMatch", "template": "Combat/DailyExplore_LevelUp.png", "roi": [ @@ -365,4 +362,4 @@ "扫荡" ] } -} \ No newline at end of file +} diff --git "a/assets/resource/base/pipeline/\351\200\232\347\224\250.json" "b/assets/resource/base/pipeline/\351\200\232\347\224\250.json" index 8ea03bc..2b5ef88 100644 --- "a/assets/resource/base/pipeline/\351\200\232\347\224\250.json" +++ "b/assets/resource/base/pipeline/\351\200\232\347\224\250.json" @@ -1,284 +1,275 @@ -{ - "战斗_自动战斗": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "Combat/Combat_Auto.png", - "roi": [ - 1069, - 27, - 105, - 59 - ], - "action": "Click" - }, - "战斗_启用二倍速": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "Combat/Combat_Doublespeed.png", - "roi": [ - 973, - 30, - 95, - 57 - ], - "threshold": 0.9, - "action": "Click", - "target": [ - 1012, - 52, - 10, - 10 - ] - }, - "首页_出击": { - "recognition": "TemplateMatch", - "template": "StartUp/chuji.png", - "roi": [ - 1094, - 539, - 176, - 175 - ], - "action": "Click", - "next_doc": "Set in code." - }, - "子任务_进入首页": { - "is_sub": true, - "next": [ - "首页标志2", - "子任务_点击首页按钮", - "子任务_点击返回", - "子任务_获得物品", - "子任务_点击取消", - "子任务_点击确认", - "子任务_关闭公告", - "签到", - "首页标志1", - "开始游戏", - "NERI" - ] - }, - "子任务_点击确认": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "确认" - ], - "roi": [ - 665, - 364, - 331, - 152 - ], - "action": "Click" - }, - "子任务_点击取消": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "取消" - ], - "roi": [ - 330, - 346, - 313, - 150 - ], - "action": "Click" - }, - "子任务_获得物品": { - "is_sub": true, - "recognition": "OCR", - "expected": [ - "获得物品", - "合成成功" - ], - "roi": [ - 447, - 117, - 405, - 117 - ], - "action": "Click", - "post_delay": 1000 - }, - "子任务_点击返回": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "StartUp/BackButton.png", - "roi": [ - 14, - 10, - 126, - 72 - ], - "action": "Click" - }, - "子任务_点击首页按钮": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": [ - "StartUp/HomeButton.png", - "StartUp/HomeButton1.png" - ], - "roi": [ - 180, - 10, - 100, - 70 - ], - "action": "Click", - "post_delay": 5000 - }, - "子任务_关闭公告": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "StartUp/CloseAnnouncement.png", - "roi": [ - 900, - 55, - 362, - 200 - ], - "action": "Click" - }, - "子任务_关闭周年公告": { - "is_sub": true, - "recognition": "TemplateMatch", - "template": "StartUp/ZNGG.png", - "roi": [ - 900, - 55, - 362, - 200 - ], - "action": "Click" - }, - "通用-返回主页": { - "recognition": "TemplateMatch", - "template": "返回主页.png", - "roi": [ - 164, - 21, - 112, - 51 - ], - "pre_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "action": "Click", - "focus": "返回主页" - }, - "通用-确认获得物品": { - "recognition": "OCR", - "expected": "获得物品", - "roi": [ - 511, - 154, - 276, - 116 - ], - "pre_wait_freezes": { - "time": 2000, - "threshold": 0.95 - }, - "action": "Click" - }, - "通用-返回": { - "recognition": "TemplateMatch", - "template": "返回.png", - "roi": [ - 11, - 8, - 426, - 102 - ], - "pre_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "action": "Click" - }, - "通用-啥也不做": { - "action": "DoNothing", - "focus": "结束任务" - }, - "活动探索-首页-出击": { - "recognition": "TemplateMatch", - "template": "StartUp/chuji.png", - "roi": [ - 1085, - 557, - 194, - 152 - ], - "action": "Click", - "post_wait_freezes": 200, - "next": "进入活动探索界面" - }, - "进入活动探索界面": { - "recognition": "OCR", - "expected": "活动探索", - "roi": [ - 527, - 110, - 227, - 90 - ], - "action": "Click", - "post_wait_freezes": { - "time": 1000, - "threshold": 0.95 - }, - "next": "活动选择", - "interrupt": "活动探索-右滑" - }, - "活动选择": { - "recognition": "OCR", - "expected": "活动选择", - "roi": [ - 91, - 173, - 1139, - 422 - ], - "action": "Click", - "post_wait_freezes": { - "time": 1000, - "threshold": 0.95 - } - }, - "活动探索-右滑": { - "action": "Swipe", - "begin": [ - 1116, - 376, - 37, - 47 - ], - "end": [ - 858, - 379, - 49, - 44 - ], - "duration": 1000, - "post_wait_freezes": { - "time": 1000, - "threshold": 0.95 - } - }, - "跳过boss演出动画": { - "is_sub": true, - "recognition": "OCR", - "expected": "跳过", - "roi": [ - 1119, - 30, - 87, - 44 - ], - "action": "Click" - } -} \ No newline at end of file +{ + "战斗_自动战斗": { + "recognition": "TemplateMatch", + "template": "Combat/Combat_Auto.png", + "roi": [ + 1069, + 27, + 105, + 59 + ], + "action": "Click" + }, + "战斗_启用二倍速": { + "recognition": "TemplateMatch", + "template": "Combat/Combat_Doublespeed.png", + "roi": [ + 973, + 30, + 95, + 57 + ], + "threshold": 0.9, + "action": "Click", + "target": [ + 1012, + 52, + 10, + 10 + ] + }, + "首页_出击": { + "recognition": "TemplateMatch", + "template": "StartUp/chuji.png", + "roi": [ + 1094, + 539, + 176, + 175 + ], + "action": "Click", + "next_doc": "Set in code." + }, + "子任务_进入首页": { + "next": [ + "首页标志2", + "[JumpBack]子任务_点击首页按钮", + "[JumpBack]子任务_点击返回", + "[JumpBack]子任务_获得物品", + "[JumpBack]子任务_点击取消", + "[JumpBack]子任务_点击确认", + "[JumpBack]子任务_关闭公告", + "签到", + "首页标志1", + "开始游戏", + "NERI" + ] + }, + "子任务_点击确认": { + "recognition": "OCR", + "expected": [ + "确认" + ], + "roi": [ + 665, + 364, + 331, + 152 + ], + "action": "Click" + }, + "子任务_点击取消": { + "recognition": "OCR", + "expected": [ + "取消" + ], + "roi": [ + 330, + 346, + 313, + 150 + ], + "action": "Click" + }, + "子任务_获得物品": { + "recognition": "OCR", + "expected": [ + "获得物品", + "合成成功" + ], + "roi": [ + 447, + 117, + 405, + 117 + ], + "action": "Click", + "post_delay": 1000 + }, + "子任务_点击返回": { + "recognition": "TemplateMatch", + "template": "StartUp/BackButton.png", + "roi": [ + 14, + 10, + 126, + 72 + ], + "action": "Click" + }, + "子任务_点击首页按钮": { + "recognition": "TemplateMatch", + "template": [ + "StartUp/HomeButton.png", + "StartUp/HomeButton1.png" + ], + "roi": [ + 180, + 10, + 100, + 70 + ], + "action": "Click", + "post_delay": 5000 + }, + "子任务_关闭公告": { + "recognition": "TemplateMatch", + "template": "StartUp/CloseAnnouncement.png", + "roi": [ + 900, + 55, + 362, + 200 + ], + "action": "Click" + }, + "子任务_关闭周年公告": { + "recognition": "TemplateMatch", + "template": "StartUp/ZNGG.png", + "roi": [ + 900, + 55, + 362, + 200 + ], + "action": "Click" + }, + "通用-返回主页": { + "recognition": "TemplateMatch", + "template": "返回主页.png", + "roi": [ + 164, + 21, + 112, + 51 + ], + "pre_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "action": "Click", + "focus": "返回主页" + }, + "通用-确认获得物品": { + "recognition": "OCR", + "expected": "获得物品", + "roi": [ + 511, + 154, + 276, + 116 + ], + "pre_wait_freezes": { + "time": 2000, + "threshold": 0.95 + }, + "action": "Click" + }, + "通用-返回": { + "recognition": "TemplateMatch", + "template": "返回.png", + "roi": [ + 11, + 8, + 426, + 102 + ], + "pre_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "action": "Click" + }, + "通用-啥也不做": { + "action": "DoNothing", + "focus": "结束任务" + }, + "活动探索-首页-出击": { + "recognition": "TemplateMatch", + "template": "StartUp/chuji.png", + "roi": [ + 1085, + 557, + 194, + 152 + ], + "action": "Click", + "post_wait_freezes": 200, + "next": ["进入活动探索界面"] + }, + "进入活动探索界面": { + "recognition": "OCR", + "expected": "活动探索", + "roi": [ + 527, + 110, + 227, + 90 + ], + "action": "Click", + "post_wait_freezes": { + "time": 1000, + "threshold": 0.95 + }, + "next": [ + "活动选择", + "[JumpBack]活动探索-右滑" + ] + }, + "活动选择": { + "recognition": "OCR", + "expected": "活动选择", + "roi": [ + 91, + 173, + 1139, + 422 + ], + "action": "Click", + "post_wait_freezes": { + "time": 1000, + "threshold": 0.95 + } + }, + "活动探索-右滑": { + "action": "Swipe", + "begin": [ + 1116, + 376, + 37, + 47 + ], + "end": [ + 858, + 379, + 49, + 44 + ], + "duration": 1000, + "post_wait_freezes": { + "time": 1000, + "threshold": 0.95 + } + }, + "跳过boss演出动画": { + "recognition": "OCR", + "expected": "跳过", + "roi": [ + 1119, + 30, + 87, + 44 + ], + "action": "Click" + } +} diff --git "a/assets/resource/base/pipeline/\351\231\220\346\227\266\350\264\270\346\230\223.json" "b/assets/resource/base/pipeline/\351\231\220\346\227\266\350\264\270\346\230\223.json" index f785585..449cd8a 100644 --- "a/assets/resource/base/pipeline/\351\231\220\346\227\266\350\264\270\346\230\223.json" +++ "b/assets/resource/base/pipeline/\351\231\220\346\227\266\350\264\270\346\230\223.json" @@ -1,73 +1,73 @@ -{ - "Time-limited Shopping": { - "next": [ - "子任务_关闭公告", - "Shop1", - "子任务_进入首页" - ] - }, - "Shop1": { - "recognition": "OCR", - "expected": [ - "补给站" - ], - "roi": [ - 1005, - 421, - 112, - 289 - ], - "action": "Click", - "next": [ - "time_limited", - "Shop1" - ] - }, - "time_limited": { - "recognition": "OCR", - "expected": [ - "限时贸易所" - ], - "roi" : [513,59,231,99], - "action": "Click", - "post_delay": 2000, - "next": [ - "Buy_something", - "进入首页" - ] - }, - "Buy_something": { - "recognition": "OCR", - "expected": ["亚金合金","亚金电池","亚金组件","亚金半导体","涅槃剂","晶片", - "幻金能源","幻金碳","荧晶精华瓶","荧晶单元","亚金外壳","亚金蓄能器", - "亚金装置","亚金二极管","凝胶","结晶体","幻金聚变器","幻金刚石", - "荧晶培养罐","荧晶密钥","武装技能训练","稀有模块"], - "action": "Click", - "post_delay": 1000, - "next": [ - "Buyit", - "进入首页", - "Buy_something" - ] - }, - "Buyit": { - "recognition": "OCR", - "expected": [ - "购买" - ], - "roi": [ - 758, - 513, - 191, - 75 - ], - "action": "Click", - "post_delay": 1000, - "next": [ - "子任务_获得物品", - "Buy_something", - "Buyit", - "进入首页" - ] - } -} \ No newline at end of file +{ + "Time-limited Shopping": { + "next": [ + "[JumpBack]子任务_关闭公告", + "Shop1", + "[JumpBack]子任务_进入首页" + ] + }, + "Shop1": { + "recognition": "OCR", + "expected": [ + "补给站" + ], + "roi": [ + 1005, + 421, + 112, + 289 + ], + "action": "Click", + "next": [ + "time_limited", + "Shop1" + ] + }, + "time_limited": { + "recognition": "OCR", + "expected": [ + "限时贸易所" + ], + "roi" : [513,59,231,99], + "action": "Click", + "post_delay": 2000, + "next": [ + "Buy_something", + "进入首页" + ] + }, + "Buy_something": { + "recognition": "OCR", + "expected": ["亚金合金","亚金电池","亚金组件","亚金半导体","涅槃剂","晶片", + "幻金能源","幻金碳","荧晶精华瓶","荧晶单元","亚金外壳","亚金蓄能器", + "亚金装置","亚金二极管","凝胶","结晶体","幻金聚变器","幻金刚石", + "荧晶培养罐","荧晶密钥","武装技能训练","稀有模块"], + "action": "Click", + "post_delay": 1000, + "next": [ + "Buyit", + "进入首页", + "Buy_something" + ] + }, + "Buyit": { + "recognition": "OCR", + "expected": [ + "购买" + ], + "roi": [ + 758, + 513, + 191, + 75 + ], + "action": "Click", + "post_delay": 1000, + "next": [ + "[JumpBack]子任务_获得物品", + "Buy_something", + "Buyit", + "进入首页" + ] + } +} diff --git "a/assets/resource/base/pipeline/\351\242\206\345\217\226\345\245\226\345\212\261.json" "b/assets/resource/base/pipeline/\351\242\206\345\217\226\345\245\226\345\212\261.json" index fed0c7c..2baf9ce 100644 --- "a/assets/resource/base/pipeline/\351\242\206\345\217\226\345\245\226\345\212\261.json" +++ "b/assets/resource/base/pipeline/\351\242\206\345\217\226\345\245\226\345\212\261.json" @@ -1,446 +1,446 @@ -{ - "Awards": { - "next": [ - "子任务_点击取消", - "子任务_关闭公告", - "Mail", - "NoMail", - "子任务_进入首页" - ] - }, - "Mail": { - "recognition": "TemplateMatch", - "template": "Infrastructures/mail.png", - "roi": [ - 1025, - 15, - 120, - 50 - ], - "action": "Click", - "post_delay": 2000, - "next": [ - "Mail_Receive", - "Mail", - "进入首页" - ] - }, - "Mail_Receive": { - "recognition": "ColorMatch", - "roi": [ - 230, - 606, - 160, - 64 - ], - "method": 4, - "lower": [ - 230, - 190, - 76 - ], - "upper": [ - 255, - 210, - 90 - ], - "count": 7, - "action": "Click", - "post_delay": 2000, - "next": [ - "DailyTask", - "NoDailyTask", - "Mail_Receive", - "子任务_进入首页" - ] - }, - "NoMail": { - "recognition": "TemplateMatch", - "template": "StartUp/NoMail.png", - "roi": [ - 1025, - 15, - 120, - 50 - ], - "next": [ - "DailyTask", - "NoDailyTask" - ] - }, - "DailyTask": { - "recognition": "TemplateMatch", - "template": "StartUp/DailyTask.png", - "roi": [ - 684, - 606, - 80, - 80 - ], - "action": "Click", - "next": [ - "DailyTask_Receive0", - "DailyTask_Receive1", - "DailyTask_Receive2", - "DailyTask" - ] - }, - "DailyTask_Receive0": { - "recognition": "ColorMatch", - "roi": [ - 23, - 233, - 36, - 43 - ], - "method": 4, - "lower": [ - 120, - 120, - 120 - ], - "upper": [ - 160, - 160, - 160 - ], - "count": 7, - "action": "Click", - "next": [ - "DailyTask_Receive1", - "DailyTask_Receive2" - ] - }, - "DailyTask_Receive1": { - "recognition": "ColorMatch", - "roi": [ - 1083, - 102, - 44, - 30 - ], - "method": 4, - "lower": [ - 230, - 190, - 76 - ], - "upper": [ - 255, - 210, - 90 - ], - "count": 7, - "action": "Click", - "next": [ - "子任务_获得物品", - "DailyTask_Receive1", - "DailyTask_Receive2" - ] - }, - "DailyTask_Receive2": { - "recognition": "ColorMatch", - "roi": [ - 23, - 303, - 36, - 43 - ], - "method": 4, - "lower": [ - 120, - 120, - 120 - ], - "upper": [ - 160, - 160, - 160 - ], - "count": 7, - "action": "Click", - "next": [ - "DailyTask_Receive3", - "BattlePass", - "NoBattlePass", - "子任务_进入首页" - ] - }, - "DailyTask_Receive3": { - "recognition": "ColorMatch", - "roi": [ - 1083, - 102, - 44, - 30 - ], - "method": 4, - "lower": [ - 230, - 190, - 76 - ], - "upper": [ - 255, - 210, - 90 - ], - "count": 7, - "action": "Click", - "next": [ - "子任务_获得物品", - "BattlePass", - "NoBattlePass", - "DailyTask_Receive3", - "子任务_进入首页" - ] - }, - "NoDailyTask": { - "recognition": "TemplateMatch", - "template": "StartUp/NoDailyTask.png", - "roi": [ - 684, - 606, - 80, - 80 - ], - "next": [ - "BattlePass", - "NoBattlePass", - "子任务_进入首页" - ] - }, - "BattlePass": { - "recognition": "TemplateMatch", - "template": "StartUp/DailyTask.png", - "roi": [ - 44, - 97, - 36, - 36 - ], - "action": "Click", - "next": [ - "BattlePass_ReceiveMission", - "BattlePass" - ] - }, - "BattlePass_ReceiveMission": { - "recognition": "OCR", - "expected": [ - "任务" - ], - "roi": [ - 948, - 274, - 159, - 76 - ], - "action": "Click", - "next": [ - "BattlePass_ReceiveDailyMissionGet", - "BattlePass_ReceiveWeeklyMission", - "BattlePass_ReceiveMission" - ] - }, - "BattlePass_ReceiveDailyMissionGet": { - "recognition": "ColorMatch", - "roi": [ - 922, - 211, - 36, - 26 - ], - "method": 4, - "lower": [ - 220, - 180, - 70 - ], - "upper": [ - 255, - 220, - 100 - ], - "count": 7, - "action": "Click", - "post_delay": 1000, - "next": [ - "子任务_获得物品", - "BattlePass_ReceiveWeeklyMission", - "BattlePass_ReceiveDailyMissionGet" - ] - }, - "BattlePass_ReceiveWeeklyMission": { - "recognition": "ColorMatch", - "roi": [ - 197, - 218, - 40, - 37 - ], - "method": 4, - "lower": [ - 110, - 110, - 110 - ], - "upper": [ - 160, - 160, - 160 - ], - "count": 2, - "action": "Click", - "post_delay": 2000, - "next": [ - "子任务_获得物品", - "BattlePass_ReceiveWeeklyMissionGet", - "BattlePass_ReceiveMonthlyMission", - "BattlePass_ReceiveWeeklyMission" - ] - }, - "BattlePass_ReceiveWeeklyMissionGet": { - "recognition": "ColorMatch", - "roi": [ - 922, - 211, - 36, - 26 - ], - "method": 4, - "lower": [ - 220, - 180, - 70 - ], - "upper": [ - 255, - 220, - 100 - ], - "count": 7, - "action": "Click", - "next": [ - "子任务_获得物品", - "BattlePass_ReceiveMonthlyMission", - "BattlePass_ReceiveWeeklyMissionGet" - ] - }, - "BattlePass_ReceiveMonthlyMission": { - "recognition": "ColorMatch", - "roi": [ - 195, - 291, - 40, - 37 - ], - "method": 4, - "lower": [ - 110, - 110, - 110 - ], - "upper": [ - 160, - 160, - 160 - ], - "count": 2, - "action": "Click", - "post_delay": 2000, - "next": [ - "子任务_获得物品", - "BattlePass_ReceiveMonthlyMissionGet", - "BattlePass_MissionExist", - "BattlePass_ReceiveMonthlyMission" - ] - }, - "BattlePass_ReceiveMonthlyMissionGet": { - "recognition": "ColorMatch", - "roi": [ - 922, - 211, - 36, - 26 - ], - "method": 4, - "lower": [ - 220, - 180, - 70 - ], - "upper": [ - 255, - 220, - 100 - ], - "count": 7, - "action": "Click", - "next": [ - "子任务_获得物品", - "BattlePass_MissionExist", - "BattlePass_ReceiveMonthlyMissionGet" - ] - }, - "BattlePass_MissionExist": { - "recognition": "OCR", - "expected": [ - "本期任务" - ], - "roi": [ - 182, - 260, - 195, - 85 - ], - "action": "Click", - "target": [ - 1170, - 328, - 10, - 10 - ], - "next": [ - "BattlePass_ReceiveAll", - "进入首页" - ] - }, - "BattlePass_ReceiveAll": { - "recognition": "ColorMatch", - "roi": [ - 1218, - 319, - 36, - 26 - ], - "method": 4, - "lower": [ - 220, - 180, - 70 - ], - "upper": [ - 255, - 220, - 100 - ], - "count": 7, - "action": "Click", - "next": [ - "进入首页" - ] - }, - "NoBattlePass": { - "recognition": "OCR", - "expected": [ - "指南" - ], - "roi": [ - 44, - 97, - 160, - 70 - ] - } -} \ No newline at end of file +{ + "Awards": { + "next": [ + "[JumpBack]子任务_点击取消", + "[JumpBack]子任务_关闭公告", + "Mail", + "NoMail", + "[JumpBack]子任务_进入首页" + ] + }, + "Mail": { + "recognition": "TemplateMatch", + "template": "Infrastructures/mail.png", + "roi": [ + 1025, + 15, + 120, + 50 + ], + "action": "Click", + "post_delay": 2000, + "next": [ + "Mail_Receive", + "Mail", + "进入首页" + ] + }, + "Mail_Receive": { + "recognition": "ColorMatch", + "roi": [ + 230, + 606, + 160, + 64 + ], + "method": 4, + "lower": [ + 230, + 190, + 76 + ], + "upper": [ + 255, + 210, + 90 + ], + "count": 7, + "action": "Click", + "post_delay": 2000, + "next": [ + "DailyTask", + "NoDailyTask", + "Mail_Receive", + "[JumpBack]子任务_进入首页" + ] + }, + "NoMail": { + "recognition": "TemplateMatch", + "template": "StartUp/NoMail.png", + "roi": [ + 1025, + 15, + 120, + 50 + ], + "next": [ + "DailyTask", + "NoDailyTask" + ] + }, + "DailyTask": { + "recognition": "TemplateMatch", + "template": "StartUp/DailyTask.png", + "roi": [ + 684, + 606, + 80, + 80 + ], + "action": "Click", + "next": [ + "DailyTask_Receive0", + "DailyTask_Receive1", + "DailyTask_Receive2", + "DailyTask" + ] + }, + "DailyTask_Receive0": { + "recognition": "ColorMatch", + "roi": [ + 23, + 233, + 36, + 43 + ], + "method": 4, + "lower": [ + 120, + 120, + 120 + ], + "upper": [ + 160, + 160, + 160 + ], + "count": 7, + "action": "Click", + "next": [ + "DailyTask_Receive1", + "DailyTask_Receive2" + ] + }, + "DailyTask_Receive1": { + "recognition": "ColorMatch", + "roi": [ + 1083, + 102, + 44, + 30 + ], + "method": 4, + "lower": [ + 230, + 190, + 76 + ], + "upper": [ + 255, + 210, + 90 + ], + "count": 7, + "action": "Click", + "next": [ + "[JumpBack]子任务_获得物品", + "DailyTask_Receive1", + "DailyTask_Receive2" + ] + }, + "DailyTask_Receive2": { + "recognition": "ColorMatch", + "roi": [ + 23, + 303, + 36, + 43 + ], + "method": 4, + "lower": [ + 120, + 120, + 120 + ], + "upper": [ + 160, + 160, + 160 + ], + "count": 7, + "action": "Click", + "next": [ + "DailyTask_Receive3", + "BattlePass", + "NoBattlePass", + "[JumpBack]子任务_进入首页" + ] + }, + "DailyTask_Receive3": { + "recognition": "ColorMatch", + "roi": [ + 1083, + 102, + 44, + 30 + ], + "method": 4, + "lower": [ + 230, + 190, + 76 + ], + "upper": [ + 255, + 210, + 90 + ], + "count": 7, + "action": "Click", + "next": [ + "[JumpBack]子任务_获得物品", + "BattlePass", + "NoBattlePass", + "DailyTask_Receive3", + "[JumpBack]子任务_进入首页" + ] + }, + "NoDailyTask": { + "recognition": "TemplateMatch", + "template": "StartUp/NoDailyTask.png", + "roi": [ + 684, + 606, + 80, + 80 + ], + "next": [ + "BattlePass", + "NoBattlePass", + "[JumpBack]子任务_进入首页" + ] + }, + "BattlePass": { + "recognition": "TemplateMatch", + "template": "StartUp/DailyTask.png", + "roi": [ + 44, + 97, + 36, + 36 + ], + "action": "Click", + "next": [ + "BattlePass_ReceiveMission", + "BattlePass" + ] + }, + "BattlePass_ReceiveMission": { + "recognition": "OCR", + "expected": [ + "任务" + ], + "roi": [ + 948, + 274, + 159, + 76 + ], + "action": "Click", + "next": [ + "BattlePass_ReceiveDailyMissionGet", + "BattlePass_ReceiveWeeklyMission", + "BattlePass_ReceiveMission" + ] + }, + "BattlePass_ReceiveDailyMissionGet": { + "recognition": "ColorMatch", + "roi": [ + 922, + 211, + 36, + 26 + ], + "method": 4, + "lower": [ + 220, + 180, + 70 + ], + "upper": [ + 255, + 220, + 100 + ], + "count": 7, + "action": "Click", + "post_delay": 1000, + "next": [ + "[JumpBack]子任务_获得物品", + "BattlePass_ReceiveWeeklyMission", + "BattlePass_ReceiveDailyMissionGet" + ] + }, + "BattlePass_ReceiveWeeklyMission": { + "recognition": "ColorMatch", + "roi": [ + 197, + 218, + 40, + 37 + ], + "method": 4, + "lower": [ + 110, + 110, + 110 + ], + "upper": [ + 160, + 160, + 160 + ], + "count": 2, + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]子任务_获得物品", + "BattlePass_ReceiveWeeklyMissionGet", + "BattlePass_ReceiveMonthlyMission", + "BattlePass_ReceiveWeeklyMission" + ] + }, + "BattlePass_ReceiveWeeklyMissionGet": { + "recognition": "ColorMatch", + "roi": [ + 922, + 211, + 36, + 26 + ], + "method": 4, + "lower": [ + 220, + 180, + 70 + ], + "upper": [ + 255, + 220, + 100 + ], + "count": 7, + "action": "Click", + "next": [ + "[JumpBack]子任务_获得物品", + "BattlePass_ReceiveMonthlyMission", + "BattlePass_ReceiveWeeklyMissionGet" + ] + }, + "BattlePass_ReceiveMonthlyMission": { + "recognition": "ColorMatch", + "roi": [ + 195, + 291, + 40, + 37 + ], + "method": 4, + "lower": [ + 110, + 110, + 110 + ], + "upper": [ + 160, + 160, + 160 + ], + "count": 2, + "action": "Click", + "post_delay": 2000, + "next": [ + "[JumpBack]子任务_获得物品", + "BattlePass_ReceiveMonthlyMissionGet", + "BattlePass_MissionExist", + "BattlePass_ReceiveMonthlyMission" + ] + }, + "BattlePass_ReceiveMonthlyMissionGet": { + "recognition": "ColorMatch", + "roi": [ + 922, + 211, + 36, + 26 + ], + "method": 4, + "lower": [ + 220, + 180, + 70 + ], + "upper": [ + 255, + 220, + 100 + ], + "count": 7, + "action": "Click", + "next": [ + "[JumpBack]子任务_获得物品", + "BattlePass_MissionExist", + "BattlePass_ReceiveMonthlyMissionGet" + ] + }, + "BattlePass_MissionExist": { + "recognition": "OCR", + "expected": [ + "本期任务" + ], + "roi": [ + 182, + 260, + 195, + 85 + ], + "action": "Click", + "target": [ + 1170, + 328, + 10, + 10 + ], + "next": [ + "BattlePass_ReceiveAll", + "进入首页" + ] + }, + "BattlePass_ReceiveAll": { + "recognition": "ColorMatch", + "roi": [ + 1218, + 319, + 36, + 26 + ], + "method": 4, + "lower": [ + 220, + 180, + 70 + ], + "upper": [ + 255, + 220, + 100 + ], + "count": 7, + "action": "Click", + "next": [ + "进入首页" + ] + }, + "NoBattlePass": { + "recognition": "OCR", + "expected": [ + "指南" + ], + "roi": [ + 44, + 97, + 160, + 70 + ] + } +} diff --git a/tools/migrate_pipeline_v5.py b/tools/migrate_pipeline_v5.py new file mode 100644 index 0000000..9fb2eb0 --- /dev/null +++ b/tools/migrate_pipeline_v5.py @@ -0,0 +1,797 @@ +#!/usr/bin/env python3 +""" +Pipeline JSON 迁移脚本 - 将旧版 is_sub/interrupt 转换为 v5.1 的 [JumpBack] 前缀格式 + +使用方法: + python migrate_pipeline_v5.py <目录路径> [--dry-run] [--backup] + +参数: + 目录路径: 包含 pipeline JSON 文件的目录 + --dry-run: 仅显示将要进行的更改,不实际修改文件 + --backup: 在修改前备份原文件(添加 .bak 后缀) + +转换规则: + 1. interrupt 字段中的节点会被加上 `[JumpBack]` 前缀后合并到 next 字段 + 2. 所有 is_sub: true 的节点,在被其他节点的 next/on_error 引用时会被加上 `[JumpBack]` 前缀 + (支持跨文件引用:会先扫描所有文件收集全局 is_sub 节点) + 3. 删除 is_sub 和 interrupt 字段 + +特性: + - 支持 JSONC(带注释的 JSON,包括 // 和 /* */ 两种注释) + - **保留原文件中的所有注释** + - 保持 JSON 字段顺序不变 + - 保持原文件的缩进风格 + - 支持跨文件节点引用 + +示例: + # 预览更改(不实际修改文件) + python migrate_pipeline_v5.py ./pipeline --dry-run + + # 执行迁移并备份原文件 + python migrate_pipeline_v5.py ./pipeline --backup + + # 直接执行迁移 + python migrate_pipeline_v5.py ./pipeline +""" + +import re +import os +import sys +import shutil +import argparse +from pathlib import Path +from typing import Any +from collections import OrderedDict + + +def remove_jsonc_comments_for_parsing(text: str) -> str: + """ + 移除 JSONC 文件中的注释用于解析,但保留原文本用于重建 + 支持 // 和 /* */ 两种注释 + """ + result = [] + i = 0 + in_string = False + string_char = None + + while i < len(text): + if in_string: + if text[i] == "\\" and i + 1 < len(text): + result.append(text[i : i + 2]) + i += 2 + continue + elif text[i] == string_char: + in_string = False + string_char = None + result.append(text[i]) + i += 1 + continue + else: + result.append(text[i]) + i += 1 + continue + + if text[i] in ('"', "'"): + in_string = True + string_char = text[i] + result.append(text[i]) + i += 1 + continue + + # 检查单行注释 // + if text[i : i + 2] == "//": + while i < len(text) and text[i] != "\n": + i += 1 + continue + + # 检查多行注释 /* */ + if text[i : i + 2] == "/*": + i += 2 + while i < len(text) and text[i : i + 2] != "*/": + i += 1 + i += 2 + continue + + result.append(text[i]) + i += 1 + + return "".join(result) + + +def remove_trailing_commas(text: str) -> str: + """移除 JSON 中的尾逗号(在 ] 或 } 之前的逗号)""" + result = [] + i = 0 + in_string = False + + while i < len(text): + if in_string: + if text[i] == "\\" and i + 1 < len(text): + result.append(text[i : i + 2]) + i += 2 + continue + elif text[i] == '"': + in_string = False + result.append(text[i]) + i += 1 + continue + + if text[i] == '"': + in_string = True + result.append(text[i]) + i += 1 + continue + + if text[i] == ",": + j = i + 1 + while j < len(text) and text[j] in " \t\n\r": + j += 1 + if j < len(text) and text[j] in "]}": + i += 1 + continue + + result.append(text[i]) + i += 1 + + return "".join(result) + + +def parse_jsonc(text: str) -> Any: + """解析 JSONC 文件内容,返回 OrderedDict 以保持字段顺序""" + import json + + clean_text = remove_jsonc_comments_for_parsing(text) + clean_text = remove_trailing_commas(clean_text) + return json.loads(clean_text, object_pairs_hook=OrderedDict) + + +def detect_indent(text: str) -> str: + """检测 JSON 文件的缩进风格""" + lines = text.split("\n") + for line in lines: + stripped = line.lstrip() + if stripped and stripped[0] not in "{}[]": + indent = line[: len(line) - len(stripped)] + if indent: + return indent + return " " # 默认 4 空格 + + +def format_array_value(value: list, indent: str = " ", base_indent: str = "") -> str: + """ + 格式化数组值为多行或单行格式 + + Args: + value: 数组值 + indent: 缩进字符串 + base_indent: 当前字段的基础缩进 + + Returns: + 格式化后的数组字符串(不含字段名) + """ + import json + + if not value: + return "[]" + + # 判断是否需要多行格式 + # 条件:超过1个元素,或单行总长度超过80字符 + json_str = json.dumps(value, ensure_ascii=False) + should_multiline = len(value) > 1 or len(json_str) > 80 + + if should_multiline: + # 多行格式(紧凑风格) + lines = [ + f"{base_indent}{indent}{json.dumps(item, ensure_ascii=False)}" + for item in value + ] + # 为非最后一个元素添加逗号 + for i in range(len(lines) - 1): + lines[i] += "," + + result = "[\n" + "\n".join(lines) + f"\n{base_indent}]" + return result + else: + # 单行格式 + return json_str + + +def rebuild_json_with_comments( + original_text: str, original_data: dict, migrated_data: dict, indent: str = " " +) -> str: + """ + 基于原始文本和迁移后的数据重建 JSON,保留注释 + + 使用更精确的方式在原文本上进行替换操作 + """ + result_text = original_text + + # 遍历所有节点,应用修改 + for node_name, migrated_node_data in migrated_data.items(): + if not isinstance(migrated_node_data, dict): + continue + + original_node_data = original_data.get(node_name, {}) + if not isinstance(original_node_data, dict): + continue + + # 首先提取该节点的文本范围 + node_start_pattern = rf'("{re.escape(node_name)}"\s*:\s*\{{)' + node_matches = list(re.finditer(node_start_pattern, result_text)) + + if not node_matches: + continue + + # 找到节点范围(从节点开始到节点结束}) + for match in node_matches: + node_start_pos = match.start() + + # 找到对应的结束括号 + brace_count = 0 + i = match.end() + node_end_pos = -1 + in_string = False + escape_next = False + + while i < len(result_text): + char = result_text[i] + + if escape_next: + escape_next = False + i += 1 + continue + + if char == "\\": + escape_next = True + i += 1 + continue + + if char == '"' and not in_string: + in_string = True + elif char == '"' and in_string: + in_string = False + elif not in_string: + if char == "{": + brace_count += 1 + elif char == "}": + if brace_count == 0: + node_end_pos = i + 1 + break + brace_count -= 1 + + i += 1 + + if node_end_pos == -1: + continue + + # 提取节点文本 + node_text = result_text[node_start_pos:node_end_pos] + modified_node_text = node_text + + # 1. 删除 is_sub 字段(删除整行,包括前导空白和换行符) + if "is_sub" in original_node_data and "is_sub" not in migrated_node_data: + # 情况1: 有尾逗号(不是最后一个字段) + modified_node_text = re.sub( + r'[ \t]*"is_sub"\s*:\s*[^,\n]+,\s*(?://[^\n]*)?\r?\n', + "", + modified_node_text, + ) + # 情况2: 没有尾逗号(是最后一个字段),需要同时删除前一行的逗号 + modified_node_text = re.sub( + r',(\s*(?://[^\n]*)?\r?\n)[ \t]*"is_sub"\s*:\s*[^,\n]+\s*(?://[^\n]*)?\r?\n', + r"\1", + modified_node_text, + ) + + # 2. 删除 interrupt 字段(删除整行,包括前导空白和换行符) + if ( + "interrupt" in original_node_data + and "interrupt" not in migrated_node_data + ): + # 数组格式 interrupt: [...] (支持多行数组) + # 情况1: 有尾逗号(不是最后一个字段) + modified_node_text = re.sub( + r'[ \t]*"interrupt"\s*:\s*\[[\s\S]*?\],\s*(?://[^\n]*)?\r?\n', + "", + modified_node_text, + ) + # 情况2: 没有尾逗号(是最后一个字段),需要同时删除前一行的逗号 + modified_node_text = re.sub( + r',(\s*(?://[^\n]*)?\r?\n)[ \t]*"interrupt"\s*:\s*\[[\s\S]*?\]\s*(?://[^\n]*)?\r?\n', + r"\1", + modified_node_text, + ) + + # 字符串格式 interrupt: "..." + # 情况1: 有尾逗号(不是最后一个字段) + modified_node_text = re.sub( + r'[ \t]*"interrupt"\s*:\s*"[^"]*",\s*(?://[^\n]*)?\r?\n', + "", + modified_node_text, + ) + # 情况2: 没有尾逗号(是最后一个字段),需要同时删除前一行的逗号 + modified_node_text = re.sub( + r',(\s*(?://[^\n]*)?\r?\n)[ \t]*"interrupt"\s*:\s*"[^"]*"\s*(?://[^\n]*)?\r?\n', + r"\1", + modified_node_text, + ) + + # 3. 更新 next 字段 + if "next" in migrated_node_data: + orig_next = original_node_data.get("next") + new_next = migrated_node_data["next"] + + if orig_next != new_next: + if "next" in original_node_data: + # 替换现有的 next 字段 + # 先找到字段所在行,获取缩进(支持字符串和数组两种格式) + # 尝试匹配数组格式:`"next": [...]` + next_line_match = re.search( + r'([ \t]*)"next"\s*:\s*\[[^\]]*\](,?)(\s*//[^\n]*)?', + modified_node_text, + ) + + # 如果没匹配到数组格式,尝试匹配字符串格式:`"next": "..."` + if not next_line_match: + next_line_match = re.search( + r'([ \t]*)"next"\s*:\s*"[^"]*"(,?)(\s*//[^\n]*)?', + modified_node_text, + ) + + if next_line_match: + field_indent = next_line_match.group(1) + trailing_comma = next_line_match.group(2) + inline_comment = next_line_match.group(3) or "" + + # 生成格式化的数组值 + new_next_str = format_array_value( + new_next, indent, field_indent + ) + + # 构建新的字段文本 + if "\n" in new_next_str: + # 多行格式 + new_field = f'{field_indent}"next": {new_next_str}{trailing_comma}{inline_comment}' + else: + # 单行格式 + new_field = f'{field_indent}"next": {new_next_str}{trailing_comma}{inline_comment}' + + # 替换 + modified_node_text = ( + modified_node_text[: next_line_match.start()] + + new_field + + modified_node_text[next_line_match.end() :] + ) + else: + # 添加新的 next 字段 + header_match = re.search( + rf'("{re.escape(node_name)}"\s*:\s*\{{\s*(?://[^\n]*)?\n)(\s+)', + modified_node_text, + ) + if header_match: + insert_pos = header_match.end() - len(header_match.group(2)) + field_indent = header_match.group(2) + + # 生成格式化的数组值 + new_next_str = format_array_value( + new_next, indent, field_indent + ) + + # 构建新字段 + if "\n" in new_next_str: + new_field = f'{field_indent}"next": {new_next_str},\n' + else: + new_field = f'{field_indent}"next": {new_next_str},\n' + + modified_node_text = ( + modified_node_text[:insert_pos] + + new_field + + modified_node_text[insert_pos:] + ) + + # 4. 更新 on_error 字段 + if "on_error" in migrated_node_data: + orig_on_error = original_node_data.get("on_error") + new_on_error = migrated_node_data["on_error"] + + if orig_on_error != new_on_error: + # 查找 on_error 字段(支持字符串和数组两种格式) + # 尝试匹配数组格式 + on_error_match = re.search( + r'([ \t]*)"on_error"\s*:\s*\[[^\]]*\](,?)(\s*//[^\n]*)?', + modified_node_text, + ) + + # 如果没匹配到数组格式,尝试匹配字符串格式 + if not on_error_match: + on_error_match = re.search( + r'([ \t]*)"on_error"\s*:\s*"[^"]*"(,?)(\s*//[^\n]*)?', + modified_node_text, + ) + + if on_error_match: + field_indent = on_error_match.group(1) + trailing_comma = on_error_match.group(2) + inline_comment = on_error_match.group(3) or "" + + # 生成格式化的数组值 + new_on_error_str = format_array_value( + new_on_error, indent, field_indent + ) + + # 构建新的字段文本 + if "\n" in new_on_error_str: + new_field = f'{field_indent}"on_error": {new_on_error_str}{trailing_comma}{inline_comment}' + else: + new_field = f'{field_indent}"on_error": {new_on_error_str}{trailing_comma}{inline_comment}' + + # 替换 + modified_node_text = ( + modified_node_text[: on_error_match.start()] + + new_field + + modified_node_text[on_error_match.end() :] + ) + + # 替换文本中的节点 + if modified_node_text != node_text: + # 清理多余的连续空行(最多保留一个) + cleaned_text = re.sub(r"\n{3,}", "\n\n", modified_node_text) + + result_text = ( + result_text[:node_start_pos] + + cleaned_text + + result_text[node_end_pos:] + ) + + # 只处理第一个匹配 + break + + return result_text + + +def ensure_list(value: str | list | None) -> list: + """确保值是列表格式""" + if value is None: + return [] + if isinstance(value, str): + return [value] + return list(value) + + +def list_to_value(lst: list, keep_array: bool = False) -> str | list | None: + """ + 将列表转换回原始格式 + + Args: + lst: 要转换的列表 + keep_array: 是否始终保持数组格式(即使只有一个元素) + + Returns: + 如果 keep_array=True,返回列表或 None + 如果 keep_array=False,单元素返回字符串,空列表返回 None + """ + if not lst: + return None + if keep_array: + return lst + if len(lst) == 1: + return lst[0] + return lst + + +def collect_is_sub_nodes(data: dict) -> set: + """收集所有 is_sub: true 的节点名称""" + is_sub_nodes = set() + for node_name, node_data in data.items(): + if isinstance(node_data, dict) and node_data.get("is_sub", False): + is_sub_nodes.add(node_name) + return is_sub_nodes + + +JUMPBACK_PREFIX = "[JumpBack]" + + +def add_prefix_to_nodes(nodes: list, prefix: str) -> list: + """给节点列表中的所有节点添加前缀""" + return [ + f"{prefix}{node}" if not node.startswith(prefix) else node for node in nodes + ] + + +def add_prefix_to_specific_nodes(nodes: list, target_nodes: set, prefix: str) -> list: + """给节点列表中指定的节点添加前缀""" + result = [] + for node in nodes: + if node in target_nodes and not node.startswith(prefix): + result.append(f"{prefix}{node}") + else: + result.append(node) + return result + + +def migrate_node(node_data: dict, is_sub_nodes: set) -> tuple[dict, list]: + """ + 迁移单个节点的配置,保持字段顺序 + + 返回: (迁移后的节点数据, 更改日志列表) + """ + if not isinstance(node_data, dict): + return node_data, [] + + changes = [] + + # 使用 OrderedDict 保持字段顺序 + result = OrderedDict() + + # 收集需要处理的数据 + interrupt_list = [] + has_interrupt = "interrupt" in node_data + + if has_interrupt: + interrupt_list = ensure_list(node_data.get("interrupt")) + + # 按原始顺序遍历字段 + for key, value in node_data.items(): + if key == "interrupt": + # 跳过 interrupt 字段 + changes.append(f" - 删除 interrupt: {value}") + continue + elif key == "is_sub": + # 跳过 is_sub 字段 + changes.append(f" - 删除 is_sub: {value}") + continue + elif key == "next": + # 处理 next 字段 + next_list = ensure_list(value) + + # 1. 给 next 中引用 is_sub 节点的情况添加前缀 + if is_sub_nodes: + new_next_list = add_prefix_to_specific_nodes( + next_list, is_sub_nodes, JUMPBACK_PREFIX + ) + if next_list != new_next_list: + changes.append( + f" - next 中的 is_sub 节点加 [JumpBack] 前缀: {next_list} -> {new_next_list}" + ) + next_list = new_next_list + + # 2. 合并 interrupt 到 next(带 [JumpBack] 前缀) + if interrupt_list: + prefixed_interrupt = add_prefix_to_nodes( + interrupt_list, JUMPBACK_PREFIX + ) + next_list.extend(prefixed_interrupt) + changes.append( + f" - interrupt {interrupt_list} -> 合并到 next (加 [JumpBack] 前缀): {prefixed_interrupt}" + ) + + if next_list: + result[key] = list_to_value(next_list, keep_array=True) + elif value is not None: + # 原来有 next 字段但现在为空,保留空列表 + result[key] = value + elif key == "on_error": + # 处理 on_error 字段中引用 is_sub 节点的情况 + on_error_list = ensure_list(value) + if is_sub_nodes: + new_on_error_list = add_prefix_to_specific_nodes( + on_error_list, is_sub_nodes, JUMPBACK_PREFIX + ) + if on_error_list != new_on_error_list: + changes.append( + f" - on_error 中的 is_sub 节点加 [JumpBack] 前缀: {on_error_list} -> {new_on_error_list}" + ) + on_error_list = new_on_error_list + result[key] = ( + list_to_value(on_error_list, keep_array=True) + if on_error_list + else value + ) + else: + # 其他字段直接复制 + result[key] = value + + # 如果原来没有 next 字段但有 interrupt,需要创建 next 字段 + if has_interrupt and interrupt_list and "next" not in result: + prefixed_interrupt = add_prefix_to_nodes(interrupt_list, JUMPBACK_PREFIX) + result["next"] = list_to_value(prefixed_interrupt, keep_array=True) + changes.append( + f" - interrupt {interrupt_list} -> 新建 next (加 [JumpBack] 前缀): {prefixed_interrupt}" + ) + + return result, changes + + +def migrate_pipeline_file( + file_path: Path, + global_is_sub_nodes: set, + dry_run: bool = False, + backup: bool = False, +) -> tuple[bool, list]: + """ + 迁移单个 pipeline JSON 文件 + + Args: + file_path: 文件路径 + global_is_sub_nodes: 全局的 is_sub 节点集合(跨所有文件收集) + dry_run: 是否为试运行模式 + backup: 是否备份原文件 + + 返回: (是否有更改, 更改日志列表) + """ + all_changes = [] + + try: + with open(file_path, "r", encoding="utf-8") as f: + content = f.read() + # 检测原文件的缩进风格 + original_indent = detect_indent(content) + # 使用 JSONC 解析器 + data = parse_jsonc(content) + except Exception as e: + return False, [f"文件解析错误: {e}"] + + if not isinstance(data, dict): + return False, ["文件内容不是 JSON 对象"] + + # 检查本文件中定义的 is_sub 节点 + local_is_sub_nodes = collect_is_sub_nodes(data) + if local_is_sub_nodes: + all_changes.append(f"本文件定义的 is_sub 节点: {local_is_sub_nodes}") + + # 迁移所有节点,使用全局 is_sub 节点集合 + migrated_data = OrderedDict() + has_changes = False + + for node_name, node_data in data.items(): + migrated_node, changes = migrate_node(node_data, global_is_sub_nodes) + migrated_data[node_name] = migrated_node + + if changes: + has_changes = True + all_changes.append(f"节点 [{node_name}]:") + all_changes.extend(changes) + + if not has_changes: + return False, [] + + if not dry_run: + # 备份原文件 + if backup: + backup_path = file_path.with_suffix(file_path.suffix + ".bak") + shutil.copy2(file_path, backup_path) + all_changes.append(f"已备份到: {backup_path}") + + # 使用保留注释的方式写入迁移后的数据 + with open(file_path, "w", encoding="utf-8", newline="\n") as f: + result_text = rebuild_json_with_comments( + content, data, migrated_data, original_indent + ) + f.write(result_text) + if not result_text.endswith("\n"): + f.write("\n") + all_changes.append("文件已更新(保留注释并格式化)") + + return True, all_changes + + +def find_pipeline_files(directory: Path) -> list: + """递归查找目录下所有 JSON 文件(排除以 . 开头的目录和文件)""" + json_files = [] + + for root, dirs, files in os.walk(directory): + # 排除以 . 开头的目录 + dirs[:] = [d for d in dirs if not d.startswith(".")] + + for file in files: + # 排除以 . 开头的文件 + if file.startswith("."): + continue + if file.lower().endswith(".json") or file.lower().endswith(".jsonc"): + json_files.append(Path(root) / file) + + return json_files + + +def collect_all_is_sub_nodes(json_files: list) -> set: + """ + 扫描所有 JSON 文件,收集全局的 is_sub 节点集合 + + Args: + json_files: JSON 文件路径列表 + + Returns: + 所有 is_sub: true 的节点名称集合 + """ + global_is_sub_nodes = set() + + for json_file in json_files: + try: + with open(json_file, "r", encoding="utf-8") as f: + content = f.read() + data = parse_jsonc(content) + + if isinstance(data, dict): + is_sub_nodes = collect_is_sub_nodes(data) + global_is_sub_nodes.update(is_sub_nodes) + except Exception as e: + print(f"警告: 扫描文件 {json_file} 时出错: {e}") + continue + + return global_is_sub_nodes + + +def main(): + parser = argparse.ArgumentParser( + description="将旧版 pipeline JSON 的 is_sub/interrupt 转换为 v5.1 的 [JumpBack] 前缀格式" + ) + parser.add_argument("directory", help="包含 pipeline JSON 文件的目录路径") + parser.add_argument( + "--dry-run", action="store_true", help="仅显示将要进行的更改,不实际修改文件" + ) + parser.add_argument("--backup", action="store_true", help="在修改前备份原文件") + + args = parser.parse_args() + + directory = Path(args.directory) + if not directory.exists(): + print(f"错误: 目录不存在: {directory}") + sys.exit(1) + + if not directory.is_dir(): + print(f"错误: 路径不是目录: {directory}") + sys.exit(1) + + json_files = find_pipeline_files(directory) + + if not json_files: + print(f"在目录 {directory} 中未找到 JSON 文件") + sys.exit(0) + + print(f"找到 {len(json_files)} 个 JSON 文件") + + # 第一遍:收集全局的 is_sub 节点 + print("正在扫描所有文件,收集 is_sub 节点...") + global_is_sub_nodes = collect_all_is_sub_nodes(json_files) + + if global_is_sub_nodes: + print( + f"发现 {len(global_is_sub_nodes)} 个全局 is_sub 节点: {sorted(global_is_sub_nodes)}" + ) + else: + print("未发现任何 is_sub 节点") + + if args.dry_run: + print("【DRY RUN 模式 - 不会实际修改文件】\n") + + modified_count = 0 + + # 第二遍:使用全局 is_sub 节点集合迁移所有文件 + for json_file in json_files: + relative_path = ( + json_file.relative_to(directory) + if json_file.is_relative_to(directory) + else json_file + ) + + has_changes, changes = migrate_pipeline_file( + json_file, global_is_sub_nodes, args.dry_run, args.backup + ) + + if has_changes: + modified_count += 1 + print(f"\n{'=' * 60}") + print(f"文件: {relative_path}") + print("-" * 60) + for change in changes: + print(change) + + print(f"\n{'=' * 60}") + print(f"总计: {modified_count}/{len(json_files)} 个文件需要迁移") + + if args.dry_run and modified_count > 0: + print("\n提示: 使用不带 --dry-run 参数运行以实际执行迁移") + + +if __name__ == "__main__": + main() From 13a768f17d91480e0a950158d53e4cb7aefc59ce Mon Sep 17 00:00:00 2001 From: Aurora Date: Wed, 18 Feb 2026 11:00:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E6=89=AB=E8=8D=A1=E5=8A=A0=E6=88=90=E8=AF=86=E5=88=AB=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\253\350\215\241\345\212\240\346\210\220.png" | Bin 0 -> 3324 bytes ...32\347\224\250-\346\211\253\350\215\241.json" | 12 +++--------- 2 files changed, 3 insertions(+), 9 deletions(-) create mode 100644 "assets/resource/base/image/\345\274\200\345\220\257\346\211\253\350\215\241\345\212\240\346\210\220.png" diff --git "a/assets/resource/base/image/\345\274\200\345\220\257\346\211\253\350\215\241\345\212\240\346\210\220.png" "b/assets/resource/base/image/\345\274\200\345\220\257\346\211\253\350\215\241\345\212\240\346\210\220.png" new file mode 100644 index 0000000000000000000000000000000000000000..e3cc9dbf3eaeed9255f9c763ecb6f9a81477faa6 GIT binary patch literal 3324 zcmd5ug~ZEdA~p3-}m$RT~bIp z394Xiu#Ak1s++6xE~!nGUZy}rDJBF|)XB)Gw7NOte5kT-n{gF;`cLs@n%YhZ?Jd@H z^8lg2DviN3jU(-tnX#16kQ|MTlxA>1U&&q{a^{QUUYDxtto8!#r1HbpHg~V@+Y2al zsg<+zTD##%ONL3!3}Af&9h;}DE}(6(&=bgthNHP~9gmn8^OrAPFUOipt%NUaLLdl~ zEEWs3wS&)BFC-rrPiA~wAn6Cq&&oBejKXa=8*_z2O*sdVy>f|KKaW)IJ~Bu_)!Iu_on%h!==sIf`)RAcJ{Vbl~VYH z*g#lJr=)xOgWVES?z}N|RZ)q z)v+3l51|=6XnxmdQyk38;HI;UHgDi5Y7FUGbNW#QVtm$L3(|2;{)W~UfUbwFu_oA5 z!v|eKB9#<7;S%X!1*xOTh`QPepVQ%f7g|*SH}gA+7f=l`7Ve>BQ>;+n58CFakI#Dp z&*y#g$KezN!SnUF{Vu=c{*H`bjPwR-I2A+W5+P`YqX7VHKmyX7q^@9*WW?&sJFf)z zz+xe9v2goHY)Q}h+Rcskgzr~v@^C=Pq~19OM;zNzxXVXF)v@&5>qjV#{gn#dTuRhr zxpkBpZuE&mdWE9{sePsG(qKf?1dP(-C}ozcQ=LoN!^~Iohy;mEcts zaazj^RHiD3srsOKHAH3xdvQO=74KGi8CxL7F|SrgQZEp<=R(BFfhFR@4;JaZ6Q=^B z?iXvuaC{5Q4<&NSHUCN|rbpU47l*%5OtGfD+WEt9(9V1p?m?t$Fn+E0-BgmQDOr&j z(|NMVnxWgaCIPBbCzb|Gucd%}z!Bu0(>_7{4VJYk+s0umv`MU0Nfl zE8X@${^=p0oI^pc?eV$P40#XbsrlEBG=uD~pebjejUTcv+9nlKCW}n*@>h0` zSZ-ROI5Dg2+|#nSKcIgzC>RHzw&}iY>0EcthU`JrT&m-+)=|kBaEApdHJU2!WcwD( zl5)`>mMm1xD}CCg5OPJ2?L`X2$cs7*klAmuC)eixb$DAamEisI-sZ%%^Khycq&41H z+Yr3NYO{ei?`iGXykVNleo@za_$S=qu2OX|xmP&1S~UX(ZWJU(gX=xZz9D}JfVGm; zNog+3w5*g~ug#WQ-Hq{tjvPx;lWt_X4VKn&1gCCPv~pQka$R% z%e^d6evA=p^PIae`E?Glz0WK^qtZ{h^Xp`%vV9#4;x7xf$^kQEXe&IJ>P7yc0D3;H z*KYny(R6GCBXUDPDN34q7~p~TP;esM&FB&&XXcDL&N$V(J|4341$>V4kD{ZsjB%*D zlN%ajRAR_xWRalmEhRpq%Uk6AjuI;o<8O=liCml zw|tt&%`zexc+(2Q2tFtU+NX4kkA{WsXE=Y8OE*IHLn&2X$v*u1e=&ij>|kxyq)vjf zK{v}|)q0e8rQmFt=bTS5m^12#Yp-4zVYBGOUcSdD$x)z_7KSSd2alH zZ$EFwU8Un3U-L>Pq)WEtqCCS|2^gUUd5+YtvUBv0{wc7-zjB`0AG^F^u5aN(y}I}~ zz%^L0KN4TPsw;gH!xbNxF}@NF#yt%a5AZ}meQkCFA2GDv#|bsY8j;J*3&ObABzRlC zI=6S1LR-RrRQQ)PVSO<&ReIe2e)ij2qdgtabKfgSzX0+wzje@QSa_2B{8@VFo~8ka zm^2Na=0h&$ffC0rc+=HS_@