law_groups = {
	status_of_women = {
		law_type = realm
	}
	revoke_title_law = {
		law_type = realm
	}
	ze_administration_laws = {
		law_type = realm
	}
}

laws = {
	status_of_women_0 = {
		group = status_of_women
		allow = {
			has_law = status_of_women_1
			NOR = {
				holder_scope = { has_religion_feature = religion_matriarchal }
				holder_scope = { has_religion_feature = religion_equal }
				holder_scope = { has_religion_feature = religion_feature_bon }
			}
		}
		potential = {
			has_dlc = "Zeus"
			holy_order = no
			NOR = {
				holder_scope = { has_religion_feature = religion_matriarchal }
				holder_scope = { has_religion_feature = religion_equal }
				holder_scope = { has_religion_feature = religion_feature_bon }
				has_game_rule = {
					name = gender
					value = historical
				}
				has_game_rule = {
					name = gender
					value = all
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
		ai_will_revoke = {
			factor = 0
		}
		pass_effect = {
			
		}
		effect = {
			if = {
				limit = {
					has_law = status_of_women_1
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_SPYMASTER
				}
			}
			if = {
				limit = {
					has_law = status_of_women_2
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_SPYMASTER
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_TREASURER
				}
			}
			if = {
				limit = {
					has_law = status_of_women_3
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_SPYMASTER
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_TREASURER
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_MARSHAL
					
				}
			}
			if = {
				limit = {
					has_law = status_of_women_4
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_SPYMASTER
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_TREASURER
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_MARSHAL
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_TRUE_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_ENATIC_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_ENATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_COMMANDERS
				}
			}
			hidden_tooltip = {
				revoke_law = status_of_women_1
				revoke_law = status_of_women_2
				revoke_law = status_of_women_3
				revoke_law = status_of_women_4
			}
			set_allow_feminism = no
			set_allow_gender_laws = no
		}
	}
	status_of_women_1 = {
		group = status_of_women
		allow = {
			OR = {
				has_law = status_of_women_0
				has_law = status_of_women_2
			}
			NOR = {
				holder_scope = { has_religion_feature = religion_matriarchal }
				holder_scope = { has_religion_feature = religion_equal }
				holder_scope = { has_religion_feature = religion_feature_bon }
				holder_scope = { has_religion_feature = religion_patriarchal }
			}
		}
		potential = {
			has_dlc = "Zeus"
			holy_order = no
			NOR = {
				holder_scope = { has_religion_feature = religion_matriarchal }
				holder_scope = { has_religion_feature = religion_equal }
				holder_scope = { has_religion_feature = religion_feature_bon }
				holder_scope = { has_religion_feature = religion_patriarchal }
				has_game_rule = {
					name = gender
					value = historical
				}
				has_game_rule = {
					name = gender
					value = all
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
		ai_will_revoke = {
			factor = 0
		}
		pass_effect = {
			
		}
		effect = {
			if = {
				limit = {
					has_law = status_of_women_0
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_SPYMASTER
				}
			}
			if = {
				limit = {
					has_law = status_of_women_2
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_TREASURER
				}
			}
			if = {
				limit = {
					has_law = status_of_women_3
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_TREASURER
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_MARSHAL
				}
			}
			if = {
				limit = {
					has_law = status_of_women_4
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_TREASURER
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_MARSHAL
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_TRUE_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_ENATIC_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_ENATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_COMMANDERS
				}
			}
			
			hidden_tooltip = {
				revoke_law = status_of_women_0
				revoke_law = status_of_women_2
				revoke_law = status_of_women_3
				revoke_law = status_of_women_4
			}
			set_allow_feminism = no
			set_allow_gender_laws = no
		}
	}
	status_of_women_2 = {
		group = status_of_women
		allow = {
			OR = {
				has_law = status_of_women_1
				has_law = status_of_women_3
			}
			NOR = {
				holder_scope = { has_religion_feature = religion_matriarchal }
				holder_scope = { has_religion_feature = religion_equal }
				holder_scope = { has_religion_feature = religion_feature_bon }
				holder_scope = { has_religion_feature = religion_patriarchal }
			}
		}
		potential = {
			has_dlc = "Zeus"
			holy_order = no
			NOR = {
				holder_scope = { has_religion_feature = religion_matriarchal }
				holder_scope = { has_religion_feature = religion_equal }
				holder_scope = { has_religion_feature = religion_feature_bon }
				holder_scope = { has_religion_feature = religion_patriarchal }
				has_game_rule = {
					name = gender
					value = historical
				}
				has_game_rule = {
					name = gender
					value = all
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
		ai_will_revoke = {
			factor = 0
		}
		pass_effect = {
			
		}
		effect = {
			if = {
				limit = {
					has_law = status_of_women_0
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_SPYMASTER
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_TREASURER
				}
			}
			if = {
				limit = {
					has_law = status_of_women_1
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_TREASURER
				}
			}
			if = {
				limit = {
					has_law = status_of_women_3
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_MARSHAL
				}
			}
			if = {
				limit = {
					has_law = status_of_women_4
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_MARSHAL
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_TRUE_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_ENATIC_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_ENATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_COMMANDERS
				}
			}
			hidden_tooltip = {
				revoke_law = status_of_women_0
				revoke_law = status_of_women_1
				revoke_law = status_of_women_3
				revoke_law = status_of_women_4
			}
			set_allow_feminism = no
			set_allow_gender_laws = no
		}
	}
	status_of_women_3 = {
		group = status_of_women
		allow = {
			OR = {
				has_law = status_of_women_2
				has_law = status_of_women_4
			}
			NOR = {
				holder_scope = { has_religion_feature = religion_matriarchal }
				holder_scope = { has_religion_feature = religion_equal }
				holder_scope = { has_religion_feature = religion_feature_bon }
				holder_scope = { has_religion_feature = religion_patriarchal }
			}
		}
		potential = {
			has_dlc = "Zeus"
			holy_order = no
			NOR = {
				holder_scope = { has_religion_feature = religion_matriarchal }
				holder_scope = { has_religion_feature = religion_equal }
				holder_scope = { has_religion_feature = religion_feature_bon }
				holder_scope = { has_religion_feature = religion_patriarchal }
				has_game_rule = {
					name = gender
					value = historical
				}
				has_game_rule = {
					name = gender
					value = all
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
		ai_will_revoke = {
			factor = 0
		}
		pass_effect = {
			
		}
		effect = {
			if = {
				limit = {
					has_law = status_of_women_0
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_SPYMASTER
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_TREASURER
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_MARSHAL
				}
			}
			if = {
				limit = {
					has_law = status_of_women_1
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_TREASURER
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_MARSHAL
				}
			}
			if = {
				limit = {
					has_law = status_of_women_2
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_MARSHAL
				}
			}
			if = {
				limit = {
					has_law = status_of_women_4
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_TRUE_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_ENATIC_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_ENATIC
				}
				custom_tooltip = {
					text = TOOLTIP_DISALLOW_FEMALE_COMMANDERS
				}
			}
			hidden_tooltip = {
				revoke_law = status_of_women_0
				revoke_law = status_of_women_1
				revoke_law = status_of_women_2
				revoke_law = status_of_women_4
			}
			set_allow_feminism = no
			set_allow_gender_laws = yes
		}
	}
	status_of_women_4 = {
		group = status_of_women
		allow = {
			has_law = status_of_women_3
			NOR = {
				holder_scope = { has_religion_feature = religion_patriarchal }
			}
		}
		potential = {
			has_dlc = "Zeus"
			holy_order = no
			NOR = {
				holder_scope = { has_religion_feature = religion_patriarchal }
				has_game_rule = {
					name = gender
					value = historical
				}
				has_game_rule = {
					name = gender
					value = all
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
		ai_will_revoke = {
			factor = 0
		}
		pass_effect = {
			
		}
		effect = {
			if = {
				limit = {
					has_law = status_of_women_0
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_SPYMASTER
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_TREASURER
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_MARSHAL
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_TRUE_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_ENATIC_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_ENATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_COMMANDERS
				}
			}
			if = {
				limit = {
					has_law = status_of_women_1
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_CHANCELLOR
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_TREASURER
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_MARSHAL
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_TRUE_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_ENATIC_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_ENATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_COMMANDERS
				}
			}
			if = {
				limit = {
					has_law = status_of_women_2
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_MARSHAL
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_TRUE_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_ENATIC_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_ENATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_COMMANDERS
				}
			}
			if = {
				limit = {
					has_law = status_of_women_3
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_TRUE_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_ENATIC_COGNATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_ENATIC
				}
				custom_tooltip = {
					text = TOOLTIP_ALLOW_FEMALE_COMMANDERS
				}
			}
			hidden_tooltip = {
				revoke_law = status_of_women_0
				revoke_law = status_of_women_1
				revoke_law = status_of_women_2
				revoke_law = status_of_women_3
			}
			set_allow_feminism = yes
			set_allow_gender_laws = yes
		}
	}
	
	revoke_title_law_0 = {
		group = revoke_title_law
		default = yes
		allow = { 
			NOT = { has_law = revoke_title_law_2 } }
		potential = {
			has_dlc = "Zeus"
			NOT = { holder_scope = { is_nomadic = yes } }
			NOT = { holder_scope = { government = confucian_bureaucracy } }
		}
		revoke_allowed = { always = no }
		ai_will_do = { factor = 0 }
		ai_will_revoke = { factor = 0 }
		pass_effect = { }
		effect = {
			set_allow_title_revokation = no
			set_allow_free_infidel_revokation = no
			hidden_tooltip = {
				revoke_law = revoke_title_law_1
				revoke_law = revoke_title_law_2
			}
		}
	}
	revoke_title_law_1 = {
		group = revoke_title_law
		allow = { }
		potential = {
			has_dlc = "Zeus"
			NOT = { holder_scope = { is_nomadic = yes } }
			NOT = { holder_scope = { government = confucian_bureaucracy } }
		}
		revoke_allowed = { always = no }
		ai_will_do = { 
			factor = 1
			modifier = {
				factor = 0.05
				has_law = revoke_title_law_0
			}
			modifier = {
				factor = 0
				has_law = revoke_title_law_2
			}
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = { }
		effect = {
			set_allow_title_revokation = yes
			set_allow_free_infidel_revokation = no
			hidden_tooltip = {
				revoke_law = revoke_title_law_0
				revoke_law = revoke_title_law_2
			}
		}
	}
	revoke_title_law_2 = {
		group = revoke_title_law
		allow = {
			NOT = { has_law = revoke_title_law_0 }
			NOT = { holder_scope = { has_religion_feature = religion_cosmopolitan } }
			conditional_tooltip = {
				trigger = {
					holder_scope = { government = chinese_imperial_government }
				}
				holder_scope = {
					show_scope_change = no
					NOT = {
						government = chinese_imperial_government
					}
				}	
			}
		}
		potential = {
			has_dlc = "Zeus"
			NOT = { holder_scope = { is_nomadic = yes } }
			NOT = { holder_scope = { has_religion_feature = religion_cosmopolitan } }
			NOT = { holder_scope = { government = confucian_bureaucracy } }
			NOT = { holder_scope = { government = chinese_imperial_government } }
		}
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.01
			}
			modifier = {
				factor = 10
				holder_scope = { trait = zealous }
			}
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = { }
		effect = {
			set_allow_title_revokation = yes
			set_allow_free_infidel_revokation = yes
			hidden_tooltip = {
				revoke_law = revoke_title_law_0
				revoke_law = revoke_title_law_1
			}
		}
	}
	
	ze_administration_laws_0 = {
		group = ze_administration_laws
		default = yes
		allow = {
			NOT = { has_law = ze_administration_laws_2 }
		}
		potential = {
			has_dlc = "Zeus"
			NOT = { holder_scope = { is_theocracy = yes } }
			NOT = { holder_scope = { is_tribal = yes } }
			NOT = { holder_scope = { is_nomadic = yes } }
			NOT = { holder_scope = { is_republic = yes } }
			NOT = { holder_scope = { is_theocracy = yes } }
		}
		ai_will_do = { factor = 0 }
		ai_will_revoke = { factor = 0 }
		pass_effect = { }
		effect = {
			if = {
				limit = {
					has_law = ze_administration_laws_1 
				}
				custom_tooltip = {
					text = TOOLTIP_ze_administration_laws_0
				}
			}
			if = {
				limit = { 
					NOT = { has_dlc = "Charlemagne" } 
				}
				set_allow_free_duchy_revokation = no
			}
			if = {
				limit = { 
					has_dlc = "Charlemagne" 
				}
				set_allow_free_vice_royalty_revokation = no
			}
			hidden_tooltip = {
				revoke_law = ze_administration_laws_1
				revoke_law = ze_administration_laws_2
			}
		}
	}
	ze_administration_laws_1 = {
		group = ze_administration_laws
		allow = {

		}
		potential = {
			has_dlc = "Zeus"
			NOT = { holder_scope = { is_theocracy = yes } }
			NOT = { holder_scope = { is_tribal = yes } }
			NOT = { holder_scope = { is_nomadic = yes } }
			NOT = { holder_scope = { is_republic = yes } }
			NOT = { holder_scope = { is_theocracy = yes } }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.2
				always = yes
			}
			modifier = {
				factor = 0
				has_law = ze_administration_laws_2
			}
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = { }
		effect = {
			if = {
				limit = { has_law = ze_administration_laws_0 }
				custom_tooltip = {
					text = TOOLTIP_ze_administration_laws_1
				}
			}
			if = {
				limit = { 
					NOT = { has_dlc = "Charlemagne" } 
				}
				set_allow_free_duchy_revokation = no
			}
			if = {
				limit = { 
					has_dlc = "Charlemagne" 
				}
				set_allow_free_vice_royalty_revokation = no
			}
			hidden_tooltip = {
				revoke_law = ze_administration_laws_0
				revoke_law = ze_administration_laws_2
				#revoke_law = ze_administration_laws_3
			}
		}
	}
	ze_administration_laws_2 = {
		group = ze_administration_laws
		allow = {
			tier = EMPEROR
			NOT = { 
				has_law = ze_administration_laws_0
			}
			has_law = law_voting_power_0
			has_law = war_voting_power_0
			has_law = revoke_title_voting_power_0
			has_law = imprison_voting_power_0
			has_law = grant_title_voting_power_0
			has_law = banish_voting_power_0
			has_law = execution_voting_power_0
			conditional_tooltip = {
				trigger = {
					holder_scope = { 
						NOR = { 
							government = chinese_imperial_government 
							has_religion_feature = religion_cosmopolitan
						} 
					}
				}
				has_law = revoke_title_law_2
			}
			has_law = out_of_realm_inheritance_law_1
		}
		potential = {
			has_dlc = "Zeus"
			NOT = { holder_scope = { is_theocracy = yes } }
			NOT = { holder_scope = { is_tribal = yes } }
			NOT = { holder_scope = { is_nomadic = yes } }
			NOT = { holder_scope = { is_republic = yes } }
			NOT = { holder_scope = { is_theocracy = yes } }
		}
		ai_will_do = {
			factor = 10
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = { }
		effect = {
			if = {
				limit = { has_law = ze_administration_laws_0 }
				custom_tooltip = {
					text = TOOLTIP_ze_administration_laws_1
				}
			}
			if = {
				limit = { 
					NOT = { has_dlc = "Charlemagne" } 
				}
				set_allow_free_duchy_revokation = yes
			}
			if  = {
				limit = {
					has_dlc = "Charlemagne"
				}
				add_law = vice_royalty_2
				set_allow_free_vice_royalty_revokation = yes
			}
			hidden_tooltip = {
				revoke_law = ze_administration_laws_0
				revoke_law = ze_administration_laws_1
				#revoke_law = ze_administration_laws_3
			}
		}
		
		vassal_limit = 25
		feudal_opinion = -10
	}
}