﻿
should_apply_tribal_development_penalty_trigger = {
	government_has_flag = government_is_tribal
	NOR = {
		any_liege_or_above = {
			OR = {
				government_has_flag = government_is_feudal
				government_has_flag = government_is_clan
			}
		}
		any_vassal_or_below = {
			OR = {
				government_has_flag = government_is_feudal
				government_has_flag = government_is_clan
			}
		}
		any_neighboring_top_liege_realm_owner = {
			OR = {
				government_has_flag = government_is_feudal
				government_has_flag = government_is_clan
			}
			tier_difference = {
				target = prev
				value < -1
			}
		}
		scope:county ?= {
			holder ?= {
				any_neighboring_realm_same_rank_owner = {
					OR = {
						government_has_flag = government_is_feudal
						government_has_flag = government_is_clan
					}
				}
			}
		}
	}
}

faith_qualifies_for_west_african_pagan_feudalisation_trigger = {
	faith = {
		# Unreformed West African Pagans are our targets.
		OR = {
			religion = religion:akom_religion
			religion = religion:west_african_religion
			religion = religion:west_african_bori_religion
			religion = religion:west_african_orisha_religion
			religion = religion:west_african_roog_religion
		}
		custom_tooltip = {
			text = faith_qualifies_for_west_african_pagan_feudalisation_trigger.tt
			has_doctrine_parameter = unreformed
		}
	}
}

should_use_temple_character_background_trigger = {
	trigger_if = {
		limit = { is_landed = yes }
		OR = {
			government_has_flag = government_is_theocracy
			has_government = mandala_government
		}
	}
	trigger_else = {
		OR = {
			has_trait = order_member
			has_council_position = councillor_court_chaplain
			government_has_flag = government_is_theocracy
			is_clergy = yes
		}
	}
}

has_mandala_culture_trigger = {
	culture = {
		OR = {
			has_cultural_pillar = heritage_austronesian
			has_cultural_pillar = heritage_tai
			has_cultural_pillar = heritage_mon_khmer
			has_cultural_pillar = heritage_viet
			has_cultural_pillar = heritage_indo_aryan
			has_cultural_pillar = heritage_burman
		}
	}
}

has_mandala_faith_trigger = {
	custom_description = {
		text = "hof_interaction_unreformed_faith"
		NOT = {
			faith = { has_doctrine_parameter = unreformed }
		}
	}
	#faith = { has_doctrine = doctrine_polytheist }
}
