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

Fixed psionic Backlash from looping forever

git-svn-id: http://svn.net-core.org/repos/t-engine4@6023 51575b47-30f0-44d4-a5cc-537603b46e54
parent cfee58c9
No related branches found
No related tags found
No related merge requests found
......@@ -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,
}
......
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