#	Example:
# 
#	example_trigger = {
#		is_country_type = default
#		free_leader_slots > 0
#	}
#
#
#	In a script file:
#
#	trigger = {
#		example_trigger = yes
#	}
#

allows_slavery = {
	OR = {
		has_policy_flag = slavery_allowed
		AND = {
		  has_ethic = ethic_gestalt_consciousness
		  NOT = { has_valid_civic = civic_harmonious }
		}
	}	
}

allows_purge = {
	OR = {
	  AND = {
		  has_ethic = ethic_gestalt_consciousness
		  NOT = { has_valid_civic = civic_harmonious }
		}
		has_valid_civic = civic_fanatic_purifiers
		has_policy_flag = purge_allowed
		has_policy_flag = purge_displacement_only
	}	
}

planet_can_be_liberated_from_owner = {
	owner = {
		NOR = {
			is_country_type = awakened_fallen_empire
			is_country_type = fallen_empire
			has_authority = auth_hive_mind
			has_authority = auth_machine_intelligence
			has_authority = auth_xilin_mind
		}
	}
}

wears_clothes = { # The species uses the portrait that wears clothes
	OR = {
		species_portrait = human
		species_portrait = humanoid_02
		species_portrait = humanoid_03
		species_portrait = humanoid_04
		species_portrait = humanoid_05
		species_portrait = mam5
		species_portrait = mam13
		species_portrait = mam10
		species_portrait = mam14
		species_portrait = mam4
		species_portrait = mam9
		species_portrait = mam11
		species_portrait = mam6
		species_portrait = mam3
		species_portrait = mam12
		species_portrait = mam7
		species_portrait = mam15
		species_portrait = mam2
		species_portrait = mam8
		species_portrait = mam1
		species_portrait = mam16
		species_portrait = mam17
		species_portrait = rep1
		species_portrait = rep2
		species_portrait = rep3
		species_portrait = rep4
		species_portrait = rep5
		species_portrait = rep6
		species_portrait = rep7
		species_portrait = rep8
		species_portrait = rep9
		species_portrait = rep10
		species_portrait = rep11
		species_portrait = rep12
		species_portrait = rep13
		species_portrait = rep15
		species_portrait = rep16
		species_portrait = avi1
		species_portrait = avi2
		species_portrait = avi4
		species_portrait = avi5
		species_portrait = avi6
		species_portrait = avi8
		species_portrait = avi9
		species_portrait = avi10
		species_portrait = avi11
		species_portrait = avi12
		species_portrait = avi13
		species_portrait = avi14
		species_portrait = avi15
		species_portrait = avi16
		species_portrait = art7
		species_portrait = art6
		species_portrait = art8
		species_portrait = art9
		species_portrait = art10
		species_portrait = mol1
		species_portrait = mol2
		species_portrait = mol3
		species_portrait = mol4
		species_portrait = mol5
		species_portrait = mol11
		species_portrait = mol12
		species_portrait = mol13
		species_portrait = mol14
		species_portrait = mol15
		species_portrait = fun6
		species_portrait = fun7
		species_portrait = fun8
		species_portrait = fun9
		species_portrait = fun10
		species_portrait = pla6
		species_portrait = pla7
		species_portrait = pla8
		species_portrait = pla9
		species_portrait = pla10
		species_portrait = xilin_apostle
		species_portrait = human_god
	}
}

#Works in species scope, with a country in from
is_lonely_hive_mind_pop = {
	has_trait = trait_hive_mind
	NOT = { from = { has_authority = auth_hive_mind } }
	NAND = {
			has_trait = trait_tree_spirit
			from = {
				OR = {
						has_valid_civic = civic_harmonious_tree
						has_modifier = m_kala_gift
				}
			}
	}
	from = { 
		NOR = {
			is_country_type = fallen_empire
			is_country_type = awakened_fallen_empire
		}
	}
}