############################
### DISCOVERY CATEGORIES ###
############################
# potential = planet scope
# on_success = ship scope
# on_fail = ship scope
# on_critical_fail = ship scope
# level = level of discovery that is checked against scientist level
# risk = risk of researching the discovery (defaults to NDefines::NGameplay:anomaly_RISK_DEFAULT)

# For on_success, on_fail, on_critical_fail
# FROM = planet scope
# ROOT = ship scope
# Ex. on_fail, ship_event would have the planet in From.From

# Crashed Ship (Asteroid)
anomaly_category = {
	key = "crashed_ship_asteroid_category"
	desc = "crashed_ship_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_asteroid = yes
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.1 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Unknown Origin (Asteroid)
anomaly_category = {
	key = "origin_asteroid_category"
	desc = "origin_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_asteroid = yes
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.2 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Covered in Debris (Asteroid)
anomaly_category = {
	key = "debris_asteroid_category"
	desc = "debris_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_asteroid = yes
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.3 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Energy Emissions (Asteroid)
anomaly_category = {
	key = "emissions_asteroid_category"
	desc = "emissions_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_asteroid = yes
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.4 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Docking Hatch (Asteroid)
anomaly_category = {
	key = "hatch_asteroid_category"
	desc = "hatch_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_asteroid = yes
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.5 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Asteroid Collision (Asteroid)
anomaly_category = {
	key = "collision_asteroid_category"
	desc = "collision_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_asteroid = yes
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.6 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Abandoned Station (Asteroid)
anomaly_category = {
	key = "station_asteroid_category"
	desc = "station_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_asteroid = yes
			num_minerals > 0
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.7 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Life Signs (Asteroid)
anomaly_category = {
	key = "life_asteroid_category"
	desc = "life_asteroid_category_desc"
	picture = GFX_evt_microscopic_life
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_asteroid = yes
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.8 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Atmospheric Object (Gas Giant)
anomaly_category = {
	key = "object_gasgiant_category"
	desc = "object_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.9 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Promising Moon (Gas Giant)
anomaly_category = {
	key = "moon_gasgiant_category"
	desc = "moon_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
			has_any_strategic_resource = no
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.10 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Life Signs (Gas Giant)
anomaly_category = {
	key = "life_gasgiant_category"
	desc = "life_gasgiant_category_desc"
	picture = GFX_evt_microscopic_life
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.11 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Atmospheric Storms (Gas Giant)
anomaly_category = {
	key = "storms_gasgiant_category"
	desc = "storms_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.12 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Aerostat Structures (Gas Giant)
anomaly_category = {
	key = "aerostat_gasgiant_category"
	desc = "aerostat_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.13 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Cargo Pod (Gas Giant)
anomaly_category = {
	key = "cargo_gasgiant_category"
	desc = "cargo_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.14 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Space Debris (Gas Giant)
anomaly_category = {
	key = "debris_gasgiant_category"
	desc = "debris_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.15 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Massive Impact (Uninhabitable Planet)
anomaly_category = {
	key = "impact_uninhabitable_category"
	desc = "impact_uninhabitable_category_desc"
	picture = GFX_evt_nuclear_explosion
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.16 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Unusual Energy Readings (Uninhabitable Planet)
anomaly_category = {
	key = "energy_uninhabitable_category"
	desc = "energy_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.17 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Weak Signal (Uninhabitable Planet)
anomaly_category = {
	key = "signal_uninhabitable_category"
	desc = "signal_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.18 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Asteroid in Orbit (Uninhabitable Planet)
anomaly_category = {
	key = "asteroid_uninhabitable_category"
	desc = "asteroid_uninhabitable_category_desc"
	picture = GFX_evt_asteroid_approaching_planet
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.19 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Solar Sailer (Uninhabitable Planet)
anomaly_category = {
	key = "solar_uninhabitable_category"
	desc = "solar_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.20 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Life Signs (Toxic Planet)
anomaly_category = {
	key = "life_toxic_category"
	desc = "life_toxic_category_desc"
	picture = GFX_evt_microscopic_life
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_toxic
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.21 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Life Signs (Frozen Planet)
anomaly_category = {
	key = "life_frozen_category"
	desc = "life_frozen_category_desc"
	picture = GFX_evt_microscopic_life
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_frozen
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.21 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Life Signs (Barren Planet)
anomaly_category = {
	key = "life_barren_category"
	desc = "life_barren_category_desc"
	picture = GFX_evt_microscopic_life
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
			}
			has_any_strategic_resource = no
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.21 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Space Station (Uninhabitable Planet)
anomaly_category = {
	key = "station_uninhabitable_category"
	desc = "station_uninhabitable_category_desc"
	picture = GFX_evt_space_station
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
			num_minerals > 0
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.22 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Signs of Battle (Uninhabitable Planet)
anomaly_category = {
	key = "battle_uninhabitable_category"
	desc = "battle_uninhabitable_category_desc"
	picture = GFX_evt_small_space_battle
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.23 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Automated Shipyard (Uninhabitable Planet)
anomaly_category = {
	key = "shipyard_uninhabitable_category"
	desc = "shipyard_uninhabitable_category_desc"
	picture = GFX_evt_space_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.24 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Formerly Inhabited (Toxic Planet)
anomaly_category = {
	key = "inhabited_toxic_category"
	desc = "inhabited_toxic_category_desc"
	picture = GFX_evt_dead_city
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_toxic
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.25 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Surface Writing (Uninhabitable Planet)
anomaly_category = {
	key = "writing_uninhabitable_category"
	desc = "writing_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.26 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Surface Beacon (Uninhabitable Planet)
anomaly_category = {
	key = "beacon_uninhabitable_category"
	desc = "beacon_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
			has_any_strategic_resource = no
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.27 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Strange Mountain Formation (Uninhabitable Planet)
anomaly_category = {
	key = "mountain_uninhabitable_category"
	desc = "mountain_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.28 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Unidentified Object (Uninhabitable Planet)
anomaly_category = {
	key = "object_uninhabitable_category"
	desc = "object_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 3
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.29 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Gas Giant Signal (Gas Giant)
anomaly_category = {
	key = "signal_gasgiant_category"
	desc = "signal_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 3
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.30 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Gas Giant Ship (Gas Giant)
anomaly_category = {
	key = "ship_gasgiant_category"
	desc = "ship_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 3
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.31 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Terminal Orbit (Gas Giant)
anomaly_category = {
	key = "terminal_gasgiant_category"
	desc = "terminal_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 3
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 3
			is_planet_class = pc_gas_giant
			is_moon = no
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.32 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

### PRECURSOR DISCOVERIES

# Vultaum Star Assembly (Asteroid)
anomaly_category = {
	key = "vultaum_asteroid_category"
	desc = "vultaum_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_asteroid = yes
			solar_system = { has_star_flag = precursor_1 }
			NOT = {
				FROM = {
					owner = { has_country_flag = vultaum_11 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = vultaum_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = vultaum_precursors }
					}
					set_country_flag = vultaum_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.33 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Vultaum Star Assembly (Gas Giant)
anomaly_category = {
	key = "vultaum_gasgiant_category"
	desc = "vultaum_gasgiant_category_desc"
	picture = GFX_evt_microscopic_life
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_planet_class = pc_gas_giant
			solar_system = { has_star_flag = precursor_1 }
			FROM = {
				owner = {
					NOT = { has_country_flag = vultaum_6 }
					OR = {
						has_country_flag = vultaum_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = vultaum_precursors }
					}
					set_country_flag = vultaum_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.33 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Vultaum Star Assembly (Uninhabitable Planet)
anomaly_category = {
	key = "vultaum_uninhabitable_category"
	desc = "vultaum_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
			solar_system = { has_star_flag = precursor_1 }
			FROM = {
				owner = {
					AND = {
						NOT = { has_country_flag = vultaum_1 }
						NOT = { has_country_flag = vultaum_2 }
						NOT = { has_country_flag = vultaum_7 }
						NOT = { has_country_flag = vultaum_8 }
						NOT = { has_country_flag = vultaum_10 }
					}
					OR = {
						has_country_flag = vultaum_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = vultaum_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = vultaum_precursors }
					}
					set_country_flag = vultaum_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.33 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Vultaum Star Assembly (Habitable Planet)
anomaly_category = {
	key = "vultaum_habitable_category"
	desc = "vultaum_habitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_desert
				is_planet_class = pc_tropical
				is_planet_class = pc_arid
				is_planet_class = pc_continental
				is_planet_class = pc_ocean
				is_planet_class = pc_tundra
				is_planet_class = pc_arctic
			}
			solar_system = { has_star_flag = precursor_1 }
			FROM = {
				owner = {
					AND = {
						NOT = { has_country_flag = vultaum_3 }
						NOT = { has_country_flag = vultaum_4 }
						NOT = { has_country_flag = vultaum_5 }
						NOT = { has_country_flag = vultaum_9 }
					}
					OR = {
						has_country_flag = vultaum_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = vultaum_precursors }
					}
					set_country_flag = vultaum_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.33 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Yuht Empire (Asteroid)
anomaly_category = {
	key = "yuht_asteroid_category"
	desc = "yuht_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_asteroid = yes
			solar_system = { has_star_flag = precursor_2 }
			NOT = {
				FROM = {
					owner = { has_country_flag = yuht_9 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = yuht_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = yuht_precursors }
					}
					set_country_flag = yuht_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.34 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Yuht Empire (Gas Giant)
anomaly_category = {
	key = "yuht_gasgiant_category"
	desc = "yuht_gasgiant_category_desc"
	picture = GFX_evt_microscopic_life
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_planet_class = pc_gas_giant
			solar_system = { has_star_flag = precursor_2 }
			NOT = {
				FROM = {
					owner = { has_country_flag = yuht_6 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = yuht_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = yuht_precursors }
					}
					set_country_flag = yuht_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.34 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Yuht Empire (Uninhabitable Planet)
anomaly_category = {
	key = "yuht_uninhabitable_category"
	desc = "yuht_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
			solar_system = { has_star_flag = precursor_2 }
			NOT = {
				FROM = {
					owner = { 
						AND = {
							has_country_flag = yuht_2
							has_country_flag = yuht_7
							has_country_flag = yuht_8
						}
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = yuht_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = yuht_precursors }
					}
					set_country_flag = yuht_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.34 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Yuht Empire (Habitable Planet)
anomaly_category = {
	key = "yuht_habitable_category"
	desc = "yuht_habitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_desert
				is_planet_class = pc_tropical
				is_planet_class = pc_arid
				is_planet_class = pc_continental
				is_planet_class = pc_ocean
				is_planet_class = pc_tundra
				is_planet_class = pc_arctic
			}
			solar_system = { has_star_flag = precursor_2 }
			NOT = {
				FROM = {
					owner = { 
						AND = {
							has_country_flag = yuht_1
							has_country_flag = yuht_3
							has_country_flag = yuht_4
							has_country_flag = yuht_5
						}
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = yuht_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = yuht_precursors }
					}
					set_country_flag = yuht_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.34 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# First League (Asteroid)
anomaly_category = {
	key = "league_asteroid_category"
	desc = "league_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_asteroid = yes
			solar_system = { has_star_flag = precursor_3 }
			NOT = {
				FROM = {
					owner = { has_country_flag = first_league_14 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = first_league_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = first_league_precursors }
					}
					set_country_flag = first_league_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.35 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# First League (Gas Giant)
anomaly_category = {
	key = "league_gasgiant_category"
	desc = "league_gasgiant_category_desc"
	picture = GFX_evt_microscopic_life
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_planet_class = pc_gas_giant
			solar_system = { has_star_flag = precursor_3 }
			NOT = {
				FROM = {
					owner = { has_country_flag = first_league_2 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = first_league_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = first_league_precursors }
					}
					set_country_flag = first_league_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.35 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# First League (Uninhabitable Planet)
anomaly_category = {
	key = "league_uninhabitable_category"
	desc = "league_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
			solar_system = { has_star_flag = precursor_3 }
			NOT = {
				FROM = {
					owner = { 
						has_country_flag = first_league_1
						has_country_flag = first_league_7
						has_country_flag = first_league_10
						has_country_flag = first_league_11
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = first_league_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = first_league_precursors }
					}
					set_country_flag = first_league_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.35 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# First League (Habitable Planet)
anomaly_category = {
	key = "league_habitable_category"
	desc = "league_habitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_desert
				is_planet_class = pc_tropical
				is_planet_class = pc_arid
				is_planet_class = pc_continental
				is_planet_class = pc_ocean
				is_planet_class = pc_tundra
				is_planet_class = pc_arctic
			}
			solar_system = { has_star_flag = precursor_3 }
			NOT = {
				FROM = {
					owner = { 
						AND = {
							has_country_flag = first_league_3
							has_country_flag = first_league_4
							has_country_flag = first_league_5
							has_country_flag = first_league_6
							has_country_flag = first_league_8
							has_country_flag = first_league_9
							has_country_flag = first_league_12
							has_country_flag = first_league_13
						}
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = first_league_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = first_league_precursors }
					}
					set_country_flag = first_league_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.35 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Irassian Concordat (Asteroid)
anomaly_category = {
	key = "irassian_asteroid_category"
	desc = "irassian_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_asteroid = yes
			solar_system = { has_star_flag = precursor_4 }
			NOT = {
				FROM = {
					owner = { has_country_flag = irassians_10 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = irassian_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = irassian_precursors }
					}
					set_country_flag = irassian_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.36 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Irassian Concordat (Gas Giant)
anomaly_category = {
	key = "irassian_gasgiant_category"
	desc = "irassian_gasgiant_category_desc"
	picture = GFX_evt_microscopic_life
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_planet_class = pc_gas_giant
			solar_system = { has_star_flag = precursor_4 }
			NOT = {
				FROM = {
					owner = { has_country_flag = irassians_11 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = irassian_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = irassian_precursors }
					}
					set_country_flag = irassian_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.36 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Irassian Concordat (Uninhabitable Planet)
anomaly_category = {
	key = "irassian_uninhabitable_category"
	desc = "irassian_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
			solar_system = { has_star_flag = precursor_4 }
			NOT = {
				FROM = {
					owner = { 
						AND = {
							has_country_flag = irassians_6
							has_country_flag = irassians_8
							has_country_flag = irassians_9
						}
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = irassian_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = irassian_precursors }
					}
					set_country_flag = irassian_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.36 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Irassian Concordat (Habitable Planet)
anomaly_category = {
	key = "irassian_habitable_category"
	desc = "irassian_habitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_desert
				is_planet_class = pc_tropical
				is_planet_class = pc_arid
				is_planet_class = pc_continental
				is_planet_class = pc_ocean
				is_planet_class = pc_tundra
				is_planet_class = pc_arctic
			}
			solar_system = { has_star_flag = precursor_4 }
			NOT = {
				FROM = {
					owner = { 
						AND = {
							has_country_flag = irassians_1
							has_country_flag = irassians_2
							has_country_flag = irassians_3
							has_country_flag = irassians_4
							has_country_flag = irassians_5
							has_country_flag = irassians_7
						}
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = irassian_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = irassian_precursors }
					}
					set_country_flag = irassian_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.36 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Cybrex (Asteroid)
anomaly_category = {
	key = "cybrex_asteroid_category"
	desc = "cybrex_asteroid_category_desc"
	picture = GFX_evt_mining_station
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_asteroid = yes
			solar_system = { has_star_flag = precursor_5 }
			NOT = {
				FROM = {
					owner = { has_country_flag = cybrex_6 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = cybrex_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = cybrex_precursors }
					}
					set_country_flag = cybrex_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.37 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.400 } }
			16 = { ship_event = { id = anomaly_failure.401 } }
			16 = { ship_event = { id = anomaly_failure.402 } }
			16 = { ship_event = { id = anomaly_failure.403 } }
			16 = { ship_event = { id = anomaly_failure.404 } }
			16 = { ship_event = { id = anomaly_failure.405 } }
		}
	}
}

# Cybrex (Gas Giant)
anomaly_category = {
	key = "cybrex_gasgiant_category"
	desc = "cybrex_gasgiant_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 2
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			is_planet_class = pc_gas_giant
			solar_system = { has_star_flag = precursor_5 }
			NOT = {
				FROM = {
					owner = { has_country_flag = cybrex_7 }
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = cybrex_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = cybrex_precursors }
					}
					set_country_flag = cybrex_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.37 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.900 } }
			16 = { ship_event = { id = anomaly_failure.901 } }
			16 = { ship_event = { id = anomaly_failure.902 } }
			16 = { ship_event = { id = anomaly_failure.903 } }
		}
	}
}

# Cybrex (Uninhabitable Planet)
anomaly_category = {
	key = "cybrex_uninhabitable_category"
	desc = "cybrex_uninhabitable_category_desc"
	picture = GFX_evt_ship_in_orbit
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_molten
				is_planet_class = pc_barren
				is_planet_class = pc_barren_cold
				is_planet_class = pc_toxic
				is_planet_class = pc_frozen
			}
			solar_system = { has_star_flag = precursor_5 }
			NOT = {
				FROM = {
					owner = { 
						AND = {
							has_country_flag = cybrex_3
							has_country_flag = cybrex_8
							has_country_flag = cybrex_9
							has_country_flag = cybrex_10
							has_country_flag = cybrex_11
						}
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = cybrex_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = cybrex_precursors }
					}
					set_country_flag = cybrex_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.37 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

# Cybrex (Habitable Planet)
anomaly_category = {
	key = "cybrex_habitable_category"
	desc = "cybrex_habitable_category_desc"
	picture = GFX_evt_archaeological_dig
	level = 1
	risk = 30
	
	spawn_chance = {		
		modifier = {
			add = 20
			OR = {
				is_planet_class = pc_desert
				is_planet_class = pc_tropical
				is_planet_class = pc_arid
				is_planet_class = pc_continental
				is_planet_class = pc_ocean
				is_planet_class = pc_tundra
				is_planet_class = pc_arctic
			}
			solar_system = { has_star_flag = precursor_5 }
			NOT = {
				FROM = {
					owner = { 
						AND = {
							has_country_flag = cybrex_1
							has_country_flag = cybrex_2
							has_country_flag = cybrex_4
							has_country_flag = cybrex_5
						}
					}
				}
			}
			FROM = {
				owner = {
					OR = {
						has_country_flag = cybrex_precursors
						NOT = { has_country_flag = precursors_found }
					}
				}
			}
		}
	}
	
	on_spawn = {
		FROM = {
			owner = {
				if = {
					limit = {
						NOT = { has_country_flag = cybrex_precursors }
					}
					set_country_flag = cybrex_precursors
				}
				if = {
					limit = {
						NOT = { has_country_flag = precursors_found }
					}
					set_country_flag = precursors_found
				}
			}
		}
	}
	
	on_success = {
	}

	on_fail = {
		ship_event = { id = anomaly_failure.37 }
	}

	on_critical_fail = {
		random_list = {
			16 = { ship_event = { id = anomaly_failure.1400 } }
			16 = { ship_event = { id = anomaly_failure.1401 } }
			16 = { ship_event = { id = anomaly_failure.1402 } }
			16 = { ship_event = { id = anomaly_failure.1403 } }
			16 = { ship_event = { id = anomaly_failure.1404 } }
			16 = { ship_event = { id = anomaly_failure.1405 } }
		}
	}
}

anomaly_category = {
	key = "sol_wasteland_category"
	desc = "sol_wasteland_category_desc"
	picture = GFX_evt_city_ruins
	level = 1
	risk = 0
	
	spawn_chance = {		
		modifier = {
			add = 0
		}
	}
	
	on_success = {
	}

	on_fail = {
	}

	on_critical_fail = {
	}
}

anomaly_category = {
	key = "VULTAUMAR"
	desc = "VULTAUMAR_DESC"
	
	spawn_chance = {		
		modifier = {
			add = 0
		}
	}
	
}

anomaly_category = {
	key = "YUHTAAN"
	desc = "YUHTAAN_DESC"
	
	spawn_chance = {		
		modifier = {
			add = 0
		}
	}
	
}

anomaly_category = {
	key = "FEN_HABBANIS"
	desc = "FEN_HABBANIS_DESC"
	
	spawn_chance = {		
		modifier = {
			add = 0
		}
	}
	
}

anomaly_category = {
	key = "IRASSIA"
	desc = "IRASSIA_DESC"
	
	spawn_chance = {		
		modifier = {
			add = 0
		}
	}
	
}

anomaly_category = {
	key = "CYBREX"
	desc = "CYBREX_DESC"
	
	spawn_chance = {		
		modifier = {
			add = 0
		}
	}
	
}
