﻿tradition_sacred_rulership = {
	scope = culture
	saved_scopes = { add character }

	is_shown = {
		CE_is_loaded = yes
		OR = {
			scope:character ?= {
				faith = {
					has_doctrine = doctrine_temporal_head
				}
			}	
			any_parent_culture_or_above = {
				OR = {
					this = culture:nubian
					this = culture:ethiopian
					this = culture:soninke
					this = culture:kanuri
					this = culture:malinke
					this = culture:akan
					this = culture:yoruba
					this = culture:hausa
					this = culture:oromo
					this = culture:sidama
					this = culture:welayta
				}
			}
		}
	}

    effect = {
		entitled_toggle_tradition = { TRADITION = tradition_sacred_rulership }
	}
}

tradition_way_of_the_thiedo = {
	scope = culture
	saved_scopes = { add character }

	is_shown = {
		CE_is_loaded = yes
		OR ={
			this = culture:wolof
			any_parent_culture_or_above = {
				this = culture:wolof
			}
		}
		NOR = { #Replaces Martial Admiration
			has_cultural_tradition = tradition_chanson_de_geste
			has_cultural_tradition = tradition_druzhina
			has_cultural_tradition = tradition_martial_admiration
		}
	}
	is_valid = {
		OR ={
			this = culture:wolof
			any_parent_culture_or_above = {
				this = culture:wolof
			}
		}
		NOR = { #Replaces Martial Admiration
			has_cultural_tradition = tradition_chanson_de_geste
			has_cultural_tradition = tradition_druzhina
			has_cultural_tradition = tradition_martial_admiration
		}
	}

	effect = {
		entitled_toggle_tradition = { TRADITION = tradition_way_of_the_thiedo }
	}
}

tradition_bush_schools = {
	scope = culture
	saved_scopes = { add character }

	is_shown = {
		CE_is_loaded = yes
		OR ={
			this = culture:mel
			any_parent_culture_or_above = {
				this = culture:mel
			}
			this = culture:kru
			any_parent_culture_or_above = {
				this = culture:kru
			}
		}
	}
	is_valid = {
		NOT = { 
			has_cultural_tradition = tradition_medicinal_plants
		}
	}
	effect = {
		entitled_toggle_tradition = { TRADITION = tradition_bush_schools }
	}
}

tradition_laawol_pulaaku = {
	scope = culture
	saved_scopes = { add character }

	is_shown = {
		CE_is_loaded = yes
		OR ={
			this = culture:pulaar
			any_parent_culture_or_above = {
				this = culture:pulaar
			}
		}
	}
	is_valid = {
		OR ={
			this = culture:pulaar
			any_parent_culture_or_above = {
				this = culture:pulaar
			}
		}
		NOR = { 
			has_cultural_tradition = tradition_forbearing
			has_cultural_tradition = tradition_staunch_traditionalists
		}
	}
	
	effect = {
		entitled_toggle_tradition = { TRADITION = tradition_laawol_pulaaku }
	}
}

tradition_griots = {
	scope = culture
	saved_scopes = { add character }

	is_shown = {
		CE_is_loaded = yes
		has_cultural_pillar = heritage_sahelian
		has_cultural_pillar = heritage_senegambian
		has_cultural_pillar = heritage_west_african
		has_cultural_pillar = heritage_yoruba
		has_cultural_pillar = heritage_akan
	}
	is_valid = {
		custom_tooltip = {
			text = cannot_have_tradition_storytellers
			NOT = { any_in_list = { list = traits this = flag:tradition_storytellers } }
		}
		custom_tooltip = {
			text = cannot_have_tradition_fp1_northern_stories
			NOT = { any_in_list = { list = traits this = flag:tradition_fp1_northern_stories } }
		}
		
	}
	
	effect = {
		entitled_toggle_tradition = { TRADITION = tradition_griots }
	}
}

tradition_savanna_raiders = {
	scope = culture
	saved_scopes = { add character }

	is_shown = {
		CE_is_loaded = yes
		AND = {
			OR = {
				has_cultural_pillar = heritage_sahelian
				has_cultural_pillar = heritage_central_african
			}
			custom_description = {
				text = culture_in_dryland_desc
				any_culture_county = {
					any_county_province = {
						terrain = drylands
					}
				}
			}
		}
	}
	
	is_valid = {
	}
	
	effect = {
		entitled_toggle_tradition = { TRADITION = tradition_savanna_raiders }
	}
}

tradition_eldership = {
	scope = culture
	saved_scopes = { add character }

	is_shown = {
		CE_is_loaded = yes
		any_culture_county = {
			title_province = {
				geographical_region = world_africa
			}
		}
	}
	is_valid = {
		scope:character ?= {
			OR = {
				has_government = tribal_government
				has_government = clan_government
			}
		}
		
	}
	effect = {
		entitled_toggle_tradition = { TRADITION = tradition_eldership }
	}
}

