
*label calculations

*gosub asteroid_level
*gosub asteroid_owner
*gosub asteroid_colonists

*if (asteroid1_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_name asteroid1_name
	*set asteroid true
	*return
*elseif (asteroid2_quadrant = quadrant) and (asteroid2_sector = sector)
	*set asteroid_name asteroid2_name
	*set asteroid true
	*return
*elseif (asteroid3_quadrant = quadrant) and (asteroid3_sector = sector)
	*set asteroid_name asteroid3_name
	*set asteroid true
	*return
*else
	*set asteroid false
	*return


*label asteroid_level

*if (asteroid1_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_level asteroid1_level
	*set asteroid true
	*return
*elseif (asteroid2_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_level asteroid2_level
	*set asteroid true
	*return
*elseif (asteroid3_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_level asteroid3_level
	*set asteroid true
	*return
*else
	*set asteroid false
	*return

*label asteroid_owner

*if (asteroid1_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_owner asteroid1_owner
	*set asteroid true
	*return
*elseif (asteroid2_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_owner asteroid2_owner
	*set asteroid true
	*return
*elseif (asteroid3_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_owner asteroid3_owner
	*set asteroid true
	*return
*else
	*return

*label asteroid_colonists


*if (asteroid1_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_colonists asteroid1_colonists
	*set asteroid true
	*return
*elseif (asteroid2_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_colonists asteroid2_colonists
	*set asteroid true
	*return
*elseif (asteroid3_quadrant = quadrant) and (asteroid1_sector = sector)
	*set asteroid_colonists asteroid3_colonists
	*set asteroid true
	*return
*else
	*return
