Commit 1c0f05a50bddae831f93b4fd7145023c9120fa9b

Authored by DarkGod
1 parent a00429bd

lightning storm visual for the wand

... ... @@ -69,7 +69,7 @@ newEntity{
69 69 local MapEffect = require "engine.MapEffect"
70 70 who:project(tg, x, y, function(px, py)
71 71 game.level.map:addEffect(who, px, py, 5, DamageType.LIGHTNING_DAZE, dam, 0, 5, nil,
72   - MapEffect.new{color_br=30, color_bg=150, color_bb=160, effect_shader="shader_images/retch_effect.png"}, nil, true)
  72 + {zdepth=6, type="lightning_storm"}, nil, true)
73 73 end)
74 74 game:playSoundNear(who, "talents/lightning")
75 75 return {id=true, used=true}
... ...
  1 +-- ToME - Tales of Maj'Eyal
  2 +-- Copyright (C) 2009 - 2018 Nicolas Casalini
  3 +--
  4 +-- This program is free software: you can redistribute it and/or modify
  5 +-- it under the terms of the GNU General Public License as published by
  6 +-- the Free Software Foundation, either version 3 of the License, or
  7 +-- (at your option) any later version.
  8 +--
  9 +-- This program is distributed in the hope that it will be useful,
  10 +-- but WITHOUT ANY WARRANTY; without even the implied warranty of
  11 +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12 +-- GNU General Public License for more details.
  13 +--
  14 +-- You should have received a copy of the GNU General Public License
  15 +-- along with this program. If not, see <http://www.gnu.org/licenses/>.
  16 +--
  17 +-- Nicolas Casalini "DarkGod"
  18 +-- darkgod@te4.org
  19 +
  20 +base_size = 64
  21 +can_shift = true
  22 +
  23 +local nb = 0
  24 +local nextp = 5
  25 +
  26 +return { blend_mode=core.particles.BLEND_SHINY, generator = function()
  27 + local ad = rng.range(0, 360)
  28 + local a = math.rad(ad)
  29 + local dir = math.rad(ad)
  30 + local r = rng.range(0, 32)
  31 +
  32 + return {
  33 + life = 100,
  34 + size = rng.range(70, 100), sizev = -0.9, sizea = 0,
  35 +
  36 + x = r * math.cos(a), xv = 0, xa = 0,
  37 + y = r * math.sin(a), yv = 0, ya = 0,
  38 + dir = 0, dirv = 0, dira = 0,
  39 + vel = 0, velv = 0, vela = 0,
  40 +
  41 + r = 1, rv = 0, ra = 0,
  42 + g = 1, gv = 0, ga = 0,
  43 + b = 1, gv = 0, ga = 0,
  44 + a = rng.float(0.05, 0.08), av = 0.0152, aa = -0.001,
  45 + }
  46 +end, },
  47 +function(self)
  48 + if nb == 0 then self.ps:emit(1) end
  49 + nb = nb + 1
  50 + if nb >= nextp then
  51 + nb = 0
  52 + nextp = rng.range(3, 15)
  53 + end
  54 +end,
  55 +10, "particles_images/lightning_storm_"..rng.range(1, 5)
... ...