Skip to content
Snippets Groups Projects
Commit 1b4d7b68 authored by Eric Wykoff's avatar Eric Wykoff
Browse files

fixed ice wall targeting and upvalues

parent 17b360dd
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,13 @@ newTalent{
range = 10,
tactical = { DISABLE = 2 },
requires_target = true,
target = function(self, t) return {type="wall", range=self:getTalentRange(t), halflength=halflength, talent=t, halfmax_spots=halflength+1, block_radius=block} end,
target = function(self, t)
local halflength = math.floor(t.getLength(self,t)/2)
local block = function(_, lx, ly)
return game.level.map:checkAllEntities(lx, ly, "block_move")
end
return {type="wall", range=self:getTalentRange(t), halflength=halflength, talent=t, halfmax_spots=halflength+1, block_radius=block}
end,
on_learn = function(self, t) self.resists[DamageType.COLD] = (self.resists[DamageType.COLD] or 0) + 1 end,
on_unlearn = function(self, t) self.resists[DamageType.COLD] = (self.resists[DamageType.COLD] or 0) - 1 end,
getDuration = function(self, t) return math.floor(self:combatTalentScale(t, 5, 9)) end,
......@@ -159,7 +165,8 @@ newTalent{
dam = ice_damage,
radius = ice_radius,
act = function(self)
local tg = {type="ball", range=0, radius=ice_radius, friendlyfire=false, talent=t, x=self.x, y=self.y}
local t = self.summoner:getTalentFromId(self.T_ICE_WALL)
local tg = {type="ball", range=0, radius=self.radius, friendlyfire=false, talent=t, x=self.x, y=self.y}
self.summoner.__project_source = self
self.summoner:project(tg, self.x, self.y, engine.DamageType.ICE, self.dam)
self.summoner.__project_source = nil
......
......@@ -152,7 +152,7 @@ newTalent{
dam = forge_damage,
radius = self:getTalentRadius(t),
act = function(self)
local t = self:getTalentFromId(self.T_FORGE_BELLOWS)
local t = self.summoner:getTalentFromId(self.T_FORGE_BELLOWS)
local tg = {type="ball", range=0, friendlyfire=false, radius = 1, talent=t, x=self.x, y=self.y,}
self.summoner.__project_source = self
self.summoner:project(tg, self.x, self.y, engine.DamageType.DREAMFORGE, self.dam)
......
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