From 1ced003ae85c948466bf71f9b5d0e618b5bb5470 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Fri, 4 Jun 2010 14:34:47 +0000 Subject: [PATCH] arcane power is a sustained effect and level 1 manathurst is level 2 mages now start with arcane power instead of manathrust and lightning instead of corrosive vapour git-svn-id: http://svn.net-core.org/repos/t-engine4@751 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/birth/classes/mage.lua | 4 +- .../tome/data/gfx/particles/arcane_power.lua | 46 ++++++++++++++++++ .../tome/data/talents/spells/arcane.lua | 48 +++++++++++-------- 3 files changed, 76 insertions(+), 22 deletions(-) create mode 100644 game/modules/tome/data/gfx/particles/arcane_power.lua diff --git a/game/modules/tome/data/birth/classes/mage.lua b/game/modules/tome/data/birth/classes/mage.lua index b5ba89e95c..1e327534b9 100644 --- a/game/modules/tome/data/birth/classes/mage.lua +++ b/game/modules/tome/data/birth/classes/mage.lua @@ -70,9 +70,9 @@ newBirthDescriptor{ ["cunning/survival"]={false, -0.1}, }, talents = { - [ActorTalents.T_MANATHRUST] = 1, + [ActorTalents.T_ARCANE_POWER] = 1, [ActorTalents.T_FLAME] = 1, - [ActorTalents.T_CORROSIVE_VAPOUR] = 1, + [ActorTalents.T_LIGHTNING] = 1, [ActorTalents.T_PHASE_DOOR] = 1, }, copy = { diff --git a/game/modules/tome/data/gfx/particles/arcane_power.lua b/game/modules/tome/data/gfx/particles/arcane_power.lua new file mode 100644 index 0000000000..3f017de32f --- /dev/null +++ b/game/modules/tome/data/gfx/particles/arcane_power.lua @@ -0,0 +1,46 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 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 + +return { generator = function() + local ad = rng.range(0, 360) + local a = math.rad(ad) + local dir = math.rad(ad) + local r = rng.range(18, 22) + local dirchance = rng.chance(2) + + return { + trail = 1, + life = 10, + size = 4, 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 = 0.1, dira = 0, + vel = dirchance and 0.6 or -0.6, velv = 0, vela = dirchance and -0.02 or 0.02, + + r = rng.range(30, 220)/255, rv = rng.range(0, 10)/100, ra = 0, + g = 0, gv = 0, ga = 0, + b = rng.range(170, 255)/255, bv = rng.range(0, 10)/100, ba = 0, + a = rng.range(70, 255)/255, av = 0, aa = 0, + } +end, }, +function(self) + self.ps:emit(4) +end, +40 diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index 1ba0468009..58df8103d4 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -18,9 +18,34 @@ -- darkgod@te4.org newTalent{ - name = "Manathrust", + name = "Arcane Power", type = {"spell/arcane", 1}, + mode = "sustained", require = spells_req1, + sustain_mana = 50, + points = 5, + activate = function(self, t) + local power = 5 * self:getTalentLevelRaw(t) + game:playSoundNear(self, "talents/arcane") + return { + power = self:addTemporaryValue("combat_spellpower", power), + particle = self:addParticles(Particles.new("arcane_power", 1)), + } + end, + deactivate = function(self, t, p) + self:removeParticles(p.particle) + self:removeTemporaryValue("combat_spellpower", p.power) + return true + end, + info = function(self, t) + return ([[Your mastery of magic allows you to enter a deep concentration state, increasing your spellpower by %d.]]):format(5 * self:getTalentLevelRaw(t)) + end, +} + +newTalent{ + name = "Manathrust", + type = {"spell/arcane", 2}, + require = spells_req2, points = 5, mana = 10, cooldown = 3, @@ -53,8 +78,8 @@ newTalent{ newTalent{ name = "Manaflow", - type = {"spell/arcane", 2}, - require = spells_req2, + type = {"spell/arcane", 3}, + require = spells_req3, points = 5, mana = 0, cooldown = 300, @@ -74,23 +99,6 @@ newTalent{ end, } -newTalent{ - name = "Arcane Power", - type = {"spell/arcane", 3}, - mode = "passive", - require = spells_req3, - points = 5, - on_learn = function(self, t) - self.combat_spellpower = self.combat_spellpower + 5 - end, - on_unlearn = function(self, t) - self.combat_spellpower = self.combat_spellpower - 5 - end, - info = function(self, t) - return ([[Your mastery of magic allows you to permanently increase your spellpower by %d.]]):format(5 * self:getTalentLevelRaw(t)) - end, -} - newTalent{ name = "Disruption Shield", type = {"spell/arcane",4}, -- GitLab