# See traditions/README.txt for format

# AMBITION PERKS COME FIRST

# Gigass + Hypers Loc
ap_galactic_wonders = {
	on_enabled = {
		if = {
			limit = {
				has_megacorp = yes
			}
			custom_tooltip = "add_research_options_galactic_wonders_utopia_megacorp_2"
		}
		else = {
			custom_tooltip = "add_research_options_galactic_wonders_utopia_2"
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = {
						has_technology = tech_ring_world
					}
				}
				add_research_option = tech_ring_world
			}
			if = {
				limit = {
					NOT = {
						has_technology = tech_dyson_sphere
					}
				}
				add_research_option = tech_dyson_sphere
			}
			if = {
				limit = {
					is_ai = yes
					NOT = { has_technology = tech_mega_engineering }
				}
				add_research_option = tech_mega_engineering
			}
			if = {
				limit = {
					has_megacorp = yes
					NOT = {
						has_technology = tech_matter_decompressor
					}
				}
				add_research_option = tech_matter_decompressor
			}
		}
	}

	possible = {
		custom_tooltip = {
			fail_text = "requires_mega_engineering"
			has_technology = tech_mega_engineering
		}
		custom_tooltip = {
			fail_text = "requires_built_or_repaired_megastructure"
			OR = {
				has_country_flag = has_built_or_repaired_megastructure
				AND = {
					is_ai = yes
					OR = {
						any_country = {
							is_ai = no
							has_galactic_wonders = yes
						}
						num_ascension_perks >= @structure_perks
					}
				}
			}

		}
	}

	potential = {
		NOT = {
			has_ascension_perk = ap_galactic_wonders
		}
	}

	ai_weight = {
		factor = @galwonders_weight # vanilla = 20
		# 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
		# }
	}
}