{
    "ResellMain": {
        "desc": "一键倒卖主入口",
        "pre_delay": 0,
        "post_delay": 500,
        "next": [
            "ResellStageCheckArea",
            "[JumpBack]SceneEnterMenuRegionalDevelopment"
        ]
    },
    "ResellStageCheckArea": {
        "desc": "检查当前地区",
        "recognition": "TemplateMatch",
        "roi": [
            1139,
            63,
            135,
            127
        ],
        "template": "Resell/inManagement.png",
        "threshold": 0.8,
        "action": "DoNothing",
        "next": [
            "ResellAreaInFourthValley",
            "ResellFristAreaInWuLing",
            "ResellAreaInWuLing",
            "ResellMain"
        ]
    },
    "ResellAreaInFourthValley": {
        "desc": "在四号谷地，进入地区建设管理",
        "recognition": "OCR",
        "roi": [
            25,
            174,
            178,
            48
        ],
        "expected": [
            "四号谷地",
            "四號谷地",
            "(?i)Valley\\s*IV",
            "Valley"
        ],
        "threshold": 0.8,
        "pre_delay": 0,
        "action": "DoNothing",
        "post_delay": 500,
        "next": [
            "ResellStageEnterStore",
            "ResellStageCheckArea"
        ]
    },
    "ResellFristAreaInWuLing": {
        "desc": "直接在武陵，进入四号谷地",
        "recognition": "OCR",
        "roi": [
            25,
            174,
            178,
            48
        ],
        "expected": [
            "武陵",
            "(?i)Wuling"
        ],
        "threshold": 0.8,
        "pre_delay": 0,
        "action": "DoNothing",
        "post_delay": 500,
        "next": [
            "Wuling2FourthValley",
            "ResellStageCheckArea"
        ]
    },
    "ResellAreaInWuLing": {
        "desc": "在武陵，进入地区建设管理",
        "recognition": "OCR",
        "roi": [
            25,
            174,
            178,
            48
        ],
        "expected": [
            "武陵",
            "(?i)Wuling"
        ],
        "threshold": 0.8,
        "pre_delay": 0,
        "action": "DoNothing",
        "post_delay": 500,
        "next": [
            "ResellStageEnterStore",
            "ResellStageCheckArea"
        ]
    },
    "ResellStageEnterStore": {
        "desc": "进入商店",
        "recognition": "TemplateMatch",
        "roi": [
            719,
            291,
            117,
            120
        ],
        "template": "Resell/EnterStore.png",
        "threshold": 0.8,
        "action": "Click",
        "post_delay": 500,
        "next": [
            "ResellWaitForStableStore"
        ]
    },
    "ResellWaitForStableStore": {
        "desc": "轮询 OCR 识别稳定需求物资调度页面加载完成",
        "recognition": "OCR",
        "roi": [
            0,
            0,
            1280,
            160
        ],
        "expected": [
            "稳定需求",
            "穩定需求",
            "Staple"
        ],
        "threshold": 0.6,
        "action": "DoNothing",
        "next": [
            "ResellClickToUnstableStore",
            "ResellWaitForStableStore"
        ]
    },
    "ResellClickToUnstableStore": {
        "desc": "识别并点击弹性需求物资标签",
        "recognition": "OCR",
        "roi": [
            300,
            50,
            300,
            80
        ],
        "expected": [
            "弹性需求",
            "彈性需求",
            "Elastic"
        ],
        "threshold": 0.6,
        "action": "Click",
        "post_delay": 500,
        "next": [
            "ResellWaitForUnstableStore",
            "ResellClickToUnstableStore"
        ]
    },
    "ResellWaitForUnstableStore": {
        "desc": "轮询匹配左侧市场图标，确认切换到弹性需求物资页面",
        "recognition": "TemplateMatch",
        "roi": [
            0,
            209,
            128,
            126
        ],
        "template": "Resell/inUnstableStore.png",
        "threshold": 0.8,
        "action": "DoNothing",
        "next": [
            "ResellCheckSoldoutInHeader",
            "ResellinUnstableStore",
            "ResellWaitForUnstableStore"
        ]
    },
    "ResellCheckSoldoutInHeader": {
        "desc": "在商店顶部，识别库存是否售罄，售罄则切换区域",
        "recognition": "OCR",
        "roi": [
            70,
            125,
            160,
            50
        ],
        "expected": [
            "剩余可购买数量\\s*0",
            "剩餘可購買數量\\s*0",
            "Can\\s*purchase\\s*0",
            "購入可能\\s*0",
            "남은\\s*구매\\s*가능\\s*수량\\s*0"
        ],
        "action": "DoNothing",
        "next": [
            "ChangeNextRegionPrepare"
        ],
        "focus": {
            "Node.Action.Starting": "当前地区已售罄，切换下个地区"
        }
    },
    "ResellCheckStockRemainInHeader": {
        "desc": "在商店顶部，识别库存未售罄，开始选择倒卖商品",
        "recognition": "OCR",
        "roi": [
            70,
            125,
            160,
            50
        ],
        "expected": [
            "剩余可购买数量\\s*[1-9]+",
            "剩餘可購買數量\\s*[1-9]+",
            "Can\\s*purchase\\s*[1-9]+",
            "購入可能\\s*[1-9]+",
            "남은\\s*구매\\s*가능\\s*수량\\s*[1-9]+"
        ],
        "action": "DoNothing",
        "next": [
            "ResellStart"
        ]
    },
    "ResellinUnstableStore": {
        "desc": "在弹性需求物资商店，滚动至最底端，开始识别价格",
        "recognition": "DirectHit",
        "action": "Scroll",
        "target": [
            640,
            360
        ],
        "dy": -240,
        "post_wait_freezes": 600,
        "next": [
            "ResellCheckStockRemainInHeader",
            "ResellStartCheckStock",
            "ResellStart"
        ]
    },
    "ResellStartCheckStock": {
        "desc": "检查库存",
        "recognition": "OCR",
        "roi": [
            70,
            385,
            1151,
            254
        ],
        "expected": "[0-9]+",
        "action": "Click",
        "repeat": 2, //有时候不知道为什么会在鼠标原本的位置先按下点击再去目标点位置，就重复一下
        "next": [
            "ResellCheckSoldout",
            "ResellCheckStockRemain"
        ]
    },
    "ResellCheckSoldout": {
        "desc": "识别库存是否售罄，售罄则切换区域",
        "recognition": "OCR",
        "roi": [
            951,
            571,
            82,
            26
        ],
        "expected": [
            "无法购买",
            "無法購買",
            "(?i)Cannot\\s*Purchase",
            "購入不可"
        ],
        "action": "DoNothing",
        "next": [
            "ChangeNextRegionPrepare"
        ],
        "focus": {
            "Node.Action.Starting": "当前地区已售罄，切换下个地区"
        }
    },
    "ResellCheckStockRemain": {
        "desc": "识别库存未售罄，开始选择倒卖商品",
        "recognition": "TemplateMatch",
        "roi": [
            1010,
            525,
            120,
            122
        ],
        "template": "Resell/Confirm.png",
        "threshold": 0.8,
        "action": "ClickKey",
        "key": 27,
        "next": [
            "ResellStart"
        ]
    },
    "ResellStart": {
        "desc": "开始识别价格，选择倒卖商品",
        "recognition": "DirectHit",
        "pre_delay": 0,
        "action": "Custom",
        "custom_action": "ResellInitAction",
        "post_delay": 500,
        "next": [
            "ResellCheckQuota"
        ]
    },
    "ResellWaitFriendPrice": {
        "desc": "轮询等待好友价格加载完成（加载中消失或售价可见）",
        "recognition": "DirectHit",
        "action": "DoNothing",
        "next": [
            "ResellROIFriendSalePrice",
            "ResellROIFriendLoading"
        ]
    }
}
