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

Melee attacks now display a visual feedback

git-svn-id: http://svn.net-core.org/repos/t-engine4@2505 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0c7b45a0
No related branches found
No related tags found
No related merge requests found
Showing
with 51 additions and 0 deletions
......@@ -365,6 +365,8 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
target:attackTarget(self, nil, nil, true)
end
game.level.map:particleEmitter(target.x, target.y, 1, "melee_attack")
return self:combatSpeed(weapon), hitted
end
......
game/modules/tome/data/gfx/attacks/attack_green_01.png

5.93 KiB

game/modules/tome/data/gfx/attacks/attack_green_02.png

3.9 KiB

game/modules/tome/data/gfx/attacks/attack_green_03.png

3.83 KiB

game/modules/tome/data/gfx/attacks/attack_green_04.png

3.71 KiB

game/modules/tome/data/gfx/attacks/attack_green_05.png

3.9 KiB

game/modules/tome/data/gfx/attacks/attack_purple_01.png

6.23 KiB

game/modules/tome/data/gfx/attacks/attack_purple_02.png

4.41 KiB

game/modules/tome/data/gfx/attacks/attack_purple_03.png

4.03 KiB

game/modules/tome/data/gfx/attacks/attack_purple_04.png

3.68 KiB

game/modules/tome/data/gfx/attacks/attack_red_01.png

4.09 KiB

game/modules/tome/data/gfx/attacks/attack_red_02.png

3.32 KiB

game/modules/tome/data/gfx/attacks/attack_red_03.png

3.18 KiB

game/modules/tome/data/gfx/attacks/attack_red_04.png

3.53 KiB

game/modules/tome/data/gfx/attacks/attack_red_05.png

3.58 KiB

game/modules/tome/data/gfx/attacks/attack_white_01.png

6.13 KiB

game/modules/tome/data/gfx/attacks/attack_white_02.png

3.75 KiB

game/modules/tome/data/gfx/attacks/attack_white_03.png

4.71 KiB

game/modules/tome/data/gfx/attacks/attack_white_04.png

3.21 KiB

-- ToME - Tales of Maj'Eyal
-- 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 first = true
base_size = 32
return { generator = function()
local size = rng.range(18, 28)
local x = rng.range(-8, 8)
local y = rng.range(-8, 8)
return {
life = 5,
size = size, sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = 0, dirv = 0, dira = 0,
vel = 0, velv = 0, vela = 0,
r = 1, rv = 0, ra = 0,
g = 1, gv = 0, ga = 0,
b = 1, bv = 0, ba = 0,
a = rng.float(0.6, 1), av = 0.1, aa = 0,
}
end, },
function(self)
if first then
self.ps:emit(1)
first = false
end
end,
1, ("attacks/attack_red_%02d"):format(rng.range(1, 5))
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