is_genocidal_infernal = {
    OR = {
        has_valid_civic = civic_scorched_earth
        has_valid_civic = civic_hive_scorched_earth
    }
}

is_world_forger_empire = {
    OR = {
        has_valid_civic = civic_world_forgers
        has_valid_civic = civic_hive_world_forgers
        has_valid_civic = civic_machine_world_forgers
        has_valid_civic = civic_corporate_world_forgers
    }
}

has_anvil_building = {
    OR = {
        has_active_building = building_volcanic_forge_1
        has_active_building = building_volcanic_forge_2
    }
}

is_galvanic_empire = {
    OR = {
        has_valid_civic = civic_galvanic_symbiosis
        has_valid_civic = civic_hive_galvanic_symbiosis
        has_valid_civic = civic_corporate_galvanic_symbiosis
        has_valid_civic = civic_machine_galvanic_symbiosis
    }
}

is_infernal = {
	has_trait = trait_infernal
}

is_dry_non_volcanic = {
    is_dry = yes
    NOT = { is_planet_class = pc_volcanic }
}

can_get_planet_smelter = {
    OR = {
        has_origin = origin_red_giant
        is_world_forger_empire = yes
        is_infernal_empire = yes
        has_ascension_perk = ap_galactic_hyperthermia
    }
}

is_conduit_target = {
    can_be_crisis_terraformed = yes
    NOR = {
        has_star_flag = conduit_excluded # Permanent, for systems that shouldn't change (must assign manually)
        has_star_flag = conduit_target # Temporary
        has_star_flag = dyson_sphere_built
        has_star_flag = quantum_catapult_built
        any_ship_in_system = { has_ship_flag = entropy_conduit }
        star = { has_anomaly = yes }
    }
}

# scope = species
is_infernal_portrait = {
	OR = {
		species_portrait = inf1
		species_portrait = inf2
		species_portrait = inf3
		species_portrait = inf4
		species_portrait = inf5
		species_portrait = inf6
		species_portrait = inf7
		species_portrait = inf8
		species_portrait = inf9
		species_portrait = inf10
		species_portrait = lith_human_inf
		species_portrait = lith2_inf
	}
}

# The band of orbits the Galactic Crucible consumes when it completes.
is_within_galactic_crucible_orbits = {
	distance = {
		source = solar_system.star
		min_distance >= @galactic_crucible_min_radius
		max_distance <= @galactic_crucible_max_radius
		same_solar_system = yes
	}
}

# A moon is consumed with its parent planet, whatever its own orbit.
is_in_galactic_crucible_radius = {
	OR = {
		is_within_galactic_crucible_orbits = yes
		orbit? = {
			is_within_galactic_crucible_orbits = yes
		}
	}
}
