Skip to content
Snippets Groups Projects
Commit 57ac3b87 authored by dg's avatar dg
Browse files

Disruption Shield changed. Now takes no turn to cast, costs less sustain mana,...

Disruption Shield changed. Now takes no turn to cast, costs less sustain mana, the explosion is now an arcane storm for 10 turns dealing 10% damage each turn. While in the arcane storm the caster gets an arcance resistance buff


git-svn-id: http://svn.net-core.org/repos/t-engine4@4698 51575b47-30f0-44d4-a5cc-537603b46e54
parent 3e383f85
No related branches found
No related tags found
No related merge requests found
-- 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
base_size = 32
return { generator = function()
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad + 90)
local r = rng.avg(1, 40 * 3)
local dirv = math.rad(5)
return {
trail = 1,
life = 50,
size = rng.range(3, 6), sizev = -0.1, sizea = 0,
x = r * math.cos(a), xv = 0, xa = 0,
y = r * math.sin(a), yv = 0, ya = 0,
dir = dir, dirv = dirv, dira = 0,
vel = 5, velv = 0, vela = 0,
r = rng.range(180, 220)/255, rv = 0, ra = 0,
g = rng.range(0, 0)/255, gv = 0, ga = 0,
b = rng.range(200, 255)/255, bv = 0, ba = 0,
a = rng.range(80, 220)/255, av = 0, aa = 0,
}
end, },
function(self)
self.ps:emit(10)
end,
500,
"weather/snowflake"
......@@ -123,17 +123,18 @@ newTalent{
mode = "sustained",
cooldown = 30,
sustain_mana = 10,
no_energy = true,
tactical = { DEFEND = 2 },
getManaRatio = function(self, t) return 3 - math.max(self:combatTalentSpellDamage(t, 10, 200) / 100, 0.5) end,
getArcaneResist = function(self, t) return 10 + self:combatTalentSpellDamage(t, 10, 500) / 10 end,
explode = function(self, t, dam)
game.logSeen(self, "%s's disruption shield collapses and then explodes in a powerful manastorm!", self.name:capitalize())
local tg = {type="ball", radius=5}
self:project(tg, self.x, self.y, DamageType.ARCANE, dam, {type="manathrust"})
game.logSeen(self, "#VIOLET#%s's disruption shield collapses and then explodes in a powerful manastorm!", self.name:capitalize())
-- Add a lasting map effect
self:setEffect(self.EFF_ARCANE_STORM, 10, {power=t.getArcaneResist(self, t)})
game.level.map:addEffect(self,
self.x, self.y, 10,
DamageType.ARCANE, dam,
DamageType.ARCANE, dam / 10,
3,
5, nil,
{type="arcanestorm", only_one=true},
......@@ -157,10 +158,10 @@ newTalent{
return true
end,
info = function(self, t)
local power = t.getManaRatio(self, t)
return ([[Uses mana instead of life to take damage. Uses %0.2f mana per damage point taken.
If your mana is brought too low by the shield, it will de-activate and the chain reaction will release a deadly arcane explosion with radius 5 of the amount of damage absorbed.
If your mana is brought too low by the shield, it will de-activate and the chain reaction will release a deadly arcane storm with radius 3 for 10 turns, dealing 10%% of the damage absorbed each turn.
While the arcane storm rages you also get a %d%% arcane resistance.
The damage to mana ratio increases with your Spellpower.]]):
format(power)
format(t.getManaRatio(self, t), t.getArcaneResist(self, t))
end,
}
......@@ -78,6 +78,24 @@ newEffect{
end,
}
newEffect{
name = "ARCANE_STORM", image = "talents/disruption_shield.png",
desc = "Arcane Storm",
long_desc = function(self, eff) return ("The target is the epicenter of a terrible arcane storm, he gets +%d%% arcane resistance."):format(eff.power) end,
type = "magical",
subtype = { arcane=true},
status = "beneficial",
parameters = {power=50},
activate = function(self, eff)
eff.resistsid = self:addTemporaryValue("resists", {
[DamageType.ARCANE]=eff.power,
})
end,
deactivate = function(self, eff)
self:removeTemporaryValue("resists", eff.resistsid)
end,
}
newEffect{
name = "EARTHEN_BARRIER", image = "talents/earthen_barrier.png",
desc = "Earthen Barrier",
......
......@@ -1554,6 +1554,7 @@ newEffect{
eff.tid = self:addTemporaryValue("wild_summon", eff.chance)
end,
on_timeout = function(self, eff)
eff.chance = eff.chance or 100
eff.chance = math.floor(eff.chance * 0.66)
self:removeTemporaryValue("wild_summon", eff.tid)
eff.tid = self:addTemporaryValue("wild_summon", eff.chance)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment