2025-01-04 23:00:19 +08:00

331 lines
9.9 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local CountTable = require('Script.Global.Table.CountTable')
local CountItem = CountTable:new();
EBuffType = {
AddHealth = CountItem:Add(), -- 增加血量
AddMaxHealth = CountItem:Add(), -- 增加血量
AddSpeed = CountItem:Add(), -- 添加速度
AddDamage = CountItem:Add(), -- 添加速度
AddJump = CountItem:Add(), -- 添加速度
AddArmor = CountItem:Add(), -- 添加速度
BreathingHeal = CountItem:Add(), -- 呼吸回血
Poison = CountItem:Add(), -- 毒伤
PoisonRange = CountItem:Add(), -- 毒伤
BombExplosion = CountItem:Add(), -- 爆炸
RangeAddHealth = CountItem:Add(), -- 范围回血
Electric = CountItem:Add(), -- 电击
Ice = CountItem:Add(), -- 冰冻
IceLoc = CountItem:Add(), -- 冰冻
Light = CountItem:Add(), -- 冰冻
Burning = CountItem:Add(), -- 燃烧
BurningLoc = CountItem:Add(), -- 燃烧
Invincible = CountItem:Add(), -- 无敌
};
--- Buff 状态
EBuffState = {
None = 1,
Using = 2,
Cooling = 3,
};
--- 该操作是按位操作
EBuffHitType = {
Location = 0x01,
Pawn = 0x02,
AllEnemy = 0x04,
Self = 0x08,
AllFriend = 0x10,
};
EBuffErrorType = {
Cooling = 1, -- 正在冷却
OverStack = 2, -- 超过最大叠加层数限制
}
---@type table<EBuffType, FBuffConfigItem> Buff 配置类
BuffConfig = {
[EBuffType.AddHealth] = {
Name = "AddHealth", -- 可以通过该值找到
Script = 'AddHealth',
bAuto = false, -- 是否可以自动执行
Continue = 0, -- 如果是 -1, 那么就是永久的,如果是 nil,就是添加的时候执行的;如果是 0 表示没有持续时间,如果 > 0, 表示当前是持续执行这么长时间的
Cooldown = 5, -- 冷却时间,如果 > 0 表示具体冷却时间;如果 == 0 / nil 表示没有冷却时间
MaxStack = 1; -- 最大叠加数量,超过该值将无法叠加
HitType = EBuffHitType.Self | EBuffHitType.AllFriend, -- 针对什么有效
bRemoveDead = true, -- 死亡是否移除
bAutoDestroy = false, -- 自动销毁是在冷却之后了
ClientInfo = {
Chinese = "回血",
Desc = '回复特定的生命值',
Icon = '/Game/Actor_Timeliness/CG025_GW_YearBeast/Arts_UI/Texture/NoAtlas/CG025_YearBeast_Map01.CG025_YearBeast_Map01',
Particle = "P_MedicSoldier_djf01",
},
Params = {
AddHealth = 20, -- 瞬间加血
};
},
[EBuffType.AddSpeed] = {
Name = "AddSpeed", -- 可以通过该值找到
Script = 'AddSpeed',
bAuto = false, -- 是否可以自动执行
Continue = 5, -- 如果是 -1, 那么就是永久的,如果是 nil,就是添加的时候执行的;如果是 0 表示没有持续时间,如果 > 0, 表示当前是持续执行这么长时间的
Cooldown = 10, -- 冷却时间,如果 > 0 表示具体冷却时间;如果 == 0 / nil 表示没有冷却时间
MaxStack = 1; -- 最大叠加数量,超过该值将无法叠加
HitType = EBuffHitType.Self, -- 针对什么有效
bRemoveDead = true, -- 死亡是否移除
bAutoDestroy = false, -- 自动销毁是在冷却之后了
ClientInfo = {
Chinese = "加速",
Desc = '在一段时间内速度大增',
Particle = "P_Speed",
},
Params = {
AddSpeed = 3, -- 瞬间加血
};
},
[EBuffType.AddArmor] = {
Name = "AddArmor", -- 可以通过该值找到
Script = 'AddArmor',
bAuto = false, -- 是否可以自动执行
Continue = 5, -- 如果是 -1, 那么就是永久的,如果是 nil,就是添加的时候执行的;如果是 0 表示没有持续时间,如果 > 0, 表示当前是持续执行这么长时间的
Cooldown = 10, -- 冷却时间,如果 > 0 表示具体冷却时间;如果 == 0 / nil 表示没有冷却时间
MaxStack = 1; -- 最大叠加数量,超过该值将无法叠加
HitType = EBuffHitType.Self, -- 针对什么有效
bRemoveDead = true, -- 死亡是否移除
bAutoDestroy = false, -- 自动销毁是在冷却之后了
ClientInfo = {
Chinese = "加速",
Desc = '在一段时间内速度大增',
},
Params = {
Armor = 0.3, --- 减伤比
};
},
[EBuffType.BreathingHeal] = {
Name = "BreathingHeal", -- 可以通过该值找到
Script = 'BreathingHeal',
InitScript = "BreathingHeal",
bAuto = true, -- 是否可以自动执行
Continue = -1, -- 如果是 -1, 那么就是永久的,如果是 nil,就是添加的时候执行的;如果是 0 表示没有持续时间,如果 > 0, 表示当前是持续执行这么长时间的
Cooldown = -1, -- 冷却时间,如果 > 0 表示具体冷却时间;如果 == 0 / nil 表示没有冷却时间
MaxStack = 1; -- 最大叠加数量,超过该值将无法叠加
HitType = EBuffHitType.Self, -- 针对什么有效
bRemoveDead = true, -- 死亡是否移除
bAutoDestroy = false, -- 自动销毁是在冷却之后了
ClientInfo = {
Chinese = "呼吸回血",
Desc = '脱离战斗一段时间后,会缓慢回血到上限',
},
Params = {
Interrupt = 4.5, -- 打断时间
BaseHeal = 8; -- 每秒回复
Interval = 0.2; -- 回复间隔
Limit = 0.8;
};
},
[EBuffType.BombExplosion] = { -- 传参Location:FVector
Name = 'BombExplosion',
Script = 'BombExplosion',
bAuto = true,
Cooldown = 1, -- 每一秒才执行一次
MaxStack = 10,
HitType = EBuffHitType.Location,
bAutoDestroy = true,
ClientInfo = {
Chinese = "爆炸箭矢",
Desc = "涉及到的位置会发生爆炸产生伤害",
Particle = "P_AH6_baozha_01",
},
Params = {
BaseDamage = 75,
InnerRadius = 10,
OuterRadius = 200,
Falloff = 4,
};
},
[EBuffType.Ice] = {
Name = 'Ice',
Script = 'Ice',
bAuto = true,
Continue = 3.5,
HitType = EBuffHitType.Pawn,
ClientInfo = {
Chinese = "冷冻效果",
Desc = '玩家速度会大减',
Particle = "P_TDM2_Absorb_01",
},
Params = {
Speed = 0.5, -- 速度
},
},
[EBuffType.IceLoc] = {
Name = 'IceLoc',
Script = 'IceLoc',
bAuto = true,
Continue = 3.5,
HitType = EBuffHitType.Pawn,
ClientInfo = {
Chinese = "冷冻效果",
Desc = '玩家速度会大减',
Particle = "P_TDM2_Absorb_01",
},
Params = {
Speed = 0.5, -- 速度
Radius = 200,
},
},
[EBuffType.AddMaxHealth] = {
Name = 'AddMaxHealth',
Script = 'AddMaxHealth',
bAuto = false,
HitType = EBuffHitType.Self,
MaxStack = 1,
Continue = 5,
Continue = 10,
ClientInfo = {
Chinese = "增加最大血量",
Desc = '最大血量同比增加一部分',
Particle = "P_MedicSoldier_djf01",
},
Params = {
Speed = 0.5, -- 速度
},
},
[EBuffType.Poison] = {
Name = 'Poison',
Script = 'Poison',
bAuto = true,
HitType = EBuffHitType.Pawn,
Continue = 2.5,
MaxStack = 1,
ClientInfo = {
Chinese = "毒伤",
Desc = '玩家每过一段时间会掉血',
Particle = "P_TDM2_lnfectedMan_05",
},
Params = {
Damage = 8; -- 每秒伤害
Interval = 0.3; -- 伤害间隔
};
},
[EBuffType.PoisonRange] = {
Name = 'PoisonRange',
Script = 'PoisonRange',
bAuto = true,
HitType = EBuffHitType.Location,
Continue = 2.5,
MaxStack = 1,
ClientInfo = {
Chinese = "毒伤",
Desc = '玩家每过一段时间会掉血',
Particle = "P_TDM2_lnfectedMan_05",
},
Params = {
Damage = 20; -- 每秒伤害
Interval = 0.3; -- 伤害间隔
Radius = 200,
};
},
[EBuffType.Burning] = {
Name = 'Burning',
Script = 'Burning',
bAuto = true,
HitType = EBuffHitType.Pawn,
Continue = 2.5,
--Continue = 10,
MaxStack = 1,
ClientInfo = {
Chinese = "燃烧",
Desc = '玩家每过一段时间会掉血',
Particle = "P_bonfire_01",
},
Params = {
Damage = 8; -- 每秒伤害
Interval = 0.5; -- 伤害间隔
};
},
[EBuffType.BurningLoc] = {
Name = 'BurningLoc',
Script = 'BurningLoc',
bAuto = true,
HitType = EBuffHitType.Location,
Continue = 2.5,
--Continue = 10,
MaxStack = 1,
ClientInfo = {
Chinese = "燃烧",
Desc = '玩家每过一段时间会掉血',
Particle = "P_bonfire_01",
},
Params = {
Damage = 20; -- 每秒伤害
Interval = 0.5; -- 伤害间隔
Radius = 200,
};
},
--[EBuffType.RangeAddHealth] = {
-- Script = 'RangeAddHealth',
-- Desc = '范围回血/伤害',
-- Icon = '',
-- Params = {};
--},
[EBuffType.Electric] = {
Name = 'Electric',
Script = 'Electric',
bAuto = true,
MaxStack = 1,
Continue = 4.5,
HitType = EBuffHitType.Pawn,
ClientInfo = {
Chinese = "电击",
Desc = '每过一段时间,玩家将被麻痹不动',
Particle = "P_bonfire_01",
},
Params = {
Interval = 1,
StunTime = 0.3,
};
},
[EBuffType.Light] = {
Name = 'Light',
Script = 'Light',
bAuto = true,
MaxStack = 1,
Continue = 2.5,
HitType = EBuffHitType.Location,
ClientInfo = {
Chinese = "闪光",
Desc = "面朝闪光的玩家将会白屏",
},
Params = {
LightTime = 3.2,
Radius = 6; -- 范围
Angle = 45; -- 会被照射到的一半角度
};
},
[EBuffType.Invincible] = {
Name = 'Invincible',
Script = 'Invincible',
bAuto = false;
Continue = 5,
Cooldown = 10,
MaxStack = 1,
HitType = EBuffHitType.Self,
ClientInfo = {
Chinese = "无敌",
Desc = "玩家在接下来的一段时间内不会遭受任何攻击",
},
Params = {};
},
};
function FindBuffByName(InName)
for i, v in pairs(BuffConfig) do
if (v.Name ~= nil and v.Name == InName) or (v.Script ~= nil and v.Script == InName) then return i; end
end
return nil;
end
return BuffConfig;