eap_mastery_of_nature = {	
	on_enabled = {
		custom_tooltip = "eap_mastery_of_nature_unlocks"
		custom_tooltip = "allow_edict_land_clearance_perfection"
		custom_tooltip = "describe_edict_land_clearance_perfection"
		hidden_effect = {
			give_technology = { message = no tech = tech_colonization_2 }
			give_technology = { message = no tech = tech_colonization_3 }
			give_technology = { message = no tech = tech_colonization_4 }
			give_technology = { message = no tech = tech_colonization_5 }
			give_technology = { message = no tech = tech_tomb_world_adaption }
		}
	}
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_mastery_of_nature"
			has_ascension_perk = ap_mastery_of_nature
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_3"
			num_ascension_perks > 2
		}
	}
	modifier = {
		planet_clear_blocker_cost_mult = -0.66
		planet_clear_blocker_time_mult = -0.75
		tile_resource_food_mult = 1
		pop_growth_speed = 1
	}
	
	potential = {
		NOT = {
			has_ascension_perk = eap_mastery_of_nature
			has_authority = "auth_machine_intelligence"
		}
	}
	
	ai_weight = {
		factor = 10
	}
}


eap_world_shaper = {
	on_enabled = {
		give_technology = { message = no tech = tech_climate_restoration }
		add_research_option = tech_world_shaper
		hidden_effect = {
			country_event = { id = eap_world_shaper.1 }
		}
	}
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_world_shaper"
			has_ascension_perk = ap_world_shaper
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_3"
			num_ascension_perks > 2
		}
	}

	modifier = {
		terraform_speed_mult = 2.5
		terraforming_cost_mult = -0.25
	}
	
	potential = {
		NOT = {
			has_ascension_perk = eap_world_shaper
		}
	}
	
	ai_weight = {
		factor = 10
		modifier = {
			factor = 0.1
			has_authority = auth_machine_intelligence
			NOT = { has_ascension_perk = ap_machine_worlds }
		}
	}
}

eap_galactic_force_projection = {
	on_enabled = {
		custom_tooltip = "nnn_galactic_force_projection_desc"
		hidden_effect = {
			country_event = { id = force_event.1 }
		}
	}
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_galactic_force_projection"
			has_ascension_perk = ap_galactic_force_projection
		}
		custom_tooltip = {
			fail_text = "requires_tech_battleships"
			has_technology = tech_battleships
		}
	}
	modifier = {
		country_naval_cap_add = 120
		country_command_limit_add = 30
		spaceport_ship_build_speed_mult = 0.50
		spaceport_ship_build_cost_mult = -0.10
		country_ship_upgrade_cost_mult = -0.20
	}
	
	potential = {
		NOT = {
			has_ascension_perk = eap_galactic_force_projection
		}
	}
	
	ai_weight = {
		factor = 10
	}
}

eap_master_builders = {
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_master_builders"
			has_ascension_perk = ap_master_builders
		}
	}
	modifier = {
		megastructure_build_speed_mult = 2
		mod_megastructure_build_cost_mult = -0.5	
		mod_megastructure_production_mult = 0.5	
	}
	
	potential = {
		host_has_dlc = "Utopia"
		NOT = {
			has_ascension_perk = eap_master_builders
		}
	}
	
	ai_weight = {
		factor = 10
		modifier = {
			factor = 2
			has_ethic = ethic_pacifist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_pacifist
		}
	}
}

eap_interstellar_dominion = {
	on_enabled = {
		add_research_option = tech_starbase_capacity
	}
	modifier = {
		country_starbase_influence_cost_mult = -0.55
		country_claim_influence_cost_mult = -0.55
	}

	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_interstellar_dominion"
			has_ascension_perk = ap_interstellar_dominion
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_3"
			num_ascension_perks > 2
		}
	}

	potential = {
		NOT = {
			has_ascension_perk = eap_interstellar_dominion
		}
	}
	
	ai_weight = {
		factor = 1
	}
}

eap_technological_ascendancy = {
	on_enabled = { 
		custom_tooltip = "deseap_technological_ascendancy_desc"
		hidden_effect = {
			country_event = { id = ad_event.1 }
		}
	}
	modifier = {
		all_technology_research_speed = 0.2
		tile_resource_physics_research_mult =  0.05
		tile_resource_society_research_mult =  0.05
		tile_resource_engineering_research_mult =  0.05
	}
	
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_technological_ascendancy"
			has_ascension_perk = ap_technological_ascendancy 
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_3"
			num_ascension_perks > 2
		}
	}
	potential = {
		NOT = {
			has_ascension_perk = eap_technological_ascendancy
		}
	}
	
	ai_weight = {
		factor = 10
	}
}

eap_one_vision = {
	on_enabled = { 
		custom_tooltip = "deseap_one_vision_desc"
		hidden_effect = {
			country_event = { id = nnnethic_event.1 }
		}
	}
	modifier = {	
		country_resource_unity_mult = 0.20
		pop_happiness = 0.05
		planet_unrest_mult = -0.25
	}
	
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_one_vision"
			has_ascension_perk = ap_one_vision
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_3"
			num_ascension_perks > 2
		}
	}
	potential = {
		NOT = {
			has_ascension_perk = eap_one_vision
			has_authority = "auth_machine_intelligence"
		}
	}
	
	ai_weight = {
		factor = 10
		modifier = {
			factor = 2
			has_ethic = ethic_authoritarian
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_authoritarian
		}
		modifier = {
			factor = 2
			has_ethic = ethic_spiritualist
		}
		modifier = {
			factor = 3
			has_ethic = ethic_fanatic_spiritualist
		}		
	}
}

eap_imperial_prerogative = {
	modifier = {
		country_core_sector_system_cap = 3		
		planet_colony_development_speed_mult = 0.50
		colony_start_num_pops_add = 3
		tradition_cost_num_colonies_mult = -0.50
	}
	
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_imperial_prerogative"
			has_ascension_perk = ap_imperial_prerogative
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_3"
			num_ascension_perks > 2
		}
	}
	potential = {
		NOT = {
			has_ascension_perk = eap_imperial_prerogative
		}
	}
	
	ai_weight = {
		factor = 10
	}
	
	on_enabled = {
		run_ai_strategic_data = yes
	}
}

eap_shared_destiny = {

	on_enabled = {
		custom_tooltip = "deseap_shared_destiny_desc"
	}
	modifier = {
		subject_integration_influence_cost_mult = -0.35
		country_subject_acceptance_add = 30
		subject_tribute_mult = 0.50
	}
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_shared_destiny"
			has_ascension_perk = ap_shared_destiny
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_3"
			num_ascension_perks > 2
		}
	}
	
	potential = {
		NOR = {
			has_valid_civic = civic_fanatic_purifiers
			has_valid_civic = civic_hive_devouring_swarm
			has_valid_civic = civic_inwards_perfection
			has_valid_civic = civic_machine_terminator
		}
		NOT = {
			has_ascension_perk = eap_shared_destiny
		}
	}
	
	ai_weight = {
		factor = 5
	}
}

eap_defender_of_the_galaxy = {	
	on_enabled = {
		custom_tooltip = "eap_defender_of_the_galaxy_effect_opinion"
		# see triggered_opinion_eap_defender_of_the_galaxy
		custom_tooltip = "eap_defender_of_the_galaxy_effect"
		hidden_effect = {
			country_event = { id = eap_defender.1 }
		}
	}	

	modifier = {
		description = eap_defender_of_the_galaxy_modifier_desc
		damage_vs_country_type_swarm_mult = 0.5
		damage_vs_country_type_extradimensional_mult = 0.5
		damage_vs_country_type_extradimensional_2_mult = 0.5
		damage_vs_country_type_extradimensional_3_mult = 0.5
		damage_vs_country_type_ai_empire_mult = 0.5
	}

	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_defender_of_the_galaxy"
			has_ascension_perk = ap_defender_of_the_galaxy
		}
		custom_tooltip = {
			fail_text = "requires_years_2"
			years_passed > 99
		}
		custom_tooltip = {
			text = "requires_no_crisis"
		}
	}

	potential = {
		NOT = {
			has_ascension_perk = eap_defender_of_the_galaxy
			has_global_flag = galactic_crisis_happened
		}
	}
	
	ai_weight = {
		factor = 0
	}
}

eap_executive_vigor = {
	modifier = {
		edict_length_mult = 1.00
		edict_cost = -0.35
	}
	
	possible = {
		custom_tooltip = {
			fail_text = "requires_ap_executive_vigor"
			has_ascension_perk = ap_executive_vigor
		}
		custom_tooltip = {
			fail_text = "requires_ascension_perks_3"
			num_ascension_perks > 2
		}
	}

	potential = {
		NOT = {
			has_ascension_perk = eap_executive_vigor
		}
	}
	
	ai_weight = {
		factor = 10
	}
}