//通用挑战战斗

{

    "ID": 1023,

    "Events": {

        "OnStart": {

            "Actions": [

                {

                    "$type": "Share.CConfigOpenDialog"

                },

                //选择战斗

                {

                    "$type":"Share.CConfigDropBattleID",

                    "Type":[30],

                    "SpecialName":"BattleID"

                },

                {

                    "$type":"Share.CConfigDropBattleID",

                    "Type":[10,11,12],

                    "SpecialName":"NBattleID"

                },

                

                //选择奖励

                {

                    "$type": "Share.CConfigSwitchServer",

                    "Switch": [

                        {

                            "Weight": 25,

                            "Actions": [

                                {

                                    "$type": "Share.CConfigSetSpecial",

                                    "SpecialName": "Award",

                                    "SpecialValue": "specials(Award_1)"

                                }

                            ]

                        },

                        {

                            "Weight": 25,

                            "Actions": [

                                {

                                    "$type": "Share.CConfigSetSpecial",

                                    "SpecialName": "Award",

                                    "SpecialValue": "specials(Award_2)"

                                }

                            ]

                        },

                        {

                            "Weight": 25,

                            "Actions": [

                                {

                                    "$type": "Share.CConfigSetSpecial",

                                    "SpecialName": "Award",

                                    "SpecialValue": "specials(Award_3)"

                                }

                            ]

                        },

                        {

                            "Weight": 25,

                            "Actions": [

                                {

                                    "$type": "Share.CConfigSetSpecial",

                                    "SpecialName": "Award",

                                    "SpecialValue": "specials(Award_4)"

                                }

                            ]

                        },

                        {

                            "Weight": 25,

                            "Actions": [

                                {

                                    "$type": "Share.CConfigSetSpecial",

                                    "SpecialName": "Award",

                                    "SpecialValue": "specials(Award_5)"

                                }

                            ]

                        }

                    ]    

                },

                //随机挑战ID

                {

                    "$type":"Share.CConfigDropChallengeIDs",

                    "Group":[

                        1

                    ],

                    "Count":3,

                    "Specials":[

                        "RandomChallenge_1",

                        "RandomChallenge_2",

                        "RandomChallenge_3"

                    ]

                },

                //超过50的压力，每有1点，金币概率+1

                {

                    "$type": "Share.CConfigSetSpecial",

                    "SpecialName": "odd",

                    "SpecialValue": "specials(odd)+sceneproperty(Stamina)-50",

                    "Predicates":

                    [

                        {

                            "$type":"Share.CConfigEventBySceneProperty",

                            "Count":70,

                            "Property":"Stamina",

                            "CompareType":"Greater"

                        }

                    ]

                },



                //判断是否有5个诅咒，有则概率变为0

                {

                    "$type": "Share.CConfigSetSpecial",

                    "SpecialName": "odd",

                    "SpecialValue": "0",

                    "Predicates":

                    [

                        {

                            "$type":"Share.CConfigEventByCurse",

                            "Count":5,

                            "CompareType":"Equal"

                        }

                    ]

                },



                //判断是否有钱，没钱则概率变为100

                {

                    "$type": "Share.CConfigSetSpecial",

                    "SpecialName": "odd",

                    "SpecialValue": "specials(odd)+100",

                    "Predicates":

                    [

                        {

                            //拥有足够金钱钱

                            "$type": "Share.CConfigEventByItemID",

                            "ItemID": 1,

                            "CompareType": "Less",

                            "Count": "specials(coin)"

                        }

                    ]

                },



                //设置惩罚

                {

                    "$type": "Share.CConfigSetSpecial",

                    "SpecialName": "punishID",

                    "SpecialValue": "2",

                    "Predicates":

                    [

                        {

                            "$type": "Share.CConfigEventByRandom",

                            "Odds": "specials(odd)" //跳转概率

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigJump",

                    "Jump": "OnChooseChallenge"

                }

            ]

        },

        "OnChooseChallenge": {

            "Actions": [

                {

                    "$type": "Share.CConfigChoiceServer",

                    "OptionsMode": "Normal",

                    "Title":"Event_1023_Title",

                    "Description":"Event_1023_OP1_Des",

                    "QuestionDescription": "Event_1023_OP1_QuestionDes",

                    "Choices": [

                        {

                            "OptionText": "BattleChallengeConfig_{specials(RandomChallenge_1)}",

                            "OptionText2": "Event_1023_BattleChallenge_{specials(Award)}_{specials(punishID)}",

                            "OptionIcon1": "specials(Award)",



                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigSetSpecial",

                                            "SpecialName": "RandomChallenge",

                                            "SpecialValue": "specials(RandomChallenge_1)"

                                        },

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "Battle"

                                        }

                                    ]

                                }

                            ]

                        },

                        {

                            "OptionText": "Event_1023_OP1_1_1",

                            // "RewardDesc": "Event_1023_BattleChallenge_{specials(Award)}",

                            "OptionText2": "Event_1023_OP1_1_2",

                            // "ChallengeDesID":"specials(RandomChallenge_1)",

                            "OptionIcon1": 106,



                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "OnExit"

                                        }

                                    ]

                                }

                            ]

                        }

                    ]

                }

            ]

        },

        "Battle": {

            "Actions": [

                {

                    "$type":"Share.CConfigSetChallenge",

                    "ChallengeID":"specials(RandomChallenge)"

                },

                {

                    "$type": "Share.CConfigTriggerBattle",

                    "BattleID": "specials(BattleID)",

                    "OnSuccess": "OnEnd",

                    "EndHollow": false

                }

            ]

        },

        "NormalBattle": {

            "Actions": [

                

                {

                    "$type": "Share.CConfigChoiceServer",

                    "OptionsMode": "Normal",

                    "Title":"Event_1023_Title",

                    "Description": "Event_1023_OP2_Des",

                    "QuestionDescription": "Event_1023_OP2_QuestionDes",

                    "Choices": [

                        {

                            "OptionText": "Event_1023_OP2_1_1",

                            "OptionIcon1": 109,

                            "OptionContents": [

                                {

                                    "Actions": [

                                        // {

                                        //     "$type": "Share.CConfigJump",

                                        //     "Jump": "Op_1_Over"

                                        // }

                                    ]

                                }

                            ]

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigTriggerBattle",

                    "BattleID": "specials(NBattleID)",

                    "OnSuccess": "OnFinish",

                    "EndHollow": false

                }

            ]

        },

        "OnExit": {

            "Actions": [

                {

                    "$type": "Share.CConfigIf",

                    "OnSuccess": "NormalBattle",

                    "OnFailure": "OnRUN",

                    "Conditions":[

                        {

                            "$type": "Share.CConfigEventByRandom",

                            "Odds": 50 //跳转概率

                        }

                    ]

                }

            ]

        },

        "OnEnd": {

            "Actions": [

                {

                  "$type": "Share.CConfigPreset",

                  "PerformKey" : "Chessboard_BattleEnd_None"

                },

                {

                    "$type": "Share.CConfigCloseDialog",

                    "CameraMove":false

                },

                {

                    "$type": "Share.CConfigOpenDialog"

                },

                {

                    "$type": "Share.CConfigIf",

                    "OnSuccess": "OnAward",

                    "OnFailure": "OnPunish",

                    "Conditions":[

                        {

                            "$type":"Share.CConfigEventByChallenge",

                            "ChallengeID":"specials(RandomChallenge)"

                        }

                    ]

                }

            ]

        },

        "OnAward":{

            "Actions":[

                {

                    "$type": "Share.CConfigChoiceServer",

                    "OptionsMode": "Normal",

                    "Title":"Event_1023_Title",

                    "Description":"Event_1023_OP3_Des",

                    "QuestionDescription": "Event_1023_OP3_QuestionDes",

                    "Choices": [

                        {

                            "OptionText": "Event_1023_BattleChallenge_Suc_{specials(Award)}",

                            "OptionIcon1": "specials(Award)",



                            "OptionContents": [

                                {

                                    "Actions": [

                                        

                                    ]

                                }

                            ]

                        }

                    ]

                },

                //随机一个卡牌

                {

                    "$type": "Share.CConfigRandomDropID",

                    "Type": "Card",

                    "Rare": [

                        4

                    ],

                    "SpecialName": [

                        "RandomCard_1",

                        "RandomCard_2",

                        "RandomCard_3"

                    ]

                },

                {

                    "$type": "Share.CConfigChoiceServer",

                    "OptionsMode": "Normal",

                    "ShowMode": "Card",

                    "Choices": [

                        {

                            "OptionText": "Event_Common_Choose", // 选择

                            "OptionItemID1": "specials(RandomCard_1)",

                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigDropPool",

                                            "Type": "Card",

                                            "ItemID": "specials(RandomCard_1)",

                                            "Num": 1

                                        },

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "OnFinish"

                                        }

                                    ]

                                }

                            ]

                        },

                        {

                            "OptionText": "Event_Common_Choose", // 选择

                            "OptionItemID1": "specials(RandomCard_2)",

                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigDropPool",

                                            "Type": "Card",

                                            "ItemID": "specials(RandomCard_2)",

                                            "Num": 1

                                        },

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "OnFinish"

                                        }

                                    ]

                                }

                            ]

                        },

                        {

                            "OptionText": "Event_Common_Choose", // 选择

                            "OptionItemID1": "specials(RandomCard_3)",

                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigDropPool",

                                            "Type": "Card",

                                            "ItemID": "specials(RandomCard_3)",

                                            "Num": 1

                                        },

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "OnFinish"

                                        }

                                    ]

                                }

                            ]

                        }

                    ],

                    "Predicates":[

                        {

                            "$type":"Share.CConfigEventBySpecials",

                            "ParamName":"Award",

                            "Param":"specials(Award_1)",

                            "CompareType":"Equal"

                        }

                    ]

                },



                //获得齿轮硬币、压力值、生命值

                {

                    "$type": "Share.CConfigChoiceServer",

                    "OptionsMode": "Normal",

                    "ShowMode": "Event",

                    "Choices": [

                        {

                            "OptionText": "Event_Common_RecoverHp",

                            "OptionItemID1": "specials(ShowHp)",

                            "OptionDesc1": "Event_1023_BattleChallenge_op{specials(Award)}",

                            "TitleText": "JsonText_928", // 回复药

                            "Predicates": [

                                {

                                    "$type":"Share.CConfigEventBySpecials",

                                    "ParamName":"Award",

                                    "Param":"specials(Award_3)",

                                    "CompareType":"Equal"

                                }

                            ],

                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigModifyProperty",

                                            "Property": "Hp",

                                            "Count": "property(HpMax_Battle)*specials(award_hp)*0.01"

                                        },

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "OnFinish"

                                        }

                                    ]

                                }

                            ]

                        },

                        {

                            "OptionText": "Event_Common_GetCoin",

                            "OptionItemID1": "specials(ShowGold)",

                            "OptionDesc1": "Event_1023_BattleChallenge_op{specials(Award)}",

                            "TitleText": "JsonText_929", // 齿轮硬币

                            "Predicates": [

                                {

                                    "$type":"Share.CConfigEventBySpecials",

                                    "ParamName":"Award",

                                    "Param":"specials(Award_2)",

                                    "CompareType":"Equal"

                                }

                            ],

                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigAddItem",

                                            "ItemID": 1,

                                            "Count": "specials(award_coin)"

                                        },

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "OnFinish"

                                        }

                                    ]

                                }

                            ]

                        },

                        {

                            "OptionText": "Event_Common_StaminaDown",

                            "OptionItemID1": "specials(ShowStamina)",

                            "OptionDesc1": "Event_1023_BattleChallenge_op{specials(Award)}",

                            "TitleText": "JsonText_930", // 降压药

                            "Predicates": [

                                {

                                    "$type":"Share.CConfigEventBySpecials",

                                    "ParamName":"Award",

                                    "Param":"specials(Award_5)",

                                    "CompareType":"Equal"

                                }

                            ],

                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigModifySceneProperty",

                                            "Property": "Stamina",

                                            "Count": "-specials(award_stamina)"

                                        },

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "OnFinish"

                                        }

                                    ]

                                }

                            ]

                        },

                        {

                            "OptionText": "Event_Common_HollowItem",

                            "OptionItemID1": "specials(HollowItem)",

                            "OptionDesc1": "Event_Common_HollowItem_Des",

                            "TitleText": "JsonText_931", // 充能道具

                            "Predicates": [

                                {

                                    "$type":"Share.CConfigEventBySpecials",

                                    "ParamName":"Award",

                                    "Param":"specials(Award_4)",

                                    "CompareType":"Equal"

                                }

                            ],

                            "OptionContents": [

                                {

                                    "Actions": [

                                        {

                                            "$type": "Share.CConfigSetHollowItem",

                                            "EPCharge": "specials(epcharge)"

                                        },

                                        {

                                            "$type": "Share.CConfigJump",

                                            "Jump": "OnFinish"

                                        }

                                    ]

                                }

                            ]

                        }

                    ]

                },





                {

                    "$type": "Share.CConfigCloseDialog"

                },

                {

                    "$type": "Share.CConfigFinishEvent"

                }

            ]

        },

        "OnPunish":{

            "Actions":[

                

                {

                    "$type": "Share.CConfigLogText",

                    "Messages": [

                        "Event_1023_OnFailure" // 很遗憾，你寄了

                    ]

                },

                //发放惩罚，压力

                { 	

                    //+30压力值

                    "$type" : "Share.CConfigModifySceneProperty",

                    "Property" :  "Stamina",

                    "Count" : "specials(stamina)",

                    "Predicates":[

                        {

                            "$type":"Share.CConfigEventBySpecials",

                            "ParamName":"punishID",

                            "Param":"2",

                            "CompareType":"Equal"

                        }

                    ]

                },

                //发放惩罚，金币

                { 	

                    //-30压力值

                    "$type": "Share.CConfigAddItem",

                    "ItemID": 1,

                    "Count": "-specials(coin)",

                    "Predicates":[

                        {

                            "$type":"Share.CConfigEventBySpecials",

                            "ParamName":"punishID",

                            "Param":"1",

                            "CompareType":"Equal"

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigCloseDialog"

                },

                {

                    "$type": "Share.CConfigFinishEvent"

                }

            ]

        },

        "OnRUN":{

            "Actions":[

                {

                    "$type": "Share.CConfigLogText",

                    "Messages": [

                        "Event_1023_OnEscape" // 很遗憾，你寄了

                    ]

                },

                {

                    "$type": "Share.CConfigCloseDialog"

                },

                {

                    "$type": "Share.CConfigFinishEvent"

                }

            ]

        },

        "OnFinish":{

            "Actions":[

                {

                  "$type": "Share.CConfigPreset",

                  "PerformKey" : "Chessboard_BattleEnd_None"

                },

                {

                    "$type": "Share.CConfigCloseDialog"

                    // "CameraMove":false

                },

                {

                    "$type": "Share.CConfigFinishEvent"

                }

            ]

        }

    },

    "Specials": {

        "RandomChallenge_1": 0,

        "RandomChallenge_2": 0,

        "RandomChallenge_3": 0,

        "RandomChallenge":0,



        "BattleID": 0,

        "BattleID1": 0,

        "BattleID2": 0,

        "BattleID3": 0,

        "BattleID4": 0,

        "BattleID5": 0,



        "NBattleID": 0,

        "NBattleID1": 2010123,

        "NBattleID2": 2010124,

        "NBattleID3": 2010125,

        "NBattleID4": 2010126,

        "NBattleID5": 2010127,



        //配死了的

        "Award":0,

        "Award_1":101,

        "Award_2":102,

        "Award_3":103,

        "Award_4":104,

        "Award_5":105,



        //配死了的

        "odd":50,



        //惩罚内容

        "coin":300,

        "stamina":30,

        "epcharge":40,

            //1-齿轮硬币，2-压力值

        "punishID":1,



        //奖励内容

        "RandomCard_1": 0,

        "RandomCard_2": 0,

        "RandomCard_3": 0,

        "award_coin":1000,

        "award_hp":30,

        "award_stamina":80,

        "hollowItem":204056,



        

        "ShowGold": 900001,

        "ShowStamina": 900002,

        "ShowHp": 900003,

        "HollowItem":204056

    }

}

