function init()
	gun.name = "MirrorImage"
	gun.fireDelay = 1000
	gun.shotrange = 0			--used as ms time of illusions
	gun.shotspeed = 0
	gun.shotdamage = 0
	
	return 0
end


function update()
	return 0
end


function fire()
	original = gun.owner
	--if gun.owner.name = "" then
		for i = 1, 2 do
			--create an image
			spawnx = original.x + math.random(-2000, 2000)
			spawny = original.y + math.random(-2000, 2000)
			
			stage.createShip(original.name, original.config, spawnx, spawny, original.faction)
			ship.name = "Illusion"
			ship.ignoreCollisions = 1
			--remove this weapon from the clones : we don't want exponential growth
			ship.removeWeapon("MirrorImage")
			--ship.removeAbilities()
			--adds a thing to the ship that causes it to dissapate after a little bit (also explode like an illusion)
			ship.add_comp("Illusory",0,0, 0, 0)
			--defang all the image's weapons, make it vulnerable
			ship.stat.armour = 1
			ship.stat.barrier = 0
			ship.setWeaponDamage(0)
			ship.setWeaponKnockback(0)
			--drops no points on death
			ship.noItemDrop()
			
			--blip!
			stage.createEmitter("blink", ship.x, ship.y)
			emitter.upload()

		end
	--end
		
	return 0
end

function shot_update()

	return 0
end