@base_tradition_agenda_cost = 7000
@ascension_agenda_cost = 3500		# Same as short_agenda_cost from traditions
@ascension_agenda_cooldown = 1080	# 3 Years

agenda_cybernetic_advantage_assimilator = {
	agenda_cost = @base_tradition_agenda_cost
	allow = {
		has_tradition = tr_cybernetics_assimilator_adopt
	}
	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		OR = {
            has_civic = civic_machine_assimilator
            AND = { 
                is_materus_bm_installed = yes 
                has_ascension_perk = ap_organo_machine_interfacing_assimilator
            }
        }
	}
	modifier = {
		planet_pops_cyborgs_upkeep_mult = -0.05
		pop_growth_speed = 0.05
	}
	finish_modifier = agenda_cybernetic_advantage_assimilator_finish
}

agenda_organo_machine_interfacing_assimilator = {
	agenda_cost = @ascension_agenda_cost
	agenda_cooldown = @ascension_agenda_cooldown
	allow = {
		has_ascension_perk = ap_organo_machine_interfacing_assimilator
	}
	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		OR  = { 
            AND = { 
                is_materus_bm_installed = yes 
                has_ascension_perk = ap_organo_machine_interfacing_assimilator
            }
            has_civic = civic_machine_assimilator 
        }
		NAND = {
			has_technology = tech_powered_exoskeletons
			has_technology = tech_integrated_cybernetics
			has_technology = tech_neuro_quantum_links
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_powered_exoskeletons = {
				add_tech_progress = {
					tech = tech_powered_exoskeletons
					progress = @agenda_award_tech_progress
				}
			}
			tech_integrated_cybernetics = {
				add_tech_progress = {
					tech = tech_integrated_cybernetics
					progress = @agenda_award_tech_progress
				}
			}
			tech_neuro_quantum_links = {
				add_tech_progress = {
					tech = tech_neuro_quantum_links
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = engineering_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}
agenda_nanotech_unstoppable_swarm = {
	agenda_cost = @base_tradition_agenda_cost
	allow = {
		has_tradition = tr_nanotech_adopt
	}
	potential = {
		has_machine_age_dlc = yes
		OR = {
			is_individual_machine = yes
			is_machine_empire = yes
		}
		NOR = {
			has_country_flag = modularity_traditions_unlocked
			has_country_flag = virtuality_traditions_unlocked
		}

	}
	modifier = {
		shipsize_nanite_swarmer_build_speed_mult = 0.20
		ship_nanite_swarmer_cost_mult = -0.15
	}
	finish_modifier = agenda_nanotech_unstoppable_swarm_finish
}

agenda_modularity_reshape_form = {
	agenda_cost = @base_tradition_agenda_cost
	allow = {
		has_tradition = tr_modularity_adopt
	}
	potential = {
		has_machine_age_dlc = yes
		OR = {
			is_individual_machine = yes
			is_machine_empire = yes
		}
		NOR = {
			has_country_flag = nanotech_traditions_unlocked
			has_country_flag = virtuality_traditions_unlocked
		}

	}
	modifier = {
		planet_pops_robotics_upkeep_mult = -0.05
		planet_jobs_sr_living_metal_produces_mult = 0.05
		auto_mod_monthly_add = 1
	}
	finish_modifier = agenda_modularity_reshape_form_finish
}
agenda_virtuality_optimized_network = {
	agenda_cost = @base_tradition_agenda_cost
	allow = {
		has_tradition = tr_virtuality_adopt
	}
	potential = {
		has_machine_age_dlc = yes
		OR = {
			is_individual_machine = yes
			is_machine_empire = yes
		}
		NOR = {
			has_country_flag = modularity_traditions_unlocked
			has_country_flag = nanotech_traditions_unlocked
		}

	}
	modifier = {
		planet_virtual_jobs_produces_mult = 0.05
	}
	finish_modifier = agenda_virtuality_optimized_network_finish
}

agenda_synthetic_age = {
	agenda_cost = @ascension_agenda_cost
	agenda_cooldown = @ascension_agenda_cooldown
	allow = {
		has_ascension_perk = ap_synthetic_age
	}
	potential = {
		OR = {
			is_machine_empire = yes
			is_individual_machine = yes
		}
		OR = {
			has_synthetic_dawn = yes
			has_machine_age_dlc = yes
		}
		OR = {
            has_valid_civic = civic_machine_assimilator
            has_cybernetic_ascension = no
            AND = {
                is_materus_bm_installed = yes
                has_ascension_perk = ap_organo_machine_interfacing_assimilator
            }
        }
		NAND = {
			has_technology = tech_powered_exoskeletons
			has_technology = tech_robomodding_m
			has_technology = tech_binary_motivators
			has_technology = tech_nanite_assemblers
			has_technology = tech_mega_assembly
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_powered_exoskeletons = {
				add_tech_progress = {
					tech = tech_powered_exoskeletons
					progress = @agenda_award_tech_progress
				}
			}
			tech_robomodding_m = {
				add_tech_progress = {
					tech = tech_robomodding_m
					progress = @agenda_award_tech_progress
				}
			}
			tech_binary_motivators = {
				add_tech_progress = {
					tech = tech_binary_motivators
					progress = @agenda_award_tech_progress
				}
			}
			tech_nanite_assemblers = {
				add_tech_progress = {
					tech = tech_nanite_assemblers
					progress = @agenda_award_tech_progress
				}
			}
			tech_mega_assembly = {
				add_tech_progress = {
					tech = tech_mega_assembly
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = engineering_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}
agenda_synthetic_yield = {
	agenda_cost = @base_tradition_agenda_cost
	allow = {
		has_tradition = tr_synthetics_adopt
	}
	potential = {
		OR = {
			AND = {
				is_regular_empire = yes
				is_individual_machine = no
				OR = {
					has_utopia = yes
					has_machine_age_dlc = yes
				}
			}
			AND = {
				is_machine_empire = yes
				has_synthetic_dawn = yes
				has_machine_age_dlc = no
			}
		}
		NOR = {
			has_psionic_ascension = yes
			is_natural_design_empire = yes
		}
	}
	modifier = {
		planet_pop_assembly_add = 0.5
	}
	finish_modifier = agenda_synthetic_yield_finish
}

agenda_organo_machine_interfacing = {
	agenda_cost = @ascension_agenda_cost
	agenda_cooldown = @ascension_agenda_cooldown
	allow = {
		has_ascension_perk = ap_organo_machine_interfacing
	}
	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		is_hive_empire = yes
		NOR = {
			has_psionic_ascension = yes
			has_synthetic_ascension = yes
			is_natural_design_empire = yes
			is_individual_machine = yes
		}
		NAND = {
			has_technology = tech_powered_exoskeletons
			has_technology = tech_integrated_cybernetics
			has_technology = tech_neuro_quantum_links
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_powered_exoskeletons = {
				add_tech_progress = {
					tech = tech_powered_exoskeletons
					progress = @agenda_award_tech_progress
				}
			}
			tech_integrated_cybernetics = {
				add_tech_progress = {
					tech = tech_integrated_cybernetics
					progress = @agenda_award_tech_progress
				}
			}
			tech_neuro_quantum_links = {
				add_tech_progress = {
					tech = tech_neuro_quantum_links
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = engineering_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}

agenda_flesh_is_weak = {
	agenda_cost = @ascension_agenda_cost
	agenda_cooldown = @ascension_agenda_cooldown
	allow = {
		OR = {
			has_ascension_perk = ap_the_flesh_is_weak
			has_origin = origin_cybernetic_creed
		}
	}
	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		is_gestalt = no
		NOR = {
			has_psionic_ascension = yes
			has_synthetic_ascension = yes
			is_natural_design_empire = yes
			is_individual_machine = yes
		}
		NAND = {
			has_technology = tech_powered_exoskeletons
			has_technology = tech_integrated_cybernetics
			has_technology = tech_neuro_quantum_links
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_powered_exoskeletons = {
				add_tech_progress = {
					tech = tech_powered_exoskeletons
					progress = @agenda_award_tech_progress
				}
			}
			tech_integrated_cybernetics = {
				add_tech_progress = {
					tech = tech_integrated_cybernetics
					progress = @agenda_award_tech_progress
				}
			}
			tech_neuro_quantum_links = {
				add_tech_progress = {
					tech = tech_neuro_quantum_links
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = engineering_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}
agenda_cybernetic_advantage = {
	agenda_cost = @base_tradition_agenda_cost
	allow = {
		has_tradition = tr_cybernetics_adopt
	}
	potential = {
		OR = {
			has_utopia = yes
			has_machine_age_dlc = yes
		}
		is_machine_empire = no
		NOR = {
			has_psionic_ascension = yes
			has_synthetic_ascension = yes
			is_natural_design_empire = yes
			is_individual_machine = yes
		}
	}
	modifier = {
		planet_pops_cyborgs_upkeep_mult = -0.05
		pop_growth_speed = 0.025
	}
	finish_modifier = agenda_cybernetic_advantage_finish
}

agenda_genetic_pursuit = {
	agenda_cost = @base_tradition_agenda_cost
	allow = {
		has_tradition = tr_genetics_adopt
	}
	potential = {
		has_utopia = yes
		OR = {
			is_machine_empire = no
			has_civic = civic_machine_assimilator
			has_civic = civic_machine_servitor
            AND = { 
                is_materus_bm_installed = yes 
                has_ascension_perk = ap_organo_machine_interfacing_assimilator
            }
		}
		NOR = {
			has_synthetic_ascension = yes
			is_natural_design_empire = yes
			is_individual_machine = yes
		}
	}
	modifier = {
		category_biology_research_speed_mult = 0.05
		pop_growth_speed = 0.025
		planet_pop_assembly_organic_mult = 0.025
	}
	finish_modifier = agenda_genetic_pursuit_finish
}


agenda_engineered_evolution_machine = {
	agenda_cost = @ascension_agenda_cost
	agenda_cooldown = @ascension_agenda_cooldown
	allow = {
		has_ascension_perk = ap_engineered_evolution
	}
	potential = {
		has_utopia = yes
		is_machine_empire = yes
		OR = {
			has_civic = civic_machine_assimilator
			has_civic = civic_machine_servitor
            AND = { 
                is_materus_bm_installed = yes 
                has_ascension_perk = ap_organo_machine_interfacing_assimilator
            }
		}
		NAND = {
			has_technology = tech_genome_mapping
			has_technology = tech_gene_tailoring
			has_technology = tech_glandular_acclimation
			has_technology = tech_gene_expressions
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_genome_mapping = {
				add_tech_progress = {
					tech = tech_genome_mapping
					progress = @agenda_award_tech_progress
				}
			}
			tech_gene_tailoring = {
				add_tech_progress = {
					tech = tech_gene_tailoring
					progress = @agenda_award_tech_progress
				}
			}
			tech_glandular_acclimation = {
				add_tech_progress = {
					tech = tech_glandular_acclimation
					progress = @agenda_award_tech_progress
				}
			}
			tech_gene_expressions = {
				add_tech_progress = {
					tech = tech_gene_expressions
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = society_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}

agenda_engineered_evolution = {
	agenda_cost = @ascension_agenda_cost
	agenda_cooldown = @ascension_agenda_cooldown
	allow = {
		has_ascension_perk = ap_engineered_evolution
	}
	potential = {
		has_utopia = yes
		is_machine_empire = no
		NOR = {
			has_synthetic_ascension = yes
			is_natural_design_empire = yes
			is_individual_machine = yes
		}
		NAND = {
			has_technology = tech_genome_mapping
			has_technology = tech_gene_tailoring
			has_technology = tech_glandular_acclimation
			has_technology = tech_gene_expressions
			has_technology = tech_gene_seed_purification
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_genome_mapping = {
				add_tech_progress = {
					tech = tech_genome_mapping
					progress = @agenda_award_tech_progress
				}
			}
			tech_gene_tailoring = {
				add_tech_progress = {
					tech = tech_gene_tailoring
					progress = @agenda_award_tech_progress
				}
			}
			tech_glandular_acclimation = {
				add_tech_progress = {
					tech = tech_glandular_acclimation
					progress = @agenda_award_tech_progress
				}
			}
			tech_gene_expressions = {
				add_tech_progress = {
					tech = tech_gene_expressions
					progress = @agenda_award_tech_progress
				}
			}
			tech_gene_seed_purification = {
				add_tech_progress = {
					tech = tech_gene_seed_purification
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = society_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}
agenda_mind_over_matter = {
	agenda_cost = value:agenda_mind_over_matter_cost
	agenda_cooldown = @ascension_agenda_cooldown
	allow = {
		OR = {
			has_ascension_perk = ap_mind_over_matter
			has_origin = origin_shroudwalker_apprentice
		}
	}
	potential = {
		has_utopia = yes
		is_gestalt = no
		NOR = {
			has_cybernetic_ascension = yes
			has_synthetic_ascension = yes
			is_natural_design_empire = yes
			is_individual_machine = yes
		}
		NAND = {
			has_technology = tech_psionic_theory
			has_technology = tech_telepathy
			has_technology = tech_thought_enforcement
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_psionic_theory = {
				add_tech_progress = {
					tech = tech_psionic_theory
					progress = @agenda_award_tech_progress
				}
			}
			tech_telepathy = {
				add_tech_progress = {
					tech = tech_telepathy
					progress = @agenda_award_tech_progress
				}
			}
			tech_thought_enforcement = {
				add_tech_progress = {
					tech = tech_thought_enforcement
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = society_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}