Skip to content
Snippets Groups Projects
Commit ac64f781 authored by DarkGod's avatar DarkGod
Browse files

Fix casting Freeze at a target in a wall freezing you instead

parent b7e1e00e
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -53,7 +53,7 @@ function _M:project(t, x, y, damtype, dam, particles)
local typ = Target:getType(t)
typ.source_actor = self
typ.start_x = typ.start_x or typ.x or typ.source_actor and typ.source_actor.x or self.x
typ.start_y = typ.start_y or typ.y or typ.source_actor and typ.source_actor.y or self.x
typ.start_y = typ.start_y or typ.y or typ.source_actor and typ.source_actor.y or self.y
local grids = {}
local function addGrid(x, y)
......
......@@ -43,8 +43,6 @@ newTalent{
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local _ _, _, _, x, y = self:canProject(tg, x, y)
local target = game.level.map(x, y, Map.ACTOR)
if not x or not y then return nil end
if necroEssenceDead(self, true) then
......@@ -57,9 +55,12 @@ newTalent{
self:project(tg, x, y, DamageType.COLD, dam, {type="freeze"})
self:project(tg, x, y, DamageType.FREEZE, {dur=t.getDuration(self, t), hp=70 + dam * 1.5})
if target and self:reactionToward(target) >= 0 then
game:onTickEnd(function() self:alterTalentCoolingdown(t.id, -math.floor((self.talents_cd[t.id] or 0) * 0.33)) end)
end
tg.type = "hit"
self:projectApply(tg, x, y, Map.ACTOR, function(target)
if self:reactionToward(target) >= 0 then
game:onTickEnd(function() self:alterTalentCoolingdown(t.id, -math.floor((self.talents_cd[t.id] or 0) * 0.33)) end)
end
end)
game:playSoundNear(self, "talents/water")
return true
......
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