diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua index dde4102dea..25ab3b6ca8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua @@ -52,6 +52,15 @@ 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