-- 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

newBirthDescriptor{
	type = "class",
	name = "Psionic",
	display_name= "超能力系",
	locked = function() return profile.mod.allow_build.psionic end,
	locked_desc = "    肉体的软弱可以被精神的强大 所征服。寻找一条能够进入你精神 世界的路。",
	desc = {
		"Psionics find their power within themselves. Their highly trained minds can harness energy from many different sources and manipulate it to produce physical effects.",
	},
	descriptor_choices =
	{
		subclass =
		{
			__ALL__ = "disallow",
			Mindslayer = "allow",
		},
	},
	copy = {
		psi_regen = 0.2,
	},
	body = { PSIONIC_FOCUS = 1, QS_PSIONIC_FOCUS = 1,},
}

newBirthDescriptor{
	type = "subclass",
	name = "Mindslayer",
	display_name= "心灵杀手",
	locked = function() return profile.mod.allow_build.psionic_mindslayer end,
	locked_desc = "    思想可以被鼓舞，思想也能杀 人，在几个世纪的压抑、数年的监 禁之后，我们心中的复仇的思想会 从我们最黑暗的梦境中爆发。",
	desc = {
		"    心灵杀手专门使用直接而残酷 的精神力量来对付周围的敌人。",
		"    心灵杀手在战斗时，他们总是 在战场中心，大量的敌人包围他们， 他们以心灵感应控制武器极快速地 挥砍敌人。",
		"他们最重要的属性是：意志和灵巧。",
		"#GOLD#属性修正：",
		"#LIGHT_BLUE# * +1 力量，+0 敏捷，+0 体质",
		"#LIGHT_BLUE# * +0 魔法，+4 意志，+3 灵巧",
	},
	stats = { str=1, wil=4, cun=3, },
	talents_types = {
		--Level 0 trees:
		["psionic/absorption"]={true, 0.3},
		["psionic/projection"]={true, 0.3},
		["psionic/psi-fighting"]={true, 0.3},
		["psionic/focus"]={true, 0.3},
		["psionic/mental-discipline"]={true, 0.3},
		["psionic/voracity"]={true, 0.3},
		--Level 10 trees:
		["psionic/finer-energy-manipulations"]={false, 0},
		["psionic/psi-archery"]={false, 0.3},
		--Level 20 trees:
		["psionic/grip"]={false, 0},
		["psionic/augmented-mobility"]={false, 0},
		--Miscellaneous trees:
		["cunning/survival"]={true, 0},
		["technique/combat-training"]={true, 0},
		
	},
	talents = {
		[ActorTalents.T_KINETIC_SHIELD] = 1,
		[ActorTalents.T_KINETIC_AURA] = 1,
		[ActorTalents.T_KINETIC_LEECH] = 1,
		[ActorTalents.T_BEYOND_THE_FLESH] = 1,
		[ActorTalents.T_TRAP_DETECTION] = 1,
		[ActorTalents.T_TELEKINETIC_GRASP] = 1,
		[ActorTalents.T_TELEKINETIC_SMASH] = 1,
		[ActorTalents.T_SHOOT] = 1,
	},
	copy = {
		max_life = 110,
		resolvers.equip{ id=true,
			{type="armor", subtype="cloth", name="亚麻长袍", autoreq=true, ego_chance=-1000},
			{type="weapon", subtype="greatsword", name="铁质巨剑", autoreq=true, ego_chance=-1000},
		},
		resolvers.inventory{ id=true,
			{type="gem",},
			{type="weapon", subtype="longbow", name="elm longbow", ego_chance=-1000},
		},
		resolvers.generic(function(self)
			-- Make and wield some alchemist gems
			local gs = game.zone:makeEntity(game.level, "object", {type="weapon", subtype="greatsword", name="iron greatsword", ego_chance=-1000}, nil, true)
			if gs then
				local pf = self:getInven("PSIONIC_FOCUS")
				if pf then
					self:addObject(pf, gs)
					gs:identify(true)
				end
			end
		end),
	},
	copy_add = {
		life_rating = -4,
	},
}
