namespace = apoc

#ϣ۹ʾ¼¼޸

#ѡ
# Choose Planet-Killer Weapon on 50% project progress
country_event = {
	id = apoc.110
	title = apoc.110.name
	desc = {
		text = apoc.110.desc
		trigger = { NOT = { has_ethic = ethic_gestalt_consciousness } }
	}
	desc = {
		text = apoc.110.desc.machine
		trigger = { has_authority = auth_machine_intelligence }
	}
	desc = {
		text = apoc.110.desc.hive
		trigger = { has_authority = auth_hive_mind }
	}
	picture = GFX_evt_planet_beam
	show_sound = event_radio_chatter
	location = capital_scope

	is_triggered_only = yes

	option = {
		name = PLANET_KILLER_CRACKER
		custom_tooltip = apoc.110.cracker.tooltip
		hidden_effect = {
			set_country_flag = pk_cracker
		}

		trigger = {
			is_pacifist = no
		}
		ai_chance = {
		    factor = 50
		    modifier = {
				   factor = 0
				   has_authority = auth_xilin_mind
			  }		
		}
	}

	option = {
		name = PLANET_KILLER_SHIELDER
		custom_tooltip = apoc.110.shielder.tooltip
		hidden_effect = {
			set_country_flag = pk_shielder
		}

		trigger = {
			OR = {
				is_pacifist = yes
				hidden_trigger = { has_authority = auth_xilin_mind }
			}
		}
		ai_chance = {
		    factor = 50
		    modifier = {
				   factor = 0
				   has_authority = auth_xilin_mind
			  }		
		}
	}

	option = {
		name = PLANET_KILLER_NEUTRON
		custom_tooltip = apoc.110.neutron.tooltip
		hidden_effect = {
			set_country_flag = pk_neutron
		}

		trigger = {
			is_pacifist = no
			# Available to spiritualists if Divine Enforcer is locked out
			OR = {
				is_spiritualist = no
				OR = {	
					AND = {
						NOT = { host_has_dlc = "Utopia" }
						has_technology = tech_telepathy
					}
					AND = {
						host_has_dlc = "Utopia"
						has_ascension_perk = ap_mind_over_matter
					}
				}					
			}	
		}
		ai_chance = {
		    factor = 50
		    modifier = {
				   factor = 0
				   has_authority = auth_xilin_mind
			  }		
		}
	}

	option = {
		name = PLANET_KILLER_GODRAY
		custom_tooltip = apoc.110.godray.tooltip
		hidden_effect = {
			set_country_flag = pk_godray
		}

		trigger = {
			OR = {
			   is_spiritualist = yes
			   hidden_trigger = { has_authority = auth_xilin_mind }
			}
			OR = {
				AND = {
					NOT = { host_has_dlc = "Utopia" }
					has_technology = tech_telepathy
				}
				AND = {
					host_has_dlc = "Utopia"
					has_ascension_perk = ap_mind_over_matter
				}
				has_country_flag = f_mind_over_matter
			}
		}
		ai_chance = {
		    factor = 50
		    modifier = {
				   factor = 0
				   has_authority = auth_xilin_mind
			  }		
		}
	}

	option = {
		name = PLANET_KILLER_NANOBOTS
		custom_tooltip = apoc.110.nanobots.tooltip
		hidden_effect = {
			set_country_flag = pk_nanobots
		}

		trigger = {
			OR = {
					AND = {
							hidden_trigger = { has_ethic = ethic_gestalt_consciousness }
							has_valid_civic = civic_machine_assimilator
					}
					hidden_trigger = { has_authority = auth_xilin_mind }
			}
		}
		ai_chance = {
		    factor = 50
		    modifier = {
				   factor = 0
				   has_authority = auth_xilin_mind
			  }		
		}
	}
	
	option = {
		name = PLANET_KILLER_ALL_TYPE
		custom_tooltip = PLANET_KILLER_ALL_TYPE_DESC
		hidden_effect = {
			set_country_flag = pk_cracker
			set_country_flag = pk_shielder
			set_country_flag = pk_neutron
			set_country_flag = pk_godray
			set_country_flag = pk_nanobots
		}

		trigger = {
			  has_authority = auth_xilin_mind
		}	
	}
}