2015-07-27 19:13:30 +02:00
|
|
|
-------------------
|
|
|
|
-- Warrior class --
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- See https://github.com/Ombridride/minetest-minetestforfun-server/issues/113
|
|
|
|
--
|
|
|
|
|
|
|
|
pclasses.api.register_class("warrior", {
|
|
|
|
determination = function(player)
|
2015-07-28 19:01:38 +02:00
|
|
|
return pclasses.api.util.does_wear_full_armor(player:get_player_name(), "blackmithril", false)
|
2015-07-27 19:13:30 +02:00
|
|
|
end,
|
|
|
|
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-07-28 16:14:51 +02:00
|
|
|
|
|
|
|
pclasses.api.reserve_item("warrior", "moreores:sword_mithril")
|
|
|
|
pclasses.api.reserve_item("warrior", "default:dungeon_master_s_blood_sword")
|