This commit is contained in:
puxuan 2025-11-10 11:51:46 +08:00
parent 59fe749817
commit 317802ca5f
2 changed files with 16 additions and 5 deletions

View File

@ -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

View File

@ -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)