function init()
	gun.name = "Spit"
	gun.fireDelay = 2500
	gun.shotrange = 2000--acts as fuse
	gun.shotspeed = 1000--slows down
	gun.shotdamage = .75
	gun.shotknockback = 0
	
	gun.burstDelay = 50
	gun.burstNum = 24
	
	return 0
end

function update()
	return 0
end

function fire()
	fireangle = gun.firetheta + math.random(-40, 40)
	if math.random(1,10) then fireangle = fireangle + math.random(-25, 25) end
	
	spit = ""
	roll = math.random(1,2)
	if roll == 1 then spit = "spit1.png" else spit = "spit2.png" end
	
	gun.addShot(spit, gun.firex, gun.firey, fireangle, 1)
	shot.speed = shot.speed * (math.random() + .5)
	shot.scale = math.random() + .25
	shot.shade = math.random(0, 100)
	shot.skipLuaUpdate = 0
end

function shot_update()
	shot.speed = shot.speed * .9
	return 0
end


function fire_old()

	--store gun properties (after we create the torpedo, "gun" changes)
	original = gun
	
	fireangle = gun.owner.rot
	targetx = gun.firetarx
	targety = gun.firetary
	shotspeed =  gun.shotspeed
	owner = gun.owner
	shotdamage = gun.shotdamage
	shotknockback = gun.shotknockback
	shotrange = gun.shotrange
	
	--SO MUCH ACID
	stage.createShip("Goop", "null", gun.firex, gun.firey, gun.owner.faction)
	ship.setWeaponDamage(shotdamage)
	ship.setWeaponKnockback(shotknockback)
	--ignore owner (can't collide)
	--ship.ignore(owner)
	--move at speed
	
	ship.rot = math.random(0,359)
	ship.speed = shotspeed + math.random(-150,150)
	--set the fuse
	ship.controller.resetTimer("fuse", shotrange + math.random(-1500, 1000))

	
	
	return 0
end
