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

Fireflash no longer does a DOT, it is all upfront damage

git-svn-id: http://svn.net-core.org/repos/t-engine4@1932 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2ad4e40a
No related branches found
No related tags found
No related merge requests found
......@@ -203,7 +203,7 @@ function _M:act()
end
game.level:removeEntity(self)
self.dead = true
self.src:projectDoStop(self.project.def.typ, self.project.def.tg, self.project.def.damtype, self.project.def.dam, self.project.def.particles, radius_x, radius_y, self.tmp_proj)
self.src:projectDoStop(self.project.def.typ, self.project.def.tg, self.project.def.damtype, self.project.def.dam, self.project.def.particles, self.x, self.y, self.tmp_proj, radius_x, radius_y)
end
elseif self.homing then
self:moveDirection(self.homing.target.x, self.homing.target.y)
......
......@@ -89,7 +89,7 @@ function _M:display(dispx, dispy)
-- Correct the explosion source position if we exploded on terrain
local radius_x, radius_y
if self.target_type.block_path then
if self.target_type.block_path and self.target_type.radius and self.target_type.radius > 0 then
_, radius_x, radius_y = self.target_type:block_path(stopx, stopy)
end
if not radius_x then
......@@ -138,7 +138,7 @@ function _M:getType(t)
if not typ.no_restrict then
if typ.requires_knowledge and not game.level.map.remembers(lx, ly) and not game.level.map.seens(lx, ly) then return true end
if not typ.pass_terrain and game.level.map:checkEntity(lx, ly, engine.Map.TERRAIN, "block_move") then return true
-- If we explode do to something other than terrain, then we should explode ON the tile, not before it
-- If we explode due to something other than terrain, then we should explode ON the tile, not before it
elseif typ.stop_block and game.level.map:checkAllEntities(lx, ly, "block_move") then return true, lx, ly end
if typ.range and typ.source_actor and typ.source_actor.x and math.sqrt((typ.source_actor.x-lx)^2 + (typ.source_actor.y-ly)^2) > typ.range then return true end
end
......
......@@ -230,7 +230,7 @@ function _M:projectDoAct(typ, tg, damtype, dam, particles, px, py, tmp)
end
end
function _M:projectDoStop(typ, tg, damtype, dam, particles, lx, ly, tmp)
function _M:projectDoStop(typ, tg, damtype, dam, particles, lx, ly, tmp, rx, ry)
local grids = {}
local function addGrid(x, y)
if not grids[x] then grids[x] = {} end
......@@ -238,20 +238,20 @@ function _M:projectDoStop(typ, tg, damtype, dam, particles, lx, ly, tmp)
end
if typ.ball and typ.ball > 0 then
core.fov.calc_circle(lx, ly, typ.ball, function(_, px, py)
core.fov.calc_circle(rx, ry, typ.ball, function(_, px, py)
-- Deal damage: ball
addGrid(px, py)
if typ.block_radius and typ:block_radius(px, py) then return true end
end, function()end, nil)
addGrid(lx, ly)
addGrid(rx, ry)
elseif typ.cone and typ.cone > 0 then
local initial_dir = lx and util.getDir(lx, ly, x, y) or 5
core.fov.calc_beam(lx, ly, typ.cone, initial_dir, typ.cone_angle, function(_, px, py)
core.fov.calc_beam(rx, ry, typ.cone, initial_dir, typ.cone_angle, function(_, px, py)
-- Deal damage: cone
addGrid(px, py)
if typ.block_radius and typ:block_radius(px, py) then return true end
end, function()end, nil)
addGrid(lx, ly)
addGrid(rx, ry)
else
-- Deam damage: single
addGrid(lx, ly)
......
......@@ -101,7 +101,7 @@ newTalent{
local tg = {type="ball", range=self:getTalentRange(t), radius=1 + self:getTalentLevelRaw(t), friendlyfire=self:spellFriendlyFire(), talent=t, display={particle="bolt_fire", trail="firetrail"}}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:projectile(tg, x, y, DamageType.FIREBURN, self:spellCrit(self:combatTalentSpellDamage(t, 28, 280)), function(self, tg, x, y, grids)
self:projectile(tg, x, y, DamageType.FIRE, self:spellCrit(self:combatTalentSpellDamage(t, 28, 280)), function(self, tg, x, y, grids)
game.level.map:particleEmitter(x, y, tg.radius, "fireflash", {radius=tg.radius, grids=grids, tx=x, ty=y})
end)
game:playSoundNear(self, "talents/fireflash")
......
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