function init()
	gun.name = "Spawner dodongo"
	gun.fireDelay = 0

	return 0
end


function update()

	return 0
end


function fire()

	minion = ""
	minionnum = 0
	roll = math.random(1,5)
	if roll == 1 then
		minion = "Turret"--"Interceptor"
		minionnum = 6
	elseif roll == 2 then
		minion = "Artilleryturret1"
		minionnum = 1
	elseif roll == 3 then
		minion = "Beamturret"
		minionnum = 1
	elseif roll == 4 then
		minion = "Node"
		minionnum = 2
	elseif roll == 5 then
		minion = "Pulsardrone"
		minionnum = 1
	end
	
	faction = gun.owner.faction
	spawnx = gun.firex + math.random(-1000, 1000)
	spawny = gun.firey + math.random(-1000, 1000)
	
	for i = 1, minionnum do
		--create a minion
		spawnx = spawnx + math.random(-200, 200)
		spawny = spawny + math.random(-200, 200)

		stage.warpShip(minion, "", spawnx, spawny, faction, "", 1000 + math.random(500, 2000))
	end

	return 0
end

function shot_update()

	return 0
end