###############################################
# Xenomorph Ascension Perks
###############################################

ap_xenomorph_apex_hostline_evolution = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_apex_hostline_evolution }
		is_xenomorph_tradition_empire = yes
	}
	possible = { has_tradition = tr_xenomorph_genetic_accumulation_finish }
	modifier = {
		species_trait_picks_add = 1
		trait_points = 2
		modify_species_cost_mult = -0.10
	}

	ai_weight = {
		factor = 10
	}
}

ap_xenomorph_world_womb_doctrine = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_world_womb_doctrine }
		is_xenomorph_tradition_empire = yes
	}
	possible = { has_tradition = tr_xenomorph_ovomorph_ascendancy_finish }
	modifier = {
		planet_xenomorph_host_breeders_produces_mult = 0.10
		planet_xenomorph_breeding_toys_produces_mult = 0.10
		pop_purge_speed = 0.25
		planet_pop_assembly_mult = 0.15
	}

	ai_weight = {
		factor = 10
	}
}

ap_xenomorph_hidden_hive_network = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_hidden_hive_network }
		is_xenomorph_tradition_empire = yes
	}
	possible = { has_tradition = tr_xenomorph_silent_infestation_finish }
	modifier = {
		spy_network_daily_value_mult = 0.25
	}

	ai_weight = {
		factor = 10
	}
}

ap_xenomorph_royal_synaptic_dominion = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_royal_synaptic_dominion }
		is_xenomorph_tradition_empire = yes
	}
	possible = { has_tradition = tr_xenomorph_royal_hierarchy_finish }
	modifier = {
		leaders_upkeep_mult = -0.10
		planet_xenomorph_royal_egg_layers_produces_mult = 0.15
	}

	ai_weight = {
		factor = 10
	}
}

ap_xenomorph_ecstatic_hive_ascendancy = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_ecstatic_hive_ascendancy }
		is_xenomorph_tradition_empire = yes
		is_xenomorph_sex_hive_civic = yes
	}
	possible = { has_tradition = tr_xenomorph_brood_ecstasy_finish }
	modifier = {
		# 3_64: slave-produces restoration (3_59-anchored)
		planet_xenomorph_host_breeders_produces_mult = 0.1
		planet_xenomorph_breeding_toys_produces_mult = 0.1
		planet_xenomorph_host_breeders_produces_mult = 0.25
		logistic_growth_mult = 0.10
	}

	ai_weight = {
		factor = 10
	}
}

ap_xenomorph_voidbrood_parasitism = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_voidbrood_parasitism }
		is_xenomorph_tradition_empire = yes
	}
	possible = { has_xenomorph_genetic_and_ovomorph_traditions = yes }
	on_enabled = {
		set_country_flag = xenomorph_voidbrood_parasitism_perk_taken
		start_situation = { type = situation_xenomorph_voidbrood_adaptation }
	}
	modifier = {
		damage_vs_country_type_guardian_mult = 0.10
		country_society_tech_research_speed = 0.05
	}

	ai_weight = {
		factor = 10
	}
}

ap_xenomorph_draconic_parasitism = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_draconic_parasitism }
		is_xenomorph_tradition_empire = yes
	}
	possible = { can_unlock_xenomorph_draconic_path = yes }
	on_enabled = {
		set_country_flag = xenomorph_draconic_parasitism_perk_taken
		start_situation = { type = situation_xenomorph_dragon_genome_study }
	}
	modifier = {
		damage_vs_country_type_guardian_mult = 0.20
		army_damage_mult = 0.10
	}

	ai_weight = {
		factor = 10
	}
}

# Praetorian Command Doctrine — unlocks Praetorian Command Warren construction.

# Void Reavers - unlocks SPACE capture: winning a space battle gives a chance to
# recover an enemy leader (and pops) from the wreckage. Requires Flesh Harvest.
ap_xenomorph_void_reavers = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_void_reavers }
		is_xenomorph_tradition_empire = yes
	}
	possible = { has_tradition = tr_xenomorph_flesh_harvest_finish }
	modifier = {
		ship_weapon_damage = 0.10
		army_damage_mult = 0.10
	}

	ai_weight = {
		factor = 10
	}
}

# Apex Autogenic Brood - capstone of the Autogenic Brood tree.
# Scoped to Eggs/Offspring on Xenomorph reproductive jobs; organic pop assembly deliberately
# left to ap_xenomorph_world_womb_doctrine to avoid stacking.
ap_xenomorph_apex_autogenic_brood = {
	potential = {
		NOT = { has_ascension_perk = ap_xenomorph_apex_autogenic_brood }
		is_xenomorph_tradition_empire = yes
	}
	possible = { has_tradition = tr_xenomorph_autogenic_brood_finish }
	modifier = {
		planet_xenomorph_brood_carriers_produces_mult = 0.20
		logistic_growth_mult = 0.10
	}

	ai_weight = {
		factor = 10
	}
}
