血量被动的bug

This commit is contained in:
chenxi 2023-04-25 22:13:23 +08:00
parent 9489cf9a6f
commit 21c9a1c13c
2 changed files with 7 additions and 1 deletions

View File

@ -1211,7 +1211,7 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus)
end
end
if hp > 0 then
self:checkPassiveEvent(PASSIVE_EVENT.HP_LOWER_THAN, atker, hpPercent)
self.team:checkPassiveEvent(PASSIVE_EVENT.HP_LOWER_THAN, atker, hpPercent)
end
end

View File

@ -23,6 +23,12 @@ function BattleTeam:addUnit(unit, isMainUnit)
end
end
function BattleTeam:checkPassiveEvent(...)
for k, v in ipairs(self.unitList) do
v:checkPassiveEvent(...)
end
end
function BattleTeam:prepare()
for k, v in ipairs(self.unitList) do
v:prepare()