{
    "ProtocolSpaceEnterSpace": {
        "desc": "进入协议空间",
        "recognition": "Or",
        "any_of": [
            "WhiteConfirmButtonType1",
            {
                "recognition": "OCR",
                "roi": [
                    -250,
                    -150,
                    250,
                    150
                ],
                "expected": [
                    "进入",
                    "進入",
                    "Enter"
                ]
            }
        ],
        "pre_delay": 0,
        "action": "Click",
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "ProtocolSpacePopupSanityLow",
            "ProtocolSpaceEnterSpacePrepareSuccess"
        ],
        "focus": {
            "Node.Action.Succeeded": "进入协议空间"
        }
    },
    "ProtocolSpaceEnterSpacePrepareSuccess": {
        "desc": "进入协议空间准备界面成功",
        "recognition": "TemplateMatch",
        "roi": [
            0,
            0,
            100,
            100
        ],
        "template": "ProtocolSpace/TeamChooseIcon.png",
        "threshold": 0.9,
        "pre_wait_freezes": {
            "time": 200,
            "target": [
                0,
                0,
                100,
                200
            ]
        },
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "[JumpBack]ProtocolSpaceTeamChoose",
            "ProtocolSpaceEnterSpaceConfirm"
        ]
    },
    "ProtocolSpaceTeamChooseTextRecognition": {
        "desc": "识别协议空间队伍",
        "recognition": "OCR",
        "roi": [
            0,
            -60,
            500,
            35
        ],
        "expected": [
            "01"
        ]
    },
    "ProtocolSpaceTeamChoose": {
        "desc": "选择协议空间队伍",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceTeamChooseTextRecognition",
            {
                "recognition": "ColorMatch",
                "roi": "ProtocolSpaceTeamChooseTextRecognition",
                "roi_offset": [
                    -30,
                    0,
                    10,
                    0
                ],
                "lower": [
                    30,
                    30,
                    30
                ],
                "upper": [
                    45,
                    45,
                    45
                ],
                "connected": true
            }
        ],
        "pre_delay": 0,
        "action": "Click",
        "post_wait_freezes": 200,
        "post_delay": 0,
        "focus": {
            "Node.Action.Succeeded": "选择队伍"
        }
    },
    "ProtocolSpacePopupSanityLow": {
        "desc": "弹出理智不足，退出任务",
        "recognition": {
            "type": "OCR",
            "param": {
                "roi": [
                    279,
                    295,
                    310,
                    40
                ],
                "expected": [
                    "理智不足",
                    "Insufficient Sanity"
                ]
            }
        },
        "focus": {
            "Node.Recognition.Succeeded": "理智不足，结束任务"
        }
    },
    "ProtocolSpaceEnterSpaceConfirm": {
        "desc": "确认进入协议空间",
        "recognition": "Or",
        "any_of": [
            "YellowConfirmButtonType2",
            {
                "recognition": "OCR",
                "roi": [
                    -250,
                    -150,
                    250,
                    150
                ],
                "expected": [
                    "进入",
                    "進入",
                    "Enter"
                ]
            }
        ],
        "pre_wait_freezes": 400,
        "action": "Click",
        "next": [
            "[JumpBack]SceneWaitLoadingExit",
            "ProtocolSpaceEnterSpaceSuccess"
        ],
        "focus": {
            "Node.Action.Succeeded": "确认进入协议空间"
        }
    },
    "ProtocolSpaceIn": {
        "desc": "判断在协议空间内",
        "recognition": "TemplateMatch",
        "roi": [
            0,
            0,
            150,
            150
        ],
        "template": "ProtocolSpace/RetreatSpace.png"
    },
    "ProtocolSpaceEnterSpaceSuccess": {
        "desc": "进入协议空间成功",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn"
        ],
        "pre_delay": 0,
        "post_wait_freezes": 200,
        "post_delay": 0,
        "next": [
            "ProtocolSpaceEnterSpaceSprint1"
        ],
        "focus": {
            "Node.Recognition.Succeeded": "进入协议空间成功"
        }
    },
    "ProtocolSpaceEnterSpaceSprint1": {
        "desc": "尝试第一次冲刺（技能提升界面起始位置，在全低画质下与光球重叠无法识别）",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn"
        ],
        "pre_delay": 0,
        "action": "Click",
        "target": [
            600,
            320,
            80,
            80
        ],
        "contact": 1,
        "post_delay": 600,
        "next": [
            "ProtocolSpaceTouchStartTouch",
            "ProtocolSpaceEnterSpaceSprint2"
        ]
    },
    "ProtocolSpaceEnterSpaceSprint2": {
        "desc": "尝试第二次冲刺",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn"
        ],
        "pre_delay": 0,
        "action": "Click",
        "target": [
            600,
            320,
            80,
            80
        ],
        "contact": 1,
        "post_delay": 600,
        "next": [
            "ProtocolSpaceTouchStartTouch",
            "ProtocolSpaceEnterSpaceSprint3"
        ]
    },
    "ProtocolSpaceEnterSpaceSprint3": {
        "desc": "尝试第三次冲刺",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn"
        ],
        "pre_delay": 0,
        "action": "Click",
        "target": [
            600,
            320,
            80,
            80
        ],
        "contact": 1,
        "post_delay": 600,
        "next": [
            "ProtocolSpaceTouchStartTouch",
            "[JumpBack]ProtocolSpaceTouchStartMoveToTarget",
            "[JumpBack]ProtocolSpaceTouchStartNotFound"
        ]
    },
    "ProtocolSpaceTouchStartMoveToTarget": {
        "desc": "向目标移动",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn",
            {
                "recognition": "NeuralNetworkDetect",
                "roi": [
                    0,
                    0,
                    0,
                    0
                ],
                "expected": 1,
                "model": "ProtocolSpace/best.onnx"
            }
        ],
        "box_index": 1,
        "pre_delay": 0,
        "action": "Custom",
        "custom_action": "CharacterMoveToTargetAction",
        "custom_action_param": {
            "align_threshold": 120
        },
        "post_delay": 300,
        "focus": {
            "Node.Recognition.Succeeded": "向开始点移动"
        }
    },
    "ProtocolSpaceTouchStartNotFound": {
        "desc": "光点未找到，向右旋转",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn"
        ],
        "pre_delay": 0,
        "action": "Custom",
        "custom_action": "CharacterMoveToTargetNotFoundAction",
        "custom_action_param": {
            "delta": 45
        },
        "post_delay": 0,
        "focus": {
            "Node.Action.Succeeded": "找不到开始点"
        }
    },
    "ProtocolSpaceTouchStartTouch": {
        "desc": "判断出现触碰提示，开始触碰",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn",
            {
                "recognition": "OCR",
                "roi": [
                    755,
                    330,
                    297,
                    312
                ],
                "expected": [
                    "触碰",
                    "觸碰",
                    "Touch",
                    "触れる",
                    "접촉하기"
                ]
            }
        ],
        "action": "ClickKey",
        "key": 70,
        "next": [
            "ProtocolSpaceTouchExitTouch",
            "ProtocolSpaceOperationFailed",
            "[JumpBack]AutoFight",
            "[JumpBack]ProtocolSpaceTouchExitMoveToTarget",
            "[JumpBack]ProtocolSpaceTouchExitNotFound"
        ],
        "focus": {
            "Node.Action.Succeeded": "开始行动"
        }
    },
    "ProtocolSpaceTouchExitMoveToTarget": {
        "desc": "向目标移动",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn",
            {
                "recognition": "NeuralNetworkDetect",
                "roi": [
                    0,
                    0,
                    0,
                    0
                ],
                "expected": 0,
                "model": "ProtocolSpace/best.onnx"
            }
        ],
        "box_index": 1,
        "pre_delay": 0,
        "action": "Custom",
        "custom_action": "CharacterMoveToTargetAction",
        "custom_action_param": {
            "align_threshold": 120
        },
        "post_delay": 300,
        "focus": {
            "Node.Recognition.Succeeded": "向退出点移动"
        }
    },
    "ProtocolSpaceTouchExitNotFound": {
        "desc": "退出未找到，向右旋转",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn"
        ],
        "pre_delay": 0,
        "action": "Custom",
        "custom_action": "CharacterMoveToTargetNotFoundAction",
        "custom_action_param": {
            "delta": 90
        },
        "post_delay": 0,
        "focus": {
            "Node.Action.Succeeded": "找不到退出点"
        }
    },
    "ProtocolSpaceTouchExitTouch": {
        "desc": "判断出现触碰提示，开始触碰",
        "recognition": "And",
        "all_of": [
            "ProtocolSpaceIn",
            {
                "recognition": "OCR",
                "roi": [
                    755,
                    330,
                    297,
                    312
                ],
                "expected": [
                    "领取",
                    "領取",
                    "[Cc]laim",
                    "受取",
                    "획득하기"
                ]
            }
        ],
        "action": "ClickKey",
        "key": 70,
        "next": [
            "ProtocolSpaceReward"
        ],
        "focus": {
            "Node.Action.Succeeded": "领取奖励"
        }
    },
    "ProtocolSpaceReward": {
        "desc": "协议空间奖励界面",
        "recognition": "And",
        "all_of": [
            "InNoticeRewards"
        ],
        "pre_wait_freezes": 200,
        "next": [
            "ProtocolSpaceRewardSanityLow",
            "ProtocolSpaceRewardUsePermit",
            "ProtocolSpaceRewardDontUsePermit",
            "ProtocolSpaceRewardClaim"
        ]
    },
    "ProtocolSpaceRewardSanityLowFilter": {
        "recognition": "ColorMatch",
        "method": 4,
        "lower": [
            100,
            50,
            50
        ],
        "upper": [
            255,
            130,
            130
        ]
    },
    "ProtocolSpaceRewardUsePermitSanityLow": {
        "desc": "使用理智消耗许可时理智不足",
        "recognition": "OCR",
        "roi": [
            680,
            530,
            90,
            35
        ],
        "expected": [
            "\\d"
        ],
        "color_filter": "ProtocolSpaceRewardSanityLowFilter",
        "next": [
            "ProtocolSpaceRewardDontUsePermit"
        ],
        "focus": {
            "Node.Recognition.Succeeded": "理智不足，尝试不使用理智消耗许可"
        }
    },
    "ProtocolSpaceRewardSanityLow": {
        "desc": "理智不足",
        "recognition": "OCR",
        "roi": [
            680,
            530,
            90,
            35
        ],
        "expected": [
            "\\d"
        ],
        "color_filter": "ProtocolSpaceRewardSanityLowFilter",
        "focus": {
            "Node.Recognition.Succeeded": "理智不足，结束任务"
        }
    },
    "ProtocolSpaceRewardDontUsePermit": {
        "desc": "协议空间奖励界面不使用许可",
        "recognition": "OCR",
        "roi": [
            360,
            250,
            560,
            100
        ],
        "expected": [
            "消耗",
            "Cost"
        ],
        "action": "Click",
        "next": [
            "ProtocolSpaceRewardClaim"
        ],
        "focus": {
            "Node.Action.Succeeded": "不使用理智消耗许可"
        }
    },
    "ProtocolSpaceRewardUsePermit": {
        "desc": "协议空间奖励界面使用许可",
        "recognition": "OCR",
        "roi": [
            360,
            390,
            560,
            100
        ],
        "expected": [
            "理智消耗许可",
            "理智消耗許可",
            "(?i)Sanity\\s*Usage\\s*Permit",
            "理性消費許可証",
            "이성 소모 허가증"
        ],
        "action": "Click",
        "next": [
            "ProtocolSpaceRewardUsePermitSanityLow",
            "ProtocolSpaceRewardClaim"
        ],
        "focus": {
            "Node.Action.Succeeded": "尝试使用理智消耗许可"
        }
    },
    "ProtocolSpaceRewardClaim": {
        "desc": "协议空间奖励界面直接领取，比如体力活动时无需选择",
        "recognition": "And",
        "all_of": [
            "YellowConfirmButtonType1"
        ],
        "action": "Click",
        "next": [
            "ProtocolSpaceRewardExit"
        ],
        "focus": {
            "Node.Action.Succeeded": "确认领取奖励"
        }
    },
    "ProtocolSpaceRewardExit": {
        "desc": "协议空间奖励界面退出",
        "recognition": "And",
        "all_of": [
            {
                "recognition": "OCR",
                "roi": [
                    520,
                    0,
                    240,
                    180
                ],
                "expected": [
                    "获得奖励",
                    "獲得獎勵",
                    "Rewards Acquired",
                    "報酬一覧",
                    "보상 획득"
                ]
            },
            "CancelButton"
        ],
        "box_index": 1,
        "pre_wait_freezes": {
            "target": [
                300,
                250,
                750,
                200
            ],
            "time": 200
        },
        "action": "Click",
        "next": [
            "ProtocolSpaceOperationSuccessExitToWorld",
            "[JumpBack]SceneAnyEnterWorld"
        ],
        "focus": {
            "Node.Action.Succeeded": "退出协议空间"
        }
    },
    "ProtocolSpaceOperationSuccessExitToWorld": {
        "desc": "行动成功，返回大世界回血，完成一轮战斗",
        "recognition": "And",
        "all_of": [
            "InWorld"
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "next": [
            "ProtocolSpaceOperationSuccessExitToWorldContinue",
            "ProtocolSpaceOperationStopTask"
        ]
    },
    "ProtocolSpaceOperationSuccessExitToWorldContinue": {
        "desc": "行动成功设置节点",
        "pre_delay": 0,
        "post_delay": 0,
        "next": [
            "ProtocolSpaceEntry"
        ],
        "focus": {
            "Node.Recognition.Succeeded": "继续行动"
        }
    },
    "ProtocolSpaceOperationStopTask": {
        "desc": "停止任务",
        "pre_delay": 0,
        "post_delay": 0
    },
    "ProtocolSpaceOperationFailed": {
        "desc": "行动失败",
        "recognition": "And",
        "all_of": [
            {
                "recognition": "OCR",
                "roi": [
                    520,
                    0,
                    240,
                    180
                ],
                "expected": [
                    "行动失败",
                    "行動失敗",
                    "Operation Failed",
                    "작전 실패"
                ]
            },
            "CancelButton"
        ],
        "box_index": 1,
        "pre_wait_freezes": 200,
        "action": "Click",
        "next": [
            "ProtocolSpaceOperationFailedExitToWorld",
            "[JumpBack]SceneAnyEnterWorld"
        ],
        "focus": {
            "Node.Action.Succeeded": "行动失败"
        }
    },
    "ProtocolSpaceOperationFailedExitToWorld": {
        "desc": "行动失败，返回大世界回血，完成一轮战斗",
        "recognition": "And",
        "all_of": [
            "InWorld"
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "next": [
            "ProtocolSpaceOperationFailedExitToWorldContinue",
            "ProtocolSpaceOperationStopTask"
        ]
    },
    "ProtocolSpaceOperationFailedExitToWorldContinue": {
        "desc": "行动失败设置节点",
        "pre_delay": 0,
        "post_delay": 0,
        "next": [
            "ProtocolSpaceEntry"
        ],
        "focus": {
            "Node.Recognition.Succeeded": "重试行动"
        }
    }
}
