战斗逻辑

back_recharge
lvxinran 2019-11-04 10:33:29 +08:00
parent 21059efe4a
commit 5ecb903a99
2 changed files with 17 additions and 9 deletions

View File

@ -1220,7 +1220,7 @@ local effectList = {
end) end)
end end
end, end,
--造成[a]%的[b]伤害,附带持续伤害,每秒造成目标最大生命值[c]%的真实伤害,持续[d]秒。目标最大生命值伤害总上限为施法者2.5倍攻击)【aoe】 --造成[a]%的[b]伤害,附带持续伤害,每秒造成自身最大生命值[c]%的真实伤害,持续[d]秒。【aoe】
--a[float],b[伤害类型],c[float],d[int] --a[float],b[伤害类型],c[float],d[int]
[68] = function(caster, target, args, interval) [68] = function(caster, target, args, interval)
local f1 = args[1] local f1 = args[1]
@ -1229,7 +1229,7 @@ local effectList = {
local f3 = args[4] local f3 = args[4]
BattleLogic.WaitForTrigger(interval, function () BattleLogic.WaitForTrigger(interval, function ()
BattleUtil.CalDamage(caster, target, dt, f1) 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 dot.isRealDamage = true
target:AddBuff(dot) target:AddBuff(dot)
end) end)
@ -1503,7 +1503,7 @@ local effectList = {
local OnPassiveDamaging = function(damagingFunc, atkRole, damage) local OnPassiveDamaging = function(damagingFunc, atkRole, damage)
if not target.isDead then if not target.isDead then
damagingFunc(floor(damage * f1)) damagingFunc(floor(damage * f1))
BattleUtil.ApplyDamage(atkRole, target, floor(damage * f1)) BattleUtil.ApplyDamage(atkRole, target, BattleUtil.CalShield(atkRole, target, floor(damage * f1)))
end end
end end
local list = BattleLogic.GetNeighbor(target, 1) local list = BattleLogic.GetNeighbor(target, 1)
@ -1740,8 +1740,8 @@ local effectList = {
if crit then if crit then
BattleUtil.RandomAction(f3, function () BattleUtil.RandomAction(f3, function ()
local arr = BattleUtil.ChooseTarget(caster, 10001) local arr = BattleUtil.ChooseTarget(caster, 10001)
for i=1, #arr do if arr[1] then
arr[i]:AddBuff(Buff.Create(caster, BuffName.PropertyChange, f2, propertyList[pro1], f1, ct)) arr[1]:AddBuff(Buff.Create(caster, BuffName.PropertyChange, f2, propertyList[pro1], f1, ct))
end end
end) end)
end end

View File

@ -804,12 +804,20 @@ local passivityList = {
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd)
end, end,
--免疫[a]控制状态。 --免疫[a]次[b]控制状态。
--a[控制类型] --a[int],b[控制类型]
[45] = function(role, args) [45] = function(role, args)
local ct = args[1] local i1 = args[1]
local ct = args[2]
local triggerCount = 0
role.buffFilter:Add(function(buff) 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)
end, end,