# These laws give the council more or less power over certain decisions

law_groups = {
	law_voting_power = {
		law_type = council
		allowed_for_councillors = yes
	}
	war_voting_power = {
		law_type = council
		allowed_for_councillors = yes
	}
	revoke_title_voting_power = {
		law_type = council
		allowed_for_councillors = yes
	}
	imprison_voting_power = {
		law_type = council
		allowed_for_councillors = yes
	}
	grant_title_voting_power = {
		law_type = council
		allowed_for_councillors = yes
	}
	banish_voting_power = {
		law_type = council
		allowed_for_councillors = yes
	}
	execution_voting_power = {
		law_type = council
		allowed_for_councillors = yes
	}
}

laws = {
	# COUNCIL POWER LAWS
	##############################

	#VOTE ON LAW CHANGES
	law_voting_power_0 = {
		group = law_voting_power
		
		default = yes

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_1
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_1
			has_law = banish_voting_power_0
			has_law = revoke_title_voting_power_0
			has_law = grant_title_voting_power_0
			has_law = imprison_voting_power_0
			has_law = execution_voting_power_0
			has_law = war_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_4
			}
			holder_scope = { is_nomadic = no }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.05
			}
		}
		effect = {
			disable_council_voting_on_issue = laws
			custom_tooltip = {
				text = council_off_custom
			}
			custom_tooltip = {
				text = tooltip_disables_advisors
			}
			hidden_tooltip = {
				if = {
					limit = { 
						has_law = law_voting_power_1 
						is_primary_holder_title = yes
					}
					holder_scope = { council_decreased_power_effect = yes }
				}
				revoke_law = law_voting_power_1
				disable_council_voting_on_issue = enforce_peace
			}
		}
	}

	law_voting_power_1 = {
		group = law_voting_power
		
		default_selection = {
			factor = 0
			
			additive_modifier = { 
				value = 10			
				year = 850
				holder_scope = { 
					religion = catholic
					is_feudal = yes
				}	
			}
			additive_modifier = { 
				value = 10			
				title = e_hre	
			}
			additive_modifier = { 
				value = 10			
				title = e_byzantium	
			}
			additive_modifier = { 
				value = 10			
				holder_scope = { 
					OR = {
						is_nomadic = yes	
						is_tribal = yes	
						is_republic = yes
					}
				}
			}
		}

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_1
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_1
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}
		ai_will_do = {
			factor = 0
		}
		effect = {
			enable_council_voting_on_issue = laws
			custom_tooltip = {
				text = council_on_custom
			}
			custom_tooltip = {
				text = tooltip_enables_advisors
			}
			hidden_tooltip = {
				if = {
					limit = {
						has_law = law_voting_power_0
						is_primary_holder_title = yes
					}
					holder_scope = { council_increased_power_effect = yes }
				}
				revoke_law = law_voting_power_0
				enable_council_voting_on_issue = enforce_peace
			}
		}
		
		vassal_limit = 2
	}

	#VOTE ON WAR
	war_voting_power_0 = {
		group = war_voting_power
		default = yes

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_1
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_1
			has_law = war_voting_power_1
			has_law = banish_voting_power_0
			has_law = revoke_title_voting_power_0
			has_law = grant_title_voting_power_0
			has_law = imprison_voting_power_0
			has_law = execution_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_4
			}
			holder_scope = { is_nomadic = no }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.05
			}
		}
		effect = {
			disable_council_voting_on_issue = declare_war_interaction
			custom_tooltip = {
				text = council_war_off_custom
			}
			hidden_tooltip = {
				if = {
					limit = { 
						has_law = war_voting_power_1
						holder_scope = {
							primary_title = {
								title = PREVPREV
							}
						}
					}
					holder_scope = { council_decreased_power_effect = yes }
				}
				revoke_law = war_voting_power_1
			}
		}
	}

	war_voting_power_1 = {
		group = war_voting_power
		
		default_selection = {
			factor = 0
			
			additive_modifier = { 
				value = 10			
				year = 900
				holder_scope = { 
					religion = catholic
					is_feudal = yes
				}	
			}
			additive_modifier = { 
				value = 10			
				title = e_hre	
			}
			additive_modifier = { 
				value = 10			
				holder_scope = { is_nomadic = yes }	
			}
		}

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_1
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_1
			has_law = war_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_1
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}
		ai_will_do = {
			factor = 0
		}
		effect = {
			enable_council_voting_on_issue = declare_war_interaction
			custom_tooltip = {
				text = council_war_on_custom
			}
			hidden_tooltip = {
				if = {
					limit = {
						has_law = war_voting_power_0
						is_primary_holder_title = yes
					}
					holder_scope = { council_increased_power_effect = yes }
				}
				revoke_law = war_voting_power_0
			}
		}
		
		vassal_limit = 2
	}

	#VOTE ON REVOKE TITLES
	revoke_title_voting_power_0 = {
		group = revoke_title_voting_power
		default = yes

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = revoke_title_voting_power_1
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_4
			}
			holder_scope = { is_nomadic = no }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.05
			}
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = {
						has_law = revoke_title_voting_power_1
						is_primary_holder_title = yes
					}
					holder_scope = { council_decreased_power_effect = yes }
				}
				revoke_law = revoke_title_voting_power_1
			}
			disable_council_voting_on_issue = revoke_title_interaction
		}
	}

	revoke_title_voting_power_1 = {
		group = revoke_title_voting_power
		
		default_selection = {
			factor = 0
			
			additive_modifier = { 
				value = 10			
				year = 1100
				holder_scope = { 
					religion = catholic
					is_feudal = yes
				}	
			}
			additive_modifier = { 
				value = 10			
				title = e_hre	
			}
			additive_modifier = { 
				value = 10			
				holder_scope = { is_nomadic = yes }	
			}
		}

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_1
			has_law = war_voting_power_1
			has_law = revoke_title_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}
		ai_will_do = {
			factor = 0
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = {
						has_law = revoke_title_voting_power_0
						is_primary_holder_title = yes
					}
					holder_scope = { council_increased_power_effect = yes }
				}
				revoke_law = revoke_title_voting_power_0
			}
			enable_council_voting_on_issue = revoke_title_interaction
		}
		
		vassal_limit = 2
	}

	#VOTE ON IMPRISON
	imprison_voting_power_0 = {
		group = imprison_voting_power
		default = yes

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = imprison_voting_power_1
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_4
			}
			holder_scope = { is_nomadic = no }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.05
			}
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = {
						has_law = imprison_voting_power_1
						is_primary_holder_title = yes
					}
					holder_scope = { council_decreased_power_effect = yes }
				}
				revoke_law = imprison_voting_power_1
			}
			disable_council_voting_on_issue = imprison_character_interaction
		}
	}

	imprison_voting_power_1 = {
		group = imprison_voting_power
		
		default_selection = {
			factor = 0
			
			additive_modifier = { 
				value = 10			
				year = 1000
				holder_scope = { 
					religion = catholic
					is_feudal = yes
				}	
			}
			additive_modifier = { 
				value = 10			
				title = e_hre	
			}
			additive_modifier = { 
				value = 10			
				holder_scope = { is_nomadic = yes }	
			}
		}

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_1
			has_law = war_voting_power_1
			has_law = imprison_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_3
				has_law = tribal_organization_4
			}
		}
		ai_will_do = {
			factor = 0
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = {
						has_law = imprison_voting_power_0
						is_primary_holder_title = yes
					}
					holder_scope = { council_increased_power_effect = yes }
				}
				revoke_law = imprison_voting_power_0
			}
			enable_council_voting_on_issue = imprison_character_interaction
		}
		
		vassal_limit = 2
	}

	#VOTE ON GRANT TITLES
	grant_title_voting_power_0 = {
		group = grant_title_voting_power
		default = yes
		
		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}
		allow = {
			has_law = grant_title_voting_power_1
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_4
			}
			holder_scope = { is_nomadic = no }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.05
			}
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = {
						has_law = grant_title_voting_power_1
						is_primary_holder_title = yes
					}
					holder_scope = { council_decreased_power_effect = yes }
				}
				revoke_law = grant_title_voting_power_1
			}
			disable_council_voting_on_issue = grant_landed_title_interaction
		}
	}

	grant_title_voting_power_1 = {
		group = grant_title_voting_power
		
		default_selection = {
			factor = 0
			
			additive_modifier = { 
				value = 10			
				year = 1200
				holder_scope = { 
					religion = catholic
					is_feudal = yes
				}	
			}
			additive_modifier = { 
				value = 10			
				title = e_hre	
			}
			additive_modifier = { 
				value = 10			
				holder_scope = { is_nomadic = yes }	
			}
		}

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_1
			has_law = war_voting_power_1
			has_law = grant_title_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_2
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}
		ai_will_do = {
			factor = 0
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = {
						has_law = grant_title_voting_power_0
						is_primary_holder_title = yes
					}
					holder_scope = { council_increased_power_effect = yes }
				}
				revoke_law = grant_title_voting_power_0
			}
			enable_council_voting_on_issue = grant_landed_title_interaction
		}
		
		vassal_limit = 2
	}

	#VOTE ON BANISH
	banish_voting_power_0 = {
		group = banish_voting_power
		default = yes

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = banish_voting_power_1
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_4
			}
			holder_scope = { is_nomadic = no }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.05
			}
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = {
						has_law = banish_voting_power_1
						is_primary_holder_title = yes
					}
					holder_scope = { council_decreased_power_effect = yes }
				}
				revoke_law = banish_voting_power_1
			}
			disable_council_voting_on_issue = exile_imprisoned_interaction
		}
	}

	banish_voting_power_1 = {
		group = banish_voting_power
		default = yes
		
		default_selection = {
			factor = 0
			
			additive_modifier = { 
				value = 10			
				year = 1300
				holder_scope = { 
					religion = catholic
					is_feudal = yes
				}	
			}
			additive_modifier = { 
				value = 10			
				title = e_hre	
			}
			additive_modifier = { 
				value = 10			
				holder_scope = { is_nomadic = yes }	
			}
		}

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_1
			has_law = war_voting_power_1
			has_law = banish_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_3
				has_law = tribal_organization_4
			}
		}
		ai_will_do = {
			factor = 0
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = { has_law = banish_voting_power_0
						holder_scope = {
							primary_title = {
								title = PREVPREV
							}
						}
					}
					holder_scope = { council_increased_power_effect = yes }
				}
				revoke_law = banish_voting_power_0
			}
			enable_council_voting_on_issue = exile_imprisoned_interaction
		}
		vassal_limit = 2
	}
	
	#VOTE ON EXECUTE
	execution_voting_power_0 = {
		group = execution_voting_power
		
		default = yes

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = execution_voting_power_1
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_4
			}
			holder_scope = { is_nomadic = no }
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.05
			}
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = { 
						has_law = execution_voting_power_1
						holder_scope = {
							primary_title = {
								title = PREVPREV
							}
						}
					}
					holder_scope = { council_decreased_power_effect = yes }
				}
				revoke_law = execution_voting_power_1
			}
			disable_council_voting_on_issue = execute_imprisoned_interaction
		}
	}
	
	execution_voting_power_1 = {
		group = execution_voting_power
		
		default_selection = {
			factor = 0
			
			additive_modifier = { 
				value = 10			
				year = 1200
				holder_scope = { 
					religion = catholic
					is_feudal = yes
				}	
			}
			additive_modifier = { 
				value = 10			
				title = e_hre	
			}
			additive_modifier = { 
				value = 10			
				holder_scope = { is_nomadic = yes }	
			}
		}

		potential = {
			has_dlc = "Zeus"
			higher_tier_than = baron
			OR = {
				holder_scope = { is_tribal = no }
				has_law	= tribal_organization_3
				has_law = tribal_organization_4
			}
		}		
		allow = {
			has_law = law_voting_power_1
			has_law = war_voting_power_1
			has_law = execution_voting_power_0
			OR = {
				holder_scope = { is_tribal = no }
				has_law = tribal_organization_3
				has_law = tribal_organization_4
			}
		}
		ai_will_do = {
			factor = 0
		}
		effect = {
			hidden_tooltip = {
				if = {
					limit = { has_law = execution_voting_power_0
						holder_scope = {
							primary_title = {
								title = PREVPREV
							}
						}
					}
					holder_scope = { council_increased_power_effect = yes }
				}
				revoke_law = execution_voting_power_0
			}
			enable_council_voting_on_issue = execute_imprisoned_interaction
		}
		
		vassal_limit = 2
	}
}

