# Written by Flavio (HF.24000 - HF.24239)


namespace=HF

character_event = { # Great warrior character chance
	id = HF.99
	hide_window = yes
	
	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_heroes
			founder = {
				NOT = {
					character = ROOT
				}
				religion = ROOT
			}
		}
		NOT = {
			any_courtier_or_vassal = {
				count = 4
				has_character_flag = bloodline_great_hero
			}
		}
	}
	
	immediate = {
		random_list = {
			80 = {
				modifier = {
					factor = 0.75
					NOT = {
						higher_tier_than = COUNT
					}
				}
				modifier = {
					factor = 0.75
					NOT = {
						higher_tier_than = DUKE
					}
				}
				modifier = {
					factor = 0.75
					any_courtier_or_vassal = {
						count = 2
						has_character_flag = bloodline_great_hero
					}
				}
				modifier = {
					factor = 0.75
					any_courtier_or_vassal = {
						count = 3
						has_character_flag = bloodline_great_hero
					}
				}
				character_event = { id = HF.100 }
			}
			20 = {
				modifier = {
					factor = 3
					ai = yes
				}
			}
		}
	}
}

character_event = { # Great warrior character arrives
	id = HF.100
	desc = HF_100_DESC
	picture = GFX_placeholder
	border = GFX_event_normal_frame_war

	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16
	
	immediate = {
		random_owned_bloodline = {
			limit = {
				has_bloodline_flag = bloodline_heroes
				founder = {
					NOT = {
						character = ROOT
					}
					religion = ROOT
				}
			}
			founder = {
				save_event_target_as = target_bloodline_founder
			}
		}
		spawn_fantastic_commander_effect = yes
		event_target:invited_character = {
			set_character_flag = bloodline_great_hero
			set_character_flag = hero_knight
		}
	}
	
	option = {
		name = MNM.70013.o
		
		trigger = {
			any_realm_character = {
				NOT = {
					higher_tier_than = BARON
				}
				liege = { character = ROOT }
				has_minor_title = title_commander
				NOT = {
					martial = 12
				}
			}
			OR = {
				AND = {
					tier = COUNT
					any_realm_character = {
						count = 2
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = DUKE
					any_realm_character = {
						count = 4
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = KING
					is_nomadic = no
					any_realm_character = {
						count = 6
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = EMPEROR
					is_nomadic = no
					any_realm_character = {
						count = 8
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = KING
					is_nomadic = yes
					any_realm_character = {
						count = 2
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = EMPEROR
					is_nomadic = yes
					any_realm_character = {
						count = 4
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
			}
		}
		
		random_realm_character = {
			limit = {
				NOT = {
					higher_tier_than = BARON
				}
				liege = { character = ROOT }
				has_minor_title = title_commander
				NOT = {
					martial = 12
				}
			}
			remove_title = title_commander
			opinion = {
				modifier = insulted
				who = ROOT
				years = 2
			}
		}
		
		event_target:invited_character = {
			give_minor_title = title_commander
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}

	option = {
		name = EVTOPTA_NE_1
		
		trigger = {
			OR = { 
				NOT = { ROOT = { has_law = succ_byzantine_elective } }  #Either not Imperial...
				NOT = { #...Or there are no valid vassal candidates that can be commanders.
					any_vassal = { 
						higher_real_tier_than = BARON
						NOT = { 
							primary_title = { temporary = yes } 
						}
						OR = {
							AND = {
								OR = {
									male_can_hold_minor_title_trigger = yes
									female_can_hold_minor_commander_title_trigger = yes
								}
								OR = {
									NOT = { religion = hindu }
									trait = kshatriya
								}
								is_adult = yes
							}
							has_character_flag = special_marshal
						}
				
						prisoner = no
						NOT = { trait = incapable }
						NOT = { is_inaccessible_trigger = yes }
						NOT = { has_character_flag = guru }
						NOT = { has_character_modifier = refusing_to_lead }
						NOR = {
							has_job_title = job_chancellor
							has_job_title = job_marshal
							has_job_title = job_treasurer
							has_job_title = job_spymaster
							has_job_title = job_spiritual
							has_minor_title = title_commander
						}
					} 
				}
			}
			event_target:invited_character = { has_character_flag = invited_soldier }
			OR = {
				AND = {
					tier = COUNT
					NOT = {
						any_realm_character = {
							count = 2
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = DUKE
					NOT = {
						any_realm_character = {
							count = 4
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = KING
					is_nomadic = no
					NOT = {
						any_realm_character = {
							count = 6
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = EMPEROR
					is_nomadic = no
					NOT = {
						any_realm_character = {
							count = 8
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = KING
					is_nomadic = yes
					NOT = {
						any_realm_character = {
							count = 2
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = EMPEROR
					is_nomadic = yes
					NOT = {
						any_realm_character = {
							count = 4
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
			}
		}
		
		event_target:invited_character = {
			give_minor_title = title_commander
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}
	
	option = {
		name = FANTASTIC
		event_target:invited_character = {
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}
	
	option = {
		name = EVTOPTB_HF_100
		
		hidden_tooltip = {
			event_target:invited_character = { 
				death = {
					death_reason = death_missing
				}
			}
		}
	}
}

character_event = { # Sympathy for founder group
	id = HF.110
	desc = HF_110_DESC
	picture = GFX_placeholder
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16
	
	trigger = {
		NOT = {
			has_character_flag = no_sympathy_bloodline
		}
		any_owned_bloodline = {
			founder = {
				NOT = {
					character = ROOT
				}
				is_alive = no
				OR = {
					AND = {
						religion_group = pagan_group
						ROOT = {
							NOR = {
								religion_group = pagan_group
								trait = sympathy_pagans
							}
						}
					}
					AND = {
						religion_group = christian
						ROOT = {
							NOR = {
								religion_group = christian
								trait = sympathy_christendom
							}
						}
					}
					AND = {
						religion_group = muslim
						ROOT = {
							NOR = {
								religion_group = muslim
								trait = sympathy_islam
							}
						}
					}
					AND = {
						religion_group = zoroastrian_group
						ROOT = {
							NOR = {
								religion_group = zoroastrian_group
								trait = sympathy_zoroastrianism
							}
						}
					}
					AND = {
						religion_group = jewish_group
						ROOT = {
							NOR = {
								religion_group = jewish_group
								trait = sympathy_judaism
							}
						}
					}
					AND = {
						religion_group = indian_group
						ROOT = {
							NOR = {
								religion_group = indian_group
								trait = sympathy_indian
							}
						}
					}
				}
			}
		}
	}
	
	immediate = {
		random_owned_bloodline = {
			limit ={
				founder = {
					NOT = {
						character = ROOT
					}
					is_alive = no
					OR = {
						AND = {
							religion_group = pagan_group
							ROOT = {
								NOR = {
									religion_group = pagan_group
									trait = sympathy_pagans
								}
							}
						}
						AND = {
							religion_group = christian
							ROOT = {
								NOR = {
									religion_group = christian
									trait = sympathy_christendom
								}
							}
						}
						AND = {
							religion_group = muslim
							ROOT = {
								NOR = {
									religion_group = muslim
									trait = sympathy_islam
								}
							}
						}
						AND = {
							religion_group = zoroastrian_group
							ROOT = {
								NOR = {
									religion_group = zoroastrian_group
									trait = sympathy_zoroastrianism
								}
							}
						}
						AND = {
							religion_group = jewish_group
							ROOT = {
								NOR = {
									religion_group = jewish_group
									trait = sympathy_judaism
								}
							}
						}
						AND = {
							religion_group = indian_group
							ROOT = {
								NOR = {
									religion_group = indian_group
									trait = sympathy_indian
								}
							}
						}
					}
				}
			}
			founder = {
				save_event_target_as = target_bloodline_founder
			}
		}
	}
	
	option = {
		name = EVTOPTC_HF_110
		tooltip_info = lunatic
		
		trigger = {
			trait = lunatic
			NOT = {
				trait = zealous
			}
			event_target:target_bloodline_founder = {
				NOR = {
					religion = pagan
					religion = hellenic_pagan
				}
			}
		}
		
		piety = -250
		religion = event_target:target_bloodline_founder
		add_trait = zealous
		set_character_flag = ai_flag_refuse_conversion
		
		ai_chance = {
        	factor = 5
        }
	}
	
	option = {
		name = EVTOPTA_HF_110
		if = {
			limit = {
				event_target:target_bloodline_founder = {
					religion_group = pagan_group
				}
			}
			add_trait = sympathy_pagans
		}
		else_if = {
			limit = {
				event_target:target_bloodline_founder = {
					religion_group = christian
				}
			}
			add_trait = sympathy_christendom
		}
		else_if = {
			limit = {
				event_target:target_bloodline_founder = {
					religion_group = muslim
				}
			}
			add_trait = sympathy_islam
		}
		else_if = {
			limit = {
				event_target:target_bloodline_founder = {
					religion_group = jewish_group
				}
			}
			add_trait = sympathy_judaism
		}
		else_if = {
			limit = {
				event_target:target_bloodline_founder = {
					religion_group = zoroastrian_group
				}
			}
			add_trait = sympathy_zoroastrianism
		}
		else_if = {
			limit = {
				event_target:target_bloodline_founder = {
					religion_group = indian_group
				}
			}
			add_trait = sympathy_indian
		}
		
		ai_chance = {
        	factor = 45
        }
	}
	
	option = {
		name = EVTOPTB_HF_110
		set_character_flag = no_sympathy_bloodline
		piety = 5
		
		ai_chance = {
        	factor = 50
        }
	}
}

character_event = { # Chance of gaining a personality trait of Founder
	id = HF.120
	desc = HF_120_DESC
	picture = GFX_placeholder
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16
	
	trigger = {
		NOT = {
			has_character_flag = had_bloodline_personality_event
		}
		any_owned_bloodline = {
			OR = {
				NOT = {
					has_bloodline_flag = saintly_bloodline
				}
				ROOT = {
					religion_group = christian
				}
			}
			founder = {
				NOT = {
					character = ROOT
				}
				is_alive = no
				ROOT = {
					can_copy_personality_trait_from = PREV
				}
			}
		}
	}
	
	immediate = {
		set_character_flag = had_bloodline_personality_event
		random_owned_bloodline = {
			limit ={
				OR = {
					NOT = {
						has_bloodline_flag = saintly_bloodline
					}
					ROOT = {
						religion_group = christian
					}
				}
				founder = {
					NOT = {
						character = ROOT
					}
					is_alive = no
					ROOT = {
						can_copy_personality_trait_from = PREV
					}
				}
			}
			founder = {
				save_event_target_as = target_bloodline_founder
			}
		}
	}
	
	option = {
		name = EVTOPTC_HF_120
		tooltip_info = lunatic
		trigger = {
			trait = lunatic
			NOT = {
				trait = cannibal_trait
			}
			event_target:target_bloodline_founder = {
				trait = cannibal_trait
			}
		}
		add_trait = cannibal_trait
	}
	
	option = {
		name = EVTOPTC_HF_120
		tooltip_info = possessed
		trigger = {
			trait = possessed
			NOR = {
				trait = cannibal_trait
				trait = lunatic
			}
			event_target:target_bloodline_founder = {
				trait = cannibal_trait
			}
		}
	}
	
	option = {
		name = EVTOPTA_HF_120
		
		copy_random_personality_trait = event_target:target_bloodline_founder
		add_character_modifier = {
			name = emulating_legend
			years = 5
		}
	}
	
	option = {
		name = EVTOPTB_HF_120
	}
}

#Triggered by Cruel-torture event for Greek Sicilian King: Phalaris Bloodline (only gained by event).
narrative_event = {
	id = HF.24000
	title = EVTTITLEHF24000
	desc = EVTDESCHF24000
	picture = GFX_evt_beheading
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	show_from_from = yes
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
		NOT = { has_global_flag = flag_phalaris_bloodline }
		NOT = { has_dynasty_flag = flag_phalaris_event }
		is_female = no
	}

	immediate = { 
		set_dynasty_flag = flag_phalaris_event
	} #If Character says no first time, event never fires again for his dynasty.
	
	option = { #Gain Phalaris bloodline.
		name = EVTOPTAHF24000
		custom_tooltip = { text = tooltip_restore_brazen_bull }
		if = { 
			limit = { has_nickname = no }
			give_nickname = nick_the_tyrant
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = phalaris_male
			}
			new_bloodline = {
				set_description = "bloodline_desc_phalaris"
			}		
		}
	#	if = { 
	#		limit = { is_female = yes }
	#		create_bloodline = {
	#			type = phalaris_female
	#		}
	#		new_bloodline = {
	#			set_description = "bloodline_desc_phalaris"
	#		}
	#	} 
		hidden_tooltip = { 
			if = { 
				limit = { has_character_modifier = brazen_bull }
				remove_character_modifier = brazen_bull #Negative opinion is now part of the bloodline itself.		
			}
			any_player = { 
				limit = { 
					is_within_diplo_range = ROOT 
					NOT = { character = ROOT }
				}	
			narrative_event = { id = HF.24006 }	
			}
		}
		set_global_flag = flag_phalaris_bloodline
		ai_chance = { 
			factor = 90
			modifier = { 
				factor = 1.5
				trait = lunatic
			}
		}
	}
	option = { #Nothing.
		name = EVTOPTBHF24000
		tiered_prestige_negative_effect = yes
		if = { 
			limit = { has_character_modifier = brazen_bull }
			remove_character_modifier = brazen_bull
		}
		ai_chance = { 
			factor = 10
			modifier = { 
				factor = 1.5
				trait = charitable
			}
			modifier = { 
				factor = 1.5
				trait = humble
			}
		}
	}
}

# Killed by brazen bull - First time.
character_event = {
	id = HF.24001
	desc = EVTDESCHF24001
	picture = GFX_evt_beheading
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24001
		hidden_tooltip = {
			FROM = { character_event = { id = HF.24002 } }
		}
		death = {
			death_reason = death_execution_brazen_bull
			killer = FROM
		}
	}
}

# Host notified of death by brazen bull - First time.
character_event = {
	id = HF.24002
	desc = {
		trigger = {
			has_character_modifier = brazen_bull
		}
		text = EVTDESCAHF24002
	}
	desc = {
		trigger = {
			NOT = {
				has_character_modifier = brazen_bull
			}
		}
		text = EVTDESCBHF24002
	}
	picture = GFX_evt_beheading
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24002
		hidden_tooltip = {
			narrative_event = { id = HF.24000 days = 30 random = 80 } #Apply bloodline after rumors spread.
		}
		tiered_piety_negative_effect = yes
	}
}

# Killed by brazen bull - From Targetted decision. - First time.
character_event = {
	id = HF.24003
	desc = EVTDESCHF24003
	picture = GFX_evt_beheading
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24003
		death = {
			death_reason = death_execution_brazen_bull
			killer = FROMFROM
		}
	}
}
# Host notified of death by brazen bull (generic executions)
character_event = {
	id = HF.24004
	desc = EVTDESCHF24004
	picture = GFX_evt_beheading
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24004
	}
}

# Killed by brazen bull (generic executions)
character_event = {
	id = HF.24005
	desc = EVTDESCHF24005
	picture = GFX_evt_beheading
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24005
		death = {
			death_reason = death_execution_brazen_bull
			killer = FROMFROM
		}
	}
}

#Notification for players of the new Tyrant of Sicily.
narrative_event = {
	id = HF.24006
	title = EVTTITLEHF24000
	desc = EVTDESCHF24006
	picture = GFX_evt_beheading
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
	}
	option = {
		name = EVTOPTAHF24006
	}
}

#Teuta's bloodline. Fired on_war_ended_victory of a war against Byzantium.
# From = Attacker, Root = Defender
character_event = {
	id = HF.24010
	hide_window = yes
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
		NOT = { has_global_flag = flag_teuta_bloodline } #Just once.
		OR  = { 
			AND = { #Either won as defensive...
				ROOT = { 
					is_female = yes
					is_alternate_start = no 
					independent = yes
					lower_tier_than = EMPEROR
					religion_group = pagan_group
					NOT = { realm_size = 120 }
					NOR = { 
						religion = hellenic_pagan
						religion = hellenic_pagan_reformed
						culture = roman
					}
					OR = { 
						culture_group = south_slavic
						culture = dalmatian
					}
					capital_scope = { 
						OR = { 
							de_jure_liege = d_dioclea 
							de_jure_liege = d_rashka
						} 
					}
				}
				FROM = { 
					OR = { 
						has_landed_title = e_byzantium
						has_landed_title = e_roman_empire
					}
				}
			}
			AND = { #...Or as attacker.
				FROM = { 
					is_female = yes
					is_alternate_start = no 
					independent = yes
					lower_tier_than = EMPEROR
					religion_group = pagan_group
					NOT = { realm_size = 120 }
					NOR = { 
						religion = hellenic_pagan
						religion = hellenic_pagan_reformed
						culture = roman
					}
					OR = { 
						culture_group = south_slavic
						culture = dalmatian
					}
					capital_scope = { 
						OR = { 
							de_jure_liege = d_dioclea 
							de_jure_liege = d_rashka
						} 
					}
				}
				ROOT = { 
					OR = { 
						has_landed_title = e_byzantium
						has_landed_title = e_roman_empire
					}
				}
			}
		}
	}
	immediate = { 
		sound_effect = bloodline_added
		set_global_flag = flag_teuta_bloodline
		if = { 
			limit = { 
				ROOT = { 
					is_female = yes
					is_alternate_start = no 
					independent = yes
					lower_tier_than = EMPEROR
					religion_group = pagan_group
					NOT = { realm_size = 120 }
					NOR = { 
						religion = hellenic_pagan
						religion = hellenic_pagan_reformed
						culture = roman
					}
					OR = { 
						culture_group = south_slavic
						culture_group = latin
					}
					capital_scope = { 
						OR = { 
							de_jure_liege = d_dioclea 
							de_jure_liege = d_rashka
						} 
					}
				}
			}
			FROM = {
				save_event_target_as = defeated_emperor
			}	
			ROOT = {
				set_character_flag = flag_defensive_teuta
				narrative_event = { id = HF.24011 days = 20 }
			}	
			break = yes
		}
		if = { 
			limit = { 
				FROM = { 
					is_female = yes
					is_alternate_start = no 
					independent = yes
					lower_tier_than = EMPEROR
					religion_group = pagan_group
					NOT = { realm_size = 120 }
					NOR = { 
						religion = hellenic_pagan
						religion = hellenic_pagan_reformed
						culture = roman
					}
					OR = { 
						culture_group = south_slavic
						culture_group = latin
					}
					capital_scope = { 
						OR = { 
							de_jure_liege = d_dioclea 
							de_jure_liege = d_rashka
						} 
					}
				}
			}
			ROOT = {
				save_event_target_as = defeated_emperor
			}	
			FROM = {
				set_character_flag = flag_offensive_teuta
				narrative_event = { id = HF.24011 days = 20 }
			}	
			break = yes
		}
	}
}

narrative_event = {
	id = HF.24011
	title = EVTTITLEHF24011
	desc = {
		trigger = {
				has_character_flag = flag_offensive_teuta
		}
		text = EVTDESCAHF24011
	}
	desc = {
		trigger = {
				has_character_flag = flag_defensive_teuta
		}
		text = EVTDESCBHF24011
	}
	picture = GFX_evt_norse_tempest
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
	}
	
	option = {
		name = EVTOPTAHF24011
		if = { 
			limit = { has_nickname = no }
			give_nickname = nick_the_liberator
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = teuta_female
			}
			new_bloodline = {
				set_description = "bloodline_desc_teuta"
			}		
		}
		hidden_tooltip = { 
			any_player = { 
				limit = { 
					is_within_diplo_range = ROOT 
					NOT = { character = ROOT }
				}	
				narrative_event = { id = HF.24012 }	
			}
		}
		ai_chance = { 
			factor = 100
		}
	}
	option = {
		name = EVTOPTBHF24011
		tiered_piety_reward_effect = yes
		ai_chance = { 
			factor = 0
		}
	}
	after = {
		clr_character_flag = flag_defensive_teuta
		clr_character_flag = flag_offensive_teuta
	}
}
narrative_event = {
	id = HF.24012
	title = EVTTITLEHF24012
	desc = {
		trigger = {
			OR = {
				has_landed_title = e_byzantium
				has_landed_title = e_roman_empire
			}
		}
		text = EVTDESCAHF24012
	}
	desc = {
		trigger = {
			NOR = {
				has_landed_title = e_byzantium
				has_landed_title = e_roman_empire
			}
		}
		text = EVTDESCBHF24012
	}
	picture = GFX_evt_norse_tempest
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
	}

	option = {
		name = EVTOPTAHF24012
		trigger = { 
			OR = {
				has_landed_title = e_byzantium
				has_landed_title = e_roman_empire
			}
		}
		ai_chance = { 
			factor = 100
		}
	}
	option = {
		name = EVTOPTBHF24012
		trigger = { 
			NOR = {
				has_landed_title = e_byzantium
				has_landed_title = e_roman_empire
			}
			OR = {
				culture_group = byzantine
				culture = roman
				religion = hellenic_pagan
				religion = hellenic_pagan_reformed
			}
		}
		ai_chance = { 
			factor = 100
		}
	}
	option = {
		name = EVTOPTCHF24012
		trigger = { 
			NOR = {
				has_landed_title = e_byzantium
				has_landed_title = e_roman_empire
				culture_group = byzantine
				culture = roman
				religion = hellenic_pagan
				religion = hellenic_pagan_reformed
			}
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#On_war_started: Corsair ships arrive for war.
character_event = {
	id = HF.24013
	hide_window = yes
	
	is_triggered_only = yes

	war = yes

	trigger = { 
		has_dlc = "Holy Fury" 
		OR = {
			FROM = {
				age = 16
				NOT = { trait = incapable }
				any_owned_bloodline = {
					has_bloodline_flag = bloodline_spawned_ships 
				}
				any_realm_province = {
					port = yes 
				}
			}
			ROOT = {
				age = 16
				NOT = { trait = incapable }
				any_owned_bloodline = {
					has_bloodline_flag = bloodline_spawned_ships 
				}
				any_realm_province = {
					port = yes 
				}
			}
		}
	}
	
	immediate = {
		if = {
			limit = {
				FROM = {
					age = 16
					NOT = { trait = incapable }
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_spawned_ships 
					}
					any_realm_province = {
						port = yes 
					}
				}
			}
			FROM = { 
				random_list = { 
					25 = {
						modifier = {
							factor = 1.5
							trait = brave
						}
						modifier = {
							factor = 1.25
							trait = viking
						}
						modifier = {
							factor = 1.25
							trait = pirate
						}
						modifier = {
							factor = 1.5
							trait = ravager
						}
						modifier = {
							factor = 1.75
							trait = seaking
						}
						modifier = {
							factor = 1.75
							trait = sea_queen
						}
						character_event = { id = HF.24014 days = 25 random = 40 }	
					} 
					50 = {
						character_event = { id = HF.24015 days = 25 random = 40 }	
					} 
					25 = {
						modifier = {
							factor = 1.5
							trait = craven
						}
						modifier = {
							factor = 0.75
							martial = 10
						}
						modifier = {
							factor = 0.75
							martial = 14
						}
						modifier = {
							factor = 0.75
							martial = 18
						}
						modifier = {
							factor = 0.75
							prestige = 500
						}
						modifier = {
							factor = 0.75
							prestige = 1000
						}
						modifier = {
							factor = 0.75
							prestige = 2000
						}
						character_event = { id = HF.24016 days = 25 random = 40 }	
					}
				}
			}	
		}
		if = {
			limit = {
				ROOT = {
					age = 16
					NOT = { trait = incapable }
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_spawned_ships 
					}
					any_realm_province = {
						port = yes 
					}
				}
			}
			ROOT = { 
				random_list = { 
					15 = {
						modifier = {
							factor = 1.5
							trait = brave
						}
						modifier = {
							factor = 1.25
							trait = viking
						}
						modifier = {
							factor = 1.25
							trait = pirate
						}
						modifier = {
							factor = 1.5
							trait = ravager
						}
						modifier = {
							factor = 1.75
							trait = seaking
						}
						modifier = {
							factor = 1.75
							trait = sea_queen
						}
						character_event = { id = HF.24014 days = 25 random = 40 }	
					} 
					60 = {
						character_event = { id = HF.24015 days = 25 random = 40 }	
					} 
					25 = {
						modifier = {
							factor = 1.5
							trait = craven
						}
						modifier = {
							factor = 0.75
							martial = 10
						}
						modifier = {
							factor = 0.75
							martial = 14
						}
						modifier = {
							factor = 0.75
							martial = 18
						}
						modifier = {
							factor = 0.75
							prestige = 500
						}
						modifier = {
							factor = 0.75
							prestige = 1000
						}
						modifier = {
							factor = 0.75
							prestige = 2000
						}
						character_event = { id = HF.24016 days = 25 random = 40 }	
					}
				}
			}	
		}
	}
}

#Lots of ships arrive.
character_event = {
	id = HF.24014
	desc = {
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = bloodline_spawned_ships
				founder = { character = ROOT }
			}
		}
		text = EVTDESCHFA24014
	}
	desc = {
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = bloodline_spawned_ships
				founder = { NOT = { character = ROOT } }
			}
		}
		text = EVTDESCHFB24014
	}
	picture = GFX_evt_norse_tempest
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes
	
	immediate = {
			any_owned_bloodline = {
				limit = { has_bloodline_flag = bloodline_spawned_ships }
				founder = { 
					save_event_target_as = pirate_bloodline_target	#Localization use only.
				}
			}
	}
	option = {
		name = EVTOPTAHF24014
		spawn_fleet = {
			province = closest # closest sea zone
			owner = ROOT
			disband_on_peace = yes
			troops = {
				galleys = { 100 100 }
			}
			earmark = pirate_conscripts
		}
	}
}
#A few ships arrive.
character_event = {
	id = HF.24015
	desc = {
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = bloodline_spawned_ships
				founder = { character = ROOT }
			}
		}
		text = EVTDESCHFA24015
	}
	desc = {
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = bloodline_spawned_ships
				founder = { NOT = { character = ROOT } }
			}
		}
		text = EVTDESCHFB24015
	}
	picture = GFX_evt_longships_at_sea_oldgods
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes
	
	immediate = {
			any_owned_bloodline = {
				limit = { has_bloodline_flag = bloodline_spawned_ships }
				founder = { 
					save_event_target_as = pirate_bloodline_target	#Localization use only.
				}
			}
	}
	option = {
		name = EVTOPTAHF24015
		spawn_fleet = {
			province = closest # closest sea zone
			owner = ROOT
			disband_on_peace = yes
			troops = {
				galleys = { 50 50 }
			}
			earmark = pirate_conscripts
		}
	}
}
#Very few ships arrive.
character_event = {
	id = HF.24016
	desc = {
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = bloodline_spawned_ships
				founder = { character = ROOT }
			}
		}
		text = EVTDESCHFA24016
	}
	desc = {
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = bloodline_spawned_ships
				founder = { NOT = { character = ROOT } }
			}
		}
		text = EVTDESCHFB24016
	}
	picture = GFX_evt_longships_at_sea_oldgods
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes
	
	immediate = {
			any_owned_bloodline = {
				limit = { has_bloodline_flag = bloodline_spawned_ships }
				founder = { 
					save_event_target_as = pirate_bloodline_target	#Localization use only.
				}
			}
	}
	option = {
		name = EVTOPTAHF24016
		spawn_fleet = {
			province = closest # closest sea zone
			owner = ROOT
			disband_on_peace = yes
			troops = {
				galleys = { 10 10 }
			}
			earmark = pirate_conscripts
		}
	}
}

##################################################################
##################################################################
# Forge Bloodline Ambition events

#Hidden checks and counters first:

#On_death: check for murders.
character_event = {
	id = HF.24017
	hide_window = yes
	trigger = { 
		has_dlc = "Holy Fury"
		OR = { 
			death_murder_unknown_trigger = yes
			death_murder_known_trigger = yes
			death_execution_trigger = yes
		}
		killer = { #Not necessary to have the ambition to stack up the variable, but necessary to unlock the bloodline.
			is_playable = yes
			is_landed = yes
			NOT = { trait = incapable }
			NOT = { 
				has_character_flag = flag_about_to_murder_bloodline
			}
		}
	}
	
	is_triggered_only = yes

	immediate = { 
		killer = { 
			murder_bloodline_check_effect = yes
		}
	}
}

#on_war_ended_victory: check for war variable.
# From = Attacker, Root = Defender
character_event = {
	id = HF.24018
	hide_window = yes
	trigger = { 
		has_dlc = "Holy Fury"
		FROM = { 
			NOR = {
				trait = heresiarch
				trait = peasant_leader
				trait = adventurer
				has_character_flag = flag_about_to_war_bloodline
			}
		}
		ROOT = { 
			NOR = {
				trait = heresiarch
				trait = peasant_leader
				trait = adventurer
			}
		}
	}
	
	is_triggered_only = yes

	immediate = { 
		FROM = { 
			hidden_tooltip = { change_variable = { which = bloodline_won_wars value = 1 } }
			if = { #Pure War Bloodline.
				limit = { 
					check_variable = { which = bloodline_won_wars value = 15 } 
					has_ambition = obj_forge_bloodline
				}
				set_character_flag = flag_about_to_war_bloodline
				character_event = { id = HF.24031 days = 25 random = 25 }
			}
			else_if = { # Murder War Hybrid.
				limit = { 
					check_variable = { which = bloodline_murdered_people value = 20 } 
					check_variable = { which = bloodline_won_wars value = 10 }
					has_ambition = obj_forge_bloodline
				}
				set_character_flag = flag_about_to_war_bloodline
				narrative_event = { id = HF.24045 days = 25 random = 25 }
			}
		}
	}
}

#on_war_ended_defeat: check for war variable.
# From = Attacker, Root = Defender
character_event = {
	id = HF.24019
	hide_window = yes
	trigger = { 
		has_dlc = "Holy Fury"
		FROM = { 
			NOR = {
				trait = heresiarch
				trait = peasant_leader
				trait = adventurer
			}
		}
		ROOT = { 
			NOR = {
				trait = heresiarch
				trait = peasant_leader
				trait = adventurer
				has_character_flag = flag_about_to_war_bloodline
			}
		}
	}
	
	is_triggered_only = yes

	immediate = { 
		ROOT = { 
			hidden_tooltip = { change_variable = { which = bloodline_won_wars value = 1 } }
			if = { #Pure War Bloodline.
				limit = { 
					check_variable = { which = bloodline_won_wars value = 15 } 
					has_ambition = obj_forge_bloodline
				}
				set_character_flag = flag_about_to_war_bloodline
				character_event = { id = HF.24031 days = 25 random = 25 }
			}
			else_if = { # Murder War Hybrid.
				limit = { 
					check_variable = { which = bloodline_murdered_people value = 20 } 
					check_variable = { which = bloodline_won_wars value = 10 }
					has_ambition = obj_forge_bloodline
				}
				set_character_flag = flag_about_to_war_bloodline
				narrative_event = { id = HF.24045 days = 25 random = 25 }
			}
		}
	}
}

#Fired from ambition: check years at peace.
character_event = {
	id = HF.24020
	hide_window = yes
	trigger = { 
		has_dlc = "Holy Fury"
		has_ambition = obj_forge_bloodline
		NOT = { check_variable = { which = bloodline_peaceful_years value = 30 } }
	}
	
	is_triggered_only = yes

	immediate = { 
		hidden_tooltip = { change_variable = { which = bloodline_peaceful_years value = 1 } }
		if = { #Pure Peace Bloodline.
			limit = { 
				check_variable = { which = bloodline_peaceful_years value = 30 } 
				has_ambition = obj_forge_bloodline
			}
			character_event = { id = HF.24037 days = 25 random = 25 }
		}
		else_if = { #Murder Peace Hybrid.
			limit = { 
				check_variable = { which = bloodline_peaceful_years value = 15 } 
				check_variable = { which = bloodline_murdered_people value = 20 } 
				has_ambition = obj_forge_bloodline
			}
			narrative_event = { id = HF.24046 days = 25 random = 25 }
		}
		else_if = { #Peace Architect Hybrid.
			limit = { 
				check_variable = { which = bloodline_peaceful_years value = 15 } 
				check_variable = { which = bloodline_built_cities value = 5 } 
				has_ambition = obj_forge_bloodline
			}
			narrative_event = { id = HF.24049 days = 25 random = 25 }
		}
		else_if = { #Peace Castellan Hybrid.
			limit = { 
				check_variable = { which = bloodline_peaceful_years value = 15 } 
				check_variable = { which = bloodline_built_castles value = 5 } 
				has_ambition = obj_forge_bloodline
			}
			narrative_event = { id = HF.24050 days = 25 random = 25 }
		}
		else_if = { #Peace Monumental Hybrid.
			limit = { 
				check_variable = { which = bloodline_peaceful_years value = 15 } 
				check_variable = { which = bloodline_built_temples value = 5 } 
				has_ambition = obj_forge_bloodline
			}
			narrative_event = { id = HF.24051 days = 25 random = 25 }
		}
		else = { # Fire again, with yearly delay.
			character_event = { id = HF.24020 days = 365 }
		}
	}
}

#on_war_started: reset peaceful_years variable.
character_event = {
	id = HF.24021
	hide_window = yes
	trigger = { 
		has_dlc = "Holy Fury"
		has_ambition = obj_forge_bloodline
	}
	
	is_triggered_only = yes

	immediate = { 
		if = { 
			limit = { 
				ROOT = { check_variable = { which = bloodline_peaceful_years value = 1 } } 	
			}
			ROOT = { set_variable = { which = bloodline_peaceful_years value = 0 } }
		}
		if = { 
			limit = { 
				FROM = { check_variable = { which = bloodline_peaceful_years value = 1 } } 	
			}
			FROM = { set_variable = { which = bloodline_peaceful_years value = 0 } }
		}
	}
}

#on_settlement_construction_completed: check the Architect Bloodline.
character_event = {
	id = HF.24022
	hide_window = yes
	trigger = { 
		has_dlc = "Holy Fury"
		FROM = { holding_type = CITY }
		NOT = {
			has_character_flag = flag_about_to_builder_bloodline
		}
	}
	
	is_triggered_only = yes

	immediate = { 
		change_variable = { which = bloodline_built_cities value = 1 }
		change_variable = { which = bloodline_built_holdings value = 1 }
		if = { #First check for pure Architect Bloodline.
			limit = {
				check_variable = { which = bloodline_built_cities value = 10 }
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24042 days = 25 random = 25 } 
		}
		else_if = { # Then check for Builder Hybrid.
			limit = {
				check_variable = { which = bloodline_built_holdings value = 24 }
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24047 days = 25 random = 25 } 
		}
		else_if = { #Then check for Murder Builder Hybrid.
			limit = {
				killer = { 
					check_variable = { which = bloodline_murdered_people value = 20 } 
					check_variable = { which = bloodline_built_holdings value = 15 } 
					has_ambition = obj_forge_bloodline
				}
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24048 days = 25 random = 25 }
		}
		else_if = { #Peace Architect Hybrid.
			limit = { 
				check_variable = { which = bloodline_peaceful_years value = 15 } 
				check_variable = { which = bloodline_built_cities value = 5 } 
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24049 days = 25 random = 25 }
		}
	}
}

#on_settlement_construction_completed: check the Castellan Bloodline.
character_event = {
	id = HF.24023
	hide_window = yes
	trigger = { 
		has_dlc = "Holy Fury"
		FROM = { holding_type = CASTLE }
		NOT = {
			has_character_flag = flag_about_to_builder_bloodline
		}
	}
	
	is_triggered_only = yes

	immediate = { 
		change_variable = { which = bloodline_built_castles value = 1 }
		change_variable = { which = bloodline_built_holdings value = 1 }
		if = { #First check for pure Castellan Bloodline.
			limit = {
				check_variable = { which = bloodline_built_castles value = 10 }
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24043 days = 25 random = 25 } 
		}
		else_if = { # Then check for Builder Hybrid.
			limit = {
				check_variable = { which = bloodline_built_holdings value = 24 }
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24047 days = 25 random = 25 } 
		}
		else_if = { #Then check for Murder Builder Hybrid.
			limit = {
				killer = { 
					check_variable = { which = bloodline_murdered_people value = 20 } 
					check_variable = { which = bloodline_built_holdings value = 15 } 
					has_ambition = obj_forge_bloodline
				}
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24048 days = 25 random = 25 }
		}
		else_if = { #Peace Castellan Hybrid.
			limit = { 
				check_variable = { which = bloodline_peaceful_years value = 15 } 
				check_variable = { which = bloodline_built_castles value = 5 } 
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24050 days = 25 random = 25 }
		}
	}
}

#on_settlement_construction_completed: check the Monumental Bloodline.
character_event = {
	id = HF.24024
	hide_window = yes
	trigger = { 
		has_dlc = "Holy Fury"
		FROM = { holding_type = TEMPLE }
		NOT = {
			has_character_flag = flag_about_to_builder_bloodline
		}
	}
	
	is_triggered_only = yes

	immediate = { 
		change_variable = { which = bloodline_built_temples value = 1 }
		change_variable = { which = bloodline_built_holdings value = 1 }
		if = { #First check for pure Monumental Bloodline.
			limit = {
				check_variable = { which = bloodline_built_temples value = 10 }
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24044 days = 25 random = 25 } 
		}
		else_if = { # Then check for Builder Hybrid.
			limit = {
				check_variable = { which = bloodline_built_holdings value = 24 }
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24047 days = 25 random = 25 } 
		}
		else_if = { #Then check for Murder Builder Hybrid.
			limit = {
				killer = { 
					check_variable = { which = bloodline_murdered_people value = 20 } 
					check_variable = { which = bloodline_built_holdings value = 15 } 
					has_ambition = obj_forge_bloodline
				}
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24048 days = 25 random = 25 }
		}
		else_if = { #Peace Monumental Hybrid.
			limit = { 
				check_variable = { which = bloodline_peaceful_years value = 15 } 
				check_variable = { which = bloodline_built_temples value = 5 } 
				has_ambition = obj_forge_bloodline
			}
			set_character_flag = flag_about_to_builder_bloodline
			narrative_event = { id = HF.24051 days = 25 random = 25 }
		}
	}
}

#Bloodline notification events for chosen path:

#Pure Murder Bloodline crossroad.
character_event = {
	id = HF.24025
	hide_window = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	is_triggered_only = yes

	immediate = { 
		if = { #First check if qualifies for Death little helper flavor.
			limit = { 
				OR = { 
					NOT = { age = 16 }
					AND = { 
						has_character_flag = flag_forge_bloodline_was_child 
						NOT = { age = 35 } #Should still be somewhat young.
					}
				}
			}
			narrative_event = { id = HF.24026 }
		}
		else = { 
			character_event = { id = HF.24027 } #Otherwise let player decide the flavor.
		}
	}
}

#Child gains Pure Murder Bloodline.
narrative_event = {
	id = HF.24026
	title = EVTTITLEHF24026
	desc = { 
		trigger = { 
			age = 25
		} 
		text = EVTDESCHFA24026
	}
	desc = { 
		trigger = { 
			NOT = { age = 25 } 
		} 
		text = EVTDESCHFB24026
	}
	picture = GFX_evt_child_reading
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Murder bloodline.
		name = EVTOPTAHF24026
		if = { 
			limit = { NOT = { trait = cruel } } 
			add_trait = cruel
		}
		hidden_tooltip = { 
			if = { 
				limit = { this_has_super_cool_nickname_trigger = no }
				random_list = { 
					10 = { 
						give_nickname = nick_the_deaths_child 
					} 
					10 = { 
						give_nickname = nick_the_snakeling 
					} 
					10 = { 
						give_nickname = nick_the_little_spider 
					} 
					10 = { 
						give_nickname = nick_the_eerie 
					} 
					10 = { 
						give_nickname = nick_the_little_nightmare 
					}
				}
			}
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_murder_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_murder_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Adult crossroad for pure Murder Bloodline.
character_event = {
	id = HF.24027
	desc = EVTDESCAHF24027
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	is_triggered_only = yes
	
	# Lunatic Dragon-King Bloodline.
	# Prop up embalmed corpses in Macabre Feast.
	# Hide everything.
	# Entrap next victim.

	option = {
		name = EVTOPTZHF24027
		custom_tooltip = { text = TT_EVTOPTZHF24027 }
		trigger = {  
			OR = {
				trait = lunatic
				trait = possessed
				trait = cannibal_trait
			}
			trait = cruel
		}
		if = { 
			limit = { NOT = { trait = cannibal_trait } } 
			add_trait = cannibal_trait
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = no
			}
			ROOT = { give_nickname = nick_the_dragon }
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = yes
			}
			ROOT = { give_nickname = nick_the_dragoness }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_murder_bloodline_05
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24231 } }
		ai_chance = { 
			factor = 20
		}
	}
	option = {
		name = EVTOPTAHF24027
		custom_tooltip = { text = TT_EVTOPTAHF24027 }
		if = { 
			limit = { NOT = { trait = cruel } } 
			add_trait = cruel
		}
		if = { 
			limit = { NOT = { trait = lunatic } } 
			random = { 
				chance = 5 
				add_trait = lunatic
			}
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				culture_group = latin
			}
			ROOT = { give_nickname = nick_the_ferrante }
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				NOT = { culture_group = latin }
			}
			ROOT = { give_nickname = nick_the_iron_heart }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_murder_bloodline_02
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24028 } }
		ai_chance = { 
			factor = 20
		}
	}
	option = {
		name = EVTOPTBHF24027
		custom_tooltip = { text = TT_EVTOPTBHF24027 }
		if = { 
			limit = { NOT = { trait = paranoid } } 
			add_trait = paranoid
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = no
			}
			ROOT = { give_nickname = nick_the_pale_spider }
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = yes
			}
			ROOT = { give_nickname = nick_the_grim_mistress }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_murder_bloodline_03
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24029 } }
		ai_chance = { 
			factor = 20
		}
	}
	option = {
		name = EVTOPTCHF24027
		custom_tooltip = { text = TT_EVTOPTCHF24027 }
		trigger = { 
			NOR = { 
				is_unattractive_trigger = yes
				trait = celibate
				trait = eunuch
			} 
		} 
		if = { 
			limit = { NOT = { trait = cruel } } 
			add_trait = cruel
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = no
			}
			ROOT = { give_nickname = nick_the_ripper }
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = yes
			}
			ROOT = { give_nickname = nick_the_black_widow }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_murder_bloodline_04
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24030 } }
		ai_chance = { 
			factor = 20
		}
	}
}

#Adult gains pure Murder Bloodline (Dragon Lunatic)
narrative_event = {
	id = HF.24231
	title = EVTTITLEHF24231
	desc = EVTDESCHF24231
	picture = GFX_evt_feast_hf
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Murder bloodline.
		name = EVTOPTAHF24231
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_murder_bloodline_05
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_murder_bloodline_05
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}
#Adult gains pure Murder Bloodline (Macabre Feast)
narrative_event = {
	id = HF.24028
	title = EVTTITLEHF24028
	desc = EVTDESCHF24028
	picture = GFX_evt_feast_hf
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Murder bloodline.
		name = EVTOPTAHF24028
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_murder_bloodline_02
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_murder_bloodline_02
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Adult gains pure Murder Bloodline (Silent Killer)
narrative_event = {
	id = HF.24029
	title = EVTTITLEHF24029
	desc = EVTDESCHF24029
	picture = GFX_evt_meeting_hf
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Murder bloodline.
		name = EVTOPTAHF24029
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_murder_bloodline_03
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_murder_bloodline_03
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Adult gains pure Murder Bloodline (Ripper)
narrative_event = {
	id = HF.24030
	title = EVTTITLEHF24030
	desc = EVTDESCHF24030
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Murder bloodline.
		name = EVTOPTAHF24030
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_murder_bloodline_04
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_murder_bloodline_04
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Pure War Bloodline crossroad.
character_event = {
	id = HF.24031
	hide_window = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	is_triggered_only = yes

	immediate = { 
		if = { #First check if qualifies for Deaht little helper flavor.
			limit = { 
				OR = { 
					NOT = { age = 16 }
					AND = { 
						has_character_flag = flag_forge_bloodline_was_child 
						NOT = { age = 35 } #Should still be somewhat young.
					}
				}
			}
			narrative_event = { id = HF.24032 }
		}
		else = { 
			character_event = { id = HF.24033 } #Otherwise let player decide the flavor.
		}
	}
}

#Child gains Pure War Bloodline.
narrative_event = {
	id = HF.24032
	title = EVTTITLEHF24032
	desc = EVTDESCHF24032
	picture = { 
		trigger = { 
			religion_group = christian
		} 
		picture = GFX_evt_childrens_crusade
	}
	picture = { 
		trigger = { 
			NOT = { religion_group = christian }
		} 
		picture = GFX_evt_child_sword
	}
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain War bloodline.
		name = EVTOPTAHF24032
		if = { 
			limit = { NOT = { trait = brave } } 
			add_trait = brave
		}
		hidden_tooltip = { 
			if = { 
				limit = { this_has_super_cool_nickname_trigger = no }
				random_list = { 
					10 = { 
						give_nickname = nick_the_young_eagle 
					} 
					10 = { 
						give_nickname = nick_the_green_warrior 
					} 
					10 = { 
						give_nickname = nick_the_warrior_child 
					} 
					10 = { 
						give_nickname = nick_the_young_conqueror 
					}
				}
			}
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_war_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_war_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Adult crossroad for pure War Bloodline.
character_event = {
	id = HF.24033
	desc = EVTDESCAHF24033
	picture = GFX_evt_battle
	border = GFX_event_normal_frame_war
	
	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	is_triggered_only = yes
	
	# Knightly speech.
	# Craving for more land and blood.
	# Discussing about tactics.

	option = {
		name = EVTOPTAHF24033
		trigger = { 
			religion_group = christian 
			is_evil_trigger = no 
			OR = {
				is_female = no
				has_religion_feature = religion_matriarchal 	#AltStart
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
				has_religion_feature = religion_equal
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = equal
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
			}
		}
		custom_tooltip = { text = TT_EVTOPTAHF24033 }
		if = { 
			limit = { NOT = { trait = brave } } 
			add_trait = brave
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = no
			}
			ROOT = { give_nickname = nick_the_white_knight }
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = yes
			}
			ROOT = { give_nickname = nick_the_virago }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_war_bloodline_02
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24034 } }
		ai_chance = { 
			factor = 20
		}
	}
	option = {
		name = EVTOPTBHF24033
		custom_tooltip = { text = TT_EVTOPTBHF24033 }
		if = { 
			limit = { NOT = { trait = wroth } } 
			add_trait = wroth
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = no
			}
			ROOT = { give_nickname = nick_the_bloodhound }
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				is_female = yes
			}
			ROOT = { give_nickname = nick_the_fury }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_war_bloodline_03
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24035 } }
		ai_chance = { 
			factor = 20
		}
	}
	option = {
		name = EVTOPTCHF24033
		trigger = { 
			NOT = { is_dumb_trigger = yes } 
			learning = 8
		}
		tooltip_info = learning
		custom_tooltip = { text = TT_EVTOPTCHF24033 }
		if = { 
			limit = { NOT = { trait = diligent } } 
			add_trait = diligent
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_warrior_philosopher }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_war_bloodline_04
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24036 } }
		ai_chance = { 
			factor = 20
		}
	}
}

#Adult gains pure War Bloodline (Perfect Knight)
narrative_event = {
	id = HF.24034
	title = EVTTITLEHF24034
	desc = EVTDESCHF24034
	picture = GFX_evt_joust
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain War bloodline.
		name = EVTOPTAHF24034
		hidden_tooltip = {
		add_artifact = crown_winged_helmet
			new_artifact = {
				set_description = crown_winged_helmet_bloodline_desc_1
				set_name = crown_winged_helmet_bloodline_name_1
			}
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_war_bloodline_02
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_war_bloodline_02
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Adult gains pure War Bloodline (Warlord)
narrative_event = {
	id = HF.24035
	title = EVTTITLEHF24035
	desc = EVTDESCHF24035
	picture = GFX_evt_mounted_knights_hf
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain War bloodline.
		name = EVTOPTAHF24035
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_war_bloodline_03
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_war_bloodline_03
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Adult gains pure War Bloodline (Warrior Philosopher)
narrative_event = {
	id = HF.24036
	title = EVTTITLEHF24036
	desc = EVTDESCHF24036
	picture = { 
		trigger = { 
			has_dlc = "Way of Life"
		} 
		picture = GFX_evt_war_planning
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Way of Life" }
		} 
		picture = GFX_evt_council
	}
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	hide_from = yes
	show_from_from = no
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain War bloodline.
		name = EVTOPTAHF24036
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_war_bloodline_04
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_war_bloodline_04
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Pure Peace Bloodline crossroad.
character_event = {
	id = HF.24037
	hide_window = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	is_triggered_only = yes

	immediate = { 
		if = { #First check if qualifies for blessed child flavor.
			limit = { 
				OR = { 
					NOT = { age = 16 }
					AND = { 
						has_character_flag = flag_forge_bloodline_was_child 
						NOT = { age = 35 } #Should still be somewhat young.
					}
				}
			}
			narrative_event = { id = HF.24038 }
		}
		else = { 
			character_event = { id = HF.24039 } #Otherwise let player decide the flavor.
		}
	}
}

#Child gains Pure Peace Bloodline.
narrative_event = {
	id = HF.24038
	title = EVTTITLEHF24038
	desc = EVTDESCHF24038
	picture = GFX_evt_child_talking
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Peace bloodline.
		name = EVTOPTAHF24038
		if = { 
			limit = { NOT = { trait = kind } } 
			add_trait = kind
		}
		hidden_tooltip = { 
			if = { 
				limit = { this_has_super_cool_nickname_trigger = no }
				random_list = { 
					10 = { 
						trigger = { religion_group = christian }
						give_nickname = nick_the_angel 
					} 
					10 = { 
						give_nickname = nick_the_pure 
					} 
					10 = { 
						give_nickname = nick_the_celestial 
					} 
					10 = { 
						give_nickname = nick_the_radiant 
					} 
					10 = { 
						give_nickname = nick_the_innocent 
					}
				}
			}
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_peace_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_peace_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Adult crossroad for pure Peace Bloodline.
character_event = {
	id = HF.24039
	desc = EVTDESCAHF24039
	picture = GFX_evt_garden
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	# Protect realm.
	# Issue great celebrations everywhere.

	option = {
		name = EVTOPTAHF24039
		if = { 
			limit = { NOT = { trait = kind } } 
			add_trait = kind
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_peace_maker }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_peace_bloodline_02
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24040 } }
		ai_chance = { 
			factor = 20
		}
	}
	option = {
		name = EVTOPTBHF24039
		if = { 
			limit = { NOT = { trait = charitable } } 
			add_trait = charitable
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_munificent }
		}
		tooltip = { #Show bloodline effects
			create_bloodline = {
				type = pure_peace_bloodline_03
			}		
		}
		hidden_tooltip = { narrative_event = { id = HF.24041 } }
		ai_chance = { 
			factor = 20
		}
	}
}

#Adult gains pure Peace Bloodline (Protector)
narrative_event = {
	id = HF.24040
	title = EVTTITLEHF24040
	desc = EVTDESCHF24040
	picture = GFX_evt_market_hf
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Peace bloodline.
		name = EVTOPTAHF24040
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_peace_bloodline_02
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_peace_bloodline_02
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Adult gains pure Peace Bloodline (Munificent)
narrative_event = {
	id = HF.24041
	title = EVTTITLEHF24041
	desc = EVTDESCHF24041
	picture = GFX_evt_jugglers
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Peace bloodline.
		name = EVTOPTAHF24041
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_peace_bloodline_03
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_peace_bloodline_03
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Pure Architect Bloodline.
narrative_event = {
	id = HF.24042
	title = EVTTITLEHF24042
	desc = EVTDESCHF24042
	picture = GFX_evt_busy_trading_dock_republic
	border = GFX_event_narrative_frame_economy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Architect bloodline.
		name = EVTOPTAHF24042
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_architect }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_architect_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_architect_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Pure Castellan Bloodline.
narrative_event = {
	id = HF.24043
	title = EVTTITLEHF24043
	desc = EVTDESCHF24043
	picture = GFX_evt_magnificent_castle
	border = GFX_event_narrative_frame_economy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Castellan bloodline.
		name = EVTOPTAHF24043
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_castellan }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_castellan_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_castellan_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Pure Monumental Bloodline.
narrative_event = {
	id = HF.24044
	title = EVTTITLEHF24044
	desc = EVTDESCHF24044
	picture = GFX_evt_cathedral
	border = GFX_event_narrative_frame_economy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Monumental bloodline.
		name = EVTOPTAHF24044
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				religion_group = christian
			}
			ROOT = { give_nickname = nick_the_carpenter }
		}
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
				NOT = { religion_group = christian }
			}
			ROOT = { give_nickname = nick_the_grandiose }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = pure_monumental_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = pure_monumental_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Murder War Hybrid Bloodline.
narrative_event = {
	id = HF.24045
	title = EVTTITLEHF24045
	desc = EVTDESCHF24045
	picture = GFX_evt_cornered_duel_hf
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Murder War Hybrid bloodline.
		name = EVTOPTAHF24045
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_griffin }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = hybrid_murder_war_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = hybrid_murder_war_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Murder Peace Hybrid Bloodline.
narrative_event = {
	id = HF.24046
	title = EVTTITLEHF24046
	desc = EVTDESCHF24046
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Murder Peace Hybrid bloodline.
		name = EVTOPTAHF24046
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_compassionate }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = hybrid_murder_peace_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = hybrid_murder_peace_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Builder Combo Hybrid Bloodline.
narrative_event = {
	id = HF.24047
	title = EVTTITLEHF24047
	desc = EVTDESCHF24047
	picture = GFX_evt_busy_trading_dock_republic
	border = GFX_event_narrative_frame_economy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Builder Combo Hybrid bloodline.
		name = EVTOPTAHF24047
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_founder }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = hybrid_builder_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = hybrid_builder_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Murder Builder Hybrid Bloodline.
narrative_event = {
	id = HF.24048
	title = EVTTITLEHF24048
	desc = EVTDESCHF24048
	picture = GFX_evt_mountaintop_castle_hf
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Murder Builder Hybrid bloodline.
		name = EVTOPTAHF24048
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_bloodlime }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = hybrid_murder_builder_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = hybrid_murder_builder_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Peace Architect Hybrid Bloodline.
narrative_event = {
	id = HF.24049
	title = EVTTITLEHF24049
	desc = EVTDESCHF24042
	picture = GFX_evt_busy_trading_dock_republic
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Peace Architect Hybrid bloodline.
		name = EVTOPTAHF24049
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_patron_of_arts }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = hybrid_peace_architect_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = hybrid_peace_architect_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Peace Castellan Hybrid Bloodline.
narrative_event = {
	id = HF.24050
	title = EVTTITLEHF24050
	desc = EVTDESCHF24043
	picture = GFX_evt_magnificent_castle
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Peace Castellan Hybrid bloodline.
		name = EVTOPTAHF24050
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_bastion_of_capital }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = hybrid_peace_castellan_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = hybrid_peace_castellan_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Ruler gains Peace Monumental Hybrid Bloodline.
narrative_event = {
	id = HF.24051
	title = EVTTITLEHF24051
	desc = EVTDESCHF24044
	picture = GFX_evt_cathedral
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Gain Peace Monumental Hybrid bloodline.
		name = EVTOPTAHF24051
		if = { 
			limit = { 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_holy_mason }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = hybrid_peace_monumental_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = hybrid_peace_monumental_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Event-based Bloodlines.
#First event, pick the branch.
character_event = {
	id = HF.24052
	title = EVTTITLEHF24052
	desc = EVTDESCHF24052
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_bloodlines
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Becoming Exemplar ruler (Benevolent/Family)
		name = EVTOPTAHF24052
		custom_tooltip = { text = TT_EVTOPTAHF24052 }
		hidden_tooltip = { 
			character_event = { id = HF.24053 days = 150 random = 150 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = { #Improving the realm (Religious I/Technology)
		name = EVTOPTBHF24052
		custom_tooltip = { text = TT_EVTOPTBHF24052 }
		hidden_tooltip = { 
			character_event = { id = HF.24054 days = 150 random = 150 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = { #Becoming Feared ruler (Religious II/Ruthless)
		name = EVTOPTCHF24052
		custom_tooltip = { text = TT_EVTOPTCHF24052 }
		hidden_tooltip = { 
			character_event = { id = HF.24055 days = 150 random = 150 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = { #Refuse event chain.
		name = EVTOPTDHF24052
		custom_tooltip = { text = TT_EVTOPTDHF24052 }
		ai_chance = { 
			factor = 30
		}
	}
}

#Branch 1: Benevolent or Family Bloodline paths.
character_event = {
	id = HF.24053
	title = EVTTITLEHF24052
	desc = EVTDESCHF24053
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_bloodlines
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Focus on personal accomplishments
		name = EVTOPTAHF24053
		custom_tooltip = { text = TT_EVTOPTAHF24053 }
		hidden_tooltip = { 
			character_event = { id = HF.24056 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = { #Focus on dynasty accomplishments
		name = EVTOPTBHF24053
		custom_tooltip = { text = TT_EVTOPTBHF24053 }
		piety = -100
		hidden_tooltip = { 
			character_event = { id = HF.24059 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
}
#Branch 2: Religious Study or Technological Bloodline paths.
character_event = {
	id = HF.24054
	title = EVTTITLEHF24052
	desc = EVTDESCHF24054
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_bloodlines
	}
	border = GFX_event_normal_frame_economy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Focus on increasing religious knowledge throughout the realm.
		name = EVTOPTAHF24054
		custom_tooltip = { text = TT_EVTOPTAHF24054 }
		hidden_tooltip = { 
			character_event = { id = HF.24062 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = { #Focus on technical advancements.
		name = EVTOPTBHF24054
		custom_tooltip = { text = TT_EVTOPTBHF24054 }
		hidden_tooltip = { 
			character_event = { id = HF.24065 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
}
#Branch 3: Religious Zealotry or Ruthless Bloodline paths.
character_event = {
	id = HF.24055
	title = EVTTITLEHF24052
	desc = EVTDESCHF24055
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_bloodlines
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { #Focus on pushing religion.
		name = EVTOPTAHF24055
		trigger = { 
			NOR = { 
				has_religion_feature = religion_cosmopolitan 
				has_religion_feature = religion_peaceful 
			} 
		}
		custom_tooltip = { text = TT_EVTOPTAHF24055 }
		hidden_tooltip = { 
			character_event = { id = HF.24068 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = { #Focus on extertion of loyalty from subjects.
		name = EVTOPTBHF24055
		custom_tooltip = { text = TT_EVTOPTBHF24055 }
		hidden_tooltip = { 
			character_event = { id = HF.24071 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
}

#Gaining Benevolent Bloodline.
#First Row. - Revising old realm laws to improve conditions of vassals and peasants.
character_event = {
	id = HF.24056
	title = EVTTITLEHF24056
	desc = EVTDESCHF24056
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_bloodlines
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special learning option. - Revise laws yourself.
	#Hire scholars to look at and revise old unfair laws.
	#Try revising old laws.
	#Dedicate more time to court hearings.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24056
		trigger = { 
			learning = 18 
		}
		tooltip_info = learning
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = arbitrary }
			remove_trait = arbitrary
		}
		hidden_tooltip = { 
			character_event = { id = HF.24057 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24056
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		if = { 
			limit = { trait = arbitrary }
			remove_trait = arbitrary
		}
		scaled_wealth = { value = -2 min = -500 max = -900 }
		prestige = -2000
		add_character_modifier = {
			name = forging_legend_revisiting_laws_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24057 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24056
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { trait = arbitrary }
			remove_trait = arbitrary
		}
		prestige = -1500
		add_character_modifier = {
			name = forging_legend_revisiting_laws_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24057 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24056
		trigger = { 
			NOT = { learning = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		if = { 
			limit = { trait = arbitrary }
			remove_trait = arbitrary
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		prestige = -900
		hidden_tooltip = { 
			character_event = { id = HF.24057 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24056
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Second Row.
#Peasants growing needy.
character_event = {
	id = HF.24057
	title = EVTTITLEHF24056
	desc = EVTDESCHF24057
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_bloodlines
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special diplomacy option. - Address the public.
	#Give into demands.
	#Ignore disobedience.
	#Address the public.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24057
		trigger = { 
			diplomacy = 18 
		}
		tooltip_info = diplomacy
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { NOT = { trait = charitable } }
			add_trait = charitable
		}
		add_character_modifier = {
			name = forging_legend_peasant_disobedience_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24058 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24057
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		if = { 
			limit = { NOT = { trait = charitable } }
			add_trait = charitable
		}
		prestige = -2000
		add_character_modifier = {
			name = forging_legend_peasant_disobedience_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24058 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24057
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		prestige = -1200
		hidden_tooltip = { 
			character_event = { id = HF.24058 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24057
		trigger = { 
			NOT = { diplomacy = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		prestige = -600
		add_character_modifier = {
			name = forging_legend_peasant_disobedience_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24058 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24057
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Benevolent Bloodline gained.
narrative_event = {
	id = HF.24058
	title = EVTTITLEHF24056
	desc = EVTDESCHF24058
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_bloodlines
	}
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { 
		name = EVTOPTAHF24058
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_benevolent }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = event_benevolent_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = event_benevolent_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Gaining the Family Bloodline.
#First Row. - Research family tree.
character_event = {
	id = HF.24059
	title = EVTTITLEHF24059
	desc = { 
		trigger = { 
			num_of_dynasty_members = 10
		} 
		text = EVTDESCAHF24059
	}
	desc = { 
		trigger = { 
			NOT = { num_of_dynasty_members = 10 } 
		} 
		text = EVTDESCBHF24059
	}
	picture = GFX_evt_library
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special learning option. - Research family tree yourself.
	#Hire scholars to look at family tree.
	#Focus on immediate family.
	#Try studying family tree.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24059
		trigger = { 
			learning = 18 
		}
		tooltip_info = learning
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = proud }
			remove_trait = proud
		}
		hidden_tooltip = { 
			character_event = { id = HF.24060 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24059
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		if = { 
			limit = { trait = proud }
			remove_trait = proud
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		scaled_wealth = { value = -6 min = -750 max = -1500 }
		prestige = -1000
		hidden_tooltip = { 
			character_event = { id = HF.24060 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24059
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { trait = proud }
			remove_trait = proud
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		prestige = -800
		hidden_tooltip = { 
			character_event = { id = HF.24060 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24059
		trigger = { 
			NOT = { learning = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		if = { 
			limit = { trait = proud }
			remove_trait = proud
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		prestige = -600
		hidden_tooltip = { 
			character_event = { id = HF.24060 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24059
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Second Row. - Focus on living family members.
character_event = {
	id = HF.24060
	title = EVTTITLEHF24059
	desc = { 
		trigger = { 
			num_of_dynasty_members = 10
		} 
		text = EVTDESCAHF24060
	}
	desc = { 
		trigger = { 
			NOT = { num_of_dynasty_members = 10 } 
		} 
		text = EVTDESCBHF24060
	}
	picture = GFX_evt_family
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special diplomacy option.
	#Complete dedication.
	#Partial dedication.
	#Minimal dedication.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24060
		trigger = { 
			diplomacy = 18 
		}
		tooltip_info = diplomacy
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = kind }
			add_trait = kind
		}
		add_character_modifier = {
			name = forging_legend_family_dedication_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24061 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24060
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		if = { 
			limit = { trait = kind }
			add_trait = kind
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		add_character_modifier = {
			name = forging_legend_family_dedication_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24061 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24060
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { trait = kind }
			add_trait = kind
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		add_character_modifier = {
			name = forging_legend_family_dedication_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24061 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24060
		trigger = { 
			NOT = { diplomacy = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		if = { 
			limit = { trait = kind }
			add_trait = kind
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		add_character_modifier = {
			name = forging_legend_family_dedication_3
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24061 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24060
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Family Bloodline gained.
narrative_event = {
	id = HF.24061
	title = EVTTITLEHF24059
	desc = { 
		trigger = { 
			num_of_dynasty_members = 10
		} 
		text = EVTDESCAHF24061
	}
	desc = { 
		trigger = { 
			NOT = { num_of_dynasty_members = 10 } 
		} 
		text = EVTDESCBHF24061
	}
	picture = GFX_evt_family
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { 
		name = EVTOPTAHF24061
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no 
				this_has_super_cool_nickname_trigger = no 
				is_female = no
			}
			ROOT = { give_nickname = nick_the_grand_patriarch }
		}
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no 
				this_has_super_cool_nickname_trigger = no 
				is_female = yes
			}
			ROOT = { give_nickname = nick_the_grand_matriarch }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = event_family_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = event_family_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Gaining the Theologian Bloodline.
#First Row. - Research dogma.
character_event = {
	id = HF.24062
	title = EVTTITLEHF24062
	desc  = EVTDESCAHF24062
	picture = GFX_evt_library
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special learning option. - Lead research yourself.
	#Hire famous scholars.
	#Hire regular scholars.
	#Try private research.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24062
		trigger = { 
			learning = 18 
		}
		tooltip_info = learning
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = cynical }
			remove_trait = cynical
		}
		hidden_tooltip = { 
			character_event = { id = HF.24063 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24062
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		scaled_wealth = { value = -5 min = -750 max = -1500 }
		piety = -600
		hidden_tooltip = { 
			character_event = { id = HF.24063 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24062
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { trait = cynical }
			remove_trait = cynical
		}
		scaled_wealth = { value = -5 min = -500 max = -1000 }
		piety = -300
		hidden_tooltip = { 
			character_event = { id = HF.24063 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24062
		trigger = { 
			NOT = { learning = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		scaled_wealth = { value = -5 min = -250 max = -500 }
		piety = -500
		hidden_tooltip = { 
			character_event = { id = HF.24063 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24062
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Second Row. - Discredit opposition.
character_event = {
	id = HF.24063
	title = EVTTITLEHF24062
	desc  = EVTDESCAHF24063
	picture = GFX_evt_church_council
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special intrigue option.
	#Hire good debaters.
	#Hire regular debaters.
	#Hire slanderers.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24063
		trigger = { 
			intrigue = 18 
		}
		tooltip_info = intrigue
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		religion_authority = {
			modifier = theology_debates
			years = 100
		}
		hidden_tooltip = { 
			character_event = { id = HF.24064 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24063
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		scaled_wealth = { value = -5 min = -750 max = -1500 }
		religion_authority = {
			modifier = theology_debates
			years = 100
		}
		add_character_modifier = {
			name = forging_legend_religious_squabble_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24064 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24063
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		add_character_modifier = {
			name = forging_legend_religious_squabble_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24064 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24063
		trigger = { 
			NOT = { intrigue = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		add_character_modifier = {
			name = forging_legend_religious_squabble_2
			years = 5
		}
		piety = -300
		hidden_tooltip = { 
			character_event = { id = HF.24064 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24063
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}
#Theologian Bloodline gained.
narrative_event = {
	id = HF.24064
	title = EVTTITLEHF24062
	desc = EVTDESCAHF24064
	picture = GFX_evt_church_council
	border = GFX_event_narrative_frame_religion
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { 
		name = EVTOPTAHF24064
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_theologian }
		}
		if = { 
			limit = { religion_group = christian }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_01
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_01
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = muslim }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_02
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_02
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = jewish_group }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_03
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_03
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = pagan_group }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_04
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_04
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = zoroastrian_group }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_05
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_05
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = indian_group }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_06
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_peaceful_bloodline_06
					inheritance = matrilineal
				}		
			}
		}
		set_bloodline_founder_religion_flag_effect = yes
		ai_chance = { 
			factor = 100
		}
	}
}

#Gaining Technology Bloodline.
#First Row. - Find artists and philosophers.
character_event = {
	id = HF.24065
	title = EVTTITLEHF24065
	desc  = EVTDESCAHF24065
	picture = GFX_evt_library
	border = GFX_event_normal_frame_economy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special stewardship option. - Lead research yourself.
	#Scour foreign lands.
	#Scour homeland.
	#Try private research.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24065
		trigger = { 
			stewardship = 18 
		}
		tooltip_info = stewardship
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = dull }
			remove_trait = dull
		}
		add_character_modifier = {
			name = forging_legend_searching_philosophers_3
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24066 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24065
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		scaled_wealth = { value = -5 min = -350 max = -750 }
		add_character_modifier = {
			name = forging_legend_searching_philosophers_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24066 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24065
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { trait = dull }
			remove_trait = dull
		}
		scaled_wealth = { value = -5 min = -250 max = -500 }
		add_character_modifier = {
			name = forging_legend_searching_philosophers_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24066 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24065
		trigger = { 
			NOT = { stewardship = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		add_character_modifier = {
			name = forging_legend_searching_philosophers_3
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24066 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24065
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Second Row. - Build infrastructure.
character_event = {
	id = HF.24066
	title = EVTTITLEHF24065
	desc  = EVTDESCAHF24066
	picture = GFX_evt_busy_trading_dock_republic
	border = GFX_event_normal_frame_economy
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special stewardship option. - Lead construction efforts.
	#Grandiose library.
	#Research study.
	#Host within own palace.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24066
		trigger = { 
			stewardship = 18 
		}
		tooltip_info = stewardship
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = dull }
			remove_trait = dull
		}
		add_character_modifier = {
			name = forging_legend_building_infrastructure_3
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24067 days = 150 random = 250 } 
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24066
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		add_character_modifier = {
			name = forging_legend_building_infrastructure_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24067 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24066
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		add_character_modifier = {
			name = forging_legend_building_infrastructure_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24067 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24066
		trigger = { 
			NOT = { stewardship = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		add_character_modifier = {
			name = forging_legend_searching_philosophers_3
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24067 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24066
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Technology Bloodline gained.
narrative_event = {
	id = HF.24067
	title = EVTTITLEHF24065
	desc = EVTDESCAHF24067
	picture = GFX_evt_victory_arch_byzantine
	border = GFX_event_narrative_frame_economy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { 
		name = EVTOPTAHF24067
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_philosopher }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = event_technology_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = event_technology_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}


#Gaining Zealot Bloodline.
#First Row. - Find spread fervor.
character_event = {
	id = HF.24068
	title = EVTTITLEHF24068
	desc  = EVTDESCAHF24068
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special diplomacy option. - Lead proselytizing effort.
	#Exert influence over priesthood.
	#Exert some influence over priesthood.
	#Lead proselytizing effort.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24068
		trigger = { 
			diplomacy = 18 
		}
		tooltip_info = diplomacy
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = cynical }
			remove_trait = cynical
		}
		add_character_modifier = {
			name = forging_legend_building_zealotry_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24069 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24068
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		if = { 
			limit = { trait = cynical }
			remove_trait = cynical
		}
		piety = -400
		hidden_tooltip = { 
			character_event = { id = HF.24069 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24068
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { trait = cynical }
			remove_trait = cynical
		}
		piety = -200
		hidden_tooltip = { 
			character_event = { id = HF.24069 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24068
		trigger = { 
			NOT = { diplomacy = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		add_character_modifier = {
			name = forging_legend_building_zealotry_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24069 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24068
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Second Row. - Control crafts.
character_event = {
	id = HF.24069
	title = EVTTITLEHF24068
	desc  = EVTDESCBHF24069
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special stewardship option. - Lead censorship effort.
	#Hire inquisitors.
	#Hire some inquisitors.
	#Lead censorship effort.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24069
		trigger = { 
			stewardship = 18 
		}
		tooltip_info = stewardship
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = cynical }
			remove_trait = cynical
		}
		add_character_modifier = {
			name = forging_legend_censoring_arts_3
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24070 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24069
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		if = { 
			limit = { trait = cynical }
			remove_trait = cynical
		}
		scaled_wealth = { value = -5 min = -350 max = -750 }
		add_character_modifier = {
			name = forging_legend_censoring_arts_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24070 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24069
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { trait = cynical }
			remove_trait = cynical
		}
		scaled_wealth = { value = -5 min = -250 max = -500 }
		add_character_modifier = {
			name = forging_legend_censoring_arts_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24070 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24069
		trigger = { 
			NOT = { stewardship = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		scaled_wealth = { value = -5 min = -150 max = -350 }
		add_character_modifier = {
			name = forging_legend_censoring_arts_3
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24070 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24069
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Zealot Bloodline gained.
narrative_event = {
	id = HF.24070
	title = EVTTITLEHF24068
	desc = EVTDESCAHF24070
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_narrative_frame_religion
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { 
		name = EVTOPTAHF24070
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_zealot }
		}
		if = { 
			limit = { religion_group = christian }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_01
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_01
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = muslim }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_02
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_02
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = jewish_group }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_03
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_03
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = pagan_group }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_04
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_04
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = zoroastrian_group }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_05
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_05
					inheritance = matrilineal
				}		
			}
		}
		else_if = { 
			limit = { religion_group = indian_group }
			if = { 
				limit = { is_female = no }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_06
				}		
			}
			if = { 
				limit = { is_female = yes }
				create_bloodline = {
					type = event_religion_aggressive_bloodline_06
					inheritance = matrilineal
				}		
			}
		}
		set_bloodline_founder_religion_flag_effect = yes
		ai_chance = { 
			factor = 100
		}
	}
}

#Gaining Ruthless Bloodline.
#First Row. - Stricter Laws.
character_event = {
	id = HF.24071
	title = EVTTITLEHF24071
	desc = EVTDESCHF24071
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_bloodlines
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special learning option. - Revise laws yourself.
	#Hire scholars to look at and revise old laws.
	#Try revising old laws.
	#Dedicate more time to court hearings.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24071
		trigger = { 
			learning = 18 
		}
		tooltip_info = learning
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { trait = arbitrary }
			remove_trait = arbitrary
		}
		hidden_tooltip = { 
			character_event = { id = HF.24072 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24071
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		if = { 
			limit = { trait = arbitrary }
			remove_trait = arbitrary
		}
		scaled_wealth = { value = -2 min = -350 max = -600 }
		prestige = -1000
		add_character_modifier = {
			name = forging_legend_revisiting_laws_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24072 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24071
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { trait = arbitrary }
			remove_trait = arbitrary
		}
		prestige = -800
		add_character_modifier = {
			name = forging_legend_revisiting_laws_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24072 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24071
		trigger = { 
			NOT = { learning = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		if = { 
			limit = { trait = arbitrary }
			remove_trait = arbitrary
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		prestige = -600
		hidden_tooltip = { 
			character_event = { id = HF.24072 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24071
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Second Row. - Deal with protests.
character_event = {
	id = HF.24072
	title = EVTTITLEHF24071
	desc = EVTDESCHF24072
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_lunatic
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}

	#Special intrigue option. - Dissenters disappear.
	#Martial law, burned villages.
	#Hire troops to deal with peasants.
	#Ignore protesters.
	#Abandon quest for Bloodline.
	
	option = { 
		name = EVTOPTAHF24072
		trigger = { 
			intrigue = 18 
		}
		tooltip_info = intrigue
		custom_tooltip = { text = TT_EVTOPTAHF24056 }
		if = { 
			limit = { NOT = { trait = cruel } }
			add_trait = cruel
		}
		hidden_tooltip = { 
			character_event = { id = HF.24073 days = 150 random = 250 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTBHF24072
		custom_tooltip = { text = TT_EVTOPTBHF24056 }
		if = { 
			limit = { NOT = { trait = cruel } }
			add_trait = cruel
		}
		prestige = -1000
		add_character_modifier = {
			name = forging_legend_martial_law_1
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24073 days = 500 random = 500 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTCHF24072
		custom_tooltip = { text = TT_EVTOPTCHF24056 }
		if = { 
			limit = { NOT = { trait = cruel } }
			add_trait = cruel
		}
		scaled_wealth = { value = -2 min = -350 max = -600 }
		hidden_tooltip = { 
			character_event = { id = HF.24073 days = 1000 random = 1000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTDHF24072
		trigger = { 
			NOT = { intrigue = 18 }
		}
		custom_tooltip = { text = TT_EVTOPTDHF24056 }
		if = { 
			limit = { NOT = { trait = cruel } }
			add_trait = cruel
		}
		if = { 
			limit = { NOT = { trait = stressed } }
			add_trait = stressed
		}
		else_if = { 
			limit = { trait = stressed }
			health = -0.5
		}
		prestige = -600
		add_character_modifier = {
			name = forging_legend_martial_law_2
			years = 5
		}
		hidden_tooltip = { 
			character_event = { id = HF.24073 days = 2000 random = 2000 }
		}
		ai_chance = { 
			factor = 30
		}
	}
	option = {
		name = EVTOPTEHF24072
		custom_tooltip = { text = TT_EVTOPTEHF24056 }
		if = { 
			limit = {
				NOT = { trait = content }
			}
			random = {
				chance = 25
				add_trait = content
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

#Ruthless Bloodline gained.
narrative_event = {
	id = HF.24073
	title = EVTTITLEHF24071
	desc = EVTDESCAHF24073
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					religion = norse_pagan
				}
			} 
		} 
		picture = GFX_evt_lunatic
	}
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
		has_ambition = obj_forge_bloodline
	}
	
	option = { 
		name = EVTOPTAHF24073
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no 
				this_has_super_cool_nickname_trigger = no 
			}
			ROOT = { give_nickname = nick_the_ruthless }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = event_ruthless_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = event_ruthless_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

########################################################
# Custom Bloodlines Special effects

#Murder Child
#On_childhood pulse: Ward is bored. 
character_event = {
	id = HF.24100
	desc = EVTDESCAHF24100
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	min_age = 12
	max_age = 16

	prisoner = no
	capable_only = yes

	trigger = { 
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_murder_child
		}
		intrigue = 3
		NOR = { 
			trait = incapable
			trait = maimed
			trait = mangled
			trait = kind
			trait = idolizer
			trait = affectionate
		}
		OR = { 
			trait = cruel
			trait = deceitful
			trait = brooding
			trait = haughty
		}
		OR = { 
			AND = { 
				educator = {
					is_alive = yes
					prisoner = no
				}
				educator = {
					NOR = {
						is_close_relative = ROOT
						trait = incapable
						is_inaccessible_trigger = yes
						reverse_opinion = { who = ROOT value = 50 }
					}
				}
			}
			AND = { 
				guardian = {
					is_alive = yes
					prisoner = no
				}
				guardian = {
					NOR = {
						is_close_relative = ROOT
						trait = incapable
						is_inaccessible_trigger = yes
						reverse_opinion = { who = ROOT value = 50 }
					}
				}
			}
		}
	}

	immediate = {
		if = {
			limit = {
				guardian = {
					is_alive = yes
					prisoner = no
				}
				guardian = {
					NOR = {
						is_close_relative = ROOT
						trait = incapable
						is_inaccessible_trigger = yes
						reverse_opinion = { who = ROOT value = 50 }
					}
				}
			}
			guardian = { save_event_target_as = scoped_guardian }
		}
		else_if = {
			limit = {
				educator = {
					is_alive = yes
					prisoner = no
				}
				educator = {
					NOR = {
						is_close_relative = ROOT
						trait = incapable
						is_inaccessible_trigger = yes
						reverse_opinion = { who = ROOT value = 50 }
					}
				}
			}
			educator = { save_event_target_as = scoped_guardian }
		}
	}
	
	option = {
		name = EVTOPTAHF24100
		custom_tooltip = { text = TT_EVTOPTAHF24100 }
		random = { 
			chance = 50 
			change_intrigue = 1
		}
		hidden_tooltip = {
			event_target:scoped_guardian = {
				character_event = { id = HF.24101 }
			}
		}
	}
	option = {
		name = EVTOPTBHF24100
		custom_tooltip = { text = TT_EVTOPTBHF24100 }
	}
}

#Educator receives event.
character_event = {
	id = HF.24101
	desc = EVTDESCAHF24101
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24101
		trigger = { trait = strong }
		tooltip_info = strong
		hidden_tooltip = {
			FROM = {
				character_event = { id = HF.24102 }
			}
		}
	}
	option = {
		name = EVTOPTAHF24101
		trigger = { trait = robust }
		tooltip_info = robust
		hidden_tooltip = {
			FROM = {
				character_event = { id = HF.24102 }
			}
		}
	}
	option = {
		name = EVTOPTBHF24101
		trigger = { intrigue = 16 }
		tooltip_info = intrigue
		hidden_tooltip = {
			FROM = {
				character_event = { id = HF.24102 }
			}
		}
	}
	option = {
		name = EVTOPTCHF24101
		hidden_tooltip = { FROM = { character_event = { id = HF.24103 } } }
		hidden_tooltip = { 
			if = { 
				limit = { 
					FROM = { NOT = { is_liege_of = ROOT } }
				}
				liege = { character_event = { id = HF.24104 } }
			}
		}
		death = { death_reason = death_murder_unknown killer = FROM }
	}
}

#Child was busted.
character_event = {
	id = HF.24102
	desc = EVTDESCAHF24102
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24102
		tiered_prestige_negative_effect = yes
	}
}

#Child notified of success.
character_event = {
	id = HF.24103
	desc = EVTDESCAHF24103
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24103
		tiered_prestige_reward_effect = yes
	}
}

#Liege notified of child's success.
character_event = {
	id = HF.24104
	desc = EVTDESCAHF24104
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24104
		trigger = { dynasty = FROMFROM }
	}
	option = {
		name = EVTOPTBHF24104
		trigger = { NOT = { dynasty = FROMFROM } }
	}
}
###################

#Executing people by adding them to the Macabre Banquet.
character_event = {
	id = HF.24105
	desc = EVTDESCHF24105
	picture = GFX_evt_feast_hf
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24105
	}
}

# Killed by macabre banquet (generic executions)
character_event = {
	id = HF.24106
	desc = EVTDESCHF24106
	picture = GFX_evt_feast_hf
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24106
		death = {
			death_reason = death_execution_macabre_banquet
			killer = FROMFROM
		}
	}
}

###################

#Murder deflection
character_event = {
	id = HF.24107
	desc = EVTDESCHF24107
	picture = GFX_evt_meeting_hf
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24107
		trigger = {
			OR = {
				trait = kinslayer
				trait = familial_kinslayer
				trait = dynastic_kinslayer
				trait = tribal_kinslayer
			}
		}
		if = {
			limit = {
				intrigue = 15
			}
			if = {
				limit = {
					trait = kinslayer
				}
				prestige = -500
				remove_trait = kinslayer
			}
			if = {
				limit = {
					trait = familial_kinslayer
				}
				prestige = -250
				remove_trait = familial_kinslayer
			}
			if = {
				limit = {
					trait = dynastic_kinslayer
				}
				prestige = -150
				remove_trait = dynastic_kinslayer
			}
			if = {
				limit = {
					trait = tribal_kinslayer
				}
				prestige = -150
				remove_trait = tribal_kinslayer
			}
		}
		else = {
			if = {
				limit = {
					trait = kinslayer
				}
				prestige = -1000
				remove_trait = kinslayer
			}
			if = {
				limit = {
					trait = familial_kinslayer
				}
				prestige = -500
				remove_trait = familial_kinslayer
			}
			if = {
				limit = {
					trait = dynastic_kinslayer
				}
				prestige = -300
				remove_trait = dynastic_kinslayer
			}
			if = {
				limit = {
					trait = tribal_kinslayer
				}
				prestige = -300
				remove_trait = tribal_kinslayer
			}
		}
	}
	option = {
		name = EVTOPTBHF24107
		trigger = {
			has_character_modifier = known_murderer
		}
		if = {
			limit = {
				intrigue = 15
			}
			prestige = -500
			remove_character_modifier = known_murderer
		}
		else = {
			prestige = -750
			remove_character_modifier = known_murderer
		}
	}
	option = {
		name = EVTOPTCHF24107
		trigger = {
			OR = {
				has_character_modifier = vicious_rumors
				has_character_modifier = vicious_rumors_2
			}
		}
		if = {
			limit = {
				intrigue = 15
			}
			if = {
				limit = {
					has_character_modifier = vicious_rumors_2
				}
				prestige = -250
				remove_character_modifier = vicious_rumors_2
			}
			if = {
				limit = {
					has_character_modifier = vicious_rumors
				}
				prestige = -150
				remove_character_modifier = vicious_rumors
			}
		}
		else = {
			if = {
				limit = {
					has_character_modifier = vicious_rumors_2
				}
				prestige = -500
				remove_character_modifier = vicious_rumors_2
			}
			if = {
				limit = {
					has_character_modifier = vicious_rumors
				}
				prestige = -300
				remove_character_modifier = vicious_rumors
			}
		}
	}
	option = {
		name = EVTOPTDHF24107
		hidden_tooltip = {
			remove_character_modifier = deflection_decision_cooldown
		}
		break = yes
	}
	after = { #After-effects
		hidden_tooltip = {
			random_list = {
				#Stress
				#Paranoia
				#Deceit
				#Cruelty
				#Lunacy
				250 = {}
				10 = {
					trigger = {
						NOT = {
							trait = stressed
						}
					}
					character_event = { id = HF.24108 days = 25 random = 25 }
				}
				10 = {
					trigger = {
						NOT = {
							trait = paranoid
						}
					}
					character_event = { id = HF.24109 days = 25 random = 25 }
				}
				10 = {
					trigger = {
						NOT = {
							trait = deceitful
						}
					}
					character_event = { id = HF.24110 days = 25 random = 25 }
				}
				10 = {
					trigger = {
						NOT = {
							trait = cruel
						}
					}
					character_event = { id = HF.24111 days = 25 random = 25 }
				}
				1 = {
					trigger = {
						NOT = {
							trait = lunatic
						}
					}
					character_event = { id = HF.24112 days = 25 random = 25 }
				}
			}
		}
	}
}

#Ruler beomes stressed.
character_event = {
	id = HF.24108
	desc = EVTDESCHF24108
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24108
		if = {
			limit = {
				trait = stressed
			}
			health = -0.5
		}
		else_if = {
			limit = {
				NOT = { trait = stressed }
			}
			add_trait = stressed
		}
	}
}
#Ruler beomes paranoid.
character_event = {
	id = HF.24109
	desc = EVTDESCHF24109
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24109
		if = {
			limit = {
				trait = paranoid
			}
			health = -0.5
		}
		else_if = {
			limit = {
				NOT = { trait = paranoid }
			}
			add_trait = paranoid
		}
	}
}
#Ruler beomes deceitful.
character_event = {
	id = HF.24110
	desc = EVTDESCHF24110
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24110
		if = {
			limit = {
				trait = deceitful
			}
			change_intrigue = 1
		}
		else_if = {
			limit = {
				NOT = { trait = deceitful }
			}
			add_trait = deceitful
		}
	}
}
#Ruler beomes cruel.
character_event = {
	id = HF.24111
	desc = EVTDESCHF24111
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24111
		if = {
			limit = {
				trait = cruel
			}
			change_intrigue = 1
		}
		else_if = {
			limit = {
				NOT = { trait = cruel }
			}
			add_trait = cruel
		}
	}
}
#Ruler beomes lunatic.
character_event = {
	id = HF.24112
	desc = EVTDESCHF24112
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24112
		if = {
			limit = {
				trait = lunatic
			}
			health = -0.5
		}
		else_if = {
			limit = {
				NOT = { trait = lunatic }
			}
			add_trait = lunatic
		}
	}
}


#Plotter sees an opportunity - assassinate
character_event = {
	id = HF.24113
	desc = EVTDESCHF24113
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue
	
	is_part_of_plot = yes
	capable_only = yes
	prisoner = no
	
	trigger = {
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_murder_stalk 
		}
		OR = {
			has_plot = plot_kill_character
			has_plot = plot_kill_spouse
		}
		plot_target_char = {
			OR = {
				at_location = ROOT
				ROOT = { is_inaccessible_trigger = no }
			}
			age = 16
			NOR = {
				is_inaccessible_trigger = yes
				trait = incapable
				prisoner = yes
			}
		}
		NOT = { has_character_flag = murder_in_motion }
	}
	
	mean_time_to_happen = {
		months = 3000

		modifier = {
			factor = 0.9
			plot_power = 0.1
		}
		modifier = {
			factor = 0.9
			plot_power = 0.2
		}
		modifier = {
			factor = 0.9
			plot_power = 0.3
		}
		modifier = {
			factor = 0.8
			plot_power = 0.4
		}
		modifier = {
			factor = 0.8
			plot_power = 0.5
		}
		modifier = {
			factor = 0.8
			plot_power = 0.6
		}
		modifier = {
			factor = 0.8
			plot_power = 0.7
		}
		modifier = {
			factor = 0.8
			plot_power = 0.8
		}
		modifier = {
			factor = 0.7
			plot_power = 0.9
		}
		modifier = {
			factor = 0.7
			plot_power = 1.0
		}
		modifier = {
			factor = 0.6
			plot_power = 1.5
		}
		modifier = {
			factor = 0.5
			plot_power = 2.0
		}
		modifier = {
			factor = 0.9
			intrigue = 10
		}
		modifier = {
			factor = 0.9
			intrigue = 12
		}
		modifier = {
			factor = 0.9
			intrigue = 14
		}
		modifier = {
			factor = 0.8
			intrigue = 16
		}
		modifier = {
			factor = 0.7
			intrigue = 18
		}
		modifier = {
			factor = 0.6
			intrigue = 20
		}
	}
	
	immediate = {
		plot_target_char = { save_event_target_as = plot_target }
		save_event_target_as = assassin_plot_owner
	}
	
	#Do it
	option = {
		name = EVTOPTAHF24113
		custom_tooltip = { text = EVTOPTA_HF24113_TOOLTIP }
		hidden_effect = { 
			event_target:plot_target = { character_event = { id = HF.24114 days = 7 } } 
			set_character_flag = murder_in_motion
		}
	}

	#Wait
	option = {
		name = EVTOPTBHF24113
		custom_tooltip = { text = EVTOPTB_HF24113_TOOLTIP }
	}
}

#Assassination attempt
character_event = {
	id = HF.24114
	desc = EVTDESCHF24114
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	hide_from = yes


	option = {
		name = EVTOPTAHF24114

		event_target:assassin_plot_owner = { clr_character_flag = murder_in_motion }

		hidden_effect = {
			random_list = {
				60  = { #Die
					random_list = {
						75 = {	#Not discovered
							modifier = {
								event_target:assassin_plot_owner = { intrigue = 12 }
								factor = 1.5
							}
							modifier = {
								event_target:assassin_plot_owner = { intrigue = 15 }
								factor = 1.5
							}
							character_event = { id = HF.24115 days = 3 }
						}
						25 = {	#Discovered
							modifier = {
								event_target:assassin_plot_owner = { NOT = { intrigue = 8 } }
								factor = 1.5
							}
							modifier = {
								event_target:assassin_plot_owner = { NOT = { intrigue = 5 } }
								factor = 1.5
							}
							character_event = { id = HF.24118 days = 3 }
							event_target:assassin_plot_owner = { character_event = { id = 10 } }
						}
					}
					modifier = {
						factor = 1.3
						FROM = { attribute_diff = { character = ROOT attribute = intrigue value = 2 } }
					}
					modifier = {
						factor = 1.3
						FROM = { attribute_diff = { character = ROOT attribute = intrigue value = 4 } }
					}
					modifier = {
						factor = 1.3
						FROM = { attribute_diff = { character = ROOT attribute = intrigue value = 6 } }
					}
					modifier = {
						factor = 1.3
						FROM = { combat_rating_diff = { character = ROOT value = 10 } }
					}
					modifier = {
						factor = 1.3
						FROM = { combat_rating_diff = { character = ROOT value = 20 } }
					}
					modifier = {
						factor = 1.3
						FROM = { combat_rating_diff = { character = ROOT value = 30 } }
					}
				}
				40 = { #Survive
					random_list = {
						50 = {	#Not discovered
							modifier = {
								event_target:assassin_plot_owner = { intrigue = 12 }
								factor = 1.5
							}
							modifier = {
								event_target:assassin_plot_owner = { intrigue = 15 }
								factor = 1.5
							}
							character_event = { id = HF.24121 days = 3 }
						}
						25 = {	#Discovered and wounded
							modifier = {
								event_target:assassin_plot_owner = { NOT = { intrigue = 8 } }
								factor = 1.5
							}
							modifier = {
								event_target:assassin_plot_owner = { NOT = { intrigue = 5 } }
								factor = 1.5
							}
							character_event = { id = HF.24124 days = 3 }
							event_target:assassin_plot_owner = { character_event = { id = 11 } }
						}
						25 = { #Killed assailant
							modifier = {
								factor = 1.3
								combat_rating_diff = { character = event_target:assassin_plot_owner value = 10 }
							}
							modifier = {
								factor = 1.3
								combat_rating_diff = { character = event_target:assassin_plot_owner value = 20 }
							}
							modifier = {
								factor = 1.3
								combat_rating_diff = { character = event_target:assassin_plot_owner value = 30 }
							}
							character_event = { id = HF.24127 days = 3 }
							event_target:assassin_plot_owner = { character_event = { id = 11 } }
						}
					}	
					modifier = {
						factor = 1.3
						attribute_diff = { character = event_target:assassin_plot_owner attribute = intrigue value = 2 }
					}
					modifier = {
						factor = 1.3
						attribute_diff = { character = event_target:assassin_plot_owner attribute = intrigue value = 4 }
					}
					modifier = {
						factor = 1.3
						attribute_diff = { character = event_target:assassin_plot_owner attribute = intrigue value = 6 }
					}
					modifier = {
						factor = 1.3
						combat_rating_diff = { character = event_target:assassin_plot_owner value = 10 }
					}
					modifier = {
						factor = 1.3
						combat_rating_diff = { character = event_target:assassin_plot_owner value = 20 }
					}
					modifier = {
						factor = 1.3
						combat_rating_diff = { character = event_target:assassin_plot_owner value = 30 }
					}
				}
			}
		}
	}
}

#Plot target dies, undiscovered
character_event = {
	id = HF.24115
	desc = EVTDESCHF24115
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTAHF24115
		tooltip = { death = { death_reason = death_murder_unknown killer = event_target:assassin_plot_owner } }
		hidden_effect = {
			event_target:assassin_plot_owner = { character_event = { id = HF.24116 } }
		}
	}
}

#Assassin notified of "Plot target dies, undiscovered"
character_event = {
	id = HF.24116
	desc = EVTDESCHF24116
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue
	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24116
		FROM = { death = { death_reason = death_murder_unknown killer = event_target:assassin_plot_owner } } 
		#If quest holder, clear quest and reward
		if = {
			limit = {
				society_member_of = the_assassins
				has_quest = quest_the_assassins_assassination
				quest_target = { character = event_target:plot_target }
			}
			clr_quest = quest_the_assassins_assassination
			sound_effect = assassins_assassinate_character

			if = {
				limit = { event_target:plot_target = { higher_tier_than = DUKE } }
				add_society_currency_major_effect = yes
			}
			if = {
				limit = { event_target:plot_target = { tier = DUKE } } 
				add_society_currency_medium_effect = yes
			}
			if = {
				limit = { event_target:plot_target = { lower_tier_than = DUKE } }
				add_society_currency_minor_effect = yes
			}
		}
		clr_character_flag = murder_in_motion
	}
}


#Plot target dies, discovered
character_event = {
	id = HF.24118
	desc = EVTDESCHF24118
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTAHF24118

		tooltip = { death = { death_reason = death_murder killer = event_target:assassin_plot_owner } }

		hidden_effect = {
			event_target:assassin_plot_owner = { character_event = { id = HF.24119 } }
		}
	}
}

#Assassin notified of "Plot target dies, discovered"
character_event = {
	id = HF.24119
	desc = EVTDESCHF24119
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24119
		FROM = { death = { death_reason = death_murder killer = event_target:assassin_plot_owner } }
		#If quest holder, clear quest and reward
		if = {
			limit = {
				society_member_of = the_assassins
				has_quest = quest_the_assassins_assassination
				quest_target = { character = event_target:plot_target }
			}
			clr_quest = quest_the_assassins_assassination
			sound_effect = assassins_assassinate_character

			if = {
				limit = { event_target:plot_target = { higher_tier_than = DUKE } }
				add_society_currency_major_effect = yes
			}
			if = {
				limit = { event_target:plot_target = { tier = DUKE } } 
				add_society_currency_medium_effect = yes
			}
			if = {
				limit = { event_target:plot_target = { lower_tier_than = DUKE } }
				add_society_currency_minor_effect = yes
			}
		}
		clr_character_flag = murder_in_motion
	}
}

#Plot target survives, undiscovered
character_event = {
	id = HF.24121
	desc = EVTDESCHF24121
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTAHF24121

		hidden_effect = {
			event_target:assassin_plot_owner = { character_event = { id = HF.24122 } }
		}
	}
}

#Assassin notified of "Plot target survives, undiscovered"
character_event = {
	id = HF.24122
	desc = EVTDESCHF24122
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24122
	}
}

#Plot target survives, wounded
character_event = {
	id = HF.24124
	desc = EVTDESCHF24124
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24124

		random_list = {
			70 = {
				event_target:assassin_plot_owner = { 
					tooltip = { add_trait = wounded }
					set_character_flag = assassin_wounded
				}
			}
			30 = {
				event_target:assassin_plot_owner = {
					tooltip = { add_maimed_trait_effect = yes }
					set_character_flag = assassin_maimed
				}
			}
		}

		hidden_effect = {
			event_target:assassin_plot_owner = { character_event = { id = HF.24125 } }
		}
	}
}

#Assassin notified of "Plot target survives, wounded"
character_event = {
	id = HF.24125
	desc = EVTDESCHF24125
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24124
		if = {
			limit = { has_character_flag = assassin_wounded }
			add_trait_wounded_effect = yes
			clr_character_flag = assassin_wounded
		}
		if = {
			limit = { has_character_flag = assassin_maimed }
			add_maimed_trait_effect = yes
			clr_character_flag = assassin_maimed
		}
		clr_character_flag = murder_in_motion
	}
}

#Plot target survives, killed
character_event = {
	id = HF.24127
	desc = EVTDESCHF24127
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue


	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24127
		tooltip = { event_target:assassin_plot_owner = { death = { death_reason = death_battle killer = event_target:plot_target } } }

		hidden_effect = {
			event_target:assassin_plot_owner = { character_event = { id = HF.24128 } }
		}
	}
}

#Assassin notified of "Plot target survives, killed"
character_event = {
	id = HF.24128
	desc = EVTDESCHF24128
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_cornered_duel_hf
	}
	picture = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_slit_throat_hf
	}
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24128
		death = { death_reason = death_battle killer = event_target:plot_target } 
	}
}

# Knight Bloodline
# Bards/Knights arriving at court.
character_event = { 
	id = HF.24129
	hide_window = yes
	
	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		piety = 50
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_knights
			founder = {
				NOT = {
					character = ROOT
				}
				religion_group = christian
			}
		}
	}
	
	immediate = {
		random_list = {
			60 = { #Knight
				character_event = { id = HF.24130 }
			}
			60 = { #Bard
				character_event = { id = HF.24131 }
			}
			80 = {
				modifier = {
					factor = 3
					ai = yes
				}
				modifier = {
					factor = 1.35
					NOT = {
						higher_tier_than = COUNT
					}
				}
				modifier = {
					factor = 1.35
					NOT = {
						higher_tier_than = DUKE
					}
				}
				modifier = {
					factor = 1.75
					is_evil_trigger = yes
				}
				modifier = {
					factor = 0.65
					is_benevolent_trigger = yes
				}
				modifier = {
					factor = 1.35
					any_courtier_or_vassal = {
						count = 2
						has_bloodline_flag = bloodline_knights
					}
				}
				modifier = {
					factor = 1.35
					any_courtier_or_vassal = {
						count = 3
						has_bloodline_flag = bloodline_knights
					}
				}
			}
		}
	}
}

character_event = { # Knight character arrives
	id = HF.24130
	desc = EVTDESCHF24130
	picture = GFX_evt_western_knights_byzantine
	border = GFX_event_normal_frame_war

	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16
	
	immediate = {
		spawn_fantastic_commander_effect = yes
		event_target:invited_character = {
			set_character_flag = bloodline_great_hero
			set_character_flag = hero_knight
			remove_trait = cruel
			remove_trait = craven
			add_trait = kind
			add_trait = cavalry_leader
		}
	}
	
	option = {
		name = EVTOPTAHF24130
		
		trigger = {
			OR = { 
				NOT = { ROOT = { has_law = succ_byzantine_elective } }  #Either not Imperial...
				NOT = { #...Or there are no valid vassal candidates that can be commanders.
					any_vassal = { 
						higher_real_tier_than = BARON
						NOT = { 
							primary_title = { temporary = yes } 
						}
						OR = {
							AND = {
								OR = {
									male_can_hold_minor_title_trigger = yes
									female_can_hold_minor_commander_title_trigger = yes
								}
								OR = {
									NOT = { religion = hindu }
									trait = kshatriya
								}
								is_adult = yes
							}
							has_character_flag = special_marshal
						}
				
						prisoner = no
						NOT = { trait = incapable }
						NOT = { is_inaccessible_trigger = yes }
						NOT = { has_character_flag = guru }
						NOT = { has_character_modifier = refusing_to_lead }
						NOR = {
							has_job_title = job_chancellor
							has_job_title = job_marshal
							has_job_title = job_treasurer
							has_job_title = job_spymaster
							has_job_title = job_spiritual
							has_minor_title = title_commander
						}
					} 
				}
			}
			any_realm_character = {
				NOT = {
					higher_tier_than = BARON
				}
				liege = { character = ROOT }
				has_minor_title = title_commander
				NOT = {
					martial = 12
				}
			}
			OR = {
				AND = {
					tier = COUNT
					any_realm_character = {
						count = 2
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = DUKE
					any_realm_character = {
						count = 4
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = KING
					is_nomadic = no
					any_realm_character = {
						count = 6
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = EMPEROR
					is_nomadic = no
					any_realm_character = {
						count = 8
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = KING
					is_nomadic = yes
					any_realm_character = {
						count = 2
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
				AND = {
					tier = EMPEROR
					is_nomadic = yes
					any_realm_character = {
						count = 4
						liege = { character = ROOT }
						has_minor_title = title_commander
					}
				}
			}
		}
		
		random_realm_character = {
			limit = {
				NOT = {
					higher_tier_than = BARON
				}
				liege = { character = ROOT }
				has_minor_title = title_commander
				NOT = {
					martial = 12
				}
			}
			remove_title = title_commander
			opinion = {
				modifier = insulted
				who = ROOT
				years = 2
			}
		}
		
		event_target:invited_character = {
			give_minor_title = title_commander
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}

	option = {
		name = EVTOPTAHF24130
		
		trigger = {
			OR = { 
				NOT = { ROOT = { has_law = succ_byzantine_elective } }  #Either not Imperial...
				NOT = { #...Or there are no valid vassal candidates that can be commanders.
					any_vassal = { 
						higher_real_tier_than = BARON
						NOT = { 
							primary_title = { temporary = yes } 
						}
						OR = {
							AND = {
								OR = {
									male_can_hold_minor_title_trigger = yes
									female_can_hold_minor_commander_title_trigger = yes
								}
								OR = {
									NOT = { religion = hindu }
									trait = kshatriya
								}
								is_adult = yes
							}
							has_character_flag = special_marshal
						}
				
						prisoner = no
						NOT = { trait = incapable }
						NOT = { is_inaccessible_trigger = yes }
						NOT = { has_character_flag = guru }
						NOT = { has_character_modifier = refusing_to_lead }
						NOR = {
							has_job_title = job_chancellor
							has_job_title = job_marshal
							has_job_title = job_treasurer
							has_job_title = job_spymaster
							has_job_title = job_spiritual
							has_minor_title = title_commander
						}
					} 
				}
			}
			event_target:invited_character = { has_character_flag = invited_soldier }
			OR = {
				AND = {
					tier = COUNT
					NOT = {
						any_realm_character = {
							count = 2
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = DUKE
					NOT = {
						any_realm_character = {
							count = 4
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = KING
					is_nomadic = no
					NOT = {
						any_realm_character = {
							count = 6
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = EMPEROR
					is_nomadic = no
					NOT = {
						any_realm_character = {
							count = 8
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = KING
					is_nomadic = yes
					NOT = {
						any_realm_character = {
							count = 2
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
				AND = {
					tier = EMPEROR
					is_nomadic = yes
					NOT = {
						any_realm_character = {
							count = 4
							liege = { character = ROOT }
							has_minor_title = title_commander
						}
					}
				}
			}
		}
		
		event_target:invited_character = {
			give_minor_title = title_commander
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}
	
	option = {
		name = FANTASTIC
		event_target:invited_character = {
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}
	
	option = {
		name = EVTOPTCHF24130
		
		hidden_tooltip = {
			event_target:invited_character = { 
				death = {
					death_reason = death_missing
				}
			}
		}
	}
}

character_event = { # Bard character arrives
	id = HF.24131
	desc = EVTDESCHF24131
	picture = GFX_evt_jugglers
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16
	
	immediate = {
		spawn_fantastic_diplomat_effect = yes
		event_target:invited_character = {
			add_trait = poet
		}
	}
	
	option = {
		name = EVTOPTAHF24131
		event_target:invited_character = {
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}
	option = {
		name = EVTOPTCHF24130
		
		hidden_tooltip = {
			event_target:invited_character = { 
				death = {
					death_reason = death_missing
				}
			}
		}
	}
}

#Landless ladies of same religion might ask for protection.
character_event = { 
	id = HF.24132
	hide_window = yes

	is_triggered_only = yes
	
	only_women = yes
	min_age = 16
	max_age = 30
	only_capable = yes
	prisoner = no
	
	trigger = {
		is_ruler = no
		is_female = yes
		NOR = {		# MOD
			has_religion_feature = religion_matriarchal
			AND = {
				has_game_rule = {
					name = flavor_events
					value = enatic
				}
				OR = {
					religion = norse_pagan
					religion = norse_pagan_reformed
				}
			}
		}
		religion_group = christian
		is_married = no
		NOT = { num_of_children = 1 }
		NOT = { num_of_lovers = 1 }
		NOT = { num_of_friends = 1 }
		NOR = { 
			trait = nun 
			trait = brave
			trait = content
		}
		NOT = { has_character_flag = special_marshal }
		liege = {  
			OR = { 
				NOT = { religion = ROOT }
				NOT = { reverse_opinion = { who = ROOT value = -40 } }
				is_rival = ROOT
			}
			any_neighbor_independent_ruler = {  
				age = 16
				NOT = { trait = incapable }
				any_owned_bloodline = { 
					has_bloodline_flag = bloodline_knights
				}
				religion = ROOT
			}
		}

	}

	immediate = {
		random = {
			chance = 5 
			random_neighbor_independent_ruler = {  
				limit = {  
					any_owned_bloodline = { 
						has_bloodline_flag = bloodline_knights
					}
					religion = ROOT
				}
				character_event = { id = HF.24133 }
			}
		}
	}
}

character_event = { # Woman asks for assistance
	id = HF.24133
	desc = EVTDESCHF24133
	picture = GFX_evt_homage_hf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes
	
	#Marry her.
	#Host her.
	#Refuse her.
	
	option = {
		name = EVTOPTAHF24133
		trigger = {
			is_benevolent_trigger = yes
			is_married = no
			is_female = no
			FROM = { is_married = no }
		}
		FROM = {
			show_scope_change = no
			liege = {
				show_scope_change = no
				opinion = {
					modifier = opinion_outraged
					who = ROOT
					years = 100
				}
			}
		}
		FROM = {
			show_scope_change = no
			opinion = {
				modifier = opinion_saved_me
				who = ROOT
				years = 100
			}
			move_character = ROOT
			if = {
				limit = {
					is_betrothed = yes
				}
				break_betrothal = yes
			}
			if = {
				limit = {
					is_married = yes #Multiplayer delay
				}
				remove_spouse = yes
			}
			add_spouse = ROOT
			add_lover = ROOT
		}
	}
	option = {
		name = EVTOPTBHF24133
		FROM = {
			show_scope_change = no
			liege = {
				show_scope_change = no
				opinion = {
					modifier = opinion_outraged
					who = ROOT
					years = 100
				}
			}
		}
		FROM = {
			show_scope_change = no
			opinion = {
				modifier = opinion_saved_me
				who = ROOT
				years = 100
			}
			move_character = ROOT
			if = {
				limit = {
					is_betrothed = yes
				}
				break_betrothal = yes
			}
			if = {
				limit = {
					is_married = yes #Multiplayer delay
				}
				remove_spouse = yes
			}
		}
	}
	option = {
		name = EVTOPTCHF24133
		tiered_piety_negative_effect = yes
		FROM = {
			opinion = {
				modifier = opinion_dishonorable_scum
				who = ROOT
				years = 100
			}
		}
	}
}

#Philosopher-Warrior Drills troops.
character_event = {
	id = HF.24134
	desc = EVTDESCAHF24134
	picture = { 
		trigger = { 
			has_dlc = "Way of Life"
		} 
		picture = GFX_evt_war_planning
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Way of Life" }
		} 
		picture = GFX_evt_council
	}
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24134
		if = { 
			limit = { 
				OR = {
					trait = strategist
					martial = 15
				} 
			}
			prestige = -300 
		}
		if = { 
			limit = { 
				NOR = {
					trait = strategist
					martial = 15
				} 
			}
			prestige = -600
		}
		add_character_modifier = { name = infiltration_tactics years = 4 } 
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24134
		if = { 
			limit = { 
				OR = {
					trait = strategist
					martial = 15
				} 
			}
			prestige = -300 
		}
		if = { 
			limit = { 
				NOR = {
					trait = strategist
					martial = 15
				} 
			}
			prestige = -600
		}
		add_character_modifier = { name = polished_formation years = 4 } 
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTCHF24134
		if = { 
			limit = { 
				OR = {
					trait = strategist
					martial = 15
				} 
			}
			prestige = -200 
		}
		if = { 
			limit = { 
				NOR = {
					trait = strategist
					martial = 15
				} 
			}
			prestige = -400
		}
		add_character_modifier = { name = advanced_supply_lines years = 4 } 
		ai_chance = { 
			factor = 75
		}
	}
	option = { #Changed my mind.
		name = EVTOPTDHF24134
		hidden_tooltip = { remove_character_modifier = drill_troops_cooldown }
		break = yes #No post effects if player changed his mind and picked Option C.
		ai_chance = { 
			factor = 0
		}
	}
	after = { 
		hidden_tooltip = { 
			random_list = { 
				90 = { }
				3 = { 
					trigger = { 
						NOR = { 
							trait = uncouth
							trait = robust
						}
					}
					modifier = { 
						factor = 2
						trait = brave
					}
					modifier = { 
						factor = 2
						trait = wroth
					}
					character_event = { id = HF.24135 days = 20 random = 20 } 
				}
				3 = { 
					trigger = { 
						NOT = { 
							trait = wroth
						}
					}
					modifier = { 
						factor = 2
						trait = aggressive_leader
					}
					modifier = { 
						factor = 2
						trait = brave
					}
					modifier = { 
						factor = 2
						trait = cruel
					}
					character_event = { id = HF.24136 days = 20 random = 20 } 
				}
				3 = { 
					trigger = { 
						NOT = { trait = is_malnourished }
					}
					modifier = { 
						factor = 2
						trait = temperate
					}
					modifier = { 
						factor = 2
						trait = stressed
					}
					character_event = { id = HF.24137 days = 20 random = 20 } 
				}
			}
		}
	}
}

#Ruler cares more about training than appearance.
character_event = {
	id = HF.24135
	desc = { 
		trigger = { 
			is_female = yes
		} 
		text = EVTDESCAHF24135
	}
	desc = { 
		trigger = { 
			is_female = no
		} 
		text = EVTDESCBHF24135
	}
	picture = { 
		trigger = { 
			has_dlc = "Way of Life"
		} 
		picture = GFX_evt_war_planning
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Way of Life" }
		} 
		picture = GFX_evt_council
	}
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes

	option = { #Proud saves.
		name = EVTOPTAHF24135
		trigger = { trait = proud }
		tooltip_info = proud
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24135
		if = { 
			limit = { trait = robust }
			change_martial = 1 
		}
		else_if = { 
			limit = { NOR = { trait = feeble trait = robust } }
			add_trait = robust
		}
		else_if = { 
			limit = { trait = feeble }
			remove_trait = feeble
		}
		if = { 
			limit = { trait = uncouth }
			change_diplomacy = -1 
		}
		else_if = { 
			limit = { NOR = { trait = uncouth trait = groomed } }
			add_trait = uncouth
		}
		else_if = { 
			limit = { trait = groomed }
			remove_trait = groomed
		}
		ai_chance = { 
			factor = 75 
		}
	}
}

#Ruler has become wroth.
character_event = {
	id = HF.24136
	desc = EVTDESCAHF24136
	picture = { 
		trigger = { 
			has_dlc = "Way of Life"
		} 
		picture = GFX_evt_war_planning
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Way of Life" }
		} 
		picture = GFX_evt_council
	}
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes

	option = { #Deceitful saves.
		name = EVTOPTAHF24136
		trigger = { 
			trait = deceitful
		}
		tooltip_info = deceitful
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24136
		if = { 
			limit = { trait = stressed }
			remove_trait = stressed 
		}
		add_trait = wroth
		ai_chance = { 
			factor = 75 
		}
	}
}

#Ruler is skipping too many meals.
character_event = {
	id = HF.24137
	desc = { 
		trigger = { 
			is_female = yes
		} 
		text = EVTDESCAHF24137
	}
	desc = { 
		trigger = { 
			is_female = no
		} 
		text = EVTDESCBHF24137
	}
	picture = { 
		trigger = { 
			has_dlc = "Way of Life"
		} 
		picture = GFX_evt_war_planning
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Way of Life" }
		} 
		picture = GFX_evt_council
	}
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes

	option = { #Gluttonous saves.
		name = EVTOPTAHF24137
		trigger = { trait = gluttonous }
		tooltip_info = gluttonous
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = {
			text = EVTOPTBHF24137_A
			trigger = {
				trait = is_fat
			}
		}
		name = {
			text = EVTOPTBHF24137_B
			trigger = {
				NOT = { trait = is_fat }
			}
		}
		if = { 
			limit = { trait = stressed }
			remove_trait = stressed 
		}
		custom_tooltip = { text = tooltip_warning_20629 }
		hidden_tooltip = { lose_weight_small_effect = yes }
		hidden_tooltip = { weight_trait_check_effect = yes }
		ai_chance = { 
			factor = 75 
		}
	}
}

#Munificent Bloodline - Boosting opinion.
character_event = {
	id = HF.24138
	desc = EVTDESCAHF24138
	picture = { 
		trigger = { 
			OR = {		# MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { # MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
				has_religion_feature = religion_patriarchal
			}
		} 
		picture = GFX_evt_fancy_feast
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { #Endear neighbors.
		name = EVTOPTAHF24138
		trigger = { 
			any_neighbor_independent_ruler = { 
				is_alive = yes
				is_adult = yes
			}
		}
		custom_tooltip = { text = TT_EVTOPTAHF24138 }
		if = { 
			limit = { 
				OR = {
					is_attractive_trigger = yes
					diplomacy = 15
				} 
			}
			prestige = -300 
		}
		if = { 
			limit = { 
				NOR = {
					is_attractive_trigger = yes
					diplomacy = 15
				} 
			}
			prestige = -600
		}
		hidden_tooltip = { 
			any_neighbor_independent_ruler = {
				limit = { 
					is_adult = yes 
				}
				character_event = { id = HF.24139 }
			}
			random_neighbor_independent_ruler = { #Random infatuation
				limit = { 
					ai = yes
					is_adult = yes 
					NOR = { trait = celibate trait = eunuch is_rival = ROOT }
					OR = {	
						AND = {
							ROOT = { is_female = no }
							prefers_men_trigger = yes
							NOR = { 	# MOD
								has_religion_feature = religion_matriarchal
								AND = {
									has_game_rule = {
										name = flavor_events
										value = enatic
									}
									OR = {
										religion = norse_pagan
										religion = norse_pagan_reformed
									}
								}
							}
						}
						AND = {
							ROOT = { is_female = yes }
							prefers_men_trigger = no
							NOT = { has_religion_feature = religion_patriarchal }
						}
					}
				}
				preferred_limit = {
					trait = lustful
				}
				random = {
					chance = 20
					modifier = {
						factor = 1.5
						ROOT = { is_attractive_trigger = yes }
					}
					modifier = {
						factor = 0.5
						ROOT = { is_unattractive_trigger = yes }
					}
					modifier = {
						factor = 0.5
						ROOT = { age = 40 }
					}
					modifier = {
						factor = 1.5
						ROOT = { diplomacy = 8 }
					}
					modifier = {
						factor = 1.5
						ROOT = { diplomacy = 10 }
					}
					modifier = {
						factor = 1.5
						ROOT = { diplomacy = 12 }
					}
					modifier = {
						factor = 1.5
						ROOT = { diplomacy = 14 }
					}
					modifier = {
						factor = 1.5
						ROOT = { diplomacy = 16 }
					}
					opinion = { 
						who = ROOT
						modifier = opinion_infatuated
						years = 8
					}
				}
			}
		}
		ai_chance = { 
			factor = 25 
		}
	}
	option = { #Endear subjects.
		name = EVTOPTBHF24138
		add_character_modifier = { name = endearing_peasants duration = 1460 }
		if = { 
			limit = { 
				OR = {
					is_attractive_trigger = yes
					diplomacy = 15
				} 
			}
			prestige = -200 
		}
		if = { 
			limit = { 
				NOR = {
					is_attractive_trigger = yes
					diplomacy = 15
				} 
			}
			prestige = -400
		}
		ai_chance = { 
			factor = 25 
		}
	}
	option = { #Changed my mind.
		name = EVTOPTCHF24138
		hidden_tooltip = { remove_character_modifier = endearing_noblemen_cooldown }
		break = yes #No post effects if player changed his mind and picked Option C.
		ai_chance = { 
			factor = 0
		}
	}
	after = { 
		hidden_tooltip = { 
			random_list = { 
				90 = { }
				3 = { 
					trigger = { 
						NOR = { 
							trait = groomed
							trait = dull
						}
					}
					modifier = { 
						factor = 2
						trait = proud
					}
					modifier = { 
						factor = 2
						trait = hedonist
					}
					character_event = { id = HF.24141 days = 20 random = 20 } 
				}
				3 = { 
					trigger = { 
						NOT = { 
							trait = drunkard
						}
					}
					modifier = { 
						factor = 2
						trait = gluttonous
					}
					modifier = { 
						factor = 2
						trait = hedonist
					}
					character_event = { id = HF.24142 days = 20 random = 20 } 
				}
				3 = { 
					trigger = { 
						NOT = { 
							trait = is_fat
						}
					}
					modifier = { 
						factor = 2
						trait = gluttonous
					}
					modifier = { 
						factor = 2
						trait = hedonist
					}
					character_event = { id = HF.24143 days = 20 random = 20 } 
				}
			}
		}
	}
}

#Vassals/Neighbors pacified.
character_event = {
	id = HF.24139
	desc = { 
		trigger = { 
			vassal_of = FROM
		} 
		text = EVTDESCAHF24139
	}
	desc = { 
		trigger = { 
			NOT = { vassal_of = FROM } 
		} 
		text = EVTDESCBHF24139
	}
	picture = { 
		trigger = { 
			OR = { # MOD
				has_religion_feature = religion_matriarchal
				AND = {
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_matriarchal
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
				has_religion_feature = religion_patriarchal
			}
		} 
		picture = GFX_evt_fancy_feast
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	#Gain opinion.
	#Envious copout.
	#Opposite Doctrine copout.

	option = { 
		name = EVTOPTAHF24139
		trigger = { 
			OR = { 
				AND = { 
					is_female = yes
					FROM = { is_female = yes }
				}
				AND = { 
					is_female = no
					FROM = { is_female = no }
				}
			}
			trait = envious
		}
		tooltip_info = envious
		ai_chance = { 
			factor = 0 
		}
	}
	option = { 
		name = EVTOPTCHF24139
		trigger = { 
			OR = { 
				AND = { 
					has_religion_feature = religion_patriarchal
					FROM = { is_female = yes }
				}
				AND = { 
					OR = { 
						has_religion_feature = religion_matriarchal
						AND = {	# MOD
							has_game_rule = {
								name = flavor_events
								value = enatic
							}
							OR = {
								religion = norse_pagan
								religion = norse_pagan_reformed
							}
						}
					}
					FROM = { is_female = no }
				}
			}
		}
		tooltip_info_custom = available_because_religious_doctrine
		tiered_piety_reward_effect = yes
		ai_chance = { 
			factor = 0 
		}
	}
	option = { 
		name = EVTOPTDHF24139
		trigger = { 
			OR = {  
				ai = no
				NOR = {
					has_opinion_modifier = { 
						who = FROM
						modifier = opinion_infatuated
					} 
					is_lover = FROM
				}
			} 
			OR = {
				AND = {
					FROM = { is_female = yes }
					prefers_men_trigger = yes
				}
				AND = {
					FROM = { is_female = no }
					prefers_men_trigger = no
				}
			}
		}
		opinion = { 
			who = FROM
			modifier = opinion_impressed
			years = 5
		}
		ai_chance = { 
			factor = 70 
		}
	}
	option = { 
		name = EVTOPTEHF24139
		trigger = { 
			OR = {  
				ai = no
				NOR = {
					has_opinion_modifier = { 
						who = FROM
						modifier = opinion_infatuated
					} 
					is_lover = FROM
				}
			} 
			OR = {
				AND = {
					FROM = { is_female = yes }
					prefers_men_trigger = no
				}
				AND = {
					FROM = { is_female = no }
					prefers_men_trigger = yes
				}
			}
		}
		opinion = { 
			who = FROM
			modifier = opinion_impressed_infatuated
			years = 5
		}
		ai_chance = { 
			factor = 70 
		}
	}
	option = { 
		name = EVTOPTFHF24139
		trigger = { 
			OR = {
				has_opinion_modifier = { 
					who = FROM
					modifier = opinion_infatuated
				} 
				is_lover = FROM
			}
		}
		transfer_scaled_wealth = { to = FROM value = 0.5 min = 10 max = 100 } 
		show_portrait = FROM
		hidden_tooltip = { FROM = { character_event = { id = HF.24140 } } } 
		ai_chance = { 
			factor = 20 
		}
	}
}

#Notified of present.
character_event = {
	id = HF.24140
	desc = EVTDESCAHF24140
	desc = EVTDESCBHF24140
	desc = EVTDESCCHF24140
	desc = EVTDESCDHF24140
	picture = GFX_evt_fancy_feast
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	notification = yes

	option = { 
		name = EVTOPTDHF24139
		ai_chance = { 
			factor = 25 
		}
	}
}

#Ruler cares more about appearances than substance.
character_event = {
	id = HF.24141
	desc = EVTDESCAHF24141
	picture = { 
		trigger = { 
			OR = { 
				has_religion_feature = religion_matriarchal
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_matriarchal
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
				has_religion_feature = religion_patriarchal
			}
		} 
		picture = GFX_evt_fancy_feast
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { #Shy saves.
		name = EVTOPTAHF24141
		trigger = { trait = shy }
		tooltip_info = shy
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24141
		if = { 
			limit = { trait = groomed }
			change_diplomacy = 1 
		}
		else_if = { 
			limit = { NOR = { trait = uncouth trait = groomed } }
			add_trait = groomed
		}
		else_if = { 
			limit = { trait = uncouth }
			remove_trait = uncouth
		}
		if = { 
			limit = { trait = dull }
			change_stewardship = -1 
		}
		else_if = { 
			limit = { NOR = { trait = dull trait = shrewd } }
			add_trait = dull
		}
		else_if = { 
			limit = { trait = shrewd }
			remove_trait = shrewd
		}
		ai_chance = { 
			factor = 75 
		}
	}
}

#Ruler has become drunkard.
character_event = {
	id = HF.24142
	desc = { 
		trigger = { 
			is_female = yes
		} 
		text = EVTDESCAHF24142
	}
	desc = { 
		trigger = { 
			is_female = no
		} 
		text = EVTDESCBHF24142
	}
	picture = { 
		trigger = { 
			OR = { 
				has_religion_feature = religion_matriarchal
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_matriarchal
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
				has_religion_feature = religion_patriarchal
			}
		} 
		picture = GFX_evt_fancy_feast
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { #Diligent saves.
		name = EVTOPTAHF24142
		trigger = { trait = diligent }
		tooltip_info = diligent
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24142
		if = { 
			limit = { trait = stressed }
			remove_trait = stressed 
		}
		add_trait = drunkard
		ai_chance = { 
			factor = 75 
		}
	}
}

#Ruler is having too many feasts.
character_event = {
	id = HF.24143
	desc = { 
		trigger = { 
			is_female = yes
		} 
		text = EVTDESCAHF24143
	}
	desc = { 
		trigger = { 
			is_female = no
		} 
		text = EVTDESCBHF24143
	}
	picture = { 
		trigger = { 
			OR = { 
				has_religion_feature = religion_matriarchal
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
			}
		} 
		picture = GFX_evt_matriarchy_throne_room
	}
	picture = { 
		trigger = { 
			has_religion_feature = religion_patriarchal
		} 
		picture = GFX_evt_tengri_throneroom_oldgods
	}
	picture = { 
		trigger = { 
			NOR = { 
				has_religion_feature = religion_matriarchal
				AND = {	# MOD
					has_game_rule = {
						name = flavor_events
						value = enatic
					}
					OR = {
						religion = norse_pagan
						religion = norse_pagan_reformed
					}
				}
				has_religion_feature = religion_patriarchal
			}
		} 
		picture = GFX_evt_fancy_feast
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { #Temperate saves.
		name = EVTOPTAHF24143
		trigger = { trait = temperate }
		tooltip_info = temperate
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = {
			text = EVTOPTBHF24143_A
			trigger = {
				trait = is_malnourished
			}
		}
		name = {
			text = EVTOPTBHF24143_B
			trigger = {
				NOT = { trait = is_malnourished }
			}
		}
		if = { 
			limit = { trait = stressed }
			remove_trait = stressed 
		}
		custom_tooltip = { text = tooltip_warning_20606 }
		hidden_tooltip = { gain_weight_small_effect = yes }
		hidden_tooltip = { weight_trait_check_effect = yes }
		ai_chance = { 
			factor = 75 
		}
	}
}

########################

#Murder Peace Bloodline: Ruler dismantles factions.
character_event = {
	id = HF.24144
	desc = EVTDESCAHF24144
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24144
		trigger = { intrigue = 18 }
		tooltip_info = intrigue
		custom_tooltip = { text = TT_EVTOPTAHF24144 }
		prestige = -450
		hidden_tooltip = { 
			any_vassal = { character_event = { id = HF.24145 days = 5 random = 10 } }
		}
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24144
		trigger = { intrigue = 14 }
		tooltip_info = intrigue
		custom_tooltip = { text = TT_EVTOPTBHF24144 }
		prestige = -350
		hidden_tooltip = { 
			any_vassal = { character_event = { id = HF.24146 days = 5 random = 10 } }
		}
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTCHF24144
		trigger = { intrigue = 10 }
		tooltip_info = intrigue
		custom_tooltip = { text = TT_EVTOPTCHF24144 }
		prestige = -250
		hidden_tooltip = { 
			any_vassal = { character_event = { id = HF.24147 days = 5 random = 10 } }
		}
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTDHF24144
		custom_tooltip = { text = TT_EVTOPTDHF24144 }
		hidden_tooltip = { 
			any_vassal = { character_event = { id = HF.24148 days = 5 random = 10 } }
		}
		ai_chance = { 
			factor = 25 
		}
	}
	after = { 
		hidden_tooltip = { 
			random_list = { 
				90 = { }
				3 = { 
					trigger = { 
						NOT = { trait = paranoid }
					}
					modifier = { 
						factor = 2
						trait = shy
					}
					modifier = { 
						factor = 2
						trait = cruel
					}
					character_event = { id = HF.24149 days = 20 random = 20 } 
				}
				3 = { 
					trigger = { 
						NOT = { trait = arbitrary }
					}
					modifier = { 
						factor = 2
						trait = zealous
					}
					modifier = { 
						factor = 2
						trait = paranoid
					}
					character_event = { id = HF.24150 days = 20 random = 20 } 
				}
				3 = { 
					trigger = { 
						NOT = { trait = cruel }
					}
					modifier = { 
						factor = 2
						trait = arbitrary
					}
					modifier = { 
						factor = 2
						trait = cruel
					}
					character_event = { id = HF.24151 days = 20 random = 20 } 
				}
			}
		}
	}
}

#Vassal notified of full crackdown.
character_event = {
	id = HF.24145
	desc = EVTDESCAHF24145
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24145
		custom_tooltip = { text = TT_EVTOPTAHF24145 }
		opinion = {
			modifier = opinion_coerced_into_leaving_faction
			who = FROM
			years = 10
		}
		ai_chance = { factor = 100 }
	}
}

#Vassal notified of heavy crackdown.
character_event = {
	id = HF.24146
	desc = EVTDESCAHF24145
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24146
		custom_tooltip = { text = TT_EVTOPTAHF24145 }
		opinion = {
			modifier = opinion_coerced_into_leaving_faction
			who = FROM
			years = 6
		}
		ai_chance = { factor = 100 }
	}
}

#Vassal notified of medium crackdown.
character_event = {
	id = HF.24147
	desc = EVTDESCAHF24145
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24147
		custom_tooltip = { text = TT_EVTOPTAHF24145 }
		opinion = {
			modifier = opinion_coerced_into_leaving_faction
			who = FROM
			years = 4
		}
		ai_chance = { factor = 100 }
	}
}

#Vassal notified of light crackdown.
character_event = {
	id = HF.24148
	desc = EVTDESCAHF24145
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24148
		custom_tooltip = { text = TT_EVTOPTAHF24145 }
		opinion = {
			modifier = opinion_coerced_into_leaving_faction
			who = FROM
			years = 2
		}
		ai_chance = { factor = 100 }
	}
}

#Ruler has become paranoid.
character_event = {
	id = HF.24149
	desc = EVTDESCAHF24149
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	option = { #Brave saves.
		name = EVTOPTAHF24149
		trigger = { trait = brave }
		tooltip_info = brave
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24149
		if = { 
			limit = {
				NOT = { trait = paranoid }
			}
			add_trait = paranoid
		}
		else = {
			change_intrigue = 1
			change_martial = -1
		}
		ai_chance = { 
			factor = 75 
		}
	}
}

#Ruler has become arbitrary.
character_event = {
	id = HF.24150
	desc = EVTDESCAHF24150
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	option = { #Kind saves.
		name = EVTOPTAHF24150
		trigger = { trait = kind }
		tooltip_info = kind
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24150
		if = { 
			limit = {
				NOT = { trait = arbitrary }
			}
			add_trait = arbitrary
		}
		else = {
			change_intrigue = 1
			change_stewardship = -1
		}
		ai_chance = { 
			factor = 75 
		}
	}
}

#Ruler has become cruel.
character_event = {
	id = HF.24151
	desc = EVTDESCAHF24151
	picture = { 
		trigger = { 
			has_dlc = "Mystics"
		} 
		picture = GFX_evt_catching_heretic
	}
	picture = { 
		trigger = { 
			NOT = { has_dlc = "Mystics" }
		} 
		picture = GFX_evt_beheading
	}
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes

	option = { #Just saves.
		name = EVTOPTAHF24151
		trigger = { trait = just }
		tooltip_info = just
		ai_chance = { 
			factor = 25 
		}
	}
	option = { 
		name = EVTOPTBHF24151
		if = { 
			limit = {
				NOT = { trait = cruel }
			}
			add_trait = cruel
		}
		else = {
			change_intrigue = 1
			change_diplomacy = -1
		}
		ai_chance = { 
			factor = 75 
		}
	}
}

#########################

#Family Bloodline - Dynastic meddling.
character_event = {
	id = HF.24152
	desc = EVTDESCAHF24152
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	immediate = { 
		FROM = { save_event_target_as = meddling_target }
		ROOT = { save_event_target_as = meddler_target }
	}
	option = { #Meddle with behavior.
		name = EVTOPTAHF24152
		custom_tooltip = { text = TT_EVTOPTAHF24152 }
		hidden_tooltip = { character_event = { id = HF.24153 } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					FROM = { trait = stressed }
					FROM = { trait = depressed }
					FROM = { trait = drunkard }
					FROM = { trait = slothful }
					FROM = { trait = lustful }
					FROM = { 
						is_married = yes 
						NOT = { num_of_children = 2 }
					}
					any_owned_bloodline = { #Target does not share the culture of the founder, while still being within the same culture group.
						has_bloodline_flag = bloodline_dynastic_meddling
						founder = {
							NOT = { culture = event_target:meddling_target }
							culture_group = event_target:meddling_target
						}
					}
					trait = kind
					trait = diligent
					trait = chaste
					has_focus = focus_family
				}
			}
		}
	}
	option = { #Meddle with appearance.
		name = EVTOPTBHF24152
		custom_tooltip = { text = TT_EVTOPTBHF24152 }
		hidden_tooltip = { character_event = { id = HF.24154 } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					FROM = { trait = groomed }
					FROM = { trait = uncouth }
					FROM = { trait = is_fat }
					FROM = { trait = is_malnourished }
					trait = proud
					trait = diligent
					trait = gluttonous
					trait = temperate
				}
			}
		}
	}
	option = { 
		name = EVTOPTCHF24152
		hidden_tooltip = {  
			remove_character_modifier = dynastic_meddling_cooldown
			FROM = { remove_character_modifier = dynastic_meddling_target_cooldown }
		}
		ai_chance = { 
			factor = 0 
		}
	}
}

#Meddling with behavior.
character_event = {
	id = HF.24153
	desc = EVTDESCAHF24152
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	immediate = { 
		#Select founder for scoping purposes.
		any_owned_bloodline = { #Target does not share the culture of the founder, while still being within the same culture group.
			limit = { has_bloodline_flag = bloodline_dynastic_meddling }
			founder = {
				save_event_target_as = scoped_founder
			}
		}
	}

	option = { #Take care.
		name = EVTOPTAHF24153
		tooltip = { 
			event_target:meddling_target = { 
				show_scope_change = no
				if = {
					limit = { 
						trait = depressed 
					}
					remove_trait = depressed
				} 
				else_if = {
					limit = { 
						trait = stressed
					}
					remove_trait = stressed
				}
				else_if = {
					limit = { 
						NOR = { 
							trait = stressed
							trait = depressed 
						}
					}
					event_target:meddling_target = { health = 0.5 }
				}
			}
		}
		hidden_tooltip = { event_target:meddling_target = { character_event = { id = HF.24155 } } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					event_target:meddling_target = { trait = stressed }
					event_target:meddling_target = { trait = depressed }
					trait = kind
				}
			}
		}
	}
	option = { #Straighten up.
		name = {
			text = EVTOPTBHF24153_A
			trigger = {
				event_target:meddling_target = { trait = drunkard }
			}
		}
		name = {
			text = EVTOPTBHF24153_B
			trigger = {
				event_target:meddling_target = { trait = slothful }
			}
		}
		name = {
			text = EVTOPTBHF24153_C
			trigger = {
				event_target:meddling_target = { NOR = { trait = drunkard trait = slothful } }
			}
		}
		tooltip = { 
			event_target:meddling_target = { 
				show_scope_change = no
				if = {
					limit = { 
						trait = drunkard 
					}
					remove_trait = drunkard
				} 
				else_if = {
					limit = { 
						trait = slothful
					}
					remove_trait = slothful
				}
				else_if = {
					limit = { 
						NOR = { 
							trait = drunkard
							trait = slothful 
							trait = diligent
						}
					}
					add_trait = diligent
				}
				else_if = {
					limit = { 
						NOR = { 
							trait = drunkard
							trait = slothful 
						}
						trait = diligent
					}
					event_target:meddling_target = { change_stewardship = 1 }
				}
			}
		}
		hidden_tooltip = { event_target:meddling_target = { character_event = { id = HF.24156 } } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					event_target:meddling_target = { trait = drunkard }
					event_target:meddling_target = { trait = slothful }
					trait = diligent
				}
			}
		}
	}
	option = { #Importance of marriage.
		name = {
			text = EVTOPTCHF24153_A
			trigger = {
				event_target:meddling_target = { NOT = { trait = chaste } } #Should be chaste.
			}
		}
		name = {
			text = EVTOPTCHF24153_B
			trigger = {
				event_target:meddling_target = { is_married = yes num_of_children = 2 } #Should love spouse.
			}
		}
		name = {
			text = EVTOPTCHF24153_C
			trigger = {
				event_target:meddling_target = { is_married = yes NOR = { num_of_children = 2 trait = celibate trait = eunuch } } #Should make kids.
			}
		}
		tooltip = { 
			event_target:meddling_target = { 
				show_scope_change = no
				if = {
					limit = { 
						trait = lustful
					}
					remove_trait = lustful
				} 
				else_if = {
					limit = { 
						NOR = { 
							trait = lustful 
							trait = chaste
						}
					}
					add_trait = chaste
				}
				else_if = {
					limit = { 
						is_married = no
						trait = chaste
					}
					event_target:meddling_target = { change_learning = 1 }
				}
				else_if = {
					limit = { 
						is_married = yes
						NOR = { 
							num_of_children = 2 
							trait = celibate 
							trait = eunuch 
						}
					}
					event_target:meddling_target = { add_character_modifier = { name = marital_duty duration = 720 } }
				}
				else = {
					opinion = { modifier = opinion_rekindle_love who = spouse years = 2 }
				}

				if = { #Regardless, moralizing against Seduction will happen.
					limit = { 
						has_focus = focus_seduction
					}
					set_focus = focus_family
				}
			}
		}
		hidden_tooltip = { event_target:meddling_target = { character_event = { id = HF.24157 } } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					event_target:meddling_target = { trait = lustful }
					event_target:meddling_target = { has_focus = focus_seduction }
					has_focus = focus_family
					trait = chaste
				}
			}
		}
	}
	option = { #Act like the founder.
		name = EVTOPTDHF24153
		trigger = {
			event_target:meddling_target = {
				NOT = { culture = event_target:scoped_founder }
				culture_group = event_target:scoped_founder
			}
		}
		show_portrait = event_target:meddling_target
		custom_tooltip = { 
			text = TT_EVTOPTDHF24153 #Not certain.
		}
		hidden_tooltip = { event_target:meddling_target = { character_event = { id = HF.24158 } } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					trait = proud
					trait = gregarious
					trait = socializer
				}
			}
		}
	}
	option = { # Revert.
		name = EVTOPTCHF24152
		trigger = {  
			event_target:meddling_target = {
				OR = { 
					culture = event_target:scoped_founder 
					NOT = { culture_group = event_target:scoped_founder }
				}
			}
		}
		hidden_tooltip = {  
			remove_character_modifier = dynastic_meddling_cooldown
			event_target:meddling_target = { remove_character_modifier = dynastic_meddling_target_cooldown }
		}
		ai_chance = { 
			factor = 0 
		}
	}
}

#Meddling with appearance.
character_event = {
	id = HF.24154
	desc = EVTDESCAHF24152
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { #More studying, less grooming.
		name = EVTOPTAHF24154
		tooltip = { 
			event_target:meddling_target = { 
				show_scope_change = no
				if = {
					limit = { 
						trait = groomed 
					}
					remove_trait = groomed
				} 
				else_if = {
					limit = { 
						NOR = { 
							trait = groomed
							trait = uncouth
						}
					}
					add_trait = uncouth
				}
				else_if = {
					limit = { 
						trait = uncouth
					}
					event_target:meddling_target = { change_diplomacy = -1 } 
				}
				event_target:meddling_target = { 
					change_martial = 1
					change_learning = 1
				}
			}
		}
		hidden_tooltip = { event_target:meddling_target = { character_event = { id = HF.24159 } } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					event_target:meddling_target = { trait = groomed }
					trait = humble
					trait = uncouth
				}
			}
			modifier = { 
				factor = 1.5
				event_target:meddling_target = { is_female = no }
				NOR = {
					has_religion_feature = religion_matriarchal
					AND = {	# MOD
						has_game_rule = {
							name = flavor_events
							value = enatic
						}
						OR = {
							religion = norse_pagan
							religion = norse_pagan_reformed
						}
					}
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
		}
	}
	option = { #More grooming, less studying.
		name = EVTOPTBHF24154
		tooltip = { 
			event_target:meddling_target = { 
				show_scope_change = no
				if = {
					limit = { 
						trait = uncouth 
					}
					remove_trait = uncouth
				} 
				else_if = {
					limit = { 
						NOR = { 
							trait = groomed
							trait = uncouth
						}
					}
					add_trait = groomed
				}
				else_if = {
					limit = { 
						trait = groomed
					}
					event_target:meddling_target = { change_diplomacy = 1 }
				}
				event_target:meddling_target = { change_stewardship = -1 }
			}
		}
		hidden_tooltip = { event_target:meddling_target = { character_event = { id = HF.24160 } } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					event_target:meddling_target = { trait = uncouth }
					trait = proud
					trait = groomed
				}
			}
			modifier = { 
				factor = 1.5
				event_target:meddling_target = { is_female = yes }
				NOR = {
					has_religion_feature = religion_matriarchal
					AND = {	# MOD
						has_game_rule = {
							name = flavor_events
							value = enatic
						}
						OR = {
							religion = norse_pagan
							religion = norse_pagan_reformed
						}
					}
					has_game_rule = {
						name = gender
						value = all
					}
				}
			}
		}
	}
	option = { #Eat more.
		name = EVTOPTCHF24154
		trigger = { 
			NOT = { event_target:meddling_target = { trait = is_fat } }
		}
		show_portrait = event_target:meddling_target
		show_trait = is_fat
		custom_tooltip = { 
			text = TT_EVTOPTCHF24154
		}
		if = { 
			limit = { 
				event_target:meddling_target = { 
					OR = { 
						NOT = { check_variable = { which = physique_variable value = -5 } } 
						trait = feeble
					} 
				} 	
			}
			custom_tooltip = { 
				text = TT_EVTOPTCHF24154_HEALTH
			}
		}
		hidden_tooltip = { event_target:meddling_target = { character_event = { id = HF.24161 } } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					NOT = { event_target:meddling_target = { check_variable = { which = physique_variable value = 0 } } }
					trait = gluttonous
					trait = hedonist
					trait = is_fat
				}
			}
		}
	}
	option = { #Eat less.
		name = EVTOPTDHF24154
		trigger = { 
			NOT = { event_target:meddling_target = { trait = is_malnourished } }
		}
		show_portrait = event_target:meddling_target
		show_trait = is_malnourished
		custom_tooltip = { 
			text = TT_EVTOPTDHF24154
		}
		if = { 
			limit = { 
				event_target:meddling_target = { 
					OR = { 
						check_variable = { which = physique_variable value = 5 } 
						trait = sturdy
					} 
				} 
			}
			custom_tooltip = { 
				text = TT_EVTOPTCHF24154_HEALTH
			}
		}
		hidden_tooltip = { event_target:meddling_target = { character_event = { id = HF.24162 } } }
		ai_chance = { 
			factor = 50 
			modifier = { 
				factor = 0.5
				NOR = {
					event_target:meddling_target = { check_variable = { which = physique_variable value = 0 } }
					trait = temperate
					trait = zealous
					trait = is_malnourished
				}
			}
		}
	}
	option = { # Revert.
		name = EVTOPTCHF24152
		trigger = {  
			event_target:meddling_target = {
				OR = { 
					trait = is_fat
					trait = is_malnourished
				}
			}
		}
		hidden_tooltip = {  
			remove_character_modifier = dynastic_meddling_cooldown
			event_target:meddling_target = { remove_character_modifier = dynastic_meddling_target_cooldown }
		}
		ai_chance = { 
			factor = 0 
		}
	}
}

#Relative makes you feel better.
character_event = {
	id = HF.24155
	desc = EVTDESCAHF24155
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24155
		if = {
			limit = { 
				trait = depressed 
			}
			remove_trait = depressed
		} 
		else_if = {
			limit = { 
				trait = stressed
			}
			remove_trait = stressed
		}
		else_if = {
			limit = { 
				NOR = { 
					trait = stressed
					trait = depressed 
				}
			}
			health = 0.5
		}
	}
}

#Relative invites to stop messing around.
character_event = {
	id = HF.24156
	desc = EVTDESCAHF24156
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24156
		if = {
			limit = { 
				trait = drunkard 
			}
			remove_trait = drunkard
		} 
		else_if = {
			limit = { 
				trait = slothful
			}
			remove_trait = slothful
		}
		else_if = {
			limit = { 
				NOR = { 
					trait = drunkard
					trait = slothful 
					trait = diligent
				}
			}
			add_trait = diligent
		}
		else_if = {
			limit = { 
				NOR = { 
					trait = drunkard
					trait = slothful 
				}
				trait = diligent
			}
			change_stewardship = 1
		}
	}
}

#Relative moralizes about family values.
character_event = {
	id = HF.24157
	desc = EVTDESCAHF24157
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24157
		if = {
			limit = { 
				trait = lustful
			}
			remove_trait = lustful
		} 
		else_if = {
			limit = { 
				NOR = { 
					trait = lustful 
					trait = chaste
				}
			}
			add_trait = chaste
			if = { 
				limit = {
					is_married = yes
					FROM = { 
						trait = chaste 
						is_married = yes #Both married and chaste.
					}
				}
				if = { 
					limit = {
						is_married = FROM
						NOT = { is_lover = FROM }
					}
					add_lover = FROM 
				}
				else = { 
					opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
					reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				}
				hidden_tooltip = { FROM = { character_event = { id = HF.24173 } } } 
			}
		}
		else_if = {
			limit = { 
				is_married = no
				trait = chaste
			}
			change_learning = 1
		}
		else_if = {
			limit = { 
				is_married = yes
				NOR = { 
					num_of_children = 2 
					trait = celibate 
					trait = eunuch 
				}
			}
			add_character_modifier = { name = marital_duty duration = 720 }
		}
		else = {
			opinion = { modifier = opinion_rekindle_love who = spouse years = 2 }
		}
		if = { #Regardless, moralizing against Seduction will happen.
			limit = { 
				has_focus = focus_seduction
			}
			set_focus = focus_family
		}
	}
}

#Relative causes culture shift.
character_event = {
	id = HF.24158
	desc = EVTDESCAHF24158
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24158
		culture = event_target:scoped_founder
		if = { 
			limit = {
				FROM = { NOT = { culture = event_target:scoped_founder } }
			}
			reverse_opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
		}
		else_if = { 
			limit = {
				FROM = { culture = event_target:scoped_founder }
			}
			opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
		}
		hidden_tooltip = { FROM = { character_event = { id = HF.24163 } } }
		ai_chance = { factor = 90 }
	}
	option = { 
		name = EVTOPTBHF24158
		reverse_opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
		hidden_tooltip = { FROM = { character_event = { id = HF.24164 } } }
		ai_chance = {  
			factor = 10
			modifier = { 
				factor = 2
				trait = proud
			}
			modifier = { 
				factor = 2
				is_ruler = yes
				capital_scope = { culture = ROOT }
			}
			modifier = { 
				factor = 0.5
				is_ruler = yes
				capital_scope = { culture = event_target:scoped_founder }
			}
			modifier = { 
				factor = 2
				is_rival = FROM
			}
			modifier = { 
				factor = 0.5
				is_lover = FROM
			}
			modifier = { 
				factor = 0.5
				is_friend = FROM
			}
			modifier = { 
				factor = 0.5
				is_married = FROM
			}
			modifier = { 
				factor = 0.5
				opinion = { who = FROM value = 20 }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = -50 } }
			}
		}
	}
}

#Relative pushes study over grooming.
character_event = {
	id = HF.24159
	desc = { 
		trigger = { 
			is_female = no
		} 
		text = EVTDESCAHF24159
	}
	desc = { 
		trigger = { 
			is_female = yes
		} 
		text = EVTDESCBHF24159
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24159
		if = {
			limit = { 
				trait = groomed 
			}
			remove_trait = groomed
			reverse_opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
		} 
		else_if = {
			limit = { 
				NOR = { 
					trait = groomed
					trait = uncouth
				}
			}
			add_trait = uncouth
			if = { 
				limit = {
					FROM = { NOT = { trait = uncouth } }
				}
				reverse_opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
			}
			else_if = { 
				limit = {
					FROM = { trait = uncouth }
				}
				opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			}
		}
		else_if = {
			limit = { 
				trait = uncouth
			}
			change_diplomacy = -1
			reverse_opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
		}
		change_martial = 1
		change_learning = 1
		hidden_tooltip = { FROM = { character_event = { id = HF.24165 } } }
		ai_chance = { factor = 90 }
	}
	option = { 
		name = EVTOPTBHF24159
		tiered_prestige_negative_effect = yes
		reverse_opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
		hidden_tooltip = { FROM = { character_event = { id = HF.24166 } } }
		ai_chance = {  
			factor = 10
			modifier = { 
				factor = 2
				trait = proud
			}
			modifier = { 
				factor = 2
				is_rival = FROM
			}
			modifier = { 
				factor = 0.5
				is_lover = FROM
			}
			modifier = { 
				factor = 0.5
				is_friend = FROM
			}
			modifier = { 
				factor = 0.5
				is_married = FROM
			}
			modifier = { 
				factor = 0.5
				opinion = { who = FROM value = 20 }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = -50 } }
			}
		}
	}
}

#Relative pushes grooming over study.
character_event = {
	id = HF.24160
	desc = { 
		trigger = { 
			is_female = no
		} 
		text = EVTDESCAHF24160
	}
	desc = { 
		trigger = { 
			is_female = yes
		} 
		text = EVTDESCBHF24160
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24160
		if = {
			limit = { 
				trait = uncouth 
			}
			remove_trait = uncouth
		} 
		else_if = {
			limit = { 
				NOR = { 
					trait = groomed
					trait = uncouth
				}
			}
			add_trait = groomed
			if = { 
				limit = {
					FROM = { NOT = { trait = groomed } }
				}
				reverse_opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
			}
			else_if = { 
				limit = {
					FROM = { trait = groomed }
				}
				opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			}
		}
		else_if = {
			limit = { 
				trait = groomed
			}
			change_diplomacy = 1
		}
		change_stewardship = -1
		hidden_tooltip = { FROM = { character_event = { id = HF.24167 } } }
		ai_chance = { factor = 90 }
	}
	option = { 
		name = EVTOPTBHF24160
		tiered_prestige_negative_effect = yes
		reverse_opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
		hidden_tooltip = { FROM = { character_event = { id = HF.24168 } } }
		ai_chance = {  
			factor = 10
			modifier = { 
				factor = 2
				trait = diligent
			}
			modifier = { 
				factor = 2
				is_rival = FROM
			}
			modifier = { 
				factor = 0.5
				is_lover = FROM
			}
			modifier = { 
				factor = 0.5
				is_friend = FROM
			}
			modifier = { 
				factor = 0.5
				is_married = FROM
			}
			modifier = { 
				factor = 0.5
				opinion = { who = FROM value = 20 }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = -50 } }
			}
		}
	}
}

#Relative invites to eat more.
character_event = {
	id = HF.24161
	desc = { 
		trigger = { 
			is_female = no
		} 
		text = EVTDESCAHF24161
	}
	desc = { 
		trigger = { 
			is_female = yes
		} 
		text = EVTDESCBHF24161
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24161
		gain_weight_medium_effect = yes
		set_character_flag = flag_primed_physique #No random flavor needed.
		weight_trait_check_effect = yes
		if = { 
			limit = { 
				OR = { 
					NOT = { check_variable = { which = physique_variable value = -5 } } 
					trait = feeble
				} 
			} 
			health = 0.5
		}
		if = { 
			limit = {
				FROM = { trait = is_fat }
				check_variable = { which = physique_variable value = 5 } #The option would bring past threshold.
			}
			opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
		}
		else = { 
			reverse_opinion = { who = FROM modifier = opinion_took_my_advice years = 5 }
		}
		if = { 
			limit = {
				check_variable = { which = physique_variable value = 15 } #The option would bring past threshold.
			}
			set_character_flag = flag_fat_for_stress
			hidden_tooltip = { this_post_weight_gain_flavor_effect = yes } #Random positive flavor to justify decision's cost.
		}
		hidden_tooltip = { FROM = { character_event = { id = HF.24169 } } }
		ai_chance = { factor = 90 }
	}
	option = { 
		name = EVTOPTBHF24161
		tiered_prestige_negative_effect = yes
		reverse_opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
		hidden_tooltip = { FROM = { character_event = { id = HF.24170 } } }
		ai_chance = {  
			factor = 10
			modifier = { 
				factor = 2
				trait = temperate
			}
			modifier = { 
				factor = 2
				is_rival = FROM
			}
			modifier = { 
				factor = 0.5
				is_lover = FROM
			}
			modifier = { 
				factor = 0.5
				is_friend = FROM
			}
			modifier = { 
				factor = 0.5
				is_married = FROM
			}
			modifier = { 
				factor = 0.5
				opinion = { who = FROM value = 20 }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = -50 } }
			}
		}
	}
}
#Relative invites to eat less.
character_event = {
	id = HF.24162
	desc = { 
		trigger = { 
			is_female = no
		} 
		text = EVTDESCAHF24162
	}
	desc = { 
		trigger = { 
			is_female = yes
		} 
		text = EVTDESCBHF24162
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24161
		lose_weight_medium_effect = yes
		set_character_flag = flag_primed_physique #No random flavor needed.
		weight_trait_check_effect = yes
		if = { 
			limit = { 
				OR = { 
					check_variable = { which = physique_variable value = -5 }
					trait = sturdy
				} 
			} 
			health = 0.5
		}
		if = { 
			limit = {
				FROM = { trait = is_malnourished }
				NOT = { check_variable = { which = physique_variable value = -5 } } #The option would bring past threshold.
			}
			opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
		}
		else = { 
			reverse_opinion = { who = FROM modifier = opinion_took_my_advice years = 5 }
		}
		if = { 
			limit = {
				NOT = { check_variable = { which = physique_variable value = -15 } } #The option would bring past threshold.
			}
			set_character_flag = flag_malnourished_for_diligence
			hidden_tooltip = { this_post_weight_loss_flavor_effect = yes } #Random positive flavor to justify decision's cost.
		}
		hidden_tooltip = { FROM = { character_event = { id = HF.24171 } } }
		ai_chance = { factor = 90 }
	}
	option = { 
		name = EVTOPTBHF24161
		tiered_prestige_negative_effect = yes
		reverse_opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
		hidden_tooltip = { FROM = { character_event = { id = HF.24172 } } }
		ai_chance = {  
			factor = 10
			modifier = { 
				factor = 2
				trait = gluttonous
			}
			modifier = { 
				factor = 2
				trait = hedonist
			}
			modifier = { 
				factor = 2
				is_rival = FROM
			}
			modifier = { 
				factor = 0.5
				is_lover = FROM
			}
			modifier = { 
				factor = 0.5
				is_friend = FROM
			}
			modifier = { 
				factor = 0.5
				is_married = FROM
			}
			modifier = { 
				factor = 0.5
				opinion = { who = FROM value = 20 }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = 0 } }
			}
			modifier = { 
				factor = 2
				NOT = { opinion = { who = FROM value = -50 } }
			}
		}
	}
}

#Relative has changed culture.
character_event = {
	id = HF.24163
	desc = EVTDESCAHF24163
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_daughter_asking_mother
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = yes
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_daughter_asking_father
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = yes
			}
		} 
		picture = GFX_evt_courtiers_talking
	}
	picture = { 
		trigger = { 
			event_target:meddling_target = {
				is_female = no
			}
			event_target:meddler_target = {
				is_female = no
			}
		} 
		picture = GFX_evt_son_asking_father
	}
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = {
			text = EVTOPTAHF24163_A
			trigger = {
				culture = FROM
			}
		}
		name = {
			text = EVTOPTAHF24163_B
			trigger = {
				NOT = { culture = FROM }
			}
		}
		tooltip = { 
			if = { 
				limit = {
					NOT = { culture = FROM }
				}
				opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
			}
			else_if = { 
				limit = {
					culture = FROM
				}
				opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			}
		}
	}
}
#Relative has refused culture change.
character_event = {
	id = HF.24164
	desc = EVTDESCAHF24164
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24164
		opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
	}
}
#Relative is studying more.
character_event = {
	id = HF.24165
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			NAND = { 
				FROM = { trait = uncouth }
				trait = uncouth 
			}
		} 
		text = EVTDESCAHF24165
		picture = GFX_evt_library
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			NAND = { 
				FROM = { trait = uncouth }
				trait = uncouth 
			}
		} 
		text = EVTDESCBHF24165
		picture = GFX_evt_princess_byzantine
	}
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			FROM = { trait = uncouth }
			trait = uncouth
		} 
		text = EVTDESCCHF24165
		picture = GFX_evt_library
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			FROM = { trait = uncouth }
			trait = uncouth
		} 
		text = EVTDESCCHF24165
		picture = GFX_evt_princess_byzantine
	}
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = {
			text = EVTOPTAHF24165_A
			trigger = {
				trait = uncouth
			}
		}
		name = {
			text = EVTOPTAHF24165_B
			trigger = {
				NOT = { trait = uncouth }
			}
		}
		tooltip = { 
			if = { 
				limit = {
					trait = uncouth
					FROM = { trait = uncouth }
				}
				opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			}
			else = { 
				opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
			}
		}
	}
}
#Relative has refused to forsake grooming.
character_event = {
	id = HF.24166
	desc = EVTDESCAHF24166
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24164 #Same
		opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
	}
}
#Relative is grooming himself more.
character_event = {
	id = HF.24167
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			NAND = { 
				FROM = { trait = groomed }
				trait = groomed 
			}
		} 
		text = EVTDESCAHF24167
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			NAND = { 
				FROM = { trait = groomed }
				trait = groomed 
			}
		} 
		text = EVTDESCBHF24167
	}
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			FROM = { trait = groomed }
			trait = groomed
		} 
		text = EVTDESCCHF24167
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			FROM = { trait = groomed }
			trait = groomed
		} 
		text = EVTDESCDHF24167
	}
	picture = GFX_evt_dancing
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = {
			text = EVTOPTAHF24167_A
			trigger = {
				trait = groomed
			}
		}
		name = {
			text = EVTOPTAHF24167_B
			trigger = {
				NOT = { trait = groomed }
			}
		}
		tooltip = { 
			if = { 
				limit = {
					trait = groomed
					FROM = { trait = groomed }
				}
				opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			}
			else = { 
				opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
			}
		}
	}
}
#Relative has refused to grooming advice.
character_event = {
	id = HF.24168
	desc = EVTDESCAHF24168
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24164 #Same
		opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
	}
}
#Relative is eating more.
character_event = {
	id = HF.24169
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			NAND = { 
				FROM = { trait = is_fat }
				trait = is_fat 
			}
		} 
		text = EVTDESCAHF24169
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			NAND = { 
				FROM = { trait = is_fat }
				trait = is_fat 
			}
		} 
		text = EVTDESCBHF24169
	}
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			FROM = { trait = is_fat }
			trait = is_fat
		} 
		text = EVTDESCCHF24169
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			FROM = { trait = is_fat }
			trait = is_fat
		} 
		text = EVTDESCDHF24169
	}
	picture = GFX_evt_fancy_feast
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = {
			text = EVTOPTAHF24167_A
			trigger = {
				trait = is_fat
			}
		}
		name = {
			text = EVTOPTAHF24167_A
			trigger = {
				NOT = { trait = is_fat }
			}
		}
		tooltip = { 
			if = { 
				limit = {
					trait = is_fat
					FROM = { trait = is_fat }
				}
				opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			}
			else = { 
				opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
			}
		}
	}
}
#Relative has refused dieting advice.
character_event = {
	id = HF.24170
	desc = EVTDESCAHF24170
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24164 #Same
		opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
	}
}
#Relative is eating less.
character_event = {
	id = HF.24171
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			NAND = { 
				FROM = { trait = is_fat }
				trait = is_fat 
			}
		} 
		text = EVTDESCAHF24171
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			NAND = { 
				FROM = { trait = is_fat }
				trait = is_fat 
			}
		} 
		text = EVTDESCBHF24171
	}
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			FROM = { trait = is_malnourished }
			trait = is_malnourished
		} 
		text = EVTDESCCHF24171
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			FROM = { trait = is_malnourished }
			trait = is_malnourished
		} 
		text = EVTDESCDHF24171
	}
	picture = GFX_evt_dancing
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = {
			text = EVTOPTAHF24167_A
			trigger = {
				trait = is_malnourished
			}
		}
		name = {
			text = EVTOPTAHF24167_A
			trigger = {
				NOT = { trait = is_malnourished }
			}
		}
		tooltip = { 
			if = { 
				limit = {
					trait = is_malnourished
					FROM = { trait = is_malnourished }
				}
				opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			}
			else = { 
				opinion = { who = FROM modifier = opinion_took_my_advice years = 5 } 
			}
		}
	}
}
#Relative has refused dieting advice.
character_event = {
	id = HF.24172
	desc = EVTDESCAHF24172
	picture = GFX_evt_feast
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24164 #Same
		opinion = { who = FROM modifier = opinion_denied_advice years = 5 }
	}
}

#Both meddler and meddled are chaste and married.
character_event = {
	id = HF.24173
	desc = { 
		trigger = { 
			FROM = { is_female = no }
			NOT = { 
				is_married = ROOT
			}
		} 
		text = EVTDESCAHF24173
	}
	desc = { 
		trigger = { 
			FROM = { is_female = yes }
			NOT = { 
				is_married = ROOT
			}
		} 
		text = EVTDESCBHF24173
	}
	desc = { 
		trigger = { 
			is_married = ROOT
		} 
		text = EVTDESCCHF24173
	}
	picture = GFX_evt_family
	border = GFX_event_normal_frame_diplomacy
	
	is_triggered_only = yes

	option = { 
		name = {
			text = EVTOPTAHF24173_A
			trigger = {
				is_married = FROM
			}
		}
		name = {
			text = EVTOPTAHF24173_B
			trigger = {
				NOT = { is_married = FROM }
			}
		}
		tooltip = { 
			if = { 
				limit = {
					is_married = FROM
					NOT = { is_lover = FROM }
				}
				add_lover = FROM 
			}
			else = { 
				opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
				reverse_opinion = { who = FROM modifier = opinion_kindred_spirit years = 15 } 
			}
		}
	}
}

###########################################################

# Forging Claim on Alexander the Great's Bloodline.

#Opportunity arises.
narrative_event = {
	id = HF.24200
	title = EVTTITLEHF24200 
	desc = EVTDESCAHF24200
	picture = GFX_evt_hippodrome_byzantine
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	ai = no
	capable_only = yes
	prisoner = no

	trigger = { 
		real_tier = EMPEROR
		prestige = 15000
		is_adult = yes
		ai = no
		is_alternate_start = no
		NOT = { trait = content }
		NOT = { has_character_flag = flag_chance_for_alexander_blood } #Opportunity only once per character.
		NOT = { has_global_flag = flag_alexander_blood_restored } #Bloodline unlocked only once per playthrough.
		capital_scope = { 
			OR = { 
				region = world_europe_west
				region = world_europe_north
				region = world_europe_south
				region = world_europe_east
				region = world_asia_minor
				region = world_middle_east_jerusalem
				region = world_middle_east_arabia
			}
		}
	}

	weight_multiplier = { 
		days = 1
		
		modifier = {
			factor = 0.35
			capital_scope = { 
				NOR = { 
					region = world_europe_south
					region = world_asia_minor
				}
			}
		}
		modifier = {
			factor = 0.35
			NOR = { 
				culture_group = latin
				culture_group = byzantine
				culture_group = arabic
			}
		}
		modifier = {
			factor = 0.35
			NOR = {
				religion_group = christian
				religion_group = muslim
				religion = hellenic_pagan
				religion = hellenic_pagan_reformed
			}
		}
		modifier = {
			factor = 3
			trait = ambitious
		}
		modifier = {
			factor = 2
			religion_group = christian
		}
		modifier = {
			factor = 3
			religion = hellenic_pagan_reformed
		}
		modifier = {
			factor = 2
			religion = hellenic_pagan
		}
		modifier = {
			factor = 3
			culture = greek
		}
		modifier = {
			factor = 1.5
			culture_group = latin
		}
		modifier = {
			factor = 0.5
			age = 50
		}
		modifier = {
			factor = 2
			trait = brave
		}
		modifier = {
			factor = 2
			has_education_martial_trigger = yes
		}
		modifier = {
			factor = 2
			has_lifestyle_martial_trigger = yes
		}
		modifier = {
			factor = 2
			capital_scope = { region = world_asia_minor }
		}
		modifier = {
			factor = 2
			trait = scholar
		}
		modifier = {
			factor = 2
			has_ambition = obj_forge_bloodline
		}
		modifier = {
			factor = 2
			learning = 8
		}
		modifier = {
			factor = 2
			learning = 10
		}
		modifier = {
			factor = 2
			learning = 12
		}
		modifier = {
			factor = 2
			learning = 14
		}
		modifier = {
			factor = 2
			learning = 16
		}
		modifier = {
			factor = 2
			learning = 18
		}
		modifier = {
			factor = 2
			learning = 20
		}
		modifier = {
			factor = 2
			learning = 22
		}
		modifier = {
			factor = 2
			learning = 24
		}
		modifier = {
			factor = 2
			learning = 26
		}
		modifier = {
			factor = 2
			learning = 28
		}
		modifier = {
			factor = 2
			learning = 30
		}
		modifier = {
			factor = 1.5
			prestige = 22000
		}
		modifier = {
			factor = 1.5
			prestige = 24000
		}
		modifier = {
			factor = 1.5
			prestige = 26000
		}
		modifier = {
			factor = 1.5
			prestige = 28000
		}
		modifier = {
			factor = 1.5
			prestige = 30000
		}
		modifier = {
			factor = 1.5
			prestige = 40000
		}
		modifier = {
			factor = 1.5
			prestige = 50000
		}
		modifier = {
			factor = 1.5
			piety = 1000
			OR = {
				religion = hellenic_pagan
				religion = hellenic_pagan_reformed
			}
		}
		modifier = {
			factor = 1.5
			piety = 1500
			OR = {
				religion = hellenic_pagan
				religion = hellenic_pagan_reformed
			}
		}
		modifier = {
			factor = 1.75
			piety = 2000
			OR = {
				religion = hellenic_pagan
				religion = hellenic_pagan_reformed
			}
		}
		modifier = {
			factor = 1.75
			check_variable = { which = bloodline_won_wars value = 5 }
		}
		modifier = {
			factor = 1.75
			check_variable = { which = bloodline_won_wars value = 10 }
		}
	}

	immediate = { 
		set_character_flag = flag_chance_for_alexander_blood
	}

	option = { #Pursue.
		name = EVTOPTAHF24200
		custom_tooltip = { text = TT_EVTOPTAHF24200 }
		hidden_tooltip = { narrative_event = { id = HF.24201 days = 25 random = 25 } }
	}
	option = { #Abandon.
		name = EVTOPTBHF24200
	}
}


#The Tomb of Alexander.
narrative_event = {
	id = HF.24201
	title = EVTTITLEHF24201 
	desc = { 
		trigger = { 
			capital_scope = { 
				OR = { 
					region = world_asia_minor
					region = world_middle_east_jerusalem
					region = world_middle_east_arabia
				}
			}
		} 
		text = EVTDESCAHF24201
	}
	desc = { 
		trigger = { 
			capital_scope = { 
				NOR = { 
					region = world_asia_minor
					region = world_middle_east_jerusalem
					region = world_middle_east_arabia
				}
			}
		} 
		text = EVTDESCBHF24201
	}
	picture = GFX_evt_death
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes
	immediate = { 
		clr_character_flag = flag_alex_tomb_search_high
		clr_character_flag = flag_alex_tomb_search_medium
		clr_character_flag = flag_alex_tomb_search_low
		clr_character_flag = flag_alex_tomb_search_cheap
		clr_character_flag = flag_alex_scholars_search_high
		clr_character_flag = flag_alex_scholars_search_medium
		clr_character_flag = flag_alex_scholars_search_low
		clr_character_flag = flag_alex_scholars_search_cheap
	}

	#Search for the Tomb. (Intrigue-based)
	#Forsake search, hire scholars instead. (Learning-based)

	option = { #Intrigue search.
		name = EVTOPTAHF24201
		custom_tooltip = { text = TT_EVTOPTAHF24201 }
		hidden_tooltip = { narrative_event = { id = HF.24202 } } #Decide budget.
	}
	option = { #Learning search.
		name = EVTOPTBHF24201
		custom_tooltip = { text = TT_EVTOPTBHF24201 }
		hidden_tooltip = { narrative_event = { id = HF.24203 } } #Decide budget.
	}
	option = { #Abandon search.
		name = EVTOPTCHF24201
		custom_tooltip = { text = TT_EVTOPTCHF24201 }
		if = { 
			limit = { 
				trait = ambitious
			}
			remove_trait = ambitious
			if = { 
				limit = { 
					NOT = { trait = depressed }
				}
				add_trait = depressed
			}
		}
		prestige = -3000
	}
}

#Decide budget when searching Alexander's tomb.
narrative_event = {
	id = HF.24202
	title = EVTTITLEHF24201
	desc  = EVTDESCAHF24202
	picture = GFX_evt_death
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_alex_tomb_search_high
		clr_character_flag = flag_alex_tomb_search_medium
		clr_character_flag = flag_alex_tomb_search_low
		clr_character_flag = flag_alex_tomb_search_cheap
	}

	option = { 
		name = EVTOPTAHF24202
		custom_tooltip = { text = TT_EVTOPTAHF24202 }
		scaled_wealth = { value = -4 min = -1000 max = -2000 }
		set_character_flag = flag_alex_tomb_search_high
	}
	option = { 
		name = EVTOPTBHF24202
		custom_tooltip = { text = TT_EVTOPTBHF24202 }
		scaled_wealth = { value = -3 min = -750 max = -1500 }
		set_character_flag = flag_alex_tomb_search_medium
	}
	option = { 
		name = EVTOPTCHF24202
		custom_tooltip = { text = TT_EVTOPTCHF24202 }
		scaled_wealth = { value = -2 min = -500 max = -1000 }
		set_character_flag = flag_alex_tomb_search_low
	}
	option = { 
		name = EVTOPTDHF24202
		custom_tooltip = { text = TT_EVTOPTDHF24202 }
		scaled_wealth = { value = -1 min = -250 max = -500 }
		set_character_flag = flag_alex_tomb_search_cheap
	}
	after = { 
		hidden_tooltip = { 
			random_list = {
				#Success. - Tomb "found"
				#Failure. - Retry or change approach.
				40 = { #Success
					modifier = {
						factor = 0.1
						has_character_flag = flag_alex_tomb_search_cheap
					}
					modifier = {
						factor = 0.35
						has_character_flag = flag_alex_tomb_search_low
					}
					modifier = {
						factor = 0.75
						has_character_flag = flag_alex_tomb_search_medium
					}
					modifier = {
						factor = 1.25
						trait = schemer
					}
					modifier = {
						factor = 1.25
						intrigue = 10
					}
					modifier = {
						factor = 1.25
						intrigue = 12
					}
					modifier = {
						factor = 1.25
						intrigue = 14
					}
					modifier = {
						factor = 1.25
						intrigue = 16
					}
					modifier = {
						factor = 1.25
						intrigue = 18
					}
					modifier = {
						factor = 1.5
						intrigue = 20
					}
					modifier = {
						factor = 1.5
						intrigue = 22
					}
					modifier = {
						factor = 1.5
						intrigue = 24
					}
					modifier = {
						factor = 1.5
						intrigue = 26
					}
					modifier = {
						factor = 1.5
						intrigue = 28
					}
					modifier = {
						factor = 1.5
						intrigue = 30
					}
					modifier = {
						factor = 1.75
						trait = genius
					}
					modifier = {
						factor = 1.5
						trait = quick
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spymaster
							intrigue = 8
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spymaster
							intrigue = 10
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spymaster
							intrigue = 12
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spymaster
							intrigue = 14
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spymaster
							intrigue = 16
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spymaster
							intrigue = 18
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spymaster
							intrigue = 20
						}
					}
					modifier = {
						factor = 0.5
						capital_scope = { 
							NOR = { 
								region = world_asia_minor
								region = world_middle_east_jerusalem
								region = world_middle_east_arabia
							}
						}
					}
					modifier = {
						factor = 0.35
						NOT = { 
							any_realm_province = { 
								OR = { 
									region = world_asia_minor
									region = world_middle_east_jerusalem
									region = world_middle_east_arabia
								}
							}
						}
					}
					narrative_event = { id = HF.24204 days = 150 random = 250 }
				}
				60 = { #Failure

					narrative_event = { id = HF.24205 days = 150 random = 250 }
				}
			}
		}
	}
}

#Decide for budget when searching for scholars to forge claim.
narrative_event = {
	id = HF.24203
	title = EVTTITLEHF24203
	desc = EVTDESCAHF24203
	picture = GFX_evt_library
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_alex_scholars_search_high
		clr_character_flag = flag_alex_scholars_search_medium
		clr_character_flag = flag_alex_scholars_search_low
		clr_character_flag = flag_alex_scholars_search_cheap
	}

	option = { 
		name = EVTOPTAHF24203
		custom_tooltip = { text = TT_EVTOPTAHF24202 }
		scaled_wealth = { value = -4 min = -1000 max = -2000 }
		set_character_flag = flag_alex_scholars_search_high
	}
	option = { 
		name = EVTOPTBHF24203
		custom_tooltip = { text = TT_EVTOPTBHF24202 }
		scaled_wealth = { value = -3 min = -750 max = -1500 }
		set_character_flag = flag_alex_scholars_search_medium
	}
	option = { 
		name = EVTOPTCHF24203
		custom_tooltip = { text = TT_EVTOPTCHF24202 }
		scaled_wealth = { value = -2 min = -500 max = -1000 }
		set_character_flag = flag_alex_scholars_search_low
	}
	option = { 
		name = EVTOPTDHF24203
		custom_tooltip = { text = TT_EVTOPTDHF24202 }
		scaled_wealth = { value = -1 min = -250 max = -500 }
		set_character_flag = flag_alex_scholars_search_cheap
	}
	after = { 
		hidden_tooltip = { 
			random_list = {
				#Success. - Claim fabricated.
				#Failure. - Retry or change approach.
				40 = { #Success
					modifier = {
						factor = 0.1
						has_character_flag = flag_alex_scholars_search_cheap
					}
					modifier = {
						factor = 0.35
						has_character_flag = flag_alex_scholars_search_low
					}
					modifier = {
						factor = 0.75
						has_character_flag = flag_alex_scholars_search_medium
					}
					modifier = {
						factor = 1.25
						trait = scholar
					}
					modifier = {
						factor = 1.25
						learning = 10
					}
					modifier = {
						factor = 1.25
						learning = 12
					}
					modifier = {
						factor = 1.25
						learning = 14
					}
					modifier = {
						factor = 1.25
						learning = 16
					}
					modifier = {
						factor = 1.25
						learning = 18
					}
					modifier = {
						factor = 1.5
						learning = 20
					}
					modifier = {
						factor = 1.5
						learning = 22
					}
					modifier = {
						factor = 1.5
						learning = 24
					}
					modifier = {
						factor = 1.5
						learning = 26
					}
					modifier = {
						factor = 1.5
						learning = 28
					}
					modifier = {
						factor = 1.5
						learning = 30
					}
					modifier = {
						factor = 1.75
						trait = genius
					}
					modifier = {
						factor = 1.5
						trait = quick
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spiritual
							learning = 8
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spiritual
							learning = 10
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spiritual
							learning = 12
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spiritual
							learning = 14
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spiritual
							learning = 16
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spiritual
							learning = 18
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_spiritual
							learning = 20
						}
					}
					modifier = {
						factor = 1.5
						culture = greek
					}
					narrative_event = { id = HF.24206 days = 150 random = 250 }
				}
				60 = { #Failure

					narrative_event = { id = HF.24207 days = 150 random = 250 }
				}
			}
		}
	}
}

#The search for Alexander's Tomb was successful. - Establish claim.
narrative_event = {
	id = HF.24204
	title = EVTTITLEHF24201
	desc = EVTDESCAHF24204
	picture = GFX_evt_death
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_alex_tomb_search_high
		clr_character_flag = flag_alex_tomb_search_medium
		clr_character_flag = flag_alex_tomb_search_low
		clr_character_flag = flag_alex_tomb_search_cheap
		clr_character_flag = flag_alex_prestige_search_high
		clr_character_flag = flag_alex_prestige_search_medium
		clr_character_flag = flag_alex_prestige_search_low
		clr_character_flag = flag_alex_prestige_search_cheap
	}

	option = { 
		name = EVTOPTAHF24204
		custom_tooltip = { text = TT_EVTOPTAHF24202 }
		prestige = -10000
		set_character_flag = flag_alex_prestige_search_high
	}
	option = { 
		name = EVTOPTBHF24204
		custom_tooltip = { text = TT_EVTOPTBHF24202 }
		prestige = -7500
		set_character_flag = flag_alex_prestige_search_medium
	}
	option = { 
		name = EVTOPTCHF24204
		custom_tooltip = { text = TT_EVTOPTCHF24202 }
		prestige = -5000
		set_character_flag = flag_alex_prestige_search_low
	}
	option = { 
		name = EVTOPTDHF24204
		custom_tooltip = { text = TT_EVTOPTDHF24202 }
		prestige = -2500
		set_character_flag = flag_alex_prestige_search_cheap
	}
	after = { 
		hidden_tooltip = { 
			random_list = {
				#Success. - Bloodline created.
				#Failure. - Retry or change approach.
				60 = { #Success
					modifier = {
						factor = 0.1
						has_character_flag = flag_alex_prestige_search_cheap
					}
					modifier = {
						factor = 0.35
						has_character_flag = flag_alex_prestige_search_low
					}
					modifier = {
						factor = 0.75
						has_character_flag = flag_alex_prestige_search_medium
					}
					modifier = {
						factor = 1.25
						trait = socializer
					}
					modifier = {
						factor = 1.25
						diplomacy = 10
					}
					modifier = {
						factor = 1.25
						diplomacy = 12
					}
					modifier = {
						factor = 1.25
						diplomacy = 14
					}
					modifier = {
						factor = 1.25
						diplomacy = 16
					}
					modifier = {
						factor = 1.25
						diplomacy = 18
					}
					modifier = {
						factor = 1.5
						diplomacy = 20
					}
					modifier = {
						factor = 1.5
						diplomacy = 22
					}
					modifier = {
						factor = 1.5
						diplomacy = 24
					}
					modifier = {
						factor = 1.5
						diplomacy = 26
					}
					modifier = {
						factor = 1.5
						diplomacy = 28
					}
					modifier = {
						factor = 1.5
						diplomacy = 30
					}
					modifier = {
						factor = 1.75
						trait = genius
					}
					modifier = {
						factor = 1.5
						trait = quick
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 8
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 10
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 12
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 14
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 16
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 18
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 20
						}
					}
					narrative_event = { id = HF.24208 days = 350 random = 450 }
				}
				40 = { #Failure

					narrative_event = { id = HF.24209 days = 350 random = 450 }
				}
			}
		}
	}
}

#The search for Alexander's Tomb was unsuccessful. - Try again, change approach, or abandon quest.
narrative_event = {
	id = HF.24205
	title = EVTTITLEHF24201
	desc = EVTDESCAHF24205
	picture = GFX_evt_death
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_alex_tomb_search_high
		clr_character_flag = flag_alex_tomb_search_medium
		clr_character_flag = flag_alex_tomb_search_low
		clr_character_flag = flag_alex_tomb_search_cheap
		clr_character_flag = flag_alex_prestige_search_high
		clr_character_flag = flag_alex_prestige_search_medium
		clr_character_flag = flag_alex_prestige_search_low
		clr_character_flag = flag_alex_prestige_search_cheap
	}

	option = { #Intrigue search.
		name = EVTOPTAHF24205
		custom_tooltip = { text = TT_EVTOPTAHF24201 }
		hidden_tooltip = { narrative_event = { id = HF.24202 } } #Decide budget.
	}
	option = { #Learning search.
		name = EVTOPTBHF24205
		custom_tooltip = { text = TT_EVTOPTBHF24201 }
		hidden_tooltip = { narrative_event = { id = HF.24203 } } #Decide budget.
	}
	option = { #Abandon search.
		name = EVTOPTCHF24205
		custom_tooltip = { text = TT_EVTOPTCHF24201 }
		if = { 
			limit = { 
				trait = ambitious
			}
			remove_trait = ambitious
			if = { 
				limit = { 
					NOT = { trait = depressed }
				}
				add_trait = depressed
			}
		}
		prestige = -3000
	}
}

#The scholars have established a lineage. - Establish claim.
narrative_event = {
	id = HF.24206
	title = EVTTITLEHF24203
	desc = EVTDESCAHF24206
	picture = GFX_evt_library
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_alex_scholars_search_high
		clr_character_flag = flag_alex_scholars_search_medium
		clr_character_flag = flag_alex_scholars_search_low
		clr_character_flag = flag_alex_scholars_search_cheap
		clr_character_flag = flag_alex_prestige_search_high
		clr_character_flag = flag_alex_prestige_search_medium
		clr_character_flag = flag_alex_prestige_search_low
		clr_character_flag = flag_alex_prestige_search_cheap
	}

	option = { 
		name = EVTOPTAHF24204
		custom_tooltip = { text = TT_EVTOPTAHF24202 }
		prestige = -10000
		set_character_flag = flag_alex_prestige_search_high
	}
	option = { 
		name = EVTOPTBHF24204
		custom_tooltip = { text = TT_EVTOPTBHF24202 }
		prestige = -7500
		set_character_flag = flag_alex_prestige_search_medium
	}
	option = { 
		name = EVTOPTCHF24204
		custom_tooltip = { text = TT_EVTOPTCHF24202 }
		prestige = -5000
		set_character_flag = flag_alex_prestige_search_low
	}
	option = { 
		name = EVTOPTDHF24204
		custom_tooltip = { text = TT_EVTOPTDHF24202 }
		prestige = -2500
		set_character_flag = flag_alex_prestige_search_cheap
	}
	after = { 
		hidden_tooltip = { 
			random_list = { #Basic lower chance if tomb was not found.
				#Success. - Bloodline created.
				#Failure. - Retry or change approach.
				40 = { #Success
					modifier = {
						factor = 0.1
						has_character_flag = flag_alex_prestige_search_cheap
					}
					modifier = {
						factor = 0.35
						has_character_flag = flag_alex_prestige_search_low
					}
					modifier = {
						factor = 0.75
						has_character_flag = flag_alex_prestige_search_medium
					}
					modifier = {
						factor = 1.25
						trait = socializer
					}
					modifier = {
						factor = 1.25
						diplomacy = 10
					}
					modifier = {
						factor = 1.25
						diplomacy = 12
					}
					modifier = {
						factor = 1.25
						diplomacy = 14
					}
					modifier = {
						factor = 1.25
						diplomacy = 16
					}
					modifier = {
						factor = 1.25
						diplomacy = 18
					}
					modifier = {
						factor = 1.5
						diplomacy = 20
					}
					modifier = {
						factor = 1.5
						diplomacy = 22
					}
					modifier = {
						factor = 1.5
						diplomacy = 24
					}
					modifier = {
						factor = 1.5
						diplomacy = 26
					}
					modifier = {
						factor = 1.5
						diplomacy = 28
					}
					modifier = {
						factor = 1.5
						diplomacy = 30
					}
					modifier = {
						factor = 1.75
						trait = genius
					}
					modifier = {
						factor = 1.5
						trait = quick
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 8
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 10
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 12
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 14
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 16
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 18
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 20
						}
					}
					narrative_event = { id = HF.24208 days = 350 random = 450 }
				}
				60 = { #Failure

					narrative_event = { id = HF.24209 days = 350 random = 450 }
				}
			}
		}
	}
}

#The scholars' search was unsuccessful. - Try again, change approach, or abandon quest.
narrative_event = {
	id = HF.24207
	title = EVTTITLEHF24203
	desc = EVTDESCAHF24207
	picture = GFX_evt_death
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_alex_scholars_search_high
		clr_character_flag = flag_alex_scholars_search_medium
		clr_character_flag = flag_alex_scholars_search_low
		clr_character_flag = flag_alex_scholars_search_cheap
		clr_character_flag = flag_alex_prestige_search_high
		clr_character_flag = flag_alex_prestige_search_medium
		clr_character_flag = flag_alex_prestige_search_low
		clr_character_flag = flag_alex_prestige_search_cheap
	}

	option = { #Learning search.
		name = EVTOPTBHF24207
		custom_tooltip = { text = TT_EVTOPTBHF24201 }
		hidden_tooltip = { narrative_event = { id = HF.24203 } } #Decide budget.
	}
	option = { #Intrigue search.
		name = EVTOPTAHF24207
		custom_tooltip = { text = TT_EVTOPTAHF24201 }
		hidden_tooltip = { narrative_event = { id = HF.24202 } } #Decide budget.
	}
	option = { #Abandon search.
		name = EVTOPTCHF24207
		custom_tooltip = { text = TT_EVTOPTCHF24201 }
		if = { 
			limit = { 
				trait = ambitious
			}
			remove_trait = ambitious
			if = { 
				limit = { 
					NOT = { trait = depressed }
				}
				add_trait = depressed
			}
		}
		prestige = -3000
	}
}

#Alexander Bloodline gained.
narrative_event = {
	id = HF.24208
	title = EVTTITLEHF24208
	desc = EVTDESCAHF24208
	picture = GFX_evt_hippodrome_byzantine
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_alex_tomb_search_high
		clr_character_flag = flag_alex_tomb_search_medium
		clr_character_flag = flag_alex_tomb_search_low
		clr_character_flag = flag_alex_tomb_search_cheap
		clr_character_flag = flag_alex_scholars_search_high
		clr_character_flag = flag_alex_scholars_search_medium
		clr_character_flag = flag_alex_scholars_search_low
		clr_character_flag = flag_alex_scholars_search_cheap
		clr_character_flag = flag_alex_prestige_search_high
		clr_character_flag = flag_alex_prestige_search_medium
		clr_character_flag = flag_alex_prestige_search_low
		clr_character_flag = flag_alex_prestige_search_cheap
		set_global_flag = flag_alexander_blood_restored
	}

	option = { 
		name = EVTOPTAHF24208
		if = { 
			limit = { has_nickname = no }
			ROOT = { give_nickname = nick_the_great }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = alexander_bloodline_01
			}
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = alexander_bloodline_01
				inheritance = matrilineal
			}		
		}
		any_playable_ruler = {  
			limit = { 
				ai = no 
				is_within_diplo_range = ROOT
			}
			narrative_event = { id = HF.24210 }
		}
	}
}

#Failed to establish claim. Try again, or abandon quest.
narrative_event = {
	id = HF.24209
	title = EVTTITLEHF24208
	desc = EVTDESCAHF24209
	picture = GFX_evt_library
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_alex_tomb_search_high
		clr_character_flag = flag_alex_tomb_search_medium
		clr_character_flag = flag_alex_tomb_search_low
		clr_character_flag = flag_alex_tomb_search_cheap
		clr_character_flag = flag_alex_scholars_search_high
		clr_character_flag = flag_alex_scholars_search_medium
		clr_character_flag = flag_alex_scholars_search_low
		clr_character_flag = flag_alex_scholars_search_cheap
		clr_character_flag = flag_alex_prestige_search_high
		clr_character_flag = flag_alex_prestige_search_medium
		clr_character_flag = flag_alex_prestige_search_low
		clr_character_flag = flag_alex_prestige_search_cheap
	}

	option = { 
		name = EVTOPTAHF24209
		custom_tooltip = { text = TT_EVTOPTAHF24202 }
		prestige = -10000
		set_character_flag = flag_alex_prestige_search_high
	}
	option = { 
		name = EVTOPTBHF24209
		custom_tooltip = { text = TT_EVTOPTBHF24202 }
		prestige = -7500
		set_character_flag = flag_alex_prestige_search_medium
	}
	option = { 
		name = EVTOPTCHF24209
		custom_tooltip = { text = TT_EVTOPTCHF24202 }
		prestige = -5000
		set_character_flag = flag_alex_prestige_search_low
	}
	option = { #Abandon search.
		name = EVTOPTDHF24209
		custom_tooltip = { text = TT_EVTOPTCHF24201 }
		if = { 
			limit = { 
				trait = ambitious
			}
			remove_trait = ambitious
			if = { 
				limit = { 
					NOT = { trait = depressed }
				}
				add_trait = depressed
			}
		}
		prestige = -3000
		break = yes
	}
	after = { 
		hidden_tooltip = { 
			random_list = { #Basic lower chance if tomb was not found.
				#Success. - Bloodline created.
				#Failure. - Retry or change approach.
				40 = { #Success
					modifier = {
						factor = 0.1
						has_character_flag = flag_alex_prestige_search_cheap
					}
					modifier = {
						factor = 0.35
						has_character_flag = flag_alex_prestige_search_low
					}
					modifier = {
						factor = 0.75
						has_character_flag = flag_alex_prestige_search_medium
					}
					modifier = {
						factor = 1.25
						trait = socializer
					}
					modifier = {
						factor = 1.25
						diplomacy = 10
					}
					modifier = {
						factor = 1.25
						diplomacy = 12
					}
					modifier = {
						factor = 1.25
						diplomacy = 14
					}
					modifier = {
						factor = 1.25
						diplomacy = 16
					}
					modifier = {
						factor = 1.25
						diplomacy = 18
					}
					modifier = {
						factor = 1.5
						diplomacy = 20
					}
					modifier = {
						factor = 1.5
						diplomacy = 22
					}
					modifier = {
						factor = 1.5
						diplomacy = 24
					}
					modifier = {
						factor = 1.5
						diplomacy = 26
					}
					modifier = {
						factor = 1.5
						diplomacy = 28
					}
					modifier = {
						factor = 1.5
						diplomacy = 30
					}
					modifier = {
						factor = 1.75
						trait = genius
					}
					modifier = {
						factor = 1.5
						trait = quick
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 8
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 10
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 12
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 14
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 16
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 18
						}
					}
					modifier = {
						factor = 1.5
						any_courtier_or_vassal = {
							has_job_title = job_chancellor
							diplomacy = 20
						}
					}
					narrative_event = { id = HF.24208 days = 350 random = 450 }
				}
				60 = { #Failure

					narrative_event = { id = HF.24209 days = 350 random = 450 }
				}
			}
		}
	}
}

#Players notified of accomplishment.
narrative_event = {
	id = HF.24210
	title = EVTTITLEHF24210
	desc = EVTDESCAHF24210
	picture = GFX_evt_hippodrome_byzantine
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes

	option = { 
		name = {
			text = EVTOPTAHF24210
			trigger = {
				NOT = { dynasty = FROM }
			}
		}
		name = {
			text = EVTOPTBHF24210
			trigger = {
				dynasty = FROM
			}
		}
	}
}

###########################################################

# Forging Claim on Ashoka's Bloodline.

#Opportunity arises.
narrative_event = {
	id = HF.24220
	title = EVTTITLEHF24220
	desc = { 
		trigger = { 
			any_owned_bloodline = {  
				has_bloodline_flag = samrat_chakravartin_bloodline
			}
		} 
		text = EVTDESCAHF24220
	}
	desc = { 
		trigger = { 
			NOT = { 
				any_owned_bloodline = {  
					has_bloodline_flag = samrat_chakravartin_bloodline
				}
			}
		} 
		text = EVTDESCBHF24220
	}
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	ai = no
	capable_only = yes
	prisoner = no

	trigger = { 
		real_tier = EMPEROR
		prestige = 15000
		is_adult = yes
		ai = no
		is_alternate_start = no
		religion_group = indian_group
		NOT = { trait = content }
		NOT = { has_character_flag = flag_chance_for_ashoka_blood } #Opportunity only once per character.
		NOT = { has_global_flag = flag_ashoka_blood_restored } #Bloodline unlocked only once per playthrough.
		capital_scope = { 
			region = world_india
		}
	}

	weight_multiplier = { 
		days = 1
		
		modifier = {
			factor = 4
			any_owned_bloodline = {  
				has_bloodline_flag = samrat_chakravartin_bloodline
			}
		}
		modifier = {
			factor = 3
			trait = charitable
		}
		modifier = {
			factor = 3
			trait = brave
		}
		modifier = {
			factor = 3
			religion = buddhist
		}
		modifier = {
			factor = 0.5
			age = 50
		}
		modifier = {
			factor = 2
			has_education_learning_trigger = yes
		}
		modifier = {
			factor = 2
			has_lifestyle_learning_trigger = yes
		}
		modifier = {
			factor = 2
			trait = scholar
		}
		modifier = {
			factor = 2
			has_ambition = obj_forge_bloodline
		}
		modifier = {
			factor = 2
			learning = 8
		}
		modifier = {
			factor = 2
			learning = 10
		}
		modifier = {
			factor = 2
			learning = 12
		}
		modifier = {
			factor = 2
			learning = 14
		}
		modifier = {
			factor = 2
			learning = 16
		}
		modifier = {
			factor = 2
			learning = 18
		}
		modifier = {
			factor = 2
			learning = 20
		}
		modifier = {
			factor = 2
			learning = 22
		}
		modifier = {
			factor = 2
			learning = 24
		}
		modifier = {
			factor = 2
			learning = 26
		}
		modifier = {
			factor = 2
			learning = 28
		}
		modifier = {
			factor = 2
			learning = 30
		}
		modifier = {
			factor = 1.5
			prestige = 22000
		}
		modifier = {
			factor = 1.5
			prestige = 24000
		}
		modifier = {
			factor = 1.5
			prestige = 26000
		}
		modifier = {
			factor = 1.5
			prestige = 28000
		}
		modifier = {
			factor = 1.5
			prestige = 30000
		}
		modifier = {
			factor = 1.5
			prestige = 40000
		}
		modifier = {
			factor = 1.5
			prestige = 50000
		}
		modifier = {
			factor = 1.5
			piety = 1000
			religion = buddhist
		}
		modifier = {
			factor = 1.5
			piety = 1500
			religion = buddhist
		}
		modifier = {
			factor = 1.75
			piety = 2000
			religion = buddhist
		}
		modifier = {
			factor = 1.75
			check_variable = { which = bloodline_won_wars value = 5 }
		}
		modifier = {
			factor = 1.75
			check_variable = { which = bloodline_won_wars value = 10 }
		}
	}

	immediate = { 
		set_character_flag = flag_chance_for_ashoka_blood
	}

	option = { #Pursue.
		name = EVTOPTAHF24220
		custom_tooltip = { text = TT_EVTOPTAHF24220 }
		hidden_tooltip = { narrative_event = { id = HF.24221 days = 25 random = 25 } }
	}
	option = { #Abandon.
		name = EVTOPTBHF24220
	}
}

#Call Brahmins to examine you.
narrative_event = {
	id = HF.24221
	title = EVTTITLEHF24220
	desc = { 
		trigger = { 
			any_owned_bloodline = {  
				has_bloodline_flag = samrat_chakravartin_bloodline
			}
		} 
		text = EVTDESCAHF24221
	}
	desc = { 
		trigger = { 
			NOT = { 
				any_owned_bloodline = {  
					has_bloodline_flag = samrat_chakravartin_bloodline
				}
			}
		} 
		text = EVTDESCBHF24221
	}
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_ashoka_scholars_search_high
		clr_character_flag = flag_ashoka_scholars_search_medium
		clr_character_flag = flag_ashoka_scholars_search_low
		clr_character_flag = flag_ashoka_scholars_search_cheap
	}

	option = { 
		name = EVTOPTAHF24221
		custom_tooltip = { text = TT_EVTOPTAHF24202 }
		scaled_wealth = { value = -4 min = -1000 max = -2000 }
		set_character_flag = flag_ashoka_scholars_search_high
	}
	option = { 
		name = EVTOPTBHF24221
		custom_tooltip = { text = TT_EVTOPTBHF24202 }
		scaled_wealth = { value = -3 min = -750 max = -1500 }
		set_character_flag = flag_ashoka_scholars_search_medium
	}
	option = { 
		name = EVTOPTCHF24221
		custom_tooltip = { text = TT_EVTOPTCHF24202 }
		scaled_wealth = { value = -2 min = -500 max = -1000 }
		set_character_flag = flag_ashoka_scholars_search_low
	}
	option = { 
		name = EVTOPTDHF24221
		custom_tooltip = { text = TT_EVTOPTDHF24202 }
		scaled_wealth = { value = -1 min = -250 max = -500 }
		set_character_flag = flag_ashoka_scholars_search_cheap
	}
	after = { 
		character_event = { id = HF.24222 days = 150 random = 150 }
	}
}

#Test 1: Ashoka's Bravery.
narrative_event = {
	id = HF.24222
	title = EVTTITLEHF24222
	desc = EVTDESCAHF24222
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_ashoka_intrigue_check
		clr_character_flag = flag_ashoka_learning_check
		clr_character_flag = flag_ashoka_diplomacy_check
	}

	option = { 
		name = EVTOPTZHF24222
		trigger = { diplomacy = 12 trait = brave }
		tooltip_info = diplomacy
		set_character_flag = flag_ashoka_diplomacy_check
	}
	option = { 
		name = EVTOPTAHF24222
		trigger = { intrigue = 18 NOT = { trait = brave } }
		tooltip_info = intrigue
		set_character_flag = flag_ashoka_intrigue_check
	}
	option = { 
		name = EVTOPTBHF24222
		trigger = { learning = 18 NOT = { trait = brave } }
		tooltip_info = learning
		set_character_flag = flag_ashoka_learning_check
	}
	option = { 
		name = EVTOPTCHF24222
		trigger = { trait = brave }
		tooltip_info = brave
	}
	option = { 
		name = EVTOPTDHF24222
		trigger = {
			NOR = {
				trait = brave
				trait = craven
			}
		}
	}
	option = { 
		name = EVTOPTEHF24222
		trigger = { trait = craven }
		tooltip_info = craven
	}
	after = { 
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		hidden_tooltip = { 
			random_list = { 
				#Success. - Move to second test.
				#Failure. - Retry or change approach.
				40 = { #Success
					modifier = {
						factor = 0.1
						has_character_flag = flag_ashoka_scholars_search_cheap
					}
					modifier = {
						factor = 0.35
						has_character_flag = flag_ashoka_scholars_search_low
					}
					modifier = {
						factor = 0.75
						has_character_flag = flag_ashoka_scholars_search_medium
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 30
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 30
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 12
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 14
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 16
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 30
					}
					modifier = {
						factor = 0.5
						trait = craven
					}
					modifier = {
						factor = 1.5
						trait = brave
					}
					narrative_event = { id = HF.24224 days = 350 random = 450 }
				}
				60 = { #Failure
					narrative_event = { id = HF.24223 days = 350 random = 450 }
				}
			}
		}
	}
}

#Failed to prove bravery. Try again or abandon quest.
narrative_event = {
	id = HF.24223
	title = EVTTITLEHF24222
	desc = EVTDESCAHF24223
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_ashoka_intrigue_check
		clr_character_flag = flag_ashoka_learning_check
		clr_character_flag = flag_ashoka_diplomacy_check
	}

	option = { 
		name = EVTOPTZHF24223
		trigger = { diplomacy = 12 trait = brave }
		tooltip_info = diplomacy
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_diplomacy_check
	}
	option = { 
		name = EVTOPTAHF24223
		trigger = { intrigue = 18 NOT = { trait = brave } }
		tooltip_info = intrigue
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_intrigue_check
	}
	option = { 
		name = EVTOPTBHF24223
		trigger = { learning = 18 NOT = { trait = brave } }
		tooltip_info = learning
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_learning_check
	}
	option = { 
		name = EVTOPTCHF24223
		trigger = { trait = brave }
		tooltip_info = brave
		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}
	option = { 
		name = EVTOPTDHF24223
		trigger = {
			NOR = {
				trait = brave
				trait = craven
			}
		}
		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}
	option = { 
		name = EVTOPTEHF24223
		trigger = { trait = craven }
		tooltip_info = craven
		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}
	option = { #Abandon search.
		name = EVTOPTFHF24223
		custom_tooltip = { text = TT_EVTOPTFHF24223 }
		if = { 
			limit = { 
				trait = ambitious
			}
			remove_trait = ambitious
			if = { 
				limit = { 
					NOT = { trait = depressed }
				}
				add_trait = depressed
			}
		}
		piety = -2000
		set_character_flag = flag_ashoka_abandoning_quest
	}
	after = { 
		if = { 
			limit = { 
				NOT = { has_character_flag = flag_ashoka_abandoning_quest }
			}
			piety = -500
			hidden_tooltip = { 
				random_list = { 
					#Success. - Move to second test.
					#Failure. - Retry or change approach.
					40 = { #Success
						modifier = {
							factor = 0.1
							has_character_flag = flag_ashoka_scholars_search_cheap
						}
						modifier = {
							factor = 0.35
							has_character_flag = flag_ashoka_scholars_search_low
						}
						modifier = {
							factor = 0.75
							has_character_flag = flag_ashoka_scholars_search_medium
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 30
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 30
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 12
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 14
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 16
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 30
						}
						modifier = {
							factor = 0.5
							trait = craven
						}
						modifier = {
							factor = 1.5
							trait = brave
						}
						narrative_event = { id = HF.24224 days = 350 random = 450 }
					}
					60 = { #Failure
						narrative_event = { id = HF.24223 days = 350 random = 450 }
					}
				}
			}
		}
		else = {
			clr_character_flag = flag_ashoka_abandoning_quest
		}
	}
}

#Test 2: Ashoka's Humility.
narrative_event = {
	id = HF.24224
	title = EVTTITLEHF24224
	desc = EVTDESCAHF24224
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_ashoka_intrigue_check
		clr_character_flag = flag_ashoka_learning_check
		clr_character_flag = flag_ashoka_diplomacy_check
	}

	option = { 
		name = EVTOPTZHF24224
		trigger = { diplomacy = 12 trait = humble }
		tooltip_info = diplomacy
		set_character_flag = flag_ashoka_diplomacy_check
	}
	option = { 
		name = EVTOPTAHF24224
		trigger = { intrigue = 18 NOT = { trait = humble } }
		tooltip_info = intrigue
		set_character_flag = flag_ashoka_intrigue_check
	}
	option = { 
		name = EVTOPTBHF24224
		trigger = { learning = 18 NOT = { trait = humble } }
		tooltip_info = learning
		set_character_flag = flag_ashoka_learning_check
	}
	option = { 
		name = EVTOPTCHF24224
		trigger = { trait = humble }
		tooltip_info = humble
	}
	option = { 
		name = EVTOPTDHF24224
		trigger = {
			NOR = {
				trait = humble
				trait = proud
			}
		}
	}
	option = { 
		name = EVTOPTEHF24224
		trigger = { trait = proud }
		tooltip_info = proud
	}
	after = { 
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		hidden_tooltip = { 
			random_list = { 
				#Success. - Move to third test.
				#Failure. - Retry or change approach.
				40 = { #Success
					modifier = {
						factor = 0.1
						has_character_flag = flag_ashoka_scholars_search_cheap
					}
					modifier = {
						factor = 0.35
						has_character_flag = flag_ashoka_scholars_search_low
					}
					modifier = {
						factor = 0.75
						has_character_flag = flag_ashoka_scholars_search_medium
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 30
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 30
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 12
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 14
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 16
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 30
					}
					modifier = {
						factor = 0.5
						trait = proud
					}
					modifier = {
						factor = 1.5
						trait = humble
					}
					narrative_event = { id = HF.24226 days = 350 random = 450 }
				}
				60 = { #Failure
					narrative_event = { id = HF.24225 days = 350 random = 450 }
				}
			}
		}
	}
}

#Failed to prove humility. Try again or abandon quest.
narrative_event = {
	id = HF.24225
	title = EVTTITLEHF24224
	desc = EVTDESCBHF24225
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_ashoka_intrigue_check
		clr_character_flag = flag_ashoka_learning_check
		clr_character_flag = flag_ashoka_diplomacy_check
	}

	option = { 
		name = EVTOPTZHF24225
		trigger = { diplomacy = 12 trait = humble }
		tooltip_info = diplomacy
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_diplomacy_check
	}
	option = { 
		name = EVTOPTAHF24225
		trigger = { intrigue = 18 NOT = { trait = humble } }
		tooltip_info = intrigue
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_intrigue_check
	}
	option = { 
		name = EVTOPTBHF24225
		trigger = { learning = 18 NOT = { trait = humble } }
		tooltip_info = learning
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_learning_check
	}
	option = { 
		name = EVTOPTCHF24225
		trigger = { trait = humble }
		tooltip_info = humble
		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}
	option = { 
		name = EVTOPTDHF24225
		trigger = {
			NOR = {
				trait = humble
				trait = proud
			}
		}
		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}
	option = { 
		name = EVTOPTEHF24225
		trigger = { trait = proud }
		tooltip_info = proud
		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}
	option = { #Abandon search.
		name = EVTOPTFHF24225
		custom_tooltip = { text = TT_EVTOPTFHF24223 }
		if = { 
			limit = { 
				trait = ambitious
			}
			remove_trait = ambitious
			if = { 
				limit = { 
					NOT = { trait = depressed }
				}
				add_trait = depressed
			}
		}
		piety = -2000
		set_character_flag = flag_ashoka_abandoning_quest
	}
	after = { 
		if = { 
			limit = { 
				NOT = { has_character_flag = flag_ashoka_abandoning_quest }
			}
			piety = -500
			hidden_tooltip = { 
				random_list = { 
					#Success. - Move to third test.
					#Failure. - Retry or change approach.
					40 = { #Success
						modifier = {
							factor = 0.1
							has_character_flag = flag_ashoka_scholars_search_cheap
						}
						modifier = {
							factor = 0.35
							has_character_flag = flag_ashoka_scholars_search_low
						}
						modifier = {
							factor = 0.75
							has_character_flag = flag_ashoka_scholars_search_medium
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 30
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 30
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 12
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 14
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 16
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 30
						}
						modifier = {
							factor = 0.5
							trait = proud
						}
						modifier = {
							factor = 1.5
							trait = humble
						}
						narrative_event = { id = HF.24226 days = 350 random = 450 }
					}
					60 = { #Failure
						narrative_event = { id = HF.24225 days = 350 random = 450 }
					}
				}
			}
		}
		else = { 
			clr_character_flag = flag_ashoka_abandoning_quest
		}
	}
}

#Test 3: Ashoka's Charity.
narrative_event = {
	id = HF.24226
	title = EVTTITLEHF24226
	desc = EVTDESCBHF24226
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_ashoka_intrigue_check
		clr_character_flag = flag_ashoka_learning_check
		clr_character_flag = flag_ashoka_diplomacy_check
	}

	option = { 
		name = EVTOPTZHF24226
		trigger = { diplomacy = 12 trait = charitable }
		tooltip_info = diplomacy
		set_character_flag = flag_ashoka_diplomacy_check
		scaled_wealth = { value = -4 min = -750 max = -1000 }
	}
	option = { 
		name = EVTOPTAHF24226
		trigger = { intrigue = 18 NOT = { trait = charitable } }
		tooltip_info = intrigue
		set_character_flag = flag_ashoka_intrigue_check
		scaled_wealth = { value = -3 min = -500 max = -750 }
	}
	option = { 
		name = EVTOPTBHF24226
		trigger = { learning = 18 NOT = { trait = charitable } }
		tooltip_info = learning
		set_character_flag = flag_ashoka_learning_check
		scaled_wealth = { value = -3 min = -500 max = -750 }
	}
	option = { 
		name = EVTOPTCHF24226
		trigger = { trait = charitable }
		tooltip_info = charitable
		scaled_wealth = { value = -4 min = -750 max = -1000 }
	}
	option = { 
		name = EVTOPTDHF24226
		trigger = {
			NOR = {
				trait = charitable
				trait = greedy
			}
		}
		scaled_wealth = { value = -3 min = -500 max = -750 }
	}
	option = { 
		name = EVTOPTEHF24226
		trigger = { trait = greedy }
		tooltip_info = greedy
		scaled_wealth = { value = -2 min = -350 max = -500 }
	}
	after = { 
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		hidden_tooltip = { 
			random_list = { 
				#Success. - Found Bloodline.
				#Failure. - Retry or change approach.
				40 = { #Success
					modifier = {
						factor = 0.1
						has_character_flag = flag_ashoka_scholars_search_cheap
					}
					modifier = {
						factor = 0.35
						has_character_flag = flag_ashoka_scholars_search_low
					}
					modifier = {
						factor = 0.75
						has_character_flag = flag_ashoka_scholars_search_medium
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue = 30
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning = 30
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 12
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 14
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 16
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 18
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 20
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 22
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 24
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 28
					}
					modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy = 30
					}
					modifier = {
						factor = 0.5
						trait = greedy
					}
					modifier = {
						factor = 1.5
						trait = charitable
					}
					narrative_event = { id = HF.24228 days = 350 random = 450 }
				}
				60 = { #Failure
					narrative_event = { id = HF.24227 days = 350 random = 450 }
				}
			}
		}
	}
}
#Failed to prove charity. Try again or abandon quest.
narrative_event = {
	id = HF.24227
	title = EVTTITLEHF24226
	desc = EVTDESCAHF24227
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_ashoka_intrigue_check
		clr_character_flag = flag_ashoka_learning_check
		clr_character_flag = flag_ashoka_diplomacy_check
	}

	option = { 
		name = EVTOPTZHF24227
		trigger = { diplomacy = 12 trait = charitable }
		tooltip_info = diplomacy
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_diplomacy_check
		scaled_wealth = { value = -4 min = -750 max = -1000 }
	}
	option = { 
		name = EVTOPTAHF24227
		trigger = { intrigue = 18 NOT = { trait = charitable } }
		tooltip_info = intrigue
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_intrigue_check
		scaled_wealth = { value = -3 min = -500 max = -750 }
	}
	option = { 
		name = EVTOPTBHF24227
		trigger = { learning = 18 NOT = { trait = charitable } }
		tooltip_info = learning
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		set_character_flag = flag_ashoka_learning_check
		scaled_wealth = { value = -3 min = -500 max = -750 }
	}
	option = { 
		name = EVTOPTCHF24227
		trigger = { trait = charitable }
		tooltip_info = charitable
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		scaled_wealth = { value = -4 min = -750 max = -1000 }
	}
	option = { 
		name = EVTOPTDHF24227
		trigger = {
			NOR = {
				trait = charitable
				trait = greedy
			}
		}
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		scaled_wealth = { value = -3 min = -500 max = -750 }
	}
	option = { 
		name = EVTOPTEHF24227
		trigger = { trait = greedy }
		tooltip_info = greedy
		custom_tooltip = { text = TT_EVTOPTHF24222 }
		scaled_wealth = { value = -2 min = -350 max = -500 }
	}
	option = { #Abandon search.
		name = EVTOPTFHF24227
		custom_tooltip = { text = TT_EVTOPTFHF24223 }
		if = { 
			limit = { 
				trait = ambitious
			}
			remove_trait = ambitious
			if = { 
				limit = { 
					NOT = { trait = depressed }
				}
				add_trait = depressed
			}
		}
		piety = -2000
		set_character_flag = flag_ashoka_abandoning_quest
	}
	after = { 
		if = { 
			limit = { 
				NOT = { has_character_flag = flag_ashoka_abandoning_quest }
			}
			piety = -500
			hidden_tooltip = { 
				random_list = { 
					#Success. - Move to third test.
					#Failure. - Retry or change approach.
					40 = { #Success
						modifier = {
							factor = 0.1
							has_character_flag = flag_ashoka_scholars_search_cheap
						}
						modifier = {
							factor = 0.35
							has_character_flag = flag_ashoka_scholars_search_low
						}
						modifier = {
							factor = 0.75
							has_character_flag = flag_ashoka_scholars_search_medium
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue = 30
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning = 30
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 12
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 14
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 16
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 18
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 20
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 22
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 24
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 28
						}
						modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy = 30
						}
						modifier = {
							factor = 0.5
							trait = proud
						}
						modifier = {
							factor = 1.5
							trait = humble
						}
						narrative_event = { id = HF.24228 days = 350 random = 450 }
					}
					60 = { #Failure
						narrative_event = { id = HF.24227 days = 350 random = 450 }
					}
				}
			}
		}
		else = { 
			clr_character_flag = flag_ashoka_abandoning_quest
		}
	}
}

#Acquired Ashoka's Bloodline.
narrative_event = {
	id = HF.24228
	title = EVTTITLEHF24228
	desc = { 
		trigger = { 
			any_owned_bloodline = {  
				has_bloodline_flag = samrat_chakravartin_bloodline
			}
		} 
		text = EVTDESCAHF24228
	}
	desc = { 
		trigger = { 
			NOT = { 
				any_owned_bloodline = {  
					has_bloodline_flag = samrat_chakravartin_bloodline
				}
			}
		} 
		text = EVTDESCBHF24228
	}
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	immediate = { 
		clr_character_flag = flag_ashoka_intrigue_check
		clr_character_flag = flag_ashoka_learning_check
		clr_character_flag = flag_ashoka_diplomacy_check
		set_global_flag = flag_ashoka_blood_restored
	}

	option = { 
		name = EVTOPTAHF24228
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no
				this_has_super_cool_nickname_trigger = no
				is_female = no
			}
			ROOT = { give_nickname = nick_the_lion }
		}
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no
				this_has_super_cool_nickname_trigger = no
				is_female = yes
			}
			ROOT = { give_nickname = nick_the_lioness }
		}
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = ashoka_bloodline_01
			}
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = ashoka_bloodline_01
				inheritance = matrilineal
			}		
		}
		any_playable_ruler = {  
			limit = { 
				ai = no 
				is_within_diplo_range = ROOT
			}
			narrative_event = { id = HF.24229 }
		}
	}
}

narrative_event = {
	id = HF.24229
	title = EVTTITLEHF24228
	desc = { 
		trigger = { 
			FROM = {  
				any_owned_bloodline = {  
					has_bloodline_flag = samrat_chakravartin_bloodline
				}
			}
		} 
		text = EVTDESCAHF24229
	}
	desc = { 
		trigger = { 
			NOT = { 
				FROM = { 
					any_owned_bloodline = {  
						has_bloodline_flag = samrat_chakravartin_bloodline
					}
				}
			}
		} 
		text = EVTDESCBHF24229
	}
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes

	option = { 
		name = EVTOPTAHF24229
	}
}

#Add mental decay if not won enough wars by maturity as a ruler (35 years).
character_event = {
	id = HF.24230
	desc = { 
		trigger = { 
			ROOT = {  
				any_owned_bloodline = {  
					has_bloodline_flag = bloodline_alexander
				}
			}
		} 
		text = EVTDESCAHF24230
	}
	desc = { 
		trigger = { 
			NOT = { 
				ROOT = { 
					any_owned_bloodline = {  
						has_bloodline_flag = bloodline_ashoka
					}
				}
			}
		} 
		text = EVTDESCBHF24230
	}
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_diplomacy

	min_age = 35
	only_rulers = yes
	only_capable = yes
	
	is_triggered_only = yes

	trigger = { 
		higher_tier_than = DUKE
		NOT = { trait = incapable }
		NOT = { trait = depressed }
		prisoner = no
		NOT = { check_variable = { which = bloodline_won_wars value = 10 } }
		any_owned_bloodline = {  
			OR = {  
				has_bloodline_flag = bloodline_alexander
				has_bloodline_flag = bloodline_ashoka
			}
			founder = {
				NOT = {
					character = ROOT
				}
			}
		}
	}

	option = { 
		name = EVTOPTAHF24230
		trigger = { trait = content }
		tooltip_info = content
	}
	option = { 
		name = EVTOPTBHF24230
		if = { 
			limit = {  
				NOT = { trait = depressed }
			}
			random = { 
				chance = 25
				add_trait = depressed
				hidden_tooltip = { character_event = { id = 38288 } }
			}
		}
	}
}

#HF.24231 Taken for Dragon Bloodline event.

#on_death of Dragon Bloodline's founder, fire delayed event to change portrait.
character_event = {
	id = HF.24232
	hide_window = yes
	
	is_triggered_only = yes

	trigger = { 
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_dragon
			founder = {
				character = ROOT
			}
		}
		NOT = {
			has_game_rule = {
				name = supernatural_events
				value = off
			}
		}
	}

	immediate = { 
		333 = { #Delayed province event on Rome, to make sure it always fires.
			province_event = { id = HF.24233 days = 7300 }
		}
	}
}

#Time has passed, ruler is believed to have actually been a Dragon.
province_event = {
	id = HF.24233
	hide_window = yes
	is_triggered_only = yes

	immediate = { 
		FROM = { 
			set_graphical_culture = dragon_culture
			culture = dragon_culture
		}
	}
}
###################

#Executing people by (dragon) burning.
character_event = {
	id = HF.24234
	desc = EVTDESCHF24234
	picture = GFX_evt_burning_man_hf
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24234
	}
}

# Killed by (dragon) burning.
character_event = {
	id = HF.24235
	desc = EVTDESCHF24235
	picture = GFX_evt_burning_man_hf
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTAHF24235
		death = {
			death_reason = death_execution_burning
			killer = FROMFROM
		}
	}
}

###################

#Technology Bloodline.
# Bards/Scholars/Mystics arriving at court.
character_event = { 
	id = HF.24236
	hide_window = yes
	
	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		piety = 0
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_wandering_artists
		}
	}
	
	immediate = {
		random_list = {
			60 = { #Bard
				character_event = { id = HF.24237 }
			}
			30 = { #Scholar
				character_event = { id = HF.24238 }
			}
			10 = { #Mystic
				character_event = { id = HF.24239 }
			}
			60 = {
				modifier = {
					factor = 3
					ai = yes
				}
				modifier = {
					factor = 1.35
					NOT = {
						higher_tier_than = COUNT
					}
				}
				modifier = {
					factor = 1.35
					NOT = {
						higher_tier_than = DUKE
					}
				}
				modifier = {
					factor = 1.7
					NOT = {
						learning = 4
					}
				}
				modifier = {
					factor = 1.5
					NOT = {
						learning = 8
					}
				}
				modifier = {
					factor = 1.35
					NOT = {
						learning = 12
					}
				}
				modifier = {
					factor = 1.75
					is_evil_trigger = yes
				}
				modifier = {
					factor = 0.65
					is_benevolent_trigger = yes
				}
			}
		}
	}
}

character_event = { # Bard character arrives
	id = HF.24237
	desc = EVTDESCHF24237
	picture = GFX_evt_open_book_hf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	
	immediate = {
		spawn_fantastic_diplomat_effect = yes
		event_target:invited_character = {
			add_trait = poet
		}
	}
	
	option = {
		name = EVTOPTAHF24237
		scaled_wealth = { value = -0.1 min = -5 max = -100 }
		tiered_prestige_reward_effect = yes
		event_target:invited_character = {
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}
	option = {
		name = EVTOPTBHF24237
		
		hidden_tooltip = {
			event_target:invited_character = { 
				death = {
					death_reason = death_missing
				}
			}
		}
	}
}

character_event = { # Scholar character arrives
	id = HF.24238
	desc = EVTDESCHF24238
	picture = GFX_evt_open_book_hf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	
	immediate = {
		spawn_fantastic_scholar_effect = yes
		event_target:invited_character = {
			add_trait = scholar
		}
	}
	
	option = {
		name = EVTOPTAHF24238
		scaled_wealth = { value = -0.1 min = -5 max = -100 }
		tiered_piety_reward_effect = yes
		event_target:invited_character = {
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}
	option = {
		name = EVTOPTBHF24238
		
		hidden_tooltip = {
			event_target:invited_character = { 
				death = {
					death_reason = death_missing
				}
			}
		}
	}
}

character_event = { # Mystic character arrives
	id = HF.24239
	desc = { 
		trigger = { 
			ROOT = { 
				is_female = no
			} 
		} 
		picture = GFX_evt_hooded_figure_hf
		text = EVTDESCHFA24239
	}
	desc = { 
		trigger = { 
			ROOT = { 
				is_female = yes
			} 
		} 
		picture = GFX_evt_woman_at_window_hf
		text = EVTDESCHFB24239
	}
	picture = GFX_evt_hooded_figure_hf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	
	immediate = {
		spawn_fantastic_scholar_effect = yes
		event_target:invited_character = {
			add_trait = mystic
			change_intrigue = 12
			remove_trait = honest
			remove_trait = trusting
			remove_trait = kind
			remove_trait = humble
			if = {
				limit = {
					ROOT = {
						OR = {
							religion_group = christian
							religion_group = muslim
						}
					}
				}
				become_heretic = yes
				set_character_flag = ai_flag_refuse_conversion
			}
			else = {
				random_list = {
					25 = {
						religion = zun_pagan
					}
					25 = {
						religion = baltic_pagan
					}
					25 = {
						religion = slavic_pagan
					}
					25 = {
					}
				}
				set_character_flag = ai_flag_refuse_conversion
			}
		}
	}
	
	option = {
		name = EVTOPTAHF24239
		tiered_piety_negative_effect = yes
		event_target:invited_character = {
			opinion = {
				modifier = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}
	option = {
		name = EVTOPTBHF24239
		
		hidden_tooltip = {
			event_target:invited_character = { 
				death = {
					death_reason = death_missing
				}
			}
		}
	}
}

narrative_event = {
	id = HF.24240
	title = EVTTITLEHF24240
	desc = EVTDESCHFA24240
	picture = GFX_evt_china_expansionist
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury"
		NOT = {
			any_owned_bloodline = { 
				has_bloodline_flag = created_bloodline
			}
		}
	}
	
	option = { #Gain Chinese Imperialism bloodline
		name = EVTOPTAHF24240
		if = { 
			limit = { is_female = no }
			create_bloodline = {
				type = chinese_imperial_bloodline_01
			}		
		}
		if = { 
			limit = { is_female = yes }
			create_bloodline = {
				type = chinese_imperial_bloodline_01
				inheritance = matrilineal
			}		
		}
		ai_chance = { 
			factor = 100
		}
	}
}

#Matilde's (or similar) bloodline. Fired on_war_ended_victory of an Antipapal/Excommunication war against the HREmperor.
# From = Attacker, Root = Defender
character_event = {
	id = HF.24250
	hide_window = yes
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
		NOT = { has_global_flag = flag_matilde_bloodline } #Just once.
		FROM = {  #Must be attacker.
			is_feudal = yes
			is_adult = yes
			is_alternate_start = no
			lower_tier_than = EMPEROR
			religion = catholic
			is_heretic = no
			piety = 500
			NOT = { realm_size = 120 } 
			religion_head = { 
				has_landed_title = k_papal_state #Under the real Pope, no imitations.
				NOT = { is_rival = PREV }
				opinion = { who = PREV value = 25 } #At the very least in somewhat good terms...
			} 
			NOR = { #Not if already Forger of a Bloodline, or owner of a Forged Bloodline.
				any_owned_bloodline = { 
					has_bloodline_flag = created_bloodline
				}
				any_owned_bloodline = { 
					founder = {
						character = PREVPREV
					}
				}
			}
			NOR = { #No glaring spots on reputation
				trait = incapable
				trait = excommunicated
				trait = lustful
				trait = gluttonous
				trait = greedy
				trait = proud
				trait = slothful
				trait = envious
				trait = wroth
				trait = heresiarch
				trait = crowned_by_myself
				has_character_modifier = adulteress
				has_character_modifier = incestuous_adulteress
				has_character_modifier = modifier_witch
				has_character_modifier = consorts_with_infidels
				has_character_modifier = consorts_with_mystics
				any_child = { trait = bastard }
				any_child = { trait = legit_bastard }
			}
			calc_true_if = { #And at least a couple of virtues
				amount = 2 
				trait = zealous
				trait = chaste
				trait = diligent
				trait = humble
				trait = charitable
				trait = temperate
				trait = kind
				trait = patient
				trait = celibate
				trait = theologian
				trait = nun
				piety = 1000
			}
			OR = {
				is_married = yes
				NOT = { num_of_children = 1 }
			}
			OR = { #Either below King-tier, or must be either a Crowned Queen or a Vicereine.
				lower_tier_than = KING
				is_vice_royalty = yes
				trait = crowned_by_priest
				trait = crowned_by_bishop
				trait = crowned_by_pope
				has_character_flag = flag_excommunicated_for_coronation
			}
		}
		ROOT = { 
			has_landed_title = e_hre
			any_war = { 
				OR = { 
					using_cb = excommunicated_ruler 
					using_cb = depose_antipope
				}
				any_attacker = { character = FROM }
			}
		}
	}
	immediate = { 
		set_global_flag = flag_matilde_bloodline
		ROOT = {
			save_event_target_as = defeated_emperor
		}	
		FROM = {
			religion_head = {
				save_event_target_as = scoped_pope
			}
			narrative_event = { id = HF.24251 days = 20 }
		}
	}
}

narrative_event = {
	id = HF.24251
	title = EVTTITLEHF24251
	desc = {
		trigger = {
			character = 7757 #Special loc for Matilde.
		}
		text = EVTDESCAHF24251
	}
	desc = {
		trigger = {
			NOT = { character = 7757 } #Generic if just similar ruler.
		}
		text = EVTDESCBHF24251
	}
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
	}
	
	option = {
		name = EVTOPTAHF24251
		catholic = {
			show_scope_change = no
			religion_authority = {
				modifier = restored_primacy
				years = 50
			}
		}
		if = { 
			limit = { 
				this_has_cool_nickname_trigger = no 
				this_has_super_cool_nickname_trigger = no 
			}
			give_nickname = nick_the_sword_of_god
		}
		if = { 
			limit = { character = 7757 }
			create_bloodline = {
				type = true_matilde_bloodline
			}	
		}
		else_if = {
			limit = { is_female = yes } 
			create_bloodline = {
				type = matilde_bloodline
			}	
		}
		else_if = {
			limit = { is_female = no } 
			create_bloodline = {
				type = matilde_male_bloodline
			}	
		}
		hidden_tooltip = { 
			any_player = { 
				limit = { 
					is_within_diplo_range = ROOT 
					NOT = { character = event_target:defeated_emperor }
					NOT = { character = ROOT }
					religion = ROOT
				}	
				narrative_event = { id = HF.24252 days = 1 }	
			}
			event_target:defeated_emperor = { 
				narrative_event = { id = HF.24253 days = 1 }	
			}
		}
		ai_chance = { 
			factor = 100
		}
	}
	option = {
		name = EVTOPTBHF24251
		tiered_piety_reward_effect = yes
		catholic = {
			show_scope_change = no
			religion_authority = {
				modifier = restored_primacy
				years = 50
			}
		}
		ai_chance = { 
			factor = 0
		}
	}
}

narrative_event = {
	id = HF.24252
	title = EVTTITLEHF24252
	desc = EVTDESCAHF24252
	desc = {
		trigger = {
			FROM = { character = 7757 } 
		}
		text = EVTDESCAHF24252
	}
	desc = {
		trigger = {
			FROM = { NOT = { character = 7757 } } 
		}
		text = EVTDESCBHF24252
	}
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
	}

	option = {
		name = EVTOPTAHF24252
		ai_chance = { 
			factor = 100
		}
	}
}

narrative_event = {
	id = HF.24253
	title = EVTTITLEHF24252
	desc = {
		trigger = {
			FROM = { character = 7757 } 
		}
		text = EVTDESCAHF24253
	}
	desc = {
		trigger = {
			FROM = { NOT = { character = 7757 } } 
		}
		text = EVTDESCBHF24253
	}
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_narrative_frame_war
	sound = bloodline_added
	
	is_triggered_only = yes

	trigger = { 
		has_dlc = "Holy Fury" 
	}

	option = {
		name = EVTOPTAHF24253
		tiered_piety_negative_effect = yes
		if = { 
			limit = { 
				NOT = { is_rival = FROM }
			}
			add_rival = FROM
		}
		if = { 
			limit = { 
				FROM = { 
					character = 7757
				}
			}
			e_hre = { 
				show_scope_change = no
				holder_scope = { 
					show_scope_change = no
					any_vassal = { 
						limit = {
							lower_real_tier_than = KING
							culture = italian
							is_landed = yes
							capital_scope = {
								region = world_europe_south_italy
							}
						}
						show_scope_change = no
						set_defacto_liege = THIS
					}
				}
			}
		}
		ai_chance = { 
			factor = 100
		}
	}
}