#	Obligation
#	Loi du royaume
#	conseil
#	succession


##Obligation##

LOR_obligation_change_prestige_effect_0 = { #obligation 0, 1 et 2
	if = {
		limit = {
			has_game_started = yes
			temporary = no 
#			NOT = { holder_scope = { religion_group = muslim } }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { prestige = 0 }
				COUNT = { prestige = -50 }
				DUKE = { prestige = -100 }
				KING = { prestige = -150 }
				EMPEROR = { prestige = -200 }
			}
		}
	}
}

LOR_obligation_change_prestige_effect_1 = { #obligation 3, 4 et 5
	if = {
		limit = {
			has_game_started = yes
			temporary = no
#			NOT = { holder_scope = { religion_group = muslim } }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { prestige = -50 }
				COUNT = { prestige = -100 }
				DUKE = { prestige = -150 }
				KING = { prestige = -200 }
				EMPEROR = { prestige = -300 }
			}
		}
	}
}

LOR_obligation_change_prestige_effect_2 = { #obligation 6, 7 et 8
	if = {
		limit = {
			has_game_started = yes
			temporary = no 
#			NOT = { holder_scope = { religion_group = muslim } }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { prestige = -100 }
				COUNT = { prestige = -150 }
				DUKE = { prestige = -200 }
				KING = { prestige = -300 }
				EMPEROR = { prestige = -400 }
			}
		}
	}
}

#Obligation Iqta##

LOR_iqta_obligation_change_prestige_effect_0 = { #obligation 0, 1 et 2
	if = {
		limit = {
			has_game_started = yes
			temporary = no 
#			holder_scope = { religion_group = muslim }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { Piety = 0 }
				COUNT = { piety = -50 }
				DUKE = { piety = -100 }
				KING = { piety = -150 }
				EMPEROR = { piety = -200 }
			}
		}
	}
}

 LOR_iqta_obligation_change_prestige_effect_1 = { #obligation 3, 4 et 5
	if = {
		limit = {
			has_game_started = yes
			temporary = no 
#			holder_scope = { religion_group = muslim }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -50 }
				COUNT = { piety = -100 }
				DUKE = { piety = -150 }
				KING = { piety = -200 }
				EMPEROR = { piety = -300 }
			}
		}
	}
}

 LOR_iqta_obligation_change_prestige_effect_2 = { #obligation 6, 7 et 8
	if = {
		limit = {
			has_game_started = yes
			temporary = no 
#			holder_scope = { religion_group = muslim }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -100 }
				COUNT = { piety = -150 }
				DUKE = { piety = -200 }
				KING = { piety = -300 }
				EMPEROR = { piety = -400 }
			}
		}
	}
}

LOR_rel_obligation_change_0 = { #obl 0, 1 et 2
	if = {
		limit = {
			has_game_started = yes
			temporary = no
		}
		
		holder_scope = {
			show_scope_change = no
			
			trigger_switch = {
				on_trigger = real_tier 
				
				BARON = { piety = 0 }
				COUNT = { piety = -50 }
				DUKE = { piety = -100 }
				KING = { piety = -150 }
				EMPEROR = { piety = -200 }
			}
		}
	}
}

LOR_rel_obligation_change_1 = { #obl 3, 4 et 5
	if = {
		limit = {
			has_game_started = yes
			temporary = no
		}
		
		holder_scope = {
			show_scope_change = no
			
			trigger_switch = {
				on_trigger = real_tier 
				
				BARON = { piety = -50 }
				COUNT = { piety = -100 }
				DUKE = { piety = -150 }
				KING = { piety = -200 }
				EMPEROR = { piety = -300 }
			}
		}
	}
}

LOR_rel_obligation_change_2 = { #obl 6, 7 et 8
	if = {
		limit = {
			has_game_started = yes
			temporary = no
		}
		
		holder_scope = {
			show_scope_change = no
			
			trigger_switch = {
				on_trigger = real_tier 
				
				BARON = { piety = -100 }
				COUNT = { piety = -150 }
				DUKE = { piety = -200 }
				KING = { piety = -300 }
				EMPEROR = { piety = -400 }
			}
		}
	}
}


##Loi du royaume & Succession##

LOR_law_change_effect_0 = { #léger
	if = {
		limit = {
			has_game_started = yes
			temporary = no
			NOT = {
				holder_scope = {
					religion_group = muslim 
				}
			}
		}
		
		holder_scope = {
			show_scope_change = no
			
			trigger_switch = {
				on_trigger = real_tier
				
				BARON = { prestige = -50 }
				COUNT = { prestige = -100 }
				DUKE = { prestige = -150 }
				KING = { prestige = -200 }
				EMPEROR = { prestige = -300 }
			}
		}
	}
	if = {
		limit = {
			has_game_started = yes
			temporary = no 
			holder_scope = { religion_group = muslim }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -50 }
				COUNT = { piety = -100 }
				DUKE = { piety = -150 }
				KING = { piety = -200 }
				EMPEROR = { piety = -300 }
			}
		}
	}
}

LOR_law_change_effect_1 = { #moyen
	if = {
		limit = {
			has_game_started = yes
			temporary = no
			NOT = {
				holder_scope = {
					religion_group = muslim 
				}
			}
		}
		
		holder_scope = {
			show_scope_change = no
			
			trigger_switch = {
				on_trigger = real_tier
				
				BARON = { prestige = -100 }
				COUNT = { prestige = -150 }
				DUKE = { prestige = -200 }
				KING = { prestige = -300 }
				EMPEROR = { prestige = -400 }
			}
		}
	}
	if = {
		limit = {
			has_game_started = yes
			temporary = no 
			holder_scope = { religion_group = muslim }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -100 }
				COUNT = { piety = -150 }
				DUKE = { piety = -200 }
				KING = { piety = -300 }
				EMPEROR = { piety = -400 }
			}
		}
	}
}

LOR_law_change_effect_2 = { #élevée
	if = {
		limit = {
			has_game_started = yes
			temporary = no
			NOT = {
				holder_scope = {
					religion_group = muslim 
				}
			}
		}
		
		holder_scope = {
			show_scope_change = no
			
			trigger_switch = {
				on_trigger = real_tier
				
				BARON = { prestige = -150 }
				COUNT = { prestige = -200 }
				DUKE = { prestige = -300 }
				KING = { prestige = -400 }
				EMPEROR = { prestige = -500 }
			}
		}
	}
	if = {
		limit = {
			has_game_started = yes
			temporary = no 
			holder_scope = { religion_group = muslim }
		}

		holder_scope = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -150 }
				COUNT = { piety = -200 }
				DUKE = { piety = -300 }
				KING = { piety = -400 }
				EMPEROR = { piety = -500 }
			}
		}
	}
}

LOR_investiture_change_effect = {
	if = {
		limit = {
			has_game_started = yes 
			temporary = no 
		}
		
		holder_scope = {
			show_scope_change = no
			
			trigger_switch = {
				on_trigger = real_tier
				
				BARON = { piety = -150 }
				COUNT = { piety = -200 }
				DUKE = { piety = -300 }
				king = { piety = -400 }
				EMPEROR = {piety = -500}
			}
		}
	}
}

##cb_faction_effect##
decrease_feudal_obliation_effect = {	
	custom_tooltip = {
		text = decrease_feudal_obliation
		hidden_tooltip = {
			if = {
				limit = {
					has_law = tax_law_feudal_1
				}
				add_law = tax_law_feudal_0
				add_law_w_cooldown = tax_law_feudal_0
			}
			else_if = {
				limit = {
					has_law = tax_law_feudal_2
				}
				add_law = tax_law_feudal_1
				add_law_w_cooldown = tax_law_feudal_1
			}
			else_if = {
				limit = {
					has_law = tax_law_feudal_3
				}
				add_law = tax_law_feudal_2
				add_law_w_cooldown = tax_law_feudal_2
			}
			else_if = {
				limit = {
					has_law = tax_law_feudal_4
				}
				add_law = tax_law_feudal_3
				add_law_w_cooldown = tax_law_feudal_3
			}
			else_if = {
				limit = {
					has_law = tax_law_feudal_5
				}
				add_law = tax_law_feudal_4
				add_law_w_cooldown = tax_law_feudal_4
			}
			else_if = {
				limit = {
					has_law = tax_law_feudal_6
				}
				add_law = tax_law_feudal_5
				add_law_w_cooldown = tax_law_feudal_5
			}
			else_if = {
				limit = {
					has_law = tax_law_feudal_7
				}
				add_law = tax_law_feudal_6
				add_law_w_cooldown = tax_law_feudal_6
			}
			else_if = {
				limit = {
					has_law = tax_law_feudal_8
				}
				add_law = tax_law_feudal_7
				add_law_w_cooldown = tax_law_feudal_7
			}
			
			if = {
				limit = {
					has_law = levy_law_feudal_1
				}
				add_law = levy_law_feudal_0
				add_law_w_cooldown = levy_law_feudal_0
			}
			else_if = {
				limit = {
					has_law = levy_law_feudal_2
				}
				add_law = levy_law_feudal_1
				add_law_w_cooldown = levy_law_feudal_1
			}
			else_if = {
				limit = {
					has_law = levy_law_feudal_3
				}
				add_law = levy_law_feudal_2
				add_law_w_cooldown = levy_law_feudal_2
			}
			else_if = {
				limit = {
					has_law = levy_law_feudal_4
				}
				add_law = levy_law_feudal_3
				add_law_w_cooldown = levy_law_feudal_3
			}
			else_if = {
				limit = {
					has_law = levy_law_feudal_5
				}
				add_law = levy_law_feudal_4
				add_law_w_cooldown = levy_law_feudal_4
			}
			else_if = {
				limit = {
					has_law = levy_law_feudal_6
				}
				add_law = levy_law_feudal_5
				add_law_w_cooldown = levy_law_feudal_5
			}
			else_if = {
				limit = {
					has_law = levy_law_feudal_7
				}
				add_law = levy_law_feudal_6
				add_law_w_cooldown = levy_law_feudal_6
			}
			else_if = {
				limit = {
					has_law = levy_law_feudal_8
				}
				add_law = levy_law_feudal_7
				add_law_w_cooldown = levy_law_feudal_7
			}
		}
	}
}

decrease_iqta_obliation_effect = {		
	custom_tooltip = {
		text = decrease_iqta_obliation
		hidden_tooltip = {
			if = {
				limit = {
					has_law = tax_law_iqta_1
				}
				add_law = tax_law_iqta_0
				add_law_w_cooldown = tax_law_iqta_0
			}
			else_if = {
				limit = {
					has_law = tax_law_iqta_2
				}
				add_law = tax_law_iqta_1
				add_law_w_cooldown = tax_law_iqta_1
			}
			else_if = {
				limit = {
					has_law = tax_law_iqta_3
				}
				add_law = tax_law_iqta_2
				add_law_w_cooldown = tax_law_iqta_2
			}
			else_if = {
				limit = {
					has_law = tax_law_iqta_4
				}
				add_law = tax_law_iqta_3
				add_law_w_cooldown = tax_law_iqta_3
			}
			else_if = {
				limit = {
					has_law = tax_law_iqta_5
				}
				add_law = tax_law_iqta_4
				add_law_w_cooldown = tax_law_iqta_4
			}
			else_if = {
				limit = {
					has_law = tax_law_iqta_6
				}
				add_law = tax_law_iqta_5
				add_law_w_cooldown = tax_law_iqta_5
			}
			else_if = {
				limit = {
					has_law = tax_law_iqta_7
				}
				add_law = tax_law_iqta_6
				add_law_w_cooldown = tax_law_iqta_6
			}
			else_if = {
				limit = {
					has_law = tax_law_iqta_8
				}
				add_law = tax_law_iqta_7
				add_law_w_cooldown = tax_law_iqta_7
			}
			
			if = {
				limit = {
					has_law = levy_law_iqta_1
				}
				add_law = levy_law_iqta_0
				add_law_w_cooldown = levy_law_iqta_0
			}
			else_if = {
				limit = {
					has_law = levy_law_iqta_2
				}
				add_law = levy_law_iqta_1
				add_law_w_cooldown = levy_law_iqta_1
			}
			else_if = {
				limit = {
					has_law = levy_law_iqta_3
				}
				add_law = levy_law_iqta_2
				add_law_w_cooldown = levy_law_iqta_2
			}
			else_if = {
				limit = {
					has_law = levy_law_iqta_4
				}
				add_law = levy_law_iqta_3
				add_law_w_cooldown = levy_law_iqta_3
			}
			else_if = {
				limit = {
					has_law = levy_law_iqta_5
				}
				add_law = levy_law_iqta_4
				add_law_w_cooldown = levy_law_iqta_4
			}
			else_if = {
				limit = {
					has_law = levy_law_iqta_6
				}
				add_law = levy_law_iqta_5
				add_law_w_cooldown = levy_law_iqta_5
			}
			else_if = {
				limit = {
					has_law = levy_law_iqta_7
				}
				add_law = levy_law_iqta_6
				add_law_w_cooldown = levy_law_iqta_6
			}
			else_if = {
				limit = {
					has_law = levy_law_iqta_8
				}
				add_law = levy_law_iqta_7
				add_law_w_cooldown = levy_law_iqta_7
			}
		}
	}
}

decrease_republic_obliation_effect = {		
	custom_tooltip = {
		text = decrease_republic_obliation
		hidden_tooltip = {
			if = {
				limit = {
					has_law = tax_law_republic_1
				}
				add_law = tax_law_republic_0
				add_law_w_cooldown = tax_law_republic_0
			}
			else_if = {
				limit = {
					has_law = tax_law_republic_2
				}
				add_law = tax_law_republic_1
				add_law_w_cooldown = tax_law_republic_1
			}
			else_if = {
				limit = {
					has_law = tax_law_republic_3
				}
				add_law = tax_law_republic_2
				add_law_w_cooldown = tax_law_republic_2
			}
			else_if = {
				limit = {
					has_law = tax_law_republic_4
				}
				add_law = tax_law_republic_3
				add_law_w_cooldown = tax_law_republic_3
			}
			else_if = {
				limit = {
					has_law = tax_law_republic_5
				}
				add_law = tax_law_republic_4
				add_law_w_cooldown = tax_law_republic_4
			}
			else_if = {
				limit = {
					has_law = tax_law_republic_6
				}
				add_law = tax_law_republic_5
				add_law_w_cooldown = tax_law_republic_5
			}
			else_if = {
				limit = {
					has_law = tax_law_republic_7
				}
				add_law = tax_law_republic_6
				add_law_w_cooldown = tax_law_republic_6
			}
			else_if = {
				limit = {
					has_law = tax_law_republic_8
				}
				add_law = tax_law_republic_7
				add_law_w_cooldown = tax_law_republic_7
			}
			
			if = {
				limit = {
					has_law = levy_law_republic_1
				}
				add_law = levy_law_republic_0
				add_law_w_cooldown = levy_law_republic_0
			}
			else_if = {
				limit = {
					has_law = levy_law_republic_2
				}
				add_law = levy_law_republic_1
				add_law_w_cooldown = levy_law_republic_1
			}
			else_if = {
				limit = {
					has_law = levy_law_republic_3
				}
				add_law = levy_law_republic_2
				add_law_w_cooldown = levy_law_republic_2
			}
			else_if = {
				limit = {
					has_law = levy_law_republic_4
				}
				add_law = levy_law_republic_3
				add_law_w_cooldown = levy_law_republic_3
			}
			else_if = {
				limit = {
					has_law = levy_law_republic_5
				}
				add_law = levy_law_republic_4
				add_law_w_cooldown = levy_law_republic_4
			}
			else_if = {
				limit = {
					has_law = levy_law_republic_6
				}
				add_law = levy_law_republic_5
				add_law_w_cooldown = levy_law_republic_5
			}
			else_if = {
				limit = {
					has_law = levy_law_republic_7
				}
				add_law = levy_law_republic_6
				add_law_w_cooldown = levy_law_republic_6
			}
			else_if = {
				limit = {
					has_law = levy_law_republic_8
				}
				add_law = levy_law_republic_7
				add_law_w_cooldown = levy_law_republic_7
			}
		}
	}
}

decrease_theocracy_obliation_effect = {		
	custom_tooltip = {
		text = decrease_theocracy_obliation
		hidden_tooltip = {
			if = {
				limit = {
					has_law = tax_law_theocracy_1
				}
				add_law = tax_law_theocracy_0
				add_law_w_cooldown = tax_law_theocracy_0
			}
			else_if = {
				limit = {
					has_law = tax_law_theocracy_2
				}
				add_law = tax_law_theocracy_1
				add_law_w_cooldown = tax_law_theocracy_1
			}
			else_if = {
				limit = {
					has_law = tax_law_theocracy_3
				}
				add_law = tax_law_theocracy_2
				add_law_w_cooldown = tax_law_theocracy_2
			}
			else_if = {
				limit = {
					has_law = tax_law_theocracy_4
				}
				add_law = tax_law_theocracy_3
				add_law_w_cooldown = tax_law_theocracy_3
			}
			else_if = {
				limit = {
					has_law = tax_law_theocracy_5
				}
				add_law = tax_law_theocracy_4
				add_law_w_cooldown = tax_law_theocracy_4
			}
			else_if = {
				limit = {
					has_law = tax_law_theocracy_6
				}
				add_law = tax_law_theocracy_5
				add_law_w_cooldown = tax_law_theocracy_5
			}
			else_if = {
				limit = {
					has_law = tax_law_theocracy_7
				}
				add_law = tax_law_theocracy_6
				add_law_w_cooldown = tax_law_theocracy_6
			}
			else_if = {
				limit = {
					has_law = tax_law_theocracy_8
				}
				add_law = tax_law_theocracy_7
				add_law_w_cooldown = tax_law_theocracy_7
			}
			
			if = {
				limit = {
					has_law = levy_law_theocracy_1
				}
				add_law = levy_law_theocracy_0
				add_law_w_cooldown = levy_law_theocracy_0
			}
			else_if = {
				limit = {
					has_law = levy_law_theocracy_2
				}
				add_law = levy_law_theocracy_1
				add_law_w_cooldown = levy_law_theocracy_1
			}
			else_if = {
				limit = {
					has_law = levy_law_theocracy_3
				}
				add_law = levy_law_theocracy_2
				add_law_w_cooldown = levy_law_theocracy_2
			}
			else_if = {
				limit = {
					has_law = levy_law_theocracy_4
				}
				add_law = levy_law_theocracy_3
				add_law_w_cooldown = levy_law_theocracy_3
			}
			else_if = {
				limit = {
					has_law = levy_law_theocracy_5
				}
				add_law = levy_law_theocracy_4
				add_law_w_cooldown = levy_law_theocracy_4
			}
			else_if = {
				limit = {
					has_law = levy_law_theocracy_6
				}
				add_law = levy_law_theocracy_5
				add_law_w_cooldown = levy_law_theocracy_5
			}
			else_if = {
				limit = {
					has_law = levy_law_theocracy_7
				}
				add_law = levy_law_theocracy_6
				add_law_w_cooldown = levy_law_theocracy_6
			}
			else_if = {
				limit = {
					has_law = levy_law_theocracy_8
				}
				add_law = levy_law_theocracy_7
				add_law_w_cooldown = levy_law_theocracy_7
			}
		}
	}
}

decrease_tribal_obliation_effect = {		
	custom_tooltip = {
		text = decrease_tribal_obliation
		hidden_tooltip = {
			if = {
				limit = {
					has_law = tax_law_tribal_1
				}
				add_law = tax_law_tribal_0
				add_law_w_cooldown = tax_law_tribal_0
			}
			else_if = {
				limit = {
					has_law = tax_law_tribal_2
				}
				add_law = tax_law_tribal_1
				add_law_w_cooldown = tax_law_tribal_1
			}
			else_if = {
				limit = {
					has_law = tax_law_tribal_3
				}
				add_law = tax_law_tribal_2
				add_law_w_cooldown = tax_law_tribal_2
			}
			else_if = {
				limit = {
					has_law = tax_law_tribal_4
				}
				add_law = tax_law_tribal_3
				add_law_w_cooldown = tax_law_tribal_3
			}
			else_if = {
				limit = {
					has_law = tax_law_tribal_5
				}
				add_law = tax_law_tribal_4
				add_law_w_cooldown = tax_law_tribal_4
			}
			else_if = {
				limit = {
					has_law = tax_law_tribal_6
				}
				add_law = tax_law_tribal_5
				add_law_w_cooldown = tax_law_tribal_5
			}
			else_if = {
				limit = {
					has_law = tax_law_tribal_7
				}
				add_law = tax_law_tribal_6
				add_law_w_cooldown = tax_law_tribal_6
			}
			else_if = {
				limit = {
					has_law = tax_law_tribal_8
				}
				add_law = tax_law_tribal_7
				add_law_w_cooldown = tax_law_tribal_7
			}
			
			if = {
				limit = {
					has_law = levy_law_tribal_1
				}
				add_law = levy_law_tribal_0
				add_law_w_cooldown = levy_law_tribal_0
			}
			else_if = {
				limit = {
					has_law = levy_law_tribal_2
				}
				add_law = levy_law_tribal_1
				add_law_w_cooldown = levy_law_tribal_1
			}
			else_if = {
				limit = {
					has_law = levy_law_tribal_3
				}
				add_law = levy_law_tribal_2
				add_law_w_cooldown = levy_law_tribal_2
			}
			else_if = {
				limit = {
					has_law = levy_law_tribal_4
				}
				add_law = levy_law_tribal_3
				add_law_w_cooldown = levy_law_tribal_3
			}
			else_if = {
				limit = {
					has_law = levy_law_tribal_5
				}
				add_law = levy_law_tribal_4
				add_law_w_cooldown = levy_law_tribal_4
			}
			else_if = {
				limit = {
					has_law = levy_law_tribal_6
				}
				add_law = levy_law_tribal_5
				add_law_w_cooldown = levy_law_tribal_5
			}
			else_if = {
				limit = {
					has_law = levy_law_tribal_7
				}
				add_law = levy_law_tribal_6
				add_law_w_cooldown = levy_law_tribal_6
			}
			else_if = {
				limit = {
					has_law = levy_law_tribal_8
				}
				add_law = levy_law_tribal_7
				add_law_w_cooldown = levy_law_tribal_7
			}
		}
	}
}
