From 3e383f856d3fcd14ae739b7f4cf035052ed59ec4 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Tue, 29 Nov 2011 00:16:09 +0000 Subject: [PATCH] test git-svn-id: http://svn.net-core.org/repos/t-engine4@4697 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/engines/default/engine/PlayerProfile.lua | 2 -- game/modules/tome/class/Actor.lua | 5 ++--- game/modules/tome/data/talents/spells/arcane.lua | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/game/engines/default/engine/PlayerProfile.lua b/game/engines/default/engine/PlayerProfile.lua index 26ad34f6a1..1fa909129b 100644 --- a/game/engines/default/engine/PlayerProfile.lua +++ b/game/engines/default/engine/PlayerProfile.lua @@ -580,8 +580,6 @@ function _M:syncOnline(module, mod_def) end function _M:checkModuleHash(module, md5) -do self.hash_valid = true return true end - self.hash_valid = false if not self.auth then return nil, "no online profile active" end if config.settings.cheat then return nil, "cheat mode active" end diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index ce8d8bcca1..14a9083f66 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1194,9 +1194,8 @@ function _M:onTakeHit(value, src) self:forceUseTalent(self.T_DISRUPTION_SHIELD, {ignore_energy=true}) -- Explode! - 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"}) + local t = self:getTalentFromId(self.T_DISRUPTION_SHIELD) + t.explode(self, t, dam) end end diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index 11ec92df4d..cd46b7695d 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -125,6 +125,22 @@ newTalent{ sustain_mana = 10, tactical = { DEFEND = 2 }, getManaRatio = function(self, t) return 3 - math.max(self:combatTalentSpellDamage(t, 10, 200) / 100, 0.5) 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"}) + + -- Add a lasting map effect + game.level.map:addEffect(self, + self.x, self.y, 10, + DamageType.ARCANE, dam, + 3, + 5, nil, + {type="arcanestorm", only_one=true}, + function(e) e.x = e.src.x e.y = e.src.y return true end, + true + ) + end, activate = function(self, t) local power = t.getManaRatio(self, t) self.disruption_shield_absorb = 0 -- GitLab