战斗逻辑
parent
21059efe4a
commit
5ecb903a99
|
@ -1220,7 +1220,7 @@ local effectList = {
|
|||
end)
|
||||
end
|
||||
end,
|
||||
--造成[a]%的[b]伤害,附带持续伤害,每秒造成目标最大生命值[c]%的真实伤害,持续[d]秒。(目标最大生命值伤害总上限为施法者2.5倍攻击)【aoe】
|
||||
--造成[a]%的[b]伤害,附带持续伤害,每秒造成自身最大生命值[c]%的真实伤害,持续[d]秒。【aoe】
|
||||
--a[float],b[伤害类型],c[float],d[int]
|
||||
[68] = function(caster, target, args, interval)
|
||||
local f1 = args[1]
|
||||
|
@ -1229,7 +1229,7 @@ local effectList = {
|
|||
local f3 = args[4]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
local dot = Buff.Create(caster, BuffName.DOT, f3, 1, 0, min(floor(target:GetRoleData(RoleDataName.MaxHp)*f2), floor(caster:GetRoleData(RoleDataName.Attack)*2.5)), 1)
|
||||
local dot = Buff.Create(caster, BuffName.DOT, f3, 1, 0, floor(caster:GetRoleData(RoleDataName.MaxHp)*f2), 1)
|
||||
dot.isRealDamage = true
|
||||
target:AddBuff(dot)
|
||||
end)
|
||||
|
@ -1503,7 +1503,7 @@ local effectList = {
|
|||
local OnPassiveDamaging = function(damagingFunc, atkRole, damage)
|
||||
if not target.isDead then
|
||||
damagingFunc(floor(damage * f1))
|
||||
BattleUtil.ApplyDamage(atkRole, target, floor(damage * f1))
|
||||
BattleUtil.ApplyDamage(atkRole, target, BattleUtil.CalShield(atkRole, target, floor(damage * f1)))
|
||||
end
|
||||
end
|
||||
local list = BattleLogic.GetNeighbor(target, 1)
|
||||
|
@ -1740,8 +1740,8 @@ local effectList = {
|
|||
if crit then
|
||||
BattleUtil.RandomAction(f3, function ()
|
||||
local arr = BattleUtil.ChooseTarget(caster, 10001)
|
||||
for i=1, #arr do
|
||||
arr[i]:AddBuff(Buff.Create(caster, BuffName.PropertyChange, f2, propertyList[pro1], f1, ct))
|
||||
if arr[1] then
|
||||
arr[1]:AddBuff(Buff.Create(caster, BuffName.PropertyChange, f2, propertyList[pro1], f1, ct))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -804,12 +804,20 @@ local passivityList = {
|
|||
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd)
|
||||
end,
|
||||
|
||||
--免疫[a]控制状态。
|
||||
--a[控制类型]
|
||||
--免疫[a]次[b]控制状态。
|
||||
--a[int],b[控制类型]
|
||||
[45] = function(role, args)
|
||||
local ct = args[1]
|
||||
local i1 = args[1]
|
||||
local ct = args[2]
|
||||
local triggerCount = 0
|
||||
role.buffFilter:Add(function(buff)
|
||||
return buff.type == BuffName.Control and (ct == 0 or buff.ctrlType == ct)
|
||||
local isTarget = buff.type == BuffName.Control and (ct == 0 or buff.ctrlType == ct)
|
||||
if isTarget then
|
||||
triggerCount = triggerCount + 1
|
||||
return i1 == 0 or (i1 > 0 and triggerCount <= i1)
|
||||
else
|
||||
return isTarget
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
||||
|
|
Loading…
Reference in New Issue