2015-07-31 21:53:32 +02:00
|
|
|
-------------------
|
|
|
|
-- Warrior class --
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- See https://github.com/Ombridride/minetest-minetestforfun-server/issues/113
|
|
|
|
--
|
|
|
|
|
|
|
|
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")
|
|
|
|
sprint.set_maxstamina(pname, 20)
|
|
|
|
minetest.log("action", "[PClasses] Player " .. pname .. " become a warrior")
|
|
|
|
end,
|
|
|
|
on_unassigned = function(pname)
|
|
|
|
sprint.set_default_maxstamina(pname)
|
|
|
|
end,
|
2015-08-17 10:53:13 +02:00
|
|
|
switch_params = {
|
|
|
|
color = {r = 06, g = 06, b = 30},
|
|
|
|
tile = "default_steel_block.png"
|
|
|
|
}
|
2015-07-31 21:53:32 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
pclasses.api.reserve_item("warrior", "moreores:sword_mithril")
|
|
|
|
pclasses.api.reserve_item("warrior", "default:dungeon_master_s_blood_sword")
|