bonus_WeaponThingy = function(x, y) CreateWeaponThingy(x, y, random({WeaponThingy_green, WeaponThingy_blue, WeaponThingy_red})) end
bonus_GreenWeaponThingy = function(x, y) CreateWeaponThingy(x, y, WeaponThingy_green) end
bonus_BlueWeaponThingy = function(x, y) CreateWeaponThingy(x, y, WeaponThingy_blue) end
bonus_RedWeaponThingy = function(x, y) CreateWeaponThingy(x, y, WeaponThingy_red) end
bonus_BombThingy = function(x, y) CreateBombThingy(x, y) end
bonus_OptionThingy = function(x, y) CreateOptionThingy(x, y) end
bonus_ShieldThingy = function(x, y) CreateShieldThingy(x, y) end

function BonusStuff_process( inst, key )
	if inst.y > 400 then
		delete( enemies, key )
	end
end

function BonusStuff_hit( inst )
	local col = ( inst.max_health - inst.health ) / inst.max_health
	SetObjSpriteColor( inst.sprite, { 1, 0, 0, col }, 1 )
end

function CreateBonusStuff( x, color, item )
	local spr = CreateSprite( "sprite", x, -400 )
	SetObjAnim( spr, 10, false )
	SetObjSpriteColor( spr, color )
	SetObjSpriteColor( spr, { 1, 1, 1, 1 }, 0 )
	table.insert( enemies,
				{
					sprite = spr,
					x = x,
					y = -400,
					size = 16,
					speed = 1,
					health = math.floor( 3 * options.enemy_health + 0.5 ),
					max_health = math.floor( 3 * options.enemy_health + 0.5 ),
					score = 100,
					vel = { 0, 1 },
					process = BonusStuff_process,
					destroy = item,
					unbombable = true,
					noenergy = true,
					hit = BonusStuff_hit
				} )
end
