#########################################
#
# glass_ball.txt
#
#########################################

namespace = glass_ball

planet_event = {
	id = glass_ball.1
	hide_window = yes
	is_triggered_only = yes
	
	trigger = {
		#FROM = { is_ai = no }
		orbital_bombardment = full
		fortification_health = 0
		NOT = {
			is_planet_class = pc_molten
			is_planet_class = pc_nuked
			is_planet_class = pc_ringworld_habitable
		}
	}
	
	immediate = {
		FROM = {
			country_event = { id = glass_ball.2 }
		}
	}
}

country_event = {
	id = glass_ball.2
	title = glass_ball.2.name
	desc = glass_ball.2.desc
	picture = GFX_evt_glassing

	is_triggered_only = yes
	
	option = {
		name = "glass_ball.2.a"
		custom_tooltip = glass_ball.2.a.tooltip
		hidden_effect = {
			FROM = {
				every_owned_pop = { kill_pop = yes }
				change_pc = pc_molten
			}
		}
	}	
	immediate = {
		every_country = { 
			limit = { has_communications = ROOT }
			add_opinion_modifier = {
				who = ROOT
				modifier = opinion_nuker2 
			}
		}
	}
	
	option = {
		name = "glass_ball.2.b"
		custom_tooltip = glass_ball.2.b.tooltip
		hidden_effect = {
			FROM = {
				every_owned_pop = { kill_pop = yes }
				change_pc = pc_nuked
			}
		}
	}
	immediate = {
		every_country = { 
			limit = { has_communications = ROOT }
			add_opinion_modifier = {
				who = ROOT
				modifier = opinion_nuker3
			}
		}
	}
	
	option = {
		name = "glass_ball.2.c"
	}
}
	

planet_event = {
	id = glass_ball.3
	hide_window = yes
	is_triggered_only = yes
	
	trigger = {
		#FROM = { is_ai = no }
		orbital_bombardment = full
		fortification_health = 0
		is_planet_class = pc_ringworld_habitable
	}
	
	immediate = {
		FROM = {
			country_event = { id = glass_ball.4 }
		}
	}
}

country_event = {
	id = glass_ball.4
	title = glass_ball.4.name
	desc = glass_ball.4.desc
	picture = GFX_evt_glassing

	is_triggered_only = yes
	
	option = {
		name = "glass_ball.4.a"
		custom_tooltip = glass_ball.4.a.tooltip
		hidden_effect = {
			FROM = {
				every_owned_pop = { kill_pop = yes }
				change_pc = pc_ringworld_habitable_damaged
			}
		}
	}
	
	immediate = {
		every_country = { 
			limit = { has_communications = ROOT }
			add_opinion_modifier = {
				who = ROOT
				modifier = opinion_nuker3
			}
		}
	}
	
	option = {
		name = "glass_ball.4.c"
	}
}
