From 2f857869de83014456096451024a22555abe8033 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 30 Nov 2020 19:43:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dlenthoftable=E6=96=B9=E6=B3=95=E5=9C=A8=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E6=88=98=E6=96=97=E4=B8=AD=E6=97=A0=E6=B3=95=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E5=AF=BC=E8=87=B4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Base/Effect.lua | 3 +-- .../~Lua/Modules/Battle/Logic/Base/Passivity.lua | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua index 889fc7dc13..1eb8691348 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua @@ -1981,11 +1981,10 @@ local effectList = { -- 检测技能伤害治疗加成 -- 治疗血量最低队友实际伤害的f2% --之前是finaldag 改成 damage - for i = 1, LengthOfTable(arr) do + for i = 1, #arr do if i<=num then f2 = BattleUtil.CheckSkillDamageHeal(f2, caster, arr[i]) BattleUtil.ApplyTreat(caster, arr[i], floor(damage*f2)) - end end end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 5e2bff93f7..67d09818d1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -5616,7 +5616,7 @@ local passivityList = { elseif camp==1 then list= RoleManager.Query(function(v) return v.camp ~= role.camp and v.element==ele end) end - if not list or LengthOfTable(list)==0 then + if not list or #list == 0 then return end list = BattleUtil.SortByProp(list, BattlePropList[pro],0) @@ -5638,11 +5638,11 @@ local passivityList = { local onSkillEnd = function(skill) if skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra then local list= RoleManager.NoOrder(function(v) return v.camp == role.camp and v.element==ele end,true) - if not list or LengthOfTable(list)==0 then + if not list or #list ==0 then return end list =BattleUtil.SortByHpFactor(list,1) - for i = 1,LengthOfTable(list) do + for i = 1, #list do if i<=num then if not list[i]:IsDead() then local buff=Buff.Create(role, BuffName.Immune,round,1) @@ -5699,11 +5699,11 @@ local passivityList = { if skill and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra) then BattleUtil.RandomAction(p1, function () local list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele and not v:IsDead() end) - if not list or LengthOfTable(list)==0 then + if not list or #list ==0 then return end list =BattleUtil.SortByProp(list,BattlePropList[p2],0) - for i = 1,LengthOfTable(list) do + for i = 1, #list do if i<=num then local buff=Buff.Create(role, BuffName.PropertyChange,r1,BattlePropList[p3],v1,ct ) list[i]:AddBuff(buff) @@ -5763,7 +5763,7 @@ local passivityList = { elseif camp==1 then list= RoleManager.Query(function(v) return v.camp ~= role.camp and v.element==ele end) end - if not list or LengthOfTable(list)==0 then + if not list or #list ==0 then return end for key, value in pairs(list) do @@ -5790,7 +5790,7 @@ local passivityList = { elseif camp==1 then list= RoleManager.Query(function(v) return v.camp ~= role.camp and v.element==ele end) end - if not list or LengthOfTable(list)==0 then + if not list or #list ==0 then return end list=BattleUtil.SortByRage(list,0)