-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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

---------------------------------------------------------
--                       Ghouls                        --
---------------------------------------------------------
newBirthDescriptor{
	type = "race",
	name = "Undead",
	display_name = "不死族",
	locked = function() return profile.mod.allow_build.undead end,
	locked_desc = "    死亡的力量，恐惧的意志，这 些肉体无法保存。国王去世，大师 陨落，我们才是永生。",
	desc = {
		"    不死族是被堕落魔法复活的人 形生物。",
		"    不死族有多种形态，从食尸鬼、 吸血鬼到丧尸。",
	},
	descriptor_choices =
	{
		subrace =
		{
			__ALL__ = "disallow",
			Ghoul = "allow",
			Skeleton = "allow",
			Vampire = "allow",
			Wight = "allow",
		},
		class =
		{
			Wilder = "disallow",
		},
		subclass =
		{
			Necromancer = "nolore",
			-- Only human, elves, halflings and undeads are supposed to be archmages
			Archmage = "allow",
		},
	},
	talents = {
		[ActorTalents.T_UNDEAD_ID]=1,
	},
	copy = {
		-- Force undead faction to undead
		resolvers.genericlast(function(e) e.faction = "undead" end),
		starting_zone = "blighted-ruins",
		starting_level = 4, starting_level_force_down = true,
		starting_quest = "start-undead",
		undead = 1,
		inscription_restrictions = { ["inscriptions/runes"] = true, ["inscriptions/taints"] = true, },
		resolvers.inscription("RUNE:_SHIELDING", {cooldown=14, dur=5, power=100}),
		resolvers.inscription("RUNE:_PHASE_DOOR", {cooldown=7, range=10}),
	},
	random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 3}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"reknor", 1, 2}, },
}

newBirthDescriptor
{
	type = "subrace",
	name = "Ghoul",
	display_name = "食尸鬼",
	locked = function() return profile.mod.allow_build.undead_ghoul end,
	locked_desc = "    移动缓慢，撕咬迅速，从主人 处学习，是夜晚的掌控。",
	desc = {
		"    食尸鬼是不能说话、身体腐烂， 不知疲倦的不死生物，适合成为战 士。",
		"    他们天生有独特的#GOLD#食尸鬼#WHITE#天赋 和一系列不死系天赋：",
		"- 极高的毒素抗性",
		"- 流血免疫",
		"- 震慑抵抗",
		"- 恐惧免疫",
		"- 独特食尸鬼天赋：定向跳跃，侵 蚀和亡灵唾液",
		"食尸鬼腐烂的身体同时使它比别的 生物行动要慢一些。",
		"#GOLD#属性修正：",
		"#LIGHT_BLUE# * +3 力量，+1 敏捷，+5 体质",
		"#LIGHT_BLUE# * +0 魔法，-2 意志，-2 灵巧",
		"#GOLD#每等级增加生命值：#LIGHT_BLUE# 14",
		"#GOLD#经验惩罚：#LIGHT_BLUE# 40%",
		"#GOLD#速度惩罚：#LIGHT_BLUE# -20%",
	},
	descriptor_choices =
	{
		sex =
		{
			__ALL__ = "disallow",
			Male = "allow",
		},
	},
	inc_stats = { str=3, con=5, wil=-2, mag=0, dex=1, cun=-2 },
	talents_types = {
		["undead/ghoul"]={true, 0.1},
	},
	talents = {
		[ActorTalents.T_GHOUL]=1,
	},
	copy = {
		type = "undead", subtype="ghoul",
		default_wilderness = {"playerpop", "low-undead"},
		starting_intro = "ghoul",
		life_rating=14,
		poison_immune = 0.8,
		cut_immune = 1,
		stun_immune = 0.5,
		fear_immune = 1,
		global_speed_base = 0.8,
		moddable_tile = "ghoul",
		moddable_tile_nude = true,
	},
	experience = 1.4,
}

newBirthDescriptor
{
	type = "subrace",
	name = "Skeleton",
	display_name = "骷髅",
	locked = function() return profile.mod.allow_build.undead_skeleton end,
	locked_desc = "    行进中的骨头，每一步都发出 咯吱咯吱的响声，但我们不再是仆 人，我们去战斗！",
	desc = {
		"    骷髅是由有生命力的骨头组成 的强壮而敏捷的不死生物。",
		"    它们天生具有独特的#GOLD#骷髅#WHITE#天赋 和一系列不死系天赋：",
		"- 毒素免疫",
		"- 流血免疫",
		"- 恐惧免疫",
		"- 不需要呼吸",
		"- 独特骷髅天赋：骨质盔甲、弹力 骨骼、重组",
		"#GOLD#属性修正：",
		"#LIGHT_BLUE# * +3 力量，+4 敏捷，+0 体质",
		"#LIGHT_BLUE# * +0 魔法，+0 意志，+0 灵巧",
		"#GOLD#每等级增加生命值：#LIGHT_BLUE# 12",
		"#GOLD#经验惩罚：#LIGHT_BLUE# 40%",
	},
	descriptor_choices =
	{
		sex =
		{
			__ALL__ = "disallow",
			Male = "allow",
		},
	},
	inc_stats = { str=3, con=0, wil=0, mag=0, dex=4, cun=0 },
	talents_types = {
		["undead/skeleton"]={true, 0.1},
	},
	talents = {
		[ActorTalents.T_SKELETON]=1,
	},
	copy = {
		type = "undead", subtype="skeleton",
		default_wilderness = {"playerpop", "low-undead"},
		starting_intro = "skeleton",
		life_rating=12,
		poison_immune = 1,
		cut_immune = 1,
		fear_immune = 1,
		no_breath = 1,
		blood_color = colors.GREY,
		moddable_tile = "skeleton",
		moddable_tile_nude = true,
	},
	experience = 1.4,
}
