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

namespace = HF

# Great warrior character chance
character_event = {
	id = HF.99

	is_triggered_only = yes # on_five_year_pulse
	hide_window = yes

	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_heroes
			bloodline_is_active_for = PREV

			founder = {
				religion = ROOT
				NOT = { character = ROOT }
			}
		}

		NOT = {
			any_courtier_or_vassal = {
				count >= 4
				has_character_flag = bloodline_great_hero
			}
		}
	}

	immediate = {
		random_list = {
			80 = {
				mult_modifier = {
					factor = 0.75
					lower_real_tier_than = DUKE
				}

				mult_modifier = {
					factor = 0.75
					lower_real_tier_than = KING
				}

				mult_modifier = {
					factor = 0.75

					any_courtier_or_vassal = {
						count >= 2
						has_character_flag = bloodline_great_hero
					}
				}

				mult_modifier = {
					factor = 0.75

					any_courtier_or_vassal = {
						count >= 3
						has_character_flag = bloodline_great_hero
					}
				}

				character_event = { id = HF.100 }
			}

			20 = {
				mult_modifier = {
					factor = 3
					ai = yes
				}
			}
		}
	}
}

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

	is_triggered_only = yes
	show_root = yes

	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16

	immediate = {
		random_owned_bloodline = {
			limit = {
				has_bloodline_flag = bloodline_heroes
				bloodline_is_active_for = PREV

				founder = {
					religion = ROOT
					NOT = { character = 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_courtier_or_vassal= {
				has_minor_title = title_commander
				martial < 12
				lower_real_tier_than = COUNT
			}

			NOT = { can_grant_title = title_commander }
		}

		random_courtier_or_vassal = {
			show_scope_change = no

			limit = {
				has_minor_title = title_commander
				martial < 12
				lower_real_tier_than = COUNT
			}

			remove_title = title_commander

			opinion = {
				name = insulted
				who = ROOT
				years = 2
			}
		}

		event_target:invited_character = {
			show_scope_change = no

			give_minor_title = title_commander

			opinion = {
				name = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}

	option = {
		name = EVTOPTA_NE_1

		trigger = {
			can_grant_title = title_commander
			byzantines_can_grant_commander_trigger = yes

			event_target:invited_character = {
				has_character_flag = invited_soldier
			}
		}

		event_target:invited_character = {
			show_scope_change = no

			give_minor_title = title_commander

			opinion = {
				name = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}

	option = {
		name = FANTASTIC

		reverse_opinion = {
			name = opinion_loyal_servant
			who = event_target:invited_character
			years = 100
		}
	}

	option = {
		name = EVTOPTB_HF_100

		hidden_effect = {
			event_target:invited_character = {
				death = { death_reason = death_missing }
			}
		}
	}
}

# Sympathy for founder group
character_event = {
	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 = {
			bloodline_is_active_for = PREV

			founder = {
				NOT = { religion_group = ROOT }
				is_alive = no

				trigger_if = {
					limit = { religion_group = pagan_group }
					ROOT = { NOT = { trait = sympathy_pagans } }
				}
				trigger_else_if = {
					limit = { religion_group = christian }
					ROOT = { NOT = { trait = sympathy_christendom } }
				}
				trigger_else_if = {
					limit = { religion_group = muslim }
					ROOT = { NOT = { trait = sympathy_islam } }
				}
				trigger_else_if = {
					limit = { religion_group = zoroastrian_group }
					ROOT = { NOT = { trait = sympathy_zoroastrianism } }
				}
				trigger_else_if = {
					limit = { religion_group = jewish_group }
					ROOT = { NOT = { trait = sympathy_judaism } }
				}
				trigger_else = {
					religion_group = indian_group
					ROOT = { NOT = { trait = sympathy_indian } }
				}
			}
		}
	}

	immediate = {
		random_owned_bloodline = {
			limit = {
				founder = {
					NOT = { religion_group = ROOT }
					is_alive = no

					trigger_if = {
						limit = { religion_group = pagan_group }
						ROOT = { NOT = { trait = sympathy_pagans } }
					}
					trigger_else_if = {
						limit = { religion_group = christian }
						ROOT = { NOT = { trait = sympathy_christendom } }
					}
					trigger_else_if = {
						limit = { religion_group = muslim }
						ROOT = { NOT = { trait = sympathy_islam } }
					}
					trigger_else_if = {
						limit = { religion_group = zoroastrian_group }
						ROOT = { NOT = { trait = sympathy_zoroastrianism } }
					}
					trigger_else_if = {
						limit = { religion_group = jewish_group }
						ROOT = { NOT = { trait = sympathy_judaism } }
					}
					trigger_else = {
						religion_group = indian_group
						ROOT = { NOT = { 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
		remove_trait_silently_cynical_effect = yes
		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 }
	}
}

# Chance of gaining a personality trait of Founder
character_event = {
	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 = {
			bloodline_is_active_for = PREV

			trigger_if = {
				limit = { has_bloodline_flag = saintly_bloodline }
				ROOT = { religion_group = christian }
			}

			founder = {
				is_alive = no
				NOT = { character = ROOT }
				ROOT = { can_copy_personality_trait_from = PREV }
			}
		}
	}

	immediate = {
		set_character_flag = had_bloodline_personality_event

		random_owned_bloodline = {
			limit = {
				trigger_if = {
					limit = { has_bloodline_flag = saintly_bloodline }
					ROOT = { religion_group = christian }
				}

				founder = {
					is_alive = no
					NOT = { character = ROOT }
					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 }

			event_target:target_bloodline_founder = {
				trait = cannibal
			}
		}

		add_trait = cannibal
	}

	option = {
		name = EVTOPTC_HF_120
		tooltip_info = possessed

		trigger = {
			trait = possessed

			NOR = {
				trait = cannibal
				trait = lunatic
			}

			event_target:target_bloodline_founder = {
				trait = cannibal
			}
		}
	}

	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

	is_triggered_only = yes
	show_from_from = yes

	has_dlc = "Holy Fury"
	only_men = yes

	trigger = {
		NOR = {
			has_global_flag = flag_phalaris_bloodline
			has_dynasty_flag = flag_phalaris_event
		}
	}

	immediate = {
		# If Character says no first time, event never fires again for his dynasty.
		set_dynasty_flag = flag_phalaris_event
	}

	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 }
	#	}
	#	else = {
	#		create_bloodline = { type = phalaris_female }
	#		new_bloodline = { set_description = bloodline_desc_phalaris }
	#	}

		hidden_effect = { 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

			mult_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

			mult_modifier = {
				factor = 1.5
				trait = charitable
			}

			mult_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

		death = {
			death_reason = death_execution_brazen_bull
			killer = FROM
		}

		FROM = { character_event = { id = HF.24002 } }
	}
}

# Host notified of death by brazen bull - First time.
character_event = {
	id = HF.24002
	picture = GFX_evt_beheading
	border = GFX_event_normal_frame_intrigue

	desc = {
		text = EVTDESCAHF24002
		trigger = { has_character_modifier = brazen_bull }
	}
	desc = {
		text = EVTDESCBHF24002
		trigger = {
			NOT = { has_character_modifier = brazen_bull }
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24002

		narrative_event = {
			id = HF.24000 # Apply bloodline after rumors spread
			months = 1
			random = 80
		}

		tiered_piety_negative_effect = yes
	}
}

# Killed by brazen bull - from targeted 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

	ai = no

	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

	ai = no
	has_dlc = "Holy Fury"

	option = {
		name = EVTOPTAHF24006
	}
}

# Teuta's bloodline. Fired on_war_ended_victory of a war against Byzantium.
# FROM is attacker
# ROOT is defender
character_event = {
	id = HF.24010

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		NOT = { has_global_flag = flag_teuta_bloodline } # Just once

		OR = {
			AND = { # Either won as defender...
				FROM = {
					OR = {
						has_landed_title = e_byzantium
						has_landed_title = e_roman_empire
					}
				}

				ROOT = {
					independent = yes
					is_female = yes
					is_alternate_start = no
					lower_real_tier_than = EMPEROR
					religion_group = pagan_group
					realm_size < 120
					religion_openly_hellenic_or_reformed_trigger = no
					NOT = { culture = roman }

					OR = {
						culture_group = south_slavic
						culture = dalmatian
					}

					capital_scope = {
						OR = {
							de_jure_liege = d_dioclea
							de_jure_liege = d_rashka
						}
					}
				}
			}

			AND = { #...or as attacker
				ROOT = {
					OR = {
						has_landed_title = e_byzantium
						has_landed_title = e_roman_empire
					}
				}

				FROM = {
					independent = yes
					is_female = yes
					is_alternate_start = no
					lower_tier_than = EMPEROR
					religion_group = pagan_group
					realm_size < 120
					religion_openly_hellenic_or_reformed_trigger = no
					NOT = { culture = roman }

					OR = {
						culture_group = south_slavic
						culture = dalmatian
					}

					capital_scope = {
						OR = {
							de_jure_liege = d_dioclea
							de_jure_liege = d_rashka
						}
					}
				}
			}
		}
	}

	immediate = {
		sound_effect = bloodline_added
		set_global_flag = flag_teuta_bloodline

		if = {
			limit = {
				FROM = {
					OR = {
						has_landed_title = e_byzantium
						has_landed_title = e_roman_empire
					}
				}
			}

			FROM = {
				save_event_target_as = defeated_emperor
			}

			set_character_flag = flag_defensive_teuta
			narrative_event = { id = HF.24011 days = 20 }
		}
		else = {
			save_event_target_as = defeated_emperor

			FROM = {
				set_character_flag = flag_offensive_teuta
				narrative_event = { id = HF.24011 days = 20 }
			}
		}
	}
}

narrative_event = {
	id = HF.24011
	title = EVTTITLEHF24011
	picture = GFX_evt_norse_tempest
	border = GFX_event_narrative_frame_war
	sound = bloodline_added

	desc = {
		text = EVTDESCAHF24011
		trigger = { has_character_flag = flag_offensive_teuta }
	}
	desc = {
		text = EVTDESCBHF24011
		trigger = { has_character_flag = flag_defensive_teuta }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24011

		if = {
			limit = { has_nickname = no }
			give_nickname = nick_the_liberator
		}

		create_bloodline = { type = teuta_female }
		new_bloodline = { set_description = bloodline_desc_teuta }

		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
	picture = GFX_evt_norse_tempest
	border = GFX_event_narrative_frame_war
	sound = bloodline_added

	desc = {
		text = EVTDESCAHF24012
		trigger = {
			OR = {
				has_landed_title = e_byzantium
				has_landed_title = e_roman_empire
			}
		}
	}
	desc = {
		text = EVTDESCBHF24012
		trigger = {
			NOR = {
				has_landed_title = e_byzantium
				has_landed_title = e_roman_empire
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = {
			text = EVTOPTAHF24012
			trigger = {
				OR = {
					has_landed_title = e_byzantium
					has_landed_title = e_roman_empire
				}
			}
		}
		name = {
			text = EVTOPTBHF24012
			trigger = {
				OR = {
					culture_group = byzantine
					culture = roman
					religion_openly_hellenic_or_reformed_trigger = yes
				}

				NOR = {
					has_landed_title = e_byzantium
					has_landed_title = e_roman_empire
				}
			}
		}
		name = {
			text = I_SEE
			trigger = {
				NOR = {
					culture_group = byzantine
					culture = roman
					religion_openly_hellenic_or_reformed_trigger = yes
					has_landed_title = e_byzantium
					has_landed_title = e_roman_empire
				}
			}
		}
	}
}

# on_war_started: Corsair ships arrive for war.
character_event = {
	id = HF.24013

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	immediate = {
		FROM = {
			if = {
				limit = {
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_spawned_ships
						bloodline_is_active_for = PREV
					}

					is_adult = yes
					is_incapable = no

					any_realm_province = {
						is_coastal = yes
						held_under_PREV = yes
					}
				}

				random_list = {
					15 = {
						mult_modifier = {
							factor = 1.5
							trait = brave
						}

						mult_modifier = {
							factor = 1.25
							trait = viking
						}

						mult_modifier = {
							factor = 1.25
							trait = pirate
						}

						mult_modifier = {
							factor = 1.5
							trait = ravager
						}

						mult_modifier = {
							factor = 1.75
							trait = sea_king
						}

						mult_modifier = {
							factor = 1.75
							trait = sea_queen
						}

						character_event = {
							id = HF.24014 # Lots of ships arrive
							days = 25
							random = 40
						}
					}

					60 = {
						character_event = {
							id = HF.24015 # A few ships arrive
							days = 25
							random = 40
						}
					}

					25 = {
						mult_modifier = {
							factor = 1.5
							trait = craven
						}

						mult_modifier = {
							factor = 0.75
							martial >= 10
						}

						mult_modifier = {
							factor = 0.75
							martial >= 14
						}

						mult_modifier = {
							factor = 0.75
							martial >= 18
						}

						mult_modifier = {
							factor = 0.75
							prestige >= 500
						}

						mult_modifier = {
							factor = 0.75
							prestige >= 1000
						}

						mult_modifier = {
							factor = 0.75
							prestige >= 2000
						}

						character_event = {
							id = HF.24016 # Very few ships arrive
							days = 25
							random = 40
						}
					}
				}
			}
		}

		ROOT = {
			if = {
				limit = {
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_spawned_ships
						bloodline_is_active_for = PREV
					}

					is_adult = yes
					is_incapable = no

					any_realm_province = {
						is_coastal = yes
						held_under_PREV = yes
					}
				}

				random_list = {
					15 = {
						mult_modifier = {
							factor = 1.5
							trait = brave
						}

						mult_modifier = {
							factor = 1.25
							trait = viking
						}

						mult_modifier = {
							factor = 1.25
							trait = pirate
						}

						mult_modifier = {
							factor = 1.5
							trait = ravager
						}

						mult_modifier = {
							factor = 1.75
							trait = sea_king
						}

						mult_modifier = {
							factor = 1.75
							trait = sea_queen
						}

						character_event = {
							id = HF.24014 # Lots of ships arrive
							days = 25
							random = 40
						}
					}

					60 = {
						character_event = {
							id = HF.24015 # A few ships arrive
							days = 25
							random = 40
						}
					}

					25 = {
						mult_modifier = {
							factor = 1.5
							trait = craven
						}

						mult_modifier = {
							factor = 0.75
							martial >= 10
						}

						mult_modifier = {
							factor = 0.75
							martial >= 14
						}

						mult_modifier = {
							factor = 0.75
							martial >= 18
						}

						mult_modifier = {
							factor = 0.75
							prestige >= 500
						}

						mult_modifier = {
							factor = 0.75
							prestige >= 1000
						}

						mult_modifier = {
							factor = 0.75
							prestige >= 2000
						}

						character_event = {
							id = HF.24016 # Very few ships arrive
							days = 25
							random = 40
						}
					}
				}
			}
		}
	}
}

# Lots of ships arrive
character_event = {
	id = HF.24014
	picture = GFX_evt_norse_tempest
	border = GFX_event_normal_frame_war

	desc = {
		text = EVTDESCHFA24014
		trigger = { character = event_target:pirate_bloodline_target }
	}
	desc = {
		text = EVTDESCHFB24014
		trigger = {
			NOT = { character = event_target:pirate_bloodline_target }
		}
	}

	is_triggered_only = yes

	immediate = {
		random_owned_bloodline = {
			limit = {
				has_bloodline_flag = bloodline_spawned_ships
				bloodline_is_active_for = PREV
			}

			preferred_limit = {
				founder = { character = ROOT }
			}

			founder = {
				save_event_target_as = pirate_bloodline_target
			}
		}
	}

	option = {
		name = EVTOPTAHF24014

		spawn_fleet = {
			province = closest # closest sea zone
			owner = ROOT
			disband_on_peace = yes
			earmark = pirate_conscripts

			troops = {
				galleys = { 100 100 }
			}
		}
	}
}

# A few ships arrive
character_event = {
	id = HF.24015
	picture = GFX_evt_longships_at_sea_oldgods
	border = GFX_event_normal_frame_war

	desc = {
		text = EVTDESCHFA24015
		trigger = { character = event_target:pirate_bloodline_target }
	}
	desc = {
		text = EVTDESCHFB24015
		trigger = {
			NOT = { character = event_target:pirate_bloodline_target }
		}
	}

	is_triggered_only = yes

	immediate = {
		random_owned_bloodline = {
			limit = {
				has_bloodline_flag = bloodline_spawned_ships
				bloodline_is_active_for = PREV
			}

			preferred_limit = {
				founder = { character = ROOT }
			}

			founder = {
				save_event_target_as = pirate_bloodline_target
			}
		}
	}

	option = {
		name = EVTOPTAHF24015

		spawn_fleet = {
			province = closest # closest sea zone
			owner = ROOT
			disband_on_peace = yes
			earmark = pirate_conscripts

			troops = {
				galleys = { 50 50 }
			}
		}
	}
}

# Very few ships arrive
character_event = {
	id = HF.24016
	picture = GFX_evt_longships_at_sea_oldgods
	border = GFX_event_normal_frame_war

	desc = {
		text = EVTDESCHFA24016
		trigger = { character = event_target:pirate_bloodline_target }
	}
	desc = {
		text = EVTDESCHFB24016
		trigger = {
			NOT = { character = event_target:pirate_bloodline_target }
		}
	}

	is_triggered_only = yes

	immediate = {
		random_owned_bloodline = {
			limit = {
				has_bloodline_flag = bloodline_spawned_ships
				bloodline_is_active_for = PREV
			}

			preferred_limit = {
				founder = { character = ROOT }
			}

			founder = {
				save_event_target_as = pirate_bloodline_target
			}
		}
	}

	option = {
		name = EVTOPTAHF24016

		spawn_fleet = {
			province = closest # closest sea zone
			owner = ROOT
			disband_on_peace = yes
			earmark = pirate_conscripts

			troops = {
				galleys = { 10 10 }
			}
		}
	}
}

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

## Hidden checks and counters first:

# on_death: Check for murders
character_event = {
	id = HF.24017

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		OR = {
			death_murder_unknown_trigger = yes
			death_murder_known_trigger = yes
			death_execution_trigger = yes
		}

		# Not necessary to have the ambition to stack up the variable, but necessary to unlock the bloodline.
		killer = {
			is_playable = yes
			is_landed = yes
			is_incapable = no
			NOT = { has_character_flag = flag_about_to_murder_bloodline }
		}
	}

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

# on_war_ended_victory: check for war variable
# FROM is attacker
# ROOT is defender
character_event = {
	id = HF.24018

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		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
			}
		}
	}


	immediate = {
		FROM = {
			change_variable = {
				which = bloodline_won_wars
				value = 1
			}

			if = { # Pure War Bloodline
				limit = { has_ambition = obj_forge_bloodline }

				if = {
					limit = {
						check_variable = {
							which = bloodline_won_wars
							value >= 15
						}
					}

					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 }
					}

					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

	has_dlc = "Holy Fury"

	trigger = {
		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 = {
			change_variable = {
				which = bloodline_won_wars
				value = 1
			}

			if = { # Pure War Bloodline
				limit = { has_ambition = obj_forge_bloodline }

				if = {
					limit = {
						check_variable = {
							which = bloodline_won_wars
							value >= 15
						}
					}

					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 }
					}

					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

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		check_variable = {
			which = bloodline_peaceful_years
			value < 30
		}
	}


	immediate = {
		change_variable = {
			which = bloodline_peaceful_years
			value = 1
		}

		if = {
			limit = {
				check_variable = {
					which = bloodline_peaceful_years
					value >= 30
				}
			}

			character_event = {
				id = HF.24037 # Pure Peace Bloodline
				days = 25
				random = 25
			}
		}
		else_if = {
			limit = {
				check_variable = {
					which = bloodline_peaceful_years
					value >= 15
				}
			}

			if = {
				limit = {
					check_variable = {
						which = bloodline_murdered_people
						value >= 20
					}
				}

				narrative_event = {
					id = HF.24046 # Murder Peace Hybrid
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = {
						which = bloodline_built_cities
						value >= 5
					}
				}

				narrative_event = {
					id = HF.24049 # Peace Architect Hybrid
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = {
						which = bloodline_built_castles
						value >= 5
					}
				}

				narrative_event = {
					id = HF.24050 # Peace Castellan Hybrid
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = {
						which = bloodline_built_temples
						value >= 5
					}
				}

				narrative_event = {
					id = HF.24051 # Peace Monumental Hybrid
					days = 25
					random = 25
				}
			}
		}

		# Fire again, with yearly delay
		repeat_event = {
			id = HF.24020
			years = 1
		}
	}
}

# on_war_started: Reset peaceful_years variable.
character_event = {
	id = HF.24021

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		OR = {
			has_ambition = obj_forge_bloodline
			FROM = { has_ambition = obj_forge_bloodline }
		}
	}

	immediate = {
		set_variable = { which = bloodline_peaceful_years value = 0 }
		FROM = { set_variable = { which = bloodline_peaceful_years value = 0 } }
	}
}

# on_settlement_construction_completed: check the Architect Bloodline.
character_event = {
	id = HF.24022

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		FROM = { holding_type = city }
		NOT = { has_character_flag = flag_about_to_builder_bloodline }
	}

	immediate = {
		change_variable = { which = bloodline_built_cities value = 1 }
		change_variable = { which = bloodline_built_holdings value = 1 }

		if = {
			limit = { has_ambition = obj_forge_bloodline }

			if = {
				limit = {
					check_variable = {
						which = bloodline_built_cities
						value >= 10
					}
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24042 # Pure Architect bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = {
						which = bloodline_built_holdings
						value >= 24
					}
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24047 # Builder Hybrid bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = { which = bloodline_murdered_people value >= 20 }
					check_variable = { which = bloodline_built_holdings value >= 15 }
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24048 # Murder Builder Hybrid bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = { which = bloodline_peaceful_years value >= 15 }
					check_variable = { which = bloodline_built_cities value >= 5 }
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24049 # Peace Architect Hybrid bloodline
					days = 25
					random = 25
				}
			}
		}
	}
}

# on_settlement_construction_completed: check the Castellan Bloodline.
character_event = {
	id = HF.24023

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		FROM = { holding_type = castle }
		NOT = { has_character_flag = flag_about_to_builder_bloodline }
	}

	immediate = {
		change_variable = { which = bloodline_built_castles value = 1 }
		change_variable = { which = bloodline_built_holdings value = 1 }

		if = {
			limit = { has_ambition = obj_forge_bloodline }

			if = {
				limit = {
					check_variable = {
						which = bloodline_built_castles
						value >= 10
					}
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24043 # Pure Castellan Bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = {
						which = bloodline_built_holdings
						value >= 24
					}
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24047 # Builder Hybrid bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = { which = bloodline_murdered_people value >= 20 }
					check_variable = { which = bloodline_built_holdings value >= 15 }
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24048 # Murder Builder Hybrid bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = { which = bloodline_peaceful_years value >= 15 }
					check_variable = { which = bloodline_built_castles value >= 5 }
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24050 # Peace Castellan Hybrid bloodline
					days = 25
					random = 25
				}
			}
		}
	}
}

# on_settlement_construction_completed: check the Monumental Bloodline.
character_event = {
	id = HF.24024

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		FROM = { holding_type = temple }
		NOT = { has_character_flag = flag_about_to_builder_bloodline }
	}

	immediate = {
		change_variable = { which = bloodline_built_temples value = 1 }
		change_variable = { which = bloodline_built_holdings value = 1 }

		if = {
			limit = { has_ambition = obj_forge_bloodline }

			if = {
				limit = {
					check_variable = {
						which = bloodline_built_temples
						value >= 10
					}
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24044 # Pure Monumental Bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = {
						which = bloodline_built_holdings
						value >= 24
					}
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24047 # Builder Hybrid bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = { which = bloodline_murdered_people value >= 20 }
					check_variable = { which = bloodline_built_holdings value >= 15 }
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24048 # Murder Builder Hybrid bloodline
					days = 25
					random = 25
				}
			}
			else_if = {
				limit = {
					check_variable = { which = bloodline_peaceful_years value >= 15 }
					check_variable = { which = bloodline_built_temples value >= 5 }
				}

				set_character_flag = flag_about_to_builder_bloodline

				narrative_event = {
					id = HF.24051 # Peace Monumental Hybrid bloodline
					days = 25
					random = 25
				}
			}
		}
	}
}

## Bloodline notification events for chosen path

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

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	immediate = {
		# First check if qualifies for Death little helper flavor.
		if = {
			limit = {
				trigger_if = {
					limit = { has_character_flag = flag_forge_bloodline_was_child }
					practical_age < 35 # Should still be somewhat young
				}
				trigger_else = {
					is_adult = no
				}
			}

			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
	picture = GFX_evt_child_reading
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added

	desc = {
		text = EVTDESCHFA24026
		trigger = { practical_age >= 25 }
	}
	desc = {
		text = EVTDESCHFB24026
		trigger = { practical_age < 25 }
	}

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain Murder bloodline
		name = EVTOPTAHF24026

		add_trait_fully_silently_cruel_effect = yes

		hidden_effect = {
			if = {
				limit = { this_has_super_cool_nickname_trigger = no }

				random_list = {
					20 = { give_nickname = nick_the_deaths_child }
					20 = { give_nickname = nick_the_snakeling }
					20 = { give_nickname = nick_the_little_spider }
					20 = { give_nickname = nick_the_eerie }
					20 = { give_nickname = nick_the_little_nightmare }
				}
			}
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_murder_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = pure_murder_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# Adult crossroad for pure Murder Bloodline
character_event = {
	id = HF.24027
	desc = EVTDESCAHF24027
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

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

	option = {
		name = EVTOPTZHF24027

		trigger = {
			trait = cruel

			OR = {
				trait = lunatic
				trait = possessed
				trait = cannibal
			}
		}

		custom_tooltip = { text = TT_EVTOPTZHF24027 }

		if = {
			limit = { NOT = { trait = cannibal } }
			add_trait = cannibal
		}

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }

			if = {
				limit = { is_female = no }
				give_nickname = nick_the_dragon
			}
			else = {
				give_nickname = nick_the_dragoness
			}
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_murder_bloodline_05 }
		}

		narrative_event = { id = HF.24231 }
	}

	option = {
		name = EVTOPTAHF24027

		custom_tooltip = { text = TT_EVTOPTAHF24027 }

		add_trait_fully_silently_cruel_effect = yes

		random = {
			chance = 5
			add_trait_lunatic_effect = yes
		}

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }

			if = {
				limit = { culture_group = latin }
				give_nickname = nick_the_ferrante
			}
			else = {
				give_nickname = nick_the_iron_heart
			}
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_murder_bloodline_02 }
		}

		narrative_event = { id = HF.24028 }
	}

	option = {
		name = EVTOPTBHF24027

		custom_tooltip = { text = TT_EVTOPTBHF24027 }

		add_trait_fully_silently_paranoid_effect = yes

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }

			if = {
				limit = { is_female = no }
				give_nickname = nick_the_pale_spider
			}
			else = {
				give_nickname = nick_the_grim_mistress
			}
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_murder_bloodline_03 }
		}

		narrative_event = { id = HF.24029 }
	}

	option = {
		name = EVTOPTCHF24027

		trigger = {
			is_unattractive_trigger = no

			NOR = {
				trait = celibate
				trait = eunuch
			}
		}

		custom_tooltip = { text = TT_EVTOPTCHF24027 }

		add_trait_fully_silently_cruel_effect = yes

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }

			if = {
				limit = { is_female = no }
				give_nickname = nick_the_ripper
			}
			else = {
				give_nickname = nick_the_black_widow
			}
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_murder_bloodline_04 }
		}

		narrative_event = { id = HF.24030 }
	}
}

# 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

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain Murder bloodline
		name = EVTOPTAHF24231

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_murder_bloodline_05
			}
		}
		else = {
			create_bloodline = {
				type = pure_murder_bloodline_05
				inheritance = matrilineal
			}
		}
	}
}

# 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

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain Murder bloodline
		name = EVTOPTAHF24028

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_murder_bloodline_02
			}
		}
		else = {
			create_bloodline = {
				type = pure_murder_bloodline_02
				inheritance = matrilineal
			}
		}
	}
}

# 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

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain Murder bloodline
		name = EVTOPTAHF24029

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_murder_bloodline_03
			}
		}
		else = {
			create_bloodline = {
				type = pure_murder_bloodline_03
				inheritance = matrilineal
			}
		}
	}
}

# Adult gains pure Murder Bloodline (Ripper)
narrative_event = {
	id = HF.24030
	title = EVTTITLEHF24030
	desc = EVTDESCHF24030
	border = GFX_event_narrative_frame_intrigue
	sound = bloodline_added

	picture = {
		trigger = { is_female = no }
		picture = GFX_evt_cornered_duel_hf
	}
	picture = {
		trigger = { is_female = yes }
		picture = GFX_evt_slit_throat_hf
	}

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain Murder bloodline
		name = EVTOPTAHF24030

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_murder_bloodline_04
			}
		}
		else = {
			create_bloodline = {
				type = pure_murder_bloodline_04
				inheritance = matrilineal
			}
		}
	}
}

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

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	immediate = {
		# First check if qualifies for Death little helper flavor.

		if = {
			limit = {
				trigger_if = {
					limit = { has_character_flag = flag_forge_bloodline_was_child }
					practical_age < 35 # Should still be somewhat young
				}
				trigger_else = {
					is_adult = no
				}
			}

			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
	border = GFX_event_narrative_frame_war
	sound = bloodline_added

	picture = {
		picture = GFX_evt_childrens_crusade
		trigger = { religion_group = christian }
	}
	picture = {
		picture = GFX_evt_child_sword
		trigger = {
			NOT = { religion_group = christian }
		}
	}

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain War bloodline
		name = EVTOPTAHF24032

		add_trait_fully_silently_brave_effect = yes

		hidden_effect = {
			if = {
				limit = { this_has_super_cool_nickname_trigger = no }

				random_list = {
					25 = { give_nickname = nick_the_young_eagle }
					25 = { give_nickname = nick_the_green_warrior }
					25 = { give_nickname = nick_the_warrior_child }
					25 = { give_nickname = nick_the_young_conqueror }
				}
			}
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_war_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = pure_war_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# Adult crossroad for pure War Bloodline.
character_event = {
	id = HF.24033
	desc = EVTDESCAHF24033
	picture = GFX_evt_battle
	border = GFX_event_normal_frame_war

	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

			trigger_if = {
				limit = { is_female = yes }

				OR = { # AltStart
					has_religion_feature = religion_matriarchal
					has_religion_feature = religion_equal
				}
			}
		}

		custom_tooltip = { text = TT_EVTOPTAHF24033 }

		add_trait_fully_silently_brave_effect = yes

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }

			if = {
				limit = { is_female = no }
				give_nickname = nick_the_white_knight
			}
			else = {
				give_nickname = nick_the_virago
			}
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_war_bloodline_02 }
		}

		narrative_event = { id = HF.24034 }
	}

	option = {
		name = EVTOPTBHF24033

		custom_tooltip = { text = TT_EVTOPTBHF24033 }

		add_trait_fully_silently_wroth_effect = yes

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }

			if = {
				limit = { is_female = no }
				give_nickname = nick_the_bloodhound
			}
			else = {
				give_nickname = nick_the_fury
			}
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_war_bloodline_03 }
		}

		narrative_event = { id = HF.24035 }
	}

	option = {
		name = EVTOPTCHF24033
		tooltip_info = learning

		trigger = {
			learning >= 8
			is_dumb_trigger = no
		}

		custom_tooltip = { text = TT_EVTOPTCHF24033 }

		add_trait_fully_silently_diligent_effect = yes

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_warrior_philosopher
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_war_bloodline_04 }
		}

		narrative_event = { id = HF.24036 }
	}
}

# 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

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain War bloodline
		name = EVTOPTAHF24034

		hidden_effect = {
			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
			}
		}
		else = {
			create_bloodline = {
				type = pure_war_bloodline_02
				inheritance = matrilineal
			}
		}
	}
}

# 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

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain War bloodline
		name = EVTOPTAHF24035

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_war_bloodline_03
			}
		}
		else = {
			create_bloodline = {
				type = pure_war_bloodline_03
				inheritance = matrilineal
			}
		}
	}
}

# Adult gains pure War Bloodline (Warrior Philosopher)
narrative_event = {
	id = HF.24036
	title = EVTTITLEHF24036
	desc = EVTDESCHF24036
	picture = GFX_evt_war_planning
	border = GFX_event_narrative_frame_war
	sound = bloodline_added

	is_triggered_only = yes
	hide_from = yes

	option = { # Gain War bloodline
		name = EVTOPTAHF24036

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_war_bloodline_04
			}
		}
		else = {
			create_bloodline = {
				type = pure_war_bloodline_04
				inheritance = matrilineal
			}
		}
	}
}

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

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	immediate = {
		# First check if qualifies for blessed child flavor
		if = {
			limit = {
				trigger_if = {
					limit = { has_character_flag = flag_forge_bloodline_was_child }
					practical_age < 45 # Should still be somewhat young
				}
				trigger_else = {
					is_adult = no
				}
			}

			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

	option = { # Gain Peace bloodline
		name = EVTOPTAHF24038

		add_trait_fully_silently_kind_effect = yes

		hidden_effect = {
			if = {
				limit = { this_has_super_cool_nickname_trigger = no }

				random_list = {
					20 = {
						trigger = { religion_group = christian }
						give_nickname = nick_the_angel
					}

					20 = { give_nickname = nick_the_pure }
					20 = { give_nickname = nick_the_celestial }
					20 = { give_nickname = nick_the_radiant }
					20 = { give_nickname = nick_the_innocent }
				}
			}
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_peace_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = pure_peace_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	# Protect realm
	# Issue great celebrations everywhere

	option = {
		name = EVTOPTAHF24039

		add_trait_fully_silently_kind_effect = yes

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_peace_maker
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_peace_bloodline_02 }
		}

		narrative_event = { id = HF.24040 }
	}

	option = {
		name = EVTOPTBHF24039

		add_trait_fully_silently_charitable_effect = yes

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_munificent
		}

		tooltip = { # Show bloodline effects
			create_bloodline = { type = pure_peace_bloodline_03 }
		}

		narrative_event = { id = HF.24041 }
	}
}

# 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

	option = { # Gain Peace bloodline
		name = EVTOPTAHF24040

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_peace_bloodline_02
			}
		}
		else = {
			create_bloodline = {
				type = pure_peace_bloodline_02
				inheritance = matrilineal
			}
		}
	}
}

# 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

	option = { # Gain Peace bloodline
		name = EVTOPTAHF24041

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_peace_bloodline_03
			}
		}
		else = {
			create_bloodline = {
				type = pure_peace_bloodline_03
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Architect bloodline
		name = EVTOPTAHF24042

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_architect
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_architect_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = pure_architect_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Castellan bloodline
		name = EVTOPTAHF24043

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_castellan
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_castellan_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = pure_castellan_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Monumental bloodline
		name = EVTOPTAHF24044

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }

			if = {
				limit = { religion_group = christian }
				give_nickname = nick_the_carpenter
			}
			else = {
				give_nickname = nick_the_grandiose
			}
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = pure_monumental_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = pure_monumental_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Murder War Hybrid bloodline
		name = EVTOPTAHF24045

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_griffin
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = hybrid_murder_war_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = hybrid_murder_war_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Murder Peace Hybrid bloodline
		name = EVTOPTAHF24046

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_compassionate
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = hybrid_murder_peace_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = hybrid_murder_peace_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Builder Combo Hybrid bloodline
		name = EVTOPTAHF24047

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_founder
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = hybrid_builder_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = hybrid_builder_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Murder Builder Hybrid bloodline
		name = EVTOPTAHF24048

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_bloodlime
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = hybrid_murder_builder_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = hybrid_murder_builder_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Peace Architect Hybrid bloodline
		name = EVTOPTAHF24049

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_patron_of_arts
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = hybrid_peace_architect_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = hybrid_peace_architect_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Peace Castellan Hybrid bloodline
		name = EVTOPTAHF24050

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_bastion_of_capital
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = hybrid_peace_castellan_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = hybrid_peace_castellan_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Gain Peace Monumental Hybrid bloodline
		name = EVTOPTAHF24051

		if = {
			limit = { this_has_super_cool_nickname_trigger = no }
			give_nickname = nick_the_holy_mason
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = hybrid_peace_monumental_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = hybrid_peace_monumental_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

## Event-based Bloodlines
# First event, pick the branch
character_event = {
	id = HF.24052
	title = EVTTITLEHF24052
	desc = EVTDESCHF24052
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_bloodlines
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Becoming Exemplar ruler (Benevolent/Family)
		name = EVTOPTAHF24052

		character_event = {
			id = HF.24053
			days = 150
			random = 150
			tooltip = TT_EVTOPTAHF24052
		}
	}

	option = { # Improving the realm (Religious I/Technology)
		name = EVTOPTBHF24052

		character_event = {
			id = HF.24054
			days = 150
			random = 150
			tooltip = TT_EVTOPTBHF24052
		}
	}

	option = { # Becoming Feared ruler (Religious II/Ruthless)
		name = EVTOPTCHF24052

		character_event = {
			id = HF.24055
			days = 150
			random = 150
			tooltip = TT_EVTOPTCHF24052
		}
	}

	option = { # Refuse event chain
		name = EVTOPTDHF24052

		custom_tooltip = { text = TT_EVTOPTDHF24052 }
	}
}

# Branch 1: Benevolent or Family Bloodline paths
character_event = {
	id = HF.24053
	title = EVTTITLEHF24052
	desc = EVTDESCHF24053
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_bloodlines
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Focus on personal accomplishments
		name = EVTOPTAHF24053

		character_event = {
			id = HF.24056
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24053
		}
	}

	option = { # Focus on dynasty accomplishments
		name = EVTOPTBHF24053

		character_event = {
			id = HF.24059
			days = 150
			random = 250
			tooltip = TT_EVTOPTBHF24053
		}

		piety = -100
	}
}

# Branch 2: Religious Study or Technological Bloodline paths
character_event = {
	id = HF.24054
	title = EVTTITLEHF24052
	desc = EVTDESCHF24054
	border = GFX_event_normal_frame_economy

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_bloodlines
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Focus on increasing religious knowledge throughout the realm
		name = EVTOPTAHF24054

		character_event = {
			id = HF.24062
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24054
		}
	}

	option = { # Focus on technical advancements
		name = EVTOPTBHF24054

		character_event = {
			id = HF.24065
			days = 150
			random = 250
			tooltip = TT_EVTOPTBHF24054
		}
	}
}

# Branch 3: Religious Zealotry or Ruthless Bloodline paths
character_event = {
	id = HF.24055
	title = EVTTITLEHF24052
	desc = EVTDESCHF24055
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_bloodlines
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = { # Focus on pushing religion
		name = EVTOPTAHF24055

		trigger = {
			NOR = {
				has_religion_feature = religion_cosmopolitan
				has_religion_feature = religion_peaceful
			}
		}

		character_event = {
			id = HF.24068
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24055
		}
	}

	option = { # Focus on extertion of loyalty from subjects
		name = EVTOPTBHF24055

		character_event = {
			id = HF.24071
			days = 150
			random = 250
			tooltip = TT_EVTOPTBHF24055
		}
	}
}

## 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
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_bloodlines
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# 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
		tooltip_info = learning

		trigger = { learning >= 18 }

		character_event = {
			id = HF.24057
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		remove_trait_silently_arbitrary_effect = yes
	}

	option = {
		name = EVTOPTBHF24056

		character_event = {
			id = HF.24057
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		remove_trait_silently_arbitrary_effect = yes

		scaled_wealth = {
			value = -2
			min = -500
			max = -900
		}

		prestige = -2000

		add_character_modifier = {
			name = forging_legend_revisiting_laws_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24056

		character_event = {
			id = HF.24057
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		remove_trait_silently_arbitrary_effect = yes
		prestige = -1500

		add_character_modifier = {
			name = forging_legend_revisiting_laws_2
			years = 5
		}
	}

	option = {
		name = EVTOPTDHF24056

		trigger = { learning < 18 }

		character_event = {
			id = HF.24057
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		remove_trait_silently_arbitrary_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		prestige = -900
	}

	option = {
		name = EVTOPTEHF24056

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		ai_chance = { factor = 0 }
	}
}

## Second Row
# Peasants growing needy
character_event = {
	id = HF.24057
	title = EVTTITLEHF24056
	desc = EVTDESCHF24057
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_bloodlines
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# Special diplomacy option - Address the public
	# Give into demands
	# Ignore disobedience
	# Address the public
	# Abandon quest for Bloodline

	option = {
		name = EVTOPTAHF24057
		tooltip_info = diplomacy

		trigger = { diplomacy >= 18 }

		narrative_event = {
			id = HF.24058
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		add_trait_fully_silently_charitable_effect = yes

		add_character_modifier = {
			name = forging_legend_peasant_disobedience_2
			years = 5
		}
	}

	option = {
		name = EVTOPTBHF24057

		narrative_event = {
			id = HF.24058
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		add_trait_fully_silently_charitable_effect = yes

		prestige = -2000

		add_character_modifier = {
			name = forging_legend_peasant_disobedience_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24057

		narrative_event = {
			id = HF.24058
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		add_trait_silently_stressed_effect = yes
		prestige = -1200
	}

	option = {
		name = EVTOPTDHF24057

		trigger = { diplomacy < 18 }

		narrative_event = {
			id = HF.24058
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		add_trait_silently_stressed_effect = yes
		prestige = -600

		add_character_modifier = {
			name = forging_legend_peasant_disobedience_2
			years = 5
		}
	}

	option = {
		name = EVTOPTEHF24057

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		ai_chance = { factor = 0 }
	}
}

# Benevolent Bloodline gained
narrative_event = {
	id = HF.24058
	title = EVTTITLEHF24056
	desc = EVTDESCHF24058
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_bloodlines
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = {
		name = EVTOPTAHF24058

		if = {
			limit = {
				this_has_cool_nickname_trigger = no
				this_has_super_cool_nickname_trigger = no
			}

			give_nickname = nick_the_benevolent
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = event_benevolent_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = event_benevolent_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

## Gaining the Family Bloodline
# First Row - Research family tree
character_event = {
	id = HF.24059
	title = EVTTITLEHF24059
	picture = GFX_evt_library
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24059
		trigger = { num_of_dynasty_members >= 10 }
	}
	desc = {
		text = EVTDESCBHF24059
		trigger = { num_of_dynasty_members < 10 }
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# 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
		tooltip_info = learning

		trigger = { learning >= 18 }

		character_event = {
			id = HF.24060
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		remove_trait_silently_proud_effect = yes
	}

	option = {
		name = EVTOPTBHF24059

		character_event = {
			id = HF.24060
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		remove_trait_silently_proud_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		scaled_wealth = {
			value = -6
			min = -750
			max = -1500
		}

		prestige = -1000
	}

	option = {
		name = EVTOPTCHF24059

		character_event = {
			id = HF.24060
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		remove_trait_silently_proud_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		prestige = -800
	}

	option = {
		name = EVTOPTDHF24059

		trigger = { learning < 18 }

		character_event = {
			id = HF.24060
			days = 2000
			random = 2000
			tooltip  = TT_EVTOPTDHF24056
		}

		remove_trait_silently_proud_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		prestige = -600
	}

	option = {
		name = EVTOPTEHF24059

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		ai_chance = { factor = 0 }
	}
}

# Second Row - Focus on living family members
character_event = {
	id = HF.24060
	title = EVTTITLEHF24059
	picture = GFX_evt_family
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24060
		trigger = { num_of_dynasty_members >= 10 }
	}
	desc = {
		text = EVTDESCBHF24060
		trigger = { num_of_dynasty_members < 10 }
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# Special diplomacy option
	# Complete dedication
	# Partial dedication
	# Minimal dedication
	# Abandon quest for Bloodline

	option = {
		name = EVTOPTAHF24060
		tooltip_info = diplomacy

		trigger = { diplomacy >= 18 }

		narrative_event = {
			id = HF.24061
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		add_trait_fully_silently_kind_effect = yes

		add_character_modifier = {
			name = forging_legend_family_dedication_2
			years = 5
		}
	}

	option = {
		name = EVTOPTBHF24060

		narrative_event = {
			id = HF.24061
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		add_trait_fully_silently_kind_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		add_character_modifier = {
			name = forging_legend_family_dedication_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24060

		narrative_event = {
			id = HF.24061
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		add_trait_fully_silently_kind_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		add_character_modifier = {
			name = forging_legend_family_dedication_2
			years = 5
		}
	}

	option = {
		name = EVTOPTDHF24060

		trigger = { diplomacy < 18 }

		narrative_event = {
			id = HF.24061
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		add_trait_fully_silently_kind_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		add_character_modifier = {
			name = forging_legend_family_dedication_3
			years = 5
		}
	}

	option = {
		name = EVTOPTEHF24060

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		ai_chance = { factor = 0 }
	}
}

# Family Bloodline gained
narrative_event = {
	id = HF.24061
	title = EVTTITLEHF24059
	picture = GFX_evt_family
	border = GFX_event_narrative_frame_diplomacy
	sound = bloodline_added

	desc = {
		text = EVTDESCAHF24061
		trigger = { num_of_dynasty_members >= 10 }
	}
	desc = {
		text = EVTDESCBHF24061
		trigger = { num_of_dynasty_members < 10 }
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	option = {
		name = EVTOPTAHF24061

		if = {
			limit = {
				this_has_cool_nickname_trigger = no
				this_has_super_cool_nickname_trigger = no
			}

			if = {
				limit = { is_female = no }
				give_nickname = nick_the_grand_patriarch
			}
			else = {
				give_nickname = nick_the_grand_matriarch
			}
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = event_family_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = event_family_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

## 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# Special learning option - Lead research yourself
	# Hire famous scholars
	# Hire regular scholars
	# Try private research
	# Abandon quest for Bloodline

	option = {
		name = EVTOPTAHF24062
		tooltip_info = learning

		trigger = { learning >= 18 }

		character_event = {
			id = HF.24063
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		remove_trait_silently_cynical_effect = yes
	}

	option = {
		name = EVTOPTBHF24062

		character_event = {
			id = HF.24063
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		scaled_wealth = {
			value = -5
			min = -750
			max = -1500
		}

		piety = -600
	}

	option = {
		name = EVTOPTCHF24062

		character_event = {
			id = HF.24063
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		remove_trait_silently_cynical_effect = yes

		scaled_wealth = {
			value = -5
			min = -500
			max = -1000
		}

		piety = -300
	}

	option = {
		name = EVTOPTDHF24062

		trigger = { learning < 18 }

		character_event = {
			id = HF.24063
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		scaled_wealth = {
			value = -5
			min = -250
			max = -500
		}

		piety = -500
	}

	option = {
		name = EVTOPTEHF24062

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# Special intrigue option
	# Hire good debaters
	# Hire regular debaters
	# Hire slanderers
	# Abandon quest for Bloodline

	option = {
		name = EVTOPTAHF24063
		tooltip_info = intrigue

		trigger = { intrigue >= 18 }

		narrative_event = {
			id = HF.24061
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		religion_authority = {
			name = theology_debates
			years = 100
		}
	}

	option = {
		name = EVTOPTBHF24063

		narrative_event = {
			id = HF.24061
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		scaled_wealth = {
			value = -5
			min = -750
			max = -1500
		}

		religion_authority = {
			name = theology_debates
			years = 100
		}

		add_character_modifier = {
			name = forging_legend_religious_squabble_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24063

		narrative_event = {
			id = HF.24061
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		add_character_modifier = {
			name = forging_legend_religious_squabble_1
			years = 5
		}
	}

	option = {
		name = EVTOPTDHF24063

		trigger = { intrigue < 18 }

		narrative_event = {
			id = HF.24061
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		add_character_modifier = {
			name = forging_legend_religious_squabble_2
			years = 5
		}

		piety = -300
	}

	option = {
		name = EVTOPTEHF24063

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		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
#
# 	has_dlc = "Holy Fury"
#
# 	trigger = {
# 		has_ambition = obj_forge_bloodline
#
# 		NOT = {
# 			any_owned_bloodline = {
# 				has_bloodline_flag = created_bloodline
#				bloodline_is_active_for = PREV
# 			}
# 		}
# 	}
#
# 	option = {
# 		name = EVTOPTAHF24064
#
# 		if = {
# 			limit = {
# 				this_has_cool_nickname_trigger = no
# 				this_has_super_cool_nickname_trigger = no
# 			}
#
#			give_nickname = nick_the_theologian
# 		}
#
# 		trigger_switch = {
# 			on_trigger = religion_group
#
#			christian = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_01
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_01
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			muslim = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_02
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_02
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			jewish_group = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_03
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_03
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			pagan_group = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_04
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_04
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			zoroastrian_group = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_05
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_05
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			indian_group = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_06
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_peaceful_bloodline_06
#						inheritance = matrilineal
#					}
#				}
#			}
#		}
#
# 		set_bloodline_founder_religion_flag_effect = yes
# 	}
# }

## 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# Special stewardship option - Lead research yourself
	# Scour foreign lands
	# Scour homeland
	# Try private research
	# Abandon quest for Bloodline

	option = {
		name = EVTOPTAHF24065
		tooltip_info = stewardship

		trigger = { stewardship >= 18 }

		character_event = {
			id = HF.24066
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		if = {
			limit = { trait = dull }
			remove_trait = dull
		}

		add_character_modifier = {
			name = forging_legend_searching_philosophers_3
			years = 5
		}
	}

	option = {
		name = EVTOPTBHF24065

		character_event = {
			id = HF.24066
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		scaled_wealth = {
			value = -5
			min = -350
			max = -750
		}

		add_character_modifier = {
			name = forging_legend_searching_philosophers_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24065

		character_event = {
			id = HF.24066
			days = 1000
			random = 1000
			tooltip = 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
		}
	}

	option = {
		name = EVTOPTDHF24065

		trigger = { stewardship < 18 }

		character_event = {
			id = HF.24066
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		add_character_modifier = {
			name = forging_legend_searching_philosophers_3
			years = 5
		}
	}

	option = {
		name = EVTOPTEHF24065

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# Special stewardship option - Lead construction efforts
	# Grandiose library
	# Research study
	# Host within own palace
	# Abandon quest for Bloodline

	option = {
		name = EVTOPTAHF24066
		tooltip_info = stewardship

		trigger = { stewardship >= 18 }

		narrative_event = {
			id = HF.24061
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		if = {
			limit = { trait = dull }
			remove_trait = dull
		}

		add_character_modifier = {
			name = forging_legend_building_infrastructure_3
			years = 5
		}
	}

	option = {
		name = EVTOPTBHF24066

		narrative_event = {
			id = HF.24061
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		add_character_modifier = {
			name = forging_legend_building_infrastructure_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24066

		narrative_event = {
			id = HF.24061
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		add_character_modifier = {
			name = forging_legend_building_infrastructure_2
			years = 5
		}
	}

	option = {
		name = EVTOPTDHF24066

		trigger = { stewardship < 18 }

		narrative_event = {
			id = HF.24061
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		add_character_modifier = {
			name = forging_legend_searching_philosophers_3
			years = 5
		}
	}

	option = {
		name = EVTOPTEHF24066

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		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
#
#	has_dlc = "Holy Fury"
#
#	trigger = {
#		has_ambition = obj_forge_bloodline
#
#		NOT = {
#			any_owned_bloodline = {
#				has_bloodline_flag = created_bloodline
#				bloodline_is_active_for = PREV
#			}
#		}
#	}
#
#	option = {
#		name = EVTOPTAHF24067
#
#		if = {
#			limit = {
#				this_has_cool_nickname_trigger = no
#				this_has_super_cool_nickname_trigger = no
#			}
#
#			give_nickname = nick_the_philosopher
#		}
#
#		if = {
#			limit = { is_female = no }
#
#			create_bloodline = {
#				type = event_technology_bloodline_01
#			}
#		}
#		else = {
#			create_bloodline = {
#				type = event_technology_bloodline_01
#				inheritance = matrilineal
#			}
#		}
#	}
# }

## 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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# 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
		tooltip_info = diplomacy

		trigger = { diplomacy >= 18 }

		character_event = {
			id = HF.24069
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		remove_trait_silently_cynical_effect = yes

		add_character_modifier = {
			name = forging_legend_building_zealotry_2
			years = 5
		}
	}

	option = {
		name = EVTOPTBHF24068

		character_event = {
			id = HF.24069
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		remove_trait_silently_cynical_effect = yes
		piety = -400
	}

	option = {
		name = EVTOPTCHF24068

		character_event = {
			id = HF.24069
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		remove_trait_silently_cynical_effect = yes
		piety = -200
	}

	option = {
		name = EVTOPTDHF24068

		trigger = { diplomacy < 18 }

		character_event = {
			id = HF.24069
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		add_character_modifier = {
			name = forging_legend_building_zealotry_1
			years = 5
		}
	}

	option = {
		name = EVTOPTEHF24068

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		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

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# Special stewardship option - Lead censorship effort
	# Hire inquisitors
	# Hire some inquisitors
	# Lead censorship effort
	# Abandon quest for Bloodline

	option = {
		name = EVTOPTAHF24069
		tooltip_info = stewardship

		trigger = { stewardship >= 18 }

		narrative_event = {
			id = HF.24061
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		remove_trait_silently_cynical_effect = yes

		add_character_modifier = {
			name = forging_legend_censoring_arts_3
			years = 5
		}
	}

	option = {
		name = EVTOPTBHF24069

		narrative_event = {
			id = HF.24061
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		remove_trait_silently_cynical_effect = yes

		scaled_wealth = {
			value = -5
			min = -350
			max = -750
		}

		add_character_modifier = {
			name = forging_legend_censoring_arts_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24069

		narrative_event = {
			id = HF.24061
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		remove_trait_silently_cynical_effect = yes

		scaled_wealth = {
			value = -5
			min = -250
			max = -500
		}

		add_character_modifier = {
			name = forging_legend_censoring_arts_2
			years = 5
		}
	}

	option = {
		name = EVTOPTDHF24069

		trigger = { stewardship < 18 }

		narrative_event = {
			id = HF.24061
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		scaled_wealth = {
			value = -5
			min = -150
			max = -350
		}

		add_character_modifier = {
			name = forging_legend_censoring_arts_3
			years = 5
		}
	}

	option = {
		name = EVTOPTEHF24069

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		ai_chance = { factor = 0 }
	}
}

## Zealot Bloodline gained
# narrative_event = {
# 	id = HF.24070
# 	title = EVTTITLEHF24068
# 	desc = EVTDESCAHF24070
# 	picture = GFX_evt_catching_heretic
# 	border = GFX_event_narrative_frame_religion
# 	sound = bloodline_added
#
# 	is_triggered_only = yes
#
# 	has_dlc = "Holy Fury"
#
#	trigger = {
#		has_ambition = obj_forge_bloodline
#
#		NOT = {
#			any_owned_bloodline = {
#				has_bloodline_flag = created_bloodline
#				bloodline_is_active_for = PREV
#			}
#		}
#	}
#
# 	option = {
# 		name = EVTOPTAHF24070
#
# 		if = {
# 			limit = {
# 				this_has_cool_nickname_trigger = no
# 				this_has_super_cool_nickname_trigger = no
# 			}
#
# 			give_nickname = nick_the_zealot
# 		}
#
# 		trigger_switch = {
#			on_trigger = religion_group
#
#			christian = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_01
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_01
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			muslim = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_02
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_02
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			jewish_group = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_03
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_03
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			pagan_group = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_04
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_04
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			zoroastrian_group = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_05
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_05
#						inheritance = matrilineal
#					}
#				}
#			}
#
#			indian_group = {
#				if = {
#					limit = { is_female = no }
#
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_06
#					}
#				}
#				else = {
#					create_bloodline = {
#						type = event_religion_aggressive_bloodline_06
#						inheritance = matrilineal
#					}
#				}
#			}
#		}
#
# 		set_bloodline_founder_religion_flag_effect = yes
# 	}
# }

## Gaining Ruthless Bloodline
# First Row - Stricter Laws
character_event = {
	id = HF.24071
	title = EVTTITLEHF24071
	desc = EVTDESCHF24071
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_bloodlines
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# 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
		tooltip_info = learning

		trigger = { learning >= 18 }

		character_event = {
			id = HF.24072
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		remove_trait_silently_arbitrary_effect = yes
	}

	option = {
		name = EVTOPTBHF24071

		character_event = {
			id = HF.24072
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		remove_trait_silently_arbitrary_effect = yes

		scaled_wealth = {
			value = -2
			min = -350
			max = -600
		}

		prestige = -1000

		add_character_modifier = {
			name = forging_legend_revisiting_laws_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24071

		character_event = {
			id = HF.24072
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		remove_trait_silently_arbitrary_effect = yes
		prestige = -800

		add_character_modifier = {
			name = forging_legend_revisiting_laws_2
			years = 5
		}
	}

	option = {
		name = EVTOPTDHF24071

		trigger = { learning < 18 }

		character_event = {
			id = HF.24072
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		remove_trait_silently_arbitrary_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		prestige = -600
	}

	option = {
		name = EVTOPTEHF24071

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		ai_chance = { factor = 0 }
	}
}

# Second Row - Deal with protests
character_event = {
	id = HF.24072
	title = EVTTITLEHF24071
	desc = EVTDESCHF24072
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_lunatic
		trigger = {
			NOR = {
				has_religion_feature = religion_patriarchal
				has_religion_feature = religion_matriarchal
			}
		}
	}

	is_triggered_only = yes

	has_dlc = "Holy Fury"

	trigger = {
		has_ambition = obj_forge_bloodline

		NOT = {
			any_owned_bloodline = {
				has_bloodline_flag = created_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}

	# Special intrigue option - Dissenters disappear
	# Martial law, burned villages
	# Hire troops to deal with peasants
	# Ignore protesters
	# Abandon quest for Bloodline

	option = {
		name = EVTOPTAHF24072
		tooltip_info = intrigue

		trigger = { intrigue >= 18 }

		narrative_event = {
			id = HF.24061
			days = 150
			random = 250
			tooltip = TT_EVTOPTAHF24056
		}

		add_trait_fully_silently_cruel_effect = yes
	}

	option = {
		name = EVTOPTBHF24072

		narrative_event = {
			id = HF.24061
			days = 500
			random = 500
			tooltip = TT_EVTOPTBHF24056
		}

		add_trait_fully_silently_cruel_effect = yes
		prestige = -1000

		add_character_modifier = {
			name = forging_legend_martial_law_1
			years = 5
		}
	}

	option = {
		name = EVTOPTCHF24072

		narrative_event = {
			id = HF.24061
			days = 1000
			random = 1000
			tooltip = TT_EVTOPTCHF24056
		}

		add_trait_fully_silently_cruel_effect = yes

		scaled_wealth = {
			value = -2
			min = -350
			max = -600
		}
	}

	option = {
		name = EVTOPTDHF24072

		trigger = { intrigue < 18 }

		narrative_event = {
			id = HF.24061
			days = 2000
			random = 2000
			tooltip = TT_EVTOPTDHF24056
		}

		add_trait_fully_silently_cruel_effect = yes

		if = {
			limit = { trait = stressed }
			health = -0.5
		}
		else = {
			add_trait = stressed
		}

		prestige = -600

		add_character_modifier = {
			name = forging_legend_martial_law_2
			years = 5
		}
	}

	option = {
		name = EVTOPTEHF24072

		custom_tooltip = { text = TT_EVTOPTEHF24056 }

		random = {
			chance = 25
			add_trait_fully_content_effect = yes
		}

		ai_chance = { factor = 0 }
	}
}

## Ruthless Bloodline gained
# narrative_event = {
# 	id = HF.24073
# 	title = EVTTITLEHF24071
# 	desc = EVTDESCAHF24073
# 	border = GFX_event_narrative_frame_intrigue
# 	sound = bloodline_added
#
# 	picture = {
# 		trigger = { has_religion_feature = religion_matriarchal }
# 		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
# 			}
# 		}
# 		picture = GFX_evt_lunatic
# 	}
#
# 	is_triggered_only = yes
#
# 	has_dlc = "Holy Fury"
#
#	trigger = {
#		has_ambition = obj_forge_bloodline
#
#		NOT = {
#			any_owned_bloodline = {
#				has_bloodline_flag = created_bloodline
#				bloodline_is_active_for = PREV
#			}
#		}
#	}
#
# 	option = {
# 		name = EVTOPTAHF24073
#
# 		if = {
# 			limit = {
# 				this_has_cool_nickname_trigger = no
# 				this_has_super_cool_nickname_trigger = no
# 			}
#
#			give_nickname = nick_the_ruthless
# 		}
#
# 		if = {
# 			limit = { is_female = no }
#
# 			create_bloodline = {
# 				type = event_ruthless_bloodline_01
# 			}
# 		}
# 		else = {
# 			create_bloodline = {
# 				type = event_ruthless_bloodline_01
# 				inheritance = matrilineal
# 			}
# 		}
# 	}
# }


########################################################
### 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
	portrait = educator

	is_triggered_only = yes

	min_age = 12
	max_age = 16
	prisoner = no
	only_capable = yes

	trigger = {
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_murder_child
			bloodline_is_active_for = PREV
		}

		intrigue >= 3

		OR = {
			trait = cruel
			trait = deceitful
			trait = brooding
			trait = haughty
		}

		NOR = {
			trait = maimed
			trait = mangled
			trait = kind
			trait = idolizer
			trait = affectionate
		}

		educator = {
			is_inaccessible_or_incapable_trigger = no
			NOT = { is_close_relative = ROOT }

			reverse_opinion = {
				who = ROOT
				value < 50
			}
		}
	}

	option = {
		name = EVTOPTAHF24100

		educator = {
			show_scope_change = no

			character_event = {
				id = HF.24101
				tooltip = TT_EVTOPTAHF24100
			}
		}

		random = {
			chance = 50
			change_intrigue = 1
		}
	}

	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
		tooltip_info = strong

		trigger = { trait = strong }

		FROM = {
			character_event = { id = HF.24102 }
		}
	}

	option = {
		name = EVTOPTAHF24101
		tooltip_info = brawny

		trigger = { trait = brawny }

		FROM = {
			character_event = { id = HF.24102 }
		}
	}

	option = {
		name = EVTOPTBHF24101
		tooltip_info = intrigue

		trigger = { intrigue >= 16 }

		FROM = {
			character_event = { id = HF.24102 }
		}
	}

	option = {
		name = EVTOPTCHF24101

		FROM = {
			character_event = { id = HF.24103 }
		}

		if = {
			limit = { NOT = { vassal_of = FROM } }
			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 = {
			text = EVTOPTAHF24104
			trigger = { dynasty = FROMFROM }
		}
		name = {
			text = 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 # prisoner_macabre_banquet, HF_bloodline_decisions.txt

	ai = no

	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 # prisoner_macabre_banquet, HF_bloodline_decisions.txt

	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 # murder_deflection_decision, HF_bloodline_decisions.txt

	option = {
		name = EVTOPTAHF24107

		trigger = { is_any_kinslayer_trigger = yes }

		if = {
			limit = { intrigue >= 15 }

			trigger_switch = {
				on_trigger = trait

				kinslayer =          { prestige = -500 }
				familial_kinslayer = { prestige = -250 }
				dynastic_kinslayer = { prestige = -150 }
				tribal_kinslayer =   { prestige = -150 }
			}
		}
		else = {
			trigger_switch = {
				on_trigger = trait

				kinslayer =          { prestige = -1000 }
				familial_kinslayer = { prestige =  -500 }
				dynastic_kinslayer = { prestige =  -300 }
				tribal_kinslayer =   { prestige =  -300 }
			}
		}

		trigger_switch = {
			on_trigger = trait

			kinslayer =          { remove_trait = kinslayer }
			familial_kinslayer = { remove_trait = familial_kinslayer }
			dynastic_kinslayer = { remove_trait = dynastic_kinslayer }
			tribal_kinslayer =   { remove_trait = tribal_kinslayer }
		}
	}

	option = {
		name = EVTOPTBHF24107

		trigger = { has_character_modifier = known_murderer }

		if = {
			limit = { intrigue >= 15 }
			prestige = -500
		}
		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_effect = {
			remove_character_modifier = deflection_decision_cooldown
		}
	}

	after = {
		hidden_effect = {
			if = {
				limit = { has_character_modifier = deflection_decision_cooldown }

				random_list = {
					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 becomes 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 = {
			add_trait = stressed
		}
	}
}

# Ruler becomes 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 = {
			add_trait = paranoid
		}
	}
}

# Ruler becomes 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 = {
			add_trait = deceitful
		}
	}
}

# Ruler becomes 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 = {
			add_trait = cruel
		}
	}
}

# Ruler becomes 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 = {
			add_trait = lunatic
		}
	}
}

# Plotter sees an opportunity - assassinate
character_event = {
	id = HF.24113
	desc = EVTDESCHF24113
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_part_of_plot = yes
	only_capable = yes
	prisoner = no

	trigger = {
		any_owned_bloodline = {
			bloodline_is_active_for = PREV
			has_bloodline_flag = bloodline_murder_stalk
		}

		OR = {
			has_plot = plot_kill_character
			has_plot = plot_kill_spouse
		}

		is_plot_active = no

		plot_target_char = {
			OR = {
				at_location = ROOT
				ROOT = { is_inaccessible_trigger = no }
			}

			block_general_event_trigger = no
		}
	}

	mean_time_to_happen = {
		years = 250

		mult_modifier = {
			factor = 0.9
			plot_power >= 0.1
		}

		mult_modifier = {
			factor = 0.9
			plot_power >= 0.2
		}

		mult_modifier = {
			factor = 0.9
			plot_power >= 0.3
		}

		mult_modifier = {
			factor = 0.8
			plot_power >= 0.4
		}

		mult_modifier = {
			factor = 0.8
			plot_power >= 0.5
		}

		mult_modifier = {
			factor = 0.8
			plot_power >= 0.6
		}

		mult_modifier = {
			factor = 0.8
			plot_power >= 0.7
		}

		mult_modifier = {
			factor = 0.8
			plot_power >= 0.8
		}

		mult_modifier = {
			factor = 0.7
			plot_power >= 0.9
		}

		mult_modifier = {
			factor = 0.7
			plot_power >= 1.0
		}

		mult_modifier = {
			factor = 0.6
			plot_power >= 1.5
		}

		mult_modifier = {
			factor = 0.5
			plot_power >= 2.0
		}

		mult_modifier = {
			factor = 0.9
			intrigue >= 10
		}

		mult_modifier = {
			factor = 0.9
			intrigue >= 12
		}

		mult_modifier = {
			factor = 0.9
			intrigue >= 14
		}

		mult_modifier = {
			factor = 0.8
			intrigue >= 16
		}

		mult_modifier = {
			factor = 0.7
			intrigue >= 18
		}

		mult_modifier = {
			factor = 0.6
			intrigue >= 20
		}
	}

	immediate = {
		save_event_target_as = assassin_plot_owner
		plot_target_char = { save_event_target_as = plot_target }
	}

	# Do it
	option = {
		name = EVTOPTAHF24113

		custom_tooltip = {
			text = EVTOPTA_HF24113_TOOLTIP

			activate_plot = yes

			event_target:plot_target = {
				character_event = {
					id = HF.24114
					days = 7
				}
			}
		}
	}

	# Wait
	option = {
		name = EVTOPTBHF24113

		custom_tooltip = { text = EVTOPTB_HF24113_TOOLTIP }
	}
}

# Assassination attempt
character_event = {
	id = HF.24114
	desc = EVTDESCHF24114
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes
	hide_from = yes

	trigger = {
		is_plot_active = yes

		plot_target_char = {
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHF24114

		hidden_effect = {
			random_list = {
				60 = { # Die
					random_list = {
						75 = { # Not discovered
							mult_modifier = {
								factor = 1.5
								FROM = { intrigue >= 12 }
							}

							mult_modifier = {
								factor = 1.5
								FROM = { intrigue >= 15 }
							}

							character_event = {
								id = HF.24115
								days = 3
							}
						}

						25 = { # Discovered
							mult_modifier = {
								factor = 1.5
								FROM = { intrigue < 8 }
							}

							mult_modifier = {
								factor = 1.5
								FROM = { intrigue < 5 }
							}

							character_event = {
								id = HF.24118
								days = 3
							}

							FROM = {
								character_event = { id = 10 } # Consequences of discovery
							}
						}
					}

					mult_modifier = {
						factor = 1.3
						attribute_diff = { character = FROM attribute = intrigue value <= -2 }
					}

					mult_modifier = {
						factor = 1.3
						attribute_diff = { character = FROM attribute = intrigue value <= -4 }
					}

					mult_modifier = {
						factor = 1.3
						attribute_diff = { character = FROM attribute = intrigue value <= -6 }
					}

					mult_modifier = {
						factor = 1.3
						combat_rating_diff = { character = FROM value <= -10 }
					}

					mult_modifier = {
						factor = 1.3
						combat_rating_diff = { character = FROM value <= -20 }
					}

					mult_modifier = {
						factor = 1.3
						combat_rating_diff = { character = FROM value <= -30 }
					}
				}

				40 = { # Survive
					random_list = {
						50 = { # Not discovered
							mult_modifier = {
								factor = 1.5
								FROM = { intrigue >= 12 }
							}

							mult_modifier = {
								factor = 1.5
								FROM = { intrigue >= 15 }
							}

							character_event = {
								id = HF.24121
								days = 3
							}
						}

						25 = { # Discovered and wounded
							mult_modifier = {
								FROM = { intrigue < 8 }
								factor = 1.5
							}

							mult_modifier = {
								FROM = { intrigue < 5 }
								factor = 1.5
							}

							character_event = {
								id = HF.24124
								days = 3
							}

							FROM = {
								character_event = { id = 11 } # Consequences of discovery
							}
						}

						25 = { # Killed assailant
							mult_modifier = {
								factor = 1.3
								combat_rating_diff = { character = FROM value >= 10 }
							}

							mult_modifier = {
								factor = 1.3
								combat_rating_diff = { character = FROM value >= 20 }
							}

							mult_modifier = {
								factor = 1.3
								combat_rating_diff = { character = FROM value >= 30 }
							}

							character_event = {
								id = HF.24127
								days = 3
							}

							FROM = {
								character_event = { id = 11 } # Consequences of discovery
							}
						}
					}

					mult_modifier = {
						factor = 1.3
						attribute_diff = { character = FROM attribute = intrigue value >= 2 }
					}

					mult_modifier = {
						factor = 1.3
						attribute_diff = { character = FROM attribute = intrigue value >= 4 }
					}

					mult_modifier = {
						factor = 1.3
						attribute_diff = { character = FROM attribute = intrigue value >= 6 }
					}

					mult_modifier = {
						factor = 1.3
						combat_rating_diff = { character = FROM value >= 10 }
					}

					mult_modifier = {
						factor = 1.3
						combat_rating_diff = { character = FROM value >= 20 }
					}

					mult_modifier = {
						factor = 1.3
						combat_rating_diff = { character = FROM value >= 30 }
					}
				}
			}
		}
	}
}

# Plot target dies, undiscovered
character_event = {
	id = HF.24115
	desc = EVTDESCHF24115
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes
	hide_from = yes

	immediate = {
		event_target:assassin_plot_owner = {
			character_event = { id = HF.24116 }
		}

		if = {
			limit = { multiplayer = yes }

			death = {
				death_reason = death_murder_unknown
				killer = event_target:assassin_plot_owner
			}
		}
	}

	option = {
		name = EVTOPTAHF24115

		if = {
			limit = { multiplayer = no }

			death = {
				death_reason = death_murder_unknown
				killer = event_target:assassin_plot_owner
			}
		}
		else = {
			tooltip = {
				death = {
					death_reason = death_murder_unknown
					killer = event_target:assassin_plot_owner
				}
			}
		}
	}
}

# Assassin notified of "Plot target dies, undiscovered"
character_event = {
	id = HF.24116
	desc = EVTDESCHF24116
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24116

		tooltip = {
			FROM = {
				show_scope_change = no

				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_real_tier_than = DUKE } }
				add_society_currency_major_effect = yes
			}
			else_if = {
				limit = { event_target:plot_target = { real_tier = DUKE } }
				add_society_currency_medium_effect = yes
			}
			else = {
				add_society_currency_minor_effect = yes
			}
		}
	}
}

# Plot target dies, discovered
character_event = {
	id = HF.24118
	desc = EVTDESCHF24118
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes
	hide_from = yes

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

		if = {
			limit = { multiplayer = yes }

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

	option = {
		name = EVTOPTAHF24118

		if = {
			limit = { multiplayer = no }

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

# Assassin notified of "Plot target dies, discovered"
character_event = {
	id = HF.24119
	desc = EVTDESCHF24119
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24119

		tooltip = {
			FROM = {
				show_scope_change = no

				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_real_tier_than = DUKE } }
				add_society_currency_major_effect = yes
			}
			else_if = {
				limit = { event_target:plot_target = { real_tier = DUKE } }
				add_society_currency_medium_effect = yes
			}
			else = {
				add_society_currency_minor_effect = yes
			}
		}
	}
}

# Plot target survives, undiscovered
character_event = {
	id = HF.24121
	desc = EVTDESCHF24121
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes
	hide_from = yes

	immediate = {
		event_target:assassin_plot_owner = {
			character_event = { id = HF.24122 }
			activate_plot = no
		}
	}

	option = {
		name = EVTOPTAHF24121
	}
}

# Assassin notified of "Plot target survives, undiscovered"
character_event = {
	id = HF.24122
	desc = EVTDESCHF24122
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHF24122
	}
}

# Plot target survives, wounded
character_event = {
	id = HF.24124
	desc = EVTDESCHF24124
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24124

		event_target:assassin_plot_owner = {
			show_scope_change = no

			random_list = {
				70 = {
					tooltip = { add_trait = wounded }
					set_character_flag = assassin_wounded
				}

				30 = {
					tooltip = { add_maimed_trait_effect = yes }
					set_character_flag = assassin_maimed
				}
			}

			character_event = { id = HF.24125 }
		}
	}
}

# Assassin notified of "Plot target survives, wounded"
character_event = {
	id = HF.24125
	desc = EVTDESCHF24125
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	immediate = {
		activate_plot = no
	}

	option = {
		name = EVTOPTAHF24124

		if = {
			limit = { has_character_flag = assassin_wounded }

			add_trait_silently_wounded_effect = yes
			clr_character_flag = assassin_wounded
		}
		else = {
			add_maimed_trait_effect = yes
			clr_character_flag = assassin_maimed
		}

	}
}

# Plot target survives, killed
character_event = {
	id = HF.24127
	desc = EVTDESCHF24127
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	immediate = {
		event_target:assassin_plot_owner = {
			character_event = { id = HF.24128 }
			activate_plot = no
		}
	}

	option = {
		name = EVTOPTAHF24127

		tooltip = {
			event_target:assassin_plot_owner = {
				show_scope_change = no

				death = {
					death_reason = death_battle
					killer = event_target:plot_target
				}
			}
		}
	}
}

# Assassin notified of "Plot target survives, killed"
character_event = {
	id = HF.24128
	desc = EVTDESCHF24128
	border = GFX_event_normal_frame_intrigue

	picture = {
		picture = GFX_evt_cornered_duel_hf
		trigger = { is_female = no }
	}
	picture = {
		picture = GFX_evt_slit_throat_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { multiplayer = yes }

			death = {
				death_reason = death_battle
				killer = event_target:plot_target
			}
		}
	}

	option = {
		name = EVTOPTAHF24128

		if = {
			limit = { multiplayer = no }

			death = {
				death_reason = death_battle
				killer = event_target:plot_target
			}
		}
		else = {
			tooltip = {
				death = {
					death_reason = death_battle
					killer = event_target:plot_target
				}
			}
		}
	}
}

# Knight Bloodline
# Bards/Knights arriving at court.
character_event = {
	id = HF.24129

	is_triggered_only = yes
	hide_window = yes

	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_knights
			bloodline_is_active_for = PREV

			founder = {
				religion_group = christian
				NOT = { character = ROOT }
			}
		}

		piety >= 50
	}

	immediate = {
		random_list = {
			60 = { # Knight
				character_event = { id = HF.24130 }
			}

			60 = { # Bard
				character_event = { id = HF.24131 }
			}

			80 = {
				mult_modifier = {
					factor = 3
					ai = yes
				}

				mult_modifier = {
					factor = 1.35
					lower_real_tier_than = DUKE
				}

				mult_modifier = {
					factor = 1.35
					lower_real_tier_than = KING
				}

				mult_modifier = {
					factor = 1.75
					is_evil_trigger = yes
				}

				mult_modifier = {
					factor = 0.65
					is_benevolent_trigger = yes
				}

				mult_modifier = {
					factor = 1.35

					any_courtier_or_vassal = {
						count = 2

						any_owned_bloodline = {
							has_bloodline_flag = bloodline_knights
							bloodline_is_active_for = PREV
						}
					}
				}

				mult_modifier = {
					factor = 1.35

					any_courtier_or_vassal = {
						count = 3

						any_owned_bloodline = {
							has_bloodline_flag = bloodline_knights
							bloodline_is_active_for = PREV
						}
					}
				}
			}
		}
	}
}

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

	is_triggered_only = yes

	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 = {
			NOT = { can_grant_title = title_commander }

			any_courtier_or_vassal = {
				has_minor_title = title_commander
				martial < 12
				lower_real_tier_than = COUNT
			}

			byzantines_can_grant_commander_trigger = yes
		}

		random_courtier_or_vassal = {
			show_scope_change = no

			limit = {
				has_minor_title = title_commander
				martial < 12
				lower_real_tier_than = COUNT
			}

			remove_title = title_commander

			opinion = {
				name = insulted
				who = ROOT
				years = 2
			}
		}

		event_target:invited_character = {
			show_scope_change = no

			give_minor_title = title_commander

			opinion = {
				name = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}

	option = {
		name = EVTOPTAHF24130

		trigger = {
			can_grant_title = title_commander
			byzantines_can_grant_commander_trigger = yes
			event_target:invited_character = { has_character_flag = invited_soldier }
		}

		event_target:invited_character = {
			show_scope_change = no

			give_minor_title = title_commander

			opinion = {
				name = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}
	}

	option = {
		name = FANTASTIC

		reverse_opinion = {
			name = opinion_loyal_servant
			who = event_target:invited_character
			years = 100
		}
	}

	option = {
		name = EVTOPTCHF24130

		hidden_effect = {
			event_target:invited_character = {
				death = { death_reason = death_missing }
			}
		}
	}
}

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

	is_triggered_only = yes

	immediate = {
		spawn_fantastic_diplomat_effect = yes

		event_target:invited_character = {
			add_trait = poet
		}
	}

	option = {
		name = EVTOPTAHF24131

		reverse_opinion = {
			name = opinion_loyal_servant
			who = event_target:invited_character
			years = 100
		}
	}

	option = {
		name = EVTOPTCHF24130

		hidden_effect = {
			event_target:invited_character = {
				death = { death_reason = death_missing }
			}
		}
	}
}

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

	is_triggered_only = yes # on_five_year_pulse
	hide_window = yes

	religion_group = christian
	only_women = yes
	min_age = 16
	max_age = 30
	only_capable = yes
	prisoner = no
	friends = no

	trigger = {
		is_ruler = no
		is_married = no
		has_children = no
		num_of_lovers < 1

		NOR = {
			trait = nun
			trait = brave
			trait = content
			has_character_flag = special_marshal
			has_religion_feature = religion_matriarchal
		}

		OR = {
			NOT = { religion = liege }
			is_rival = liege

			opinion = {
				who = liege
				value < -40
			}
		}

		liege = {
			any_neighbor_independent_ruler = {
				any_owned_bloodline = {
					has_bloodline_flag = bloodline_knights
					bloodline_is_active_for = PREV
				}

				religion = ROOT
				is_adult = yes
				is_incapable = no
			}
		}

	}

	immediate = {
		random = {
			chance = 5

			random_neighbor_independent_ruler = {
				limit = {
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_knights
						bloodline_is_active_for = PREV
					}

					religion = ROOT
					is_adult = yes
					is_incapable = no
				}

				character_event = { id = HF.24133 }
			}
		}
	}
}

# Woman asks for assistance
character_event = {
	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
			can_marry = FROM
			is_female = no
		}

		FROM = {
			show_scope_change = no

			liege = {
				show_scope_change = no

				opinion = {
					name = opinion_outraged
					who = ROOT
					years = 100
				}
			}
		}

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_saved_me
				who = ROOT
				years = 100
			}


			if = {
				limit = { is_betrothed = yes }
				break_betrothal = yes
			}

			if = {
				limit = { is_married = yes } # Multiplayer delay
				remove_spouse = yes
			}

			move_character = ROOT
			add_spouse = ROOT
			add_lover = ROOT
		}
	}

	option = {
		name = EVTOPTBHF24133

		FROM = {
			show_scope_change = no

			liege = {
				show_scope_change = no

				opinion = {
					name = opinion_outraged
					who = ROOT
					years = 100
				}
			}

			opinion = {
				name = opinion_saved_me
				who = ROOT
				years = 100
			}

			if = {
				limit = { is_betrothed = yes }
				break_betrothal = yes
			}

			if = {
				limit = { is_married = yes } # Multiplayer delay
				remove_spouse = yes
			}

			move_character = ROOT
		}
	}

	option = {
		name = EVTOPTCHF24133

		tiered_piety_negative_effect = yes

		reverse_opinion = {
			name = opinion_dishonorable_scum
			who = FROM
			years = 100
		}
	}
}

# Philosopher-Warrior Drills troops
character_event = {
	id = HF.24134
	desc = EVTDESCAHF24134
	picture = GFX_evt_war_planning
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24134

		if = {
			limit = {
				OR = {
					trait = strategist
					martial >= 15
				}
			}
			prestige = -300
		}
		else = {
			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
		}
		else = {
			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
		}
		else = {
			prestige = -400
		}

		add_character_modifier = {
			name = advanced_supply_lines
			years = 4
		}

		ai_chance = { factor = 75 }
	}

	option = { # Changed my mind
		name = EVTOPTDHF24134

		hidden_effect = {
			remove_character_modifier = drill_troops_cooldown
		}
	}

	after = {
		hidden_effect = {
			if = {
				limit = { has_character_modifier = drill_troops_cooldown } # Not after option C

				random_list = {
					90 = { }

					3 = {
						trigger = {
							NOR = {
								trait = uncouth
								trait = brawny
							}
						}

						mult_modifier = {
							factor = 2
							trait = brave
						}

						mult_modifier = {
							factor = 2
							trait = wroth
						}

						character_event = {
							id = HF.24135
							days = 20
							random = 20
						}
					}

					3 = {
						trigger = {
							NOT = { trait = wroth }
						}

						mult_modifier = {
							factor = 2
							trait = aggressive_leader
						}

						mult_modifier = {
							factor = 2
							trait = brave
						}

						mult_modifier = {
							factor = 2
							trait = cruel
						}

						character_event = {
							id = HF.24136
							days = 20
							random = 20
						}
					}

					3 = {
						trigger = {
							NOT = { trait = malnourished }
						}

						mult_modifier = {
							factor = 2
							trait = temperate
						}

						mult_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
	picture = GFX_evt_war_planning
	border = GFX_event_normal_frame_war

	desc = {
		trigger = { is_female = yes }
		text = EVTDESCAHF24135
	}
	desc = {
		trigger = { is_female = no }
		text = EVTDESCBHF24135
	}

	is_triggered_only = yes

	option = { # Proud saves
		name = EVTOPTAHF24135
		tooltip_info = proud

		trigger = { trait = proud }

		ai_chance = { factor = 25 }
	}

	option = {
		name = EVTOPTBHF24135

		if = {
			limit = { trait = brawny }
			change_martial = 1
		}
		else_if = {
			limit = { trait = frail }
			remove_trait = frail
		}
		else = {
			add_trait = brawny
		}

		if = {
			limit = { trait = uncouth }
			change_diplomacy = -1
		}
		else_if = {
			limit = { trait = groomed }
			remove_trait = groomed
		}
		else = {
			add_trait = uncouth
		}

		ai_chance = { factor = 75 }
	}
}

# Ruler has become wroth
character_event = {
	id = HF.24136
	desc = EVTDESCAHF24136
	picture = GFX_evt_war_planning
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = { # Deceitful saves
		name = EVTOPTAHF24136
		tooltip_info = deceitful

		trigger = { trait = deceitful }

		ai_chance = { factor = 25 }
	}

	option = {
		name = EVTOPTBHF24136

		remove_trait_silently_stressed_effect = yes
		add_trait_fully_silently_wroth_effect = yes

		ai_chance = { factor = 75 }
	}
}

# Ruler is skipping too many meals
character_event = {
	id = HF.24137
	picture = GFX_evt_war_planning
	border = GFX_event_normal_frame_war

	desc = {
		text = EVTDESCAHF24137
		trigger = { is_female = yes }
	}
	desc = {
		text = EVTDESCBHF24137
		trigger = { is_female = no }
	}

	is_triggered_only = yes

	option = { # Gluttonous saves
		name = EVTOPTAHF24137
		tooltip_info = gluttonous

		trigger = { trait = gluttonous }

		ai_chance = { factor = 25 }
	}

	option = {
		name = {
			text = EVTOPTBHF24137_A
			trigger = { trait = fat }
		}
		name = {
			text = EVTOPTBHF24137_B
			trigger = { NOT = { trait = fat } }
		}

		remove_trait_silently_stressed_effect = yes

		custom_tooltip = {
			text = tooltip_warning_20629

			lose_weight_small_effect = yes
			weight_trait_check_effect = yes
		}

		ai_chance = { factor = 75 }
	}
}

# Munificent Bloodline - Boosting opinion
character_event = {
	id = HF.24138
	desc = EVTDESCAHF24138
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_fancy_feast
		trigger = {
			NOR = {
				has_religion_feature = religion_matriarchal
				has_religion_feature = religion_patriarchal
			}
		}
	}

	is_triggered_only = yes

	option = { # Endear neighbors
		name = EVTOPTAHF24138

		trigger = {
			any_neighbor_independent_ruler = {
				is_adult = yes
			}
		}

		custom_tooltip = { text = TT_EVTOPTAHF24138 }

		if = {
			limit = {
				OR = {
					is_attractive_trigger = yes
					diplomacy >= 15
				}
			}
			prestige = -300
		}
		else = {
			prestige = -600
		}

		any_neighbor_independent_ruler = {
			limit = { is_adult = yes }
			character_event = { id = HF.24139 }
		}

		hidden_effect = {
			# Random infatuation
			random_neighbor_independent_ruler = {
				limit = {
					attracted_to_root_trigger = yes
					is_adult = yes
					ai = yes

					NOR = {
						trait = celibate
						trait = eunuch
						is_rival = ROOT
					}

					trigger_if = {
						limit = { ROOT = { is_female = no } }
						NOT = { has_religion_feature = religion_matriarchal }
					}
					trigger_else = {
						NOT = { has_religion_feature = religion_patriarchal }
					}
				}

				preferred_limit = { trait = lustful }

				random = {
					chance = 20

					mult_modifier = {
						factor = 1.5
						ROOT = { is_attractive_trigger = yes }
					}

					mult_modifier = {
						factor = 0.5
						ROOT = { is_unattractive_trigger = yes }
					}

					mult_modifier = {
						factor = 0.5
						ROOT = { practical_age >= 40 }
					}

					mult_modifier = {
						factor = 1.5
						ROOT = { diplomacy >= 8 }
					}

					mult_modifier = {
						factor = 1.5
						ROOT = { diplomacy >= 10 }
					}

					mult_modifier = {
						factor = 1.5
						ROOT = { diplomacy >= 12 }
					}

					mult_modifier = {
						factor = 1.5
						ROOT = { diplomacy >= 14 }
					}

					mult_modifier = {
						factor = 1.5
						ROOT = { diplomacy >= 16 }
					}

					opinion = {
						name = opinion_infatuated
						who = ROOT
						years = 8
					}
				}
			}
		}
	}

	option = { # Endear subjects
		name = EVTOPTBHF24138

		add_character_modifier = {
			name = endearing_peasants
			years = 4
		}

		if = {
			limit = {
				OR = {
					is_attractive_trigger = yes
					diplomacy >= 15
				}
			}
			prestige = -200
		}
		else = {
			prestige = -400
		}
	}

	option = { # Changed my mind
		name = EVTOPTCHF24138

		hidden_effect = {
			remove_character_modifier = endearing_noblemen_cooldown
		}

		ai_chance = { factor = 0 }
	}

	after = {
		hidden_effect = {
			if = {
				limit = { has_character_modifier = endearing_noblemen_cooldown } # Not after option C

				random_list = {
					90 = { }

					3 = {
						trigger = {
							NOR = {
								trait = groomed
								trait = dull
							}
						}

						mult_modifier = {
							factor = 2
							trait = proud
						}

						mult_modifier = {
							factor = 2
							trait = hedonist
						}

						character_event = {
							id = HF.24141
							days = 20
							random = 20
						}
					}

					3 = {
						trigger = {
							NOT = { trait = drunkard }
						}

						mult_modifier = {
							factor = 2
							trait = gluttonous
						}

						mult_modifier = {
							factor = 2
							trait = hedonist
						}

						character_event = {
							id = HF.24142
							days = 20
							random = 20
						}
					}

					3 = {
						trigger = {
							NOT = { trait = fat }
						}

						mult_modifier = {
							factor = 2
							trait = gluttonous
						}

						mult_modifier = {
							factor = 2
							trait = hedonist
						}

						character_event = {
							id = HF.24143
							days = 20
							random = 20
						}
					}
				}
			}
		}
	}
}

# Vassals/Neighbors pacified
character_event = {
	id = HF.24139
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24139
		trigger = { vassal_of = FROM }
	}
	desc = {
		text = EVTDESCBHF24139
		trigger = {
			NOT = { vassal_of = FROM }
		}
	}

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_fancy_feast
		trigger = {
			NOR = {
				has_religion_feature = religion_matriarchal
				has_religion_feature = religion_patriarchal
			}
		}
	}

	is_triggered_only = yes

	# Gain opinion
	# Envious copout
	# Opposite Doctrine copout

	option = {
		name = EVTOPTAHF24139
		tooltip_info = envious

		trigger = {
			trait = envious
			same_sex = FROM
		}

		ai_chance = { factor = 0 }
	}

	option = {
		name = EVTOPTCHF24139
		tooltip_info_custom = available_because_religious_doctrine

		trigger = {
			trigger_if = {
				limit = { FROM = { is_female = yes } }
				has_religion_feature = religion_patriarchal
			}
			trigger_else = {
				has_religion_feature = religion_matriarchal
			}
		}

		tiered_piety_reward_effect = yes

		ai_chance = { factor = 0 }
	}

	option = {
		name = EVTOPTDHF24139

		trigger = {
			FROM = { root_attraction_trigger = yes }
		}

		opinion = {
			name = opinion_impressed
			who = FROM
			years = 5
		}

		ai_chance = {
			factor = 70

			trigger = {
				NOR = {
					is_lover = FROM

					has_opinion_modifier = {
						name = opinion_infatuated
						who = FROM
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTEHF24139

		trigger = {
			FROM = { root_attraction_trigger = yes }
		}

		opinion = {
			name = opinion_impressed_infatuated
			who = FROM
			years = 5
		}

		ai_chance = {
			factor = 70

			trigger = {
				NOR = {
					is_lover = FROM

					has_opinion_modifier = {
						name = opinion_infatuated
						who = FROM
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTFHF24139

		trigger = {
			OR = {
				has_opinion_modifier = {
					name = opinion_infatuated
					who = FROM
				}

				is_lover = FROM
			}
		}

		transfer_scaled_wealth = {
			to = FROM
			value = 0.5
			min = 10
			max = 100
		}

		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

	ai = no

	option = {
		name = EVTOPTDHF24139
	}
}

# Ruler cares more about appearances than substance
character_event = {
	id = HF.24141
	desc = EVTDESCAHF24141
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_fancy_feast
		trigger = {
			NOR = {
				has_religion_feature = religion_matriarchal
				has_religion_feature = religion_patriarchal
			}
		}
	}

	is_triggered_only = yes

	option = { # Shy saves
		name = EVTOPTAHF24141
		tooltip_info = shy

		trigger = { trait = shy }

		ai_chance = { factor = 25 }
	}

	option = {
		name = EVTOPTBHF24141

		if = {
			limit = { trait = groomed }
			change_diplomacy = 1
		}
		else_if = {
			limit = { trait = uncouth }
			remove_trait = uncouth
		}
		else = {
			add_trait = groomed
		}

		if = {
			limit = { trait = dull }
			change_stewardship = -1
		}
		else_if = {
			limit = { trait = shrewd }
			remove_trait = shrewd
		}
		else = {
			add_trait = dull
		}

		ai_chance = { factor = 75 }
	}
}

# Ruler has become drunkard
character_event = {
	id = HF.24142
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24142
		trigger = { is_female = yes }
	}
	desc = {
		text = EVTDESCBHF24142
		trigger = { is_female = no }
	}

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_fancy_feast
		trigger = {
			NOR = {
				has_religion_feature = religion_matriarchal
				has_religion_feature = religion_patriarchal
			}
		}
	}

	is_triggered_only = yes

	option = { # Diligent saves
		name = EVTOPTAHF24142
		tooltip_info = diligent

		trigger = { trait = diligent }

		ai_chance = { factor = 25 }
	}

	option = {
		name = EVTOPTBHF24142

		remove_trait_silently_stressed_effect = yes
		add_trait = drunkard

		ai_chance = { factor = 75 }
	}
}

# Ruler is having too many feasts
character_event = {
	id = HF.24143
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24143
		trigger = { is_female = yes }
	}
	desc = {
		text = EVTDESCBHF24143
		trigger = { is_female = no }
	}

	picture = {
		picture = GFX_evt_matriarchy_throne_room
		trigger = { has_religion_feature = religion_matriarchal }
	}
	picture = {
		picture = GFX_evt_tengri_throneroom_oldgods
		trigger = { has_religion_feature = religion_patriarchal }
	}
	picture = {
		picture = GFX_evt_fancy_feast
		trigger = {
			NOR = {
				has_religion_feature = religion_matriarchal
				has_religion_feature = religion_patriarchal
			}
		}
	}

	is_triggered_only = yes

	option = { # Temperate saves
		name = EVTOPTAHF24143
		tooltip_info = temperate

		trigger = { trait = temperate }

		ai_chance = { factor = 25 }
	}

	option = {
		name = {
			text = EVTOPTBHF24143_A
			trigger = { trait = malnourished }
		}
		name = {
			text = EVTOPTBHF24143_B
			trigger = {
				NOT = { trait = malnourished }
			}
		}

		remove_trait_silently_stressed_effect = yes

		custom_tooltip = {
			text = tooltip_warning_20606

			gain_weight_small_effect = yes
			weight_trait_check_effect = yes
		}

		ai_chance = { factor = 75 }
	}
}

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

# Murder Peace Bloodline: Ruler dismantles factions
character_event = {
	id = HF.24144
	desc = EVTDESCAHF24144
	picture = GFX_evt_catching_heretic
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24144
		tooltip_info = intrigue

		trigger = { intrigue >= 18 }

		custom_tooltip = {
			text = TT_EVTOPTAHF24144

			any_vassal = {
				character_event = {
					id = HF.24145
					days = 5
					random = 10
				}
			}
		}

		prestige = -450
	}

	option = {
		name = EVTOPTBHF24144
		tooltip_info = intrigue

		trigger = { intrigue >= 14 }

		custom_tooltip = {
			text = TT_EVTOPTBHF24144

			any_vassal = {
				character_event = {
					id = HF.24146
					days = 5
					random = 10
				}
			}
		}

		prestige = -350
	}

	option = {
		name = EVTOPTCHF24144
		tooltip_info = intrigue

		trigger = { intrigue >= 10 }

		custom_tooltip = {
			text = TT_EVTOPTCHF24144

			any_vassal = {
				character_event = {
					id = HF.24147
					days = 5
					random = 10
				}
			}
		}

		prestige = -250
	}

	option = {
		name = EVTOPTDHF24144

		custom_tooltip = {
			text = TT_EVTOPTDHF24144

			any_vassal = {
				character_event = {
					id = HF.24148
					days = 5
					random = 10
				}
			}
		}
	}

	after = {
		hidden_effect = {
			random_list = {
				90 = { }

				3 = {
					trigger = {
						NOT = { trait = paranoid }
					}

					mult_modifier = {
						factor = 2
						trait = shy
					}

					mult_modifier = {
						factor = 2
						trait = cruel
					}

					character_event = {
						id = HF.24149
						days = 20
						random = 20
					}
				}

				3 = {
					trigger = {
						NOT = { trait = arbitrary }
					}

					mult_modifier = {
						factor = 2
						trait = zealous
					}

					mult_modifier = {
						factor = 2
						trait = paranoid
					}

					character_event = {
						id = HF.24150
						days = 20
						random = 20
					}
				}

				3 = {
					trigger = {
						NOT = { trait = cruel }
					}

					mult_modifier = {
						factor = 2
						trait = arbitrary
					}

					mult_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 = GFX_evt_catching_heretic
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24145

		custom_tooltip = { text = TT_EVTOPTAHF24145 }

		opinion = {
			name = opinion_coerced_into_leaving_faction
			who = FROM
			years = 10
		}
	}
}

# Vassal notified of heavy crackdown
character_event = {
	id = HF.24146
	desc = EVTDESCAHF24145
	picture = GFX_evt_catching_heretic
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24146

		custom_tooltip = { text = TT_EVTOPTAHF24145 }

		opinion = {
			name = opinion_coerced_into_leaving_faction
			who = FROM
			years = 6
		}
	}
}

# Vassal notified of medium crackdown
character_event = {
	id = HF.24147
	desc = EVTDESCAHF24145
	picture = GFX_evt_catching_heretic
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24147

		custom_tooltip = { text = TT_EVTOPTAHF24145 }

		opinion = {
			name = opinion_coerced_into_leaving_faction
			who = FROM
			years = 4
		}
	}
}

# Vassal notified of light crackdown
character_event = {
	id = HF.24148
	desc = EVTDESCAHF24145
	picture = GFX_evt_catching_heretic
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24148

		custom_tooltip = { text = TT_EVTOPTAHF24145 }

		opinion = {
			name = opinion_coerced_into_leaving_faction
			who = FROM
			years = 2
		}
	}
}

# Ruler has become paranoid
character_event = {
	id = HF.24149
	desc = EVTDESCAHF24149
	picture = GFX_evt_catching_heretic
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = { # Brave saves
		name = EVTOPTAHF24149
		tooltip_info = brave

		trigger = { trait = brave }

		ai_chance = { factor = 25 }
	}

	option = {
		name = EVTOPTBHF24149

		if = {
			limit = { trait = paranoid }
			change_intrigue = 1
			change_martial = -1
		}
		else = {
			remove_trait_silently_trusting_effect = yes
			add_trait = paranoid
		}

		ai_chance = { factor = 75 }
	}
}

# Ruler has become arbitrary
character_event = {
	id = HF.24150
	desc = EVTDESCAHF24150
	picture = GFX_evt_catching_heretic
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = { # Kind saves
		name = EVTOPTAHF24150
		tooltip_info = kind

		trigger = { trait = kind }

		ai_chance = { factor = 25 }
	}

	option = {
		name = EVTOPTBHF24150

		if = {
			limit = { trait = arbitrary }
			change_intrigue = 1
			change_stewardship = -1
		}
		else = {
			remove_trait_silently_just_effect = yes
			add_trait = arbitrary
		}

		ai_chance = { factor = 75 }
	}
}

# Ruler has become cruel
character_event = {
	id = HF.24151
	desc = EVTDESCAHF24151
	picture = GFX_evt_catching_heretic
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = { # Just saves
		name = EVTOPTAHF24151
		tooltip_info = just

		trigger = { trait = just }

		ai_chance = { factor = 25 }
	}

	option = {
		name = EVTOPTBHF24151

		if = {
			limit = { trait = cruel }
			change_intrigue = 1
			change_diplomacy = -1
		}
		else = {
			remove_trait_silently_kind_effect = yes
			add_trait = cruel
		}

		ai_chance = { factor = 75 }
	}
}

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

# Family Bloodline - Dynastic meddling
character_event = {
	id = HF.24152
	desc = EVTDESCAHF24152
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	is_triggered_only = yes

	immediate = {
		save_event_target_as = meddler_target
		FROM = { save_event_target_as = meddling_target }
	}

	option = { # Meddle with behavior
		name = EVTOPTAHF24152

		character_event = {
			id = HF.24153
			tooltip = TT_EVTOPTAHF24152
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				NOR = {
					# Target does not share the culture of the founder, while still being within the same culture group.
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_dynastic_meddling
						bloodline_is_active_for = PREV

						founder = {
							culture_group = event_target:meddling_target
							NOT = { culture = event_target:meddling_target }
						}
					}

					trait = kind
					trait = diligent
					trait = chaste
					has_focus = focus_family
				}

				event_target:meddling_target = {
					NOR = {
						trait = stressed
						trait = depressed
						trait = drunkard
						trait = slothful
						trait = lustful

						trigger_if = {
							limit = { is_married = yes }
							num_of_children < 2
						}
					}
				}
			}
		}
	}

	option = { # Meddle with appearance
		name = EVTOPTBHF24152

		character_event = {
			id = HF.24154
			tooltip = TT_EVTOPTBHF24152
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				NOR = {
					trait = proud
					trait = diligent
					trait = gluttonous
					trait = temperate
				}

				event_target:meddling_target = {
					NOR = {
						trait = groomed
						trait = uncouth
						trait = fat
						trait = malnourished
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTCHF24152

		hidden_effect = {
			remove_character_modifier = dynastic_meddling_cooldown
			event_target:meddling_target = { remove_character_modifier = dynastic_meddling_target_cooldown }
		}

		ai_chance = { factor = 0 }
	}
}

# Meddling with behavior
character_event = {
	id = HF.24153
	desc = EVTDESCAHF24152
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	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
				bloodline_is_active_for = PREV
			}

			founder = {
				save_event_target_as = scoped_founder
			}
		}
	}

	option = { # Take care
		name = EVTOPTAHF24153

		event_target:meddling_target = {
			show_scope_change = no

			tooltip = {
				if = {
					limit = { trait = depressed }
					remove_trait = depressed
				}
				else_if = {
					limit = { trait = stressed }
					remove_trait = stressed
				}
				else = {
					health = 0.5
				}
			}

			character_event = { id = HF.24155 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				NOT = { trait = kind }

				event_target:meddling_target = {
					NOR = {
						trait = stressed
						trait = depressed
					}
				}
			}
		}
	}

	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
					}
				}
			}
		}

		event_target:meddling_target = {
			show_scope_change = no

			tooltip = {
				if = {
					limit = { trait = drunkard }
					remove_trait = drunkard
				}
				else_if = {
					limit = { trait = slothful }
					remove_trait = slothful
				}
				else_if = {
					limit = { trait = diligent }
					change_stewardship = 1
				}
				else = {
					add_trait = diligent
				}
			}

			character_event = { id = HF.24156 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				NOT = { trait = diligent }

				event_target:meddling_target = {
					NOR = {
						trait = drunkard
						trait = slothful
					}
				}
			}
		}
	}

	option = { # Importance of marriage
		name = {
			text = EVTOPTCHF24153_A # Should be chaste
			trigger = {
				event_target:meddling_target = {
					NOT = { trait = chaste }
				}
			}
		}
		name = {
			text = EVTOPTCHF24153_B # Should love spouse
			trigger = {
				event_target:meddling_target = {
					is_married = yes
					num_of_children >= 2
				}
			}
		}
		name = {
			text = EVTOPTCHF24153_C # Should make kids
			trigger = {
				event_target:meddling_target = {
					is_married = yes
					num_of_children < 2

					NOR = {
						trait = celibate
						trait = eunuch
					}
				}
			}
		}

		event_target:meddling_target = {
			show_scope_change = no

			tooltip = {
				if = {
					limit = { trait = lustful }
					remove_trait = lustful
				}
				else_if = {
					limit = {
						NOR = { trait = chaste }
					}
					add_trait = chaste
				}
				else_if = {
					limit = {
						is_married = no
						trait = chaste
					}

					change_learning = 1
				}
				else_if = {
					limit = {
						is_married = yes
						num_of_children < 2

						NOR = {
							trait = celibate
							trait = eunuch
						}
					}

					add_character_modifier = {
						name = marital_duty
						years = 2
					}
				}
				else = {
					opinion = {
						name = opinion_rekindle_love
						who = spouse
						years = 2
					}
				}

				# Regardless, moralizing against Seduction will happen
				if = {
					limit = { has_focus = focus_seduction }
					set_focus = focus_family
				}
			}

			character_event = { id = HF.24157 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				NOR = {
					has_focus = focus_family
					trait = chaste
				}

				event_target:meddling_target = {
					NOR = {
						trait = lustful
						has_focus = focus_seduction
					}
				}
			}
		}
	}

	option = { # Act like the founder
		name = EVTOPTDHF24153

		trigger = {
			event_target:meddling_target = {
				culture_group = event_target:scoped_founder
				NOT = { culture = event_target:scoped_founder }
			}
		}

		event_target:meddling_target = {
			show_scope_change = no

			character_event = {
				id = HF.24158
				tooltip = TT_EVTOPTDHF24153 # Not certain
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				NOR = {
					trait = proud
					trait = gregarious
					trait = socializer
				}
			}
		}
	}

	option = { # Revert
		name = EVTOPTCHF24152

		trigger = {
			event_target:meddling_target = {
				trigger_if = {
					limit = { culture_group = event_target:scoped_founder }
					culture = event_target:scoped_founder
				}
			}
		}

		hidden_effect = {
			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
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	is_triggered_only = yes

	option = { # More studying, less grooming
		name = EVTOPTAHF24154

		event_target:meddling_target = {
			show_scope_change = no

			tooltip = {
				if = {
					limit = { trait = groomed }
					remove_trait = groomed
				}
				else_if = {
					limit = { trait = uncouth }
					change_diplomacy = -1
				}
				else = {
					add_trait = uncouth
				}

				change_martial = 1
				change_learning = 1
			}

			character_event = { id = HF.24159 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				NOR = {
					event_target:meddling_target = { trait = groomed }
					trait = humble
					trait = uncouth
				}
			}

			mult_modifier = {
				factor = 1.5

				event_target:meddling_target = { is_female = no }

				NOR = {
					has_law = enatic_succession
					has_law = enatic_cognatic_succession
					has_law = status_of_women_4
					has_gender_equal_game_rule_trigger = yes
				}
			}
		}
	}

	option = { # More grooming, less studying
		name = EVTOPTBHF24154

		event_target:meddling_target = {
			show_scope_change = no

			tooltip = {
				if = {
					limit = { trait = uncouth }
					remove_trait = uncouth
				}
				else_if = {
					limit = { trait = groomed }
					change_diplomacy = 1
				}
				else = {
					add_trait = groomed
				}

				change_stewardship = -1
			}

			character_event = { id = HF.24160 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				NOR = {
					event_target:meddling_target = { trait = uncouth }
					trait = proud
					trait = groomed
				}
			}

			mult_modifier = {
				factor = 1.5

				event_target:meddling_target = { is_female = yes }

				NOR = {
					has_law = enatic_succession
					has_law = enatic_cognatic_succession
					has_law = status_of_women_4
					has_gender_equal_game_rule_trigger = yes
				}
			}
		}
	}

	option = { # Eat more
		name = EVTOPTCHF24154

		trigger = {
			event_target:meddling_target = {
				NOT = { trait = fat }
			}
		}

		show_trait = fat

		event_target:meddling_target = {
			show_scope_change = no

			character_event = {
				id = HF.24161
				tooltip = TT_EVTOPTCHF24154
			}
		}

		if = {
			limit = {
				event_target:meddling_target = {
					OR = {
						check_variable = {
							which = physique_variable
							value < -5
						}

						trait = frail
					}
				}
			}

			custom_tooltip = { text = TT_EVTOPTCHF24154_HEALTH }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				event_target:meddling_target = {
					check_variable = {
						which = physique_variable
						value >= 0
					}
				}

				NOR = {
					trait = gluttonous
					trait = hedonist
					trait = fat
				}
			}
		}
	}

	option = { # Eat less
		name = EVTOPTDHF24154

		trigger = {
			event_target:meddling_target = {
				NOT = { trait = malnourished }
			}
		}

		show_portrait = event_target:meddling_target
		show_trait = malnourished

		event_target:meddling_target = {
			show_scope_change = no

			character_event = {
				id = HF.24162
				tooltip = TT_EVTOPTDHF24154
			}
		}

		if = {
			limit = {
				event_target:meddling_target = {
					OR = {
						check_variable = {
							which = physique_variable
							value >= 5
						}

						trait = sturdy
					}
				}
			}

			custom_tooltip = { text = TT_EVTOPTCHF24154_HEALTH }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5

				event_target:meddling_target = {
					check_variable = {
						which = physique_variable
						value < 0
					}
				}

				NOR = {
					trait = temperate
					trait = zealous
					trait = malnourished
				}
			}
		}
	}

	option = { # Revert
		name = EVTOPTCHF24152

		trigger = {
			event_target:meddling_target = {
				OR = {
					trait = fat
					trait = malnourished
				}
			}
		}

		hidden_effect = {
			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
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24155

		if = {
			limit = { trait = depressed }
			remove_trait = depressed
		}
		else_if = {
			limit = { trait = stressed }
			remove_trait = stressed
		}
		else = {
			health = 0.5
		}
	}
}

# Relative invites to stop messing around
character_event = {
	id = HF.24156
	desc = EVTDESCAHF24156
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	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 = { trait = diligent }
			change_stewardship = 1
		}
		else = {
			add_trait = diligent
		}
	}
}

# Relative moralizes about family values
character_event = {
	id = HF.24157
	desc = EVTDESCAHF24157
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24157

		if = {
			limit = { trait = lustful }
			remove_trait = lustful
		}
		else_if = {
			limit = { NOT = { 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 = {
						name = opinion_kindred_spirit
						who = FROM
						years = 15
					}

					reverse_opinion = {
						name = opinion_kindred_spirit
						who = FROM
						years = 15
					}
				}

				FROM = {
					character_event = { id = HF.24173 }
				}
			}
		}
		else_if = {
			limit = {
				is_married = no
				trait = chaste
			}
			change_learning = 1
		}
		else_if = {
			limit = {
				is_married = yes
				num_of_children < 2

				NOR = {
					trait = celibate
					trait = eunuch
				}
			}

			add_character_modifier = {
				name = marital_duty
				years = 2
			}
		}
		else = {
			opinion = {
				name = opinion_rekindle_love
				who = spouse
				years = 2
			}
		}

		# Regardless, moralizing against Seduction will happen
		if = {
			limit = { has_focus = focus_seduction }
			set_focus = focus_family
		}
	}
}

# Relative causes culture shift
character_event = {
	id = HF.24158
	desc = EVTDESCAHF24158
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24158

		culture = event_target:scoped_founder

		if = {
			limit = {
				FROM = { culture = event_target:scoped_founder }
			}

			opinion = {
				name = opinion_kindred_spirit
				who = FROM
				years = 15
			}

			reverse_opinion = {
				name = opinion_kindred_spirit
				who = FROM
				years = 15
			}
		}
		else = {
			reverse_opinion = {
				name = opinion_took_my_advice
				who = FROM
				years = 5
			}
		}

		FROM = {
			character_event = { id = HF.24163 }
		}

		ai_chance = { factor = 90 }
	}

	option = {
		name = EVTOPTBHF24158

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_denied_advice
				who = ROOT
				years = 5
			}

			character_event = { id = HF.24164 }
		}

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 2
				trait = proud
			}

			mult_modifier = {
				factor = 2

				is_ruler = yes
				culture = capital_scope
			}

			mult_modifier = {
				factor = 0.5

				is_ruler = yes
				capital_scope = { culture = event_target:scoped_founder }
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_married = FROM
			}

			mult_modifier = {
				factor = 0.5

				opinion = {
					who = FROM
					value >= 20
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < 0
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < -50
				}
			}
		}
	}
}

# Relative pushes study over grooming
character_event = {
	id = HF.24159
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24159
		trigger = { is_female = no }
	}
	desc = {
		text = EVTDESCBHF24159
		trigger = { is_female = yes }
	}

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24159

		if = {
			limit = { trait = groomed }

			remove_trait = groomed

			reverse_opinion = {
				name = opinion_took_my_advice
				who = FROM
				years = 5
			}
		}
		else_if = {
			limit = { trait = uncouth }

			change_diplomacy = -1

			reverse_opinion = {
				name = opinion_took_my_advice
				who = FROM
				years = 5
			}
		}
		else = {
			add_trait = uncouth

			if = {
				limit = { FROM = { trait = uncouth } }

				opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}

				reverse_opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}
			}
			else = {
				reverse_opinion = {
					name = opinion_took_my_advice
					who = FROM
					years = 5
				}
			}
		}

		change_martial = 1
		change_learning = 1

		FROM = {
			character_event = { id = HF.24165 }
		}

		ai_chance = { factor = 90 }
	}

	option = {
		name = EVTOPTBHF24159

		tiered_prestige_negative_effect = yes

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_denied_advice
				who = ROOT
				years = 5
			}

			character_event = { id = HF.24166 }
		}

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 2
				trait = proud
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_married = FROM
			}

			mult_modifier = {
				factor = 0.5

				opinion = {
					who = FROM
					value >= 20
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < 0
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < -50
				}
			}
		}
	}
}

# Relative pushes grooming over study
character_event = {
	id = HF.24160
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24160
		trigger = { is_female = no }
	}
	desc = {
		text = EVTDESCBHF24160
		trigger = { is_female = yes }
	}

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24160

		if = {
			limit = { trait = uncouth }
			remove_trait = uncouth
		}
		else_if = {
			limit = { trait = groomed }
			change_diplomacy = 1
		}
		else = {
			add_trait = groomed

			if = {
				limit = { FROM = { trait = groomed } }

				opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}

				reverse_opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}
			}
			else = {
				reverse_opinion = {
					name = opinion_took_my_advice
					who = FROM
					years = 5
				}
			}
		}

		change_stewardship = -1

		FROM = {
			character_event = { id = HF.24167 }
		}

		ai_chance = { factor = 90 }
	}

	option = {
		name = EVTOPTBHF24160

		tiered_prestige_negative_effect = yes

		FROM = {
			show_scope_change = no

			opinion = {
				who = ROOT
				name = opinion_denied_advice
				years = 5
			}

			character_event = { id = HF.24168 }
		}

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 2
				trait = diligent
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_married = FROM
			}

			mult_modifier = {
				factor = 0.5

				opinion = {
					who = FROM
					value >= 20
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < 0
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < -50
				}
			}
		}
	}
}

# Relative invites to eat more
character_event = {
	id = HF.24161
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24161
		trigger = { is_female = no }
	}
	desc = {
		text = EVTDESCBHF24161
		trigger = { is_female = yes }
	}

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	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 = {
					trait = frail

					check_variable = {
						which = physique_variable
						value < -5
					}
				}
			}
			health = 0.5
		}
		if = {
			limit = {
				FROM = { trait = fat }

				check_variable = {
					which = physique_variable # The option would bring past threshold
					value >= 5
				}
			}

			opinion = {
				name = opinion_kindred_spirit
				who = FROM
				years = 15
			}

			reverse_opinion = {
				name = opinion_kindred_spirit
				who = FROM
				years = 15
			}
		}
		else = {
			reverse_opinion = {
				name = opinion_took_my_advice
				who = FROM
				years = 5
			}
		}

		if = {
			limit = {
				check_variable = {
					which = physique_variable # The option would bring past threshold
					value >= 15
				}
			}

			set_character_flag = flag_fat_for_stress
			this_post_weight_gain_flavor_effect = yes # Random positive flavor to justify decision's cost
		}

		FROM = {
			character_event = { id = HF.24169 }
		}

		ai_chance = { factor = 90 }
	}

	option = {
		name = EVTOPTBHF24161

		tiered_prestige_negative_effect = yes

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_denied_advice
				who = ROOT
				years = 5
			}

			character_event = { id = HF.24170 }
		}

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 2
				trait = temperate
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_married = FROM
			}

			mult_modifier = {
				factor = 0.5

				opinion = {
					who = FROM
					value >= 20
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < 0
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < -50
				}
			}
		}
	}
}

# Relative invites to eat less
character_event = {
	id = HF.24162
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24162
		trigger = { is_female = no }
	}
	desc = {
		text = EVTDESCBHF24162
		trigger = { is_female = yes }
	}

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	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 = malnourished }

				check_variable = {
					which = physique_variable # The option would bring past threshold.
					value < -5
				}
			}

			opinion = {
				name = opinion_kindred_spirit
				who = FROM
				years = 15
			}

			reverse_opinion = {
				name = opinion_kindred_spirit
				who = FROM
				years = 15
			}
		}
		else = {
			reverse_opinion = {
				name = opinion_took_my_advice
				who = FROM
				years = 5
			}
		}

		if = {
			limit = {
				check_variable = {
					which = physique_variable # The option would bring past threshold.
					value < -15
				}
			}

			set_character_flag = flag_malnourished_for_diligence
			this_post_weight_loss_flavor_effect = yes # Random positive flavor to justify decision's cost
		}

		FROM = {
			character_event = { id = HF.24171 }
		}

		ai_chance = { factor = 90 }
	}

	option = {
		name = EVTOPTBHF24161

		tiered_prestige_negative_effect = yes

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_denied_advice
				who = ROOT
				years = 5
			}

			character_event = { id = HF.24172 }
		}

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 2
				trait = gluttonous
			}

			mult_modifier = {
				factor = 2
				trait = hedonist
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_married = FROM
			}

			mult_modifier = {
				factor = 0.5

				opinion = {
					who = FROM
					value >= 20
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < 0
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < -50
				}
			}
		}
	}
}

# Relative has changed culture
character_event = {
	id = HF.24163
	desc = EVTDESCAHF24163
	border = GFX_event_normal_frame_diplomacy

	picture = {
		picture = GFX_evt_daughter_asking_mother
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				same_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_daughter_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = yes
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_courtiers_talking
		trigger = {
			event_target:meddling_target = {
				is_female = no
				is_opposite_sex = event_target:meddler_target
			}
		}
	}
	picture = {
		picture = GFX_evt_son_asking_father
		trigger = {
			event_target:meddling_target = {
				is_female = no
				same_sex = event_target:meddler_target
			}
		}
	}

	is_triggered_only = yes

	ai = no

	option = {
		name = {
			text = EVTOPTAHF24163_A
			trigger = { culture = FROM }
		}
		name = {
			text = EVTOPTAHF24163_B
			trigger = {
				NOT = { culture = FROM }
			}
		}

		tooltip = {
			if = {
				limit = { culture = FROM }

				opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}

				reverse_opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}
			}
			else = {
				opinion = {
					name = opinion_took_my_advice
					who = FROM
					years = 5
				}
			}
		}
	}
}

# 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

	ai = no

	option = {
		name = EVTOPTAHF24164

		tooltip = {
			opinion = {
				name = opinion_denied_advice
				who = FROM
				years = 5
			}
		}
	}
}

# Relative is studying more
character_event = {
	id = HF.24165
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24165
		picture = GFX_evt_library
		trigger = {
			FROM = { is_female = no }
			NAND = {
				FROM = { trait = uncouth }
				trait = uncouth
			}
		}
	}
	desc = {
		text = EVTDESCBHF24165
		picture = GFX_evt_princess_byzantine
		trigger = {
			FROM = { is_female = yes }
			NAND = {
				FROM = { trait = uncouth }
				trait = uncouth
			}
		}
	}
	desc = {
		text = EVTDESCCHF24165
		picture = GFX_evt_library
		trigger = {
			FROM = {
				is_female = no
				trait = uncouth
			}
			trait = uncouth
		}
	}
	desc = {
		text = EVTDESCCHF24165
		picture = GFX_evt_princess_byzantine
		trigger = {
			FROM = {
				is_female = yes
				trait = uncouth
			}
			trait = uncouth
		}
	}

	is_triggered_only = yes

	ai = no

	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 = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}

				reverse_opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}
			}
			else = {
				opinion = {
					name = opinion_took_my_advice
					who = FROM
					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

	ai = no

	option = {
		name = EVTOPTAHF24164 # Same

		tooltip = {
			opinion = {
				name = opinion_denied_advice
				who = FROM
				years = 5
			}
		}
	}
}

# Relative is grooming himself more
character_event = {
	id = HF.24167
	picture = GFX_evt_dancing
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24167
		trigger = {
			FROM = { is_female = no }
			NAND = {
				FROM = { trait = groomed }
				trait = groomed
			}
		}
	}
	desc = {
		text = EVTDESCBHF24167
		trigger = {
			FROM = { is_female = yes }
			NAND = {
				FROM = { trait = groomed }
				trait = groomed
			}
		}
	}
	desc = {
		text = EVTDESCCHF24167
		trigger = {
			FROM = {
				is_female = no
				trait = groomed
			}
			trait = groomed
		}
	}
	desc = {
		text = EVTDESCDHF24167
		trigger = {
			FROM = {
				is_female = yes
				trait = groomed
			}
			trait = groomed
		}
	}

	is_triggered_only = yes

	ai = no

	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 = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}

				reverse_opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}
			}
			else = {
				opinion = {
					name = opinion_took_my_advice
					who = FROM
					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

	ai = no

	option = {
		name = EVTOPTAHF24164 # Same

		tooltip = {
			opinion = {
				name = opinion_denied_advice
				who = FROM
				years = 5
			}
		}
	}
}

# Relative is eating more
character_event = {
	id = HF.24169
	picture = GFX_evt_fancy_feast
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24169
		trigger = {
			FROM = { is_female = no }
			NAND = {
				FROM = { trait = fat }
				trait = fat
			}
		}
	}
	desc = {
		text = EVTDESCBHF24169
		trigger = {
			FROM = { is_female = yes }
			NAND = {
				FROM = { trait = fat }
				trait = fat
			}
		}
	}
	desc = {
		text = EVTDESCCHF24169
		trigger = {
			FROM = {
				is_female = no
				trait = fat
			}
			trait = fat
		}
	}
	desc = {
		text = EVTDESCDHF24169
		trigger = {
			FROM = {
				is_female = yes
				trait = fat
			}
			trait = fat
		}
	}

	is_triggered_only = yes

	ai = no

	option = {
		name = {
			text = EVTOPTAHF24167_A
			trigger = { trait = fat }
		}
		name = {
			text = EVTOPTAHF24167_A
			trigger = {
				NOT = { trait = fat }
			}
		}

		tooltip = {
			if = {
				limit = {
					trait = fat
					FROM = { trait = fat }
				}

				opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}

				reverse_opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}
			}
			else = {
				opinion = {
					name = opinion_took_my_advice
					who = FROM
					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

	ai = no

	option = {
		name = EVTOPTAHF24164 # Same

		tooltip = {
			opinion = {
				name = opinion_denied_advice
				who = FROM
				years = 5
			}
		}
	}
}

# Relative is eating less
character_event = {
	id = HF.24171
	picture = GFX_evt_dancing
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24171
		trigger = {
			FROM = { is_female = no }
			NAND = {
				FROM = { trait = fat }
				trait = fat
			}
		}
	}
	desc = {
		text = EVTDESCBHF24171
		trigger = {
			FROM = { is_female = yes }
			NAND = {
				FROM = { trait = fat }
				trait = fat
			}
		}
	}
	desc = {
		text = EVTDESCCHF24171
		trigger = {
			FROM = {
				is_female = no
				trait = malnourished
			}
			trait = malnourished
		}
	}
	desc = {
		text = EVTDESCDHF24171
		trigger = {
			FROM = {
				is_female = yes
				trait = malnourished
			}
			trait = malnourished
		}
	}

	is_triggered_only = yes

	ai = no

	option = {
		name = {
			text = EVTOPTAHF24167_A
			trigger = { trait = malnourished }
		}
		name = {
			text = EVTOPTAHF24167_A
			trigger = {
				NOT = { trait = malnourished }
			}
		}

		tooltip = {
			if = {
				limit = {
					trait = malnourished
					FROM = { trait = malnourished }
				}

				opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}

				reverse_opinion = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}
			}
			else = {
				opinion = {
					name = opinion_took_my_advice
					who = FROM
					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

	ai = no

	option = {
		name = EVTOPTAHF24164 # Same

		tooltip = {
			opinion = {
				name = opinion_denied_advice
				who = FROM
				years = 5
			}
		}
	}
}

# Both meddler and meddled are chaste and married
character_event = {
	id = HF.24173
	picture = GFX_evt_family
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCAHF24173
		trigger = {
			FROM = { is_female = no }
			NOT = { is_married = ROOT }
		}
	}
	desc = {
		text = EVTDESCBHF24173
		trigger = {
			FROM = { is_female = yes }
			NOT = { is_married = ROOT }
		}
	}
	desc = {
		text = EVTDESCCHF24173
		trigger = { is_married = ROOT }
	}

	is_triggered_only = yes

	ai = no

	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 = {
					name = opinion_kindred_spirit
					who = FROM
					years = 15
				}

				reverse_opinion = {
					name = opinion_kindred_spirit
					who = FROM
					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 # on_decade_pulse

	ai = no
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		real_tier = EMPEROR
		prestige >= 15000
		is_alternate_start = no

		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
			}
		}

		NOR = {
			trait = content
			has_character_flag = flag_chance_for_alexander_blood # Opportunity only once per character
			has_global_flag = flag_alexander_blood_restored # Bloodline unlocked only once per playthrough
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.35

			capital_scope = {
				NOR = {
					region = world_europe_south
					region = world_asia_minor
				}
			}
		}

		mult_modifier = {
			factor = 0.35

			NOR = {
				culture_group = latin
				culture_group = byzantine
				culture_group = arabic
			}
		}

		mult_modifier = {
			factor = 0.35

			NOR = {
				religion_group = christian
				religion_group = muslim
				religion_openly_hellenic_or_reformed_trigger = yes
			}
		}

		mult_modifier = {
			factor = 3
			trait = ambitious
		}

		mult_modifier = {
			factor = 2
			religion_group = christian
		}

		mult_modifier = {
			factor = 3
			religion = hellenic_pagan_reformed
		}

		mult_modifier = {
			factor = 2
			religion = hellenic_pagan
		}

		mult_modifier = {
			factor = 3
			culture = greek
		}

		mult_modifier = {
			factor = 1.5
			culture_group = latin
		}

		mult_modifier = {
			factor = 0.5
			practical_age >= 50
		}

		mult_modifier = {
			factor = 2
			trait = brave
		}

		mult_modifier = {
			factor = 2
			has_education_martial_trigger = yes
		}

		mult_modifier = {
			factor = 2
			has_lifestyle_martial_trigger = yes
		}

		mult_modifier = {
			factor = 2
			capital_scope = { region = world_asia_minor }
		}

		mult_modifier = {
			factor = 2
			trait = scholar
		}

		mult_modifier = {
			factor = 2
			has_ambition = obj_forge_bloodline
		}

		mult_modifier = {
			factor = 2
			learning >= 8
		}

		mult_modifier = {
			factor = 2
			learning >= 10
		}

		mult_modifier = {
			factor = 2
			learning >= 12
		}

		mult_modifier = {
			factor = 2
			learning >= 14
		}

		mult_modifier = {
			factor = 2
			learning >= 16
		}

		mult_modifier = {
			factor = 2
			learning >= 18
		}

		mult_modifier = {
			factor = 2
			learning >= 20
		}

		mult_modifier = {
			factor = 2
			learning >= 22
		}

		mult_modifier = {
			factor = 2
			learning >= 24
		}

		mult_modifier = {
			factor = 2
			learning >= 26
		}

		mult_modifier = {
			factor = 2
			learning >= 28
		}

		mult_modifier = {
			factor = 2
			learning >= 30
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 22000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 24000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 26000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 28000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 30000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 40000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 50000
		}

		mult_modifier = {
			factor = 1.5

			piety >= 1000
			religion_openly_hellenic_or_reformed_trigger = yes
		}

		mult_modifier = {
			factor = 1.5

			piety >= 1500
			religion_openly_hellenic_or_reformed_trigger = yes
		}

		mult_modifier = {
			factor = 1.75

			piety >= 2000
			religion_openly_hellenic_or_reformed_trigger = yes
		}

		mult_modifier = {
			factor = 1.75

			check_variable = {
				which = bloodline_won_wars
				value >= 5
			}
		}

		mult_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

		narrative_event = {
			id = HF.24201
			days = 25
			random = 25
			tooltip = TT_EVTOPTAHF24200
		}
	}

	option = { # Abandon
		name = EVTOPTBHF24200
	}
}

# The Tomb of Alexander
narrative_event = {
	id = HF.24201
	title = EVTTITLEHF24201
	picture = GFX_evt_death
	border = GFX_event_narrative_frame_war

	desc = {
		text = EVTDESCAHF24201
		trigger = {
			capital_scope = {
				OR = {
					region = world_asia_minor
					region = world_middle_east_jerusalem
					region = world_middle_east_arabia
				}
			}
		}
	}
	desc = {
		text = EVTDESCBHF24201
		trigger = {
			capital_scope = {
				NOR = {
					region = world_asia_minor
					region = world_middle_east_jerusalem
					region = world_middle_east_arabia
				}
			}
		}
	}

	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

		narrative_event = {
			id = HF.24202 # Decide budget
			tooltip = TT_EVTOPTAHF24201
		}
	}

	option = { # Learning search
		name = EVTOPTBHF24201

		narrative_event = {
			id = HF.24203 # Decide budget
			tooltip = TT_EVTOPTBHF24201
		}
	}

	option = { # Abandon search
		name = EVTOPTCHF24201

		custom_tooltip = { text = TT_EVTOPTCHF24201 }

		if = {
			limit = { trait = ambitious }

			remove_trait = ambitious
			add_trait_silently_depressed_effect = yes
		}

		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
			set_character_flag = flag_alex_tomb_search_high
		}

		scaled_wealth = { value = -4 min = -1000 max = -2000 }
	}

	option = {
		name = EVTOPTBHF24202

		custom_tooltip = {
			text = TT_EVTOPTBHF24202
			set_character_flag = flag_alex_tomb_search_medium
		}

		scaled_wealth = { value = -3 min = -750 max = -1500 }
	}

	option = {
		name = EVTOPTCHF24202

		custom_tooltip = {
			text = TT_EVTOPTCHF24202
			set_character_flag = flag_alex_tomb_search_low
		}

		scaled_wealth = { value = -2 min = -500 max = -1000 }
	}

	option = {
		name = EVTOPTDHF24202

		custom_tooltip = {
			text = TT_EVTOPTDHF24202
			set_character_flag = flag_alex_tomb_search_cheap
		}

		scaled_wealth = { value = -1 min = -250 max = -500 }
	}

	after = {
		hidden_effect = {
			random_list = {
				# Success - Tomb "found"
				# Failure - Retry or change approach

				40 = {
					mult_modifier = {
						factor = 0.1
						has_character_flag = flag_alex_tomb_search_cheap
					}

					mult_modifier = {
						factor = 0.35
						has_character_flag = flag_alex_tomb_search_low
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_alex_tomb_search_medium
					}

					mult_modifier = {
						factor = 1.25
						trait = master_schemer
					}

					mult_modifier = {
						factor = 1.25
						intrigue >= 10
					}

					mult_modifier = {
						factor = 1.25
						intrigue >= 12
					}

					mult_modifier = {
						factor = 1.25
						intrigue >= 14
					}

					mult_modifier = {
						factor = 1.25
						intrigue >= 16
					}

					mult_modifier = {
						factor = 1.25
						intrigue >= 18
					}

					mult_modifier = {
						factor = 1.5
						intrigue >= 20
					}

					mult_modifier = {
						factor = 1.5
						intrigue >= 22
					}

					mult_modifier = {
						factor = 1.5
						intrigue >= 24
					}

					mult_modifier = {
						factor = 1.5
						intrigue >= 26
					}

					mult_modifier = {
						factor = 1.5
						intrigue >= 28
					}

					mult_modifier = {
						factor = 1.5
						intrigue >= 30
					}

					mult_modifier = {
						factor = 1.75
						trait = genius
					}

					mult_modifier = {
						factor = 1.5
						trait = quick
					}

					mult_modifier = {
						factor = 1.5
						job_spymaster = { intrigue >= 8 }
					}

					mult_modifier = {
						factor = 1.5
						job_spymaster = { intrigue >= 10 }
					}

					mult_modifier = {
						factor = 1.5
						job_spymaster = { intrigue >= 12 }
					}

					mult_modifier = {
						factor = 1.5
						job_spymaster = { intrigue >= 14 }
					}

					mult_modifier = {
						factor = 1.5
						job_spymaster = { intrigue >= 16 }
					}

					mult_modifier = {
						factor = 1.5
						job_spymaster = { intrigue >= 18 }
					}

					mult_modifier = {
						factor = 1.5
						job_spymaster = { intrigue >= 20 }
					}

					mult_modifier = {
						factor = 0.5

						capital_scope = {
							NOR = {
								region = world_asia_minor
								region = world_middle_east_jerusalem
								region = world_middle_east_arabia
							}
						}
					}

					mult_modifier = {
						factor = 0.35

						NOT = {
							any_realm_province = {
								OR = {
									region = world_asia_minor
									region = world_middle_east_jerusalem
									region = world_middle_east_arabia
								}

								held_under_PREV = yes
							}
						}
					}

					narrative_event = {
						id = HF.24204 # Success
						days = 150
						random = 250
					}
				}

				60 = {
					narrative_event = {
						id = HF.24205 # Failure
						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
			set_character_flag = flag_alex_scholars_search_high
		}

		scaled_wealth = { value = -4 min = -1000 max = -2000 }
	}

	option = {
		name = EVTOPTBHF24203

		custom_tooltip = {
			text = TT_EVTOPTBHF24202
			set_character_flag = flag_alex_scholars_search_medium
		}

		scaled_wealth = { value = -3 min = -750 max = -1500 }
	}

	option = {
		name = EVTOPTCHF24203

		custom_tooltip = {
			text = TT_EVTOPTCHF24202
			set_character_flag = flag_alex_scholars_search_low
		}

		scaled_wealth = { value = -2 min = -500 max = -1000 }
	}

	option = {
		name = EVTOPTDHF24203

		custom_tooltip = {
			text = TT_EVTOPTDHF24202
			set_character_flag = flag_alex_scholars_search_cheap
		}

		scaled_wealth = { value = -1 min = -250 max = -500 }
	}
	after = {
		hidden_effect = {
			random_list = {
				# Success - Claim fabricated
				# Failure - Retry or change approach

				40 = {
					mult_modifier = {
						factor = 0.1
						has_character_flag = flag_alex_scholars_search_cheap
					}

					mult_modifier = {
						factor = 0.35
						has_character_flag = flag_alex_scholars_search_low
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_alex_scholars_search_medium
					}

					mult_modifier = {
						factor = 1.25
						trait = scholar
					}

					mult_modifier = {
						factor = 1.25
						learning >= 10
					}

					mult_modifier = {
						factor = 1.25
						learning >= 12
					}

					mult_modifier = {
						factor = 1.25
						learning >= 14
					}

					mult_modifier = {
						factor = 1.25
						learning >= 16
					}

					mult_modifier = {
						factor = 1.25
						learning >= 18
					}

					mult_modifier = {
						factor = 1.5
						learning >= 20
					}

					mult_modifier = {
						factor = 1.5
						learning >= 22
					}

					mult_modifier = {
						factor = 1.5
						learning >= 24
					}

					mult_modifier = {
						factor = 1.5
						learning >= 26
					}

					mult_modifier = {
						factor = 1.5
						learning >= 28
					}

					mult_modifier = {
						factor = 1.5
						learning >= 30
					}

					mult_modifier = {
						factor = 1.75
						trait = genius
					}

					mult_modifier = {
						factor = 1.5
						trait = quick
					}

					mult_modifier = {
						factor = 1.5
						job_spiritual = { learning >= 8 }
					}

					mult_modifier = {
						factor = 1.5
						job_spiritual = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.5
						job_spiritual = { learning >= 12 }
					}

					mult_modifier = {
						factor = 1.5
						job_spiritual = { learning >= 14 }
					}

					mult_modifier = {
						factor = 1.5
						job_spiritual = { learning >= 16 }
					}

					mult_modifier = {
						factor = 1.5
						job_spiritual = { learning >= 18 }
					}

					mult_modifier = {
						factor = 1.5
						job_spiritual = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						culture = greek
					}

					narrative_event = {
						id = HF.24206 # Success
						days = 150
						random = 250
					}
				}

				60 = {
					narrative_event = {
						id = HF.24207 # Failure
						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
			set_character_flag = flag_alex_prestige_search_high
		}

		prestige = -10000
	}

	option = {
		name = EVTOPTBHF24204

		custom_tooltip = {
			text = TT_EVTOPTBHF24202
			set_character_flag = flag_alex_prestige_search_medium
		}

		prestige = -7500
	}

	option = {
		name = EVTOPTCHF24204

		custom_tooltip = {
			text = TT_EVTOPTCHF24202
			set_character_flag = flag_alex_prestige_search_low
		}

		prestige = -5000
	}

	option = {
		name = EVTOPTDHF24204

		custom_tooltip = {
			text = TT_EVTOPTDHF24202
			set_character_flag = flag_alex_prestige_search_cheap
		}

		prestige = -2500
	}

	after = {
		hidden_effect = {
			random_list = {
				# Success - Bloodline created
				# Failure - Retry or change approach

				60 = {
					mult_modifier = {
						factor = 0.1
						has_character_flag = flag_alex_prestige_search_cheap
					}

					mult_modifier = {
						factor = 0.35
						has_character_flag = flag_alex_prestige_search_low
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_alex_prestige_search_medium
					}

					mult_modifier = {
						factor = 1.25
						trait = socializer
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 10
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 12
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 14
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 16
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 18
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 20
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 22
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 24
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 26
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 28
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 30
					}

					mult_modifier = {
						factor = 1.75
						trait = genius
					}

					mult_modifier = {
						factor = 1.5
						trait = quick
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 8 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 10 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 12 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 14 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 16 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 18 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 20 }
					}

					narrative_event = {
						id = HF.24208 # Success
						days = 350
						random = 450
					}
				}

				40 = {
					narrative_event = {
						id = HF.24209 # Failure
						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

		narrative_event = {
			id = HF.24202 # Decide budget
			tooltip = TT_EVTOPTAHF24201
		}
	}

	option = { # Learning search
		name = EVTOPTBHF24205

		narrative_event = {
			id = HF.24203 # Decide budget
			tooltip = TT_EVTOPTBHF24201
		}
	}

	option = { # Abandon search
		name = EVTOPTCHF24205

		custom_tooltip = { text = TT_EVTOPTCHF24201 }

		if = {
			limit = { trait = ambitious }

			remove_trait = ambitious
			add_trait_silently_depressed_effect = yes
		}

		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
			set_character_flag = flag_alex_prestige_search_high
		}

		prestige = -10000
	}

	option = {
		name = EVTOPTBHF24204

		custom_tooltip = {
			text = TT_EVTOPTBHF24202
			set_character_flag = flag_alex_prestige_search_medium
		}

		prestige = -7500
	}

	option = {
		name = EVTOPTCHF24204

		custom_tooltip = {
			text = TT_EVTOPTCHF24202
			set_character_flag = flag_alex_prestige_search_low
		}

		prestige = -5000
	}

	option = {
		name = EVTOPTDHF24204

		custom_tooltip = {
			text = TT_EVTOPTDHF24202
			set_character_flag = flag_alex_prestige_search_cheap
		}

		prestige = -2500
	}

	after = {
		hidden_effect = {
			random_list = {
				## Basic lower chance if tomb was not found
				# Success - Bloodline created
				# Failure - Retry or change approach

				40 = {
					mult_modifier = {
						factor = 0.1
						has_character_flag = flag_alex_prestige_search_cheap
					}

					mult_modifier = {
						factor = 0.35
						has_character_flag = flag_alex_prestige_search_low
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_alex_prestige_search_medium
					}

					mult_modifier = {
						factor = 1.25
						trait = socializer
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 10
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 12
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 14
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 16
					}

					mult_modifier = {
						factor = 1.25
						diplomacy >= 18
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 20
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 22
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 24
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 26
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 28
					}

					mult_modifier = {
						factor = 1.5
						diplomacy >= 30
					}

					mult_modifier = {
						factor = 1.75
						trait = genius
					}

					mult_modifier = {
						factor = 1.5
						trait = quick
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 8 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 10 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 12 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 14 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 16 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 18 }
					}

					mult_modifier = {
						factor = 1.5
						job_chancellor = { diplomacy >= 20 }
					}

					narrative_event = {
						id = HF.24208 # Success
						days = 350
						random = 450
					}
				}

				60 = {
					narrative_event = {
						id = HF.24209 # Failure
						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

		narrative_event = {
			id = HF.24203 # Decide budget
			tooltip = TT_EVTOPTBHF24201
		}
	}

	option = { # Intrigue search
		name = EVTOPTAHF24207

		narrative_event = {
			id = HF.24202 # Decide budget
			tooltip = TT_EVTOPTAHF24201
		}
	}

	option = { # Abandon search
		name = EVTOPTCHF24207

		custom_tooltip = { text = TT_EVTOPTCHF24201 }

		if = {
			limit = { trait = ambitious }

			remove_trait = ambitious
			add_trait_silently_depressed_effect = yes
		}

		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 }
			give_nickname = nick_the_great
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = alexander_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = alexander_bloodline_01
				inheritance = matrilineal
			}
		}

		any_player = {
			limit = {
				is_within_diplo_range = ROOT
				NOT = { character = 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
			set_character_flag = flag_alex_prestige_search_high
		}

		prestige = -10000
	}

	option = {
		name = EVTOPTBHF24209

		custom_tooltip = {
			text = TT_EVTOPTBHF24202
			set_character_flag = flag_alex_prestige_search_medium
		}

		prestige = -7500
	}

	option = {
		name = EVTOPTCHF24209

		custom_tooltip = {
			text = TT_EVTOPTCHF24202
			set_character_flag = flag_alex_prestige_search_low
		}

		prestige = -5000
	}

	option = { # Abandon search
		name = EVTOPTDHF24209

		custom_tooltip = { text = TT_EVTOPTCHF24201 }

		if = {
			limit = { trait = ambitious }

			remove_trait = ambitious
			add_trait_silently_depressed_effect = yes
		}

		prestige = -3000
	}

	after = {
		hidden_effect = {
			if = {
				limit = {
					OR = {
						has_character_flag = flag_alex_prestige_search_high
						has_character_flag = flag_alex_prestige_search_medium
						has_character_flag = flag_alex_prestige_search_low
					}
				}

				random_list = {
					## Basic lower chance if tomb was not found
					# Success - Bloodline created
					# Failure - Retry or change approach

					40 = {
						mult_modifier = {
							factor = 0.1
							has_character_flag = flag_alex_prestige_search_cheap
						}

						mult_modifier = {
							factor = 0.35
							has_character_flag = flag_alex_prestige_search_low
						}

						mult_modifier = {
							factor = 0.75
							has_character_flag = flag_alex_prestige_search_medium
						}

						mult_modifier = {
							factor = 1.25
							trait = socializer
						}

						mult_modifier = {
							factor = 1.25
							diplomacy >= 10
						}

						mult_modifier = {
							factor = 1.25
							diplomacy >= 12
						}

						mult_modifier = {
							factor = 1.25
							diplomacy >= 14
						}

						mult_modifier = {
							factor = 1.25
							diplomacy >= 16
						}

						mult_modifier = {
							factor = 1.25
							diplomacy >= 18
						}

						mult_modifier = {
							factor = 1.5
							diplomacy >= 20
						}

						mult_modifier = {
							factor = 1.5
							diplomacy >= 22
						}

						mult_modifier = {
							factor = 1.5
							diplomacy >= 24
						}

						mult_modifier = {
							factor = 1.5
							diplomacy >= 26
						}

						mult_modifier = {
							factor = 1.5
							diplomacy >= 28
						}

						mult_modifier = {
							factor = 1.5
							diplomacy >= 30
						}

						mult_modifier = {
							factor = 1.75
							trait = genius
						}

						mult_modifier = {
							factor = 1.5
							trait = quick
						}

						mult_modifier = {
							factor = 1.5
							job_chancellor = { diplomacy >= 8 }
						}

						mult_modifier = {
							factor = 1.5
							job_chancellor = { diplomacy >= 10 }
						}

						mult_modifier = {
							factor = 1.5
							job_chancellor = { diplomacy >= 12 }
						}

						mult_modifier = {
							factor = 1.5
							job_chancellor = { diplomacy >= 14 }
						}

						mult_modifier = {
							factor = 1.5
							job_chancellor = { diplomacy >= 16 }
						}

						mult_modifier = {
							factor = 1.5
							job_chancellor = { diplomacy >= 18 }
						}

						mult_modifier = {
							factor = 1.5
							job_chancellor = { diplomacy >= 20 }
						}

						narrative_event = {
							id = HF.24208 # Success
							days = 350
							random = 450
						}
					}

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

# Other 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
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion

	desc = {
		text = EVTDESCAHF24220
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = samrat_chakravartin_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}
	desc = {
		text = EVTDESCBHF24220
		trigger = {
			NOT = {
				any_owned_bloodline = {
					has_bloodline_flag = samrat_chakravartin_bloodline
					bloodline_is_active_for = PREV
				}
			}
		}
	}

	is_triggered_only = yes # on_decade_pulse

	ai = no
	religion_group = indian_group
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		real_tier = EMPEROR
		prestige >= 15000
		is_alternate_start = no

		capital_scope = {
			region = world_india
		}

		NOR = {
			trait = content
			has_character_flag = flag_chance_for_ashoka_blood # Opportunity only once per character
			has_global_flag = flag_ashoka_blood_restored # Bloodline unlocked only once per playthrough
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 4

			any_owned_bloodline = {
				has_bloodline_flag = samrat_chakravartin_bloodline
				bloodline_is_active_for = PREV
			}
		}

		mult_modifier = {
			factor = 3
			trait = charitable
		}

		mult_modifier = {
			factor = 3
			trait = brave
		}

		mult_modifier = {
			factor = 3
			religion = buddhist
		}

		mult_modifier = {
			factor = 0.5
			practical_age >= 50
		}

		mult_modifier = {
			factor = 2
			has_education_learning_trigger = yes
		}

		mult_modifier = {
			factor = 2
			has_lifestyle_learning_trigger = yes
		}

		mult_modifier = {
			factor = 2
			trait = scholar
		}

		mult_modifier = {
			factor = 2
			has_ambition = obj_forge_bloodline
		}

		mult_modifier = {
			factor = 2
			learning >= 8
		}

		mult_modifier = {
			factor = 2
			learning >= 10
		}

		mult_modifier = {
			factor = 2
			learning >= 12
		}

		mult_modifier = {
			factor = 2
			learning >= 14
		}

		mult_modifier = {
			factor = 2
			learning >= 16
		}

		mult_modifier = {
			factor = 2
			learning >= 18
		}

		mult_modifier = {
			factor = 2
			learning >= 20
		}

		mult_modifier = {
			factor = 2
			learning >= 22
		}

		mult_modifier = {
			factor = 2
			learning >= 24
		}

		mult_modifier = {
			factor = 2
			learning >= 26
		}

		mult_modifier = {
			factor = 2
			learning >= 28
		}

		mult_modifier = {
			factor = 2
			learning >= 30
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 22000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 24000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 26000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 28000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 30000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 40000
		}

		mult_modifier = {
			factor = 1.5
			prestige >= 50000
		}

		mult_modifier = {
			factor = 1.5

			religion = buddhist
			piety >= 1000
		}

		mult_modifier = {
			factor = 1.5

			religion = buddhist
			piety >= 1500
		}

		mult_modifier = {
			factor = 1.75

			religion = buddhist
			piety >= 2000
		}

		mult_modifier = {
			factor = 1.75

			check_variable = {
				which = bloodline_won_wars
				value >= 5
			}
		}

		mult_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

		narrative_event = {
			id = HF.24221
			days = 25
			random = 25
			tooltip = TT_EVTOPTAHF24220
		}
	}

	option = { # Abandon
		name = EVTOPTBHF24220
	}
}

# Call Brahmins to examine you
narrative_event = {
	id = HF.24221
	title = EVTTITLEHF24220
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion

	desc = {
		text = EVTDESCAHF24221
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = samrat_chakravartin_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}
	desc = {
		text = EVTDESCBHF24221
		trigger = {
			NOT = {
				any_owned_bloodline = {
					has_bloodline_flag = samrat_chakravartin_bloodline
					bloodline_is_active_for = PREV
				}
			}
		}
	}

	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
			set_character_flag = flag_ashoka_scholars_search_high
		}

		scaled_wealth = { value = -4 min = -1000 max = -2000 }
	}

	option = {
		name = EVTOPTBHF24221

		custom_tooltip = {
			text = TT_EVTOPTBHF24202
			set_character_flag = flag_ashoka_scholars_search_medium
		}

		scaled_wealth = { value = -3 min = -750 max = -1500 }
	}

	option = {
		name = EVTOPTCHF24221

		custom_tooltip = {
			text = TT_EVTOPTCHF24202
			set_character_flag = flag_ashoka_scholars_search_low
		}

		scaled_wealth = { value = -2 min = -500 max = -1000 }
	}

	option = {
		name = EVTOPTDHF24221

		custom_tooltip = {
			text = TT_EVTOPTDHF24202
			set_character_flag = flag_ashoka_scholars_search_cheap
		}

		scaled_wealth = { value = -1 min = -250 max = -500 }
	}

	after = {
		narrative_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
		tooltip_info = diplomacy

		trigger = {
			diplomacy >= 12
			trait = brave
		}

		set_character_flag = flag_ashoka_diplomacy_check
	}

	option = {
		name = EVTOPTAHF24222
		tooltip_info = intrigue

		trigger = {
			intrigue >= 18
			NOT = { trait = brave }
		}

		set_character_flag = flag_ashoka_intrigue_check
	}

	option = {
		name = EVTOPTBHF24222
		tooltip_info = learning

		trigger = {
			learning >= 18
			NOT = { trait = brave }
		}

		set_character_flag = flag_ashoka_learning_check
	}

	option = {
		name = EVTOPTCHF24222
		tooltip_info = brave

		trigger = { trait = brave }
	}

	option = {
		name = EVTOPTDHF24222

		trigger = {
			NOR = {
				trait = brave
				trait = craven
			}
		}
	}

	option = {
		name = EVTOPTEHF24222
		tooltip_info = craven

		trigger = { trait = craven }
	}

	after = {
		custom_tooltip = {
			text = TT_EVTOPTHF24222

			random_list = {
				# Success - Move to second test
				# Failure - Retry or change approach

				40 = {
					mult_modifier = {
						factor = 0.1
						has_character_flag = flag_ashoka_scholars_search_cheap
					}

					mult_modifier = {
						factor = 0.35
						has_character_flag = flag_ashoka_scholars_search_low
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_ashoka_scholars_search_medium
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 30
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 30
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 12
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 14
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 16
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 30
					}

					mult_modifier = {
						factor = 0.5
						trait = craven
					}

					mult_modifier = {
						factor = 1.5
						trait = brave
					}

					narrative_event = {
						id = HF.24224 # Success
						days = 350
						random = 450
					}
				}

				60 = {
					narrative_event = {
						id = HF.24223 # Failure
						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
		tooltip_info = diplomacy

		trigger = {
			trait = brave
			diplomacy >= 12
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_diplomacy_check
		}
	}

	option = {
		name = EVTOPTAHF24223
		tooltip_info = intrigue

		trigger = {
			intrigue >= 18
			NOT = { trait = brave }
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_intrigue_check
		}
	}

	option = {
		name = EVTOPTBHF24223
		tooltip_info = learning

		trigger = {
			learning >= 18
			NOT = { trait = brave }
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_learning_check
		}
	}

	option = {
		name = EVTOPTCHF24223
		tooltip_info = brave

		trigger = { trait = brave }

		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}

	option = {
		name = EVTOPTDHF24223

		trigger = {
			NOR = {
				trait = brave
				trait = craven
			}
		}

		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}

	option = {
		name = EVTOPTEHF24223
		tooltip_info = craven

		trigger = { trait = craven }

		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}

	option = { # Abandon search
		name = EVTOPTFHF24223

		custom_tooltip = { text = TT_EVTOPTFHF24223 }

		if = {
			limit = { trait = ambitious }

			remove_trait = ambitious
			add_trait_silently_depressed_effect = yes
		}

		piety = -2000
		set_character_flag = flag_ashoka_abandoning_quest
	}

	after = {
		if = {
			limit = { has_character_flag = flag_ashoka_abandoning_quest }
			clr_character_flag = flag_ashoka_abandoning_quest
		}
		else = {
			piety = -500

			hidden_effect = {
				random_list = {
					# Success - Move to second test
					# Failure - Retry or change approach

					40 = {
						mult_modifier = {
							factor = 0.1
							has_character_flag = flag_ashoka_scholars_search_cheap
						}

						mult_modifier = {
							factor = 0.35
							has_character_flag = flag_ashoka_scholars_search_low
						}

						mult_modifier = {
							factor = 0.75
							has_character_flag = flag_ashoka_scholars_search_medium
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 30
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 30
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 12
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 14
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 16
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 30
						}

						mult_modifier = {
							factor = 0.5
							trait = craven
						}

						mult_modifier = {
							factor = 1.5
							trait = brave
						}

						narrative_event = {
							id = HF.24224 # Success
							days = 350
							random = 450
						}
					}

					60 = {
						narrative_event = {
							id = HF.24223 # Failure
							days = 350
							random = 450
						}
					}
				}
			}
		}
	}
}

# 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
		tooltip_info = diplomacy

		trigger = {
			trait = humble
			diplomacy >= 12
		}

		set_character_flag = flag_ashoka_diplomacy_check
	}

	option = {
		name = EVTOPTAHF24224
		tooltip_info = intrigue

		trigger = {
			intrigue >= 18
			NOT = { trait = humble }
		}

		set_character_flag = flag_ashoka_intrigue_check
	}

	option = {
		name = EVTOPTBHF24224
		tooltip_info = learning

		trigger = {
			learning >= 18
			NOT = { trait = humble }
		}

		set_character_flag = flag_ashoka_learning_check
	}

	option = {
		name = EVTOPTCHF24224
		tooltip_info = humble

		trigger = { trait = humble }
	}

	option = {
		name = EVTOPTDHF24224

		trigger = {
			NOR = {
				trait = humble
				trait = proud
			}
		}
	}

	option = {
		name = EVTOPTEHF24224
		tooltip_info = proud

		trigger = { trait = proud }
	}

	after = {
		custom_tooltip = {
			text = TT_EVTOPTHF24222

			random_list = {
				# Success - Move to third test
				# Failure - Retry or change approach

				40 = {
					mult_modifier = {
						factor = 0.1
						has_character_flag = flag_ashoka_scholars_search_cheap
					}

					mult_modifier = {
						factor = 0.35
						has_character_flag = flag_ashoka_scholars_search_low
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_ashoka_scholars_search_medium
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 30
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 30
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 12
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 14
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 16
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 30
					}

					mult_modifier = {
						factor = 0.5
						trait = proud
					}

					mult_modifier = {
						factor = 1.5
						trait = humble
					}

					narrative_event = {
						id = HF.24226 # Success
						days = 350
						random = 450
					}
				}

				60 = {
					narrative_event = {
						id = HF.24225 # Failure
						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
		tooltip_info = diplomacy

		trigger = {
			trait = humble
			diplomacy >= 12
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_diplomacy_check
		}
	}

	option = {
		name = EVTOPTAHF24225
		tooltip_info = intrigue

		trigger = {
			intrigue = 18
			NOT = { trait = humble }
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_intrigue_check
		}
	}

	option = {
		name = EVTOPTBHF24225
		tooltip_info = learning

		trigger = {
			learning >= 18
			NOT = { trait = humble }
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_learning_check
		}
	}

	option = {
		name = EVTOPTCHF24225
		tooltip_info = humble

		trigger = { trait = humble }

		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}

	option = {
		name = EVTOPTDHF24225

		trigger = {
			NOR = {
				trait = humble
				trait = proud
			}
		}

		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}

	option = {
		name = EVTOPTEHF24225
		tooltip_info = proud

		trigger = { trait = proud }

		custom_tooltip = { text = TT_EVTOPTHF24222 }
	}

	option = { # Abandon search
		name = EVTOPTFHF24225

		custom_tooltip = { text = TT_EVTOPTFHF24223 }

		if = {
			limit = { trait = ambitious }

			remove_trait = ambitious
			add_trait_silently_depressed_effect = yes
		}

		piety = -2000
		set_character_flag = flag_ashoka_abandoning_quest
	}

	after = {
		if = {
			limit = { has_character_flag = flag_ashoka_abandoning_quest }
			clr_character_flag = flag_ashoka_abandoning_quest
		}
		else = {
			piety = -500

			hidden_effect = {
				random_list = {
					# Success - Move to third test
					# Failure - Retry or change approach

					40 = {
						mult_modifier = {
							factor = 0.1
							has_character_flag = flag_ashoka_scholars_search_cheap
						}

						mult_modifier = {
							factor = 0.35
							has_character_flag = flag_ashoka_scholars_search_low
						}

						mult_modifier = {
							factor = 0.75
							has_character_flag = flag_ashoka_scholars_search_medium
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 30
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 30
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 12
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 14
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 16
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 30
						}

						mult_modifier = {
							factor = 0.5
							trait = proud
						}

						mult_modifier = {
							factor = 1.5
							trait = humble
						}

						narrative_event = {
							id = HF.24226 # Success
							days = 350
							random = 450
						}
					}

					60 = {
						narrative_event = {
							id = HF.24225 # Failure
							days = 350
							random = 450
						}
					}
				}
			}
		}
	}
}

# 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
		tooltip_info = diplomacy

		trigger = {
			trait = charitable
			diplomacy >= 12
		}

		set_character_flag = flag_ashoka_diplomacy_check

		scaled_wealth = { value = -4 min = -750 max = -1000 }
	}

	option = {
		name = EVTOPTAHF24226
		tooltip_info = intrigue

		trigger = {
			intrigue >= 18
			NOT = { trait = charitable }
		}

		set_character_flag = flag_ashoka_intrigue_check

		scaled_wealth = { value = -3 min = -500 max = -750 }
	}

	option = {
		name = EVTOPTBHF24226
		tooltip_info = learning

		trigger = {
			learning = 18
			NOT = { trait = charitable }
		}

		set_character_flag = flag_ashoka_learning_check

		scaled_wealth = { value = -3 min = -500 max = -750 }
	}

	option = {
		name = EVTOPTCHF24226
		tooltip_info = charitable

		trigger = { trait = 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
		tooltip_info = greedy

		trigger = { trait = greedy }

		scaled_wealth = { value = -2 min = -350 max = -500 }
	}

	after = {
		custom_tooltip = {
			text = TT_EVTOPTHF24222

			random_list = {
				# Success - Found Bloodline
				# Failure - Retry or change approach

				40 = {
					mult_modifier = {
						factor = 0.1
						has_character_flag = flag_ashoka_scholars_search_cheap
					}

					mult_modifier = {
						factor = 0.35
						has_character_flag = flag_ashoka_scholars_search_low
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_ashoka_scholars_search_medium
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_intrigue_check
						intrigue >= 30
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_learning_check
						learning >= 30
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 12
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 14
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 16
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 18
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 20
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 22
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 24
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 28
					}

					mult_modifier = {
						factor = 1.5
						has_character_flag = flag_ashoka_diplomacy_check
						diplomacy >= 30
					}

					mult_modifier = {
						factor = 0.5
						trait = greedy
					}

					mult_modifier = {
						factor = 1.5
						trait = charitable
					}

					narrative_event = {
						id = HF.24228 # Success
						days = 350
						random = 450
					}
				}

				60 = {
					narrative_event = {
						id = HF.24227 # Failure
						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
		tooltip_info = diplomacy

		trigger = {
			trait = charitable
			diplomacy >= 12
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_diplomacy_check
		}

		scaled_wealth = { value = -4 min = -750 max = -1000 }
	}

	option = {
		name = EVTOPTAHF24227
		tooltip_info = intrigue

		trigger = {
			intrigue >= 18
			NOT = { trait = charitable }
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_intrigue_check
		}

		scaled_wealth = { value = -3 min = -500 max = -750 }
	}

	option = {
		name = EVTOPTBHF24227
		tooltip_info = learning

		trigger = {
			learning >= 18
			NOT = { trait = charitable }
		}

		custom_tooltip = {
			text = TT_EVTOPTHF24222
			set_character_flag = flag_ashoka_learning_check
		}

		scaled_wealth = { value = -3 min = -500 max = -750 }
	}

	option = {
		name = EVTOPTCHF24227
		tooltip_info = charitable

		trigger = { trait = 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
		tooltip_info = greedy

		trigger = { trait = 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
			add_trait_silently_depressed_effect = yes
		}

		piety = -2000
		set_character_flag = flag_ashoka_abandoning_quest
	}

	after = {
		if = {
			limit = { has_character_flag = flag_ashoka_abandoning_quest }
			clr_character_flag = flag_ashoka_abandoning_quest
		}
		else = {
			piety = -500

			hidden_effect = {
				random_list = {
					# Success - Move to third test
					# Failure - Retry or change approach

					40 = {
						mult_modifier = {
							factor = 0.1
							has_character_flag = flag_ashoka_scholars_search_cheap
						}

						mult_modifier = {
							factor = 0.35
							has_character_flag = flag_ashoka_scholars_search_low
						}

						mult_modifier = {
							factor = 0.75
							has_character_flag = flag_ashoka_scholars_search_medium
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_intrigue_check
							intrigue >= 30
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_learning_check
							learning >= 30
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 12
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 14
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 16
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 18
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 20
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 22
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 24
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 28
						}

						mult_modifier = {
							factor = 1.5
							has_character_flag = flag_ashoka_diplomacy_check
							diplomacy >= 30
						}

						mult_modifier = {
							factor = 0.5
							trait = proud
						}

						mult_modifier = {
							factor = 1.5
							trait = humble
						}

						narrative_event = {
							id = HF.24228 # Success
							days = 350
							random = 450
						}
					}

					60 = {
						narrative_event = {
							id = HF.24227 # Failure
							days = 350
							random = 450
						}
					}
				}
			}
		}
	}
}

# Acquired Ashoka's Bloodline
narrative_event = {
	id = HF.24228
	title = EVTTITLEHF24228
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion

	desc = {
		text = EVTDESCAHF24228
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = samrat_chakravartin_bloodline
				bloodline_is_active_for = PREV
			}
		}
	}
	desc = {
		text = EVTDESCBHF24228
		trigger = {
			NOT = {
				any_owned_bloodline = {
					has_bloodline_flag = samrat_chakravartin_bloodline
					bloodline_is_active_for = PREV
				}
			}
		}
	}

	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
			}

			if = {
				limit = {  is_female = no }
				give_nickname = nick_the_lion
			}
			else = {
				give_nickname = nick_the_lioness
			}
		}

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = ashoka_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = ashoka_bloodline_01
				inheritance = matrilineal
			}
		}

		any_player = {
			limit = {
				is_within_diplo_range = ROOT
				NOT = { character = ROOT }
			}

			narrative_event = { id = HF.24229 }
		}
	}
}

# Notify other players
narrative_event = {
	id = HF.24229
	title = EVTTITLEHF24228
	picture = GFX_evt_bishop_hindu
	border = GFX_event_narrative_frame_religion

	desc = {
		text = EVTDESCAHF24229
		trigger = {
			FROM = {
				any_owned_bloodline = {
					has_bloodline_flag = samrat_chakravartin_bloodline
					bloodline_is_active_for = PREV
				}
			}
		}
	}
	desc = {
		text = EVTDESCBHF24229
		trigger = {
			NOT = {
				FROM = {
					any_owned_bloodline = {
						has_bloodline_flag = samrat_chakravartin_bloodline
						bloodline_is_active_for = PREV
					}
				}
			}
		}
	}

	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
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_diplomacy

	desc = {
		trigger = {
			any_owned_bloodline = {
				has_bloodline_flag = bloodline_alexander
				bloodline_is_active_for = PREV
			}
		}
		text = EVTDESCAHF24230
	}
	desc = {
		trigger = {
			NOT = {
				any_owned_bloodline = {
					has_bloodline_flag = bloodline_ashoka
					bloodline_is_active_for = PREV
				}
			}
		}
		text = EVTDESCBHF24230
	}

	only_rulers = yes
	min_age = 35
	only_capable = yes
	prisoner = no

	is_triggered_only = yes

	trigger = {
		higher_real_tier_than = DUKE
		NOT = { trait = depressed }

		check_variable = {
			which = bloodline_won_wars
			value < 10
		}

		any_owned_bloodline = {
			bloodline_is_active_for = PREV

			OR = {
				has_bloodline_flag = bloodline_alexander
				has_bloodline_flag = bloodline_ashoka
			}

			founder = {
				NOT = { character = ROOT }
			}
		}
	}

	option = {
		name = EVTOPTAHF24230
		tooltip_info = content

		trigger = { trait = content }

	}
	option = {
		name = EVTOPTBHF24230

		random = {
			chance = 25
			add_trait_depressed_effect = yes
		}
	}
}

# 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

	is_triggered_only = yes
	hide_window = yes

	trigger = {
		any_owned_bloodline = {
			has_bloodline_flag = bloodline_dragon
			bloodline_is_active_for = PREV
			founder = { character = ROOT }
		}

		NOT = {
			has_game_rule = {
				name = supernatural_events
				value = off
			}
		}
	}

	immediate = {
		event_target:pulse_province = { # Delayed province event, to make sure it always fires
			province_event = {
				id = HF.24233
				years = 20
			}
		}
	}
}

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

	is_triggered_only = yes
	hide_window = 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 # prisoner_dragon_burning, HF_bloodline_decisions.txt

	ai = no

	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 # prisoner_dragon_burning, HF_bloodline_decisions.txt

	immediate = {
		if = {
			limit = { multiplayer = yes }

			death = {
				death_reason = death_execution_burning
				killer = FROMFROM
			}
		}
	}

	option = {
		name = EVTOPTAHF24235

		if = {
			limit = { multiplayer = no }

			death = {
				death_reason = death_execution_burning
				killer = FROMFROM
			}
		}
		else = {
			tooltip = {
				death = {
					death_reason = death_execution_burning
					killer = FROMFROM
				}
			}
		}
	}
}

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

# Technology Bloodline
# Bards/Scholars/Mystics arriving at court
character_event = {
	id = HF.24236

	is_triggered_only = yes
	hide_window = yes

	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 16

	trigger = {
		piety >= 0

		any_owned_bloodline = {
			has_bloodline_flag = bloodline_wandering_artists
			bloodline_is_active_for = PREV
		}
	}

	immediate = {
		random_list = {
			60 = { character_event = { id = HF.24237 } } # Bard
			30 = { character_event = { id = HF.24238 } } # Scholar
			10 = { character_event = { id = HF.24239 } } # Mystic

			60 = {
				mult_modifier = {
					factor = 3
					ai = yes
				}

				mult_modifier = {
					factor = 1.35
					lower_real_tier_than = DUKE
				}

				mult_modifier = {
					factor = 1.35
					lower_real_tier_than = KING
				}

				mult_modifier = {
					factor = 1.7
					learning < 4
				}

				mult_modifier = {
					factor = 1.5
					learning < 8
				}

				mult_modifier = {
					factor = 1.35
					learning < 12
				}

				mult_modifier = {
					factor = 1.75
					is_evil_trigger = yes
				}

				mult_modifier = {
					factor = 0.65
					is_benevolent_trigger = yes
				}
			}
		}
	}
}

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

	is_triggered_only = yes

	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

		reverse_opinion = {
			name = opinion_loyal_servant
			who = event_target:invited_character
			years = 100
		}
	}

	option = {
		name = EVTOPTBHF24237

		hidden_effect = {
			event_target:invited_character = {
				death = { death_reason = death_missing }
			}
		}
	}
}

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

	is_triggered_only = yes

	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

		reverse_opinion = {
			name = opinion_loyal_servant
			who = event_target:invited_character
			years = 100
		}
	}

	option = {
		name = EVTOPTBHF24238

		hidden_effect = {
			event_target:invited_character = {
				death = { death_reason = death_missing }
			}
		}
	}
}

# Mystic character arrives
character_event = {
	id = HF.24239
	border = GFX_event_normal_frame_diplomacy

	desc = {
		text = EVTDESCHFA24239
		picture = GFX_evt_hooded_figure_hf
		trigger = { is_female = no }
	}
	desc = {
		text = EVTDESCHFB24239
		picture = GFX_evt_woman_at_window_hf
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	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
			}

			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

		reverse_opinion = {
			name = opinion_loyal_servant
			who = event_target:invited_character
			years = 100
		}
	}

	option = {
		name = EVTOPTBHF24239

		hidden_effect = {
			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 # adopt_chinese_imperialism, jd_decisions.txt

	option = { # Gain Chinese Imperialism bloodline
		name = EVTOPTAHF24240

		if = {
			limit = { is_female = no }

			create_bloodline = {
				type = chinese_imperial_bloodline_01
			}
		}
		else = {
			create_bloodline = {
				type = chinese_imperial_bloodline_01
				inheritance = matrilineal
			}
		}
	}
}

# Matilde's (or similar) bloodline. Fired on_war_ended_victory of an Antipapal/Excommunication war against the HREmperor.
# FROM is attacker
# ROOT is defender
character_event = {
	id = HF.24250

	is_triggered_only = yes
	hide_window = yes

	has_dlc = "Holy Fury"

	trigger = {
		NOT = { has_global_flag = flag_matilde_bloodline } # Just once

		ROOT = {
			has_landed_title = e_hre

			any_war = {
				OR = {
					using_cb = excommunicated_ruler
					using_cb = depose_antipope
				}

				any_attacker = { character = FROM }
			}
		}

		FROM = { # Must be attacker
			religion = catholic
			piety >= 500
			realm_size < 120
			is_feudal = yes
			is_adult = yes
			is_alternate_start = no
			lower_real_tier_than = EMPEROR
			is_heretic = no
			is_incapable = no

			religion_head = {
				opinion = {
					who = PREV # At the very least in somewhat good terms...
					value >= 25
				}

				NOT = { is_rival = PREV }
			}

			NOR = { # Not if already Forger of a Bloodline, or owner of a Forged Bloodline.
				any_owned_bloodline = {
					has_bloodline_flag = created_bloodline
					bloodline_is_active_for = PREV
				}

				any_owned_bloodline = {
					founder = { character = PREVPREV }
				}
			}

			# No glaring spots on reputation
			NOR = {
				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 = {
					OR = {
						trait = bastard
						trait = legit_bastard
					}
				}
			}

			# And at least a couple of virtues
			calc_true_if = {
				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
			}

			trigger_if = {
				limit = { is_married = no }
				has_children = no
			}

			# Either below King-tier, or must be either a Crowned Queen or a Vicereine.
			OR = {
				lower_real_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
			}
		}
	}

	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
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_narrative_frame_war
	sound = bloodline_added

	desc = {
		text = EVTDESCAHF24251
		trigger = { character = c_7757 } # Special loc for Matilde
	}
	desc = {
		text = EVTDESCBHF24251
		trigger = {
			NOT = { character = c_7757 } # Generic if just similar ruler
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24251

		religion_authority = {
			name = 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 = c_7757 }
			create_bloodline = { type = true_matilde_bloodline }
		}
		else_if = {
			limit = { is_female = yes }
			create_bloodline = { type = matilde_bloodline }
		}
		else = {
			create_bloodline = { type = matilde_male_bloodline }
		}

		any_player = {
			limit = {
				religion = ROOT
				is_within_diplo_range = ROOT

				NOR = {
					character = event_target:defeated_emperor
					character = ROOT
				}
			}

			narrative_event = {
				id = HF.24252
				days = 1
			}
		}

		event_target:defeated_emperor = {
			narrative_event = {
				id = HF.24253
				days = 1
			}
		}
	}

	option = {
		name = EVTOPTBHF24251

		tiered_piety_reward_effect = yes

		religion_authority = {
			name = restored_primacy
			years = 50
		}

		ai_chance = { factor = 0 }
	}
}

# Notify players
narrative_event = {
	id = HF.24252
	title = EVTTITLEHF24252
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_narrative_frame_war
	sound = bloodline_added

	desc = {
		text = EVTDESCAHF24252
		trigger = {
			FROM = { character = c_7757 }
		}
	}
	desc = {
		text = EVTDESCBHF24252
		trigger = {
			FROM = { NOT = { character = c_7757 } }
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24252
	}
}

# Notify defeated emperor
narrative_event = {
	id = HF.24253
	title = EVTTITLEHF24252
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_narrative_frame_war
	sound = bloodline_added

	desc = {
		text = EVTDESCAHF24253
		trigger = {
			FROM = { character = c_7757 }
		}
	}
	desc = {
		text = EVTDESCBHF24253
		trigger = {
			FROM = { NOT = { character = c_7757 } }
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHF24253

		tiered_piety_negative_effect = yes

		if = {
			limit = { NOT = { is_rival = FROM } }
			add_rival = FROM
		}

		if = {
			limit = {
				FROM = { character = c_7757 }
			}

			e_hre = {
				show_scope_change = no

				holder_scope = {
					show_scope_change = no

					any_vassal = {
						show_scope_change = no

						limit = {
							culture = italian
							lower_real_tier_than = KING
							is_landed = yes

							capital_scope = {
								region = world_europe_south_italy
							}
						}

						set_defacto_liege = THIS
					}
				}
			}
		}
	}
}