# DO NOT ALTER THE NAME OR NUMBER OF THESE!

succession_laws = {

	succ_gavelkind = {
		oldest_child_opinion = -5
		child_opinion = 15
		dynasty_opinion = 5
		vassal_opinion = 5
	
		potential = {
			holder_scope = {
				OR = {
					independent = yes
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
				}
				NOT = { religion_group = muslim }
				is_merchant_republic = no
				is_patrician = no
				OR = {
					independent = yes
					NOT = {
						any_demesne_title = {
							is_vice_royalty = yes
						}
					}
				}
			}
			OR = {
				is_landless_type_title = no
				is_tribal_type_title = yes
				temporary = yes
			}
			
			rebel = no
			
			OR = {
				holder_scope = { is_feudal = yes }
				holder_scope = { is_tribal = yes }
			}
			is_primary_type_title = no
			NOT = { holder_scope = { government = confucian_bureaucracy } }
		}
		allow = {
			holder_scope = {
				show_scope_change = no
				OR = {
					is_tribal = no
					custom_tooltip = { 
						text = TT_NOT_UNREFORMED_PAGAN
						hidden_tooltip = {
							NOR = { 
								religion = norse_pagan
								religion = slavic_pagan
								religion = baltic_pagan
								religion = finnish_pagan
								religion = zun_pagan
								religion = tengri_pagan
								religion = west_african_pagan
								religion = aztec
								religion = pagan
							}
						}
					}
				}
				in_revolt = no
			}
			conditional_tooltip = {
				trigger = {
					has_dlc = "Conclave"
				}
				custom_tooltip = {
					text = forced_elective_tt
					hidden_tooltip = {
						NAND = { 
							has_law = succession_voting_power_1
							has_law = succ_feudal_elective
						}
					}
				}
			}
		}
		effect = {
			succession = gavelkind
		}
		revoke_allowed = {
			always = no
		}			
	}
	
	succ_elective_gavelkind = {
		child_opinion = 15
		dynasty_opinion = 5
	
		potential = {
			holder_scope = {
				is_nomadic = no
				OR = {
					independent = yes
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
				}
				NOT = { religion_group = muslim }
				is_merchant_republic = no
				is_patrician = no
				OR = {
					independent = yes
					NOT = {
						any_demesne_title = {
							is_vice_royalty = yes
						}
					}
				}
			}
			OR = {
				is_landless_type_title = no
				is_tribal_type_title = yes
				temporary = yes
			}
			
			rebel = no
			
			OR = {
				holder_scope = { is_feudal = yes }
				holder_scope = { is_tribal = yes }
			}
			is_primary_type_title = no
			NOT = { holder_scope = { government = confucian_bureaucracy } }
			NOT = { holder_scope = { government = chinese_imperial_government } }
		}
		allow = {
			conditional_tooltip = {
				trigger = {
					has_dlc = "Conclave"
				}
				custom_tooltip = {
					text = forced_elective_tt
					hidden_tooltip = {
						NAND = { 
							has_law = succession_voting_power_1
							has_law = succ_feudal_elective
						}
					}
				}
			}
			holder_scope = {
				show_scope_change = no
				in_revolt = no
			}
		}
		effect = {
			succession = elective_gavelkind
		}
		revoke_allowed = {
			always = no
		}			
	}
	
	succ_seniority = {
		vassal_opinion = -5
		oldest_child_opinion = -15
		child_opinion = -10
		dynasty_opinion = 5
	
		potential = {
			holder_scope = {
				OR = {
					independent = yes
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
				}
				OR = {
					is_merchant_republic = no
					primary_title = {
						NOT = { title = PREVPREV }
					}
				}
				
                OR = {
                    NOR = {
						religion_group = muslim
						religion_group = indian_group 
					}
                    is_patrician = yes
                }
				
				OR = {
					NOT = { religion_group = pagan_group }
					is_reformed_religion = yes
					religion = hellenic_pagan
					is_patrician = yes
				}
				
				OR = {
					is_republic = no
					is_patrician = yes
				}
				OR = {
					independent = yes
					NOT = {
						any_demesne_title = {
							is_vice_royalty = yes
						}
					}
				}
			}
			OR = {
				is_landless_type_title = no
				is_tribal_type_title = yes
				temporary = yes
			}
			OR = {
				AND = {
					tier = baron
					is_feudal = yes
				}
				holder_scope = { is_feudal = yes }
				holder_scope = { is_patrician = yes }
			}
			
			is_primary_type_title = no
			
			OR = {
				NOT = { tier = baron }
				holder_scope = { is_patrician = yes }
			}
			
			NOT = { holder_scope = { government = confucian_bureaucracy } }
		}
		
		allow = {
			
			conditional_tooltip = {
				trigger = {
					NOT = { has_dlc = "Conclave" }
				}
				OR = {
					hidden_tooltip = {
						has_crown_law_title = no
					}
					holder_scope = {
						show_scope_change = no
						is_patrician = yes 
						OR = {
							is_merchant_republic = no
							PREV = {
								is_primary_holder_title = no
							}
							NOT = {
								in_revolt = yes
								succ_law_title = {
									title = PREVPREV
								}
							}
						}
					}
					crownlaw_title = {
						OR = {
							has_law = crown_authority_2
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}
			}
			custom_tooltip = {
				text = not_forced_tt
				hidden_tooltip = {
					holder_scope = { NOT = { has_character_flag = liege_forced_succ_law } }
				}
			}
			conditional_tooltip = {
				trigger = {
					has_dlc = "Conclave"
				}
				custom_tooltip = {
					text = forced_elective_tt
					hidden_tooltip = {
						NAND = { 
							has_law = succession_voting_power_1
							has_law = succ_feudal_elective
						}
					}
				}
			}
		}
		
		effect = {
			succession = seniority
		}
		revoke_allowed = {
			always = no
		}			
	}
	
	succ_primogeniture = {
		oldest_child_opinion = 10
		youngest_child_opinion = -15
		child_opinion = -10
		dynasty_opinion = -5
		potential = {
			holder_scope = {
				NOT = { religion_group = muslim }
				is_merchant_republic = no
				is_patrician = no
			}
			OR = {
				holder_scope = { # Viceroyalties can always have primogeniture if not muslim
					any_demesne_title = {
						is_vice_royalty = yes
					}
				}
				AND = {
					holder_scope = {
						OR = {
							independent = yes
							NOT = {
								any_liege = {
									holy_order = yes
								}
							}
						}
						OR = {
							NOT = { religion_group = pagan_group }
							religion = bon
							is_reformed_religion = yes
							religion = hellenic_pagan
						}
					}
					OR = {
						is_landless_type_title = no
						is_tribal_type_title = yes
						temporary = yes
					}
					is_primary_type_title = no
					OR = {
						AND = {
							tier = baron
							is_feudal = yes
						}
						holder_scope = { is_feudal = yes }
					}
				}
			}
			NOT = { holder_scope = { government = confucian_bureaucracy } }
		}
		allow = {
			conditional_tooltip = {
				trigger = {
					has_dlc = "Conclave"
				}
				OR = {
					holder_scope = { # Viceroyalties can always have primogeniture if not muslim
						show_scope_change = no
						any_demesne_title = {
							is_vice_royalty = yes
						}
					}
					AND = {
						holder_scope = {
							show_scope_change = no
							primary_title = {
								show_scope_change = no
								OR = {
									has_law = ze_administration_laws_1
									has_law = ze_administration_laws_2
								}
							}
						}
					}
				}
			}
			conditional_tooltip = {
				trigger = {
					NOT = { has_dlc = "Conclave" }
				}
				OR = {
					holder_scope = { # Viceroyalties can always have primogeniture if not muslim
						show_scope_change = no
						any_demesne_title = {
							is_vice_royalty = yes
						}
					}
					hidden_tooltip = {
						has_crown_law_title = no
					}
					crownlaw_title = {
						OR = {
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}
			}
			custom_tooltip = {
				text = not_forced_tt
				hidden_tooltip = {
					holder_scope = { NOT = { has_character_flag = liege_forced_succ_law } }
				}
			}
			conditional_tooltip = {
				trigger = {
					has_dlc = "Conclave"
				}
				custom_tooltip = {
					text = forced_elective_tt
					hidden_tooltip = {
						NAND = { 
							has_law = succession_voting_power_1
							has_law = succ_feudal_elective
						}
					}
				}
			}
		}
		
		effect = {
			succession = primogeniture
		}
		revoke_allowed = {
			always = no
		}			
	}
	
	succ_feudal_elective = {
		oldest_child_opinion = -15
		child_opinion = -5
		dynasty_opinion = -5
		vassal_opinion = 10
		potential = {
			holder_scope = {
				OR = {
					independent = yes
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
				}
				OR = {
					NOR = { 
						religion_group = muslim
						religion_group = indian_group
					}
					has_law = succession_voting_power_1
					has_law = succ_feudal_elective # Keep it even if you revoke Full Council Authority
				}
				is_merchant_republic = no
				is_patrician = no
				
				OR = {
					NOT = { religion_group = pagan_group }
					is_reformed_religion = yes
					religion = hellenic_pagan
				}
				OR = {
					independent = yes
					NOT = {
						any_demesne_title = {
							is_vice_royalty = yes
						}
					}
				}
			}
			OR = {
				is_landless_type_title = no
				is_tribal_type_title = yes
				temporary = yes
			}
			is_primary_type_title = no
			NOT = { tier = baron }
			holder_scope = { is_feudal = yes }
			NOT = { holder_scope = { government = confucian_bureaucracy } }
			NOT = { holder_scope = { government = chinese_imperial_government } }
		}
		allow = {
			custom_tooltip = {
				text = not_forced_tt
				hidden_tooltip = {
					holder_scope = { NOT = { has_character_flag = liege_forced_succ_law } }
				}
			}
		}
		effect = {
			succession = feudal_elective
		}
		revoke_allowed = {
			always = no
		}			
	}
	
	succ_tanistry = {
		oldest_child_opinion = -20
		child_opinion = -10
		dynasty_opinion = 5
		vassal_opinion = 5
		potential = {
			holder_scope = {
				OR = {
					independent = yes
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
				}
				NOT = { religion_group = muslim }
				is_merchant_republic = no
				is_patrician = no
				culture_group = celtic
				OR = {
					independent = yes
					NOT = {
						any_demesne_title = {
							is_vice_royalty = yes
						}
					}
				}
			}
			OR = {
				is_landless_type_title = no
				is_tribal_type_title = yes
				temporary = yes
			}
			is_primary_type_title = no
			NOT = { tier = baron }
			OR = {
				holder_scope = { 
					culture_group = celtic
				}
				AND = {
					tier = baron
					is_feudal = yes
				}
				holder_scope = { is_feudal = yes }
			}
			NOT = { holder_scope = { government = confucian_bureaucracy } }
			NOT = { holder_scope = { government = chinese_imperial_government } }
		}
		allow = {
			OR = {
				holder_scope = { is_feudal = yes }
				holder_scope = { is_tribal = yes }
			}
			custom_tooltip = {
				text = not_forced_tt
				hidden_tooltip = {
					holder_scope = { NOT = { has_character_flag = liege_forced_succ_law } }
				}
			}
			conditional_tooltip = {
				trigger = {
					has_dlc = "Conclave"
				}
				custom_tooltip = {
					text = forced_elective_tt
					hidden_tooltip = {
						NAND = { 
							has_law = succession_voting_power_1
							has_law = succ_feudal_elective
						}
					}
				}
			}
		}
		effect = {
			succession = tanistry
		}
		revoke_allowed = {
			always = no
		}			
	}
	
	succ_ultimogeniture = {
		youngest_child_opinion = 10
		oldest_child_opinion = -15
		child_opinion = -10
		dynasty_opinion = -5
		potential = {
			holder_scope = {
				OR = {
					independent = yes
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
				}
				OR = {
					culture = mongol
					religion = bon
					AND = {
						NOT = { religion = norse_pagan }
						NOT = { religion = tengri_pagan }
						NOT = { religion = baltic_pagan }
						NOT = { religion = finnish_pagan }
						NOT = { religion = aztec }
						NOT = { religion = pagan }
						NOT = { religion = slavic_pagan }
						NOT = { religion = west_african_pagan }
					}
				}
				
				NOT = { religion_group = muslim }
				is_merchant_republic = no
				is_patrician = no
				OR = {
					independent = yes
					NOT = {
						any_demesne_title = {
							is_vice_royalty = yes
						}
					}
				}
			}
			OR = {
				is_landless_type_title = no
				is_tribal_type_title = yes
				temporary = yes
				AND = {
					is_nomadic = no
					OR = {
						title = e_mongol_empire
						title = e_golden_horde
						title = e_il-khanate
					}
				}
			}
			is_primary_type_title = no
			OR = {
				AND = {
					tier = baron
					is_feudal = yes
				}
				holder_scope = { is_feudal = yes }
				AND = {
					is_nomadic = no
					OR = {
						title = e_mongol_empire
						title = e_golden_horde
						title = e_il-khanate
					}
				}
			}
			NOT = { holder_scope = { government = confucian_bureaucracy } }
		}
		allow = {
			conditional_tooltip = {
				trigger = {
					has_dlc = "Conclave"
				}
				holder_scope = {
					show_scope_change = no
					primary_title = {
						show_scope_change = no
						OR = {
							has_law = ze_administration_laws_1
							has_law = ze_administration_laws_2
						}
					}
				}
			}
			conditional_tooltip = {
				trigger = {
					NOT = { has_dlc = "Conclave" }
				}
				OR = {
					hidden_tooltip = {
						has_crown_law_title = no
					}
					crownlaw_title = {
						OR = { 
							has_law = crown_authority_1
							has_law = crown_authority_2
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}
			}
			custom_tooltip = {
				text = not_forced_tt
				hidden_tooltip = {
					holder_scope = { NOT = { has_character_flag = liege_forced_succ_law } }
				}
			}
			conditional_tooltip = {
				trigger = {
					has_dlc = "Conclave"
				}
				custom_tooltip = {
					text = forced_elective_tt
					hidden_tooltip = {
						NAND = { 
							has_law = succession_voting_power_1
							has_law = succ_feudal_elective
						}
					}
				}
			}
		}
		
		effect = {
			succession = ultimogeniture
		}
		revoke_allowed = {
			always = no
		}
	}

	succ_turkish_succession = {
		oldest_child_opinion = -5
#		child_opinion = 30
#		dynasty_opinion = 10
		potential = {
			holder_scope = {
				religion_group = muslim
				is_republic = no
				is_merchant_republic = no
				is_nomadic = no
			}
			OR = {
				holder_scope = { # Viceroyalties can always have turkish succession if muslim
					any_demesne_title = {
						is_vice_royalty = yes
					}
				}
				AND = {
					OR = {
						is_landless_type_title = no
						is_tribal_type_title = yes
						temporary = yes
					}
					holder_scope = {
						OR = {
							independent = yes
							NOT = {
								any_liege = {
									holy_order = yes
								}
							}
						}
					}
					is_primary_type_title = no
				}
			}
			NAND = { 
				has_law = succession_voting_power_1
				has_law = succ_feudal_elective
			}
			NOT = { holder_scope = { government = confucian_bureaucracy } }
		}
		effect = {
			succession = turkish_succession
		}
		revoke_allowed = {
			always = no
		}			
	}
	succ_papal_succession = {
		potential = {
			title = k_papal_state
		}
		
		effect = {
			succession = papal_succession
		}
		revoke_allowed = {
			always = no
		}		
	}
	
	# Titles revert back to the liege on death
	succ_appointment = {
		potential = {
			holder_scope = {
				is_feudal = yes
				independent = no
				any_liege = {
					holy_order = yes
				}
				is_merchant_republic = no
			}
			NOT = { holder_scope = { government = confucian_bureaucracy } }
			NOT = { holder_scope = { government = chinese_imperial_government } }
		}
		effect = {
			succession = appointment
		}
		revoke_allowed = {
			always = no
		}		
	}
	
	succ_open_elective = {
		potential = {
			NOT = { title = k_papal_state }
			temporary = no
			OR = {
				is_primary_type_title = yes
				holy_order = yes
				AND = {
					tier = baron
					OR = {
						is_republic = yes
						AND = {
							is_theocracy = yes
							NOT = { holder_scope = { religion_group = muslim } }
						}
					}
				}
				holder_scope = {
					OR = {
						is_republic = yes
						AND = {
							is_theocracy = yes
							NOT = { religion_group = muslim }
						}
					}
				}
			}
			OR = {
				is_landless_type_title = yes
				holder_scope = { is_theocracy = no }
				holder_scope = { 
					NOT = { religion = catholic }
					NOT = { religion = fraticelli }
				}
			}
			holder_scope = { 
				is_patrician = no
				is_merchant_republic = no
				OR = {
					independent = yes
					is_feudal = no
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
				}
			}
			NAND = { 
				has_law = succession_voting_power_1
				has_law = succ_feudal_elective
			}
			NOT = { holder_scope = { government = confucian_bureaucracy } }
			NOT = { holder_scope = { government = chinese_imperial_government } }
		}
		
		effect = {
			succession = open_elective
		}
		revoke_allowed = {
			always = no
		}
	}
	succ_catholic_bishopric = {
		potential = {
			is_landless_type_title = no
			OR = {
				AND = {
					tier = baron
					is_theocracy = yes
				}
				holder_scope = { is_theocracy = yes }
			}
			
			holder_scope = {
				OR = {
					religion = catholic
					religion = fraticelli
				}
				is_merchant_republic = no
				OR = {
					independent = yes
					is_feudal = no
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
				}
			}
			is_primary_type_title = no
			NOT = { holder_scope = { government = confucian_bureaucracy } }
			NOT = { holder_scope = { government = chinese_imperial_government } }
		}
		effect = {
			succession = catholic_bishopric
		}
		revoke_allowed = {
			always = no
		}			
	}
	
	succ_patrician_elective = {
		potential = {
			OR = {
				is_primary_holder_title = yes
				holder_scope = {
					in_revolt = yes
					succ_law_title = {
						title = PREVPREV
					}
				}
			}
			holder_scope = {
				is_merchant_republic = yes
			}
			NOT = { holder_scope = { government = confucian_bureaucracy } }
			NOT = { holder_scope = { government = chinese_imperial_government } }
		}
		effect = {
			succession = patrician_elective
		}
		revoke_allowed = {
			always = no
		}			
	}

	succ_nomad_succession = {
		potential = {
			holder_scope = {
				is_nomadic = yes
			}
		}
		effect = {
			succession = nomad_succession
		}
		revoke_allowed = {
			always = no
		}			
	}
	
	succ_offmap_succession = {
		potential = {
			holder_scope = {
				top_liege = { is_offmap_governor = yes }
				government = confucian_bureaucracy # To use this with future offmap powers, use an OR clause here with the new government types
			}
		}
		effect = {
			succession = offmap_succession
			# This succession type generates a character of China's culture and religion
			# They have decent (4-10) stats, and good (7-11) stewardship, and will always have a Stewardship education
			# The offmap power defined in the top liege's government is used to determine the culture and religion. Will not function if this isn't defined
		}
		revoke_allowed = {
			always = no
		}			
	}
}

gender_laws = {
	agnatic_succession = {
		female_dynasty_opinion = -5
	
		potential = {
			always = yes
		}
		effect = {
			gender_succ = agnatic
		}
		revoke_allowed = {
			always = no
		}			
		default = yes
		default_selection = {
			factor = 1
			
			modifier = {
				factor = 0
				has_game_rule = {
					name = gender
					value = all
				}
			}
			
			modifier = {
				factor = 100
				holder_scope = {
					NOR = {
						religion_group = christian
						AND = {
							culture_group = tibetan_group
							NOT = { religion = taoist }
							NOT = { culture = tangut }
						}
					}
					primary_title = {
						NOT = { has_law = status_of_women_3 }
						NOT = { has_law = status_of_women_4 }
					}
				}
			}
		}
	}

	cognatic_succession = {
		potential = {
			holder_scope = {
				OR = {
					NOT = { tier = baron }
					is_theocracy = yes
					is_republic = yes
				}
				OR = {
					independent = yes
					NOT = {
						any_liege = {
							holy_order = yes
						}
					}
					is_merchant_republic = yes
				}
				OR = {
					AND = {
						NOT = { religion_group = muslim }
						NOT = { religion = aztec }
						NOT = { religion = aztec_reformed }
						has_horde_culture = no
						#is_tribal = no
						is_nomadic = no
						is_merchant_republic = no
						is_patrician = no
					}
					AND = {
						has_dlc = "Zeus"
						OR = {
							ROOT = { holder_scope = { primary_title = { has_law = status_of_women_3 } } }
							ROOT = { holder_scope = { primary_title = { has_law = status_of_women_4 } } }
							has_game_rule = {
								name = gender
								value = all
							}
						}
						OR = {
							is_patrician = no
							liege = {
								primary_title = {
									OR = {
										has_law = true_cognatic_succession
										has_law = cognatic_succession
										has_law = enatic_cognatic_succession
										has_law = enatic_succession
									}
								}
							}
						}
					}
				}
			}
			
			is_landless_type_title = no
			
			OR = {
				AND = {
					tier = baron
					is_theocracy = no
					is_republic = no
				}
				holder_scope = {
					is_theocracy = no
					is_republic = no
				}
			}
			
			is_primary_type_title = no
		}
		
		effect = {
			gender_succ = cognatic
			set_allows_matrilineal_marriage = yes
		}
		revoke_allowed = {
			always = no
		}			
		default = yes
		default_selection = {
			factor = 10
		}
	}
	
	true_cognatic_succession = {
		male_dynasty_opinion = -5
		
		potential = {
			OR = {
				AND = {
					has_dlc = "Zeus"
					has_game_rule = {
						name = gender
						value = all
					}
					is_patrician = no
				}
				holder_scope = {
					OR = {
						AND = {
							NOT = { religion_group = muslim }
							NOT = { religion = aztec }
							NOT = { religion = aztec_reformed }
							has_horde_culture = no
							#is_tribal = no
							is_nomadic = no
							is_merchant_republic = no
							is_patrician = no
						}
						AND = {
							has_dlc = "Zeus"
							OR = {
								ROOT = { holder_scope = { primary_title = { has_law = status_of_women_4 } } }
							}
							OR = {
								is_patrician = no
								liege = {
									primary_title = {
										OR = {
											has_law = true_cognatic_succession
											has_law = cognatic_succession
											has_law = enatic_cognatic_succession
											has_law = enatic_succession
										}
									}
								}
							}
						}
					}
				}
			}
			
			is_landless_type_title = no
			
			OR = {
				AND = {
					tier = baron
					is_theocracy = no
					is_republic = no
				}
				holder_scope = {
					is_theocracy = no
					is_republic = no
				}
			}
			
			is_primary_type_title = no
		}
		allow = {
			OR = {
				holder_scope = {
					OR = {
						culture = basque
						culture = zhangzhung
						culture = sumpa
						religion = cathar
						religion = messalian
						religion = mazdaki
					}
				}
				OR = {
					ROOT = { holder_scope = { primary_title = { has_law = status_of_women_4 } } }
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
		}
		effect = {
			gender_succ = true_cognatic
			set_allows_matrilineal_marriage = yes
		}
		revoke_allowed = {
			always = no
		}	
	}
	
	enatic_cognatic_succession = {
		male_dynasty_opinion = -10
		female_dynasty_opinion = 5
		
		potential = {
			OR = {
				AND = {
					has_dlc = "Zeus"
					has_game_rule = {
						name = gender
						value = all
					}
					is_patrician = no
				}
				holder_scope = {
					OR = {
						AND = {
							NOT = { religion_group = muslim }
							NOT = { religion = aztec }
							NOT = { religion = aztec_reformed }
							has_horde_culture = no
							#is_tribal = no
							is_nomadic = no
							is_merchant_republic = no
							is_patrician = no
						}
						AND = {
							has_dlc = "Zeus"
							OR = {
								ROOT = { holder_scope = { primary_title = { has_law = status_of_women_4 } } }
							}
							OR = {
								is_patrician = no
								liege = {
									primary_title = {
										OR = {
											has_law = true_cognatic_succession
											has_law = cognatic_succession
											has_law = enatic_cognatic_succession
											has_law = enatic_succession
										}
									}
								}
							}
						}
					}
				}
			}
			
			is_landless_type_title = no
			
			OR = {
				AND = {
					tier = baron
					is_theocracy = no
					is_republic = no
				}
				holder_scope = {
					is_theocracy = no
					is_republic = no
				}
			}
			
			is_primary_type_title = no
		}
		allow = {
			OR = {
				holder_scope = {
					OR = {
						culture = basque
						culture = zhangzhung
						culture = sumpa
						religion = cathar
						religion = messalian
						religion = mazdaki
					}
				}
				OR = {
					ROOT = { holder_scope = { primary_title = { has_law = status_of_women_4 } } }
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
		}
		effect = {
			gender_succ = enatic_cognatic
			set_allows_matrilineal_marriage = yes
		}
		revoke_allowed = {
			always = no
		}		
	}
	
		enatic_succession = {
		male_dynasty_opinion = -10
		female_dynasty_opinion = 10
		
		potential = {
			OR = {
				AND = {
					has_dlc = "Zeus"
					has_game_rule = {
						name = gender
						value = all
					}
					is_patrician = no
				}
				holder_scope = {
					OR = {
						AND = {
							NOT = { religion_group = muslim }
							NOT = { religion = aztec }
							NOT = { religion = aztec_reformed }
							has_horde_culture = no
							#is_tribal = no
							is_nomadic = no
							is_merchant_republic = no
							is_patrician = no
						}
						AND = {
							has_dlc = "Zeus"
							OR = {
								ROOT = { holder_scope = { primary_title = { has_law = status_of_women_4 } } }
							}
							OR = {
								is_patrician = no
								liege = {
									primary_title = {
										OR = {
											has_law = true_cognatic_succession
											has_law = cognatic_succession
											has_law = enatic_cognatic_succession
											has_law = enatic_succession
										}
									}
								}
							}
						}
					}
				}
			}
			
			is_landless_type_title = no
			
			OR = {
				AND = {
					tier = baron
					is_theocracy = no
					is_republic = no
				}
				holder_scope = {
					is_theocracy = no
					is_republic = no
				}
			}
			
			is_primary_type_title = no
		}
		allow = {
			OR = {
				holder_scope = {
					OR = {
						culture = basque
						culture = zhangzhung
						culture = sumpa
						religion = cathar
						religion = messalian
						religion = mazdaki
					}
				}
				OR = {
					ROOT = { holder_scope = { primary_title = { has_law = status_of_women_4 } } }
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
		}
		effect = {
			gender_succ = enatic
			set_allows_matrilineal_marriage = yes
		}
		revoke_allowed = {
			always = no
		}
	}
}
