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