291 lines
12 KiB
Lua
291 lines
12 KiB
Lua
|
---
|
||
|
--- Generated by EmmyLua(https://github.com/EmmyLua)
|
||
|
--- Created by LT.
|
||
|
--- DateTime: 2023/9/10 22:44
|
||
|
---
|
||
|
|
||
|
BuffConfig = BuffConfig or {}
|
||
|
|
||
|
---@class EBuffType
|
||
|
---@field AddHealth int32
|
||
|
---@field ScaleDamage int32
|
||
|
---@field InfiniteBullets int32
|
||
|
---@field Invincible int32
|
||
|
---@field ScalePlayerMesh int32
|
||
|
---@field ScaleSpeed int32
|
||
|
---@field ScaleJumpVelocity int32
|
||
|
---@field FillUpWithBullets int32
|
||
|
---@field RespiratoryRegurgitation int32
|
||
|
---@field Regurgitation int32
|
||
|
---@field Strengthen int32
|
||
|
---@field DefenceChange int32
|
||
|
---@field SingleRespiratoryRegurgitation int32
|
||
|
---@field ShowEnemyPos int32
|
||
|
---@field IgnorePoison int32
|
||
|
|
||
|
local CountIBase = require('Script.Global.Table.CountTable')
|
||
|
local CountItem = CountIBase:new(0);
|
||
|
|
||
|
BuffConfig.EBuffType = {
|
||
|
AddHealth = CountItem:Add();
|
||
|
ScaleDamage = CountItem:Add();
|
||
|
InfiniteBullets = CountItem:Add();
|
||
|
Invincible = CountItem:Add();
|
||
|
ScalePlayerMesh = CountItem:Add();
|
||
|
ScaleSpeed = CountItem:Add();
|
||
|
ScaleJumpVelocity = CountItem:Add();
|
||
|
FillUpWithBullets = CountItem:Add();
|
||
|
RespiratoryRegurgitation = CountItem:Add();
|
||
|
Regurgitation = CountItem:Add();
|
||
|
Strengthen = CountItem:Add();
|
||
|
DefenceChange = CountItem:Add();
|
||
|
SingleRespiratoryRegurgitation = CountItem:Add();
|
||
|
ShowEnemyPos = CountItem:Add();
|
||
|
IgnorePoison = CountItem:Add();
|
||
|
BombExplosion = CountItem:Add();
|
||
|
};
|
||
|
|
||
|
---@param Key:int BuffActionID
|
||
|
---@param Value:{Name = string, Path = BuffActionPath}
|
||
|
---@type table<EBuffType, BuffActionInfoItem>
|
||
|
BuffConfig.BuffActionInfo = {
|
||
|
[BuffConfig.EBuffType.AddHealth] = {
|
||
|
Name = "BuffAction_AddHealth",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_AddHealth"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.FillUpWithBullets] = {
|
||
|
Name = "BuffAction_FillUpWithBullets",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_FillUpWithBullets"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.InfiniteBullets] = {
|
||
|
Name = "BuffAction_InfiniteBullets",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_InfiniteBullets"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.Invincible] = {
|
||
|
Name = "BuffAction_Invincible",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_Invincible"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ScaleDamage] = {
|
||
|
Name = "BuffAction_ScaleDamage",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_ScaleDamage"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ScaleJumpVelocity] = {
|
||
|
Name = "BuffAction_ScaleJumpVelocity",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_ScaleJumpVelocity"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ScalePlayerMesh] = {
|
||
|
Name = "BuffAction_ScalePlayerMesh",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_ScalePlayerMesh"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ScaleSpeed] = {
|
||
|
Name = "BuffAction_ScaleSpeed",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_ScaleSpeed"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.RespiratoryRegurgitation] = {
|
||
|
Name = "BuffAction_RespiratoryRegurgitation",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_RespiratoryRegurgitation"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.Regurgitation] = {
|
||
|
Name = "BuffAction_Regurgitation",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_Regurgitation"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.Strengthen] = {
|
||
|
Name = "BuffAction_Strengthen",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_Strengthen"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.DefenceChange] = {
|
||
|
Name = "BuffAction_Strengthen",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_DefenceChange"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.SingleRespiratoryRegurgitation] = {
|
||
|
Name = "BuffAction_SingleRespiratoryRegurgitation",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_SingleRespiratoryRegurgitation"
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ShowEnemyPos] = {
|
||
|
Name = "BuffAction_ShowEnemyPos",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_ShowEnemyPos",
|
||
|
EnableInit = true,
|
||
|
},
|
||
|
[BuffConfig.EBuffType.IgnorePoison] = {
|
||
|
Name = "BuffAction_IgnorePoison",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_IgnorePoison",
|
||
|
},
|
||
|
[BuffConfig.EBuffType.BombExplosion] = {
|
||
|
Name = "BuffAction_BombExplosion",
|
||
|
Path = "Script.Blueprint.BUFF.BuffAction.BuffAction_BombExplosion",
|
||
|
},
|
||
|
}
|
||
|
|
||
|
BuffConfig.ParticlePath = {
|
||
|
AddHealth = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_AddHealth.P_AddHealth'),
|
||
|
Trophy = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_Trophy.P_Trophy'),
|
||
|
AddDamage = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_AddDamage.P_AddDamage'),
|
||
|
BulletInf = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_BulletInf.P_BulletInf'),
|
||
|
Invincible = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_Invincible.P_Invincible'),
|
||
|
ReducePerson = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_ReducePerson.P_ReducePerson'),
|
||
|
AddSpeed = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_AddSpeed.P_AddSpeed'),
|
||
|
JumpUp = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_JumpUp.P_JumpUp'),
|
||
|
}
|
||
|
|
||
|
function BuffUseFromBuffInfo(PlayerKey, BuffType)
|
||
|
UGCLogSystem.Log("[BuffUseFromBuffInfo_Exe]")
|
||
|
|
||
|
local BuffManager = BP_BuffManager.GetBuffManager()
|
||
|
local BuffInfo = BuffConfig.BuffInfo[BuffType]
|
||
|
|
||
|
local PlayerOwnerBuff = BP_BuffManager.BuffFilter(PlayerKey, BuffType)
|
||
|
UGCLogSystem.LogTree("[BuffUseFromBuffInfo] PlayerOwnerBuff = ", PlayerOwnerBuff);
|
||
|
if #PlayerOwnerBuff > 0 and (not BuffInfo.bSuperposition) then
|
||
|
BuffManager:AddBuffDuration(PlayerOwnerBuff[1], BuffInfo.BuffTime)
|
||
|
UGCLogSystem.Log("[BuffUseFromBuffInfo_Exe] AddBuffDuration BuffType:%d", BuffType)
|
||
|
else
|
||
|
local AddBuffResult, BuffID = BuffManager:AddBuff(nil, PlayerKey, BuffType, table.unpack(BuffInfo.Params))
|
||
|
UGCLogSystem.Log("[BuffUseFromBuffInfo_Exe] AddBuff BuffType:%d, AddBuffResult:%s", BuffType, AddBuffResult)
|
||
|
if BuffInfo.BuffTime > 0 then
|
||
|
BuffManager:SetBuffDuration(BuffID, BuffInfo.BuffTime)
|
||
|
UGCLogSystem.Log("[BuffUseFromBuffInfo_Exe] SetBuffDuration BuffType:%d", BuffType)
|
||
|
end
|
||
|
end
|
||
|
BuffManager:SpawnParticleToPlayPawn(PlayerKey, BP_BuffManager.GetBuffDefaultParam(BuffType, "BuffParticlePath"))
|
||
|
end
|
||
|
|
||
|
BuffConfig.BuffInfo = {
|
||
|
[BuffConfig.EBuffType.AddHealth] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/UITexture/BUFFIcon/T_AddHealth.T_AddHealth'),
|
||
|
Color = { R = 0.4, G = 1., B = 0.1, A = 1. },
|
||
|
BuffTime = -1,
|
||
|
Desc = "回复",
|
||
|
Params = { 40., },
|
||
|
bSuperposition = false,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_AddHealth.P_AddHealth'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ScaleDamage] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/UITexture/BUFFIcon/T_UpDamage.T_UpDamage'),
|
||
|
Color = { R = 1., G = 0., B = 0., A = 1. },
|
||
|
BuffTime = 15.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "增加伤害",
|
||
|
Params = { 1.5, },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_AddDamage.P_AddDamage'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.InfiniteBullets] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/UITexture/BUFFIcon/T_BulletInf.T_BulletInf'),
|
||
|
Color = { R = 0.135, G = 0.17, B = 0.6, A = 1. },
|
||
|
BuffTime = -1,
|
||
|
Desc = "无限弹药",
|
||
|
Params = { false, },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_BulletInf.P_BulletInf'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.Invincible] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/BUFFIcon/T_Invincible.T_Invincible'),
|
||
|
Color = { R = 1., G = 0.4, B = 0., A = 1. },
|
||
|
BuffTime = 5.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "无敌",
|
||
|
Params = {},
|
||
|
bSuperposition = false,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_Invincible.P_Invincible'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ScalePlayerMesh] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/UITexture/BUFFIcon/T_ReducePerson.T_ReducePerson'),
|
||
|
Color = { R = 0.97, G = 0.88, B = 0.1, A = 1. },
|
||
|
BuffTime = 12.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "缩小",
|
||
|
Params = { 0.7, },
|
||
|
bSuperposition = true,
|
||
|
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ScaleSpeed] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/UITexture/BUFFIcon/T_Speed.T_Speed'),
|
||
|
Color = { R = 0.2, G = 0.85, B = 1., A = 1. },
|
||
|
BuffTime = 15.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "加速",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_AddSpeed.P_AddSpeed'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ScaleJumpVelocity] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/UITexture/BUFFIcon/T_JumpUp.T_JumpUp'),
|
||
|
Color = { R = 0.32, G = 0.075, B = 1., A = 1. },
|
||
|
BuffTime = 30.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "跳跃强化",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
},
|
||
|
[BuffConfig.EBuffType.Regurgitation] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/BUFFIcon/T_Regurgitation.T_Regurgitation'),
|
||
|
Color = { R = 0.4, G = 1., B = 0.1, A = 1. },
|
||
|
BuffTime = 30.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "集体回血",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_Regurgitation.P_Regurgitation'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.SingleRespiratoryRegurgitation] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/BUFFIcon/T_SingleRespiratoryRegurgitation.T_SingleRespiratoryRegurgitation'),
|
||
|
Color = { R = 0.4, G = 0.5, B = 0.1, A = 1. },
|
||
|
BuffTime = 30.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "脱离战斗后,呼吸回血",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_Regurgitation.P_Regurgitation'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.Strengthen] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/BUFFIcon/T_Strengthen.T_Strengthen'),
|
||
|
Color = { R = 0.2, G = 0.35, B = 1, A = 1. },
|
||
|
BuffTime = 30.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "强壮",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_AddDefence.P_AddDefence'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.ShowEnemyPos] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/BUFFIcon/T_ShowEnemyPos.T_ShowEnemyPos'),
|
||
|
Color = { R = 0.844132, G = 1, B = 0.3, A = 1. },
|
||
|
BuffTime = 30.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "鹰眼",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_Buff_Enable.P_Buff_Enable'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.DefenceChange] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/BUFFIcon/T_DefenceChange.T_DefenceChange'),
|
||
|
Color = { R = 0., G = 1, B = 0., A = 1. },
|
||
|
BuffTime = 30.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "举盾",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_AddDefence.P_AddDefence'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.IgnorePoison] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/BUFFIcon/T_IgnorePoison.T_IgnorePoison'),
|
||
|
Color = { R = 0., G = 1, B = 0., A = 1. },
|
||
|
BuffTime = 30.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "游刃有余",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
ParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/FX/P_AddDefence.P_AddDefence'),
|
||
|
},
|
||
|
[BuffConfig.EBuffType.BombExplosion] = {
|
||
|
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/BUFFIcon/T_JumpUp.T_JumpUp'),
|
||
|
Color = { R = 1., G = 0.618, B = 0., A = 1. },
|
||
|
BuffTime = 30.,
|
||
|
Cooldown = 10,
|
||
|
Desc = "爆炸弩箭",
|
||
|
Params = { 2., },
|
||
|
bSuperposition = true,
|
||
|
},
|
||
|
}
|
||
|
|
||
|
return BuffConfig
|