namespace = HF

#####Bloodthirsty Religion#####
character_event = { # Ritual Sacrifice Prisoner
	id = HF.23001
	desc = EVTDESCHF23001
	picture = GFX_evt_pagan_blood_sacrifice
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes
	option = {
		name = EVTOPTAHF23001
	}
}
character_event = { # Ritual Sacrifice Prisoner (Jailer's perspective)
	id = HF.23002
	desc = { 
		trigger = { 
			ROOT = { 
				NOR = {  
					trait = bloodthirsty_gods_1
					trait = bloodthirsty_gods_2
					trait = bloodthirsty_gods_3
				}
			}
			NOT = { 
				any_realm_wonder_upgrade = {
					has_wonder_upgrade = upgrade_sacrificial_altar
					is_active = yes
				}
			}
		} 
		text = EVTDESCHF23002
	}
	desc = { 
		trigger = { 
			ROOT = { 
				OR = {  
					trait = bloodthirsty_gods_1
					trait = bloodthirsty_gods_2
					trait = bloodthirsty_gods_3
				}
			} 
			NOT = { 
				any_realm_wonder_upgrade = {
					has_wonder_upgrade = upgrade_sacrificial_altar
					is_active = yes
				}
			}
		} 
		text = EVTDESCHF23002_B 	#Do it yourself.
	}
	desc = { 
		trigger = { 
			ROOT = { 
				NOR = {  
					trait = bloodthirsty_gods_1
					trait = bloodthirsty_gods_2
					trait = bloodthirsty_gods_3
				}
			}
			any_realm_wonder_upgrade = {
				has_wonder_upgrade = upgrade_sacrificial_altar
				is_active = yes
			}
		} 
		text = EVTDESCHF23002_C
	}
	desc = { 
		trigger = { 
			ROOT = { 
				OR = {  
					trait = bloodthirsty_gods_1
					trait = bloodthirsty_gods_2
					trait = bloodthirsty_gods_3
				}
			} 
			any_realm_wonder_upgrade = {
				has_wonder_upgrade = upgrade_sacrificial_altar
				is_active = yes
			}
		}
		text = EVTDESCHF23002_D 	#Do it yourself.
	}
	
	picture = { 
		trigger = { 
			ROOT = { 
				OR = {  
					religion = aztec
					religion = aztec_reformed
				}
			} 
		} 
		picture = GFX_evt_bishop_aztec
	}
	picture = { 
		trigger = { 
			ROOT = { 
				NOR = {  
					religion = aztec
					religion = aztec_reformed
				}
			} 
		} 
		picture = GFX_evt_pagan_blood_sacrifice
	}
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes

	immediate = {
		random_realm_wonder_upgrade = {
			limit = {
				has_wonder_upgrade = upgrade_sacrificial_altar
				is_active = yes
			}
			save_event_target_as = the_sacrificial_altar
			wonder = { save_event_target_as = the_temple }
		}
	}
	
	option = {
		name = EVTOPTAHF23002
		if = {
			limit = {
				any_realm_wonder_upgrade = {
					has_wonder_upgrade = upgrade_sacrificial_altar
					is_active = yes
				}
			}
			prestige = 10
		}
	}

	option = {
		name = EVTOPTBHF23002
		trigger = {
			any_realm_wonder_upgrade = {
				has_wonder_upgrade = upgrade_sacrificial_altar
				is_active = yes
			}
		}
		tooltip_info_custom = EVTOPTBHF23002_TT
		add_character_modifier = {
			name = ate_beating_heart
			months = 6
		}
	}


	after = {
		if = { 
			limit = { FROM = { is_ruler = no } }
			piety = 5
		}
		if = { 
			limit = { FROM = { tier = BARON } }
			piety = 15
		}
		if = { 
			limit = { FROM = { tier = COUNT } }
			piety = 30
		}
		if = { 
			limit = { FROM = { tier = DUKE } }
			piety = 75
		}
		if = { 
			limit = { FROM = { tier = KING } }
			piety = 150
		}
		if = { 
			limit = { FROM = { tier = EMPEROR } }
			piety = 250
		}
		if = { 
			limit = { 
				FROM = { 
					is_ruler = no 
				} 
				ROOT = { 
					any_owned_bloodline = { 
						has_bloodline_flag = bloodline_prestige_sacrifice
					}
				} 
			}
			prestige = 10
		}
		if = { 
			limit = { 
				FROM = { 
					tier = BARON
				} 
				ROOT = { 
					any_owned_bloodline = { 
						has_bloodline_flag = bloodline_prestige_sacrifice
					}
				}
			}
			prestige = 30
		}
		if = { 
			limit = { 
				FROM = { 
					tier = COUNT
				} 
				ROOT = { 
					any_owned_bloodline = { 
						has_bloodline_flag = bloodline_prestige_sacrifice
					}
				}
			}
			prestige = 60
		}
		if = { 
			limit = { 
				FROM = { 
					tier = DUKE
				} 
				ROOT = { 
					any_owned_bloodline = { 
						has_bloodline_flag = bloodline_prestige_sacrifice
					}
				}
			}
			prestige = 150
		}
		if = { 
			limit = { 
				FROM = { 
					tier = KING
				} 
				ROOT = { 
					any_owned_bloodline = { 
						has_bloodline_flag = bloodline_prestige_sacrifice
					}
				}
			}
			prestige = 300
		}
		if = { 
			limit = { 
				FROM = { 
					tier = EMPEROR
				} 
				ROOT = { 
					any_owned_bloodline = { 
						has_bloodline_flag = bloodline_prestige_sacrifice
					}
				}
			}
			prestige = 500
		}
	}
}