function init()
	gun.name = "Shotgun2"
	gun.fireDelay = 600
	gun.shotrange = 550
	gun.shotspeed = 1200
	gun.shotdamage = 2.0
	gun.shotknockback = 7000
	
	gun.burstNum = 2
	gun.burstDelay = 350
	
	--gun.firecost = .75
	return 0
end


function update()
	return 0
end


function fire()
	
	--fire a number of shots
	rad = 5				--the radius in number of shots
	spread = 8				--the radius in degrees, centered on theta
	for i = -rad, rad do
		gun.addShot("shot_plasma.png", gun.firex, gun.firey, gun.firetheta)
		shot.movrot = gun.firetheta + i*(spread/rad)
		shot.fadeTime = 100
		
		--attach a trail emitter to the shot
		stage.createEmitter("trail", 0, 0)
		e.interval = 15
		e.attach(shot)
		e.upload()
	end
	
	--kick the owner back
	gun.owner.add_force(gun.firetheta + 180, 600)--pretty fancy/convoluted tech here, just FYI.
	
	gun.sfx("gun_pew1.wav", gun.firex, gun.firey)

	return 0
end

function shot_update()

	return 0
end