//全局事件

{

    "ID": 3010104,

    "Specials":{

        //Turn锁

        "TurnLock":1,

        //隐藏地图,仅一次机会

        "HideChance":1,

        "FinalMark":0,





        "normalBattleID":0,

        "normalBattleID1":2001,

        "normalBattleID2":2002,

        "eliteBattleID":0,

        "eliteBattleID1":2010,

        "eliteBattleID2":2011,

        "RecoverID":0,

        "Recover1":1017,

        "Recover2":1018,

        "CardID":1005,

        "ChallengeID":3010110,

        "FinalID":1002,

        "NextID":2016,

        "ShopID":0,

        "Shop1":1020,

        "Shop2":1021,



        "MaxProc":6

    },

    "Events": {

        "OnPlayerMove":{

            "Actions":[

                {

                    "$type": "Share.CConfigSetSpecial",

                    "SpecialName": "TurnLock",

                    "SpecialValue": 0

                },

                {

                    "$type": "Share.CConfigJump",

                    "Jump": "OnEnd",

                    "Predicates":[

                        {

                            "$type":"Share.CConfigEventByOr",

                            "Predicates":

                            [

                                {

                                    "$type": "Share.CConfigEventByHollowVariable",

                                    "Key": "Teleport_3010103",

                                    "CompareType": "Equal",

                                    "Count": 1

                                },

                                {

                                    "$type": "Share.CConfigEventByHollowVariable",

                                    "Key": "UpdateSwitch_3010101",

                                    "CompareType": "Equal",

                                    "Count": 0

                                }

                            ]

                        }

                    ]

                },

                //setspecials,如果有上下

                {

                    "$type":"Share.CConfigIf",

                    "OnSuccess":"UpdateMap_Hide",

                    "OnFailure":"UpdateMap_Finish",

                    "Conditions":

                    [

                        {

                            "$type": "Share.CConfigEventByHollowVariable",

                            "Key": "LayerFinish_3010101",

                            "CompareType": "Equal",

                            "Count": 1

                        }

                    ]

                }

            ]

        },

        "UpdateMap_Finish":{

            "Actions":[

                {

                    "$type": "Share.CConfigSetMapState",

                    "Position": "Relative",

                    "NodeType": "All",

                    "X": 0,

                    "Y": 0,

                    "Radius": 3,

                    "Count": 3,

                    "FromVisibleState": [

                        "Visible"

                    ],

                    "FromState":["ShowEvent","Locked"],

                    "ToState": ["Finished"],

                    "ExcludePlayerPos":true

                }

            ]

        },

        "UpdateMap_Hide":{

            "Actions":[

                {

                    "$type": "Share.CConfigSetMapState",

                    "Position": "Relative",

                    "NodeType": "All",

                    "X": 0,

                    "Y": 0,

                    "Radius": 15,

                    "Count": 185,

                    "FromVisibleState": [

                        "Visible"

                    ],

                    "ToVisibleState": ["VisibleByTriggerEvent"],

                    "ExcludePlayerPos":true

                }

            ]

        },

        "OnTurn":{

            "Actions":[

                //初始化随机ID

                {

                    "$type": "Share.CConfigSwitchServer",

                    "Switch": [

                        {

                            "Weight": 50,

                            "Actions": [

                                {

                                    "$type":"Share.CConfigSetSpecial",

                                    "SpecialName":"ShopID",

                                    "SpecialValue":"specials(Shop1)"

                                }

                            ]

                        },

                        {

                            "Weight": 50,

                            "Actions": [

                                {

                                    "$type":"Share.CConfigSetSpecial",

                                    "SpecialName":"ShopID",

                                    "SpecialValue":"specials(Shop2)"

                                }

                            ]

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigSwitchServer",

                    "Switch": [

                        {

                            "Weight": 50,

                            "Actions": [

                                {

                                    "$type":"Share.CConfigSetSpecial",

                                    "SpecialName":"RecoverID",

                                    "SpecialValue":"specials(Recover1)"

                                }

                            ]

                        },

                        {

                            "Weight": 50,

                            "Actions": [

                                {

                                    "$type":"Share.CConfigSetSpecial",

                                    "SpecialName":"RecoverID",

                                    "SpecialValue":"specials(Recover2)"

                                }

                            ]

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigSwitchServer",

                    "Switch": [

                        {

                            "Weight": 60,

                            "Actions": [

                                {

                                    "$type":"Share.CConfigSetSpecial",

                                    "SpecialName":"normalBattleID",

                                    "SpecialValue":"specials(normalBattleID1)"

                                }

                            ]

                        },

                        {

                            "Weight": 30,

                            "Actions": [

                                {

                                    "$type":"Share.CConfigSetSpecial",

                                    "SpecialName":"normalBattleID",

                                    "SpecialValue":"specials(normalBattleID2)"

                                }

                            ]

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigSwitchServer",

                    "Switch": [

                        {

                            "Weight": 60,

                            "Actions": [

                                {

                                    "$type":"Share.CConfigSetSpecial",

                                    "SpecialName":"eliteBattleID",

                                    "SpecialValue":"specials(eliteBattleID1)"

                                }

                            ]

                        },

                        {

                            "Weight": 30,

                            "Actions": [

                                {

                                    "$type":"Share.CConfigSetSpecial",

                                    "SpecialName":"eliteBattleID",

                                    "SpecialValue":"specials(eliteBattleID2)"

                                }

                            ]

                        }

                    ]

                },



                {

                    "$type": "Share.CConfigJump",

                    "Jump": "OnEnd",

                    "Predicates":[

                        {

                            "$type":"Share.CConfigEventByOr",

                            "Predicates":

                            [

                                {

                                    "$type": "Share.CConfigEventBySpecials",

                                    "ParamName": "TurnLock",

                                    "Param":1,

                                    "CompareType":"Equal"

                                },

                                {

                                    "$type": "Share.CConfigEventByHollowVariable",

                                    "Key": "Teleport_3010103",

                                    "CompareType": "Equal",

                                    "Count": 1

                                },

                                {

                                    "$type": "Share.CConfigEventByHollowVariable",

                                    "Key": "UpdateSwitch_3010101",

                                    "CompareType": "Equal",

                                    "Count": 0

                                }

                            ]

                        }

                    ]

                },

                {

                    "$type":"Share.CConfigIf",

                    "OnSuccess":"UpdateMap_Final",

                    "OnFailure":"UpdateMap_Normal",

                    "Conditions":

                    [

                        {

                            "$type": "Share.CConfigEventByHollowVariable",

                            "Key": "Progress_3010101",

                            "CompareType": "GreaterEqual",

                            "Count": "specials(MaxProc)"

                        }

                    ]

                }

            ]



        },

        "UpdateMap_Normal":{

            "Actions":[

                //1normal+1elite

                //修改周边事件, N:E=1

                {

                    "$type": "Share.CConfigEventModification",

                    "ExcludePlayerPos":true,

                    "X": 0,

                    "Y": 0,

                    "Position": "Relative",

                    "Radius": 1,

                    "ModificationNum": 2,

                    "ModificationType": 2,

                    "TargetEventType": 1,

                    "TargetVisibleState": ["VisibleByTriggerEvent"],

                    "EventID": [ "specials(normalBattleID)","specials(eliteBattleID)" ],

                    "EventState": "ShowEvent",

                    "VisibleState": "Visible"

                },

                //揭露一个invisible

                {

                    "$type": "Share.CConfigSetMapState",

                    "ExcludePlayerPos":true,

                    "Position": "Relative",

                    "NodeType": "All",

                    "X": 0,

                    "Y": 0,

                    "Radius": 1,

                    "Count": 1,

                    "FromVisibleState": [

                        "VisibleByTriggerEvent"

                    ],

                    "ToVisibleState": ["Visible"]

                }

            ]

        },

        "UpdateMap_Final":{

            "Actions":[

                {

                    "$type": "Share.CConfigJump",

                    "Jump": "UpdateMap_ShopNext",

                    "Predicates":[

                        {

                            "$type": "Share.CConfigEventByHollowVariable",

                            "Key": "LayerFinish_3010101",

                            "CompareType": "Equal",

                            "Count": 1

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigJump",

                    "Jump": "UpdateMap_End",

                    "Predicates":[

                        {

                            "$type": "Share.CConfigEventByHollowVariable",

                            "Key": "LayerFinish_3010101",

                            "CompareType": "NotEqual",

                            "Count": 0

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigJump",

                    "Jump": "UpdateMap_Shop1",

                    "Predicates":[

                        {

                            "$type": "Share.CConfigEventBySpecials",

                            "ParamName": "FinalMark",

                            "Param":0,

                            "CompareType":"Equal"

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigJump",

                    "Jump": "UpdateMap_Shop2",

                    "Predicates":[

                        {

                            "$type": "Share.CConfigEventBySpecials",

                            "ParamName": "FinalMark",

                            "Param":1,

                            "CompareType":"Equal"

                        }

                    ]

                },

                {

                    "$type": "Share.CConfigJump",

                    "Jump": "UpdateMap_Shop3",

                    "Predicates":[

                        {

                            "$type": "Share.CConfigEventBySpecials",

                            "ParamName": "FinalMark",

                            "Param":2,

                            "CompareType":"Equal"

                        }

                    ]

                }

            ]

        },

        "UpdateMap_ShopNext":{

            "Actions":[

                {

                    "$type": "Share.CConfigEventModification",

                    "ExcludePlayerPos":true,

                    "X": 0,

                    "Y": 0,

                    "Position": "Relative",

                    "Radius": 1,

                    "ModificationNum": 3,

                    "ModificationType": 2,

                    "TargetEventType": 1,

                    "TargetVisibleState": ["VisibleByTriggerEvent"],

                    "EventID": [ 

                        "specials(RecoverID)","specials(CardID)","specials(ChallengeID)"

                    ],

                    "EventState": "ShowEvent",

                    "VisibleState": "Visible"

                },

                {

                    //战斗计数器+1

                    "$type": "Share.CConfigSetHollowVariable",

                    "Key": "LayerFinish_3010101",

                    "Value": "scenevar(LayerFinish_3010101)+1"

                }



            ]

        },

        "UpdateMap_End":{

            "Actions":[

                {

                    "$type": "Share.CConfigEventModification",

                    "ExcludePlayerPos":true,

                    "X": 0,

                    "Y": 0,

                    "Position": "Relative",

                    "Radius": 1,

                    "ModificationNum": 2,

                    "ModificationType": 2,

                    "TargetEventType": 1,

                    "TargetVisibleState": ["VisibleByTriggerEvent"],

                    "EventID": [ 

                        "specials(FinalID)","specials(NextID)"

                    ],

                    "EventState": "ShowEvent",

                    "VisibleState": "Visible"

                }

            ]

        },

        "UpdateMap_Shop1":{

            "Actions":[

                //修改周边事件, N:E=1

                {

                    "$type": "Share.CConfigEventModification",

                    "ExcludePlayerPos":true,

                    "X": 0,

                    "Y": 0,

                    "Position": "Relative",

                    "Radius": 1,

                    "ModificationNum": 1,

                    "ModificationType": 1,

                    "TargetEventType": 1,

                    "TargetVisibleState": ["VisibleByTriggerEvent"],

                    "EventID": [ 

                        "specials(ShopID)"

                     ],

                    "EventState": "ShowEvent",

                    "VisibleState": "Visible"

                },

                {

                    "$type": "Share.CConfigEventModification",

                    "ExcludePlayerPos":true,

                    "X": 0,

                    "Y": 0,

                    "Position": "Relative",

                    "Radius": 1,

                    "ModificationNum": 2,

                    "ModificationType": 2,

                    "TargetEventType": 1,

                    "TargetVisibleState": ["VisibleByTriggerEvent"],

                    "EventID": [ "specials(normalBattleID)","specials(eliteBattleID)" ],

                    "EventState": "ShowEvent",

                    "VisibleState": "Visible"

                },

                {

                    "$type":"Share.CConfigSetSpecial",

                    "SpecialName":"FinalMark",

                    "SpecialValue":"specials(FinalMark)+1"

                }



            ]

        },

        "UpdateMap_Shop2":{

            "Actions":[

                //修改周边事件, N:E=1

                {

                    "$type": "Share.CConfigEventModification",

                    "ExcludePlayerPos":true,

                    "X": 0,

                    "Y": 0,

                    "Position": "Relative",

                    "Radius": 1,

                    "ModificationNum": 1,

                    "ModificationType": 1,

                    "TargetEventType": 1,

                    "TargetVisibleState": ["VisibleByTriggerEvent"],

                    "EventID": [ 

                        "specials(ShopID)"

                     ],

                    "EventState": "ShowEvent",

                    "VisibleState": "Visible"

                },

                {

                    "$type": "Share.CConfigEventModification",

                    "ExcludePlayerPos":true,

                    "X": 0,

                    "Y": 0,

                    "Position": "Relative",

                    "Radius": 1,

                    "ModificationNum": 2,

                    "ModificationType": 2,

                    "TargetEventType": 1,

                    "TargetVisibleState": ["VisibleByTriggerEvent"],

                    "EventID": [ "specials(normalBattleID)","specials(eliteBattleID)" ],

                    "EventState": "ShowEvent",

                    "VisibleState": "Visible"

                },

                {

                    "$type":"Share.CConfigSetSpecial",

                    "SpecialName":"FinalMark",

                    "SpecialValue":"specials(FinalMark)+1"

                }



            ]

        },

        "UpdateMap_Shop3":{

            "Actions":[

                //修改周边事件, N:E=1

                {

                    "$type": "Share.CConfigEventModification",

                    "ExcludePlayerPos":true,

                    "X": 0,

                    "Y": 0,

                    "Position": "Relative",

                    "Radius": 1,

                    "ModificationNum": 1,

                    "ModificationType": 1,

                    "TargetEventType": 1,

                    "TargetVisibleState": ["VisibleByTriggerEvent"],

                    "EventID": [ 

                        "specials(ShopID)"

                     ],

                    "EventState": "ShowEvent",

                    "VisibleState": "Visible"

                }

            ]

        },

        "OnEnd":{

            "Actions":[



            ]

        }

    }

}

// {

//     "ID": 3010101,

//     "Specials":{

//         "EndFlag":0,

//         "MaxProg":6

//     },

//     "Events": {

//         "OnPlayerMove":{

//             "Actions":[

//                 //清理往期事件

//                 {

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

//                     "Jump": "OnEnd",

//                     "Predicates":[

//                         {

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

//                             "Key": "ValidMove_3010101",

//                             "CompareType": "Equal",

//                             "Count": 0

//                         }

//                     ]

//                 },

//                 {

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

//                     "Position": "Relative",

//                     "NodeType": "All",

//                     "X": 0,

//                     "Y": 0,

//                     "Radius": 3,

//                     "Count": 3,

//                     "FromVisibleState": [

//                         "Visible"

//                     ],

//                     "FromState":["ShowEvent","Locked"],

//                     "ToState": ["Finished"],

//                     "ExcludePlayerPos":true

//                 }

//             ]

//         },

//         "OnTurn": {

//             "Actions": 

//             [

//                 //skip条件

//                 {

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

//                     "Jump": "OnEnd",

//                     "Predicates":[

//                         {

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

//                             "Predicates":

//                             [

//                                 {

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

//                                     "Key": "ValidMove_3010101",

//                                     "CompareType": "Equal",

//                                     "Count": 0

//                                 },

//                                 {

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

//                                     "Key": "LayerFinish_3010101",

//                                     "CompareType": "Equal",

//                                     "Count": 1

//                                 }

//                             ]

//                         }

//                     ]

//                 },

//                 //确保不会重复执行

//                 {

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

//                     "Key": "ValidMove_3010101",

//                     "Value": 0

//                 },

//                 {

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

//                     "OnSuccess": "UnlockEvent",

//                     "OnFailure": "UnlockTeleport",

//                     "Conditions":[

//                         {

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

//                             "Key": "Progress_3010101",

//                             "CompareType": "LessEqual",

//                             "Count": "specials(MaxProg)"

//                         }

//                     ]

//                 }

//             ]

//         },

//         "UnlockEvent": {

//             //正常的修改

//             "Actions": 

//             [

//                 //揭露周边事件

//                 //修改周边事件, N:E=1

//                 {

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

//                     "ExcludePlayerPos":true,

//                     "X": 0,

//                     "Y": 0,

//                     "Position": "Relative",

//                     "Radius": 1,

//                     "ModificationNum": 2,

//                     "ModificationType": 2,

//                     // "TargetEventID": [ 1003 ],

//                     "TargetEventType": 1,

//                     //"TargetEventState": "Locked",

//                     "TargetVisibleState": ["VisibleByTriggerEvent"],

//                     "EventID": [ 2000,2009 ],

//                     "EventState": "ShowEvent",

//                     "VisibleState": "Visible"

//                 },

//                 {

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

//                     "ExcludePlayerPos":true,

//                     "Position": "Relative",

//                     "NodeType": "All",

//                     "X": 0,

//                     "Y": 0,

//                     "Radius": 1,

//                     "Count": 1,

//                     "FromVisibleState": [

//                         "VisibleByTriggerEvent"

//                     ],

//                     "ToVisibleState": ["Visible"]

//                 }

//             ]

//         },

//         "UnlockTeleport": {

//             //概率出现商店了

//             "Actions": 

//             [

//                 {

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

//                     "Key": "LayerFinish_3010101",

//                     "Value": 1

//                 },

//                 //揭露周边事件

//                 //修改周边事件

//                 {

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

//                     "ExcludePlayerPos":true,

//                     "X": 0,

//                     "Y": 0,

//                     "Position": "Relative",

//                     "Radius": 1,

//                     "ModificationNum": 1,

//                     "ModificationType": 1,

//                     // "TargetEventID": [ 1003 ],

//                     "TargetEventType": 1,

//                     //"TargetEventState": "Locked",

//                     "TargetVisibleState": ["VisibleByTriggerEvent"],

//                     "EventID": [ 3010103 ],

//                     "EventState": "ShowEvent",

//                     "VisibleState": "Visible"

//                 }

//             ]

//         },

//         "OnEnd": {

//             "Actions": 

//             [

//                 {

//                     "$type": "Share.CConfigEmpty"

//                 }

//             ]

//         }

//     }

// }

