namespace = bp2_yearly

################################################################
#					       |\__/,|   (`\                       #
#					     _.|o o  |_   ) )                      #
#-----------------------(((---(((------------------------------#
# Special Chains: Playdate 5000-11 and destiny_child.1000-1035 #
# Small Chains: 5000 - 5014                                    #
# Flavours: 5050 - 5060                                        #
################################################################

##################################################
# # Princes in the Tower
# by Nick Meredith
# #5000-5001
##################################################

# You have a chance to imprison the young prince/ss
bp2_yearly.5000 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5000.t
	desc = bp2_yearly.5000.desc
	theme = corruption
	left_portrait = {
		character = root
		animation = scheme
	}
	right_portrait = {
		character = scope:tower_prince
		animation = boredom
	}
	cooldown = { years = 100 } #Just to ensure it doesn't fire twice for multiple heirs
	trigger = {
		#DLC check
		has_bp2_dlc_trigger = yes
		#Standard checks
		is_available_adult = yes
		#You are a diarch
		is_diarch = yes
		#And a powerful one
		liege = { has_diarchy_parameter = diarchy_type_is_entrenched_regency }
		#There is an heir to the title you're the diarch of
		liege = {
			#They're quite young
			age < 14
			#and not imprisoned
			is_imprisoned = no
			#and they're not a player character
			is_ai = yes
		}
		#Just to ensure this doesn't happen too much
		#is_ai = no
	}
	immediate = {
		liege = { save_scope_as = tower_prince }
		save_scope_value_as = { #For a bit of fuzziness
			name = integer
			value = {
				integer_range = {
					min = 1
					max = 5
				}
			}
		}
	}
	#Imprison them!
	option = {
		name = bp2_yearly.5000.a

		if = {
			limit = {
				any_held_county = {
					any_county_province = {
						has_building = the_tower_of_london_01
					}
				}
			}
			add_internal_flag = special
			custom_tooltip = bp2_yearly.5000.a.flavor
		}

		remove_short_term_gold = minor_gold_value

		if = {
			limit = {
				any_held_county = {
					any_county_province = {
						has_building = the_tower_of_london_01
					}
				}
			}
			hard_imprison_character_effect = {
				TARGET = scope:tower_prince
				IMPRISONER = root
			}
			trigger_event = {
				id = bp2_yearly.5001
				days = { 40 80 }
			}
		}
		else = {
			random_list = {
				10 = { #You succeed
					desc = bp2_yearly.5000.a.success
					modifier = {
						add = scope:integer
					}
					modifier = {
						add = 5
						OR = {
							has_trait = callous
							has_trait = sadistic
						}
					}
					modifier = {
						add = 5
						intrigue > 15
					}
					send_interface_toast = {
						title = bp2_yearly.5000.a.success
						left_icon = scope:tower_prince
						hard_imprison_character_effect = {
							TARGET = scope:tower_prince
							IMPRISONER = root
						}
					}
					trigger_event = {
						id = bp2_yearly.5001
						days = { 40 80 }
					}
				}
				10 = { #You fail
					desc = bp2_yearly.5000.a.failure
					modifier = {
						add = 5
						OR = {
							has_trait = compassionate
							has_trait = just
						}
					}
					modifier = {
						add = 5
						intrigue < 8
					}
					reverse_add_opinion = {
						target = scope:tower_prince
						modifier = hate_opinion
						opinion = -40
					}
					send_interface_toast = {
						title = bp2_yearly.5000.a.failure
						left_icon = scope:tower_prince
						show_as_tooltip = {
							custom_tooltip = bp2_yearly.5000.a.tt
						}
					}
					hidden_effect = {
						scope:tower_prince = {
							every_vassal = {
								limit = {
									root != this
								}
								add_opinion = {
									target = root
									modifier = suspicion_opinion
									opinion = -15
								}
							}
						}
					}
				}
			}
		}

		stress_impact = {
			compassionate = medium_stress_impact_gain
			content = medium_stress_impact_gain
			arbitrary = miniscule_stress_impact_loss
			ambitious = medium_stress_impact_loss
			callous = miniscule_stress_impact_loss
			sadistic = medium_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = content
				}
			}
		}
	}
	option = { #Leave them be
		name = bp2_yearly.5000.b

		add_trait = loyal

		reverse_add_opinion = {
			target = scope:tower_prince
			modifier = trust_opinion
			opinion = 50
		}

		stress_impact = {
			craven = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			compassionate = miniscule_stress_impact_loss
			trusting = miniscule_stress_impact_loss
			arbitrary = minor_stress_impact_gain
			ambitious = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = callous
					has_trait = sadistic
					has_trait = ambitious
				}
			}
		}
	}
}

# You decide their fate
bp2_yearly.5001 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5001.t
	desc = bp2_yearly.5001.desc
	theme = dungeon
	left_portrait = {
		character = root
		animation = spymaster
	}
	right_portrait = {
		character = scope:tower_prince
		animation = fear
	}
	trigger = {
		#You are a diarch
		is_diarch = yes
		#Ensure that the prince is still imprisoned
		exists = scope:tower_prince
		liege = scope:tower_prince
		scope:tower_prince = {
			is_imprisoned_by = root
		}
	}

	immediate = {
		scope:tower_prince.primary_title = {
			save_scope_as = primary_title
		}

		save_scope_as = usurper
	}

	option = { #Mutilate them
		name = bp2_yearly.5001.a

		trigger = {
			scope:tower_prince = {
				NOT = {
					has_trait = incapable
				}
			}
		}

		flavor = bp2_yearly.5001.a.flavor

		add_internal_flag = dangerous

		scope:tower_prince = {
			add_trait = incapable
		}

		stress_impact = {
			paranoid = medium_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			callous = minor_stress_impact_loss
			sadistic = medium_stress_impact_loss
			just = medium_stress_impact_gain
			trusting = medium_stress_impact_gain
			compassionate = major_stress_impact_gain
			content = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = just
					has_trait = trusting
					has_trait = compassionate
					has_trait = content
				}
			}
		}
	}

	#Seize the realm
	option = {
		name = bp2_yearly.5001.b

		flavor = bp2_yearly.5001.b.flavor

		add_character_flag = laid_coup_groundwork_flag

		# You had to grease some palms
		remove_short_term_gold = medium_gold_value

		show_as_tooltip = {
			custom_tooltip = bp2_yearly.5001.b.tt
		}
		hidden_effect = {
			scope:tower_prince = {
				every_vassal = {
					limit = {
						root != this
					}
					add_opinion = {
						target = root
						modifier = grateful_opinion
						opinion = 25
					}
				}
			}
		}

		custom_tooltip = bp2_yearly.5001.b.bypass

		stress_impact = {
			compassionate = miniscule_stress_impact_loss
			content = medium_stress_impact_gain
			ambitious = minor_stress_impact_loss
			sadistic = miniscule_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1  
				ai_vengefulness = -1
			}
		}
	}

	#Use them as a political tool
	option = {
		name = bp2_yearly.5001.c

		update_diarchy_swing_with_perspective_effect = {
			SWING = medium_sop_swing_diarch_gain
			LIEGE = liege
		}

		add_hook = {
			target = scope:tower_prince
			type = loyalty_hook
		}

		scope:tower_prince = {
			add_opinion = {
				target = root
				modifier = grateful_opinion
				opinion = 40
			}
			release_from_prison = yes
		}

		stress_impact = {
			compassionate = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			arbitrary = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1  
				ai_vengefulness = -1
			}
		}
	}
}

##################################################
# A winsome foreign hostage
# by Nick Meredith
# #5005-5007
##################################################

#Actor
bp2_yearly.5005 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5005.t
	desc = bp2_yearly.5005.desc
	theme = love
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:foreign_hostage
		animation = personality_honorable
	}
	trigger = {
		#DLC check
		has_bp2_dlc_trigger = yes

		#Age checks
		is_available_child = yes

		#You can have a crush
		num_of_relation_crush = 0

		#You have actually worked out your sexuality (good going kid, took me like two decades)
		OR = {
			has_sexuality = heterosexual
			has_sexuality = bisexual
			has_sexuality = homosexual
		}

		#There is a fetching foreign hostage whomst you may crush upon
		any_warden_hostage = {
			save_good_crush_character_trigger_check = yes
			location = root.location
		}
	}

	immediate = {
		random_warden_hostage = {
			limit = {
				save_good_crush_character_trigger_check = yes
			}
			save_scope_as = foreign_hostage
		}

		save_scope_value_as = { #For a bit of fuzziness
			name = integer
			value = {
				integer_range = {
					min = 1
					max = 5
				}
			}
		}

		set_relation_crush = scope:foreign_hostage
		save_scope_as = crusher
	}

	#Confess my feelings!
	option = {
		name = bp2_yearly.5005.a

		flavor = bp2_yearly.5005.a.tt

		scope:foreign_hostage = {
			trigger_event = {
				id = bp2_yearly.5006
				days = { 1 2 }
			}
		}

		stress_impact = { #Keep these deliberately low: I know kids are dramatic but we don't want one stress-learning French because their crush turned em down
			brave = miniscule_stress_impact_loss
			rowdy = miniscule_stress_impact_loss
			craven = miniscule_stress_impact_gain
			pensive = miniscule_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1  
				ai_sociability = 1
			}
		}
	}

	#Can't risk it, best keep this unrequited
	option = {
		name = bp2_yearly.5005.b

		add_character_modifier = {
			modifier = holding_torch_modifier
			years = 5
		}

		stress_impact = { #Keep these deliberately low: I know kids are dramatic but we don't want one stress-learning French because their crush turned em down
			base = miniscule_stress_impact_gain
			brave = miniscule_stress_impact_gain
			rowdy = miniscule_stress_impact_gain
			craven = miniscule_stress_impact_loss
			pensive = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = -1 
				ai_sociability = -1
			}
		}
	}
}

# Crush response
bp2_yearly.5006 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5006.t
	desc = bp2_yearly.5006.desc
	theme = love
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:crusher
		animation = worry
	}

	immediate = {
		#play_music_cue = "mx_cue_touching_moment"
	}

	#Reciprocate
	option = {
		name = bp2_yearly.5006.a

		set_relation_crush = scope:crusher

		reverse_add_opinion = {
			target = scope:crusher
			modifier = crush_opinion
			opinion = 40
		}

		scope:crusher = {
			trigger_event = {
				id = bp2_yearly.5007
				days = { 3 7 }
			}
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness =  1
				ai_sociability = 1
			}
		}
	}

	#Ew, you're icky
	option = {
		name = bp2_yearly.5006.b

		reverse_add_opinion = {
			target = scope:crusher
			modifier = disappointed_opinion
			opinion = -30
		}

		scope:crusher = {
			trigger_event = {
				id = bp2_yearly.5008
				days = { 3 7 }
			}
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1  
				ai_sociability = -1
			}
		}
	}
}

# Crush reciprocates
bp2_yearly.5007 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5007.t
	desc = bp2_yearly.5007.desc
	theme = love
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:foreign_hostage
		animation = flirtation
	}
	artifact = {
		target = scope:child_artifact
		position = lower_center_portrait
	}

	immediate = {
		#play_music_cue = "mx_cue_touching_moment"

		if = {
			limit = {
				any_character_artifact = {
					artifact_slot_type = miscellaneous
					artifact_can_be_gift_to_trigger = { RECIPIENT = scope:foreign_hostage }
				}
			}
			random_character_artifact = {
				limit = {
					artifact_slot_type = miscellaneous
					artifact_can_be_gift_to_trigger = { RECIPIENT = scope:foreign_hostage }
				}
				save_scope_as = child_artifact
			}
		}
	}

	#Give them a toy
	option = {
		name = bp2_yearly.5007.a

		trigger = {
			exists = scope:child_artifact
			is_ai = no #So you don't have it popping up randomly for human recipients
		}

		scope:child_artifact = {
			set_owner = {
				target = scope:foreign_hostage
				history = {
					location = root.location
					actor = root
					recipient = scope:foreign_hostage
					type = given
				}
			}
		}

		reverse_add_opinion = {
			target = scope:foreign_hostage
			modifier = grateful_opinion
			opinion = 30
		}

		stress_impact = {
			generous = miniscule_stress_impact_loss
			charming = miniscule_stress_impact_loss
			greedy = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness =  0.5 
				ai_sociability = 1
			}
		}
	}

	#Be happy
	option = {
		name = bp2_yearly.5007.b

		add_stress = medium_stress_loss #Relief!

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1  
				ai_greed = 1
			}
		}
	}
}

# Crush doesn't reciprocate
bp2_yearly.5008 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5008.t
	desc = bp2_yearly.5008.desc
	theme = love
	left_portrait = {
		character = root
		animation = grief
	}
	right_portrait = {
		character = scope:foreign_hostage
		animation = dismissal
	}

	immediate = {
		#play_music_cue = "mx_cue_negative"
	}

	#Maybe they'll come round?
	option = {
		name = bp2_yearly.5008.a

		add_character_modifier = {
			modifier = holding_torch_modifier
			years = 5
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness =  0.5 
				ai_sociability = 1
			}
		}
	}

	#I'll move on
	option = {
		name = bp2_yearly.5008.b

		remove_relation_crush = scope:foreign_hostage

		add_stress = medium_stress_gain

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1  
				ai_greed = 1
			}
		}
	}	
}

##################################################
# You promise?
# by Nick Meredith
# #5009
##################################################

# Your mutual crush offers to marry you when you're both of age
bp2_yearly.5009 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5009.t
	desc = bp2_yearly.5009.desc
	theme = love
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:marry_crush
		animation = love
	}
	cooldown = { years = 10 } #Theoretically can happen with multiple crushes

	trigger = {
		#DLC check
		has_bp2_dlc_trigger = yes
		#You are a child
		is_adult = no
		#But you're at least old enough to do the whole awkward teenage falling in love thing
		age >= 12
		#Someone has a crush on you
		any_courtier_or_guest = {
			has_relation_crush = root
			is_imprisoned = no
			is_close_family_of_root_trigger = no
			is_ai = yes
			is_adult = no
			age >= 12
			allowed_to_marry_character_gender_trigger = { CHARACTER = root }
			save_temporary_scope_as = crush_to_marry
		}
		#And it's mutual
		has_relation_crush = scope:crush_to_marry
		#And you could theoretically marry them
		could_marry_character_trigger = { CHARACTER = scope:crush_to_marry }
	}
	immediate = {
		random_courtier_or_guest = {
			limit = {
				has_relation_crush = root
				is_imprisoned = no
				is_close_family_of_root_trigger = no
				is_ai = yes
				is_adult = no
				age >= 12
				allowed_to_marry_character_gender_trigger = { CHARACTER = root }
			}
			save_scope_as = marry_crush
		}
	}
	#Agree
	option = {
		name = bp2_yearly.5009.a

		add_character_modifier = {
			modifier = besotted_modifier
			years = 5
		}

		reverse_add_opinion = {
			target = scope:marry_crush
			modifier = pleased_opinion
			opinion = 15
		}

		scope:marry_crush = {
			add_character_flag = marry_crush_flag
			add_character_modifier = {
				modifier = besotted_modifier
				years = 5
			}
		}

		create_character_memory = {
			type = pledged_marriage
			participants = {
				potential_spouse = scope:marry_crush
			}
		}

		stress_impact = {
			content = miniscule_stress_impact_loss
			trusting = miniscule_stress_impact_loss
			ambitious = medium_stress_impact_gain
			paranoid = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = ambitious
				}
			}
		}
	}
	#Refuse
	option = { 
		name = bp2_yearly.5009.b

		reverse_add_opinion = {
			target = scope:marry_crush
			modifier = disappointed_opinion
			opinion = -35
		}

		stress_impact = {
			content = medium_stress_impact_gain
			trusting = minor_stress_impact_gain
			ambitious = miniscule_stress_impact_loss
			paranoid = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 10
		}
	}
}

##################################################
# I promised!
# by Nick Meredith
# #5010-14
##################################################

#Actor
bp2_yearly.5010 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5010.t
	desc = bp2_yearly.5010.desc
	theme = love
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:marry_crush
		animation = happiness
	}

	cooldown = { years = 10 }

	trigger = {
		#DLC check
		has_bp2_dlc_trigger = yes

		#Age and marital status checks
		is_available_adult = yes
		can_marry_trigger = yes

		#You had someone who was a mutual crush with you
		any_courtier_or_guest = {
			has_character_flag = marry_crush_flag
			is_available_adult = yes
			is_married = no
			can_marry_trigger = yes
			could_marry_character_trigger = { CHARACTER = root }
			save_temporary_scope_as = crush_to_marry
		}

		#You remember pledging marriage
		any_memory = {
			memory_type = pledged_marriage
			memory_participant:potential_spouse = {
				location = root.location
			}
		}
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				has_character_flag = marry_crush_flag
				is_available_adult = yes
				is_married = no
				can_marry_trigger = yes
			}
			save_scope_as = marry_crush
		}
	}

	#How about it?
	option = {
		name = bp2_yearly.5010.a

		flavor = bp2_yearly.5010.a.flavor

		custom_tooltip = bp2_yearly.5010.a.tt

		save_scope_as = root_crush #For use later in the chain

		scope:marry_crush = {
			trigger_event = {
				id = bp2_yearly.5011
				days = { 1 2 }
			}
		}

		stress_impact = {
			patient = minor_stress_impact_gain
			content = miniscule_stress_impact_loss
			impatient = miniscule_stress_impact_loss
			ambitious = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
				ai_sociability = 1
			}
		}
	}

	#What fanciful dreams we had as children, eh?
	option = {
		name = bp2_yearly.5010.b

		add_character_modifier = {
			modifier = reminiscing_modifier
			years = 5
		}

		if = { #To ensure it doesn't acquire randomly for players
			limit = {
				scope:marry_crush = {
					is_ai = yes
				}
			}
			scope:marry_crush = {
				add_character_modifier = {
					modifier = reminiscing_modifier
					years = 5
				}
			}
		}

		stress_impact = {
			shy = miniscule_stress_impact_loss
			lazy = miniscule_stress_impact_loss
			chaste = miniscule_stress_impact_loss
			diligent = minor_stress_impact_gain
			lustful = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = -1 
				ai_sociability = -0.5
			}
		}
	}
}

# Crush response
bp2_yearly.5011 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5011.t
	desc = bp2_yearly.5011.desc
	theme = love
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:root_crush
		animation = flirtation
	}

	#Accept
	option = {
		name = bp2_yearly.5011.a

		if = { #Resolve for non-AIs
			limit = {
				is_ai = no
			}
			marry = scope:root_crush
		}

		reverse_add_opinion = {
			target = scope:root_crush
			modifier = love_opinion
			opinion = 40
		}

		if = { #Continue chain if AI
			limit = {
				is_ai = yes
			}
			scope:root_crush = {
				trigger_event = {
					id = bp2_yearly.5012
					days = { 1 2 }
				}
			}
		}

		stress_impact = {
			shy = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
			chaste = medium_stress_impact_gain
			diligent = miniscule_stress_impact_loss
			lustful = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness =  1
				ai_sociability = 1
			}
		}
	}

	#Decline
	option = {
		name = bp2_yearly.5011.b

		reverse_add_opinion = {
			target = scope:root_crush
			modifier = disappointed_opinion
			opinion = -30
		}

		scope:root_crush = {
			trigger_event = {
				id = bp2_yearly.5013
				days = { 2 3 }
			}
		}

		stress_impact = {
			shy = miniscule_stress_impact_loss
			lazy = miniscule_stress_impact_loss
			chaste = miniscule_stress_impact_loss
			diligent = minor_stress_impact_gain
			lustful = medium_stress_impact_gain
			gregarious = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1  
				ai_sociability = -1
			}
		}
	}
}

# They agree
bp2_yearly.5012 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5012.t
	desc = bp2_yearly.5012.desc
	theme = love
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:marry_crush
		animation = love
	}

	immediate = {
		#play_music_cue = "mx_cue_touching_moment"
	}

	#Hooray!
	option = {
		name = bp2_yearly.5012.a

		marry = scope:marry_crush

		if = {
			limit = {
				NOT = {
					has_relation_lover = scope:marry_crush
				}
			}
			set_relation_lover = { reason = lover_history target = scope:marry_crush } 
		}

		reverse_add_opinion = {
			target = scope:marry_crush
			modifier = love_opinion
			opinion = 30
		}

		stress_impact = {
			base = minor_stress_impact_loss
			stubborn = miniscule_stress_impact_loss
			fickle = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness =  0.5 
				ai_sociability = 1
			}
		}
	}

	#On second thoughts...
	option = {
		name = bp2_yearly.5012.b

		progress_towards_rival_effect = {
			REASON = rival_childhood_marriage_vow
			CHARACTER = scope:marry_crush
			OPINION = -40
		}

		stress_impact = {
			stubborn = medium_stress_impact_gain
			fickle = medium_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = -0.5 
				ai_sociability = -1
			}
		}
	}
}

# They disagree
bp2_yearly.5013 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5013.t
	desc = bp2_yearly.5013.desc
	theme = love
	left_portrait = {
		character = root
		animation = grief
	}
	right_portrait = {
		character = scope:marry_crush
		animation = dismissal
	}

	immediate = {
		#play_music_cue = "mx_cue_negative"
	}

	#Well this sucks
	option = {
		name = bp2_yearly.5013.a

		add_character_modifier = {
			modifier = delayed_heartbreak_modifier
			years = 5
		}

		stress_impact = {
			base = minor_stress_impact_gain
			chaste = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			lustful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = -0.5 
				ai_sociability = -0.5
			}
		}
	}
}

	### ###### #### FLAVOUR EVENTS ### ##### ### ##
  ## ### # __..--''``---....___   _..._    __  ### ##
 ### ##_.-'    .-#";  `        ``<._  ``.''_ `. # ## #
###_.-' _..--.'_    \                    `( ) ) ## ##
# (_..-' ## (< _     ;_..__               ; `' # ###
 # ## ## ##  `-._,_)' ## # ``--...____..-' ### # ##
  # ##### #### ## #### ## ###### ### #### ## #####

scripted_trigger bp2_yearly_5050_language_teacher_trigger = {
	is_available = yes
	location = root.location
	age > 18
	root = {
		NOT = { knows_language_of_culture = prev.culture }
	}
}

# You learn a language off a guest or courtier
bp2_yearly.5050 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5050.t
	desc = bp2_yearly.5050.desc
	theme = friendly
	override_background = { reference = courtyard }
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:polyglot
		animation = happy_teacher
	}
	cooldown = { years = 10 }
	trigger = {
		#DLC check
		has_bp2_dlc_trigger = yes
		#Standard checks
		is_available_child = yes
		age >= 6 #Old enough to read

		#There is parent, or a guest, or a courtier, or a councillor, or a hostage who knows a language that aint yours
		OR = {
			any_warden_hostage = {
				is_hostage_of = root
				bp2_yearly_5050_language_teacher_trigger = yes
			}
			any_parent = {
				bp2_yearly_5050_language_teacher_trigger = yes
			}
			any_councillor = {
				bp2_yearly_5050_language_teacher_trigger = yes
			}
			any_courtier_or_guest = {
				bp2_yearly_5050_language_teacher_trigger = yes
			}
		}
	}

	immediate = {
		if = {
			limit = {
				any_warden_hostage = {
					is_hostage_of = root
					bp2_yearly_5050_language_teacher_trigger = yes
				}
			}
			random_warden_hostage = { 
				limit = {
					is_hostage_of = root
					bp2_yearly_5050_language_teacher_trigger = yes
				}
				save_scope_as = polyglot
			}
		}
		else_if = {
			limit = {
				any_councillor = {
					bp2_yearly_5050_language_teacher_trigger = yes
				}
			}
			random_councillor = {
				limit = {
					bp2_yearly_5050_language_teacher_trigger = yes
				}
				save_scope_as = polyglot
			}
		}
		else_if = {
			limit = {
				any_parent = {
					bp2_yearly_5050_language_teacher_trigger = yes
				}
			}
			random_parent = {
				limit = {
					bp2_yearly_5050_language_teacher_trigger = yes
				}
				save_scope_as = polyglot
			}
		}
		else = {
			random_courtier_or_guest = {
				limit = {
					bp2_yearly_5050_language_teacher_trigger = yes
				}
				save_scope_as = polyglot
			}
		}
	}

	#You have already learnt more than one language, so you get a bonus to learning speed
	option = {
		name = bp2_yearly.5050.a

		trigger = {
			num_of_known_languages > 1
		}

		start_scheme = {
			type = learn_language
			target_character = scope:polyglot
		}
		custom_tooltip = diplomacy_family.2250.b.tt
		hidden_effect = {
			random_scheme = {
				type = learn_language
				limit = {
					scheme_target_character = scope:polyglot
				}
				add_scheme_modifier = {
					type = extra_success_chance_modifier
				}
			}
		}

		reverse_add_opinion = {
			target = scope:polyglot
			modifier = impressed_opinion
			opinion = 35
		}

		stress_impact = {
			diligent = minor_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			patient = miniscule_stress_impact_loss
			lazy = minor_stress_impact_gain
			content = miniscule_stress_impact_gain
			impatient = miniscule_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
				ai_rationality = 0.5
			}
		}
	}

	option = { #Try and learn it
		name = bp2_yearly.5050.b

		trigger = {
			NOT = {
				num_of_known_languages > 1
			}
		}

		start_scheme = {
			type = learn_language
			target_character = scope:polyglot
		}

		reverse_add_opinion = {
			target = scope:polyglot
			modifier = pleased_opinion
			opinion = 20
		}

		stress_impact = {
			diligent = minor_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			patient = miniscule_stress_impact_loss
			lazy = minor_stress_impact_gain
			content = miniscule_stress_impact_gain
			impatient = miniscule_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
				ai_rationality = 0.5
			}
		}
	}

	option = { #Try gather some useful info
		name = bp2_yearly.5050.c

		add_learning_lifestyle_xp = minor_lifestyle_experience

		stress_impact = {
			diligent = minor_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			patient = miniscule_stress_impact_loss
			lazy = minor_stress_impact_gain
			content = miniscule_stress_impact_gain
			impatient = miniscule_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = -1
				ai_rationality = -0.5
			}
		}
	}
}

# Child interacts with baby sibling
bp2_yearly.5051 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5051.t
	desc = bp2_yearly.5051.desc
	theme = family
	override_background = { reference = corridor_day }
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:child
		animation = peekaboo
	}
	
	trigger = {
		has_bp2_dlc_trigger = yes
		is_available_adult = yes
		any_child = {
			age >= 10 #Old enough to hold a kid
			age < 16 #Still studying - not an adult
			is_available = yes
			location = root.location
			save_temporary_scope_as = kid
		}
		any_child = {
			age <= 2 #bebe
			is_available = yes
			location = root.location
			this != scope:kid
		}
	}

	immediate = {
		random_child = {
			limit = {
				age >= 10
				age < 16
				is_available = yes
				location = root.location				
			}
			save_scope_as = child
		}
		random_child = {
			limit = {
				age <= 2
				is_available = yes
				location = root.location
				this != scope:child
			}
			save_scope_as = baby
		}
	}

	# Encourage them to spend time with their sibling
	option = {
		name = bp2_yearly.5051.a

		scope:child = {
			add_character_modifier = {
				modifier = bp2_tight_knit_modifier
				years = 25
			}

			add_stress = minor_stress_loss
		}

		stress_impact = {
			base = minor_stress_impact_loss
			compassionate = miniscule_stress_impact_loss
			lazy = miniscule_stress_impact_loss
			callous = minor_stress_impact_gain
			diligent = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_sociability = 1
			}
		}
	}

	# Get them to spend more time on their studies
	option = {
		name = bp2_yearly.5051.b

		scope:child = {
			add_learning_skill = 1

			add_stress = minor_stress_gain
		}		

		stress_impact = {
			compassionate = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
			callous = miniscule_stress_impact_loss
			diligent = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_sociability = -1
			}
		}
	}
}

# Child spends time with their grandparent
bp2_yearly.5052 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5052.t
	desc = bp2_yearly.5052.desc
	theme = family
	override_background = {
		trigger = { is_landless_adventurer = no }
		reference = bp1_wine_cellar
	}
	override_background = {
		trigger = { has_government = landless_adventurer_government }
		reference = bp1_bonfire
	}
	left_portrait = {
		character = scope:grandparent
		animation = throne_room_conversation_1
	}
	right_portrait = {
		character = scope:child
		animation = eavesdrop
	}

	cooldown = {
		years = 10
	}
	
	trigger = {
		has_bp2_dlc_trigger = yes
		is_available_adult = yes
		any_child = {
			age > 3 #Old enough to listen to stories
			is_adult = no #...but young enough to not be too enraptured
			is_available = yes
			location = root.location
		}
		any_parent = {
			is_available = yes
			location = root.location
		}
	}

	immediate = {
		random_child = {
			limit = {
				age > 3
				is_adult = no
				is_available = yes
				location = root.location				
			}
			weight = {
				base = 1
				modifier = {
					add = 100
					is_primary_heir_of = root
				}
			}
			save_scope_as = child
		}
		random_parent = {
			limit = {
				is_available = yes
				location = root.location
			}
			save_scope_as = grandparent
		}
	}

	# Barge in and start telling _your_ stories
	option = {
		name = bp2_yearly.5052.a

		trigger = {
			has_trait = arrogant
		}

		add_character_modifier = {
			modifier = bp2_one_upper_modifier
			years = 10
		}

		reverse_add_opinion = {
			target = scope:grandparent
			modifier = annoyed_opinion
			opinion = -30
		}

		stress_impact = {
			base = medium_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			shy = medium_stress_impact_gain
			callous = miniscule_stress_impact_loss
			compassionate = miniscule_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_sociability = 1
			}
		}
	}

	# Join and listen in
	option = {
		name = bp2_yearly.5052.b

		scope:child = {
			random = {
				chance = 50
				add_learning_skill = 1
			}
		}

		add_character_modifier = {
			modifier = bp2_listened_elders_modifier
			years = 15
		}

		stress_impact = {
			compassionate = miniscule_stress_impact_loss
			lazy = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			shy = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			diligent = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_sociability = 1
			}
		}
	}

	# Leave them to it
	option = {
		name = bp2_yearly.5052.c

		scope:child = {
			random_list = {
				1 = {
					add_diplomacy_skill = 1
				}
				1 = {
					add_martial_skill = 1
				}
				1 = {
					add_stewardship_skill = 1
				}
				1 = {
					add_intrigue_skill = 1
				}
				1 = {
					add_learning_skill = 1
				}
			}
		}

		stress_impact = {
			compassionate = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			shy = miniscule_stress_impact_loss
			callous = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = -1
			}
		}
	}
}

# Host's child gets jealous of ward
bp2_yearly.5053 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5053.t
	desc = bp2_yearly.5053.desc
	theme = family
	override_background = { reference = bp2_courtyard }
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:angry_kid
		animation = anger
	}
	lower_center_portrait = {
		character = scope:ward
	}
	
	cooldown = { years = 20 }
	
	trigger = {
		has_bp2_dlc_trigger = yes
		is_available_adult = yes
		any_child = {
			age > 9
			is_available = yes
			location = root.location
			save_temporary_scope_as = angry_kid_temp
		}
		any_warden_hostage = { 
			NOR = {
				culture = root.culture
				culture = scope:angry_kid_temp.culture
			}
			age > 8
			is_hostage_of = root
			is_available = yes
			location = root.location
		}
	}

	immediate = {
		random_child = {
			limit = {
				age > 9
				is_available = yes
				location = root.location				
			}
			save_scope_as = angry_kid
		}
		random_warden_hostage = {
			limit = {
				NOR = {
					culture = root.culture
					culture = scope:angry_kid.culture
				}
				age > 8
				is_hostage_of = root
				is_available = yes
				location = root.location
			}
			save_scope_as = ward
		}
	}

	# You know me, kiddo, I'd never do that!
	option = {
		name = bp2_yearly.5053.a

		trigger = {
			has_trait = family_first
		}
		
		add_diplomacy_skill = 1

		scope:angry_kid = {
			add_character_modifier = {
				modifier = bp2_trusted_parent_modifier
				years = 15
			}
		}

		reverse_add_opinion = {
			target = scope:angry_kid
			modifier = relieved_opinion
			opinion = 45
		}

		stress_impact = {
			base = medium_stress_impact_loss
			honest = miniscule_stress_impact_loss
			deceitful = miniscule_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_rationality = 0.5
			}
		}
	}

	# Try to convince them
	option = {
		name = bp2_yearly.5053.b

		trigger = {
			NOT = {
				has_trait = family_first
			}
		}

		duel = {
			skill = diplomacy
			value = decent_skill_rating

			50 = { #You succeed
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5053.b.success
				send_interface_toast = {
					title = bp2_yearly.5053.b.success
					left_icon = root
					right_icon = scope:angry_kid
					
					add_diplomacy_skill = 1
					
					scope:angry_kid = {
						add_character_modifier = {
							modifier = bp2_trusted_parent_modifier
							years = 15
						}
					}

					reverse_add_opinion = {
						target = scope:angry_kid
						modifier = relieved_opinion
						opinion = 25
					}
				}
			}

			50 = { #You fail
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5053.b.failure
				send_interface_toast = {
					title = bp2_yearly.5053.b.failure
					left_icon = root
					right_icon = scope:angry_kid

					add_character_modifier = {
						modifier = bp2_foreign_influences_modifier
						years = 15
					}

					reverse_add_opinion = {
						target = scope:angry_kid
						modifier = suspicious_opinion
						opinion = -35
					}
				}
			}
		}

		stress_impact = {
			patient = miniscule_stress_impact_loss
			impatient = minor_stress_impact_gain
			just = miniscule_stress_impact_loss
			arbitrary = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_sociability = 0.5
			}
		}
	}

	# Hostage is more of a child to me than you ever have been!
	option = {
		name = bp2_yearly.5053.c

		add_character_modifier = {
			modifier = bp2_culturally_adventurous_modifier
			years = 15
		}

		scope:angry_kid = {
			add_character_modifier = {
				modifier = bp2_parental_heartbreak_modifier
				years = 25
			}
		}

		reverse_add_opinion = {
			target = scope:angry_kid
			modifier = emotionally_devastated_opinion
			opinion = -50
		}

		stress_impact = {
			ambitious = minor_stress_impact_loss
			content = medium_stress_impact_gain
			sadistic = medium_stress_impact_loss
			callous = minor_stress_impact_loss
			compassionate = major_stress_impact_gain
			just = medium_stress_impact_gain
			arbitrary = medium_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = 0.5
				ai_compassion = -1
			}
		}
	}
}

# Hostage and child are becoming friends
bp2_yearly.5054 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5054.t
	desc = bp2_yearly.5054.desc
	theme = hostage
	override_background = { reference = relaxing_room }
	left_portrait = {
		character = scope:child
		animation = child_hobby_horse
	}
	right_portrait = {
		character = scope:hostage
		animation = clutching_ball
	}

	trigger = {
		has_bp2_dlc_trigger = yes
		is_available_adult = yes
		NOT = { #For loc purposes
			has_trait = blind 
		}
		any_child = {
			age > 4
			is_adult = no
			is_available = yes
			location = root.location
		}
		any_warden_hostage = { 
			age > 4
			is_adult = no
			is_hostage_of = root
			is_available = yes
			location = root.location
		}
	}

	immediate = {
		random_child = {
			limit = {
				age > 4
				is_adult = no
				is_available = yes
				location = root.location				
			}
			save_scope_as = child
		}
		random_warden_hostage = {
			limit = {
				age > 4
				is_adult = no
				is_hostage_of = root
				is_available = yes
				location = root.location				
			}
			save_scope_as = hostage
		}
	}

	# Encourage the friendship
	option = {
		name = bp2_yearly.5054.a

		scope:child = {
			random_list = {
				1 = {
					add_character_modifier = {
						modifier = bp2_expanded_horizons_modifier
						years = 20
					}
				}
				1 = { add_learning_skill = 1 }
			}
			if = {
				limit = {
					can_set_relation_friend_trigger = { CHARACTER = scope:hostage }
				}
				set_relation_friend = { reason = friend_hostage_friendship target = scope:hostage }
			}
		}

		stress_impact = {
			gregarious = miniscule_stress_impact_loss
			trusting = minor_stress_impact_loss
			compassionate = miniscule_stress_impact_loss
			paranoid = minor_stress_impact_gain
			callous = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_sociability = 1
			}
		}
	}

	# Discourage the friendship
	option = {
		name = bp2_yearly.5054.b

		scope:child = {
			add_intrigue_skill = 1

			add_stress = minor_stress_gain

			reverse_add_opinion = {
				target = scope:hostage
				modifier = confused_opinion
				opinion = -20
			}

			add_character_modifier = {
				modifier = watchful_modifier
				days = watchful_modifier_duration
			}
		}		

		reverse_add_opinion = {
			target = scope:hostage
			modifier = confused_opinion
			opinion = -20
		}

		stress_impact = {
			gregarious = minor_stress_impact_gain
			trusting = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
			paranoid = medium_stress_impact_loss
			callous = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_sociability = -1
			}
		}
	}
}



# Another child challenges you to a duel with wooden swords
bp2_yearly.5100 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5100.t
	desc = bp2_yearly.5100.desc
	theme = friendly
	override_background = { reference = courtyard }
	left_portrait = {
		character = root
		animation = marshal_wooden_sword
	}
	right_portrait = {
		character = scope:challenger
		animation = wooden_sword_coup_degrace
	}

	cooldown = {
		years = 4
	}

	trigger = {
		has_bp2_dlc_trigger = yes
		NOT = { #It'd be a bit mean honestly
			has_trait = blind 
		}
		age >= 6
		is_available_child = yes
		any_courtier_or_guest = {
			age >= 6
			age <= root.age_plus_5
			age >= root.age_minus_5
			is_available_child = yes
			location = root.location
		}
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				age >= 6
				age <= root.age_plus_5
				age >= root.age_minus_5
				is_available_child = yes
				location = root.location			
			}

			weight = {
				base = 1
				modifier = {
					add = 10
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this }
				}
			}

			save_scope_as = challenger
		}
	}

	# En garde!
	option = {
		name = bp2_yearly.5100.a

		custom_tooltip = bp2_yearly.5100.a.tt

		add_prowess_skill = 1

		set_temporary_signature_weapon = { #to be able to use wooden sword animations in the SCE, then return to previous signature weapon
			WEAPON_TYPE = wooden_sword
		}
		scope:challenger = {
			set_temporary_signature_weapon = { #to be able to use wooden sword animations in the SCE, then return to previous signature weapon
				WEAPON_TYPE = wooden_sword
			}
		}

		configure_start_single_combat_effect = {
			SC_INITIATOR = scope:challenger
			SC_ATTACKER = scope:challenger
			SC_DEFENDER = root
			FATALITY = no
			FIXED = no
			LOCALE = courtyard
			INVALIDATION_EVENT = single_combat.1006
			OUTPUT_EVENT = single_combat.1006
		}

		stress_impact = {
			brave = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			wrathful = miniscule_stress_impact_loss
			calm = minor_stress_impact_gain
			content = minor_stress_impact_gain
			craven = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 1
			}
		}
	}

	# Don't be foolish
	option = {
		name = bp2_yearly.5100.b

		flavor = bp2_yearly.5100.b.tt

		add_martial_skill = 1

		reverse_add_opinion = {
			target = scope:challenger
			modifier = disappointed_opinion
			opinion = -20
		}

		stress_impact = {
			brave = medium_stress_impact_gain
			ambitious = minor_stress_impact_gain
			wrathful = minor_stress_impact_gain
			calm = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			craven = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_sociability = 1
			}
		}
	}
}

# You and another child pretend to ride horses
bp2_yearly.5101 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5101.t
	desc = bp2_yearly.5101.desc
	theme = friendly
	override_background = { reference = study }
	left_portrait = {
		character = root
		animation = child_hobby_horse
	}
	right_portrait = {
		character = scope:councillor
		animation = stress
	}
	lower_center_portrait = {
		character = scope:child
	}

	cooldown  = {
		years = 4
	}

	trigger = {
		has_bp2_dlc_trigger = yes
		age >= 5
		age <= 15
		is_available_child = yes
		any_courtier_or_guest = {
			age >= 5
			age <= root.age_plus_5
			age >= root.age_minus_5
			is_available_child = yes
			location = root.location
		}
		any_councillor = {
			is_available = yes
			location = root.location
		}
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				age >= 5
				age <= root.age_plus_5
				age >= root.age_minus_5
				is_available_child = yes
				location = root.location			
			}
			save_scope_as = child
		}
		random_councillor = {
			limit = {
				is_available = yes
				location = root.location
			}
			save_scope_as = councillor
		}
	}

	# How dare!
	option = {
		name = bp2_yearly.5101.a

		trigger = {
			OR = {
				has_trait = arrogant
				has_trait = stubborn
			}
		}

		add_character_modifier = {
			modifier = bp2_strong_willed_modifier
			years = 10
		}

		reverse_add_opinion = {
			target = scope:councillor
			modifier = angry_opinion
			opinion = -30
		}

		stress_impact = {
			base = medium_stress_impact_loss
			calm = minor_stress_impact_gain
			humble = minor_stress_impact_gain
			fickle = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_sociability = -1
			}
		}
	}

	# I'll race you outside!
	option = {
		name = bp2_yearly.5101.b

		random = {
			chance = 50
			add_intrigue_skill = 1
		}

		duel = {
			skill = prowess
			target = scope:child
			50 = { #You win
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5101.b.success
				send_interface_toast = {
					title = bp2_yearly.5101.b.success
					left_icon = root
					right_icon = scope:child

					add_prowess_skill = 1

					random = {
						chance = 25
						add_trait = athletic
					}
				}
			}
			50 = { #You lose
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5101.b.failure
				send_interface_toast = {
					title = bp2_yearly.5101.b.failure
					left_icon = root
					right_icon = scope:child

					add_stress = minor_stress_gain
				}
			}
		}

		stress_impact = {
			ambitious = miniscule_stress_impact_loss
			arrogant = miniscule_stress_impact_loss
			stubborn = miniscule_stress_impact_loss
			content = minor_stress_impact_gain
			humble = minor_stress_impact_gain
			fickle = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
				ai_honor = 0.5
			}
		}
	}

	# Sorry, councillor, we'll be quiet
	option = {
		name = bp2_yearly.5101.c

		random = {
			chance = 50
			add_diplomacy_skill = 1
		}

		reverse_add_opinion = {
			target = scope:councillor
			modifier = relieved_opinion
			opinion = 25
		}

		stress_impact = {
			ambitious = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			stubborn = minor_stress_impact_gain
			content = miniscule_stress_impact_loss
			humble = miniscule_stress_impact_loss
			fickle = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_sociability = 1
			}
		}
	}
}

# You knock your sibling over by accident
bp2_yearly.5102 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5102.t
	desc = bp2_yearly.5102.desc
	theme = family
	override_background = { reference = bp2_courtyard }
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:sibling
		animation = crying
	}
	lower_center_portrait = {
		character = scope:parent
	}

	trigger = {
		has_bp2_dlc_trigger = yes
		age >= 4
		is_available_child = yes
		any_sibling = {
			age >= 4
			age <= root.age_plus_5
			age >= root.age_minus_5
			is_available_child = yes
			location = root.location
		}
		any_parent = {
			is_alive = yes
			is_available = yes
			location = root.location			
		}
		any_courtier = { }
	}

	immediate = {
		random_sibling = {
			limit = {
				age >= 4
				age <= root.age_plus_5
				age >= root.age_minus_5
				is_available_child = yes
				location = root.location			
			}
			save_scope_as = sibling
		}
		random_parent = {
			limit = {
				is_alive = yes
				is_available = yes
				location = root.location
			}
			save_scope_as = parent		
		}

		reverse_add_opinion = {
			target = scope:sibling
			modifier = hurt_opinion
			opinion = -10
		}
	}

	# I'll... I'll buy you a toy!
	option = {
		name = bp2_yearly.5102.a

		trigger = {
			OR = {
				has_trait = generous
				has_trait = craven
				has_trait = compassionate
			}
		}

		remove_short_term_gold = tiny_gold_value
		random_courtier = {
			save_scope_as = inspiration_owner
		}
		scope:sibling = {
			save_scope_as = statue_owner
			create_artifact = {
				name = tiny_sculpture_trinket_name
				description = tiny_sculpture_trinket_description
				type = miscellaneous
				visuals = animal_figurine
				modifier = artifact_dynasty_opinion_1_modifier
				save_scope_as = newly_created_artifact
				template = child_toy_template
			}
		}

		scope:newly_created_artifact = {
			set_owner = {
				target = scope:sibling
				history = {
					location = root.location
					actor = root
					recipient = scope:sibling
					type = given
				}
			}
		}

		stress_impact = {
			generous = miniscule_stress_impact_loss
			craven = miniscule_stress_impact_loss
			compassionate = miniscule_stress_impact_loss
			greedy = minor_stress_impact_gain
			brave = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			sadistic = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = -1
				ai_honor = 1
			}
		}
	}

	# No no don't tell mum!
	option = {
		name = bp2_yearly.5102.b

		duel = {
			skill = diplomacy
			target = scope:sibling
			50 = { #They agree not to tell mum
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5102.b.success
				send_interface_toast = {
					title = bp2_yearly.5102.b.success
					left_icon = root
					right_icon = scope:child

					add_stress = minor_stress_loss

					random = {
						chance = 33
						add_diplomacy_skill = 1
					}
				}
			}
			50 = { #You're in trouble now son!
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5102.b.failure
				send_interface_toast = {
					title = bp2_yearly.5102.b.failure
					left_icon = root
					right_icon = scope:child

					add_stress = minor_stress_gain

					reverse_add_opinion = {
						target = scope:parent
						modifier = angry_opinion
						opinion = -15
					}
				}
			}
		}

		stress_impact = {
			trusting = miniscule_stress_impact_loss
			patient = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			paranoid = minor_stress_impact_gain
			impatient = minor_stress_impact_gain
			shy = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 1
				ai_energy = 0.5
			}
		}
	}

	# Oh get over it!
	option = {
		name = bp2_yearly.5102.c

		if = {
			limit = {
				NOT = {
					number_of_personality_traits < childhood_personality_trait_gain_limit
					has_trait = callous
				}
			}
			add_trait = callous
		}

		reverse_add_opinion = {
			target = scope:sibling
			modifier = hurt_opinion
			opinion = -25
		}

		reverse_add_opinion = {
			target = scope:parent
			modifier = angry_opinion
			opinion = -15
		}

		stress_impact = {
			callous = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
			stubborn = miniscule_stress_impact_gain
			compassionate = major_stress_impact_gain
			fickle = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			calm = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_honor = -1
			}
		}
	}
}

# You are caught stealing sweets
bp2_yearly.5103 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5103.t
	desc = bp2_yearly.5103.desc
	theme = family
	override_background = { reference = bp1_kitchen_western }
	left_portrait = {
		character = root
		animation = crying
	}
	right_portrait = {
		character = scope:parent
		animation = go_to_your_room
	}

	cooldown = {
		years = 5
	}

	trigger = {
		has_bp2_dlc_trigger = yes
		age >= 4
		is_available_child = yes
		OR = {
			any_parent = {
				is_alive = yes
				is_available = yes
				location = root.location
			}
			any_relation = {
				type = guardian
				is_alive = yes
				is_available = yes
				location = root.location
			}
		}
	}

	immediate = {
		save_scope_as = child
		if = {
			limit = {
				any_parent = {
					is_alive = yes
					is_available = yes
					location = root.location
				}
			}
			random_parent = {
				limit = {
					is_alive = yes
					is_available = yes
					location = root.location
				}
				save_scope_as = parent		
			}
		}
		else = {
			random_relation = {
				type = guardian
				limit = {
					is_alive = yes
					is_available = yes
					location = root.location
				}
				save_scope_as = parent		
			}
		}
	}

	# I will be king/queen! Treat me with respect!
	option = {
		name = bp2_yearly.5103.a

		trigger = {
			OR = {
				has_trait = arrogant
				has_trait = arbitrary
				has_trait = stubborn
			}
		}

		add_character_modifier = {
			modifier = bp2_sweet_treat_modifier
			years = 5
		}

		reverse_add_opinion = {
			target = scope:parent
			modifier = angry_opinion
			opinion = -35
		}

		stress_impact = {
			base = medium_stress_impact_loss
			arrogant = miniscule_stress_impact_loss
			greedy = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			humble = minor_stress_impact_gain
			just = minor_stress_impact_gain
			fickle = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = 1
				ai_honor = 0.5
			}
		}
	}

	# Try and make a run for it with the treat
	option = {
		name = bp2_yearly.5103.b

		duel = {
			skill = prowess
			target = scope:parent
			50 = { #You get away
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5103.b.success
				send_interface_toast = {
					title = bp2_yearly.5103.b.success
					left_icon = root
					right_icon = scope:parent

					add_stress = miniscule_stress_loss

					add_character_modifier = {
						modifier = bp2_sweet_treat_modifier
						years = 5
					}
				}
			}
			50 = { #They catch you
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5103.b.failure
				send_interface_toast = {
					title = bp2_yearly.5103.b.failure
					left_icon = root
					right_icon = scope:parent

					add_stress = minor_stress_gain

					random = {
						chance = 25
						increase_wounds_no_death_effect = { REASON = beaten }
					}
				}
			}
		}

		reverse_add_opinion = {
			target = scope:parent
			modifier = angry_opinion
			opinion = -20
		}

		stress_impact = {
			greedy = minor_stress_impact_loss
			deceitful = miniscule_stress_impact_loss
			honest = minor_stress_impact_gain
			just = minor_stress_impact_gain
			arbitrary = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = -0.5
				ai_energy = 1
			}
		}
	}

	# I'm sorry!
	option = {
		name = bp2_yearly.5103.c

		random = {
			chance = 50
			add_diplomacy_skill = 1
		}

		reverse_add_opinion = {
			target = scope:parent
			modifier = disappointed_opinion
			opinion = -5
		}

		stress_impact = {
			greedy = medium_stress_impact_gain
			deceitful = medium_stress_impact_gain
			arbitrary = minor_stress_impact_gain
			honest = miniscule_stress_impact_loss
			just = miniscule_stress_impact_loss
			temperate = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_honor = -1
			}
		}
	}
}

# You find a lonely kid and ask them to play
bp2_yearly.5104 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5104.t
	desc = bp2_yearly.5104.desc
	theme = friendly
	override_background = { reference = bp2_courtyard }
	left_portrait = {
		character = root
		animation = clutching_toy
	}
	right_portrait = {
		character = scope:child
		animation = boredom
	}
	cooldown = {
		years = 3
	}

	trigger = {
		has_bp2_dlc_trigger = yes
		age >= 4
		age <= 14
		is_available_child = yes
		NOR = {
			has_trait = callous
			has_trait = sadistic
		}
		any_courtier_or_guest = {
			is_alive = yes
			location = root.location
			is_available_child = yes
			age >= 4
			NOR = {
				has_trait = gregarious
				any_relation = { type = friend }
			}
			can_set_relation_friend_trigger = { CHARACTER = root }
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 0.5
			has_trait = pensive
		}
		modifier = {
			add = 5
			OR = {
				has_trait = wheezing
				has_trait = depressed
				has_trait = hunchbacked
				has_trait = spindly
				has_trait = bleeder
				has_trait = physique_bad
				has_trait = weak
				has_trait = one_legged
				has_trait = one_eyed
				has_trait = reclusive
			}
		}
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				is_alive = yes
				is_available_child = yes
				location = root.location
				age >= 4
				NOR = {
					has_trait = gregarious
					any_relation = { type = friend }
				}
				can_set_relation_friend_trigger = { CHARACTER = root }
			}
			weight = {
				base = 1
				modifier = {
					add = 1
					has_trait = pensive
				}
				modifier = {
					add = 10
					OR = {
						has_trait = wheezing
						has_trait = depressed
						has_trait = hunchbacked
						has_trait = spindly
						has_trait = bleeder
						has_trait = physique_bad
						has_trait = weak
						has_trait = one_legged
						has_trait = one_eyed
						has_trait = reclusive
					}
				}
			}
			save_scope_as = child
		}
	}

	# Sit with them
	option = {
		name = bp2_yearly.5104.a

		trigger = {
			OR = {
				has_trait = compassionate
				has_trait = calm
				has_trait = pensive
			}
		}

		add_diplomacy_skill = 1

		set_relation_friend = {
			reason = friend_sat_together
			target = scope:child
		}

		add_character_modifier = {
			modifier = bp2_empathetic_modifier
			years = 15
		}

		stress_impact = {
			base = medium_stress_impact_loss
			humble = miniscule_stress_impact_loss
			wrathful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = -1
				ai_sociability = 1
			}
		}
	}

	# Invite them to play
	option = {
		name = bp2_yearly.5104.b

		duel = {
			skill = diplomacy
			value = medium_skill_rating
			50 = { #They join in
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5104.b.success
				send_interface_toast = {
					title = bp2_yearly.5104.b.success
					left_icon = root
					right_icon = scope:child

					progress_towards_friend_effect = {
						REASON = friend_invited_to_play
						CHARACTER = scope:child
						OPINION = default_friend_opinion
					}
				}
			}
			50 = { #They turn you down
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5104.b.failure
				send_interface_toast = {
					title = bp2_yearly.5104.b.failure
					left_icon = root
					right_icon = scope:child
				}
			}
		}

		stress_impact = {
			stubborn = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			impatient = miniscule_stress_impact_loss
			patient = minor_stress_impact_gain
			fickle = minor_stress_impact_gain
			arbitrary = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
			}
		}
	}

	# Leave them to it
	option = {
		name = bp2_yearly.5104.c

		flavor = bp2_yearly.5104.c.tt

		stress_impact = {
			base = miniscule_stress_impact_loss
			stubborn = minor_stress_impact_gain
			gregarious = minor_stress_impact_gain
			impatient = minor_stress_impact_gain
			patient = miniscule_stress_impact_loss
			fickle = miniscule_stress_impact_loss
			arbitrary = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 1
				ai_energy = -0.5
			}
		}
	}
}

# You and another friend have a pretend joust
bp2_yearly.5105 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5105.t
	desc = bp2_yearly.5105.desc
	theme = friendly
	override_background = { reference = bp2_courtyard }
	left_portrait = {
		character = root
		animation = clutching_toy
	}
	right_portrait = {
		character = scope:child
		animation = child_hobby_horse
	}

	cooldown = {
		years = 4
	}

	trigger = {
		has_bp2_dlc_trigger = yes
		age >= 7
		age <= 15
		is_available_child = yes
		any_courtier_or_guest = {
			is_available_child = yes
			location = root.location
			age >= 7
			age <= 15
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 1
			culture = { has_cultural_parameter = can_host_joust_contests }
		}
		modifier = {
			add = 1
			any_courtier_or_guest = {
				is_available_child = yes
				location = root.location
				culture = { has_cultural_parameter = can_host_joust_contests }
				age >= 7
				age <= 15
			}
		}
	}

	immediate = {
		play_music_cue = "mx_cue_war_declared"

		random_courtier_or_guest = {
			limit = {
				culture = { has_cultural_parameter = can_host_joust_contests }
				is_alive = yes
				is_available_child = yes
				location = root.location
				age >= 7
				age <= 15
			}
			alternative_limit = {
				is_alive = yes
				is_available_child = yes
				location = root.location
				age >= 7
				age <= 15
			}

			weight = {
				base = 1
				modifier = {
					add = 10
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this }
				}
			}

			save_scope_as = child
		}
	}

	# Let's 'ave it then
	option = {
		name = bp2_yearly.5105.a

		flavor = bp2_yearly.5105.a.tt

		set_variable = {
			name = joust_win_tally
			value = 0
		}

		scope:child = {
			set_variable = {
				name = joust_win_tally
				value = 0
			}
		}

		duel = {
			skill = prowess
			target = scope:child
			50 = { #You win
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5105.a.success
				send_interface_toast = {
					title = bp2_yearly.5105.a.success
					left_icon = root
					right_icon = scope:child

					add_stress = miniscule_stress_loss

					change_variable = {
						name = joust_win_tally
						add = 1
					}

					random = {
						chance = 10
						scope:child = {
							increase_wounds_no_death_effect = { REASON = wounds }
						}
					}

					trigger_event = {
						id = bp2_yearly.5106
					}
				}
			}
			50 = { #You lose
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5105.a.failure
				send_interface_toast = {
					title = bp2_yearly.5105.a.failure
					left_icon = root
					right_icon = scope:child

					add_stress = miniscule_stress_gain

					scope:child = {
						change_variable = {
							name = joust_win_tally
							add = 1
						}
					}

					random = {
						chance = 10
						increase_wounds_no_death_effect = { REASON = wounds }
					}

					trigger_event = {
						id = bp2_yearly.5106
					}
				}
			}
		}

		stress_impact = {
			brave = minor_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			sadistic = miniscule_stress_impact_loss
			craven = minor_stress_impact_gain
			content = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
				ai_sociability = 0.5
			}
		}
	}

	# Don't be silly
	option = {
		name = bp2_yearly.5105.b

		reverse_add_opinion = {
			target = scope:child
			modifier = disappointed_opinion
			opinion = -15
		}

		stress_impact = {
			stubborn = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			impatient = miniscule_stress_impact_loss
			patient = minor_stress_impact_gain
			fickle = minor_stress_impact_gain
			arbitrary = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
			}
		}
	}
}

# Second round of the joust
bp2_yearly.5106 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5106.t
	desc = {
		triggered_desc = {
			trigger = {
				var:joust_win_tally > 0
			}
			desc = bp2_yearly.5106.desc.winning
		}
		triggered_desc = {
			trigger = {
				NOT = {
					var:joust_win_tally > 0
				}
			}
			desc = bp2_yearly.5106.desc.losing
		}
		desc = bp2_yearly.5106.ending
	}
	theme = friendly
	override_background = { reference = bp2_courtyard }
	left_portrait = {
		character = root
		animation = child_hobby_horse
	}
	right_portrait = {
		character = scope:child
		animation = child_hobby_horse
	}

	# Round two, fight!
	option = {
		name = bp2_yearly.5106.a

		flavor = bp2_yearly.5106.a.tt

		duel = {
			skills = { martial prowess }
			target = scope:child
			50 = { #You win
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5106.a.success
				send_interface_toast = {
					title = bp2_yearly.5106.a.success
					left_icon = root
					right_icon = scope:child

					add_stress = miniscule_stress_loss

					change_variable = {
						name = joust_win_tally
						add = 1
					}

					random = {
						chance = 10
						scope:child = {
							increase_wounds_no_death_effect = { REASON = wounds }
						}
					}

					add_character_flag = won_second_round

					if = {
						limit = {
							var:joust_win_tally > 1
						}
						trigger_event = bp2_yearly.5108
					}
					else = {
						trigger_event = bp2_yearly.5107					
					}
				}
			}
			50 = { #You lose
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5106.a.failure
				send_interface_toast = {
					title = bp2_yearly.5106.a.failure
					left_icon = root
					right_icon = scope:child

					add_stress = miniscule_stress_gain

					scope:child = {
						change_variable = {
							name = joust_win_tally
							add = 1
						}
					}

					random = {
						chance = 10
						increase_wounds_no_death_effect = { REASON = wounds }
					}

					if = {
						limit = {
							scope:child = {
								var:joust_win_tally > 1
							}
						}
						trigger_event = bp2_yearly.5108
					}
					else = {
						trigger_event = bp2_yearly.5107					
					}
				}
			}
		}

		stress_impact = {
			stubborn = miniscule_stress_impact_loss
			brave = miniscule_stress_impact_loss
			arrogant = miniscule_stress_impact_loss
			patient = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			humble = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
			}
		}
	}

	# Can we stop now?
	option = {
		name = bp2_yearly.5106.b

		if = {
			limit = {
				NOT = {
					number_of_personality_traits < childhood_personality_trait_gain_limit
					has_trait = craven
				}
			}
			random = {
				chance = 10
				add_trait = craven
			}
		}

		reverse_add_opinion = {
			target = scope:child
			modifier = disappointed_opinion
			opinion = -25
		}

		stress_impact = {
			stubborn = minor_stress_impact_gain
			brave = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			patient = miniscule_stress_impact_loss
			craven = miniscule_stress_impact_loss
			humble = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = -1
			}
		}
	}
}

# Third round of the joust
bp2_yearly.5107 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5107.t
	desc = {
		triggered_desc = {
			trigger = {
				has_character_flag = won_second_round
			}
			desc = bp2_yearly.5107.desc.winning
		}
		triggered_desc = {
			trigger = {
				NOT = {
					has_character_flag = won_second_round
				}
			}
			desc = bp2_yearly.5107.desc.losing
		}
		desc = bp2_yearly.5107.ending
	}
	theme = friendly
	override_background = { reference = bp2_courtyard }
	left_portrait = {
		character = root
		animation = child_hobby_horse
	}
	right_portrait = {
		character = scope:child
		animation = child_hobby_horse
	}

	# Final round, fight!
	option = {
		name = bp2_yearly.5107.a

		duel = {
			skills = { intrigue prowess }
			target = scope:child
			50 = { #You win
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5107.a.success
				send_interface_toast = {
					title = bp2_yearly.5107.a.success
					left_icon = root
					right_icon = scope:child

					add_stress = miniscule_stress_loss

					change_variable = {
						name = joust_win_tally
						add = 1
					}
				}
			}
			50 = { #You lose
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5107.a.failure
				send_interface_toast = {
					title = bp2_yearly.5107.a.failure
					left_icon = root
					right_icon = scope:child

					add_stress = miniscule_stress_gain

					scope:child = {
						change_variable = {
							name = joust_win_tally
							add = 1
						}
					}
				}
			}
		}

		stress_impact = {
			stubborn = miniscule_stress_impact_loss
			brave = miniscule_stress_impact_loss
			arrogant = miniscule_stress_impact_loss
			patient = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			humble = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
			}
		}
	}

	# All right, we both have one win...
	option = {
		name = bp2_yearly.5107.b

		send_interface_toast = {
			title = bp2_yearly.5107.b.tt
			left_icon = scope:child
			random_list = {
				1 = {
					desc = bp2_yearly.5107.b.tt_success
					add_prowess_skill = 1
				}
				1 = {
					desc = bp2_yearly.5107.b.tt_fail
					custom_tooltip = bp2_yearly.5107.b_tt_fail
				}
			}
		}

		reverse_add_opinion = {
			target = scope:child
			modifier = disappointed_opinion
			opinion = -40
		}

		stress_impact = {
			stubborn = minor_stress_impact_gain
			brave = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			patient = miniscule_stress_impact_loss
			craven = miniscule_stress_impact_loss
			humble = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = -1
			}
		}
	}

	after = {
		trigger_event = bp2_yearly.5108
	}
}

# Joust resolution
bp2_yearly.5108 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5108.t
	desc = {
		triggered_desc = {
			trigger = {
				var:joust_win_tally > 1
			}
			desc = bp2_yearly.5108.desc.winning
		}
		triggered_desc = {
			trigger = {
				NOT = {
					var:joust_win_tally > 1
				}
			}
			desc = bp2_yearly.5108.desc.losing
		}
	}
	theme = friendly
	override_background = { reference = bp2_courtyard }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { var:joust_win_tally = 2 }
			animation = throne_room_cheer_2
		}
		triggered_animation = {
			trigger = {
				NOT = { var:joust_win_tally = 2 }
			}
			animation = crying
		}
	}
	right_portrait = {
		character = scope:child
		triggered_animation = {
			trigger = {
				NOT = { var:joust_win_tally = 2 }
			}
			animation = crying
		}
		triggered_animation = {
			trigger = { var:joust_win_tally = 2 }
			animation = throne_room_cheer_2
		}
	}

	immediate = {
		if = {
			limit = {
				var:joust_win_tally = 2
			}
			add_character_modifier = {
				modifier = bp2_joust_prodigy_modifier
				years = 15
			}
		}
		else = {
			scope:child = {
				add_character_modifier = {
					modifier = bp2_joust_prodigy_modifier
					years = 15
				}
			}
		}
	}

	# Don't worry, I'm sure you'll get better!
	option = {
		name = bp2_yearly.5108.a

		trigger = {
			var:joust_win_tally = 2
		}

		progress_towards_friend_effect = {
			REASON = friend_joust_niceties
			CHARACTER = scope:child
			OPINION = 25
		}

		stress_impact = {
			base = miniscule_stress_impact_loss
			compassionate = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
			}
		}
	}

	# Hah! In your FACE!
	option = {
		name = bp2_yearly.5108.b

		trigger = {
			var:joust_win_tally = 2
		}

		progress_towards_rival_effect = {
			REASON = rival_joust_antagonised
			CHARACTER = scope:child
			OPINION = -25
		}

		stress_impact = {
			base = miniscule_stress_impact_loss
			compassionate = minor_stress_impact_gain
			content = minor_stress_impact_gain
			gregarious = minor_stress_impact_gain
			sadistic = miniscule_stress_impact_loss
			callous = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
			}
		}
	}

	# Gracious in defeat
	option = {
		name = bp2_yearly.5108.c

		trigger = {
			NOT = {
				var:joust_win_tally = 2
			}
		}

		scope:child = {
			progress_towards_friend_effect = {
				REASON = friend_joust_niceties
				CHARACTER = root
				OPINION = 25
			}
		}

		stress_impact = {
			compassionate = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
			}
		}
	}

	# Screw you, I'll get you next time!
	option = {
		name = bp2_yearly.5108.d

		trigger = {
			NOT = {
				var:joust_win_tally = 2
			}
		}

		scope:child = {
			progress_towards_rival_effect = {
				REASON = rival_joust_antagonised
				CHARACTER = root
				OPINION = -25
			}
		}

		stress_impact = {
			compassionate = minor_stress_impact_gain
			content = minor_stress_impact_gain
			gregarious = minor_stress_impact_gain
			sadistic = miniscule_stress_impact_loss
			callous = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
			}
		}
	}

	after = {
		scope:child = {
			remove_variable = joust_win_tally
		}
		remove_character_flag = won_second_round
		remove_variable = joust_win_tally
	}
}

# You comfort a sad kid
bp2_yearly.5109 = {
	type = character_event
	content_source = dlc_009
	title = bp2_yearly.5109.t
	desc = {
		desc = bp2_yearly.5109.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:parent = {
						is_parent_of = root
					}
				}
				desc = bp2_yearly.5109.desc_sibling
			}
			desc = bp2_yearly.5109.desc_unrelated
		}
	}
	theme = friendly
	override_background = { reference = bp2_courtyard }
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:child
		animation = crying
	}
	lower_center_portrait = {
		character = scope:parent
	}

	cooldown = {
		years = 4
	}

	trigger = {
		has_bp2_dlc_trigger = yes
		age >= 4
		is_available_child = yes
		any_courtier_or_guest = {
			is_alive = yes
			is_available_child = yes
			location = root.location
			age >= 4
			age <= 16
			any_parent = {
				is_alive = no
				even_if_dead = yes
			}
			can_set_relation_friend_trigger = { CHARACTER = root }
		}
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				is_alive = yes
				is_available_child = yes
				location = root.location
				age >= 4
				age <= 16
				any_parent = {
					is_alive = no
					even_if_dead = yes
				}
				can_set_relation_friend_trigger = { CHARACTER = root }
			}
			save_scope_as = child
		}
		scope:child = {
			random_parent = {
				even_if_dead = yes 
				limit = {
					is_alive = no
				}
				save_scope_as = parent
			}
		}
	}

	# Comfort them with religion
	option = {
		name = bp2_yearly.5109.a

		trigger = {
			AND = {
				OR = {
					faith.religion = { #Use Abrahamics for an afterlife
						is_in_family = rf_abrahamic
					}
					religion = religion:zoroastrianism_religion #Or Zoroastrianism
				}
				OR = { #Either you or they are Zealous
					has_trait = zealous
					scope:child = {
						has_trait = zealous
					}
				}
			}
		}

		add_learning_skill = 1

		progress_towards_friend_effect = {
			REASON = friend_religious_comfort
			CHARACTER = scope:child
			OPINION = default_friend_opinion
		}

		add_character_modifier = {
			modifier = bp2_afterlife_citer_modifier
			years = 20
		}

		stress_impact = {
			base = minor_stress_impact_loss
			zealous = minor_stress_impact_loss
			cynical = major_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
		}


		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = sadistic
				has_trait = callous
				has_trait = cynical
			}
		}
	}

	# Comfort them with words
	option = {
		name = bp2_yearly.5109.b

		duel = {
			skill = diplomacy
			target = scope:child
			50 = { #They feel better
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp2_yearly.5109.b.success
				send_interface_toast = {
					title = bp2_yearly.5109.b.success
					left_icon = root
					right_icon = scope:child

					add_stress = miniscule_stress_loss

					add_diplomacy_skill = 1

					progress_towards_friend_effect = {
						REASON = friend_comforting_words
						CHARACTER = scope:child
						OPINION = default_friend_opinion
					}
				}
			}
			50 = { #They are inconsolable
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp2_yearly.5109.b.failure
				send_interface_toast = {
					title = bp2_yearly.5109.b.failure
					left_icon = root
					right_icon = scope:child

					add_stress = medium_stress_gain
				}
			}
		}

		stress_impact = {
			calm = miniscule_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			patient = miniscule_stress_impact_loss
			impatient = minor_stress_impact_gain
			shy = minor_stress_impact_gain
			wrathful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = 1
			}
		}
	}

	# Leave
	option = {
		name = bp2_yearly.5109.c

		flavor = bp2_yearly.5109.c.tt

		add_character_modifier = {
			modifier = bp2_numbed_to_death_modifier
			years = 10
		}

		stress_impact = {
			base = miniscule_stress_impact_gain
			callous = minor_stress_impact_loss
			sadistic = miniscule_stress_impact_loss
			lazy = miniscule_stress_impact_loss
			compassionate = minor_stress_impact_gain
			diligent = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = -1
			}
		}
	}
}
