namespace = meteor_event

country_event = {
	id = meteor_event.1
	hide_window = yes   

        trigger = {
		NOT = { 
			has_country_flag = had_comet
			has_country_flag = meteor
		}
                is_ai = no

                has_technology = tech_galactic_administration
	}   
	
	
        immediate = { 
		set_country_flag = meteor

		country_event = { id = meteor_event.2 days = 180 }
	}
}


country_event = {
	id = meteor_event.2
	title = "country.999.name"
	desc = {
		trigger = {
			switch = {
				trigger = has_ethic
				ethic_fanatic_materialist = { text = country.999.desc.material }
				ethic_fanatic_spiritualist = { text = country.999.desc.spirit }
				ethic_fanatic_militarist = { text = country.999.desc.mil }
				ethic_fanatic_pacifist = { text = country.999.desc.pac }
				ethic_fanatic_xenophile = { text = country.999.desc.phile }
				ethic_fanatic_xenophobe = { text = country.999.desc.phobe }
				ethic_fanatic_authoritarian = { text = country.999.desc.coll }
				ethic_fanatic_egalitarian = { text = country.999.desc.ind }
				default = { text = country.999.desc.material }
			}
		}
	}
	picture = GFX_evt_atmospheric_entry
	show_sound = event_mystic_reveal

	mean_time_to_happen = { months = 600 }

	trigger = {
		is_country_type = default
		NOT = { has_country_flag = had_comet }
	}

	immediate = { set_country_flag = had_comet }

	option = {
		name = country.999.a
		trigger = {
			NOT = {
				has_ethic = ethic_fanatic_pacifist
				has_ethic = ethic_fanatic_militarist
				has_ethic = ethic_fanatic_authoritarian
				has_ethic = ethic_fanatic_egalitarian
				has_ethic = ethic_fanatic_materialist
				has_ethic = ethic_fanatic_spiritualist
				has_ethic = ethic_fanatic_xenophobe
				has_ethic = ethic_fanatic_xenophile
			}
		}
		add_monthly_resource_mult = {
			resource = unity
			value = @tier1unityreward
			min = 10
			max = 40
		}
	}

	option = {
		name = country.999.a.pac
		trigger = { has_ethic = ethic_fanatic_pacifist }
		add_monthly_resource_mult = {
			resource = unity
			value = @tier1unityreward
			min = 10
			max = 40
		}
	}

	option = {
		name = country.999.a.mil
		trigger = { has_ethic = ethic_fanatic_militarist }
		capital_scope = {
			add_modifier = {
				modifier = comet_sighted_positive
				days = 360
			}
		}
	}

	option = {
		name = country.999.a.spirit
		trigger = { has_ethic = ethic_fanatic_spiritualist }
		capital_scope = {
			add_modifier = {
				modifier = comet_sighted_positive
				days = 360
			}
		}
	}

	option = {
		name = country.999.a.material
		trigger = { has_ethic = ethic_fanatic_materialist }
	}

	option = {
		name = country.999.a.phile
		trigger = { has_ethic = ethic_fanatic_xenophile }
		add_monthly_resource_mult = {
			resource = unity
			value = @tier1unityreward
			min = 10
			max = 40
		}
	}

	option = {
		name = country.999.a.phobe
		trigger = { has_ethic = ethic_fanatic_xenophobe }
		capital_scope = {
			add_modifier = {
				modifier = comet_sighted_negative
				days = 180
			}
		}
	}

	option = {
		name = country.999.a.coll
		trigger = { has_ethic = ethic_fanatic_authoritarian }
		capital_scope = {
			add_modifier = {
				modifier = comet_sighted_negative
				days = 180
			}
		}
	}

	option = {
		name = country.999.a.ind
		trigger = { has_ethic = ethic_fanatic_egalitarian }
		capital_scope = {
			add_modifier = {
				modifier = comet_sighted_positive
				days = 360
			}
		}
	}
}