Add classes
This commit is contained in:
parent
bc9967907e
commit
34d891c6c5
18 changed files with 257 additions and 6 deletions
|
@ -12,8 +12,8 @@ local function regen_all()
|
|||
local oldhp = player:get_hp()
|
||||
if oldhp > 0 then
|
||||
local newhp = oldhp + regen_amount
|
||||
if newhp > 20 then
|
||||
newhp = 20
|
||||
if newhp > player:get_properties().hp_max then
|
||||
newhp = player:get_properties().hp_max
|
||||
end
|
||||
player:set_hp(newhp)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue