From 221f5cb13e45ac42480e10c0660f565abfb459a4 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Mon, 13 Dec 2021 17:36:46 +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=E8=A2=AB=E5=8A=A899=20=20372=20=20211=20=20188=E8=A2=AB?= =?UTF-8?q?=E5=8A=A8=E6=B7=BB=E5=8A=A0=E7=A9=BA=E5=88=A4=E6=96=AD?= 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, 12 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 3a25a9c519..cae27c0d13 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -1717,6 +1717,9 @@ local passivityList = { if skill.type == BattleSkillType.Special then role.Event:RemoveEvent(BattleEventName.RoleHit, OnHit) local arr = RoleManager.NoOrder(function (r) return r.camp == role.camp and r.deadFilter end) + if arr==nil or #arr==0 then + return + end BattleUtil.SortByHpFactor(arr, 1) -- 检测技能伤害���疗加成 local f = BattleUtil.CheckSkillDamageHeal(f1, role, arr[1]) @@ -3969,6 +3972,9 @@ local passivityList = { local list = RoleManager.Query(function(v) return v.camp == role.camp and v.position ~= role.position end) + if list==nil or #list==0 then + return + end local ff = 1 -- 分摊比 -- 检测被动对分摊比的影响 local cl = {} @@ -4572,6 +4578,9 @@ local passivityList = { if curRound == round then local list = RoleManager.Query(function(r) return r.camp == role.camp end) list = BattleUtil.SortByProp(list, RoleDataName.Hp, 1) + if list[1]==nil then + return + end local base = list[1]:GetRoleData(BattlePropList[pro]) local value = floor(BattleUtil.ErrorCorrection(base* f1)) BattleUtil.ApplyTreat(list[1], list[1], value) @@ -9143,6 +9152,9 @@ local passivityList = { return end list = BattleUtil.SortByProp(list, BattlePropList[pro],sort) + if list==nil or #list==0 then + return + end BattleUtil.CalRage(role,list[1],addNum,ct) end role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCast,nil,nil,role)