From f86da00af800d1b6f8e0ab769a81670b9c58cbb5 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sun, 9 Dec 2012 21:22:00 +0000 Subject: [PATCH] Fixed psionic Backlash from looping forever git-svn-id: http://svn.net-core.org/repos/t-engine4@6023 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/talents/psionic/discharge.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/game/modules/tome/data/talents/psionic/discharge.lua b/game/modules/tome/data/talents/psionic/discharge.lua index 36f1c8a1ce..b73b5ddb91 100644 --- a/game/modules/tome/data/talents/psionic/discharge.lua +++ b/game/modules/tome/data/talents/psionic/discharge.lua @@ -142,6 +142,9 @@ newTalent{ return {type="hit", range=self:getTalentRange(t), talent=t} end, doBacklash = function(self, target, value, t) + if self.turn_procs.psi_backlash and self.turn_procs.psi_backlash[target.uid] then return nil end + self.turn_procs.psi_backlash = self.turn_procs.psi_backlash or {} + self.turn_procs.psi_backlash[target.uid] = true self.no_backlash_loops = true if core.fov.distance(self.x, self.y,target.x, target.y) > self:getTalentRange(t) then return nil end local tg = self:getTalentTarget(t) @@ -165,6 +168,7 @@ newTalent{ local range = self:getTalentRange(t) local damage = t.getDamage(self, t) return ([[Your subconscious now retaliates when you take damage. If the attacker is within range (%d) you'll inflict mind damage equal to the Feedback gained from the attack or %0.2f, whichever is lower. + This effect can only happen once per creature per turn. The damage will scale with your mindpower.]]):format(range, damDesc(self, DamageType.MIND, damage)) end, } -- GitLab