--called at the start of a game, makes the objects in question
function initHost()
	terrain.vars.init("crystalNum", 6)
	
	for i = 0, (terrain.vars.get("crystalNum")-1) do
		--standardize placement of the crystal
		spacing = terrain.wid / 2
		ax = terrain.x + spacing * math.mod(i, 2)
		if i == 2 then ax = ax - (spacing/2) end
		if i == 3 then ax = ax + (spacing/2) end
		ay = terrain.y + spacing * (1+math.floor(i / 2))
		
		--randomize color of the crystal
		--size = ""
		--roll = math.random(1,21)
		--if roll <= 10 then
		--	size = "Asteroid1"
		--	spin = spin * 6
		--elseif roll > 10 and roll <= 20 then
		--	size = "Asteroid2"
		--	spin = spin * 3
		--elseif roll == 21 then
		--	size = "Asteroid3"
		--end
		
		--create the asteroid and bump it
		stage.createShip("Crystal", "null", ax, ay, 0)
		ship.spin = math.random() - .5
		
		
	end
	
	terrain.callWithin = 0--skip calling the within function
	terrain.callUpdate = 0--skip calling the update function
	
	return 0
end

--called (by the host) every loop
function updateHost()
	return 0
end

--called (by the host) when a ship is inside this terrain tile
function shipWithin()
	return 0
end

--sets the editor/minimap display icon and color
function setIcon()
	icon.frame = 20	--from map_icons.png, which frame to use.
	icon.color = 2	--green?
	return 0
end