aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Bradley <1029chris@gmail.com>2022-02-19 16:56:48 -0800
committerChris Bradley <1029chris@gmail.com>2022-02-19 16:56:48 -0800
commit395ffd247492b0708b6290824ae61af8fccc1869 (patch)
tree27403919243579c2db5362a4fba1fb30898eb3fa
parent5bfa4bdc01f19c019e5a8b8e0ac10511d3beaef3 (diff)
Tokens aquired! final boss is indeed cool and epic
-rw-r--r--bullets.lua2
-rw-r--r--enemies.lua21
-rw-r--r--pickups.lua1
-rw-r--r--ui.lua4
-rw-r--r--update.lua2
-rw-r--r--waves.lua2
6 files changed, 17 insertions, 15 deletions
diff --git a/bullets.lua b/bullets.lua
index 2884621..715a1ee 100644
--- a/bullets.lua
+++ b/bullets.lua
@@ -5,7 +5,7 @@ function addbullet(x, y, velx, vely, good, sprite)
}
sprite = sprite or 2
- good = good or false
+ --good = good or false
function bullet.draw()
spr(sprite, x, y)
diff --git a/enemies.lua b/enemies.lua
index de015a0..942ab65 100644
--- a/enemies.lua
+++ b/enemies.lua
@@ -350,15 +350,15 @@ function addwallboss(x, y, length, points, speed, stay, move, isboss)
health = 3.5*length*#players, --3.5
shootcooldown = 3,
speed = speed,
- bulletfired = {},
shot = enemyshot,
collide = enemycollide
}
+ bulletfired = {}
enemy.starthealth = enemy.health
if isboss then enemy.health *= 3 end -- triple health if the boss
for i = 1, length, 1 do
- enemy.bulletfired[i] = 0
+ bulletfired[i] = 0
end
function enemy.draw()
@@ -370,13 +370,13 @@ function addwallboss(x, y, length, points, speed, stay, move, isboss)
end
if enemy.inv < 0 or flashtime then
for i = 2, length-1, 1 do
- spr(93+enemy.bulletfired[i]+dmgwall, x, -8+y+i*8)
+ spr(93+bulletfired[i]+dmgwall, x, -8+y+i*8)
if i < length-2 then
spr(79+((i%3)%2*16)+dmgwall, x+8, -8+y+i*8, 1, 1, false, (i%3 == 2))
end
end
- spr(77+enemy.bulletfired[1]+dmgwall, x, y)
- spr(77+enemy.bulletfired[1]+dmgwall, x, y+length*8-8, 1, 1, false, true)
+ spr(77+bulletfired[1]+dmgwall, x, y)
+ spr(77+bulletfired[1]+dmgwall, x, y+length*8-8, 1, 1, false, true)
spr(70+dmgwall,x+8,y,2,2)
spr(70+dmgwall,x+8,y+length*8-16,2,2,false,true)
spr(79+dmgwall,x+8,y+length*8-24,1,1, false, true)
@@ -422,9 +422,9 @@ function addwallboss(x, y, length, points, speed, stay, move, isboss)
if attack(i, enemy.move) then
addbullet(enemy.x, enemy.y-8+i*8, -1, 0)
sfx(15, 2)
- enemy.bulletfired[i] = 1
+ bulletfired[i] = 1
else
- enemy.bulletfired[i] = 0
+ bulletfired[i] = 0
end
end
end
@@ -677,16 +677,17 @@ function addfinalboss() --THE FINAL BOSS!!!!!!! WOOOAAAHHHHHH!!!!!!!!!!!!!!!!!!!
end
enemydie(enemy,17,2,1000,true) --die!!!!!!!
else
+ music(-1)
killallenemies()
despawnallbullets = true
- --enemy.speed += 0.002
+ enemy.speed += 0.002
dramaticdeathtimer -= ft
if enemy.shootcooldown < 0 then
enemy.shootcooldown = dramaticdeathtimer/8
explosion(103+rnd(8), rnd(128),32)
shake = rnd(10)
- --sfx(17,1)
- --sfx(21,0)
+ sfx(17,1)
+ sfx(21,0)
end
end
enemymisc(enemy)
diff --git a/pickups.lua b/pickups.lua
index cd0de85..0f21f26 100644
--- a/pickups.lua
+++ b/pickups.lua
@@ -43,6 +43,7 @@ function addpickup(x, y, type)
pickupcolor = 12
elseif type == "3shoot" then
player.shoot3 = true
+ player.shootspeed = 0.35
pickupcolor = 9
else
player.health = 3
diff --git a/ui.lua b/ui.lua
index c9b17c5..6bb37e3 100644
--- a/ui.lua
+++ b/ui.lua
@@ -85,8 +85,8 @@ function credits(x,y)
-- default vaues
-- x = 10
-- y = 100
- local sintimecredits = sin(t())*2
- local timemodcredits = (t()%2<1)
+ local sintimecredits = circletimex*1.5
+ local timemodcredits = t()%2<1
palt(2,true)
palt(0,false)
diff --git a/update.lua b/update.lua
index cfaddab..843e5ff 100644
--- a/update.lua
+++ b/update.lua
@@ -1,7 +1,7 @@
--scrolling and respawn stuff
respawntimer -= ft
--similar math elements grouped to lower tokens
-flashtime = (ceil(t()*10%2) == 1) --for flashing elements (ship, score)
+flashtime = ceil(t()*10%2) == 1 --for flashing elements (ship, score)
circletimex = sin(t())*3 -- for elements that move in a circle (respawn timer)
circletimey = cos(t())*3
screenshakex = sin(shake+t())*shake
diff --git a/waves.lua b/waves.lua
index 0676054..4daf657 100644
--- a/waves.lua
+++ b/waves.lua
@@ -1,5 +1,5 @@
wave = {} --store wave functions here
-currentwave = 19 --THIS IS THE CURRENT WAVE, SHOLD BE 1 UNLESS TESTING SOMETHING
+currentwave = 1 --THIS IS THE CURRENT WAVE, SHOLD BE 1 UNLESS TESTING SOMETHING
currentwavetime = 0
delaytimer = 0
everysecondtimer = 0