mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-18 00:08:25 +01:00
Added stamina increase for hunters and fixed warriors' one
This commit is contained in:
parent
4aca5e0f23
commit
5316fe983b
@ -161,12 +161,7 @@ pclasses.api.register_class("warrior", {
|
||||
on_assigned = function(pname)
|
||||
minetest.sound_play("pclasses_full_warrior")
|
||||
minetest.chat_send_player(pname, "You are now a warrior")
|
||||
local reinforced = pclasses.api.util.does_wear_full_armor(pname, "reinforcedleather", true)
|
||||
if reinforced then
|
||||
sprint.increase_maxstamina(pname, 20)
|
||||
else
|
||||
sprint.increase_maxstamina(pname, 10)
|
||||
end
|
||||
sprint.set_max_stamina(pname, 20)
|
||||
end,
|
||||
on_unassigned = function(pname)
|
||||
sprint.set_default_maxstamina(pname)
|
||||
@ -191,7 +186,16 @@ pclasses.api.register_class("hunter", {
|
||||
on_assigned = function(pname)
|
||||
minetest.chat_send_player(pname, "You are now a hunter")
|
||||
minetest.sound_play("pclasses_full_hunter")
|
||||
local reinforced = pclasses.api.util.does_wear_full_armor(pname, "reinforcedleather", true)
|
||||
if reinforced then
|
||||
sprint.increase_maxstamina(pname, 20)
|
||||
else
|
||||
sprint.increase_maxstamina(pname, 10)
|
||||
end
|
||||
end,
|
||||
on_unassigned = function(pname)
|
||||
sprint.set_default_maxstamina(pname)
|
||||
end,
|
||||
})
|
||||
|
||||
function pclasses.api.assign_class(player)
|
||||
|
Loading…
Reference in New Issue
Block a user