function init()
	gun.name = "Peacannon"
	gun.fireDelay = 2000
	gun.shotrange = 1050
	gun.shotspeed = 450
	gun.shotdamage = 6
	gun.shotknockback = 10000
	gun.burstDelay = 350
	
	--gun.reloadDelay = 4000
	--gun.clipNum = 8
	
	--gun.firecost = .5
	
	return 0
end


function update()
	return 0
end


function fire()
	gun.addShot("shot7.png", gun.firex, gun.firey, gun.firetheta)
	shot.scale = 3.0
	shot.setRGB(255,255,80)

	--attach a trail emitter to the shot
	stage.createEmitter("shottrail", 0, 0)
	e.scale = .5
	e.attach(shot)
	e.upload()
	
	--and make it crackle
	stage.createEmitter("shotcrackle", 0, 0)
	e.num = -1
	e.scale = .5
	e.attach(shot)
	e.upload()
	
	--muzzle flash
	stage.createEmitter("muzzleflash", gun.firex, gun.firey)
	e.upload()
	
	--kick the owner back
	gun.owner.add_force(gun.firetheta + 180, 1000)--pretty fancy/convoluted tech here, just FYI.

	gun.sfx("gun_peacannon.wav", gun.firex, gun.firey)

	return 0
end

function shot_update()

	return 0
end