diff --git a/agent/go-service/accountswitch/action_windows.go b/agent/go-service/accountswitch/action_windows.go index 91500ab8d1..f9ca5ea739 100644 --- a/agent/go-service/accountswitch/action_windows.go +++ b/agent/go-service/accountswitch/action_windows.go @@ -6,7 +6,6 @@ import ( "encoding/json" "fmt" "strings" - "time" "unsafe" maa "github.com/MaaXYZ/maa-framework-go/v4" @@ -17,10 +16,13 @@ import ( const ( swRestore = 9 - wmClose = 0x0010 - - mouseEventFLeftDown = 0x0002 - mouseEventFLeftUp = 0x0004 + wmClose = 0x0010 + wmActivate = 0x0006 + waActive = 1 + wmMouseMove = 0x0200 + wmLButtonDown = 0x0201 + wmLButtonUp = 0x0202 + mkLButton = 0x0001 awarenessContextPerMonitorAwareV2 = ^uintptr(3) // DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ) @@ -33,12 +35,12 @@ var ( procShowWindow = user32.NewProc("ShowWindow") procBringWindowToTop = user32.NewProc("BringWindowToTop") procSetForegroundWindow = user32.NewProc("SetForegroundWindow") - procSetCursorPos = user32.NewProc("SetCursorPos") - procMouseEvent = user32.NewProc("mouse_event") procSendMessageW = user32.NewProc("SendMessageW") + procPostMessageW = user32.NewProc("PostMessageW") procGetClientRect = user32.NewProc("GetClientRect") procGetWindowRect = user32.NewProc("GetWindowRect") procClientToScreen = user32.NewProc("ClientToScreen") + procScreenToClient = user32.NewProc("ScreenToClient") procSetThreadDpiCtx = user32.NewProc("SetThreadDpiAwarenessContext") ) @@ -242,7 +244,7 @@ func clickWindow(ctx *maa.Context, arg *maa.CustomActionArg, targetHwnd uintptr, Msg("mapped click point is outside target window rect") } - if !cursorClick(screenX, screenY) { + if !postClick(targetHwnd, screenX, screenY) { return false } @@ -400,29 +402,54 @@ func scaleCoord(value int, sourceSize int, targetSize int32) int32 { return int32((int64(value)*int64(targetSize) + int64(sourceSize)/2) / int64(sourceSize)) } -func cursorClick(screenX, screenY int32) bool { - if !setCursorPos(screenX, screenY) { +// PostMessage-style click (no physical cursor): activate + move/down/up on target hwnd. +func postClick(hwnd uintptr, screenX, screenY int32) bool { + pt := winPoint{X: screenX, Y: screenY} + if !screenToClient(hwnd, &pt) { log.Error(). Str("component", componentName). + Uint64("hwnd", uint64(hwnd)). Int32("screen_x", screenX). Int32("screen_y", screenY). - Msg("failed to move cursor for account switch click") + Msg("ScreenToClient failed for account switch click") + return false + } + + lParam := makeMouseLParam(pt.X, pt.Y) + sendMessage(hwnd, wmActivate, waActive, 0) + if !postMessage(hwnd, wmMouseMove, 0, lParam) { + return false + } + if !postMessage(hwnd, wmLButtonDown, mkLButton, lParam) { + return false + } + if !postMessage(hwnd, wmLButtonUp, 0, lParam) { return false } - time.Sleep(30 * time.Millisecond) - mouseEvent(mouseEventFLeftDown, 0, 0, 0, 0) - time.Sleep(50 * time.Millisecond) - mouseEvent(mouseEventFLeftUp, 0, 0, 0, 0) return true } -func setCursorPos(x, y int32) bool { - ret, _, _ := procSetCursorPos.Call(uintptr(x), uintptr(y)) +func makeMouseLParam(x, y int32) uintptr { + return uintptr(uint32(uint16(int16(x))) | uint32(uint16(int16(y)))<<16) +} + +func screenToClient(hwnd uintptr, point *winPoint) bool { + ret, _, _ := procScreenToClient.Call(hwnd, uintptr(unsafe.Pointer(point))) return ret != 0 } -func mouseEvent(flags, dx, dy, data, extraInfo uintptr) { - procMouseEvent.Call(flags, dx, dy, data, extraInfo) +func postMessage(hwnd, msg, wparam, lparam uintptr) bool { + ret, _, err := procPostMessageW.Call(hwnd, msg, wparam, lparam) + if ret != 0 { + return true + } + log.Error(). + Err(err). + Str("component", componentName). + Uint64("hwnd", uint64(hwnd)). + Uint64("msg", uint64(msg)). + Msg("PostMessageW failed for account switch click") + return false } func describeWindowSelector(param windowActionParam) string { diff --git a/agent/go-service/scenemanager/register.go b/agent/go-service/scenemanager/register.go index 58461cc691..29a2ca3db5 100644 --- a/agent/go-service/scenemanager/register.go +++ b/agent/go-service/scenemanager/register.go @@ -6,4 +6,5 @@ func Register() { maa.AgentServerRegisterCustomAction("SceneManagerMenuListClickItemAction", &SceneManagerMenuListClickItemAction{}) maa.AgentServerRegisterCustomRecognition("ImageCheckNotPassedRecognition", &ImageCheckNotPassedRecognition{}) maa.AgentServerRegisterCustomAction("ImageCheckSetResultAction", &ImageCheckSetResultAction{}) + maa.AgentServerRegisterCustomRecognition("ScreenshotStableRecognition", &ScreenshotStableRecognition{}) } diff --git a/agent/go-service/scenemanager/screenshotstable.go b/agent/go-service/scenemanager/screenshotstable.go new file mode 100644 index 0000000000..f8b43836bb --- /dev/null +++ b/agent/go-service/scenemanager/screenshotstable.go @@ -0,0 +1,108 @@ +package scenemanager + +import ( + "image" + + "github.com/MaaXYZ/MaaEnd/agent/go-service/pkg/minicv" + "github.com/MaaXYZ/MaaEnd/agent/go-service/pkg/pienv" + "github.com/MaaXYZ/MaaEnd/agent/go-service/pretask/gamesetting" + maa "github.com/MaaXYZ/maa-framework-go/v4" + "github.com/rs/zerolog/log" +) + +var screenshotStableDone bool +var screenshotStableCount int // 0=未采;1=已有 baseline;2=第 2 帧已匹配,等待第 3 帧 +var screenshotStableBaseline *image.RGBA + +var _ maa.CustomRecognitionRunner = (*ScreenshotStableRecognition)(nil) + +// ScreenshotStableRecognition 仅在 Win32-Front + 游戏全屏时,于 Agent 进程生命周期内判定一次 +// 画面是否连续三帧稳定。每次调用只用 arg.Img:第 1 次存 baseline;第 2 帧不匹配则结束周期; +// 匹配后再采第 3 帧确认。仅第 3 帧仍相似时命中。 +type ScreenshotStableRecognition struct{} + +func (r *ScreenshotStableRecognition) Run(ctx *maa.Context, arg *maa.CustomRecognitionArg) (*maa.CustomRecognitionResult, bool) { + _ = ctx + if arg == nil || arg.Img == nil { + log.Error().Str("component", "ScreenshotStableRecognition").Msg("nil arg or image") + return nil, false + } + if screenshotStableDone { + return nil, false + } + if !shouldRunScreenshotStable() { + return nil, false + } + + cur := minicv.ImageConvertRGBA(arg.Img) + if cur == nil || cur.Bounds().Empty() { + log.Error().Str("component", "ScreenshotStableRecognition").Msg("empty image") + return nil, false + } + + // 第 1 帧:只存 baseline + if screenshotStableCount == 0 { + screenshotStableBaseline = minicv.ImageCopy(cur) + screenshotStableCount = 1 + return nil, false + } + + // 第 2 帧:与 baseline 比;不匹配则结束,不再需要第 3 帧 + if screenshotStableCount == 1 { + if !imagesSimilar(cur, screenshotStableBaseline, 0.99) { + finishScreenshotStable() + return nil, false + } + screenshotStableCount = 2 + return nil, false + } + + // 第 3 帧:仅在第 2 帧已匹配时才会走到这里 + matched := imagesSimilar(cur, screenshotStableBaseline, 0.99) + finishScreenshotStable() + if !matched { + return nil, false + } + + b := cur.Bounds() + return &maa.CustomRecognitionResult{ + Box: maa.Rect{b.Min.X, b.Min.Y, b.Dx(), b.Dy()}, + Detail: `{"stable":true}`, + }, true +} + +func shouldRunScreenshotStable() bool { + if pienv.ControllerName() != "Win32-Front" { + return false + } + fullScreen, err := gamesetting.GetVideoFullScreen() + if err != nil { + log.Debug(). + Err(err). + Str("component", "ScreenshotStableRecognition"). + Msg("failed to read fullscreen setting, skip") + return false + } + return fullScreen == 1 +} + +func finishScreenshotStable() { + screenshotStableDone = true + screenshotStableBaseline = nil + screenshotStableCount = 0 +} + +func imagesSimilar(cur, baseline *image.RGBA, threshold float64) bool { + if cur == nil || baseline == nil { + return false + } + if cur.Bounds().Dx() != baseline.Bounds().Dx() || cur.Bounds().Dy() != baseline.Bounds().Dy() { + return false + } + stats := minicv.GetImageStats(baseline) + if stats.Std < 1e-6 { + return false + } + score := minicv.ComputeNCC(cur, minicv.GetIntegralArray(cur), baseline, stats, 0, 0) + return score >= threshold +} diff --git a/assets/locales/interface/en_us.json b/assets/locales/interface/en_us.json index 6d9823665e..8d423725d4 100644 --- a/assets/locales/interface/en_us.json +++ b/assets/locales/interface/en_us.json @@ -136,6 +136,8 @@ "option.QuickTeleport.description": "When selecting a teleport point on the world map (or from a list), automatically click Teleport.", "option.AutoPuzzleSolving.label": "Solve Puzzle", "option.AutoPuzzleSolving.description": "Automatically clears the puzzle minigame for you (equivalent to enabling the ⌈🧩 Solve Puzzle⌋ task in Loop mode).", + "option.AutoAeroSalvage.label": "Aerial Salvage", + "option.AutoAeroSalvage.description": "Automatically clears the Aerial Salvage minigame for you (equivalent to enabling the ⌈🎈 Aerial Salvage⌋ task in Loop mode).", "option.AutoTaskInterval.label": "Real-time Assist Interval", "option.AutoTaskInterval.description": "Too fast a check interval may cause lag. Adjust according to your situation.", "option.AutoTaskInterval.cases.AutoTaskIntervalFast.label": "Fast", @@ -1004,6 +1006,7 @@ "task.SceneManager.focus.mod_check_failed_prefix": "UID display is incomplete. Enabling UID-hiding mods removes text in the upper-left corner of the screen, which affects recognition.", "task.SceneManager.focus.osd_check_failed": "Screen overlay detected. Close FPS/hardware monitoring overlays (e.g. FPS, CPU, GPU, Afterburner) and try again", "task.SceneManager.focus.language_not_zh_cn": "The game language is not Simplified Chinese. Compatibility is limited, and tasks may fail.", + "task.SceneManager.focus.screenshot_stable_abnormal": "Environment recognition is abnormal. Please launch the game with D3D11, or switch to windowed mode and retry.", "description.file": "locales/interface/DESCRIPTION/DESCRIPTION.en_us.md", "contact.file": "https://end.maafw.com/CONTACT/CONTACT.en_us.md", "operator.Perlica": "Perlica", @@ -1317,4 +1320,3 @@ "task.ProtocolSpace.focus.supply_plan.override_started.WEAPON_EXP": "Weapon EXP: Protocol Space target switched; start farming", "task.ProtocolSpace.focus.supply_plan.reward_item_met.WEAPON_EXP": "Weapon EXP target met; end current Protocol Space run" } - diff --git a/assets/locales/interface/ja_jp.json b/assets/locales/interface/ja_jp.json index 24a85a8cb5..535d730fed 100644 --- a/assets/locales/interface/ja_jp.json +++ b/assets/locales/interface/ja_jp.json @@ -134,6 +134,8 @@ "option.QuickTeleport.description": "ワールドマップ(または一覧)で転送地点を選択した時に、転送を自動でクリックします。", "option.AutoPuzzleSolving.label": "パズル解決", "option.AutoPuzzleSolving.description": "パズルミニゲームを自動でクリアします(⌈🧩 パズル解決⌋タスクの繰り返し実行を有効にするのと同等)。", + "option.AutoAeroSalvage.label": "浮遊回収", + "option.AutoAeroSalvage.description": "浮遊回収ミニゲームを自動でクリアします(⌈🎈 浮遊回収⌋タスクの繰り返し実行を有効にするのと同等)。", "option.AutoTaskInterval.label": "リアルタイム支援間隔", "option.AutoTaskInterval.description": "間隔が速すぎるとカクつく可能性があります。状況に応じて調整してください。", "option.AutoTaskInterval.cases.AutoTaskIntervalFast.label": "速い", @@ -1004,6 +1006,7 @@ "task.SceneManager.focus.mod_check_failed_prefix": "UIDの表示が不完全です。UID非表示MODを有効にすると、画面左上の文字が欠落し、認識に影響します。", "task.SceneManager.focus.osd_check_failed": "画面にオーバーレイが検出されました。フレームレート/ハードウェア監視オーバーレイ(FPS、CPU、GPU、Afterburner など)を閉じてから再試行してください", "task.SceneManager.focus.language_not_zh_cn": "ゲーム言語が簡体字中国語ではありません。互換性が低く、タスクが失敗する可能性があります。", + "task.SceneManager.focus.screenshot_stable_abnormal": "現在の環境認識に異常があります。D3D11 でゲームを起動するか、ウィンドウモードに切り替えて再試行してください。", "description.file": "locales/interface/DESCRIPTION/DESCRIPTION.ja_jp.md", "contact.file": "https://end.maafw.com/CONTACT/CONTACT.ja_jp.md", "operator.Perlica": "ペリカ", @@ -1317,4 +1320,3 @@ "task.ProtocolSpace.focus.supply_plan.override_started.WEAPON_EXP": "武器経験 のプロトコル空間目標へ切り替え、周回を開始します", "task.ProtocolSpace.focus.supply_plan.reward_item_met.WEAPON_EXP": "武器経験 が目標達成のため、現在のプロトコル空間周回を終了します" } - diff --git a/assets/locales/interface/ko_kr.json b/assets/locales/interface/ko_kr.json index 067c1f5703..5517c6a430 100644 --- a/assets/locales/interface/ko_kr.json +++ b/assets/locales/interface/ko_kr.json @@ -134,6 +134,8 @@ "option.QuickTeleport.description": "월드맵(또는 목록)에서 텔레포트 지점을 선택할 때 텔레포트를 자동으로 클릭합니다.", "option.AutoPuzzleSolving.label": "퍼즐 해결", "option.AutoPuzzleSolving.description": "퍼즐 미니게임을 자동으로 클리어합니다(⌈🧩 퍼즐 해결⌋ 작업을 반복 실행으로 켜는 것과 동일).", + "option.AutoAeroSalvage.label": "부유 회수", + "option.AutoAeroSalvage.description": "부유 회수 미니게임을 자동으로 클리어합니다(⌈🎈 부유 회수⌋ 작업을 반복 실행으로 켜는 것과 동일).", "option.AutoTaskInterval.label": "실시간 지원 간격", "option.AutoTaskInterval.description": "간격이 너무 빠르면 끊김이 발생할 수 있습니다. 상황에 맞게 조정해 주세요.", "option.AutoTaskInterval.cases.AutoTaskIntervalFast.label": "빠름", @@ -1004,6 +1006,7 @@ "task.SceneManager.focus.mod_check_failed_prefix": "UID 표시가 불완전합니다. UID 숨김 MOD를 켜면 화면 왼쪽 상단의 문자가 누락되어 인식에 영향을 줍니다.", "task.SceneManager.focus.osd_check_failed": "화면에 오버레이가 감지되었습니다. 프레임레이트/하드웨어 모니터링 오버레이(FPS, CPU, GPU, Afterburner 등)를 끈 후 다시 시도하세요", "task.SceneManager.focus.language_not_zh_cn": "게임 언어가 간체 중국어가 아닙니다. 호환성이 낮아 작업이 실패할 수 있습니다.", + "task.SceneManager.focus.screenshot_stable_abnormal": "현재 환경 인식이 비정상입니다. D3D11로 게임을 실행하거나 창 모드로 전환한 후 다시 시도하세요.", "description.file": "locales/interface/DESCRIPTION/DESCRIPTION.ko_kr.md", "contact.file": "https://end.maafw.com/CONTACT/CONTACT.ko_kr.md", "operator.Perlica": "펠리카", @@ -1317,4 +1320,3 @@ "task.ProtocolSpace.focus.supply_plan.override_started.WEAPON_EXP": "무기 경험: 프로토콜 공간 목표 전환, 파밍 시작", "task.ProtocolSpace.focus.supply_plan.reward_item_met.WEAPON_EXP": "무기 경험 목표 달성, 현재 프로토콜 공간 종료" } - diff --git a/assets/locales/interface/zh_cn.json b/assets/locales/interface/zh_cn.json index 5ef51d4be3..d07d673ce3 100644 --- a/assets/locales/interface/zh_cn.json +++ b/assets/locales/interface/zh_cn.json @@ -136,6 +136,8 @@ "option.QuickTeleport.description": "在大地图上点击传送点(或列表中有传送点)时,自动点击传送", "option.AutoPuzzleSolving.label": "解拼图", "option.AutoPuzzleSolving.description": "自动帮你通关拼图小游戏(等价于开启⌈🧩解拼图⌋任务的循环执行)", + "option.AutoAeroSalvage.label": "浮空回收", + "option.AutoAeroSalvage.description": "自动帮你完成浮空回收小游戏(等价于开启⌈🎈浮空回收⌋任务的循环执行)", "option.AutoTaskInterval.label": "实时辅助间隔", "option.AutoTaskInterval.description": "过快的检测间隔可能会导致卡顿,请根据实际情况调整", "option.AutoTaskInterval.cases.AutoTaskIntervalFast.label": "快", @@ -1004,6 +1006,7 @@ "task.SceneManager.focus.mod_check_failed_prefix": "UID显示不完整,开启UID隐藏MOD会导致画面左上方文字缺失,影响识别", "task.SceneManager.focus.osd_check_failed": "屏幕存在遮挡,请关闭帧率/硬件监控悬浮窗(如 FPS、CPU、GPU、Afterburner 等)后重试", "task.SceneManager.focus.language_not_zh_cn": "当前游戏语言不是简体中文,兼容性较差,任务可能会失败", + "task.SceneManager.focus.screenshot_stable_abnormal": "当前环境识别异常,请使用 D3D11 启动游戏,或切换到窗口化重试", "description.file": "locales/interface/DESCRIPTION/DESCRIPTION.zh_cn.md", "contact.file": "https://end.maafw.com/CONTACT/CONTACT.zh_cn.md", "operator.Perlica": "佩丽卡", @@ -1317,4 +1320,3 @@ "task.ProtocolSpace.focus.supply_plan.override_started.WEAPON_EXP": "武器经验 协议空间目标已切换,开始刷取", "task.ProtocolSpace.focus.supply_plan.reward_item_met.WEAPON_EXP": "武器经验 目标已达标,结束当前协议空间刷取" } - diff --git a/assets/locales/interface/zh_tw.json b/assets/locales/interface/zh_tw.json index d600f8df21..249a75b454 100644 --- a/assets/locales/interface/zh_tw.json +++ b/assets/locales/interface/zh_tw.json @@ -136,6 +136,8 @@ "option.QuickTeleport.description": "在大地圖上點擊傳送點(或列表中有傳送點)時,自動點擊傳送", "option.AutoPuzzleSolving.label": "解拼圖", "option.AutoPuzzleSolving.description": "自動幫你通關拼圖小遊戲(等價於開啟⌈🧩解拼圖⌋任務的重複執行)", + "option.AutoAeroSalvage.label": "浮空回收", + "option.AutoAeroSalvage.description": "自動幫你完成浮空回收小遊戲(等價於開啟⌈🎈浮空回收⌋任務的重複執行)", "option.AutoTaskInterval.label": "即時輔助間隔", "option.AutoTaskInterval.description": "過快的檢測間隔可能會導致卡頓,請根據實際情況調整", "option.AutoTaskInterval.cases.AutoTaskIntervalFast.label": "快", @@ -1004,6 +1006,7 @@ "task.SceneManager.focus.mod_check_failed_prefix": "UID顯示不完整,開啟UID隱藏MOD會導致畫面左上方文字缺失,影響識別", "task.SceneManager.focus.osd_check_failed": "螢幕存在遮擋,請關閉幀率/硬體監控懸浮窗(如 FPS、CPU、GPU、Afterburner 等)後重試", "task.SceneManager.focus.language_not_zh_cn": "當前遊戲語言不是簡體中文,相容性較差,任務可能會失敗", + "task.SceneManager.focus.screenshot_stable_abnormal": "當前環境識別異常,請使用 D3D11 啟動遊戲,或切換到視窗化重試", "description.file": "locales/interface/DESCRIPTION/DESCRIPTION.zh_tw.md", "contact.file": "https://end.maafw.com/CONTACT/CONTACT.zh_tw.md", "operator.Perlica": "佩麗卡", @@ -1317,4 +1320,3 @@ "task.ProtocolSpace.focus.supply_plan.override_started.WEAPON_EXP": "武器經驗 協議空間目標已切換,開始刷取", "task.ProtocolSpace.focus.supply_plan.reward_item_met.WEAPON_EXP": "武器經驗 目標已達標,結束當前協議空間刷取" } - diff --git a/assets/resource/image/AccountSwitch/LoginClose.png b/assets/resource/image/AccountSwitch/LoginClose.png new file mode 100644 index 0000000000..084da3c40a Binary files /dev/null and b/assets/resource/image/AccountSwitch/LoginClose.png differ diff --git a/assets/resource/image/AccountSwitch/LoginSwitchIcon.png b/assets/resource/image/AccountSwitch/LoginSwitchIcon.png new file mode 100644 index 0000000000..31765c5145 Binary files /dev/null and b/assets/resource/image/AccountSwitch/LoginSwitchIcon.png differ diff --git a/assets/resource/pipeline/AccountSwitch.json b/assets/resource/pipeline/AccountSwitch.json index 8f53fe096b..7b7a5354e0 100644 --- a/assets/resource/pipeline/AccountSwitch.json +++ b/assets/resource/pipeline/AccountSwitch.json @@ -7,7 +7,7 @@ ] }, "__AccountSwitchAtLoginScreen": { - "desc": "已在登录界面", + "desc": "已在登录界面,等待加载完成", "recognition": { "type": "TemplateMatch", "param": { @@ -23,41 +23,26 @@ } }, "next": [ - "__AccountSwitchCheckInitState" + "__AccountSwitchClickLogout", + "__AccountSwitchAtLoginScreenDialogShow", + "__AccountSwitchAtLoginScreen" ] }, - "__AccountSwitchCheckInitState": { - "desc": "中继节点:检查是否已退出", - "recognition": "Or", - "any_of": [ - { - "recognition": "TemplateMatch", - "roi": [ - -300, - 60, - 300, - 300 - ], - "template": [ - "AccountSwitch/LogoutButton.png" - ], - "threshold": 0.6 - }, - { - "recognition": "TemplateMatch", - "roi": [ - 651, - 130, - 466, - 495 - ], - "template": [ - "AccountSwitch/DropdownButton.png" - ] - } + "__AccountSwitchAtLoginScreenDialogShow": { + "desc": "在登陆界面,显示对话框", + "recognition": "TemplateMatch", + "roi": [ + 651, + 130, + 466, + 495 ], + "template": [ + "AccountSwitch/LoginClose.png" + ], + "pre_delay": 0, + "post_delay": 0, "next": [ - "__AccountSwitchClickLogout", "__AccountSwitchFocusFormBeforeDropdown" ] }, @@ -80,9 +65,14 @@ }, "pre_wait_freezes": 100, "action": "Click", + "target_offset": [ + 7, + 7, + -15, + -15 + ], "next": [ - "[JumpBack]__AccountSwitchLogoutConfirm", - "__AccountSwitchCheckAccount" + "__AccountSwitchLogoutConfirm" ] }, "__AccountSwitchLogoutConfirm": { @@ -125,7 +115,10 @@ ], "box_index": 1, "pre_wait_freezes": 200, - "action": "Click" + "action": "Click", + "next": [ + "__AccountSwitchAtLoginScreenDialogShow" + ] }, "__AccountSwitchFocusFormBeforeDropdown": { "desc": "聚焦账号登录窗口后准备点击下拉", @@ -142,7 +135,7 @@ ] }, "__AccountSwitchClickDropdown": { - "desc": "点击账号下拉按钮", + "desc": "点击账号下拉按钮,maafw在前台截图时5秒内会置顶一次游戏窗口,导致下拉框消失,因此需要重试", "recognition": { "type": "OCR", "param": { @@ -160,8 +153,34 @@ ] } }, - "action": "Click", + "action": "Custom", + "custom_action": "AccountSwitchWindowAction", //目前是PostMessage,需要管理员运行,手动启动agent需要注意 + "custom_action_param": { + "op": "click", + "window": "form" + }, "post_wait_freezes": 500, + "next": [ + "__AccountSwitchClickDropdownSuccess" + ] + }, + "__AccountSwitchClickDropdownSuccess": { + "desc": "点击账号下拉按钮成功", + "recognition": { + "type": "TemplateMatch", + "param": { + "roi": "__AccountSwitchClickDropdown", + "roi_offset": [ + -100, + 30, + 100, + 100 + ], + "template": "AccountSwitch/LoginSwitchIcon.png" + } + }, + "pre_delay": 0, + "post_delay": 0, "next": [ "__AccountSwitchOCRSelectAccount" ] diff --git a/assets/resource/pipeline/AeroSalvage.json b/assets/resource/pipeline/AeroSalvage.json index e94e8a7621..a4049aabb9 100644 --- a/assets/resource/pipeline/AeroSalvage.json +++ b/assets/resource/pipeline/AeroSalvage.json @@ -1,19 +1,39 @@ { "AeroSalvageMain": { "desc": "浮空回收入口", - "recognition": "TemplateMatch", - "roi": [ - 942, - 134, - 120, - 119 + "recognition": "And", + "all_of": [ + { + "recognition": "OCR", + "roi": [ + 0, + 0, + 200, + 60 + ], + "expected": [ + "浮空回收" + ] + }, + { + "recognition": "TemplateMatch", + "roi": [ + 942, + 134, + 120, + 119 + ], + "template": "AeroSalvage/Salvage.png" + } ], - "template": "AeroSalvage/Salvage.png", "pre_delay": 0, "post_delay": 0, "next": [ "AeroSalvageResetState" - ] + ], + "focus": { + "Node.Recognition.Succeeded": "🎈 开始浮空回收" + } }, "AeroSalvageResetState": { "desc": "重置", @@ -204,7 +224,10 @@ "next": [ "InWorld", "AeroSalvageMainLoop" - ] + ], + "focus": { + "Node.Recognition.Succeeded": "👌 已完成一轮浮空回收" + } }, // 识别节点 "AeroSalvagePlacementSiteTemplate": { diff --git a/assets/resource/pipeline/IMS/SyncItemData.json b/assets/resource/pipeline/IMS/SyncItemData.json index a711b0c9d0..07178e2a6b 100644 --- a/assets/resource/pipeline/IMS/SyncItemData.json +++ b/assets/resource/pipeline/IMS/SyncItemData.json @@ -58,8 +58,19 @@ ] }, "SyncItemDataRunFull": { - "desc": "A2 初次完整识别(page_dedup=false)。结束后优先 JumpBack 滑动增量,次数由 SyncItemDataScrollPage.max_hit 控制;用尽后走 Lock", + "desc": "A2 初次完整识别(page_dedup=false)。培养素材列表静止后识别;结束后优先 JumpBack 滑动增量,次数由 SyncItemDataScrollPage.max_hit 控制;用尽后走 Lock", "recognition": "DirectHit", + "pre_wait_freezes": { + "target": [ + 30, + 80, + 950, + 560 + ], + "time": 300, + "threshold": 0.97, + "timeout": 1500 + }, "pre_delay": 0, "action": { "type": "Custom", @@ -127,6 +138,17 @@ "end_hold": 300 } }, + "post_wait_freezes": { + "target": [ + 30, + 80, + 950, + 560 + ], + "time": 300, + "threshold": 0.97, + "timeout": 1500 + }, "post_delay": 0, "rate_limit": 0, "next": [ @@ -134,8 +156,19 @@ ] }, "SyncItemDataRunInc": { - "desc": "A2 增量识别(page_dedup=true)。完成后空 next,经 JumpBack 回到 RunFull.next 再决定是否继续滑动", + "desc": "A2 增量识别(page_dedup=true)。列表静止后识别;完成后空 next,经 JumpBack 回到 RunFull.next 再决定是否继续滑动", "recognition": "DirectHit", + "pre_wait_freezes": { + "target": [ + 30, + 80, + 950, + 560 + ], + "time": 300, + "threshold": 0.97, + "timeout": 1500 + }, "pre_delay": 0, "action": { "type": "Custom", diff --git a/assets/resource/pipeline/IMS/item/ADVANCED_COGNITIVE_CARRIER.json b/assets/resource/pipeline/IMS/item/ADVANCED_COGNITIVE_CARRIER.json index 9d4c024060..43a9b403f9 100644 --- a/assets/resource/pipeline/IMS/item/ADVANCED_COGNITIVE_CARRIER.json +++ b/assets/resource/pipeline/IMS/item/ADVANCED_COGNITIVE_CARRIER.json @@ -32,7 +32,7 @@ "IMS/item/ADVANCED_COGNITIVE_CARRIER_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, + "threshold": 0.85, //分数过低可能会和武陵精锻助剂混淆 "order_by": "Score" } }, @@ -68,7 +68,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +75,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +92,10 @@ "param": { "roi": "__ADVANCED_COGNITIVE_CARRIER_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/ADVANCED_COMBAT_RECORD.json b/assets/resource/pipeline/IMS/item/ADVANCED_COMBAT_RECORD.json index 9ce6bb7f24..0c63a5ff38 100644 --- a/assets/resource/pipeline/IMS/item/ADVANCED_COMBAT_RECORD.json +++ b/assets/resource/pipeline/IMS/item/ADVANCED_COMBAT_RECORD.json @@ -32,7 +32,6 @@ "IMS/item/ADVANCED_COMBAT_RECORD_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__ADVANCED_COMBAT_RECORD_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/ARMS_INSPECTOR.json b/assets/resource/pipeline/IMS/item/ARMS_INSPECTOR.json index 5658fb2392..11325212fb 100644 --- a/assets/resource/pipeline/IMS/item/ARMS_INSPECTOR.json +++ b/assets/resource/pipeline/IMS/item/ARMS_INSPECTOR.json @@ -32,7 +32,6 @@ "IMS/item/ARMS_INSPECTOR_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__ARMS_INSPECTOR_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/ARMS_INSP_KIT.json b/assets/resource/pipeline/IMS/item/ARMS_INSP_KIT.json index 1c22bb831d..5285c70e69 100644 --- a/assets/resource/pipeline/IMS/item/ARMS_INSP_KIT.json +++ b/assets/resource/pipeline/IMS/item/ARMS_INSP_KIT.json @@ -32,7 +32,6 @@ "IMS/item/ARMS_INSP_KIT_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__ARMS_INSP_KIT_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/ARMS_INSP_SET.json b/assets/resource/pipeline/IMS/item/ARMS_INSP_SET.json index 2a4dde29dc..de84245265 100644 --- a/assets/resource/pipeline/IMS/item/ARMS_INSP_SET.json +++ b/assets/resource/pipeline/IMS/item/ARMS_INSP_SET.json @@ -32,7 +32,6 @@ "IMS/item/ARMS_INSP_SET_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__ARMS_INSP_SET_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/CAST_DIE.json b/assets/resource/pipeline/IMS/item/CAST_DIE.json index 52c357ecfe..7101e685ae 100644 --- a/assets/resource/pipeline/IMS/item/CAST_DIE.json +++ b/assets/resource/pipeline/IMS/item/CAST_DIE.json @@ -32,7 +32,6 @@ "IMS/item/CAST_DIE_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__CAST_DIE_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/COOLANT_GEL.json b/assets/resource/pipeline/IMS/item/COOLANT_GEL.json index 2c672dcfbb..fc570ddff7 100644 --- a/assets/resource/pipeline/IMS/item/COOLANT_GEL.json +++ b/assets/resource/pipeline/IMS/item/COOLANT_GEL.json @@ -32,7 +32,6 @@ "IMS/item/COOLANT_GEL_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__COOLANT_GEL_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/D96_STEEL_SAMPLE_4.json b/assets/resource/pipeline/IMS/item/D96_STEEL_SAMPLE_4.json index 5d252a00f7..5ffe1561a6 100644 --- a/assets/resource/pipeline/IMS/item/D96_STEEL_SAMPLE_4.json +++ b/assets/resource/pipeline/IMS/item/D96_STEEL_SAMPLE_4.json @@ -32,7 +32,6 @@ "IMS/item/D96_STEEL_SAMPLE_4_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__D96_STEEL_SAMPLE_4_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/ELEMENTARY_COGNITIVE_CARRIER.json b/assets/resource/pipeline/IMS/item/ELEMENTARY_COGNITIVE_CARRIER.json index e8382e4bf3..29d4a6ecb3 100644 --- a/assets/resource/pipeline/IMS/item/ELEMENTARY_COGNITIVE_CARRIER.json +++ b/assets/resource/pipeline/IMS/item/ELEMENTARY_COGNITIVE_CARRIER.json @@ -32,7 +32,6 @@ "IMS/item/ELEMENTARY_COGNITIVE_CARRIER_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__ELEMENTARY_COGNITIVE_CARRIER_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/ELEMENTARY_COMBAT_RECORD.json b/assets/resource/pipeline/IMS/item/ELEMENTARY_COMBAT_RECORD.json index 0ad470ff1c..5cf84ce888 100644 --- a/assets/resource/pipeline/IMS/item/ELEMENTARY_COMBAT_RECORD.json +++ b/assets/resource/pipeline/IMS/item/ELEMENTARY_COMBAT_RECORD.json @@ -32,7 +32,6 @@ "IMS/item/ELEMENTARY_COMBAT_RECORD_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__ELEMENTARY_COMBAT_RECORD_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/HEAVY_CAST_DIE.json b/assets/resource/pipeline/IMS/item/HEAVY_CAST_DIE.json index 2b4eb605bb..0808a338cb 100644 --- a/assets/resource/pipeline/IMS/item/HEAVY_CAST_DIE.json +++ b/assets/resource/pipeline/IMS/item/HEAVY_CAST_DIE.json @@ -32,7 +32,6 @@ "IMS/item/HEAVY_CAST_DIE_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__HEAVY_CAST_DIE_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/INTERMEDIATE_COMBAT_RECORD.json b/assets/resource/pipeline/IMS/item/INTERMEDIATE_COMBAT_RECORD.json index b1967bf338..2af8f12aac 100644 --- a/assets/resource/pipeline/IMS/item/INTERMEDIATE_COMBAT_RECORD.json +++ b/assets/resource/pipeline/IMS/item/INTERMEDIATE_COMBAT_RECORD.json @@ -32,7 +32,6 @@ "IMS/item/INTERMEDIATE_COMBAT_RECORD_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__INTERMEDIATE_COMBAT_RECORD_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/MARK_OF_PERSEVERANCE.json b/assets/resource/pipeline/IMS/item/MARK_OF_PERSEVERANCE.json index d769b8f733..d4fa5b7f67 100644 --- a/assets/resource/pipeline/IMS/item/MARK_OF_PERSEVERANCE.json +++ b/assets/resource/pipeline/IMS/item/MARK_OF_PERSEVERANCE.json @@ -32,7 +32,6 @@ "IMS/item/MARK_OF_PERSEVERANCE_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__MARK_OF_PERSEVERANCE_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/METADIASTIMA_PHOTOEMISSION_TUBE.json b/assets/resource/pipeline/IMS/item/METADIASTIMA_PHOTOEMISSION_TUBE.json index a958d4da41..e977571024 100644 --- a/assets/resource/pipeline/IMS/item/METADIASTIMA_PHOTOEMISSION_TUBE.json +++ b/assets/resource/pipeline/IMS/item/METADIASTIMA_PHOTOEMISSION_TUBE.json @@ -32,7 +32,6 @@ "IMS/item/METADIASTIMA_PHOTOEMISSION_TUBE_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__METADIASTIMA_PHOTOEMISSION_TUBE_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/OROBERYL.json b/assets/resource/pipeline/IMS/item/OROBERYL.json index 9e3d936628..ae0ea96400 100644 --- a/assets/resource/pipeline/IMS/item/OROBERYL.json +++ b/assets/resource/pipeline/IMS/item/OROBERYL.json @@ -32,7 +32,6 @@ "IMS/item/OROBERYL_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__OROBERYL_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" @@ -134,7 +132,6 @@ 92, 56 ], - "method": 4, "lower": [ 200, 200, @@ -159,10 +156,10 @@ "param": { "roi": "__OROBERYL_NUMBER_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/PROTODISK.json b/assets/resource/pipeline/IMS/item/PROTODISK.json index 1a52ecfd49..670a29a06a 100644 --- a/assets/resource/pipeline/IMS/item/PROTODISK.json +++ b/assets/resource/pipeline/IMS/item/PROTODISK.json @@ -32,7 +32,6 @@ "IMS/item/PROTODISK_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__PROTODISK_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/PROTOHEDRON.json b/assets/resource/pipeline/IMS/item/PROTOHEDRON.json index fad9906b15..123381fa22 100644 --- a/assets/resource/pipeline/IMS/item/PROTOHEDRON.json +++ b/assets/resource/pipeline/IMS/item/PROTOHEDRON.json @@ -32,7 +32,6 @@ "IMS/item/PROTOHEDRON_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__PROTOHEDRON_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/PROTOPRISM.json b/assets/resource/pipeline/IMS/item/PROTOPRISM.json index ec25b802e3..da3a13bea5 100644 --- a/assets/resource/pipeline/IMS/item/PROTOPRISM.json +++ b/assets/resource/pipeline/IMS/item/PROTOPRISM.json @@ -32,7 +32,6 @@ "IMS/item/PROTOPRISM_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__PROTOPRISM_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/PROTOSET.json b/assets/resource/pipeline/IMS/item/PROTOSET.json index 43048c11b9..4fbe6d348a 100644 --- a/assets/resource/pipeline/IMS/item/PROTOSET.json +++ b/assets/resource/pipeline/IMS/item/PROTOSET.json @@ -32,7 +32,6 @@ "IMS/item/PROTOSET_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__PROTOSET_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/QUADRANT_FITTING_FLUID.json b/assets/resource/pipeline/IMS/item/QUADRANT_FITTING_FLUID.json index 86e8103e0e..ca39436a5a 100644 --- a/assets/resource/pipeline/IMS/item/QUADRANT_FITTING_FLUID.json +++ b/assets/resource/pipeline/IMS/item/QUADRANT_FITTING_FLUID.json @@ -32,7 +32,6 @@ "IMS/item/QUADRANT_FITTING_FLUID_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__QUADRANT_FITTING_FLUID_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/TACHYON_SCREENING_LATTICE.json b/assets/resource/pipeline/IMS/item/TACHYON_SCREENING_LATTICE.json index 42e46483b9..3c27ab2dde 100644 --- a/assets/resource/pipeline/IMS/item/TACHYON_SCREENING_LATTICE.json +++ b/assets/resource/pipeline/IMS/item/TACHYON_SCREENING_LATTICE.json @@ -32,7 +32,6 @@ "IMS/item/TACHYON_SCREENING_LATTICE_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__TACHYON_SCREENING_LATTICE_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/TRIPHASIC_NANOFLAKE.json b/assets/resource/pipeline/IMS/item/TRIPHASIC_NANOFLAKE.json index 08ddccba24..123906a3e7 100644 --- a/assets/resource/pipeline/IMS/item/TRIPHASIC_NANOFLAKE.json +++ b/assets/resource/pipeline/IMS/item/TRIPHASIC_NANOFLAKE.json @@ -32,7 +32,6 @@ "IMS/item/TRIPHASIC_NANOFLAKE_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__TRIPHASIC_NANOFLAKE_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/T_CREDS.json b/assets/resource/pipeline/IMS/item/T_CREDS.json index d39c912d98..a9c12fd8ad 100644 --- a/assets/resource/pipeline/IMS/item/T_CREDS.json +++ b/assets/resource/pipeline/IMS/item/T_CREDS.json @@ -32,7 +32,6 @@ "IMS/item/T_CREDS_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, "order_by": "Score" } }, @@ -68,7 +67,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +74,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +91,10 @@ "param": { "roi": "__T_CREDS_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" @@ -134,11 +132,10 @@ 99, 55 ], - "method": 4, "lower": [ - 200, - 200, - 200 + 158, + 158, + 158 ], "upper": [ 255, @@ -159,10 +156,10 @@ "param": { "roi": "__T_CREDS_NUMBER_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/IMS/item/WULING_ARTIFICING_CATALYST.json b/assets/resource/pipeline/IMS/item/WULING_ARTIFICING_CATALYST.json index eae3f8d98a..3c15cca96a 100644 --- a/assets/resource/pipeline/IMS/item/WULING_ARTIFICING_CATALYST.json +++ b/assets/resource/pipeline/IMS/item/WULING_ARTIFICING_CATALYST.json @@ -32,7 +32,7 @@ "IMS/item/WULING_ARTIFICING_CATALYST_TEMPLATE.png" ], "green_mask": true, - "threshold": 0.85, + "threshold": 0.85, //分数过低可能会和高级认知载体混淆 "order_by": "Score" } }, @@ -68,7 +68,6 @@ 0, -64 ], - "method": 4, "lower": [ 74, 74, @@ -76,8 +75,8 @@ ], "upper": [ 119, - 112, - 107 + 145, + 157 ], "count": 10 } @@ -93,10 +92,10 @@ "param": { "roi": "__WULING_ARTIFICING_CATALYST_COUNT_TEXT_COLOR", "roi_offset": [ - -1, - -1, - 2, - 2 + -6, + -2, + 12, + 4 ], "expected": [ "^\\d+$" diff --git a/assets/resource/pipeline/Interface/Scene.json b/assets/resource/pipeline/Interface/Scene.json index 8bf2c96d6f..1bea8e919d 100644 --- a/assets/resource/pipeline/Interface/Scene.json +++ b/assets/resource/pipeline/Interface/Scene.json @@ -17,6 +17,7 @@ "[JumpBack]__ScenePrivateWorldStorySkip", "[JumpBack]__ScenePrivateLoggedOutConfirm", "[JumpBack]SceneWaitLoadingExit", + "[JumpBack]__ScenePrivateScreenshotStableAbnormal", "[JumpBack]__ScenePrivateAnyExit" ] }, diff --git a/assets/resource/pipeline/RealtimeTask.json b/assets/resource/pipeline/RealtimeTask.json index 8def1940da..a29ec44974 100644 --- a/assets/resource/pipeline/RealtimeTask.json +++ b/assets/resource/pipeline/RealtimeTask.json @@ -19,6 +19,7 @@ "RealTimeQuickTeleportDirect", "PuzzleSolverOnScenePrepare", "PuzzleSolverOnSceneMain", + "AeroSalvageMain", "RealTimeAutoSkip", "AutoFight", "RealTimeSleep" diff --git a/assets/resource/pipeline/SceneManager/SceneCommon.json b/assets/resource/pipeline/SceneManager/SceneCommon.json index 61ed9eda90..71181cd605 100644 --- a/assets/resource/pipeline/SceneManager/SceneCommon.json +++ b/assets/resource/pipeline/SceneManager/SceneCommon.json @@ -13,6 +13,23 @@ }, "post_delay": 3000 }, + "__ScenePrivateScreenshotStableAbnormal": { + "desc": "连续画面不变时判定环境识别异常强制失败,部分用户vulcan全屏游戏时,所有截图api截取到的画面都是不动的", + "recognition": { + "type": "Custom", + "param": { + "custom_recognition": "ScreenshotStableRecognition" + } + }, + "action": "Custom", + "custom_action": "FalseAction", + "focus": { + "Node.Recognition.Succeeded": { + "content": "$task.SceneManager.focus.screenshot_stable_abnormal", + "display": "modal" + } + } + }, "__ScenePrivateLoggedOutConfirm": { "desc": "确认自动登出弹窗", "recognition": "And", diff --git a/assets/resource_macos/pipeline/MacOSKeyMap.json b/assets/resource_macos/pipeline/MacOSKeyMap.json index b18d9febfb..13c501d03b 100644 --- a/assets/resource_macos/pipeline/MacOSKeyMap.json +++ b/assets/resource_macos/pipeline/MacOSKeyMap.json @@ -98,6 +98,22 @@ } } }, + "GiftOperatorMoveResetBackward": { + "action": { + "type": "ClickKey", + "param": { + "key": 1 + } + } + }, + "GiftOperatorMoveResetForward": { + "action": { + "type": "ClickKey", + "param": { + "key": 13 + } + } + }, "GiftOperatorShiftToRunMapTracker": { "action": { "type": "ClickKey", diff --git a/assets/tasks/RealTimeTask.json b/assets/tasks/RealTimeTask.json index d193a67cae..97fe42cabd 100644 --- a/assets/tasks/RealTimeTask.json +++ b/assets/tasks/RealTimeTask.json @@ -14,6 +14,7 @@ "AutoPick", "QuickTeleport", "AutoPuzzleSolving", + "AutoAeroSalvage", "AutoZipline", "AutoPat", "AutoTaskInterval" @@ -976,6 +977,32 @@ } ] }, + "AutoAeroSalvage": { + "type": "switch", + "label": "$option.AutoAeroSalvage.label", + "description": "$option.AutoAeroSalvage.description", + "cases": [ + { + "name": "Yes", + "pipeline_override": { + "AeroSalvageCompleteConfirm": { + "next": [ + "AeroSalvageMainLoop", + "RealTimeTaskMain" + ] + } + } + }, + { + "name": "No", + "pipeline_override": { + "AeroSalvageMain": { + "enabled": false + } + } + } + ] + }, "AutoTaskInterval": { "type": "select", "label": "$option.AutoTaskInterval.label", diff --git a/assets/tasks/preset/RealtimeAssist.json b/assets/tasks/preset/RealtimeAssist.json index 6c3fdecec8..9540e59676 100644 --- a/assets/tasks/preset/RealtimeAssist.json +++ b/assets/tasks/preset/RealtimeAssist.json @@ -17,6 +17,7 @@ "AutoPick": "Yes", "QuickTeleport": "Yes", "AutoPuzzleSolving": "Yes", + "AutoAeroSalvage": "Yes", "AutoZipline": "Yes", "AutoPat": "No" } diff --git a/tools/optimize_templates/optimize_templates.json b/tools/optimize_templates/optimize_templates.json index e04b406df0..e62208b9df 100644 --- a/tools/optimize_templates/optimize_templates.json +++ b/tools/optimize_templates/optimize_templates.json @@ -984,5 +984,7 @@ "resource/image/IMS/item/PROTOHEDRON_TEMPLATE": "23e61c6003a5576e1309c77941b5691df11bcbc8b2b029c4269145b6362f48f9", "resource/image/Common/Button/TrackedMissionMapButton": "476da5205d64343ce84275dbb8978269172bbb27ca93ad47461424850674705b", "resource/image/IMS/item/OROBERYL_TEMPLATE": "3602a08527a0542a7c7e2b6451e9ba17937d0b2fd6a1d4aad584b1b80f7b4e57", - "resource/image/ProtocolSpace/MechanicsIcon": "10199ea056374f794a7109520918ce0b9a559eec05b012337649beff9898dba1" + "resource/image/ProtocolSpace/MechanicsIcon": "10199ea056374f794a7109520918ce0b9a559eec05b012337649beff9898dba1", + "resource/image/AccountSwitch/LoginClose": "eda659de62386318b0f14aca0b15ac806b7f2782ad9c42ff58decaaa3950e9ea", + "resource/image/AccountSwitch/LoginSwitchIcon": "f7dcce4dcc2fc879c4e9001b0949eb7b9ccc9f134aefa03fff030827a91e4a61" } diff --git a/tools/schema/custom.recognition.schema.json b/tools/schema/custom.recognition.schema.json index c81638ff3f..56fef8dce4 100644 --- a/tools/schema/custom.recognition.schema.json +++ b/tools/schema/custom.recognition.schema.json @@ -30,6 +30,7 @@ "ReceptionRoomExchangeCountdownWithinThresholdRecognition", "ReceptionRoomWaitExchangeKeepAliveDueRecognition", "ScheduleRecognition", + "ScreenshotStableRecognition", "SellProductCurrentBestOperator", "SellProductCurrentOperatorUncached", "SellProductOperatorCacheReady",