{
    "task": [
        {
            "name": "CreditShoppingN2",
            "label": "$task.CreditShopping.label",
            "entry": "CreditShoppingMain",
            "description": "$task.CreditShopping.description",
            "option": [
                "CreditShoppingReserve",
                "CreditShoppingGetCreditsSetting",
                "CreditShoppingPriority1",
                "CreditShoppingPriority2",
                "CreditShoppingPriority3",
                "CreditShoppingForce"
            ],
            "group": [
                "daily"
            ]
        }
    ],
    "option": {
        "CreditShoppingGetCreditsSetting": {
            "type": "switch",
            "label": "$option.CreditShoppingGetCreditsSetting.label",
            "description": "$option.CreditShoppingGetCreditsSetting.description",
            "default_case": "Yes",
            "cases": [
                {
                    "name": "Yes",
                    "option": [
                        "AutoGetCredits",
                        "CreditShoppingSendCluesWhenInsufficient"
                    ]
                },
                {
                    "name": "No",
                    "pipeline_override": {
                        "AutoGetCredits": {
                            "recognition": {
                                "type": "OCR",
                                "param": {
                                    "roi": [
                                        0,
                                        0,
                                        1,
                                        1
                                    ],
                                    "expected": [
                                        "a^"
                                    ]
                                }
                            }
                        },
                        "ReceptionRoomSendCluesEntry_NeedCredit": {
                            "enabled": false
                        }
                    }
                }
            ]
        },
        "AutoGetCredits": {
            "type": "switch",
            "label": "$option.AutoGetCredits.label",
            "description": "$option.AutoGetCredits.description",
            "default_case": "Yes",
            "cases": [
                {
                    "name": "Yes",
                    "pipeline_override": {}
                },
                {
                    "name": "No",
                    "pipeline_override": {
                        "AutoGetCredits": {
                            "recognition": {
                                "type": "OCR",
                                "param": {
                                    "roi": [
                                        0,
                                        0,
                                        1,
                                        1
                                    ],
                                    "expected": [
                                        "a^"
                                    ]
                                }
                            }
                        }
                    }
                }
            ]
        },
        "CreditShoppingSendCluesWhenInsufficient": {
            "type": "switch",
            "label": "$option.CreditShoppingSendCluesWhenInsufficient.label",
            "description": "$option.CreditShoppingSendCluesWhenInsufficient.description",
            "default_case": "No",
            "cases": [
                {
                    "name": "Yes",
                    "option": [
                        "CreditShoppingClueSend",
                        "CreditShoppingClueStockLimit"
                    ],
                    "pipeline_override": {
                        "ReceptionRoomSendCluesEntry_NeedCredit": {
                            "enabled": true,
                            "max_hit": 1
                        }
                    }
                },
                {
                    "name": "No",
                    "pipeline_override": {
                        "ReceptionRoomSendCluesEntry_NeedCredit": {
                            "enabled": false
                        }
                    }
                }
            ]
        },
        "CreditShoppingClueSend": {
            "type": "input",
            "label": "$option.CreditShoppingClueSend.label",
            "description": "$option.CreditShoppingClueSend.description",
            "inputs": [
                {
                    "name": "MaxClueSendWhenInsufficient",
                    "label": "$option.CreditShoppingClueSend.MaxClueSend.label",
                    "description": "$option.CreditShoppingClueSend.MaxClueSend.description",
                    "pipeline_type": "int",
                    "verify": "^\\d+$",
                    "default": "1"
                }
            ],
            "pipeline_override": {
                "ReceptionRoomSendCluesSelectClues_NeedCredit": {
                    "max_hit": "{MaxClueSendWhenInsufficient}"
                }
            }
        },
        "CreditShoppingClueStockLimit": {
            "type": "select",
            "label": "$option.CreditShoppingClueStockLimit.label",
            "description": "$option.CreditShoppingClueStockLimit.description",
            "default_case": "2",
            "cases": [
                {
                    "name": "1",
                    "label": "$option.CreditShoppingClueStockLimit.cases.1.label",
                    "pipeline_override": {
                        "ClueItemCount_NeedCredit": {
                            "recognition": {
                                "type": "OCR",
                                "param": {
                                    "roi": "ClueItem",
                                    "roi_offset": [
                                        165,
                                        0,
                                        -46,
                                        0
                                    ],
                                    "expected": [
                                        "^(?:[2-9]|1[0-9]|20)$"
                                    ],
                                    "only_rec": true
                                }
                            }
                        }
                    }
                },
                {
                    "name": "2",
                    "label": "$option.CreditShoppingClueStockLimit.cases.2.label",
                    "pipeline_override": {
                        "ClueItemCount_NeedCredit": {
                            "recognition": {
                                "type": "OCR",
                                "param": {
                                    "roi": "ClueItem",
                                    "roi_offset": [
                                        165,
                                        0,
                                        -46,
                                        0
                                    ],
                                    "expected": [
                                        "^(20|[3-9]|1[0-9])$"
                                    ],
                                    "only_rec": true
                                }
                            }
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority1": {
            "type": "switch",
            "label": "$option.CreditShoppingPriority1.label",
            "description": "$option.CreditShoppingPriority1.description",
            "default_case": "Yes",
            "cases": [
                {
                    "name": "Yes",
                    "option": [
                        "CreditShoppingPriority1Items",
                        "CreditShoppingPriority1DiscountValue"
                    ],
                    "pipeline_override": {
                        "CreditShoppingBuyPriority1": {
                            "enabled": true
                        }
                    }
                },
                {
                    "name": "No",
                    "pipeline_override": {
                        "CreditShoppingBuyPriority1": {
                            "enabled": false
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority1Items": {
            "type": "checkbox",
            "label": "$option.CreditShoppingPriority1Items.label",
            "default_case": [
                "ArsenalTicket",
                "Oroberyl"
            ],
            "cases": [
                {
                    "name": "ArsenalTicket",
                    "label": "$option.CreditShoppingItems.cases.ArsenalTicket.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "arsenal_ticket": [
                                    "武库配额",
                                    "武庫配額",
                                    "Arsenal Ticket",
                                    "武庫配給"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "arsenal_ticket": [
                                    "武库配额",
                                    "武庫配額",
                                    "Arsenal Ticket",
                                    "武庫配給"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Oroberyl",
                    "label": "$option.CreditShoppingItems.cases.Oroberyl.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "oroberyl": [
                                    "嵌晶玉",
                                    "嵌晶玉",
                                    "Oroberyl",
                                    "赤晶玉"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "oroberyl": [
                                    "嵌晶玉",
                                    "嵌晶玉",
                                    "Oroberyl",
                                    "赤晶玉"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "TCreds",
                    "label": "$option.CreditShoppingItems.cases.TCreds.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "t_creds": [
                                    "折金票",
                                    "折金票",
                                    "T-Creds",
                                    "折金券"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "t_creds": [
                                    "折金票",
                                    "折金票",
                                    "T-Creds",
                                    "折金券"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ElementaryCognitiveCarrier",
                    "label": "$option.CreditShoppingItems.cases.ElementaryCognitiveCarrier.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "elementary_cognitive_carrier": [
                                    "初级认知载体",
                                    "初級認知載體",
                                    "Elementary Cognitive Carrier",
                                    "初級認識媒体"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "elementary_cognitive_carrier": [
                                    "初级认知载体",
                                    "初級認知載體",
                                    "Elementary Cognitive Carrier",
                                    "初級認識媒体"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ElementaryCombatRecord",
                    "label": "$option.CreditShoppingItems.cases.ElementaryCombatRecord.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "elementary_combat_record": [
                                    "初级作战记录",
                                    "初級作戰紀錄",
                                    "Elementary Combat Record",
                                    "初級作戦記録"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "elementary_combat_record": [
                                    "初级作战记录",
                                    "初級作戰紀錄",
                                    "Elementary Combat Record",
                                    "初級作戦記録"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "IntermediateCombatRecord",
                    "label": "$option.CreditShoppingItems.cases.IntermediateCombatRecord.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "intermediate_combat_record": [
                                    "中级作战记录",
                                    "中級作戰紀錄",
                                    "Intermediate Combat Record",
                                    "中級作戦記録"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "intermediate_combat_record": [
                                    "中级作战记录",
                                    "中級作戰紀錄",
                                    "Intermediate Combat Record",
                                    "中級作戦記録"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ArmsInspector",
                    "label": "$option.CreditShoppingItems.cases.ArmsInspector.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "arms_inspector": [
                                    "武器检查单元",
                                    "武器檢查單元",
                                    "Arms Inspector",
                                    "武器検査ユニット"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "arms_inspector": [
                                    "武器检查单元",
                                    "武器檢查單元",
                                    "Arms Inspector",
                                    "武器検査ユニット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ArmsINSPKit",
                    "label": "$option.CreditShoppingItems.cases.ArmsINSPKit.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "arms_insp_kit": [
                                    "武器检查装置",
                                    "武器檢查裝置",
                                    "Arms INSP Kit",
                                    "武器検査セット"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "arms_insp_kit": [
                                    "武器检查装置",
                                    "武器檢查裝置",
                                    "Arms INSP Kit",
                                    "武器検査セット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "CastDie",
                    "label": "$option.CreditShoppingItems.cases.CastDie.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "cast_die": [
                                    "强固模具",
                                    "強固模具",
                                    "Cast Die",
                                    "硬質金型"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "cast_die": [
                                    "强固模具",
                                    "強固模具",
                                    "Cast Die",
                                    "硬質金型"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "HeavyCastDie",
                    "label": "$option.CreditShoppingItems.cases.HeavyCastDie.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "heavy_cast_die": [
                                    "重型强固模具",
                                    "重型強固模具",
                                    "Heavy Cast Die",
                                    "重硬質金型"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "heavy_cast_die": [
                                    "重型强固模具",
                                    "重型強固模具",
                                    "Heavy Cast Die",
                                    "重硬質金型"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protodisk",
                    "label": "$option.CreditShoppingItems.cases.Protodisk.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "protodisk": [
                                    "协议圆盘",
                                    "協議圓盤",
                                    "Protodisk",
                                    "協約ディスク"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "protodisk": [
                                    "协议圆盘",
                                    "協議圓盤",
                                    "Protodisk",
                                    "協約ディスク"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protoset",
                    "label": "$option.CreditShoppingItems.cases.Protoset.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "protoset": [
                                    "协议圆盘组",
                                    "協議圓盤組",
                                    "Protoset",
                                    "協約ディスクセット"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "protoset": [
                                    "协议圆盘组",
                                    "協議圓盤組",
                                    "Protoset",
                                    "協約ディスクセット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protoprism",
                    "label": "$option.CreditShoppingItems.cases.Protoprism.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "protoprism": [
                                    "协议棱柱",
                                    "協議稜柱",
                                    "Protoprism",
                                    "協約角柱"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "protoprism": [
                                    "协议棱柱",
                                    "協議稜柱",
                                    "Protoprism",
                                    "協約角柱"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protohedron",
                    "label": "$option.CreditShoppingItems.cases.Protohedron.label",
                    "pipeline_override": {
                        "BuyFirstOCR": {
                            "attach": {
                                "protohedron": [
                                    "协议棱柱组",
                                    "協議稜柱組",
                                    "Protohedron",
                                    "協約角柱セット"
                                ]
                            }
                        },
                        "BuyFirstOCR_CanNotAfford": {
                            "attach": {
                                "protohedron": [
                                    "协议棱柱组",
                                    "協議稜柱組",
                                    "Protohedron",
                                    "協約角柱セット"
                                ]
                            }
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority1DiscountValue": {
            "type": "select",
            "label": "$option.DiscountValue.label",
            "default_case": "Any",
            "cases": [
                {
                    "name": "Any",
                    "label": "$option.DiscountValue.cases.Any.label",
                    "pipeline_override": {
                        "IsDiscountPriority1": {
                            "recognition": {
                                "type": "ColorMatch",
                                "param": {
                                    "roi": "BuyFirstOCR",
                                    "roi_offset": [
                                        62,
                                        -172,
                                        -34,
                                        7
                                    ],
                                    "method": 6,
                                    "lower": [
                                        0
                                    ],
                                    "upper": [
                                        255
                                    ],
                                    "count": 1
                                }
                            }
                        },
                        "IsDiscountPriority1_CanNotAfford": {
                            "recognition": {
                                "type": "ColorMatch",
                                "param": {
                                    "roi": "BuyFirstOCR_CanNotAfford",
                                    "roi_offset": [
                                        62,
                                        -172,
                                        -34,
                                        7
                                    ],
                                    "method": 6,
                                    "lower": [
                                        0
                                    ],
                                    "upper": [
                                        255
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    }
                },
                {
                    "name": "-25%",
                    "label": "$option.DiscountValue.cases.-25%.label",
                    "pipeline_override": {
                        "IsDiscountPriority1": {
                            "expected": "25|50|75|95|99"
                        },
                        "IsDiscountPriority1_CanNotAfford": {
                            "expected": "25|50|75|95|99"
                        }
                    }
                },
                {
                    "name": "-50%",
                    "label": "$option.DiscountValue.cases.-50%.label",
                    "pipeline_override": {
                        "IsDiscountPriority1": {
                            "expected": "50|75|95|99"
                        },
                        "IsDiscountPriority1_CanNotAfford": {
                            "expected": "50|75|95|99"
                        }
                    }
                },
                {
                    "name": "-75%",
                    "label": "$option.DiscountValue.cases.-75%.label",
                    "pipeline_override": {
                        "IsDiscountPriority1": {
                            "expected": "75|95|99"
                        },
                        "IsDiscountPriority1_CanNotAfford": {
                            "expected": "75|95|99"
                        }
                    }
                },
                {
                    "name": "-95%",
                    "label": "$option.DiscountValue.cases.-95%.label",
                    "pipeline_override": {
                        "IsDiscountPriority1": {
                            "expected": "95|99"
                        },
                        "IsDiscountPriority1_CanNotAfford": {
                            "expected": "95|99"
                        }
                    }
                },
                {
                    "name": "-99%",
                    "label": "$option.DiscountValue.cases.-99%.label",
                    "pipeline_override": {
                        "IsDiscountPriority1": {
                            "expected": "99"
                        },
                        "IsDiscountPriority1_CanNotAfford": {
                            "expected": "99"
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority2": {
            "type": "switch",
            "label": "$option.CreditShoppingPriority2.label",
            "description": "$option.CreditShoppingPriority2.description",
            "default_case": "Yes",
            "cases": [
                {
                    "name": "Yes",
                    "option": [
                        "CreditShoppingPriority2Items",
                        "CreditShoppingPriority2DiscountValue"
                    ],
                    "pipeline_override": {
                        "CreditShoppingBuyPriority2": {
                            "enabled": true
                        }
                    }
                },
                {
                    "name": "No",
                    "pipeline_override": {
                        "CreditShoppingBuyPriority2": {
                            "enabled": false
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority2Items": {
            "type": "checkbox",
            "label": "$option.CreditShoppingPriority2Items.label",
            "default_case": [
                "ArmsInspector",
                "ArmsINSPKit",
                "ArsenalTicket",
                "CastDie",
                "ElementaryCognitiveCarrier",
                "ElementaryCombatRecord",
                "HeavyCastDie",
                "IntermediateCombatRecord",
                "Oroberyl",
                "Protodisk",
                "Protoprism",
                "Protohedron",
                "Protoset",
                "TCreds"
            ],
            "cases": [
                {
                    "name": "ArsenalTicket",
                    "label": "$option.CreditShoppingItems.cases.ArsenalTicket.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "arsenal_ticket": [
                                    "武库配额",
                                    "武庫配額",
                                    "Arsenal Ticket",
                                    "武庫配給"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Oroberyl",
                    "label": "$option.CreditShoppingItems.cases.Oroberyl.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "oroberyl": [
                                    "嵌晶玉",
                                    "嵌晶玉",
                                    "Oroberyl",
                                    "赤晶玉"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "TCreds",
                    "label": "$option.CreditShoppingItems.cases.TCreds.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "t_creds": [
                                    "折金票",
                                    "折金票",
                                    "T-Creds",
                                    "折金券"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ElementaryCognitiveCarrier",
                    "label": "$option.CreditShoppingItems.cases.ElementaryCognitiveCarrier.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "elementary_cognitive_carrier": [
                                    "初级认知载体",
                                    "初級認知載體",
                                    "Elementary Cognitive Carrier",
                                    "初級認識媒体"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ElementaryCombatRecord",
                    "label": "$option.CreditShoppingItems.cases.ElementaryCombatRecord.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "elementary_combat_record": [
                                    "初级作战记录",
                                    "初級作戰紀錄",
                                    "Elementary Combat Record",
                                    "初級作戦記録"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "IntermediateCombatRecord",
                    "label": "$option.CreditShoppingItems.cases.IntermediateCombatRecord.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "intermediate_combat_record": [
                                    "中级作战记录",
                                    "中級作戰紀錄",
                                    "Intermediate Combat Record",
                                    "中級作戦記録"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ArmsInspector",
                    "label": "$option.CreditShoppingItems.cases.ArmsInspector.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "arms_inspector": [
                                    "武器检查单元",
                                    "武器檢查單元",
                                    "Arms Inspector",
                                    "武器検査ユニット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ArmsINSPKit",
                    "label": "$option.CreditShoppingItems.cases.ArmsINSPKit.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "arms_insp_kit": [
                                    "武器检查装置",
                                    "武器檢查裝置",
                                    "Arms INSP Kit",
                                    "武器検査セット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "CastDie",
                    "label": "$option.CreditShoppingItems.cases.CastDie.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "cast_die": [
                                    "强固模具",
                                    "強固模具",
                                    "Cast Die",
                                    "硬質金型"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "HeavyCastDie",
                    "label": "$option.CreditShoppingItems.cases.HeavyCastDie.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "heavy_cast_die": [
                                    "重型强固模具",
                                    "重型強固模具",
                                    "Heavy Cast Die",
                                    "重硬質金型"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protodisk",
                    "label": "$option.CreditShoppingItems.cases.Protodisk.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "protodisk": [
                                    "协议圆盘",
                                    "協議圓盤",
                                    "Protodisk",
                                    "協約ディスク"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protoset",
                    "label": "$option.CreditShoppingItems.cases.Protoset.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "protoset": [
                                    "协议圆盘组",
                                    "協議圓盤組",
                                    "Protoset",
                                    "協約ディスクセット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protoprism",
                    "label": "$option.CreditShoppingItems.cases.Protoprism.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "protoprism": [
                                    "协议棱柱",
                                    "協議稜柱",
                                    "Protoprism",
                                    "協約角柱"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protohedron",
                    "label": "$option.CreditShoppingItems.cases.Protohedron.label",
                    "pipeline_override": {
                        "Priority2OCR": {
                            "attach": {
                                "protohedron": [
                                    "协议棱柱组",
                                    "協議稜柱組",
                                    "Protohedron",
                                    "協約角柱セット"
                                ]
                            }
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority2DiscountValue": {
            "type": "select",
            "label": "$option.DiscountValue.label",
            "default_case": "-75%",
            "cases": [
                {
                    "name": "Any",
                    "label": "$option.DiscountValue.cases.Any.label",
                    "pipeline_override": {
                        "IsDiscountPriority2": {
                            "recognition": {
                                "type": "ColorMatch",
                                "param": {
                                    "roi": "Priority2OCR",
                                    "roi_offset": [
                                        62,
                                        -172,
                                        -34,
                                        7
                                    ],
                                    "method": 6,
                                    "lower": [
                                        0
                                    ],
                                    "upper": [
                                        255
                                    ],
                                    "count": 1
                                }
                            }
                        },
                        "IsDiscountPriority2_CanNotAfford": {
                            "recognition": {
                                "type": "ColorMatch",
                                "param": {
                                    "roi": "Priority2OCR_CanNotAfford",
                                    "roi_offset": [
                                        62,
                                        -172,
                                        -34,
                                        7
                                    ],
                                    "method": 6,
                                    "lower": [
                                        0
                                    ],
                                    "upper": [
                                        255
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    }
                },
                {
                    "name": "-25%",
                    "label": "$option.DiscountValue.cases.-25%.label",
                    "pipeline_override": {
                        "IsDiscountPriority2": {
                            "expected": "25|50|75|95|99"
                        },
                        "IsDiscountPriority2_CanNotAfford": {
                            "expected": "25|50|75|95|99"
                        }
                    }
                },
                {
                    "name": "-50%",
                    "label": "$option.DiscountValue.cases.-50%.label",
                    "pipeline_override": {
                        "IsDiscountPriority2": {
                            "expected": "50|75|95|99"
                        },
                        "IsDiscountPriority2_CanNotAfford": {
                            "expected": "50|75|95|99"
                        }
                    }
                },
                {
                    "name": "-75%",
                    "label": "$option.DiscountValue.cases.-75%.label",
                    "pipeline_override": {
                        "IsDiscountPriority2": {
                            "expected": "75|95|99"
                        },
                        "IsDiscountPriority2_CanNotAfford": {
                            "expected": "75|95|99"
                        }
                    }
                },
                {
                    "name": "-95%",
                    "label": "$option.DiscountValue.cases.-95%.label",
                    "pipeline_override": {
                        "IsDiscountPriority2": {
                            "expected": "95|99"
                        },
                        "IsDiscountPriority2_CanNotAfford": {
                            "expected": "95|99"
                        }
                    }
                },
                {
                    "name": "-99%",
                    "label": "$option.DiscountValue.cases.-99%.label",
                    "pipeline_override": {
                        "IsDiscountPriority2": {
                            "expected": "99"
                        },
                        "IsDiscountPriority2_CanNotAfford": {
                            "expected": "99"
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority3": {
            "type": "switch",
            "label": "$option.CreditShoppingPriority3.label",
            "description": "$option.CreditShoppingPriority3.description",
            "default_case": "No",
            "cases": [
                {
                    "name": "Yes",
                    "option": [
                        "CreditShoppingPriority3Items",
                        "CreditShoppingPriority3DiscountValue"
                    ],
                    "pipeline_override": {
                        "CreditShoppingBuyPriority3": {
                            "enabled": true
                        }
                    }
                },
                {
                    "name": "No",
                    "pipeline_override": {
                        "CreditShoppingBuyPriority3": {
                            "enabled": false
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority3Items": {
            "type": "checkbox",
            "label": "$option.CreditShoppingPriority3Items.label",
            "default_case": [
                "ArsenalTicket",
                "Oroberyl"
            ],
            "cases": [
                {
                    "name": "ArsenalTicket",
                    "label": "$option.CreditShoppingItems.cases.ArsenalTicket.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "arsenal_ticket": [
                                    "武库配额",
                                    "武庫配額",
                                    "Arsenal Ticket",
                                    "武庫配給"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Oroberyl",
                    "label": "$option.CreditShoppingItems.cases.Oroberyl.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "oroberyl": [
                                    "嵌晶玉",
                                    "嵌晶玉",
                                    "Oroberyl",
                                    "赤晶玉"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "TCreds",
                    "label": "$option.CreditShoppingItems.cases.TCreds.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "t_creds": [
                                    "折金票",
                                    "折金票",
                                    "T-Creds",
                                    "折金券"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ElementaryCognitiveCarrier",
                    "label": "$option.CreditShoppingItems.cases.ElementaryCognitiveCarrier.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "elementary_cognitive_carrier": [
                                    "初级认知载体",
                                    "初級認知載體",
                                    "Elementary Cognitive Carrier",
                                    "初級認識媒体"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ElementaryCombatRecord",
                    "label": "$option.CreditShoppingItems.cases.ElementaryCombatRecord.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "elementary_combat_record": [
                                    "初级作战记录",
                                    "初級作戰紀錄",
                                    "Elementary Combat Record",
                                    "初級作戦記録"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "IntermediateCombatRecord",
                    "label": "$option.CreditShoppingItems.cases.IntermediateCombatRecord.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "intermediate_combat_record": [
                                    "中级作战记录",
                                    "中級作戰紀錄",
                                    "Intermediate Combat Record",
                                    "中級作戦記録"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ArmsInspector",
                    "label": "$option.CreditShoppingItems.cases.ArmsInspector.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "arms_inspector": [
                                    "武器检查单元",
                                    "武器檢查單元",
                                    "Arms Inspector",
                                    "武器検査ユニット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "ArmsINSPKit",
                    "label": "$option.CreditShoppingItems.cases.ArmsINSPKit.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "arms_insp_kit": [
                                    "武器检查装置",
                                    "武器檢查裝置",
                                    "Arms INSP Kit",
                                    "武器検査セット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "CastDie",
                    "label": "$option.CreditShoppingItems.cases.CastDie.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "cast_die": [
                                    "强固模具",
                                    "強固模具",
                                    "Cast Die",
                                    "硬質金型"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "HeavyCastDie",
                    "label": "$option.CreditShoppingItems.cases.HeavyCastDie.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "heavy_cast_die": [
                                    "重型强固模具",
                                    "重型強固模具",
                                    "Heavy Cast Die",
                                    "重硬質金型"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protodisk",
                    "label": "$option.CreditShoppingItems.cases.Protodisk.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "protodisk": [
                                    "协议圆盘",
                                    "協議圓盤",
                                    "Protodisk",
                                    "協約ディスク"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protoset",
                    "label": "$option.CreditShoppingItems.cases.Protoset.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "protoset": [
                                    "协议圆盘组",
                                    "協議圓盤組",
                                    "Protoset",
                                    "協約ディスクセット"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protoprism",
                    "label": "$option.CreditShoppingItems.cases.Protoprism.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "protoprism": [
                                    "协议棱柱",
                                    "協議稜柱",
                                    "Protoprism",
                                    "協約角柱"
                                ]
                            }
                        }
                    }
                },
                {
                    "name": "Protohedron",
                    "label": "$option.CreditShoppingItems.cases.Protohedron.label",
                    "pipeline_override": {
                        "Priority3OCR": {
                            "attach": {
                                "protohedron": [
                                    "协议棱柱组",
                                    "協議稜柱組",
                                    "Protohedron",
                                    "協約角柱セット"
                                ]
                            }
                        }
                    }
                }
            ]
        },
        "CreditShoppingPriority3DiscountValue": {
            "type": "select",
            "label": "$option.DiscountValue.label",
            "default_case": "Any",
            "cases": [
                {
                    "name": "Any",
                    "label": "$option.DiscountValue.cases.Any.label",
                    "pipeline_override": {
                        "IsDiscountPriority3": {
                            "recognition": {
                                "type": "ColorMatch",
                                "param": {
                                    "roi": "Priority3OCR",
                                    "roi_offset": [
                                        62,
                                        -172,
                                        -34,
                                        7
                                    ],
                                    "method": 6,
                                    "lower": [
                                        0
                                    ],
                                    "upper": [
                                        255
                                    ],
                                    "count": 1
                                }
                            }
                        },
                        "IsDiscountPriority3_CanNotAfford": {
                            "recognition": {
                                "type": "ColorMatch",
                                "param": {
                                    "roi": "Priority3OCR_CanNotAfford",
                                    "roi_offset": [
                                        62,
                                        -172,
                                        -34,
                                        7
                                    ],
                                    "method": 6,
                                    "lower": [
                                        0
                                    ],
                                    "upper": [
                                        255
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    }
                },
                {
                    "name": "-25%",
                    "label": "$option.DiscountValue.cases.-25%.label",
                    "pipeline_override": {
                        "IsDiscountPriority3": {
                            "expected": "25|50|75|95|99"
                        },
                        "IsDiscountPriority3_CanNotAfford": {
                            "expected": "25|50|75|95|99"
                        }
                    }
                },
                {
                    "name": "-50%",
                    "label": "$option.DiscountValue.cases.-50%.label",
                    "pipeline_override": {
                        "IsDiscountPriority3": {
                            "expected": "50|75|95|99"
                        },
                        "IsDiscountPriority3_CanNotAfford": {
                            "expected": "50|75|95|99"
                        }
                    }
                },
                {
                    "name": "-75%",
                    "label": "$option.DiscountValue.cases.-75%.label",
                    "pipeline_override": {
                        "IsDiscountPriority3": {
                            "expected": "75|95|99"
                        },
                        "IsDiscountPriority3_CanNotAfford": {
                            "expected": "75|95|99"
                        }
                    }
                },
                {
                    "name": "-95%",
                    "label": "$option.DiscountValue.cases.-95%.label",
                    "pipeline_override": {
                        "IsDiscountPriority3": {
                            "expected": "95|99"
                        },
                        "IsDiscountPriority3_CanNotAfford": {
                            "expected": "95|99"
                        }
                    }
                },
                {
                    "name": "-99%",
                    "label": "$option.DiscountValue.cases.-99%.label",
                    "pipeline_override": {
                        "IsDiscountPriority3": {
                            "expected": "99"
                        },
                        "IsDiscountPriority3_CanNotAfford": {
                            "expected": "99"
                        }
                    }
                }
            ]
        },
        "CreditShoppingForce": {
            "type": "select",
            "label": "$option.CreditShoppingForce.label",
            "description": "$option.CreditShoppingForce.description",
            "default_case": "Exit",
            "cases": [
                {
                    "name": "Exit",
                    "label": "$option.CreditShoppingForce.cases.Exit.label",
                    "pipeline_override": {
                        "CreditShoppingBuyBlacklist": {
                            "enabled": false //不购买黑名单物品
                        },
                        "RefreshItem": {
                            "enabled": false //不刷新
                        },
                        "CreditShippingCanNotToBuy": {
                            "enabled": false //不进入刷新的无法购买流程
                        }
                    }
                },
                {
                    "name": "IgnoreBlackList",
                    "label": "$option.CreditShoppingForce.cases.IgnoreBlackList.label",
                    "pipeline_override": {
                        "CreditShoppingBuyBlacklist": {
                            "enabled": true //允许购买黑名单物品
                        },
                        "RefreshItem": {
                            "enabled": false //不刷新
                        },
                        "CreditShippingCanNotToBuy": {
                            "enabled": false //不进入刷新的无法购买流程
                        }
                    }
                },
                {
                    "name": "Refresh",
                    "label": "$option.CreditShoppingForce.cases.Refresh.label",
                    "pipeline_override": {
                        "CreditShoppingBuyBlacklist": {
                            "enabled": false //不购买黑名单物品
                        },
                        "RefreshItem": {
                            "enabled": true //允许刷新
                        },
                        "CreditShippingCanNotToBuy": {
                            "enabled": true //进入刷新的无法购买流程
                        }
                    },
                    "option": [
                        "RefreshGetCredits",
                        "PrudentRefresh"
                    ]
                }
            ]
        },
        "PrudentRefresh": {
            "type": "switch",
            "label": "$option.PrudentRefresh.label",
            "description": "$option.PrudentRefresh.description",
            "default_case": "No",
            "cases": [
                {
                    "name": "Yes",
                    "option": [
                        "PrudentRefreshThreshold"
                    ],
                    "pipeline_override": {
                        "CreditShoppingPrudentRefresh": {
                            "enabled": true
                        }
                    }
                },
                {
                    "name": "No",
                    "pipeline_override": {
                        "CreditShoppingPrudentRefresh": {
                            "enabled": false
                        }
                    }
                }
            ]
        },
        "PrudentRefreshThreshold": {
            "type": "input",
            "label": "$option.PrudentRefresh.inputs.PrudentRefreshThreshold.label",
            "description": "$option.PrudentRefresh.inputs.PrudentRefreshThreshold.description",
            "inputs": [
                {
                    "name": "PrudentRefreshThreshold",
                    "label": "$option.PrudentRefresh.inputs.PrudentRefreshThreshold.label",
                    "description": "$option.PrudentRefresh.inputs.PrudentRefreshThreshold.description",
                    "pipeline_type": "int",
                    "verify": "^\\d+$",
                    "default": "400"
                }
            ],
            "pipeline_override": {
                "CreditShoppingPrudentRefresh": {
                    "recognition": {
                        "type": "And",
                        "param": {
                            "all_of": [
                                {
                                    "recognition": {
                                        "type": "Custom",
                                        "param": {
                                            "custom_recognition": "ExpressionRecognition",
                                            "custom_recognition_param": {
                                                "expression": "{CreditShoppingReserveCreditOCRInternal}-{RefreshCost}<{PrudentRefreshThreshold}"
                                            }
                                        }
                                    }
                                },
                                {
                                    "recognition": {
                                        "type": "And",
                                        "param": {
                                            "all_of": [
                                                "CreditIcon",
                                                "NotSoldOut",
                                                "CanAfford"
                                            ],
                                            "box_index": 2
                                        }
                                    }
                                }
                            ],
                            "box_index": 1
                        }
                    }
                }
            }
        },
        "RefreshGetCredits": {
            "type": "switch",
            "label": "$option.RefreshGetCredits.label",
            "description": "$option.RefreshGetCredits.description",
            "default_case": "No",
            "cases": [
                {
                    "name": "Yes",
                    "pipeline_override": {
                        "RefreshGetCredits": {
                            "enabled": true
                        }
                    }
                },
                {
                    "name": "No",
                    "pipeline_override": {
                        "RefreshGetCredits": {
                            "enabled": false
                        }
                    }
                }
            ]
        },
        "CreditShoppingReserve": {
            "type": "input",
            "label": "$option.CreditShoppingReserve.label",
            "description": "$option.CreditShoppingReserve.description",
            "inputs": [
                {
                    "name": "ReserveCreditThreshold",
                    "label": "$option.CreditShoppingReserve.inputs.ReserveCreditThreshold.label",
                    "description": "$option.CreditShoppingReserve.inputs.ReserveCreditThreshold.description",
                    "pipeline_type": "int",
                    "verify": "^\\d+$",
                    "default": "300"
                }
            ],
            "pipeline_override": {
                "CreditShoppingReserveCredit": {
                    "recognition": {
                        "param": {
                            "custom_recognition_param": {
                                "expression": "{CreditShoppingReserveCreditOCRInternal}<{ReserveCreditThreshold}"
                            }
                        }
                    }
                }
            }
        }
    }
}
