###################################
# Astral Planes Scripted Triggers #
###################################

################
# Astral Rifts #
################

can_spawn_astral_rift = {
	NOR = {
		has_astral_rift = yes
		any_system_planet = {
			is_astral_scar = yes
		}
		any_neighbor_system = {
			OR = {
				has_astral_rift = yes
				any_system_planet = {
					is_astral_scar = yes
				}
			}
		}
	}
}

can_spawn_astral_rift_natural_generation = {
	NOR = {
		starting_system = yes
		is_fe_cluster = yes
		has_special_star_flag_trigger = yes
	}
	can_spawn_astral_rift = yes
}

# Used for progressive Rifts
can_spawn_astral_rift_or_split_astral_scar = {
	OR = {
		any_system_planet = {
			is_astral_scar = yes
			has_anomaly = no
		}
		can_spawn_astral_rift_natural_generation = yes
	}
}

# THIS = Leader scope
is_exploring_astral_rift = {
	exists = astral_rift
}

is_star_affected_by_celestial_tear = {
	OR = {
		is_planet_class = pc_b_star
		is_planet_class = pc_a_star
		is_planet_class = pc_f_star
		is_planet_class = pc_g_star
	}
}

is_affected_by_formula_pink_opinion_modifier = {
	NOR = {
		is_robot_empire = yes
		is_lithoid_empire = yes
		is_species_class = TOX
	}
}

has_crystal_sphere_situation_ongoing = {
	any_situation = {
		OR = {
			is_situation_type = situation_destroy_crystal_sphere
			is_situation_type = situation_study_crystal_sphere
		}
	}
}

##########
# Civics #
##########

is_hyperspace_specialty_empire = {
	OR = {
		has_valid_civic = civic_hyperspace_specialty
		has_valid_civic = civic_hive_hyperspace_specialty
		has_valid_civic = civic_machine_hyperspace_specialty
		has_valid_civic = civic_corporate_hyperspace_specialty
	}
}

is_dimensional_worship_empire = {
	OR = {
		has_civic = civic_dimensional_worship
		has_civic = civic_corporate_dimensional_worship
	}
}

is_dark_consortium_empire = {
	OR = {
		has_valid_civic = civic_dark_consortium
		has_valid_civic = civic_corporate_dark_consortium
	}
}

is_sovereign_guardianship_empire = {
	OR = {
		has_valid_civic = civic_sovereign_guardianship
		has_valid_civic = civic_hive_sovereign_guardianship
		has_valid_civic = civic_machine_sovereign_guardianship
		has_valid_civic = civic_corporate_sovereign_guardianship
	}
}
