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

fix phial

improve particle effects


git-svn-id: http://svn.net-core.org/repos/t-engine4@700 51575b47-30f0-44d4-a5cc-537603b46e54
parent 97ae7d47
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ newEntity{ base = "BASE_LITE",
max_power = 15, power_regen = 1,
use_power = { name = "call light", power = 10,
use = function(self, who)
who:project({type="ball", range=0, friendlyfire=false, radius=20}, who.x, who.y, DamageType.LITE, 1)
who:project({type="ball", range=0, friendlyfire=false, radius=20}, who.x, who.y, engine.DamageType.LITE, 1)
game.logSeen(who, "%s brandishes the %s and banishes all shadows!", who.name:capitalize(), self:getName())
end
},
......
......@@ -45,7 +45,7 @@ newEntity{ base = "TRAP_WATER",
dam = resolvers.mbonus(90, 15),
combatAttackStr = function(self) return self.disarm_power * 2 end,
triggered = function(self, x, y, who)
self:project({type="ball",radius=2,x=x,y=y}, x, y, DamageType.PINNING, {dam=self.dam,dur=4})
self:project({type="ball",radius=2,x=x,y=y}, x, y, engine.DamageType.PINNING, {dam=self.dam,dur=4})
return true
end,
}
......@@ -20,7 +20,7 @@
return { generator = function()
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad + 90)
local dir = math.rad(ad)
local r = rng.range(15, 18)
return {
......@@ -30,8 +30,8 @@ return { generator = function()
x = r * math.cos(a), xv = 0.1, xa = 0,
y = r * math.sin(a), yv = 0.1, ya = 0,
dir = dir, dirv = 1, dira = 0,
vel = 1, velv = 0, vela = 0,
dir = dir, dirv = 0.1, dira = 0,
vel = 1, velv = 0, vela = -0.2,
r = rng.range(130, 220)/255, rv = rng.range(0, 10), ra = 0,
g = 0, gv = 0, ga = 0,
......
......@@ -32,7 +32,7 @@ for i = -radius, radius do for j = -radius, radius do
else
gs[lx] = gs[lx] or {}
gs[lx][ly] = {x=lastx, y=lasty, radius=math.sqrt(lastx^2 + lasty^2)}
print("block", lx, ly, "=>", math.sqrt(lastx^2 + lasty^2))
-- print("block", lx, ly, "=>", math.sqrt(lastx^2 + lasty^2))
end
lx, ly = l()
end
......@@ -50,7 +50,7 @@ return { generator = function()
local bx = math.floor(x / engine.Map.tile_w)
local by = math.floor(y / engine.Map.tile_h)
if gs[bx] and gs[bx][by] and rng.chance(2) then
print("block at angle", ad, radius, ":=>", gs[bx][by].radius)
-- print("block at angle", ad, radius, ":=>", gs[bx][by].radius)
radius = gs[bx][by].radius
sradius = (radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2
local r = rng.float(sradius - 5, sradius)
......@@ -61,18 +61,18 @@ return { generator = function()
return {
trail = 1,
life = 12,
size = 3, sizev = static and 0.1 or 0.3, sizea = 0,
life = 24,
size = 3, sizev = static and 0.05 or 0.15, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = static and a + math.rad(90 - rng.range(10, 20)) or a, dirv = 0, dira = 0,
vel = static and -1 or (-1-nb) * radius / 2.7, velv = 0, vela = static and -0.01 or rng.float(-0.3, -0.2),
vel = static and -2 or 0.5 * (-1-nb) * radius / 2.7, velv = 0, vela = static and -0.01 or rng.float(-0.3, -0.2) * 0.3,
r = rng.range(200, 255)/255, rv = 0, ra = 0,
g = rng.range(120, 170)/255, gv = 0.01, ga = 0.001,
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.07 or 0, aa = 0.01,
a = rng.range(25, 220)/255, av = static and -0.034 or 0, aa = 0.005,
}
end, },
function(self)
......
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