feudal_government = {
	create_cadet_branches = yes
	rulers_should_have_dynasty = yes
	dynasty_named_realms = yes

	fallback = 1

	primary_holding = castle_holding
	valid_holdings = { cow_metropolis_holding }
	required_county_holdings = { castle_holding city_holding church_holding }

	vassal_contract = {
		feudal_government_taxes
		feudal_government_levies
		special_contract
		religious_rights
		fortification_rights
		coinage_rights
		succession_rights
		war_declaration_rights
		council_rights
		title_revocation_rights
	}
	
	color = hsv{ 0.67 1.00 0.78 }
}

republic_government = {
	primary_holding = city_holding
	valid_holdings = { castle_holding cow_metropolis_holding }
	required_county_holdings = { city_holding castle_holding church_holding }

	ai = {
		arrange_marriage = no
		use_goals = no
		use_scripted_guis = no
		perform_religious_reformation = no
	}

	vassal_contract = { republic_government_obligations }
	color = hsv{ 0.00 1.00 0.98 }
}

# Head of faith will always get this if possible
theocracy_government = {
	primary_holding = church_holding
	valid_holdings = { castle_holding cow_metropolis_holding }
	religious = yes
	required_county_holdings = { church_holding castle_holding city_holding }

	can_get_government = {
		NOT = {
			faith = {
				has_doctrine = doctrine_theocracy_lay_clergy
			}
		}
	}

	vassal_contract = { theocracy_government_obligations }
	color = hsv{ 0.00 0.00 0.78 }
}

clan_government = {
	primary_holding = castle_holding
	primary_culture_groups = { arabic_group iranian_group }
	primary_cultures = { turkish }
	
	fallback = 2
	
	preferred_religions = { islam_religion }
	create_cadet_branches = yes
	rulers_should_have_dynasty = yes

	valid_holdings = { castle_holding cow_metropolis_holding }
	required_county_holdings = { castle_holding city_holding church_holding }
	always_use_patronym = yes
	dynasty_named_realms = yes

	vassal_contract = { clan_government_obligations }
	
	opinion_of_liege = {
		scope:vassal = {
			if = {
				limit = {
					NOT = {
						is_allied_to = scope:liege
					}
				}
				if = {
					limit = {
						is_powerful_vassal = yes
					}
					value = -30
				}
				else = {
					value = -15
				}
			}
		}
	}
	opinion_of_liege_desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:vassal = {
						NOT = {
							is_allied_to = scope:liege
						}
						is_powerful_vassal = yes
					}
				}
				desc = "GOVERNMENT_CLAN_NOT_ALLIED_POWERFUL"
			}
			triggered_desc = {
				trigger = {
					scope:vassal = {
						NOT = {
							is_allied_to = scope:liege
						}
						is_powerful_vassal = no
					}
				}
				desc = "GOVERNMENT_CLAN_NOT_ALLIED"
			}
		}
	}
	color = hsv{ 0.39 0.93 0.54 }
}
