# Laws change effects
plus_law_change_prestige_effect_1 = {
	if = {
		limit = {
			has_game_started = yes
			temporary = no # Not for revolts, rebellions, etc.
			NOT = { has_title_flag = non_manual_law_change } # No prestige loss
		}

		holder_scope = {
			show_scope_change = no

			# log = "plus_law_change_prestige_effect_1 ([This.GetBestName] ([This.GetID]) - [Root.GetFullBaseName] ([Root.GetID]))"

			trigger_switch = {
				on_trigger = real_tier

				BARON = { prestige = -60 }
				COUNT = { prestige = -125 }
				DUKE = { prestige = -250 }
				KING = { prestige = -500 }
				EMPEROR = { prestige = -1000 }
			}
		}
	}
}

plus_law_change_prestige_effect_2 = {
	if = {
		limit = {
			has_game_started = yes
			temporary = no # Not for revolts, rebellions, etc.
			NOT = { has_title_flag = non_manual_law_change } # No prestige loss
		}

		holder_scope = {
			show_scope_change = no

			# log = "plus_law_change_prestige_effect_2 ([This.GetBestName] ([This.GetID]) - [Root.GetFullBaseName] ([Root.GetID]))"

			trigger_switch = {
				on_trigger = real_tier

				BARON = { prestige = -125 }
				COUNT = { prestige = -250 }
				DUKE = { prestige = -500 }
				KING = { prestige = -1000 }
				EMPEROR = { prestige = -2000 }
			}
		}
	}
}

plus_law_change_prestige_effect_3 = {
	if = {
		limit = {
			has_game_started = yes
			temporary = no # Not for revolts, rebellions, etc.
			NOT = { has_title_flag = non_manual_law_change } # No prestige loss
		}

		holder_scope = {
			show_scope_change = no

			# log = "plus_law_change_prestige_effect_3 ([This.GetBestName] ([This.GetID]) - [Root.GetFullBaseName] ([Root.GetID]))"

			trigger_switch = {
				on_trigger = real_tier

				BARON = { prestige = -180 }
				COUNT = { prestige = -375 }
				DUKE = { prestige = -750 }
				KING = { prestige = -1500 }
				EMPEROR = { prestige = -3000 }
			}
		}
	}
}

plus_law_change_prestige_effect_4 = {
	if = {
		limit = {
			has_game_started = yes
			temporary = no # Not for revolts, rebellions, etc.
			NOT = { has_title_flag = non_manual_law_change } # No prestige loss
		}

		holder_scope = {
			show_scope_change = no

			# log = "plus_law_change_prestige_effect_4 ([This.GetBestName] ([This.GetID]) - [Root.GetFullBaseName] ([Root.GetID]))"

			trigger_switch = {
				on_trigger = real_tier

				BARON = { prestige = -250 }
				COUNT = { prestige = -500 }
				DUKE = { prestige = -1000 }
				KING = { prestige = -2000 }
				EMPEROR = { prestige = -4000 }
			}
		}
	}
}

plus_law_change_piety_effect_1 = {
	if = {
		limit = {
			has_game_started = yes
			temporary = no # Not for revolts, rebellions, etc.
			NOT = { has_title_flag = non_manual_law_change } # No piety loss
		}

		holder_scope = {
			show_scope_change = no

			# log = "plus_law_change_piety_effect_1 ([This.GetBestName] ([This.GetID]) - [Root.GetFullBaseName] ([Root.GetID]))"

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -30 }
				COUNT = { piety = -60 }
				DUKE = { piety = -125 }
				KING = { piety = -250 }
				EMPEROR = { piety = -500 }
			}
		}
	}
}

plus_law_change_piety_effect_2 = {
	if = {
		limit = {
			has_game_started = yes
			temporary = no # Not for revolts, rebellions, etc.
			NOT = { has_title_flag = non_manual_law_change } # No piety loss
		}

		holder_scope = {
			show_scope_change = no

			# log = "plus_law_change_piety_effect_2 ([This.GetBestName] ([This.GetID]) - [Root.GetFullBaseName] ([Root.GetID]))"

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -60 }
				COUNT = { piety = -125 }
				DUKE = { piety = -250 }
				KING = { piety = -500 }
				EMPEROR = { piety = -1000 }
			}
		}
	}
}

plus_law_change_piety_effect_3 = {
	if = {
		limit = {
			has_game_started = yes
			temporary = no # Not for revolts, rebellions, etc.
			NOT = { has_title_flag = non_manual_law_change } # No piety loss
		}

		holder_scope = {
			show_scope_change = no

			# log = "plus_law_change_piety_effect_3 ([This.GetBestName] ([This.GetID]) - [Root.GetFullBaseName] ([Root.GetID]))"

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -90 }
				COUNT = { piety = -180 }
				DUKE = { piety = -375 }
				KING = { piety = -750 }
				EMPEROR = { piety = -1500 }
			}
		}
	}
}

plus_law_change_piety_effect_4 = {
	if = {
		limit = {
			has_game_started = yes
			temporary = no # Not for revolts, rebellions, etc.
			NOT = { has_title_flag = non_manual_law_change } # No piety loss
		}

		holder_scope = {
			show_scope_change = no

			# log = "plus_law_change_piety_effect_4 ([This.GetBestName] ([This.GetID]) - [Root.GetFullBaseName] ([Root.GetID]))"

			trigger_switch = {
				on_trigger = real_tier

				BARON = { piety = -125 }
				COUNT = { piety = -250 }
				DUKE = { piety = -500 }
				KING = { piety = -1000 }
				EMPEROR = { piety = -2000 }
			}
		}
	}
}

switch_to_feudal_effect = {
	if = {
		limit = {
			religion_group = muslim
			NOT = { religion = druze }
		}
		set_government_type = muslim_government
	}
	else_if = {
		limit = { religion = bogomilist }
		set_government_type = bogomilist_government
	}
	else = {
		set_government_type = feudal_government
	}
}

switch_to_imperial_effect = {
	if = {
		limit = {
			religion_group = muslim
			NOT = { religion = druze }
		}
		set_government_type = muslim_imperial_government
	}
	else_if = {
		limit = { religion = bogomilist }
		set_government_type = imperial_bogomilist_government
	}
	else = {
		set_government_type = imperial_government
	}
}