######################################
# Extreme Frontiers Planet Decisions #
######################################

decision_prismatic_ice_exhibit = {
	owned_planets_only = yes
	sound = event_space_crystals
	icon = decision_prismatic_ice_exhibit

	custom_tooltip = {
		success_text = prismatic_ice_max_3_times_pass_with_var
		owner = {
			check_variable = {
				which = prismatic_ice_exhibit_happened
				value < 3
			}
		}
	}

	potential = {
		owner = {
			has_country_flag = can_exhibit_prismatic_ice
		}
	}

	allow = {
		NOT = { has_modifier = exhibiting_prismatic_ice }
		custom_tooltip = {
			fail_text = prismatic_ice_max_3_times_fail
			owner = {
				check_variable = {
					which = prismatic_ice_exhibit_happened
					value < 3
				}
			}
		}
	}

	effect = {
		custom_tooltip = prismatic_ice_max_3_times_pass
		add_modifier = {
			modifier = exhibiting_prismatic_ice
			years = 10
		}
		hidden_effect = {
			owner = {
				change_variable = {
					which = prismatic_ice_exhibit_happened
					value = 1
				}
			}
		}
	}

	ai_weight = {
		weight = 5
	}
}

decision_toxify_world = {
	sound = event_georadiation_terraforming
	icon = decision_toxify_world

	custom_tooltip = {
		success_text = not_toxifying_world_pass
		NOT = { has_planet_flag = toxifying_planet }
	}

	potential = {
		exists = from
		exists = space_owner
		space_owner = {
			is_same_value = from
			has_technology = tech_georadiation_terraforming
		}
		is_starting_planet_type = yes
	}

	allow = {
		custom_tooltip = {
			fail_text = not_toxifying_world_fail
			NOT = { has_planet_flag = toxifying_planet }
		}
	}

	effect = {
		custom_tooltip = decision_toxify_world_tt
		hidden_effect = {
			set_planet_flag = toxifying_planet
			set_timed_planet_flag = {
				days = 180
				flag = recently_toxified_planet
			}
			space_owner = {
				start_situation = {
					type = situation_toxify_world
					target = root
				}
			}
		}
	}

	ai_weight = {
		weight = 5
	}
}
