fix: floor hp and pp

This commit is contained in:
Kazhnuz 2020-08-07 07:32:16 +02:00
parent fbcf352a51
commit 053c9ca641

View file

@ -47,7 +47,7 @@ function AbstractMobParent:setHP(newHP, relative)
else
self.hp = newHP
end
self.hp = math.max(0, self.hp)
self.hp = math.floor(math.max(0, self.hp))
end
function AbstractMobParent:setPP(newPP, relative)
@ -56,6 +56,7 @@ function AbstractMobParent:setPP(newPP, relative)
else
self.pp = newPP
end
self.pp = math.floor(math.max(0, self.pp))
end
function AbstractMobParent:isAlive()