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

Changed hyms, chants and moonbeam particle effects

git-svn-id: http://svn.net-core.org/repos/t-engine4@5829 51575b47-30f0-44d4-a5cc-537603b46e54
parent 00211182
No related branches found
No related tags found
No related merge requests found
...@@ -29,8 +29,8 @@ return { generator = function() ...@@ -29,8 +29,8 @@ return { generator = function()
return { return {
trail = 1, trail = 1,
life = 10, life = rng.range(10,20),
size = 4, sizev = 0.1, sizea = 0, size = rng.range(2,6), sizev = -0.1, sizea = 0,
x = r * math.cos(a), xv = 0, xa = 0, x = r * math.cos(a), xv = 0, xa = 0,
y = r * math.sin(a), yv = 0, ya = 0, y = r * math.sin(a), yv = 0, ya = 0,
...@@ -40,10 +40,10 @@ return { generator = function() ...@@ -40,10 +40,10 @@ return { generator = function()
r = col, rv = 0, ra = 0, r = col, rv = 0, ra = 0,
g = col, gv = 0, ga = 0, g = col, gv = 0, ga = 0,
b = col, bv = 0, ba = 0, b = col, bv = 0, ba = 0,
a = rng.range(220, 255)/255, av = 0, aa = 0, a = rng.range(220, 255)/255, av = -0.05, aa = 0,
} }
end, }, end, },
function(self) function(self)
self.ps:emit(10) self.ps:emit(10)
end, end,
100 100, "particle_torus"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
base_size = 32 base_size = 32
return { generator = function() return { blend_mode=core.particles.BLEND_ADDITIVE, generator = function()
local ad = rng.range(0, 360) local ad = rng.range(0, 360)
local a = math.rad(ad) local a = math.rad(ad)
local dir = math.rad(ad + 90) local dir = math.rad(ad + 90)
...@@ -27,22 +27,22 @@ return { generator = function() ...@@ -27,22 +27,22 @@ return { generator = function()
local dirv = math.rad(1) local dirv = math.rad(1)
return { return {
trail = 1, trail = 0,
life = 10, life = rng.range(10, 20),
size = 4, sizev = -0.1, sizea = 0, size = rng.range(2, 6), sizev = -0.1, sizea = 0,
x = r * math.cos(a), xv = 0, xa = 0, x = r * math.cos(a), xv = 0, xa = 0,
y = r * math.sin(a), yv = 0, ya = 0, y = r * math.sin(a), yv = 0, ya = 0,
dir = dir, dirv = dirv, dira = 0, dir = dir, dirv = -dirv, dira = 0,
vel = rng.percent(50) and -1 or 1, velv = 0, vela = 0, vel = rng.percent(50) and -1 or 1, velv = 0, vela = 0,
r = rng.range(220, 255)/255, rv = 0, ra = 0, r = rng.range(220, 255)/255, rv = 0, ra = 0,
g = rng.range(200, 230)/255, gv = 0, ga = 0, g = rng.range(200, 230)/255, gv = 0, ga = 0,
b = 0, bv = 0, ba = 0, b = 0, bv = 0, ba = 0,
a = rng.range(25, 220)/255, av = 0, aa = 0, a = rng.range(25, 220)/255, av = -0.03, aa = 0,
} }
end, }, end, },
function(self) function(self)
self.ps:emit(10) self.ps:emit(10)
end, end,
100 200, "particle_torus"
...@@ -17,43 +17,71 @@ ...@@ -17,43 +17,71 @@
-- Nicolas Casalini "DarkGod" -- Nicolas Casalini "DarkGod"
-- darkgod@te4.org -- darkgod@te4.org
-- Make the ray -- Make the 2 main forks
local ray = {}
local tiles = math.ceil(math.sqrt(tx*tx+ty*ty))
local tx = tx * engine.Map.tile_w local tx = tx * engine.Map.tile_w
local ty = ty * engine.Map.tile_h local ty = ty * engine.Map.tile_h
local breakdir = math.rad(rng.range(-8, 8)) local basesize = math.sqrt((ty*ty)+(tx*tx))
ray.dir = math.atan2(ty, tx) local basedir = math.atan2(ty, tx)
ray.size = math.sqrt(tx*tx+ty*ty)
local nbp = 0
-- Populate the beam based on the forks local points = {}
return { generator = function()
local a = ray.dir local function make_beam(fork_i)
local rad = rng.range(-3,3) local c = rng.range(20, 80)/255
local ra = math.rad(rad) local a = 1 or rng.float(0.7, 0.9)
local r = rng.range(1, ray.size) local size = fork_i == 1 and 1 or 1
local col = rng.range(20, 80)/255 local starta = basedir+math.pi/2
local starts = rng.range(-0, 0)
return { points[#points+1] = {c=c, a=a, size=size, x=math.cos(starta) * starts, y=math.sin(starta) * starts, prev=-1}
life = 14,
size = rng.range(4, 6), sizev = -0.1, sizea = 0, local nb = 3
for i = 0, nb - 1 do
x = r * math.cos(a) + 2 * math.cos(ra), xv = 0, xa = 0, -- Split point in the segment
y = r * math.sin(a) + 2 * math.sin(ra), yv = 0, ya = 0, local split = rng.range(0, basesize / nb) + i * (basesize / nb)
dir = rng.percent(50) and ray.dir + math.rad(rng.range(50, 130)) or ray.dir - math.rad(rng.range(50, 130)), dirv = 0, dira = 0, local dev = rng.range(-4, 4) * (9 + fork_i) / 10
vel = rng.percent(30) and 1 or 0, velv = -0.1, vela = 0.01, points[#points+1] = {
c=c, a=a,
r = col, rv = 0, ra = 0, movea=basedir+dev+math.pi/2,
g = col, gv = 0, ga = 0, size=size + rng.range(-2, 2),
b = col, bv = 0, ba = 0, x=math.cos(basedir) * split + math.cos(basedir+math.pi/2) * dev,
a = rng.range(220, 255)/255, av = 0, aa = 0, y=math.sin(basedir) * split + math.sin(basedir+math.pi/2) * dev,
prev=#points-1
}
end
points[#points+1] = {c=c, a=a, size=size, x=tx, y=ty, prev=#points-1}
nbp = #points
end
for fork_i = 1, 20 do make_beam(fork_i) end
local last_id = -1
-- Populate the lightning based on the forks
return { engine=core.particles.ENGINE_LINES, generator = function(id)
local p = table.remove(points, 1)
local ret = {
life = 6, trail=(p.prev == -1) and -1 or last_id,
size = p.size, sizev = 0, sizea = 0,
x = p.x, xv = 0, xa = 0,
y = p.y, yv = 0, ya = 0,
dir = p.movea, dirv = 0, dira = 0,
vel = rng.float(-1, 1), velv = 0, vela = 0,
r = p.c, rv = 0, ra = 0,
g = p.c, gv = 0, ga = 0,
b = p.c, bv = 0, ba = 0,
a = 0.8, av = 0, aa = 0.001,
} }
last_id = id
return ret
end, }, end, },
function(self) function(self)
self.nb = (self.nb or 0) + 1 if nbp > 0 then
if self.nb < 6 then self.ps:emit(10)
self.ps:emit(30*tiles) nbp = nbp - 10
end end
end, end,
14*30*tiles, nbp, "particles_images/beam"
"particle_torus"
...@@ -25,6 +25,7 @@ newTalent{ ...@@ -25,6 +25,7 @@ newTalent{
points = 5, points = 5,
cooldown = 20, cooldown = 20,
negative = 20, negative = 20,
no_energy = true,
tactical = { DEFEND = 2, ATTACKAREA = {DARKNESS = 1} }, tactical = { DEFEND = 2, ATTACKAREA = {DARKNESS = 1} },
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 4, 30) end, getDamage = function(self, t) return self:combatTalentSpellDamage(t, 4, 30) end,
getDuration = function(self, t) return 3 + math.ceil(self:getTalentLevel(t)) end, getDuration = function(self, t) return 3 + math.ceil(self:getTalentLevel(t)) end,
...@@ -38,8 +39,8 @@ newTalent{ ...@@ -38,8 +39,8 @@ newTalent{
action = function(self, t) action = function(self, t)
-- Add a lasting map effect -- Add a lasting map effect
game.level.map:addEffect(self, game.level.map:addEffect(self,
self.x, self.y, t.getDuration(self, t), self.x, self.y, self:spellCrit(t.getDuration(self, t)),
DamageType.SHIFTINGSHADOWS, t.getDamage(self, t), DamageType.SHIFTINGSHADOWS, self:spellCrit(t.getDamage(self, t)),
self:getTalentRadius(t), self:getTalentRadius(t),
5, nil, 5, nil,
engine.Entity.new{alpha=75, display='', color_br=60, color_bg=10, color_bb=60}, engine.Entity.new{alpha=75, display='', color_br=60, color_bg=10, color_bb=60},
...@@ -65,6 +66,7 @@ newTalent{ ...@@ -65,6 +66,7 @@ newTalent{
points = 5, points = 5,
cooldown = 20, cooldown = 20,
positive = 20, positive = 20,
no_energy = true,
tactical = { DEFEND = 2, ATTACKAREA = {FIRE = 0.5, LIGHT = 0.5} }, tactical = { DEFEND = 2, ATTACKAREA = {FIRE = 0.5, LIGHT = 0.5} },
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 2, 15) end, getDamage = function(self, t) return self:combatTalentSpellDamage(t, 2, 15) end,
getDuration = function(self, t) return 3 + math.ceil(self:getTalentLevel(t)) end, getDuration = function(self, t) return 3 + math.ceil(self:getTalentLevel(t)) end,
...@@ -81,8 +83,8 @@ newTalent{ ...@@ -81,8 +83,8 @@ newTalent{
self:project(tg, self.x, self.y, DamageType.LITE, 1) self:project(tg, self.x, self.y, DamageType.LITE, 1)
-- Add a lasting map effect -- Add a lasting map effect
game.level.map:addEffect(self, game.level.map:addEffect(self,
self.x, self.y, t.getDuration(self, t), self.x, self.y, self:spellCrit(t.getDuration(self, t)),
DamageType.BLAZINGLIGHT, t.getDamage(self, t), DamageType.BLAZINGLIGHT, self:spellCrit(t.getDamage(self, t)),
radius, radius,
5, nil, 5, nil,
engine.Entity.new{alpha=75, display='', color_br=250, color_bg=200, color_bb=10}, engine.Entity.new{alpha=75, display='', color_br=250, color_bg=200, color_bb=10},
...@@ -109,6 +111,7 @@ newTalent{ ...@@ -109,6 +111,7 @@ newTalent{
cooldown = 20, cooldown = 20,
positive = 20, positive = 20,
negative = 20, negative = 20,
no_energy = true,
tactical = { DEFEND = 2, ATTACKAREA = 1 }, tactical = { DEFEND = 2, ATTACKAREA = 1 },
getDuration = function(self, t) return 3 + math.ceil(self:getTalentLevel(t)) end, getDuration = function(self, t) return 3 + math.ceil(self:getTalentLevel(t)) end,
range = 0, range = 0,
...@@ -121,7 +124,7 @@ newTalent{ ...@@ -121,7 +124,7 @@ newTalent{
action = function(self, t) action = function(self, t)
-- Add a lasting map effect -- Add a lasting map effect
game.level.map:addEffect(self, game.level.map:addEffect(self,
self.x, self.y, t.getDuration(self, t), self.x, self.y, self:spellCrit(t.getDuration(self, t)),
DamageType.SANCTITY, 1, DamageType.SANCTITY, 1,
self:getTalentRadius(t), self:getTalentRadius(t),
5, nil, 5, nil,
...@@ -147,6 +150,7 @@ newTalent{ ...@@ -147,6 +150,7 @@ newTalent{
cooldown = 20, cooldown = 20,
positive = 20, positive = 20,
negative = 20, negative = 20,
no_energy = true,
tactical = { DEFEND = 2, ATTACKAREA = {LIGHT = 0.5, DARKNESS = 0.5} }, tactical = { DEFEND = 2, ATTACKAREA = {LIGHT = 0.5, DARKNESS = 0.5} },
getDuration = function(self, t) return 3 + math.ceil(self:getTalentLevel(t)) end, getDuration = function(self, t) return 3 + math.ceil(self:getTalentLevel(t)) end,
range = 0, range = 0,
...@@ -160,8 +164,8 @@ newTalent{ ...@@ -160,8 +164,8 @@ newTalent{
action = function(self, t) action = function(self, t)
-- Add a lasting map effect -- Add a lasting map effect
game.level.map:addEffect(self, game.level.map:addEffect(self,
self.x, self.y, t.getDuration(self, t), self.x, self.y, self:spellCrit(t.getDuration(self, t)),
DamageType.WARDING, t.getDamage(self, t), DamageType.WARDING, self:spellCrit(t.getDamage(self, t)),
self:getTalentRadius(t), self:getTalentRadius(t),
5, nil, 5, nil,
engine.Entity.new{alpha=75, display='', color_br=200, color_bg=200, color_bb=200}, engine.Entity.new{alpha=75, display='', color_br=200, color_bg=200, color_bb=200},
...@@ -179,4 +183,3 @@ newTalent{ ...@@ -179,4 +183,3 @@ newTalent{
format(radius, damage, (damDesc (self, DamageType.LIGHT, damage)), (damDesc (self, DamageType.DARKNESS, damage)), duration) format(radius, damage, (damDesc (self, DamageType.LIGHT, damage)), (damDesc (self, DamageType.DARKNESS, damage)), duration)
end, end,
} }
...@@ -27,6 +27,7 @@ newTalent{ ...@@ -27,6 +27,7 @@ newTalent{
points = 5, points = 5,
cooldown = 20, cooldown = 20,
positive = -10, positive = -10,
no_energy = true,
requires_target = true, requires_target = true,
tactical = { DISABLE = 2 }, tactical = { DISABLE = 2 },
range = function(self, t) return math.floor (self:getTalentLevel(t)) end, range = function(self, t) return math.floor (self:getTalentLevel(t)) end,
...@@ -40,7 +41,7 @@ newTalent{ ...@@ -40,7 +41,7 @@ newTalent{
local trap = game.level.map(tx, ty, Map.TRAP) local trap = game.level.map(tx, ty, Map.TRAP)
if trap then return end if trap then return end
local dam = t.getDazeDuration(self, t) local dam = self:spellCrit(t.getDazeDuration(self, t))
local trap = Trap.new{ local trap = Trap.new{
name = "glyph of paralysis", name = "glyph of paralysis",
type = "elemental", id_by_type=true, unided_name = "trap", type = "elemental", id_by_type=true, unided_name = "trap",
...@@ -92,6 +93,7 @@ newTalent{ ...@@ -92,6 +93,7 @@ newTalent{
points = 5, points = 5,
positive = -10, positive = -10,
cooldown = 20, cooldown = 20,
no_energy = true,
tactical = { DISABLE = 2 }, tactical = { DISABLE = 2 },
requires_target = true, requires_target = true,
range = function(self, t) return math.floor (self:getTalentLevel(t)) end, range = function(self, t) return math.floor (self:getTalentLevel(t)) end,
...@@ -105,7 +107,7 @@ newTalent{ ...@@ -105,7 +107,7 @@ newTalent{
local trap = game.level.map(tx, ty, Map.TRAP) local trap = game.level.map(tx, ty, Map.TRAP)
if trap then return end if trap then return end
local dam = t.getDamage(self, t) local dam = self:spellCrit(t.getDamage(self, t))
local sp = self:combatSpellpower() local sp = self:combatSpellpower()
local trap = Trap.new{ local trap = Trap.new{
name = "glyph of repulsion", name = "glyph of repulsion",
...@@ -165,6 +167,7 @@ newTalent{ ...@@ -165,6 +167,7 @@ newTalent{
points = 5, points = 5,
cooldown = 20, cooldown = 20,
positive = -10, positive = -10,
no_energy = true,
tactical = { ATTACKAREA = {LIGHT = 2} }, tactical = { ATTACKAREA = {LIGHT = 2} },
requires_target = true, requires_target = true,
range = function(self, t) return math.floor (self:getTalentLevel(t)) end, range = function(self, t) return math.floor (self:getTalentLevel(t)) end,
...@@ -178,7 +181,7 @@ newTalent{ ...@@ -178,7 +181,7 @@ newTalent{
local trap = game.level.map(tx, ty, Map.TRAP) local trap = game.level.map(tx, ty, Map.TRAP)
if trap then return end if trap then return end
local dam = t.getDamage(self, t) local dam = self:spellCrit(t.getDamage(self, t))
local trap = Trap.new{ local trap = Trap.new{
name = "glyph of explosion", name = "glyph of explosion",
type = "elemental", id_by_type=true, unided_name = "trap", type = "elemental", id_by_type=true, unided_name = "trap",
...@@ -233,6 +236,7 @@ newTalent{ ...@@ -233,6 +236,7 @@ newTalent{
points = 5, points = 5,
cooldown = 20, cooldown = 20,
positive = -10, positive = -10,
no_energy = true,
tactical = { DISABLE = 2 }, tactical = { DISABLE = 2 },
requires_target = true, requires_target = true,
range = function(self, t) return math.floor (self:getTalentLevel(t)) end, range = function(self, t) return math.floor (self:getTalentLevel(t)) end,
...@@ -246,7 +250,7 @@ newTalent{ ...@@ -246,7 +250,7 @@ newTalent{
local trap = game.level.map(tx, ty, Map.TRAP) local trap = game.level.map(tx, ty, Map.TRAP)
if trap then return end if trap then return end
local dam = t.getSlow(self, t) local dam = self:spellCrit(t.getSlow(self, t))
local trap = Trap.new{ local trap = Trap.new{
name = "glyph of fatigue", name = "glyph of fatigue",
type = "elemental", id_by_type=true, unided_name = "trap", type = "elemental", id_by_type=true, unided_name = "trap",
......
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