1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-08 11:30:21 +01:00

Comment warrior armor regen life

This commit is contained in:
Ombridride 2015-07-27 20:48:08 +02:00
parent 9f256f201e
commit c81fb707dd

View File

@ -94,6 +94,8 @@ minetest.register_on_respawnplayer(function(player)
hbhunger.exhaustion[name] = 0 hbhunger.exhaustion[name] = 0
end) end)
<Mg> Avec Mithril armor : 7.5 seconds.
local main_timer = 0 local main_timer = 0
local timer = 0 local timer = 0
local timer2 = 0 local timer2 = 0
@ -108,12 +110,12 @@ minetest.register_globalstep(function(dtime)
local h = tonumber(hbhunger.hunger[name]) local h = tonumber(hbhunger.hunger[name])
local hp = player:get_hp() local hp = player:get_hp()
local timerquot = 1 local timerquot = 1 -- By default regen 0.5 hearth every 10sec
if pclasses.api.get_player_class(name) == "warrior" then if pclasses.api.get_player_class(name) == "warrior" then
timerquot = 2 timerquot = 2 -- Black_Mithril armor = 0.5 hearth every 5sec
elseif pclasses.api.util.does_wear_full_armor(name, "mithril", false) then elseif pclasses.api.util.does_wear_full_armor(name, "mithril", false) then
timerquot = 1.5 timerquot = 1.5 -- Mithril armor = 0.5 hearth every 7.5sec
end end