增加最大血量
This commit is contained in:
parent
53475739c0
commit
01a5bf9e16
@ -1016,6 +1016,13 @@ function BattleUnitComp:updateNormalAttack(dt)
|
||||
end
|
||||
end
|
||||
|
||||
function BattleUnitComp:addMaxHp(percent)
|
||||
self.unitEntity:addMaxHp(percent)
|
||||
local hpPercent = self.unitEntity:getHpPercent()
|
||||
local hp = self.unitEntity:getHp()
|
||||
self.battleController:refreshHp(self.side, hp, hpPercent)
|
||||
end
|
||||
|
||||
function BattleUnitComp:addBuff(buffEffect)
|
||||
self.team:addBuff(buffEffect)
|
||||
end
|
||||
|
||||
@ -71,7 +71,7 @@ BattleBuffHandle.addAttribute = {
|
||||
target.unitEntity:addAttr(ATTR_NAME.NORMAL_ATTACK_COUNT, num, false)
|
||||
end,
|
||||
[BUFF_NAME.HPP_ADD] = function(target, num)
|
||||
target.unitEntity:addMaxHp(num)
|
||||
target:addMaxHp(num)
|
||||
end,
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user