﻿#Character interactions relating to schemes

start_murder_interaction = {
	common_interaction = yes
	interface_priority = 90
	category = interaction_category_hostile

	ignores_pending_interaction_block = yes

	scheme = murder

	send_name = START_SCHEME

	is_shown = {
		NOT = { scope:recipient = scope:actor }

		NAND = { # Game Rules!
			has_game_rule = no_players_multiplayer_murder_schemes
			scope:actor = {
				is_ai = no
			}
			scope:recipient = {
				is_ai = no
			}
		}

		NAND = {
			has_game_rule = no_player_families_multiplayer_murder_schemes
			scope:actor = {
				is_ai = no
			}
			scope:recipient = {
				OR = {
					is_ai = no
					any_close_family_member = {
						AND = {
							is_ai = no
							NOT = { this = scope:actor }
						}
					}
				}
			}
		}
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			can_start_scheme = {
				type = murder
				target = scope:recipient
			}
		}
		scope:recipient = { NOT = { has_strong_hook = scope:actor } }
	}

	desc = {
		triggered_desc = {
			trigger = {
				scope:actor = {
					can_start_scheme = {
						type = murder
						target = scope:recipient
					}
				}
			}
			desc = scheme_interaction_tt_murder_approved
		}
	}

	on_accept = {
		scope:actor = {
			stress_impact = {
				compassionate = major_stress_impact_gain
				honest = medium_stress_impact_gain
				just = medium_stress_impact_gain
			}
		}
		hidden_effect = {
			scope:actor = {
				send_interface_toast = {
					title = start_murder_interaction_notification

					left_icon = scope:actor					
					right_icon = scope:recipient

					start_scheme = {
						type = murder
						target = scope:recipient
					}

					show_as_tooltip = {
						stress_impact = {
							compassionate = major_stress_impact_gain
							honest = medium_stress_impact_gain
							just = medium_stress_impact_gain
						}
					}
				}
			}
		}
		debug_log = "Started a murder scheme from the murder interaction! The AI shouldn't do that!"
		debug_log = debug_murder_scheme_message
	}
	
	auto_accept = yes

	# AI for murders is handled in event murder_scheme_maintenance.1, fired from the five_year_playable_pulse
}

start_abduct = {
	interface_priority = 70
	category = interaction_category_hostile

	send_name = START_SCHEME

	scheme = abduct
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = { has_perk = kidnapper_perk } # Scheme unlocked by the Kidnapper Perk
		NOR = {
			scope:recipient = scope:actor
			scope:recipient = { is_imprisoned_by = scope:actor }
		}
		#exists = scope:recipient.court_owner
		
		NAND = { # Game Rules!
			has_game_rule = no_players_multiplayer_murder_schemes
			scope:actor = {
				is_ai = no
			}
			scope:recipient = {
				is_ai = no
			}
		}
		
		NAND = {
			has_game_rule = no_player_families_multiplayer_murder_schemes
			scope:actor = {
				is_ai = no
			}
			scope:recipient = {
				OR = {
					is_ai = no
					any_close_family_member = {
						AND = {
							is_ai = no
							NOT = { this = scope:actor }
						}
					}
				}
			}
		}
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			can_start_scheme = {
				type = abduct
				target = scope:recipient
			}
		}
		scope:recipient = { NOT = { has_strong_hook = scope:actor } }
	}

	desc = {
		triggered_desc = {
			trigger = {
				scope:actor = {
					can_start_scheme = {
						type = abduct
						target = scope:recipient
					}
				}
			}
			desc = scheme_interaction_tt_abduct_approved
		}
	}

	on_accept = {
		scope:actor = {
			stress_impact = {
				compassionate = medium_stress_impact_gain
				honest = minor_stress_impact_gain
				just = minor_stress_impact_gain
			}
		}
		hidden_effect = {
			scope:actor = {
				send_interface_toast = {
					title = start_abduct_notification

					left_icon = scope:actor					
					right_icon = scope:recipient

					start_scheme = {
						type = abduct
						target = scope:recipient
					}

					show_as_tooltip = {
						stress_impact = {
							compassionate = medium_stress_impact_gain
							honest = minor_stress_impact_gain
							just = minor_stress_impact_gain
						}
					}
				}
			}
		}
	}
	
	auto_accept = yes
}

end_scheme = {
	is_shown = {
		#debug_only = yes
	}
	special_interaction = remove_scheme_interaction
	use_diplomatic_range = no
	hidden = yes
	on_accept = {
		scope:scheme = {
			end_scheme = yes
		}
	}
	
	auto_accept = yes
	ignores_pending_interaction_block = yes
}

befriend_interaction = {
	category = interaction_category_friendly

	interface_priority = 90
	scheme = befriend

	send_name = START_SCHEME
	ignores_pending_interaction_block = yes

	ai_targets = {
		ai_recipients = liege
	}
	ai_targets = {
		ai_recipients = vassals
		ai_recipients = peer_vassals
		chance = 0.25
	}
	ai_frequency = 36

	is_shown = {
		scope:actor = { has_perk = befriend_perk } # Unlocked by the Befriend Perk
		
		NOT = { scope:actor = scope:recipient }
		scope:recipient = { is_adult = yes }
		scope:actor = { is_adult = yes }
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			NOT = {
				custom_description = {
					text = "befriend_already_friend"
					object = scope:recipient
					has_relation_friend = scope:recipient
				}
			}
		}
		scope:actor = {
			can_start_scheme = {
				type = befriend
				target = scope:recipient
			}
		}
	}

	desc = {
		triggered_desc = {
			trigger = {
				scope:actor = {
					NOT = { is_at_war_with = scope:recipient }
					can_start_scheme = {
						type = befriend
						target = scope:recipient
					}
				}
			}
			desc = scheme_interaction_tt_befriend_approved
		}
	}

	on_accept = {
		scope:actor = {
			stress_impact = {
				shy = medium_stress_impact_gain
			}
		}
		hidden_effect = {
			scope:actor = {
				send_interface_toast = {
					title = befriend_interaction_notification

					left_icon = scope:actor					
					right_icon = scope:recipient

					start_scheme = {
						type = befriend
						target = scope:recipient
					}
				}
			}
			if = { #Stubborness effect
				limit = {
					scope:recipient = {
						has_trait = stubborn
					}
				}
				scope:actor = {
					random_scheme = {
						limit = {
							scheme_type = befriend
							scheme_target = scope:recipient
						}
						scheme_target = {
							random_list = {
								20 = {
									set_variable = {
										name = recipient_stubborness_scheme
										value = -5
									}
								}
								20 = {
									set_variable = {
										name = recipient_stubborness_scheme
										value = -10
									}
								}
								20 = {
									set_variable = {
										name = recipient_stubborness_scheme
										value = -15
									}
								}
								20 = {
									set_variable = {
										name = recipient_stubborness_scheme
										value = -20
									}
								}
								20 = {
									set_variable = {
										name = recipient_stubborness_scheme
										value = -25
									}
								}
							}
						}
					}
				}
			}
		}
	}
	
	ai_potential = {
		NOR = {
			has_trait = shy
			has_trait = callous
			any_scheme = {
				OR = {
					scheme_type = befriend
					scheme_type = sway
					scheme_type = seduce
					scheme_type = courting
					scheme_type = elope
				}
			}
			AND = { # No one cares about City barons
				is_lowborn = yes
				primary_title.tier <= tier_barony
			}
		}
	}
	
	auto_accept = yes
	
	ai_will_do = {
		base = 50

		modifier = {
			factor = 0.1
			scope:actor = {
				opinion = {
					target = scope:recipient
					value < -50
				}
			}
		}

		modifier = {
			factor = 0.1
			scope:recipient = {
				opinion = {
					target = scope:actor
					value > 50
				}
			}
		}

		modifier = {
			factor = 0.5
			scope:recipient = {
				number_of_personality_traits_in_common = {
					target = scope:actor
					value < 2
				}
			}
		}

		modifier = {
			factor = 0.1
			scope:recipient = {
				number_of_personality_traits_in_common = {
					target = scope:actor
					value < 1
				}
			}
		}

		modifier = {
			factor = 25
			has_focus = diplomacy_family_focus
		}

		modifier = {
			factor = 2
			scope:recipient.liege = scope:actor
		}

		modifier = {
			factor = 0.5
			NOT = { scope:recipient.faith = scope:actor.faith }
		}

		modifier = {
			factor = 0.25
			scope:actor = {
				is_ruler = yes
				tier_difference = {
					target = scope:recipient
					value > 2
				}
			}
		}
		modifier = {
			factor = 0.35
			scope:actor = {
				has_personality_malicious_trigger = yes
			}
		}
		modifier = {
			factor = 2
			scope:actor = {
				OR = {
					has_trait = gregarious
					has_trait = diplomat
					has_trait = family_first
					has_trait = august
				}
			}
		}
		modifier = {
			factor = 1.5
			scope:actor = {
				num_of_relation_friend < 3
			}
		}
		modifier = { #Better to Court rather than befriend.
			factor = 0.25
			scope:actor = {
				is_spouse_of = scope:recipient
			}
		}
		modifier = {
			factor = 0.75
			scope:recipient = {
				is_child_of = scope:actor
			}
		}
		modifier = {
			factor = 2
			scope:actor = {
				is_child_of = scope:recipient
			}
		}
		modifier = {
			factor = 2
			scope:actor = { #Friends of friends
				any_relation = {
					type = friend
					any_relation = {
						type = friend
						this = scope:recipient
					}
				}
			}
		}
		modifier = {
			factor = 0.25
			scope:recipient = {
				any_claim = {
					this = scope:actor.primary_title
				}
			}
		}
	}
}


seduce_interaction = {
	category = interaction_category_friendly
	interface_priority = 90
	scheme = seduce

	send_name = START_SCHEME
	ignores_pending_interaction_block = yes
	
	ai_targets = {
		ai_recipients = family
		max = 5
	}
	ai_targets = {
		ai_recipients = guests
		ai_recipients = courtiers
	}
	
	# We don't want this to grow ludicrously large in big realms
	ai_targets = {
		ai_recipients = realm_characters
		max = 30
	}
	
	ai_target_quick_trigger = {
		adult = yes
		attracted_to_owner = yes
		owner_attracted = yes
	}
	ai_frequency = 36

	is_shown = {
		#debug_only = yes
		NOT = { scope:actor = scope:recipient }
		scope:recipient = { is_adult = yes }
		scope:actor = { is_adult = yes }

		# Avoid seducing lowborn nobodies in foreign courts
		trigger_if = {
			limit = {
				scope:actor = { is_ai = yes }
			}
			NOT = {
				scope:recipient = {
					is_lowborn = yes
					is_landed = no
					NOR = {
						is_courtier_of = scope:actor
						is_foreign_court_or_pool_guest_of = scope:actor
					}
				}
			}
		}
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			NOT = { is_at_war_with = scope:recipient }
			can_start_scheme = {
				type = seduce
				target = scope:recipient
			}
		}
		trigger_if = {
			limit = {
				scope:recipient = { exists = primary_spouse }
			}
			scope:recipient = { primary_spouse = { NOT = { has_strong_hook = scope:actor } } }
		}
	}

	desc = scheme_interaction_tt_seduce_approved

	on_accept = {
		seduce_interaction_stress_effect = yes

		hidden_effect = {
			scope:actor = {
				send_interface_toast = {
					title = seduce_interaction_notification

					left_icon = scope:actor					
					right_icon = scope:recipient

					start_scheme = {
						type = seduce
						target = scope:recipient
					}

					show_as_tooltip = { seduce_interaction_stress_effect = yes }
				}
				if = {
					limit = {
						NOT = { is_attracted_to_gender_of = scope:recipient }
					}
					custom_tooltip = scheme_interaction_tt.wrong_gender_no_lover
				}
			}
		}
	}
	
	ai_potential = {
		is_adult = yes
		NOR = {
			has_trait = celibate
			has_trait = chaste
			any_scheme = {
				OR = {
					scheme_type = befriend
					scheme_type = sway
					scheme_type = seduce
					scheme_type = courting
					scheme_type = elope
				}
			}
			primary_title = {
				is_mercenary_company = yes
			}
			AND = { # No one cares about City barons
				is_lowborn = yes
				primary_title.tier <= tier_barony
			}
		}
	}
	
	auto_accept = yes
	
	ai_will_do = {
		base = 0

		modifier = {
			add = -50
			scope:actor = {
				exists = primary_spouse
				primary_spouse = { has_strong_hook = scope:actor }
			}
		}
		
		modifier = {
			add = 50
			scope:actor = {
				has_focus = intrigue_temptation_focus
			}
		}
		
		modifier = { # Focus on befriending if that's the path you've chosen
			add = -50
			scope:actor = {
				has_perk = befriend_perk
			}
		}
		
		modifier = { # Non-lustful clergy tend to not seduce
			add = -25
			scope:actor = {
				is_clergy = yes
				faith = {
					NOT = { has_doctrine_parameter = clergy_can_marry }
				}
				NOR = {
					has_trait = lustful
					has_focus = intrigue_temptation_focus
				}
			}
		}
		
		modifier = { # Seducing your unmarried courtiers is good for producing bastards, which the AI will want to do if they have few heirs
			add = 0
			scope:actor = {
				any_child = {
					count <= 1
				}
			}
			scope:recipient = {
				is_married = no
				fertility > low_fertility
				OR = {
					is_courtier_of = scope:actor
					is_pool_guest_of = scope:actor
				}
			}
		}
		
		modifier = {
			add = 50
			scope:actor = {
				has_trait = lustful
			}
		}

		modifier = { # ( ͡° ͜ʖ ͡°)
			add = 0
			scope:actor = {
				is_close_or_extended_family_of = scope:recipient
				is_deviant_trigger = yes
			}
			scope:recipient = {
				OR = {
					is_deviant_trigger = yes
					has_trait = lustful
				}
			}
		}
		
		modifier = {
			add = 0
			scope:actor = {
				is_close_or_extended_family_of = scope:recipient
				is_deviant_trigger = yes
			}
			scope:recipient = {
				NOR = {
					is_deviant_trigger = yes
					has_trait = lustful
				}
			}
		}
		
		modifier = {
			add = 0
			scope:actor = {
				is_close_or_extended_family_of = scope:recipient
				faith = { has_doctrine = tenet_divine_marriage }
			}
		}
		
		modifier = { # Seducing the spouse of your rival is good drama...
			add = 0
			scope:recipient = {
				exists = primary_spouse
				primary_spouse = {
					OR = {
						has_relation_rival = scope:actor
						has_relation_nemesis = scope:actor
					}
				}
			}
		}
		
		modifier = {
			add = -20
			scope:actor = {
				NOR = {
					has_trait = lustful
					has_trait = arbitrary
					is_deviant_trigger = yes
					faith = { has_doctrine = tenet_divine_marriage }
					has_perk = subtle_desire_perk
				}
			}
			scope:recipient = {
				is_close_family_of = scope:actor
			}
		}
		
		modifier = { # Seducing someone's spouse is not a clever prospect for most characters, so lowering the attractiveness a bit
			add = -20
			scope:recipient = {
				is_married = yes
				NOT = {
					primary_spouse = scope:actor
				}
			}
			scope:actor = {
				NOR = {
					has_trait = lustful
					has_focus = intrigue_temptation_focus
				}
			}
		}
		
		modifier = { # Try to avoid agressive seduction unless you're geared for it
			add = -10
			scope:actor = {
				NOR = {
					has_trait = lustful
					has_focus = intrigue_temptation_focus
				}
			}
			scope:recipient = {
				is_lowborn = no
				NOT = { is_pool_guest_of = scope:actor }
			}
		}

		modifier = {
			factor = 1.25
			scope:recipient = {
				number_of_personality_traits_in_common = {
					target = scope:actor
					value >= 1
				}
			}
		}

		modifier = {
			factor = 1.5
			scope:recipient = {
				number_of_personality_traits_in_common = {
					target = scope:actor
					value >= 2
				}
			}
		}

		modifier = {
			factor = 2
			scope:recipient = {
				number_of_personality_traits_in_common = {
					target = scope:actor
					value >= 3
				}
			}
		}

		modifier = {
			factor = 1.5
			scope:recipient = {
				is_landed = yes
			}
		}

		modifier = { # Target the player less aggressively
			factor = 0.5
			scope:recipient = {
				OR = {
					is_ai = no
					any_consort = {
						is_ai = no
					}
				}
			}
		}

		modifier = {
			factor = 1.25
			scope:recipient = {
				OR = {
					has_trait = lustful
					has_trait = beauty_good
				}
			}
		}
		
		modifier = { # Try to avoid 0% success chance
			factor = {
				value = 0.1
				if = {
					limit = {
						scope:recipient = {
							opinion = {
								target = scope:actor
								value < -15
							}
						}
					}
					value = 0
				}
			}
			scope:recipient = {
				opinion = {
					target = scope:actor
					value < -5
				}
			}
		}

		modifier = { # Try to avoid 0% success chance
			factor = 0.1
			scope:recipient = {
				number_of_opposing_personality_traits = {
					target = scope:actor
					value >= 1
				}
			}
		}

		modifier = {
			factor = 0.75
			scope:recipient = {
				is_lowborn = yes
			}
		}
		
		modifier = { # Barons tend to not seduce anyone landed above them
			factor = 0.1
			scope:actor = {
				is_landed = yes
				primary_title = {
					tier = tier_barony
				}
			}
			scope:recipient = {
				OR = {
					AND = {
						is_landed = yes
						primary_title = {
							tier > tier_barony
						}
					}
					any_spouse = {
						is_landed = yes
						primary_title = {
							tier > tier_barony
						}
					}
				}
			}
		}
		
		modifier = {
			factor = 0.2
			scope:recipient = {
				is_ai = yes
				any_targeting_scheme = {
					scheme_type = seduce
				}
			}
		}
		
		modifier = { #
			factor = 0.1
			scope:recipient = {
				is_ai = yes
				has_trait = chaste
			}
		}

		modifier = {
			factor = 0
			scope:recipient = {
				is_ai = yes
				num_of_relation_soulmate > 0
			}
		}
	}
}

court_interaction = {
	category = interaction_category_friendly

	send_name = START_SCHEME

	interface_priority = 90
	scheme = courting
	ignores_pending_interaction_block = yes

	ai_targets = {
		ai_recipients = family
		max = 5
	}
	
	ai_targets = {
		ai_recipients = realm_characters
		max = 30
	}
	
	ai_target_quick_trigger = {
		adult = yes
		attracted_to_owner = yes
		owner_attracted = yes
	}
	ai_frequency = 36

	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = { is_adult = yes }
		scope:actor = { is_adult = yes }
		scope:actor = { is_attracted_to_gender_of = scope:recipient }
		scope:recipient = { is_attracted_to_gender_of = scope:actor }
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			NOT = { is_at_war_with = scope:recipient }
			can_start_scheme = {
				type = courting
				target = scope:recipient
			}
		}
	}

	desc = scheme_interaction_tt_courtship_approved

	on_accept = {
		scope:actor = {
			stress_impact = {
				shy = medium_stress_impact_gain
			}

			# If you already have a soulmate, they get very mad
			every_relation = {
				type = soulmate

				add_opinion = {
					modifier = betrayed_our_promise
					target = scope:actor
				}
			}
		}
		hidden_effect = {
			scope:actor = {
				send_interface_toast = {
					title = seduce_interaction_notification

					left_icon = scope:actor					
					right_icon = scope:recipient

					start_scheme = {
						type = courting
						target = scope:recipient
					}

					show_as_tooltip = {
						stress_impact = {
							shy = medium_stress_impact_gain
						}

						# If you already have a soulmate, they get very mad
						every_relation = {
							type = soulmate

							add_opinion = {
								modifier = betrayed_our_promise
								target = scope:actor
							}
						}
					}
				}
			}
			scope:recipient = {
				if = {
					limit = {
						is_ai = no
					}
					add_character_flag = {
						flag = courting_cooldown
						years = 5
					}
				}
			}
		}
	}
	
	ai_potential = {
		is_adult = yes
		ai_honor >= high_positive_ai_value
		ai_compassion >= low_positive_ai_value
		highest_held_title_tier > tier_barony
		NOR = {
			has_trait = celibate
			has_trait = chaste
			any_scheme = {
				OR = {
					scheme_type = befriend
					scheme_type = sway
					scheme_type = seduce
					scheme_type = courting
					scheme_type = elope
				}
			}
			AND = { # No one cared about City barons
				is_lowborn = yes
				primary_title.tier <= tier_barony
			}
		}
	}
	
	auto_accept = yes
	
	ai_will_do = {
		base = 0

		opinion_modifier = {
			opinion_target = scope:recipient
			multiplier = 0.4
		}

		compatibility_modifier = {
			compatibility_target = scope:recipient
			multiplier = 0.3
			max = 30
		}

		modifier = {
			factor = 25
			has_focus = martial_chivalry_focus
		}

		modifier = {
			factor = 3
			scope:recipient = {
				OR = {
					is_landed = yes
					any_spouse = {
						is_landed = yes
					}
				}
			}
		}

		modifier = {
			factor = 1.25
			scope:recipient = {
				has_trait = beauty_good
			}
		}
		
		modifier = { # Try to avoid 0% success chance
			factor = {
				value = 0.1
				if = {
					limit = {
						scope:recipient = {
							opinion = {
								target = scope:actor
								value < -10
							}
						}
					}
					value = 0
				}
			}
			scope:recipient = {
				opinion = {
					target = scope:actor
					value < 0
				}
			}
		}
		
		modifier = {
			factor = 0.2
			scope:recipient = {
				is_ai = yes
				any_targeting_scheme = {
					scheme_type = courting
				}
			}
		}
		
		modifier = {
			factor = 0.1
			scope:recipient = {
				num_of_relation_soulmate > 0
			}
		}

		modifier = {
			factor = 0.1
			scope:recipient = {
				is_lowborn = yes
			}
		}
	}
}

sway_interaction = {
	category = interaction_category_friendly
	common_interaction = yes

	send_name = START_SCHEME

	interface_priority = 120
	scheme = sway
	ignores_pending_interaction_block = yes

	ai_targets = {
		ai_recipients = liege
	}
	ai_targets = {
		ai_recipients = vassals
		ai_recipients = peer_vassals
		chance = 0.25
	}
	ai_frequency = 36

	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = { is_adult = yes }
		scope:actor = { is_adult = yes }
	}

	is_valid_showing_failures_only = {
		scope:actor = {
			can_start_scheme = {
				type = sway
				target = scope:recipient
			}
		}
	}

	desc = scheme_interaction_tt_sway_approved

	on_accept = {
		scope:actor = {
			stress_impact = {
				shy = medium_stress_impact_gain
			}
		}
		hidden_effect = {
			scope:actor = {
				send_interface_toast = {
					title = sway_interaction_notification

					left_icon = scope:actor					
					right_icon = scope:recipient

					start_scheme = {
						type = sway
						target = scope:recipient
					}

					show_as_tooltip = {
						stress_impact = {
							shy = medium_stress_impact_gain
						}
					}
				}
			}
		}
	}
	
	ai_potential = {
		primary_title.tier >= tier_county
		NOR = {
			has_trait = shy
			has_trait = callous
			any_scheme = {
				OR = {
					scheme_type = befriend
					scheme_type = sway
					scheme_type = seduce
					scheme_type = courting
					scheme_type = elope
				}
			}
			primary_title = {
				is_mercenary_company = yes
			}
		}
	}
	
	auto_accept = yes
	
	ai_will_do = {
		base = 10
		
		modifier = { # Focus on befriending if that's the path you've chosen
			add = -50
			scope:actor = {
				has_perk = befriend_perk
			}
		}
		
		modifier = { # Prefer seducing if you've got the focus for it
			add = -20
			scope:actor = {
				has_focus = intrigue_temptation_focus
			}
		}

		modifier = {
			factor = 2
			scope:recipient = {
				is_vassal_of = scope:actor
				opinion = {
					target = scope:actor
					value < 0
				}
			}
		}

		modifier = {
			factor = 2
			scope:recipient = {
				is_powerful_vassal_of = scope:actor
				opinion = {
					target = scope:actor
					value < 0
				}
			}
		}

		modifier = {
			factor = 2
			scope:recipient.liege = scope:actor
		}

		modifier = {
			factor = 0.5
			NOT = { scope:recipient.faith = scope:actor.faith }
		}

		modifier = {
			factor = 0.25
			scope:actor = {
				is_ruler = yes
				tier_difference = {
					target = scope:recipient
					value > 2
				}
			}
		}
		modifier = {
			factor = 0.35
			scope:actor = {
				has_personality_malicious_trigger = yes
			}
		}
		modifier = {
			factor = 2
			scope:actor = {
				OR = {
					has_trait = gregarious
					has_trait = diplomat
					has_trait = family_first
					has_trait = august
				}
			}
		}
		modifier = {
			factor = 0.75
			scope:recipient = {
				is_child_of = scope:actor
			}
		}
		modifier = {
			factor = 2
			scope:actor = {
				is_child_of = scope:recipient
			}
		}
		modifier = {
			factor = 0.25
			scope:recipient = {
				any_claim = {
					this = scope:actor.primary_title
				}
			}
		}
	}
}
