From 1a3086a2e383f37e54defa10b7e0272bcd1ba1cb Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Tue, 30 Mar 2021 20:33:39 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=E8=A2=AB=E5=8A=A8168=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=20=20bugId:=20=201014123?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Base/Passivity.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 427de714b2..e09bc5c8de 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -3458,12 +3458,22 @@ local passivityList = { BattleUtil.SortByHpFactor(list, 1) local index = 0 for i = 1, #list do - if not list[i]:IsRealDead() and index < 2 then + if not list[i]:IsRealDead() and index < 2 and not BattleLogic.BuffMgr:HasBuff(list[i], BuffName.Shield, function (buff) return buff.shieldType == ShieldTypeName.AllReduce and buff.shieldValue~=0 end) then index = index + 1 -- 吸血率%25 策划说写死 list[i]:AddBuff(Buff.Create(role, BuffName.Shield, i1, ShieldTypeName.AllReduce, 0.25, 0)) end end + --如果场上能加无敌盾的不足两个,就给上过无敌盾的在上一个无敌盾 by: wangzhenxing 2021/3/30 + if index<2 then + for i = 1,2-index do + if not list[i]:IsRealDead() then + -- 吸血率%25 策划说写死 + list[i]:AddBuff(Buff.Create(role, BuffName.Shield, i1, ShieldTypeName.AllReduce, 0.25, 0)) + end + end + end + end end role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd)