增加最大血量

This commit is contained in:
chenxi 2023-04-14 21:25:01 +08:00
parent c6ae8e7c99
commit 3269a4c6a3

View File

@ -154,9 +154,7 @@ function BattleTeamEntity:getNormalAttackCount()
end
function BattleTeamEntity:addMaxHp(num)
local percent = self.attr.hp / self.attr.max_hp
self.attr.max_hp = self.attr.max_hp + self.baseAttr.max_hp * num // DEFAULT_FACTOR
self.attr.hp = self.attr.max_hp * percent // DEFAULT_FACTOR
end
function BattleTeamEntity:addLimit(name)