﻿namespace = bp1_yearly

####
# bp1_yearly.2000 - Spoil your partner(s), get a secret
# bp1_yearly.2010 - Two spouses/consorts/spouse + consort are lovers
# bp1_yearly.8000 - Claimant moving towards rivalry
# bp1_yearly.8040 - Friend with conflicting personality falls out with you
####

##################################################
# #Spoil your partner(s), get a secret
# by Filippa Gannholm Kirsten
# #2000-2001
##################################################
bp1_yearly.2000 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.2000.t
	desc = {
		#Standard intro
		desc = bp1_yearly.2000.desc.intro
		first_valid = {
			#Greedy flavor
			triggered_desc = {
				trigger = { has_trait = greedy }
				desc = bp1_yearly.2000.desc.greed_flavor
			}
			#Not greedy
			triggered_desc = {
				desc = bp1_yearly.2000.desc.not_greed_flavor
			}
		}
		first_valid = {
			#We only have one partner
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:bp1_yearly_2000_partner_b }
				}
				desc = bp1_yearly.2000.desc.single
			}
			#We have at least two partners
			triggered_desc = {
				desc = bp1_yearly.2000.desc.duo
			}
		}
	}
	theme = love
	override_background = { reference = market }
	left_portrait = {
		character = root
		#Greedy flavor
		triggered_animation = {
			trigger = { has_trait = greedy }
			animation = stress
		}
		animation = flirtation
	}
	#If we only have one partner, display them
	right_portrait = {
		trigger = {
			NOT = { exists = scope:bp1_yearly_2000_partner_b }
		}
		character = scope:bp1_yearly_2000_partner_a
		#They like us alot
		triggered_animation = {
			trigger = {
				opinion = {
					target = root
					value >= 50
				}
			}
			animation = happiness
		}
		#They tolerate us
		triggered_animation = {
			trigger = {
				opinion = {
					target = root
					value >= 0
				}
			}
			animation = idle
		}
		animation = boredom
	}
	#Otherwise display both partners at the bottom
	lower_left_portrait = {
		trigger = { exists = scope:bp1_yearly_2000_partner_b }
		character = scope:bp1_yearly_2000_partner_a
	}
	lower_center_portrait = {
		trigger = { exists = scope:bp1_yearly_2000_partner_b }
		character = scope:bp1_yearly_2000_partner_b
	}
	trigger = {
		#DLC check
		has_bp1_dlc_trigger = yes
		#Standard checks
		is_available_adult = yes
		#Let's not be on cooldown
		NOT = { has_character_flag = had_event_bp1_yearly_2000 }
		is_playable_character = yes
		#Do we have any marital-like relationships
		OR = {
			any_spouse = {
				count > 0
				is_available_ai_adult = yes
			}
			any_consort = {
				count > 0
				is_available_ai_adult = yes
			}
		}
		#Set up the most expensive cost for AI budget check
		save_temporary_scope_value_as = {
			name = gold_check_yearly_2000
			value = {
				value = root.medium_gold_value
				multiply = 2
			}
		}
		#Check that the AI isn't at war and has enough gold
		trigger_if = {
			limit = { is_ai = yes }
			is_at_war = no
			short_term_gold >= scope:gold_check_yearly_2000
		}
	}
	weight_multiplier = {
		base = 1
		modifier = {
			#More likely if you have multiple marital-like relationships
			OR = {
				any_spouse = { count >= 2 }
				any_consort = { count >= 2 }
			}
			add = 2
		}
	}
	immediate = {
		#play_music_cue = "mx_cue_low_key_positive"
		#Set up the cooldown
		add_character_flag = {
			flag = had_event_bp1_yearly_2000
			days = 3700
		}
		#Account for spouses
		if = {
			limit = {
				any_spouse = { count > 0 }
			}
			every_spouse = {
				limit = { is_available_ai_adult = yes }
				add_to_list = bp1_yearly_2000_spouses_and_consorts
			}
		}
		#... and consorts
		if = {
			limit = {
				any_consort = { count > 0 }
			}
			every_consort = {
				limit = { is_available_ai_adult = yes }
				add_to_list = bp1_yearly_2000_spouses_and_consorts
			}
		}
		#Shake up the list and select the first candidate, prefer soulmate and lovers
		random_in_list = {
			list = bp1_yearly_2000_spouses_and_consorts
			weight = {
				base = 1
				modifier = {
					has_relation_soulmate = root
					add = 10
				}
				modifier = {
					has_relation_lover = root
					add = 5
				}
				modifier = {
					has_relation_best_friend = root
					add = 5
				}
				modifier = {
					has_relation_friend = root
					add = 2
				}
			}
			save_scope_as = bp1_yearly_2000_partner_a
		}
		#If we have more than one person in the list, let's select a second candidate
		if = {
			limit = {
				any_in_list = {
					list = bp1_yearly_2000_spouses_and_consorts
					count >= 2
				}
			}
			random_in_list = {
				list = bp1_yearly_2000_spouses_and_consorts
				weight = {
					base = 1
					modifier = {
						has_relation_soulmate = root
						add = 10
					}
					modifier = {
						has_relation_lover = root
						add = 5
					}
					modifier = {
						has_relation_best_friend = root
						add = 5
					}
					modifier = {
						has_relation_friend = root
						add = 2
					}
				}
				limit = {
					NOT = { this = scope:bp1_yearly_2000_partner_a }
				}
				save_scope_as = bp1_yearly_2000_partner_b
			}
		}
	}
	#Pick jewelry for partner A
	option = {
		name = {
			text = {
				first_valid = {
					#Single flavor, to switch it up
					triggered_desc = {
						trigger = {
							NOT = { exists = scope:bp1_yearly_2000_partner_b }
						}
						desc = bp1_yearly.2000.a_single
					}
					#Duo flavor
					triggered_desc = {
						desc = bp1_yearly.2000.a_duo
					}
				}
			}
		}
		remove_short_term_gold = medium_gold_value
		#Yay!
		scope:bp1_yearly_2000_partner_a = {
			add_character_modifier = {
				modifier = bejewelled_modifier
				years = 10
			}
			add_opinion = {
				modifier = gift_opinion
				target = root
				opinion = 40
			}
		}
		#Setup for the follow-up
		set_variable = {
			name = partner_a
			value = scope:bp1_yearly_2000_partner_a
		}
		#Trigger beneficial follow-up
		trigger_event = {
			id = bp1_yearly.2001
			days = { 10 20 }
		}
		#Yikes!
		stress_impact = {
			greedy = minor_stress_impact_gain
		}
		#AI should be more inclined if honorable and they like the person - less so if greedy
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:bp1_yearly_2000_partner_a
				multiplier = 0.1
			}
			#You should probably want your soulmate to live longer
			modifier = {
				trigger = { has_relation_soulmate = root }
				factor = 2
			}
			ai_value_modifier = {
				ai_honor = 0.5
				ai_greed = 1
			}
		}
	}
	#Pick jewelry for partner B
	option = {
		trigger = {
			exists = scope:bp1_yearly_2000_partner_b
		}
		name = bp1_yearly.2000.b
		remove_short_term_gold = medium_gold_value
		#Yay!
		scope:bp1_yearly_2000_partner_b = {
			add_character_modifier = {
				modifier = bejewelled_modifier
				years = 10
			}
			add_opinion = {
				modifier = gift_opinion
				target = root
				opinion = 40
			}
		}
		#Setup for the follow-up
		set_variable = {
			name = partner_b
			value = scope:bp1_yearly_2000_partner_b
		}
		#Trigger beneficial follow-up
		trigger_event = {
			id = bp1_yearly.2001
			days = { 10 20 }
		}
		#Yikes!
		stress_impact = {
			greedy = minor_stress_impact_gain
		}
		#AI should be more inclined if honorable and they like the person - less if greedy
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:bp1_yearly_2000_partner_b
				multiplier = 0.1
			}
			#You should probably want your soulmate to live longer
			modifier = {
				trigger = { has_relation_soulmate = root }
				factor = 2
			}
			ai_value_modifier = {
				ai_honor = 0.5
				ai_greed = -1
			}
		}
	}
	#Why not both!
	option = {
		trigger = {
			exists = scope:bp1_yearly_2000_partner_b
		}
		name = bp1_yearly.2000.c
		flavor = bp1_yearly.2000.c_flavor
		#Yikes
		remove_short_term_gold = {
			value = {
				value = medium_gold_value
				multiply = 2
			}
		}
		#Yay
		scope:bp1_yearly_2000_partner_a = {
			add_opinion = {
				modifier = gift_opinion
				target = root
				opinion = 40
			}
		}
		#Yay
		scope:bp1_yearly_2000_partner_b = {
			add_opinion = {
				modifier = gift_opinion
				target = root
				opinion = 40
			}
		}
		#Setup for the follow-up
		set_variable = {
			name = partner_a
			value = scope:bp1_yearly_2000_partner_a
		}
		set_variable = {
			name = partner_b
			value = scope:bp1_yearly_2000_partner_b
		}
		#Trigger beneficial follow-up
		trigger_event = {
			id = bp1_yearly.2001
			days = { 10 20 }
		}
		#Superyikes
		stress_impact = {
			#Greedy does NOT want this
			greedy = major_stress_impact_gain
		}
		#Should really not happen if the AI is greedy
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:bp1_yearly_2000_partner_a
				multiplier = 0.1
			}
			opinion_modifier = {
				opinion_target = scope:bp1_yearly_2000_partner_b
				multiplier = 0.1
			}
			ai_value_modifier = {
				ai_greed = -2
			}
		}
	}
	#No thank you
	option = {
		name = bp1_yearly.2000.d
		#Huzzah, I saved some gold (Greedy AI should be inclined to pick this)
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = 1
			}
		}
	}
}

#Trigger to discern if we know a suitable secret to share
scripted_trigger bp1_yearly_2001_secret_to_reveal_trigger = {
	NOR = {
		secret_owner = $CHARACTER$
		secret_owner = { is_in_list = bp1_yearly_2001_shielded_children }
	}
	NOT = { is_known_by = root }
}

#Trigger to check opinion, relation and attraction status
scripted_trigger bp1_yearly_2001_can_become_lovers_trigger = {
	$CHARACTER$ = {
		opinion = {
			target = root
			value >= 50
		}
		can_set_relation_lover_trigger = { CHARACTER = root }
	}
}

#If no secret, let's find a vassal or courtier we can attach a hook to
scripted_trigger bp1_yearly_2001_hookable_vassal_or_courtier_trigger = {
	is_ai = yes
	is_adult = yes
	is_imprisoned = no
	can_add_hook = {
		target = prev
		type = favor_hook
	}
	NOT = { this = $CHARACTER$ }
	NOT = { root = { has_usable_hook = prev } }
	NOT = { is_in_list = bp1_yearly_2001_available_hook_targets }
}

#Set up the hookable people list
scripted_effect bp1_yearly_2001_setup_hook_target_effect = {
	#First check all vassals
	every_vassal = {
		limit = {
			bp1_yearly_2001_hookable_vassal_or_courtier_trigger = { CHARACTER = $CHARACTER$ }
		}
		add_to_list = bp1_yearly_2001_available_hook_targets
	}
	#If we don't have any hookable vassals, check courtiers
	if = {
		limit = {
			any_in_list = {
				list = bp1_yearly_2001_available_hook_targets
				count = 0
			}
		}
		every_courtier = {
			limit = {
				bp1_yearly_2001_hookable_vassal_or_courtier_trigger = { CHARACTER = $CHARACTER$ }
			}
			add_to_list = bp1_yearly_2001_available_hook_targets
		}
	}
	#Pick a random character in the list
	if = {
		limit = {
			any_in_list = {
				list = bp1_yearly_2001_available_hook_targets
				count >= 1
			}
		}
		#Emphasis on rivals and nemesis characters
		random_in_list = {
			list = bp1_yearly_2001_available_hook_targets
			weight = {
				base = 1
				modifier = {
					has_relation_rival = root
					add = 5
				}
				modifier = {
					has_relation_nemesis = root
					add = 2
				}
			}
			save_scope_as = bp1_yearly_2001_hook_target
		}
	}
}

#Dynamic follow-up for either single partner or duo partners!
bp1_yearly.2001 = {
	type = character_event
	content_source = dlc_006

	title = {
		first_valid = {
			#Only one partner title "... A Ruler"
			triggered_desc = {
				trigger = {
					has_character_flag = bp1_yearly_2001_had_event_with_partner_a
					NOT = { exists = var:partner_b }
				}
				desc = bp1_yearly.2001.t
			}
			#Two partners - second time event fires "... And A Good Woman/Man"
			triggered_desc = {
				trigger = {
					has_character_flag = bp1_yearly_2001_had_event_with_partner_a
					has_character_flag = bp1_yearly_2001_had_event_with_partner_b
				}
				desc = bp1_yearly.2001.t.second_title_duo
			}
			#Two partners - first time event fires "... A Ruler ..." (segways into the next title)
			triggered_desc = {
				trigger = {
					exists = var:partner_a
					OR = {
						has_character_flag = bp1_yearly_2001_had_event_with_partner_a
						has_character_flag = bp1_yearly_2001_had_event_with_partner_b
					}
				}
				desc = bp1_yearly.2001.t.first_title_duo
			}
			#Fallback - shouldn't happen
			triggered_desc = {
				desc = bp1_yearly.2001.t
			}
		}
	}
	desc = {
		first_valid = {
		#Flavor if the partner likes us
			triggered_desc = {
				trigger = {
					scope:bp1_yearly_2001_partner = {
						opinion = {
							target = root
							value >= 50
						}
					}
				}
				desc = bp1_yearly.2001.desc.intro_high_opinion
			}
			#Flavor if they're more meh
			triggered_desc = {
				desc = bp1_yearly.2001.desc.intro
			}
		}
		#Segway if they have a secret or hook to share
		triggered_desc = {
			trigger = {
				OR = {
					exists = scope:bp1_yearly_2001_secret_to_reveal
					exists = scope:bp1_yearly_2001_hook_target
				}
			}
			desc = bp1_yearly.2001.desc.segway_secret_hook
		}
		first_valid = {
			#Secret loc
			triggered_desc = {
				trigger = {
					exists = scope:bp1_yearly_2001_secret_to_reveal
				}
				desc = bp1_yearly.2001.desc.secret
			}
			#Hook loc
			triggered_desc = {
				trigger = {
					exists = scope:bp1_yearly_2001_hook_target
				}
				desc = bp1_yearly.2001.desc.hook
			}
		}
		#Segway if we can become lovers + lovers loc
		triggered_desc = {
			trigger = { exists = scope:bp1_yearly_2001_lover_to_get }
			desc = bp1_yearly.2001.desc.segway_lover
		}
		triggered_desc = {
			trigger = { exists = scope:bp1_yearly_2001_lover_to_get }
			desc = bp1_yearly.2001.desc.lover
		}
		#Segway if we don't have a secret, can't hook anyone and can't become lovers - jump straight to modifiers
		triggered_desc = {
			trigger = {
				OR = {
					has_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
					has_character_flag = bp1_2001_no_lover_can_get_modifier
				}
			}
			desc = bp1_yearly.2001.desc.segway_modifier
		}
		first_valid = {
			#If we don't already have the close support-modifier from a the previous partner in this event, prioritize this modifier
			triggered_desc = {
				trigger = {
					OR = {
						has_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
						has_character_flag = bp1_2001_no_lover_can_get_modifier
					}
					NOT = { has_character_modifier = close_support_modifier }
				}
				desc =  bp1_yearly.2001.desc.close_modifier
			}
			#If we don't already have the financial support-modifier, trigger the financial support
			triggered_desc = {
				trigger = {
					OR = {
						has_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
						has_character_flag = bp1_2001_no_lover_can_get_modifier
					}
					NOT = { has_character_modifier = financial_support_modifier }
				}
				desc =  bp1_yearly.2001.desc.finance_modifier
			}
		}
		#If we don't have a secret, can't hook anyone and can't become lovers we mention both modifiers
		triggered_desc = {
			trigger = {
				has_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
				has_character_flag = bp1_2001_no_lover_can_get_modifier
				NOT = { has_character_modifier = close_support_modifier }
				NOT = { has_character_modifier = financial_support_modifier }
			}
			desc = bp1_yearly.2001.desc.close_finance_modifier
		}
		#This should NOT happen
		triggered_desc = {
			trigger = {
				has_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
				has_character_flag = bp1_2001_no_lover_can_get_modifier
				has_character_modifier = close_support_modifier
				has_character_modifier = financial_support_modifier
			}
			desc = bp1_yearly.2001.desc.fallback
		}
		desc = bp1_yearly.2001.desc.outro
	}
	theme = love
	#Let's use one background if it's partner A
	override_background = {
		trigger = {
			exists = scope:bp1_yearly_2001_partner
			scope:bp1_yearly_2001_partner = scope:bp1_yearly_2000_partner_a
		}
		reference = garden
	}
	#And another background if it's partner B
	override_background = {
		trigger = {
			exists = scope:bp1_yearly_2001_partner
			scope:bp1_yearly_2001_partner = scope:bp1_yearly_2000_partner_b
		}
		reference = throne_room
	}
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:bp1_yearly_2001_partner
		#Check if we can display partner B first
		triggered_animation = {
			trigger = {
				exists = var:partner_b
				exists = scope:bp1_yearly_2001_partner
				scope:bp1_yearly_2001_partner = scope:bp1_yearly_2000_partner_b
				#If they like us enough, use a jolly animation
				opinion = {
					target = root
					value >= 50
				}
			}
			animation = happiness
		}
		#If this is partner B but they don't like us enough, go meh animation
		triggered_animation = {
			trigger = {
				exists = var:partner_b
				exists = scope:bp1_yearly_2001_partner
				scope:bp1_yearly_2001_partner = scope:bp1_yearly_2000_partner_b
			}
			animation = personality_content
		}
		#If this is partner A and they like us
		triggered_animation = {
			trigger = {
				exists = scope:bp1_yearly_2001_partner
				scope:bp1_yearly_2001_partner = scope:bp1_yearly_2000_partner_a
				opinion = {
					target = root
					value >= 50
				}
			}
			animation = flirtation_left
		}
		#If everything else is false display partner A and meh animation
		animation = personality_content
	}
	immediate = {
		#play_music_cue = "mx_cue_seduction"
		#If we have more than one partner, randomize which one gets picked first
		random_list = {
			50 = {
				trigger = {
					exists = var:partner_a
					NOT = {
						has_character_flag = bp1_yearly_2001_had_event_with_partner_a
					}
				}
				var:partner_a = {
					save_scope_as = bp1_yearly_2001_partner
				}
				add_character_flag = bp1_yearly_2001_had_event_with_partner_a
			}
			50 = {
				trigger = {
					exists = var:partner_b
					has_variable = partner_b
					NOT = {
						has_character_flag = bp1_yearly_2001_had_event_with_partner_b
					}
				}
				var:partner_b = {
					save_scope_as = bp1_yearly_2001_partner
				}
				add_character_flag = bp1_yearly_2001_had_event_with_partner_b
			}
		}
		if = {
			limit = { exists = scope:bp1_yearly_2001_partner }
			scope:bp1_yearly_2001_partner = {
				#If this character has any children, and these children have secrets, this character should not want to share those secrets
				if = {
					limit = {
						any_child = { count >= 1 }
					}
					every_child = {
						limit = {
							NOT = { is_in_list = bp1_yearly_2001_shielded_children }
						}
						add_to_list = bp1_yearly_2001_shielded_children
					}
				}
				#Find the potential secret and save it if it exists
				if = {
					limit = {
						any_known_secret = {
							bp1_yearly_2001_secret_to_reveal_trigger = { CHARACTER = scope:bp1_yearly_2001_partner }
						}
					}
					random_known_secret = {
						limit = {
							bp1_yearly_2001_secret_to_reveal_trigger = { CHARACTER = scope:bp1_yearly_2001_partner }
						}
						#Used for the toast and loc
						secret_owner = {
							save_scope_as = bp1_yearly_2001_secret_owner
						}
						save_scope_as = bp1_yearly_2001_secret_to_reveal
					}
				}
			}
		}
		#If we don't have any secrets to share, set up a vassal or courtier to offer up as a hook
		if = {
			limit = {
				NOT = { exists = scope:bp1_yearly_2001_secret_to_reveal }
			}
			bp1_yearly_2001_setup_hook_target_effect = { CHARACTER = scope:bp1_yearly_2001_partner }
		}
		#Setting up some flags for the dynamic description
		if = {
			limit = {
				bp1_yearly_2001_can_become_lovers_trigger = { CHARACTER = scope:bp1_yearly_2001_partner }
			}
			scope:bp1_yearly_2001_partner = {
				save_scope_as = bp1_yearly_2001_lover_to_get
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:bp1_yearly_2001_lover_to_get }
			}
			add_character_flag = bp1_2001_no_lover_can_get_modifier
		}
		if = {
			limit = {
				NOR = {
					exists = scope:bp1_yearly_2001_secret_to_reveal
					exists = scope:bp1_yearly_2001_hook_target
				}
			}
			add_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
		}
	}
	#Get a secret
	option = {
		name = bp1_yearly.2001.a
		trigger = { exists = scope:bp1_yearly_2001_secret_to_reveal }
		flavor = bp1_yearly.2001.a_tt
		#Ta-da!
		hidden_effect = {
			send_interface_toast = {
				title = bp1_yearly.2001.a.tt_secret
				left_icon = scope:bp1_yearly_2001_secret_owner
				scope:bp1_yearly_2001_secret_to_reveal = { reveal_to = root }
			}
		}
		scope:bp1_yearly_2001_partner = {
			add_opinion = {
				modifier = relied_on_me_opinion
				target = root
			}
		}
		#Should pick secret or hook first
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_rationality = 1
				ai_boldness = 0.5
				ai_energy = 0.5
			}
		}
	}
	#If no secret is available then offer a hook
	option = {
		name = bp1_yearly.2001.c
		trigger = {
			NOT = { exists = scope:bp1_yearly_2001_secret_to_reveal }
			exists = scope:bp1_yearly_2001_hook_target
		}
		flavor = bp1_yearly.2001.c_tt
		hidden_effect = {
			add_hook = {
				type = favor_hook
				target = scope:bp1_yearly_2001_hook_target
			}
		}
		scope:bp1_yearly_2001_partner = {
			add_opinion = {
				modifier = relied_on_me_opinion
				target = root
			}
		}
		#Should pick secret or hook first
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_rationality = 1
				ai_boldness = 0.5
				ai_energy = 0.5
			}
		}
	}
	#Become lovers if compatible
	option = {
		name = bp1_yearly.2001.b
		trigger = {
			exists = scope:bp1_yearly_2001_lover_to_get
		}
		set_relation_lover = { reason = lover_payed_attention target = scope:bp1_yearly_2001_partner }
		#...unless the AI likes the character, is attracted and bold
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:bp1_yearly_2001_partner
				multiplier = 0.1
			}
			ai_value_modifier = {
				ai_sociability = 1
				ai_boldness = 0.5
				ai_energy = 0.5
			}
		}
	}
	#If there is no secret and we can't become lovers then offer a modifier
	option = {
		name = bp1_yearly.2001.d
		trigger = {
			OR = {
				has_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
				has_character_flag = bp1_2001_no_lover_can_get_modifier
			}
			NOT = { has_character_modifier = close_support_modifier }
		}
		add_character_modifier = {
			modifier = close_support_modifier
			years = 10
		}
		#If we're vengeful
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = -1
				ai_boldness = -0.5
				ai_vengefulness = 0.5
				ai_energy = 0.5
			}
		}
	}
	#If there is no secret, no lover and no hook then offer a second modifier
	option = {
		name = bp1_yearly.2001.e
		trigger = {
			OR = {
				#If we have no secret, no hook, no lover
				AND = {
					has_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
					has_character_flag = bp1_2001_no_lover_can_get_modifier
				}
				#If we have no secret or no hook and have the close support-modifier
				AND = {
					has_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
					has_character_modifier = close_support_modifier
				}
				#If we have no lover and have the close support-modifier
				AND = {
					has_character_flag = bp1_2001_no_lover_can_get_modifier
					has_character_modifier = close_support_modifier
				}
			}
			#Should not trigger if we already have this modifier
			NOT = { has_character_modifier = financial_support_modifier }
		}
		add_character_modifier = {
			modifier = financial_support_modifier
			years = 10
		}
		#If we like gold
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = -1
				ai_greed = 1
				ai_rationality = 1
				ai_energy = 0.5
			}
		}
	}
	after = {
		remove_character_flag = bp1_2001_no_lover_can_get_modifier
		remove_character_flag = bp1_2001_no_secret_or_hook_can_get_modifier
		#Check if we have both partners and clean up
		if = {
			limit = {
				exists = var:partner_a
				exists = var:partner_b
			}
			#If we the event already triggered twice and gave us both flags
			if = {
				limit = {
					has_character_flag = bp1_yearly_2001_had_event_with_partner_a
					has_character_flag = bp1_yearly_2001_had_event_with_partner_b
				}
				remove_variable = partner_a
				remove_variable = partner_b
				remove_character_flag = bp1_yearly_2001_had_event_with_partner_a
				remove_character_flag = bp1_yearly_2001_had_event_with_partner_b
			}
			#Otherwise trigger it one more time for the second partner
			else = {
				trigger_event = {
					id = bp1_yearly.2001
					days = { 10 20 }
				}
			}
		}
		#If we don't have both partners, check if we have partner B first and clean
		else_if = {
			limit = {
				exists = var:partner_b
				has_character_flag = bp1_yearly_2001_had_event_with_partner_b
			}
			remove_variable = partner_b
			remove_character_flag = bp1_yearly_2001_had_event_with_partner_b
		}
		#If we don't have partner B, then clean up partner A
		else_if = {
			limit = {
				NOT = { exists = var:partner_b }
				has_character_flag = bp1_yearly_2001_had_event_with_partner_a
			}
			remove_variable = partner_a
			remove_character_flag = bp1_yearly_2001_had_event_with_partner_a
		}
	}
}


##################################################
# #Two spouses/consorts/spouse + consort are lovers
# by Filippa Gannholm Kirsten
# #2010
##################################################
scripted_trigger bp1_yearly_2010_has_relevant_sexuality_trigger = {
	is_available_ai_adult = yes
	OR = {
		has_sexuality = bisexual
		has_sexuality = homosexual
	}
	NOT = {
		has_trait = chaste
	}
}

scripted_trigger bp1_yearly_2010_appropriate_partner_trigger = {
	AND = {
		#If one of them is attracted to your gender and is lustful or likes you
		$FIRST$ = {
			OR = {
				opinion = {
					target = root
					value >= 50
				}
				has_trait = lustful
				has_trait = rakish
			}
			is_attracted_to_gender_of = root
		}
		#And the other one is either lustful or has an OK opinion of you
		$SECOND$ = {
			OR = {
				opinion = {
					target = root
					value >= 25
				}
				has_trait = lustful
				has_trait = rakish
			}
		}
	}
}

bp1_yearly.2010 = {
	type = character_event
	content_source = dlc_006

	title = bp1_yearly.2010.t
	desc = {
		desc = bp1_yearly.2010.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = lustful
						has_trait = rakish
					}
				}
				desc = bp1_yearly.2010.desc.lustful
			}
			triggered_desc = {
				desc = bp1_yearly.2010.desc.default
			}
		}
	}
	theme = love
	override_background = {
		trigger = {
			NOT = { has_character_flag = bp1_yearly_2010_correct_circumstances }
		}
		reference = corridor_day
	}
	override_background = {
		trigger = { has_character_flag = bp1_yearly_2010_correct_circumstances }
		reference = bedchamber
	}
	left_portrait = {
		character = scope:bp1_yearly_2010_first_partner
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = lustful
					has_trait = rakish
				}
			}
			animation = ecstasy
		}
		animation = love
	}
	right_portrait = {
		character = scope:bp1_yearly_2010_second_partner
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = lustful
					has_trait = rakish
				}
			}
			animation = happiness
		}
		animation = ecstasy
	}

	trigger = {
		#DLC check
		has_bp1_dlc_trigger = yes
		#Standard checks
		is_available_adult = yes
		NOT = { has_character_flag = had_event_bp1_yearly_2010 }
		#Do we have suitable consorts
		AND = {
			any_consort = {
				is_available_ai_adult = yes
				NOT = { has_relation_lover = root }
				bp1_yearly_2010_has_relevant_sexuality_trigger = yes
				save_temporary_scope_as = consorts_check
			}
			any_consort = {
				is_available_ai_adult = yes
				NOT = { has_relation_lover = root }
				bp1_yearly_2010_has_relevant_sexuality_trigger = yes
				NOT = { this = scope:consorts_check }
			}
		}
	}
	immediate = {
		#play_music_cue = "mx_cue_secret"
		add_character_flag = {
			flag = had_event_bp1_yearly_2010
			years = 5
		}
		#Do we already have two consorts who are lovers
		if = {
			limit = {
				any_consort = {
					is_available_ai_adult = yes
					NOT = { has_relation_lover = root }
					any_relation = {
						type = lover
						count >= 1
						is_consort_of = root
					}
				}
			}
			random_consort = {
				limit = {
					is_available_ai_adult = yes
					NOT = { has_relation_lover = root }
					any_relation = {
						type = lover
						count >= 1
						is_consort_of = root
					}
				}
				save_scope_as = bp1_yearly_2010_first_partner
				root = {
					random_consort = {
						limit = {
							has_relation_lover = scope:bp1_yearly_2010_first_partner
							is_available_ai_adult = yes
						}
						save_scope_as = bp1_yearly_2010_second_partner
					}
				}
			}
		} 
		else = { #If not, let's set up two consorts to be lovers!
			#First consort
			random_consort = {
				#Find lustful ones first
				limit = {
					bp1_yearly_2010_has_relevant_sexuality_trigger = yes
					OR = {
						has_trait = lustful
						has_trait = rakish
					}
				}
				alternative_limit = { bp1_yearly_2010_has_relevant_sexuality_trigger = yes }
				save_scope_as = bp1_yearly_2010_first_partner
			}
			#Second consort
			random_consort = {
				limit = {
					NOT = { this = scope:bp1_yearly_2010_first_partner }
					bp1_yearly_2010_has_relevant_sexuality_trigger = yes
				}
				#Find lustful ones or consorts with a good relation to the first consort
				weight = {
					base = 1
					modifier = {
						has_relation_potential_lover = scope:bp1_yearly_2010_first_partner
						add = 100
					}
					#Love springing from friendship is nice
					modifier = {
						has_relation_best_friend = scope:bp1_yearly_2010_first_partner
						add = 5
					}
					modifier = {
						has_relation_friend = scope:bp1_yearly_2010_first_partner
						add = 2
					}
					modifier = {
						OR = {
							has_trait = lustful
							has_trait = rakish
						}
						add = 10
					}
				}
				save_scope_as = bp1_yearly_2010_second_partner
			}
		}
		#And set up a lover relation, with accompanying secret
		hidden_effect = {
			scope:bp1_yearly_2010_first_partner = {
				if = {
					limit = {
						can_set_relation_lover_trigger = { CHARACTER = scope:bp1_yearly_2010_second_partner }
					}
					set_random_lover_reason = { TARGET = scope:bp1_yearly_2010_second_partner }
					random_secret = {
						limit = {
							secret_owner = scope:bp1_yearly_2010_first_partner
							secret_type = secret_lover
							secret_target = scope:bp1_yearly_2010_second_partner
							NOT = { is_known_by = root }
						}
						save_scope_as = bp1_yearly_2010_lover_secret_to_reveal_first_partner
					}
				}
				else = {
					random_secret = {
						limit = {
							secret_owner = scope:bp1_yearly_2010_first_partner
							secret_type = secret_lover
							secret_target = scope:bp1_yearly_2010_second_partner
							NOT = { is_known_by = root }
						}
						save_scope_as = bp1_yearly_2010_lover_secret_to_reveal_first_partner
					}
				}
				add_character_flag = {
					flag = block_infidelity_flag
					days = 10
				}
			}
			scope:bp1_yearly_2010_second_partner = {
				random_secret = {
					limit = {
						secret_owner = scope:bp1_yearly_2010_second_partner
						secret_type = secret_lover
						secret_target = scope:bp1_yearly_2010_first_partner
						NOT = { is_known_by = root }
						NOT = { this = scope:bp1_yearly_2010_lover_secret_to_reveal_first_partner }
					}
					save_scope_as = bp1_yearly_2010_lover_secret_to_reveal_second_partner
				}
				add_character_flag = {
					flag = block_infidelity_flag
					days = 10
				}
			}
		}
		if = {
			limit = {
				OR = {
					bp1_yearly_2010_appropriate_partner_trigger = {
						FIRST = scope:bp1_yearly_2010_first_partner
						SECOND = scope:bp1_yearly_2010_second_partner
					}
					bp1_yearly_2010_appropriate_partner_trigger = {
						SECOND = scope:bp1_yearly_2010_first_partner
						FIRST = scope:bp1_yearly_2010_second_partner
					}
				}
				OR = {
					has_trait = lustful
					has_trait = rakish
				}
			}
			add_character_flag = bp1_yearly_2010_correct_circumstances
		}
		if = {
			limit = {
				scope:bp1_yearly_2010_first_partner = {
					OR = {
						has_trait = lustful
						has_trait = rakish
					}
				}
			}
			scope:bp1_yearly_2010_first_partner = {
				add_character_flag = is_naked
			}
		}
		if = {
			limit = {
				scope:bp1_yearly_2010_second_partner = {
					OR = {
						has_trait = lustful
						has_trait = rakish
					}
				}
			}
			scope:bp1_yearly_2010_second_partner = {
				add_character_flag = is_naked
			}
		}
	}
	#Do nothing, get their secret
	option = {
		name = {
			text = {
				first_valid = {
					#Lustful flavor
					triggered_desc = {
						trigger = {
							OR = {
								has_trait = lustful
								has_trait = rakish
							}
						}
						desc = bp1_yearly.2010.a_lustful
					}
					#Default
					triggered_desc = {
						desc = bp1_yearly.2010.a
					}
				}
			}
		}
		flavor = {
			first_valid = {
				triggered_desc = {
					trigger = {
						OR = {
							has_trait = lustful
							has_trait = rakish
						}
					}
					desc = bp1_yearly.2010.a_tt_lustful
				}
				#Default
				triggered_desc = {
					desc = bp1_yearly.2010.a_tt
				}
			}
		}
		#Learn secrets
		scope:bp1_yearly_2010_lover_secret_to_reveal_first_partner = { reveal_to = root }
		scope:bp1_yearly_2010_lover_secret_to_reveal_second_partner = { reveal_to = root }
	}
	#Under correct circumstances - join in
	option = {
		name = bp1_yearly.2010.b
		trigger = { has_character_flag = bp1_yearly_2010_correct_circumstances }
		flavor = bp1_yearly.2010.tt
		scope:bp1_yearly_2010_lover_secret_to_reveal_first_partner = { reveal_to = root }
		scope:bp1_yearly_2010_lover_secret_to_reveal_second_partner = { reveal_to = root }
		#Only pregnancy chance if they're into your gender
		if = {
			limit = {
				scope:bp1_yearly_2010_first_partner = { is_attracted_to_gender_of = root }
			}
			had_sex_with_effect = {
				CHARACTER = scope:bp1_yearly_2010_first_partner
				PREGNANCY_CHANCE = pregnancy_chance
			}
			if = {
				limit = {
					can_set_relation_potential_lover_trigger = { CHARACTER = scope:bp1_yearly_2010_first_partner }
				}
				set_relation_potential_lover = scope:bp1_yearly_2010_first_partner
			}
		}
		if = {
			limit = {
				scope:bp1_yearly_2010_second_partner = { is_attracted_to_gender_of = root }
			}
			had_sex_with_effect = {
				CHARACTER = scope:bp1_yearly_2010_second_partner
				PREGNANCY_CHANCE = pregnancy_chance
			}
			if = {
				limit = {
					can_set_relation_potential_lover_trigger = { CHARACTER = scope:bp1_yearly_2010_second_partner }
				}
				set_relation_potential_lover = scope:bp1_yearly_2010_second_partner
			}
		}
		add_character_modifier = {
			modifier = bedrock_modifier
			years = 5
		}
		create_character_memory = {
			type = had_a_threesome_memory
			participants = {
				partner_1 = scope:bp1_yearly_2010_first_partner
				partner_2 = scope:bp1_yearly_2010_second_partner
			}
		}
		add_character_flag = {
			flag = block_infidelity_flag
			days = 10
		}
	}
	#Imprison them!
	option = {
		name = bp1_yearly.2010.c
		scope:bp1_yearly_2010_lover_secret_to_reveal_first_partner = { expose_secret = root }
		scope:bp1_yearly_2010_lover_secret_to_reveal_second_partner = { expose_secret = root }
		flavor = {
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = lustful
						has_trait = rakish
					}
				}
				desc = bp1_yearly.2010.c_tt
			}
		}
		rightfully_imprison_character_effect = { TARGET = scope:bp1_yearly_2010_first_partner IMPRISONER = root }
		rightfully_imprison_character_effect = { TARGET = scope:bp1_yearly_2010_second_partner IMPRISONER = root }
		stress_impact = {
			lustful = major_stress_impact_gain
			rakish = major_stress_impact_gain
			forgiving = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
			honest = minor_stress_impact_gain
		}
	}
	after = {
		remove_character_flag = bp1_yearly_2010_correct_circumstances
		if = {
			limit = {
				scope:bp1_yearly_2010_first_partner = {
					has_character_flag = is_naked
				}
			}
			scope:bp1_yearly_2010_first_partner = {
				remove_character_flag = is_naked
			}
		}
		if = {
			limit = {
				scope:bp1_yearly_2010_second_partner = {
					has_character_flag = is_naked
				}
			}
			scope:bp1_yearly_2010_second_partner = {
				remove_character_flag = is_naked
			}
		}
	}
}

scripted_effect gain_lose_weight_effect = {
	hidden_effect = {
		if = {
			limit = {
				has_character_flag = gaining_weight_flag
			}
			change_current_weight = 30
		}
		else = {
			change_current_weight = -30
		}
	}
}

##################################################
# Your friend fatshames you
# by Nick Meredith
# bp1_yearly.5301
##################################################

bp1_yearly.5301 = {
	type = character_event
	content_source = dlc_006

	title = bp1_yearly.5301.t
	desc = {
		desc = bp1_yearly.5301.start
		first_valid = {
			triggered_desc = {
				trigger = {
					current_weight > 80
				}
				desc = bp1_yearly.5301.thicc
			}
			triggered_desc = {
				trigger = {
					current_weight < -10
				}
				desc = bp1_yearly.5301.thinn
			}
		}
	}
	theme = friend_relation
	left_portrait = {
		character = root
		animation = anger
	}
	right_portrait = {
		character = scope:concerned_friend
		animation = worry
	}
	override_background = { reference = bp1_kitchen_western }
	cooldown = { years = 10 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# You are either a thicc'un or a thin'un
		OR = {
			current_weight > 80
			current_weight < -10
		}

		# You have a friend :)
		any_relation = {
			type = friend
			is_available_ai_adult = yes
		}

		capital_province = {
			NOT = {
				agot_is_desert_terrain = yes
			}
		}
	}

	immediate = {
		random_relation = {
			type = friend
			save_scope_as = concerned_friend
		}
		if = {
			limit = {
				current_weight < -10
			}
			add_character_flag = gaining_weight_flag
		}
	}

	# You're right!
	option = {
		name = bp1_yearly.5301.a

		custom_tooltip = bp1_yearly.5301.a.tt

		scope:concerned_friend = {
			add_opinion = {
				modifier = pleased_opinion
				target = root
				opinion = 10
			}
		}

		trigger_event = {
			id = bp1_yearly.5302
			days = 4
		}

		stress_impact = {
			arrogant = major_stress_impact_gain
			lazy = major_stress_impact_gain
			stubborn = major_stress_impact_gain
			impatient = minor_stress_impact_gain
			paranoid = minor_stress_impact_gain
			ambitious = minor_stress_impact_loss
			diligent = minor_stress_impact_loss
			humble = minor_stress_impact_loss
			trusting = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = arrogant
					has_trait = stubborn
				}
			}
		}
	}

	# You're wrong, I'm not too fat!
	option = {
		name = bp1_yearly.5301.b

		trigger = {
			current_weight > 80
		}

		custom_tooltip = bp1_yearly.5301.b.tt

		scope:concerned_friend = {
			add_opinion = {
				modifier = disappointed_opinion
				target = root
				opinion = -10
			}
		}

		trigger_event = {
			id = bp1_yearly.5306
			days = 1
		}

		stress_impact = {
			arrogant = minor_stress_impact_loss
			lazy = minor_stress_impact_loss
			stubborn = minor_stress_impact_loss
			ambitious = medium_stress_impact_gain
			diligent = medium_stress_impact_gain
			humble = medium_stress_impact_gain
			trusting = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = ambitious
					has_trait = diligent
					has_trait = humble
					has_trait = trusting
				}
			}
		}
	}

	# You're wrong, I'm not too thin!
	option = {
		name = bp1_yearly.5301.c

		trigger = {
			current_weight < -10
		}

		custom_tooltip = bp1_yearly.5301.b.tt

		scope:concerned_friend = {
			add_opinion = {
				modifier = disappointed_opinion
				target = root
				opinion = -10
			}
		}

		trigger_event = {
			id = bp1_yearly.5306
			days = 1
		}

		stress_impact = {
			arrogant = minor_stress_impact_loss
			lazy = minor_stress_impact_loss
			stubborn = minor_stress_impact_loss
			ambitious = medium_stress_impact_gain
			diligent = medium_stress_impact_gain
			humble = medium_stress_impact_gain
			trusting = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = ambitious
					has_trait = diligent
					has_trait = humble
					has_trait = trusting
				}
			}
		}
	}

	# I'm not fat/thin, you're fat/thin!
	option = {
		name = bp1_yearly.5301.d

		trigger = { # damn boi, he's a thicc/thinn boi
			scope:concerned_friend = {
				OR = {
					current_weight > 80
					current_weight < -10
				}
			}
		}

		add_internal_flag = special

		custom_tooltip = bp1_yearly.5301.d.tt

		duel = {
			skill = prowess
			target = scope:concerned_friend

			#You win
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp1_yearly.5301.d.tt.win
				send_interface_toast = {
					title = bp1_yearly.5301.d.tt.win
					left_icon = root
					right_icon = scope:concerned_friend

					add_prestige = minor_prestige_value

					scope:concerned_friend = {
						add_opinion = {
							modifier = angry_opinion
							target = root
							opinion = -30
						}
						increase_wounds_effect = { REASON = fight }
					}
				}
			}
			#You lose
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.5301.d.tt.lose
				send_interface_toast = {
					title = bp1_yearly.5301.d.tt.lose
					left_icon = root
					right_icon = scope:concerned_friend

					add_prestige = minor_prestige_loss

					increase_wounds_effect = { REASON = fight }

					scope:concerned_friend = {
						add_opinion = {
							modifier = pity_opinion
							target = root
							opinion = -20
						}
					}
				}
			}
		}

		stress_impact = {
			wrathful = miniscule_stress_impact_loss
			craven = medium_stress_impact_gain
			fickle = medium_stress_impact_gain
			vengeful = minor_stress_impact_loss
			humble = major_stress_impact_gain
			arrogant = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = craven
					has_trait = fickle
					has_trait = humble
				}
			}
		}
	}
}

# Training montage!
bp1_yearly.5302 = {
	type = character_event
	content_source = dlc_006

	title = bp1_yearly.5302.t
	desc = bp1_yearly.5302.desc
	theme = friend_relation
	left_portrait = {
		character = root
		animation = pain
	}
	right_portrait = {
		character = scope:concerned_friend
		animation = happiness
	}

	override_background = { reference = wilderness_scope }

	immediate = {
		capital_province = { save_scope_as = background_wilderness_scope }
	}

	# Chop down trees
	option = {
		name = bp1_yearly.5302.a

		custom_tooltip = bp1_yearly.5302.a.tt

		gain_lose_weight_effect = yes

		trigger_event = {
			id = bp1_yearly.5303
			days = 7
		}

		stress_impact = {
			greedy = miniscule_stress_impact_loss
			lustful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}

	# Help drain a bog
	option = {
		name = bp1_yearly.5302.b

		custom_tooltip = bp1_yearly.5302.b.tt

		gain_lose_weight_effect = yes

		trigger_event = {
			id = bp1_yearly.5304
			days = 7
		}

		stress_impact = {
			greedy = miniscule_stress_impact_loss
			lustful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}
}

# Your final test - a big tree
bp1_yearly.5303 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5303.t
	desc = bp1_yearly.5303.desc
	theme = friend_relation
	left_portrait = {
		character = root
		animation = pain
	}
	right_portrait = {
		character = scope:concerned_friend
		animation = worry
	}

	override_background = { reference = wilderness_forest }

	# Attempt it alone
	option = {
		name = bp1_yearly.5303.a

		add_internal_flag = dangerous

		gain_lose_weight_effect = yes

		random_list = {
			20 = { #You cut it down successfully
				modifier = {
					has_trait = physique_good
					factor = 5
				}
				modifier = {
					prowess > 20
					factor = 3
				}
				modifier = {
					prowess > 10
					factor = 1
				}

				send_interface_toast = {
					title = bp1_yearly.5303.a.criticalsuccess
					left_icon = root
					right_icon = scope:concerned_friend

					add_prestige = minor_prestige_value

					add_character_modifier = {
						modifier = lumberjack_modifier
						years = 10
					}

					scope:concerned_friend = {
						add_opinion = {
							modifier = impressed_opinion
							target = root
							opinion = 30
						}
					}
				}

				custom_tooltip =  bp1_yearly.5303.a.criticalsuccess

				trigger_event = {
					id = bp1_yearly.5305
					days = 14
				}

				create_character_memory = {
					type = cut_down_tree

					participants = {
						watching_friend = scope:concerned_friend
					}
				}

				hidden_effect = {
					if = {
						limit = {
							has_character_flag = gaining_weight_flag
						}
						change_current_weight = 20
					}
					else = {
						change_current_weight = -20
					}
				}
			}
			10 = { #You are unable to cut it down by yourself

				send_interface_toast = {
					title = bp1_yearly.5303.a.failure
					left_icon = root
					right_icon = scope:concerned_friend

					add_prestige = minor_prestige_loss
				}

				custom_tooltip =  bp1_yearly.5303.a.failure

				trigger_event = {
					id = bp1_yearly.5305
					days = 14
				}

				hidden_effect = {
					if = {
						limit = {
							has_character_flag = gaining_weight_flag
						}
						change_current_weight = 20
					}
					else = {
						change_current_weight = -20
					}
				}
			}
			5 = { #The tree injures you

				send_interface_toast = {
					title = bp1_yearly.5303.a.wounded
					left_icon = root
					right_icon = scope:concerned_friend
				}

				custom_tooltip =  bp1_yearly.5303.a.wounded

				hidden_effect = {
					if = {
						limit = {
							has_character_flag = gaining_weight_flag
						}
						change_current_weight = 20
					}
					else = {
						change_current_weight = -20
					}
				}

				trigger_event = {
					id = bp1_yearly.5305
					days = 14
				}

				increase_wounds_effect = { REASON = fall }
			}
			1 = { #The tree falls on you and kills you
				custom_tooltip =  bp1_yearly.5303.a.criticalfailure
				death = {
					death_reason = death_accident
				}
			}
		}

		stress_impact = {
			ambitious = minor_stress_impact_loss
			diligent = miniscule_stress_impact_loss
			stubborn = miniscule_stress_impact_loss
			content = major_stress_impact_gain
			lazy = major_stress_impact_gain
			fickle = medium_stress_impact_gain
			humble = major_stress_impact_gain
			trusting = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = humble
					has_trait = lazy
					has_trait = content
				}
			}
		}
	}

	# Ask for help
	option = {
		name = bp1_yearly.5303.b

		stress_impact = {
			content = minor_stress_impact_loss
			fickle = miniscule_stress_impact_loss
			lazy = miniscule_stress_impact_loss
			trusting = miniscule_stress_impact_loss
			ambitious = major_stress_impact_gain
			stubborn = medium_stress_impact_gain
			arrogant = major_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}

		gain_lose_weight_effect = yes

		scope:concerned_friend = {
			add_opinion = {
				modifier = pleased_opinion
				target = root
				opinion = 20
			}
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}
}

# Your final test - child falls in a bog
bp1_yearly.5304 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5304.t
	desc = bp1_yearly.5304.desc
	theme = friend_relation
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:concerned_friend
		animation = disbelief
	}
	lower_center_portrait = {
		character = scope:waterboy
	}

	override_background = { reference = wilderness_wetlands }

	immediate = {
		if = { # Try to grab a pool character
			limit = {
				any_pool_guest = {
					age < 12
					age > 8
					is_lowborn = yes
				}
			}
			random_pool_guest = {
				limit = {
					age < 12
					age > 8
					is_lowborn = yes
				}
				save_scope_as = waterboy
			}
		}
		else = { # else, make one for the event
			create_character = {
				age = { 8 12 }
				template = servant_character
				location = this.location
				gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
				save_scope_as = waterboy
			}
		}
	}

	# Grab the child!
	option = {
		name = bp1_yearly.5304.a

		add_character_modifier = {
			modifier = bog_smell_modifier
			years = 5
		}

		scope:concerned_friend = {
			add_opinion = {
				modifier = impressed_opinion
				target = root
				opinion = 20
			}
		}

		scope:waterboy = {
			add_opinion = {
				modifier = grateful_opinion
				target = root
				opinion = 80
			}
		}

		gain_lose_weight_effect = yes

		stress_impact = {
			compassionate = minor_stress_impact_loss
			humble = minor_stress_impact_loss
			trusting = minor_stress_impact_loss
			lazy = medium_stress_impact_gain
			arbitrary = major_stress_impact_gain
			sadistic = minor_stress_impact_gain
		}

		trigger_event = {
			id = bp1_yearly.5305
			days = 14
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = arbitrary
				}
			}
		}
	}

	# Let the child drown
	option = {
		name = bp1_yearly.5304.b

		scope:concerned_friend = {
			add_opinion = {
				modifier = cruelty_opinion
				target = root
				opinion = -50
			}
		}

		scope:waterboy = {
			death = {
				death_reason = death_accident
			}
		}

		gain_lose_weight_effect = yes

		stress_impact = {
			compassionate = massive_stress_impact_gain
			just = major_stress_impact_gain
			humble = minor_stress_impact_gain
			trusting = minor_stress_impact_gain
			lazy = minor_stress_impact_loss
			arbitrary = minor_stress_impact_loss
			sadistic = minor_stress_impact_loss
		}

		trigger_event = {
			id = bp1_yearly.5305
			days = 14
		}

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

# You are stronk!
bp1_yearly.5305 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5305.t
	desc = bp1_yearly.5305.desc
	theme = friend_relation
	left_portrait = {
		character = root
		animation = ecstasy
	}
	right_portrait = {
		character = scope:concerned_friend
		animation = admiration
	}

	override_background = { reference = relaxing_room }

	immediate = {
		add_character_flag = single_combat_stripped_to_waist
	}

	# Flex
	option = {
		name = bp1_yearly.5305.a

		add_character_modifier = {
			modifier = brawny_modifier
			years = 5
		}

		add_trait = strong

		stress_impact = {
			greedy = miniscule_stress_impact_loss
			lustful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}

	# Thank your friend, progress towards best friends
	option = {
		name = bp1_yearly.5305.b

		add_trait = strong

		progress_towards_friend_effect = {
			REASON = friend_encouraged_growth
			CHARACTER = scope:concerned_friend
			OPINION = 40
		}

		scope:concerned_friend = {
			add_trait = loyal
		}

		stress_impact = {
			greedy = miniscule_stress_impact_loss
			lustful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}

	after = {
		remove_character_flag = single_combat_stripped_to_waist
	}
}

# Try to pick up something heavy
bp1_yearly.5306 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5306.t
	desc = {
		desc = bp1_yearly.5306.start
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:bulky_artifact
				}
				desc = bp1_yearly.5306.artifact
			}
			triggered_desc = {
				trigger = { is_landed = yes }
				desc = bp1_yearly.5306.throne
			}
			desc = bp1_yearly.5306.table
		}
		desc = bp1_yearly.5306.ending
	}


	theme = friend_relation
	left_portrait = {
		character = root
		animation = anger
	}
	right_portrait = {
		character = scope:concerned_friend
		animation = shock
	}
	artifact = {
		target = scope:bulky_artifact
		position = lower_center_portrait
	}

	override_background = { reference = throne_room }

	immediate = {
		root = {
			save_scope_as = target
		}
		scope:target = {
			random_character_artifact = {
				limit = {
					OR = {
						artifact_slot_type = sculpture #Includes furniture
						artifact_slot_type = throne
					}
				}
				save_scope_as = bulky_artifact
			}
		}
		add_character_flag = single_combat_stripped_to_waist
	}

	# Attempt to pick it up
	option = {
		name = bp1_yearly.5306.a

		add_internal_flag = dangerous

		random_list = {
			5 = { #You pick it up

				custom_tooltip =  bp1_yearly.5306.a.success

				modifier = {
					has_trait = physique_good
					factor = 5
				}
				modifier = {
					prowess > 20
					factor = 3
				}
				modifier = {
					prowess > 10
					factor = 1
				}

				send_interface_toast = {
					title = bp1_yearly.5306.a.criticalsuccess
					left_icon = root
					right_icon = scope:concerned_friend

					add_prestige = minor_prestige_value

					scope:concerned_friend = {
						add_opinion = {
							modifier = impressed_opinion
							target = root
							opinion = 40
						}
					}
				}

				create_character_memory = {
					type = picked_up_throne

					participants = {
						impressed_friend = scope:concerned_friend
					}
				}

				hidden_effect = {
					if = {
						limit = {
							has_character_flag = gaining_weight_flag
						}
						change_current_weight = 20
					}
					else = {
						change_current_weight = -20
					}
				}
			}
			20 = { #You strain a muscle

				custom_tooltip =  bp1_yearly.5306.a.failure

				send_interface_toast = {
					title = bp1_yearly.5306.a.failure
					left_icon = root
					right_icon = scope:concerned_friend

					add_prestige = minor_prestige_loss

					scope:concerned_friend = {
						add_opinion = {
							modifier = pity_opinion
							target = root
							opinion = -20
						}
					}
				}
			}
			1 = { #You drop it... on your own head
				custom_tooltip =  bp1_yearly.5306.a.criticalfailure
				death = {
					death_reason = death_accident
				}
			}
		}

		stress_impact = {
			greedy = miniscule_stress_impact_loss
			lustful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}

	# Decide against it
	option = {
		name = bp1_yearly.5306.b

		trigger_event = {
			id = bp1_yearly.5302
			days = 14
		}

		stress_impact = {
			greedy = miniscule_stress_impact_loss
			lustful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}
	after = {
		remove_character_flag = single_combat_stripped_to_waist
	}
}

##################################################
# Grave Robbing
# by Nick Meredith
# bp1_yearly.5601-5605
##################################################

# Your nemesis is dead, woooo!
bp1_yearly.5601 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5601.t
	desc = {
		desc = bp1_yearly.5601.start
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = sadistic
						has_trait = callous
						has_trait = vengeful
					}
					NOT = { #Make sure he's actually buried
						scope:bp1_yearly_5601_dead_nemesis.faith = {
							has_doctrine_parameter = sky_burials_active
						}
					}
				}
				desc = bp1_yearly.5601.bodysnatcher
			}
			triggered_desc = {
				desc = bp1_yearly.5601.notinsane
			}
		}
	}
	theme = skull # Finally, a theme that matches perfectly!
	left_portrait = {
		character = root
		animation = throne_room_cheer_2
	}
	right_portrait = {
		character = scope:dead_nemesis_spouse
		animation = grief
	}
	override_background = {
		trigger = {
			root.capital_county = {
				title_province = { geographical_region = world_europe }
			}
		}
		reference = alley_day
	}
	override_background = {
		trigger = {
			root.capital_county = {
				title_province = { geographical_region = world_asia_minor }
			}
		}
		reference = bp1_courtyard_mena
	}
	override_background = {
		trigger = {
			root.capital_county = {
				title_province = { geographical_region = world_middle_east }
			}
		}
		reference = garden
	}
	override_background = {
		trigger = {
			root.capital_county = {
				title_province = { geographical_region = world_india }
			}
		}
		reference = bp1_courtyard_indian
	}
	override_background = {
		trigger = {
			root.capital_county = {
				title_province = { geographical_region = world_africa }
			}
		}
		reference = drylands
	}
	override_background = {
		trigger = {
			root.capital_county = {
				title_province = {
					OR = {
						geographical_region = world_tibet
						geographical_region = world_burma
					}
				}
			}
		}
		reference = market_east
	}
	override_background = {
		trigger = {
			root.capital_county = {
				title_province = { geographical_region = world_steppe }
			}
		}
		reference = wilderness_steppe
	}
	override_background = {
		trigger = {
			root.capital_county = {
				title_province = {
					NOT = {
						geographical_region = world_tibet
						geographical_region = world_burma
						geographical_region = world_africa
						geographical_region = world_india
						geographical_region = world_middle_east
						geographical_region = world_asia_minor
						geographical_region = world_europe
						geographical_region = world_steppe
					}
				}
			}
		}
		reference = courtyard
	}

	cooldown = { years = 50 }

	trigger = {
		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# Redundancy check!
		any_memory = { has_memory_type = nemesis_died }
	}

	immediate = {
		scope:dead_nemesis = { save_scope_as = bp1_yearly_5601_dead_nemesis }
		if = {
			limit = { NOT = { exists = scope:dead_nemesis_spouse } }
			scope:bp1_yearly_5601_dead_nemesis = { # Assuming this is optional, not adding a redundancy check
				random_memory = {
					limit = { has_memory_type = married }
					save_scope_as = dead_nemesis_memory
					memory_participant:spouse = {
						if = {
							limit = { is_alive = yes }
							save_scope_as = dead_nemesis_spouse
						}
					}
				}
				if = {
					limit = { NOT = { exists = scope:dead_nemesis_spouse } }
					random_memory = {
						limit = { has_memory_type = became_soulmates }
						save_scope_as = dead_nemesis_memory
						memory_participant:new_soulmate = {
							if = {
								limit = { is_alive = yes }
								save_scope_as = dead_nemesis_spouse
							}
						}
					}
				}
			}
		}
	}

	# Let's go get the body!
	option = {
		name = bp1_yearly.5601.a
		flavor = bp1_yearly.5601.a.tt

		trigger = {
			OR = { #You're a bit screwed up
				has_trait = sadistic
				has_trait = callous
				has_trait = vengeful
			}
			NOT = { #Make sure he's actually buried
				scope:bp1_yearly_5601_dead_nemesis.faith = {
					has_doctrine_parameter = sky_burials_active
				}
			}
		}

		stress_impact = {
			vengeful = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
			callous = minor_stress_impact_loss
			forgiving = massive_stress_impact_gain
			content = medium_stress_impact_gain
			compassionate = massive_stress_impact_gain
		}

		trigger_event = {
			id = bp1_yearly.5602
			days = 1
		}

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

	# I'm glad they're dead
	option = {
		name = bp1_yearly.5601.b

		stress_impact = {
			base = medium_stress_impact_loss
			vengeful = medium_stress_impact_loss
			forgiving = medium_stress_impact_gain
			content = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}

		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = content
					has_trait = compassionate
					has_trait = forgiving
				}
			}
		}
	}

	# It's time to move on
	option = {
		name = bp1_yearly.5601.c

		stress_impact = {
			base = minor_stress_impact_loss
			vengeful = major_stress_impact_gain
			sadistic = major_stress_impact_gain
			callous = medium_stress_impact_gain
			forgiving = minor_stress_impact_loss
			content = minor_stress_impact_loss
			compassionate = minor_stress_impact_loss
		}

		add_prestige = minor_prestige_value

		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = vengeful
					has_trait = sadistic
					has_trait = callous
				}
			}
		}
	}
}

# You fancy a bit of bodysnatching
bp1_yearly.5602 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5602.t
	desc = bp1_yearly.5602.desc
	theme = skull
	left_portrait = {
		character = root
		animation = personality_vengeful
	}
	right_portrait = {
		character = scope:bp1_yearly_5601_dead_nemesis
		animation = loss_1
	}
	override_background = { reference = alley_night }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

	}

	# Take their head as a drinking cup
	option = {
		name = bp1_yearly.5602.a

		trigger = {
			# DLC check.
			has_ep1_dlc_trigger = yes
		}

		stress_impact = {
			vengeful = minor_stress_impact_loss
			sadistic = medium_stress_impact_loss
			callous = medium_stress_impact_loss
			forgiving = massive_stress_impact_gain
			content = medium_stress_impact_gain
			compassionate = massive_stress_impact_gain
		}

		create_artifact = {
			name = artifact_pedestal_skull_goblet_name
			description = artifact_pedestal_skull_goblet_description
			type = pedestal
			wealth = 40
			quality = 40
			visuals = skull_goblet
			modifier = artifact_monthly_prestige_gain_per_dread_add_3_modifier
			modifier = artifact_stress_gain_2_modifier
			modifier = artifact_dread_gain_mult_1_modifier
			save_scope_as = newly_created_artifact
		}

		ai_chance = {
			base = 100
		}
	}

	# Take their head as a drinking cup, but you don't have EP1
	option = {
		name = bp1_yearly.5602.a

		trigger = {
			# DLC check.
			has_ep1_dlc_trigger = no
		}

		stress_impact = {
			vengeful = minor_stress_impact_loss
			sadistic = medium_stress_impact_loss
			callous = medium_stress_impact_loss
			forgiving = massive_stress_impact_gain
			content = medium_stress_impact_gain
			compassionate = massive_stress_impact_gain
		}

		create_artifact = {
			name = artifact_skull_goblet_trinket_name
			description = artifact_skull_goblet_trinket_description
			type = miscellaneous
			visuals = pouch
			wealth = 40
			quality = 40
			modifier = artifact_monthly_prestige_gain_per_dread_add_3_modifier
			modifier = artifact_stress_gain_2_modifier
			modifier = artifact_dread_gain_mult_1_modifier
			save_scope_as = newly_created_artifact
		}

		ai_chance = {
			base = 100
		}
	}

	# Feed their head to the pigs
	option = {
		name = bp1_yearly.5602.b

		trigger = { #Unavailable for Muslims
			NOT = {
				root.religion = religion:islam_religion
			}
		}

		add_character_modifier = {
			modifier = bp1_well_fed_pigs_modifier
			years = 3
		}

		stress_impact = {
			base = minor_stress_impact_loss
			vengeful = medium_stress_impact_loss
			forgiving = medium_stress_impact_gain
			content = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
		}
	}
}


##################################################
# Your rival seems strangely... attractive?
# alt. title: Stupid Sexy Flanders
# by Nick Meredith
# bp1_yearly.5704
##################################################

# You're arguing with your rival but they lookin' good
bp1_yearly.5704 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5704.t
	desc = bp1_yearly.5704.desc
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation
	}
	right_portrait = {
		character = scope:seduced_rival
		animation = anger
	}
	override_background = { reference = council_chamber }
	cooldown = { years = 50 }
	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# You are an adult
		is_available_healthy_adult = yes

		# You have a rival you can theoretically be attracted to
		any_relation = {
			type = rival
			is_attracted_to_gender_of = root
			is_available_ai_adult = yes
		}
	}

	immediate = {
		random_relation = {
			type = rival
				limit = {
					is_attracted_to_gender_of = root
					is_available_ai_adult = yes
				}
			save_scope_as = seduced_rival
		}
	}

	# Ayy bby
	option = {
		name = bp1_yearly.5704.a

		start_scheme = {
			type = seduce
			target_character = scope:seduced_rival
		}

		random_scheme = {
			limit = {
				scheme_type = seduce
				scheme_target_character = scope:seduced_rival
			}
			add_scheme_modifier = {
				type = seduce_rival_modifier
			}
		}

		scope:seduced_rival = {
			add_opinion = {
				modifier = warily_flattered_opinion
				opinion = 20
				target = root
			}
		}

		stress_impact = {
			chaste = massive_stress_impact_gain
			patient = minor_stress_impact_gain
			lustful = minor_stress_impact_loss
		}

		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}

	# Eww, no!
	option = {
		name = bp1_yearly.5704.b

		stress_impact = {
			base = minor_stress_impact_gain
			lustful = massive_stress_impact_gain
			impatient = minor_stress_impact_gain
			stubborn = medium_stress_impact_gain
			arrogant = minor_stress_impact_gain
			chaste = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lustful
					has_trait = stubborn
				}
			}
		}
	}
}

##################################################
# Your friends try and talk you out of a bad relationship
# by Nick Meredith
# bp1_yearly.5705
##################################################

# Please milord, this is an unhealthy relationship!
bp1_yearly.5705 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5705.t
	desc = bp1_yearly.5705.desc
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:concerned_friend
		animation = disgust
	}
	lower_center_portrait = {
		character = scope:lover_rival
		animation = happiness
	}

	cooldown = { years = 25 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard checks.
		is_valid_for_narrow_yearly_events = yes

		# Should have a rival who is also your lover
		any_relation = {
			type = lover
			OR = {
				has_relation_rival = root
				has_relation_nemesis = root
			}
		}

		# Should have a friend
		any_relation = {
			type = friend
			is_available_ai_adult = yes
		}
	}

	immediate = {
		random_relation = {
			type = lover
			limit = {
				OR = {
					has_relation_rival = root
					has_relation_nemesis = root
				}
			}
			save_scope_as = lover_rival
		}
		random_relation = {
			type = friend
			limit = {
				is_available_ai_adult = yes
			}
			save_scope_as = concerned_friend
		}
	}

	# But they're _so peng_ blud!
	# Translation: But they're extremely good-looking, my good fellow!
	option = {
		name = bp1_yearly.5705.a
		flavor = bp1_yearly.5705.a.tt

		trigger = {
			scope:lover_rival = {
				has_trait = beauty_good
			}
		}

		add_internal_flag = special

		scope:lover_rival = {
			add_opinion = {
				modifier = lust_opinion
				opinion = 30
				target = root
			}
		}

		scope:concerned_friend = {
			add_opinion = {
				modifier = annoyed_opinion
				opinion = -20
				target = root
			}
		}

		stress_impact = {
			base = minor_stress_impact_loss
			chaste = massive_stress_impact_gain
			humble = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = humble
				}
			}
		}
	}

	# You just don't get it, man!
	option = {
		name = bp1_yearly.5705.b

		scope:lover_rival = {
			add_opinion = {
				modifier = pleased_opinion
				opinion = 10
				target = root
			}
		}

		scope:concerned_friend = {
			add_opinion = {
				modifier = annoyed_opinion
				opinion = -20
				target = root
			}
		}

		stress_impact = {
			base = medium_stress_impact_gain
			chaste = massive_stress_impact_gain
			humble = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = humble
				}
			}
		}
	}

	# Fair enough, this relationship is toxic
	option = {
		name = bp1_yearly.5705.c

		stress_impact = {
			base = minor_stress_impact_gain
			lustful = massive_stress_impact_gain
			impatient = major_stress_impact_gain
			stubborn = major_stress_impact_gain
			arrogant = minor_stress_impact_gain
			chaste = minor_stress_impact_loss
		}

		scope:lover_rival = {
			add_opinion = {
				modifier = angry_opinion
				opinion = -30
				target = root
			}
		}

		scope:concerned_friend = {
			add_opinion = {
				modifier = relieved_opinion
				opinion = 20
				target = root
			}
		}

		remove_relation_lover = scope:lover_rival

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lustful
					has_trait = stubborn
					has_trait = impatient
				}
			}
		}
	}
}

##################################################
# You seduce your rival's child
# by Nick Meredith
# bp1_yearly.5706
##################################################

bp1_yearly.5706 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5706.t
	desc = bp1_yearly.5706.desc
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = personality_cynical
	}
	right_portrait = {
		character = scope:rival_child
		animation = flirtation
	}
	lower_center_portrait = {
		character = scope:rival_parent
	}

	override_background = { reference = bp1_crossroads_inn }

	cooldown = { years = 25 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard checks.
		is_valid_for_narrow_yearly_events_adult = yes

		# Should have a rival with a child
		any_relation = {
			type = rival
			is_available_ai_adult = yes
			any_child = {
				NOT = { this = root }
				is_attracted_to_gender_of = root
				is_available_ai_adult = yes
			}
		}
	}

	immediate = {
		random_relation = {
			type = rival
			limit = {
				any_child = {
					exists = this
					NOT = { this = root }
					is_attracted_to_gender_of = root
					is_available_ai_adult = yes
				}
			}
			save_scope_as  = rival_parent
			random_child = {
				limit = {
					exists = this
					NOT = { this = root }
					is_attracted_to_gender_of = root
					is_available_ai_adult = yes
				}
				save_scope_as = rival_child
			}
		}
		if = {
			limit = { is_landed = yes }
			random_sub_realm_county = { save_scope_as = meeting_county }
		}
		else = {
			capital_county = { save_scope_as = meeting_county }
		}
	}

	# Try to seduce their child
	option = {
		name = bp1_yearly.5706.a

		scope:rival_child = {
			add_opinion = {
				modifier = lust_opinion
				opinion = 30
				target = root
			}
		}

		start_scheme = {
			type = seduce
			target_character = scope:rival_child
		}

		custom_tooltip = bp1_yearly.5706.a.tt

		hidden_effect = {
			random_scheme = {
				limit = {
					scheme_type = seduce
					scheme_target_character = scope:rival_child
				}
				add_scheme_modifier = {
					type = seduce_rival_offspring_modifier
				}
			}
		}

		stress_impact = {
			chaste = massive_stress_impact_gain
			honest = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = honest
					has_trait = compassionate
				}
			}
		}
	}

	# Don't pursue them
	option = {
		name = bp1_yearly.5706.b

		scope:rival_child = {
			add_opinion = {
				modifier = spurned_opinion
				opinion = -30
				target = root
			}
		}

		stress_impact = {
			lustful = massive_stress_impact_gain
			deceitful = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			chaste = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lustful
					has_trait = deceitful
					has_trait = sadistic
				}
			}
		}
	}
}

##################################################
# Your rival catches you in flagrante with their child
# by Nick Meredith
# bp1_yearly.5707
##################################################

bp1_yearly.5707 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5707.t
	desc = {
		desc = bp1_yearly.5707.start
		first_valid = {
			triggered_desc = { #If lover doesn't like their parent
				trigger = {
					NOT = {
						scope:rival_child = {
							has_trait = deviant
						}
					}
					scope:rival_child = {
						opinion = {
							target = scope:rival_parent
							value <= low_negative_opinion
						}
					}
				}
				desc = bp1_yearly.5707.child_dislike
			}
			triggered_desc = { #If lover is deviant but you're not
				trigger = {
					NOT = {
						has_trait = deviant
					}
					scope:rival_child = {
						has_trait = deviant
						is_attracted_to_gender_of = scope:rival_parent
					}
				}
				desc = bp1_yearly.5707.child_deviant
			}
			triggered_desc = { #Both you and lover are deviant, parent is not
				trigger = {
					has_trait = deviant
					scope:rival_parent = {
						NOT = {
							has_trait = deviant
						}
					}
					scope:rival_child = {
						has_trait = deviant
					}
				}
				desc = bp1_yearly.5707.child_deviant
			}
			triggered_desc = { #Everyone is deviant
				trigger = {
					has_trait = deviant
					is_attracted_to_gender_of = scope:rival_parent
					scope:rival_child = {
						has_trait = deviant
						NOT = {
							opinion = {
								target = scope:rival_parent
								value <= low_negative_opinion
							}
						}
					}
					scope:rival_parent = {
						has_trait = deviant
						is_attracted_to_gender_of = root
					}
				}
				desc = bp1_yearly.5707.child_deviant
			}
			triggered_desc = { #Everyone is deviant, but have incompatible sexualities
				trigger = {
					has_trait = deviant
					scope:rival_child = {
						has_trait = deviant
					}
					scope:rival_parent = {
						has_trait = deviant
					}
				}
				desc = bp1_yearly.5707.child_like
			}
			triggered_desc = { # Fallback - If lover likes their parent, and isn't deviant
				desc = bp1_yearly.5707.child_like
			}
		}
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = laugh
	}
	right_portrait = {
		character = scope:rival_parent
		animation = rage
	}
	lower_center_portrait = {
		character = scope:rival_child
	}

	override_background = { reference = bedchamber }

	cooldown = { years = 25 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard checks.
		is_valid_for_narrow_yearly_events = yes

		# Should have a rival with a child who is your lover
		any_relation = {
			type = rival
			is_available_ai_adult = yes
			any_child = {
				is_available_ai_adult = yes
				OR = {
					has_relation_lover = root
					is_consort_of = root
				}
			}
		}
	}

	immediate = {

		add_character_flag = {
			flag = in_flagrante
			days = 1
		}
		add_character_flag = is_naked

		random_relation = {
			type = rival
			limit = {
				is_available_ai_adult = yes
				any_child = {
					is_available_ai_adult = yes
					OR = {
						has_relation_lover = root
						is_consort_of = root
					}
				}
			}
			save_scope_as  = rival_parent

			random_child = {
				limit = {
					OR = {
						has_relation_lover = root
						is_consort_of = root
					}
					is_available_ai_adult = yes
				}
				save_scope_as = rival_child
			}
		}

		random_list = {
			1 = {
				scope:rival_child = {
					give_deviant_secret_or_trait_effect = yes
				}
			}

			99 = {

			}
		}

		random_list = {
			1 = {
				scope:rival_parent = {
					give_deviant_secret_or_trait_effect = yes
				}
			}
			99 = {

			}
		}
	}

	# Hah! Gottem!
	option = {
		name = bp1_yearly.5707.a

		trigger = {
			scope:rival_child = {
				NOT = {
					opinion = {
						target = scope:rival_parent
						value <= low_negative_opinion
					}
				}
			}
		}

		create_character_memory = {
			type = rival_caught_me_in_bed_with_their_child

			participants = {
				rival = scope:rival_parent
			}
		}


		scope:rival_parent = {
			if = {
				limit = {
					can_set_relation_nemesis_trigger = { CHARACTER = root }
				}
				set_relation_nemesis = {
					target = root
					copy_reason = rival
					reason = nemesis_rival_bedded_child
				}
			}
		}

		scope:rival_child = {
			add_opinion = {
				modifier = spurned_opinion
				opinion = -70
				target = root
			}
		}

		remove_relation_lover = scope:rival_child

		stress_impact = {
			chaste = massive_stress_impact_gain
			honest = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = honest
					has_trait = compassionate
				}
			}
		}
	}

	# We sure showed her!
	option = {
		name = bp1_yearly.5707.a

		trigger = {
			NOT = {
				has_trait = deviant
			}
			scope:rival_child = {
				NOT = {
					has_trait = deviant
				}
				opinion = {
					target = scope:rival_parent
					value <= low_negative_opinion
				}
			}
		}

		create_character_memory = {
			type = rival_caught_me_in_bed_with_their_child

			participants = {
				rival = scope:rival_parent
			}
		}

		scope:rival_child = {
			add_opinion = {
				modifier = love_opinion
				opinion = 30
				target = root
			}
		}

		scope:rival_parent = {
			if = {
				limit = {
					can_set_relation_nemesis_trigger = { CHARACTER = root }
				}
				set_relation_nemesis = {
					target = root
					copy_reason = rival
					reason = nemesis_rival_bedded_child
				}
			}
			add_opinion = {
				modifier = hate_opinion
				opinion = -50
				target = root
			}
			add_opinion = {
				modifier = hate_opinion
				opinion = -50
				target = scope:rival_child
			}
		}

		stress_impact = {
			chaste = massive_stress_impact_gain
			honest = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = honest
					has_trait = compassionate
				}
			}
		}
	}

	# What the hell?! - lover is a deviant but you're not
	option = {
		name = bp1_yearly.5707.a.deviant

		trigger = {
			NOT = {
				has_trait = deviant
			}
			scope:rival_child = {
				has_trait = deviant
			}
		}

		scope:rival_child = {
			add_opinion = {
				modifier = spurned_opinion
				opinion = -10
				target = root
			}
		}

		scope:rival_parent = {
			add_opinion = {
				modifier = hate_opinion
				opinion = -40
				target = root
			}
			add_opinion = {
				modifier = hate_opinion
				opinion = -40
				target = scope:rival_child
			}
		}

		stress_impact = {
			chaste = massive_stress_impact_gain
			honest = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = honest
					has_trait = compassionate
				}
			}
		}
	}

	# Both you and lover are deviants, parent is not
	option = {
		name = bp1_yearly.5707.a.doubledeviant

		trigger = {
			has_trait = deviant
			scope:rival_parent = {
				NOT = {
					is_deviant_trigger = yes
				}
			}
			scope:rival_child = {
				is_deviant_trigger = yes
			}
		}

		add_internal_flag = special

		scope:rival_child = {
			add_opinion = {
				modifier = lust_opinion
				opinion = 30
				target = root
			}
		}

		scope:rival_parent = {
			add_opinion = {
				modifier = hate_opinion
				opinion = -50
				target = root
			}
			add_opinion = {
				modifier = hate_opinion
				opinion = -50
				target = scope:rival_child
			}
		}

		stress_impact = {
			chaste = massive_stress_impact_gain
			honest = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = honest
					has_trait = compassionate
				}
			}
		}
	}

	# You, the rival AND the offspring are deviants, and child does not hate parent
	option = {
		name = bp1_yearly.5707.a.doubledeviant

		trigger = {
			has_trait = deviant
			is_attracted_to_gender_of = scope:rival_parent
			scope:rival_child = {
				is_deviant_trigger = yes
				NOT = {
					opinion = {
						target = scope:rival_parent
						value <= low_negative_opinion
					}
				}
			}
			scope:rival_parent = {
				is_deviant_trigger = yes
				is_attracted_to_gender_of = root
				OR = {
					might_cheat_on_every_partner_trigger = yes
					OR = {
						has_relation_lover = root
						is_consort_of = root
					}
					OR = {
						has_relation_lover = scope:rival_child
						is_consort_of = scope:rival_child
					}
				}
			}
		}

		trait = deviant

		had_sex_with_effect = {
			CHARACTER = scope:rival_parent
			PREGNANCY_CHANCE = pregnancy_chance
		}

		had_sex_with_effect = {
			CHARACTER = scope:rival_child
			PREGNANCY_CHANCE = pregnancy_chance
		}


		scope:rival_parent = {
			set_relation_lover = { reason = lover_cursed_threesome target = root involved_character = scope:rival_child }
		}

		scope:rival_parent = {
			add_opinion = {
				modifier = lust_opinion
				opinion = 30
				target = root
			}
			add_opinion = {
				modifier = lust_opinion
				opinion = 30
				target = scope:rival_child
			}
		}

		scope:rival_child = {
			add_opinion = {
				modifier = lust_opinion
				opinion = 30
				target = root
			}
			add_opinion = {
				modifier = lust_opinion
				opinion = 30
				target = scope:rival_parent
			}
		}

		stress_impact = {
			chaste = massive_stress_impact_gain
			honest = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
			deviant = medium_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = honest
				}
			}
		}
	}

	# You, the rival AND the offspring are deviants buuut incompatible sexualities
	option = {
		name = bp1_yearly.5707.c

		trigger = {
			is_deviant_trigger = yes
			scope:rival_child = {
				is_deviant_trigger = yes
			}
			scope:rival_parent = {
				is_deviant_trigger = yes
				NOT = {
					is_attracted_to_gender_of = root
				}
			}
		}

		trait = deviant

		scope:rival_parent = {
			add_opinion = {
				modifier = hate_opinion
				opinion = -30
				target = root
			}
		}

		scope:rival_child = {
			add_opinion = {
				modifier = lust_opinion
				opinion = 30
				target = root
			}
		}

		stress_impact = {
			chaste = massive_stress_impact_gain
			honest = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
			deviant = medium_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = honest
				}
			}
		}
	}

	# We're really in love! Leave us alone!
	option = {
		name = bp1_yearly.5707.b

		scope:rival_child = {
			add_opinion = {
				modifier = love_opinion
				opinion = 30
				target = root
			}
		}

		scope:rival_parent = {
			add_opinion = {
				modifier = hate_opinion
				opinion = -30
				target = scope:rival_child
			}
		}

		stress_impact = {
			lustful = major_stress_impact_gain
			deceitful = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			chaste = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lustful
					has_trait = deceitful
					has_trait = sadistic
				}
			}
		}
	}

	after = { #Just in case
		remove_character_flag = in_flagrante
		remove_character_flag = is_naked
	}
}

##################################################
# You empathise with a friend's faith
# by Nick Meredith
# bp1_yearly.5708
##################################################

bp1_yearly.5708 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5708.t
	desc = {
		desc = bp1_yearly.5708.start
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:heathen_friend.faith = {
						has_doctrine = tenet_aniconism
					}
				}
				desc = bp1_yearly.5708.aniconist
			}
			desc = bp1_yearly.5708.normal
		}
		desc = bp1_yearly.5708.end
	}

	theme = faith
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:heathen_friend
		animation = personality_forgiving
	}
	override_background = { reference = alley_day }
	cooldown = { years = 50 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# You have a friend whose religion is different from yours
		any_relation = {
			type = friend
			is_available_ai_adult = yes
			location = root.location
			NOT = {
				faith.religion = root.faith.religion
			}
		}
	}


	immediate = {
		random_relation = {
			type = friend
			limit = {
				is_available_ai_adult = yes
				location = root.location
				NOT = {
					faith.religion = root.faith.religion
				}
			}
			save_scope_as = heathen_friend
		}
	}

	# This is nonsense!
	option = {
		name = bp1_yearly.5708.a

		trigger = {
			has_trait = zealous
		}

		add_piety = medium_piety_value

		scope:heathen_friend = {
			remove_friend_or_downgrade_friendship_effect = { SCOPE = root }
		}

		stress_impact = {
			compassionate = major_stress_impact_gain
			gregarious = medium_stress_impact_gain
			honest = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = gregarious
				}
			}
		}
	}

	# Well if they're nice then the rest can't be so bad
	option = {
		name = bp1_yearly.5708.b

		add_character_modifier = tolerant_opinion_modifier

		progress_towards_friend_effect = {
			REASON = friend_respected_other_religion_reverse
			CHARACTER = scope:heathen_friend
			OPINION = 20
		}

		every_courtier = {
			limit = {
				has_trait = zealous
				NOT = {
					faith.religion = root.faith.religion
				}
			}

			custom = bp1_yearly.5708.b.tt

			add_opinion = {
				target = root
				modifier = impious_opinion
				opinion = -10
			}
		}

		stress_impact = {
			callous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			zealous = major_stress_impact_gain
			stubborn = medium_stress_impact_gain
		}

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

	# I wonder if I can learn anything about their faith?
	option = {
		name = bp1_yearly.5708.c

		duel = {
			skill = learning
			target = scope:heathen_friend

			#You successfully learn their ways
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp1_yearly.5708.c.tt.success
				send_interface_toast = {
					title = bp1_yearly.5708.c.tt.success
					left_icon = root
					right_icon = scope:heathen_friend

					add_learning_skill = 1

					root = {
						progress_towards_friend_effect = {
							REASON = friend_respected_other_religion_reverse
							CHARACTER = scope:heathen_friend
							OPINION = 20
						}
					}
				}
			}
			#You fail to understand their ways
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.5708.c.tt.failure
				send_interface_toast = {
					title = bp1_yearly.5708.c.tt.failure
					left_icon = root
					right_icon = scope:heathen_friend
					scope:heathen_friend = {
						add_opinion = {
							target = root
							modifier = disappointed_opinion
							opinion = -30
						}
					}
				}
			}
		}

		stress_impact = {
			callous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			zealous = major_stress_impact_gain
			stubborn = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
		}
	}
}


##################################################
# Tempers flare between you and your rival
# by Nick Meredith
# bp1_yearly.5709
##################################################

bp1_yearly.5709 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5709.t
	desc = bp1_yearly.5709.desc
	theme = rival_relation
	left_portrait = {
		character = root
		animation = marshal
	}
	right_portrait = {
		character = scope:rival_on_sight
		animation = throne_room_one_handed_passive_1
	}
	lower_left_portrait = {
		character = scope:friend_backup
	}
	lower_right_portrait = {
		character = scope:rival_friend
	}
	override_background = { reference = docks }
	cooldown = { years = 10 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# Make sure you can duel
		can_start_single_combat_trigger = yes

		# You have a rival who can duel and isn't a child
		any_relation = {
			type = rival
			is_available_ai_adult = yes
			age >= 18
			can_start_single_combat_trigger = yes
			top_liege = root.top_liege
		}

		# You have a friend who can throw down
		any_relation = {
			type = friend
			is_available_ai_adult = yes
			age >= 18
			can_start_single_combat_trigger = yes
			top_liege = root.top_liege
		}

		# Ensure you have at least one place a fish can exist in
		OR = {
			any_held_county = {
				title_province = {
					NOR = {
						agot_is_desert_terrain = yes
						agot_is_desert_mountains_terrain = yes
						agot_is_drylands_terrain = yes
					}
				}
			}
			location = {
				NOR = {
					agot_is_desert_terrain = yes
					agot_is_desert_mountains_terrain = yes
					agot_is_drylands_terrain = yes
				}
			}
		}
	}

	immediate = {
		random_relation = { # Grab a rival
			type = rival
			limit = {
				is_available_ai_adult = yes
				can_start_single_combat_trigger = yes
				top_liege = root.top_liege
			}
			save_scope_as = rival_on_sight
		}

		random_relation = {
			type = friend
			limit = {
				is_available_ai_adult = yes
				can_start_single_combat_trigger = yes
				top_liege = root.top_liege
			}
			save_scope_as = friend_backup
		}

		create_character = { #give your rival a friend so you can brawl it out
			location = root.capital_province
			random_traits = yes
			faith = scope:rival_on_sight.faith
			culture = scope:rival_on_sight.culture
			age = scope:rival_on_sight.age
			gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
			save_scope_as = rival_friend
		}
	}

	# Start a mass brawl
	option = {
		name = bp1_yearly.5709.a

		duel = {
			skill = prowess
			target = scope:rival_on_sight
			#You and your crew win
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp1_yearly.5709.a.tt.success
				send_interface_toast = {
					title = bp1_yearly.5709.a.tt.success
					left_icon = root
					right_icon = scope:rival_on_sight

					add_prestige = minor_prestige_value

					scope:rival_on_sight = {
						increase_wounds_effect = { REASON = fight }
					}
					scope:rival_friend = {
						increase_wounds_effect = { REASON = fight }
					}
				}
			}

			#You get donked
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.5709.a.tt.failure
				send_interface_toast = {
					title = bp1_yearly.5709.a.tt.failure
					left_icon = root
					right_icon = scope:rival_on_sight

					add_prestige = minor_prestige_loss

					increase_wounds_effect = { REASON = fight }

					scope:friend_backup = {
						increase_wounds_effect = { REASON = fight }
					}
				}
			}
		}

		stress_impact = {
			brave = miniscule_stress_impact_loss
			craven = major_stress_impact_gain
			forgiving = major_stress_impact_gain
			patient = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
		}
	}

	option = { # Get tempted into a fight
		name = bp1_yearly.5709.b

		custom_tooltip = bp1_yearly.5709.b.tt

		configure_start_single_combat_effect = {
			SC_INITIATOR = root
			SC_ATTACKER = root
			SC_DEFENDER = scope:rival_on_sight
			FATALITY = no
			FIXED = no
			LOCALE = terrain_scope
			INVALIDATION_EVENT = single_combat.1006
			OUTPUT_EVENT = bp1_yearly.5710
		}

		stress_impact = {
			brave = miniscule_stress_impact_loss
			craven = major_stress_impact_gain
			forgiving = major_stress_impact_gain
			patient = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = craven
					has_trait = forgiving
					has_trait = patient
					has_trait = compassionate
				}
			}
		}
	}

	# Back away
	option = {
		name = bp1_yearly.5709.c

		flavor = bp1_yearly.5709.c.tt

		add_prestige = medium_prestige_loss

		stress_impact = {
			brave = massive_stress_impact_gain
			wrathful = massive_stress_impact_gain
			craven = minor_stress_impact_loss
			calm = minor_stress_impact_loss
			forgiving = miniscule_stress_impact_loss
			vengeful = massive_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = brave
					has_trait = wrathful
					has_trait = vengeful
				}
			}
		}
	}
}

#Duel resolution event
bp1_yearly.5710 = {
	hidden = yes

	immediate = {
		if = { # You lose
			limit = { scope:sc_victor = scope:rival_on_sight }
			trigger_event = { id = bp1_yearly.5712 days = 1 }
		}
		else_if = { # You win
			limit = { scope:sc_victor = root }
			trigger_event = { id = bp1_yearly.5711 days = 1 }
		}
	}
}

#You won the fight!
bp1_yearly.5711 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5711.t
	desc = bp1_yearly.5711.desc
	theme = rival_relation
	left_portrait = {
		character = root
		animation = throne_room_cheer_2
	}
	right_portrait = {
		character = scope:rival_on_sight
		animation = poison
	}
	lower_left_portrait = {
		character = scope:friend_backup
	}
	lower_right_portrait = {
		character = scope:rival_friend
	}
	override_background = { reference = docks }
	cooldown = { years = 10 }

	# Kick their friend off the pier too
	option = {
		name = bp1_yearly.5711.a

		add_character_modifier = {
			modifier = triumphant_over_rival_modifier
			years = 2
		}

		progress_towards_rival_effect = {
			CHARACTER = scope:rival_on_sight
			REASON = rival_kicked_off_pier
			OPINION = default_rival_opinion
		}

		stress_impact = {
			base = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
			sadistic = minor_stress_impact_loss
			wrathful = minor_stress_impact_loss
			compassionate = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
		}
	}

	# Walk away
	option = {
		name = bp1_yearly.5711.b

		add_prestige = medium_prestige_value

		progress_towards_rival_effect = {
			CHARACTER = scope:rival_on_sight
			REASON = rival_kicked_off_pier
			OPINION = default_rival_opinion
		}

		stress_impact = {
			compassionate = minor_stress_impact_loss
			vengeful = major_stress_impact_gain
			sadistic = major_stress_impact_gain
			wrathful = major_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = sadistic
					has_trait = vengeful
					has_trait = wrathful
				}
			}
		}
	}
	after = {
		scope:rival_friend = {
			silent_disappearance_effect = yes
		}
	}
}

#You lost the fight
bp1_yearly.5712 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5712.t
	desc = bp1_yearly.5712.desc
	theme = rival_relation
	left_portrait = {
		character = root
		animation = loss_1
	}
	right_portrait = {
		character = scope:rival_on_sight
		animation = throne_room_applaud_1
	}
	lower_left_portrait = {
		character = scope:friend_backup
	}
	lower_right_portrait = {
		character = scope:rival_friend
	}
	override_background = { reference = docks }
	cooldown = { years = 10 }

	# I'll get you, rival_on_sight!
	option = {
		name = bp1_yearly.5712.a

		progress_towards_rival_effect = {
			CHARACTER = scope:rival_on_sight
			REASON = rival_fish_in_face
			OPINION = 0
		}

		add_prestige = minor_prestige_loss

		stress_impact = {
			base = minor_stress_impact_gain
			vengeful = minor_stress_impact_loss
			wrathful = miniscule_stress_impact_loss
			compassionate = medium_stress_impact_gain
			craven = major_stress_impact_gain
			content = medium_stress_impact_gain
			humble = medium_stress_impact_gain
			patient = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
		}
	}

	# Maybe I shouldn't pursue this rivalry...
	option = {
		name = bp1_yearly.5712.b

		add_character_modifier = {
			modifier = humiliated_by_rival_modifier
			years = 2
		}

		remove_relation_rival = scope:rival_on_sight

		stress_impact = {
			base = medium_stress_impact_gain
			vengeful = massive_stress_impact_gain
			sadistic = major_stress_impact_gain
			wrathful = major_stress_impact_gain
			compassionate = miniscule_stress_impact_loss
			craven = minor_stress_impact_loss
			content = miniscule_stress_impact_loss
			humble = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = sadistic
					has_trait = vengeful
					has_trait = wrathful
				}
			}
		}
	}
	after = {
		scope:rival_friend = {
			silent_disappearance_effect = yes
		}
	}
}

##################################################
# Your spouse asks for money
# by Nick Meredith
# bp1_yearly.5713
##################################################

bp1_yearly.5713 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5713.t
	desc = bp1_yearly.5713.desc
	theme = lover_relation
	left_portrait = {
		character = root
		animation = personality_cynical
	}
	right_portrait = {
		character = scope:destitute_spouse
		animation = beg
	}
	override_background = { reference = relaxing_room }
	cooldown = { years = 10 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# You have either a spouse or a lover who is available
		any_spouse = {
			is_available_ai_adult = yes
			gold <= 5
		}

		# You have enough money to afford this
		gold >= medium_gold_value
	}

	immediate = {
		random_spouse = {
			limit = {
				is_available_ai_adult = yes
			}
			save_scope_as = destitute_spouse
		}
	}

	# I'll deal with it, and also _you_
	option = {
		name = bp1_yearly.5713.a

		trigger = {
			OR = {
				has_trait = lustful
			}
		}

		add_character_modifier = {
			modifier = sated_modifier
			years = 10
		}

		remove_short_term_gold = minor_gold_value

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

		stress_impact = {
			base = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
		}
	}

	# They can have all they need, and more
	option = {
		name = bp1_yearly.5713.b

		trigger = {
			OR = {
				has_trait = generous
				has_trait = improvident
				has_trait = profligate
			}
		}

		remove_short_term_gold = medium_gold_value

		reverse_add_opinion = {
			target = scope:destitute_spouse
			modifier = grateful_opinion
			opinion = 50
		}

		stress_impact = {
			greedy = major_stress_impact_gain
			arbitrary = medium_stress_impact_gain
			compassionate = miniscule_stress_impact_loss
			generous = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = greedy
					has_trait = arbitrary
				}
			}
		}
	}

	# Leave it to me
	option = {
		name = bp1_yearly.5713.c

		remove_short_term_gold = minor_gold_value

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

		stress_impact = {
			greedy = major_stress_impact_gain
			arbitrary = medium_stress_impact_gain
			compassionate = miniscule_stress_impact_loss
			generous = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = greedy
					has_trait = arbitrary
				}
			}
		}
	}

	# How dare you try and extort me?!
	option = {
		name = bp1_yearly.5713.d

		reverse_add_opinion = {
			target = scope:destitute_spouse
			modifier = hurt_opinion
			opinion = -30
		}

		scope:destitute_spouse = {
			add_character_modifier = {
				modifier = family_troubles_modifier
				years = 10
			}
		}

		stress_impact = {
			greedy = miniscule_stress_impact_loss
			arbitrary = miniscule_stress_impact_loss
			compassionate = medium_stress_impact_gain
			generous = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = generous
				}
			}
		}
	}
}

##################################################
# Your best friend dies
# by Nick Meredith
# bp1_yearly.5714
##################################################

bp1_yearly.5714 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5714.t
	desc = bp1_yearly.5714.desc
	theme = skull # oh no
	left_portrait = {
		character = root
		animation = grief
	}
	lower_right_portrait = {
		character = scope:deceased_pal
		animation = grief
	}
	override_background = { reference = temple }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		NOT = { has_trait = incapable }

	}

	# Grieve
	option = {
		name = bp1_yearly.5714.a

		random_list = {
			40 = {
				custom_tooltip = bp1_yearly.5714.a.catharsis

				send_interface_toast = {
					title = bp1_yearly.5714.a.catharsis
					left_icon = root

					add_stress = minor_stress_loss
				}

				modifier = {
					scope:deceased_pal = {
						has_trait = disloyal
					}
					add = -5
				}
			}
			30 = {
				custom_tooltip = bp1_yearly.5714.a.sad
				send_interface_toast = {
					title = bp1_yearly.5714.a.catharsis
					left_icon = root

					add_stress = minor_stress_gain
				}

				compatibility_modifier = {
					who = root
					compatibility_target = scope:deceased_pal
					multiplier = 1
					max = 50
					min = -30
				}
			}
			25 = {
				custom_tooltip = bp1_yearly.5714.a.reallysad

				send_interface_toast = {
					title = bp1_yearly.5714.a.catharsis
					left_icon = root

					add_stress = major_stress_gain
				}

				modifier = {
					scope:deceased_pal = {
						has_trait = loyal
					}
					add = 5
				}

				compatibility_modifier = {
					who = root
					compatibility_target = scope:deceased_pal
					multiplier = 2
					max = 50
					min = -30
				}
			}
			5 = {
				custom_tooltip = bp1_yearly.5714.a.depressed
				add_trait = depressed_1

				modifier = {
					scope:deceased_pal = {
						has_trait = loyal
					}
					add = 10
				}

				compatibility_modifier = {
					who = root
					compatibility_target = scope:deceased_pal
					multiplier = 2
					max = 50
					min = -30
				}
			}
		}

		stress_impact = {
			base = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
			gregarious = minor_stress_impact_gain
			humble = minor_stress_impact_gain
			callous = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = gregarious
					has_trait = humble
				}
			}
		}
	}

	# Bottle it up
	option = {
		name = bp1_yearly.5714.b

		add_character_modifier = {
			modifier = dead_best_friend_modifier
			years = 30
		}

		stress_impact = {
			base = minor_stress_impact_gain
		}

		ai_chance = {
			base = 50
		}
	}
}

#################################
# Gibbet or gibbet?             #
# by Nick Meredith              #
# bp1_yearly.5715               #
#################################

bp1_yearly.5715 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5715.t
	desc = bp1_yearly.5715.desc
	theme = friend_relation
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:gibbet_friend
		animation = disapproval
	}
	override_background = { reference = gallows }
	cooldown = { years = 10 }

	trigger = {
		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard checks
		is_valid_for_narrow_yearly_events = yes
		is_available_at_peace_adult = yes

		# You have a friend of any level that knows your language
		OR = {
			any_relation = {
				type = best_friend
				knows_language_of_culture = root.culture
				is_available_healthy_ai_adult = yes
				is_imprisoned = no
			}
			any_relation = {
				type = friend
				knows_language_of_culture = root.culture
				is_available_healthy_ai_adult = yes
				is_imprisoned = no
			}
		}
	}

	immediate = {
		random_relation = { #Prioritise best friend
            type = best_friend
            limit = {
                knows_language_of_culture = root.culture
                is_imprisoned = no
            }
            save_scope_as = gibbet_friend
        }
        if = { #But backup regular friend
            limit = { NOT = { exists = scope:gibbet_friend } }
            random_relation = {
                type = friend
                limit = {
                    knows_language_of_culture = root.culture
                    is_imprisoned = no
                }
                save_scope_as = gibbet_friend
            }
        }
	}

	# Agree to disagree?
	option = {
		name = bp1_yearly.5715.a

		progress_towards_friend_effect = {
			REASON = friend_agree_to_disagree
			CHARACTER = scope:gibbet_friend
			OPINION = default_friend_opinion
		}

		stress_impact = {
			base = minor_stress_impact_gain
			arrogant = medium_stress_impact_gain
			stubborn = medium_stress_impact_gain
			patient = minor_stress_impact_loss
			forgiving = minor_stress_impact_loss
			vengeful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = stubborn
				}
			}
		}
	}

	# It's clearly GIB-bet and that's the end of it!
	option = {
		name = bp1_yearly.5715.b

		reverse_add_opinion = {
			target = scope:gibbet_friend
			modifier = annoyed_opinion
			opinion = -20
		}

		# Dedicated to someone. They know who they are.
		add_character_modifier = {
			modifier = descriptivist_modifier
			years = 5
		}

		stress_impact = {
			base = medium_stress_impact_loss
			arrogant = miniscule_stress_impact_loss
			stubborn = miniscule_stress_impact_loss
			patient = medium_stress_impact_gain
			forgiving = medium_stress_impact_gain
			vengeful = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = forgiving
					has_trait = patient
				}
			}
		}
	}

	# Argue about it
	option = {
		name = bp1_yearly.5715.c

		duel = {
			skill = diplomacy
			target = scope:gibbet_friend

			50 = { # You win the argument
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp1_yearly.5715.c.tt.success
				send_interface_toast = {
					title = bp1_yearly.5715.c.tt.success
					left_icon = root
					right_icon = scope:gibbet_friend

					add_stress = minor_stress_loss

					scope:gibbet_friend = {
						add_character_modifier = {
							modifier = linguistically_challenged_modifier
							years = 5
						}
					}

					reverse_add_opinion = {
						target = scope:gibbet_friend
						modifier = annoyed_opinion
						opinion = -20
					}
				}
			}

			50 = { # You lose the argument
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.5715.c.tt.failure
				send_interface_toast = {
					title = bp1_yearly.5715.c.tt.failure
					left_icon = root
					right_icon = scope:gibbet_friend

					add_stress = minor_stress_gain

					add_character_modifier = {
						modifier = linguistically_challenged_modifier
						years = 5
					}

					reverse_add_opinion = {
						target = scope:gibbet_friend
						modifier = pity_opinion
						opinion = 20
					}
				}
			}
		}

		ai_chance = {
			base = 100
		}
	}
}

##################################################
# Spouse burns impure books
# by Nick Meredith
# bp1_yearly.5716
##################################################

bp1_yearly.5716 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5716.t
	desc = {
		desc = bp1_yearly.5716.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					any_character_artifact = {
						artifact_slot_type = book
						exists = this
					}
				}
				desc = bp1_yearly.5716.yesbook
			}
			triggered_desc = {
				desc = bp1_yearly.5716.nobook
			}
		}
	}

	theme = family
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:book_burner
		animation = anger
	}
	lower_right_portrait = {
		character = scope:book_child
	}
	artifact = {
		target = scope:burned_book
		position = lower_left_portrait
	}
	override_background = { reference = relaxing_room }
	cooldown = { years = 10 }

	trigger = {
		exists = root.location.barony # In case the character is at sea

		# You are an available adult
		is_available_at_peace_adult = yes

		# You have a zealous spouse
		any_spouse = {
			is_available_ai_adult = yes
			has_trait = zealous
		}

		# You have a child
		any_child = {
			location = root.location
			is_child_of = root
			age < 16
			age > 7
		}
	}

	immediate = {
		random_spouse = {
			limit = {
				is_available_ai_adult = yes
				has_trait = zealous
			}
			save_scope_as = book_burner
		}

		random_child = {
			limit = {
				location = root.location
				is_child_of = root
				age < 16
				age > 7
			}
			save_scope_as = book_child
		}

		random_character_artifact = {
			limit = {
				exists = this
				artifact_slot_type = book
			}
			save_scope_as = burned_book
		}
	}

	# Yes, my dear! Burn them!
	option = {
		name = bp1_yearly.5716.a

		trigger = {
			has_trait = zealous
		}

		if = {
			limit = {
				exists = scope:burned_book
			}
			destroy_artifact = scope:burned_book
		}

		scope:book_child = {
			add_learning_skill = -1
		}

		reverse_add_opinion = {
			target = scope:book_burner
			modifier = pious_opinion
			opinion = 50
		}

		stress_impact = {
			base = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
		}
	}

	# Well, anything for my beloved...
	option = {
		name = bp1_yearly.5716.b

		if = {
			limit = {
				exists = scope:burned_book
			}
			destroy_artifact = scope:burned_book
		}


		scope:book_child = {
			add_learning_skill = -1
		}

		stress_impact = {
			shy = minor_stress_impact_loss
			craven = miniscule_stress_impact_loss
			brave = medium_stress_impact_gain
			content = miniscule_stress_impact_loss
			ambitious = minor_stress_impact_gain
			lazy = miniscule_stress_impact_loss
			stubborn = medium_stress_impact_gain
			honest = minor_stress_impact_gain
			cynical = major_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = brave
					has_trait = stubborn
					has_trait = cynical
				}
			}
		}
	}

	# That's enough! The child needs education!
	option = {
		name = bp1_yearly.5716.c

		reverse_add_opinion = {
			target = scope:book_burner
			modifier = angry_opinion
			opinion = -50
		}

		stress_impact = {
			shy = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			brave = miniscule_stress_impact_loss
			content = medium_stress_impact_gain
			ambitious = medium_stress_impact_gain
			lazy = medium_stress_impact_gain
			stubborn = miniscule_stress_impact_loss
			honest = miniscule_stress_impact_loss
			cynical = minor_stress_impact_loss
			zealous = major_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = zealous
					has_trait = content
					has_trait = lazy
				}
			}
		}
	}
}

##################################################
# Your best friend gets into a fight with your nemesis
# by Nick Meredith
# bp1_yearly.5717
##################################################

bp1_yearly.5717 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5717.t
	desc = bp1_yearly.5717.desc
	theme = family
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:5717_nemesis
		animation = anger
	}
	lower_center_portrait = {
		character = scope:bff_defender
	}

	override_background = { reference = tavern }
	cooldown = { years = 10 }

	trigger = {

		# You can have a drink
		drinks_alcohol_trigger = yes

		# You have a friend who can have a drink
		OR = {
			any_relation = {
				type = friend
				is_available_healthy_ai_adult = yes
				drinks_alcohol_trigger = yes
				top_liege = root.top_liege
			}
			any_relation = {
				type = best_friend
				is_available_healthy_ai_adult = yes
				drinks_alcohol_trigger = yes
				top_liege = root.top_liege
			}
		}

		# You have a rival or nemesis
		OR = {
			any_relation = {
				type = rival
				is_available_healthy_ai_adult = yes
				top_liege = root.top_liege
			}
			any_relation = {
				type = nemesis
				is_available_healthy_ai_adult = yes
				top_liege = root.top_liege
			}
		}
	}

	immediate = {
		if = { # Prioritise best friend
			limit = {
				any_relation = {
					type = best_friend
					is_available_healthy_ai_adult = yes
					drinks_alcohol_trigger = yes
					top_liege = root.top_liege
				}
			}
			random_relation = {
				type = best_friend
				limit = {
					is_available_healthy_ai_adult = yes
					drinks_alcohol_trigger = yes
					top_liege = root.top_liege
				}
				save_scope_as = bff_defender
			}
		}
		else_if = { #...but backup regular friend
			limit = {
				any_relation = {
					type = friend
					is_available_healthy_ai_adult = yes
					drinks_alcohol_trigger = yes
					top_liege = root.top_liege
				}
			}
			random_relation = {
				type = friend
				limit = {
					is_available_healthy_ai_adult = yes
					drinks_alcohol_trigger = yes
					top_liege = root.top_liege
				}
				save_scope_as = bff_defender
			}
		}

		if = { #Prioritise nemesis
			limit = {
				any_relation = {
					type = nemesis
					is_available_healthy_ai_adult = yes
					top_liege = root.top_liege
				}
			}
			random_relation = {
				type = nemesis
				limit = {
					is_available_healthy_ai_adult = yes
					top_liege = root.top_liege
				}
				save_scope_as = 5717_nemesis
			}
		}
		else_if = { #...but backup rival
			limit = {
				any_relation = {
					type = rival
					is_available_healthy_ai_adult = yes
					top_liege = root.top_liege
				}
			}
			random_relation = {
				type = rival
				limit = {
					is_available_healthy_ai_adult = yes
					top_liege = root.top_liege
				}
				save_scope_as = 5717_nemesis
			}
		}

		if = {
			limit = {
				any_realm_county = {}
			}
			random_realm_county = {
				limit = {
					holder = root
				}
				save_scope_as = tavern_county
			}
		}
		else = {
			capital_county = { save_scope_as = tavern_county }
		}

		scope:bff_defender = {
			add_trait = loyal
		}
	}

	# Hit him harder!
	option = {
		name = bp1_yearly.5717.a

		scope:bff_defender = {
			duel = {
				skill = prowess
				target = scope:5717_nemesis

				50 = { # Your friend wins
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = bp1_yearly.5717.a.tt.win
					root = {
						send_interface_toast = {
							title = bp1_yearly.5717.a.tt.win
							left_icon = root
							right_icon = scope:5717_nemesis
							scope:5717_nemesis = {
								increase_wounds_effect = { REASON = fight }
							}
						}
					}
				}

				50 = { # Your rival wins
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = bp1_yearly.5717.a.tt.lose
					root = {
						send_interface_toast = {
							title = bp1_yearly.5717.a.tt.lose
							left_icon = root
							right_icon = scope:bff_defender
							scope:bff_defender = {
								increase_wounds_effect = { REASON = fight }
							}
						}
					}
				}
			}
		}

		stress_impact = {
			craven = miniscule_stress_impact_loss
			brave = medium_stress_impact_gain
			wrathful = minor_stress_impact_gain
			lazy = miniscule_stress_impact_loss
			sadistic = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = wrathful
					has_trait = brave
				}
			}
		}
	}

	# He's not wurf it mate!
	option = {
		name = bp1_yearly.5717.b

		stress_impact = {
			craven = miniscule_stress_impact_loss
			brave = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			lazy = miniscule_stress_impact_loss
			calm = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = wrathful
					has_trait = brave
				}
			}
		}
	}

	# Out of the way, best friend, he's mine!
	option = {
		name = bp1_yearly.5717.c

		trigger = {
			can_start_single_combat_trigger = yes
		}

		flavor = bp1_yearly.5717.c.tt

		custom_tooltip = bp1_yearly.5717.c.tt.duel

		configure_start_single_combat_effect = {
			SC_INITIATOR = root
			SC_ATTACKER = root
			SC_DEFENDER = scope:5717_nemesis
			FATALITY = no
			FIXED = no
			LOCALE = alley_night
			OUTPUT_EVENT = bp1_yearly.5718
			INVALIDATION_EVENT = fp1_tbc.0102
		}

		stress_impact = {
			craven = major_stress_impact_gain
			brave = miniscule_stress_impact_loss
			wrathful = minor_stress_impact_loss
			calm = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = calm
					has_trait = craven
				}
			}
		}
	}
}

#Duel result
bp1_yearly.5718 = {
	hidden = yes

	immediate = {
		if = {
			limit = {
				root = scope:sc_victor
			}
			send_interface_toast = {
				title = bp1_yearly.5718.t.win
				left_icon = root
				right_icon = scope:5717_nemesis

				add_prestige = minor_prestige_value
			}
		}
		else = {
			send_interface_toast = {
				title = bp1_yearly.5718.t.lose
				left_icon = root
				right_icon = scope:5717_nemesis

				add_prestige = minor_prestige_loss
			}
		}
	}
}

##################################################
# Disloyal powerful vassal seizes tax
# by Nick Meredith
# bp1_yearly.5719
##################################################

bp1_yearly.5719 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5719.t
	desc = {
		desc = bp1_yearly.5719.start
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:disloyal_vassal = {
						has_dread_level_towards = {
							target = root
							level = 2
						}
					}
				}
				desc = bp1_yearly.5719.terrified
			}
			triggered_desc = {
				trigger = {
					scope:disloyal_vassal = {
						is_vassal_of = root
					}
				}
				desc = bp1_yearly.5719.normal
			}
		}
	}
	theme = vassal
	left_portrait = {
		character = root
		animation = anger
	}
	right_portrait = {
		character = scope:disloyal_vassal
		animation = dismissal
	}
	lower_center_portrait = {
		character = scope:chancellor
	}
	override_background = { reference = council_chamber }
	cooldown = { years = 10 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# You have a chancellor
		exists = cp:councillor_chancellor

		# ...and they're available
		cp:councillor_chancellor = {
			is_available_ai_adult = yes
		}

		# You are Feudal
		government_has_flag = government_is_feudal

		# You have a disloyal vassal
		any_vassal = {
			has_trait = disloyal			
			is_powerful_vassal_of = root
			trigger_if = {
				limit = {
					exists = root.cp:councillor_chancellor
				}
				NOT = {
					root.cp:councillor_chancellor = this
				}
			}
		}
	}

	immediate = {

		cp:councillor_chancellor = {
			save_scope_as = chancellor
		}

		random_vassal = {
			limit = {
				is_powerful_vassal_of = root
				has_trait = disloyal
				NOT = {
					this = scope:chancellor
				}
			}
			save_scope_as = disloyal_vassal
		}

		set_variable = {
			name = gold_value
			value = major_gold_value
		}

		pay_short_term_gold = {
			target = scope:disloyal_vassal
			gold = major_gold_value
		}
	}

	# You WILL pay it back, and you'll not trouble me again.
	option = {
		name = bp1_yearly.5719.a

		trigger = {
			scope:disloyal_vassal = {
				has_dread_level_towards = {
					target = root
					level = 2
				}
			}
		}

		add_internal_flag = special

		scope:disloyal_vassal = {
			pay_short_term_gold = {
				target = root
				gold = root.var:gold_value
			}
		}

		#Have to do this right now as dread cannot be called via trigger
		flavor = bp1_yearly.5719.a.tt.dread

		add_hook = {
			target = scope:disloyal_vassal
			type = threat_hook
		}

		stress_impact = {
			craven = medium_stress_impact_gain
			content = medium_stress_impact_gain
			humble = medium_stress_impact_gain
			paranoid = minor_stress_impact_gain
			greedy = miniscule_stress_impact_loss
			trusting = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = craven
					has_trait = content
					has_trait = humble
				}
			}
		}
	}

	# Pay it back right now!
	option = {
		name = bp1_yearly.5719.b

		trigger = {
			NOT = {
				scope:disloyal_vassal = {
					has_dread_level_towards = {
						target = root
						level = 2
					}
				}
			}
		}

		duel = {
			skill = stewardship
			target = scope:disloyal_vassal
			# Win
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp1_yearly.5719.b.tt.win
				send_interface_toast = {
					title = bp1_yearly.5719.b.tt.win
					left_icon = root
					right_icon = scope:disloyal_vassal

					scope:disloyal_vassal = {
						pay_short_term_gold = {
							target = root
							gold = root.var:gold_value
						}
					}

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

					add_prestige = minor_prestige_value
				}
			}
			# Lose
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.5719.b.tt.lose
				send_interface_toast = {
					title = bp1_yearly.5719.b.tt.lose
					left_icon = root
					right_icon = scope:disloyal_vassal

					add_prestige = medium_prestige_loss

					add_character_modifier = {
						modifier = disdained_modifier
						years = 10
					}

					progress_towards_rival_effect = {
						CHARACTER = scope:disloyal_vassal
						REASON = rival_refused_to_pay
						OPINION = 0
					}
				}
			}
		}

		stress_impact = {
			craven = medium_stress_impact_gain
			content = medium_stress_impact_gain
			humble = medium_stress_impact_gain
			paranoid = minor_stress_impact_gain
			greedy = miniscule_stress_impact_loss
			trusting = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = craven
					has_trait = content
					has_trait = humble
				}
			}
		}
	}

	# Perhaps we can come to a compromise?
	option = {
		name = bp1_yearly.5719.c

		trigger = {
			scope:disloyal_vassal = {
				vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes
			}
		}

		scope:disloyal_vassal = { vassal_contract_decrease_obligation_level = feudal_government_taxes }

		scope:disloyal_vassal = {
			pay_short_term_gold = {
				target = root
				gold = root.var:gold_value
			}
		}

		stress_impact = {
			craven = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			humble = miniscule_stress_impact_loss
			ambitious = medium_stress_impact_gain
			arrogant = major_stress_impact_gain
			greedy = medium_stress_impact_gain
			trusting = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = ambitious
					has_trait = greedy
				}
			}
		}
	}

	# ...just don't do it again!
	option = {
		name = bp1_yearly.5719.d

		reverse_add_opinion = {
	 		target = scope:disloyal_vassal
	 		modifier = pleased_opinion
	 		opinion = 40
	 	}

		reverse_add_opinion = {
	 		target = scope:chancellor
	 		modifier = weak_opinion
	 		opinion = -20
	 	}

		stress_impact = {
			craven = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			humble = miniscule_stress_impact_loss
			ambitious = medium_stress_impact_gain
			arrogant = major_stress_impact_gain
			greedy = medium_stress_impact_gain
			trusting = minor_stress_impact_loss
		}

		progress_towards_rival_effect = {
			CHARACTER = scope:disloyal_vassal
			REASON = rival_refused_to_pay
			OPINION = 0
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = ambitious
					has_trait = greedy
				}
			}
		}
	}

	after = {
		remove_variable = gold_value
	}
}

##################################################
# Rival challenges you to a test of strength
# by Nick Meredith
# bp1_yearly.5720
##################################################

bp1_yearly.5720 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5720.t
	desc = bp1_yearly.5720.desc
	theme = rival_relation
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:rival_challenger
		animation = rage
	}

	override_background = { reference = feast }
	cooldown = { years = 10 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard checks
		is_valid_for_narrow_yearly_events = yes
		is_available_at_peace_adult = yes

		# You can drink alcohol
		drinks_alcohol_trigger = yes

		# You have a rival who can too
		any_relation = {
			type = rival
			drinks_alcohol_trigger = yes
			is_available_ai_adult = yes
			top_liege = root.top_liege
			location ?= root.location
		}
	}

	immediate = {
		random_relation = {
			type = rival
			limit = {
				drinks_alcohol_trigger = yes
				is_available_ai_adult = yes
				top_liege = root.top_liege
				location ?= root.location
			}
			save_scope_as = rival_challenger
		}
	}

	# Mock your rival for only having one arm
	option = {
		name = bp1_yearly.5720.a

		trigger = {
			NOT = {
				has_trait = maimed
			}
			scope:rival_challenger = {
				has_trait = maimed
			}
		}

		flavor = bp1_yearly.5720.a.tt

		add_internal_flag = special

		give_nickname = nick_the_bully

		add_prestige = minor_prestige_loss

		reverse_add_opinion = {
	 		target = scope:rival_challenger
	 		modifier = hate_opinion
	 		opinion = -80
	 	}

		stress_impact = {
			base = medium_stress_impact_loss
			arrogant = miniscule_stress_impact_loss
			sadistic = miniscule_stress_impact_loss
			forgiving = medium_stress_impact_gain
			calm = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = calm
					has_trait = forgiving
				}
			}
		}
	}

	# Hah, hah! _rips off clothes_
	option = {
		name = bp1_yearly.5720.b

		trigger = {
			OR = { #listing out all three here so we get the tooltip
				has_trait = physique_good_1
				has_trait = physique_good_2
				has_trait = physique_good_3
				has_trait = strong
			}
			scope:rival_challenger = {
				NOR = {
					has_trait = physique_good
					has_trait = strong
				}
			}
		}

		random_list = {
			#Win
			80 = {
				desc = bp1_yearly.5720.b.tt.win

				modifier = {
					scope:rival_challenger = {
						prowess > 5
					}
					add = 5
				}

				modifier = {
					scope:rival_challenger = {
						prowess > 10
					}
					add = 5
				}

				modifier = {
					scope:rival_challenger = {
						prowess > 15
					}
					add = 5
				}

				send_interface_toast = {
					title = bp1_yearly.5720.b.tt.win
					right_icon = scope:rival_challenger
					left_icon = root

					add_prestige = medium_prestige_gain

					reverse_add_opinion = {
						target = scope:rival_challenger
						modifier = vanquished_opinion
						opinion = -30
					}

					scope:rival_challenger = {
						add_prestige = medium_prestige_loss
					}
				}
			}

			#REALLY win
			20 = {
				desc = bp1_yearly.5720.b.tt.bigwin

				send_interface_toast = {
					title = bp1_yearly.5720.b.tt.bigwin
					right_icon = scope:rival_challenger
					left_icon = root

					add_prestige = major_prestige_gain

					reverse_add_opinion = {
						target = scope:rival_challenger
						modifier = vanquished_opinion
						opinion = -50
					}

					scope:rival_challenger = {
						add_prestige = medium_prestige_loss

						increase_wounds_effect = { REASON = fight }
					}
				}
			}
		}

		give_nickname = nick_strongarm

		stress_impact = {
			base = minor_stress_impact_loss
			forgiving = minor_stress_impact_gain
			calm = minor_stress_impact_gain
			wrathful = miniscule_stress_impact_loss
			sadistic = miniscule_stress_impact_loss
			compassionate = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
		}
	}

	# Face me, rival!
	option = {
		name = bp1_yearly.5720.c

		duel = {
			skill = prowess
			target = scope:rival_challenger
			#Win
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp1_yearly.5720.c.tt.win
				send_interface_toast = {
					title = bp1_yearly.5720.c.tt.win
					right_icon = scope:rival_challenger
					left_icon = root

					add_prestige = medium_prestige_gain

					give_nickname = nick_strongarm

					reverse_add_opinion = {
						target = scope:rival_challenger
						modifier = vanquished_opinion
						opinion = -20
					}

					scope:rival_challenger = {
						add_prestige = medium_prestige_loss
					}
				}
			}
			#Lose
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.5720.c.tt.lose
				send_interface_toast = {
					title = bp1_yearly.5720.c.tt.lose
					right_icon = scope:rival_challenger
					left_icon = root

					add_prestige = medium_prestige_loss

					scope:rival_challenger = {
						add_prestige = medium_prestige_gain
					}
				}
			}
		}

		stress_impact = {
			craven = major_stress_impact_gain
			humble = medium_stress_impact_gain
			calm = medium_stress_impact_gain
			arrogant = miniscule_stress_impact_loss
			wrathful = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = humble
					has_trait = calm
				}
			}
		}
	}

	# I won't get sucked into these foolish games
	option = {
		name = bp1_yearly.5720.d

		add_prestige = minor_prestige_loss

		reverse_add_opinion = {
			target = scope:rival_challenger
			modifier = weak_opinion
			opinion = -30
	 	}

		stress_impact = {
			wrathful = major_stress_impact_gain
			ambitious = minor_stress_impact_gain
			arrogant = medium_stress_impact_gain
			craven = miniscule_stress_impact_loss
			humble = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = wrathful
					has_trait = arrogant
				}
			}
		}
	}
}

##################################################
# Make friends with another child at a bonfire
# by Nick Meredith
# bp1_yearly.5721
##################################################

bp1_yearly.5721 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5721.t
	desc = bp1_yearly.5721.desc
	theme = friend_relation
	left_portrait = {
		character = root
		animation = ecstasy
	}
	right_portrait = {
		character = scope:marshmallow_friend
		animation = happiness
	}

	override_background = { reference = bp1_bonfire }
	cooldown = { years = 10 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# You are a child
		is_adult = no

		# There is another child in your location, but they're not a sibling and not already your friend
		any_courtier_or_guest = {
			child_suitable_to_play_with_character_one_sided = {
				CHARACTER = root
			}
			child_not_infant_trigger = yes
			can_set_relation_friend_trigger = { CHARACTER = root }
			NOT = {
				is_sibling_of = root
				has_relation_friend = root
			}
		}
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				child_suitable_to_play_with_character_one_sided = {
					CHARACTER = root
				}
				child_not_infant_trigger = yes
				can_set_relation_friend_trigger = { CHARACTER = root }
				NOT = {
					is_sibling_of = root
					has_relation_friend = root
				}
			}
			save_scope_as = marshmallow_friend
		}
	}

	# Wanna be friends?
	option = {
		name = bp1_yearly.5721.a

		random_list = {
			# Become friends
			1 = {
				desc = bp1_yearly.5721.a.tt.yes

				modifier = {
					scope:marshmallow_friend = {
						opinion = {
							target = root
							value > 20
						}
					}
					add = 2
				}

				modifier = {
					scope:marshmallow_friend = {
						opinion = {
							target = root
							value > 70
						}
					}
					add = 8
				}

				set_relation_friend = { reason = friend_bonfire_bonding target = scope:marshmallow_friend }
			}

			# The other kid ain't interested
			1 = {
				desc = bp1_yearly.5721.a.tt.no

				modifier = {
					scope:marshmallow_friend = {
						opinion = {
							target = root
							value < 20
						}
					}
					add = 2
				}

				modifier = {
					scope:marshmallow_friend = {
						opinion = {
							target = root
							value < 70
						}
					}
					add = 8
				}

				add_stress = minor_stress_gain
			}
		}

		ai_chance = {
			base = 100
		}
	}

	# This was fun!
	option = {
		name = bp1_yearly.5721.b

		reverse_add_opinion = {
			target = scope:marshmallow_friend
			modifier = friendliness_opinion
			opinion = 20
	 	}

		stress_impact = {
			base = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			gluttonous = medium_stress_impact_gain
			humble = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = gluttonous
			}
		}
	}

	# Steal their marshmallow
	option = {
		name = bp1_yearly.5721.c

		flavor = bp1_yearly.5721.c.tt

		progress_towards_rival_effect = {
			CHARACTER = scope:marshmallow_friend
			REASON = rival_stolen_marshmallow
			OPINION = 0
		}

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

		stress_impact = {
			bossy = minor_stress_impact_loss
			charming = minor_stress_impact_gain
			honest = medium_stress_impact_gain
			content = medium_stress_impact_gain
			humble = medium_stress_impact_gain
			gluttonous = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
		}
	}
}

##################################################
# Your nemesis launches your pet out of a catapult
# by Nick Meredith
# bp1_yearly.5722
##################################################

bp1_yearly.5722 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5722.t
	desc = bp1_yearly.5722.desc
	theme = rival_relation
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:rival_catapulter
		animation = scheme
	}
	override_background = { reference = army_camp }
	cooldown = { years = 10 }

	trigger = {

		# DLC check.
		has_bp1_dlc_trigger = yes

		# Standard checks
		is_landed = yes
		is_valid_for_narrow_yearly_events = yes
		is_available_adult = yes

		#You have a nemesis in the same realm as you
		any_relation = {
			type = nemesis
			is_available_ai_adult = yes
			top_liege = root.top_liege
			has_trait = eccentric
		}

		#You have a cat
		any_owned_story = {
			story_type = story_cycle_pet_cat
		}
	}

	immediate = {
		random_relation = {
			type = nemesis
			limit = {
				is_available_ai_adult = yes
				top_liege = root.top_liege
			}
			save_scope_as = rival_catapulter
		}

		random_owned_story = {
			limit = {
				story_type = story_cycle_pet_cat
			}
			save_scope_as = story
		}
	}

	# Put them in the catapult and launch them after the pet
	option = {
		name = bp1_yearly.5722.a

		trigger = {
			has_trait = strong
		}

		flavor = bp1_yearly.5722.a.tt

		show_as_tooltip = {
			random_owned_story = {
				limit = { story_type = story_cycle_pet_cat }
				hidden_effect = { end_story = yes }
			}
			remove_cat_story_modifiers_effect = yes
		}

		trigger_event = {
			id = bp1_yearly.5723
			days = 1
		}

		stress_impact = {
			base = minor_stress_impact_gain
			wrathful = minor_stress_impact_loss
			sadistic = minor_stress_impact_loss
			calm = major_stress_impact_gain
			compassionate = major_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = calm
				}
			}
		}
	}

	# Nooooo! Mittens!
	option = {
		name = bp1_yearly.5722.b

		show_as_tooltip = {
			random_owned_story = {
				limit = { story_type = story_cycle_pet_cat }
				hidden_effect = { end_story = yes }
			}
			remove_cat_story_modifiers_effect = yes
		}

		hidden_effect = {
			random_list = {
				80 = { #Mittens cops it
					random_owned_story = {
						limit = { story_type = story_cycle_pet_cat }
						hidden_effect = { end_story = yes }
					}
					remove_cat_story_modifiers_effect = yes
				}
				20 = { #Mittens survives
					add_character_flag = mittens_survives_flag
				}
			}
		}

		stress_impact = {
			base = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}

	# I'll kill you!
	option = {
		name = bp1_yearly.5722.c

		trigger = {
			NOT = {
				has_character_flag = mittens_survives_flag
			}
		}

		show_as_tooltip = {
			random_owned_story = {
				limit = { story_type = story_cycle_pet_cat }
				hidden_effect = { end_story = yes }
			}
			remove_cat_story_modifiers_effect = yes
		}

		hidden_effect = {
			random_list = {
				80 = { #Mittens cops it
					random_owned_story = {
						limit = { story_type = story_cycle_pet_cat }
						hidden_effect = { end_story = yes }
					}
					remove_cat_story_modifiers_effect = yes
				}
				20 = { #Mittens survives
					add_character_flag = mittens_survives_flag
				}
			}
		}

		add_character_modifier = {
			modifier = cat_revenge_modifier
			years = 10
		}

		stress_impact = {
			base = major_stress_impact_gain
			vengeful = medium_stress_impact_loss
			wrathful = minor_stress_impact_loss
			sadistic = minor_stress_impact_loss
			calm = major_stress_impact_gain
			compassionate = major_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = generous
				}
			}
		}
	}

	after = {
		if = {
			limit = {
				has_character_flag = mittens_survives_flag
			}
			trigger_event = {
				id = bp1_yearly.5724
				days = 5
			}
		}
	}
}

#Launch your nemesis out of the catapult
bp1_yearly.5723 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5723.t
	desc = bp1_yearly.5723.desc
	theme = pet
	left_portrait = {
		character = root
		animation = personality_vengeful
	}
	right_portrait = {
		character = scope:rival_catapulter
		animation = beg
	}

	override_background = { reference = army_camp }

	# Bwoing!
	option = {
		name = bp1_yearly.5723.a

		show_as_tooltip = {
			random_owned_story = {
				limit = { story_type = story_cycle_pet_cat }
				hidden_effect = { end_story = yes }
			}
			remove_cat_story_modifiers_effect = yes
		}

		hidden_effect = {
			random_list = {
				80 = { #Mittens cops it
					random_owned_story = {
						limit = { story_type = story_cycle_pet_cat }
						hidden_effect = { end_story = yes }
					}
					remove_cat_story_modifiers_effect = yes
				}
				20 = { #Mittens survives
					add_character_flag = mittens_survives_flag
				}
			}
		}

		random_list = {
			1 = { #They die! Serves them right!
				send_interface_toast = {
					right_icon = scope:rival_catapulter
					left_icon = root

					title = bp1_yearly.5723.a

					scope:rival_catapulter = {
						death = {
							killer = ROOT
							death_reason = death_launched_out_of_catapult
						}
					}
				}
			}
			3 = { #They are seriously wounded
				send_interface_toast = {
					right_icon = scope:rival_catapulter
					left_icon = root

					title = bp1_yearly.5723.a

					scope:rival_catapulter = {
						apply_maimed_trait_and_modifier_effect = yes
					}
				}
			}
			5 = { #They receive minor wounds
				send_interface_toast = {
					right_icon = scope:rival_catapulter
					left_icon = root

					title = bp1_yearly.5723.a

					scope:rival_catapulter = {
						increase_wounds_effect = { REASON = fall }
					}
				}
			}
		}

		stress_impact = {
			base = minor_stress_impact_loss
			wrathful = minor_stress_impact_loss
			sadistic = medium_stress_impact_loss
			calm = major_stress_impact_gain
			compassionate = major_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = calm
				}
			}
		}
	}

	# I'll let you off; just this once...
	option = {
		name = bp1_yearly.5723.b

		show_as_tooltip = {
			random_owned_story = {
				limit = { story_type = story_cycle_pet_cat }
				hidden_effect = { end_story = yes }
			}
			remove_cat_story_modifiers_effect = yes
		}

		hidden_effect = {
			random_list = {
				80 = { #Mittens cops it
					random_owned_story = {
						limit = { story_type = story_cycle_pet_cat }
						hidden_effect = { end_story = yes }
					}
					remove_cat_story_modifiers_effect = yes
				}
				20 = { #Mittens survives
					add_character_flag = mittens_survives_flag
				}
			}
		}

		stress_impact = {
			wrathful = medium_stress_impact_gain
			sadistic = major_stress_impact_gain
			calm = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}

		add_hook = {
			target = scope:rival_catapulter
			type = indebted_hook
		}

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

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = calm
				}
			}
		}
	}
}

#Mittens! You're alive!
bp1_yearly.5724 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5724.t
	desc = bp1_yearly.5724.desc
	theme = pet
	left_portrait = {
		character = root
		animation = ecstasy
	}

	override_background = { reference = relaxing_room }

	# You cuddle the cat
	option = {
		name = bp1_yearly.5724.a

		hidden_effect = {
			remove_character_modifier = cat_revenge_modifier
		}

		stress_impact = {
			base = medium_stress_impact_loss
		}

		ai_chance = {
			base = 100
		}
	}

	# You'll never let them go again!
	option = {
		name = bp1_yearly.5724.b

		stress_impact = {
			base = minor_stress_impact_loss
		}

		hidden_effect = {
			remove_character_modifier = cat_revenge_modifier
		}

		add_character_modifier = {
			modifier = cat_survived_modifier
			years = 5
		}

		ai_chance = {
			base = 100
		}
	}

	after = {
		remove_character_flag = mittens_survives_flag
	}
}

##################################################
# You search for Khutulun
# by Nick Meredith
# bp1_yearly.5725-27
##################################################

bp1_yearly.5725 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5725.t
	desc = bp1_yearly.5725.desc
	theme = marriage
	left_portrait = {
		character = root
		animation = personality_honorable
	}
	right_portrait = {
		character = scope:matchmaker_courtier
		animation = happiness
	}
	override_background = { reference = tavern }

	cooldown = { years = 25 }

	trigger = {

		# DLC trigger
		has_bp1_dlc_trigger = yes

		# Standard checks
		is_valid_for_narrow_yearly_events = yes

		# You're not married
		is_married = no

		# ...but you could be
		can_marry_trigger = yes

		# You have an available courtier
		any_courtier_or_guest = {
			is_available_ai_adult = yes
		}

		# You yourself are an adult
		is_adult = yes
	}
	immediate = {
		random_courtier_or_guest = {
			limit = {
				is_available_ai_adult = yes
			}
			save_scope_as = matchmaker_courtier
		}
		create_character = {
			location = root.location
			faith = root.faith
			culture = root.culture
			random_traits = yes

			trait = lifestyle_mystic
			trait = adventurer
			trait = lifestyle_blademaster
			trait = strong
			trait = athletic

			prowess = { 10 20 }
			martial = { 15 25 }
			age = { 18 35 }

			gender_female_chance = root.marriage_gender_adjusted_female_chance

			save_scope_as = khutulun
		}
		hidden_effect = {
			scope:khutulun = {
				add_trait_xp = {
					trait = lifestyle_blademaster
					value = 50
	}
			}
		}
	}
	# Let's try and find them
	option = {
		name = bp1_yearly.5725.a

		trigger_event = {
			id = bp1_yearly.5726
			days = 7
		}

		stress_impact = {
			ambitious = miniscule_stress_impact_loss
			lazy = medium_stress_impact_gain
			chaste = medium_stress_impact_gain
			lustful = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = chaste
				}
			}
		}
	}

	# I don't need a spouse THAT badly...
	option = {
		name = bp1_yearly.5725.b

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

		stress_impact = {
			ambitious = medium_stress_impact_gain
			lazy = miniscule_stress_impact_loss
			chaste = miniscule_stress_impact_loss
			lustful = medium_stress_impact_gain
		}

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

# You search for Khutulun
bp1_yearly.5726 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5726.t
	desc = bp1_yearly.5726.desc
	theme = marriage
	left_portrait = {
		character = root
		animation = admiration
	}
	right_portrait = {
		character = scope:khutulun
		animation = flirtation
	}
	lower_center_portrait = {
		character = scope:matchmaker_courtier
	}
	override_background = { reference = wilderness }

	immediate = {
		random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender }
	}

	# I'll try my hand...
	option = {
		name = bp1_yearly.5726.a

		duel = {
			skill = prowess
			target = scope:khutulun
			#Win
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = bp1_yearly.5726.a.tt.win

				add_prestige = medium_prestige_gain

				reverse_add_opinion = {
					target = scope:khutulun
					modifier = impressed_opinion
					opinion = 30
				}

				trigger_event = {
					id = bp1_yearly.5727
					days = 1
				}
			}
			#Lose
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.5726.a.tt.lose
				send_interface_toast = {
					title = bp1_yearly.5726.a.tt.lose
					right_icon = scope:khutulun
					left_icon = root

					remove_short_term_gold = major_gold_value

					add_prestige = medium_prestige_loss

					scope:khutulun = {
						add_prestige = medium_prestige_gain
						silent_disappearance_effect = yes
					}
				}
			}
		}

		stress_impact = {
			craven = major_stress_impact_gain
			brave = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			diligent = miniscule_stress_impact_loss
			chaste = minor_stress_impact_gain
			content = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = content
					has_trait = craven
				}
			}
		}
	}

	# I don't need a spouse THAT badly...
	option = {
		name = bp1_yearly.5726.b

		add_prestige = minor_prestige_loss

		# Remove Khutulun to ensure you can't just choose to marry them anyway
		scope:khutulun = { silent_disappearance_effect = yes }

		stress_impact = {
			brave = major_stress_impact_gain
			craven = miniscule_stress_impact_loss
			content = miniscule_stress_impact_loss
			lazy = miniscule_stress_impact_loss
			lustful = minor_stress_impact_gain
			ambitious = medium_stress_impact_gain
		}

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

# You get the option to be married
bp1_yearly.5727 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5727.t
	desc = bp1_yearly.5727.desc
	theme = marriage
	left_portrait = {
		character = root
		animation = admiration
	}
	right_portrait = {
		character = scope:khutulun
		animation = flirtation
	}
	lower_center_portrait = {
		character = scope:matchmaker_courtier
	}
	override_background = { reference = wilderness }

	# Well, a deal's a deal!
	option = {
		name = bp1_yearly.5727.a

		marry = scope:khutulun

		reverse_add_opinion = {
			target = scope:khutulun
			modifier = impressed_opinion
			opinion = 30
		}

		stress_impact = {
			craven = major_stress_impact_gain
			brave = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			diligent = miniscule_stress_impact_loss
			chaste = minor_stress_impact_gain
			content = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = content
					has_trait = craven
				}
			}
		}
	}

	# Grand Wedding promise
	option = {
		trigger = {
			has_ep2_dlc_trigger = yes
			is_landed = yes
		}
		name = bp1_yearly.5727.c
		create_grand_wedding_betrothal = {
			SPOUSE_1 = root
			SPOUSE_2 = scope:khutulun
			HOST = root
			PROMISEE = scope:khutulun
		}
		reverse_add_opinion = {
			target = scope:khutulun
			modifier = impressed_opinion
			opinion = 50
		}

		stress_impact = {
			craven = major_stress_impact_gain
			brave = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			diligent = miniscule_stress_impact_loss
			chaste = minor_stress_impact_gain
			content = medium_stress_impact_gain
		}

		ai_chance = {
			base = 80
			modifier = {
				factor = 0
				OR = {
					has_trait = content
					has_trait = craven
				}
			}
		}
	}

	# Nah, I just did it to prove I could
	option = {
		name = bp1_yearly.5727.b

		add_prestige = medium_prestige_gain

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

		# Let's remove the khutulun after the reverse opinion to avoid an error
		scope:khutulun = { silent_disappearance_effect = yes }

		stress_impact = {
			lustful = medium_stress_impact_gain
			arrogant = minor_stress_impact_loss
			stubborn = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lustful
					has_trait = stubborn
				}
			}
		}
	}
}

##################################################
# Your rival steals and burns one of your artifacts
# by Nick Meredith
# bp1_yearly.5728
##################################################

bp1_yearly.5728 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5728.t
	desc = bp1_yearly.5728.desc
	theme = rival_relation
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:rival_burner
		animation = scheme
	}
	override_background = { reference = bp1_bonfire }

	trigger = {

		# DLC trigger
		has_bp1_dlc_trigger = yes

		# Standard checks
		is_valid_for_narrow_yearly_events = yes

		# You can duel
		can_start_single_combat_trigger = yes

		# You have a rival
		any_relation = {
			type = rival
			is_available_ai_adult = yes
			top_liege = root.top_liege
		}

		# You have an artifact that isn't very important
		any_character_artifact = {
			OR = {
				rarity = common
				rarity = masterwork
			}
		}
	}

	immediate = {
		random_character_artifact = {
			limit = {
				OR = {
					rarity = common
					rarity = masterwork
				}
			}
			save_scope_as = burned_artifact
		}

		random_relation = {
			type = rival
			limit = {
				is_available_ai_adult = yes
			}
			save_scope_as = rival_burner
		}
	}

	# You fiend!
	option = {
		name = bp1_yearly.5728.a

		destroy_artifact = scope:burned_artifact

		stress_impact = {
			base = medium_stress_impact_gain
			ambitious = miniscule_stress_impact_loss
			lazy = medium_stress_impact_gain
			chaste = medium_stress_impact_gain
			lustful = miniscule_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = chaste
				}
			}
		}
	}

	# Duel them for the artifact
	option = {
		name = bp1_yearly.5728.b

		scope:burned_artifact = {
			set_owner = scope:rival_burner
		}

		custom_tooltip = bp1_yearly.5728.b.tt.duel

		configure_start_single_combat_effect = {
			SC_INITIATOR = root
			SC_ATTACKER = root
			SC_DEFENDER = scope:rival_burner
			FATALITY = no
			FIXED = no
			LOCALE = terrain_scope
			OUTPUT_EVENT = bp1_yearly.5729
			INVALIDATION_EVENT = fp1_tbc.0102
		}

		stress_impact = {
			craven = major_stress_impact_gain
			brave = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
			diligent = miniscule_stress_impact_loss
			chaste = minor_stress_impact_gain
			content = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = content
					has_trait = craven
				}
			}
		}
	}
}

#Duel result
bp1_yearly.5729 = {
	hidden = yes
	immediate = {
		if = {
			limit = {
				root = scope:sc_victor
			}

			trigger_event = {
				id = bp1_yearly.5730
				days = 1
			}
		}
		else = {
			send_interface_toast = {
				title = bp1_yearly.5729.tt.lose
				left_icon = root
				right_icon = scope:rival_burner

				destroy_artifact = scope:burned_artifact

				add_prestige = minor_prestige_loss
			}
		}
	}
}


# You win the duel
bp1_yearly.5730 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5730.t
	desc = bp1_yearly.5730.desc
	theme = rival_relation
	left_portrait = {
		character = root
		animation = marshal
	}
	right_portrait = {
		character = scope:rival_burner
		animation = loss_1
	}
	override_background = { reference = bp1_bonfire }

	# Let this be a lesson to you
	option = {
		name = bp1_yearly.5730.a

		scope:burned_artifact = {
			set_owner = root
		}

		add_prestige = minor_prestige_gain

		stress_impact = {
			base = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = chaste
				}
			}
		}
	}

	# Take it, then.
	option = {
		name = bp1_yearly.5730.b

		scope:burned_artifact = {
			set_owner = scope:rival_burner

			hidden_effect = {
				add_artifact_modifier = artifact_prowess_2_negative_modifier
				add_artifact_modifier = artifact_monthly_prestige_penalty_modifier
			}
		}

		custom_tooltip = bp1_yearly.5730.b.tt

		add_prestige = medium_prestige_gain

		stress_impact = {
			base = minor_stress_impact_loss
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = content
					has_trait = craven
				}
			}
		}
	}
}

##################################################
# You make a perfume
# by Nick Meredith
# bp1_yearly.5800-5805
##################################################

bp1_yearly.5800 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5800.t
	desc = bp1_yearly.5800.desc
	theme = physical_health
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:surprised_sniffer
		animation = personality_cynical
	}
	override_background = { reference = bedchamber }
	cooldown = { years = 50 }

	trigger = {

		# Standard check
		is_valid_for_narrow_yearly_events = yes

		# You have either a soulmate or a lover
		OR = {
			any_relation = {
				type = soulmate
				is_available_healthy_ai_adult = yes
			}
			any_relation = {
				type = lover
				is_available_healthy_ai_adult = yes
			}
		}
	}

	immediate = {
        random_relation = { #Prioritise Soulmate
            type = soulmate
            limit = {
                is_available_healthy_ai_adult = yes
            }
            save_scope_as = surprised_sniffer
        }
        if = { #But backup regular friend
            limit = { NOT = { exists = scope:surprised_sniffer } }
            random_relation = {
                type = lover
                limit = {
                    is_available_healthy_ai_adult = yes
                }
                save_scope_as = surprised_sniffer
            }
        }
    }

	# Yes, I'd like to smell good!
	option = {
		name = bp1_yearly.5800.a

		custom_tooltip = bp1_yearly.5800.a.tt

		trigger_event = {
			id = bp1_yearly.5801
			days = 5
		}

		set_variable = {
			name = perfume_tier_one
			value = 0
		}
		set_variable = {
			name = perfume_tier_two
			value = 0
		}
		set_variable = {
			name = perfume_tier_three
			value = 0
		}
		set_variable = {
			name = perfume_tier_four
			value = 0
		}

		stress_impact = {
			arrogant = major_stress_impact_gain
			humble = miniscule_stress_impact_loss
			trusting = miniscule_stress_impact_loss
			paranoid = medium_stress_impact_gain
			callous = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = paranoid
				}
			}
		}
	}

	# Nah, I'm good with the STANK
	option = {
		name = bp1_yearly.5800.b

		add_character_modifier = {
			modifier = stanky_modifier
			years = 10
		}

		stress_impact = {
			humble = medium_stress_impact_gain
			trusting = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = humble
					has_trait = trusting
					short_term_gold >= medium_gold_value
				}
			}
		}
	}
}

bp1_yearly.5801 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5801.t
	desc = bp1_yearly.5801.desc
	theme = physical_health
	left_portrait = {
		character = root
		animation = boredom
	}
	right_portrait = {
		character = scope:surprised_sniffer
		animation = happiness
	}
	artifact = {
		target = scope:perfume_bottle
		position = lower_center_portrait
		trigger = { exists = scope:perfume_bottle }
	}
	override_background = { reference = alley_day }

	trigger = {

		# Standard check
		is_valid_for_narrow_yearly_events = yes

	}

	immediate = {
		create_artifact = {
			name = perfume_bottle
			description = perfume_bottle_description
			type = miscellaneous
			visuals = flask
			modifier = artifact_attraction_opinion_2_modifier
			creator = root
			rarity = famed
			save_scope_as = perfume_bottle
		}
	}

	# Add a fig
	option = {
		name = bp1_yearly.5801.a

		remove_short_term_gold = tiny_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5801.fig
		}

		trigger_event = {
			id = bp1_yearly.5802
			days = 5
		}

		set_variable = {
			name = perfume_tier_one
			value = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Add some mint
	option = {
		name = bp1_yearly.5801.b

		remove_short_term_gold = minor_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5801.mint
		}

		trigger_event = {
			id = bp1_yearly.5802
			days = 5
		}

		set_variable = {
			name = perfume_tier_two
			value = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Add some lemon
	option = {
		name = bp1_yearly.5801.c

		remove_short_term_gold = medium_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5801.lemon
		}

		trigger_event = {
			id = bp1_yearly.5802
			days = 5
		}

		set_variable = {
			name = perfume_tier_three
			value = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Add some pomegranate
	option = {
		name = bp1_yearly.5801.d

		set_variable = {
			name = perfume_tier_four
			value = 1
		}

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5801.pomegranate
		}

		remove_short_term_gold = major_gold_value

		trigger_event = {
			id = bp1_yearly.5802
			days = 5
		}

		stress_impact = {
			greedy = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = greedy
			}
		}
	}
}

bp1_yearly.5802 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5802.t
	desc = bp1_yearly.5802.desc
	theme = physical_health
	left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:surprised_sniffer
		animation = happiness
	}
	artifact = {
		target = scope:perfume_bottle
		position = lower_center_portrait
		trigger = { exists = scope:perfume_bottle }
	}
	override_background = { reference = market }

	trigger = {

		# Standard check
		is_valid_for_narrow_yearly_events = yes

	}

	# Cardamom
	option = {
		name = bp1_yearly.5802.a

		remove_short_term_gold = tiny_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5802.cardamom
		}

		trigger_event = {
			id = bp1_yearly.5803
			days = 7
		}

		change_variable = {
			name = perfume_tier_one
			add = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Nutmeg
	option = {
		name = bp1_yearly.5802.b

		remove_short_term_gold = minor_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5802.nutmeg
		}

		trigger_event = {
			id = bp1_yearly.5803
			days = 7
		}

		change_variable = {
			name = perfume_tier_two
			add = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Cinnamon
	option = {
		name = bp1_yearly.5802.c

		remove_short_term_gold = medium_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5802.cinnamon
		}

		trigger_event = {
			id = bp1_yearly.5803
			days = 7
		}

		change_variable = {
			name = perfume_tier_three
			add = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Frankincense
	option = {
		name = bp1_yearly.5802.d

		remove_short_term_gold = major_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5802.frankincense
		}

		trigger_event = {
			id = bp1_yearly.5803
			days = 7
		}

		change_variable = {
			name = perfume_tier_four
			add = 1
		}

		stress_impact = {
			greedy = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = greedy
			}
		}
	}
}

bp1_yearly.5803 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5803.t
	desc = bp1_yearly.5803.desc
	theme = physical_health
	left_portrait = {
		character = root
		animation = stress
	}
	right_portrait = {
		character = scope:surprised_sniffer
		animation = personality_compassionate
	}
	artifact = {
		target = scope:perfume_bottle
		position = lower_center_portrait
		trigger = { exists = scope:perfume_bottle }
	}
	override_background = { reference = wilderness_forest }

	trigger = {

		# Standard check
		is_valid_for_narrow_yearly_events = yes

	}

	# Oak
	option = {
		name = bp1_yearly.5803.a

		remove_short_term_gold = tiny_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5803.oak
		}

		trigger_event = {
			id = bp1_yearly.5804
			days = 10
		}

		change_variable = {
			name = perfume_tier_one
			add = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Resin
	option = {
		name = bp1_yearly.5803.b

		remove_short_term_gold = minor_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5803.resin
		}

		trigger_event = {
			id = bp1_yearly.5804
			days = 10
		}

		change_variable = {
			name = perfume_tier_two
			add = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Sandalwood
	option = {
		name = bp1_yearly.5803.c

		remove_short_term_gold = medium_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5803.sandalwood
		}

		trigger_event = {
			id = bp1_yearly.5804
			days = 10
		}

		change_variable = {
			name = perfume_tier_three
			add = 1
		}

		ai_chance = {
			base = 100
		}
	}

	# Oud
	option = {
		name = bp1_yearly.5803.d

		remove_short_term_gold = major_gold_value

		scope:perfume_bottle = {
			set_artifact_description = bp1_yearly.5803.oud
		}

		change_variable = {
			name = perfume_tier_four
			add = 1
		}

		trigger_event = {
			id = bp1_yearly.5804
			days = 10
		}

		stress_impact = {
			greedy = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = greedy
			}
		}
	}
}

#Special addition - expensive
bp1_yearly.5804 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5804.t
	desc = bp1_yearly.5804.desc
	theme = physical_health
	left_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:surprised_sniffer
		animation = personality_rational
	}
	artifact = {
		target = scope:perfume_bottle
		position = lower_center_portrait
		trigger = { exists = scope:perfume_bottle }
	}
	override_background = { reference = docks }

	trigger = {

		# Standard check
		is_valid_for_narrow_yearly_events = yes

	}

	# Vetiver
	option = {
		name = bp1_yearly.5804.a

		custom_tooltip = bp1_yearly.5804.a.tt

		add_character_flag = vetiver_flag

		remove_short_term_gold = medium_gold_value

		trigger_event = {
			id = bp1_yearly.5805
			days = 14
		}

		ai_chance = {
			base = 100
		}
	}

	# Camphor
	option = {
		name = bp1_yearly.5804.b

		custom_tooltip = bp1_yearly.5804.b.tt

		add_character_flag = camphor_flag

		remove_short_term_gold = major_gold_value

		trigger_event = {
			id = bp1_yearly.5805
			days = 14
		}

		ai_chance = {
			base = 100
		}
	}

	# Ambergris
	option = {
		name = bp1_yearly.5804.c

		custom_tooltip = bp1_yearly.5804.c.tt

		remove_short_term_gold = massive_gold_value

		add_character_flag = ambergris_flag

		trigger_event = {
			id = bp1_yearly.5805
			days = 14
		}

		ai_chance = {
			base = 100
		}
	}

	# No thanks!
	option = {
		name = bp1_yearly.5804.d

		add_character_flag = blended_flag

		trigger_event = {
			id = bp1_yearly.5805
			days = 14
		}

		stress_impact = {
			greedy = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = greedy
			}
		}
	}
}

bp1_yearly.5805 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.5805.t
	desc = bp1_yearly.5805.desc
	theme = physical_health
	left_portrait = {
		character = root
		animation = ecstasy
	}
	right_portrait = {
		character = scope:surprised_sniffer
		animation = admiration
	}
	artifact = {
		target = scope:perfume_bottle
		position = lower_center_portrait
		trigger = { exists = scope:perfume_bottle }
	}
	override_background = { reference = study }

	immediate = {
		hidden_effect = {
			#Tier One
			if = {
				limit = {
					has_variable = perfume_tier_one
					var:perfume_tier_one = 1
				}
				scope:perfume_bottle = {
					add_tier_one_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_one
					var:perfume_tier_one = 2
				}
				scope:perfume_bottle = {
					add_tier_one_perfume_effect = yes
					add_tier_one_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_one
					var:perfume_tier_one = 3
				}
				scope:perfume_bottle = {
					add_tier_one_perfume_effect = yes
					add_tier_one_perfume_effect = yes
					add_tier_one_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_one
					var:perfume_tier_one = 4
				}
				scope:perfume_bottle = {
					add_tier_one_perfume_effect = yes
					add_tier_one_perfume_effect = yes
					add_tier_one_perfume_effect = yes
					add_tier_one_perfume_effect = yes
				}
			}
			#Tier Two
			if = {
				limit = {
					has_variable = perfume_tier_two
					var:perfume_tier_two = 1
				}
				scope:perfume_bottle = {
					add_tier_two_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_two
					var:perfume_tier_two = 2
				}
				scope:perfume_bottle = {
					add_tier_two_perfume_effect = yes
					add_tier_two_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_two
					var:perfume_tier_two = 3
				}
				scope:perfume_bottle = {
					add_tier_two_perfume_effect = yes
					add_tier_two_perfume_effect = yes
					add_tier_two_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_two
					var:perfume_tier_two = 4
				}
				scope:perfume_bottle = {
					add_tier_two_perfume_effect = yes
					add_tier_two_perfume_effect = yes
					add_tier_two_perfume_effect = yes
					add_tier_two_perfume_effect = yes
				}
			}
			#Tier Three
			if = {
				limit = {
					has_variable = perfume_tier_three
					var:perfume_tier_three = 1
				}
				scope:perfume_bottle = {
					add_tier_three_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_three
					var:perfume_tier_three = 2
				}
				scope:perfume_bottle = {
					add_tier_three_perfume_effect = yes
					add_tier_three_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_three
					var:perfume_tier_three = 3
				}
				scope:perfume_bottle = {
					add_tier_three_perfume_effect = yes
					add_tier_three_perfume_effect = yes
					add_tier_three_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_three
					var:perfume_tier_three = 4
				}
				scope:perfume_bottle = {
					add_tier_three_perfume_effect = yes
					add_tier_three_perfume_effect = yes
					add_tier_three_perfume_effect = yes
					add_tier_three_perfume_effect = yes
					set_artifact_rarity = illustrious
				}
			}
			#Tier Four
			if = {
				limit = {
					has_variable = perfume_tier_four
					var:perfume_tier_four = 1
				}
				scope:perfume_bottle = {
					add_tier_four_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_four
					var:perfume_tier_four = 2
				}
				scope:perfume_bottle = {
					add_tier_four_perfume_effect = yes
					add_tier_four_perfume_effect = yes
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_four
					var:perfume_tier_four = 3
				}
				scope:perfume_bottle = {
					add_tier_four_perfume_effect = yes
					add_tier_four_perfume_effect = yes
					add_tier_four_perfume_effect = yes
					set_artifact_rarity = illustrious
				}
			}
			else_if = {
				limit = {
					has_variable = perfume_tier_four
					var:perfume_tier_four = 4
				}
				scope:perfume_bottle = {
					add_tier_four_perfume_effect = yes
					add_tier_four_perfume_effect = yes
					add_tier_four_perfume_effect = yes
					add_tier_four_perfume_effect = yes
					set_artifact_rarity = illustrious
				}
			}
		}

		hidden_effect = {
			#Added Vetiver
			if = {
				limit = {
					has_character_flag = vetiver_flag
				}
				scope:perfume_bottle = {
					add_vetiver_effect = yes
					set_artifact_description = bp1_yearly.5805.vetiver
				}
			}
			else_if = { #Added Camphor
				limit = {
					has_character_flag = camphor_flag
				}
				scope:perfume_bottle = {
					add_camphor_effect = yes
					set_artifact_description = bp1_yearly.5805.camphor
				}
			}
			else_if = { #Added Ambergris
				limit = {
					has_character_flag = ambergris_flag
				}
				scope:perfume_bottle = {
					add_ambergris_effect = yes
					set_artifact_description = bp1_yearly.5805.ambergris
				}
			}
			else_if = { #Added nothing
				limit = {
					has_character_flag = blended_flag
				}
				scope:perfume_bottle = {
					set_artifact_description = bp1_yearly.5805.blended
				}
			}
		}
	}

	# Keep it
	option = {
		name = bp1_yearly.5805.a

		stress_impact = {
			greedy = miniscule_stress_impact_loss
			generous = minor_stress_impact_gain
		}

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

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = generous
			}
		}
	}

	# Give it to lover
	option = {
		name = bp1_yearly.5805.b

		scope:perfume_bottle = {
			set_owner = scope:surprised_sniffer
		}

		reverse_add_opinion = {
			target = scope:surprised_sniffer
			modifier = grateful_opinion
			opinion = 50
		}

		stress_impact = {
			generous = miniscule_stress_impact_loss
			greedy = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = greedy
			}
		}
	}
}

#################################
# Coveted Claim                 #
# by Joe Parkin                 #
# bp1_yearly.8000               #
#################################

# Scopes:
# title - bp1_8000_claimed_title - rival's claimed title
# character - bp1_8000_new_rival - new rival of root
# character - bp1_8000_informer - courtier of root

# Find a suitable claimant to become a rival
scripted_trigger bp1_yearly_8000_claimant_trigger = {
	is_ai = yes
	is_adult = yes
	is_landed = yes
	is_imprisoned = no
	# Shouldn't be intimidated
	has_dread_level_towards = {
		target = root
		level < 1
	}
	# Shouldn't be friendly
	has_any_good_relationship_with_root_trigger = no
	NOR = {
		# only excluding existing rivals, not potential
		has_relation_rival = root
		has_relation_victim = root
		has_relation_bully = root
		# Shouldn't be family or allies
		is_close_family_of = root
		is_consort_of = root
		is_allied_to = root
		# Shouldn't be satisfied
		has_trait = content
	}
}

bp1_yearly.8000 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8000.t
	desc = {
		desc = bp1_yearly.8000.desc
		# Realm of claimant
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						scope:bp1_8000_new_rival.top_liege = root
						scope:bp1_8000_new_rival = { is_close_or_extended_family_of = root }
					}
				}
				desc = bp1_yearly.8000.desc_vassal
			}
			desc = bp1_yearly.8000.desc_foreign
		}
		# Number of claims
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:bp1_8000_new_rival = {
						any_claim = {
							count > 1
							holder = root
						}
					}
				}
				desc = bp1_yearly.8000.desc_multi
			}
			desc = bp1_yearly.8000.desc_single
		}
	}
	theme = unfriendly
	override_background = { reference = corridor_day }
	cooldown = { years = 10 }
	orphan = no # called by on_yearly_events
	right_portrait = {
		character = root
		animation = eavesdrop
	}
	left_portrait = {
		character = scope:bp1_8000_informer
		animation = throne_room_conversation_1
	}
	lower_right_portrait = scope:bp1_8000_new_rival

	trigger = {
		has_dlc_feature = friends_and_foes
		is_adult = yes
		# Any title claimed by a non-friend/rival/family/ally ai adult who is not intimidated
		any_held_title = {
			any_claimant = { bp1_yearly_8000_claimant_trigger = yes }
		}
	}

	weight_multiplier = {
		base = 1
	}

	immediate = {
		save_scope_as = actor
		# Find title
		random_held_title = {
			# Prefer strong claimants
			limit = {
				any_claimant = {
					has_strong_claim_on = prev
					bp1_yearly_8000_claimant_trigger = yes
				}
			}
			alternative_limit = {
				any_claimant = { bp1_yearly_8000_claimant_trigger = yes }
			}
			weight = {
				# Prefer primary title
				modifier = {
					this = root.primary_title
					factor = 4
				}
				# Prefer higher tier titles
				modifier = { factor = tier }
			}
			save_scope_as = bp1_8000_claimed_title
			every_claimant = {
				limit = { bp1_yearly_8000_claimant_trigger = yes }
				add_to_list = bp1_8000_potential_rival_list
			}
		}
		# Find claimant to rival
		random_in_list = {
			list = bp1_8000_potential_rival_list
			limit = { has_strong_claim_on = scope:bp1_8000_claimed_title } # Prefer strong claimants
			alternative_limit = { always = yes }
			weight = {
				# Prefer potential rivals
				modifier = {
					factor = 10
					has_relation_potential_rival = root
				}
				# Prefer powerful vassals
				modifier = {
					factor = 5
					is_powerful_vassal_of = root
				}
				# Prefer notables
				modifier = {
					factor = 2
					is_councillor_of = root
				}
				 # Prefer non-fans
				modifier = {
					factor = 2
					opinion = {
						target = root
						value < 0
					}
				}
			}
			save_scope_as = bp1_8000_new_rival
			save_scope_as = recipient
		}
		# Find informing character
		random_courtier = {
			limit = { # Prefer someone is on good terms
				is_adult = yes
				NOT = { this = scope:bp1_8000_new_rival }
				NOT = { has_claim_on = scope:bp1_8000_claimed_title }
			}
			weight = {
				modifier = { # Prefer chums...
					factor = 4
					has_any_good_relationship_with_root_trigger = yes
				}
				modifier = { # ...notables...
					factor = 2
					is_councillor_of = root
				}
				modifier = { # ...and tolerators
					factor = 2
					opinion = {
						target = root
						value >= 50
					}
				}
				modifier = { # Avoid family and non-fans
					factor = 0.1
					OR = {
						is_close_family_of = root
						is_consort_of = root
						opinion = {
							target = root
							value < 0
						}
					}
				}
			}
			save_scope_as = bp1_8000_informer
		}
	}

	option = { # Embrace the rivalry
		name = bp1_yearly.8000.a
		add_prestige = minor_prestige_gain
		scope:bp1_8000_new_rival = {
			set_relation_rival = {
				target = root
				reason = rival_covetted_claim
			}
		}
		stress_impact = {
			compassionate = minor_stress_impact_gain
			calm = minor_stress_impact_gain
			patient = minor_stress_impact_gain
			forgiving = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_boldness = 1
				ai_vengefulness = 0.5
			}
		}
	}

	option = { # Attempt to smooth things over - Diplomacy Challenge
		name = bp1_yearly.8000.b
		duel = {
			skill = diplomacy
			target = scope:bp1_8000_new_rival
			33 = {
				desc = bp1_yearly.8000.b.success
				compare_modifier = {
					value = scope:duel_value
					multiplier = 4
				}
				send_interface_toast = {
					title = bp1_yearly.8000.b.success
					left_icon = scope:bp1_8000_new_rival
					reverse_add_opinion = {
						target = scope:bp1_8000_new_rival
						modifier = chancellor_task_neighbor_increased_opinion
						opinion = 10
					}
				}
			}
			66 = {
				desc = bp1_yearly.8000.b.failure
				compare_modifier = {
					value = scope:duel_value
					multiplier = -2
				}
				min = 10
				send_interface_toast = {
					title = bp1_yearly.8000.b.failure
					left_icon = scope:bp1_8000_new_rival
					scope:bp1_8000_new_rival = {
						set_relation_rival = {
							target = root
							reason = rival_covetted_claim
						}
					}
				}
			}
		}
		stress_impact = {
			callous = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			impatient = medium_stress_impact_gain
			vengeful = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}

	option = { # Attempt to imprison preemptively
		name = bp1_yearly.8000.c
		trigger = {
			OR = {
				scope:bp1_8000_new_rival = { is_vassal_of = root }
				scope:bp1_8000_new_rival = { is_in_the_same_court_as_or_guest = root }
			}
		}
		scope:bp1_8000_new_rival = {
			set_relation_rival = {
				target = root
				reason = rival_covetted_claim
			}
		}
		duel = {
			skill = intrigue
			target = scope:bp1_8000_new_rival
			25 = {
				desc = bp1_yearly.8000.c.success
				compare_modifier = {
					value = scope:duel_value
					multiplier = 2
				}
				send_interface_toast = {
					title = bp1_yearly.8000.c.success
					left_icon = scope:bp1_8000_new_rival
					imprison_character_effect = {
						TARGET = scope:bp1_8000_new_rival
						IMPRISONER = root
					}
				}
			}
			50 = {
				desc = bp1_yearly.8000.c.failure
				compare_modifier = {
					value = scope:duel_value
					multiplier = -2
				}
				trigger = {
					scope:bp1_8000_new_rival = {
						is_landed = yes
						primary_title.tier > tier_barony
					}
				}
				send_interface_toast = {
					title = bp1_yearly.8000.c.failure
					left_icon = scope:bp1_8000_new_rival
					if = {
						limit = {
							is_a_faction_member = yes
							liege = scope:actor
							joined_faction = {
								faction_target = scope:actor
								NOT = { faction_is_type = populist_faction }
							}
						}
						joined_faction = {
							save_scope_as = retaliating_faction # For loc
							imprisonment_retribution_start_faction_war_if_valid = yes
						}
						hidden_effect = {
							if = {
								limit = { NOT = { exists = joined_faction.faction_war } }
								war_for_imprison_effect = yes
							}
						}
					}
					else = {
						war_for_imprison_effect = yes
					}
				}
			}
			50 = {
				desc = bp1_yearly.8000.c.failure
				compare_modifier = {
					value = scope:duel_value
					multiplier = -2
				}
				trigger = {
					NOT = {
						scope:bp1_8000_new_rival = {
							is_landed = yes
							primary_title.tier > tier_barony
						}
					}
				}
				send_interface_toast = {
					title = bp1_yearly.8000.c.failure
					left_icon = scope:bp1_8000_new_rival
					if = { #To block them from being instantly rehired
						limit = {
							is_councillor_of = scope:actor
							can_be_fired_from_council_trigger = { COURT_OWNER = scope:actor }
						}
						set_variable = {
							name = escaped_imprisonment_from
							value = scope:actor
							years = 20
						}
					}
					imprison_court_chaplain_consequences_effect = yes
					if = {
						limit = {
							is_landed = yes
						}
						depose_effect = { DEPOSER = root }
					}
					if = {
						limit = {
							is_landed = no
							trigger_if = {
								limit = {
									is_councillor = yes
								}
								can_be_fired_from_council_trigger = { COURT_OWNER = scope:recipient.liege }
							}
							trigger_if = {
								limit = {
									exists = scope:actor.faith.religious_head
								}
								NOT = { scope:actor.faith.religious_head = scope:recipient }
							}
						}
						select_and_move_to_pool_effect = yes
					}
					add_opinion = {
						target = scope:actor
						modifier = attempted_imprisonment_opinion
					}
				}
			}
		}
		add_internal_flag = dangerous
		stress_impact = {
			just = major_stress_impact_gain
			forgiving = major_stress_impact_gain
			patient = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -2
				ai_boldness = 2
				ai_vengefulness = 1
			}
		}
	}

	option = { # Do nothing
		name = bp1_yearly.8000.d
		add_character_modifier = {
			modifier = bp1_yearly_8000_trusting_modifier
			years = 3
		}
		random_list = {
			2 = {
				desc = bp1_yearly.8000.d.rival
				modifier = {
					factor = 2
					reverse_opinion = {
						target = scope:bp1_8000_new_rival
						value < 0
					}
				}
				modifier = {
					factor = 2
					reverse_opinion = {
						target = scope:bp1_8000_new_rival
						value < -50
					}
				}
				modifier = {
					factor = 2
					reverse_opinion = {
						target = scope:bp1_8000_new_rival
						value < -100
					}
				}
				send_interface_toast = {
					title = bp1_yearly.8000.d.rival
					left_icon = scope:bp1_8000_new_rival
					scope:bp1_8000_new_rival = {
						set_relation_rival = {
							target = root
							reason = rival_covetted_claim
						}
					}
				}
			}
			2 = {
				desc = bp1_yearly.8000.d.bluff
				send_interface_toast = {
					title = bp1_yearly.8000.d.bluff
					left_icon = scope:bp1_8000_new_rival
				}
			}
		}
		stress_impact = {
			wrathful = medium_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 1
				ai_honor = 1
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}
}

#################################
# Friends with Benefits         #
# by Joe Parkin                 #
# bp1_yearly.8010               #
#################################

# Scopes:
# character - bp1_8010_best_friend - best friend

# Suitable best friend exists
scripted_trigger bp1_yearly_8010_best_friend_trigger = {
	is_ai = yes
	is_adult = yes
	is_landed = yes
	is_imprisoned = no
	NOT = { liege = root }
	is_at_war = no
	in_diplomatic_range = root
	NOT = { is_allied_to = root }
}

bp1_yearly.8010 = {
	type = letter_event
	cooldown = { years = 10 }
	orphan = no # called by on_yearly_events
	opening = bp1_yearly.8010.opening
	desc = bp1_yearly.8010.desc
	sender = scope:bp1_8010_best_friend

	trigger = {
		has_dlc_feature = friends_and_foes
		is_adult = yes
		is_at_war = no
		any_relation = {
			type = best_friend
			bp1_yearly_8010_best_friend_trigger = yes
		}
	}

	weight_multiplier = {
		base = 1
	}

	immediate = {
		ordered_relation = {
			type = best_friend
			limit = { bp1_yearly_8010_best_friend_trigger = yes }
			save_scope_as = bp1_8010_best_friend
			save_scope_as = recipient
		}
	}

	option = {
		name = bp1_yearly.8010.a
		custom_tooltip = negotiate_alliance_effect_tooltip
		create_alliance = {
			target = scope:bp1_8010_best_friend
			allied_through_owner = root
			allied_through_target = scope:bp1_8010_best_friend
		}
		scope:bp1_8010_best_friend = {
			add_opinion = {
				target = root
				modifier = event_negotiated_alliance_opinion
			}
		}
	}

	option = {
		name = bp1_yearly.8010.b
		reverse_add_opinion = {
			target = scope:bp1_8010_best_friend
			modifier = disappointed_opinion
			opinion = -10
		}
	}
}

#################################
# Rival of my Rival           #
# by Joe Parkin                 #
# bp1_yearly.8020               #
#################################

# Scopes:
# title - bp1_8020_rival - my rival
# title - bp1_8020_friend - my rival's rival

# Suitable rival's rival exists
scripted_trigger bp1_yearly_8020_rivals_rival_trigger = {
	is_ai = yes
	is_adult = yes
	NOT = { this = root }
	in_diplomatic_range = root
	has_any_good_relationship_with_root_trigger = no
	has_any_bad_relationship_with_root_trigger = no
}

# Suitable rival exists
scripted_trigger bp1_yearly_8020_rival_trigger = {
	is_adult = yes
	any_relation = {
		type = rival
		bp1_yearly_8020_rivals_rival_trigger = yes
	}
}

bp1_yearly.8020 = {
	type = letter_event
	opening = bp1_yearly.8020.opening
	desc = bp1_yearly.8020.desc
	cooldown = { years = 10 }
	orphan = no # called by on_yearly_events
	sender = scope:bp1_8020_friend

	trigger = {
		has_dlc_feature = friends_and_foes
		is_adult = yes
		any_relation = {
			type = rival
			bp1_yearly_8020_rival_trigger = yes
		}
	}

	weight_multiplier = {
		base = 1
	}

	immediate = {
		random_relation = {
			type = rival
			limit = { bp1_yearly_8020_rival_trigger = yes }
			weight = {
				modifier = {
					factor = 10
					has_relation_nemesis = root
				}
			}
			save_scope_as = bp1_8020_rival
			random_relation = {
				type = rival
				limit = { bp1_yearly_8020_rivals_rival_trigger = yes }
				weight = {
					modifier = {
						factor = 10
						has_relation_nemesis = root
					}
				}
				save_scope_as = bp1_8020_friend
			}
		}
	}

	option = { # Befriend
		name = bp1_yearly.8020.a
		set_relation_friend = { reason = friend_shared_rivals target = scope:bp1_8020_friend involved_character = scope:bp1_8020_rival }
		reverse_add_opinion = {
			target = scope:bp1_8020_friend
			modifier = flattered_opinion
			opinion = 10
		}
		stress_impact = {
			trusting = medium_stress_impact_gain
			callous = medium_stress_impact_gain
		}
	}

	option = { # Stir their pot
		name = bp1_yearly.8020.b
		flavor = bp1_yearly.8020.b.flavor
		duel = {
			skill = diplomacy
			target = scope:bp1_8020_rival
			25 = {
				desc = bp1_yearly.8020.b.joke
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.5
				}
				send_interface_toast = {
					title = bp1_yearly.8020.b.joke
					left_icon = scope:bp1_8020_rival
					scope:bp1_8020_rival = {
						if = {
							limit = {
								can_set_relation_nemesis_trigger = { CHARACTER = scope:bp1_8020_friend }
							}
							set_relation_nemesis = {
								target = scope:bp1_8020_friend
								copy_reason = rival
								reason = nemesis_rival_gains_nemesis
								involved_character = root
							}
						}
						add_opinion = {
							target = root
							modifier = grateful_opinion
							opinion = 10
						}
					}
				}
				min = 5
			}
			50 = {
				desc = bp1_yearly.8020.b.insult
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1.5
				}
				send_interface_toast = {
					title = bp1_yearly.8020.b.insult
					left_icon = scope:bp1_8020_rival
					reverse_add_opinion = {
						target = scope:bp1_8020_rival
						modifier = angry_opinion
						opinion = -15
					}
					root = {
						stress_impact = {
							base = minor_stress_impact_loss
						}
					}
				}
				min = 20
			}
		}
		reverse_add_opinion = {
			target = scope:bp1_8020_friend
			modifier = angry_opinion
			opinion = -15
		}
		stress_impact = {
			trusting = medium_stress_impact_gain
			honest = medium_stress_impact_gain
			arbitrary = medium_stress_impact_loss
		}
	}

	option = { # Insult
		name = bp1_yearly.8020.c
		progress_towards_rival_effect = {
			CHARACTER = scope:bp1_8020_friend
			REASON = rival_questioned_honour
			OPINION = 0
		}
		reverse_add_opinion = {
			target = scope:bp1_8020_friend
			modifier = insulted_opinion
			opinion = -20
		}
		stress_impact = {
			compassionate = medium_stress_impact_gain
			just = medium_stress_impact_gain
		}
	}

	option = { # Reject
		name = bp1_yearly.8020.d
		reverse_add_opinion = {
			target = scope:bp1_8020_friend
			modifier = disappointed_opinion
			opinion = -10
		}
		stress_impact = {
			deceitful = medium_stress_impact_gain
			vengeful = medium_stress_impact_gain
			gregarious = medium_stress_impact_gain
		}
	}
}

#################################
# Diametrically Opposed         #
# by Joe Parkin                 #
# bp1_yearly.8040               #
#################################

# Scopes:
# character - bp1_yearly_8040_friend - disagreeing friend

scripted_trigger bp1_8040_scope_opposite_trigger = {
   OR = {
		# I have 1, they have 2
		AND = {
			root = { has_trait = $T1$ }
			$SCOPE$ = { has_trait = $T2$ }
		}
		# I have 2, they have 1
		AND = {
			$SCOPE$ = { has_trait = $T1$ }
			root = { has_trait = $T2$ }
		}
	}
}

scripted_effect bp1_8040_trait_effect = {
	reverse_add_opinion = {
		target = scope:bp1_yearly_8040_friend
		modifier = annoyed_opinion
		opinion = -15
	}
	# Chance to lose friend scales with opinion
	random = {
		chance = 15
		modifier = {
			scope:bp1_yearly_8040_opinion < 50
			add = 5
		}
		modifier = {
			scope:bp1_yearly_8040_opinion < 0
			add = 10
		}
		modifier = {
			scope:bp1_yearly_8040_opinion < -50
			add = 10
		}
		modifier = {
			scope:bp1_yearly_8040_opinion < -100
			add = 20
		}
		send_interface_toast = {
			title = bp1_yearly.8040.t
			left_icon = scope:bp1_yearly_8040_friend
			remove_friend_or_downgrade_friendship_effect = { SCOPE = scope:bp1_yearly_8040_friend }
		}
	}
}

scripted_trigger bp1_8040_all_traits_trigger = {
	# Has an opposing personality trait with root
	OR = {
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = lazy T2 = diligent }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = craven T2 = brave }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = arbitrary T2 = just }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = callous T2 = compassionate }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = stubborn T2 = fickle }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = gluttonous T2 = temperate }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = greedy T2 = generous }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = arrogant T2 = humble }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = deceitful T2 = honest }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = vengeful T2 = forgiving }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = wrathful T2 = calm }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = cynical T2 = zealous }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = paranoid T2 = trusting }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = shy T2 = gregarious }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = lustful T2 = chaste }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = impatient T2 = patient }
		bp1_8040_scope_opposite_trigger = { SCOPE = this T1 = content T2 = ambitious }
	}
}

bp1_yearly.8040 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8040.t
	desc = {
		desc = bp1_yearly.8040.desc.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					has_trait = lazy
					bp1_8040_scope_opposite_trigger = {SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				}
				desc = diplomacy_family.0008.lazy.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = diligent
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				}
				desc = bp1_yearly.8040.desc.diligent
			}
			triggered_desc = {
				trigger = {
					has_trait = craven
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				}
				desc = diplomacy_family.0008.craven.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = brave
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				}
				desc = bp1_yearly.8040.desc.brave
			}
			triggered_desc = {
				trigger = {
					has_trait = arbitrary
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				}
				desc = diplomacy_family.0008.arbitrary.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = just
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				}
				desc = bp1_yearly.8040.desc.just
			}
			triggered_desc = {
				trigger = {
					has_trait = callous
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				}
				desc = diplomacy_family.0008.callous.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = compassionate
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				}
				desc = bp1_yearly.8040.desc.compassionate
			}
			triggered_desc = {
				trigger = {
					has_trait = stubborn
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				}
				desc = diplomacy_family.0008.stubborn.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = fickle
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				}
				desc = bp1_yearly.8040.desc.fickle
			}
			# Gluttonous/Temperate
			triggered_desc = {
				trigger = {
					has_trait = gluttonous
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				}
				desc = diplomacy_family.0008.gluttonous.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = temperate
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				}
				desc = bp1_yearly.8040.desc.temperate
			}
			# Greedy/Generous
			triggered_desc = {
				trigger = {
					has_trait = greedy
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				}
				desc = diplomacy_family.0008.greedy.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = generous
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				}
				desc = bp1_yearly.8040.desc.generous
			}
			# Arrogant/Humble
			triggered_desc = {
				trigger = {
					has_trait = arrogant
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				}
				desc = diplomacy_family.0008.arrogant.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = humble
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				}
				desc = bp1_yearly.8040.desc.humble
			}
			# Deceitful/Honest
			triggered_desc = {
				trigger = {
					has_trait = deceitful
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				}
				desc = diplomacy_family.0008.deceitful.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = honest
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				}
				desc = bp1_yearly.8040.desc.honest
			}
			# Vengeful/Forgiving
			triggered_desc = {
				trigger = {
					has_trait = vengeful
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
				}
				desc = diplomacy_family.0008.vengeful.desc
			}
			triggered_desc = {
				trigger = {
					has_trait = forgiving
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
				}
				desc = bp1_yearly.8040.desc.forgiving
			}
			# Wrathful/Calm
			triggered_desc = {
				trigger = {
					has_trait = wrathful
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
				}
				desc = bp1_yearly.8040.desc.wrathful
			}
			triggered_desc = {
				trigger = {
					has_trait = calm
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
				}
				desc = bp1_yearly.8040.desc.calm
			}
			# Wrathful/Calm
			triggered_desc = {
				trigger = {
					has_trait = cynical
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = cynical T2 = zealous }
				}
				desc = bp1_yearly.8040.desc.cynical
			}
			triggered_desc = {
				trigger = {
					has_trait = zealous
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = cynical T2 = zealous }
				}
				desc = bp1_yearly.8040.desc.zealous
			}
			# Paranoid/Trusting
			triggered_desc = {
				trigger = {
					has_trait = paranoid
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = paranoid T2 = trusting }
				}
				desc = bp1_yearly.8040.desc.paranoid
			}
			triggered_desc = {
				trigger = {
					has_trait = trusting
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = paranoid T2 = trusting }
				}
				desc = bp1_yearly.8040.desc.trusting
			}
			# Shy/Gregarious
			triggered_desc = {
				trigger = {
					has_trait = shy
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = shy T2 = gregarious }
				}
				desc = bp1_yearly.8040.desc.shy
			}
			triggered_desc = {
				trigger = {
					has_trait = gregarious
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = shy T2 = gregarious }
				}
				desc = bp1_yearly.8040.desc.gregarious
			}
			# Lustful/Chaste
			triggered_desc = {
				trigger = {
					has_trait = lustful
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lustful T2 = chaste }
				}
				desc = bp1_yearly.8040.desc.lustful
			}
			triggered_desc = {
				trigger = {
					has_trait = chaste
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lustful T2 = chaste }
				}
				desc = bp1_yearly.8040.desc.chaste
			}
			# Impatient/Patient
			triggered_desc = {
				trigger = {
					has_trait = impatient
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = impatient T2 = patient }
				}
				desc = bp1_yearly.8040.desc.impatient
			}
			triggered_desc = {
				trigger = {
					has_trait = patient
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = impatient T2 = patient }
				}
				desc = bp1_yearly.8040.desc.patient
			}
			# Content/Ambitious
			triggered_desc = {
				trigger = {
					has_trait = content
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = content T2 = ambitious }
				}
				desc = bp1_yearly.8040.desc.content
			}
			triggered_desc = {
				trigger = {
					has_trait = ambitious
					bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = content T2 = ambitious }
				}
				desc = bp1_yearly.8040.desc.ambitious
			}
		}
		desc = bp1_yearly.8040.desc.closing
	}
	theme = friendly
	# Background Logic for random_location
	override_background = { # Library
		trigger = {
			has_variable = random_location
			var:random_location = 0
		}
		reference = study
	}
	override_background = { # Garden
		trigger = {
			has_variable = random_location
			var:random_location = 1
		}
		reference = garden
	}
	override_background = { # Corridor
		trigger = {
			has_variable = random_location
			var:random_location = 2
		}
		reference = corridor_day
	}
	override_background = { # Council Chambers
		trigger = {
			has_variable = random_location
			var:random_location = 3
		}
		reference = council_chamber
	}
	override_background = { # Throne Room
		trigger = {
			has_variable = random_location
			var:random_location = 4
		}
		reference = throne_room
	}
	override_background = { # War Camp
		trigger = {
			has_variable = random_location
			var:random_location = 5
		}
		reference = army_camp
	}
	cooldown = { years = 10 }
	orphan = no # called by on_yearly_events
	left_portrait = {
		character = scope:bp1_yearly_8040_friend
		animation = disapproval
	}

	trigger = {
		has_dlc_feature = friends_and_foes
		is_adult = yes
		# Any friend beneath root with opposite trait?
		exists = root.location
		any_relation = {
			type = friend
			is_adult = yes
			exists = location
			location = root.location
			# Has an opposing personality trait with root
			bp1_8040_all_traits_trigger = yes
		}
	}

	immediate = {
		# Find friend beneath root with opposite trait
		random_relation = {
			type = friend
			limit = {
				is_adult = yes
				exists = location
				location = root.location
				# Has an opposing personality trait with root
				bp1_8040_all_traits_trigger = yes
			}
			save_scope_as = bp1_yearly_8040_friend
			save_opinion_value_as = {
				name = bp1_yearly_8040_opinion
				target = root
			}
		}
		get_random_location_effect = yes # set loc and background location
	}

	option = { # Lazy/Diligent retort
		name = {
			text = bp1_yearly.8040.a.lazy
			trigger = { has_trait = lazy }
		}
		name = {
			text = bp1_yearly.8040.a.diligent
			trigger = { has_trait = diligent }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
		}
		trait = lazy
		trait = diligent
		bp1_8040_trait_effect = yes
		stress_impact = {
			lazy = medium_stress_impact_loss
			diligent = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Craven/Brave retort
		name = {
			text = bp1_yearly.8040.a.craven
			trigger = { has_trait = craven }
		}
		name = {
			text = bp1_yearly.8040.a.brave
			trigger = { has_trait = brave }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
			# To stop nonsensical options appearing if more than one opposition exists
			NOT = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
			}
		}
		trait = craven
		trait = brave
		bp1_8040_trait_effect = yes
		stress_impact = {
			craven = medium_stress_impact_loss
			brave = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Arbitrary/Just retort
		name = {
			text = bp1_yearly.8040.a.arbitrary
			trigger = { has_trait = arbitrary }
		}
		name = {
			text = bp1_yearly.8040.a.just
			trigger = { has_trait = just }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
			}
		}
		trait = arbitrary
		trait = just
		bp1_8040_trait_effect = yes
		stress_impact = {
			arbitrary = medium_stress_impact_loss
			just = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Callous/Compassionate retort
		name = {
			text = bp1_yearly.8040.a.callous
			trigger = { has_trait = callous }
		}
		name = {
			text = bp1_yearly.8040.a.compassionate
			trigger = { has_trait = compassionate }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
			}
		}
		trait = callous
		trait = compassionate
		bp1_8040_trait_effect = yes
		stress_impact = {
			callous = medium_stress_impact_loss
			compassionate = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Stubborn/Fickle retort
		name = {
			text = bp1_yearly.8040.a.stubborn
			trigger = { has_trait = stubborn }
		}
		name = {
			text = bp1_yearly.8040.a.fickle
			trigger = { has_trait = fickle }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
			}
		}
		trait = stubborn
		trait = fickle
		bp1_8040_trait_effect = yes
		stress_impact = {
			stubborn = medium_stress_impact_loss
			fickle = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Gluttonous/Temperate retort
		name = {
			text = bp1_yearly.8040.a.gluttonous
			trigger = { has_trait = gluttonous }
		}
		name = {
			text = bp1_yearly.8040.a.temperate
			trigger = { has_trait = temperate }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
			}
		}
		trait = gluttonous
		trait = temperate
		bp1_8040_trait_effect = yes
		stress_impact = {
			gluttonous = medium_stress_impact_loss
			temperate = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Greedy/Generous retort
		name = {
			text = bp1_yearly.8040.a.greedy
			trigger = { has_trait = greedy }
		}
		name = {
			text = bp1_yearly.8040.a.generous
			trigger = { has_trait = generous }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
			}
		}
		trait = greedy
		trait = generous
		bp1_8040_trait_effect = yes
		stress_impact = {
			greedy = medium_stress_impact_loss
			generous = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Arrogant retort
		name = {
			text = bp1_yearly.8040.a.arrogant
			trigger = { has_trait = arrogant }
		}
		name = {
			text = bp1_yearly.8040.a.humble
			trigger = { has_trait = humble }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
			}
		}
		trait = arrogant
		trait = humble
		bp1_8040_trait_effect = yes
		stress_impact = {
			arrogant = medium_stress_impact_loss
			humble = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Deceitful/Honest retort
		name = {
			text = bp1_yearly.8040.a.deceitful
			trigger = { has_trait = deceitful }
		}
		name = {
			text = bp1_yearly.8040.a.honest
			trigger = { has_trait = honest }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
			}
		}
		trait = deceitful
		trait = honest
		bp1_8040_trait_effect = yes
		stress_impact = {
			deceitful = medium_stress_impact_loss
			honest = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Vengeful/Forgiving retort
		name = {
			text = bp1_yearly.8040.a.vengeful
			trigger = { has_trait = vengeful }
		}
		name = {
			text = bp1_yearly.8040.a.forgiving
			trigger = { has_trait = forgiving }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
			}
		}
		trait = vengeful
		trait = forgiving
		bp1_8040_trait_effect = yes
		stress_impact = {
			vengeful = medium_stress_impact_loss
			forgiving = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Wrathful/Calm, retort
		name = {
			text = bp1_yearly.8040.a.wrathful
			trigger = { has_trait = wrathful }
		}
		name = {
			text = bp1_yearly.8040.a.calm
			trigger = { has_trait = calm }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
			}
		}
		trait = wrathful
		trait = calm
		bp1_8040_trait_effect = yes
		stress_impact = {
			wrathful = medium_stress_impact_loss
			calm = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Cynical/Zealous retort
		name = {
			text = bp1_yearly.8040.a.cynical
			trigger = { has_trait = cynical }
		}
		name = {
			text = bp1_yearly.8040.a.zealous
			trigger = { has_trait = zealous }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = cynical T2 = zealous }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
			}
		}
		trait = cynical
		trait = zealous
		if = {
			limit = { has_trait = cynical }
			add_piety = minor_piety_loss
		}
		else = { add_piety = minor_piety_gain }
		bp1_8040_trait_effect = yes
		stress_impact = {
			cynical = medium_stress_impact_loss
			zealous = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Paranoid/Trusting retort
		name = {
			text = bp1_yearly.8040.a.paranoid
			trigger = { has_trait = paranoid }
		}
		name = {
			text = bp1_yearly.8040.a.trusting
			trigger = { has_trait = trusting }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = paranoid T2 = trusting }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = cynical T2 = zealous }
			}
		}
		trait = paranoid
		trait = trusting
		bp1_8040_trait_effect = yes
		stress_impact = {
			paranoid = medium_stress_impact_loss
			trusting = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Shy/Gregarious retort
		name = {
			text = bp1_yearly.8040.a.shy
			trigger = { has_trait = shy }
		}
		name = {
			text = bp1_yearly.8040.a.gregarious
			trigger = { has_trait = gregarious }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = shy T2 = gregarious }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = cynical T2 = zealous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = paranoid T2 = trusting }
			}
		}
		trait = shy
		trait = gregarious
		bp1_8040_trait_effect = yes
		stress_impact = {
			shy = medium_stress_impact_loss
			gregarious = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Lustful/Chaste retort
		name = {
			text = bp1_yearly.8040.a.lustful
			trigger = { has_trait = lustful }
		}
		name = {
			text = bp1_yearly.8040.a.chaste
			trigger = { has_trait = chaste }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lustful T2 = chaste }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = cynical T2 = zealous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = paranoid T2 = trusting }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = shy T2 = gregarious }
			}
		}
		trait = lustful
		trait = chaste
		bp1_8040_trait_effect = yes
		stress_impact = {
			lustful = medium_stress_impact_loss
			chaste = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Impatient/Patient retort
		name = {
			text = bp1_yearly.8040.a.impatient
			trigger = { has_trait = impatient }
		}
		name = {
			text = bp1_yearly.8040.a.patient
			trigger = { has_trait = patient }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = impatient T2 = patient }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = cynical T2 = zealous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = paranoid T2 = trusting }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = shy T2 = gregarious }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lustful T2 = chaste }
			}
		}
		trait = impatient
		trait = patient
		bp1_8040_trait_effect = yes
		stress_impact = {
			impatient = medium_stress_impact_loss
			patient = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Content/Ambitious retort
		name = {
			text = bp1_yearly.8040.a.content
			trigger = { has_trait = content }
		}
		name = {
			text = bp1_yearly.8040.a.ambitious
			trigger = { has_trait = ambitious }
		}
		trigger = {
			bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = content T2 = ambitious }
			# To stop nonsensical options appearing if more than one opposition exists
			NOR = {
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lazy T2 = diligent }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = craven T2 = brave }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arbitrary T2 = just }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = callous T2 = compassionate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = stubborn T2 = fickle }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = gluttonous T2 = temperate }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = greedy T2 = generous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = arrogant T2 = humble }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = deceitful T2 = honest }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = vengeful T2 = forgiving }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = wrathful T2 = calm }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = cynical T2 = zealous }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = paranoid T2 = trusting }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = shy T2 = gregarious }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = lustful T2 = chaste }
				bp1_8040_scope_opposite_trigger = { SCOPE = scope:bp1_yearly_8040_friend T1 = impatient T2 = patient }
			}
		}
		trait = content
		trait = ambitious
		bp1_8040_trait_effect = yes
		stress_impact = {
			content = medium_stress_impact_loss
			ambitious = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_honor = -1
				ai_boldness = 1
			}
		}
	}

	option = { # Refuse to apologize
		name = bp1_yearly.8040.b
		duel = {
			skill = diplomacy
			target = scope:bp1_yearly_8040_friend
			25 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 2
				}
				send_interface_toast = {
					title = bp1_yearly.8040.b.success
					left_icon = scope:bp1_yearly_8040_friend
					reverse_add_opinion = {
						target = scope:bp1_yearly_8040_friend
						modifier = pacified_opinion
						opinion = 5
					}
				}
			}
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -2
				}
				send_interface_toast = {
					title = bp1_yearly.8040.b.failure
					left_icon = scope:bp1_yearly_8040_friend
					reverse_add_opinion = {
						target = scope:bp1_yearly_8040_friend
						modifier = ignored_opinion
						opinion = -10
					}
				}
			}
		}
		stress_impact = {
			fickle = minor_stress_impact_gain
			humble = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_honor = 0.5
				ai_boldness = -1
			}
		}
	}

	option = { # Take responsibility
		name = bp1_yearly.8040.c
		reverse_add_opinion = {
			target = scope:bp1_yearly_8040_friend
			modifier = took_my_advice_opinion
			opinion = 10
		}
		stress_impact = {
			base = minor_stress_impact_gain
			stubborn = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
		}
		# Increased stress gain and diplomacy
		add_character_modifier = {
			modifier = bp_yearly_8040_trying_to_be_mindful_modifier
			years = 3
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_honor = 1
				ai_boldness = -0.5
			}
		}
	}

	after = { remove_variable = random_location }
}

#################################
# Feudal Favoritism         	#
# by Joe Parkin                 #
# bp1_yearly.8070               #
#################################

bp1_yearly.8070 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8070.t
	desc = {
		desc = bp1_yearly.8070.opening
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:claim_vassal = { has_strong_claim_on = scope:claim_title }
					}
					desc = bp1_yearly.8070.strength_strong
				}
				desc = bp1_yearly.8070.strength_weak
			}
		}
		first_valid = {
		   triggered_desc = {
				trigger = { exists = scope:claimant_scope }
				desc = bp1_yearly.8070.claim
			}
			triggered_desc = {
				trigger = { exists = scope:lowborn_scope }
				desc = bp1_yearly.8070.lowborn
			}
			desc = bp1_yearly.8070.other
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					faith = scope:claim_vassal.faith
					faith = {
						faith_hostility_level = {
							target = scope:favorite_vassal.faith
							value >= faith_hostile_level
						}
					}
				}
				desc = bp1_yearly.8070.hostile
			}
			triggered_desc = {
				trigger = {
					faith = scope:claim_vassal.faith
					NOR = {
						scope:favorite_vassal.faith = scope:claim_vassal.faith
						scope:favorite_vassal.faith = scope:claim_title.title_capital_county.faith
					}
				}
				desc = bp1_yearly.8070.faith
			}
			triggered_desc = {
				trigger = {
					culture = scope:claim_vassal.culture
					NOR = {
						scope:favorite_vassal.culture = scope:claim_vassal.culture
						scope:favorite_vassal.culture = scope:claim_title.title_capital_county.culture
					}
				}
				desc = bp1_yearly.8070.culture
			}
		}
	}
	theme = unfriendly
	override_background = { reference = feast }
	cooldown = { years = 10 }
	orphan = no # called by on_yearly_events
	left_portrait = {
		character = root
		animation = boredom
	}
	right_portrait = {
		character = scope:claim_vassal
		animation = anger
	}
	lower_right_portrait = scope:favorite_vassal

	trigger = {
		has_dlc_feature = friends_and_foes
		is_adult = yes
		exists = scope:claim_vassal
		scope:claim_vassal = { is_alive = yes }
		exists = scope:claim_title
	}

	immediate = {
		scope:recipient = { save_scope_as = favorite_vassal }
		scope:claim_vassal = {
			random_claim = {
				pressed = no
				limit = {
					save_temporary_scope_as = this_claim
					exists = holder
					holder = {
						NOT = { scope:this_claim = this.primary_title }
						this = root
					}
				}
				save_scope_as = claim_to_propose
			}
		}
	}

	option = { # Antagonize
		name = bp1_yearly.8070.a
		progress_towards_rival_effect = {
			CHARACTER = scope:claim_vassal
			REASON = rival_antagonised_title
			OPINION = default_rival_opinion
		}
		progress_towards_friend_effect = {
			REASON = friend_took_side_in_dispute_reverse
			CHARACTER = scope:favorite_vassal
			OPINION = default_friend_opinion
		}
		stress_impact = {
			just = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
				ai_vengefulness = 0.5
			}
		}
	}

	option = { # Give land
		name = bp1_yearly.8070.b
		progress_towards_friend_effect = {
			REASON = friend_landed
			CHARACTER = scope:claim_vassal
			OPINION = default_friend_opinion
		}
		 progress_towards_rival_effect = {
			CHARACTER = scope:favorite_vassal
			REASON = rival_antagonised_title
			OPINION = default_rival_opinion
		}
		scope:favorite_vassal = {
			if = {
				limit = {
					scope:claim_title.tier = tier_county
					has_opinion_modifier = {
						modifier = received_title_county
						target = root
					}
				}
				remove_opinion = {
					target = root
					modifier = received_title_county
				}
			}
			else_if = {
				limit = {
					scope:claim_title.tier = tier_duchy
					has_opinion_modifier = {
						modifier = received_title_duchy
						target = root
					}
				}
				remove_opinion = {
					target = root
					modifier = received_title_duchy
				}
			}
			else_if = {
				limit = {
					scope:claim_title.tier = tier_kingdom
					has_opinion_modifier = {
						modifier = received_title_kingdom
						target = root
					}
				}
				remove_opinion = {
					target = root
					modifier = received_title_kingdom
				}
			}
		}
		add_tyranny = minor_tyranny_gain
		create_title_and_vassal_change = {
			type = granted
			save_scope_as = title_change
			add_claim_on_loss = yes
		}
		scope:claim_title = {
			change_title_holder = {
				holder = scope:claim_vassal
				change = scope:title_change
			}
		}
		resolve_title_and_vassal_change = scope:title_change
		stress_impact = {
			arbitrary = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			callous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 1
			}
		}
	}

	option = { # Promise land
		name = bp1_yearly.8070.c
		custom_tooltip = vassal.2901.a.tt
		trigger = {
			exists = scope:claim_to_propose
		}
		scope:claim_vassal = {
			add_opinion = {
				modifier = respect_opinion
				target = root
				opinion = low_positive_opinion
			}
			set_variable = {
				name = promised_title
				value = scope:claim_to_propose
			}
		}
		set_variable = {
			name = was_promised_title
			value = scope:claim_vassal
		}
		stress_impact = {
			arrogant = medium_stress_impact_gain
			greedy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}

	option = { # Do nothing
		name = bp1_yearly.8070.d
		duel = {
			skill = diplomacy
			value = average_skill_rating
			25 = {
				desc = bp1_yearly.8070.d.success
				compare_modifier = {
					value = scope:duel_value
					multiplier = 5
				}
				min = 10
				send_interface_toast = {
					title = bp1_yearly.8070.d.success
					left_icon = scope:claim_vassal
				}
			}
			75 = {
				desc = bp1_yearly.8070.d.failure
				compare_modifier = {
					value = scope:duel_value
					multiplier = -5
				}
				send_interface_toast = {
					title = bp1_yearly.8070.d.failure
					left_icon = scope:claim_vassal
					reverse_add_opinion = {
						target = scope:claim_vassal
						modifier = angry_opinion
						opinion = -15
					}
				}
			}
		}
		stress_impact = {
			calm = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}
}

#################################
# Unwelcome Favorite      		#
# by Joe Parkin                 #
# bp1_yearly.8100               #
#################################
scripted_trigger bp1_sycophant_chain_base_trigger = {
	has_dlc_feature = friends_and_foes
	is_available_adult = yes
	any_owned_story = {
		story_type = story_sycophant
		exists = var:sycophant_character
		var:sycophant_character = {
			is_available_ai_adult = yes
			save_temporary_scope_as = sycophant_temp
		}
	}
	any_vassal = {
		is_available_ai_adult = yes
		is_powerful_vassal = yes
		NOR = {
			this = scope:sycophant_temp
			has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_temp }
		}
	}
}

scripted_trigger bp1_sycophant_chain_councillor_trigger = {
	scope:story = {
		exists = var:sycophant_character
		var:sycophant_character = { is_councillor_of = scope:story.story_owner }
	}
}

scripted_trigger bp1_sycophant_chain_jealous_trigger = {
	scope:story = {
		exists = var:jealous_character
		var:jealous_character = {
			is_alive = yes
			liege = root
			exists = scope:story.var:sycophant_character
			NOT = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
			}
		}
	}
}

scripted_effect bp1_sycophant_chain_scope_effect = {
	scope:story = {
		var:sycophant_character = { save_scope_as = sycophant_scope }
		var:jealous_character = { save_scope_as = jealous_scope }
	}
}

scripted_effect bp1_sycophant_chain_downgrade_effect = {
	if = {
		limit = { has_relation_friend = scope:sycophant_scope }
		random = {
			chance = 33
			remove_friend_or_downgrade_friendship_effect = { SCOPE = scope:sycophant_scope }
		}
	}
	else_if = {
		limit = { has_relation_lover = scope:sycophant_scope }
		random = {
			chance = 33
			remove_lover_or_downgrade_relationship_effect = { SCOPE = scope:sycophant_scope }
		}
	}
}

scripted_trigger bp1_yearly_8100_jealous_trigger = {
	is_available_ai_adult = yes
	is_powerful_vassal = yes
	has_dread_level_towards = {
		target = root
		level = 0
	}
	NOT = {
		has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
	}
}

scripted_effect bp1_sycophant_chain_please_vassals_effect = {
	if = {
		limit = { has_character_modifier = disgruntled_vassals_modifier }
		remove_character_modifier = disgruntled_vassals_modifier
	}
	else_if = {
		limit = {
			NOT = { has_character_modifier = placated_vassals_modifier }
		}
		add_character_modifier = {
			modifier = placated_vassals_modifier
			years = 5
		}
	}
}

scripted_effect bp1_sycophant_chain_anger_vassals_effect = {
	if = {
		limit = { has_character_modifier = placated_vassals_modifier }
		remove_character_modifier = placated_vassals_modifier
	}
	else_if = {
		limit = {
			NOT = { has_character_modifier = disgruntled_vassals_modifier }
		}
		add_character_modifier = {
			modifier = disgruntled_vassals_modifier
			years = 5
		}
	}
	else = {
		every_vassal = {
			limit = { is_powerful_vassal = yes }
			custom = every_powerful_vassal_tt
			add_opinion = {
				target = root
				modifier = disgruntled_opinion
				opinion = -5
			}
		}
	}
}

scripted_effect bp1_sycophant_chain_fire_councillor_effect = {
	hidden_effect = { fire_councillor = scope:sycophant_scope }
	scope:sycophant_scope = {
		block_hiring_councillor_effect = { COURT_OWNER = root }
	}
	custom_tooltip = bp1_yearly.8100.fired_tt
	reverse_add_opinion = {
		target = scope:sycophant_scope
		modifier = hurt_opinion
		opinion = -10
	}
	bp1_sycophant_chain_please_vassals_effect = yes
	bp1_sycophant_chain_downgrade_effect = yes
}

bp1_yearly.8100 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8100.t
	desc = {
		random_valid = {
			desc = bp1_yearly.8100.joke # Funny joke
	  		triggered_desc = { # Shapely thighs
				trigger = { has_relation_lover = scope:sycophant_scope }
				desc = bp1_yearly.8100.thighs
			}
		}
		desc = bp1_yearly.8100.desc
		first_valid = {
			triggered_desc = { # Known secret lover
				trigger = {
					exists = scope:sycophant_secret
					scope:sycophant_secret = {
						any_secret_knower = { this = scope:jealous_scope }
					}
				}
				desc = bp1_yearly.8100.lover_known
			}
	  		triggered_desc = { # Unknown secret lover
				trigger = { exists = scope:sycophant_secret }
				desc = bp1_yearly.8100.lover_secret
			}
			triggered_desc = { # Public lover
				trigger = {
					NOT = { has_relation_friend = scope:sycophant_scope }
				}
				desc = bp1_yearly.8100.lover
			}
			desc = bp1_yearly.8100.friend # Friend/fallback
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:jealous_scope = { is_a_faction_leader = yes }
				}
				desc = bp1_yearly.8100.faction
			}
			triggered_desc = {
				trigger = {
					scope:jealous_scope = {
						has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
					}
				}
				desc = bp1_yearly.8100.hostile
			}
			desc = {
				random_valid = {
					triggered_desc = {
						trigger = {
							scope:sycophant_scope = { is_lowborn = yes }
						}
						desc = bp1_yearly.8100.lowborn
					}
					triggered_desc = {
						trigger = {
							scope:sycophant_scope = { is_landed = yes }
							scope:jealous_scope = { is_landed = yes }
							scope:sycophant_scope.primary_title.tier < scope:jealous_scope.primary_title.tier
						}
						desc = bp1_yearly.8100.rank
					}
					triggered_desc = {
						trigger = {
							scope:jealous_scope.faith = root.faith
							NOT = { scope:sycophant_scope.faith = root.faith }
						}
						desc = bp1_yearly.8100.faith
					}
					triggered_desc = {
						trigger = {
							scope:jealous_scope.culture = root.culture
							NOT = { scope:sycophant_scope.culture = root.culture }
						}
						desc = bp1_yearly.8100.culture
					}
					triggered_desc = {
						trigger = {
							scope:sycophant_scope = {
								councillor_is_unskilled_trigger = { EMPLOYER = root }
							}
						}
						desc = bp1_yearly.8100.unskilled
					}
					triggered_desc = {
						trigger = {
							scope:sycophant_scope = {
								councillor_is_skilled_trigger = { EMPLOYER = root }
							}
						}
						desc = bp1_yearly.8100.skilled
					}
					triggered_desc = {
						trigger = {
							scope:jealous_scope = {
								NOR = {
									is_councillor_of = root
									has_trait = content
									has_trait = humble
								}
							}
						}
						desc = bp1_yearly.8100.jealous
					}
					desc = bp1_yearly.8100.fallback
				}
			}
		}
	}
	theme = unfriendly
	override_background = { reference = council_chamber }
	cooldown = { years = 100 }
	left_portrait = {
		character = scope:jealous_scope
		animation = disapproval
	}
	lower_right_portrait = scope:sycophant_scope

	trigger = {
		has_dlc_feature = friends_and_foes
		is_available_adult = yes
		is_landed = yes
		trigger_if = {
			limit = { is_ai = yes }
			primary_title.tier >= tier_kingdom
		}
		trigger_else = { primary_title.tier >= tier_county }
		has_free_council_slot = no
		any_councillor = {
			bp1_yearly_8100_sycophant_trigger = { LIEGE = root }
			NOT = {
				is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = root }
			}
			save_temporary_scope_as = sycophant_temp
		}
		any_vassal = {
			bp1_yearly_8100_jealous_trigger = yes
			NOR = {
				this = scope:sycophant_temp
				is_consort_of = scope:sycophant_temp
				is_close_family_of = scope:sycophant_temp
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_temp }
			}
		}
	}

	weight_multiplier = {
		base = 100
		# More likely for kings and up
		modifier = {
			add = 20
			has_royal_court = yes
		}
		# Less likely for AI
		modifier = {
			factor = 0.1
			is_ai = yes
		}
		# More likely if Sycophant is actively disliked by a powerful vassal
		modifier = {
			add = 10
			any_councillor = {
				bp1_yearly_8100_sycophant_trigger = { LIEGE = root }
				save_temporary_scope_as = sycophant_temp
			}
			any_vassal = {
				bp1_yearly_8100_jealous_trigger = yes
				NOR = {
					this = scope:sycophant_temp
					is_consort_of = scope:sycophant_temp
					is_close_family_of = scope:sycophant_temp
					has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_temp }
				}
				has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sycophant_temp }
			}
		}
		# More likely if Sycophant is actively disliked by a powerful vassal
		modifier = {
			add = 10
			any_councillor = {
				bp1_yearly_8100_sycophant_trigger = { LIEGE = root }
				save_temporary_scope_as = sycophant_temp
			}
			any_vassal = {
				bp1_yearly_8100_jealous_trigger = yes
				NOR = {
					this = scope:sycophant_temp
					is_consort_of = scope:sycophant_temp
					is_close_family_of = scope:sycophant_temp
					has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_temp }
				}
				is_scheming_against = {
					target = scope:sycophant_temp
					type = murder
				}
			}
		}
		# More likely if Sycophant completely screws up
		modifier = {
			add = 10
			any_councillor = {
				bp1_yearly_8100_sycophant_trigger = { LIEGE = root }
				councillor_is_unskilled_trigger = { EMPLOYER = root }
			}
		}
		# More likely if Sycophant is a heathen
		modifier = {
			add = 10
			NOT = { scope:sycophant_temp.faith = root.faith }
		}
		# More likely if Sycophant is a foreigner
		modifier = {
			factor = 2
			NOT = { scope:sycophant_temp.culture = root.culture }
		}
		# More likely if Sycophant is a pleb
		modifier = {
			add = 10
			any_councillor = {
				bp1_yearly_8100_sycophant_trigger = { LIEGE = root }
				is_lowborn = yes
			}
		}
		# More likely if Sycophant is a secret lover known to a powerful vassal
		modifier = {
			add = 10
			any_secret = {
				secret_type = secret_lover
				secret_target = {
					bp1_yearly_8100_sycophant_trigger = { LIEGE = root }
				}
				save_temporary_scope_as = secret_temp
				any_secret_knower = {
					NOR = {
						this = scope:secret_temp.secret_owner
						this = scope:secret_temp.secret_target
					}
					is_powerful_vassal_of = root
				}
			}
		}
	}

	immediate = {
		random_councillor = {
			limit = {
				bp1_yearly_8100_sycophant_trigger = { LIEGE = root }
				save_temporary_scope_as = sycophant_temp
			}
			weight = {
				base = 1
				modifier = {
					factor = 10
					OR = {
						has_relation_soulmate = root
						has_relation_best_friend = root
					}
				}
				modifier = {
					factor = 10
					root = {
						any_vassal = {
							is_powerful_vassal = yes
							has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sycophant_temp }
						}
					}
				}
				modifier = {
					factor = 10
					councillor_is_unskilled_trigger = { EMPLOYER = root }
				}
				modifier = {
					factor = 10
					is_lowborn = yes
				}
			}
			save_scope_as = sycophant_scope
		}
		random_vassal = {
			limit = {
				NOT = {	this = scope:sycophant_scope }
				NOT = {
					has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
				}
				bp1_yearly_8100_jealous_trigger = yes
			}
			weight = {
				base = 1
				modifier = {
					factor = 100
					any_known_secret = {
						secret_type = secret_lover
						secret_owner = root
						secret_target = scope:sycophant_scope
					}
				}
				modifier = {
					factor = 10
					NOT = { is_councillor_of = root }
				}
				modifier = {
					factor = 10
					has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
				}
			}
			save_scope_as = jealous_scope
		}
		if = {
			limit = {
				any_secret = {
					secret_type = secret_lover
					secret_target = scope:sycophant_scope
				}
			}
			random_secret = {
				limit = {
					secret_type = secret_lover
					secret_target = scope:sycophant_scope
				}
				save_scope_as = sycophant_secret
			}
		}
	}

	option = { # Dismiss
		name = {
			trigger = {
				NOT = {
					scope:jealous_scope = {
						has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
					}
				}
			}
			text = bp1_yearly.8100.a
		}
		name = {
			trigger = {
				scope:jealous_scope = {
					has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
				}
			}
			text = bp1_yearly.8100.a.hostile
		}
		flavor = bp1_yearly.8100.a.flavor
		progress_towards_rival_effect = {
			REASON = rival_dismissed_requests
			CHARACTER = scope:jealous_scope
			OPINION = 0
		}
		reverse_add_opinion = {
			target = scope:jealous_scope
			modifier = angry_opinion
			opinion = -10
		}
		bp1_sycophant_chain_anger_vassals_effect = yes # Remove Placated or add Disgruntled (powerful vassal opinion)
		stress_impact = {
			fickle = minor_stress_impact_gain
			humble = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			arbitrary = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_honor = 0.5
				ai_compassion = 0.5
				ai_boldness = 1
			}
		}
	}

	option = { # Give Sycophant's position
		name = bp1_yearly.8100.b
		trigger = {
			scope:jealous_scope = {
				NOT = { is_councillor_of = root }
				trigger_if = {
					limit = {
						exists = root.cp:councillor_chancellor
						scope:sycophant_scope = root.cp:councillor_chancellor
					}
					can_be_chancellor_trigger = { COURT_OWNER = root }
				}
				trigger_else_if = {
					limit = {
						exists = root.cp:councillor_steward
						scope:sycophant_scope = root.cp:councillor_steward
					}
					can_be_steward_trigger = { COURT_OWNER = root }
				}
				trigger_else_if = {
					limit = {
						exists = root.cp:councillor_marshal
						scope:sycophant_scope = root.cp:councillor_marshal
					}
					can_be_marshal_trigger = { COURT_OWNER = root }
				}
				trigger_else_if = {
					limit = {
						exists = root.cp:councillor_spymaster
						scope:sycophant_scope = root.cp:councillor_spymaster
					}
					can_be_spymaster_trigger = { COURT_OWNER = root }
				}
				trigger_else_if = {
					limit = {
						exists = root.cp:councillor_court_chaplain
						scope:sycophant_scope = root.cp:councillor_court_chaplain
					}
					can_be_court_chaplain_trigger = { COURT_OWNER = root }
				}
				trigger_else = { always = no }
			}
		}
		flavor = bp1_yearly.8100.b.flavor
		add_hook = {
			target = scope:jealous_scope
			type = favor_hook
		}
		reverse_add_opinion = {
			target = scope:sycophant_scope
			modifier = hurt_opinion
			opinion = -10
		}
		scope:sycophant_scope = {
			block_hiring_councillor_effect = { COURT_OWNER = root }
		}
		custom_tooltip = bp1_yearly.8100.fired_tt
		switch = {
			trigger = scope:sycophant_scope
			root.cp:councillor_chancellor = {
				hidden_effect = { fire_councillor = scope:sycophant_scope }
				assign_councillor_type = {
					type = councillor_chancellor
					target = scope:jealous_scope
				}
			}
			root.cp:councillor_steward = {
				hidden_effect = { fire_councillor = scope:sycophant_scope }
				assign_councillor_type = {
					type = councillor_steward
					target = scope:jealous_scope
				}
			}
			root.cp:councillor_marshal = {
				hidden_effect = { fire_councillor = scope:sycophant_scope }
				assign_councillor_type = {
					type = councillor_marshal
					target = scope:jealous_scope
				}
			}
			root.cp:councillor_spymaster = {
				hidden_effect = { fire_councillor = scope:sycophant_scope }
				assign_councillor_type = {
					type = councillor_spymaster
					target = scope:jealous_scope
				}
			}
			root.cp:councillor_court_chaplain = {
				hidden_effect = { fire_councillor = scope:sycophant_scope }
				assign_councillor_type = {
					type = councillor_court_chaplain
					target = scope:jealous_scope
				}
			}
		}
		scope:jealous_scope = {
			block_firing_councillor_effect = { COURT_OWNER = root }
		}
		bp1_sycophant_chain_please_vassals_effect = yes # Remove Disgruntled or add Placated modifier (powerful vassal opinion)
		bp1_sycophant_chain_downgrade_effect = yes
		stress_impact = {
			trusting = minor_stress_impact_gain
			just = minor_stress_impact_gain
			stubborn = minor_stress_impact_gain
		}
		if = {
			limit = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
			}
			stress_impact = {
				base = medium_stress_impact_gain
				compassionate = medium_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				base = minor_stress_impact_gain
				compassionate = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_honor = -0.5
				ai_compassion = 0.5
				ai_boldness = 1
				ai_rationality = 0.5
			}
		}
	}

	option = { # Remove Sycophant
		name = bp1_yearly.8100.c
		flavor = bp1_yearly.8100.c.flavor
		bp1_sycophant_chain_fire_councillor_effect = yes # Fire Sycophant from Council for 5 years
		stress_impact = {
			trusting = medium_stress_impact_gain
			just = medium_stress_impact_gain
			stubborn = medium_stress_impact_gain
		}
		if = {
			limit = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
			}
			stress_impact = {
				base = medium_stress_impact_gain
				compassionate = medium_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				base = minor_stress_impact_gain
				compassionate = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_honor = -0.5
				ai_compassion = -0.5
				ai_boldness = -1
			}
		}
	}

	after = {
		create_story = story_sycophant
		random_owned_story = {
			limit = { story_type = story_sycophant }
			set_variable = {
				name = sycophant_character
				value = scope:sycophant_scope
			}
			set_variable = {
				name = jealous_character
				value = scope:jealous_scope
			}
		}
	}
}

# Secret lover exposure
bp1_yearly.8110 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8110.t
	desc = {
		desc = bp1_yearly.8110.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:sycophant_secret
					sex_same_as = scope:sycophant_scope
					NOT = {
						faith = { has_doctrine = doctrine_homosexuality_accepted }
					}
				}
				desc = bp1_yearly.8110.known_secret_homosexual
			}
			triggered_desc = {
				trigger = {
					exists = scope:sycophant_secret
					is_married = yes
					NOT = { is_spouse_of = scope:sycophant_scope }
					trigger_if = {
						limit = { is_male = yes }
						NOT = {
							faith = { has_doctrine = doctrine_adultery_men_accepted }
						}
					}
					trigger_else = {
						NOT = {
							faith = { has_doctrine = doctrine_adultery_women_accepted }
						}
					}
				}
				desc = bp1_yearly.8110.known_secret_adulterer
			}
			desc = bp1_yearly.8110.known_secret_other
		}
	}
	theme = unfriendly
	override_background = { reference = corridor_night }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:revealer_scope
		animation = disapproval
	}
	lower_left_portrait = scope:secondary_scope
	lower_right_portrait = scope:sycophant_scope

	trigger = {
		is_available = yes
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = yes # Sycophant is a Councillor
		any_vassal = {
			NOT = {	this = scope:story.var:sycophant_character }
			NOT = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
			}
			bp1_yearly_8100_jealous_trigger = yes
			OR = {
				any_known_secret = {
					secret_type = secret_lover
					secret_owner = root
					secret_target = scope:story.var:sycophant_character
				}
				intrigue >= decent_skill_rating
			}
		}
		any_secret = { # Requires a Lover Secret
			secret_type = secret_lover
			secret_owner = root
			secret_target = scope:story.var:sycophant_character
		}
	}

	immediate = {
		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
		random_vassal = {
			limit = {
				NOT = {	this = scope:sycophant_scope }
				NOT = {
					has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
				}
				bp1_yearly_8100_jealous_trigger = yes
			}
			weight = {
				base = 1
				modifier = {
					factor = 100
					any_known_secret = {
						secret_type = secret_lover
						secret_owner = root
						secret_target = scope:sycophant_scope
					}
				}
				modifier = {
					factor = 10
					NOT = { is_councillor_of = root }
				}
				modifier = { factor =  intrigue }
				modifier = {
					factor = 10
					has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
				}
			}
			save_scope_as = revealer_scope
 			if = {
				limit = {
					any_secret = {
						secret_type = secret_lover
						is_known_by = root
					}
				}
				random_secret = {
					limit = {
						secret_type = secret_lover
						is_known_by = root
						NOR = {
							secret_owner = root
							secret_target = root
						}
					}
					save_scope_as = revealer_secret
					if = {
						limit = { secret_owner = scope:revealer_scope }
						secret_target = { save_scope_as = secondary_scope }
					}
					else = {
						secret_owner = { save_scope_as = secondary_scope }
					}
				}
			}
		}
		random_secret = {
			limit = {
				secret_type = secret_lover
				secret_owner = root
				secret_target = scope:sycophant_scope
			}
			save_scope_as = sycophant_secret
			# Reveal if not already known
			if = {
				limit = {
					NOT = {
						any_secret_knower = { this = scope:revealer_scope }
					}
				}
				hidden_effect = { reveal_to = scope:revealer_scope }
			}
			# Always shown, for clearer tooltips
			show_as_tooltip = { reveal_to = scope:revealer_scope }
		}
	}

	option = { # Keep this secret
		name = bp1_yearly.8110.c
		trigger = { exists = scope:sycophant_secret }
		flavor = bp1_yearly.8110.c.flavor
		scope:sycophant_secret = { disable_exposure_by = scope:revealer_scope }
		bp1_sycophant_chain_fire_councillor_effect = yes # Fire Sycophant from Council for 5 years and remove Opinion
		stress_impact = {
			honest = medium_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}

	option = { # Bring it on
		name = bp1_yearly.8110.d
		reverse_add_opinion = {
			target = scope:revealer_scope
			modifier = angry_opinion
			opinion = -10
		}
		bp1_sycophant_chain_anger_vassals_effect = yes
		scope:sycophant_secret = { expose_secret = scope:revealer_scope }
		stress_impact = {
			craven = medium_stress_impact_gain
			deceitful = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
				ai_vengefulness = 1
			}
		}
	}

	option = { # Two can play this game
		name = bp1_yearly.8110.e
		trigger = { exists = scope:revealer_secret  }
		progress_towards_rival_effect = {
			REASON = rival_attempted_blackmail
			CHARACTER = scope:revealer_scope
			OPINION = default_rival_opinion
		}
		scope:revealer_secret = { disable_exposure_by = root }
		scope:sycophant_secret = { disable_exposure_by = scope:revealer_scope }
		stress_impact = {
			arrogant = medium_stress_impact_gain
			vengeful = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_rationality = 2
			}
		}
	}
}

scripted_effect bp1_yearly_sycophant_start_seduce_effect = {
	start_scheme = {
		type = seduce
		target_character = scope:sycophant_scope
	}
	hidden_effect = {
		random_scheme = {
			limit = {
				scheme_type = seduce
				scheme_target_character = scope:sycophant_scope
			}
			add_scheme_modifier = { type = sycophant_story_encouraged_seduction_scheme_modifier }
		}
	}
	custom_tooltip = bp1_yearly.8120.seduce
	add_character_modifier = {
		modifier = fanned_flame_modifier
		years = 5
	}
}

scripted_trigger bp1_yearly_8120_sanity_trigger = {
	# Homosexuality sanity checks
	trigger_if = {
		limit = {
			root = {
				sex_same_as = scope:story.var:sycophant_character
				NOT = {
					faith = { has_doctrine = doctrine_homosexuality_accepted }
				}
			}
		}
		OR = {
			is_attracted_to_gender_of = scope:matchmaker_temp
			NOT = { has_trait = zealous }
		}
	}
	# Adultery sanity checks
	trigger_if = {
		limit = {
			root = {
				is_married = yes
				trigger_if = {
					limit = { is_male = yes }
					NOT = {
						faith = { has_doctrine = doctrine_adultery_men_accepted }
					}
				}
				trigger_else = {
					NOT = {
						faith = { has_doctrine = doctrine_adultery_women_accepted }
					}
				}
			}
		}
		OR = {
			has_trait = lustful
			NOT = { has_trait = zealous }
		}
		NOT = { has_trait = chaste }
	}
}

# Become lover
bp1_yearly.8120 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8120.t
	desc = bp1_yearly.8120.desc
	theme = seduction
	override_background = { reference = relaxing_room }
	cooldown = { years = 10 }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_relation_lover = scope:sycophant_scope }
			animation = stress
		}
	}
	right_portrait = {
		character = scope:jealous_scope
		animation = worry
	}
	lower_right_portrait = scope:sycophant_scope

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = yes # Sycophant is a Councillor
		# Can have fun
		NOR = {
			has_trait = celibate
			has_trait = devoted
		}
		scope:story.var:sycophant_character = {

			trigger_if = {
				limit = { is_close_family_of = root }
				root.faith = { has_doctrine = doctrine_consanguinity_unrestricted }
			}
		}
		# Sycophant can have fun
		OR = {
			AND = {
				can_set_relation_lover_trigger = { CHARACTER = scope:story.var:sycophant_character }
				can_start_scheme = {
					type = seduce
					target_character = scope:story.var:sycophant_character
				}
			}
			AND = {
				has_relation_lover = scope:story.var:sycophant_character
				any_secret = {
					secret_type = secret_lover
					secret_target = scope:story.var:sycophant_character
					save_temporary_scope_as = secret_temp
				}
			}
		}
		# Matchmaker exists
		any_vassal = {
			is_available_ai_adult = yes
			is_powerful_vassal = yes
			NOR = {
				is_spouse_of = root
				is_spouse_of = scope:story.var:sycophant_character
				this = scope:story.var:sycophant_character
				has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
				has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
			}
			save_temporary_scope_as = matchmaker_temp
			# Is not aware of a secret relationship
			trigger_if = {
				limit = { exists = scope:secret_temp }
				NOT = {
					scope:secret_temp = { is_known_by = scope:matchmaker_temp }
				}
			}
			bp1_yearly_8120_sanity_trigger = yes # Avoids people who are bothered by homosexuality or adultery from being ok with it
		}
	}

	immediate = {
		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
		# Save Matchmaker
		random_vassal = {
			limit = {
				is_available_ai_adult = yes
				is_powerful_vassal = yes
				NOR = {
					is_spouse_of = root
					is_spouse_of = scope:story.var:sycophant_character
					this = scope:story.var:sycophant_character
					has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
				}
				NOT = {
					any_known_secret = {
						secret_type = secret_lover
						OR = {
							secret_owner = root
							secret_owner = scope:story.var:sycophant_character
						}
						OR = {
							secret_target = root
							secret_target = scope:story.var:sycophant_character
						}
					}
				}
				bp1_yearly_8120_sanity_trigger = yes # Avoids people who are bothered by homosexuality or adultery from being ok with it
			}
			weight = {
				base = 10
				modifier = {
					factor = 5
					OR = {
						has_trait = fornicator
						has_trait = adulterer
						has_trait = lustful
						has_trait = rakish
					}
				}
			}
			save_scope_as = matchmaker_scope
		}
	}

	option = { # Dismiss
		name = bp1_yearly.8120.a
		flavor = bp1_yearly.8120.a.flavor
		trigger = {
			NOT = { has_trait = calm }
		}
		reverse_add_opinion = {
			target = scope:matchmaker_scope
			modifier = insulted_opinion
			opinion = -10
		}
		stress_impact = {
			compassionate = minor_stress_impact_gain
			lustful = minor_stress_impact_gain
		}
		if = {
			limit = { has_relation_lover = scope:sycophant_scope }
			stress_impact = {
				honest = minor_stress_impact_gain
				confider = medium_stress_impact_gain
			}
		}
		trigger_event = {
			id = bp1_yearly.8121
			days = { 7 14 }
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = -1
				ai_honor = 0.5
				ai_rationality = 0.5
			}
		}
	}

	option = { # Deny
		name = bp1_yearly.8120.b
		flavor = bp1_yearly.8120.b.flavor
		trigger = {
			NOT = { has_trait = wrathful }
		}
		# Homosexuality stress
		if = {
			limit = {
				sex_same_as = scope:sycophant_scope
				NOT = {
					faith = { has_doctrine = doctrine_homosexuality_accepted }
				}
			}
			stress_impact = { zealous = minor_stress_impact_gain }
		}
		# Adultery stress
		if = {
			limit = {
				is_married = yes
				trigger_if = {
					limit = { is_male = yes }
					NOT = {
						faith = { has_doctrine = doctrine_adultery_men_accepted }
					}
				}
				trigger_else = {
					NOT = {
						faith = { has_doctrine = doctrine_adultery_women_accepted }
					}
				}
			}
			stress_impact = { zealous = minor_stress_impact_gain }
		}
		if = {
			limit = { has_relation_lover = scope:sycophant_scope }
			stress_impact = {
				honest = minor_stress_impact_gain
				confider = medium_stress_impact_gain
			}
		}
		stress_impact = {
			lustful = minor_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		trigger_event = {
			id = bp1_yearly.8121
			days = { 7 14 }
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = -1
				ai_honor = 1
				ai_rationality = 0.5
			}
		}
	}

	option = { # Admit
		name = bp1_yearly.8120.c
		trigger = {
			NOT = {	has_relation_lover = scope:sycophant_scope }
		}
		flavor = bp1_yearly.8120.c.flavor
		bp1_sycophant_chain_fire_councillor_effect = yes # Fire Sycophant from Council for 5 years and remove Opinion
		bp1_yearly_sycophant_start_seduce_effect = yes # Start seduce scheme with bonus success chance
		# Homosexuality stress
		if = {
			limit = {
				sex_same_as = scope:sycophant_scope
				NOT = {
					faith = { has_doctrine = doctrine_homosexuality_accepted }
				}
			}
			if = {
				limit = {
					any_secret = {
						secret_type = secret_homosexual
						NOT = {
							any_secret_knower = { this = scope:matchmaker_scope }
						}
					}
				}
				random_secret = {
					limit = {
						secret_type = secret_homosexual
						NOT = {
							any_secret_knower = { this = scope:matchmaker_scope }
						}
					}
					reveal_to = scope:matchmaker_scope
				}
			}
			stress_impact = { zealous = minor_stress_impact_gain }
		}
		# Adultery stress
		if = {
			limit = {
				is_married = yes
				trigger_if = {
					limit = { is_male = yes }
					NOT = {
						faith = { has_doctrine = doctrine_adultery_men_accepted }
					}
				}
				trigger_else = {
					NOT = {
						faith = { has_doctrine = doctrine_adultery_women_accepted }
					}
				}
			}
			stress_impact = { zealous = minor_stress_impact_gain }
		}
		stress_impact = {
			craven = minor_stress_impact_gain
			chaste = minor_stress_impact_gain
			shy = minor_stress_impact_gain
			rakish = medium_stress_impact_loss
			confider = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 1
				ai_rationality = -0.5
			}
		}
	}

	option = { # Confess
		name = bp1_yearly.8120.d
		trigger = {
			any_secret = {
				secret_type = secret_lover
				secret_target = scope:sycophant_scope
			}
		}
		flavor = bp1_yearly.8120.d.flavor
		random_secret = {
			limit = {
				secret_type = secret_lover
				secret_target = scope:sycophant_scope
			}
			reveal_to = scope:matchmaker_scope
		}
		# Homosexuality stress
		if = {
			limit = {
				sex_same_as = scope:sycophant_scope
				NOT = {
					faith = { has_doctrine = doctrine_homosexuality_accepted }
				}
			}
			if = {
				limit = {
					any_secret = {
						secret_type = secret_homosexual
						NOT = {
							any_secret_knower = { this = scope:matchmaker_scope }
						}
					}
				}
				random_secret = {
					limit = {
						secret_type = secret_homosexual
						NOT = {
							any_secret_knower = { this = scope:matchmaker_scope }
						}
					}
					reveal_to = scope:matchmaker_scope
				}
			}
			stress_impact = { zealous = minor_stress_impact_gain }
		}
		# Adultery stress
		if = {
			limit = {
				is_married = yes
				trigger_if = {
					limit = { is_male = yes }
					NOT = {
						faith = { has_doctrine = doctrine_adultery_men_accepted }
					}
				}
				trigger_else = {
					NOT = {
						faith = { has_doctrine = doctrine_adultery_women_accepted }
					}
				}
			}
			stress_impact = { zealous = minor_stress_impact_gain }
		}
		stress_impact = {
			craven = minor_stress_impact_gain
			humble = minor_stress_impact_gain
			deceitful = minor_stress_impact_gain
			confider = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 1
				ai_rationality = -1
			}
		}
	}
}

# Pondering attraction
bp1_yearly.8121 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8121.t
	desc = {
		desc = bp1_yearly.8121.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					sex_same_as = scope:sycophant_scope
					NOT = {
						faith = { has_doctrine = doctrine_homosexuality_accepted }
					}
				}
				desc = bp1_yearly.8121.homosexual
			}
			triggered_desc = {
				trigger = {
					is_married = yes
					trigger_if = {
						limit = { is_male = yes }
						NOT = {
							faith = { has_doctrine = doctrine_adultery_men_accepted }
						}
					}
					trigger_else = {
						NOT = {
							faith = { has_doctrine = doctrine_adultery_women_accepted }
						}
					}
				}
				desc = bp1_yearly.8121.adultery
			}
			desc = bp1_yearly.8121.other
		}
		desc = bp1_yearly.8121.desc
	}
	theme = seduction
	override_background = { reference = bedchamber }
	left_portrait = {
		character = root
		animation = stress
		outfit_tags = { nightgown }
	}
	lower_center_portrait = scope:matchmaker_scope
	lower_right_portrait = scope:sycophant_scope
	lower_left_portrait = {
		trigger = {
			is_married = yes
			trigger_if = {
				limit = { is_male = yes }
				NOT = {
					faith = { has_doctrine = doctrine_adultery_men_accepted }
				}
			}
			trigger_else = {
				NOT = {
					faith = { has_doctrine = doctrine_adultery_women_accepted }
				}
			}
		}
		character = primary_spouse
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = yes # Sycophant is a Councillor
		can_set_relation_lover_trigger = { CHARACTER = scope:sycophant_scope }
		can_start_scheme = {
			type = seduce
			target_character = scope:sycophant_scope
		}
	}

	option = { # Give in
		name = bp1_yearly.8121.a
		flavor = bp1_yearly.8121.a.flavor
		bp1_yearly_sycophant_start_seduce_effect = yes
		stress_impact = {
			base = minor_stress_impact_loss
			chaste = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_boldness = 1
			}
		}
	}

	option = { # Be strong
		name = {
			trigger = { has_relation_friend = scope:sycophant_scope }
			text = bp1_yearly.8121.b.friend
		}
		name = {
			trigger = {
				NOT = { has_relation_friend = scope:sycophant_scope }
			}
			text = bp1_yearly.8121.b
		}
		flavor = bp1_yearly.8121.b.flavor
		stress_impact = {
			base = minor_stress_impact_gain
			lustful = medium_stress_impact_gain
			rakish = medium_stress_impact_gain
			fickle = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = -1
			}
		}
	}
}

# Assassination
bp1_yearly.8130 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8130.t
	desc = bp1_yearly.8130.desc
	theme = unfriendly
	override_background = { reference = bedchamber }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:sycophant_scope
		animation = paranoia
	}
	lower_left_portrait = {
		trigger = {
			exists = scope:spymaster_scope
			NOT = { scope:spymaster_scope = scope:sycophant_scope }
		}
		character = scope:spymaster_scope
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = yes # Sycophant is a Councillor
 		any_vassal = {
			is_available_ai_adult = yes
			is_powerful_vassal = yes
			NOR = {
				this = scope:story.var:sycophant_character
				is_consort_of = scope:story.var:sycophant_character
				is_close_or_extended_family_of = scope:story.var:sycophant_character
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
			}
			opinion = {
				target = scope:story.var:sycophant_character
				value < 25
			}
			NOR = {
				has_trait = just
				has_trait = compassionate
				has_trait = content
				has_trait = forgiving
				has_trait = humble
			}
			OR = {
				is_scheming_against = {
					target = scope:story.var:sycophant_character
					type = murder
				}
				can_start_scheme = {
					target_character = scope:story.var:sycophant_character
					type = murder
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			any_vassal = {
				is_powerful_vassal = yes
				has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
			}
		}
		modifier = {
			factor = 2
			scope:story.var:sycophant_character = { has_trait = paranoid }
		}
		modifier = {
			factor = 0.5
			scope:story.var:sycophant_character = { has_trait = trusting }
		}
		modifier = {
			factor = 0.5
			scope:story.var:sycophant_character = { has_trait = intellect_bad }
		}
	}

	immediate = {
		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
		# Find murderer
 		random_vassal = {
			limit = {
				is_available_ai_adult = yes
				is_powerful_vassal = yes
				NOR = {
					this = scope:sycophant_scope
					is_consort_of = scope:sycophant_scope
					is_close_or_extended_family_of = scope:sycophant_scope
					has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
				}
				opinion = {
					target = scope:story.var:sycophant_character
					value < 25
				}
				NOR = {
					has_trait = just
					has_trait = compassionate
					has_trait = content
					has_trait = forgiving
					has_trait = humble
				}
				OR = {
					is_scheming_against = {
						target = scope:sycophant_scope
						type = murder
					}
					can_start_scheme = {
						target_character = scope:sycophant_scope
						type = murder
					}
				}
			}
			weight = {
				base = 1
				modifier = {
					factor = 10
					has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
				}
			}
			save_scope_as = murderous_scope
			# Start Scheme if neccessary
			if = {
				limit = {
					NOT = {
						is_scheming_against = {
							target = scope:sycophant_scope
							type = murder
						}
					}
				}
				hidden_effect = {
					start_scheme = {
						type = murder
						target_character = scope:sycophant_scope
					}
				}
			}
			# Save Scheme
			scope:sycophant_scope = {
				random_targeting_scheme = {
					limit = {
						scheme_type = murder
						OR = {
							scheme_owner = scope:murderous_scope
							any_scheme_agent_character = { this = scope:murderous_scope }
						}
					}
					save_scope_as = sycophant_scheme
				}
			}
		}
		# Save Spymaster
		if = {
			limit = { exists = cp:councillor_spymaster }
			cp:councillor_spymaster = { save_scope_as = spymaster_scope }
		}
	}

	option = { # Dismiss
		name = {
			trigger = {
				NOT = {
					scope:sycophant_scope = { has_trait = paranoid }
				}
			}
			text = bp1_yearly.8130.a
		}
		name = {
			trigger = {
				scope:sycophant_scope = { has_trait = paranoid }
			}
			text = bp1_yearly.8130.a.paranoid
		}
		flavor = bp1_yearly.8130.a.flavor
		reverse_add_opinion = {
			modifier = ignored_opinion
			target = scope:sycophant_scope
			opinion = -10
		}
		bp1_sycophant_chain_downgrade_effect = yes
		stress_impact = {
			paranoid = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
			generous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}

	option = { # Personal bodyguard
		name = bp1_yearly.8130.b
		flavor = bp1_yearly.8132.a.flavor
		remove_short_term_gold = minor_gold_value
		scope:sycophant_scope = {
			add_character_modifier = {
				modifier = personal_guard_modifier
				years = 5
			}
		}
		progress_towards_friend_effect = {
			REASON = friend_saved_life
			CHARACTER = scope:sycophant_scope
			OPINION = 0
		}
		reverse_add_opinion = {
			modifier = protected_me_opinion
			target = scope:sycophant_scope
			opinion = 10
		}
		stress_impact = {
			trusting = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = -1
				ai_compassion = 1
				ai_boldness = 0.5
				ai_rationality = 0.5
			}
		}
	}

	option = { # Spymaster investigates
		name = bp1_yearly.8130.c
		trigger = {
			exists = scope:spymaster_scope
			NOT = { scope:spymaster_scope = scope:sycophant_scope }
		}
		flavor = bp1_yearly.8130.c.flavor
		scope:spymaster_scope = {
			save_scope_as = investigator_scope
			duel = {
				skill = intrigue
				value = scope:murderous_scope.intrigue
				10 = {
					show_chance = no
					desc = bp1_yearly.8130.c.success
					compare_modifier = {
						value = scope:duel_value
						multiplier = 1.5
					}
					modifier = {
						scope:spymaster_scope = scope:murderous_scope
						factor = 0
					}
					show_as_tooltip = {
						add_character_modifier = {
							modifier = effective_agents_modifier
							years = 5
						}
					}
					root = {
						custom_tooltip = bp1_yearly.8130.exposed
						trigger_event = {
							id = bp1_yearly.8131
							days = { 7 14 }
						}
					}
				}
				10 = {
					show_chance = no
					desc = bp1_yearly.8130.c.failure
					compare_modifier = {
						value = scope:duel_value
						multiplier = -1.5
					}
					modifier = {
						factor = 0
						scope:sycophant_scheme = {
							any_scheme_agent_character = { this = scope:spymaster_scope }
						}
					}
					show_as_tooltip = {
						add_character_modifier = {
							modifier = spyamateur_modifier
							years = 5
						}
					}
					root = {
						trigger_event = {
							id = bp1_yearly.8132
							days = { 7 14 }
						}
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_vengefulness = 1
				ai_rationality = 1
			}
		}
	}

	option = { # Sycophant investigates
		name = bp1_yearly.8130.d
		trigger = {
			exists = scope:spymaster_scope
			scope:spymaster_scope = scope:sycophant_scope
		}
		flavor = bp1_yearly.8130.d.flavor
		scope:spymaster_scope = {
			save_scope_as = investigator_scope
			duel = {
				skill = intrigue
				value = scope:murderous_scope.intrigue
				12 = {
					show_chance = no
					desc = bp1_yearly.8130.d.success
					compare_modifier = {
						value = scope:duel_value
						multiplier = 1.5
					}
					modifier = {
						scope:spymaster_scope = scope:murderous_scope
						factor = 0
					}
					show_as_tooltip = {
						add_character_modifier = {
							modifier = effective_agents_modifier
							years = 5
						}
					}
					root = {
						custom_tooltip = bp1_yearly.8130.exposed
						trigger_event = {
							id = bp1_yearly.8131
							days = { 7 14 }
						}
					}
					min = 5
				}
				10 = {
					show_chance = no
					desc = bp1_yearly.8130.c.failure
					compare_modifier = {
						value = scope:duel_value
						multiplier = -1.5
					}
					show_as_tooltip = {
						add_character_modifier = {
							modifier = spyamateur_modifier
							years = 5
						}
					}
					root = {
						custom_tooltip = bp1_yearly.8130.progress
						trigger_event = {
							id = bp1_yearly.8132
							days = { 7 14 }
						}
					}
					min = 5
				}
				5 = {
					show_chance = no
					desc = bp1_yearly.8130.d.failure
					compare_modifier = {
						value = scope:duel_value
						multiplier = -1.5
					}
					show_as_tooltip = {
						death = { death_reason = death_disappearance }
					}
					root = {
						trigger_event = {
							id = bp1_yearly.8134
							days = { 7 14 }
						}
					}
					min = 1
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_vengefulness = 1
				ai_rationality = 1
			}
		}
	}

	option = { # Personal investigate
		name = bp1_yearly.8130.e
		flavor = bp1_yearly.8130.e.flavor
		skill = intrigue
		save_scope_as = investigator_scope
		duel = {
			skill = intrigue
			value = scope:murderous_scope.intrigue
			10 = {
				show_chance = no
				desc = bp1_yearly.8130.e.success
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1.5
				}
				modifier = {
					scope:spymaster_scope = scope:murderous_scope
					factor = 0
				}
				custom_tooltip = bp1_yearly.8130.exposed
				show_as_tooltip = {
					add_dread = minor_dread_gain
					add_prestige = miniscule_prestige_gain
					reverse_add_opinion = {
						target = scope:sycophant_scope
						modifier = impressed_opinion
						opinion = 10
					}
					random = {
						chance = 25
						upgrade_to_friend_effect = { CHARACTER = scope:sycophant_scope REASON = friend_uncovered_plot }
					}
				}
				trigger_event = {
					id = bp1_yearly.8131
					days = { 7 14 }
				}
				min = 1
			}
			10 = {
				show_chance = no
				desc = bp1_yearly.8130.e.failure
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1.5
				}
				custom_tooltip = bp1_yearly.8130.progress
				show_as_tooltip = {
					add_prestige = miniscule_prestige_loss
				}
				trigger_event = {
					id = bp1_yearly.8132
					days = { 7 14 }
				}
				min = 1
			}
		}
		stress_impact = {
			lazy = minor_stress_impact_gain
			honest = minor_stress_impact_gain
			calm = minor_stress_impact_gain
			patient = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 2
				ai_vengefulness = 2
				ai_rationality = 0.5
			}
		}
	}
}

# Red handed
bp1_yearly.8131 = {
	type = character_event
	content_source = dlc_006
	title = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						exists = scope:spymaster_scope
						scope:spymaster_scope = scope:sycophant_scope
					}
					desc = bp1_yearly.8131.t.sycophant
				}
				desc = bp1_yearly.8131.t
			}
		}
	}
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:spymaster_scope
					scope:spymaster = scope:sycophant_scope
				}
				desc = bp1_yearly.8131.desc.sycophant
			}
			triggered_desc = {
				trigger = {
					exists = scope:spymaster_scope
					NOT = { scope:spymaster = scope:sycophant_scope }
				}
				desc = bp1_yearly.8131.desc.spymaster
			}
			desc = bp1_yearly.8131.desc
		}
	}
	theme = unfriendly
	override_background = {
		trigger = {
			exists = scope:spymaster_scope
			scope:spymaster_scope = scope:sycophant_scope
		}
		reference = dungeon
	}
	override_background = {
		trigger = {
			OR = {
				AND = {
					exists = scope:spymaster_scope
					NOT = { scope:spymaster_scope = scope:sycophant_scope }
				}
				NOT = { exists = scope:spymaster_scope }
			}
		}
		reference = council_chamber
	}
	# Left
	left_portrait = {
		character = scope:investigator_scope
		animation = schadenfreude
	}
	# Right
	right_portrait = {
		character = scope:murderous_scope
		animation = prisondungeon
		outfit_tags = { beggar_rags }
	}
	# Lower Right
	lower_right_portrait = {
		trigger = {
			exists = scope:spymaster_scope
			NOT = { scope:spymaster_scope = scope:sycophant_scope  }
		}
		character = scope:murderous_scope
	}
	lower_left_portrait = {
		trigger = {
			NOT = { scope:sycophant_scope = scope:investigator_scope }
		}
		character = scope:sycophant_scope
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes
		exists = scope:sycophant_scope
		exists = scope:murderous_scope
		exists = scope:sycophant_scheme
	}

	immediate = {
		if = {
			limit = { exists = scope:spymaster_scope }
			scope:spymaster_scope = {
				add_character_modifier = {
					modifier = effective_agents_modifier
					years = 5
				}
			}
		}
		else = {
			add_dread = minor_dread_gain
			add_prestige = miniscule_prestige_gain
			reverse_add_opinion = {
				target = scope:sycophant_scope
				modifier = impressed_opinion
				opinion = 10
			}
			random = {
				chance = 25
				upgrade_to_friend_effect = { CHARACTER = scope:sycophant_scope REASON = friend_uncovered_plot }
			}
		}
		custom_tooltip = bp1_yearly.8131.tt
		scope:sycophant_scheme = {
			expose_scheme = yes
			hidden_effect = {
				add_scheme_progress = {
					value = scope:sycophant_scheme.scheme_phase_duration
					multiply = -1
				}
			}
			every_scheme_agent_character = { add_to_list = sycophant_scheme_agents }
		}
		scope:sycophant_scope = {
			remove_friend_or_downgrade_friendship_effect = { SCOPE = scope:murderous_scope }
			progress_towards_rival_effect = {
				REASON = rival_tried_to_kill_me
				CHARACTER = scope:murderous_scope
				OPINION = default_rival_opinion
			}
		}
	}

	option = { # Imprison
		name = bp1_yearly.8131.a
		flavor = bp1_yearly.8131.a.flavor
		rightfully_imprison_character_effect = {
			TARGET = scope:murderous_scope
			IMPRISONER = root
		}
		stress_impact = {
			forgiving = minor_stress_impact_gain
			arbitrary = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_boldness = 1
			}
		}
	}

	option = { # Release
		name = bp1_yearly.8131.b
		flavor = bp1_yearly.8131.b.flavor
		reverse_add_opinion = {
			target = scope:murderous_scope
			modifier = grateful_opinion
			opinion = 10
		}
		if = {
			limit = {
				reverse_has_opinion_modifier = {
					target = scope:sycophant_scope
					modifier = impressed_opinion
				}
			}
			scope:sycophant_scope = {
				remove_opinion = {
					target = root
					modifier = impressed_opinion
				}
			}
		}
		else = {
			reverse_add_opinion = {
				target = scope:sycophant_scope
				modifier = released_attempted_murderer_opinion
			}
		}
		bp1_sycophant_chain_please_vassals_effect = yes # Remove Disgruntled or add Placated (powerful vassal opinion)
		bp1_sycophant_chain_downgrade_effect = yes
		stress_impact = {
			vengeful = minor_stress_impact_gain
			wrathful = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 2
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}

	option = { # Who else is involved?
		name = bp1_yearly.8131.c
		flavor = bp1_yearly.8131.c.flavor
		custom_tooltip = bp1_yearly.8131.torture
		custom_tooltip = bp1_yearly.8131.agent
		if = {
			limit = {
				any_in_list = {
					list = sycophant_scheme_agents
					NOT = { this = scope:murderous_scope }
				}
			}
			hidden_effect = {
				random = {
					chance = 50
					send_interface_toast = {
						desc = bp1_yearly.8131.attempted
						left_icon = scope:agent_scope
						right_icon = scope:sycophant_scope
						random_in_list = {
							list = sycophant_scheme_agents
							limit = {
								NOT = { this = scope:murderous_scope }
							}
							save_scope_as = agent_scope
							attempted_murder_opinion_effect = {
								VICTIM = scope:sycophant_scope
								MURDERER = scope:murderous_scope
							}
						}
					}
				}
			}
		}
		save_scope_as = actor
		scope:murderous_scope = { save_scope_as = recipient }
		torture_interaction_actor_effect = yes
		bp1_sycophant_chain_anger_vassals_effect = yes # Remove Placated or add Disgruntled (powerful vassal opinion)
		stress_impact = {
			compassionate = medium_stress_impact_gain
			just = medium_stress_impact_gain
			calm = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 2
				ai_vengefulness = 2
			}
		}
	}
}

# Failed
bp1_yearly.8132 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8132.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:spymaster_scope
					scope:spymaster = scope:sycophant_scope
				}
				desc = bp1_yearly.8132.desc.sycophant
			}
			triggered_desc = {
				trigger = {
					exists = scope:spymaster_scope
					NOT = { scope:spymaster = scope:sycophant_scope }
				}
				desc = bp1_yearly.8132.desc.spymaster
			}
			desc = bp1_yearly.8132.desc
		}
	}
	theme = unfriendly
	override_background = { reference = council_chamber }
	left_portrait = {
		character = scope:sycophant_scope
		animation = stress
	}
	right_portrait = {
		trigger = {
			exists = scope:spymaster_scope
			NOT = { scope:sycophant_scope = scope:spymaster_scope }
		}
		character = scope:spymaster_scope
		animation = boredom
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes
		exists = scope:sycophant_scope
		exists = scope:murderous_scope
		exists = scope:sycophant_scheme
	}

	immediate = {
		if = {
			limit = { exists = scope:spymaster_scope }
			scope:spymaster_scope = {
				add_character_modifier = {
					modifier = spyamateur_modifier
					years = 5
				}
			}
		}
		else = { add_prestige = miniscule_prestige_loss }
		custom_tooltip = bp1_yearly.8130.progress
		hidden_effect = {
			scope:sycophant_scheme = {
				add_scheme_progress = scope:sycophant_scheme.scheme_phase_duration
				add_scheme_modifier = { type = sycophant_story_failed_scheme_detection_modifier }
			}
		}
	}

	option = { # Guards were a better idea
		name = bp1_yearly.8132.a
		flavor = bp1_yearly.8132.a.flavor
		remove_short_term_gold = minor_gold_value
		scope:sycophant_scope = {
			add_character_modifier = {
				modifier = personal_guard_modifier
				years = 5
			}
		}
		stress_impact = {
			trusting = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = -1
				ai_compassion = 1
				ai_boldness = 0.5
				ai_rationality = 0.5
			}
		}
	}

	option = { # Probably nothing
		name = bp1_yearly.8132.b
		flavor = bp1_yearly.8132.b.flavor
		reverse_add_opinion = {
			target = scope:sycophant_scope
			modifier = disappointed_opinion
			opinion = -10
		}
		bp1_sycophant_chain_downgrade_effect = yes
		stress_impact = {
			paranoid = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
			generous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = 1
				ai_compassion = -1
			}
		}
	}
}

# Critical failure (Sycophant)
bp1_yearly.8134 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8134.t
	desc = bp1_yearly.8134.desc
	theme = unfriendly
	override_background = { reference = council_chamber }
	left_portrait = {
		character = root
		animation = worry
	}
	lower_right_portrait = { character = scope:sycophant_scope  }

	trigger = { bp1_sycophant_chain_base_trigger = yes }

	immediate = {
		unknown_murder_effect = {
			VICTIM = scope:sycophant_scope
			MURDERER = scope:murderous_scope
			REASON = death_disappearance
		}
		stress_impact = { base = medium_stress_impact_gain }
	}

	option = { #
		name = bp1_yearly.8134.a
		flavor = bp1_yearly.8134.a.flavor
	}
}

# Sycophant's revenge
bp1_yearly.8140 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8140.t
	desc = bp1_yearly.8140.desc
	theme = unfriendly
	override_background = { reference = bp1_wine_cellar }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:sycophant_scope
		animation = assassin
	}
	right_portrait = {
		character = root
		animation = eavesdrop
	}
	lower_right_portrait = scope:jealous_scope

	trigger = {
		NOT = {
			is_scheming_against = {
				target = scope:story.var:jealous_character
				type = murder
			}
		}
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = no # Sycophant is NOT a Councillor
		bp1_sycophant_chain_jealous_trigger = yes # Original stirrer is still valid
		scope:story.var:sycophant_character = {
			NOR = {
				is_consort_of = scope:story.var:jealous_character
				is_close_or_extended_family_of = scope:story.var:jealous_character
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:story.var:jealous_character }
				has_trait = just
				has_trait = compassionate
				has_trait = content
				has_trait = forgiving
				has_trait = humble
			}
			OR = {
				is_scheming_against = {
					target = scope:story.var:jealous_character
					type = murder
				}
				can_start_scheme = {
					target_character = scope:story.var:jealous_character
					type = murder
				}
			}
		}
	}

	immediate = {
		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
		scope:sycophant_scope = {
			if = {
				limit = {
					NOT = {
						is_scheming_against = {
							type = murder
							target = scope:jealous_scope
						}
					}
				}
				hidden_effect = {
					start_scheme = {
						type = murder
						target_character = scope:jealous_scope
					}
				}
			}
			random_scheme = {
				limit = {
					scheme_type = murder
					scheme_target_character = scope:jealous_scope
				}
				save_scope_as = sycophant_scheme
			}
			add_secret = {
				type = secret_murder_attempt
				target = scope:jealous_scope
			}
			random_secret = {
				limit = {
					secret_type = secret_murder_attempt
					secret_target = scope:jealous_scope
				}
				reveal_to = root
			}
		}
	}

	option = { # You must stop this!
		name = bp1_yearly.8140.a
		flavor = bp1_yearly.8140.a.flavor
		reverse_add_opinion = {
	  		target = scope:sycophant_scope
	  		modifier = angry_opinion
	  		opinion = -10
	  	}
	  	bp1_sycophant_chain_downgrade_effect = yes
	  	stress_impact = {
			vengeful = medium_stress_impact_gain
			arbitrary = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
				ai_vengefulness = 0.5
			}
		}
	}

	option = { # I like your style
		name = bp1_yearly.8140.b
		trigger = {
			char_can_fit_into_scheme_trigger = { SCHEME = scope:sycophant_scheme }
		}
		flavor = bp1_yearly.8140.b.flavor
		force_assign_character_to_random_agent_slot_effect = {
			SCHEME = scope:sycophant_scheme
			CHAR = scope:sycophant_scope
			YEARS = 20
		}
		reverse_add_opinion = {
			target = scope:sycophant_scope
			modifier = partners_in_crime_opinion
		}
		scope:sycophant_scope = {
			random_secret = {
				limit = {
					secret_type = secret_murder_attempt
					secret_target = scope:jealous_scope
				}
				disable_exposure_by = root
			}
		}
		scope:sycophant_scheme = { add_scheme_progress = scope:sycophant_scheme.scheme_phase_duration }
		stress_impact = {
			just = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
			honest = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 1
			}
		}
	}

	option = { # I didn't see anything
		name = bp1_yearly.8140.c
		flavor = bp1_yearly.8140.c.flavor
	  	scope:sycophant_scheme = {
			add_scheme_modifier = { type = sycophant_story_tolerated_scheme_modifier }
	  	}
	  	stress_impact = {
	  		diligent = minor_stress_impact_gain
	  		compassionate = minor_stress_impact_gain
	  		humble = minor_stress_impact_gain
	  	}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}
}

# Sycophant's joke
bp1_yearly.8160 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8160.t
	desc = bp1_yearly.8160.desc
	theme = unfriendly
	override_background = { reference = garden }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:sycophant_scope
		animation = admiration
	}
	right_portrait = {
		character = scope:jealous_scope
		animation = disapproval
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_jealous_trigger = yes # Original stirrer is still valid
	}

	immediate = {
		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
	}

	option = { # Put duties first
		name = bp1_yearly.8160.a
		flavor = bp1_yearly.8160.a.flavor
		reverse_add_opinion = {
	  		target = scope:sycophant_scope
	  		modifier = annoyed_opinion
	  		opinion = -10
	  	}
	  	bp1_sycophant_chain_downgrade_effect = yes
	  	stress_impact = {
	  		lazy = minor_stress_impact_gain
	  		arrogant = minor_stress_impact_gain
	  	}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_rationality = 1
				ai_boldness = -0.5
			}
		}
	}

	option = { # Get them together
		name = bp1_yearly.8160.b
		trigger = {
			scope:sycophant_scope = {
				can_set_relation_friend_trigger = { CHARACTER = scope:jealous_scope }
				can_set_relation_rival_trigger = { CHARACTER = scope:jealous_scope }
			}
		}
		flavor = bp1_yearly.8160.b.flavor
		scope:sycophant_scope = {
			duel = {
				skill = diplomacy
				target = scope:jealous_scope
				20 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 1.5
					}
					desc = bp1_yearly.8160.b.success
					modifier = {
						add = scope:sycophant_scope.diplomacy
					}
					min = 10
					max = 90
					show_as_tooltip = {
						add_character_modifier = {
							modifier = raconteur_modifier
							years = 5
						}
						progress_towards_friend_effect = {
							REASON = friend_shared_lewd_humor
							CHARACTER = scope:jealous_scope
							OPINION = 20
						}
					}
					root = {
						trigger_event = {
							id = bp1_yearly.8161
							days = { 7 14 }
						}
					}
				}
				20 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -1.5
					}
					desc = bp1_yearly.8160.b.failure
					modifier = {
						add = scope:jealous_scope.diplomacy
					}
					min = 10
					max = 90
					show_as_tooltip = {
						add_character_modifier = {
							modifier = toilet_humor_modifier
							years = 5
						}
						scope:jealous_scope = {
							progress_towards_rival_effect = {
								REASON = rival_misunderstood_lewd_humor
								CHARACTER = scope:sycophant_scope
								OPINION = default_rival_opinion
							}
						}
					}
					root = {
						trigger_event = {
							id = bp1_yearly.8162
							days = { 7 14 }
						}
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 1
				ai_boldness = 1
			}
		}
	}

	option = { # Not now!
		name = bp1_yearly.8160.d
		flavor = bp1_yearly.8160.d.flavor
	  	reverse_add_opinion = {
	  		target = scope:jealous_scope
	  		modifier = respect_opinion
	  		opinion = -10
	  	}
	  	bp1_sycophant_chain_anger_vassals_effect = yes # Remove Placated or add Disgruntled (powerful vassal opinion)
	  	add_character_modifier = {
	  		modifier = welcome_distraction_modifier
	  		years = 5
	  	}
	  	stress_impact = {
	  		diligent = minor_stress_impact_gain
	  		humble = minor_stress_impact_gain
	  	}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_boldness = 1
				ai_vengefulness = 1
			}
		}
	}
}

# Became friends
bp1_yearly.8161 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8161.t
	desc = {
		desc = bp1_yearly.8161.opening
		desc = bp1_yearly.8161.desc
	}
	theme = unfriendly
	override_background = { reference = garden }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:sycophant_scope
		animation = happiness
	}
	right_portrait = {
		character = scope:jealous_scope
		animation = laugh
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_jealous_trigger = yes # Original stirrer is still valid
	}

	immediate = {
		scope:sycophant_scope = {
			add_character_modifier = {
				modifier = raconteur_modifier
				years = 5
			}
			progress_towards_friend_effect = {
				REASON = friend_shared_lewd_humor
				CHARACTER = scope:jealous_scope
				OPINION = 20
			}
		}
	}

	option = { # Hah!
		name = bp1_yearly.8161.a
		flavor = bp1_yearly.8161.a.flavor
		stress_impact = {
			base = minor_stress_impact_loss
		}
	}
}

# Became rivals
bp1_yearly.8162 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8162.t
	desc = bp1_yearly.8162.desc
	theme = unfriendly
	override_background = { reference = garden }
	cooldown = { years = 10 }
	left_portrait = {
		character = root
		animation = stress
	}
	right_portrait = {
		character = scope:sycophant_scope
		animation = eyeroll
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_jealous_trigger = yes # Original stirrer is still valid
	}

	immediate = {
		scope:sycophant_scope = {
			add_character_modifier = {
				modifier = toilet_humor_modifier
				years = 5
			}
			progress_towards_rival_effect = {
				REASON = rival_misunderstood_lewd_humor
				CHARACTER = scope:jealous_scope
				OPINION = default_rival_opinion
			}
		}
	}

	option = { # Why _that_ one?
		name = bp1_yearly.8162.a
		flavor = bp1_yearly.8162.a.flavor
		stress_impact = {
			base = minor_stress_impact_gain
		}
	}
}

scripted_trigger bp1_yearly_sycophant_friendly_trigger = {
	NOT = { this = root }
	liege = root
	is_available_ai_adult = yes
}

# Sycophant's friend
bp1_yearly.8170 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8170.t
	desc = bp1_yearly.8170.desc
	theme = unfriendly
	override_background = { reference = relaxing_room }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:sycophant_scope
		animation = laugh
	}
	right_portrait = {
		character = scope:friendly_scope
		animation = admiration
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		has_any_good_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
		scope:story.var:sycophant_character = {
			OR = {
				any_relation = {
					type = friend
					bp1_yearly_sycophant_friendly_trigger = yes
				}
				any_relation = {
					type = lover
					bp1_yearly_sycophant_friendly_trigger = yes
				}
			}
		}
	}

	immediate = {
		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
		scope:sycophant_scope = {
			hidden_effect = {
				random_list = {
					10 = {
						trigger = {
							any_relation = {
								type = friend
								bp1_yearly_sycophant_friendly_trigger = yes
							}
						}
						random_relation = {
							type = friend
							limit = { bp1_yearly_sycophant_friendly_trigger = yes }
							save_scope_as = friendly_scope
						}
					}
					10 = {
						trigger = {
							any_relation = {
								type = lover
								bp1_yearly_sycophant_friendly_trigger = yes
							}
						}
						random_relation = {
							type = lover
							limit = { bp1_yearly_sycophant_friendly_trigger = yes }
							save_scope_as = friendly_scope
						}
					}
				}
			}
		}
		scope:friendly_scope = {
			progress_towards_rival_effect = {
				CHARACTER = root
				REASON = rival_jealousy_at_court
				OPINION = 0
			}
		}
		random_neighboring_top_liege_realm = {
			weight = {
				base = 10
				modifier = { factor = holder.primary_title.tier } # favor higher rnak realms
			}
			save_scope_as = new_realm
		}
	}

	option = { # Let him go
		name = bp1_yearly.8170.a
		flavor = bp1_yearly.8170.a.flavor
	  	bp1_sycophant_chain_downgrade_effect = yes
	  	stress_impact = {
	  		vengeful = minor_stress_impact_gain
	  		arrogant = minor_stress_impact_gain
	  		gregarious = minor_stress_impact_gain
	  	}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}

	option = { # Attempt to win him
		name = bp1_yearly.8170.b
		flavor = bp1_yearly.8170.b.flavor
		duel = {
			skill = diplomacy
			target = scope:friendly_scope
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1.5
				}
				min = 5
				desc = bp1_yearly.8170.b.success
				send_interface_toast = {
					title = bp1_yearly.8170.b.success
					left_icon = scope:sycophant_scope
					right_icon = scope:friendly_scope
					scope:sycophant_scope = {
						if = {
							limit = { has_relation_friend = scope:friendly_scope }
							remove_friend_or_downgrade_friendship_effect = { SCOPE = scope:friendly_scope }
						}
						else_if = {
							limit = { has_relation_lover = scope:friendly_scope }
							remove_relation_lover = scope:friendly_scope
						}
					}
				}
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1.5
				}
				min = 5
				desc = bp1_yearly.8170.b.failure
				send_interface_toast = {
					title = bp1_yearly.8170.b.failure
					left_icon = scope:sycophant_scope
					right_icon = scope:friendly_scope
					scope:sycophant_scope = {
						if = {
							limit = { has_relation_friend = root }
							remove_friend_or_downgrade_friendship_effect = { SCOPE = root }
						}
						else_if = {
							limit = { has_relation_lover = root }
							remove_relation_lover = root
						}
					}
				}
			}
		}
		scope:friendly_scope = {
			progress_towards_rival_effect = {
				CHARACTER = root
				REASON = rival_jealousy_at_court
				OPINION = 0
			}
		}
		stress_impact = {
			fickle = minor_stress_impact_gain
			vengeful = minor_stress_impact_gain
			humble = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 1
				ai_boldness = -1
			}
		}
	}

	option = { # Kick Sycophant out
		name = bp1_yearly.8170.c
		flavor = bp1_yearly.8170.c.flavor
		downgrade_to_rival_effect = {
			CHARACTER = scope:sycophant_scope
			REASON = rival_council_seat
		}
		scope:sycophant_scope = { move_to_pool_at = scope:new_realm.holder.capital_province }
		bp1_sycophant_chain_please_vassals_effect = yes # Remove Disgruntled or add Placated (powerful vassal opinion)
		hidden_effect = {
			scope:story = { end_story = yes }
		}
		stress_impact = {
			base = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
			forgiving = minor_stress_impact_gain
			calm = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
			}
		}
	}
}

scripted_trigger bp1_yearly_8180_block_trigger = {
	trigger_if = {
		limit = { exists = scope:petition_liege.cp:councillor_$ROLE$ }
		scope:petition_liege.cp:councillor_$ROLE$ = {
			NOT = {
				is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = scope:petition_liege }
			}
		}
	}
	can_be_$ROLE$_trigger = { COURT_OWNER = scope:petition_liege }
}

# Sycophant leaves
bp1_yearly.8180 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8180.t
	desc = bp1_yearly.8180.desc
	theme = unfriendly
	override_background = { reference = study }
	cooldown = { years = 10 }
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:sycophant_scope
		animation = anger
	}
	lower_right_portrait = scope:second_party
	lower_center_portrait = {
		character = scope:jealous_scope
		trigger = {
			exists = scope:second_party
			exists = scope:jealous_scope
			NOT = { scope:second_party = scope:jealous_scope }
		}
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = no # Sycophant is NOT a Councillor
		scope:story.var:sycophant_character = {
			is_capable_adult = yes
			is_imprisoned = no
			is_at_war_with_liege = no
			is_landed = no
			NOT = { has_council_position = councillor_spouse }
			trigger_if = {
				limit = { is_female = yes }
				root.faith = {
					NOT = { has_doctrine_parameter = male_dominated_council }
				}
			}
			trigger_else = {
				root.faith = {
					NOT = { has_doctrine_parameter = female_dominated_council }
				}
			}
		}
	}

	weight_multiplier = {
		base = 10
		modifier = {
			add = 10
			scope:story.var:sycophant_character = { has_trait = ambitious }
		}
		modifier = {
			add = 10
			scope:story.var:sycophant_character = { has_trait = arrogant }
		}
		modifier = {
			add = -5
			scope:story.var:sycophant_character = { has_trait = humble }
		}
		modifier = {
			add = -5
			scope:story.var:sycophant_character = { has_trait = content }
		}
	}

	immediate = {
		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
		save_scope_as = petition_liege # for reusing scripted effects
		scope:sycophant_scope = {
			save_scope_as = petition_vassal # for reusing scripted effects
		}
		petition_liege_save_council_seat_effect = {
			JOB_TAKER = scope:sycophant_scope
			LIEGE = root
		}
		random_neighboring_top_liege_realm = {
			weight = {
				base = 10
				modifier = { factor = holder.primary_title.tier } # favor higher rnak realms
			}
			save_scope_as = new_realm
		}
	}

	option = { # Grant council job back
		name = bp1_yearly.8180.a
		flavor = bp1_yearly.8180.a.flavor
		# Petition Scopes for resusing scripted effects
		if = {
			limit = {
				exists = scope:second_party
				scope:second_party = { is_councillor = yes }
			}
			scope:petition_liege = { fire_councillor = scope:second_party }
			scope:second_party = {
				progress_towards_rival_effect = {
					CHARACTER = scope:petition_vassal
					REASON = rival_council_seat
					OPINION = 0
				}
				add_opinion = {
					target = scope:petition_vassal
					modifier = annoyed_opinion
					opinion = -10
				}
				add_opinion = {
					target = scope:petition_liege
					modifier = annoyed_opinion
					opinion = -10
				}
			}
		}
		if = {
			limit = { has_variable = block_hire_councillor }
			remove_variable = block_hire_councillor
		}
		scope:petition_liege = {
			switch = {
				trigger = scope:petition_vassal.var:petition_liege_council_first
				flag:chancellor = {
					assign_councillor_type = {
						type = councillor_chancellor
						target = scope:petition_vassal
					}
				}
				flag:marshal = {
					assign_councillor_type = {
						type = councillor_marshal
						target = scope:petition_vassal
					}
				}
				flag:steward = {
					assign_councillor_type = {
						type = councillor_steward
						target = scope:petition_vassal
					}
				}
				flag:spymaster = {
					assign_councillor_type = {
						type = councillor_spymaster
						target = scope:petition_vassal
					}
				}
				flag:court_chaplain = {
					assign_councillor_type = {
						type = councillor_court_chaplain
						target = scope:petition_vassal
					}
				}
			}
		}
		scope:sycophant_scope = {
			block_firing_councillor_effect = { COURT_OWNER = root }
		}
		bp1_sycophant_chain_anger_vassals_effect = yes # Remove Disgruntled or add Placated (powerful vassal opinion)
		stress_impact = {
			stubborn = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			just = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 2
				ai_rationality = -1
			}
		}
	}

	option = { # Persuade to stay
		name = bp1_yearly.8180.b
		flavor = bp1_yearly.8180.b.flavor
		duel = {
			skill = diplomacy
			value = decent_skill_rating
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1.5
				}
				desc = bp1_yearly.8180.b.success
				send_interface_toast = {
					title = bp1_yearly.8180.b.success
					left_icon = scope:sycophant_scope
					reverse_add_opinion = {
						target = scope:sycophant_scope
						modifier = mollified_opinion
					}
				}
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1.5
				}
				desc = bp1_yearly.8180.b.failure
				send_interface_toast = {
					title = bp1_yearly.8180.b.failure
					left_icon = scope:sycophant_scope
					right_icon = scope:new_realm.holder
					scope:sycophant_scope = { move_to_pool_at = scope:new_realm.holder.capital_province }
				}
			}
		}
		stress_impact = {
			fickle = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 1
				ai_rationality = 0.5
			}
		}
	}

	option = { # Goodbye
		name = bp1_yearly.8180.c
		flavor = bp1_yearly.8180.c.flavor
		downgrade_to_rival_effect = {
			CHARACTER = scope:sycophant_scope
			REASON = rival_council_seat
		}
		scope:sycophant_scope = { move_to_pool_at = scope:new_realm.holder.capital_province }
		bp1_sycophant_chain_please_vassals_effect = yes # Remove Disgruntled or add Placated (powerful vassal opinion)
		hidden_effect = {
			scope:story = { end_story = yes }
		}
		stress_impact = {
			base = medium_stress_impact_gain
			compassionate = minor_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}

	option = { # Arrest
		name = bp1_yearly.8180.d
		flavor = bp1_yearly.8180.d.flavor
		downgrade_to_rival_effect = {
			CHARACTER = scope:sycophant_scope
			REASON = rival_council_seat
		}
		rightfully_imprison_character_effect = {
			TARGET = scope:sycophant_scope
			IMPRISONER = root
		}
		bp1_sycophant_chain_please_vassals_effect = yes # Remove Disgruntled or add Placated (powerful vassal opinion)
		hidden_effect = {
			scope:story = { end_story = yes }
		}
		stress_impact = {
			forgiving = medium_stress_impact_gain
			just = minor_stress_impact_gain
		}
		if = {
			limit = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
			}
			stress_impact = {
				base = medium_stress_impact_gain
				compassionate = medium_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				base = minor_stress_impact_gain
				compassionate = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
				ai_vengefulness = 1
			}
		}
	}
}

# Praise for Sycophant
bp1_yearly.8190 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8190.t
	desc = {
		desc = bp1_yearly.8190.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:jealous_scope = {
	 					is_alive = yes
	 					liege = root
	 					NOT = {
	 						has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
	 					}
	 				}
				}
				desc = bp1_yearly.8190.twitch
			}
			desc = bp1_yearly.8190.desc
		}
	}
	theme = friendly
	override_background = { reference = courtyard }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:sycophant_scope
		animation = admiration
	}
	right_portrait = {
		character = scope:friendly_scope
		animation = flirtation
	}
	lower_right_portrait = {
		trigger = {
			scope:jealous_scope = {
				is_alive = yes
				liege = root
			}
		}
		character = scope:jealous_scope
	}

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = yes # Sycophant is a Councillor
		any_vassal = {
			is_available_ai_adult = yes
			is_powerful_vassal = yes
			NOR = {
				this = scope:story.var:sycophant_character
				this = scope:story.var:jealous_character
				has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
				has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
			}
		}
	}

	immediate = {
 		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
 		random_vassal = {
 			limit = {
 				is_available_ai_adult = yes
				is_powerful_vassal = yes
				NOR = {
					this = scope:story.var:sycophant_character
					this = scope:story.var:jealous_character
					has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
					has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
				}
 			}
 			save_scope_as = friendly_scope
 		}
 		if = {
 			limit = {
 				exists = scope:jealous_scope
 				scope:jealous_scope = {
 					is_alive = yes
 					liege = root
 				}
 			}
 			scope:jealous_scope = {
	 			progress_towards_rival_effect = {
	 				REASON = rival_bickering
					CHARACTER = scope:sycophant_scope
					OPINION = default_rival_opinion
				}
			}
 		}
		scope:sycophant_scope = {
			progress_towards_friend_effect = {
				REASON = friend_took_side_in_dispute
				CHARACTER = scope:friendly_scope
				OPINION = 10
			}
		}
		bp1_sycophant_chain_please_vassals_effect = yes # Remove Disgruntled or add Placated (powerful vassal opinion)
	}

	option = { # I like you
		name = bp1_yearly.8190.a
		flavor = bp1_yearly.8190.a.flavor
		stress_impact = {
			gregarious = minor_stress_impact_gain
			generous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = -1
				ai_greed = 1
			}
		}
	}

	option = { # Let's have a party
		name = bp1_yearly.8190.b
		flavor = bp1_yearly.8190.b.flavor
		progress_towards_friend_effect = {
			REASON = friend_took_side_in_dispute
			CHARACTER = scope:friendly_scope
			OPINION = 10
		}
		remove_short_term_gold = minor_gold_value
		stress_impact = {
			shy = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 1
				ai_boldness = 0.5
				ai_greed = -1
			}
		}
	}
}

# Sycophant requests honors
bp1_yearly.8191 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8191.t
	desc = {
		desc = bp1_yearly.8191.opening
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:old_holder }
				desc = bp1_yearly.8191.taken
			}
		   	desc = bp1_yearly.8191.open
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:sycophant_scope = { has_trait = arrogant }
				}
				desc = bp1_yearly.8191.arrogant
			}
		   	desc = bp1_yearly.8191.other
		}
		desc = bp1_yearly.8191.desc
	}
	theme = unfriendly
	override_background = { reference = council_chamber }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:sycophant_scope
		animation = flirtation
	}
	right_portrait = {
		character = scope:annoyed_scope
		animation = stress
	}

	trigger = {
		has_royal_court = yes
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = yes # Sycophant is a Councillor
		scope:story.var:sycophant_character = { can_be_employed_in_any_court_position_trigger = yes }
		any_councillor = {
			NOR = {
				this = scope:story.var:sycophant_character
				is_consort_of = scope:story.var:sycophant_character
				is_close_or_extended_family_of = scope:story.var:sycophant_character
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			scope:story.var:sycophant_character = { has_trait = arrogant }
		}
		modifier = {
			factor = 0.5
			scope:story.var:sycophant_character = { has_trait = humble }
		}
	}

	immediate = {
 		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
 		scope:sycophant_scope = {
	 		court_position_generator_effect = { VAR = target EMPLOYER = root }
			court_position_generator_effect = { VAR = backup EMPLOYER = root }
		}
		random_vassal = {
			limit = {
				NOR = {
					trigger_if = {
						limit = { exists = scope:old_holder }
						this = scope:old_holder
					}
					this = scope:story.var:sycophant_character
					is_consort_of = scope:story.var:sycophant_character
					is_close_or_extended_family_of = scope:story.var:sycophant_character
					has_any_good_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
				}
			}
			weight = {
				base = 1
				modifier = {
					factor = 10
					is_powerful_vassal = yes
				}
				modifier = {
					factor = 5
					has_trait = ambitious
				}
				modifier = {
					factor = 5
					has_trait = irritable
				}
				modifier = {
					factor = 5
					has_trait = wrathful
				}
			}
			save_scope_as = annoyed_scope
			set_variable = {
				name = target_court_position
				value = scope:sycophant_scope.var:target_court_position
			}
			progress_towards_rival_effect = {
				REASON = rival_jealousy_at_court
				CHARACTER = scope:sycophant_scope
				OPINION = default_rival_opinion
			}
		}
	}

	option = { # Give job
	   name = bp1_yearly.8191.a
		trigger = {
	   		NOT = { exists = scope:old_holder }
	   	}
	   	flavor = bp1_yearly.8191.a.flavor
	   	reverse_add_opinion = {
	   		target = scope:sycophant_scope
	   		modifier = grateful_opinion
	   		opinion = 10
	   	}
		court_position_generator_assignment_effect = { VAR = target CANDIDATE = scope:sycophant_scope EMPLOYER = root }
		bp1_sycophant_chain_anger_vassals_effect = yes
		stress_impact = {
			just = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 0.5
				ai_greed = -0.5
			}
		}
	}

	option = { # Give taken job
		name = bp1_yearly.8191.b
		trigger = { exists = scope:old_holder }
		flavor = bp1_yearly.8191.b.flavor
		reverse_add_opinion = {
	   		target = scope:sycophant_scope
	   		modifier = grateful_opinion
	   		opinion = 10
	   	}
		court_position_generator_assignment_effect = { VAR = target CANDIDATE = scope:sycophant_scope EMPLOYER = root }
		scope:old_holder = {
			progress_towards_rival_effect = {
				REASON = rival_jealousy_at_court
				CHARACTER = scope:sycophant_scope
				OPINION = default_rival_opinion
			}
		}
		bp1_sycophant_chain_anger_vassals_effect = yes
		stress_impact = {
			greedy = minor_stress_impact_gain
			just = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_boldness = 1
				ai_greed = -0.5
				ai_honor = -0.5
			}
		}
	}

	option = { # Give open job
		name = bp1_yearly.8191.c
		trigger = {
			exists = scope:old_holder
			scope:sycophant_scope = { has_variable = backup_court_position }
		}
		flavor = bp1_yearly.8191.c.flavor
		reverse_add_opinion = {
	   		target = scope:sycophant_scope
	   		modifier = grateful_opinion
	   		opinion = 5
	   	}
		court_position_generator_assignment_effect = { VAR = backup CANDIDATE = scope:sycophant_scope EMPLOYER = root }
		stress_impact = {
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
				ai_vengefulness = 0.5
				ai_greed = -1
			}
		}
	}

	option = { # Give to annoyed
		name = bp1_yearly.8191.d
		trigger = {
			trigger_if = {
				limit = { exists = scope:old_holder }
				NOT = { scope:annoyed_scope = scope:old_holder }
			}
		}
		flavor = bp1_yearly.8191.d.flavor
		reverse_add_opinion = {
			target = scope:annoyed_scope
			modifier = pleased_opinion
			opinion = 10
		}
		court_position_generator_assignment_effect = { VAR = target CANDIDATE = scope:annoyed_scope EMPLOYER = root }
		reverse_add_opinion = {
			target = scope:sycophant_scope
			modifier = angry_opinion
			opinion = -10
		}
		bp1_sycophant_chain_please_vassals_effect = yes
		bp1_sycophant_chain_downgrade_effect = yes
		stress_impact = {
			greedy = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = -1
				ai_greed = -0.5
			}
		}
	}

	option = { # Refuse
		name = bp1_yearly.8191.e
		flavor = bp1_yearly.8191.e.flavor
		reverse_add_opinion = {
			target = scope:sycophant_scope
			modifier = annoyed_opinion
			opinion = -10
		}
		bp1_sycophant_chain_please_vassals_effect = yes
		stress_impact = {
			arbitrary = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
			fickle = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_boldness = -1
				ai_greed = 1
			}
		}
	}
}

# Sycophant sucks
bp1_yearly.8192 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.8192.t
	desc = bp1_yearly.8192.desc
	theme = unfriendly
	override_background = { reference = relaxing_room }
	cooldown = { years = 10 }
	left_portrait = {
		character = scope:insulting_scope
		animation = anger
	}
	lower_right_portrait = { character = scope:sycophant_scope }

	trigger = {
		bp1_sycophant_chain_base_trigger = yes # Requires Sycophant
		bp1_sycophant_chain_councillor_trigger = yes # Sycophant is a Councillor
		scope:story.var:sycophant_character = {
			councillor_is_unskilled_trigger = { EMPLOYER = root }
		}
		any_councillor = {
			NOT = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:story.var:sycophant_character }
			}
			bp1_yearly_8100_jealous_trigger = yes
		}
	}

	immediate = {
 		bp1_sycophant_chain_scope_effect = yes # Save Sycophant and jealous scopes
 		random_councillor = {
 			limit = {
 				NOT = {
					has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
				}
				bp1_yearly_8100_jealous_trigger = yes
			}
 			save_scope_as = insulting_scope
 		}
 		scope:insulting_scope = {
 			progress_towards_rival_effect = {
				REASON = rival_jealousy_at_court
				CHARACTER = scope:sycophant_scope
				OPINION = default_rival_opinion
			}
		}
	}

	option = { # Fire Sycophant
		name = bp1_yearly.8192.a
		bp1_sycophant_chain_fire_councillor_effect = yes # Fire Sycophant from Council for 5 years and remove Opinion
		if = {
			limit = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = scope:sycophant_scope }
			}
			stress_impact = {
				base = medium_stress_impact_gain
				compassionate = medium_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				base = minor_stress_impact_gain
				compassionate = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
				ai_vengefulness = 0.5
			}
		}
	}

	option = { # Fire
		name = bp1_yearly.8192.b
		hidden_effect = { fire_councillor = scope:insulting_scope }
		scope:insulting_scope = {
			block_hiring_councillor_effect = { COURT_OWNER = root }
		}
		custom_tooltip = bp1_yearly.8192.fired_tt
		scope:insulting_scope = {
			add_opinion = {
				target = scope:insulting_scope
				modifier = angry_opinion
				opinion = -10
			}
		}
		random = {
			chance = 25
			upgrade_to_friend_effect = { CHARACTER = scope:sycophant_scope REASON = friend_gave_council_seat }
		}
		bp1_sycophant_chain_anger_vassals_effect = yes
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 1
			}
		}
	}

	option = { # Dismiss
		name = bp1_yearly.8192.c
		reverse_add_opinion = {
			target = scope:insulting_scope
			modifier = annoyed_opinion
			opinion = -10
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = -1
				ai_vengefulness = -1
			}
		}
	}
}
