{

    // 脚本模板库

    "AbilityName" : "Template_Common",

    "AbilityStacking": "Unique",



    //默认附加的Modifier

    "DefaultModifier":

    {

        "OnAdded" :

        [

            {

                "$type": "MoleMole.ModifySkillMaxEP",

                "Target" : "Self",

                "SkillName": "EVD", 

                "DeltaValue": "%AddedPlayerMaxEpDelta", //调用AbilitySpecials中的参数

            },

            {

                "$type": "MoleMole.LogStringAction", //打Log调试

                "LogStr": "Template_Common启动!!!"

            },

            // {

            //     "$type": "MoleMole.AdditionalGetItems", //掉落物

            //     "Percentage": 1.0,

            //     "RandomRewardParam": "10101,1",

            //     "ConditionalRewardParam": "10102,1"

            // }

        ],

    },



    //调用能力时，如AnimEvent中调用TriggerAbility，或脚本中调用TriggerAbilityAction

    "OnAbilityStart":

    [

        //使用指定Modifier

        {

            "$type": "MoleMole.ApplyModifier",

            "ModifierName": "MovementModifier"

        },

        //调用指定Ability

        {

            "$type" : "MoleMole.TriggerAbilityAction",

            "AbilityName" : "Nostradamus_BulletType_10_Explosion_01",

        },

        //输入屏蔽

        {

            "$type" : "MoleMole.InputMuteAction",

            "Tag" : "Template_Common_InputMute",

            "ingoreTimeScale" : true,

            "CharacterMoveMute" : false,

            "CharacterSkillMute" : false,

            "CharacterBagMute" : false,

            "CameraMoveMute" : false,

        },

    ],



    "AbilityMixins" : 

    [

        //按键监听Mixin

        {

            "$type": "MoleMole.SkillBtnListenerMixin",

            "BtnListeners":

            [

                {

                    "SkillBtnIndex": 0,

                    "BtnOperations":

                    [

                        {

                            "ListenerType": "Click",

                            "PressTime": 1.0, //仅在ListenerType为Press时生效

                            "TriggerActions":

                            [

                                {

                                    "$type": "MoleMole.ApplyModifier",

                                    "ModifierName": "BleedBuffModifier",

                                },

                            ]

                        },

                    ]

                },

            ],

        },



        //新版子弹Mixin

        {

            "$type" : "MoleMole.BulletMixin",

            "BulletName" : "Bullet_Empty",

            "Targetting" : "Enemy",

            "AliveDuration" : 10,



            //初始位置及朝向

            "BulletInitPosRot" : 

            {

                "CoordsOption" : "Self",  //选取参考系坐标轴

                "NeedRaycastGround" : false,  //是否需要投影到地面高度

                "TargetOption" : 

                {

                    "$type" : "MoleMole.ConfigPosRotReferTarget",

                    "OffsetReferTarget" : "Self",

                    "BackupOffsetReferTarget" : "Self",

                },

                "Offset" : 

                {

                    "PositionOffset" : {"x":0.11, "y":0.68, "z":1},

                    "AngleOffset" : {"x":0.0, "y":0.0, "z":0.0},

                    "BackupPositionOffset" : {"x":0.0, "y":0.0, "z":5.0},  //备选位置，当OffsetReferTarget为空时，以BackupOffsetReferTarget为子弹出生点，并应用此BackUp PosRot

                    "BackupAngleOffset" : {"x":0.0, "y":0.0, "z":0.0},



                    "IsUseRotationY" : true,  //是否应用目标的Y轴Rot

                    "IsUseRotationXZ" : false,  //是否应用目标的X/Z轴Rot

                },

            },



            //当前配置多个Movement或Rotation时，仅有一个生效（以后会迭代为并行执行）

            //简易位移

            "MovementConfig" :

            {

                "$type" : "MoleMole.ConfigMovementSimple",

                "Duration" : -1,

                "Gravity" : 0.0,

                "HitTangentialRatio" : 1,

                "HitNormalRatio" : 1,

                "TimesUpMoveOption" : "Remain",



                "InitVelocity" : {"x":0, "y":0, "z":100},

                "Acceleration" : {"x":0, "y":0, "z":0},

                "CoordinateType" : "Local",

            },



            //抛物线，根据目标距离决定速度与高度

            "MovementConfig" :

            {

                "$type" : "MoleMole.ConfigMovementParabola",

                "Duration" : -1,

                "Gravity" : 0.0,

                "HitTangentialRatio" : 1,

                "HitNormalRatio" : 1,

                "TimesUpMoveOption" : "Remain",

                "TargetPosRot" : 

                {

                    "CoordsOption" : "Relative",

                    "TargetOption" : 

                    {

                        "$type" : "MoleMole.ConfigPosRotReferTarget",

                        "OffsetReferTarget" : "Target",

                    },

                    "Offset" : 

                    {

                        "PositionOffset" : {"x":10, "y":0, "z":3},

                        "AngleOffset" : {"x":0.0, "y":0.0, "z":0.0},

                        "IsClampOffsetDistance" : true, //默认为false，为true时，Offset的距离不能大于自身至目标间的距离

                    },

                },

                "DefaultOffset" : {"x":0.0, "y":0.0, "z":15},

                "s1" : 15,

                "s2" : 20,

                "h1" : 0.6,

                "h2" : 0.8,

                "t1" : 0.4,

                "t2" : 0.45,

            },



            //向目标移动

            "MovementConfig" :

            {

                "$type" : "MoleMole.ConfigMovementTarget",

                "Duration" : -1,

                "Gravity" : 0.0,

                "HitTangentialRatio" : 1,

                "HitNormalRatio" : 1,

                "TimesUpMoveOption" : "Remain",

                "TargetPosRot" : 

                {

                    "CoordsOption" : "Relative",

                    "TargetOption" : 

                    {

                            "$type" : "MoleMole.ConfigPosRotReferTarget",

                            "OffsetReferTarget" : "Target",

                    },

                    "Offset" : 

                    {

                            "PositionOffset" : {"x":10, "y":0, "z":3},

                            "AngleOffset" : {"x":0.0, "y":0.0, "z":0.0},

                            "IsClampOffsetDistance" : true, //默认为false，为true时，Offset的距离不能大于自身至目标间的距离

                    },

                },

                "DefaultOffset" : {"x":0.0, "y":0.0, "z":10},

                //几种方式中选一个

                //瞬移

                "MoveType":

                {

                    "$type" : "MoleMole.MovementTypeInstant",

                },

                //匀速直线运动

                "MoveType":

                {

                    "$type" : "MoleMole.MovementTypeFixedSpeed",

                    "Speed":5,

                },

                //Lerp直线运动

                "MoveType":

                {

                    "$type" : "MoleMole.MovementTypeLerpSpeed",

                    "Speed":5,

                },

                //定时反推速度

                "MoveType":

                {

                    "$type" : "MoleMole.MovementTypeFixedTime",

                    "Time":5,

                },

                "TargetUpdateMode" : "Always",

                "ReachTargetStop" : false,

            },



            //简易旋转

            "RotationConfig" :

            {   

                //绕自己

                "$type" : "MoleMole.ConfigRotationSimple",

                "CoordinateType" : "Local",

                "Duration" : 3,

                "InitAngleVelocity": {"x":0, "y":0, "z":180},

                "AngleAcceleration":{"x":0, "y":0, "z":0},



            },



            //向目标旋转

            "RotationConfig" :

            {   

                "$type" : "MoleMole.ConfigRotationToTarget",

                "Duration" : -1,

                "TargetPosRot" : 

                {

                    "CoordsOption" : "Relative",

                    "TargetOption" : 

                    {

                            "$type" : "MoleMole.ConfigPosRotReferTarget",

                            "OffsetReferTarget" : "Target",

                            "BackupOffsetReferTarget" : "None",

                    },

                    "Offset" : 

                    {

                            "PositionOffset" : {"x":0.0, "y":0.0, "z":0.0},

                            "AngleOffset" : {"x":0.0, "y":0.0, "z":0.0},

                    },

                },

                "RotateType" : "Fixed",

                "RotateSpeed" : 360,

                "TargetUpdateMode" : "Always",

                "ReachTargetStop" : false,

            },

            

            //子弹打击相关

            "BulletColliderConfig": 

            {

                "ColliderType" : "Sphere",

                "BulletTypeName" : "ConfigurableSphereCollider",

                "SphereColliderRadius" : 0.3,

                "ColliderPosOffset" : {"x":0.0, "y":0.0, "z":0.0},

                "ColliderAngleOffset" : {"x":0.0, "y":0.0, "z":0.0},

            },

            "BulletHitTypeName" : "Normal", //Normal为每次触碰时攻击，Penetrate为接触时持续攻击

            "CanHitStage" : true, //能否命中墙壁

            "IsCanReflect" : true, //能否被反弹

            "MaxHitNum" : 0, //总打击次数

            "MaxHitTargetNum" : 0, //单位打击次数

            "MaxHitStageNum" : 0, //墙壁打击次数

            "MaxTouchStageNum" : 0, //墙壁反弹次数

            "HitAnimEventID" : "Nostradamus_Attack_Branch_01_Bullet_AttackProperty_01", //注意打击判定和爆炸判定一般只取一个

    

            //子弹爆炸相关

            "HitTargetExplode" : true, //命中怪物是否爆炸

            "HitStageExplode" : true, //命中墙壁是否爆炸

            "DestroyExplode" : true, //消失是否爆炸（达到最大打击次数时即为消失）

            "ExplodePosType": "HitPoint",

            "HitExplodeRadius" : 2,

            "ExplodeAnimEventID" : "Nostradamus_Attack_Branch_01_Bullet_AttackProperty_01", //注意打击判定和爆炸判定一般只取一个



            //子弹预判定相关

            "DodgeColliderConfig": 

            {

                "ColliderType" : "Capsule",

                "CapsuleColliderRadius" : 2.0,

                "CapsuleColliderHeight" : 10.0,

                "ColliderPosOffset" : {"x":0.0, "y":0.0, "z":5.0},

                "ColliderAngleOffset" : {"x":90.0, "y":0.0, "z":0.0},

            },

            

            //子弹特效

            "BulletEffect" : 

            {

                "EffectPattern" : "Eff_Nostradamus_Attack_Branch_01_Bullet"

            },



            //拖尾特效（子弹爆炸后不消失）

            "TrailEffect" : 

            {

                "EffectPattern" : "Eff_Common_RandomSkill_Ani_Dagger_Explosive_FlyingTrail"

            },



            //爆炸特效

            "HitExplodeEffect" : 

            {

                "EffectPattern" : "Eff_Nostradamus_Attack_Branch_01_Explode"

            },



            //打击怪物特效（若不爆炸）

            "HitTargetEffect" :

            {

                "EffectPattern" : "Eff_Anbi_Electric_Discharge_Cancel",

            },

            

            //打击场景特效（若不爆炸）

            "HitStageEffect" : 

            {

                "EffectPattern": "TestHit_Punch"

            },

    

            //消失特效（若不爆炸）

            "DestroyEffect" : 

            {

                "EffectPattern" : "Eff_Nostradamus_Attack_Branch_01_Explode_1"

            },

    

            "OnBulletDestroyAction":

            [

                {

                    "$type" : "MoleMole.TriggerAbilityAction",

                    "AbilityName" : "Nostradamus_BulletType_10_Explosion_01",

                    "ExtraParam" : "HitStage"

                },

                {

                    "$type" : "MoleMole.TriggerAbilityAction",

                    "AbilityName" : "Nostradamus_BulletType_10_Explosion_01",

                    "ExtraParam" : "HitOther"

                },

                {

                    "$type" : "MoleMole.TriggerAbilityAction",

                    "AbilityName" : "Nostradamus_BulletType_10_Explosion_01",

                    "ExtraParam" : "TimeUp"

                },

                {

                    "$type" : "MoleMole.AttackCameraShakeAction",

                    "ShakeConfigKey" : "Nostradamus_Bullet_Explosion_CamShake_01",

                    "ExtraParam" : "HitStage"

                },

                {

                    "$type" : "MoleMole.AttackCameraShakeAction",

                    "ShakeConfigKey" : "Nostradamus_Bullet_Explosion_CamShake_01",

                    "ExtraParam" : "HitOther"

                },

                {

                    "$type" : "MoleMole.AttackCameraShakeAction",

                    "ShakeConfigKey" : "Nostradamus_Bullet_Explosion_CamShake_01",

                    "ExtraParam" : "TimeUp"

                },

            ],

        }

    ],



    "Modifiers" : 

    {

        //带有Buff的Modier自动封装了OnAdd与OnRemoved时的Action

        "BleedBuffModifier":

        {

            "Duration" : -1,

            "Buff" : 

            {

                "BuffID" : 108006,

                "IsOverrideDuration" : true,

                //为True时，应用Modifier的Duration，否则用表中的时间进行Override

            }

        },



        //屏幕后处理的Action，包括Glitch（花屏）、RadialBlur（径向模糊）与Vignette（暗角）

        "ScreenEffectModifier":

        {

            "ModifierStacking": "Unique",

            "Duration" : -1,



            "OnAdded" :

            [

                {

                    "$type" : "MoleMole.ProcessScreenEffectAction",

                    "EffectType" : "Glitch",  //Glitch、RadialBlur、Vignette

                    "EffectKey" : "TestCurve"

                }

            ],

        },



        //执行FadeAction，Key值填写在CharacterCommon中

        "DitherFadeModifier":

        {

            "ModifierStacking": "Unique",

            "Duration" : -1,



            "OnAdded" :

            [

                {

                    "$type": "MoleMole.DitherFadeAction",

                    "DitherFadeType": "FadeIn",

                    "DitherFadeKey": "Buddy_Dither_Alpha_FadeIn",

                    "Duration": 1.0,

                    "Target" : "Self"

                },

            ],

        },



        //ThinkInterval功能与Delay功能

        "DelayModifier":

        {

            "ModifierStacking": "Unique",

            "Duration": -1,



            "ThinkInterval" : 0.01,

            "OnThinkInterval" :  

            [

                //SP回复不再使用ModifyProperty，以应用二级属性Actor_SPGetRatio（2022.01.07）

                {          

                    "$type": "MoleMole.RecoverSPAction",

                    "Target" : "Self",

                    "Percentage": 0,

                    "Amount": 0.12,

                    "IgnoreRatio": false,

                },

            ],



            "DelayHandlers" :

            [

                {  

                    "DelayTime" : 1,

                    "TimeUpActions":

                    [

                        {

                            "$type": "MoleMole.FireEffect",

                            "EffectPattern": "Eff_Anbi_Electric_Discharge_Start",

                            "Target": "Self",

                        },

                    ]

                },

                {  

                    "DelayTime" : 2,

                    "TimeUpActions":

                    [

                        {

                            "$type": "MoleMole.FireEffect",

                            "EffectPattern": "Eff_Anbi_Electric_Discharge_Start",

                            "Target": "Self",

                        },

                    ]

                }

            ],

        },



        //对状态的Predicate

        "StatePredicateModifier":

        {

            "ModifierStacking": "Unique",

            "Duration": -1,



            "OnAdded" :

            [

                {  

                    "$type" : "MoleMole.FireEffect",

                    "EffectPattern" : "Eff_Anbi_Electric_Discharge_Start",

                    "Target" : "Self",

                    "Predicates" : 

                    [

                        {

                            "$type" : "MoleMole.ByAnimatorStateType",

                            "AnimatorStateType" : "Sky" //Ground、Sly、Floor

                        },

                    ],

                },

            ],

        },



        //对阵营的Predicate

        "CampTypePredicateModifier":

        {

            "ModifierStacking": "Unique",

            "Duration": -1,



            "OnAdded" :

            [

                {  

                    "$type" : "MoleMole.FireEffect",

                    "EffectPattern" : "Eff_Anbi_Electric_Discharge_Start",

                    "Target" : "Self",

                    "Predicates": 

                    [

                        {

                            "$type": "MoleMole.ByCampType",

                            "Camp": "TeamEvil",

                        }

                    ]

                },

            ],

        },



        //对敌我关系的Predicate

        "RelationShipPredicateModifier":

        {

            "ModifierStacking": "Unique",

            "Duration": -1,



            "OnAdded" :

            [

                {  

                    "$type" : "MoleMole.FireEffect",

                    "EffectPattern" : "Eff_Anbi_Electric_Discharge_Start",

                    "Target" : "Self",

                    "Predicates": 

                    [

                        {

                            "$type": "MoleMole.ByRelativeCampType",

                            "Relationship": "Enemy",

                        }

                    ]

                },

            ],

        },



        //修改神器相关参数的Action

        "ModifyArcanaCommonPropertyModifier":

        {

            "ModifierStacking": "Unique",

            "Duration": -1,



            "OnAdded" :

            [

                //修改临时值

                {  

                    "$type" : "MoleMole.ModifyArcanaCommonPropertyAction",

                    //ShieldDuration、ShieldValue、ShieldCount、FieldRangeDuration

                    "ArcanaProperty" : "ShieldDuration",

                    "Delta" : 5.0,

                    "Ratio" : 10.0,

                    "Target" : "Buddy",

                },

                //修改属性值（战斗层）

                {

                    "$type": "MoleMole.ModifyProperty",

                    "PropertyType": "Custom",

                    //ShieldDuration_Delta、ShieldDuration_Ratio、ShieldValue_Delta、ShieldValue_Ratio

                    //ShieldCount_Delta、ShieldCount_Ratio、FieldRangeDuration_Delta、FieldRangeDuration_Ratio

                    //SkillCD_Delta、SkillCD_Ratio（所有类型）、Cannon_SkillCD_Delta、Cannon_SkillCD_Ratio（根据类型枚举）

                    "CustomPropertyType": "ShieldDuration_Delta",

                    "IsUsePercentage": false,

                    "PropertyModifyFunction": "Add",

                    "Percentage": 0.2,

                    "Amount": 5.0,

                },

            ],

        },



        // //Attach无敌Action，与Modifier同生共死（已废弃，改用PushInvincible）

        // "InvincibleModifier":

        // {

        //     "ModifierStacking": "Unique",

        //     "Duration": 5,



        //     "OnAdded" :

        //     [

        //         {  

        //             "$type" : "MoleMole.AttachInvincibleAction",

        //             "SetInvincible" : true,

        //             "Target" : "Self",

        //         },

        //     ],

        // },



        //设置AI行为树参数的Action

        "InvincibleModifier":

        {

            "ModifierStacking": "Unique",

            "Duration": 1,



            "OnAdded" :

            [

                {

                    "$type" : "MoleMole.WriteAIParamAction",

                    "Target" : "Self",

                    "ParamName" : "TestParam_01",

                    "BoolParamValue" : true,

                    "IntParamValue" : 13,

                    "FloatParamValue" : 24.58,

                    "StringParamValue" : "ABCDCBA"

                },

            ],

        },



        //对受击角度的Predicate

        "AnglePredicateModifier" : 

        {

            "ModifierStacking": "Unique",

            "Duration": -1,



            "OnBeingHit" :

            [

                {

                    "$type": "MoleMole.FireEffect",

                    "EffectPattern": "Eff_Anbi_Electric_Discharge_Start",

                    "Target": "Self",

                    "Predicates": 

                    [

                        {

                            "$type": "MoleMole.ByHitAngleRange",

                            "AngleMin": 60.0,

                            "AngleMax": 120.0,

                        },

                    ]

                },

            ],

        },



        //平滑回复SP，用了ModifierMixin

        "RecoverSPModifier" :

        {

            "ModifierStacking" : "Unique",

            "Duration": -1,



            "ModifierMixins" :

            [

                //SP回复不再使用SmoothChangeProperty，以应用二级属性Actor_SPGetRatio（2022.01.07）

                {

                    "$type": "MoleMole.SmoothRecoverSPMixin",

                    "IgnoreRatio":false,

                    "PropertyItem" : 

                    [

                        {

                            "PropertyModifyFunction": "Add",

                            "Percentage": 0,

                            "Amount": 10,

                        },

                    ],

                }

            ]

        },



        //对AbilitySpecials的设置与监听

        "AbilitySpecialsModifier": 

        {

            "ModifierStacking": "MultipleRefresh",

            "Duration": -1,

            "OnAdded":

            [

                {          

                    "$type": "MoleMole.RecoverSPAction",

                    "Percentage": 0,

                    "Amount": "%RecoverSP",

                    "IgnoreRatio": false,

                },

                {

                    "$type": "MoleMole.SetAbilitySpecialAction",

                    "ParamName": "RecoverSP",

                    "ParamType": "float",

                    "ModifyFunction": "Add",

                    "Param": 10,

                    "Predicates" :

                    [

                        {

                            "$type" : "MoleMole.ByAbilitySpecial",

                            "Target" : "Self",

                            "ParamName": "RecoverSP",

                            "ParamType": "float",

                            "CompareType": "Equal",

                            "Param" : 5,

                        },

                    ],

                },

            ],

        },

    },



    //自定义参数，可以被其他地方调用、设置与监听

    "AbilitySpecials" : 

    {

        "RecoverSP" :

        {

            "Value" : 5,

        },



        "AddedPlayerMaxEpDelta":

        {

            "Value" : 1,

        }

    }

}