[ //////////////////////////////////////////////////////////////// // // 钓鱼系统 - 钓鱼状态及按键处理 // //////////////////////////////////////////////////////////////// { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing", "isDynamicAbility": true, "onAdded": [ { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_AddSkillInfo", }, { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_ChangePlayMode", }, { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_Start", }, { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_Invincible_Buff", }, { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_DenyLock_Buff", }, { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_Ghost_Buff", }, ], "abilityMixins": [ { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Choose", "Fishing_Cast_BS", "Fishing_Cast_Loop", "Fishing_Cast_AS", "Fishing_Wait", "Fishing_Pull", "Fishing_Battle", "Fishing_End"], "modifierName": "Avatar_Fishing_StateTag", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Choose", "Fishing_Cast_BS", "Fishing_Cast_Loop", "Fishing_Pull", "Fishing_Cast_AS"], "modifierName": "Avatar_Fishing_ChangeButton_Choose", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Wait"], "modifierName": "UNIQUE_Avatar_Fishing_ChangeButton_Wait", }, // { // "$type": "AttachToStateIDMixin", // "stateIDs": ["Fishing_Battle"], // "modifierName": "Avatar_Fishing_ChangeButton_Battle", // }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Choose", "Fishing_Cast_BS", "Fishing_Cast_Loop", "Fishing_Cast_AS", "Fishing_Wait", "Fishing_Pull", "Fishing_Battle"], "modifierName": "Avatar_Fishing_ChangeButton_Exit", }, ], "modifiers": { "Avatar_Fishing_Start": //进入钓鱼选杆选饵阶段 { "duration": 0.5, "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_Start", }, ], }, "Avatar_Fishing_ChangePlayMode": //切换钓鱼模式,屏蔽一些不用的按键 { "onAdded": [ { "$type": "ChangePlayMode", "muteRemoteAction": true, "toPlayMode": "Fishing", "doOffStage": true, }, ], "onRemoved": [ { "$type": "ChangePlayMode", "muteRemoteAction": true, "toPlayMode": "Normal", "doOffStage": true, }, ], }, "Avatar_Fishing_ChangeButton_Choose": //选杆阶段 暂时和抛竿按键一致,否则导致按键会断掉 { "modifierMixins": [ { "$type": "SwitchSkillIDMixin", //抛竿按键 "priority": "Playmode", "skillIndex": 0, "skillID": 20311, }, { "$type": "SwitchSkillIDMixin", //换饵按键 "priority": "Playmode", "skillIndex": 2, "skillID": 20316, }, ], }, "UNIQUE_Avatar_Fishing_ChangeButton_Wait": //等待阶段 { "isUnique": true, "modifierMixins": [ { "$type": "SwitchSkillIDMixin", //收杆按键 "priority": "Playmode", "skillIndex": 0, "skillID": 20314, }, ], }, "Avatar_Fishing_ChangeButton_Exit": //退出按钮显示 { "modifierMixins": [ { "$type": "SwitchSkillIDMixin", //退出按键 "priority": "Playmode", "skillIndex": 3, "skillID": 20315, }, ], }, "Avatar_Fishing_AddSkillInfo": //动态上下钓鱼按键SkillInfo { "onAdded": [ { "$type": "AddAvatarSkillInfo", "skillID": 20310, }, { "$type": "AddAvatarSkillInfo", "skillID": 20311, }, { "$type": "AddAvatarSkillInfo", "skillID": 20314, }, { "$type": "AddAvatarSkillInfo", "skillID": 20315, }, { "$type": "AddAvatarSkillInfo", "skillID": 20316, }, ], "onRemoved": [ { "$type": "RemoveAvatarSkillInfo", "skillID": 20310, }, { "$type": "RemoveAvatarSkillInfo", "skillID": 20311, }, { "$type": "RemoveAvatarSkillInfo", "skillID": 20314, }, { "$type": "RemoveAvatarSkillInfo", "skillID": 20315, }, { "$type": "RemoveAvatarSkillInfo", "skillID": 20316, }, ], }, "Avatar_Fishing_StateTag": //钓鱼状态下Tag标记 { "onAdded": [ { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_Tag", "value": 1, "doOffStage": true, }, ], "onRemoved": [ { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_Tag", "value": 0, "doOffStage": true, }, ], }, "Avatar_Fishing_Invincible_Buff": //钓鱼状态中的无敌Buff { "state": "Invincible", "onAdded": [ { "$type" : "AttachAbilityStateResistance", "resistanceListID": 11002, }, ], "thinkInterval": 2.0, "onThinkInterval": [ { "$type": "RemoveModifier", "modifierName": "Avatar_Fishing_Invincible_Buff", "predicates": [ { "$type": "ByTargetGlobalValue", "key": "_ABILITY_Fishing_Tag", "value": 0, "compareType": "Equal", }, ], }, ], }, "Avatar_Fishing_DenyLock_Buff": { "state": "DenyLockOn", "thinkInterval": 2.0, "onThinkInterval": [ { "$type": "RemoveModifier", "modifierName": "Avatar_Fishing_DenyLock_Buff", "predicates": [ { "$type": "ByTargetGlobalValue", "key": "_ABILITY_Fishing_Tag", "value": 0, "compareType": "Equal", }, ], }, ], }, "Avatar_Fishing_Ghost_Buff": { "state": "IsGhostToEnemy", "thinkInterval": 2.0, "onThinkInterval": [ { "$type": "RemoveModifier", "modifierName": "Avatar_Fishing_Ghost_Buff", "predicates": [ { "$type": "ByTargetGlobalValue", "key": "_ABILITY_Fishing_Tag", "value": 0, "compareType": "Equal", }, ], }, ], }, }, }, }, //////////////////////////////////////////////////////////////// // // 钓鱼系统 - 抛竿瞄准阶段 // //////////////////////////////////////////////////////////////// { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_Cast", "isDynamicAbility": true, "onAdded": [ { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_Aim_Length", //镜头俯仰角控制抛射距离 "value": 0, }, { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_Pool_Legal", //瞄准区域是否合法判定 "value": 0, }, { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_IsBaitEnough", //判断鱼饵是否充足 "value": 0, }, ], "abilityMixins": [ { "$type": "AttachToStateIDMixin", "stateIDs":["Fishing_Cast_BS", "Fishing_Cast_Loop", "Fishing_Cast_AS"], "modifierName": "Fishing_Cast_Focus", }, { "$type": "AttachToStateIDMixin", "stateIDs":["Fishing_Cast_BS", "Fishing_Cast_Loop"], "modifierName": "Fishing_Aim", }, { "$type": "AttachToNormalizedTimeMixin", "stateID": "Fishing_Cast_AS", "modifierName": "Fishing_Cast_TriggerBullet", "normalizeStart": 0.26, }, { "$type": "ButtonHoldChargeMixin", "skillID": 20311, "chargeTime": 99999, "OnBeginUncharged": [ { "$type": "Predicated", "targetPredicates": [ { "$type": "ByTargetGlobalValue", "key": "_ABILITY_Fishing_IsBaitEnough", //抛竿时检测是否有鱼饵 "value": 1, "compareType": "Equal", }, ], "successActions": [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_Cast", }, ], "failActions": [ { "$type": "FireFishingEvent", "eventType" : "NotifyBait", }, ], }, { "$type": "ResetAnimatorTrigger", "triggerID": "EndHoldTrigger", }, { "$type": "RemoveModifier", "modifierName": "Delay_SetTrigger", }, ], "OnReleaseUncharged": [ { "$type": "SetAnimatorTrigger", "triggerID": "EndHoldTrigger", }, { "$type": "ApplyModifier", "modifierName": "Delay_SetTrigger", }, { "$type": "DebugLog", "content": "抛竿", }, ], "chargeStateIDs": ["Fishing_Cast_BS", "Fishing_Cast_Loop"], }, ], "modifiers": { "Delay_SetTrigger": //延迟一点再强制退出一次 { "duration": 0.6, "onRemoved": [ { "$type": "SetAnimatorTrigger", "triggerID": "EndHoldTrigger", }, ], }, "Fishing_Cast_Focus": //瞄准进入Focus镜头(自由移动镜头) { "onAdded": [ { "$type": "AvatarEnterFocus", "cameraFollowLower": { "x": 0.8, "y": 1.0, "z": -2.5, }, "cameraFollowUpper": { "x": 0.5, "y": 0.0, "z": 0.0, }, "cameraFastFocusMode": true, "cameraFollowMaxDegree": 0, "cameraFollowMinDegree": -60, //原本上下限 -60,60 "dragButtonName": "Skill1", "assistance": { "ps4": { "useGyro": false, }, "ps5": { "useGyro": false, }, "other": { "useGyro": true, }, }, "canMove": false, "showCrosshair": false, "vcam_fov": 20, }, { "$type": "PlayEmoSync", "emoSyncAssetPath": "Cutscene/ShortDialog/Cs_Emo_Avatar_Simple_Common_Set/Cs_Emo_Avatar_Common_Bow_Fight_Aim", }, { "$type": "ControlEmotion", "toggleBlink": false, }, ], "onRemoved": [ { "$type": "AvatarExitFocus", "keepRotation": true, }, { "$type": "PlayEmoSync", "emoSyncAssetPath": "Cutscene/ShortDialog/Cs_Emo_Avatar_Simple_Common_Set/Cs_Emo_Avatar_Common_Normal", }, { "$type": "ControlEmotion", "toggleBlink": true, }, ], }, "Fishing_Aim": //控制瞄准线与发射鱼漂 { "onAdded": [ { "$type": "AttachEffect", "effectPattern": "Eff_Avatar_Fishing_Aim_Line", //特效由鱼竿端点发射 "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], "onRemoved": [ { "$type": "SetGlobalPos", "key": "_ABILITY_FishingRod_Pos", //将鱼竿端点位置存在角色身上 "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, "born": { "$type": "ConfigBornByAttachPoint", "attachPointName": "LinePoint", "attachPointTargetType": "Target", }, "setTarget": false, }, ], "modifierMixins": //通过镜头俯仰角实时更新GV值 [ { "$type": "FishingAimParabolaMixin", "globalValueKey": "_ABILITY_Fishing_Aim_Length", "minAngle": -60, "maxAngle": 0, "minRange": 2, "maxRange": 15, "otherTargets": //同时把GlobalValue值传给Target { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "Fishing_Cast_TriggerBullet": //发射鱼漂 { "onAdded": [ { "$type": "TriggerBullet", "bulletID": 42000001, "born": { "$type": "ConfigBornByGlobalValue", "positionKey": "_ABILITY_FishingRod_Pos", }, }, { "$type": "RemoveModifier", "modifierName": "Fishing_Cast_Focus", }, ], }, }, }, }, { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_CreateAnchor", //鱼漂发射器通知主角创建鱼漂 "isDynamicAbility": true, "onAbilityStart": [ { "$type": "CreateGadget", "gadgetID": 42000002, "campID": 1001, "campTargetType": "Enemy", "born": { "$type": "ConfigBornByGlobalValue", "positionKey": "_ABILITY_Fishing_AnchorPoint", "offset": { "x": 0, "y": 0, "z": 0, }, }, }, { "$type": "FireFishingEvent", "eventType" : "CastAnchorPoint", }, ], }, }, { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_SelectBait", //响应更换鱼饵按钮 "isDynamicAbility": true, "onAbilityStart": [ { "$type": "FireFishingEvent", "eventType": "SelectBait", }, ], }, }, // Gadget_42000001 瞄准射线发射器,射线碰撞点为实际钓点 { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_Cast_Bullet", "onAbilityStart": [ { "$type": "SetGlobalPos", "key": "_ABILITY_Fishing_AnchorPoint", "target": "OriginOwner", "born": { "$type": "ConfigBornByCollisionPoint", "offset" : { "x": 0.0, "y": 0.0, "z": 0.0, }, "onGround": true, "onGroundIgnoreWater": false, "alongGround": true, "onGroundRaycastUpDist":2, }, }, { "$type": "SetGlobalPos", "key": "_ABILITY_Fishing_AnchorPoint", "target": "Self", "born": { "$type": "ConfigBornByCollisionPoint", "offset" : { "x": 0.0, "y": 0.0, "z": 0.0, }, "onGround": true, "onGroundIgnoreWater": false, "alongGround": true, "onGroundRaycastUpDist": 2, }, }, // { // "$type": "FireEffect", // "effectPattern": "Eff_Avatar_Fishing_Cork_Bloom", // "born": // { // "$type": "ConfigBornByGlobalValue", // "positionKey": "_ABILITY_Fishing_AnchorPoint", // }, // }, { "$type": "FireHitEffect", "hitScene": { "defaultEffect": "Eff_Avatar_Fishing_Cork_HitScene", "surfaceEffect": { "Water": "Eff_Avatar_Fishing_Cork_Bloom", }, }, }, { "$type": "Predicated", "target": "OriginOwner", "targetPredicates": [ { "$type": "ByTargetGlobalValue", "key": "_ABILITY_Fishing_Pool_Legal", //判断抛射区域是否合法 "value": 1, "compareType": "Equal", }, ], "successActions": //合法继续垂钓 [ { "$type": "TriggerAbility", "abilityName": "Avatar_Common_Fishing_CreateAnchor", "target": "OriginOwner", }, ], "failActions": //非法直接收竿 [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_Pull", "target": "OriginOwner", }, ], }, ], "onAdded": [ { "$type": "SetAnimatorBool", "boolID": "PRIVATE_Fishing_CanPullRod", "value": false, "target": "OriginOwner", }, { "$type": "AttachEffect", "effectPattern": "Eff_Avatar_Fishing_Cast_Bullet", }, // { // "$type": "AttachModifier", // "modifierName": "Avatar_Fishing_Cast_OnAvatar", // "target": "OriginOwner", // }, ], "modifiers": { "Avatar_Fishing_Cast_OnAvatar": //挂在角色身上找鱼竿 { "onAdded": [ { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_Cast_OnRod", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "Avatar_Fishing_Cast_OnRod": //鱼竿与抛点连线 { "onAdded": [ { "$type": "AttachEffect", "effectPattern": "Eff_Avatar_Fishing_Line_01", "target": "Caster", "setSelfAsEffectPluginTarget": true, }, ], }, }, }, }, // Gadget_42000002 鱼漂 { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_Cork", "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_Pull", //生成鱼漂时发现不在水面直接收竿 "target": "OriginOwner", "predicates": [ { "$type": "ByAny", "target": "Self", "predicates": [ { "$type": "ByTargetAltitude", "TargetAltitudeType": "GroundOnly", "value": 0.3, "logic": "Lesser", }, { "$type": "ByTargetAltitude", "TargetAltitudeType": "WaterOnly", "value": 0.3, "logic": "Greater", }, ], }, ], }, { "$type": "AttachEffect", "effectPattern": "Eff_Avatar_Fishing_Cork", }, { "$type": "TriggerAbility", "abilityName": "Avatar_Common_FishingLine_Manager", //通知自己创建鱼线 "target": "OriginOwner", }, { "$type": "AttachModifier", "modifierName": "UNIQUE_Avatar_Fishing_Waiting_LineEffect", "target": "OriginOwner", }, { "$type": "SetAnimatorBool", "boolID": "PRIVATE_Fishing_CanPullRod", //必须要鱼漂发射器碰撞后才能收竿 "value": true, "target": "OriginOwner", }, ], "onAbilityStart": [ { "$type": "KillSelf", }, ], "onKill": [ { "$type": "FireEffect", "effectPattern": "Eff_Avatar_Fishing_Cork_Pull", //鱼漂消失时的过度效果 "born": { "$type": "ConfigBornBySelf", }, }, ], "modifiers": { "UNIQUE_Avatar_Fishing_Waiting_LineEffect": //等待阶段的动态鱼线 { "isUnique": true, "onAdded": [ { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_Waiting_LineEffect_OnWeapon", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "Avatar_Fishing_Waiting_LineEffect_OnWeapon": //特效必须是鱼竿创建 { "onAdded": [ { "$type": "AttachEffect", "effectPattern": "Eff_Avatar_Fishing_Line_01", "target": "Caster", "setSelfAsEffectPluginTarget": true, }, ], }, }, }, }, //////////////////////////////////////////////////////////////// // // 钓鱼系统 - 等待阶段 // //////////////////////////////////////////////////////////////// { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_Waiting", "isDynamicAbility": true, "onAdded": [ { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_AddBattleSkill", }, ], "onAbilityStart": //鱼儿上钩时进入Trigger [ { "$type": "RemoveUniqueModifier", "modifierName": "UNIQUE_Avatar_Fishing_ChangeButton_Wait", }, { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_ChangeButton_Battle", }, { "$type": "SetSelfAttackTarget", "target": "Other", }, { "$type": "TriggerAbility", "abilityName": "Avatar_Common_FishingRod", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, "forceUseSelfCurrentAttackTarget": true, //把自己的SelfAttackTarget传过去 }, ], "abilityMixins": [ { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Wait", "Fishing_Battle"], "modifierName": "Avatar_Fishing_RemoveChangeSkill", }, { "$type": "AttachToAnimatorStateIDMixin", "stateIDs": ["Fishing_Pull_01"], "modifierName": "Avatar_Fishing_Pull", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Cast_AS", "Fishing_Wait", "Fishing_Battle"], "modifierName": "Avatar_Fishing_Camera_FocusBias_Waiting", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Battle"], "modifierName": "Avatar_Fishing_Camera_FocusBias_Battle", }, ], "modifiers": { "Avatar_Fishing_AddBattleSkill": //动态上下Battle技能信息(必须得放在这个ability内,否则会下不了) { "onAdded": [ { "$type": "AddAvatarSkillInfo", "skillID": 20313, }, ], "onRemoved": [ { "$type": "RemoveAvatarSkillInfo", "skillID": 20313, }, ], }, "Avatar_Fishing_ChangeButton_Battle": //鱼儿咬钩时替换响应及Battle按键 { "onAdded": [ { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_IsBattle", //用于判定自己是否处Battle状态中 "value": 0, }, ], "modifierMixins": [ { "$type": "SwitchSkillIDMixin", "priority": "Playmode", //优先级高一些,覆盖收竿 "skillIndex": 0, "skillID": 20313, //启动及QTE按键,用同一个 }, ], }, "Avatar_Fishing_RemoveChangeSkill": //脱离Waiting阶段去掉响应按钮 { "onRemoved": [ { "$type": "RemoveModifier", "modifierName": "Avatar_Fishing_ChangeButton_Battle", "doOffStage": true, }, ], }, "Avatar_Fishing_Pull": //主动或被动抬竿时需要发送指定事件 { "onAdded": [ { "$type": "FireFishingEvent", "eventType": "Pull", }, ], }, "Avatar_Fishing_Camera_FocusBias_Waiting": //等待阶段镜头对焦偏移 { "onAdded": [ { "$type": "AvatarEnterViewBias", "sphereBiasPole": 45, //正数为向右偏移 "sphereBiasElev": 75, //正数为向上偏移 "sphereRadius": 2, "postForwardPoleDeltaAngle": 48, //正数为右侧偏角 "postForwardElevDeltaAngle": 45, //正数为上侧偏角 "lockZoom": true, "lockResetBack": true, }, ], "onRemoved": [ { "$type": "AvatarExitViewBias", "lerpRadius": 4.0, "lerpDuration": 0.5, "doOffStage": true, }, ], }, "Avatar_Fishing_Camera_FocusBias_Battle": //Battle阶段的镜头对焦偏移 { "onAdded": [ { "$type": "AvatarEnterViewBias", "sphereBiasPole": 45, //正数为向右偏移 "sphereBiasElev": 20, //正数为向上偏移 "sphereRadius": 4, "postForwardPoleDeltaAngle": 23, //正数为右侧偏角 "postForwardElevDeltaAngle": 0, //正数为上侧偏角 "lockZoom": false, "lockResetBack": true, }, ], "onRemoved": [ { "$type": "AvatarExitViewBias", "lerpRadius": 4.0, "lerpDuration": 0.5, "doOffStage": true, }, ], }, }, }, }, { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_Delay", "isDynamicAbility": true, "onAbilityStart": //鱼儿上钩超时未响应 [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_Pull", }, ], }, }, //////////////////////////////////////////////////////////////// // // 钓鱼系统 - Battle QTE阶段 // //////////////////////////////////////////////////////////////// { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_Battle", "isDynamicAbility": true, "abilityMixins": [ { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Battle"], "modifierName": "Avatar_Fishing_Battle", }, { "$type": "ButtonHoldChargeMixin", "skillID": 20313, "chargeTime": 999999, "OnBeginUncharged": [ { "$type": "ApplyModifier", "modifierName": "Avatar_Fishing_Battle_Start", "predicates": [ { "$type": "ByTargetGlobalValue", "key": "_ABILITY_Fishing_IsBattle", "value": 0, "compareType": "Equal", }, ], }, { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_Battle_QteHandler", }, { "$type": "RemoveModifier", "modifierName": "Avatar_Fishing_Battle_ReduceBlend", }, ], "OnReleaseUncharged": [ { "$type": "RemoveModifier", "modifierName": "Avatar_Fishing_Battle_QteHandler", }, { "$type": "AttachModifier", "modifierName": "Avatar_Fishing_Battle_ReduceBlend", }, ], "chargeStateIDs": ["Fishing_Battle"], }, ], "modifiers": { "Avatar_Fishing_Battle": //Battle阶段按键反馈 { "onAdded": [ { "$type": "FireFishingEvent", "eventType": "QteStart", }, ], "onRemoved": //记得在退出动作的时候清一下Handler [ { "$type": "RemoveModifier", "modifierName": "Avatar_Fishing_Battle_QteHandler", "doOffStage": true, }, { "$type": "RemoveModifier", "modifierName": "Avatar_Fishing_Battle_ReduceBlend", }, { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_BattleBlend", "value": 0, }, { "$type": "SetAnimatorFloat", "floatID": "Fishing_BattleBlend", "value": 0, }, { "$type": "SetAnimatorFloat", "floatID": "Blend", "value": 0, "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "Avatar_Fishing_Battle_Start": //开启钓鱼QTE阶段 { "duration": 0.5, "onAdded": [ { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_IsBattle", "value": 1, }, { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_QteStart", }, ], }, "Avatar_Fishing_Battle_QteHandler": //处理QTE按键反馈与Trigger发送逻辑 { "onAdded": [ { "$type": "FireFishingEvent", "eventType": "QteTrigger", }, ], "thinkInterval": 0.07, "onThinkInterval": [ { "$type": "FireFishingEvent", "eventType": "QteTrigger", }, { "$type": "AddGlobalValue", "key": "_ABILITY_Fishing_BattleBlend", "value": 0.12, "useLimitRange": true, "maxValue": 1, "minValue": 0, }, { "$type": "SetGlobalValueToOverrideMap", "globalValueKey": "_ABILITY_Fishing_BattleBlend", "overrideMapKey": "Override_Fishing_Blend", }, { "$type": "SetAnimatorFloat", //更改人的Blend值 "floatID": "Fishing_BattleBlend", "value": "%Override_Fishing_Blend", "transitionTime": 0.1, }, { "$type": "SetAnimatorFloat", //更改竿的Blend值 "floatID": "Blend", "value": "%Override_Fishing_Blend", "transitionTime": 0.1, "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "Avatar_Fishing_Battle_ReduceBlend": //松手时角色的动作放缓 { "thinkInterval": 0.1, "onThinkInterval": [ { "$type": "AddGlobalValue", "key": "_ABILITY_Fishing_BattleBlend", "value": -0.1, "useLimitRange": true, "maxValue": 1, "minValue": 0, }, { "$type": "SetGlobalValueToOverrideMap", "globalValueKey": "_ABILITY_Fishing_BattleBlend", "overrideMapKey": "Override_Fishing_Blend", }, { "$type": "SetAnimatorFloat", "floatID": "Fishing_BattleBlend", "value": "%Override_Fishing_Blend", "transitionTime": 0.1, }, { "$type": "SetAnimatorFloat", "floatID": "Blend", "value": "%Override_Fishing_Blend", "transitionTime": 0.1, "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, }, "abilitySpecials": { "Override_Fishing_Blend": 0, //用于OverrideMap中间值计算 }, }, }, //钓鱼系统 - QTE成败判定(客户端发送Trigger) { //客户端发送QteSuccess "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_QteSuccess", "isDynamicAbility": true, "onAbilityStart": [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_QteSuccess", }, { "$type": "DebugLog", "content": "QTE成功", }, ], }, }, { //客户端发送QteFail "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_QteFail", "isDynamicAbility": true, "onAbilityStart": [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_QteFail", //暂时用同一个Trigger,主要用于作动作表现区分 }, { "$type": "DebugLog", "content": "QTE失败", }, ], }, }, //////////////////////////////////////////////////////////////// // // 钓鱼系统 - 任何阶段请求大退 // //////////////////////////////////////////////////////////////// { //向客户端发送退出请求 "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_RequestQuit", "isDynamicAbility": true, "onAbilityStart": [ { "$type": "FireFishingEvent", "eventType": "RequestQuit", }, ], }, }, { //客户端确认发送退出Trigger "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_Quit", "isDynamicAbility": true, "onAbilityStart": [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_End", "doOffStage": true, }, ], "onRemoved": //AbilityGroup下掉时也需要退出 [ { "$type": "SetAnimatorTrigger", "triggerID": "PRIVATE_Fishing_End", "doOffStage": true, }, ], }, }, //////////////////////////////////////////////////////////////// // // 钓鱼系统 - 断线重连(处理疑难恢复逻辑) // //////////////////////////////////////////////////////////////// { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_Fishing_OnTeam", "onAdded": [ { "$type": "AttachModifier", "modifierName": "Team_Fishing_Recovery", }, ], "modifiers": { "Team_Fishing_Recovery": //钓鱼流程中断时的全局恢复逻辑 { "onRemoved": [ { "$type": "ChangePlayMode", "muteRemoteAction": true, "toPlayMode": "Normal", "doOffStage": true, }, { "$type": "AvatarExitViewBias", "lerpDuration": 0.5, "doOffStage": true, }, ], }, }, }, }, //////////////////////////////////////////////////////////////// // // 鱼竿生命周期管理 // //////////////////////////////////////////////////////////////// { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_FishingRod_Manager", "isDynamicAbility": true, "abilityMixins": [ { "$type": "AttachToStateIDMixin", "stateIDs": [ "Fishing_Choose", "Fishing_Cast_BS", "Fishing_Cast_Loop", "Fishing_Cast_AS", "Fishing_Wait", "Fishing_Battle", "Fishing_Pull", "Fishing_End", ], "modifierName": "Avatar_FishingRod_Handler", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Choose"], "modifierName": "FishingRod_Trigger_Choose", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Cast_BS", "Fishing_Cast_Loop"], "modifierName": "FishingRod_Trigger_Cast", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Cast_AS"], "modifierName": "FishingRod_Trigger_Cast_AS", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Battle"], "modifierName": "FishingRod_Trigger_Battle", }, { "$type": "AttachToAnimatorStateIDMixin", "stateIDs": ["Fishing_Pull_01", "Fishing_Pull_02"], "modifierName": "FishingRod_Trigger_Pull", }, { "$type": "AttachToAnimatorStateIDMixin", "stateIDs": ["Fishing_Pull_Fail"], "modifierName": "FishingRod_Trigger_Pull_Fail", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_End"], "modifierName": "FishingRod_Trigger_End", }, ], "modifiers": { //无论是创生还是消灭均需要拿到鱼竿的Entity,可以新增一种SelectTarget类型去搜索自身创建的鱼竿 "Avatar_FishingRod_Handler": //控制鱼竿创生与销毁 { "onRemoved": [ { "$type": "FireEffect", "effectPattern": "Eff_Avatar_Fishing_Rod_Disappear", "born": { "$type": "ConfigBornByAttachPoint", "attachPointName": "WeaponR", }, }, ], }, "FishingRod_Trigger_Choose": { "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "Fishing_Choose", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "FishingRod_Trigger_Cast": { "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "Fishing_Cast", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "FishingRod_Trigger_Cast_AS": { "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "Fishing_Cast_AS", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "FishingRod_Trigger_Battle": { "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "Fishing_Battle", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "FishingRod_Trigger_Pull": { "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "Fishing_Pull", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "FishingRod_Trigger_Pull_Fail": { "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "Fishing_Pull_Fail", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "FishingRod_Trigger_End": { "onAdded": [ { "$type": "SetAnimatorTrigger", "triggerID": "Fishing_End", "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, }, }, }, //////////////////////////////////////////////////////////////// // // 鱼线管理 // //////////////////////////////////////////////////////////////// { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_FishingLine_Manager", "isDynamicAbility": true, "onAbilityStart": [ ], "abilityMixins": [ { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Cast_AS","Fishing_Wait"], "modifierName": "UNIQUE_Avatar_Fishing_RemoveCork", }, { "$type": "AttachToStateIDMixin", "stateIDs": ["Fishing_Wait", "Fishing_Battle"], "modifierName": "UNIQUE_Avatar_Fishing_RemoveBattleLine", }, { "$type": "AttachToNormalizedTimeMixin", "stateID": "Fishing_Pull_01", "modifierName": "Delay_RemoveBattleLine", "normalizeStart": 0.1, "normalizeEnd": 1.0, }, ], "modifiers": { "UNIQUE_Avatar_Fishing_RemoveCork": //鱼儿上钩时需要隐藏鱼漂与鱼线(生成新鱼线连到鱼嘴) { "isUnique": true, "onRemoved": [ { "$type": "KillGadget", "doOffStage": true, "gadgetInfo": { "$type": "SelectTargetsByChildren", "configID": 42000002, "sortType": "Default", }, }, { "$type": "RemoveUniqueModifier", "modifierName": "UNIQUE_Avatar_Fishing_Waiting_LineEffect", "doOffStage": true, }, ], }, "UNIQUE_Avatar_Fishing_RemoveBattleLine": //离开QTE状态时干掉鱼线 { "isUnique": true, "onRemoved": [ { "$type": "KillGadget", "doOffStage": true, "gadgetInfo": { "$type": "SelectTargetsByChildren", "configID": 42000002, "sortType": "Default", }, }, { "$type": "RemoveUniqueModifier", "modifierName": "UNIQUE_Avatar_Fishing_Battle_LineEffect", "doOffStage": true, "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, "Delay_RemoveBattleLine": //抬杆时去除battle鱼线特效,起保护效果 { "onAdded": [ { "$type": "RemoveUniqueModifier", "modifierName": "UNIQUE_Avatar_Fishing_Battle_LineEffect", "doOffStage": true, "otherTargets": { "$type": "SelectTargetsByChildrenEntityType", "entityType": "FishRod", "sortType": "Default", }, }, ], }, }, }, }, //////////////////////////////////////////////////////////////// // // 鱼竿物件 Gadget // //////////////////////////////////////////////////////////////// { "Default": { "$type": "ConfigAbility", "abilityName": "Avatar_Common_FishingRod", "onAdded": [ { "$type": "SetGlobalValue", "key": "_ABILITY_Fishing_Aim_Length", "value": 0, }, ], "onAbilityStart": //鱼儿咬钩时Trigger [ { "$type": "RemoveUniqueModifier", "modifierName": "UNIQUE_Avatar_Fishing_RemoveCork", "target": "OriginOwner", }, { "$type": "SetSelfAttackTarget", "target": "Target", }, { "$type": "AttachModifier", "modifierName": "UNIQUE_Avatar_Fishing_Battle_LineEffect", }, ], "modifiers": { "UNIQUE_Avatar_Fishing_Battle_LineEffect": //鱼儿上钩后的鱼线特效 { "isUnique": true, "onAdded": [ { "$type": "AttachEffect", "effectPattern": "Eff_Avatar_Fishing_Line_02", "target": "SelfAttackTarget", "setSelfAsEffectPluginTarget": true, }, ], }, }, }, }, ]