﻿namespace = ep3_wedding

scripted_trigger ep3_wedding_0001_relative_ages_trigger = {
	OR = {
		#Both people aren't old
		AND = {
			age <= 55
			root = {
				age <= 55
			}
		}
		#Both people are old
		AND = {
			age > 55
			root = {
				age > 55
			}
		}
		#Root is old
		AND = {
			root = {
				age > 55
			}
			OR = {
				age > 40
				is_deviant_trigger = yes
			}
		}
		#Target is old
		AND = {
			root = {
				OR = {
					age > 40
					is_deviant_trigger = yes
				}
			}
			age > 55
		}
	}
}

#You are caught having sex with the relative
ep3_wedding.0003 = {
	type = activity_event
	id_override_priority = 100
	title = ep3_wedding.0003.t
	desc = {
		desc = ep3_wedding.0003.desc_intro
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						this = scope:activity.special_guest:spouse_2
						this = scope:activity.special_guest:spouse_1
					}
				}
				desc = ep3_wedding.0003.desc_own_wedding
			}
			desc = ep3_wedding.0003.desc_guest
		}
	}
	theme = wedding_banquet_activity
	override_background = {
		reference = corridor_night
	}
	left_portrait = {
		character = root
		animation = stayback
		camera = camera_event_very_left
	}
	center_portrait = {
		character = scope:flirting_in_law
		triggered_animation = {
			trigger = {
				OR = {
					AND = {
						faith_dominant_gender_male_or_equal = yes
						is_female = yes
					}
					AND = {
						faith_dominant_gender_male_or_equal = no
						is_male = yes
					}
				}
			}
			animation = crying
		}
		triggered_animation = {
			trigger = {
				OR = {
					AND = {
						faith_dominant_gender_male_or_equal = yes
						is_male = yes
					}
					AND = {
						faith_dominant_gender_male_or_equal = no
						is_female = yes
					}
				}
			}
			animation = shame
		}
	}
	right_portrait = {
		character = scope:other_family_spouse
		animation = shock
		camera = camera_event_very_right
	}
	lower_right_portrait = scope:same_family_spouse
	immediate = {
		add_character_flag = {
			flag = is_naked
			days = 30
		}
		scope:flirting_in_law = {
			add_character_flag = {
				flag = is_naked
				days = 30
			}
		}
		if = {
			limit = {
				has_activity_intent = woo_attendee_intent
				scope:host.intent_target ?= scope:flirting_in_law
			}
			complete_activity_intent = yes
		}
		if = {
			limit = {
				scope:flirting_in_law = {
					has_activity_intent = woo_attendee_intent
					scope:host.intent_target ?= root
				}
			}
			scope:flirting_in_law = { complete_activity_intent = yes }
		}
		had_sex_with_effect = {
			CHARACTER = scope:flirting_in_law
			PREGNANCY_CHANCE = pregnancy_chance
		}
		if = {
			limit = {
				OR = {
					this = scope:activity.special_guest:spouse_2
					this = scope:activity.special_guest:spouse_1
				}
			}
			create_character_memory = {
				type = wedding_infidelity_spouse
				participants = {
					in_law = scope:flirting_in_law
					other_spouse = scope:other_family_spouse
				}
			}
			scope:flirting_in_law = {
				create_character_memory = {
					type = wedding_infidelity_kin
					participants = {
						sex_spouse = root
						kin_spouse = scope:other_family_spouse
					}
				}
			}
			scope:other_family_spouse = {
				create_character_memory = {
					type = wedding_infidelity_victim
					participants = {
						other_spouse = root
						in_law = scope:flirting_in_law
					}
				}
			}
		}
	}
	#Join us, it definitely isn't weird
	option = {
		name = ep3_wedding.0003.a
		flavor = ep3_wedding.0003.a.flavor
		trigger = {
			#other family spouse is either attracted to root or their own family member
			scope:other_family_spouse = {
				NOR = {
					has_trait = chaste
					has_trait = celibate
				}
			}
			OR = {
				AND = {
					#attracted to root
					OR = {
						has_trait = seducer
						attraction > 0
						scope:other_family_spouse = {
							has_activity_intent = woo_attendee_intent
							scope:host.intent_target = root
						}
						has_relation_lover = scope:other_family_spouse
						scope:other_family_spouse = {
							opinion = {
								target = root
								value >= 80
							}
						}
					}
					scope:other_family_spouse = {
						is_attracted_to_gender_of = root
						ep3_wedding_0001_relative_ages_trigger = yes
					}
				}
				AND = {
					#attracted to own family member
					scope:flirting_in_law = {
						OR = {
							has_trait = seducer
							attraction > 0
							scope:other_family_spouse = {
								has_activity_intent = woo_attendee_intent
								scope:host.intent_target = scope:flirting_in_law
							}
							has_relation_lover = scope:other_family_spouse
							scope:other_family_spouse = {
								opinion = {
									target = scope:flirting_in_law
									value >= 80
								}
							}
						}
						scope:other_family_spouse = {
							is_attracted_to_gender_of = scope:flirting_in_law
							OR = {
								#Both people aren't old
								AND = {
									age <= 55
									scope:flirting_in_law = {
										age <= 55
									}
								}
								#Both people are old
								AND = {
									age > 55
									scope:flirting_in_law = {
										age > 55
									}
								}
								#Root is old
								AND = {
									scope:flirting_in_law = {
										age > 55
									}
									OR = {
										age > 40
										is_deviant_trigger = yes
									}
								}
								#Target is old
								AND = {
									scope:flirting_in_law = {
										OR = {
											age > 40
											is_deviant_trigger = yes
										}
									}
									age > 55
								}
							}
						}
					}
				}
			}
			#Down to rashly do incest
			scope:other_family_spouse = {
				OR = {
					is_incestuous_trigger = yes
					is_deviant_trigger = yes
					NOT = {
						trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:incestuous RITE = scope:other_family_spouse.rite GENDER_CHARACTER = scope:other_family_spouse }
					}
					has_trait = lustful
					has_trait = drunkard
					#Will overlook scruples if root is really hot or persuasive
					root = {
						OR = {
							has_trait = seducer
							has_relation_lover = scope:other_family_spouse
							has_trait = beauty_good_3
							attraction >= 30
							reverse_opinion = {
								target = scope:other_family_spouse
								value >= 100
							}
						}
					}
				}
			}
			
			#in law is down to rashly do incest
			scope:flirting_in_law = {
				OR = {
					is_incestuous_trigger = yes
					is_deviant_trigger = yes
					NOT = {
						trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:incestuous RITE = scope:flirting_in_law.rite GENDER_CHARACTER = scope:flirting_in_law }
					}
					has_trait = lustful
					has_trait = drunkard
					#Will overlook scruples if root is really hot or persuasive
					root = {
						OR = {
							has_trait = seducer
							has_relation_lover = scope:flirting_in_law
							has_trait = beauty_good_3
							attraction >= 30
							reverse_opinion = {
								target = scope:flirting_in_law
								value >= 100
							}
						}
					}
				}
			}
		}
		add_internal_flag = special
		if = {
			limit = {
				scope:other_family_spouse = {
					is_attracted_to_gender_of = root
				}
				is_attracted_to_gender_of = scope:other_family_spouse
			}
			had_sex_with_effect = {
				CHARACTER = scope:other_family_spouse
				PREGNANCY_CHANCE = pregnancy_chance
			}
		}
		had_sex_with_effect = {
			CHARACTER = scope:flirting_in_law
			PREGNANCY_CHANCE = pregnancy_chance
		}

		if = {
			limit = {
				scope:flirting_in_law = {
					is_attracted_to_gender_of = scope:other_family_spouse
				}
				scope:other_family_spouse = {
					is_attracted_to_gender_of = scope:flirting_in_law
				}
			}
			scope:other_family_spouse = {
				had_sex_with_effect = {
					CHARACTER = scope:flirting_in_law
					PREGNANCY_CHANCE = pregnancy_chance
				}
			}
		}
		if = {
			limit = {
				can_set_relation_lover_trigger = { CHARACTER = scope:flirting_in_law }
				scope:flirting_in_law = {
					is_attracted_to_gender_of = root
				}
				is_attracted_to_gender_of = scope:flirting_in_law
			}
			set_relation_lover = {
				target = scope:flirting_in_law
				reason = lover_absconded_during_wedding
			}
		}
		if = {
			limit = {
				can_set_relation_lover_trigger = { CHARACTER = scope:other_family_spouse }
				scope:other_family_spouse = {
					is_attracted_to_gender_of = root
				}
				is_attracted_to_gender_of = scope:other_family_spouse
			}
			set_relation_lover = {
				target = scope:other_family_spouse
				reason = lover_incestuous_wedding_threesome
			}
		}
		
		if = {
			limit = {
				NOT = {
					has_trait = lifestyle_reveler
				}
			}
			add_trait = lifestyle_reveler
		}
		else = {
			add_trait_xp = {
				trait = lifestyle_reveler
				value = 50
			}
		}
		if = {
			limit = {
				NOT = {
					has_trait = seducer
				}
			}
			add_trait = seducer
		}
		else = {
			add_diplomacy_skill = 1
		}
		stress_and_fulfillment_impact = {
			chaste = major_stress_impact_gain
			content = minor_stress_impact_gain
		}
		ai_chance = {
			base = 300
			ai_value_modifier = {
				ai_energy = 0.5
				ai_sociability = 0.5
			}
			modifier = {
				add = -250
				NOR = {
					is_deviant_trigger = yes
					is_incestuous_trigger = yes
					has_trait = lustful
					has_trait = drunkard
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					#attracted to root
					NOT = { is_attracted_to_gender_of = scope:other_family_spouse }
					NOR = {
						#Both people aren't old
						AND = {
							age <= 55
							scope:other_family_spouse = {
								age <= 55
							}
						}
						#Both people are old
						AND = {
							age > 55
							scope:other_family_spouse = {
								age > 55
							}
						}
						#Root is old
						AND = {
							scope:other_family_spouse = {
								age > 55
							}
							OR = {
								age > 40
								is_deviant_trigger = yes
							}
						}
						#Target is old
						AND = {
							scope:other_family_spouse = {
								OR = {
									age > 40
									is_deviant_trigger = yes
								}
							}
							age > 55
						}
					}
				}
			}
		}
	}

	#We will never speak of this again... or else
	option = {
		name = ep3_wedding.0003.b
		trigger = {
			OR = {
				dread >= 80
				has_trait = torturer
				scope:other_family_spouse = {
					has_dread_level_towards = {
						target = root
						level >= 1
					}
				}
			}
		}
		scope:other_family_spouse = {
			add_stress = major_stress_impact_gain
		}
		if = {
			limit = {
				OR = {
					this = scope:activity.special_guest:spouse_2
					this = scope:activity.special_guest:spouse_1
				}
				NOR = {
					AND = {
						scope:other_family_spouse.rite = {
							rite_has_doctrine = doctrine_adultery_men_accepted
						}
						is_male = yes
					}
					AND = {
						scope:other_family_spouse.rite = {
							rite_has_doctrine = doctrine_adultery_women_accepted
						}
						is_female = yes
					}
				}
			}
			scope:other_family_spouse = {
				add_opinion = {
					modifier = cheater_opinion
					target = root
					opinion = -100
				}
			}
		}
		else = {
			scope:other_family_spouse = {
				add_opinion = {
					modifier = threatened_opinion
					target = root
					opinion = -25
				}
			}
		}
		if = {
			limit = {
				has_relation_soulmate = scope:other_family_spouse
			}
			remove_relation_soulmate = scope:other_family_spouse
		}
		stress_and_fulfillment_impact = {
			compassionate = major_stress_impact_gain
			forgiving = medium_stress_impact_gain
			trusting = minor_stress_impact_gain
		}
		ai_chance = {
			base = 200
			ai_value_modifier = {
				ai_compassion = -1
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = trusting
				}
			}
		}
	}

	#AN EVIL SPIRIT CAME OVER ME OR SOMETHING
	option = {
		name = ep3_wedding.0003.c
		flavor = ep3_wedding.0003.c.flavor
		trigger = {
			OR = {
				has_trait = possessed
				has_trait = lunatic
				has_trait = witch
				has_trait = lifestyle_mystic
				has_trait = deceitful
				has_trait = schemer
				has_trait = arbitrary
				has_trait = zealous
				has_trait = eccentric
			}
		}
		duel = {
			skills = { diplomacy intrigue }
			target = scope:other_family_spouse
			50 = { #They agree not to speak of this horrible affliction
				desc = ep3_wedding.0003.c.success.desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				modifier = {
					add = 20
					has_trait = possessed
				}
				modifier = {
					add = 20
					has_trait = lunatic
				}
				modifier = {
					add = 20
					has_trait = witch
				}
				modifier = {
					add = 20
					has_trait = lifestyle_mystic
				}
				modifier = {
					add = 10
					reverse_opinion = {
						target = scope:other_family_spouse
						value >= 80
					}
				}
				modifier = {
					add = 10
					reverse_opinion = {
						target = scope:other_family_spouse
						value >= 50
					}
				}
				modifier = {
					add = 10
					reverse_opinion = {
						target = scope:other_family_spouse
						value > 25
					}
				}
				modifier = {
					add = 50
					scope:other_family_spouse = {
						OR = {
							has_trait = zealous
							has_trait = trusting
							has_trait = eccentric
						}
					}
				}
				modifier = {
					add = 25
					scope:other_family_spouse = {
						OR = {
							has_trait = forgiving
							has_trait = lifestyle_mystic
							has_trait = witch
							has_trait = possessed
							has_trait = lunatic
						}
					}
				}
				send_interface_toast = {
					type = event_toast_effect_good
					title = ep3_wedding.0003.c.success.desc
					left_icon = scope:other_family_spouse

					if = {
						limit = {
							has_trait = lifestyle_mystic
						}
						add_trait_xp = {
							trait = trait:lifestyle_mystic
							value = 25
						}
					}
					add_character_modifier = {
						modifier = possessed_by_lust_demon_modifier
						years = 10
						desc = lust_demon_success_chance
					}
					custom_tooltip = lust_demon_success_chance_tt
					hidden_effect = {
						if = {
							limit = {
								scope:flirting_in_law = {
									is_female = yes
									age <= 45
									is_pregnant = no
								}
								is_male = yes
							}
							scope:flirting_in_law = {
								make_pregnant = {
									father = root
									number_of_children = 1
								}
								# added to make sure the pregnancy can actually take effect, if it occurs
								event_pregnancy_effect = yes
							}
						}
						else_if = {
							limit = {
								is_female = yes
								age <= 45
								is_pregnant = no
								scope:flirting_in_law = {
									is_male = yes
								}
							}
							make_pregnant = {
								father = scope:flirting_in_law
								number_of_children = 3
							}
							# added to make sure the pregnancy can actually take effect, if it occurs
							event_pregnancy_effect = yes
						}
					}
				}
			}
			50 = { #They don't buy this bullshit
				desc = ep3_wedding.0003.c.fail.desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				modifier = {
					add = 20
					scope:other_family_spouse = {
						OR = {
							has_trait = lustful
							has_trait = paranoid
							has_trait = sadistic
							has_trait = deceitful
							has_trait = schemer
						}
					}
				}
				modifier = {
					add = 20
					reverse_opinion = {
						target = scope:other_family_spouse
						value <= -60
					}
				}
				modifier = {
					add = 20
					reverse_opinion = {
						target = scope:other_family_spouse
						value <= -30
					}
				}
				modifier = {
					add = 10
					reverse_opinion = {
						target = scope:other_family_spouse
						value <= 0
					}
				}
				modifier = {
					add = 50
					scope:other_family_spouse = {
						OR = {
							has_trait = cynical
							has_trait = vengeful
						}
					}
				}
				send_interface_toast = {
					type = event_toast_effect_bad
					title = ep3_wedding.0003.c.fail.desc
					left_icon = scope:other_family_spouse

					if = {
						limit = {
							scope:other_family_spouse = {
								can_add_hook = {
									target = root
									type = manipulation_hook
								}
							}
						}
						scope:other_family_spouse = {
							add_hook = {
								type = manipulation_hook
								target = root
							}
						}
					}
					if = {
						limit = {
							scope:other_family_spouse = {
								can_add_hook = {
									target = scope:flirting_in_law
									type = manipulation_hook
								}
							}
						}
						scope:other_family_spouse = {
							add_hook = {
								type = manipulation_hook
								target = scope:flirting_in_law
							}
						}
					}
					if = {
						limit = {
							OR = {
								this = scope:activity.special_guest:spouse_2
								this = scope:activity.special_guest:spouse_1
							}
							NOR = {
								AND = {
									scope:other_family_spouse.rite = {
										rite_has_doctrine = doctrine_adultery_men_accepted
									}
									is_male = yes
								}
								AND = {
									scope:other_family_spouse.rite = {
										rite_has_doctrine = doctrine_adultery_women_accepted
									}
									is_female = yes
								}
							}
						}
						scope:other_family_spouse = {
							add_opinion = {
								modifier = cheater_opinion
								target = root
								opinion = -100
							}
						}
					}
					else = {
						scope:other_family_spouse = {
							add_opinion = {
								modifier = angry_opinion
								target = root
								opinion = -25
							}
						}
					}
					add_piety = major_piety_loss
				}

			}
		}
		if = {
			limit = {
				has_relation_soulmate = scope:other_family_spouse
			}
			remove_relation_soulmate = scope:other_family_spouse
		}
		stress_and_fulfillment_impact = {
			zealous = minor_stress_impact_gain
			just = medium_stress_impact_gain
			honest = major_stress_impact_gain

		}
		ai_chance = {
			base = 200
			ai_value_modifier = {
				ai_honor = -1
				ai_zeal = -0.5
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = just
					has_trait = honest
					diplomacy < low_skill_rating
					intrigue < low_skill_rating
					AND = {
						diplomacy < mediocre_skill_rating
						intrigue < mediocre_skill_rating
					}
				}
			}
			modifier = {
				add = -100
				OR = {
					diplomacy < mediocre_skill_rating
					intrigue < mediocre_skill_rating
					AND = {
						diplomacy < medium_skill_rating
						intrigue < medium_skill_rating
					}
				}
			}
			modifier = {
				add = 100
				OR = {
					has_trait = lunatic
					has_trait = possessed
					has_trait = lifestyle_mystic
				}
			}
		}
	}
	#I don't even care, this just makes me look cool
	option = {
		name = ep3_wedding.0003.d
		flavor = ep3_wedding.0003.d.flavor
		if = {
			limit = {
				NOT = {
					has_trait = lifestyle_reveler
				}
			}
			add_trait = lifestyle_reveler
		}
		else = {
			add_trait_xp = {
				trait = lifestyle_reveler
				value = 25
			}
		}
		add_character_modifier = {
			modifier = unflappable_boudoir_confidence_modifier
			years = 10
		}
		if = {
			limit = {
				is_male = yes
				scope:flirting_in_law = {
					is_male = yes
				}
				trait_is_shunned_or_criminal_in_rite_trigger = {
					TRAIT = trait:sodomite
					GENDER_CHARACTER = root
					RITE = root.rite
				}
				NOT = { has_trait = sodomite }
			}
			add_trait = sodomite
		}
		if = {
			limit = {
				relation_with_character_is_incestuous_in_my_or_lieges_rite_trigger = { CHARACTER = scope:flirting_in_law }
				NOT = { has_trait = incestuous }
			}
			add_trait = incestuous
		}
		if = {
			limit = {
				is_married = yes
				trait_is_shunned_or_criminal_in_rite_trigger = {
					TRAIT = trait:adulterer
					GENDER_CHARACTER = root
					RITE = root.rite
				}
				NOT = { has_trait = adulterer }
			}
			add_trait = adulterer
		}
		if = {
			limit = {
				is_married = no
				trait_is_shunned_or_criminal_in_rite_trigger = {
					TRAIT = trait:fornicator
					GENDER_CHARACTER = root
					RITE = root.rite
				}
				NOT = { has_trait = fornicator }
			}
			add_trait = fornicator
		}
		if = {
			limit = {
				scope:flirting_in_law = {
					is_married = yes
				}
				trait_is_shunned_or_criminal_in_rite_trigger = {
					TRAIT = trait:adulterer
					GENDER_CHARACTER = scope:flirting_in_law
					RITE = scope:flirting_in_law.rite
				}
				scope:flirting_in_law = {
					NOT = { has_trait = adulterer }
				}
			}
			scope:flirting_in_law = { add_trait = adulterer }
		}
		if = {
			limit = {
				scope:flirting_in_law = {
					is_married = no
				}
				trait_is_shunned_or_criminal_in_rite_trigger = {
					TRAIT = trait:fornicator
					GENDER_CHARACTER = scope:flirting_in_law
					RITE = scope:flirting_in_law.rite
				}
				scope:flirting_in_law = { 
					NOT = { has_trait = fornicator }
				}
			}
			scope:flirting_in_law = { add_trait = fornicator }
		}
		if = {
			limit = {
				is_male = yes
				scope:flirting_in_law = {
					is_male = yes
				}
				trait_is_shunned_or_criminal_in_rite_trigger = {
					TRAIT = trait:sodomite
					GENDER_CHARACTER = scope:flirting_in_law
					RITE = scope:flirting_in_law.rite
				}
				scope:flirting_in_law = {
					NOT = { has_trait = sodomite }
				}
			}
			scope:flirting_in_law = { add_trait = sodomite }
		}
		if = {
			limit = {
				scope:flirting_in_law = {
					relation_with_character_is_incestuous_in_my_or_lieges_rite_trigger = { CHARACTER = root }
					NOT = { has_trait = incestuous }
				}
			}
			scope:flirting_in_law = { add_trait = incestuous }
		}
		if = {
			limit = {
				OR = {
					this = scope:activity.special_guest:spouse_2
					this = scope:activity.special_guest:spouse_1
				}
				NOR = {
					AND = {
						scope:other_family_spouse.rite = {
							rite_has_doctrine = doctrine_adultery_men_accepted
						}
						is_male = yes
					}
					AND = {
						scope:other_family_spouse.rite = {
							rite_has_doctrine = doctrine_adultery_women_accepted
						}
						is_female = yes
					}
				}
			}
			if = {
				limit = {
					can_set_relation_rival_trigger = { CHARACTER = scope:other_family_spouse }
				}
				scope:other_family_spouse = {
					set_relation_rival = {
						target = root
						reason = rival_wedding_infidelity
					}
				}
			}
			else_if = {
				limit = {
					can_set_relation_nemesis_trigger = { CHARACTER = scope:other_family_spouse }
				}
				scope:other_family_spouse = {
					set_relation_nemesis = {
						target = root
						reason = rival_wedding_infidelity
					}
				}
			}
		}
		else = {
			scope:other_family_spouse = {
				add_opinion = {
					modifier = angry_opinion
					target = root
					opinion = -25
				}
			}
		}
		if = {
			limit = {
				scope:flirting_in_law = {
					OR = {
						is_married = yes
						is_concubine = yes
					}
				}
			}
			scope:flirting_in_law = {
				every_consort = {
					limit = {
						this != root
						NOR = {
							AND = {
								rite = {
									rite_has_doctrine = doctrine_adultery_men_accepted
								}
								scope:flirting_in_law = {
									is_male = yes
								}
							}
							AND = {
								rite = {
									rite_has_doctrine = doctrine_adultery_women_accepted
								}
								scope:flirting_in_law = {
									is_female = yes
								}
							}
						}
					}
					add_opinion = {
						modifier = cheater_opinion
						target = scope:flirting_in_law
						opinion = -100
					}
				}
			}
		}
		if = {
			limit = {
				has_relation_soulmate = scope:other_family_spouse
			}
			remove_relation_soulmate = scope:other_family_spouse
		}
		stress_and_fulfillment_impact = {
			paranoid = minor_stress_impact_gain
			just = medium_stress_impact_gain
			compassionate = minor_stress_impact_gain
			humble = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
			}
			modifier = {
				add = -75
				OR = {
					AND = {
						rite = {
							rite_has_doctrine = doctrine_adultery_men_shunned
						}
						is_male = yes
					}
					AND = {
						rite = {
							rite_has_doctrine = doctrine_adultery_women_shunned
						}
						is_female = yes
					}
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = just
					AND = {
						rite = {
							rite_has_doctrine = doctrine_adultery_men_crime
						}
						is_male = yes
					}
					AND = {
						rite = {
							rite_has_doctrine = doctrine_adultery_women_crime
						}
						is_female = yes
					}
				}
			}
		}
	}
	#I'm sorry!!! Please don't tell anyone!!!
	option = {
		name = ep3_wedding.0003.e
		flavor = ep3_wedding.0003.e.flavor
		if = {
			limit = {
				scope:other_family_spouse = {
					can_add_hook = {
						target = root
						type = manipulation_hook
					}
				}
			}
			scope:other_family_spouse = {
				add_hook = {
					type = manipulation_hook
					target = root
				}
			}
		}
		if = {
			limit = {
				scope:other_family_spouse = {
					can_add_hook = {
						target = scope:flirting_in_law
						type = manipulation_hook
					}
				}
			}
			scope:other_family_spouse = {
				add_hook = {
					type = manipulation_hook
					target = scope:flirting_in_law
				}
			}
		}
		scope:other_family_spouse = {
			add_opinion = {
				modifier = angry_opinion
				target = root
				opinion = -75
			}
		}
		if = {
			limit = {
				has_relation_soulmate = scope:other_family_spouse
			}
			remove_relation_soulmate = scope:other_family_spouse
		}
		stress_and_fulfillment_impact = {
			arrogant = medium_stress_impact_gain
			callous = minor_stress_impact_gain
			sadistic = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = -0.5
				ai_honor = 0.5
			}
			modifier = {
				factor = 0
				has_trait = arrogant
			}
		}
	}
	after = {
		remove_character_flag = is_naked
		scope:flirting_in_law = {
			remove_character_flag = is_naked
		}
	}
}

