bug修复

This commit is contained in:
xiekaidong 2023-08-21 10:33:14 +08:00
parent cd4b4d4105
commit 0549a8b37b
3 changed files with 21 additions and 1 deletions

View File

@ -1761,7 +1761,8 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d
end end
function BattleUnitComp:checkDeadStatus(atker, damageOrCureType) function BattleUnitComp:checkDeadStatus(atker, damageOrCureType)
if self.unitEntity:getIsDead() then if self.unitEntity:getIsDead() and not self.unitEntity:getTagDeadStatus() then
self.unitEntity:tagDeadStatus()
if self.unitEntity:getCanRebirth() then -- 复活 if self.unitEntity:getCanRebirth() then -- 复活
self.battleController:resetTimeSpeed(true) self.battleController:resetTimeSpeed(true)
local mainUnit = self.team:getMainUnit() local mainUnit = self.team:getMainUnit()

View File

@ -35,7 +35,9 @@ function BattleTeamEntity:init(side, data)
else else
self.attr = {} self.attr = {}
end end
self.deadStatusTag = false
self.isDead = false self.isDead = false
self.isRebirth = false
self.stunCount = 0 self.stunCount = 0
self.lethargyCount = 0 self.lethargyCount = 0
self.frozenCount = 0 self.frozenCount = 0
@ -466,9 +468,18 @@ function BattleTeamEntity:getIsRebirth()
return self.isRebirth return self.isRebirth
end end
function BattleUnitEntity:tagDeadStatus()
self.deadStatusTag = true
end
function BattleUnitEntity:getTagDeadStatus()
return self.deadStatusTag
end
function BattleTeamEntity:rebirth() function BattleTeamEntity:rebirth()
self.isRebirth = false self.isRebirth = false
self.isDead = false self.isDead = false
self.deadStatusTag = false
end end
function BattleTeamEntity:getIsDead() function BattleTeamEntity:getIsDead()
if self:getIsRebirth() then if self:getIsRebirth() then

View File

@ -568,6 +568,14 @@ function BattleUnitEntity:rebirth()
self.team:rebirth() self.team:rebirth()
end end
function BattleUnitEntity:tagDeadStatus()
self.team:tagDeadStatus()
end
function BattleUnitEntity:getTagDeadStatus()
return self.team:getTagDeadStatus()
end
function BattleUnitEntity:onRoundEnd() function BattleUnitEntity:onRoundEnd()
for k, v in ipairs(self.activeSkills) do for k, v in ipairs(self.activeSkills) do
if not self:getActiveSkillLimit() then if not self:getActiveSkillLimit() then