@base_tradition_agenda_cost = 7000
@short_agenda_cost = 3500
@oeo_long_agenda_cost = 10000

#Agenda for taking Engineering Tradition
agenda_oeo_construction_boom = {
	agenda_cost = @base_tradition_agenda_cost
	allow = {
		has_tradition = tr_oeo_engineering_adopt
	}
	potential = {
		has_paragon_dlc = yes
	}
	modifier = {
		megastructures_cost_mult = -0.1
		planet_structures_cost_mult = -0.1
	}
	finish_modifier = agenda_oeo_construction_boom_finish
}
agenda_oeo_construction_research = {
	agenda_cost = @short_agenda_cost
	allow = {
		has_tradition = tr_oeo_engineering_terrestrial_ambitions
	}
	potential = {
		has_paragon_dlc = yes
		NAND = {
			has_technology = tech_mega_engineering
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_mega_engineering = {
				add_tech_progress = {
					tech = tech_mega_engineering
					progress = 0.1
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = engineering_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}
#Agenda for taking Extraction Tradition
agenda_oeo_extraction_economy = {
	agenda_cost = @short_agenda_cost
	allow = {
		has_tradition = tr_oeo_extraction_adopt
	}
	potential = {
		has_paragon_dlc = yes
		NAND = {
			has_technology = tech_orbital_arc_furnace
			has_technology = tech_space_mining_1
			has_technology = tech_space_mining_2
			has_technology = tech_space_mining_3
			has_technology = tech_orbital_ring_tier_1
			has_technology = tech_space_mining_4
			has_technology = tech_space_mining_5
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_orbital_arc_furnace = {
				add_tech_progress = {
					tech = tech_orbital_arc_furnace
					progress = @agenda_award_tech_progress
				}
			}
			tech_space_mining_1 = {
				add_tech_progress = {
					tech = tech_space_mining_1
					progress = @agenda_award_tech_progress
				}
			}
			tech_space_mining_2 = {
				add_tech_progress = {
					tech = tech_space_mining_2
					progress = @agenda_award_tech_progress
				}
			}
			tech_space_mining_3 = {
				add_tech_progress = {
					tech = tech_space_mining_3
					progress = @agenda_award_tech_progress
				}
			}
			tech_space_mining_4 = {
				add_tech_progress = {
					tech = tech_space_mining_4
					progress = @agenda_award_tech_progress
				}
			}
			tech_space_mining_5 = {
				add_tech_progress = {
					tech = tech_space_mining_5
					progress = @agenda_award_tech_progress
				}
			}
			tech_orbital_ring_tier_1 = {
				add_tech_progress = {
					tech = tech_orbital_ring_tier_1
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = engineering_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}
agenda_oeo_thorough_scanning = {
	agenda_cost = @oeo_long_agenda_cost
	allow = {
		has_tradition = tr_oeo_extraction_asteroid_economy
	}
	potential = {
		has_paragon_dlc = yes
	}
	effect = {
		custom_tooltip = council_agenda_agenda_oeo_thorough_scanning_effect_desc
		hidden_effect = {
			country_event = {
				id = oeo_extraction_scan.1		
			}
		}
	}
}
#Agenda for taking Star Husbandry Tradition
agenda_oeo_solar_husbandry_research = {
	agenda_cost = @short_agenda_cost
	allow = {
		has_tradition = tr_oeo_star_husbandry_adopt
	}
	potential = {
		has_paragon_dlc = yes
		NAND = {
			has_technology = tech_dyson_swarm
			has_technology = tech_oeo_solar_upgrade_1
			has_technology = tech_oeo_solar_upgrade_2
			has_technology = tech_oeo_solar_upgrade_3
			has_technology = tech_oeo_solar_upgrade_4 
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_dyson_swarm = {
				add_tech_progress = {
					tech = tech_dyson_swarm
					progress = @agenda_award_tech_progress
				}
			}
			tech_oeo_solar_upgrade_1 = {
				add_tech_progress = {
					tech = tech_oeo_solar_upgrade_1
					progress = @agenda_award_tech_progress
				}
			}
			tech_oeo_solar_upgrade_2 = {
				add_tech_progress = {
					tech = tech_oeo_solar_upgrade_2
					progress = @agenda_award_tech_progress
				}
			}
			tech_oeo_solar_upgrade_3 = {
				add_tech_progress = {
					tech = tech_oeo_solar_upgrade_3
					progress = @agenda_award_tech_progress
				}
			}
			tech_oeo_solar_upgrade_4 = {
				add_tech_progress = {
					tech = tech_oeo_solar_upgrade_4
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = physics_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}
agenda_oeo_star_seeding = {
	agenda_cost = @oeo_long_agenda_cost
	allow = {
		has_tradition = tr_oeo_star_husbandry_solar_scaling
	}
	potential = {
		has_paragon_dlc = yes
	}
	effect = {
		custom_tooltip = council_agenda_agenda_oeo_star_seeding_effect_desc
		hidden_effect = {
			country_event = {
				id = oeo_star_seeding.1		
			}
		}
	}
}
#Agenda for taking Computation Tradition
agenda_oeo_mandatory_overclocking = {
	agenda_cost = @short_agenda_cost
	allow = {
		has_tradition = tr_oeo_computation_adopt
	}
	potential = {
		has_paragon_dlc = yes
		NAND = {
			has_technology = tech_assembly_pattern
			has_technology = tech_dyson_swarm
			has_technology = tech_administrative_ai
			has_technology = tech_self_aware_logic
			OR = {
				has_technology = tech_sapient_ai
				has_technology = tech_positronic_implants
			}	
		}
	}
	effect = {
		if = {
			limit = {
				NOT = { has_ethic = ethic_gestalt_consciousness }
			}
			inverted_switch = {
				trigger = has_technology
				tech_administrative_ai = {
					add_tech_progress = {
						tech = tech_administrative_ai
						progress = @agenda_award_tech_progress
					}
				}
				tech_dyson_swarm = {
					add_tech_progress = {
						tech = tech_dyson_swarm
						progress = @agenda_award_tech_progress
					}
				}
				tech_assembly_pattern = {
					add_tech_progress = {
						tech = tech_assembly_pattern
						progress = @agenda_award_tech_progress
					}
				}
				tech_self_aware_logic = {
					add_tech_progress = {
						tech = tech_self_aware_logic
						progress = @agenda_award_tech_progress
					}
				}
				tech_sapient_ai = {
					add_tech_progress = {
						tech = tech_sapient_ai
						progress = @agenda_award_tech_progress
					}
				}
				default = {
					add_monthly_resource_mult = {
						resource = physics_research
						value = @tier3researchreward
						min = @tier3researchmin
						max = @tier3researchmax
					}
				}
			}
		}
		#Gestalt Tech Switch
		else = {
			limit = {
				has_ethic = ethic_gestalt_consciousness
			}
			inverted_switch = {
				trigger = has_technology
				tech_administrative_ai = {
					add_tech_progress = {
						tech = tech_administrative_ai
						progress = @agenda_award_tech_progress
					}
				}
				tech_dyson_swarm = {
					add_tech_progress = {
						tech = tech_dyson_swarm
						progress = @agenda_award_tech_progress
					}
				}
				tech_assembly_pattern = {
					add_tech_progress = {
						tech = tech_assembly_pattern
						progress = @agenda_award_tech_progress
					}
				}
				tech_self_aware_logic = {
					add_tech_progress = {
						tech = tech_self_aware_logic
						progress = @agenda_award_tech_progress
					}
				}
				tech_positronic_implants = {
					add_tech_progress = {
						tech = tech_positronic_implants
						progress = @agenda_award_tech_progress
					}
				}
				default = {
					add_monthly_resource_mult = {
						resource = physics_research
						value = @tier3researchreward
						min = @tier3researchmin
						max = @tier3researchmax
					}
				}
			}
		}
	}
}
#Agenda for taking Verticality Tradition
agenda_oeo_solid_foundations = {
	agenda_cost = @short_agenda_cost
	allow = {
		has_tradition = tr_oeo_verticality_adopt
	}
	potential = {
		has_paragon_dlc = yes
		NAND = {
			has_technology = tech_planetary_unification
			has_technology = tech_galactic_administration
			has_technology = tech_colonial_centralization
			has_technology = tech_planetary_infrastructure_1
			has_technology = tech_orbital_ring_tier_1
		}
	}
	effect = {
		inverted_switch = {
			trigger = has_technology
			tech_planetary_unification = {
				add_tech_progress = {
					tech = tech_planetary_unification
					progress = @agenda_award_tech_progress
				}
			}
			tech_colonial_centralization = {
				add_tech_progress = {
					tech = tech_colonial_centralization
					progress = @agenda_award_tech_progress
				}
			}
			tech_galactic_administration = {
				add_tech_progress = {
					tech = tech_galactic_administration
					progress = @agenda_award_tech_progress
				}
			}
			tech_planetary_infrastructure_1 = {
				add_tech_progress = {
					tech = tech_planetary_infrastructure_1
					progress = @agenda_award_tech_progress
				}
			}
			tech_orbital_ring_tier_1 = {
				add_tech_progress = {
					tech = tech_orbital_ring_tier_1
					progress = @agenda_award_tech_progress
				}
			}
			default = {
				add_monthly_resource_mult = {
					resource = society_research
					value = @tier3researchreward
					min = @tier3researchmin
					max = @tier3researchmax
				}
			}
		}
	}
}