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

chain lightning does not hit the caster

git-svn-id: http://svn.net-core.org/repos/t-engine4@819 51575b47-30f0-44d4-a5cc-537603b46e54
parent c2feafbf
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ newTalent{
local sx, sy = self.x, self.y
for i, actor in ipairs(targets) do
local tgr = {type="beam", range=self:getTalentRange(t), talent=t, x=sx, y=sy}
local tgr = {type="beam", range=self:getTalentRange(t), friendlyfire=false, talent=t, x=sx, y=sy}
print("[Chain lightning] jumping from", sx, sy, "to", actor.x, actor.y)
self:project(tgr, actor.x, actor.y, DamageType.LIGHTNING, rng.avg(1, self:spellCrit(20 + self:combatSpellpower(0.8) * self:getTalentLevel(t)), 5))
game.level.map:particleEmitter(sx, sy, math.max(math.abs(actor.x-sx), math.abs(actor.y-sy)), "lightning", {tx=actor.x-sx, ty=actor.y-sy})
......
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