diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index bbfb8998..0ef9b5aa 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -288,10 +288,7 @@ function BattleUnitComp:getKeyFrameTime(skill, blockIndex, animationName) time = self:getAnimationKeyFrameTime(animationName, blockIndex) end end - -- Logger.logHighlight(animationName .. " blockIndex " .. blockIndex) - -- Logger.printTable(blockList) - -- Logger.printTable(self.validEffectIdx) return time end @@ -962,9 +959,9 @@ function BattleUnitComp:updateSkillAttack(dt) end return else + self:checkPassiveEvent(PASSIVE_EVENT.ON_ACTIVE_SKILL_BEFORE, self) self.currActiveSkill:startUse() self:doNextSkillAttack() - self:checkPassiveEvent(PASSIVE_EVENT.ON_ACTIVE_SKILL_BEFORE, self) end else -- 继续普攻 self:doNextNormalAttack() @@ -1593,8 +1590,8 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d if self.unitEntity:getIsDead() then self:changeState(UNIT_STATE.DEAD) if damageOrCureType == BattleConst.BUFF_NAME.BURN then - local target = self.battleController:getOtherSideMainUnit(self.side) - target:checkPassiveEvent(BattleConst.PASSIVE_EVENT.ON_DEAD_BY_BURN, target) + local team = self.battleController:getOtherSideTeam(self.side) + team:checkPassiveEvent(BattleConst.PASSIVE_EVENT.ON_DEAD_BY_BURN) end elseif damage < 0 then self:playHurt() diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 763dde64..746eebf8 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -365,6 +365,14 @@ function BattleController:getOtherSideMainUnit(side) end end +function BattleController:getOtherSideTeam(side) + if side == BattleConst.SIDE_ATK then + return self.defTeam + else + return self.atkTeam + end +end + function BattleController:onLoadComplete() self:battleStart() end