PREV_public_sacrifice_THIS_effect = {
	PREV = { save_event_target_as = target_sacrificer }
	save_event_target_as = target_sacrificed_prisoner

	if = {
		limit = { is_ruler = yes }

		any_liege = {
			limit = {
				ai = no
				NOT = {
					character = PREVPREV
				}
			}
			character_event = { id = MSSCRF.2 }
		}
	}
	else_if = {
		limit = {
			liege = {
				ai = no
				NOT = {
					character = PREVPREV
				}
			}
		}
		liege = { character_event = { id = MSSCRF.2 } }
	}

	PREV = {
		if = {
			limit = { NOT = { has_character_flag = do_not_show_post_sacrifice_ping_event_flag } }
			character_event = { id = MSSCRF.1 }
		}
	}

	if = {
		limit = { is_ruler = yes }
		if = {
			limit = { tier = BARON }
			PREV = { piety = 15 }
		}
		else_if = {
			limit = { tier = COUNT }
			PREV = { piety = 30 }
		}
		else_if = {
			limit = { tier = DUKE }
			PREV = { piety = 75 }
		}
		else_if = {
			limit = { tier = KING }
			PREV = { piety = 150 }
		}
		else = {
			limit = { tier = EMPEROR }
			PREV = { piety = 250 }
		}
	}
	else = { PREV = { piety = 5 } }
	#Bloodthirsty Bloodline bonus.
	if = {
		limit = { PREV = { any_owned_bloodline = { has_bloodline_flag = bloodline_prestige_sacrifice } } }

		if = {
			limit = { is_ruler = yes }
			if = {
				limit = { tier = BARON }
				PREV = { prestige = 30 }
			}
			else_if = {
				limit = { tier = COUNT }
				PREV = { prestige = 60 }
			}
			else_if = {
				limit = { tier = DUKE }
				PREV = { prestige = 150 }
			}
			else_if = {
				limit = { tier = KING }
				PREV = { prestige = 300 }
			}
			else = {
				limit = { tier = EMPEROR }
				PREV = { prestige = 500 }
			}
		}
		else = { PREV = { prestige = 10 } }
	}

	death = {
		death_reason = death_execution_aztec_sacrifice
		killer = PREV
	}
}