Skip to content
Snippets Groups Projects
mag.lua 8.97 KiB
Newer Older
dg's avatar
dg committed
-- ToME - Tales of Maj'Eyal
dg's avatar
dg committed
-- Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicolas Casalini
dg's avatar
dg committed
--
-- 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
dg's avatar
dg committed

uberTalent{
	name = "Spectral Shield",
	mode = "passive",
dg's avatar
dg committed
	require = { special={desc="Know the Block talent, and have cast 100 spells, and have a block value over 200", fct=function(self)
		return self:knowTalent(self.T_BLOCK) and self:getTalentFromId(self.T_BLOCK).getBlockValue(self) >= 200 and self.talent_kind_log and self.talent_kind_log.spell and self.talent_kind_log.spell >= 100
dg's avatar
dg committed
	end} },
	on_learn = function(self, t)
		self:attr("spectral_shield", 1)
	end,
	on_unlearn = function(self, t)
		self:attr("spectral_shield", -1)
	end,
	info = function(self, t)
dg's avatar
dg committed
		return ([[Infusing your shield with raw magic, your Block can now block any damage type.]])
dg's avatar
dg committed
		:format()
	end,
}
dg's avatar
dg committed

uberTalent{
	name = "Aether Permeation",
	mode = "passive",
dg's avatar
dg committed
	require = { special={desc="Have at least 25% arcane damage reduction, and have been exposed to the void of space", fct=function(self)
		return (game.state.birth.ignore_prodigies_special_reqs or self:attr("planetary_orbit")) and self:combatGetResist(DamageType.ARCANE) >= 25
dg's avatar
dg committed
	end} },
	on_learn = function(self, t)
dg's avatar
dg committed
		local ret = {}
		self:talentTemporaryValue(ret, "force_use_resist", DamageType.ARCANE)
dg's avatar
dg committed
		self:talentTemporaryValue(ret, "force_use_resist_percent", 66)
dg's avatar
dg committed
		return ret
dg's avatar
dg committed
	end,
	on_unlearn = function(self, t)
	end,
	info = function(self, t)
dg's avatar
dg committed
		return ([[Create a thin layer of aether all around you. Any attack passing through will check arcane resistance instead of the incoming damage resistance.
dg's avatar
dg committed
		In effect, all your resistances are equal to 66%% of your arcane resistance.]])
dg's avatar
dg committed
		:format()
	end,
}
dg's avatar
dg committed

uberTalent{
	name = "Mystical Cunning", image = "talents/vulnerability_poison.png",
	mode = "passive",
dg's avatar
dg committed
	require = { special={desc="Know either traps or poisons", fct=function(self)
dg's avatar
dg committed
		return self:knowTalent(self.T_VILE_POISONS) or self:knowTalent(self.T_TRAP_MASTERY)
	end} },
	on_learn = function(self, t)
		self:attr("combat_spellresist", 20)
		self:learnTalent(self.T_VULNERABILITY_POISON, true, nil, {no_unlearn=true})
		self:learnTalent(self.T_GRAVITIC_TRAP, true, nil, {no_unlearn=true})
	end,
	on_unlearn = function(self, t)
		self:attr("combat_spellresist", -20)
	end,
	info = function(self, t)
		return ([[Your study of arcane forces has let you develop new traps and poisons (depending on which you know when learning this prodigy).
		You can learn:
dg's avatar
dg committed
		- Vulnerability Poison: reduces all resistances and deals arcane damage.
		- Gravitic Trap: each turn, all foes in a radius 5 around it are pulled in and take temporal damage.
		You also permanently gain 20 Spell Save.]])
dg's avatar
dg committed
		:format()
	end,
}
dg's avatar
dg committed

uberTalent{
	name = "Arcane Might",
	mode = "passive",
	info = function(self, t)
		return ([[You have learnt to harness your latent arcane powers, channeling them through your weapon.
dg's avatar
dg committed
		Treats all weapons as having an additional 50%% Magic modifier.]])
dg's avatar
dg committed
		:format()
	end,
}
dg's avatar
dg committed

uberTalent{
	name = "Temporal Form",
	cooldown = 30,
dg's avatar
dg committed
	require = { special={desc="Have cast over 1000 spells and visited an out-of-time zone", fct=function(self) return
		self.talent_kind_log and self.talent_kind_log.spell and self.talent_kind_log.spell >= 1000 and (game.state.birth.ignore_prodigies_special_reqs or self:attr("temporal_touched"))
dg's avatar
dg committed
	end} },
	no_energy = true,
dg's avatar
dg committed
	is_spell = true,
dg's avatar
dg committed
	requires_target = true,
	range = 10,
	tactical = { BUFF = 2 },
dg's avatar
dg committed
	action = function(self, t)
		self:setEffect(self.EFF_TEMPORAL_FORM, 10, {})
dg's avatar
dg committed
		return true
	end,
	info = function(self, t)
		return ([[You can wrap temporal threads around you, assuming the form of a telugoroth for 10 turns.
DarkGod's avatar
DarkGod committed
		While in this form, you gain pinning, bleeding, blindness and stun immunity, 30%% temporal resistance, your temporal damage bonus is set to your current highest damage bonus + 30%%, 50%% of the damage you deal becomes temporal, and you gain 20%% temporal resistance penetration.
dg's avatar
dg committed
		You also are able to cast two anomalies: Anomaly Rearrange and Anomaly Temporal Storm.
		Transforming to this form will increase your paradox by 400 but also grant an equivalent of +400 willpower to control paradoxes and failures, and revert it back at the end of the effect.]])
dg's avatar
dg committed
		:format()
	end,
dg's avatar
dg committed
}

uberTalent{
	name = "Blighted Summoning",
	mode = "passive",
	on_learn = function(self, t)
dg's avatar
dg committed
			self.alchemy_golem:learnTalent(self.alchemy_golem.T_CORRUPTED_STRENGTH, true, 1, {no_unlearn=true})
			self.alchemy_golem:learnTalentType("corruption/reaving-combat", true)
		end
dg's avatar
dg committed
	end,
dg's avatar
dg committed
	require = { special={desc="Have summoned at least 100 creatures affected by this talent (alchemist golem count as 100)", fct=function(self)
dg's avatar
dg committed
		return self:attr("summoned_times") and self:attr("summoned_times") >= 100
dg's avatar
dg committed
	end} },
	info = function(self, t)
dg's avatar
dg committed
		return ([[You infuse blighted energies into all your summons, giving them all a new talent:
dg's avatar
dg committed
		- War Hound: Curse of Defenselessness
		- Jelly: Vimsense
		- Minotaur: Life Tap
		- Golem: Bone Spear
		- Ritch: Drain
		- Hydra: Blood Spray
		- Rimebark: Poison Storm
		- Fire Drake: Darkfire
		- Turtle: Curse of Impotence
		- Spider: Corrosive Worm
		- Skeletons: Bone Grab
		- Bone Giants: Bone Shield
dg's avatar
dg committed
		- Ghouls: Blood Lock
		- Vampires / Liches: Darkfire
		- Ghosts / Wights: Blood Boil
		- Alchemy Golems: Corrupted Strength and the Reaving Combat tree
dg's avatar
dg committed
		- Shadows: Empathic Hex
		- Thought-Forms: Flame of Urh'Rok
		- Treants: Corrosive Worm
		- Yeek Wayists: Dark Portal
		- Ghoul Rot ghoul: Rend
dg's avatar
dg committed
		- Bloated Oozes: Bone Shield
		- Mucus Oozes: Virulent Disease
dg's avatar
dg committed
		- Other race- or object-based summons might be affected, too.
dg's avatar
dg committed
		]]):format()
	end,
}
dg's avatar
dg committed

uberTalent{
	name = "Revisionist History",
dg's avatar
dg committed
	no_energy = true,
	is_spell = true,
dg's avatar
dg committed
	no_npc_use = true,
	require = { special={desc="Have time-travelled at least once", fct=function(self) return game.state.birth.ignore_prodigies_special_reqs or (self:attr("time_travel_times") and self:attr("time_travel_times") >= 1) end} },
dg's avatar
dg committed
	action = function(self, t)
		if game._chronoworlds and game._chronoworlds.revisionist_history then
			self:hasEffect(self.EFF_REVISIONIST_HISTORY).back_in_time = true
			self:removeEffect(self.EFF_REVISIONIST_HISTORY)
			return nil -- the effect removal starts the cooldown
		end

		if checkTimeline(self) == true then return end

		game:onTickEnd(function()
			game:chronoClone("revisionist_history")
			self:setEffect(self.EFF_REVISIONIST_HISTORY, 19, {})
dg's avatar
dg committed
		end)
		return nil -- We do not start the cooldown!
	end,
	info = function(self, t)
		return ([[You can now control the near-past; upon using this prodigy, you gain a temporal effect for 20 turns.
dg's avatar
dg committed
		While this effect holds, you can use the prodigy again to rewrite history.
dg's avatar
dg committed
		This prodigy splits the timeline. Attempting to use another spell that also splits the timeline while this effect is active will be unsuccessful.]])
		:format()
	end,
}
newTalent{
	name = "Unfold History", short_name = "REVISIONIST_HISTORY_BACK",
	type = {"uber/other",1},
	cooldown = 30,
	no_energy = true,
	is_spell = true,
	no_npc_use = true,
	action = function(self, t)
		if game._chronoworlds and game._chronoworlds.revisionist_history then
			self:hasEffect(self.EFF_REVISIONIST_HISTORY).back_in_time = true
			self:removeEffect(self.EFF_REVISIONIST_HISTORY)
			return nil -- the effect removal starts the cooldown
		end
		return nil -- We do not start the cooldown!
	end,
	info = function(self, t)
		return ([[Rewrite the near-past to go back to when you casted Revisionist History.]])
		:format()
	end,
}

uberTalent{
	name = "Cauterize",
	mode = "passive",
	cooldown = 12,
	require = { special={desc="Have received at least 7500 fire damage, and have cast at least 1000 spells", fct=function(self) return
		self.talent_kind_log and self.talent_kind_log.spell and self.talent_kind_log.spell >= 1000 and self.damage_intake_log and self.damage_intake_log[DamageType.FIRE] and self.damage_intake_log[DamageType.FIRE] >= 7500
	end} },
	trigger = function(self, t, value)
		self:startTalentCooldown(t)

		self:setEffect(self.EFF_CAUTERIZE, 8, {dam=value/10})
		return true
	end,
	info = function(self, t)
dg's avatar
dg committed
		return ([[Your inner flame is strong. Each time you receive a blow that would kill you, your body is wreathed in flames.
		The flames will cauterize the wound, fully absorbing all damage done this turn, but they will continue to burn for 8 turns.
		Each turn 10% of the damage absorbed will be dealt by the flames (this will bypass resistance and affinity).
dg's avatar
dg committed
		Warning: this has a cooldown.]])