diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index 797c145a..962fc217 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -1493,10 +1493,11 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx) end end - if isFinalBlock and targetIsSelf then -- 死亡判定 - local otherSideTarget = self.battleController:getOtherSideMainUnit(self.side) - otherSideTarget:checkDeadStatus(target) - end + -- 有伤害才判断敌人是否死亡,防止给自己上buff导致对面先倒 + -- if isFinalBlock and targetIsSelf then -- 死亡判定 + -- local otherSideTarget = self.battleController:getOtherSideMainUnit(self.side) + -- otherSideTarget:checkDeadStatus(target) + -- end if succ then if skill:getIsHurtType() then @@ -1505,8 +1506,18 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx) if isFinalBlock then if skill:getIsNormalType() then -- 普攻攻击成功的话 self:checkPassiveEvent(PASSIVE_EVENT.USE_NORMAL_SKILL, target) + -- 有伤害才判断敌人是否死亡,防止给自己上buff导致对面先倒 + if isFinalBlock and targetIsSelf then -- 死亡判定 + local otherSideTarget = self.battleController:getOtherSideMainUnit(self.side) + otherSideTarget:checkDeadStatus(target) + end elseif skill:getIsActiveType() then self:checkPassiveEvent(PASSIVE_EVENT.ACTIVE_SKILL_HIT, target) + -- 有伤害才判断敌人是否死亡,防止给自己上buff导致对面先倒 + if isFinalBlock and targetIsSelf then -- 死亡判定 + local otherSideTarget = self.battleController:getOtherSideMainUnit(self.side) + otherSideTarget:checkDeadStatus(target) + end end end diff --git a/lua/app/ui/hero/hero_comp.lua b/lua/app/ui/hero/hero_comp.lua index 9894c1a1..54a03ff0 100644 --- a/lua/app/ui/hero/hero_comp.lua +++ b/lua/app/ui/hero/hero_comp.lua @@ -312,7 +312,7 @@ function HeroComp:onClickHero(cell, heroId) local targetPos = cell:getBaseObject():getTransform().position local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos) targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.content:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) - self.largeHeroCell:getBaseObject():setAnchoredPosition(targetPos.x, targetPos.y + 116) + self.largeHeroCell:getBaseObject():setAnchoredPosition(targetPos.x, targetPos.y + 115) self.largeHeroCell:getBaseObject():getTransform():SetAsLastSibling() self.largeHeroCell:refresh(entity, not entity:isActived(), self.onClickUseFunc, self.battleType) self.largeHeroCell:showCheck(self.curFormation[entity:getMatchType()] == heroId)