diff --git a/game/modules/tome/data/gfx/particles/arcanestorm.lua b/game/modules/tome/data/gfx/particles/arcanestorm.lua new file mode 100644 index 0000000000000000000000000000000000000000..3373b94443048c1951dfd2093f45b967b585ced1 --- /dev/null +++ b/game/modules/tome/data/gfx/particles/arcanestorm.lua @@ -0,0 +1,49 @@ +-- 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" diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index cd46b7695d2c1c7ea8b739ed22154219c532c6a3..837c49dbaf7ed88db447d75d19cc785f0271904b 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -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, } diff --git a/game/modules/tome/data/timed_effects/magical.lua b/game/modules/tome/data/timed_effects/magical.lua index e69e3a1bee70e11225e6c79b5d8433a28cc4c8ce..9685a5337073a3afa1b42d043d8101ffea92e357 100644 --- a/game/modules/tome/data/timed_effects/magical.lua +++ b/game/modules/tome/data/timed_effects/magical.lua @@ -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", diff --git a/game/modules/tome/data/timed_effects/mental.lua b/game/modules/tome/data/timed_effects/mental.lua index f12a03bb229cfd4acfb22a600fad14ed8757a918..7f83b06ab10d5ae0566362ea5906d9451880e736 100644 --- a/game/modules/tome/data/timed_effects/mental.lua +++ b/game/modules/tome/data/timed_effects/mental.lua @@ -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)