namespace = bp1_yearly

##################################
# Picnic or Church?  			 #
# By Daniel Moore         		 #
##################################
bp1_yearly.7000 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7000.t
	desc = bp1_yearly.7000.desc
	theme = friend_relation

	override_background = { reference = garden }
	left_portrait = {
		character = root
		animation = laugh
	}

	right_portrait = {
		character = scope:distraction_friend
		animation = toast_goblet
	}

	cooldown = { years = 10 }
	trigger = {
		is_available_at_peace_adult = yes
		is_landed = yes
		has_bp1_dlc_trigger = yes

		any_courtier_or_guest = {
			has_any_good_relationship_with_root_trigger = yes
			is_available_ai_adult = yes
		} 

		faith = { 
			NOT = {
				trait_is_virtue = gluttonous 
			}
		}
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				has_any_good_relationship_with_root_trigger = yes
				is_available_ai_adult = yes
			}
			save_scope_as = distraction_friend
		}
	}

    option = { #Faith is the only meal I need
        name = bp1_yearly.7000.a

        scope:distraction_friend = {
        	add_opinion = {
				modifier = hurt_opinion
				opinion = -15
				target = root
			}
		}


		stress_impact = {   
			zealous = medium_stress_impact_loss 
			gluttonous = medium_stress_impact_gain
			gregarious = medium_stress_impact_gain
		}

		add_piety = 125

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

	option = { #Excellent idea
		name = bp1_yearly.7000.b
		scope:distraction_friend = {
			add_opinion = {
				modifier = pleased_opinion
				opinion = 20
				target = root
			}
		}

		create_character_memory = {
			type = nice_picnic
			
			participants = {
				picnic_pal = scope:distraction_friend
			}
		}

		add_character_modifier = {
			modifier = lovely_picnic_modifier
			years = 5
		}
		

		progress_towards_friend_effect = {
			REASON = friend_breakfast
			CHARACTER = scope:distraction_friend
			OPINION = 0
		}

		stress_impact = {   
			zealous = medium_stress_impact_gain
			gluttonous = medium_stress_impact_loss
			shy = medium_stress_impact_gain
			diligent = medium_stress_impact_gain
			paranoid = minor_stress_impact_gain
		}

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

##################################
# Going Fishing!                 #
# By Daniel Moore         		 #
##################################

bp1_yearly.7001 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7001.t
	desc = bp1_yearly.7001.desc
	theme = friend_relation

	override_background = { reference = corridor_day }
	left_portrait = {
		character = root
		animation = happiness
	}

	right_portrait = {
		character = scope:fishing_friend
		animation = ecstasy
	}

	cooldown = { years = 10 }
	trigger = {
		# Standard checks.
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes

		OR = {
			any_held_county = {
				title_province = {
					NOR = {
						terrain = desert
						terrain = desert_mountains
						terrain = drylands
					}
				}
			}
			location = {
				NOR = {
					terrain = desert
					terrain = desert_mountains
					terrain = drylands
				}
			}
		}

		any_courtier_or_guest = {
			has_any_good_relationship_with_root_trigger = yes
			has_personality_introverted_trigger = no
			is_available_ai_adult = yes
		} 
	}


	immediate = {
		random_courtier_or_guest = {
			limit = {
				has_any_good_relationship_with_root_trigger = yes
				has_personality_introverted_trigger = no
				is_available_ai_adult = yes
			}
			save_scope_as = fishing_friend
		}
	}

	option = { #Yes
		name = bp1_yearly.7001.a

		flavor = bp1_yearly_7001.a.tt

		#hidden_effect = {
			random_list = {
				40 = {
					desc = bp1_yearly.7001.a.toast.good_time
					send_interface_toast = {
						type = event_toast_effect_good
						title = bp1_yearly.7001.a.toast.good_time
						left_icon = root
						right_icon = scope:fishing_friend
	
						scope:fishing_friend = {
							add_opinion = {
								modifier = pleased_opinion
								opinion = 20
								target = root
							}
						}
	
						progress_towards_friend_effect = {
							REASON = friend_fishing_trip
							CHARACTER = scope:fishing_friend
							OPINION = 0
						}
					}
	
					create_character_memory = {
						 type = nice_fishing_trip
			
						 participants = {
							 fishing_pal = scope:fishing_friend
						 }
					}
				}
	
				40 = {
					desc = bp1_yearly.7001.a.toast.caught_fish
					send_interface_toast = {
						type = event_toast_effect_good
						title = bp1_yearly.7001.a.toast.caught_fish
						left_icon = root
						right_icon = scope:fishing_friend
	
						add_prestige = 75
	
						scope:fishing_friend = {
							add_opinion = {
								modifier = pleased_opinion
								opinion = 10
								target = root
							}
						}
					}

					create_character_memory = {
						 type = nice_fishing_trip
			
						 participants = {
							 fishing_pal = scope:fishing_friend
						 }
					}
				}
	
	
				15 = {
					desc = bp1_yearly.7001.a.toast.bad_time
					send_interface_toast = {
						type = event_toast_effect_bad
						title = bp1_yearly.7001.a.toast.bad_time
						left_icon = root
						right_icon = scope:fishing_friend	

						scope:fishing_friend = {
							add_opinion = {
								modifier = disappointed_opinion
								opinion = -10
								target = root
							}
						}	
					}
				}
	
				5 = {
					desc = bp1_yearly.7001.a.toast.white_carp
					send_interface_toast = {
						type = event_toast_effect_good
						title = bp1_yearly.7001.a.toast.white_carp
						left_icon = root
						right_icon = scope:fishing_friend	
	
						add_prestige = 200
	
						scope:fishing_friend = {
							add_opinion = {
								modifier = pleased_opinion
								opinion = 10
								target = root
							}
						}
					}

					create_character_memory = {
						 type = nice_fishing_trip
			
						 participants = {
							 fishing_pal = scope:fishing_friend
						 }
					}
				}
			}
		#}
	
		stress_impact = {
			base = minor_stress_impact_loss
			diligent = medium_stress_impact_gain
			paranoid = medium_stress_impact_gain
			gregarious = medium_stress_impact_loss
			shy = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = 1
				ai_energy = 1	 
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = diligent
					has_trait = paranoid
					has_trait = shy
				}
			}
		} 
	}

	option = { #No
		name = bp1_yearly.7001.b
		scope:fishing_friend = {
			add_opinion = {
				modifier = hurt_opinion
				opinion = -15
				target = root
			}
		}
		
		add_prestige = minor_prestige_gain

		stress_impact = {   
			gregarious = major_stress_impact_gain
			shy = medium_stress_impact_loss
			lazy = medium_stress_impact_loss
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = 1
				ai_energy = -1
			}
			modifier = {
				factor = 0
				has_trait = gregarious
			}
		}
	}   
}

##################################
# Throwing a chamberpot at rival #
# By Daniel Moore         		 #
##################################

bp1_yearly.7002 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7002.t
	desc = bp1_yearly.7002.desc
	theme = unfriendly

	override_background = { reference = courtyard }

	right_portrait = {
		character = scope:chamberpot_rival
		animation = happiness
	}

	cooldown = { years = 10 }
	trigger = {
		# Standard checks.
		is_landed_or_landless_administrative = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes

		any_courtier_or_guest = {
			has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
			is_available_ai_adult = yes
		} 
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
				is_available_ai_adult = yes
			}
			save_scope_as = chamberpot_rival
		}
	}

	option = { #Yes
		name = bp1_yearly.7002.a

		custom_tooltip = bp1_yearly.7002.a.tt

		duel = {
			 skill = prowess
			 value = average_skill_rating

			 50 = {
				compare_modifier = {
					 value = scope:duel_value
					 multiplier = 3.5
					 min = -49
				}

				desc = bp1_yearly.7002.a.toast.perfect_hit
				send_interface_toast = {
					type = event_toast_effect_good
					title = bp1_yearly.7002.a.toast.perfect_hit
					right_icon = scope:chamberpot_rival  
				
					scope:chamberpot_rival = {
						add_character_modifier = {
							modifier = covered_in_feces
							years = 10
						}
						add_opinion = {
							modifier = drenched_in_excrement_opinion
							opinion = -25
							target = root
						}
					}
					stress_impact = {   
						base = minor_stress_impact_loss
						vengeful = minor_stress_impact_loss
						sadistic = minor_stress_impact_loss
						callous = minor_stress_impact_loss
						arbitrary = minor_stress_impact_loss
						compassionate = medium_stress_impact_gain
						forgiving = medium_stress_impact_gain
					}
				}
			}

			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.7002.a.toast.miss
				send_interface_toast = {
					type = event_toast_effect_bad
					title = bp1_yearly.7002.a.toast.miss
					right_icon = scope:chamberpot_rival

					scope:chamberpot_rival = {
						add_opinion = {
							modifier = threw_excrement_opinion
							opinion = -10
							target = root
						}
					}
					stress_impact = {
						compassionate = medium_stress_impact_gain
						forgiving = medium_stress_impact_gain
					}
				}
			}

			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.7002.a.toast.chamberpot
				send_interface_toast = {
					type = event_toast_effect_good
					title = bp1_yearly.7002.a.toast.chamberpot
					right_icon = scope:chamberpot_rival

					scope:chamberpot_rival = {
						add_opinion = {
							modifier = drenched_in_excrement_opinion
							opinion = -20
							target = root
						}
						add_character_modifier = {
							modifier = covered_in_feces
							years = 10
						}
						increase_wounds_effect = { REASON = skull_cracked_open }
					}
					stress_impact = {
						vengeful = medium_stress_impact_loss
						sadistic = medium_stress_impact_loss
						callous = medium_stress_impact_loss
						arbitrary = medium_stress_impact_loss
						compassionate = major_stress_impact_gain
						forgiving = major_stress_impact_gain
					}
				}
			}

			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = bp1_yearly.7002.a.toast.tripped
				send_interface_toast = {
					type = event_toast_effect_good
					title = bp1_yearly.7002.a.toast.tripped
					right_icon = root

					add_character_modifier = {
						modifier = covered_in_feces
						years = 10
					}  
					stress_impact = {
						base = minor_stress_impact_gain
						arrogant = major_stress_impact_gain
					}
				}
			}
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1  
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
			}
		}
	}

	option = { #No
		name = bp1_yearly.7002.b

		add_piety = minor_piety_gain

		stress_impact = {   
			vengeful = medium_stress_impact_gain
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			arbitrary = minor_stress_impact_gain
			wrathful = minor_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = -1
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = vengeful
					has_trait = sadistic
					has_trait = callous
					has_trait = arbitrary
					has_trait = wrathful
				}
			}
		}
	}   
}

##################################
# The Tapestry                   #
# By Daniel Moore                #
##################################

bp1_yearly.7003 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7003.t
	desc = bp1_yearly.7003.desc
	theme = friend_relation

	right_portrait = {
		character = scope:orgy_tapestry_maker
		animation = happiness
		
	}

	cooldown = { years = 10 }
	trigger = {
		# Standard checks.
		is_available_at_peace_adult = yes
		is_landed = yes
		has_bp1_dlc_trigger = yes

		any_relation = {
			type = friend
			is_available_healthy_ai_adult = yes
			is_deviant_trigger = yes
			save_temporary_scope_as = tapestry_maker
		}
		any_vassal = {
			is_available_ai_adult = yes
			this != scope:tapestry_maker
		}
		any_courtier = {
			is_available_healthy_ai_adult = yes
			this != scope:tapestry_maker
			count > 4
		}
	}

	immediate = {

		random_relation = {
			type = friend
			limit = {
				is_available_healthy_ai_adult = yes
				is_deviant_trigger = yes
			}
			save_scope_as = orgy_tapestry_maker
		}
	
		if = {
			limit = {
				NOT = { exists = scope:orgy_tapestry_maker }
			}
			hidden_effect = {
				random_courtier = {
					limit = {
						is_available_healthy_ai_adult = yes

					}

					weight = {
						base = 1
						modifier = {
							add = 10
							is_of_minor_interest_to_root_trigger = yes
						}

						modifier = {
							add = 10
							has_trait = lustful
						}
					}
						

					add_secret = {
						type = secret_deviant
					}
					save_scope_as = orgy_tapestry_maker
				}
			}
		}

		random_vassal = {
			limit = {
				is_available_ai_adult = yes
				this != scope:orgy_tapestry_maker
			}
			save_scope_as = orgy_participant_1
		}

		random_courtier = {
			limit = {
				is_available_ai_adult = yes
				NOR = { 
					this = scope:orgy_tapestry_maker
					this = scope:orgy_participant_1 
				}
			}
			save_scope_as = orgy_participant_2
		}

		random_courtier = {
			limit = {
				is_available_ai_adult = yes
				NOR = { 
					this = scope:orgy_tapestry_maker 
					this = scope:orgy_participant_1
					this = scope:orgy_participant_2 
				}
			}
			save_scope_as = orgy_participant_3
		}

		 scope:orgy_tapestry_maker = {
			random_secret = {   
				type = secret_deviant
				reveal_to = root
				save_scope_as = tapestry_maker_secret
			}
		}

	}

	option = { #Expose them
		name = bp1_yearly.7003.a
		trigger = {
			trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = root }
		}


		scope:tapestry_maker_secret = {
			expose_secret = root
		}

		
		stress_impact = {   
			compassionate = medium_stress_impact_gain
			deviant = medium_stress_impact_gain
		}

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


	}

	option = { #Get Artifact
		name = bp1_yearly.7003.b


		stress_impact = {   
			deviant = medium_stress_impact_loss
			chaste = medium_stress_impact_gain
			lustful = minor_stress_impact_loss
		}

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

		create_artifact = {
			name = bp1_orgy_tapestry
			description = bp1_orgy_tapestry_desc
			modifier = artifact_seduce_scheme_phase_duration_mult_1_modifier
			modifier = artifact_attraction_opinion_1_modifier
			type = miscellaneous
			visuals = tapestry
			
			save_scope_as = newly_created_artifact
		}
	}   

	 option = { #Ignore
		name = bp1_yearly.7003.c


		if = {
			limit = {
				can_add_hook = {
					target = scope:orgy_tapestry_maker
					type = favor_hook
				}
			}
			add_hook = {
				target = scope:orgy_tapestry_maker
				type = favor_hook
			}
		}
			



		stress_impact = {   
			compassionate = medium_stress_impact_loss
			lustful = medium_stress_impact_loss
			chaste = medium_stress_impact_loss
			deviant = medium_stress_impact_gain
		}

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


###########################
# Bad memory              #
# By Daniel Moore         #
###########################

bp1_yearly.7004 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7004.t
	desc = bp1_yearly.7004.desc
	theme = friend_relation 
	left_portrait = {
		character = root
		animation = grief 
	}

	right_portrait = {
		character = scope:concerned_friend
		animation = worry
	}

	cooldown = { years = 10 }
	
	trigger = {
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes

		any_courtier_or_guest = {
			has_any_good_relationship_with_root_trigger = yes
			has_personality_benevolent_trigger = yes
			is_available_ai_adult = yes
			can_add_hook = {
				target = root
				type = favor_hook
			}
			save_temporary_scope_as = temp_check
		} 

		any_memory = {
			has_memory_category = negative
			NOT = {
				any_memory_participant = {
					this = scope:temp_check
				}
			}
			NOT = {
				has_memory_category = private
			}
		}
		
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				has_any_good_relationship_with_root_trigger = yes
				has_personality_benevolent_trigger = yes
				is_available_ai_adult = yes
				can_add_hook = {
					target = root
					type = favor_hook
				}
			}
			save_scope_as = concerned_friend
		}

		random_memory = {
			limit = {
				has_memory_category = negative
				NOT = {
					has_memory_category = private
				}
				NOT = { has_memory_participant = scope:concerned_friend }
			}
		   save_scope_as = bad_memory
		}

	}

	option = { #I need to talk to someone
		name = bp1_yearly.7004.a
		#Big stress loss
		stress_impact = {
			base = minor_stress_impact_loss
			gregarious = medium_stress_impact_loss
			trusting = medium_stress_impact_loss
			arrogant = medium_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}

		progress_towards_friend_effect = {
			REASON = friend_free_therapy
			CHARACTER = scope:concerned_friend
			OPINION = 0
		}

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

	option = { #Leave me alone.
		name = bp1_yearly.7004.b
		add_prestige = minor_prestige_gain
		stress_impact = {
			base = 10
			gregarious = medium_stress_impact_gain
		}

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



######################
# Loyalty Test       #
# By Daniel Moore    #
######################

bp1_yearly.7010 = { #A loyalty test
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7010.t
	desc = bp1_yearly.7010.desc
	theme = intrigue 
	right_portrait = {
		character = root 
		animation = eavesdrop
	}

	left_portrait = {
		character = scope:tested_friend
		animation = worry
	}
	
	lower_right_portrait = scope:friends_friend

	trigger = {
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes
		
		OR = {
			has_trait = deceitful
			has_trait = sadistic
			has_trait = arbitrary
			has_trait = fickle
			has_personality_malicious_trigger = yes
			has_focus_or_focus_trait_trigger = { FOCUS = intrigue_skulduggery_focus }
			has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus }
		}
	
		any_relation = {
			type = friend
			is_available_ai_adult = yes
			OR = {
				is_courtier_of = root
				is_vassal_of = root
			}
			NOR = {
				has_trait = loyal
				has_trait = disloyal
			}
		}
		faith.religion = { is_in_family = rf_abrahamic } # Judas reference
	}

	immediate = {
		random_relation = {
			type = friend
			limit = {
				is_available_ai_adult = yes
				OR = {
					is_courtier_of = root
					is_vassal_of = root
				}
				NOR = {
					has_trait = loyal
					has_trait = disloyal
				}
			}

			weight = {
				base = 1
				modifier = {
					add = 10
					is_of_minor_interest_to_root_trigger = yes
				}

				modifier = {
					add = 50
					has_trait = paranoid
				}
			}

			save_scope_as = tested_friend
			
			if = {
				limit = {
					any_relation = {
						type = friend
						is_available_ai_adult = yes
						this != root
					}
				}
				random_relation = {
					type = friend
					limit = {
						is_available_ai_adult = yes
						this != root
					}
					save_scope_as = friends_friend
				}
			}
		}

	}

	option = { #Gold or me
		name = bp1_yearly.7010.a
		custom_tooltip = bp1_yearly.7010.a.tt

		pay_short_term_gold = {
			target = scope:tested_friend
			gold = 30
		}
		
		random_list = {
			10 = { #Don't sell me out
				desc = bp1_yearly.7010.toast.not_betrayed
				show_chance = no
				modifier = {
					trigger = {
						scope:tested_friend.ai_honor >= 1
					}
					add = scope:tested_friend.ai_honor
				}
				modifier = {
					trigger = {
						scope:tested_friend.ai_boldness < 0
					}
					add = {
						value = scope:tested_friend.ai_boldness
						multiply = -1
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = content
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = generous
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = trusting
					}
				}
				send_interface_toast = {
					type = event_toast_effect_good
					title = bp1_yearly.7010.toast.not_betrayed
					right_icon = scope:tested_friend
					add_prestige = medium_prestige_gain
					add_hook = {
						type = loyalty_hook
						target = scope:tested_friend
					}
					scope:tested_friend = {
						add_trait = loyal
						pay_short_term_gold = {
							target = root
							gold = 30
						}
					}
				}
			}
			
			10 = { #Sell me out
				desc = bp1_yearly.7010.toast.betrayed
				show_chance = no
				modifier = {
					add = scope:tested_friend.ai_greed
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = fickle
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = arbitrary
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = callous
					}
				}
				send_interface_toast = {
					type = event_toast_effect_bad
					title = bp1_yearly.7010.toast.betrayed
					right_icon = scope:tested_friend
					add_opinion = {
						target = scope:tested_friend
						modifier = treachery_opinion
					}
					scope:tested_friend = {
						add_trait = disloyal
					}
				}
			}
		}

		stress_impact = {
			deceitful = medium_stress_impact_loss
			trusting = massive_stress_impact_gain
			compassionate = medium_stress_impact_gain
			calm = minor_stress_impact_gain
			content = minor_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = trusting
					has_trait = compassionate
					has_trait = calm
					has_trait = content
				}
			}
		}
	}   

	option = { #Carnal pleasures or me
		name = bp1_yearly.7010.b
		custom_tooltip = bp1_yearly.7010.b.tt
		random_list = {
			10 = { #Don't sell me out
				desc = bp1_yearly.7010.toast.not_betrayed
				show_chance = no
				modifier = {
					trigger = {
						scope:tested_friend.ai_honor >= 1
					}
					add = scope:tested_friend.ai_honor
				}
				modifier = {
					trigger = {
						scope:tested_friend.ai_boldness < 0
					}
					add = {
						value = scope:tested_friend.ai_boldness
						multiply = -1
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = content
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = humble
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = trusting
					}
				}
				send_interface_toast = {
					type = event_toast_effect_good
					title = bp1_yearly.7010.toast.not_betrayed
					right_icon = scope:tested_friend
					add_prestige = medium_prestige_gain
					if = {
						limit = {
							can_add_hook = {
								type = loyalty_hook 
								target = scope:tested_friend
							}
						}
						add_hook = {
							type = loyalty_hook
							target = scope:tested_friend
						}
					}
					scope:tested_friend = {
						if = {
							limit = {
								NOT = { has_trait = loyal }
							}
							add_trait = loyal
						}
					}
				}
			}
			
			10 = { #Sell me out
				desc = bp1_yearly.7010.toast.betrayed
				show_chance = no
				modifier = {
					add = scope:tested_friend.ai_sociability
				}
				modifier = {
					add = 50
					scope:tested_friend = {
						has_trait = lustful
					}
				}
				modifier = {
					add = 50
					scope:tested_friend = {
						has_trait = rakish
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = fickle
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = arbitrary
					}
				}
				modifier = {
					factor = 0
					scope:tested_friend = {
						OR = {
							has_trait = chaste
							might_cheat_on_every_partner_trigger = no
						}
					}
				}
				send_interface_toast = {
					type = event_toast_effect_bad
					title = bp1_yearly.7010.toast.betrayed
					right_icon = scope:tested_friend
					scope:tested_friend = {
						contract_disease_effect = { DISEASE = lovers_pox TREATMENT_EVENT = no }
						add_trait = disloyal
					}
				}
			}
		}

		stress_impact = {
			deceitful = medium_stress_impact_loss
			trusting = massive_stress_impact_gain
			compassionate = medium_stress_impact_gain
			calm = minor_stress_impact_gain
			content = minor_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = trusting
					has_trait = compassionate
					has_trait = calm
					has_trait = content
				}
			}
		}
	}

	option = { #Other friend or me
		name = bp1_yearly.7010.c
		trigger = {
			exists = scope:friends_friend
		}
		custom_tooltip = bp1_yearly.7010.c.tt
		random_list = {
			10 = { #Don't sell me out
				desc = bp1_yearly.7010.toast.not_betrayed
				show_chance = no
				modifier = {
					add = {
						value = scope:tested_friend.ai_sociability
						multiply = 0.5
					}
				}
				modifier = {
					trigger = {
						scope:tested_friend = {
							save_temporary_opinion_value_as = { name = opinion_of_you target = root }
							opinion = { target = scope:friends_friend value <= scope:opinion_of_you }
						}
					}
					add = 100
				}
				modifier = {
					trigger = {
						scope:tested_friend.ai_honor >= 1
					}
					add = scope:tested_friend.ai_honor
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = content
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = just
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = trusting
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = stubborn
					}
				}
				send_interface_toast = {
					type = event_toast_effect_good
					title = bp1_yearly.7010.toast.not_betrayed
					right_icon = scope:tested_friend
					add_prestige = medium_prestige_gain
					add_hook = {
						type = loyalty_hook
						target = scope:tested_friend
					}
					scope:tested_friend = {
						add_trait = loyal
					}
				}
			}
			
			10 = { #Sell me out
				desc = bp1_yearly.7010.toast.betrayed
				show_chance = no
				modifier = {
					scope:tested_friend = {
						save_temporary_opinion_value_as = { name = opinion_of_you target = root }
						opinion = { target = scope:friends_friend value > scope:opinion_of_you }
					}
					add = 20
				}
				modifier = {
					add = 20
					scope:tested_friend = {
						has_trait = fickle
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = arbitrary
					}
				}
				modifier = {
					add = 10
					scope:tested_friend = {
						has_trait = gregarious
					}
				}
				send_interface_toast = {
					type = event_toast_effect_bad
					title = bp1_yearly.7010.toast.betrayed
					right_icon = scope:tested_friend
					scope:tested_friend = {
						add_stress = major_stress_impact_gain
						add_trait = disloyal
					}
				}
			}
		}

		stress_impact = {
			deceitful = medium_stress_impact_loss
			trusting = massive_stress_impact_gain
			compassionate = medium_stress_impact_gain
			calm = minor_stress_impact_gain
			content = minor_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = trusting
					has_trait = compassionate
					has_trait = calm
					has_trait = content
				}
			}
		}
	}

	option = { #Nothing
		name = bp1_yearly.7010.d
		
		scope:tested_friend = {
			add_opinion = {
				target = root
				modifier = friendliness_opinion
				opinion = 5
			}
		}

		stress_impact = {
			paranoid = massive_stress_impact_gain
			impatient = medium_stress_impact_gain
			deceitful = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			vengeful = minor_stress_impact_gain
			callous = minor_stress_impact_gain
		}
		
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				OR = {
					has_trait = paranoid
					has_trait = impatient
					has_trait = deceitful
					has_trait = vengeful
					has_trait = callous
					has_trait = sadistic
				}
			}
		}
	} 
}


##################################
# Memory of war                  #
# By Daniel Moore                #
##################################

bp1_yearly.7050 = { 
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7050.t
	desc = {
		desc = bp1_yearly.7050.desc

		triggered_desc = {
			trigger = {
				exists = scope:sleeping_spouse
			}
			desc = bp1_yearly.7050.desc.married
		}

		triggered_desc = {
			trigger = {
				NOT = { exists = scope:sleeping_spouse }
			}
			desc = bp1_yearly.7050.desc.not_married
		}
	}
	theme = martial

	override_background = { reference = battlefield }

	left_portrait = {
		character = root
		animation = throne_room_one_handed_passive_1
	}

	cooldown = { years = 20 }

	trigger = {
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes

		any_memory = {
			has_memory_category = negative
			has_memory_category = war
		}
	}

	immediate = {
		random_memory = {
			limit = {
				has_memory_category = negative
				has_memory_category = war
			}
		   save_scope_as = war_memory
		}

		random_spouse = {
			limit = {
				is_available_ai_adult = yes
			}
			save_scope_as = sleeping_spouse
		}
		add_character_flag = wear_armor
	}

	
	option = { #You take your stress out on something
		name = bp1_yearly.7050.a

		stress_impact = {
			base = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			forgiving = medium_stress_impact_loss
		}

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

	option = { #Vengeance
		name = bp1_yearly.7050.b

		add_character_modifier = {
			 modifier = vengeance_obsessed_modifier
			 years = 20
		}

		stress_impact = {
			base = minor_stress_impact_gain
			forgiving = major_stress_impact_gain
			gregarious = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1  
				ai_sociability = -1 
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = forgiving
					has_trait = gregarious
					has_trait = compassionate
				}
			}
		}
	}
	after = {
		remove_character_flag = wear_armor
	}
}

##################################
# Memory of Battle               #
# By Daniel Moore                #
##################################

bp1_yearly.7051 = { #Memory of a battle
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7051.t
	desc = bp1_yearly.7051.desc
	theme = martial

	override_background = {
		reference = terrain_scope
	}
	
	left_portrait = {
		character = root
		animation = marshal
	}

	cooldown = { years = 10 }

	trigger = {
		is_playable_character = yes
		has_bp1_dlc_trigger = yes
		is_available_at_peace_adult = yes
		
		martial >= 8
		
		NOR = {
			has_trait = rough_terrain_expert
			has_trait = open_terrain_expert
			has_trait = forest_fighter
			has_trait = desert_warrior
			has_trait = jungle_stalker
			has_trait = winter_soldier
		}

		any_memory = {
			has_memory_category = battle
			has_memory_category = war
		}
	}

	immediate = {
		random_memory = {
			limit = {
				has_memory_category = battle
				has_memory_category = war
			}
			save_scope_as = battle_memory
		}

		scope:battle_memory.var:battle_location = {
			save_scope_as = battle_area
			save_scope_as = background_terrain_scope
		}
		add_character_flag = wear_armor
	}

	option = { 
		name = bp1_yearly.7051.a

		if = {
			limit = {
				scope:battle_area = {
					OR = {
						terrain = hills
						terrain = mountains
						terrain = wetlands
					}
				}
			}
			add_trait = rough_terrain_expert
		}

		if = {
			limit = {
				scope:battle_area = {
				   
					OR = {
						terrain = farmlands
						terrain = plains
						terrain = steppe
					}
				}
			}
			add_trait = open_terrain_expert
		}

		if = {
			limit = {
				scope:battle_area = {
					terrain = forest
				}
			}
			add_trait = forest_fighter
		}
		if = {
			limit = {
				scope:battle_area = {
					terrain = desert
				}
			}
			add_trait = desert_warrior
		}
		if = {
			limit = {
				scope:battle_area = {
					terrain = jungle
				}
			}
			add_trait = jungle_stalker
		}

		if = {
			limit = {
				scope:battle_area = {
					terrain = taiga
				}
			}
			add_trait = winter_soldier
		}

		stress_impact = {
			forgiving = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = 1  
			}
		}
	} 
	option = {
		name = bp1_yearly.7051.b
		
		trigger = {
			NOT = {
				has_trait = flexible_leader
			}
		}

		add_trait = flexible_leader

		stress_impact = {
			forgiving = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1  
				ai_sociability = -1 
			}
		}
	}
	after = {
		remove_character_flag = wear_armor
	}
}

##################################
# #A story                       #
# By Daniel Moore                #
##################################

bp1_yearly.7052 = { 
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7052.t
	desc = bp1_yearly.7052.desc
	theme = friendly

	override_background = { reference = relaxing_room }

	left_portrait = {
		character = root
		animation = storyteller
	}

	right_portrait = {
		character = scope:story_friend
		animation = toast_goblet
	}

	cooldown = { years = 10 }

	trigger = {
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes

		any_memory = {
			count > 0
			NOT = {
				has_memory_category = private
			}
		}

		any_courtier_or_guest = {
			has_any_good_relationship_with_root_trigger = yes
			is_available_ai_adult = yes
		} 
  
	}

	immediate = {
		random_memory = {
			limit = {
				NOT = {
					has_memory_category = private
				}
			}
			save_scope_as = story_memory
		}

		random_courtier_or_guest = {
			limit = {
				has_any_good_relationship_with_root_trigger = yes
				is_available_ai_adult = yes
			}
			save_scope_as = story_friend
		}
	}

	option = { #Traditional
		name = bp1_yearly.7052.a

		scope:story_friend = {
			add_opinion = {
				modifier = pleased_opinion
				opinion = 15
				target = root
			}
		}

		stress_impact = {
			ambitious = minor_stress_impact_gain
		}

		progress_towards_friend_effect = {
			REASON = friend_story_by_fire
			CHARACTER = scope:story_friend
			OPINION = 0
		}

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

	option = { #Own Story
		name = bp1_yearly.7052.b

		scope:story_friend = {
			add_opinion = {
				modifier = pleased_opinion
				opinion = 15
				target = root
			}
		}

		if = {
			limit = {
				scope:story_memory = {
					has_memory_category = major
				}
			}
			add_prestige = medium_prestige_value
		}
		else_if = {
			limit = {
				scope:story_memory = {
					NOT = {
						has_memory_category = major
					}
				}
			}
			add_prestige = minor_prestige_value
		}

		stress_impact = {
			shy = minor_stress_gain
			ambitious = minor_stress_loss
			lazy = minor_stress_gain
		}

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


	option = { #Both!
		name = bp1_yearly.7052.c
		
		trait = gregarious
		trigger = {
			OR = {
				has_trait = gregarious
				culture = {
					has_cultural_tradition = tradition_storytellers
				}
			}
		}

		scope:story_friend = {
			add_opinion = {
				modifier = pleased_opinion
				opinion = 15
				target = root
			}
		}

		if = {
			limit = {
				scope:story_memory = {
					has_memory_category = major
				}
			}
			add_prestige = major_prestige_value
		}

		else_if = {
			limit = {
				scope:story_memory = {
					NOT = {
						has_memory_category = major
					}
				}
			}
			add_prestige = medium_prestige_value
		}


		progress_towards_friend_effect = {
			REASON = friend_story_by_fire
			CHARACTER = scope:story_friend
			OPINION = 0
		}

		stress_impact = {
			shy = minor_stress_gain
		}

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

##################################
# Revenge Memory                 #
# By Daniel Moore         		 #
##################################

bp1_yearly.7053 = { 
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7053.t
	desc = bp1_yearly.7053.desc
	theme = murder_scheme
	override_background = { reference = gallows }
	left_portrait = {
		character = root
		animation = anger	
	}
	lower_right_portrait = {
		character = scope:bad_memory_participant
		animation = happiness 
	}
	cooldown = { years = 10 }
	trigger = {
		is_ai = no # Murder schemes are heavy for performance
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes
		any_memory = {
			has_memory_category = negative
			any_memory_participant = {
				save_temporary_scope_as = rival_character
				is_alive = yes
				NOR = {
					this = root
					has_relation_lover = root
					has_relation_friend = root
					root = {
						opinion = {
							target = scope:rival_character
							value >= -15
						}
					}
				}
				in_diplomatic_range = root
				root = {
					can_start_scheme = {
						type = murder
						target_character = scope:rival_character
					}
				}
			}
		}
		NOT = {
			has_trait = forgiving
		}
	}
	immediate = {
		random_memory = {
			limit = {
				has_memory_category = negative
				any_memory_participant = {
					this != root
					is_alive = yes
					root = {
						can_start_scheme = {
							type = murder
							target_character = prev
						}
					}
					NOR = {
						has_relation_lover = root
						has_relation_friend = root
						root = {
							opinion = {
								target = prev
								value >= -15
							}
						}
					}
					in_diplomatic_range = root
				}
			}
			#Used for loc
			save_scope_as = bad_memory
			#Find our participant
			random_memory_participant = {
				limit = {
					this != root
					is_alive = yes
					root = {
						can_start_scheme = {
							type = murder
							target_character = prev
						}
					}
					NOR = {
						has_relation_lover = root
						has_relation_friend = root
						root = {
							opinion = {
								target = prev
								value >= -15
							}
						}
					}
				}
				save_scope_as = bad_memory_participant
			}
		}
	}
	#Start revenge scheme or enhance existing scheme
	option = { 
		name = bp1_yearly.7053.a
		trigger = {
			can_start_scheme = {
				type = murder
				target_character = scope:bad_memory_participant
			}
		}
		#Do we already have a murder scheme against our rival?
		if = {
			limit = {
				NOT = {
					any_scheme = {
						type = murder
						scheme_target_character = scope:bad_memory_participant
					}
				}
			}
			start_scheme = {
				type = murder
				target_character = scope:bad_memory_participant
			}
		}
		custom_tooltip = diplomacy_family.2250.b.tt
		#Buff the scheme
		random_scheme = {
			type = murder
			limit = {
				scheme_target_character = scope:bad_memory_participant
			}
			add_scheme_modifier = {
				type = murder_memory_modifier
			}
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			honest = minor_stress_impact_gain
			just = medium_stress_impact_gain
			lazy = minor_stress_impact_gain
			wrathful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = honest
					has_trait = just
				}
				add = 50
			}
			ai_value_modifier = {
				ai_vengefulness = 2
				ai_boldness = 2
				ai_honor = -2
				ai_compassion = -2
			}
		}
	} 
	#Forgive and Forget
	option = { 
		name = bp1_yearly.7053.b
		add_piety = minor_piety_value
		stress_impact = {
			eccentric = medium_stress_gain
			deceitful = medium_stress_gain
			wrathful = medium_stress_gain
			vengeful = major_stress_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = eccentric
					has_trait = deceitful
					has_trait = wrathful
					has_trait = vengeful
				}
				add = 50
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_honor = 2
				ai_rationality = 1
				ai_boldness = -2
				ai_vengefulness = -2
			}
		}
	}
}

###########################
# Forget a memory         #
# By Daniel Moore         #
###########################

bp1_yearly.7054 = { 
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7054.t
	desc = bp1_yearly.7054.desc
	theme = murder_scheme

	override_background = { reference = garden }

	left_portrait = {
		character = root
		animation = shame
	}

	right_portrait = {
		character = scope:memory_child
		animation = worry
	}

	cooldown = { years = 10 }

	trigger = {
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes
		is_ai = no

		OR = {
			has_trait = infirm
			age > 65
		}

		any_memory = {
			NOT = {
				has_memory_category = private
			}
		}

		any_child  = {
			is_available_ai_adult = yes
			NOR = {
				has_relation_rival = root
				opinion = {
					target = prev
					value <= -15
				}
			}
		}
	}


	immediate = {
		random_memory = {
		   save_scope_as = forgotten_memory
		}

		random_child = {
			limit = {
				is_available_ai_adult = yes
				NOR = {
					has_relation_rival = root
					opinion = {
						target = prev
						value <= -15
					}
				}
			}
			weight = {
				base = 1
				modifier = {
					add = 10
					is_of_major_interest_to_root_trigger = yes
				}
				modifier = {
					add = 5
					is_of_minor_interest_to_root_trigger = yes
				}
				modifier = {
					add = 5
					opinion = {
						target = root
						value >= 25
					}
				}
				modifier = {
					add = 5
					opinion = {
						target = root
						value >= 50
					}
				}
				modifier = {
					add = 20
					has_trait = compassionate
				}
			}
			save_scope_as = memory_child
		}
	}

	option = { #Pretend everything is fine
		name = bp1_yearly.7054.a

		stress_impact = {
			base = 50
			honest = medium_stress_gain
		}

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

	option = { #Admit to forgetting
		name = bp1_yearly.7054.b
		add_prestige = medium_prestige_loss

		stress_impact = {
			base = 20
			deceitful = minor_stress_gain
			honest = minor_stress_loss
		}

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

	after = {
		destroy_character_memory = scope:forgotten_memory  
	}
}


##################################
# Record A Memory                #
# By Daniel Moore                #
##################################

bp1_yearly.7055 = { 
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7055.t
	desc = {
		triggered_desc = {
			trigger = {
				scope:recorded_memory = {
					has_memory_category = positive
				}
			}
			desc = bp1_yearly.7055.desc.positive
		}

		triggered_desc = {
			trigger = {
				scope:recorded_memory = {
					has_memory_category = negative
				}
			}
			desc = bp1_yearly.7055.desc.negative
		}

		triggered_desc = {
			trigger = {
				scope:recorded_memory = {
					NOR = {
						has_memory_category = negative
						has_memory_category = positive
					}
				}
			}
			desc = bp1_yearly.7055.desc.neutral
		}
		
		triggered_desc = {
			trigger = {
				learning < 13
				NOT = { has_trait = blind }
			}
			desc = bp1_yearly.7055.desc.alone_poor_skill
		}

		triggered_desc = {
			trigger = {
				learning >= 13
				NOT = { has_trait = blind }
			}
			desc = bp1_yearly.7055.desc.alone_good_skill
		}

		triggered_desc = {
			trigger = {
				has_trait = blind
			}
			desc = bp1_yearly.7055.desc.blind
		}

		triggered_desc = {
			trigger = {
				exists = scope:poet
				scope:poet != scope:friend
			}
			desc = bp1_yearly.7055.desc.poet
		}

		triggered_desc = {
			trigger = {
				exists = scope:friend
			}
			desc = bp1_yearly.7055.desc.friend
		}

		desc = bp1_yearly.7055.desc.ending
	}
	theme = dynasty

	override_background = { reference = study }

	left_portrait = {
		character = root
		animation = throne_room_writer	
	}

	right_portrait = {
		character = scope:friend
		animation = chancellor
	}

	lower_right_portrait = {
		character = scope:poet
	}

	cooldown = { years = 10 }
	trigger = {
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes
		gold >= medium_gold_value
		
		OR = {
			NOT = { has_trait = blind }
			any_court_position_holder = {
				type = court_poet_court_position
				is_available_ai_adult = yes
			}
			any_relation = {
				type = friend
				is_available_ai_adult = yes
				learning >= 13
				learning > root.learning
			}
		}

		any_memory = {
			OR = {
				has_memory_category = battle
				has_memory_category = intimidation
				has_memory_category = family
				has_memory_category = war
				has_memory_category = relationships
			}
			NOT = {
				has_memory_category = private
			}
		}
	}

	immediate = {
		save_scope_as = owner
		random_memory = {
			limit = {
				OR = {
					has_memory_category = battle
					has_memory_category = intimidation
					has_memory_category = family
					has_memory_category = war
					has_memory_category = relationships
				}
				NOT = {
					has_memory_category = private
				}
			}
			save_scope_as = recorded_memory
			if = {
				limit = {
					any_memory_participant = {
						this != root
					}
				}
				random_memory_participant = {
					limit = {
						this != root
					}
					save_scope_as = memory_participant
				}
			}
		}
		if = {
			limit = {
				employs_court_position = court_poet_court_position
				any_court_position_holder = {
					type = court_poet_court_position
					is_available_ai_adult = yes
				}
			}
			random_court_position_holder = {
				type = court_poet_court_position
				limit = {
					is_available_ai_adult = yes
				}
				save_scope_as = poet
			}
		}
		if = {
			limit = {
				any_relation = {
					type = friend
					is_available_ai_adult = yes
					learning >= 13
					learning > root.learning
				}
			}
			random_relation = {
				type = friend
				limit = {
					is_available_ai_adult = yes
					learning >= 13
					learning > root.learning
				}
				save_scope_as = friend
			}
		}
	}
	
	option = { # Make your poet do it
		name = bp1_yearly.7055.poet
		trigger = {
			exists = scope:poet
		}
		
		remove_short_term_gold = minor_gold_value
		
		if = {
			limit = {
				exists = scope:memory_participant
			}
			if = {
				limit = {
					artifacts_use_indian_books_trigger = yes
				}
				create_artifact = {
					name = recorded_memory_character
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = indian_book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = 50
					quality = 50
				}
			}
			else = {
				create_artifact = {
					name = recorded_memory_character
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = 50
					quality = 50
				}
			}
		}
		else = {
			if = {
				limit = {
					artifacts_use_indian_books_trigger = yes
				}
				create_artifact = {
					name = recorded_memory
					type = journal
					creator = root
					description = recorded_memory_desc 
					visuals = indian_book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
				}
			}
			else = {
				create_artifact = {
					name = recorded_memory
					type = journal
					creator = root
					description = recorded_memory_desc 
					visuals = book
					modifier = artifact_monthly_minor_prestige_2_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
				}
			}
		}

		hidden_effect_new_object = {
			scope:newly_created_artifact = {
				random_list = {
					10 = {
						trigger = {
							scope:recorded_memory = {
								OR = {
									has_memory_category = battle
									has_memory_category = war
								}
							}
						}
						add_scaled_artifact_modifier_combat_effect = yes
					}
					10 = {
						trigger = {
							scope:recorded_memory = {
								has_memory_category = intimidation
							}
						}
						add_scaled_artifact_modifier_intrigue_effect = yes
					}
					10 = {
						trigger = {
							scope:recorded_memory = {
								OR = {
									has_memory_category = family
									has_memory_category = relationships
								}
							}
						}
						add_scaled_artifact_modifier_majesty_effect = yes
					}
				}
			}
		}
		
		stress_impact = {
			paranoid = medium_stress_gain
			impatient = medium_stress_gain
			humble = minor_stress_gain
			greedy = medium_stress_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = 1
				ai_honor = 1 
			}
			modifier = {
				factor = 0
				gold < major_gold_value
			}
		}
	}
	
	option = { # Have a friend help
		name = bp1_yearly.7055.friend
		trigger = {
			exists = scope:friend
		}
		
		remove_short_term_gold = minor_gold_value
		
		scope:friend = {
			add_opinion = {
				target = root
				modifier = friendliness_opinion
				opinion = 30
			}
		}
		if = {
			limit = {
				can_set_relation_best_friend_trigger = { CHARACTER = scope:friend }
			}
			set_relation_best_friend = { reason = best_friend_helped_pen_memory copy_reason = friend target = scope:friend }
		}
		
		if = {
			limit = {
				exists = scope:memory_participant
			}
			if = {
				limit = {
					artifacts_use_indian_books_trigger = yes
				}
				create_artifact = {
					name = recorded_memory_character
					type = journal
					creator = root
					description = recorded_memory_desc 
					visuals = indian_book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = 50
					quality = 50
				}
			}
			else = {
				create_artifact = {
					name = recorded_memory_character
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = 50
					quality = 50
				}
			}
		}
		else = {
			if = {
				limit = {
					artifacts_use_indian_books_trigger = yes
				}
				create_artifact = {
					name = recorded_memory
					type = journal
					creator = root
					description = recorded_memory_desc 
					visuals = indian_book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
				}
			}
			else = {
				create_artifact = {
					name = recorded_memory
					type = journal
					creator = root
					description = recorded_memory_desc 
					visuals = book
					modifier = artifact_monthly_minor_prestige_2_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
				}
			}
		}

		hidden_effect_new_object = {
			scope:newly_created_artifact = {
				random_list = {
					10 = {
						trigger = {
							scope:recorded_memory = {
								OR = {
									has_memory_category = battle
									has_memory_category = war
								}
							}
						}
						add_scaled_artifact_modifier_combat_effect = yes
					}
					10 = {
						trigger = {
							scope:recorded_memory = {
								has_memory_category = intimidation
							}
						}
						add_scaled_artifact_modifier_intrigue_effect = yes
					}
					10 = {
						trigger = {
							scope:recorded_memory = {
								OR = {
									has_memory_category = family
									has_memory_category = relationships
								}
							}
						}
						add_scaled_artifact_modifier_majesty_effect = yes
					}
				}
			}
		}
		
		stress_impact = {
			paranoid = medium_stress_gain
			impatient = medium_stress_gain
			humble = minor_stress_gain
			greedy = medium_stress_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = 1
				ai_honor = 1 
			}
			modifier = {
				factor = 0
				gold < major_gold_value
			}
		}
	}
	
	option = { #Make a book of the memory, high skill!
		name = bp1_yearly.7055.high_skill
		trigger = {
			learning >= 13
			NOT = { has_trait = blind }
		}
		
		remove_short_term_gold = medium_gold_value
		
		if = {
			limit = {
				exists = scope:memory_participant
			}
			if = {
				limit = {
					artifacts_use_indian_books_trigger = yes
				}
				create_artifact = {
					name = recorded_memory_character
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = indian_book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = 50
					quality = 50
				}
			}
			else = {
				create_artifact = {
					name = recorded_memory_character
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = 50
					quality = 50
				}
			}
		}
		else = {
			if = {
				limit = {
					artifacts_use_indian_books_trigger = yes
				}
				create_artifact = {
					name = recorded_memory
					type = journal
					creator = root
					description = recorded_memory_desc 
					visuals = indian_book
					modifier = artifact_monthly_minor_prestige_1_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
				}
			}
			else = {
				create_artifact = {
					name = recorded_memory
					type = journal
					creator = root
					description = recorded_memory_desc 
					visuals = book
					modifier = artifact_monthly_minor_prestige_2_modifier
					save_scope_as = newly_created_artifact
					wealth = scope:wealth
					quality = scope:quality
				}
			}
		}

		hidden_effect_new_object = {
			scope:newly_created_artifact = {
				random_list = {
					10 = {
						trigger = {
							scope:recorded_memory = {
								OR = {
									has_memory_category = battle
									has_memory_category = war
								}
							}
						}
						add_scaled_artifact_modifier_combat_effect = yes
					}
					10 = {
						trigger = {
							scope:recorded_memory = {
								has_memory_category = intimidation
							}
						}
						add_scaled_artifact_modifier_intrigue_effect = yes
					}
					10 = {
						trigger = {
							scope:recorded_memory = {
								OR = {
									has_memory_category = family
									has_memory_category = relationships
								}
							}
						}
						add_scaled_artifact_modifier_majesty_effect = yes
					}
				}
			}
		}
		
		stress_impact = {
			lazy = medium_stress_gain
			greedy = medium_stress_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = 1
				ai_honor = 1 
			}
			modifier = {
				factor = 0
				gold < major_gold_value
			}
		}
	}

	option = { #Make a book of the memory
		name = bp1_yearly.7055.a
		trigger = {
			learning < 13
			NOT = { has_trait = blind }
		}
		
		remove_short_term_gold = medium_gold_value
		
		if = {
			limit = {
				exists = scope:memory_participant
			}
			if = {
				limit = {
					artifacts_use_indian_books_trigger = yes
				}
				create_artifact = {
					name = recorded_memory_character
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = indian_book
					modifier = artifact_monthly_minor_prestige_1_modifier
					wealth = 10
					quality = 20
					save_scope_as = newly_created_artifact
				}
			}
			else = {
				create_artifact = {
					name = recorded_memory_character
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = book
					modifier = artifact_monthly_minor_prestige_1_modifier
					wealth = 10
					quality = 20
					save_scope_as = newly_created_artifact
				}
			}
		}
		else = {
			if = {
				limit = {
					artifacts_use_indian_books_trigger = yes
				}
				create_artifact = {
					name = recorded_memory
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = indian_book
					modifier = artifact_monthly_minor_prestige_1_modifier
					wealth = 10
					quality = 20
					save_scope_as = newly_created_artifact
				}
			}
			else = {
				create_artifact = {
					name = recorded_memory
					type = journal
					creator = root
					description = recorded_memory_desc
					visuals = book
					modifier = artifact_monthly_minor_prestige_1_modifier
					wealth = 10
					quality = 20
					save_scope_as = newly_created_artifact
				}
			}
		}

		hidden_effect_new_object = {
			scope:newly_created_artifact = {
				random_list = {
					10 = {
						trigger = {
							scope:recorded_memory = {
								OR = {
									has_memory_category = battle
									has_memory_category = war
								}
							}
						}
						add_scaled_artifact_modifier_combat_effect = yes
					}
					10 = {
						trigger = {
							scope:recorded_memory = {
								has_memory_category = intimidation
							}
						}
						add_scaled_artifact_modifier_intrigue_effect = yes
					}
					10 = {
						trigger = {
							scope:recorded_memory = {
								OR = {
									has_memory_category = family
									has_memory_category = relationships
								}
							}
						}
						add_scaled_artifact_modifier_majesty_effect = yes
					}
				}
			}
		}
		
		stress_impact = {
			lazy = medium_stress_gain
			greedy = medium_stress_gain
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_sociability = 1
				ai_honor = 1 
			}
			modifier = {
				factor = 0
				gold < major_gold_value
			}
		}
	}

	option = { #Don't make a book relax instead
		name = bp1_yearly.7055.b
		
		stress_impact = {
			diligent = medium_stress_gain
		}

		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				has_trait = diligent
			}
		}
	}
	
	after = {
		if = {
			limit = {
				exists = scope:newly_created_artifact
				has_royal_court = yes
			}
			scope:newly_created_artifact = {
				add_scaled_artifact_modifier_grandeur_small_effect = yes
				add_scaled_artifact_modifier_scholarship_effect = yes
				
				reforge_artifact = {
					type = book
				}
			}
		}
	}
}


##################################
# Intimidation                   #
# By Daniel Moore                #
##################################

bp1_yearly.7056 = { 
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7056.t
	desc = {
		desc = bp1_yearly.7056.desc
	}

	theme = dread

	override_background = { reference = dungeon }

	left_portrait = {
		character = root
		animation = laugh  
	}

	right_portrait = {
		character = scope:intimidation_target
		animation = fear     
	}

	cooldown = { years = 10 }
	trigger = {
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes

		OR = {
			has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus }
			has_personality_malicious_trigger = yes
		}

		OR = {
			any_vassal = {
				is_available_ai_adult = yes
				has_any_good_relationship_with_root_trigger = no
				ai_boldness <= 25
			}
			any_courtier = {
				is_available_ai_adult = yes
				has_any_good_relationship_with_root_trigger = no
				ai_boldness <= 25
			}
		}

		any_memory = {
			has_memory_category = intimidation
		}
	}



	immediate = {
		random_memory = {
			limit = {
				has_memory_category = intimidation
			}
		   	save_scope_as = intimidation_memory
		}

		random_vassal = {
			limit = {
				exists = joined_faction
				is_available_ai_adult = yes
				has_any_good_relationship_with_root_trigger = no
				ai_boldness <= 25
			}
			alternative_limit = {
				is_landed = yes
				primary_title.tier >= tier_county
				is_available_ai_adult = yes
				has_any_good_relationship_with_root_trigger = no
				ai_boldness <= 25
			}
			alternative_limit = {
				is_available_ai_adult = yes
				has_any_good_relationship_with_root_trigger = no
				ai_boldness <= 25
			}
			save_scope_as = intimidation_target
		}
		
		if = {
			limit = {
				NOT = { exists = scope:intimidation_target }
			}
			random_courtier = {
				limit = {
					is_available_ai_adult = yes
					has_any_good_relationship_with_root_trigger = no
					ai_boldness <= 25
				}
				save_scope_as = intimidation_target
			}
		}
	}

	option = { #Intimidate them for a favor
		name = bp1_yearly.7056.a

		trigger = {
			can_add_hook = {
				target = scope:intimidation_target
				type = threat_hook
			}
		}

		add_hook = {
			target = scope:intimidation_target
			type = threat_hook
		}
		
		scope:intimidation_target = {
			add_opinion = { 
				target = root
				modifier = scared_opinion
				opinion = -10
			}
			if = {
				limit = {
					exists = joined_faction
				}
				joined_faction = {
					scope:intimidation_target = {
						leave_faction_with_cooldown_effect = {
							FACTION = prev
							YEARS = 20
						}
					}
				}
			}
		}

		stress_impact = {
			compassionate = massive_stress_gain
			forgiving = major_stress_impact_gain
			generous = medium_stress_impact_gain
			greedy = medium_stress_impact_loss
		}

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

	option = { #Have them spread word of your dread
		name = bp1_yearly.7056.b
		
		add_dread = medium_dread_gain
		
		scope:intimidation_target = {
			add_opinion = { 
				target = root
				modifier = scared_opinion
				opinion = -10
			}
			if = {
				limit = {
					exists = joined_faction
				}
				joined_faction = {
					scope:intimidation_target = {
						leave_faction_with_cooldown_effect = {
							FACTION = prev
							YEARS = 20
						}
					}
				}
			}
		}

		stress_impact = {
			humble = medium_stress_impact_gain
			paranoid = medium_stress_impact_gain
			content = medium_stress_impact_gain
			wrathful = minor_stress_impact_loss
			arrogant = minor_stress_impact_loss
		}

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


##################################
# Yearning                       #
# By Daniel Moore                #
##################################

scripted_trigger bp1_yearly_7057_valid_participant = {
	is_alive = yes
	NOT = {
		has_relation_lover = root
	}
	root = {
		can_start_scheme = {
			type = seduce
			target_character = prev
		}
	}
}

bp1_yearly.7057 = { 
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7057.t
	desc = {

		desc = bp1_yearly.7057.desc

		triggered_desc = {
			trigger = {
				is_female = yes
			}
			desc = bp1_yearly.7057.desc.female
		}

		triggered_desc = {
			trigger = {
				is_female = no
			}
			desc = bp1_yearly.7057.desc.male
		}
	}

	theme = seduction

	override_background = { reference = temple }

	left_portrait = {
		character = root
		animation = shame
	}

	right_portrait = {
		character = scope:realm_priest
		animation = disgust
	}

	lower_right_portrait = {
		character = scope:sex_partner
		animation = flirtation_left
	}

	cooldown = { years = 30 }

	trigger = {
		is_playable_character = yes
		is_available_at_peace_adult = yes
		has_bp1_dlc_trigger = yes

		OR = {
			cp:councillor_court_chaplain ?= { is_available_ai_adult = yes }
			any_courtier_or_guest = {
				is_available_ai_adult = yes
				is_clergy = yes
			}
		}
		
		NOR = {
			has_trait = celibate
			has_trait = chaste
			any_relation = { type = soulmate }
		}

		any_memory = {
			memory_type = had_sex
			any_memory_participant = { bp1_yearly_7057_valid_participant = yes }
		}
	}

	immediate = {
		if = {
			limit = { exists = cp:councillor_court_chaplain }
			cp:councillor_court_chaplain = { save_scope_as = realm_priest }
		}
		else = {
			random_courtier_or_guest = {
				limit = {
					is_available_ai_adult = yes
					is_clergy = yes
				}
				save_scope_as = realm_priest
			}
		}

		random_memory = {
			memory_type = had_sex
			limit = {
				any_memory_participant = { bp1_yearly_7057_valid_participant = yes }
			}
			save_scope_as = sex_memory

			random_memory_participant = {
				limit = { bp1_yearly_7057_valid_participant = yes }
				save_scope_as = sex_partner
			}
		}
	}
	option = { #Start a scheme to seduce them
		name = bp1_yearly.7057.a
		trigger = {
			can_start_scheme = {
				type = seduce
				target_character = scope:sex_partner
			}
		}

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

		custom_tooltip = diplomacy_family.2250.b.tt

		random_scheme = {
			type = seduce
			limit = {
				scheme_target_character = scope:sex_partner
			}
			add_scheme_modifier = {
				type = sex_memory_modifier
			}
		}

		stress_impact = {
			lustful = medium_stress_impact_loss
			lazy = minor_stress_impact_gain
			content = medium_stress_impact_gain
			chaste = massive_stress_impact_gain
			celibate = massive_stress_impact_gain
		}

		ai_chance = {
			base = 0
			modifier = {
				add = 100
				might_cheat_on_every_partner_trigger = yes 
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = content
					has_trait = chaste
					has_trait = celibate
				}
			}
		}
	} 

	option = { #Release Stress
		name = bp1_yearly.7057.c
		
		trigger = {
			OR = {
				is_deviant_trigger = yes
				has_trait = lustful
			}
		}
		trait = deviant
		trait = lustful

		stress_impact = {
			base = major_stress_impact_loss
			chaste = massive_stress_impact_gain
			celibate = massive_stress_impact_gain
			shy = major_stress_impact_gain
		}

		scope:realm_priest = {
			add_opinion = {
				modifier = defiled_place_of_worship_opinion
				target = root
			}
		}

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

	option = { #Move on
		name = bp1_yearly.7057.b
		
		add_piety = minor_piety_gain
		
		scope:realm_priest = {
			add_opinion = { 
				target = root
				modifier = pious_opinion
				opinion = 15
			}
		}

		stress_impact = {
			base = minor_stress_impact_gain
			lustful = major_stress_impact_gain
			deviant = major_stress_impact_gain
			stubborn = medium_stress_impact_gain
			fickle = medium_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0.1 # To make sure the AI doesn't start improper seduction schemes
				OR = {
					has_trait = lustful
					has_trait = deviant
					has_trait = stubborn
					has_trait = fickle
				}
			}
		}
	}
}


##################################
# Overindulgence                 #
# By Daniel Moore                #
##################################

bp1_yearly.7058 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7058.t
	desc = bp1_yearly.7058.desc
	theme = unfriendly
	left_portrait = {
		character = root 
		animation = anger
	}

	right_portrait = {
		character = scope:greedy_courtier
		animation = drink
	}

	override_background = { reference = bp1_wine_cellar }

	cooldown = { years = 30 }

	trigger = {
		gold >= medium_gold_value
		any_courtier_or_guest = {
			is_available_ai_adult = yes
			OR = {
				has_trait = gluttonous
				has_trait = comfort_eater
			}
		}
		has_bp1_dlc_trigger = yes
	
		# Standard checks.
		is_available_at_peace_adult = yes
		is_landed = yes
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				is_available_ai_adult = yes
				OR = {
					has_trait = gluttonous
					has_trait = comfort_eater
				}
			}
			save_scope_as = greedy_courtier
		}

		remove_short_term_gold = minor_gold_value
	}
	
	option = { # Bond
		name = bp1_yearly.7058.glutton
		
		trigger = {
			OR = {
				has_trait = gluttonous
				has_trait = comfort_eater
			}
			scope:greedy_courtier = { NOT = { has_relation_friend = root } }
		}
		trait = gluttonous
		trait = comfort_eater

		reverse_add_opinion = {
			target = scope:greedy_courtier
			modifier = grateful_opinion
			opinion = 50
		}
		
		scope:greedy_courtier = {
			if = {
				limit = { can_set_relation_friend_trigger = { CHARACTER = root } }
				set_relation_friend = { reason = friend_bonded_over_food target = root }
			}
			hidden_effect = {
				change_current_weight = 20
			}
		}
		hidden_effect = {
			change_current_weight = 20
		}
		
		stress_impact = {   
			gluttonous = medium_stress_impact_loss
			vengeful = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
		}
	
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = vengeful
					has_trait = wrathful
					has_trait = sadistic
					has_trait = callous
				}
			}
		}
	}
	
	option = { # You will pay it back, and some extra
		name = bp1_yearly.7058.a
		
		trigger = {
			scope:greedy_courtier.gold > 0
		}

		scope:greedy_courtier = {
			pay_short_term_gold = {
				target = root
				gold = {
					value = root.medium_gold_value
					max = scope:greedy_courtier.gold
				}
			}
		}
		
		reverse_add_opinion = {
			target = scope:greedy_courtier
			modifier = unfriendly_opinion
			opinion = -20
		}
		
		stress_impact = {
			generous = major_stress_impact_gain
			compassionate = medium_stress_impact_gain
			forgiving = medium_stress_impact_gain
		}
	
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = compassionate
					has_trait = forgiving
				}
			}
		}
	}
	
	option = { # Enjoy the dungeon
		name = bp1_yearly.7058.b
		
		rightfully_imprison_character_effect = {
			TARGET = scope:greedy_courtier
			IMPRISONER = root
		}
		
		stress_impact = {   
			greedy = medium_stress_impact_loss
			gluttonous = medium_stress_impact_loss
			compassionate = medium_stress_impact_gain
		}
		
		stress_impact = {
			forgiving = massive_stress_impact_gain
			generous = major_stress_impact_gain
			compassionate = medium_stress_impact_gain
			calm = minor_stress_impact_gain
			patient = minor_stress_impact_gain
		}
	
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = compassionate
					has_trait = forgiving
				}
			}
		}
	}

	option = { #Let them go
		name = bp1_yearly.7058.c

		reverse_add_opinion = {
			target = scope:greedy_courtier
			modifier = grateful_opinion
			opinion = 20
		}
		
		scope:greedy_courtier = {
			progress_towards_friend_effect = {
				REASON = friend_bonded_over_food
				CHARACTER = root
				OPINION = 0
			}
		}

		stress_impact = {   
			base = minor_stress_impact_gain
			greedy = medium_stress_impact_gain
			gluttonous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			arbitrary = medium_stress_impact_gain
		}
	
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = greedy
					has_trait = gluttonous
					has_trait = sadistic
					has_trait = callous
					has_trait = arbitrary
				}
			}
		}
	}    
}

##################################
# Dead Friends                   #
# By Daniel Moore                #
##################################

bp1_yearly.7029 = {
	hidden = yes

	trigger = {
		is_adult = yes
		is_landed = yes
		has_bp1_dlc_trigger = yes
		exists = scope:dead_friend_spouse
		exists = scope:dead_friend
		scope:dead_friend_spouse = {
			is_available_ai_adult = yes
			is_eunuch_trigger = no
			NOR = {
				has_trait = chaste
				has_trait = celibate
				has_relation_lover = root
			}
		}
		trigger_if = {
			limit = {
				scope:dead_friend_spouse = {
					NOR = {
						has_trait = deviant
						has_trait = lustful
						has_trait = incestuous
					}
				}
			}
			NOT = {
				is_close_family_of = scope:dead_friend_spouse
			}
		}
		matching_gender_and_sexuality_trigger = {
			CHARACTER_1 = root
			CHARACTER_2 = scope:dead_friend_spouse
		}
	}

	immediate = {
		random_memory = {
			memory_type = friend_died
			limit = {
				any_memory_participant = {
					this = scope:dead_friend
				}
			}
			save_scope_as = dead_friend_memory
		}

		random_list = {
			1 = { #Small chance to fire this when your friend dies.
				modifier = {
					add = 20
					scope:dead_friend_spouse = {
						OR = {
							has_trait = lustful
							has_trait = rakish
						}
					}
				}
				modifier = {
					add = 20
					has_focus_or_focus_trait_trigger = { FOCUS = intrigue_temptation_focus }
				}
				trigger_event = {
					id = bp1_yearly.7030
					days = { 10 20 }
				}
			}

			14 = { #Empty chance to make the other chance rarer.

			}
		}
	}
}

bp1_yearly.7030 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7030.t
	desc = bp1_yearly.7030.desc
	theme = seduction

    override_background = {
		reference = bedchamber
	}
	left_portrait = {
		character = root
		animation = disbelief
	}

	right_portrait = {
		character = scope:dead_friend_spouse
		animation = flirtation  
	}


    trigger = {
		is_available_adult = yes
		is_playable_character = yes
		has_bp1_dlc_trigger = yes
		exists = scope:dead_friend_spouse
		
		trigger_if = {
			limit = {
				scope:dead_friend_spouse = {
					NOR = {
						has_trait = deviant
						has_trait = lustful
						has_trait = incestuous
					}
				}
			}
			NOT = {
				is_close_family_of = scope:dead_friend_spouse
			}
		}
		
		matching_gender_and_sexuality_trigger = {
			CHARACTER_1 = root
			CHARACTER_2 = scope:dead_friend_spouse
		}
		might_cheat_on_every_partner_trigger = yes

		scope:dead_friend_spouse = {
			is_available_ai_adult = yes
			might_cheat_on_every_partner_trigger = yes
			NOR = {
				has_trait = chaste
				has_trait = celibate
				has_relation_lover = root
				has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
			}
		}
	}


    immediate = {
        scope:dead_friend_spouse = {
            add_character_flag = single_combat_stripped_to_waist
        }
        add_character_flag = no_sex_stress_loss
    }

    on_trigger_fail = {
    	trigger_event = {
    		id = bp1_yearly.7030
    		days = 100
    	}
    }

    option = {
        name = bp1_yearly.7030.a
        had_sex_with_effect = { CHARACTER = scope:dead_friend_spouse PREGNANCY_CHANCE = pregnancy_chance }

        scope:dead_friend_spouse = {
            add_opinion = {
                modifier = pleased_opinion
                target = root
                opinion = 20
            }
            if = {
				limit = {
					can_set_relation_potential_lover_trigger = { CHARACTER = root }
				}
				set_relation_potential_lover = root
			}
        }
		
		stress_impact = {
			lustful = medium_stress_impact_loss
			rakish = minor_stress_impact_loss
			disloyal = medium_stress_impact_loss
			chaste = major_stress_impact_gain
			celibate = major_stress_impact_gain
			content = medium_stress_impact_gain
			loyal = medium_stress_impact_gain
			temperate = minor_stress_impact_gain
			paranoid = minor_stress_impact_gain
			callous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = celibate
					has_trait = content
					has_trait = loyal
				}
			}
		}
    }

    option = { 
        name = bp1_yearly.7030.b

        add_piety = 100
        scope:dead_friend_spouse = {
            add_opinion = {
                modifier = rejected_opinion
                target = root
                opinion = -50
            }
        }
		
		stress_impact = {
			lustful = major_stress_impact_gain
			rakish = major_stress_impact_gain
			trusting = medium_stress_impact_gain
			fickle = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lustful
					has_trait = rakish
					has_trait = trusting
					has_trait = fickle
				}
			}
		}
    }

    after = {
   		scope:dead_friend_spouse = {
        	remove_character_flag = single_combat_stripped_to_waist
        }
        remove_character_flag = no_sex_stress_loss
    }
}

#########################################
# Excreta incident, gain Nemesis        #
# By almost everyone in the design team #
#########################################

bp1_yearly.7100 = {
	type = character_event
	content_source = dlc_006
	title = bp1_yearly.7100.t
	desc = bp1_yearly.7100.desc
	theme = unfriendly

	left_portrait = {
		character = root 
		animation = disgust
	}

	right_portrait = {
		character = scope:excrement_agent
		animation = laugh
	}
	
	lower_center_portrait = scope:potential_nemesis

	override_background = { reference = bp1_crossroads_inn }

	cooldown = { years = 10 }
	
	trigger = {
		# DLC check.
		has_dlc_feature = friends_and_foes
		# Standard checks.
		is_playable_character = yes
		is_available_at_peace_adult = yes
		
		NOT = {
			should_be_naked_trigger = yes
		}
		
		num_of_relation_nemesis <= 0

		any_relation = {
			type = rival
			is_available_ai_adult = yes
			num_of_relation_nemesis <= 0
			NOT = {
				has_trait = forgiving
			}
		}
		
		any_pool_character = {
			province = root.capital_province
			is_available_ai_adult = yes
			has_no_particular_noble_roots_trigger = yes
			NOT = {
				has_any_good_relationship_with_root_trigger = yes
			}
		}
	}

	weight_multiplier = {
		base = 1
	}

	immediate = {
		random_pool_character = {
			province = root.capital_province
			limit = {
				is_available_ai_adult = yes
				has_no_particular_noble_roots_trigger = yes
				NOT = {
					has_any_good_relationship_with_root_trigger = yes
				}
			}
			save_scope_as = excrement_agent
		}
		random_relation = {
			type = rival
			limit = {
				is_available_ai_adult = yes
				num_of_relation_nemesis <= 0
				NOT = {
					has_trait = forgiving
				}
			}
			save_scope_as = potential_nemesis
		}
		random_held_county = {
			save_scope_as = owned_county
		}
		if = {
			limit = {
				NOT = { exists = scope:owned_county }
			}
			capital_county = {
				save_scope_as = owned_county
			}
		}
		add_character_modifier = {
			modifier = drenched_in_excrement_roco_modifier
			years = 3
		}
		if = {
			limit = {
				scope:potential_nemesis = { is_married = yes }
			}
			scope:potential_nemesis = {
				random_spouse = {
					limit = {
						root = {
							can_start_scheme = {
								type = seduce
								target_character = prev
							}
						}
						is_available_ai_adult = yes
					}
					save_scope_as = nemesis_spouse_target
				}
			}
		}
		if = {
			limit = {
				scope:potential_nemesis = {
					any_owned_story = {
						type = story_cycle_pet_cat
					}
				}
			}
			
			scope:potential_nemesis = {
				random_owned_story = {
					type = story_cycle_pet_cat
					save_scope_as = cat_story
				}
			}
		}
		if = {
			limit = {
				has_any_nickname = no
			}
			random_list = {
				50 = {
					give_nickname = nick_the_dunged
				}
				50 = {
					give_nickname = nick_the_smelly
				}
			}
		}
	}

	option = { # Deviant
		name = bp1_yearly.7100.e
		trait = deviant
		trigger = {
			is_deviant_trigger = yes
			NOT = { # 4 Options max
				exists = scope:cat_story
			}
		}
		add_prestige = major_prestige_loss
		
		if = {
			limit = {
				scope:potential_nemesis = {
					is_deviant_trigger = yes
				}
			}
			progress_towards_lover_effect = {
				CHARACTER = scope:potential_nemesis
				REASON = lover_covered_excreta
				OPINION = default_lover_opinion
			}
		}

		stress_impact = {
			base = major_stress_impact_loss
			chaste = major_stress_impact_gain
			vengeful = major_stress_impact_gain
			arrogant = major_stress_impact_gain
			wrathful = major_stress_impact_gain
		}

		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = vengeful
					has_trait = arrogant
					has_trait = wrathful
				}
			}
		}
	}
	
	option = { #Drown, no, drown AND THEN SKIN their pet
		name = bp1_yearly.7100.c
		trigger = {
			exists = scope:cat_story
		}
		set_relation_nemesis = { reason = nemesis_skinned_cat target = scope:potential_nemesis }

		add_internal_flag = special

		flavor = bp1_yearly.7100.c.tt

		show_as_tooltip = {
			remove_cat_story_modifiers_effect = yes
		}

		scope:cat_story = {
			hidden_effect = { end_story = yes }
		}

		scope:potential_nemesis = {
			add_character_modifier = {
				modifier = skinned_pet_modifier
				years = 15
			}
			reverse_add_opinion = {
				modifier = vengeful_opinion
				opinion = -75
				target = root
			}
			add_trait = depressed_1
		}

		stress_impact = {
			just = medium_stress_impact_gain
			forgiving = major_stress_impact_gain
			compassionate = major_stress_impact_gain
		}

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

	#Now it's _personal_
	option = {
		name = bp1_yearly.7100.a
		trigger = {
			exists = scope:nemesis_spouse_target
			can_start_scheme = {
				type = seduce
				target_character = scope:nemesis_spouse_target
			}
		}
		set_relation_nemesis = { reason = nemesis_excrement target = scope:potential_nemesis }
		start_scheme = {
			type = seduce
			target_character = scope:nemesis_spouse_target
		}
		custom_tooltip = diplomacy_family.2250.b.tt
		hidden_effect = {
			random_scheme = {
				type = seduce
				limit = {
					scheme_target_character = scope:nemesis_spouse_target
				}
				add_scheme_modifier = {
					type = extra_success_chance_modifier
				}
			}
		}
		add_character_modifier = {
			modifier = focused_on_revenge_modifier
			years = 25
		}
		stress_impact = {  
			chaste = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = chaste
			}
		}
	}

	option = { # Attempt to have them murdered
		name = bp1_yearly.7100.b
		set_relation_nemesis = { reason = nemesis_excrement target = scope:potential_nemesis }
		if = {
			limit = {
				can_start_scheme = {
					type = murder
					target_character = scope:potential_nemesis
				}
			}
			start_scheme = {
				type = murder
				target_character = scope:potential_nemesis
			}
			custom_tooltip = diplomacy_family.2250.b.tt
			hidden_effect = {
				random_scheme = {
					type = murder
					limit = {
						scheme_target_character = scope:potential_nemesis
					}
					add_scheme_modifier = {
						type = extra_success_chance_modifier
					}
				}
			}
		}
		add_character_modifier = {
			modifier = focused_on_revenge_modifier
			years = 25
		}

		stress_impact = {   
			forgiving = medium_stress_impact_gain
		}

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

	option = { #Take it on the cheek
		name = bp1_yearly.7100.d
		
		add_prestige = major_prestige_loss
		
		scope:potential_nemesis = {
			add_stress = massive_stress_impact_loss
		}

		stress_impact = {
			vengeful = massive_stress_impact_gain
			arrogant = massive_stress_impact_gain
			wrathful = massive_stress_impact_gain
		}

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