###	plnt	######################################################################
#	|同步追踪|V	scripted_triggers	|全部|

#_|基本条件|	UGRC无法摧毁/UGRC无视星球	/UGRC黑洞/UGRC无视天体	/UGRC带盾
#_|vanilla|		地爆天星/绝世天壁/中子横扫/圣光/纳米/天洪浩当/毒圣/降智光线		/撼日者




###_|UGRC无法摧毁|	无法摧毁的<星球>或<天体>,如dummy星球
#_mod	|Giga/AG/ACOT/失落帝国历史/SEOOC|
#_<can_destroy_planet_general>
UGRC_trgr_plnt_PK_ignore_MISC = {
	OR = {
		#	Giga
		is_planet_class = giga_hidden
		giga_is_birch_world = yes
		#	AG
		is_planet_class = pc_ag_void_star
		#	ACOT
		is_planet_class = pc_invisible_star
		#	失落帝国历史
		is_planet_class = pc_empty_space
		#	SEOOC
		is_planet_class = pc_star_void_dummy_01
	}
}
###_|UGRC无视星球|	无法摧毁的<星球>
#_mod	|mem/APSR|
#_<can_destroy_planet_general>
UGRC_trgr_plnt_PK_ignore_PLNT = {
	OR = {
		#	mem
		is_planet_class = pc_mem_synthetic_sun
		#	APSR
		is_planet_class = pc_apsr_ancient
		is_planet_class = pc_apsr_unique
	}
}

###_|UGRC黑洞|		黑洞
#_mod	|Giga/RS/MEM/假想天体|
#_<can_destroy_planet_with_PLANET_KILLER_Ark_CRACKER>
UGRC_trgr_plnt_PK_ignore_BH = {
	OR = {
		#	vanilla
		is_planet_class = pc_black_hole
		
		#	Giga
		is_planet_class = pc_core_black_hole
		is_planet_class = pc_black_hole_giga
		is_planet_class = pc_ehof_black_hole
		is_planet_class = pc_pouchkinn_black_hole
		#	RS
		is_planet_class = pc_collapsar
		is_planet_class = pc_microquasar_1
		is_planet_class = pc_microquasar_2
		#	MEM
		is_planet_class = pc_mem_micro_black_hole
		#	假想天体
		is_planet_class = pc_white_hole
	}
}
###_|UGRC无视天体|	无法摧毁的<天体>
#_mod	|Giga/RS/假想天体|
UGRC_trgr_plnt_PK_ignore_STAR = {
	OR = {
		#	vanilla
		is_planet_class = pc_neutron_star
		is_planet_class = pc_pulsar
		
		#	Giga
		is_planet_class = pc_birch
		is_planet_class = pc_core_quasar
		is_planet_class = pc_whc_star
		is_planet_class = pc_wh_star
		is_planet_class = pc_whdyson_star
		#	RS
		is_planet_class = pc_magnetar
		#	假想天体
		is_planet_class = pc_strange_star
	}
}

###_|UGRC带盾|		护盾世界/带有护盾
#_mod	|AOT|
UGRC_trgr_plnt_PK_ignore_SHIELD = {
	OR = {
		is_planet_class = pc_shielded
		is_planet_class = pc_ringworld_shielded
		is_planet_class = pc_habitat_shielded
		
		#	AOT
		has_active_building = building_phanon_psg
		has_active_building = building_stellarite_psg
	}
}




###_[vanilla]
can_destroy_planet_general = {##	UGRC无法摧毁/UGRC无视星球
	is_star = no
	is_astral_scar = no
	OR = {
		NOT = { exists = owner }
		owner = { is_hostile = from.owner }
	}
	
	UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
	UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
}
##	星球
is_a_planet = {##	PT
	is_star = no
	NOR = {
		is_planet_class = pc_gas_giant
		is_planet_class = pc_asteroid
		is_planet_class = pc_habitat
		is_planet_class = pc_shrouded
		is_planet_class = pc_ringworld_habitable
		is_planet_class = pc_ringworld_habitable_damaged
		is_planet_class = pc_ark
		#	PT
		is_planet_class = pc_habitat_robot
	}
}
##	居住站
is_a_habitable_planet_megastructure = {##	wsg/swg		/PD/APSR/Endless_Frontier/ACOT
	OR = {
		is_planet_class = pc_nuked
		is_planet_class = pc_infested
		colonizable_planet = yes

		#	WSG
		is_planet_class = pc_wsg_port
		is_planet_class = pc_shenhai
		#	swg
		is_planet_class = pc_swgs_engineer
		is_planet_class = pc_swgs_engineer_ringworld_habitable
		#	PD
		pd_is_planet_class_all = yes
		#	Giga
		is_planet_class = pc_katzenland
		#	APSR
		has_apsr_modifiers = yes
		#	Endless_Frontier
		is_planet_class = pc_mzilli_shadow
		#	ACOT
		is_planet_class = pc_dark_fractured
		is_planet_class = pc_dark_fractured_ae
		is_planet_class = pc_acot_enigmopolis
	}
}

##	is_a_planet_megastructure
##	planet_is_hostile_or_crisis
##	planet_is_hostile
##	is_valid_pop_for_PLANET_KILLER_NANOBOTS








###_[地爆天星]	|plnt|	############################################################################################################################################
#_detail	|UGRC可摧毁	/PD|
can_destroy_planet_with_PLANET_KILLER_CRACKER = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_not_a_standard_planet_or_megastructure
		is_a_planet_megastructure = yes
	}
	custom_tooltip = {
		fail_text = is_shielded
		UGRC_trgr_plnt_PK_ignore_SHIELD = no	#_|UGRC带盾|
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = { 
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	OR = {
		custom_tooltip = {
			text = is_not_hostile_cracker
			OR = {
				AND = {
					exists = space_owner
					space_owner = {
						OR = {
							is_at_war_with = from.owner
							is_country_type = swarm
							is_country_type = extradimensional
							is_country_type = extradimensional_2
							is_country_type = extradimensional_3
							is_country_type = ai_empire
							is_country_type = synth_queen
							is_country_type = awakened_synth_queen
							is_country_type = synth_queen_convoys
							is_country_type = synth_queen_outposts
						}
					}
				}
				AND = { # colony
					exists = owner
					owner = {
						OR = {
							is_at_war_with = from.owner
							is_country_type = swarm
							is_country_type = extradimensional
							is_country_type = extradimensional_2
							is_country_type = extradimensional_3
							is_country_type = ai_empire
							is_country_type = synth_queen
							is_country_type = awakened_synth_queen
							is_country_type = synth_queen_convoys
							is_country_type = synth_queen_outposts
						}
					}
				}
			}
		}
		#	土著
		AND = {
			#	primitive target
			custom_tooltip = {
				text = cannot_crack_pre_ftl_planet_ownership
				exists = space_owner
				exists = owner
				owner = {
					is_primitive = yes
				}
				space_owner = {
					OR = {
						is_same_value = from.owner
						is_at_war_with = from.owner
						is_country_type = swarm
						is_country_type = extradimensional
						is_country_type = extradimensional_2
						is_country_type = extradimensional_3
						is_country_type = ai_empire
						is_country_type = synth_queen
						is_country_type = awakened_synth_queen
						is_country_type = synth_queen_convoys
						is_country_type = synth_queen_outposts
					}
				}
			}
			custom_tooltip = {
				text = cannot_crack_pre_ftl_planet_interference
				#	primitive
				exists = owner
				owner = {
					is_primitive = yes
				}
				from.owner = {
					has_policy_flag = interference_aggressive
				}
			}
		}
		#_[+PD/Giga/aot]
		custom_tooltip = {
			text = not_barren_molten_frozen_toxic_test_fire
			NOT = { exists = owner }
			OR = {
				NOT = { exists = space_owner }
				AND = {
					exists = space_owner
					space_owner = { is_same_value = from.owner }
				}
			}
			OR = {
				#	V
				habitable_planet = yes	# |+PD|
				uninhabitable_regular_planet = yes
				
				is_artificial = yes
				is_colonizable = yes
				is_planet_class = pc_red_toxic		#	Giga
				is_crackable_celestial_object = yes	# AOT
			}
		}
	}
}
###_[绝世天壁]	|plnt|
#_detail	|UGRC无法摧毁/UGRC无视星球|
can_destroy_planet_with_PLANET_KILLER_SHIELDER = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_not_a_habitable_planet_or_megastructure
		OR = {
			is_a_habitable_planet_megastructure = yes
			is_planet_class = pc_ai
		}
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
	}
	#	土著
	custom_tooltip = {
		fail_text = is_not_hostile_or_primitive
		OR = {
			planet_is_hostile_or_crisis = yes
			AND = {
				exists = owner
				owner = {
					is_country_type = primitive
				}
			}
		}
	}
	#	突触凝炼机
	custom_tooltip = {
		fail_text = lathe_cant_colossus
		NOT = { is_planet_class = pc_cosmogenesis_world }
	}
	#	初接触DLC
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = { 
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	if = {
		limit = {
			exists = owner
			owner = { is_country_type = primitive }
		}
		custom_tooltip = {
			fail_text = primitives_not_full_interference
			from.owner = {
				has_policy_flag = interference_aggressive
			}
		}
	}
	custom_tooltip = {
		fail_text = is_shielded
		UGRC_trgr_plnt_PK_ignore_SHIELD = no	#_|UGRC带盾|
	}
}
###_[中子横扫]	|plnt|
#_detail	|UGRC无法摧毁/UGRC无视星球|
can_destroy_planet_with_PLANET_KILLER_NEUTRON = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_not_a_habitable_planet_or_megastructure
		is_a_habitable_planet_megastructure = yes
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = is_shielded
		UGRC_trgr_plnt_PK_ignore_SHIELD = no	#_|UGRC带盾|
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = { 
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	custom_tooltip = {
		fail_text = lathe_cant_colossus
		NOT = { is_planet_class = pc_cosmogenesis_world }
	}
	custom_tooltip = {
		fail_text = is_not_hostile
		OR = {
			planet_is_hostile_or_crisis = yes
			AND = {
				exists = owner
				owner = {
					is_country_type = primitive
				}
				from.owner = {
					is_xenophobe = yes
				}
			}
			AND = { # at war with primitive space owner
				exists = space_owner
				exists = owner
				owner = {
					is_primitive = yes
				}
				space_owner = {
					OR = {
						is_at_war_with = from.owner
						is_country_type = swarm
						is_country_type = extradimensional
						is_country_type = extradimensional_2
						is_country_type = extradimensional_3
						is_country_type = ai_empire
						is_country_type = synth_queen
						is_country_type = awakened_synth_queen
						is_country_type = synth_queen_convoys
						is_country_type = synth_queen_outposts
					}
				}
			}
		}
	}
	custom_tooltip = {
		fail_text = is_unpopulated
		OR = {
			pop_amount > 0
			is_planet_class = pc_infested
		}
	}
}
###_[圣光]		|plnt|
#_detail	|UGRC无法摧毁/UGRC无视星球|
can_destroy_planet_with_PLANET_KILLER_GODRAY = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_not_a_habitable_planet_or_megastructure
		OR = {
			is_a_habitable_planet_megastructure = yes
			is_planet_class = pc_ai
		}
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = is_shielded
		UGRC_trgr_plnt_PK_ignore_SHIELD = no	#_|UGRC带盾|
	}
	custom_tooltip = {
		fail_text = lathe_cant_colossus
		NOT = { is_planet_class = pc_cosmogenesis_world }
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = { 
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	custom_tooltip = {
		#success_text = "is at war with player"
		fail_text = is_not_hostile_or_primitive
		OR = {
			planet_is_hostile = yes
			is_planet_class = pc_ai
			AND = {
				exists = owner
				owner = { is_country_type = primitive }
			}
			AND = {
				exists = owner
				owner = { is_same_empire = from.owner }
			}
		}
	}
	if = {
		limit = {
			exists = owner
			owner = { is_country_type = primitive }
		}
		custom_tooltip = {
			fail_text = primitives_not_full_interference
			from.owner = {
				has_policy_flag = interference_aggressive
			}
		}
	}
	# target own colony
	if = {
		limit = {
			NOR = {
				planet_is_hostile = yes
				AND = {
					exists = owner
					owner = { is_country_type = primitive }
				}
			}
			exists = owner
			owner = {
				is_same_value = from.owner
			}
		}
		custom_tooltip = {
			text = not_owned_test_fire
			exists = owner
			owner = {
				is_same_value = from.owner
			}
		}
	}
}
###_[纳米]		|plnt|
#_detail	|UGRC无法摧毁/UGRC无视星球|
can_destroy_planet_with_PLANET_KILLER_NANOBOTS = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_not_a_habitable_planet_or_megastructure
		is_a_habitable_planet_megastructure = yes
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = is_shielded
		UGRC_trgr_plnt_PK_ignore_SHIELD = no	#_|UGRC带盾|
	}
	custom_tooltip = {
		fail_text = lathe_cant_colossus
		NOT = { is_planet_class = pc_cosmogenesis_world }
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = { 
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	custom_tooltip = {
		fail_text = is_not_hostile_or_primitive
		OR = {
			planet_is_hostile = yes
			AND = {
				exists = owner
				owner = {
					is_country_type = primitive
				}
			}
		}
	}
	if = {
		limit = {
			exists = owner
			owner = { is_country_type = primitive }
		}
		custom_tooltip = {
			fail_text = primitives_not_in_borders
			exists = space_owner
			space_owner = { is_same_value = from.owner }
		}
		custom_tooltip = {
			fail_text = primitives_not_full_interference
			from.owner = {
				has_policy_flag = interference_aggressive
			}
		}
	}
	custom_tooltip = {
		fail_text = no_assimilatable_pops
		any_owned_pop_group = {
			is_valid_pop_for_PLANET_KILLER_NANOBOTS = yes
		}
	}
}
###_[天洪浩当]	|plnt|
#_detail	|UGRC无法摧毁/UGRC无视星球|
can_destroy_planet_with_PLANET_KILLER_DELUGE = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_habitable_non_artificial
		OR = {
			is_colonizable = yes
			is_colony = yes
		}
		is_artificial = no
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = { 
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	custom_tooltip = {
		fail_text = lathe_cant_colossus
		NOT = { is_planet_class = pc_cosmogenesis_world }
	}
	custom_tooltip = {
		fail_text = is_not_oceanic
		NOT = { is_planet_class = pc_ocean }
	}
	if = {
		limit = { is_inside_border = from.owner }
		if = {
			limit = { #Uninhabited and primitive planets are always fine, if own colony then check if pops would be purged
				exists = owner
				owner = { is_same_value = from.owner }
				any_owned_species = {
					NOR = {
						has_trait = trait_aquatic
						has_trait = trait_robot_aquatic
					}
				}
			}
			custom_tooltip = {
				fail_text = requires_purge_allowed
				success_text = will_purge_non_aquatic_pops
				from.owner = {
					is_ai = no
					has_policy_flag = purge_allowed
				}
			}
		}
	}
	else = {
		custom_tooltip = {
			fail_text = is_not_hostile_or_primitive_or_ours
			OR = {
				planet_is_hostile_or_crisis = yes
				AND = {
					exists = owner
					owner = {
						is_country_type = primitive
					}
				}
			}
		}
	}
	if = {
		limit = {
			exists = owner
			owner = { is_country_type = primitive }
		}
		custom_tooltip = {
			fail_text = primitives_not_in_borders
			exists = space_owner
			space_owner = { is_same_value = from.owner }
		}
		custom_tooltip = {
			fail_text = primitives_not_full_interference
			from.owner = {
				has_policy_flag = interference_aggressive
			}
		}
	}
}
###_[毒圣]		|plnt|
#_detail	|UGRC无法摧毁/UGRC无视星球|
can_destroy_planet_with_PLANET_KILLER_TOXIFIER = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_habitable_non_artificial
		OR = {
			is_colonizable = yes
			is_colony = yes
		}
		is_artificial = no
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = lathe_cant_colossus
		NOT = { is_planet_class = pc_cosmogenesis_world }
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = { 
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	OR = {
		custom_tooltip = {
			text = is_not_hostile_cracker
			OR = {
				AND = {
					exists = space_owner
					space_owner = {
						OR = {
							is_at_war_with = from.owner
							is_country_type = swarm
							is_country_type = extradimensional
							is_country_type = extradimensional_2
							is_country_type = extradimensional_3
							is_country_type = ai_empire
							is_country_type = synth_queen
							is_country_type = awakened_synth_queen
							is_country_type = synth_queen_convoys
							is_country_type = synth_queen_outposts
						}
					}
				}
				AND = { # colony
					exists = owner
					owner = {
						OR = {
							is_at_war_with = from.owner
							is_country_type = swarm
							is_country_type = extradimensional
							is_country_type = extradimensional_2
							is_country_type = extradimensional_3
							is_country_type = ai_empire
							is_country_type = synth_queen
							is_country_type = awakened_synth_queen
							is_country_type = synth_queen_convoys
							is_country_type = synth_queen_outposts
						}
					}
				}
				AND = { # primitive
					exists = space_owner
					exists = owner
					owner = {
						is_primitive = yes
					}
					space_owner = {
						OR = {
							is_at_war_with = from.owner
							is_country_type = swarm
							is_country_type = extradimensional
							is_country_type = extradimensional_2
							is_country_type = extradimensional_3
							is_country_type = ai_empire
							is_country_type = synth_queen
							is_country_type = awakened_synth_queen
							is_country_type = synth_queen_convoys
							is_country_type = synth_queen_outposts
						}
					}
				}
			}
		}
		custom_tooltip = {
			text = is_not_owned_or_claimed
			NOR = {
				exists = owner
				exists = space_owner
			}
		}
		custom_tooltip = {
			text = is_uninhabited_within_borders
			exists = space_owner
			space_owner = { is_same_value = from.owner }
			is_colony = no
		}
	}
}
###_[降智光线]	|plnt|
#_detail	|UGRC无法摧毁/UGRC无视星球|
can_destroy_planet_with_PLANET_KILLER_DEVOLUTION = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_ai_world_no_archaeoengineers
		if = {
			limit = { is_planet_class = pc_ai }
			from.owner = {
				has_ascension_perk = ap_archaeoengineers
			}
		}
	}
	custom_tooltip = {
		fail_text = is_not_a_habitable_planet_or_megastructure
		OR = {
			is_a_habitable_planet_megastructure = yes
			is_planet_class = pc_ai
		}
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = lathe_cant_colossus
		NOT = { is_planet_class = pc_cosmogenesis_world }
	}
	custom_tooltip = {
		fail_text = recently_devolved
		NOT = { has_planet_flag = devolved_planet }
	}
	custom_tooltip = {
		fail_text = is_shielded
		UGRC_trgr_plnt_PK_ignore_SHIELD = no	#_|UGRC带盾|
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = { 
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	custom_tooltip = {
		#success_text = "is at war with player"
		fail_text = is_not_hostile_or_primitive
		OR = {
			planet_is_hostile = yes
			is_planet_class = pc_ai
			AND = {
				exists = owner
				owner = { is_country_type = primitive }
			}
		}
	}
	if = {
		limit = {
			exists = owner
			owner = { is_country_type = primitive }
		}
		custom_tooltip = {
			fail_text = primitives_not_full_interference
			from.owner = {
				has_policy_flag = interference_aggressive
			}
		}
	}
}


###_[撼日者]	|star|
#_detail	|UGRC无法摧毁/UGRC黑洞|
can_destroy_planet_with_PLANET_KILLER_STAR_CRACKER = {
	# The shot removes every body in the system, not only the star.
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = {
			solar_system = {
				any_system_planet = {
					has_planet_flag = consecrated@from.owner
				}
			}
		}
	}
	custom_tooltip = {
		fail_text = is_your_megastructure_system
		NOT = {
			solar_system = {
				has_star_flag = crisis_sphere_system@from.owner
				any_system_megastructure = { has_megastructure_flag = crisis_sphere }
			}
		}
	}
	custom_tooltip = {
		fail_text = is_not_star
		is_star = yes
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = is_black_hole
	#	NOT = { is_planet_class = pc_black_hole }
		UGRC_trgr_plnt_PK_ignore_BH = no	#_|UGRC黑洞|
	}
	custom_tooltip = {
		fail_text = star_owner_is_not_hostile
		OR = {
			NOT = { exists = space_owner }
			space_owner = { is_hostile = from.owner }
			space_owner = { is_same_value = from.owner }
		}
	}
}


###_|吞天食地|	|plnt|
#_detail	|UGRC无法摧毁/UGRC无视星球|
can_destroy_planet_with_PLANET_KILLER_MAW = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_not_a_habitable_planet_or_megastructure
		OR = {
			is_a_habitable_planet_megastructure = yes
			is_planet_class = pc_infested
		}
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = is_not_hostile_or_primitive
		OR = {
			planet_is_hostile_or_crisis = yes
			AND = {
				exists = owner
				owner = {
					is_country_type = primitive
				}
			}
			AND = {
				exists = owner
				owner = {
					is_same_value = from.owner
				}
				is_capital = no
			}
		}
	}
	custom_tooltip = {
		fail_text = lathe_cant_colossus
		NOT = { is_planet_class = pc_cosmogenesis_world }
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = {
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
}


###_|行星熔炉|	|plnt|
can_destroy_planet_with_PLANET_KILLER_SMELTER = {
	custom_tooltip = {
		fail_text = is_own_consecrated_world
		NOT = { has_planet_flag = consecrated@from.owner }
	}
	custom_tooltip = {
		fail_text = is_not_a_standard_planet_or_megastructure
		is_a_planet_megastructure = yes
		is_asteroid = no
		NOT = { is_planet_class = pc_astral_scar }
		UGRC_trgr_plnt_PK_ignore_PLNT = no	#_|UGRC无视星球|
		UGRC_trgr_plnt_PK_ignore_MISC = no	#_|UGRC无法摧毁|
	}
	custom_tooltip = {
		fail_text = is_shielded
		UGRC_trgr_plnt_PK_ignore_SHIELD = no	#_|UGRC带盾|
	}
	custom_tooltip = {
		fail_text = is_non_artificial
		is_artificial = no
	}
	custom_tooltip = {
		fail_text = fotd_cant_collossus
		NOT = { has_planet_flag = fotd_seperatist_planet@from.owner }
		exists = from.owner
		from.owner = {
			NOT = { has_country_flag = fotd_seperatist_country@from.owner }
		}
	}
	custom_tooltip = {
		fail_text = is_not_hot_planet
		NOR = {
			is_planet_class = pc_volcanic
			is_planet_class = pc_molten
		}
	}
	if = { # Uninhabited & primitives are okay, but own colonies should check for pop status
		limit = {
			OR = {
				is_inside_border = from.owner                              # regular empires
				solar_system = {                                           # nomads
					any_starbase_in_system = {
						is_waystation_starbase = yes
						owner = { is_same_value = from.owner }
					}
				}
			}
		}
		if = {
			limit = {
				exists = owner
				owner = { is_same_value = from.owner }
				any_owned_species = {
					NOT = { has_trait = trait_infernal }
				}
			}
			custom_tooltip = {
				fail_text = requires_purge_allowed
				success_text = will_purge_non_extremophile_pops
				from.owner = {
					is_ai = no
					has_policy_flag = purge_allowed
				}
			}
		}
	}
	else = {
		custom_tooltip = {
			fail_text = is_not_hostile_or_primitive_or_ours
			OR = {
				planet_is_hostile_or_crisis = yes
				AND = {
					exists = owner
					owner = { is_country_type = primitive }
				}
			}
		}
	}
	if = {
		limit = {
			exists = owner
			owner = { is_country_type = primitive }
		}
		custom_tooltip = {
			fail_text = primitives_not_in_borders
			OR = {
				AND = {                                                    # regular empires
					exists = space_owner
					space_owner = { is_same_value = from.owner }
				}
				solar_system = {                                           # nomads
					any_starbase_in_system = {
						is_waystation_starbase = yes
						owner = { is_same_value = from.owner }
					}
				}
			}
		}
		custom_tooltip = {
			fail_text = primitives_not_full_interference
			from.owner = {
				has_policy_flag = interference_aggressive
			}
		}
	}
}