From df1409717d266f785ffea77768f7fec48b6de136 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 17 Sep 2021 15:20:44 +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=E6=8A=80=E8=83=BD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=8F=AF=E4=BB=A5=E9=87=8A=E6=94=BE=E5=A4=84=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=AE=E6=A0=87=E6=95=B0=E9=87=8F=E5=88=A4?= =?UTF-8?q?=E6=96=AD=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E5=88=99=E4=B8=8D=E8=83=BD=E9=87=8A=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Role/RoleLogic.lua | 9 +++++++++ .../~Lua/Modules/Battle/Logic/Role/Skill.lua | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua index dc0828b95f..86e37bd94f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua @@ -327,6 +327,15 @@ end -- 判断角色是否可以释放技能 function RoleLogic:IsAvailable(skill) + if skill and skill.effectCaster then + --放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/09/17 + --为解决攻击目标只剩被放逐的单位导致我方不放技能扣除怒气 + skill.effectCaster:ChooseTarget() + local targets=BattleUtil.LengthOfTable(skill.effectCaster:GetDirectTargetsNoExile()) + if targets==0 then + return false + end + end --角色没有真正死亡 在 被眩晕/沉默的 情况下 任然能释放死亡技能 if (self.ctrl_dizzy or self.ctrl_slient) and self:IsDead() and skill and skill.type==BattleSkillType.DeadSkill then return true diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua index 25ab3b6ca8..dde4102dea 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua @@ -52,15 +52,6 @@ function Skill:GetOwner() end -- 是否可以释放 function Skill:canCastSkill() - if self.effectCaster then - --放技能前判断是否有目标,没有就不会放技能,直接执行技能回调 by 王振兴 2021/03/26 - --为解决攻击目标只剩被放逐的单位导致技能播放异常 - self.effectCaster:ChooseTarget() - local targets=BattleUtil.LengthOfTable(self:GetDirectTargetsNoExile()) - if targets==0 then - return false - end - end return true end