-- seizure warning

local tee = 0

function buggy()
  dink.sneedler()
  for i = 1, 40 do
    local bug = dink.create_sprite(math.random(600), math.random(400), brain.MONSTER_DIAGONAL, 131, 1)
    bug.script = "en-pill"
    bug.speed = 5
    dink.wait(5)
  end
end

function main()
  current_sprite.nodraw = true
  current_sprite:say("`2Hi!")
  dink.wait(8000)
  player:say("What the hell is this?")
  current_sprite.nodraw = false

  while true do
    dink.fill_screen(math.random(254))
    -- move around the centre of screen
    current_sprite.x = 300 + math.floor(math.deg(math.sin(tee)) + 0.5) * 3
    current_sprite.y = 200 + math.floor(math.deg(math.cos(tee)) + 0.5) * -3
    tee = tee + 0.04
    dink.wait(100)
  end
end

function hit()
  buggy()
  dink.draw_status()
  current_sprite.active = false
end
