diff options
| author | Chris Bradley <1029chris@gmail.com> | 2022-02-18 15:38:37 -0800 |
|---|---|---|
| committer | Chris Bradley <1029chris@gmail.com> | 2022-02-18 15:38:37 -0800 |
| commit | ef48284d5dbda449ad74d1da2bfe9bf02557b785 (patch) | |
| tree | ebd6e1bdbd037eb14cd621cb3d4285000b35cb61 /waves.lua | |
| parent | 803b40cd9ba514c1b6deb15e995723ba653474e4 (diff) | |
Final boss!! other stuff too :sweat_smile:
bullets now cause explosions where they hit
enemies drop random pickups again, but only health
high score is saved!!!!
other tweaks, i dunno i forgot.
Diffstat (limited to 'waves.lua')
| -rw-r--r-- | waves.lua | 36 |
1 files changed, 28 insertions, 8 deletions
@@ -235,17 +235,37 @@ wave[16] = { everysecond = wave[8].everysecond, } ---ending score screen wave[17] = { - delay = 3, + delay = 0, start = function() - scorescreen = true + addfinalboss() + addballshooter(128, 56, 0.1) + end, + everysecond = function() + local y = rnd(30)+50 + addbasicenemy(115,y,0.4+rnd(0.4)) end } +--ending score screen +wave[18] = { + delay = 3, + start = function() + if #players == 1 then + dset(0, currentscore) --set singleplayer score + else + dset(1, currentscore) --set multiplayer score + end + end, + conditions = function() + end +} + --wave[currentwave].start() --music(0, 0, 3) +foreach(wave, function(wave) if not wave.conditions then wave.conditions = function() if #enemies < 1 then return true end end end end) --if there are no conditons for a wave, give them one. look at all those ends!!!! + function updatewaves() currentwavetime += ft everysecondtimer += ft @@ -255,7 +275,7 @@ function updatewaves() wave[currentwave].everysecond() end end - if (wave[currentwave].conditions and wave[currentwave].conditions() or #enemies < 1) then + if wave[currentwave].conditions() then delaytimer += ft if delaytimer > wave[min(currentwave+1, #wave)].delay then if changedmusic and currentwave ~= 15 then @@ -266,10 +286,10 @@ function updatewaves() currentwave += 1 currentwavetime = 0 delaytimer = 0 - currentwave = (currentwave - 1) % #wave+1 --temporarily looping the waves - if currentwave < checkpoint then - checkpoint = 1 - end + -- currentwave = (currentwave - 1) % #wave+1 --temporarily looping the waves + -- if currentwave < checkpoint then + -- checkpoint = 1 + -- end wave[currentwave].start() end end |
