From 5ecb903a9936d78654ea2842d4cc7e3459168f8b Mon Sep 17 00:00:00 2001 From: lvxinran Date: Mon, 4 Nov 2019 10:33:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luafight/Modules/Battle/Logic/Base/Effect.lua | 10 +++++----- luafight/Modules/Battle/Logic/Base/Passivity.lua | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/luafight/Modules/Battle/Logic/Base/Effect.lua b/luafight/Modules/Battle/Logic/Base/Effect.lua index 683d7b9cb..252cfbec1 100644 --- a/luafight/Modules/Battle/Logic/Base/Effect.lua +++ b/luafight/Modules/Battle/Logic/Base/Effect.lua @@ -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 diff --git a/luafight/Modules/Battle/Logic/Base/Passivity.lua b/luafight/Modules/Battle/Logic/Base/Passivity.lua index a991b9988..5a079cbbf 100644 --- a/luafight/Modules/Battle/Logic/Base/Passivity.lua +++ b/luafight/Modules/Battle/Logic/Base/Passivity.lua @@ -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,