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

Breath attacks now have their own particles effects

git-svn-id: http://svn.net-core.org/repos/t-engine4@1617 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9cf20834
No related branches found
No related tags found
No related merge requests found
Showing
with 513 additions and 38 deletions
......@@ -696,6 +696,17 @@ setmetatable(tstring, {
})
dir_to_angle = {
[1] = 225,
[2] = 270,
[3] = 315,
[4] = 180,
[5] = 0,
[6] = 0,
[7] = 135,
[8] = 90,
[9] = 45,
}
dir_to_coord = {
[1] = {-1, 1},
[2] = { 0, 1},
......
......@@ -658,7 +658,7 @@ function _M:setupCommands()
a.faction = "enemies"
self.zone:addEntity(self.level, a, "actor", self.player.x+1, self.player.y)
--]]
game.level.map:particleEmitter(self.player.x, self.player.y, 1, "breath_fire")
game.level.map:particleEmitter(self.player.x, self.player.y, 1, "breath_cold", {radius=6, tx=10, ty=2})
end
end,
}
......
game/modules/tome/data/gfx/particle_cloud.png

4.47 KiB

-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local nb = 12
local dir
local spread = spread or 55/2
local radius = radius or 6
local max = math.max(math.abs(tx), math.abs(ty))
tx = tx / max
ty = ty / max
if tx >= 0.5 then tx = 1 elseif tx <= -0.5 then tx = -1 else tx = 0 end
if ty >= 0.5 then ty = -1 elseif ty <= -0.5 then ty = 1 else ty = 0 end -- Why the hell is ty inverted ? .. but it works :/
if tx == 1 and ty == 0 then dir = 0
elseif tx == 1 and ty == -1 then dir = 45
elseif tx == 0 and ty == -1 then dir = 90
elseif tx == -1 and ty == -1 then dir = 135
elseif tx == -1 and ty == 0 then dir = 180
elseif tx == -1 and ty == 1 then dir = 225
elseif tx == 0 and ty == 1 then dir = 270
elseif tx == 1 and ty == 1 then dir = 315
end
return { generator = function()
local sradius = (radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2
local ad = rng.float(dir - spread, dir + spread)
local a = math.rad(ad)
local r = 0
local x = r * math.cos(a)
local y = r * math.sin(a)
local static = rng.percent(40)
local vel = sradius * ((24 - nb * 1.4) / 24) / 12
return {
trail = 1,
life = 12,
size = 12 - (12 - nb) * 0.7, sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = a, dirv = 0, dira = 0,
vel = rng.float(vel * 0.6, vel * 1.2), velv = 0, vela = 0,
r = rng.range(0, 0)/255, rv = 0, ra = 0,
g = rng.range(80, 200)/255, gv = 0.005, ga = 0.0005,
b = rng.range(0, 0)/255, bv = 0, ba = 0,
a = rng.range(255, 255)/255, av = static and -0.034 or 0, aa = 0.005,
}
end, },
function(self)
if nb > 0 then
local i = math.min(nb, 6)
i = (i * i) * radius
self.ps:emit(i)
nb = nb - 1
end
end,
30*radius*7*12,
"particle_cloud"
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local nb = 12
local dir
local spread = spread or 55/2
local radius = radius or 6
local max = math.max(math.abs(tx), math.abs(ty))
tx = tx / max
ty = ty / max
if tx >= 0.5 then tx = 1 elseif tx <= -0.5 then tx = -1 else tx = 0 end
if ty >= 0.5 then ty = -1 elseif ty <= -0.5 then ty = 1 else ty = 0 end -- Why the hell is ty inverted ? .. but it works :/
if tx == 1 and ty == 0 then dir = 0
elseif tx == 1 and ty == -1 then dir = 45
elseif tx == 0 and ty == -1 then dir = 90
elseif tx == -1 and ty == -1 then dir = 135
elseif tx == -1 and ty == 0 then dir = 180
elseif tx == -1 and ty == 1 then dir = 225
elseif tx == 0 and ty == 1 then dir = 270
elseif tx == 1 and ty == 1 then dir = 315
end
return { generator = function()
local sradius = (radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2
local ad = rng.float(dir - spread, dir + spread)
local a = math.rad(ad)
local r = 0
local x = r * math.cos(a)
local y = r * math.sin(a)
local static = rng.percent(40)
local vel = sradius * ((24 - nb * 1.4) / 24) / 12
return {
trail = 1,
life = 12,
size = 12 - (12 - nb) * 0.7, sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = a, dirv = 0, dira = 0,
vel = rng.float(vel * 0.6, vel * 1.2), velv = 0, vela = 0,
r = 0, rv = 0, ra = 0,
g = rng.range(170, 210)/255, gv = 0, ga = 0,
b = rng.range(200, 255)/255, gv = 0, ga = 0,
a = rng.range(230, 225)/255, av = 0, aa = 0,
}
end, },
function(self)
if nb > 0 then
local i = math.min(nb, 6)
i = (i * i) * radius
self.ps:emit(i)
nb = nb - 1
end
end,
30*radius*7*12,
"particle_cloud"
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local nb = 12
local dir
local spread = spread or 55/2
local radius = radius or 6
local max = math.max(math.abs(tx), math.abs(ty))
tx = tx / max
ty = ty / max
if tx >= 0.5 then tx = 1 elseif tx <= -0.5 then tx = -1 else tx = 0 end
if ty >= 0.5 then ty = -1 elseif ty <= -0.5 then ty = 1 else ty = 0 end -- Why the hell is ty inverted ? .. but it works :/
if tx == 1 and ty == 0 then dir = 0
elseif tx == 1 and ty == -1 then dir = 45
elseif tx == 0 and ty == -1 then dir = 90
elseif tx == -1 and ty == -1 then dir = 135
elseif tx == -1 and ty == 0 then dir = 180
elseif tx == -1 and ty == 1 then dir = 225
elseif tx == 0 and ty == 1 then dir = 270
elseif tx == 1 and ty == 1 then dir = 315
end
return { generator = function()
local sradius = (radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2
local ad = rng.float(dir - spread, dir + spread)
local a = math.rad(ad)
local r = 0
local x = r * math.cos(a)
local y = r * math.sin(a)
local static = rng.percent(40)
local vel = sradius * ((24 - nb * 1.4) / 24) / 12
return {
trail = 1,
life = 12,
size = 12 - (12 - nb) * 0.7, sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = a, dirv = 0, dira = 0,
vel = rng.float(vel * 0.6, vel * 1.2), velv = 0, vela = 0,
r = rng.range(200, 230)/255, rv = 0, ra = 0,
g = rng.range(130, 160)/255, gv = 0.005, ga = 0.0005,
b = rng.range(50, 70)/255, bv = 0, ba = 0,
a = rng.range(255, 255)/255, av = static and -0.034 or 0, aa = 0.005,
}
end, },
function(self)
if nb > 0 then
local i = math.min(nb, 6)
i = (i * i) * radius
self.ps:emit(i)
nb = nb - 1
end
end,
30*radius*7*12,
"particle_cloud"
......@@ -17,34 +17,60 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local nb = 0
local nb = 12
local dir
local spread = spread or 55/2
local radius = radius or 6
return { gas = {w=60, h=60},
generator = function()
if nb < 10 then
nb = nb + 1
return {
--[[
{ sx = 3, sy = 29, dx = 3, dy = -3 },
{ sx = 3, sy = 30, dx = 3, dy = 0 },
{ sx = 3, sy = 31, dx = 3, dy = 3 },
local max = math.max(math.abs(tx), math.abs(ty))
tx = tx / max
ty = ty / max
if tx >= 0.5 then tx = 1 elseif tx <= -0.5 then tx = -1 else tx = 0 end
if ty >= 0.5 then ty = -1 elseif ty <= -0.5 then ty = 1 else ty = 0 end -- Why the hell is ty inverted ? .. but it works :/
{ sx = 4, sy = 29, dx = 3, dy = -3 },
{ sx = 4, sy = 30, dx = 3, dy = 0 },
{ sx = 4, sy = 31, dx = 3, dy = 3 },
]]
{ sx = 29, sy = 29, dx = -3, dy = -3 },
{ sx = 31, sy = 29, dx = 3, dy = -3 },
{ sx = 29, sy = 31, dx = -3, dy = 3 },
{ sx = 31, sy = 31, dx = 3, dy = 3 },
if tx == 1 and ty == 0 then dir = 0
elseif tx == 1 and ty == -1 then dir = 45
elseif tx == 0 and ty == -1 then dir = 90
elseif tx == -1 and ty == -1 then dir = 135
elseif tx == -1 and ty == 0 then dir = 180
elseif tx == -1 and ty == 1 then dir = 225
elseif tx == 0 and ty == 1 then dir = 270
elseif tx == 1 and ty == 1 then dir = 315
end
{ sx = 30, sy = 29, dx = 0, dy = -3 },
{ sx = 30, sy = 31, dx = 0, dy = 3 },
{ sx = 29, sy = 30, dx = -3, dy = 0 },
{ sx = 31, sy = 30, dx = 3, dy = 0 },
}
else return {}
end
return { generator = function()
local sradius = (radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2
local ad = rng.float(dir - spread, dir + spread)
local a = math.rad(ad)
local r = 0
local x = r * math.cos(a)
local y = r * math.sin(a)
local static = rng.percent(40)
local vel = sradius * ((24 - nb * 1.4) / 24) / 12
return {
trail = 1,
life = 12,
size = 12 - (12 - nb) * 0.7, sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = a, dirv = 0, dira = 0,
vel = rng.float(vel * 0.6, vel * 1.2), velv = 0, vela = 0,
r = rng.range(200, 255)/255, rv = 0, ra = 0,
g = rng.range(120, 170)/255, gv = 0.005, ga = 0.0005,
b = rng.range(0, 10)/255, bv = 0, ba = 0,
a = rng.range(25, 220)/255, av = static and -0.034 or 0, aa = 0.005,
}
end, },
function(self)end,
30*6
function(self)
if nb > 0 then
local i = math.min(nb, 6)
i = (i * i) * radius
self.ps:emit(i)
nb = nb - 1
end
end,
30*radius*7*12,
"particle_cloud"
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local nb = 0
return { gas = {w=60, h=60},
generator = function()
if nb < 10 then
nb = nb + 1
return {
--[[
{ sx = 3, sy = 29, dx = 3, dy = -3 },
{ sx = 3, sy = 30, dx = 3, dy = 0 },
{ sx = 3, sy = 31, dx = 3, dy = 3 },
{ sx = 4, sy = 29, dx = 3, dy = -3 },
{ sx = 4, sy = 30, dx = 3, dy = 0 },
{ sx = 4, sy = 31, dx = 3, dy = 3 },
]]
{ sx = 29, sy = 29, dx = -3, dy = -3 },
{ sx = 31, sy = 29, dx = 3, dy = -3 },
{ sx = 29, sy = 31, dx = -3, dy = 3 },
{ sx = 31, sy = 31, dx = 3, dy = 3 },
{ sx = 30, sy = 29, dx = 0, dy = -3 },
{ sx = 30, sy = 31, dx = 0, dy = 3 },
{ sx = 29, sy = 30, dx = -3, dy = 0 },
{ sx = 31, sy = 30, dx = 3, dy = 0 },
}
else return {}
end
end, },
function(self)end,
30*6
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local nb = 12
local dir
local spread = spread or 55/2
local radius = radius or 6
local max = math.max(math.abs(tx), math.abs(ty))
tx = tx / max
ty = ty / max
if tx >= 0.5 then tx = 1 elseif tx <= -0.5 then tx = -1 else tx = 0 end
if ty >= 0.5 then ty = -1 elseif ty <= -0.5 then ty = 1 else ty = 0 end -- Why the hell is ty inverted ? .. but it works :/
if tx == 1 and ty == 0 then dir = 0
elseif tx == 1 and ty == -1 then dir = 45
elseif tx == 0 and ty == -1 then dir = 90
elseif tx == -1 and ty == -1 then dir = 135
elseif tx == -1 and ty == 0 then dir = 180
elseif tx == -1 and ty == 1 then dir = 225
elseif tx == 0 and ty == 1 then dir = 270
elseif tx == 1 and ty == 1 then dir = 315
end
return { generator = function()
local sradius = (radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2
local ad = rng.float(dir - spread, dir + spread)
local a = math.rad(ad)
local r = 0
local x = r * math.cos(a)
local y = r * math.sin(a)
local static = rng.percent(40)
local vel = sradius * ((24 - nb * 1.4) / 24) / 12
return {
trail = 1,
life = 12,
size = 12 - (12 - nb) * 0.7, sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = a, dirv = 0, dira = 0,
vel = rng.float(vel * 0.6, vel * 1.2), velv = 0, vela = 0,
r = rng.range(140, 200)/255, rv = 0, ra = 0,
g = rng.range(180, 220)/255, gv = 0, ga = 0,
b = rng.range(220, 240)/255, bv = 0, ba = 0,
a = rng.range(230, 255)/255, av = 0, aa = 0,
}
end, },
function(self)
if nb > 0 then
local i = math.min(nb, 6)
i = (i * i) * radius
self.ps:emit(i)
nb = nb - 1
end
end,
30*radius*7*12,
"particle_cloud"
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local nb = 12
local dir
local spread = spread or 55/2
local radius = radius or 6
local max = math.max(math.abs(tx), math.abs(ty))
tx = tx / max
ty = ty / max
if tx >= 0.5 then tx = 1 elseif tx <= -0.5 then tx = -1 else tx = 0 end
if ty >= 0.5 then ty = -1 elseif ty <= -0.5 then ty = 1 else ty = 0 end -- Why the hell is ty inverted ? .. but it works :/
if tx == 1 and ty == 0 then dir = 0
elseif tx == 1 and ty == -1 then dir = 45
elseif tx == 0 and ty == -1 then dir = 90
elseif tx == -1 and ty == -1 then dir = 135
elseif tx == -1 and ty == 0 then dir = 180
elseif tx == -1 and ty == 1 then dir = 225
elseif tx == 0 and ty == 1 then dir = 270
elseif tx == 1 and ty == 1 then dir = 315
end
return { generator = function()
local sradius = (radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2
local ad = rng.float(dir - spread, dir + spread)
local a = math.rad(ad)
local r = 0
local x = r * math.cos(a)
local y = r * math.sin(a)
local static = rng.percent(40)
local vel = sradius * ((24 - nb * 1.4) / 24) / 12
return {
trail = 1,
life = 12,
size = 12 - (12 - nb) * 0.7, sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = a, dirv = 0, dira = 0,
vel = rng.float(vel * 0.6, vel * 1.2), velv = 0, vela = 0,
r = 0, rv = 0, ra = 0,
g = rng.range(80, 200)/255, gv = 0, ga = 0,
b = 0, bv = 0, ba = 0,
a = rng.range(80, 220)/255, av = 0, aa = 0,
}
end, },
function(self)
if nb > 0 then
local i = math.min(nb, 6)
i = (i * i) * radius
self.ps:emit(i)
nb = nb - 1
end
end,
30*radius*7*12,
"particle_cloud"
......@@ -141,7 +141,8 @@ newTalent{
local tg = {type="cone", range=0, radius=self:getTalentRange(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.ICE, 30 + self:getStr(50) * self:getTalentLevel(t), {type="freeze"})
self:project(tg, x, y, DamageType.ICE, 30 + self:getStr(50) * self:getTalentLevel(t))
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_cold", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/breath")
return true
end,
......
......@@ -126,7 +126,8 @@ newTalent{
local tg = {type="cone", range=0, radius=self:getTalentRange(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.FIREBURN, 30 + self:getStr(65) * self:getTalentLevel(t), {type="flame"})
self:project(tg, x, y, DamageType.FIREBURN, 30 + self:getStr(65) * self:getTalentLevel(t))
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_fire", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/breath")
return true
end,
......
......@@ -116,7 +116,8 @@ newTalent{
local tg = {type="cone", range=0, radius=self:getTalentRange(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.SAND, {dur=2+self:getTalentLevelRaw(t), dam=10 + self:getStr() * 0.3 * self:getTalentLevel(t)}, {type="flame"})
self:project(tg, x, y, DamageType.SAND, {dur=2+self:getTalentLevelRaw(t), dam=10 + self:getStr() * 0.3 * self:getTalentLevel(t)})
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_earth", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/breath")
return true
end,
......
......@@ -168,7 +168,8 @@ newTalent{
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local dam = 40 + self:getStr(80) * self:getTalentLevel(t)
self:project(tg, x, y, DamageType.LIGHTNING_DAZE, rng.avg(dam / 3, dam, 3), {type="lightning_explosion"})
self:project(tg, x, y, DamageType.LIGHTNING_DAZE, rng.avg(dam / 3, dam, 3))
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_lightning", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/breath")
return true
end,
......
......@@ -56,7 +56,8 @@ newTalent{
local tg = {type="cone", range=0, radius=self:getTalentRange(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.ACID, 30 + self:getWil(50) * self:getTalentLevel(t), {type="acid"})
self:project(tg, x, y, DamageType.ACID, 30 + self:getWil(50) * self:getTalentLevel(t))
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_acid", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/breath")
return true
end,
......@@ -84,7 +85,8 @@ newTalent{
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local dam = 30 + self:getWil(80) * self:getTalentLevel(t)
self:project(tg, x, y, DamageType.LIGHTNING, rng.avg(dam / 3, dam, 3), {type="lightning_explosion"})
self:project(tg, x, y, DamageType.LIGHTNING, rng.avg(dam / 3, dam, 3))
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_lightning", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/lightning")
return true
end,
......@@ -115,7 +117,8 @@ newTalent{
local tg = {type="cone", range=0, radius=self:getTalentRange(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.POISON, 30 + self:getWil(70) * self:getTalentLevel(t), {type="slime"})
self:project(tg, x, y, DamageType.POISON, 30 + self:getWil(70) * self:getTalentLevel(t))
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_slime", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/breath")
return true
end,
......
......@@ -53,7 +53,7 @@ newTalent{
points = 5,
random_ego = "attack",
mana = 30,
cooldown = 18,
-- cooldown = 18,
tactical = {
ATTACKAREA = 10,
},
......@@ -63,7 +63,8 @@ newTalent{
local tg = {type="cone", range=0, radius=3 + self:getTalentLevelRaw(t), friendlyfire=false, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.FLAMESHOCK, {dur=self:getTalentLevelRaw(t) + 2, dam=self:spellCrit(self:combatTalentSpellDamage(t, 10, 120))}, {type="flame"})
self:project(tg, x, y, DamageType.FLAMESHOCK, {dur=self:getTalentLevelRaw(t) + 2, dam=self:spellCrit(self:combatTalentSpellDamage(t, 10, 120))})
game.level.map:particleEmitter(self.x, self.y, tg.radius, "breath_fire", {radius=tg.radius, tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/fire")
return true
end,
......
......@@ -68,7 +68,7 @@ newTalent{
self:removeObject(inven, item)
local level = o.material_level or 1
local gem = game.zone:makeEntity(game.level, "object", {type="gem", special=function(e) return e.material_level == level end}, nil, true)
local gem = game.zone:makeEntity(game.level, "object", {type="gem", special=function(e) return not e.unique and e.material_level == level end}, nil, true)
if gem then
self:addObject(self.INVEN_INVEN, gem)
game.logPlayer(self, "You extract: %s", gem:getName{do_color=true, do_count=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