diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 6b8d4fd8eb279644980f36cade3baba6797228cb..c0cc87c0da8cbafcee1af93d0ec76f2973b9c7bd 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -699,7 +699,7 @@ function _M:setAllowedBuild(what, notify) config.settings.tome.allow_build[what] = true local t = {} for k, e in pairs(config.settings.tome.allow_build) do - t[#t+1] = ("tome.allow_build.%s = %s\n"):format(k, tostring(e)) + t[#t+1] = ("tome.allow_build.%s = %s"):format(k, tostring(e)) end game:saveSettings("tome.allow_build", table.concat(t, "\n")) diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 659d6b69fee53834402ab9206901b6d0a1580010..0e178a93b29d9e73650ed68e0b71ee75f1832e98 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -173,6 +173,14 @@ function _M:die(src) else mod.class.Actor.die(self, src) end + + if src and src.type == "undead" and src.subtype == "skeleton" and rng.percent(src.rank + math.ceil(math.max(src.level / 2, 1))) then + game:setAllowedBuild("undead") + game:setAllowedBuild("undead_skeleton", true) + elseif src and src.type == "undead" and src.subtype == "ghoul" and rng.percent(src.rank + math.ceil(math.max(src.level / 2, 1))) then + game:setAllowedBuild("undead") + game:setAllowedBuild("undead_ghoul", true) + end end function _M:setName(name) diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index a1ff45ff36843c8262f3f0d1bde3ab5842a091f2..f35d4d6e2176bbb4b21bd1fbb7695eebde5cc0b4 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -77,7 +77,7 @@ newBirthDescriptor default_wilderness = {"wilderness/main", 39, 17}, starting_zone = "tower-amon-sul", starting_quest = "start-dunadan", - starting_intro = "dwarf", + starting_intro = "ghoul", life_rating=14, poison_immune = 0.8, cut_immune = 1, @@ -99,7 +99,7 @@ newBirthDescriptor "- bleeding immunity", "- fear immunity", "- no need to breath", - "- special skeleton talents: ", + "- special skeleton talents: sharp bones, bone amour, re-assemble", "The rotting body of ghouls also forces them to act a bit slower than most creatures.", }, descriptor_choices = @@ -122,7 +122,7 @@ newBirthDescriptor default_wilderness = {"wilderness/main", 39, 17}, starting_zone = "tower-amon-sul", starting_quest = "start-dunadan", - starting_intro = "dwarf", + starting_intro = "skeleton", life_rating=12, poison_immune = 1, cut_immune = 1, diff --git a/game/modules/tome/data/general/npcs/skeleton.lua b/game/modules/tome/data/general/npcs/skeleton.lua index 5738071a22d403549d0e68bf4a594ebe620fc92f..09a9e38cb75337dc4308642559be18c674bf4ad9 100644 --- a/game/modules/tome/data/general/npcs/skeleton.lua +++ b/game/modules/tome/data/general/npcs/skeleton.lua @@ -21,7 +21,7 @@ local Talents = require("engine.interface.ActorTalents") newEntity{ define_as = "BASE_NPC_SKELETON", - type = "undead", subtype = "skeletons", + type = "undead", subtype = "skeleton", display = "s", color=colors.WHITE, combat = { dam=1, atk=1, apr=1 }, diff --git a/game/modules/tome/data/texts/intro-ghoul.lua b/game/modules/tome/data/texts/intro-ghoul.lua new file mode 100644 index 0000000000000000000000000000000000000000..bb8366907495f3a552a42ebd8cb3afeb5ce20524 --- /dev/null +++ b/game/modules/tome/data/texts/intro-ghoul.lua @@ -0,0 +1,31 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return [[Welcome #LIGHT_GREEN#]]..name..[[#WHITE#. +You have died ages ago, but that did not stop you, you were raised as an undead ghoul. + +After wandering aimlessly for eons you found a goal: to become a force to be reckonned with in this world. +You have decided to venture into the old and wild places of the world, looking for ancient treasures and enough power to carve your way in blood through the world! + +You have come to a land called Rhudaur, on the western steppes of the Misty Mountains, far away from your home, in search of the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undead. +To the east lies another dangerous place: the Trollshaws. It is an old forest infested with trolls and all kinds of wild animals. + +After days of travels you have found the ruined tower and entered the caves, what will you find there... +]] + diff --git a/game/modules/tome/data/texts/intro-skeleton.lua b/game/modules/tome/data/texts/intro-skeleton.lua new file mode 100644 index 0000000000000000000000000000000000000000..524b63108ce125da349da92e51ed812f3c9b7585 --- /dev/null +++ b/game/modules/tome/data/texts/intro-skeleton.lua @@ -0,0 +1,31 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return [[Welcome #LIGHT_GREEN#]]..name..[[#WHITE#. +You have died ages ago, but that did not stop you, you were raised as an undead skeleton. + +After wandering aimlessly for eons you found a goal: to become a force to be reckonned with in this world. +You have decided to venture into the old and wild places of the world, looking for ancient treasures and enough power to carve your way in blood through the world! + +You have come to a land called Rhudaur, on the western steppes of the Misty Mountains, far away from your home, in search of the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undead. +To the east lies another dangerous place: the Trollshaws. It is an old forest infested with trolls and all kinds of wild animals. + +After days of travels you have found the ruined tower and entered the caves, what will you find there... +]] + diff --git a/game/modules/tome/data/texts/unlock-undead_ghoul.lua b/game/modules/tome/data/texts/unlock-undead_ghoul.lua new file mode 100644 index 0000000000000000000000000000000000000000..e6ab5c24e5dfca8db91ca85a07ee34b4de8d5e7c --- /dev/null +++ b/game/modules/tome/data/texts/unlock-undead_ghoul.lua @@ -0,0 +1,32 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return "New Race: #LIGHT_GREEN#Ghoul (Undead)", +[[ +Ghouls are evil undeads creatures. Usually raised by necromancers to serve as mindless servants, some however manage to keep their sentience +and roam the world in a blazing path of destruction. +While you have died at the hands of such a creature you can now create a new character with the #LIGHT_GREEN#Ghoul race#WHITE#. + +Race features:#YELLOW# +- great poison resistance +- bleeding immunity +- stun resistance +- fear immunity +- special ghoul talents: ghoulish leap, gnaw and retch#WHITE# +]] diff --git a/game/modules/tome/data/texts/unlock-undead_skeleton.lua b/game/modules/tome/data/texts/unlock-undead_skeleton.lua new file mode 100644 index 0000000000000000000000000000000000000000..70543b4f0c3993fc199a6af1efc95200d4911776 --- /dev/null +++ b/game/modules/tome/data/texts/unlock-undead_skeleton.lua @@ -0,0 +1,32 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return "New Race: #LIGHT_GREEN#Skeleton (Undead)", +[[ +Skeletons are evil undeads creatures. Usually raised by necromancers to serve as mindless servants, some however manage to keep their sentience +and roam the world in a blazing path of destruction. +While you have died at the hands of such a creature you can now create a new character with the #LIGHT_GREEN#Skeleton race#WHITE#. + +Race features:#YELLOW# +- poison immunity +- bleeding immunity +- fear immunity +- no need to breath +- special skeleton talents: sharp bones, bone amour, re-assemble#WHITE# +]]