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

-- Undead talents
newTalentType{ type="undead/base", name = "base", generic = true, description = "亡灵天生的本领。" }
newTalentType{ type="undead/ghoul", name = "食尸鬼", generic = true, description = "食尸鬼的先天本领。" }
newTalentType{ type="undead/skeleton", name = "骷髅", generic = true, description = "骷髅的先天本领。" }
newTalentType{ type="undead/vampire", name = "吸血鬼", generic = true, description = "吸血鬼的先天本领。" }
newTalentType{ type="undead/lich", name = "巫妖", generic = true, description = "巫妖的先天本领。" }

-- Generic requires for undeads based on talent level
undeads_req1 = {
	level = function(level) return 0 + (level-1)  end,
}
undeads_req2 = {
	level = function(level) return 4 + (level-1)  end,
}
undeads_req3 = {
	level = function(level) return 8 + (level-1)  end,
}
undeads_req4 = {
	level = function(level) return 12 + (level-1)  end,
}
undeads_req5 = {
	level = function(level) return 16 + (level-1)  end,
}

load("/data/talents/undeads/ghoul.lua")
load("/data/talents/undeads/skeleton.lua")


-- Undeads's power: ID
newTalent{
	short_name = "UNDEAD_ID",
	name = "Knowledge of the Past",
	display_name = "逝去的知识",
	type = {"undead/base", 1},
	no_npc_use = true,
	no_unlearn_last = true,
	on_learn = function(self, t) self.auto_id = 2 end,
	action = function(self, t)
		local Chat = require("engine.Chat")
		local chat = Chat.new("elisa-orb-scrying", {name="Past memories"}, self, {version="undead"})
		chat:invoke()
		return true
	end,
	info = function(self)
		return ([[你集中精神回想你生前时的知识，来辨识一些稀有物品。]])
	end,
}
