#########################################################
#
# Way of Life - New Lover Events
#
# Written by Henrik Fåhraeus
#
# ID Range: WoL.1000 to WoL.1999
#
#########################################################

namespace = WoL

##########################################
# SPOUSE SUSPECTS REAL LOVE AFFAIR
##########################################

# Hidden start event to set up the scopes
character_event = {
	id = WoL.1000
	hide_window = yes
	
	capable_only = yes
	prisoner = no
	min_age = 12
	is_married = yes
	
	trigger = {
		has_dlc = "Way of Life"
		OR = {
			has_polygamy = no
			is_female = no
		}
		NOT = { trait = infirm }
		NOT = { is_inaccessible_trigger = yes }
		NOT = { trait = on_hajj }
		NOT = { trait = on_pilgrimage }
		NOT = { trait = imbecile }
		NOT = { trait = inbred }
		
		in_command = no
		
		any_spouse = {
			prisoner = no
			NOT = { trait = infirm }
			NOT = { is_inaccessible_trigger = yes }
			NOT = { trait = incapable }
			NOT = { trait = on_pilgrimage }
			any_lover = {
				NOT = { character = ROOT }
				NOT = { has_character_modifier = wol_court_tomcat }
				NOT = { has_character_modifier = wol_court_vixen }
				prisoner = no
				NOT = { is_consort = PREV }
			}
			NOT = { has_character_modifier = wol_court_tomcat }
			NOT = { has_character_modifier = wol_court_vixen }
		}
	}
	
	mean_time_to_happen = {
		months = 360
		modifier = {
			factor = 0.25
			trait = paranoid
		}
		modifier = {
			factor = 0.25
			trait = genius
		}
		modifier = {
			factor = 0.5
			trait = schemer
		}
		modifier = {
			factor = 0.5
			OR = {
				trait = quick
				trait = shrewd
			}
		}
		modifier = {
			factor = 0.25
			has_focus = focus_intrigue
		}
		modifier = {
			factor = 0.75
			trait = envious
		}
		modifier = {
			factor = 0.75
			trait = ambitious
		}
		modifier = {
			factor = 0.75
			trait = just
		}
		modifier = {
			factor = 2.0
			trait = arbitrary
		}
		modifier = {
			factor = 3.0
			trait = content
		}
		modifier = {
			factor = 3.0
			OR = {
				trait = slow
				trait = dull
			}
		}
		modifier = {
			factor = 5.0
			trait = trusting
		}
	}
	
	immediate = {
		# It is ok for this to be a bit more selective than the 'any_spouse' trigger above, since this event is invisible.
		random_spouse = {
			limit = {
				prisoner = no
				NOT = { trait = infirm }
				NOT = { is_inaccessible_trigger = yes }
				NOT = { trait = incapable }
				NOT = { trait = on_pilgrimage }
				NOT = { has_character_modifier = wol_court_tomcat }
				NOT = { has_character_modifier = wol_court_vixen }
				NOT = {
					reverse_has_opinion_modifier = {
						who = ROOT
						modifier = opinion_cuckolded
						modifier = opinion_cuckolded_yes
					}
				}
				NOT = {
					reverse_has_opinion_modifier = {
						who = ROOT
						modifier = opinion_cuckolded_private
						modifier = opinion_cuckolded_private_yes
					}
				}
				NOT = {
					reverse_has_opinion_modifier = {
						who = ROOT
						modifier = slut_seductress
						modifier = slut_seductress_yes
					}
				}
				any_lover = {
					NOT = { character = ROOT }
					NOT = { has_character_modifier = wol_court_tomcat }
					NOT = { has_character_modifier = wol_court_vixen }
					prisoner = no
					NOT = { is_consort = PREV }
				}
			}
			character_event = { id = WoL.1001 }
		}
	}
}

# Ping the spouse
character_event = {
	id = WoL.1001
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		random_lover = {
			limit = {
				NOT = { character = FROM }
				NOT = { has_character_modifier = wol_court_tomcat }
				NOT = { has_character_modifier = wol_court_vixen }
				prisoner = no
				NOT = { is_consort = FROM }
			}
			character_event = { id = WoL.1002 }
		}
	}
}

# Ping the lover
character_event = {
	id = WoL.1002
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		FROMFROM = { character_event = { id = WoL.1003 } }
	}
}

# Spouse suspected of affair - Choices
character_event = {
	id = WoL.1003
	desc = {
		text = EVTDESC_WOL_1003
		trigger = {
			NOT = { has_character_flag = tipped_off_about_spouse_affair }
			NOT = { has_character_flag = spy_spouse_affair }
			FROMFROM = {
				ROOT = {
					FROM = {
						NOT = { is_close_relative = PREVPREV }
					}
				}
			}
		}
	}
	desc = {
		text = EVTDESC_WOL_1003_CR
		trigger = {
			NOT = { has_character_flag = tipped_off_about_spouse_affair }
			NOT = { has_character_flag = spy_spouse_affair }
			FROMFROM = {
				ROOT = {
					FROM = {
						is_close_relative = PREVPREV
					}
				}
			}
		}
	}
	
	desc = {
		text = EVTDESC_WOL_1003_TIP
		trigger = {
			has_character_flag = tipped_off_about_spouse_affair
		}
	}
	
	desc = {
		text = EVTDESC_WOL_1003_SPY_RESULT
		trigger = {
			has_character_flag = spy_spouse_affair
		}
	}
	
	picture = GFX_event_woman_26
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		character_event = { id = WoL.2000 days = 1 } # Chance of levelling up Intrigue skills
		
		if = {
			limit = { has_character_flag = tipped_off_about_spouse_affair }
			FROMFROMFROM = { character_event = { id = WoL.1025 days = 3 } }
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1003 # Confront Spouse
		ai_chance = {
			factor = 100
			modifier = {
				factor = 5.0
				trait = kind
			}
			modifier = {
				factor = 10.0
				trait = cuck
			}
			modifier = {
				factor = 10.0
				trait = lustful
			}
		}
		
		hidden_tooltip = {
			clr_character_flag = tipped_off_about_spouse_affair
			clr_character_flag = spy_spouse_affair
			FROMFROM = { character_event = { id = WoL.1004 days = 2 } }
		}
	}
	
	option = {
		name = {
			text = EVTOPTB_WOL_1003_F # Confront the Lover
			trigger = { FROM = { is_female = yes } }
		}
		name = {
			text = EVTOPTB_WOL_1003_M # Confront the Lover
			trigger = { FROM = { is_female = no } }
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				trait = deceitful
			}
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROMFROM
					value = 50
				}
			}
			modifier = {
				factor = 3.0
				is_lover = FROMFROM
			}
		}
		hidden_tooltip = {
			clr_character_flag = tipped_off_about_spouse_affair
			clr_character_flag = spy_spouse_affair
			FROM = { character_event = { id = WoL.1033 days = 2 } }
		}
	}
	
	option = {
		name = EVTOPTC_WOL_1003_HOMO_F # Two women? Who cares...
		trigger = {
			FROM = { is_female = yes }
			FROMFROM = { is_female = yes }
		}
		ai_chance = {
			factor = 100
		}
		clr_character_flag = tipped_off_about_spouse_affair
		clr_character_flag = spy_spouse_affair
	}
	
	option = {
		name = EVTOPTC_WOL_1003 # Focus on more important matters
		trigger = {
			OR = {
				FROM = { is_female = no }
				FROMFROM = { is_female = no }
			}
		}
		
		ai_chance = {
			factor = 1
			modifier = {
				factor = 500.0
				trait = craven
			}
			modifier = {
				factor = 0.0
				trait = brave
			}
		}
		
		if = {
			limit = {
				NOT = { trait = cuck }
				NOT = { trait = arbitrary }
				NOT = { trait = depressed }
			}
			add_trait = depressed
			hidden_tooltip = { character_event = { id = 38288 } } 
		}

		hidden_tooltip = { remove_trait = brave  add_trait = craven  add_trait = cuck  remove_trait = fertile }
		
		clr_character_flag = tipped_off_about_spouse_affair
		clr_character_flag = spy_spouse_affair
	}
}

# Spouse is confronted
character_event = {
	id = WoL.1004
	picture = GFX_event_woman_26
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1004
	
	option = {
		name = EVTOPTA_WOL_1004 # Tell him to follow you
		ai_chance = {
			factor = 100
			modifier = {
				factor = 10.0
				trait = wife_of_cuck
			}
			modifier = {
				factor = 5.0
				trait = honest
			}
			modifier = {
				factor = 5.0
				trait = brave
			}
			modifier = {
				factor = 5.0
				trait = lustful
			}
		}
		
		hidden_tooltip = { add_lover = FROMFROM add_consort = FROMFROM add_artifact = queen_of_spades remove_trait = craven  add_trait = wife_of_cuck  add_trait = lustful  remove_trait = shy }

		FROMFROM = { character_event = { id = WoL.1005 tooltip = EVTTOOLTIP_WoL_1005 } } # Lover notified
		
		FROM = { character_event = { id = WoL.1006 days = 2 tooltip = EVTTOOLTIP_WoL_1006 } }
	}
	
	option = {
		name = EVTOPTC_WOL_1004 # Lie and deny
		ai_chance = {
			factor = 100
			modifier = {
				factor = 5.0
				trait = deceitful
			}
			modifier = {
				factor = 0.0
				trait = wife_of_cuck
			}
			modifier = {
				factor = 0.0
				trait = lustful
			}
		}
		
		hidden_tooltip = { remove_trait = honest  add_trait = deceitful }

		FROM = { character_event = { id = WoL.1022 days = 2 tooltip = EVTTOOLTIP_WoL_1022 } }
	}
	
	option = {
		name = EVTOPTD_WOL_1004 # Skillfully manipulate (high intrigue)
		tooltip_info = intrigue
		trigger = {
			attribute_diff = {
				attribute = intrigue
				character = FROM
				value = 5
			}
			FROM = {
				NOT = { has_focus = focus_intrigue }
			}
		}
		ai_chance = {
			factor = 10000
			modifier = {
				factor = 0.0
				trait = wife_of_cuck
			}
			modifier = {
				factor = 0.0
				trait = lustful
			}
		}
		
		FROM = { character_event = { id = WoL.1010 days = 2 tooltip = EVTTOOLTIP_WoL_1010 } }
	}
}

# Lover is notified of new cuck
character_event = {
	id = WoL.1005
	picture = GFX_event_woman_27
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1005
	
	option = {
		name = EVTOPTA_WOL_1005_M
		trigger = { FROMFROM = { is_female = no } }
		
		FROMFROM = { break = yes } # Just to get the portrait
	}
	option = {
		name = EVTOPTA_WOL_1005_F
		trigger = { FROMFROM = { is_female = yes } }
		
		FROMFROM = { break = yes } # Just to get the portrait
	}
}

# The spouse responds to the cuckolding
character_event = {
	id = WoL.1006
	picture = GFX_event_woman_27
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1006
	
	option = {
		name = EVTOPTA_WOL_1006 # Masturbate to the scene
		ai_chance = {
			factor = 100
		}
		opinion = {
			who = FROM
			modifier = opinion_cuckolded_yes
		}
		hidden_tooltip = { remove_trait = chaste  add_trait = cuck  add_trait = lustful  add_trait = hedonist  add_trait = kind  add_trait = trusting  add_friend = FROMFROMFROM }
		if = {
			limit = {
				is_female = yes
				FROMFROMFROM = { is_female = yes }
			}
			opinion = {
				who = FROMFROMFROM
				modifier = slut_seductress_yes
			}
		}
		if = {
			limit = {
				is_female = no
				FROMFROMFROM = { is_female = no }
			}
			opinion = {
				who = FROMFROMFROM
				modifier = opinion_cuckolded_yes
			}
		}
	}
}

# Lover is told of public denouncement
# Accuser in FROM scope
# Cheating spouse in FROMFROM
character_event = {
	id = WoL.1007
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = {
		text = EVTDESC_WOL_1007
		trigger = {
			NOT = { has_character_flag = wol_denounced_after_lover_admission }
			NOT = { has_character_flag = wol_denounced_after_spying }
		}
	}
	desc = {
		text = EVTDESC_WOL_1007_LOVER_ADM
		trigger = { has_character_flag = wol_denounced_after_lover_admission }
	}
	desc = {
		text = EVTDESC_WOL_1007_SPYING
		trigger = { has_character_flag = wol_denounced_after_spying }
	}
	
	option = {
		name = {
			text = EVTOPTA21006 # I am doomed!
			trigger = { is_liege_or_above = FROM }
		}
		name = {
			text = EVTOPTB21006 # Damn!
			trigger = { NOT = { is_liege_or_above = FROM } }
		}
		
		clr_character_flag = wol_denounced_after_lover_admission
		clr_character_flag = wol_denounced_after_spying
		
		hidden_tooltip = {
			FROMFROM = {
				save_event_target_as = target_adulterer
				ROOT = { character_event = { id = 20 } } # Adultery fallout
			}
		}
	}
}

# Spouse is told of public denouncement
# Accuser in FROM scope
# Lover in FROMFROMFROMFROM
character_event = {
	id = WoL.1008
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = {
		text = EVTDESC_WOL_1008
		trigger = { NOT = { has_character_flag = wol_denounced_after_cruel_admission } }
	}
	desc = {
		text = EVTDESC_WOL_1008_CRUEL
		trigger = { has_character_flag = wol_denounced_after_cruel_admission }
	}
	
	option = {
		name = {
			text = EVTOPTA21006 # I am doomed!
			trigger = { is_liege_or_above = FROM }
		}
		name = {
			text = EVTOPTB21006 # Damn!
			trigger = { NOT = { is_liege_or_above = FROM } }
		}
		
		clr_character_flag = wol_denounced_after_cruel_admission
	}
}

# The spouse responds to the cruel admission
character_event = {
	id = WoL.1009
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1009
	
	option = {
		name = {
			text = EVTOPTA_WOL_1009_M # Forgive and move on
			trigger = { is_female = no }
		}
		name = {
			text = EVTOPTA_WOL_1009_F # Forgive and move on
			trigger = { is_female = yes }
		}
		
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROM
					value = 50
				}
			}
			modifier = {
				factor = 1.5
				trait = patient
			}
			modifier = {
				factor = 1.5
				trait = humble
			}
			modifier = {
				factor = 2.0
				trait = craven
			}
			modifier = {
				factor = 3.0
				trait = kind
			}
			modifier = {
				factor = 3.0
				is_lover = FROM
			}
		}
		
		if = {
			limit = {
				NOT = { trait = arbitrary }
				NOT = { trait = depressed }
			}
			random = {
				chance = 20
				add_trait = depressed
				hidden_tooltip = {
					character_event = { id = 38288 } # Depressed gained
				}
			}
		}
		
		opinion = {
			who = FROM
			modifier = opinion_unfaithful_private
		}
		
		add_rival = FROMFROMFROM
		
		if = {
			limit = {
				is_female = yes
				FROMFROMFROM = { is_female = yes }
			}
			opinion = {
				who = FROMFROMFROM
				modifier = slut_seductress
			}
		}
		if = {
			limit = {
				is_female = no
				FROMFROMFROM = { is_female = no }
			}
			opinion = {
				who = FROMFROMFROM
				modifier = opinion_cuckolded_private
			}
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1009 # Denounce them both (scandal)
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.2
				is_ruler = no
				FROM = { is_ruler = yes }
				NOT = { trait = arbitrary }
			}
			modifier = {
				factor = 2.0
				NOT = {
					personal_opinion = {
						who = FROM
						value = 0
					}
				}
			}
			modifier = {
				factor = 2.0
				trait = wroth
			}
			modifier = {
				factor = 1.5
				trait = proud
			}
			modifier = {
				factor = 1.5
				trait = brave
			}
			modifier = {
				factor = 3.0
				trait = cruel
			}
		}
			
		if = {
			limit = { FROM = { is_female = yes } }
			opinion = {
				who = FROM
				modifier = opinion_unfaithful_wife
				months = 120
			}
		}
		if = {
			limit = { FROM = { is_female = no } }
			if = {
				limit = { gender_equality_trigger = no }
				opinion = {
					who = FROM
					modifier = opinion_unfaithful_husband
					months = 120
				}
			}
			if = {
				limit = { gender_equality_trigger = yes }
				opinion = {
					who = FROM
					modifier = opinion_unfaithful_husband_crime
					months = 120
				}
			}
		}
		
		if = {
			limit = {
				is_female = no
				FROMFROMFROM = { is_female = no }
			}
			opinion = {
				who = FROMFROMFROM
				modifier = opinion_cuckolded
			}
		}
		
		if = {
			limit = { is_lover = FROM }
			remove_lover = FROM
		}
		
		hidden_tooltip = {
			FROMFROMFROM = { character_event = { id = WoL.1007 } }
			FROM = {
				set_character_flag = wol_denounced_after_cruel_admission
				character_event = { id = WoL.1008 }
			}
		}
	}
}

# The spouse denies the affair
character_event = {
	id = WoL.1022
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1022
	
	option = {
		name = EVTOPTA_WOL_1022 # Very well...
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.1
				trait = paranoid
			}
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROM
					value = 50
				}
			}
			modifier = {
				factor = 1.5
				trait = patient
			}
			modifier = {
				factor = 1.5
				trait = humble
			}
			modifier = {
				factor = 2.0
				trait = craven
			}
			modifier = {
				factor = 3.0
				trait = kind
			}
			modifier = {
				factor = 3.0
				is_lover = FROM
			}
			modifier = {
				factor = 10.0
				trait = trusting
			}
		}
		if = {
			limit = { NOT = { trait = trusting } }
			opinion = {
				who = FROM
				modifier = opinion_suspected_adultery
				months = 24
			}
			
			opinion = {
				who = FROMFROMFROM
				modifier = opinion_chasing_spouse
				months = 24
			}
			if = {
				limit = { NOT = { trait = arbitrary } }
				random = {
					chance = 20
					add_trait = depressed
					hidden_tooltip = {
						character_event = { id = 38288 } # Depressed gained
					}
				}
			}
		}
		
		if = {
			limit = {
				NOT = { trait = paranoid }
				NOT = { trait = trusting }
			}
			random = {
				chance = 10
				add_trait = paranoid
				hidden_tooltip = {
					character_event = { id = 38275 } # Paranoid gained
				}
			}
		}
		
		if = {
			limit = { trait = trusting }
			random = {
				chance = 20
				remove_trait = trusting
				hidden_tooltip = {
					character_event = { id = 38306 } # Trusting lost
				}
			}
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1022 # The lover is married too... Tip off his/her spouse.
		trigger = {
			FROMFROMFROM = { is_married = yes }
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.1
				trait = imbecile
			}
			modifier = {
				factor = 0.5
				OR = {
				trait = slow
				trait = dull
			}
			}
			modifier = {
				factor = 1.5
				trait = patient
			}
			modifier = {
				factor = 1.5
				trait = gregarious
			}
			modifier = {
				factor = 2.5
				OR = {
					trait = quick
					trait = shrewd
				}
			}
			modifier = {
				factor = 5.0
				trait = genius
			}
		}
		FROMFROMFROM = {
			character_event = { id = WoL.1023 days = 1 tooltip = EVTTOOLTIP_WoL_1023 }
		}
	}
	
	option = {
		name = EVTOPTC_WOL_1022 # Pay to have them both watched
		trigger = {
			wealth = 10
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.1
				trait = imbecile
			}
			modifier = {
				factor = 0.2
				trait = greedy
			}
			modifier = {
				factor = 0.5
				OR = {
				trait = slow
				trait = dull
			}
			}
			modifier = {
				factor = 1.5
				trait = envious
			}
			modifier = {
				factor = 2.5
				trait = deceitful
			}
			modifier = {
				factor = 10.0
				trait = paranoid
			}
		}
		
		hidden_tooltip = {
			FROMFROMFROM = {
				character_event = { id = WoL.1026 days = 30 random = 30 }
			}
		}
	}
}

# Ping the lover
character_event = {
	id = WoL.1023
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		FROMFROM = { character_event = { id = WoL.1024 } }
	}
}

# Ping the accuser's spouse
character_event = {
	id = WoL.1024
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		FROM = {
			spouse = {
				set_character_flag = tipped_off_about_spouse_affair
				character_event = { id = WoL.1003 days = 7 } # Start this event chain for the lover's spouse
			}
		}
	}
}

# Response from the other spouse
character_event = {
	id = WoL.1025
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1025
	
	option = {
		name = EVTOPTA_WOL_1025
	}
}

# Lover: The accuser's spies are investigating
character_event = {
	id = WoL.1026
	
	hide_window = yes
	
	is_triggered_only = yes
	
	option = {
		name = OK # Success!
		trigger = {
			is_lover = FROMFROM
		}
		
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.5
				FROM = {
					NOT = { intrigue = 2 }
				}
			}
			modifier = {
				factor = 0.5
				FROM = {
					NOT = { intrigue = 5 }
				}
			}
			modifier = {
				factor = 2.0
				FROM = {
					intrigue = 10
				}
			}
			modifier = {
				factor = 3.0
				FROM = {
					intrigue = 15
				}
			}
			modifier = {
				factor = 1.5
				FROM = {
					trait = deceitful
				}
			}
			modifier = {
				factor = 2.0
				FROM = {
					trait = schemer
				}
			}
			modifier = {
				factor = 2.0
				FROM = {
					any_courtier = {
						has_opinion_modifier = {
							modifier = opinion_chasing_friend
							who = ROOT
						}
					}
				}
			}
			modifier = {
				factor = 2.0
				FROM = {
					any_courtier = {
						has_opinion_modifier = {
							modifier = opinion_chasing_spouse
							who = ROOT
						}
					}
				}
			}
			modifier = {
				factor = 2.0
				FROM = {
					any_courtier = {
						has_opinion_modifier = {
							modifier = opinion_chasing_child
							who = ROOT
						}
					}
				}
			}
			modifier = {
				factor = 2.0
				FROM = {
					has_focus = focus_intrigue
				}
			}
		}
		
		FROM = { character_event = { id = WoL.1028 } }
	}
	
	option = {
		name = OK # Failure
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.5
				NOT = { intrigue = 2 }
			}
			modifier = {
				factor = 0.5
				NOT = { intrigue = 5 }
			}
			modifier = {
				factor = 2.0
				intrigue = 10
			}
			modifier = {
				factor = 3.0
				intrigue = 15
			}
			modifier = {
				factor = 1.5
				trait = deceitful
			}
			modifier = {
				factor = 1.5
				trait = seducer
			}
			modifier = {
				factor = 2.0
				trait = schemer
			}
			modifier = {
				factor = 5.0
				OR = {
					has_character_modifier = wol_court_vixen
					has_character_modifier = wol_court_tomcat
				}
			}
			modifier = {
				factor = 5.0
				FROMFROM = {
					OR = {
						has_character_modifier = wol_court_vixen
						has_character_modifier = wol_court_tomcat
					}
				}
			}
			modifier = {
				factor = 2.0
				OR = {
					has_focus = focus_intrigue
					FROMFROM = { has_focus = focus_intrigue }
				}
			}
		}
		
		FROM = { character_event = { id = WoL.1027 } }
	}
}

# Spying failed
character_event = {
	id = WoL.1027
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	desc = EVTDESC_WOL_1027
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA21010 # That's a relief!
	}
}

# Spying succeeded
character_event = {
	id = WoL.1028
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1028
	
	option = {
		name = EVTOPTA_WOL_1028 # Don't want a scandal
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROMFROMFROM
					value = 50
				}
			}
			modifier = {
				factor = 1.5
				trait = patient
			}
			modifier = {
				factor = 1.5
				trait = humble
			}
			modifier = {
				factor = 2.0
				trait = craven
			}
			modifier = {
				factor = 3.0
				trait = kind
			}
			modifier = {
				factor = 3.0
				is_lover = FROMFROMFROM
			}
		}
		opinion = {
			who = FROMFROMFROM
			modifier = opinion_unfaithful_private
			months = 24
		}
		
		add_rival = FROM
		
		if = {
			limit = {
				is_female = yes
				FROM = { is_female = yes }
			}
			opinion = {
				who = FROM
				modifier = slut_seductress
				months = 120
			}
		}
		if = {
			limit = {
				is_female = no
				FROM = { is_female = no }
			}
			opinion = {
				who = FROM
				modifier = opinion_cuckolded_private
			}
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1028 # Denounce them both (scandal)
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.2
				is_ruler = no
				FROMFROMFROM = { is_ruler = yes }
				NOT = { trait = arbitrary }
			}
			modifier = {
				factor = 2.0
				NOT = {
					personal_opinion = {
						who = FROMFROMFROM
						value = 0
					}
				}
			}
			modifier = {
				factor = 2.0
				trait = wroth
			}
			modifier = {
				factor = 1.5
				trait = proud
			}
			modifier = {
				factor = 1.5
				trait = brave
			}
			modifier = {
				factor = 3.0
				trait = cruel
			}
		}
			
		if = {
			limit = { FROMFROMFROM = { is_female = yes } }
			opinion = {
				who = FROMFROMFROM
				modifier = opinion_unfaithful_wife
				months = 120
			}
		}
		if = {
			limit = { FROMFROMFROM = { is_female = no } }
			if = {
				limit = { gender_equality_trigger = no }
				opinion = {
					who = FROMFROMFROM
					modifier = opinion_unfaithful_husband
					months = 120
				}
			}
			if = {
				limit = { gender_equality_trigger = yes }
				opinion = {
					who = FROMFROMFROM
					modifier = opinion_unfaithful_husband_crime
					months = 120
				}
			}
		}
		
		if = {
			limit = {
				is_female = no
				FROM = { is_female = no }
			}
			opinion = {
				who = FROM
				modifier = opinion_cuckolded
			}
		}
		
		if = {
			limit = {
				is_female = yes
				FROM = { is_female = yes }
			}
			opinion = {
				who = FROM
				modifier = slut_seductress
			}
		}
		
		if = {
			limit = { is_lover = FROMFROMFROM }
			remove_lover = FROMFROMFROM
		}
		
		hidden_tooltip = {
			FROMFROMFROM = {
				character_event = { id = WoL.1029 }
				character_event = { id = WoL.1031 }
			}
		}
	}
}
# Ping the spouse
character_event = {
	id = WoL.1029
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		FROM = { character_event = { id = WoL.1030 } }
	}
}
# Ping the accuser
character_event = {
	id = WoL.1030
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		FROMFROMFROM = {
			set_character_flag = wol_denounced_after_spying
			character_event = { id = WoL.1007 }
		}
	}
}

# Spouse is told of public denouncement after spies uncovered the affair
# Accuser in FROM scope
# Lover in FROMFROM
character_event = {
	id = WoL.1031
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1031
	
	option = {
		name = {
			text = EVTOPTA21006 # I am doomed!
			trigger = { is_liege_or_above = FROM }
		}
		name = {
			text = EVTOPTB21006 # Damn!
			trigger = { NOT = { is_liege_or_above = FROM } }
		}
		
		clr_character_flag = wol_denounced_after_cruel_admission
		
		hidden_tooltip = {
			FROMFROM = {
				save_event_target_as = target_adulterer
			}
		}
	}
}

# The accuser is manipulated
character_event = {
	id = WoL.1010
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = {
		text = EVTDESC_WOL_1010_M
		trigger = { is_female = yes }
	}
	desc = {
		text = EVTDESC_WOL_1010_F
		trigger = { is_female = no }
	}
	
	option = {
		name = EVTOPTA21015 # Now I feel guilty...
		
		opinion = {
			who = FROM
			modifier = opinion_regrets_accusation
			months = 36
		}
		
		if = {
			limit = {
				NOT = { trait = paranoid }
				NOT = { trait = trusting }
			}
			random = {
				chance = 20
				add_trait = trusting
				hidden_tooltip = {
					character_event = { id = 38250 } # Trusting gained
				}
			}
		}
		
		if = {
			limit = { trait = paranoid }
			random = {
				chance = 20
				remove_trait = paranoid
				hidden_tooltip = {
					character_event = { id = 38305 } # Paranoid lost
				}
			}
		}
	}
}

# The lover is confronted directly
character_event = {
	id = WoL.1033
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = {
		text = EVTDESC_WOL_1033
		trigger = { same_realm = FROM }
	}
	desc = {
		text = EVTDESC_WOL_1033_DISTANT
		trigger = { NOT = { same_realm = FROM } }
	}
	
	option = {
		name = EVTOPTA_WOL_1033 # Deny affair
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROMFROMFROM
					value = 50
				}
			}
			modifier = {
				factor = 4.0
				trait = brave
			}
		}
		hidden_tooltip = {
			if = {
				limit = { NOT = { same_realm = FROM } }
				FROMFROMFROM = { character_event = { id = WoL.1011 days = 14 } }
				break = yes
			}
			FROMFROMFROM = { character_event = { id = WoL.1011 days = 2 } }
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1033 # Admit
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				NOT = {
					personal_opinion = {
						who = FROMFROMFROM
						value = 0
					}
				}
			}
			modifier = {
				factor = 4.0
				trait = craven
			}
		}
		
		remove_lover = FROMFROMFROM
		
		hidden_tooltip = {
			FROMFROMFROM = { character_event = { id = WoL.1019 days = 2 } }
		}
	}
	option = {
		# Fly into a rage and physically assault
		name = {
			text = EVTOPTC_WOL_1033_F
			trigger = {
				is_female = yes
			}
		}
		name = {
			text = EVTOPTC_WOL_1033_M
			trigger = {
				is_female = no
			}
		}
		trigger = {
			same_realm = FROM
			same_sex = FROM
		}
		ai_chance = {
			factor = 10
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROMFROMFROM
					value = 50
				}
			}
			modifier = {
				factor = 4.0
				trait = brave
			}
			modifier = {
				factor = 10.0
				trait = wroth
			}
			modifier = {
				factor = 3.0
				trait = lunatic
			}
			modifier = {
				factor = 3.0
				trait = possessed
			}
		}
		
		random_list = {
			33 = {
				add_trait = wounded
				hidden_tooltip = {
					character_event = { id = 38280 } # Wounded gained
				}
			}
			33 = {
				add_scarred_tiered_effect = yes
				hidden_tooltip = {
					character_event = { id = 38308 } # Scarred gained
				}
			}
			34 = {
			}
		}
		
		custom_tooltip = {
			text = EVTTOOLTIP_WoL_1011_ATTACK
		}
		
		hidden_tooltip = {
			FROM = { set_character_flag = wol_lover_assaults }
			FROMFROMFROM = { character_event = { id = WoL.1011 days = 2 } }
		}
	}
}

# Ping the cheating spouse
character_event = {
	id = WoL.1011
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		FROMFROM = { character_event = { id = WoL.1012 } }
	}
}

# The lover denies the affair
character_event = {
	id = WoL.1012
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	show_from_from = yes
	
	immediate = {
		if = {
			limit = {
				has_character_flag = wol_lover_assaults
			}
			random_list = {
				33 = {
					add_trait = wounded
					hidden_tooltip = {
						character_event = { id = 38280 days = 1 } # Wounded gained
					}
				}
				33 = {
					add_scarred_tiered_effect = yes
					hidden_tooltip = {
						character_event = { id = 38308 days = 1 } # Scarred gained
					}
				}
				34 = {
				}
			}
		}
	}
	
	desc = {
		text = EVTDESC_WOL_1012
		trigger = { NOT = { has_character_flag = wol_lover_assaults } }
	}
	
	desc = {
		text = EVTDESC_WOL_1012_ATTACKED
		trigger = { has_character_flag = wol_lover_assaults }
	}
	
	option = {
		name = {
			text = EVTOPTA_WOL_1012 # Very well...
			trigger = { NOT = { has_character_flag = wol_lover_assaults } }
		}
		name = {
			text = EVTOPTA_WOL_1012_ATTACKED # Such fury must signal innocence
			trigger = { has_character_flag = wol_lover_assaults }
		}
		
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.25
				trait = paranoid
			}
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROM
					value = 50
				}
			}
			modifier = {
				factor = 1.5
				trait = patient
			}
			modifier = {
				factor = 1.5
				trait = humble
			}
			modifier = {
				factor = 2.0
				trait = craven
			}
			modifier = {
				factor = 3.0
				trait = kind
			}
			modifier = {
				factor = 3.0
				is_lover = FROM
			}
			modifier = {
				factor = 5.0
				trait = trusting
			}
		}
		
		clr_character_flag = wol_lover_assaults
		
		if = {
			limit = { NOT = { trait = trusting } }
			opinion = {
				who = FROM
				modifier = opinion_suspected_adultery
				months = 24
			}
			
			opinion = {
				who = FROMFROM
				modifier = opinion_chasing_spouse
				months = 24
			}
			if = {
				limit = { NOT = { trait = arbitrary } }
				random = {
					chance = 20
					add_trait = depressed
					hidden_tooltip = {
						character_event = { id = 38288 } # Depressed gained
					}
				}
			}
		}
		
		if = {
			limit = {
				NOT = { trait = paranoid }
				NOT = { trait = trusting }
			}
			random = {
				chance = 10
				add_trait = paranoid
				hidden_tooltip = {
					character_event = { id = 38275 } # Paranoid gained
				}
			}
		}
		
		if = {
			limit = { trait = trusting }
			random = {
				chance = 20
				remove_trait = trusting
				hidden_tooltip = {
					character_event = { id = 38306 } # Trusting lost
				}
			}
		}
	}
	
	option = {
		name = EVTOPTC_WOL_1022 # Pay to have them both watched
		trigger = {
			wealth = 10
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.1
				trait = imbecile
			}
			modifier = {
				factor = 0.2
				trait = greedy
			}
			modifier = {
				factor = 0.5
				OR = {
				trait = slow
				trait = dull
			}
			}
			modifier = {
				factor = 1.5
				trait = envious
			}
			modifier = {
				factor = 2.5
				trait = deceitful
			}
			modifier = {
				factor = 10.0
				trait = paranoid
			}
		}
		
		clr_character_flag = wol_lover_assaults
		
		hidden_tooltip = {
			FROMFROM = {
				character_event = { id = WoL.1026 days = 30 random = 30 }
			}
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1012 # A little drop of poison...
		tooltip_info = intrigue
		trigger = {
			attribute_diff = {
				attribute = intrigue
				character = FROMFROM
				value = 5
			}
			FROMFROM = {
				NOT = { has_focus = focus_intrigue }
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.25
				trait = kind
			}
			modifier = {
				factor = 2.0
				trait = deceitful
			}
			modifier = {
				factor = 3.0
				trait = cruel
			}
		}
		
		clr_character_flag = wol_lover_assaults
		
		hidden_tooltip = {
			FROMFROM = { character_event = { id = WoL.1013 } }
		}
	}
	
	option = {
		name = EVTOPTC_WOL_1012_DUEL # Challenge to a duel
		trigger = {
			is_female = no
			NOT = { age = 60 }
			combat_rating = 0
			FROMFROM = {
				is_female = no
				NOT = { age = 60 }
				combat_rating = -50
				is_ill = no
			}
			OR = {
				trait = wroth
				trait = duelist
				trait = berserker
				trait = brave
				is_strong_trigger = yes
			}
		}
		
		ai_chance = {
			factor = 1000
			modifier = {
				factor = 0.01
				trait = craven
			}
			modifier = {
				factor = 2.0
				trait = brave
			}
		}
		
		clr_character_flag = wol_lover_assaults
		
		FROMFROM = { character_event = { id = WoL.1032 days = 2 tooltip = EVTTOOLTIP_WoL_1032 } }
	}
}

# Poison attempt
character_event = {
	id = WoL.1013
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		random_list = {
			33 = { # Dies
				character_event = { id = WoL.1014 days = 30 random = 30 }
			}
			34 = { # Gets sick
				character_event = { id = WoL.1015 days = 30 random = 30 }
			}
			33 = { # Lives
				FROM = { character_event = { id = WoL.1016 days = 30 random = 30 } }
			}
		}
	}
}

# The lover dies of poison
character_event = {
	id = WoL.1014
	picture = GFX_evt_death #GFX_evt_feast
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1014
	
	immediate = {
		FROMFROM = { character_event = { id = WoL.1017 } }
		death = {
			death_reason = death_murder_unknown_poison
			killer = FROMFROM
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1014
	}
}

# The lover gets sick of poison
character_event = {
	id = WoL.1015
	picture = GFX_evt_feast
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1015
	
	immediate = {
		FROMFROM = { character_event = { id = WoL.1018 } }
	}
	
	option = {
		name = EVTOPTA_WOL_1015
		if = {
			limit = {
				NOT = {
					has_dlc = "Reapers"
				}
			}
		add_trait = ill
		}
		if = {
			limit = {
				has_dlc = "Reapers"
			}
		set_character_flag = disease_not_serious
		add_trait = vomiting
		character_event = { id = RIP.11005 days = 10 random = 30 }
		}
	}
}

# The lover did not have the poisoned shellfish
character_event = {
	id = WoL.1016
	picture = GFX_evt_feast
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1016
	
	option = {
		name = EVTOPTA_WOL_1016
		if = {
			limit = { NOT = { trait = cruel } }
			random = {
				chance = 20
				add_trait = cruel
				hidden_tooltip = {
					character_event = { id = 38259 } # Cruel gained
				}
			}
		}
	}
}

# The lover died of poison
character_event = {
	id = WoL.1017
	picture = GFX_evt_death
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1017
	
	option = {
		name = EVTOPTA_WOL_1017
		if = {
			limit = { NOT = { trait = cruel } }
			random = {
				chance = 20
				add_trait = cruel
				hidden_tooltip = {
					character_event = { id = 38259 } # Cruel gained
				}
			}
		}
	}
}

# The lover got sick from the poison
character_event = {
	id = WoL.1018
	picture = GFX_evt_feast
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1018
	
	option = {
		name = EVTOPTA_WOL_1018
	}
}

# Cheating spouse. Lover admits the affair.
character_event = {
	id = WoL.1019
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	desc = {
		text = EVTDESC_WOL_1019
		trigger = { NOT = { has_character_flag = wol_lover_admitted_at_sword_point } }
	}
	desc = {
		text = EVTDESC_WOL_1019_DUEL
		trigger = { NOT = { has_character_flag = wol_lover_admitted_at_sword_point } }
	}
	
	show_from_from = yes
	
	is_triggered_only = yes
	
	immediate = {
		FROMFROM = { character_event = { id = WoL.1020 } }
	}
	
	option = {
		name = EVTOPTA_WOL_1019
		clr_character_flag = wol_lover_admitted_at_sword_point
	}
}

# The accuser responds to the lover's confession
character_event = {
	id = WoL.1020
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	show_from_from = yes
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1020
	
	option = {
		name = EVTOPTA_WOL_1020 # Forgive and move on
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROM
					value = 50
				}
			}
			modifier = {
				factor = 1.5
				trait = patient
			}
			modifier = {
				factor = 1.5
				trait = humble
			}
			modifier = {
				factor = 2.0
				trait = craven
			}
			modifier = {
				factor = 3.0
				trait = kind
			}
			modifier = {
				factor = 3.0
				is_lover = FROM
			}
		}
		opinion = {
			who = FROM
			modifier = opinion_unfaithful_private
			months = 24
		}
		if = {
			limit = {
				is_female = yes
				FROMFROM = { is_female = yes }
			}
			opinion = {
				who = FROMFROM
				modifier = slut_seductress
				months = 120
			}
		}
		if = {
			limit = {
				is_female = no
				FROMFROM = { is_female = no }
			}
			opinion = {
				who = FROMFROM
				modifier = opinion_cuckolded_private
				months = 240
			}
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1006 # Denounce them both (scandal)
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.2
				is_ruler = no
				FROM = { is_ruler = yes }
				NOT = { trait = arbitrary }
			}
			modifier = {
				factor = 2.0
				NOT = {
					personal_opinion = {
						who = FROM
						value = 0
					}
				}
			}
			modifier = {
				factor = 2.0
				trait = wroth
			}
			modifier = {
				factor = 1.5
				trait = proud
			}
			modifier = {
				factor = 1.5
				trait = brave
			}
			modifier = {
				factor = 3.0
				trait = cruel
			}
		}
			
		if = {
			limit = { FROM = { is_female = yes } }
			opinion = {
				who = FROM
				modifier = opinion_unfaithful_wife
				months = 120
			}
		}
		if = {
			limit = { FROM = { is_female = no } }
			if = {
				limit = { gender_equality_trigger = no }
				opinion = {
					who = FROM
					modifier = opinion_unfaithful_husband
					months = 120
				}
			}
			if = {
				limit = { gender_equality_trigger = yes }
				opinion = {
					who = FROM
					modifier = opinion_unfaithful_husband_crime
					months = 120
				}
			}
		}
		
		if = {
			limit = {
				is_female = no
				FROMFROM = { is_female = no }
			}
			opinion = {
				who = FROMFROM
				modifier = opinion_cuckolded
				months = 120
			}
		}
		
		if = {
			limit = {
				is_female = yes
				FROMFROM = { is_female = yes }
			}
			opinion = {
				who = FROMFROM
				modifier = slut_seductress
				months = 120
			}
		}
		
		if = {
			limit = { is_lover = FROM }
			remove_lover = FROM
		}
		
		hidden_tooltip = {
			FROMFROM = {
				set_character_flag = wol_denounced_after_lover_admission
				character_event = { id = WoL.1007 }
			}
			FROM = { character_event = { id = WoL.1021 } }
		}
	}
}

# Spouse is told of public denouncement (same effects as event 1008, but with slightly different scopes)
character_event = {
	id = WoL.1021
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1021
	
	option = {
		name = {
			text = EVTOPTA21006 # I am doomed!
			trigger = { is_liege_or_above = FROM }
		}
		name = {
			text = EVTOPTB21006 # Damn!
			trigger = { NOT = { is_liege_or_above = FROM } }
		}
		
		hidden_tooltip = {
			FROMFROMFROM = {
				save_event_target_as = target_adulterer
			}
		}
	}
}

# Accuser challenges lover to a duel
character_event = {
	id = WoL.1032
	picture = GFX_evt_family_feud_republic
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1032
	
	option = {
		name = EVTOPTA_WOL_1032 # Accept
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROMFROM
					value = 50
				}
			}
			modifier = {
				factor = 3.0
				trait = wroth
			}
			modifier = {
				factor = 3.0
				trait = berserker
			}
			modifier = {
				factor = 3.0
				trait = brave
			}
			modifier = {
				factor = 5.0
				trait = duelist
			}
			modifier = {
				factor = 3.0
				combat_rating_diff = {
					character = FROM
					value = 30
				}
			}
		}
		
		hidden_tooltip = {
			FROM = { character_event = { id = WoL.1035 days = 7 } }
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1032 # Refuse
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				personal_opinion = {
					who = FROMFROM
					value = 50
				}
			}
			modifier = {
				factor = 10.0
				trait = craven
			}
			modifier = {
				factor = 3.0
				NOT = {
					combat_rating_diff = {
						character = FROM
						value = -30
					}
				}
			}
			modifier = {
				factor = 5.0
				FROM = { trait = duelist }
			}
		}
		
		add_character_modifier = {
			name = wol_refused_duel
			years = 10
		}
		hidden_tooltip = {
			FROM = { character_event = { id = WoL.1034 days = 2 } }
		}
	}
	
	option = {
		name = EVTOPTC_WOL_1032 # Admit fault and apologize
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				NOT = {
					personal_opinion = {
						who = FROMFROM
						value = 0
					}
				}
			}
			modifier = {
				factor = 10.0
				trait = craven
			}
			modifier = {
				factor = 3.0
				NOT = {
					combat_rating_diff = {
						character = FROM
						value = -30
					}
				}
			}
			modifier = {
				factor = 5.0
				FROM = { trait = duelist }
			}
		}
		
		remove_lover = FROMFROM
		
		hidden_tooltip = {
			FROMFROM = { character_event = { id = WoL.1019 days = 2 } } # Notify break-up
		}
	}
}

# Accuser is notified of dishonorable refusal to duel
character_event = {
	id = WoL.1034
	picture = GFX_evt_family_feud_republic
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	desc = EVTDESC_WOL_1034
	
	option = {
		name = EVTOPTA_WOL_1034
		if = {
			limit = { NOT = { trait = trusting } }
			opinion = {
				who = FROMFROMFROM
				modifier = opinion_suspected_adultery
				months = 24
			}
			opinion = {
				who = FROM
				modifier = opinion_chasing_spouse
				months = 24
			}
			if = {
				limit = {
					NOT = { trait = arbitrary }
					NOT = { trait = depressed }
				}
				random = {
					chance = 10
					add_trait = depressed
					hidden_tooltip = {
						character_event = { id = 38288 } # Depressed gained
					}
				}
			}
		}
	}
}

# Accuser: Duel outcome
character_event = {
	id = WoL.1035
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		save_event_target_as = combatant_1 #Required for the evaluation below...
		FROM = { save_event_target_as = combatant_2 }
		evaluate_duel_result_score_effect = yes
	}


	option = {
		name = OK # Accuser wins.
		ai_chance = {
			factor = 100
			modifier = {
				factor = 3.0
				trait = duelist
			}
			modifier = {
				factor = 3.0
				trait = berserker
			}
			modifier = {
				factor = 1.5
				duelist_skill_is_high_group_trigger = yes
			}
			modifier = {
				factor = 3.0
				duel_result_score_high_group_trigger = yes
			}
			modifier = {
				factor = 1.5
				combat_rating_diff = {
					character = FROM
					value = 10
				}
			}
			modifier = {
				factor = 2.0
				combat_rating_diff = {
					character = FROM
					value = 30
				}
			}
		}
		
		character_event = { id = WoL.1036 } # Notify
	}
	
	option = {
		name = OK # Defender wins
		ai_chance = {
			factor = 100
			modifier = {
				factor = 3.0
				FROM = { trait = duelist }
			}
			modifier = {
				factor = 3.0
				FROM = { trait = berserker }
			}
			modifier = {
				factor = 1.5
				FROM = { duelist_skill_is_high_group_trigger = yes }
			}
			modifier = {
				factor = 3.0
				duel_result_score_low_group_trigger = yes
			}
			modifier = {
				factor = 1.5
				FROM = {
					combat_rating_diff = {
						character = ROOT
						value = 10
					}
				}
			}
			modifier = {
				factor = 2.0
				FROM = {
					combat_rating_diff = {
						character = ROOT
						value = 30
					}
				}
			}
		}
		
		FROM = { character_event = { id = WoL.1039 } } 
	}
	after = {
		clean_up_after_duel_effect = yes
	}
}

# Duel: Accuser wins!
character_event = {
	id = WoL.1036
	picture = GFX_evt_family_feud_republic
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { trait = brave }
				NOT = { trait = craven }
			}
			random = {
				chance = 20
				add_trait = brave
				hidden_tooltip = {
					character_event = { id = 38270 days = 3 } # Brave gained
				}
			}
		}
		
		if = {
			limit = {
				trait = craven
			}
			random = {
				chance = 50
				remove_trait = craven
				hidden_tooltip = {
					character_event = { id = 38296 days = 3 } # Craven lost
				}
			}
		}
		
		if = {
			limit = {
				NOT = {
					combat_rating_diff = {
						character = FROMFROM
						value = -30
					}
				}
			}
			random_list = {
				70 = { set_character_flag = enemy_yields }
				15 = {
					set_character_flag = enemy_wounded
					FROMFROM = { add_trait = wounded }
				}
				10 = {
					set_character_flag = enemy_maimed
					FROMFROM = { maim_hand_effect = yes }
				}
				5 = { set_character_flag = enemy_killed }
			}
			random = {
				chance = 75
				random_list = {
					50 = { add_trait = wounded }
					50 = { maim_hand_effect = yes }
				}
			}
			break = yes
		}
		
		if = {
			limit = {
				NOT = {
					combat_rating_diff = {
						character = FROMFROM
						value = 0
					}
				}
			}
			random_list = {
				50 = { set_character_flag = enemy_yields }
				25 = {
					set_character_flag = enemy_wounded
					FROMFROM = { add_trait = wounded }
				}
				15 = {
					set_character_flag = enemy_maimed
					FROMFROM = { maim_hand_effect = yes }
				}
				10 = { set_character_flag = enemy_killed }
			}
			random = {
				chance = 50
				random_list = {
					75 = { add_trait = wounded }
					25 = { maim_hand_effect = yes }
				}
			}
			break = yes
		}
		
		if = {
			limit = {
				NOT = {
					combat_rating_diff = {
						character = FROMFROM
						value = 30
					}
				}
			}
			random_list = {
				25 = { set_character_flag = enemy_yields }
				40 = {
					set_character_flag = enemy_wounded
					FROMFROM = { add_trait = wounded }
				}
				20 = {
					set_character_flag = enemy_maimed
					FROMFROM = { maim_hand_effect = yes }
				}
				15 = { set_character_flag = enemy_killed }
			}
			random = {
				chance = 25
				random_list = {
					90 = { add_trait = wounded }
					10 = { maim_hand_effect = yes }
				}
			}
			break = yes
		}
		
		random_list = {
			10 = { set_character_flag = enemy_yields }
			45 = {
				set_character_flag = enemy_wounded
				FROMFROM = { add_trait = wounded }
			}
			25 = {
				set_character_flag = enemy_maimed
				FROMFROM = { maim_hand_effect = yes }
			}
			20 = { set_character_flag = enemy_killed }
		}
			
		random = {
			chance = 10
			add_trait = wounded
		}
	}
	
	desc = {
		text = EVTDESC_WOL_1036
		trigger = {
			NOT = { trait = wounded }
			NOT = { is_maimed_trigger = yes }
		}
	}
	desc = {
		text = EVTDESC_WOL_1036_WOUND
		trigger = {
			trait = wounded
			NOT = { is_maimed_trigger = yes }
		}
	}
	desc = {
		text = EVTDESC_WOL_1036_MAIM
		trigger = {
			is_maimed_trigger = yes
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1036
		trigger = { has_character_flag = enemy_yields }
		hidden_tooltip = {
			FROMFROMFROMFROM = { character_event = { id = WoL.1037 } }
			clr_character_flag = enemy_yields
		}
	}
	option = {
		name = EVTOPTB_WOL_1036
		trigger = { has_character_flag = enemy_wounded }
		hidden_tooltip = {
			FROMFROMFROMFROM = { character_event = { id = WoL.1037 } }
			clr_character_flag = enemy_wounded
		}
	}
	option = {
		name = EVTOPTC_WOL_1036
		trigger = { has_character_flag = enemy_maimed }
		hidden_tooltip = {
			FROMFROMFROMFROM = { character_event = { id = WoL.1037 } }
			clr_character_flag = enemy_maimed
		}
	}
	option = {
		name = EVTOPTD_WOL_1036
		trigger = { has_character_flag = enemy_killed }
		hidden_tooltip = {
			FROMFROMFROMFROM = { character_event = { id = WoL.1037 } }
			clr_character_flag = enemy_killed
		}
	}
}

# Cheating spouse notified of duel outcome - spouse wins!
character_event = {
	id = WoL.1037
	picture = GFX_evt_family_feud_republic
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		FROMFROMFROM = {
			save_event_target_as = target_adulterer
			ROOT = { character_event = { id = 20 } } # Adultery fallout
			character_event = { id = WoL.1038 }
		}
	}
	
	desc = {
		text = EVTDESC_WOL_1037
		trigger = {
			FROM = { has_character_flag = enemy_yields }
		}
	}
	desc = {
		text = EVTDESC_WOL_1037_WOUND
		trigger = {
			FROM = { has_character_flag = enemy_wounded }
		}
	}
	desc = {
		text = EVTDESC_WOL_1037_MAIM
		trigger = {
			FROM = { has_character_flag = enemy_maimed }
		}
	}
	desc = {
		text = EVTDESC_WOL_1037_DEATH
		trigger = {
			FROM = { has_character_flag = enemy_killed }
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1037
		trigger = {
			FROM = { NOT = { has_character_flag = enemy_killed } }
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1037
		trigger = { FROM = { has_character_flag = enemy_killed } }
		
		opinion = {
			who = FROM
			modifier = opinion_killed_lover
			months = 60
		}
	}
}

# Lover is notified of duel loss
character_event = {
	id = WoL.1038
	picture = GFX_evt_family_feud_republic
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	show_from_from = yes
	
	desc = {
		text = EVTDESC_WOL_1038
		trigger = {
			FROMFROM = { has_character_flag = enemy_yields }
		}
	}
	desc = {
		text = EVTDESC_WOL_1038_WOUND
		trigger = {
			FROMFROM = { has_character_flag = enemy_wounded }
		}
	}
	desc = {
		text = EVTDESC_WOL_1038_MAIM
		trigger = {
			FROMFROM = { has_character_flag = enemy_maimed }
		}
	}
	desc = {
		text = EVTDESC_WOL_1038_DEATH
		trigger = {
			FROMFROM = { has_character_flag = enemy_killed }
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1038
		trigger = {
			NOT = { FROMFROM = { has_character_flag = enemy_killed } }
		}
		remove_lover = FROM
	}
	
	option = {
		name = EVTOPTB_WOL_1038
		trigger = {
			NOT = { FROMFROM = { has_character_flag = enemy_killed } }
		}
		
		add_rival = FROMFROM
		
		if = {
			limit = {
				NOT = { trait = cruel }
				NOT = { trait = kind }
			}
			random = {
				chance = 25
				add_trait = cruel
				hidden_tooltip = {
					character_event = { id = 38259 } # Cruel gained
				}
			}
		}
		
		if = {
			limit = {
				trait = kind
			}
			random = {
				chance = 50
				remove_trait = kind
				hidden_tooltip = {
					character_event = { id = 38307 } # Kind lost
				}
			}
		}
	}
	
	option = {
		name = EVTOPTC_WOL_1038
		trigger = { FROMFROM = { has_character_flag = enemy_killed } }
		
		death = {
			death_reason = death_duel
			killer = FROMFROM
		}
	}
}

# Duel: Defender wins!
character_event = {
	id = WoL.1039
	picture = GFX_evt_family_feud_republic
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { trait = brave }
				NOT = { trait = craven }
			}
			random = {
				chance = 20
				add_trait = brave
				hidden_tooltip = {
					character_event = { id = 38270 days = 3 } # Brave gained
				}
			}
		}
		
		if = {
			limit = {
				trait = craven
			}
			random = {
				chance = 50
				remove_trait = craven
				hidden_tooltip = {
					character_event = { id = 38296 days = 3 } # Craven lost
				}
			}
		}
		
		if = {
			limit = {
				NOT = {
					combat_rating_diff = {
						character = FROM
						value = -30
					}
				}
			}
			random_list = {
				70 = { set_character_flag = enemy_yields }
				15 = {
					set_character_flag = enemy_wounded
					FROM = { add_trait = wounded }
				}
				10 = {
					set_character_flag = enemy_maimed
					FROM = { maim_hand_effect = yes }
				}
				5 = { set_character_flag = enemy_killed }
			}
			random = {
				chance = 75
				random_list = {
					50 = { add_trait = wounded }
					50 = { maim_hand_effect = yes }
				}
			}
			break = yes
		}
		
		if = {
			limit = {
				NOT = {
					combat_rating_diff = {
						character = FROM
						value = 0
					}
				}
			}
			random_list = {
				50 = { set_character_flag = enemy_yields }
				25 = {
					set_character_flag = enemy_wounded
					FROM = { add_trait = wounded }
				}
				15 = {
					set_character_flag = enemy_maimed
					FROM = { maim_hand_effect = yes }
				}
				10 = { set_character_flag = enemy_killed }
			}
			random = {
				chance = 50
				random_list = {
					75 = { add_trait = wounded }
					25 = { maim_hand_effect = yes }
				}
			}
			break = yes
		}
		
		if = {
			limit = {
				NOT = {
					combat_rating_diff = {
						character = FROM
						value = 30
					}
				}
			}
			random_list = {
				25 = { set_character_flag = enemy_yields }
				40 = {
					set_character_flag = enemy_wounded
					FROM = { add_trait = wounded }
				}
				20 = {
					set_character_flag = enemy_maimed
					FROM = { maim_hand_effect = yes }
				}
				15 = { set_character_flag = enemy_killed }
			}
			random = {
				chance = 25
				random_list = {
					90 = { add_trait = wounded }
					10 = { maim_hand_effect = yes }
				}
			}
			break = yes
		}
		
		random_list = {
			10 = { set_character_flag = enemy_yields }
			45 = {
				set_character_flag = enemy_wounded
				FROM = { add_trait = wounded }
			}
			25 = {
				set_character_flag = enemy_maimed
				FROM = { maim_hand_effect = yes }
			}
			20 = { set_character_flag = enemy_killed }
		}
			
		random = {
			chance = 10
			add_trait = wounded
		}
	}
	
	desc = {
		text = EVTDESC_WOL_1039
		trigger = {
			NOT = { trait = wounded }
			NOT = { is_maimed_trigger = yes }
		}
	}
	desc = {
		text = EVTDESC_WOL_1039_WOUND
		trigger = {
			trait = wounded
			NOT = { is_maimed_trigger = yes }
		}
	}
	desc = {
		text = EVTDESC_WOL_1039_MAIM
		trigger = {
			is_maimed_trigger = yes
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1036
		trigger = { has_character_flag = enemy_yields }
		hidden_tooltip = {
			FROMFROMFROMFROM = { character_event = { id = WoL.1040 } }
			clr_character_flag = enemy_yields
		}
	}
	option = {
		name = EVTOPTB_WOL_1036
		trigger = { has_character_flag = enemy_wounded }
		hidden_tooltip = {
			FROMFROMFROMFROM = { character_event = { id = WoL.1040 } }
			clr_character_flag = enemy_wounded
		}
	}
	option = {
		name = EVTOPTC_WOL_1036
		trigger = { has_character_flag = enemy_maimed }
		hidden_tooltip = {
			FROMFROMFROMFROM = { character_event = { id = WoL.1040 } }
			clr_character_flag = enemy_maimed
		}
	}
	option = {
		name = EVTOPTD_WOL_1036
		trigger = { has_character_flag = enemy_killed }
		hidden_tooltip = {
			FROMFROMFROMFROM = { character_event = { id = WoL.1040 } }
			clr_character_flag = enemy_killed
		}
	}
}

# Cheating spouse notified of duel outcome - lover wins!
character_event = {
	id = WoL.1040
	picture = GFX_evt_family_feud_republic
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		FROMFROM = { character_event = { id = WoL.1041 } }
	}
	
	desc = {
		text = EVTDESC_WOL_1040
		trigger = {
			FROM = { has_character_flag = enemy_yields }
		}
	}
	desc = {
		text = EVTDESC_WOL_1040_WOUND
		trigger = {
			FROM = { has_character_flag = enemy_wounded }
		}
	}
	desc = {
		text = EVTDESC_WOL_1040_MAIM
		trigger = {
			FROM = { has_character_flag = enemy_maimed }
		}
	}
	desc = {
		text = EVTDESC_WOL_1040_DEATH
		trigger = {
			FROM = { has_character_flag = enemy_killed }
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1040
		trigger = {
			FROM = { NOT = { has_character_flag = enemy_killed } }
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1040
		trigger = { FROM = { has_character_flag = enemy_killed } }
	}
}

# Accuser is notified of duel loss
character_event = {
	id = WoL.1041
	picture = GFX_evt_family_feud_republic
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	show_from_from = yes
	
	desc = {
		text = EVTDESC_WOL_1041
		trigger = {
			FROMFROM = { has_character_flag = enemy_yields }
		}
	}
	desc = {
		text = EVTDESC_WOL_1041_WOUND
		trigger = {
			FROMFROM = { has_character_flag = enemy_wounded }
		}
	}
	desc = {
		text = EVTDESC_WOL_1041_MAIM
		trigger = {
			FROMFROM = { has_character_flag = enemy_maimed }
		}
	}
	desc = {
		text = EVTDESC_WOL_1041_DEATH
		trigger = {
			FROMFROM = { has_character_flag = enemy_killed }
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1041
		trigger = {
			NOT = { FROMFROM = { has_character_flag = enemy_killed } }
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1038
		trigger = {
			NOT = { FROMFROM = { has_character_flag = enemy_killed } }
		}
		
		add_rival = FROMFROM
		
		if = {
			limit = {
				NOT = { trait = cruel }
				NOT = { trait = kind }
			}
			random = {
				chance = 25
				add_trait = cruel
				hidden_tooltip = {
					character_event = { id = 38259 } # Cruel gained
				}
			}
		}
		
		if = {
			limit = {
				trait = kind
			}
			random = {
				chance = 50
				remove_trait = kind
				hidden_tooltip = {
					character_event = { id = 38307 } # Kind lost
				}
			}
		}
	}
	
	option = {
		name = EVTOPTC_WOL_1041
		trigger = { FROMFROM = { has_character_flag = enemy_killed } }
		
		death = {
			death_reason = death_duel
			killer = FROMFROM
		}
	}
}







##########################################
# LOVERS FALLING OUT OF LOVE
##########################################

character_event = {
	id = WoL.1100
	hide_window = yes
	
	capable_only = yes
	min_age = 16
	
	trigger = {
		has_dlc = "Way of Life"
		has_lover = yes
		any_lover = {
			NOT = {
				reverse_opinion = { who = ROOT value = 25 }
			}
			NOT = { has_character_flag = gbc_courtly_lover }
		}
		NOT = { has_character_flag = gbc_courtly_lover }
	}
	
	mean_time_to_happen = {
		months = 120
		
		modifier = {
			factor = 0.2
			trait = cruel
		}
		modifier = {
			factor = 0.5
			trait = cynical
		}
		modifier = {
			factor = 0.5
			trait = arbitrary
		}
		modifier = {
			factor = 0.75
			trait = wroth
		}
		modifier = {
			factor = 2.0
			trait = patient
		}
		modifier = {
			factor = 3.0
			trait = kind
		}
		modifier = {
			factor = 3.0
			has_focus = focus_seduction
		}
	}
	
	immediate = {
		random_lover = {
			limit = {
				NOT = {
					reverse_opinion = { who = ROOT value = 25 }
				}
			}
			character_event = { id = WoL.1101 }
		}
	}
}

# Ping the lover
character_event = {
	id = WoL.1101
	hide_window = yes
	
	is_triggered_only = yes
	
	immediate = {
		FROM = { character_event = { id = WoL.1102 } }
	}
}

character_event = {
	id = WoL.1102
	desc = EVTDESC_WOL_1102
	
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_WOL_1102 # Such is life
		trigger = { NOT = { any_spouse = { character = FROM } } }
		
		ai_chance = {
			factor = 100
		}
			
		FROM = { character_event = { id = WoL.1103 days = 3 tooltip = EVTTOOLTIP64046 } }
		clr_character_flag = lost_loving_feeling # Set in chief Qadi event chain (105035). Zina.
	}
	
	option = {
		name = EVTOPTB_WOL_1102 # Such is life. Married.
		trigger = { any_spouse = { character = FROM } }
		
		ai_chance = {
			factor = 100
		}
			
		FROM = { character_event = { id = WoL.1103 days = 3 tooltip = EVTTOOLTIP64046 } }
		clr_character_flag = lost_loving_feeling # Set in chief Qadi event chain (105035). Zina.
	}
	
	option = {
		name = EVTOPTC_WOL_1102 # Rekindle our love!
		trigger = {
			OR = {
				has_focus = focus_seduction
				trait = seducer
				trait = seductress
				has_character_modifier = wol_seducer_2
			}
			NOT = {
				has_opinion_modifier = {
					who = FROM
					modifier = opinion_rekindle_love
				}
			}
		}
		
		ai_chance = {
			factor = 100
		}
		
		opinion = {
			who = FROM
			modifier = opinion_rekindle_love
			months = 24
		}
	}
}

#Lover is notified
character_event = {
	id = WoL.1103
	desc = EVTDESC_WOL_1103
	
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA64046
		trigger = { NOT = { any_spouse = { character = FROM } } }
		ai_chance = {
			factor = 100
		}
		remove_lover = FROM
		clr_character_flag = lost_loving_feeling # Set in chief Qadi event chain (105035). Zina.
	}
	
	option = {
		name = EVTOPTB_WOL_1102
		trigger = { any_spouse = { character = FROM } }
		ai_chance = {
			factor = 100
		}
		remove_lover = FROM
		clr_character_flag = lost_loving_feeling # Set in chief Qadi event chain (105035). Zina.
	}
	
	option = {
		name = EVTOPTC_WOL_1103 # Re-seduction!
		trigger = {
			OR = {
				has_focus = focus_seduction
				trait = seducer
				trait = seductress
				has_character_modifier = wol_seducer_1
				has_character_modifier = wol_seducer_2
			}
		}
		ai_chance = {
			factor = 1000
		}
		FROM = { character_event = { id = WoL.1104 days = 1 tooltip = EVTTOOLTIP_WoL_1104 } }
	}
}

# Lover attempts re-seduction
character_event = {
	id = WoL.1104
	desc = EVTDESC_WOL_1104
	
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_WOL_1104 # Oh yes!
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				FROM = { has_character_modifier = wol_seducer_1 }
			}
			modifier = {
				factor = 4.0
				FROM = { has_character_modifier = wol_seducer_2 }
			}
			modifier = {
				factor = 5.0
				FROM = {
					OR = {
						trait = seducer
						trait = seductress
					}
				}
			}
			modifier = {
				factor = 5.0
				trait = hedonist
			}
			modifier = {
				factor = 5.0
				trait = lustful
			}
		}
		
		opinion = {
			who = FROM
			modifier = opinion_rekindle_love
			months = 36
		}
		
		FROM = { character_event = { id = WoL.1105 days = 3 tooltip = EVTTOOLTIP_WoL_1105 } }
	}
	
	option = {
		name = EVTOPTB_WOL_1104 # Nope
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2.0
				trait = arbitrary
			}
			modifier = {
				factor = 3.0
				trait = cruel
			}
			modifier = {
				factor = 5.0
				trait = chaste
			}
		}
		
		remove_lover = FROM
		hidden_tooltip = {
			FROM = { character_event = { id = WoL.1106 days = 3 } }
		}
	}
}
	
# Lover succeeds with re-seduction
character_event = {
	id = WoL.1105
	desc = EVTDESC_WOL_1105
	
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_WOL_1105
	}
}

# Lover fails with re-seduction
character_event = {
	id = WoL.1106
	desc = EVTDESC_WOL_1106
	
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_WOL_1106
	}
}

# Bounce for scope correction
character_event = {
	id = WoL.1109
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		FROM = {
			character_event = { id = WoL.1103 }
		}
	}
}


##########################################
# THE STRESS OF MULTIPLE LOVERS
##########################################

character_event = {
	id = WoL.1150
	desc = christ.8181.desc
	
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_intrigue
	hide_from = yes
	
	min_age = 16
	prisoner = no
	capable_only = yes
	
	trigger = {
		has_dlc = "Way of Life"
		NOT = { trait = stressed }
		num_of_lovers = 2

		any_lover = { 
			prisoner = no
			NOT = { trait = incapable }
		}
	}
	
	mean_time_to_happen = {
		months = 180
		
		modifier = {
			factor = 0.5
			trait = depressed
		}
		modifier = {
			factor = 0.5
			trait = stressed
		}
		modifier = {
			factor = 0.75
			num_of_lovers = 3
		}
		modifier = {
			factor = 0.5
			num_of_lovers = 4
		}
		modifier = {
			factor = 0.5
			num_of_lovers = 6
		}
		modifier = {
			factor = 0.5
			num_of_lovers = 8
		}
		modifier = {
			factor = 0.5
			num_of_lovers = 10
		}
		modifier = {
			factor = 0.75
			trait = wroth
		}
		modifier = {
			factor = 1.50
			trait = patient
		}
		modifier = {
			factor = 2.0
			trait = ambitious
		}
		modifier = {
			factor = 3.0
			trait = diligent
		}
		modifier = {
			factor = 0.5
			OR = {
				trait = seducer
				trait = seductress
				has_character_modifier = wol_seducer_2
				has_focus = focus_seduction
			}
		}
	}
	
	immediate = {
		random_lover = {
			limit = {
				is_adult = yes
				prisoner = no
				NOT = { trait = incapable  spouse = { character = ROOT } }
			}
			save_event_target_as = first_lover
			random_child = {
				limit = { is_female = no } 
				save_event_target_as = first_lover_child
			}
		}
		random_lover = {
			limit = {
				is_adult = yes
				prisoner = no
				NOT = { trait = incapable  spouse = { character = ROOT } }
				event_target:first_lover = {
					NOT = { character = PREV }
				}
			}
			save_event_target_as = second_lover
			random_child = {
				limit = { is_female = no } 
				save_event_target_as = second_lover_child
			}
		}
		random_lover = {
			limit = {
				is_adult = yes
				prisoner = no
				NOT = { trait = incapable  spouse = { character = ROOT } }
				event_target:first_lover = {
					NOT = { character = PREV }
				}
				event_target:second_lover = {
					NOT = { character = PREV }
				}
			}
			save_event_target_as = third_lover
			random_child = {
				limit = { is_female = no } 
				save_event_target_as = third_lover_child
			}
		}
	}
	
	option = {
		trigger = { ROOT = { is_female = no } } 
		name = christ.8181.opta # Organize an orgy
		ai_chance = {
			factor = 100
		}
		hidden_tooltip = { 
		remove_trait = stressed
		remove_trait = depressed
		if = {
			limit = { event_target:first_lover = { always = yes  has_children = yes } } 
			impregnate = event_target:first_lover
			character_event = { id = bang.101 } 
 			event_target:first_lover = { add_lover = event_target:first_lover_child } 
		}
		if = {
			limit = { event_target:first_lover = { always = yes  has_children = no } event_target:second_lover = { always = yes  has_children = yes } } 
			impregnate = event_target:second_lover
			character_event = { id = bang.101 } 
 			event_target:second_lover = { add_lover = event_target:second_lover_child } 
		}
		if = {
			limit = { event_target:first_lover = { always = yes  has_children = no } event_target:second_lover = { always = yes  has_children = no } event_target:third_lover = { always = yes  has_children = yes } } 
			impregnate = event_target:third_lover
			character_event = { id = bang.101 } 
 			event_target:third_lover = { add_lover = event_target:third_lover_child } 
		}
		if = {
			limit = { event_target:first_lover = { always = yes  has_children = no } } 
			event_target:first_lover = { character_event = { id = christ.907 } } 
		}
		if = {
			limit = { event_target:second_lover = { always = yes  has_children = no } } 
			event_target:second_lover = { character_event = { id = christ.907 } } 
		}
		if = {
			limit = { event_target:third_lover = { always = yes  has_children = no } } 
			event_target:third_lover = { character_event = { id = christ.907 } } 
		}
		}
	}
	option = {
		trigger = { ROOT = { is_female = yes } } 
		name = christ.8181.opta # Organize a gangbang
		ai_chance = {
			factor = 100
		}
		hidden_tooltip = { 
		remove_trait = stressed
		remove_trait = depressed
		if = {
			limit = { event_target:first_lover = { always = yes } } 
			character_event = { id = bang.104 } 
			event_target:first_lover = { random = { chance = 50 impregnate = ROOT } } 
		}
		if = {
			limit = { event_target:second_lover = { always = yes } } 
			event_target:second_lover = { random = { chance = 60 impregnate = ROOT } } 
		}
		if = {
			limit = { event_target:third_lover = { always = yes } } 
			event_target:third_lover = { random = { chance = 70 impregnate = ROOT } } 
		}
		}
	}
}

##################################################
# THE COMFORT OF A LOVER (WHEN MARRIAGE IS SOUR)
##################################################

# Starts with the lover
character_event = {
	id = WoL.1160
	desc = EVTDESC_WOL_1160
	
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue
	
	min_age = 16
	prisoner = no
	capable_only = yes
	has_dlc = "Way of Life"
	
	trigger = {
		any_lover = {
			is_married = yes
			has_polygamy = no
			in_command = no
			has_regent = no
			is_ill = no
			prisoner = no
			NOT = { trait = incapable }
			spouse = {
				prisoner = no
				NOT = { trait = incapable }
				NOT = { character = ROOT }
				NOT = { is_lover = PREV }
				NOT = {
					opinion = {
						who = PREV
						value = 0
					}
				}
			}
			reverse_opinion = {
				who = ROOT
				value = 25
			}
			NOT = {
				reverse_has_opinion_modifier = {
					who = ROOT
					modifier = opinion_seduced_yearning
				}
			}
		}
		is_ill = no
		in_command = no
		has_regent = no
	}
	
	mean_time_to_happen = {
		months = 144
		modifier = {
			factor = 0.5
			trait = kind
		}
		modifier = {
			factor = 0.75
			trait = diligent
		}
		modifier = {
			factor = 2.0
			trait = depressed
		}
		modifier = {
			factor = 2.0
			trait = stressed
		}
		modifier = {
			factor = 3.0
			trait = slothful
		}
		modifier = {
			factor = 3.0
			trait = cruel
		}
	}
	
	immediate = {
		random_lover = {
			limit = {
				is_married = yes
				has_polygamy = no
				in_command = no
				has_regent = no
				is_ill = no
				prisoner = no
				NOT = { trait = incapable }
				spouse = {
					prisoner = no
					NOT = { trait = incapable }
					NOT = { character = ROOT }
					NOT = { is_lover = PREV }
					NOT = {
						opinion = {
							who = PREV
							value = 0
						}
					}
				}
				reverse_opinion = {
					who = ROOT
					value = 25
				}
				NOT = {
					reverse_has_opinion_modifier = {
						who = ROOT
						modifier = opinion_seduced_yearning
					}
				}
			}
			save_event_target_as = my_lover
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1160 # Suggest time together
		ai_chance = {
			factor = 100
		}
		event_target:my_lover = {
			character_event = { id = WoL.1161 days = 3 tooltip = EVTTOOLTIP_WoL_1161 }
			hidden_tooltip = {
				reverse_opinion = {
					who = ROOT
					modifier = opinion_seduced_yearning
					months = 36
				}
			}
		}
	}
	option = {
		name = EVTOPTB_WOL_1160 # Should not interfere
		ai_chance = {
			factor = 0
		}
	}
}

# The married lover
character_event = {
	id = WoL.1161
	desc = EVTDESC_WOL_1161
	
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_WOL_1161 # Agree, country retreat
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				trait = slothful
			}
			modifier = {
				factor = 2
				trait = honest
			}
			modifier = {
				factor = 5
				trait = kind
			}
			modifier = {
				factor = 2
				trait = humble
			}
		}
		if = {
			limit = { trait = stressed }
			random = {
				chance = 50
				remove_trait = stressed
				hidden_tooltip = {
					character_event = { id = 38313 days = 1 } # Notify lost Stressed
				}
			}
		}
		if = {
			limit = { trait = depressed }
			random = {
				chance = 25
				remove_trait = depressed
				hidden_tooltip = {
					character_event = { id = 38314 days = 1 } # Notify lost Depressed
				}
			}
		}
		
		add_character_modifier = {
			modifier = comfort_of_lover
			days = 365
		}
		
		FROM = { character_event = { id = WoL.1163 days = 3 tooltip = EVTTOOLTIP_WoL_1163 } }
		
		hidden_tooltip = {
			random = {
				chance = 50
				venereal_disease_effect = yes
			}
			if = {
				limit = {
					fertility = 0.33
					FROM = { fertility = 0.33 }
					OR = {
						AND = {
							is_female = yes
							NOT = { age = 45 }
							is_pregnant = no
							FROM = { is_female = no }
						}
						AND = {
							is_female = no
							FROM = {
								is_female = yes
								NOT = { age = 45 }
								is_pregnant = no
							}
						}
					}
				}
				random = {
					chance = 25
					if = {
						limit = {
							FROM = {
								OR = {
									is_married = yes
									is_consort = yes
								}
							}
						}
						impregnate_cuckoo = FROM
						break = yes
					}
					impregnate = FROM
				}
			}
		}
	}
	
	option = {
		name = EVTOPTB_WOL_1161 # Do it right here
		
		trigger = {
			OR = {
				trait = depressed
				trait = stressed
			}
		}
		
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.25
				is_female = yes
			}
			modifier = {
				factor = 5
				trait = cruel
			}
			modifier = {
				factor = 5
				trait = arbitrary
			}
			modifier = {
				factor = 2
				trait = brave
			}
			modifier = {
				factor = 2
				trait = deceitful
			}
		}
		if = {
			limit = { trait = stressed }
			remove_trait = stressed
		}
		if = {
			limit = { trait = depressed }
			random = {
				chance = 50
				remove_trait = depressed
				hidden_tooltip = {
					character_event = { id = 38314 days = 1 } # Notify lost Depressed
				}
			}
		}
		
		add_character_modifier = {
			modifier = thrill_of_lover
			days = 365
		}
		
		FROM = { character_event = { id = WoL.1162 days = 3 tooltip = EVTTOOLTIP_WoL_1162 } }
		
		hidden_tooltip = {
			random = {
				chance = 50
				venereal_disease_effect = yes
			}
			if = {
				limit = {
					fertility = 0.33
					FROM = { fertility = 0.33 }
					OR = {
						AND = {
							is_female = yes
							NOT = { age = 45 }
							is_pregnant = no
							FROM = { is_female = no }
						}
						AND = {
							is_female = no
							FROM = {
								is_female = yes
								NOT = { age = 45 }
								is_pregnant = no
							}
						}
					}
				}
				random = {
					chance = 25
					if = {
						limit = {
							FROM = {
								OR = {
									is_married = yes
									is_consort = yes
								}
							}
						}
						impregnate_cuckoo = FROM
						break = yes
					}
					impregnate = FROM
				}
			}
		}
	}
	
	option = {
		name = EVTOPTC_WOL_1161 # I don't need comfort
		trigger = { NOT = { trait = lunatic } }
		ai_chance = {
			factor = 100
			modifier = {
				factor = 5
				trait = craven
			}
			modifier = {
				factor = 2
				trait = proud
			}
		}
		
		opinion = {
			who = FROM
			modifier = opinion_declined_romance
			months = 24
		}
		
		hidden_tooltip = {
			FROM = { character_event = { id = WoL.1164 days = 3 } }
		}
	}
	
	option = {
		name = EVTOPTD_WOL_1161 # Lunatic text
		trigger = { trait = lunatic }
		tooltip_info = lunatic
		ai_chance = {
			factor = 1000
		}
		
		opinion = {
			who = FROM
			modifier = opinion_declined_romance
			months = 24
		}
		
		hidden_tooltip = {
			FROM = { character_event = { id = WoL.1164 days = 3 } }
		}
	}
}

# Stayed in castle. Notify the lover.
character_event = {
	id = WoL.1162
	desc = EVTDESC_WOL_1162
	
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		#STDs and pregnancy
		unprotected_sex_effect = yes
	
		if = {
			limit = {
				NOT = { has_character_modifier = wol_court_tomcat }
				NOT = { has_character_modifier = wol_court_vixen }
				FROM = {
					NOT = { has_character_modifier = wol_court_tomcat }
					NOT = { has_character_modifier = wol_court_vixen }
				}
			}
			random = {
				chance = 25
				FROM = { spouse = { character_event = { id = WoL.1003 } } } # Start off the suspicious spouse events
			}
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1162 # Naughty...
	}
}

# Countryside Romance. Notify the lover.
character_event = {
	id = WoL.1163
	desc = EVTDESC_WOL_1163
	
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		#STDs and pregnancy
		unprotected_sex_effect = yes
	
		if = {
			limit = {
				NOT = { has_character_modifier = wol_court_tomcat }
				NOT = { has_character_modifier = wol_court_vixen }
				FROM = {
					NOT = { has_character_modifier = wol_court_tomcat }
					NOT = { has_character_modifier = wol_court_vixen }
				}
			}
			random = {
				chance = 5
				FROM = { spouse = { character_event = { id = WoL.1003 } } } # Start off the suspicious spouse events
			}
		}
	}
	
	option = {
		name = EVTOPTA_WOL_1163 # Lovely!
	}
}

# Lover declines
character_event = {
	id = WoL.1164
	desc = {
		text = EVTDESC_WOL_1164
		trigger = { FROM = { NOT = { trait = lunatic } } }
	}
	desc = {
		text = EVTDESC_WOL_1164_MAD
		trigger = { FROM = { trait = lunatic } }
	}
	
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = {
			text = EVTOPTA_WOL_1164 # Awww
			trigger = { FROM = { NOT = { trait = lunatic } } }
		}
		name = {
			text = EVTOPTA_WOL_1164_MAD
			trigger = {
				FROM = { trait = lunatic }
				NOT = { trait = lunatic }
				NOT = { trait = possessed }
			}
		}
		name = {
			text = EVTOPTA_WOL_1164_MAD_MAD
			trigger = {
				FROM = { trait = lunatic }
				OR = {
					trait = lunatic
					trait = possessed
				}
			}
		}
		opinion = {
			who = FROM
			modifier = opinion_declined_romance
			months = 24
		}
	}
}
