summaryrefslogtreecommitdiffhomepage
path: root/not/Hero.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-07-16 23:09:09 +0200
committerAki <nthirtyone@gmail.com>2017-07-16 23:09:09 +0200
commit539faff13d2ca690d94102abf6eef85572e9a287 (patch)
tree597e09efbbcd2b09b67a28d3d4ece372b1a54309 /not/Hero.lua
parent0c70843b512c0e1633f77f5b0355cf5c2f80efe5 (diff)
downloadroflnauts-539faff13d2ca690d94102abf6eef85572e9a287.zip
roflnauts-539faff13d2ca690d94102abf6eef85572e9a287.tar.gz
roflnauts-539faff13d2ca690d94102abf6eef85572e9a287.tar.bz2
Additional condition for trail to appear
Wider range for random position
Diffstat (limited to 'not/Hero.lua')
-rw-r--r--not/Hero.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/not/Hero.lua b/not/Hero.lua
index 0406e51..cb4d249 100644
--- a/not/Hero.lua
+++ b/not/Hero.lua
@@ -113,8 +113,8 @@ function Hero:update (dt)
end
-- Trail spawner
- if self.combo > 100 then
- local dx, dy = love.math.random(-4, 4), love.math.random(-4, 4)
+ if self.combo > 100 and self.punchCooldown > 0 then
+ local dx, dy = love.math.random(-5, 5), love.math.random(-5, 5)
self:createEffect("trail", dx, dy)
end