血量bug
This commit is contained in:
parent
d88e267558
commit
a560ccf8a1
@ -170,7 +170,13 @@ function BattleTeamEntity:getNormalAttackAddCount()
|
||||
end
|
||||
|
||||
function BattleTeamEntity:addMaxHp(num)
|
||||
local hpBefore = self.attr.hp
|
||||
local currPercent = hpBefore * DEFAULT_FACTOR // self.attr.max_hp
|
||||
self.attr.max_hp = self.attr.max_hp + self.baseAttr.max_hp * num // DEFAULT_FACTOR
|
||||
self.attr.hp = currPercent*self.attr.max_hp//DEFAULT_FACTOR
|
||||
if self.attr.hp <= 0 and hpBefore > 0 then
|
||||
self.attr.hp = 1
|
||||
end
|
||||
end
|
||||
|
||||
function BattleTeamEntity:addLimit(name)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user