From ecb47b16e8fc59a6d299e37fd8aaffd6dee55589 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 21 Jan 2021 16:06:24 +0900 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=E6=96=B0=E5=B0=86=E8=A7=82=E9=9F=B3=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Base/Effect.lua | 37 ++++- .../Modules/Battle/Logic/Base/Passivity.lua | 155 ++++++++++++++---- .../Modules/Battle/Logic/Misc/BattleUtil.lua | 2 +- 3 files changed, 157 insertions(+), 37 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua index cc6fa114f9..b4a6131014 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua @@ -2317,7 +2317,6 @@ local effectList = { if skill and skill:CheckTargetIsHit(target) then BattleUtil.RandomControl(pro1,ctrl, caster, target,r1) end - caster.Event:RemoveEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging) end) end, @@ -2354,7 +2353,41 @@ local effectList = { target:AddBuff(Buff.Create(caster, BuffName.PropertyChange, i1, BattlePropList[pro], f1, ct)) end) end, - + --造成[a]%的[b]伤害,目标数量大于等于[c],伤害[d]改变[e]%;目标数量小于[f],对其额外造成[g]属性[h]%的伤害(e,h填0 为魂印修改数值3) + --a[float],b[伤害类型],c[int],d[int],e[float] f[int] g[int] h[float] + [126] = function(caster, target, args, interval, skill) + local f1 = args[1] + local dt = args[2] + local num = args[3] + local ct = args[4] + local f2 = args[5] + local num2 =args[6] + local p1 = args[7] + local f3 = args[8] + -- 改变值 = 技能最大目标数 - 当前目标数 + local maxNum = skill:GetMaxTargetNum() + local curNum = #skill:GetDirectTargets() + if curNum>=num and f2>0 then + f1=BattleUtil.CountValue(f1,f2,ct) + end + BattleLogic.WaitForTrigger(interval, function () + BattleUtil.CalDamage(skill, caster, target, dt, f1) + --伤害命中才会给目标上buff + if skill and skill:CheckTargetIsHit(target) then + if curNum= i1 then + deadNum = 0 + local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[p1], v1,ct) + role:AddBuff(buff) + end + end + end + BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, OnDead) + end, + } return passivityList \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index b31571ea63..d21f4f35ff 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -623,7 +623,7 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy defRole:SetDead() defRole.Event:DispatchEvent(BattleEventName.RoleDead, atkRole) atkRole.Event:DispatchEvent(BattleEventName.RoleKill, defRole) - BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole) + BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole,skill) end atkRole.Event:DispatchEvent(BattleEventName.RoleDamage, defRole, damage, bCrit, finalDmg, damageType, dotType, skill)