{
    "SellProductSellLoop": {
        "desc": "售卖循环，按优先级依次换货并尝试售卖",
        "recognition": "And",
        "all_of": [
            "SellProductInOutpost"
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "[Anchor]SellProductSellAttempt1",
            "[Anchor]SellProductSellAttempt2",
            "[Anchor]SellProductSellAttempt3",
            "[Anchor]SellProductSellAttempt4",
            "SellProductSellLoopEnd"
        ]
    },
    "SellProductAtSell": {
        "desc": "货品已换好，检查货物库存并尝试售卖",
        "recognition": "And",
        "all_of": [
            "SellProductInOutpost"
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "SellProductZeroProductAfterChangeStillEmpty",
            "[Anchor]SellProductZeroMoneyHandler",
            "SellProductNeedSelectGoodsTryChangeGoods",
            "SellProductClickBarRight",
            "SellProductDragBar"
        ]
    },
    "SellProductZeroProductColorMatch": {
        "desc": "识别红色文字判断是否有货",
        "recognition": "ColorMatch",
        "roi": [
            1083,
            327,
            109,
            24
        ],
        "method": 40,
        "lower": [
            0,
            30,
            80
        ],
        "upper": [
            5,
            150,
            200
        ],
        "count": 10,
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0
    },
    "SellProductWhiteTextPosition": {
        "desc": "识别白色文字位置，判断是否有货",
        "recognition": "ColorMatch",
        "roi": [
            1083,
            327,
            109,
            24
        ],
        "method": 4,
        "lower": [
            190,
            190,
            190
        ],
        "upper": [
            255,
            255,
            255
        ],
        "count": 10,
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0
    },
    "SellProductZeroProduct": {
        "desc": "货物数量不足",
        "recognition": "Or",
        "any_of": [
            "SellProductZeroProductColorMatch",
            {
                "recognition": "And",
                "all_of": [
                    "SellProductWhiteTextPosition",
                    {
                        "recognition": "OCR",
                        "roi": "SellProductWhiteTextPosition",
                        "expected": [
                            "^[0-9]{1,3}$"
                        ],
                        "only_rec": true
                    }
                ]
            }
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0
    },
    "SellProductZeroProductAfterChangeStillEmpty": {
        "desc": "换货后货物仍不足，尝试下一次售卖配置",
        "recognition": "And",
        "all_of": [
            "SellProductZeroProduct"
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "SellProductSellLoop"
        ],
        "focus": {
            "Node.Recognition.Succeeded": "当前选择产品缺货，请制造或更换"
        }
    },
    "SellProductNeedSelectGoodsTryChangeGoods": {
        "desc": "提示需要选择交易货品时，尝试更换一次货品",
        "recognition": "OCR",
        "roi": [
            900,
            611,
            350,
            77
        ],
        "expected": [
            "请选择用于交易的货品",
            "請選擇用於交易的貨品",
            "(?i)Select\\s*Goods\\s*to\\s*Trade",
            "取引用の商品を選択してください",
            "거래할 상품 선택 필요"
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "SellProductChangeGoods"
        ]
    },
    "SellProductZeroMoney": {
        "desc": "调度券余量为0",
        "recognition": "OCR",
        "roi": [
            900,
            611,
            350,
            77
        ],
        "expected": [
            "肥料数量不足",
            "肥料數量不足",
            "(?i)Insufficient",
            "肥料が足りません",
            "不足",
            "거점 관리권 보유량 부족"
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0
    },
    "SellProductZeroMoneyWithTip": {
        "desc": "调度券不足（仅未成交时提示）",
        "recognition": "And",
        "all_of": [
            "SellProductZeroMoney"
        ],
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0,
        "focus": {
            "Node.Recognition.Succeeded": "该据点调度券不足，过一会再来吧"
        }
    },
    "SellProductClickBarRight": {
        "desc": "点击进度条最右侧",
        "recognition": "TemplateMatch",
        "roi": [
            1115,
            507,
            88,
            103
        ],
        "template": [
            "SellProduct/SellProductBarRight.png"
        ],
        "method": 10001,
        "order_by": "Score",
        "pre_delay": 0,
        "action": "Click",
        "target_offset": [
            7,
            16,
            -21,
            -32
        ],
        // 单击后需要等待一会儿再交易
        "post_wait_freezes": 80,
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "SellProductSell"
        ]
    },
    "SellProductDragBar": {
        "desc": "备选方案-滑动滑动条",
        "recognition": "TemplateMatch",
        "roi": [
            1000,
            500,
            200,
            150
        ],
        "template": [
            "SellProduct/SellProductBar.png"
        ],
        "method": 10001,
        "pre_delay": 0,
        "action": "Swipe",
        "end_offset": [
            [
                0,
                0,
                400,
                0
            ]
        ],
        "duration": [
            500
        ],
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "SellProductSell"
        ]
    },
    "SellProductSell": {
        "desc": "交易",
        "recognition": "OCR",
        "roi": [
            1000,
            640,
            250,
            100
        ],
        "expected": [
            "交易",
            "(?i)Trade",
            "取引",
            "거래"
        ],
        "pre_delay": 0,
        "action": "Click",
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "SellProductSellCheck"
        ]
    },
    "SellProductSellCheck": {
        "desc": "交易后确认",
        "recognition": "And",
        "all_of": [
            "CloseRewardsButton",
            {
                "recognition": "TemplateMatch",
                "roi": [
                    577,
                    10,
                    138,
                    118
                ],
                "template": [
                    "SellProduct/SellProductCheckHeader.png"
                ]
            }
        ],
        "pre_wait_freezes": 80,
        "pre_delay": 0,
        "action": "Click",
        "anchor": {
            "SellProductZeroMoneyHandler": "SellProductZeroMoney"
        },
        "post_delay": 0,
        "rate_limit": 0,
        "next": [
            "SellProductAtSell"
        ],
        "focus": {
            "Node.Action.Succeeded": "成功完成一次交易"
        }
    },
    "SellProductSellLoopEnd": {
        "desc": "售卖循环结束，所有售卖尝试完成",
        "pre_delay": 0,
        "post_delay": 0,
        "rate_limit": 0
    }
}
