# Cyborg Ascension (regular empires)
ap_the_flesh_is_weak = {
	on_enabled = {
		custom_tooltip = "flesh_is_weak_tooltip"
	}
	possible = {
		custom_tooltip = {
			fail_text = "synthetic_empire_synthetic_ascension"
			NOT = { has_trait = trait_mechanical }
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_2"
			OR = {
				num_ascension_perks > 1
				has_origin = origin_cybernetic_creed
			}
		}
		custom_tooltip = {
			fail_text = "requires_not_ap_engineered_evolution"
			NOT = { has_ascension_perk = ap_engineered_evolution }
		}
		custom_tooltip = {
			fail_text = "requires_not_ap_mind_over_matter"
			NOT = { has_ascension_perk = ap_mind_over_matter }
		}
		custom_tooltip = {
			fail_text = "requires_not_ap_synthetic_evolution"
			NOT = { has_ascension_perk = ap_synthetic_evolution }
		}
		custom_tooltip = {
			fail_text = "requires_free_tradition_tree"
			num_tradition_categories < @max_tradition_trees
		}
	}
	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		NOR = {
			has_ascension_perk = ap_the_flesh_is_weak
			has_origin = origin_shroudwalker_apprentice
			has_origin = origin_cybernetic_creed
			has_origin = origin_synthetic_fertility
		}
		is_gestalt = no
		is_individual_machine = no
		is_natural_design_empire = no
######################################################## ADDED FOR ELECTROID ORIGINS
		NOR = {
			has_origin = origin_elec_sun_empire
			has_origin = origin_elec_supernova
			has_origin = origin_elec_endless_horizon
			has_origin = origin_elec_extradimensionals
			has_origin = origin_elec_nebula_of_creation
		}
########################################################
	}
	ai_weight = {
		factor = 100		#@ascension_path_base_weight
		modifier = {
			factor = 0.5		#@ascension_path_anti_synergy_weight
			has_flesh_is_weak_anti_synergy = yes
		}
	}
}

ap_hive_worlds = {
	on_enabled = {
		custom_tooltip = "allow_hive_worlds"
		custom_tooltip = "describe_hive_worlds"
	}
	potential = {
		host_has_dlc = "Utopia"
		has_authority = auth_hive_mind
		NOT = {
			has_ascension_perk = ap_hive_worlds
		}
		NOT = { # Lithoid devouring swarms consume worlds and cannot improve them (since they never get terraforming tech)
			AND = {
				is_lithoid_empire = yes
				has_valid_civic = civic_hive_devouring_swarm
			}
		}
######################################################## ADDED FOR ELECTROID ORIGINS
		NOR = {
			has_origin = origin_elec_sun_empire
			has_origin = origin_elec_supernova
			has_origin = origin_elec_endless_horizon
			has_origin = origin_elec_extradimensionals
			has_origin = origin_elec_nebula_of_creation
		}
########################################################
	}

	possible = {
		custom_tooltip = {
			fail_text = "requires_technology_tech_climate_restoration"
			has_technology = tech_climate_restoration
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_2"
			num_ascension_perks > 1
		}
	}
	ai_weight = {
		factor = 100
	}
}

ap_arcology_project = {
	potential = {
		host_has_dlc = "Megacorp"
		OR = {
			is_regular_empire = yes
			has_valid_civic = civic_machine_servitor
		}
		NOT = { has_valid_civic = civic_agrarian_idyll }
		NOT = {
			has_ascension_perk = ap_arcology_project
		}
######################################################## ADDED FOR ELECTROID ORIGINS
		NOR = {
			has_origin = origin_elec_sun_empire
			has_origin = origin_elec_supernova
			has_origin = origin_elec_endless_horizon
			has_origin = origin_elec_extradimensionals
			has_origin = origin_elec_nebula_of_creation
		}
########################################################
	}
	possible = {
		custom_tooltip = {
			fail_text = "requires_technology_housing_2"
			has_technology = tech_housing_2
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_2"
			num_ascension_perks > 1
		}
	}
	on_enabled = {
		custom_tooltip = "allow_arcology_project"
		custom_tooltip = "decision_arcology_project_effects"
	}
	ai_weight = {
		factor = 10
		modifier = {
			factor = 2
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_pacifist
		}
		modifier = {
			factor = 2
			has_ethic = ethic_materialist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_materialist
		}
	}
}

# Cyborg Ascension (Hive Minds)
ap_organo_machine_interfacing = {
	on_enabled = {
		custom_tooltip = "organo_machine_interfacing_tooltip"
	}
	possible = {
		custom_tooltip = {
			fail_text = "requires_ascension_perks_2"
			num_ascension_perks > 1
		}
		custom_tooltip = {
			fail_text = "requires_not_ap_engineered_evolution"
			NOT = { has_ascension_perk = ap_engineered_evolution }
		}
		custom_tooltip = {
			fail_text = "requires_free_tradition_tree"
			num_tradition_categories < @max_tradition_trees
		}
	}
	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		NOT = {
			has_ascension_perk = ap_organo_machine_interfacing
		}
		has_authority = auth_hive_mind
		is_natural_design_empire = no
######################################################## ADDED FOR ELECTROID ORIGINS
		NOR = {
			has_origin = origin_elec_sun_empire
			has_origin = origin_elec_supernova
			has_origin = origin_elec_endless_horizon
			has_origin = origin_elec_extradimensionals
			has_origin = origin_elec_nebula_of_creation
		}
########################################################
	}
	ai_weight = {
		factor = 100		#@ascension_path_base_weight
	}
}

# Synthetic Ascension (regular empires)
ap_synthetic_evolution = {
	on_enabled = {
		custom_tooltip = "synthetic_evolution_tooltip"
		if = {
			limit = {
				has_origin = origin_necrophage
				has_trait = trait_necrophage
			}
			custom_tooltip = disables_necrophage_features
		}
		if = {
			limit = {
				has_origin = origin_clone_army
				OR = {
					has_trait = trait_clone_soldier_infertile
					has_trait = trait_clone_soldier_infertile_full_potential
					has_trait = trait_clone_soldier_fertile
				}
			}
			custom_tooltip = disables_clone_army_origin_features
		}
		if = {
			limit = {
				has_origin = origin_overtuned
			}
			custom_tooltip = disables_overtuned_features
		}
		if = {
			limit = {
				OR = {
					has_valid_civic = civic_idyllic_bloom
					has_valid_civic = civic_hive_idyllic_bloom
				}
			}
			custom_tooltip = disables_idyllic_bloom
		}
	}
	possible = {
		custom_tooltip = {
			fail_text = "synthetic_empire_synthetic_ascension"
			NOT = { has_trait = trait_mechanical }
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_2"
			num_ascension_perks > 1
		}
		custom_tooltip = {
			fail_text = "requires_not_ap_engineered_evolution"
			NOT = { has_ascension_perk = ap_engineered_evolution }
		}
		custom_tooltip = {
			fail_text = "requires_not_ap_the_flesh_is_weak"
			NOT = { has_ascension_perk = ap_the_flesh_is_weak }
		}
		custom_tooltip = {
			fail_text = "requires_not_ap_mind_over_matter"
			NOT = { has_ascension_perk = ap_mind_over_matter }
		}
		custom_tooltip = {
			fail_text = "requires_free_tradition_tree"
			num_tradition_categories < @max_tradition_trees
		}
	}
	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		NOR = {
			has_ascension_perk = ap_synthetic_evolution
			has_authority = "auth_machine_intelligence"
			has_origin = origin_shroudwalker_apprentice
			has_origin = origin_cybernetic_creed
			has_origin = origin_synthetic_fertility
		}
		is_gestalt = no
		is_mechanical_empire = no
		is_natural_design_empire = no
		NOT = { has_valid_civic = civic_augmentation_bazaars }
		is_individual_machine = no
######################################################## ADDED FOR ELECTROID ORIGINS
		NOR = {
			has_origin = origin_elec_sun_empire
			has_origin = origin_elec_supernova
			has_origin = origin_elec_endless_horizon
			has_origin = origin_elec_extradimensionals
			has_origin = origin_elec_nebula_of_creation
		}
########################################################
	}
	ai_weight = {
		factor = 100		#@ascension_path_base_weight
		modifier = {
			factor = 2		#@ascension_path_synergy_weight
			has_synthetic_evolution_synergy = yes
		}
		modifier = {
			factor = 0.5		#@ascension_path_anti_synergy_weight
			has_synthetic_evolution_anti_synergy = yes
		}
		modifier = {
			factor = 0
			blocks_ai_synthetic_evolution = yes
		}
	}
}