﻿#Ongoing Events for the Seduction Scheme

namespace = seduce_ongoing

############################
## First milestone events ##
############################

## Estimating Target's Preference
# 1101 - Send an expensive gift, by Petter Vilberg
# 1102 - Send a handmade gift, by Petter Vilberg
# 1103 - Send a small gift, by Petter Vilberg
# 1104 - Send a special gift, by Petter Vilberg

## Offer Something Up
# 3001 - Do something for someone close to target, by Petter Vilberg

## Risk-based Opportunities
# 4001 - A Troubadour at Target's Court, by Petter Vilberg

## Relation-based Events
# 5201 - Seducing a friend, by Linnéa Thimrén
# 5301 - Seducing close family member


## Skill-unlocked events
# 6031 - Both have high intrigue
# 6041 - Spy on their preferences
# 1801 - Give a compliment, by Mathilda Bjarnehed

## (AI) target personality
# 7001 - Target is shy, how should you approach?


#############################
## Second milestone events ##
#############################

## Estimating Target's Preference
# 1001 - A Dance, by Petter Vilberg
# 1601 - Book reading, by Petter Vilberg
# 1701 - Jousting Day, by Petter Vilberg

## Owner Skill and Target Preference
# 2001 - Suggest a Love Potion, by Petter Vilberg

## Risk-based Opportunities
# 4011 - A Walk in Town, by Petter Vilberg
# 4101 - Below target's balcony, by Linnéa Thimrén

## Relation-based Events
# 5001 - Approach rival
# 5011 - Both wrathful (rival)
# 5101 - Seducing a vassal

## Skill-unlocked events
# 6001 - Talk to a foreign courtier target to "understand their liege"
# 6011 - Showing off with military drills
# 6021 - Discuss tactics
# 6051 - Diplomatic courtesy


#####################################################################################


############################
############################
## FIRST MILESTONE EVENTS ##
############################
############################

############
# Send a Gift events
# 1010-
# by Petter Vilberg and Mathilda Bjarnehed
############

#Expensive gifts
#Tapestry
scripted_trigger seduce_gift_giving_tapestry_likes_trigger = {
	OR = {
		has_trait = family_first
		has_trait = arrogant
		has_trait = ambitious
		AND = {
			has_dynasty = yes
			this = dynasty.dynast
		}
	}
}

scripted_trigger seduce_gift_giving_tapestry_dislikes_trigger = {
	OR = {
		has_trait = humble
		AND = {
			has_trait = honest
			prestige_level < 2
		}
	}
}
#Horse
scripted_trigger seduce_gift_giving_horse_likes_trigger = {
	OR = {
		has_trait = lifestyle_hunter
		has_martial_lifestyle_trait_trigger = yes
		has_lifestyle = martial_lifestyle
	}
}

scripted_trigger seduce_gift_giving_horse_dislikes_trigger = {
	OR = {
		has_trait = lazy
		has_trait = craven
	}
}
#Tailored clothes
scripted_trigger seduce_gift_giving_tailor_likes_trigger = {
	OR = {
		has_trait = lifestyle_reveler
		has_trait = arrogant
	}
}

scripted_trigger seduce_gift_giving_tailor_dislikes_trigger = {
	OR = {
		has_trait = content
		has_trait = chaste
	}
}


#Perhaps an expensive gift would do the trick
seduce_ongoing.1101 = {
	type = character_event
	title = seduce_ongoing.1101.t
	desc = seduce_ongoing.1101.desc

	theme = seduce_scheme
	left_portrait = {
		character = scope:owner
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:target
		animation = boredom
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		#Would like any expensive gift
		scope:target = {
			OR = {
				seduce_gift_giving_tapestry_likes_trigger = yes
				seduce_gift_giving_horse_likes_trigger = yes
				seduce_gift_giving_tailor_likes_trigger = yes
			}
		}
	}

	immediate = { set_variable = scheme_event_active_flag }

	option = { #Tapestry of their dynasty
		name = seduce_ongoing.gift_selection.tapestry
		custom_tooltip = seduce_ongoing.gift_selection.tapestry_tt
		save_scope_value_as = {
			name = gift
			value = flag:tapestry
		}
		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 1 }
	}

	option = { #A horse
		name = seduce_ongoing.gift_selection.horse
		custom_tooltip = seduce_ongoing.gift_selection.horse_tt
		save_scope_value_as = {
			name = gift
			value = flag:horse
		}
		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 1 }
	}

	option = { #A tailor's visit
		name = seduce_ongoing.gift_selection.tailor
		custom_tooltip = seduce_ongoing.gift_selection.tailor_tt
		save_scope_value_as = {
			name = gift
			value = flag:tailor
		}
		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 1 }
	}

	option = { #None of these
		name = seduce_ongoing.gift_selection.decline
		custom_tooltip = seduce_ongoing_decline_event.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		hidden_effect = {
			if = {
				limit = {
					exists = scope:gift
				}
				if = {
					limit = {
						scope:gift = flag:tapestry
					}
					random_list = {
						75 = {
							modifier = {
								add = 100
								scope:target = {
									seduce_gift_giving_tapestry_likes_trigger = yes
								}
							}
							scope:target = { trigger_event = seduce_ongoing.1201 }
						}
						25 = {
							modifier = {
								add = 100
								scope:target = {
									seduce_gift_giving_tapestry_dislikes_trigger = yes
								}
							}
							scope:target = { trigger_event = seduce_ongoing.1301 }
						}
					}
				}
				else_if = {
					limit = {
						scope:gift = flag:horse
					}
					random_list = {
						75 = {
							modifier = {
								add = 100
								scope:target = {
									seduce_gift_giving_horse_likes_trigger = yes
								}
							}
							scope:target = { trigger_event = seduce_ongoing.1202 }
						}
						25 = {
							modifier = {
								add = 100
								scope:target = {
									seduce_gift_giving_horse_dislikes_trigger = yes
								}
							}
							scope:target = { trigger_event = seduce_ongoing.1302 }
						}
					}
				}
				else_if = {
					limit = {
						scope:gift = flag:tailor
					}
					random_list = {
						75 = {
							modifier = {
								add = 100
								scope:target = {
									seduce_gift_giving_tailor_likes_trigger = yes
								}
							}
							scope:target = { trigger_event = seduce_ongoing.1203 }
						}
						25 = {
							modifier = {
								add = 100
								scope:target = {
									seduce_gift_giving_tailor_dislikes_trigger = yes
								}
							}
							scope:target = { trigger_event = seduce_ongoing.1303 }
						}
					}
				}
			}
		}
	}
}

###############
# tapestry resolution
###############

#Target: Success with tapestry
seduce_ongoing.1201 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1201.desc
		desc = seduce_ongoing.successful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.target_successful.option
		add_character_modifier = {
			modifier = seduce_tapestry_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1401
		}
	}
}

#Target: Failed with a tapestry
seduce_ongoing.1301 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1301.desc
		desc = seduce_ongoing.unsuccessful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.target_unsuccessful.option
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1501
		}
	}
}

#Schemer: Succeeded with a tapestry
seduce_ongoing.1401 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with a tapestry
seduce_ongoing.1501 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


###############
# horse resolution
###############

#Target: Success with horse
seduce_ongoing.1202 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1202.opening
		first_valid = { #Unop
			triggered_desc = {
				trigger = {
					exists = scope:courtier
				}
				desc = seduce_ongoing.1202.courtier
			}
			desc = seduce_ongoing.1202.no_courtier
		}
		desc = seduce_ongoing.successful.target
	}
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}
	lower_left_portrait = {
		trigger = { exists = scope:courtier }
		character = scope:courtier
	}

	trigger = {
		exists = scope:scheme
		exists = court_owner
	}

	immediate = {
		if = {
			limit = {
				court_owner = {
					employs_court_position = master_of_horse_court_position
					any_court_position_holder = {
						type = master_of_horse_court_position
						is_available_ai_adult = yes
						this != root
					}
				}
			}
			court_owner = {
				random_court_position_holder = {
					type = master_of_horse_court_position
					limit = {
						is_available_ai_adult = yes
						this != root
					}
					save_scope_as = courtier
				}
			}
		}
		else_if = {
			limit = {
				court_owner = {
					any_courtier = {
						this != root
						is_available_ai_adult = yes
					}
				}
			}
			court_owner = {
				random_courtier = {
					limit = {
						this != root
						is_available_ai_adult = yes
					}
					save_scope_as = courtier
				}
			}
		}
	}

	option = {
		name = seduce_ongoing.target_successful.option
		add_character_modifier = {
			modifier = seduce_horse_gift_modifier
			days = 3650
		}
		if = {
			limit = {
				exists = scope:courtier
			}
			scope:courtier = {
				add_opinion = {
					target = scope:target
					modifier = envy_opinion
					opinion = -10
				}
			}
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1402
		}
	}
}

#Target: Failed with a horse
seduce_ongoing.1302 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1302.desc
		desc = seduce_ongoing.unsuccessful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1302.a
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1502
		}
	}
}

#Schemer: Succeeded with a horse
seduce_ongoing.1402 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with a horse
seduce_ongoing.1502 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


###############
# tailor resolution
###############

#Target: Success with tailor
seduce_ongoing.1203 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1203.desc
		desc = seduce_ongoing.successful.target
	}
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1203.a

		add_character_modifier = {
			modifier = seduce_tailor_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1403
		}
	}
}

#Target: Failed with a tailor
seduce_ongoing.1303 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1303.desc
		desc = seduce_ongoing.unsuccessful.target
	}
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1303.a
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1503
		}
	}
}

#Schemer: Succeeded with a tailor
seduce_ongoing.1403 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with a tailor
seduce_ongoing.1503 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


#Self-made gift
#Embroidery of HerHis dynastic crest
scripted_trigger seduce_gift_giving_embroidery_likes_trigger = {
	OR = {
		has_trait = education_diplomacy
		has_lifestyle = diplomacy_lifestyle
		has_trait = compassionate
		has_trait = family_first
	}
}

scripted_trigger seduce_gift_giving_embroidery_dislikes_trigger = {
	has_trait = greedy
}

#A Poem about the pleasures of life
scripted_trigger seduce_gift_giving_poem_likes_trigger = {
	OR = {
		has_trait = education_learning
		has_trait = lustful
		has_trait = gluttonous
		has_trait = lifestyle_reveler
		has_trait = gregarious
		has_diplomacy_lifestyle_trait_trigger = yes
		has_trait = ambitious
	}
}

scripted_trigger seduce_gift_giving_poem_dislikes_trigger = {
	OR = {
		has_trait = chaste
		has_trait = temperate
		has_trait = content
	}
}
#A Woodcarving of a castle
scripted_trigger seduce_gift_giving_woodcarving_likes_trigger = {
	OR = {
		has_trait = education_stewardship
		stewardship > 10
		has_stewardship_lifestyle_trait_trigger = yes
		has_lifestyle = stewardship_lifestyle
	}
}

scripted_trigger seduce_gift_giving_woodcarving_dislikes_trigger = {
	OR = {
		has_trait = lazy
		has_trait = content
	}
}


#Perhaps a self-made gift would do the trick
seduce_ongoing.1102 = {
	type = character_event
	title = seduce_ongoing.1102.t
	desc = seduce_ongoing.1102.desc
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:target
		animation = boredom
	}
	theme = seduce_scheme

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		#They like one of these gifts
		scope:target = {
			OR = {
				seduce_gift_giving_embroidery_likes_trigger = yes
				seduce_gift_giving_poem_likes_trigger = yes
				seduce_gift_giving_woodcarving_likes_trigger = yes
			}
		}
	}

	immediate = { set_variable = scheme_event_active_flag }

	option = { #Embroidery of HerHis dynastic crest
		name = seduce_ongoing.gift_selection.embroidery

		trigger = {
			scope:target = {
				is_lowborn = no
			}
		}

		custom_tooltip = seduce_ongoing.gift_selection.embroidery_tt
		save_scope_value_as = {
			name = gift
			value = flag:embroidery
		}
	}

	option = { #A poem about the pleasures of life!
		name = seduce_ongoing.gift_selection.poem
		custom_tooltip = seduce_ongoing.gift_selection.poem_tt
		save_scope_value_as = {
			name = gift
			value = flag:poem
		}
	}

	option = { #A woodcarving of a castle
		name = seduce_ongoing.gift_selection.woodcarving
		custom_tooltip = seduce_ongoing.gift_selection.woodcarving_tt
		save_scope_value_as = {
			name = gift
			value = flag:woodcarving
		}
	}

	option = { #None of these
		name = seduce_ongoing.gift_selection.decline
		custom_tooltip = seduce_ongoing_decline_event.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		if = {
			limit = {
				exists = scope:gift
			}
			if = {
				limit = {
					scope:gift = flag:embroidery
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_embroidery_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1205 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_embroidery_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1305 }
					}
				}
			}
			else_if = {
				limit = {
					scope:gift = flag:poem
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_poem_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1206 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_poem_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1306 }
					}
				}
			}
			else_if = {
				limit = {
					scope:gift = flag:woodcarving
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_woodcarving_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1207 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_woodcarving_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1307 }
					}
				}
			}
		}
	}
}

###############
# embroidery resolution
###############

#Target: Success with embroidery
seduce_ongoing.1205 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1205.desc
		desc = seduce_ongoing.successful.target
	}
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1205.a
		add_character_modifier = {
			modifier = seduce_embroidery_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1405
		}
	}
}

#Target: Failed with a embroidery
seduce_ongoing.1305 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1305.desc
		desc = seduce_ongoing.unsuccessful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1305.a
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1505
		}
	}
}

#Schemer: Succeeded with embroidery
seduce_ongoing.1405 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with embroidery
seduce_ongoing.1505 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


###############
# poem resolution
###############

#Target: Success with poem
seduce_ongoing.1206 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1206.desc
		desc = seduce_ongoing.successful.target
	}
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1206.a

		add_character_modifier = {
			modifier = seduce_poem_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1406
		}
	}
}

#Target: Failed with a poem
seduce_ongoing.1306 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1306.desc
		desc = seduce_ongoing.unsuccessful.target
	}
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.target_unsuccessful.option
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1506
		}
	}
}

#Schemer: Succeeded with a poem
seduce_ongoing.1406 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}

#Schemer: Failed with a woodcarving
seduce_ongoing.1506 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


###############
# woodcarving resolution
###############

#Target: Success with woodcarving
seduce_ongoing.1207 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1207.desc
		desc = seduce_ongoing.successful.target
	}
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1207.a

		add_character_modifier = {
			modifier = seduce_woodcarving_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1407
		}
	}
}

#Target: Failed with a woodcarving
seduce_ongoing.1307 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1307.desc
		desc = seduce_ongoing.unsuccessful.target
	}
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1307.a
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1507
		}
	}
}

#Schemer: Succeeded with a woodcarving
seduce_ongoing.1407 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with a woodcarving
seduce_ongoing.1507 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


#Small gifts
#Jewelry
scripted_trigger seduce_gift_giving_jewelry_likes_trigger = {
	OR = {
		has_trait = greedy
		has_trait = beauty_good
		has_trait = arrogant
		has_trait = lustful
	}
}

scripted_trigger seduce_gift_giving_jewelry_dislikes_trigger = {
	OR = {
		has_trait = temperate
		has_trait = generous
	}
}
#Stuffed animal
scripted_trigger seduce_gift_giving_stuffed_animal_likes_trigger = {
	OR = {
		has_trait = lifestyle_hunter
		has_trait = sadistic
		has_trait = torturer
		has_trait = ambitious
		has_trait = deceitful
	}
}

scripted_trigger seduce_gift_giving_stuffed_animal_dislikes_trigger = {
	OR = {
		has_trait = compassionate
		has_trait = content
	}
}
#Flower display
scripted_trigger seduce_gift_giving_flower_display_likes_trigger = {
	OR = {
		has_stewardship_lifestyle_trait_trigger = yes
		has_trait = seducer
		has_trait = diligent
		has_trait = beauty_good
	}
}

scripted_trigger seduce_gift_giving_flower_display_dislikes_trigger = {
	has_trait = lazy
}


#Perhaps a small gift would do the trick
seduce_ongoing.1103 = {
	type = character_event
	title = seduce_ongoing.1103.t
	desc = seduce_ongoing.1103.desc
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:target
		animation = boredom
	}
	theme = seduce_scheme

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		#They like one of these gifts
		scope:target = {
			OR = {
				seduce_gift_giving_jewelry_likes_trigger = yes
				seduce_gift_giving_stuffed_animal_likes_trigger = yes
				seduce_gift_giving_flower_display_likes_trigger = yes
			}
		}
		exists = scope:target.court_owner.capital_province
	}

	weight_multiplier = {
		base = 1
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target.court_owner = {
			capital_province = {
				barony = { save_scope_as = court_location }
			}
		}
	}

	option = { #A silver necklace
		name = seduce_ongoing.gift_selection.jewelry
		custom_tooltip = seduce_ongoing.gift_selection.jewelry_tt
		save_scope_value_as = {
			name = gift
			value = flag:jewelry
		}
	}

	option = { #A stuffed fox
		name = seduce_ongoing.gift_selection.stuffed_animal
		custom_tooltip = seduce_ongoing.gift_selection.stuffed_animal_tt
		save_scope_value_as = {
			name = gift
			value = flag:stuffed_animal
		}
	}

	option = { #A flower display
		name = seduce_ongoing.gift_selection.flower_display
		custom_tooltip = seduce_ongoing.gift_selection.flower_display_tt
		save_scope_value_as = {
			name = gift
			value = flag:flower_display
		}
	}

	option = { #None of these
		name = seduce_ongoing.gift_selection.decline
		custom_tooltip = seduce_ongoing_decline_event.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		if = {
			limit = {
				exists = scope:gift
			}

			if = {
				limit = {
					scope:gift = flag:jewelry
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_jewelry_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1209 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_jewelry_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1309 }
					}
				}
			}
			else_if = {
				limit = {
					scope:gift = flag:stuffed_animal
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_stuffed_animal_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1210 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_stuffed_animal_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1310 }
					}
				}
			}
			else_if = {
				limit = {
					scope:gift = flag:flower_display
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_flower_display_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1211 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_flower_display_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1311 }
					}
				}
			}
		}
	}
}


###############
# jewelry resolution
###############

#Target: Success with jewelry
seduce_ongoing.1209 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1209.desc
		desc = seduce_ongoing.successful.target
	}
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1209.a

		add_character_modifier = {
			modifier = seduce_jewelry_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1409
		}
	}
}

#Target: Failed with jewelry
seduce_ongoing.1309 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1309.desc
		desc = seduce_ongoing.unsuccessful.target
	}
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1309.a
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1509
		}
	}
}

#Schemer: Succeeded with jewelry
seduce_ongoing.1409 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with jewelry
seduce_ongoing.1509 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


###############
# stuffed_animal resolution
###############

#Target: Success with stuffed_animal
seduce_ongoing.1210 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1210.desc
		desc = seduce_ongoing.successful.target
	}
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1210.a

		add_character_modifier = {
			modifier = seduce_stuffed_animal_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1410
		}
	}


}

#Target: Failed with stuffed_animal
seduce_ongoing.1310 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1310.desc
		desc = seduce_ongoing.unsuccessful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1310.a
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1510
		}
	}
}

#Schemer: Succeeded with stuffed_animal
seduce_ongoing.1410 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with stuffed_animal
seduce_ongoing.1510 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


###############
# flower_display resolution
###############

#Target: Success with flower_display
seduce_ongoing.1211 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1211.desc
		desc = seduce_ongoing.successful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1211.a

		add_character_modifier = {
			modifier = seduce_flower_display_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1411
		}
	}
}

#Target: Failed with flower_display
seduce_ongoing.1311 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1311.desc
		desc = seduce_ongoing.unsuccessful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1311.a
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1511
		}
	}
}

#Schemer: Succeeded with flower_display
seduce_ongoing.1411 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with flower_display
seduce_ongoing.1511 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}



#A special gift
#Rare book
scripted_trigger seduce_gift_giving_rare_book_likes_trigger = {
	OR = {
		learning >= 10
		has_learning_lifestyle_trait_trigger = yes
	}
}

scripted_trigger seduce_gift_giving_rare_book_dislikes_trigger = {
	OR = {
		has_trait = impatient
		learning < 10
	}
}

#Handkerchief with my crest on it
scripted_trigger seduce_gift_giving_handkerchief_likes_trigger = {
	OR = {
		has_trait = ill
		opinion = {
			target = scope:owner
			value >= 50
		}
		scope:owner.prestige_level > scope:target.prestige_level
		scope:owner.highest_held_title_tier > scope:target.highest_held_title_tier
	}
}

scripted_trigger seduce_gift_giving_handkerchief_dislikes_trigger = {
	OR = {
		scope:owner.prestige_level < scope:target.prestige_level
		opinion = {
			target = scope:owner
			value < 50
		}
	}
}

#Shared object of importance
scripted_trigger seduce_gift_giving_object_likes_trigger = {
	OR = {
		opinion = {
			target = scope:owner
			value >= high_positive_opinion
		}
		has_relation_potential_lover = scope:owner
	}
}

scripted_trigger seduce_gift_giving_object_dislikes_trigger = {
	OR = {
		seduce_gift_giving_object_likes_trigger = no
		has_trait = callous
	}
}


#Perhaps something a little special would do the trick
seduce_ongoing.1104 = {
	type = character_event
	title = seduce_ongoing.1104.t
	desc = seduce_ongoing.1104.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:target
		animation = boredom
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		#Likes one of these gifts
		scope:target = {
			OR = {
				seduce_gift_giving_rare_book_likes_trigger = yes
				seduce_gift_giving_embroidery_likes_trigger = yes
				seduce_gift_giving_object_likes_trigger = yes
			}
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		set_object_of_significance_effect = yes
	}

	option = { #A rare book
		name = seduce_ongoing.gift_selection.rare_book
		custom_tooltip = seduce_ongoing.gift_selection.rare_book_tt
		save_scope_value_as = {
			name = gift
			value = flag:rare_book
		}
	}

	option = { #A handkerchief with my crest
		name = seduce_ongoing.gift_selection.handkerchief
		custom_tooltip = seduce_ongoing.gift_selection.handkerchief_tt
		save_scope_value_as = {
			name = gift
			value = flag:handkerchief
		}
	}

	option = { #An object of symbolic importance
		name = seduce_ongoing.gift_selection.object
		custom_tooltip = seduce_ongoing.gift_selection.object_tt
		save_scope_value_as = {
			name = gift
			value = flag:object
		}
	}

	option = { #None of these
		name = seduce_ongoing.gift_selection.decline
		custom_tooltip = seduce_ongoing_decline_event.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		if = {
			limit = {
				exists = scope:gift
			}
			if = {
				limit = {
					scope:gift = flag:rare_book
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_rare_book_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1204 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_rare_book_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1304 }
					}
				}
			}

			else_if = {
				limit = {
					scope:gift = flag:object
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_object_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1208 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_object_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1308 }
					}
				}
			}

			else_if = {
				limit = {
					scope:gift = flag:handkerchief
				}
				random_list = {
					75 = {
						modifier = {
							add = 100
							seduce_gift_giving_handkerchief_likes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1212 }
					}
					25 = {
						modifier = {
							add = 100
							seduce_gift_giving_handkerchief_dislikes_trigger = yes
						}
						scope:target = { trigger_event = seduce_ongoing.1312 }
					}
				}
			}
		}
	}
}


###############
# rare_book resolution
###############

#Target: Success with rare_book
seduce_ongoing.1204 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = {
		desc = seduce_ongoing.1204.desc
		desc = seduce_ongoing.successful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1204.a

		add_character_modifier = {
			modifier = seduce_rare_book_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1404
		}
	}
}

#Target: Failed with a rare_book
seduce_ongoing.1304 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = {
		desc = seduce_ongoing.1304.desc
		desc = seduce_ongoing.unsuccessful.target
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1304.a
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1504
		}
	}
}

#Schemer: Succeeded with a rare_book
seduce_ongoing.1404 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with a rare_book
seduce_ongoing.1504 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


###############
# object resolution
###############

#Target: Success with object
seduce_ongoing.1208 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = seduce_ongoing.1208.desc
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1208.a

		add_character_modifier = {
			modifier = seduce_object_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1408
		}
	}
}

#Target: Failed with an object
seduce_ongoing.1308 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = seduce_ongoing.1308.desc
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.target_unsuccessful.option
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1508
		}
	}
}

#Schemer: Succeeded with an object
seduce_ongoing.1408 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with jewelry
seduce_ongoing.1508 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}




###############
# handkerchief resolution
###############

#Target: Success with handkerchief
seduce_ongoing.1212 = {
	type = character_event
	title = seduce_ongoing.1201.t
	desc = seduce_ongoing.1212.desc
	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.1212.a

		add_character_modifier = {
			modifier = seduce_handkerchief_gift_modifier
			days = 3650
		}
		scope:owner = {
			trigger_event = seduce_ongoing.1412
		}
	}
}

#Target: Failed with handkerchief
seduce_ongoing.1312 = {
	type = character_event
	title = seduce_ongoing.1301.t
	desc = seduce_ongoing.1312.desc
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}
	theme = seduce_scheme

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.target_unsuccessful.option
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.1512
		}
	}
}

#Schemer: Succeeded with handkerchief
seduce_ongoing.1412 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.successful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_successful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Failed with handkerchief
seduce_ongoing.1512 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.unsuccessful.owner
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.owner_unsuccessful.option
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}

###END GIFT GIVING CHAIN





#####
# Chain: Do something for someone close to target
# 3001 - 3004
# by Petter Vilberg and Mathilda Bjarnehed
#####

scripted_trigger seduce_ongoing_3001_close_character_trigger = {
	is_available_ai = yes
	OR = {
		AND = {
			age > 8
			is_landed = yes
		}
		is_adult = yes
	}
	this != root
	this != scope:target
	NOT = { is_consort_of = scope:target }
	NOT = { is_consort_of = scope:owner }
	NAND = {
		has_hook = scope:owner
		scope:owner = {
			has_hook = prev
		}
	}
	reverse_opinion = {
		target = scope:target
		value >= 50
	}
	opinion = {
		target = scope:owner
		value < 40
	}
}

seduce_ongoing.3001 = {
	type = character_event
	title = seduce_ongoing.3001.t
	desc = seduce_ongoing.3001.desc
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:close_character
		animation = personality_compassionate
	}
	lower_right_portrait = scope:target
	theme = seduce_scheme
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		scope:target = {
			is_available = yes
			OR = {
				any_relation = {
					type = friend
					seduce_ongoing_3001_close_character_trigger = yes
				}
				any_close_or_extended_family_member = {
					seduce_ongoing_3001_close_character_trigger = yes
				}
			}
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target = {
			every_relation = {
				type = friend
				limit = {
					seduce_ongoing_3001_close_character_trigger = yes
				}
				add_to_list = potential_close_character
			}
			every_close_or_extended_family_member = {
				limit = {
					seduce_ongoing_3001_close_character_trigger = yes
				}
				add_to_list = potential_close_character
			}
		}
		random_in_list = {
			list = potential_close_character
			save_scope_as = close_character
		}
		random_list = { #Determine the text used for the second event option
			50 = {
				save_scope_value_as = {
					name = gift_purpose
					value = flag:loan
				}
			}
			50 = {
				save_scope_value_as = {
					name = gift_purpose
					value = flag:gift
				}
			}
		}
		#Figure out how close owner and close_relation are in rank:
		if = {
			limit = {
				OR = {
					AND = {
						scope:owner = {
							highest_held_title_tier > tier_county
						}
						scope:close_character = {
							highest_held_title_tier > tier_county
						}
					}
					AND = {
						scope:owner = {
							highest_held_title_tier <= tier_county
						}
						scope:close_character = {
							highest_held_title_tier <= tier_county
						}
					}
					AND = {
						scope:owner = {
							highest_held_title_tier = tier_duchy
						}
						scope:close_character = {
							highest_held_title_tier = tier_county
						}
					}
					AND = {
						exists = scope:close_character.liege
						scope:close_character.liege = scope:owner
					}
					AND = {
						exists = scope:owner.liege
						scope:owner.liege = scope:close_character
					}
				}
			}
			save_scope_value_as = {
				name = close_owner_tier
				value = flag:fairly_close
			}
		}
		else = {
			save_scope_value_as = {
				name = close_owner_tier
				value = flag:not_close
			}
		}
	}

	#Give them hook
	option = {
		name = seduce_ongoing.3001.a
		trigger = {
			NOR = {
				has_hook = scope:close_character
				scope:close_character = { has_hook = root } #So they actually can get one
			}
		}
		scope:close_character = {
			add_hook = {
				target = scope:owner
				type = favor_hook
			}
			add_opinion = {
				target = scope:owner
				modifier = kindness_opinion
				opinion = 25
			}
		}
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
		}
		scope:target = {
			trigger_event = seduce_ongoing.3002
		}
		scope:owner = {
			trigger_event = {
				id = seduce_ongoing.3003
				days = { 5 10 }
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = {
					value = ai_greed
					multiply = -1
				}
				ai_greed > 0
			}
		}
	}

	#Let them off hook
	option = {
		name = seduce_ongoing.3001.b
		trigger = {
			has_hook = scope:close_character
		}
		remove_hook = {
			target = scope:close_character
		}
		scope:close_character = {
			add_opinion = {
				target = scope:owner
				modifier = kindness_opinion
				opinion = 25
			}
		}
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
		}
		scope:target = {
			trigger_event = seduce_ongoing.3002
		}
		scope:owner = {
			trigger_event = {
				id = seduce_ongoing.3003
				days = { 5 10 }
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = {
					value = ai_greed
					multiply = -1
				}
				ai_greed > 0
			}
		}
	}

	#Give them money
	option = {
		name = {
			text = seduce_ongoing.3001.c
			trigger = { scope:gift_purpose = flag:loan }
		}
		name = {
			text = seduce_ongoing.3001.d
			trigger = { scope:gift_purpose = flag:gift }
		}
		pay_short_term_gold = {
			target = scope:close_character
			gold = medium_gold_value
		}
		scope:close_character = {
			add_opinion = {
				target = scope:owner
				modifier = kindness_opinion
				opinion = 25
			}
		}
		show_as_tooltip = {
			random = {
				chance = 50
				seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
			}
		}
		hidden_effect = {
			random_list = {
				50 = {
					scope:target = {
						trigger_event = seduce_ongoing.3002
					}
					scope:owner = {
						trigger_event = {
							id = seduce_ongoing.3003
							days = { 5 10 }
						}
					}
				}
				50 = {
					trigger_event = {
						id = seduce_ongoing.3004
						days = { 5 10 }
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = {
					value = ai_greed
					multiply = -1
				}
				ai_greed > 0
			}
		}
	}

	option = {
		name = seduce_ongoing.3001.e
		custom_tooltip = seduce_ongoing_decline_event.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
		ai_chance = {
			base = 50
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}


#Target: Owner seems nice!
seduce_ongoing.3002 = {
	type = character_event
	title = seduce_ongoing.3001.t
	desc = seduce_ongoing.3002.desc
	theme = friendly
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:close_character
		animation = laugh
	}
	lower_right_portrait = scope:owner

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		exists = scope:scheme
	}

	immediate = { set_variable = scheme_event_active_flag }

	option = {
		name = {
			trigger = { scope:close_owner_tier = flag:fairly_close }
			text = seduce_ongoing.3002.a
		}
		name = {
			trigger = { scope:close_owner_tier = flag:not_close }
			text = seduce_ongoing.3002.b
		}
		add_stress = minor_stress_loss
	}

	after = { remove_variable = scheme_event_active_flag }
}


#Owner: Target noticed!
seduce_ongoing.3003 = {
	type = character_event
	title = seduce_ongoing.3001.t
	desc = seduce_ongoing.3003.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:target
		animation = admiration
	}
	lower_right_portrait = scope:close_character

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.3003.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}

#Owner: Target failed to notice
seduce_ongoing.3004 = {
	type = character_event
	title = seduce_ongoing.3001.t
	desc = seduce_ongoing.3004.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = disappointed
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	lower_right_portrait = scope:close_character

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.3004.a
	}
}

###END OFFERING A FAVOR CHAIN




#####
# A Troubadour at Target's Court
# 4001 - 4008
# by Petter Vilberg and Mathilda Bjarnehed
#####

seduce_ongoing.4001 = {
	type = character_event
	title = seduce_ongoing.4001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:court_musician
				}
				desc = seduce_ongoing.4001.desc.court_musician
			}
			desc = seduce_ongoing.4001.desc
		}
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		trigger = { exists = scope:court_musician }
		character = scope:court_musician
		animation = dancing
	}
	lower_right_portrait = {
		character = scope:target
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		scope:target = {
			NOT = { is_consort_of = scope:owner }
		}

		# So we don't try to pull in mercenary captain's courts.
		exists = scope:target.court_owner
		exists = scope:target.court_owner.capital_province
	}

	weight_multiplier = {
		base = 1
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target.court_owner.capital_province.barony = {
			save_scope_as = court_location
		}

		# Get court musician
		if = {
			limit = {
				employs_court_position = court_musician_court_position
				any_court_position_holder = {
					type = court_musician_court_position
					is_physically_able = yes
				}
			}
			random_court_position_holder = {
				type = court_musician_court_position
				limit = { is_physically_able = yes }
				save_scope_as = court_musician
			}
		}
		random_dummy_gender_musician_effect = yes
	}

	option = { #Direct approach
		name = seduce_ongoing.4001.a
		random_list = {
			60 = {
				#Success!
				desc = seduce_ongoing_possible_outcomes_tooltip_effect.success.desc
				compare_modifier = {
					value = diplomacy
					multiplier = 2
				}
				show_as_tooltip = {
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4002
						days = { 20 30 }
					}
				}
			}
			40 = {
				#Things go bad
				desc = seduce_ongoing_possible_outcomes_tooltip_effect.failure.desc
				modifier = {
					add = 25
					scope:target = { is_married = yes }
				}
				modifier = { #Increase chance of failure if target loves their spouse
					add = 25
					scope:target = {
						is_married = yes
						any_spouse = {
							reverse_has_opinion_modifier = {
								target = scope:target
								modifier = love_opinion
							}
						}
					}
				}
				show_as_tooltip = {
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4003
						days = { 20 30 }
					}
				}
			}
		}
		stress_impact = {
			shy = medium_stress_impact_gain
			craven = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
				ai_honor = 0.25
			}
		}
	}

	option = { #Subtle approach
		name = seduce_ongoing.4001.b
		random_list = {
			40 = { #Success
				desc = seduce_ongoing_possible_outcomes_tooltip_effect.success.desc
				compare_modifier = {
					value = intrigue
					multiplier = 1
				}
				compare_modifier = {
					target = scope:target
					value = learning
					multiplier = 1
				}
				show_as_tooltip = {
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4006
						days = { 20 30 }
					}
				}
			}
			60 = { #Failure
				desc = seduce_ongoing_possible_outcomes_tooltip_effect.failure.desc
				custom_tooltip = seduce_ongoing.4001.b.failure
				scope:owner = {
					trigger_event = {
						id = seduce_ongoing.4007
						days = { 20 30 }
					}
				}
				scope:scheme = {
					set_variable = {
						name = declined_seduce_milestone_1_event
						value = yes
					}
				}
			}
		}
		stress_impact = {
			impatient = medium_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				add = 100
				has_trait = shy
			}
		}
	}

	option = { #Council position: Sing about ME!
		name = seduce_ongoing.4001.c
		trigger = {
			exists = scope:court_musician
		}
		random_list = {
			40 = {
				#Success!
				desc = seduce_ongoing_possible_outcomes_tooltip_effect.success.desc
				compare_modifier = {
					value = prestige_level
					multiplier = prestige_level
				}
				show_as_tooltip = {
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4002
						days = { 20 30 }
					}
				}
				add_prestige = medium_prestige_gain
			}
			60 = {
				#Things go bad
				desc = seduce_ongoing_possible_outcomes_tooltip_effect.failure.desc
				#Target is less likely to be impressed if they're more impressive or equal
				compare_modifier = {
					value = scope:target.prestige_level
					multiplier = scope:target.prestige_level
				}
				modifier = {
					scope:target = {
						has_trait = humble #don't like braggarts
					}
					factor = 2
				}
				show_as_tooltip = {
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4003
						days = { 20 30 }
					}
				}
				add_prestige = medium_prestige_loss
			}
		}
		stress_impact = {
			arrogant = major_stress_impact_loss
			humble = major_stress_impact_gain
			shy = major_stress_impact_gain
		}
		scope:scheme = {
			set_variable = {
				name = seduce_ongoing_4001_court_musician_var
				value = yes
			}
		}
		ai_chance = {
			base = 20
			modifier = {
				add = 100
				has_trait = arrogant
			}
			modifier = {
				add = -100
				OR = {
					has_trait = shy
					has_trait = humble
				}
			}
		}
	}

	option = { #Don't do it
		name = seduce_ongoing.4001.d
		custom_tooltip = seduce_ongoing_decline_event.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
		stress_impact = {
			impatient = major_stress_impact_gain
		}
		ai_chance = {
			base = 20
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}


#Target: A great show!
seduce_ongoing.4002 = {
	type = character_event
	title = seduce_ongoing.4001.t
	desc = {
		desc = seduce_ongoing.4002.desc.opening
		triggered_desc = {
			trigger = {
				scope:scheme = { has_variable = seduce_ongoing_4001_court_musician_var }
			}
			desc = seduce_ongoing.4002.desc.court_musician
		}
		desc = seduce_ongoing.4002.desc
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = dancing
	}
	lower_right_portrait = {
		trigger = { exists = scope:court_musician }
		character = scope:court_musician
	}

	trigger = { exists = scope:scheme }

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.4004
		}
	}

	option = {
		name = seduce_ongoing.4002.a
		add_prestige = minor_prestige_gain
	}
	after = {
		scope:scheme = { remove_variable = seduce_ongoing_4001_court_musician_var }
	}
}


#Target: An insult
seduce_ongoing.4003 = {
	type = character_event
	title = seduce_ongoing.4001.t
	desc = {
		desc = seduce_ongoing.4002.desc.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:scheme = { has_variable = seduce_ongoing_4001_court_musician_var }
				}
				desc = seduce_ongoing.4003.desc.court_musician
			}
			desc = seduce_ongoing.4003.desc
		}
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = disapproval
	}
	right_portrait = {
		character = scope:owner
		animation = disbelief
	}
	lower_right_portrait = {
		trigger = { exists = scope:court_musician }
		character = scope:court_musician
	}

	trigger = { exists = scope:scheme }

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.4005
		}
	}

	option = {
		name = seduce_ongoing.4003.a

	}
}


#Schemer: Target had a great show
seduce_ongoing.4004 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.4004.desc
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.4004.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}


#Schemer: Target had a terrible show
seduce_ongoing.4005 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.4005.opening
	}
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:scheme = { has_variable = seduce_ongoing_4001_court_musician_var }
				}
				desc = seduce_ongoing.4005.desc.court_musician
			}
			desc = seduce_ongoing.4005.desc
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:spouse
					scope:scheme = { NOT = { has_variable = seduce_ongoing_4001_court_musician_var } }
				}
				desc = seduce_ongoing.4005.spouse
			}
			triggered_desc = {
				trigger = {
					scope:scheme = { NOT = { has_variable = seduce_ongoing_4001_court_musician_var } }
				}
				desc = seduce_ongoing.4005.court
			}
		}
	}
	sender = scope:target

	trigger = { exists = scope:scheme }

	immediate = {
		scope:target = {
			random_spouse = {
				weight = {
					base = 101
					opinion_modifier = {
						who = scope:target
						opinion_target = this
					}
				}
				save_scope_as = spouse
			}
		}
	}

	option = {
		name = seduce_ongoing.4005.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
	after = {
		scope:scheme = {
			if = {
				limit = { has_variable = seduce_ongoing_4001_court_musician_var }
				remove_variable = seduce_ongoing_4001_court_musician_var
			}
		}
	}
}


#Target: A nice show
seduce_ongoing.4006 = {
	type = character_event
	title = seduce_ongoing.4001.t
	desc = seduce_ongoing.4006.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = admiration
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = { exists = scope:scheme }

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.4008
		}
	}

	option = {
		name = seduce_ongoing.4006.a
		add_stress = minor_stress_loss
	}
}


#Schemer: Target does not seem to have noticed
seduce_ongoing.4007 = {
	type = character_event
	title = seduce_ongoing.4001.t
	desc = seduce_ongoing.4007.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = boredom
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.4007.a
	}
}

#Schemer: Target had a nice show
seduce_ongoing.4008 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.4004.desc
	sender = scope:target

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.4004.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}

###END OF TROUBADOUR CHAIN




##################
# Seducing a friend
# 5201 - 5207
# by Linnéa Thimrén and Mathilda Bjarnehed
##################

scripted_trigger seduce_ongoing_5201_likes_romance = {
	OR = {
		has_relation_potential_lover = scope:owner
		has_trait = lustful
		has_opinion_modifier = {
			target = scope:owner
			modifier = romance_opinion
		}
		scope:owner = { attraction >= low_positive_attraction }
	}
}

scripted_trigger seduce_ongoing_5201_likes_nostalgia = {
	OR = {
		ai_compassion >= medium_positive_ai_value
		opinion = {
			target = scope:owner
			value >= very_high_positive_opinion
		}
		has_relation_best_friend = scope:owner
	}
}

#How do I approach them?
seduce_ongoing.5201 = {
	type = character_event
	title = seduce_ongoing.5201.t
	desc = seduce_ongoing.5201.desc

	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		OR = {
			has_opinion_modifier = {
				modifier = childhood_crush
				target = scope:target
			}
			has_relation_friend = scope:target
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		#Let's save the location. Court owner's court if they have one, otherwise their location, and the fallback is our location
		if = {
			limit = {
				exists = scope:target.court_owner
				exists = scope:target.court_owner.capital_province
			}
			scope:target.court_owner = {
				capital_province = {
					barony = {
						save_scope_as = court_location
					}
				}
			}
		}
		else_if = {
			limit = {
				exists = scope:target.location
			}
			scope:target.location = {
				save_scope_as = court_location
			}
		}
		else = {
			location = {
				save_scope_as = court_location
			}
		}
		reverse_add_opinion = {
			target = scope:target
			modifier = friendliness_opinion
			opinion = 10
		}
	}

	option = { #Direct approach!
		name = seduce_ongoing.5201.a
		custom_tooltip = seduce_ongoing.5201.a.tt
		remove_short_term_gold = 1

		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 1 }

		save_scope_value_as = {
			name = friend_approach
			value = flag:romance
		}
		ai_chance = {
			base = 100
			modifier = {
				add = -20
				OR = {
					has_trait = craven
					has_trait = callous
					has_trait = greedy
				}
			}
			ai_value_modifier = {
				ai_boldness = 0.5
			}
		}
	}

	option = { #Remember that time..?
		name = seduce_ongoing.5201.b
		custom_tooltip = seduce_ongoing.5201.b.tt

		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 1 }

		save_scope_value_as = {
			name = friend_approach
			value = flag:remember
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
			}
		}
	}

	option = { #I should keep my feelings to myself for now
		name = seduce_ongoing.5201.c
		custom_tooltip = seduce_ongoing_decline_event.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
		ai_chance = {
			base = 30
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		hidden_effect = {
			if = {
				limit = {
					exists = scope:friend_approach
				}
				if = {
					limit = {
						scope:friend_approach = flag:romance
					}
					random_list = {
						80 = {
							save_scope_value_as = {
								name = seduce_ongoing_5201_outcome
								value = flag:success
							}
						}
						20 = {
							modifier = {
								scope:target = { seduce_ongoing_5201_likes_romance = yes }
								add = -20
							}
							save_scope_value_as = {
								name = seduce_ongoing_5201_outcome
								value = flag:failure
							}
						}
					}
					scope:target = {
						trigger_event = seduce_ongoing.5202
					}
				}
				else_if = {
					limit = {
						scope:friend_approach = flag:remember
					}
					random_list = {
						80 = {
							save_scope_value_as = {
								name = seduce_ongoing_5201_outcome
								value = flag:success
							}
						}
						20 = {
							modifier = {
								scope:target = { seduce_ongoing_5201_likes_nostalgia = yes }
								add = -20
							}
							save_scope_value_as = {
								name = seduce_ongoing_5201_outcome
								value = flag:failure
							}
						}
					}
					scope:target = {
						trigger_event = seduce_ongoing.5205
					}
				}
			}
		}
	}
}


#Target: toss the coin together
seduce_ongoing.5202 = {
	type = character_event
	title = seduce_ongoing.5201.t
	desc = seduce_ongoing.5202.desc

	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	option = { #I'm into it
		trigger = {
			OR = {
				is_ai = no
				scope:seduce_ongoing_5201_outcome = flag:success
			}
		}
		name = seduce_ongoing.5202.a

		scope:owner = {
			trigger_event = seduce_ongoing.5203
		}
	}

	option = { #I don't want this
		trigger = {
			OR = {
				is_ai = no
				scope:seduce_ongoing_5201_outcome = flag:failure
			}
		}
		name = seduce_ongoing.5202.b

		scope:owner = {
			trigger_event = seduce_ongoing.5204
		}
	}
}

#Schemer: Target is flattered
seduce_ongoing.5203 = {
	type = character_event
	title = seduce_ongoing.5201.t
	desc = seduce_ongoing.5203.desc

	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	option = {
		name = seduce_ongoing.5203.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}

#Schemer: target just wants to be friends
seduce_ongoing.5204 = {
	type = character_event
	title = seduce_ongoing.5201.t
	desc = seduce_ongoing.5204.desc

	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	option = {
		name = seduce_ongoing.5204.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}


#Target: owner starts reminiscing
seduce_ongoing.5205 = {
	type = character_event
	title = seduce_ongoing.5201.t
	desc = seduce_ongoing.5205.desc

	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	option = { #I am charmed
		trigger = {
			OR = {
				is_ai = no
				scope:seduce_ongoing_5201_outcome = flag:success
			}
		}
		name = seduce_ongoing.5205.a

		scope:owner = {
			trigger_event = seduce_ongoing.5206
		}
	}

	option = { #I don't want this
		trigger = {
			OR = {
				is_ai = no
				scope:seduce_ongoing_5201_outcome = flag:failure
			}
		}
		name = seduce_ongoing.5205.b

		scope:owner = {
			trigger_event = seduce_ongoing.5207
		}
	}
}

#Schemer: Target is flattered
seduce_ongoing.5206 = {
	type = character_event
	title = seduce_ongoing.5201.t
	desc = seduce_ongoing.5206.desc

	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	option = {
		name = seduce_ongoing.5203.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}

#Schemer: Target is uninterested
seduce_ongoing.5207 = {
	type = character_event
	title = seduce_ongoing.5201.t
	desc = seduce_ongoing.5207.desc

	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	option = {
		name = seduce_ongoing.5207.a
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
	}
}

### END SEDUCING FRIEND CHAIN


############################
# Close Family Events
# 5300-5399
############################

#######
# A Moment Alone
# 5301 - 5307
# by Petter Vilberg and Linnéa Thimrén
#######

#Share a moment
seduce_ongoing.5301 = {
	type = character_event
	title = seduce_ongoing.5301.t
	desc = seduce_ongoing.5301.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = prayer
	}
	right_portrait = {
		character = scope:target
		animation = personality_coward
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		scope:target = {
			is_close_or_extended_family_of = scope:owner
			NOT = {
				is_consort_of = scope:owner #All kinds of things might happen
			}
		}
	}

	immediate = { set_variable = scheme_event_active_flag }

	option = { #Be subtle
		name = seduce_ongoing.5301.a
		custom_tooltip = seduce_ongoing.5301.a.tt
		custom_tooltip = seduce_ongoing.5301.success_tt
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
		scope:target = {
			trigger_event = seduce_ongoing.5302
		}
	}

	option = { #Be forwards
		name = seduce_ongoing.5301.b
		custom_tooltip = seduce_ongoing.5301.b.tt
		custom_tooltip = seduce_ongoing.5301.success_tt
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 10
				}
			}
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
		scope:target = {
			trigger_event = seduce_ongoing.5305
		}
	}

	option = {
		name = seduce_ongoing.5301.c
		custom_tooltip = seduce_ongoing.5301.c.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}


#Target: Schemer using subtle approach
seduce_ongoing.5302 = {
	type = character_event
	title = seduce_ongoing.5301.t
	desc = seduce_ongoing.5302.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = personality_coward
	}
	right_portrait = {
		character = scope:owner
		animation = flirtation
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5302.a
		reverse_add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 15
		}
		scope:owner = {
			trigger_event = seduce_ongoing.5303
		}
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			modifier = {
				add = 500
				has_opinion_modifier = {
					target = scope:owner
					modifier = romance_opinion
				}
			}
		}
	}

	option = { #I do not want this
		name = seduce_ongoing.5302.b

		add_prestige = medium_prestige_gain
		scope:owner = {
			trigger_event = seduce_ongoing.5304
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
			}
		}
	}
}


#Schemer: Subtle success
seduce_ongoing.5303 = {
	type = character_event
	title = seduce_ongoing.5301.t
	desc = seduce_ongoing.5303.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:target
		animation = love
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5303.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

#Schemer: Subtle failure
seduce_ongoing.5304 = {
	type = character_event
	title = seduce_ongoing.5301.t
	desc = seduce_ongoing.5304.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5304.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

#Target: Schemer coming on strongly
seduce_ongoing.5305 = {
	type = character_event
	title = seduce_ongoing.5301.t
	desc = seduce_ongoing.5305.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = personality_coward
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5305.a
		reverse_add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 10
		}
		add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 10
		}
		scope:owner = {
			trigger_event = seduce_ongoing.5306
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
			}
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			modifier = {
				add = 500
				has_opinion_modifier = {
					target = scope:owner
					modifier = romance_opinion
				}
			}
			modifier = {
				add = 100
				has_trait = lustful
			}
		}
	}

	option = { #I do not want this
		name = seduce_ongoing.5302.b
		add_prestige = medium_prestige_gain
		scope:owner = {
			trigger_event = seduce_ongoing.5307
		}

		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
			}
			modifier = {
				add = 100
				has_trait = shy
			}
		}
	}
}

#Schemer: Strong success
seduce_ongoing.5306 = {
	type = character_event
	title = seduce_ongoing.5301.t
	desc = seduce_ongoing.5306.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:target
		animation = love
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5306.a
		show_as_tooltip = {
			reverse_add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 10
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}


#Schemer: Strong failure
seduce_ongoing.5307 = {
	type = character_event
	title = seduce_ongoing.5301.t
	desc = seduce_ongoing.5307.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = disgust
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5307.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

### END A MOMENT ALONE CHAIN



##########
# Both have high intrigue
# by Petter Vilberg and Linnéa Thimrén
##########

seduce_ongoing.6031 = {
	type = character_event
	title = seduce_ongoing.6031.t
	desc = seduce_ongoing.6031.desc

	theme = seduce_scheme
	left_portrait = scope:target
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		OR = {
			has_lifestyle = intrigue_lifestyle
			has_intrigue_lifestyle_trait_trigger = yes
		}
		scope:target = {
			OR = {
				has_lifestyle = intrigue_lifestyle
				has_intrigue_lifestyle_trait_trigger = yes
			}
		}
	}

	immediate = { set_variable = scheme_event_active_flag }

	option = { #Emphasize that you are letting them know
		name = seduce_ongoing.6031.a
		trigger = {
			has_trait = schemer
		}
		trait = schemer
		add_character_modifier = {
			modifier = seduce_intrigue_knowing_knowledge_modifier
			years = 5
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		ai_chance = {
			base = 1000
		}
	}

	option = { #Let them know
		name = seduce_ongoing.6031.b
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 1
			}
		}
	}

	option = { #I will focus on the intrigue part of this!
		name = seduce_ongoing.6031.c
		add_character_modifier = {
			modifier = seduce_intrigue_knowing_knowledge_modifier
			years = 5
		}
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
			}
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}



##########
# Spy on their preferences
# by Petter Vilberg and Linnéa Thimrén
##########

#seduce_ongoing.6041 = {
#	type = character_event
#	title = seduce_ongoing.6041.t
#	desc = seduce_ongoing.6041.desc
#
#	theme = seduce_scheme
#	left_portrait = scope:target
#	widget = {
#		gui = "event_window_widget_scheme"
#		container = "custom_widgets_container"
#	}
#
#	trigger = {
#		OR = {
#			has_lifestyle = intrigue_lifestyle
#			has_intrigue_lifestyle_trait_trigger = yes
#		}
#		scope:target = {
#			is_ai = yes
#		}
#	}
#
#	weight_multiplier = {
#		base = 1
#		modifier = {
#			add = 0.5
#			has_trait = schemer
#		}
#	}
#
#	option = { #That's easy
#		name = seduce_ongoing.6041.a
#		trigger = {
#			has_trait = schemer
#		}
#		trait = schemer
#		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
#		ai_chance = {
#			base = 1000
#		}
#	}
#
#	option = {
#		name = seduce_ongoing.6041.b
#		duel = {
#			skill = diplomacy
#			target = scope:target
#			20 = {
#				desc = seduce_ongoing.6041.b.success
#				compare_modifier = {
#					value = scope:duel_value
#					multiplier = 1
#					min = -19
#				}
#				show_as_tooltip = {
#					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
#				}
#				trigger_event = {
#					id = seduce_ongoing.6042
#					days = 3
#				}
#			}
#			20 = {
#				desc = seduce_ongoing.6041.b.failure
#				compare_modifier = {
#					value = scope:duel_value
#					multiplier = -1
#					min = -19
#				}
#				show_as_tooltip = {
#					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
#				}
#				trigger_event = {
#					id = seduce_ongoing.6043
#					days = 3
#				}
#			}
#		}
#		stress_impact = {
#			shy = medium_stress_impact_gain
#		}
#		ai_chance = {
#			base = 100
#			modifier = {
#				add = 200
#				diplomacy > intrigue
#				ai_rationality > 0
#			}
#		}
#	}
#
#	option = {
#		name = seduce_ongoing.6041.c
#		duel = {
#			skill = intrigue
#			target = scope:target
#			20 = {
#				desc = seduce_ongoing.6041.c.success
#				compare_modifier = {
#					value = scope:duel_value
#					multiplier = 1
#					min = -19
#				}
#				show_as_tooltip = {
#					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
#				}
#				trigger_event = {
#					id = seduce_ongoing.6042
#					days = 3
#				}
#			}
#			20 = {
#				desc = seduce_ongoing.6041.c.failure
#				compare_modifier = {
#					value = scope:duel_value
#					multiplier = -1
#					min = -19
#				}
#				show_as_tooltip = {
#					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
#				}
#				trigger_event = {
#					id = seduce_ongoing.6043
#					days = 3
#				}
#			}
#		}
#		ai_chance = {
#			base = 100
#			modifier = {
#				add = 200
#				intrigue > diplomacy
#				ai_rationality > 0
#			}
#		}
#	}
#
#	option = {
#		name = seduce_ongoing.6041.d
#		add_character_modifier = {
#			modifier = seduce_diplomatic_practice_modifier
#			years = 5
#		}
#		scope:scheme = {
#			set_variable = {
#				name = declined_seduce_milestone_2_event
#				value = yes
#			}
#		}
#	}
#}
#
#
#seduce_ongoing.6042 = {
#	type = character_event
#	title = seduce_ongoing.6041.t
#	desc = seduce_ongoing.6042.desc
#
#	theme = seduce_scheme
#	left_portrait = scope:target
#	widget = {
#		gui = "event_window_widget_scheme"
#		container = "custom_widgets_container"
#	}
#
#	trigger = {
#		exists = scope:scheme
#	}
#
#	option = {
#		name = seduce_ongoing.6042.a
#		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
#	}
#}
#
#seduce_ongoing.6043 = {
#	type = character_event
#	title = seduce_ongoing.6041.t
#	desc = seduce_ongoing.6043.desc
#
#	theme = seduce_scheme
#	left_portrait = scope:target
#	widget = {
#		gui = "event_window_widget_scheme"
#		container = "custom_widgets_container"
#	}
#
#	trigger = {
#		exists = scope:scheme
#	}
#
#	option = {
#		name = seduce_ongoing.6043.a
#		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
#	}
#}


################
# Seduction: compliment from statecraft
# by Mathilda Bjarnehed
###############
seduce_ongoing.1801 = {
	type = character_event
	title = seduce_ongoing.1801.t
	desc = {
		desc = seduce_ongoing.1801.start.desc
		first_valid = {
			triggered_desc = {
				trigger = { seduction_target_is_close_trigger = yes }
				desc = seduce_ongoing.1801.close.desc
			}
			triggered_desc = {
				trigger = { seduction_target_is_close_trigger = no }
				desc = seduce_ongoing.1801.distant.desc
			}
		}
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = personality_bold
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		OR = {
			diplomacy >= high_skill_rating
			has_diplomacy_lifestyle_trait_trigger = yes
		}
		scope:target = {
			can_receieve_good_available_compliment_trigger = yes
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		#Randomize 4 compliment types
		randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target }
		randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target }
		randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target }
		randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target }
	}


	#Compassionate
	option = {
		trigger = { has_character_flag = available_compliment_compassionate }
		name = seduce_ongoing.1801.compassionate
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = compassionate COMPLIMENT_GIVER = root } }
		}
	}

	#bold
	option = {
		trigger = { has_character_flag = available_compliment_bold }
		name = seduce_ongoing.1801.bold
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = bold COMPLIMENT_GIVER = root } }
		}
	}

	#honorable
	option = {
		trigger = { has_character_flag = available_compliment_honorable }
		name = seduce_ongoing.1801.honorable
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = honorable COMPLIMENT_GIVER = root } }
		}
	}

	#greed
	option = {
		trigger = { has_character_flag = available_compliment_greedy }
		name = seduce_ongoing.1801.greed
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = greed COMPLIMENT_GIVER = root } }
		}
	}

	#rational
	option = {
		trigger = { has_character_flag = available_compliment_rational }
		name = seduce_ongoing.1801.rational
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = rational COMPLIMENT_GIVER = root } }
		}
	}

	#zealous
	option = {
		trigger = { has_character_flag = available_compliment_zealous }
		name = seduce_ongoing.1801.zealous
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = zealous COMPLIMENT_GIVER = root } }
		}
	}

	#energetic
	option = {
		trigger = { has_character_flag = available_compliment_energetic }
		name = seduce_ongoing.1801.energetic
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = energetic COMPLIMENT_GIVER = root } }
		}
	}

	#forgiving
	option = {
		trigger = { has_character_flag = available_compliment_forgiving }
		name = seduce_ongoing.1801.forgiving
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = forgiving COMPLIMENT_GIVER = root } }
		}
	}

	#beautiful
	option = {
		trigger = { has_character_flag = available_compliment_beautiful }
		name = {
			trigger = { scope:target = { is_male = yes } }
			text = seduce_ongoing.1801.beautiful_male
		}
		name = {
			trigger = { scope:target = { is_female = yes } }
			text = seduce_ongoing.1801.beautiful_female
		}
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = beautiful COMPLIMENT_GIVER = root } }
		}
	}

	#strong
	option = {
		trigger = { has_character_flag = available_compliment_strong }
		name = seduce_ongoing.1801.strong
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = strong COMPLIMENT_GIVER = root } }
		}
	}

	#extroverted
	option = {
		trigger = { has_character_flag = available_compliment_extroverted }
		name = seduce_ongoing.1801.extroverted
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = extroverted COMPLIMENT_GIVER = root } }
		}
	}

	#dominant
	option = {
		trigger = { has_character_flag = available_compliment_dominant }
		name = seduce_ongoing.1801.dominant
		flavor = seduce_ongoing.1801.compliment.tt

		hidden_effect = {
			scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = dominant COMPLIMENT_GIVER = root } }
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		show_as_tooltip = {
			random_list = {
				1 = {
					desc = diplomacy_majesty.0004.success.tt
					show_chance = no

					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
				}
				1 = {
					desc = diplomacy_majesty.0004.failure.tt
					show_chance = no

					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
				}
			}
		}

		hidden_effect = {
			clear_available_compliments_effect = yes

			scope:target = { trigger_event = { id = seduce_ongoing.1802 } }
		}
	}
}

#Target responds
seduce_ongoing.1802 = {
	type = character_event
	title = seduce_ongoing.1802.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { seduction_target_is_close_trigger = yes }
				desc = seduce_ongoing.1802.close.desc
			}
			triggered_desc = {
				trigger = { seduction_target_is_close_trigger = no }
				desc = seduce_ongoing.1802.distant.desc
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:compassionate }
				desc = seduce_ongoing.1802.compassionate.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:bold }
				desc = seduce_ongoing.1802.bold.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:honorable }
				desc = seduce_ongoing.1802.honorable.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:greed }
				desc = seduce_ongoing.1802.greed.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:rational }
				desc = seduce_ongoing.1802.rational.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:zealous }
				desc = seduce_ongoing.1802.zealous.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:energetic }
				desc = seduce_ongoing.1802.energetic.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:forgiving }
				desc = seduce_ongoing.1802.forgiving.desc
			}
			triggered_desc = {
				trigger = {
					scope:evaluated_compliment_type = flag:beautiful
					is_male = yes
				}
				desc = seduce_ongoing.1802.beautiful_male.desc
			}
			triggered_desc = {
				trigger = {
					scope:evaluated_compliment_type = flag:beautiful
					is_female = yes
				}
				desc = seduce_ongoing.1802.beautiful_female.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:strong }
				desc = seduce_ongoing.1802.strong.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:extroverted }
				desc = seduce_ongoing.1802.extroverted.desc
			}
			triggered_desc = {
				trigger = { scope:evaluated_compliment_type = flag:dominant }
				desc = seduce_ongoing.1802.dominant.desc
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = { scope:compliment_outcome = flag:good }
				desc = seduce_ongoing.1802.good.desc
			}
			triggered_desc = {
				trigger = {
					OR = {
						scope:compliment_outcome = flag:bad
						scope:compliment_outcome = flag:neutral
					}
				}
				desc = seduce_ongoing.1802.bad.desc
			}
		}
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { scope:compliment_outcome ?= flag:good }
			animation = flirtation_left
		}
		triggered_animation = {
			trigger = { NOT = { scope:compliment_outcome ?= flag:good } }
			animation = dismissal
		}
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = {
		exists = scope:scheme
	}

	#I like it!
	option = {
		trigger = {
			OR = {
				is_ai = no
				scope:compliment_outcome = flag:good
				scope:compliment_outcome = flag:neutral
			}
		}
		name = {
			trigger = { scope:compliment_outcome = flag:good }
			text = seduce_ongoing.1802.a.good
		}
		name = {
			trigger = { NOT = { scope:compliment_outcome = flag:good } }
			text = seduce_ongoing.1802.a.bad
		}

		reverse_add_opinion = {
			target = scope:owner
			modifier = grateful_opinion
			opinion = 10
		}

		hidden_effect = {
			scope:owner = {
				send_interface_toast = {
					left_icon = scope:target
					title = diplomacy_majesty.0004.success.tt
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
				}
			}
		}
	}

	#That was bad...
	option = {
		trigger = {
			OR = {
				is_ai = no
				scope:compliment_outcome = flag:bad
			}
		}
		name = {
			trigger = { NOT = { scope:compliment_outcome = flag:bad } }
			text = seduce_ongoing.1802.b.good
		}
		name = {
			trigger = { scope:compliment_outcome = flag:bad }
			text = seduce_ongoing.1802.b.bad
		}

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

		hidden_effect = {
			scope:owner = {
				send_interface_toast = {
					left_icon = scope:target
					title = diplomacy_majesty.0004.failure.tt
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
				}
			}
		}
	}
}

##########
## (AI) target personality
## by Bianca Savazzi
##########


#Target is shy

scripted_trigger seduce_shy_target_likes_bold_trigger = {
	OR = {
		has_trait_emotional_trigger = yes
		has_trait_extroverted_trigger = yes
	}
}

scripted_trigger seduce_shy_target_dislikes_bold_trigger = {
	OR = {
		has_trait = reclusive
		has_trait = chaste
	}
}

scripted_trigger seduce_shy_target_likes_gentle_trigger = {
	OR = {
		has_trait = content
		has_trait = chaste
		has_trait_levelheaded_trigger = yes
	}
}

scripted_trigger seduce_shy_target_dislikes_gentle_trigger = {
	OR = {
		has_trait_emotional_trigger = yes
		has_trait_extroverted_trigger = yes
	}
}

# How should you approach?
seduce_ongoing.7001 = {
	type = character_event
	title = seduce_ongoing.7001.t
	desc = seduce_ongoing.7001.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:target
		animation = personality_coward
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		scope:target = {
			is_ai = yes
			OR = {
				has_personality_submissive_trigger = yes
				has_personality_introverted_trigger = yes
			}
		}
	}

	immediate = { set_variable = scheme_event_active_flag }

	option = { #Be bold! Be romantic!
		name = seduce_ongoing.7001.a
		custom_tooltip = seduce_ongoing.7001.a.tt
		hidden_effect = {
			random_list = {
				75 = {
					modifier = {
						add = 100
							seduce_shy_target_likes_bold_trigger = yes
						}
						trigger_event = { id = seduce_ongoing.7101 days = { 3 5 } }
					}
				25 = {
					modifier = {
						add = 100
						seduce_shy_target_dislikes_bold_trigger = yes
					}
					trigger_event = { id = seduce_ongoing.7102 days = { 3 5 } }
				}
			}
		}
		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 1 }
	}

	option = { #A friendly approach
		name = seduce_ongoing.7001.b
		custom_tooltip = seduce_ongoing.7001.b.tt
		hidden_effect = {
			random_list = {
				75 = {
					modifier = {
						add = 100
						seduce_shy_target_likes_gentle_trigger = yes
					}
					trigger_event = { id = seduce_ongoing.7201 days = { 3 5 } }
				}
				25 = {
					modifier = {
						add = 100
						seduce_shy_target_dislikes_gentle_trigger = yes
					}
					trigger_event = { id = seduce_ongoing.7202 days = { 3 5 } }
				}
			}
		}
		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 1 }
	}

	option = { #Nah
		name = seduce_ongoing.7001.c
		custom_tooltip = seduce_ongoing_decline_event.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_1_event
				value = yes
			}
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}

#Bold Approach: Success
seduce_ongoing.7101 = {
	type = character_event
	title = seduce_ongoing.7001.t
	desc = {
		desc = seduce_ongoing.7101.desc_opening
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						can_touch_someone_trigger = no
						scope:target = { can_touch_someone_trigger = no }
					}
				}
				desc = seduce_ongoing.7101.desc_cannot_touch_arms
			}
			desc = seduce_ongoing.7101.desc_can_touch_arms
		}
		desc = seduce_ongoing.7101.desc_closing
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.7101.a
		add_character_modifier = {
			modifier = seduce_bold_start_modifier
			days = 3650
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}

#Bold Approach: Failure
seduce_ongoing.7102 = {
	type = character_event
	title = seduce_ongoing.7001.t
	desc = seduce_ongoing.7102.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = disgust
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.7102.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
	}
}

#Gentle Approach: Success
seduce_ongoing.7201 = {
	type = character_event
	title = seduce_ongoing.7001.t
	desc = seduce_ongoing.7201.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}

	trigger = { exists = scope:scheme }

	option = {
		name = seduce_ongoing.7101.a
		add_character_modifier = {
			modifier = seduce_gentle_start_modifier
			days = 3650
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = success }
	}
}

#Gentle Approach: Failure
seduce_ongoing.7202 = {
	type = character_event
	title = seduce_ongoing.7001.t
	desc = {
		desc = seduce_ongoing.7202.desc
		triggered_desc = {
		    trigger = {
				exists = var:animal_type
		    }
		    desc = seduce_ongoing.7202.desc_animal
		}
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = disappointed
	}

	trigger = { exists = scope:scheme }

	immediate = {
		if = {
			limit = {
				exists = location
			}
			select_local_animal_effect = { TYPE = prowling } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling
		}
	}

	option = {
		name = seduce_ongoing.7102.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 1 OUTCOME = failure }
		remove_variable = animal_type
	}
}

#############################
#############################
## SECOND MILESTONE EVENTS ##
#############################
#############################

##########
#A Dance Chain
#1001-1006
# by Petter Vilberg and Linnéa Thimrén
##########

# To check that the target will enjoy one of the options
scripted_trigger seduce_ongoing_1001_dance_trigger = {
	OR = {
		has_personality_extroverted_trigger = yes
		ai_energy > medium_positive_energy
		has_trait = lifestyle_reveler
	}
	NOT = { has_trait = lazy }
}

scripted_trigger seduce_ongoing_1001_walk_trigger = {
	OR = {
		has_personality_introverted_trigger = yes
		ai_rationality > medium_positive_rationality
	}
	NOT = { has_trait = lazy }
}

scripted_trigger seduce_ongoing_1001_food_trigger = {
	OR = {
		ai_greed > medium_positive_greed
		has_trait = gluttonous
		has_trait = greedy
	}
}

scripted_trigger seduce_ongoing_1001_mockery_trigger = {
	OR = {
		has_personality_malicious_trigger = yes
		ai_compassion < high_negative_compassion
	}
	NOR = {
		has_trait = gregarious
		has_trait = compassionate
	}
}

#An opportunity to do something
seduce_ongoing.1001 = {
	type = character_event
	title = seduce_ongoing.1001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:target = {
						court_owner != scope:owner
					}
				}
				desc = seduce_ongoing.1001.distant_opening
			}
			triggered_desc = {
				trigger = {
					scope:target = {
						court_owner = scope:owner
					}
				}
				desc = seduce_ongoing.1001.close_opening
			}
		}
		desc = seduce_ongoing.1001.desc
	}

	left_portrait = {
		character = root
		animation = dancing
	}
	right_portrait = {
		character = scope:target
		animation = dancing
	}
	theme = seduce_scheme
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		exists = scope:target.court_owner
		scope:target = {
			exists = location.barony # In case the character in question is at sea
			OR = {
				seduce_ongoing_1001_dance_trigger = yes
				seduce_ongoing_1001_walk_trigger = yes
				seduce_ongoing_1001_food_trigger = yes
				seduce_ongoing_1001_mockery_trigger = yes
			}
			is_landed = no
			is_available_adult = yes
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target.location.barony = {
			save_scope_as = court_of_residence
		}
		scope:target = {
			court_owner = {
				save_scope_as = court_owner
			}
		}
		save_scope_value_as = {
			name = dance_approach
			value = flag:empty
		}
	}

	option = { #Dance with them
		name = seduce_ongoing.1001.a
		custom_tooltip = seduce_ongoing.1001.a.tt
		save_scope_value_as = {
			name = dance_approach
			value = flag:dance
		}
		stress_impact = {
			lazy = medium_stress_impact_gain
			shy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 0.5
				ai_rationality = 0.25
			}
		}
	}

	option = { #Take a walk
		name = seduce_ongoing.1001.b
		custom_tooltip = seduce_ongoing.1001.b.tt
		save_scope_value_as = {
			name = dance_approach
			value = flag:walk
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 0.5
				ai_boldness = 0.5
			}
		}
	}

	option = { #Bring them food
		name = seduce_ongoing.1001.c
		custom_tooltip = seduce_ongoing.1001.c.tt
		save_scope_value_as = {
			name = dance_approach
			value = flag:food
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = 0.5
			}
		}
	}

	option = { #Make fun of other guests
		name = seduce_ongoing.1001.d
		custom_tooltip = seduce_ongoing.1001.d.tt
		save_scope_value_as = {
			name = dance_approach
			value = flag:mockery
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			gregarious = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_vengefulness = 0.25
			}
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		scope:target = {
			hidden_effect = {
				#Evaluate what makes for a "right" choice
				if = {
					limit = {
						OR = {
							AND = {
								OR = {
									has_personality_malicious_trigger = yes
									ai_compassion < high_negative_compassion
								}
								scope:dance_approach = flag:mockery
							}
							AND = {
								OR = {
									has_personality_introverted_trigger = yes
									ai_rationality > medium_positive_rationality
								}
								scope:dance_approach = flag:walk
							}
							AND = {
								OR = {
									has_personality_extroverted_trigger = yes
									ai_energy > medium_positive_energy
									has_trait = lifestyle_reveler
								}
								scope:dance_approach = flag:dance
							}
							AND = {
								OR = {
									ai_greed > medium_positive_greed
									has_trait = gluttonous
									has_trait = greedy
								}
								scope:dance_approach = flag:food
							}
						}
					}
					save_scope_value_as = {
						name = made_great_choice
						value = yes
					}
				}


				if = {
					limit = {
						scope:dance_approach = flag:dance
					}
					random_list = {
						100 = { #Success
							trigger_event = {
								id = seduce_ongoing.1003
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.1005
									days = { 5 8 }
								}
							}
						}
						100 = { #Failure
							trigger = {
								NOT = { exists = scope:made_great_choice }
							}
							modifier = {
								add = 100
								has_trait = lazy
							}
							modifier = {
								add = 100
								has_trait = shy
							}
							trigger_event = {
								id = seduce_ongoing.1004
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.1006
									days = { 5 8 }
								}
							}
						}
					}
				}
				else_if = {
					limit = {
						scope:dance_approach = flag:walk
					}
					random_list = {
						100 = { #Success
							modifier = {
								add = 100
								has_trait = shy
							}
							trigger_event = {
								id = seduce_ongoing.1003
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.1005
									days = { 5 8 }
								}
							}
						}
						100 = { #Failure
							trigger = {
								NOT = { exists = scope:made_great_choice }
							}
							modifier = {
								add = 100
								has_trait = lazy
							}
							trigger_event = {
								id = seduce_ongoing.1004
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.1006
									days = { 5 8 }
								}
							}
						}
					}
				}
				else_if = {
					limit = {
						scope:dance_approach = flag:food
					}
					random_list = {
						100 = { #Success
							compare_modifier = {
								value = ai_greed
								multiplier = 0.5
							}
							trigger_event = {
								id = seduce_ongoing.1003
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.1005
									days = { 5 8 }
								}
							}
						}
						200 = { #Failure
							trigger = {
								NOT = { exists = scope:made_great_choice }
							}
							trigger_event = {
								id = seduce_ongoing.1004
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.1006
									days = { 5 8 }
								}
							}
						}
					}
				}
				else_if = {
					limit = {
						scope:dance_approach = flag:mockery
					}
					random_list = {
						100 = { #Success
							modifier = {
								add = -40
								has_trait = gregarious
							}
							modifier = {
								add = -40
								has_trait = compassionate
							}
							trigger_event = {
								id = seduce_ongoing.1003
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.1005
									days = { 5 8 }
								}
							}
						}
						200 = { #Failure
							trigger = {
								NOT = { exists = scope:made_great_choice }
							}
							trigger_event = {
								id = seduce_ongoing.1004
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.1006
									days = { 5 8 }
								}
							}
						}
					}
				}
				else_if = { #To stop error spamming about the scope being empty
					limit = {
						scope:dance_approach = flag:empty
					}
				}
			}
		}
		seduce_ongoing_possible_outcomes_tooltip_effect = {
			MILESTONE = 2
		}
	}
}


#Target: Success
seduce_ongoing.1003 = {
	type = character_event
	title = seduce_ongoing.1001.t
	desc = {
		desc = seduce_ongoing.1003.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:dance
				}
				desc = seduce_ongoing.1003.dance
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:walk
				}
				desc = seduce_ongoing.1003.walk
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:food
				}
				desc = seduce_ongoing.1003.food
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:mockery
				}
				desc = seduce_ongoing.1003.mockery
			}
			desc = seduce_ongoing.1003.fallback
		}
	}

	left_portrait = {
		character = root
		animation = dancing
	}
	right_portrait = {
		character = scope:owner
		animation = dancing
	}
	theme = seduce_scheme

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.1003.a
		hidden_effect = { seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success } }
		add_stress = minor_stress_loss
	}
}

#Target: Failure
seduce_ongoing.1004 = {
	type = character_event
	title = seduce_ongoing.1001.t
	desc = {
		desc = seduce_ongoing.1003.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:dance
				}
				desc = seduce_ongoing.1004.dance
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:walk
				}
				desc = seduce_ongoing.1004.walk
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:food
				}
				desc = seduce_ongoing.1004.food
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:mockery
				}
				desc = seduce_ongoing.1004.mockery
			}
			desc = seduce_ongoing.1004.fallback
		}
	}

	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = dancing
	}
	theme = unfriendly
	override_background = { reference = feast }

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.1004.a
		hidden_effect = { seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure } }
	}
}

#Owner: Success
seduce_ongoing.1005 = {
	type = character_event
	title = seduce_ongoing.1001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:dance
				}
				desc = seduce_ongoing.1005.dance
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:walk
				}
				desc = seduce_ongoing.1005.walk
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:food
				}
				desc = seduce_ongoing.1005.food
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:mockery
				}
				desc = seduce_ongoing.1005.mockery
			}
			desc = seduce_ongoing.1005.fallback
		}
	}

	left_portrait = {
		character = root
		animation = dancing
	}
	right_portrait = {
		character = scope:target
		animation = dancing
	}
	theme = seduce_scheme
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.1005.a
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
	}
}


#Owner: Failure
seduce_ongoing.1006 = {
	type = character_event
	title = seduce_ongoing.1001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:dance
				}
				desc = seduce_ongoing.1006.dance
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:walk
				}
				desc = seduce_ongoing.1006.walk
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:food
				}
				desc = seduce_ongoing.1006.food
			}
			triggered_desc = {
				trigger = {
					scope:dance_approach = flag:mockery
				}
				desc = seduce_ongoing.1006.mockery
			}
			desc = seduce_ongoing.1006.fallback
		}
	}

	left_portrait = {
		character = root
		animation = dancing_plague
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	theme = seduce_scheme

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.1006.a
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
		}
	}
}

###END DANCE CHAIN


#####################
# Book Reading Chain
# 1601-1606
# by Petter Vilberg and Linnéa Thimrén
#####################

#To check that the target is likely to enjoy one of the options
#scripted_trigger seduce_ongoing_1601_religious_trigger = {
#	OR = {
#		learning >= mediocre_skill_rating
#		piety >= medium_piety_value
#		ai_zeal = medium_positive_zeal
#		has_trait = zealous
#	}
#}
#
#scripted_trigger seduce_ongoing_1601_entertaining_trigger = {
#	OR = {
#		ai_boldness >= medium_positive_boldness
#		ai_greed >= medium_positive_greed
#		ai_honor >= medium_positive_honor
#		ai_compassion >= medium_positive_compassion
#	}
#}
#
#scripted_trigger seduce_ongoing_1601_informative_trigger = {
#	OR = {
#		learning >= mediocre_skill_rating
#		stewardship >= mediocre_skill_rating
#	}
#}
#
#seduce_ongoing.1601 = {
#	type = character_event
#	title = {
#		first_valid = {
#			triggered_desc = {
#				trigger = {
#					exists = scope:location
#				}
#				desc = seduce_ongoing.1601.t
#			}
#			desc = seduce_ongoing.1601.t_no_location
#		}
#	}
#	desc = seduce_ongoing.1601.desc
#
#	theme = seduce_scheme
#	left_portrait = scope:target
#	widget = {
#		gui = "event_window_widget_scheme"
#		container = "custom_widgets_container"
#	}
#
#	trigger = {
#		NOT = { has_variable = scheme_event_active_flag }
#		is_available_adult = yes
#		scope:scheme = {
#			scheme_target_character = {
#				OR = {
#					seduce_ongoing_1601_religious_trigger = yes
#					seduce_ongoing_1601_entertaining_trigger = yes
#					seduce_ongoing_1601_informative_trigger = yes
#				}
#				is_available_adult = yes
#			}
#		}
#	}
#
#	weight_multiplier = {
#		base = 1
#		compare_modifier = {
#			value = learning
#			multiplier = 1
#		}
#	}
#
#	immediate = {
#		set_variable = scheme_event_active_flag
#		if = {
#			limit = {
#				exists = scope:target.court_owner.capital_province.barony
#			}
#			scope:target = {
#				court_owner = {
#					capital_province = {
#						barony = {
#							save_scope_as = location
#						}
#					}
#				}
#			}
#		}
#		else_if = {
#			limit = {
#				exists = scope:target.location
#			}
#			scope:target.location = {
#				save_scope_as = location
#			}
#		}
#		set_random_religious_text_effect = yes
#		set_random_entertainment_text_effect = yes
#		set_random_informative_text_effect = yes
#		save_scope_value_as = { #To avoid unset error scope for the after effect
#			name = book_selection
#			value = flag:empty
#		}
#	}
#
#	option = { #Read a religious book
#		name = seduce_ongoing.1601.a
#		custom_tooltip = seduce_ongoing.1601.a.tt
#		save_scope_value_as = {
#			name = book_selection
#			value = flag:religious
#		}
#		ai_chance = {
#			base = 100
#			ai_value_modifier = {
#				ai_zeal = 1
#			}
#		}
#	}
#
#	option = { #Read an entertainment book
#		name = seduce_ongoing.1601.b
#		custom_tooltip = seduce_ongoing.1601.b.tt
#		save_scope_value_as = {
#			name = book_selection
#			value = flag:entertaining
#		}
#		ai_chance = {
#			base = 100
#			ai_value_modifier = {
#				ai_boldness = 1
#				ai_greed = 0.5
#			}
#		}
#	}
#
#	option = { #Read an informative book
#		name = seduce_ongoing.1601.c
#		custom_tooltip = seduce_ongoing.1601.c.tt
#		save_scope_value_as = {
#			name = book_selection
#			value = flag:informative
#		}
#		ai_chance = {
#			base = 100
#			compare_modifier = {
#				value = learning
#				multiplier = 3
#			}
#			compare_modifier = {
#				value = stewardship
#				multiplier = 3
#			}
#		}
#	}
#
#	after = {
#		remove_variable = scheme_event_active_flag
#		scope:target = {
#			trigger_event = seduce_ongoing.1602
#		}
#		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 2 }
#	}
#}
#
#seduce_ongoing.1602 = {
#	hidden = yes
#	immediate = {
#		#Evaluate, and set what would have been a good choice
#		random_list = {
#			50 = {
#				trigger = { scope:book_selection = flag:religious }
#
#				compare_modifier = {
#					value = ai_zeal
#					multiplier = 6
#				}
#				compare_modifier = {
#					value = ai_honor
#					multiplier = 2
#				}
#				compare_modifier = {
#					value = piety_level
#					multiplier = 25
#				}
#				modifier = { #Would reasonably mean that they're interested in the subject
#					add = 40
#					OR = {
#						has_trait = education_learning
#						has_lifestyle = learning_lifestyle
#					}
#				}
#				modifier = {
#					add = {
#						value = learning
#						subtract = mediocre_skill_rating
#						multiply = 5
#						min = 0 # Low learning characters may still be interested due to piety.
#					}
#				}
#				trigger_event = seduce_ongoing.1603
#			}
#			50 = {
#				trigger = { scope:book_selection = flag:entertaining }
#				compare_modifier = {
#					value = ai_boldness
#					multiplier = 4
#					min = 1
#				}
#				compare_modifier = {
#					value = ai_greed
#					multiplier = 2
#					min = 1
#				}
#				compare_modifier = {
#					value = ai_sociability
#					multiplier = 2
#					min = 1
#				}
#				modifier = { #Would reasonably mean that they're interested in the subject
#					add = 40
#					OR = {
#						has_trait = education_diplomacy
#						has_lifestyle = diplomacy_lifestyle
#					}
#				}
#				modifier = { #They're a calm and/or "dry" person
#					add = -30
#					OR = {
#						has_trait = lazy
#						has_trait = content
#						has_trait = calm
#						has_trait = craven
#						has_trait = callous
#						has_trait = shy
#						has_trait = reclusive
#					}
#				}
#				modifier = {
#					add = {
#						value = diplomacy
#						subtract = mediocre_skill_rating
#						multiply = 5
#						min = 0 # Low diplomacy characters may still be interested, but high skill characters value it more.
#					}
#				}
#				modifier = {
#					add = {
#						value = martial
#						subtract = mediocre_skill_rating
#						multiply = 5
#						min = 0 # Low martial characters may still be interested, but high skill characters value it more.
#					}
#				}
#				trigger_event = seduce_ongoing.1603
#			}
#			50 = {
#				trigger = { scope:book_selection = flag:informative }
#
#				compare_modifier = {
#					value = ai_zeal
#					multiplier = -2 # Zealous characters would prefer religious texts.
#					max = 0 # Cynical characters don't inherently appreciate these books though.
#				}
#				modifier = {
#					add = {
#						value = stewardship
#						subtract = mediocre_skill_rating
#						multiply = 5
#						min = 0 # Low stewardship characters may still be interested, but high skill characters value it more.
#					}
#				}
#				modifier = {
#					add = {
#						value = learning
#						subtract = mediocre_skill_rating
#						multiply = 10
#						# Learning has a massive impact here, both if they're good OR bad at it!
#					}
#				}
#				modifier = { #Would reasonably mean that they're interested in the subject
#					add = 20
#					OR = {
#						has_trait = education_stewardship
#						has_lifestyle = stewardship_lifestyle
#					}
#				}
#				modifier = { #Would reasonably mean that they're interested in the subject
#					add = 30
#					OR = {
#						has_trait = education_learning
#						has_lifestyle = learning_lifestyle
#					}
#				}
#				# Negative Traits
#				modifier = {
#					has_trait = arrogant
#					add = -20
#				}
#				modifier = {
#					has_trait = impatient
#					add = -20
#				}
#				modifier = {
#					has_trait = dull
#					add = -20
#				}
#
#				# Positive Traits
#				modifier = {
#					add = 20
#					has_trait = shrewd
#				}
#				modifier = {
#					add = 20
#					has_trait = lifestyle_physician
#				}
#				modifier = {
#					add = 30
#					has_trait_rank = {
#						trait = intellect_good
#						rank >= 1
#					}
#				}
#				trigger_event = seduce_ongoing.1603
#			}
#			50 = { #Failure, choose what would have been a "better" choice
#				if = {
#					limit = {
#						scope:book_selection = flag:religious
#					}
#					random_list = {
#						50 = {
#							save_scope_value_as = {
#								name = good_selection
#								value = flag:entertaining
#							}
#						}
#						50 = {
#							save_scope_value_as = {
#								name = good_selection
#								value = flag:informative
#							}
#						}
#					}
#				}
#				else_if = {
#					limit = {
#						scope:book_selection = flag:entertaining
#					}
#					random_list = {
#						50 = {
#							save_scope_value_as = {
#								name = good_selection
#								value = flag:religious
#							}
#						}
#						50 = {
#							save_scope_value_as = {
#								name = good_selection
#								value = flag:informative
#							}
#						}
#					}
#				}
#				else_if = {
#					limit = {
#						scope:book_selection = flag:informative
#					}
#					random_list = {
#						50 = {
#							save_scope_value_as = {
#								name = good_selection
#								value = flag:religious
#							}
#						}
#						50 = {
#							save_scope_value_as = {
#								name = good_selection
#								value = flag:entertaining
#							}
#						}
#					}
#				}
#				trigger_event = seduce_ongoing.1605
#			}
#		}
#	}
#}
#
#
##Target: Success. Good book!
#seduce_ongoing.1603 = {
#	type = character_event
#	title = seduce_ongoing.1601.t
#	desc = seduce_ongoing.1603.desc
#
#	theme = seduce_scheme
#	left_portrait = scope:owner
#
#	trigger = {
#		exists = scope:scheme
#	}
#
#	immediate = {
#		assign_quirk_effect = yes
#		scope:owner = {
#			trigger_event = seduce_ongoing.1604
#		}
#		hidden_effect = { seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success } }
#	}
#
#	option = {
#		name = seduce_ongoing.1603.a
#	}
#}
#
##Owner: Success
#seduce_ongoing.1604 = {
#	type = character_event
#	title = seduce_ongoing.1601.t
#	desc = seduce_ongoing.1604.desc
#
#	theme = seduce_scheme
#	left_portrait = scope:target
#	widget = {
#		gui = "event_window_widget_scheme"
#		container = "custom_widgets_container"
#	}
#
#	trigger = {
#		exists = scope:scheme
#	}
#
#	option = {
#		name = seduce_ongoing.1604.a
#		show_as_tooltip = {
#			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
#		}
#	}
#}
#
##Target: Failure. Kinda bad choice
#seduce_ongoing.1605 = {
#	type = character_event
#	title = seduce_ongoing.1601.t
#	desc = {
#		desc = seduce_ongoing.1605.desc_1
#		first_valid = {
#			triggered_desc = {
#				trigger = {
#					exists = scope:other_guest
#				}
#				desc = seduce_ongoing.1605.desc_2
#			}
#			desc = seduce_ongoing.1605.desc_no_other_guest
#		}
#	}
#
#	theme = seduce_scheme
#	left_portrait = scope:owner
#	right_portrait = scope:other_guest
#
#	trigger = {
#		exists = scope:scheme
#	}
#
#	immediate = {
#		if = {
#			limit = {
#				exists = court_owner
#			}
#			court_owner = {
#				random_courtier_or_guest = {
#					limit = {
#						this != scope:target
#						this != scope:owner
#						is_available_adult = yes
#					}
#					save_scope_as = other_guest
#				}
#			}
#		}
#		scope:owner = {
#			trigger_event = seduce_ongoing.1606
#		}
#		hidden_effect = { seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure } }
#	}
#
#	option = {
#		name = seduce_ongoing.1605.a
#		if = {
#			limit = { exists = scope:other_guest }
#			add_opinion = {
#				target = scope:other_guest
#				modifier = kindness_opinion
#				opinion = 15
#			}
#		}
#	}
#}
#
##Owner: Failure
#seduce_ongoing.1606 = {
#	type = character_event
#	title = seduce_ongoing.1601.t
#	desc = {
#		desc = seduce_ongoing.1606.desc_1
#		first_valid = {
#			triggered_desc = {
#				trigger = {
#					exists = scope:other_guest
#				}
#				desc = seduce_ongoing.1606.desc_2
#			}
#			desc = seduce_ongoing.1606.desc_no_other_guest
#		}
#		desc = seduce_ongoing.1606.desc_3
#	}
#
#	theme = seduce_scheme
#	left_portrait = {
#		character = scope:target
#		animation = boredom
#	}
#	right_portrait = scope:other_guest
#	widget = {
#		gui = "event_window_widget_scheme"
#		container = "custom_widgets_container"
#	}
#
#	trigger = {
#		exists = scope:scheme
#	}
#
#	option = {
#		name = seduce_ongoing.1606.a
#		show_as_tooltip = {
#			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
#			if = {
#				limit = { exists = scope:other_guest }
#				add_opinion = {
#					target = scope:other_guest
#					modifier = kindness_opinion
#					opinion = 15
#				}
#			}
#		}
#	}
#}

### END BOOK READING CHAIN



####
# Jousting Day Chain
# 1701-1706
# by Petter Vilberg and Linnéa Thimrén
####

#To check that the target will enjoy one of the options
scripted_trigger seduce_ongoing_1701_strategy_trigger = {
	OR = {
		has_trait = shy
		has_personality_introverted_trigger = yes
		ai_rationality > medium_positive_rationality
		has_martial_lifestyle_trait_trigger = yes
	}
	NOT = { has_trait = lazy }
}

scripted_trigger seduce_ongoing_1701_trap_trigger = {
	OR = {
		has_personality_malicious_trigger = yes
		ai_compassion < high_negative_compassion
		has_trait = sadistic
	}
	NOR = {
		has_trait = compassionate
		has_trait = gregarious
	}
}

scripted_trigger seduce_ongoing_1701_duel_trigger = {
	OR = {
		has_personality_extroverted_trigger = yes
		ai_energy > medium_positive_energy
		has_trait = lifestyle_blademaster
	}
	NOR = {
		has_trait = lazy
		has_trait = shy
	}
}

scripted_trigger seduce_ongoing_1701_tax_season_trigger = {
	OR = {
		ai_greed > medium_positive_greed
		has_trait = greedy
		has_stewardship_lifestyle_trait_trigger = yes
		has_trait = education_stewardship
	}
}

#An opportunity to do something
seduce_ongoing.1701 = {
	type = character_event
	title = seduce_ongoing.1701.t
	desc = seduce_ongoing.1701.desc

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	theme = seduce_scheme
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		scope:target = {
			is_landed = yes
			OR = {
				seduce_ongoing_1701_strategy_trigger = yes
				seduce_ongoing_1701_trap_trigger = yes
				seduce_ongoing_1701_duel_trigger = yes
				seduce_ongoing_1701_tax_season_trigger = yes
			}
			exists = location.barony
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target.location.barony = {
			save_scope_as = court_of_residence
		}
	}

	option = { #Mock duel
		name = seduce_ongoing.1701.a
		custom_tooltip = seduce_ongoing.1701.a.tt
		trigger = {
			scope:owner = {
				can_be_warrior_trigger = { ARMY_OWNER = scope:owner }
			}
			scope:target = {
				can_be_warrior_trigger = { ARMY_OWNER = scope:target }
			}
		}
		save_scope_value_as = {
			name = joust_approach
			value = flag:duel
		}
		stress_impact = {
			lazy = medium_stress_impact_gain
			shy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 0.5
				ai_rationality = 0.25
			}
		}
	}

	option = { #Discuss strategy
		name = seduce_ongoing.1701.b
		custom_tooltip = seduce_ongoing.1701.b.tt
		save_scope_value_as = {
			name = joust_approach
			value = flag:strategy
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 0.5
				ai_boldness = 0.5
			}
		}
	}

	option = { #Tax season
		name = seduce_ongoing.1701.c
		custom_tooltip = seduce_ongoing.1701.c.tt
		save_scope_value_as = {
			name = joust_approach
			value = flag:tax_season
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = 0.5
			}
		}
	}

	option = { #Make fun of other guests
		name = seduce_ongoing.1701.d
		custom_tooltip = seduce_ongoing.1701.d.tt
		save_scope_value_as = {
			name = joust_approach
			value = flag:trap
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			gregarious = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_vengefulness = 0.25
			}
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		scope:target = {
			if = {
				limit = { # This first limit is here to prevent empty scope check errors when trying to generate tooltips
					exists = scope:joust_approach
				}
				hidden_effect = {
					if = {
						limit = {
							OR = {
								AND = {
									OR = {
										has_personality_malicious_trigger = yes
										ai_compassion < high_negative_compassion
										has_trait = sadistic
									}
									scope:joust_approach = flag:trap
								}
								AND = {
									OR = {
										has_personality_introverted_trigger = yes
										ai_rationality > medium_positive_rationality
										has_martial_lifestyle_trait_trigger = yes
									}
									scope:joust_approach = flag:strategy
								}
								AND = {
									OR = {
										has_personality_extroverted_trigger = yes
										ai_energy > medium_positive_energy
										has_trait = lifestyle_blademaster
									}
									scope:joust_approach = flag:duel
								}
								AND = {
									OR = {
										ai_greed > medium_positive_greed
										has_trait = greedy
										has_stewardship_lifestyle_trait_trigger = yes
										has_trait = education_stewardship
									}
									scope:joust_approach = flag:tax_season
								}
							}
						}
						save_scope_value_as = {
							name = made_great_choice
							value = yes
						}
					}

					if = {
						limit = {
							scope:joust_approach = flag:duel
						}
						random_list = {
							100 = { #Success
								trigger_event = {
									id = seduce_ongoing.1703
									days = { 2 5 }
								}
								scope:owner = {
									trigger_event = {
										id = seduce_ongoing.1705
										days = { 5 8 }
									}
								}
							}
							100 = { #Failure
								trigger = {
									NOT = { exists = scope:made_great_choice }
								}
								modifier = {
									add = 100
									has_trait = lazy
								}
								modifier = {
									add = 100
									has_trait = shy
								}
								trigger_event = {
									id = seduce_ongoing.1704
									days = { 2 5 }
								}
								scope:owner = {
									trigger_event = {
										id = seduce_ongoing.1706
										days = { 5 8 }
									}
								}
							}
						}
					}
					else_if = {
						limit = {
							scope:joust_approach = flag:strategy
						}
						random_list = {
							100 = { #Success
								modifier = {
									add = 100
									has_trait = shy
								}
								trigger_event = {
									id = seduce_ongoing.1703
									days = { 2 5 }
								}
								scope:owner = {
									trigger_event = {
										id = seduce_ongoing.1705
										days = { 5 8 }
									}
								}
							}
							100 = { #Failure
								trigger = {
									NOT = { exists = scope:made_great_choice }
								}
								modifier = {
									add = 100
									has_trait = lazy
								}
								trigger_event = {
									id = seduce_ongoing.1704
									days = { 2 5 }
								}
								scope:owner = {
									trigger_event = {
										id = seduce_ongoing.1706
										days = { 5 8 }
									}
								}
							}
						}
					}
					else_if = {
						limit = {
							scope:joust_approach = flag:tax_season
						}
						random_list = {
							100 = { #Success
								compare_modifier = {
									value = ai_greed
									multiplier = 0.5
								}
								trigger_event = {
									id = seduce_ongoing.1703
									days = { 2 5 }
								}
								scope:owner = {
									trigger_event = {
										id = seduce_ongoing.1705
										days = { 5 8 }
									}
								}
							}
							200 = { #Failure
								trigger = {
									NOT = { exists = scope:made_great_choice }
								}
								trigger_event = {
									id = seduce_ongoing.1704
									days = { 2 5 }
								}
								scope:owner = {
									trigger_event = {
										id = seduce_ongoing.1706
										days = { 5 8 }
									}
								}
							}
						}
					}
					else_if = {
						limit = {
							scope:joust_approach = flag:trap
						}
						random_list = {
							100 = { #Success
								modifier = {
									add = -40
									has_trait = gregarious
								}
								modifier = {
									add = -40
									has_trait = compassionate
								}
								trigger_event = {
									id = seduce_ongoing.1703
									days = { 2 5 }
								}
								scope:owner = {
									trigger_event = {
										id = seduce_ongoing.1705
										days = { 5 8 }
									}
								}
							}
							400 = { #Failure
								trigger = {
									NOT = { exists = scope:made_great_choice }
								}
								trigger_event = {
									id = seduce_ongoing.1704
									days = { 2 5 }
								}
								scope:owner = {
									trigger_event = {
										id = seduce_ongoing.1706
										days = { 5 8 }
									}
								}
							}
						}
					}
				}
			}
		}
		seduce_ongoing_possible_outcomes_tooltip_effect = { MILESTONE = 2 }
	}
}

#Target: Success
seduce_ongoing.1703 = {
	type = character_event
	title = seduce_ongoing.1701.t
	desc = {
		desc = seduce_ongoing.1703.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:duel
				}
				desc = seduce_ongoing.1703.duel
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:strategy
				}
				desc = seduce_ongoing.1703.strategy
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:tax_season
				}
				desc = seduce_ongoing.1703.tax_season
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:trap
				}
				desc = seduce_ongoing.1703.trap
			}
			desc = seduce_ongoing.1703.fallback
		}
	}

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = flirtation
	}
	theme = seduce_scheme

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.1703.a
		hidden_effect = { seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success } }
	}
}

#Target: Failure
seduce_ongoing.1704 = {
	type = character_event
	title = seduce_ongoing.1701.t
	desc = {
		desc = seduce_ongoing.1703.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:duel
				}
				desc = seduce_ongoing.1704.duel
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:strategy
				}
				desc = seduce_ongoing.1704.strategy
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:tax_season
				}
				desc = seduce_ongoing.1704.tax_season
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:trap
				}
				desc = seduce_ongoing.1704.trap
			}
			desc = seduce_ongoing.1704.fallback
		}
	}
	left_portrait = {
		character = root
		animation = eyeroll
	}
	right_portrait = {
		character = scope:owner
		animation = debating
	}
	theme = unfriendly

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.1704.a
		hidden_effect = { seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure } }
	}
}

#Owner: Success
seduce_ongoing.1705 = {
	type = character_event
	title = seduce_ongoing.1701.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:duel
				}
				desc = seduce_ongoing.1705.duel
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:strategy
				}
				desc = seduce_ongoing.1705.strategy
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:tax_season
				}
				desc = seduce_ongoing.1705.tax_season
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:trap
				}
				desc = seduce_ongoing.1705.trap
			}
			desc = seduce_ongoing.1705.fallback
		}
	}

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	theme = seduce_scheme
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.1705.a
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
	}
}

#Owner: Failure
seduce_ongoing.1706 = {
	type = character_event
	title = seduce_ongoing.1701.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:duel
				}
				desc = seduce_ongoing.1706.duel
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:strategy
				}
				desc = seduce_ongoing.1706.strategy
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:tax_season
				}
				desc = seduce_ongoing.1706.tax_season
			}
			triggered_desc = {
				trigger = {
					scope:joust_approach = flag:trap
				}
				desc = seduce_ongoing.1706.trap
			}
			desc = seduce_ongoing.1706.fallback
		}
	}

	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = eyeroll
	}
	theme = unfriendly
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.1706.a
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
		}
	}
}

###END JOUSTING DAY CHAIN

####
# Love Potion Chain
# 2001-2011
# by Petter Vilberg and Linnéa Thimrén
####

#Suggest a Love Potion
seduce_ongoing.2001 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2001.desc
	theme = seduce_scheme

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		seduction_target_is_close_trigger = yes
		scope:target = {
			has_opinion_modifier = {
				target = scope:owner
				modifier = romance_opinion
				value >= 20
			}
		}
		scope:scheme = {
			scheme_progress >= scheme_progress_50
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		random_dummy_gender_effect = yes
	}

	option = { #Let's have a little fun
		name = seduce_ongoing.2001.a
		show_as_tooltip = {
			duel = {
				skill = diplomacy
				value = 10
				15 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 1
						min = -14
					}
					scope:target = {
						add_opinion = {
							modifier = romance_opinion
							target = scope:owner
							opinion = 20
						}
					}
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
				}
				15 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -1
						min = -14
					}
					scope:target = {
						add_opinion = {
							modifier = respect_opinion
							target = scope:owner
							opinion = -10
						}
					}
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
				}
			}
		}
		hidden_effect = {
			random_list = {
				80 = {
					compare_modifier = {
						value = learning
					}
					duel = {
						skill = diplomacy
						value = 10
						20 = {
							compare_modifier = {
								value = scope:duel_value
								multiplier = 1
								min = -19
							}
							#Success
							scope:target = {
								trigger_event = {
									id = seduce_ongoing.2002
									days = { 3 5 }
								}
							}
						}
						10 = {
							compare_modifier = {
								value = scope:duel_value
								multiplier = -1
								min = -9
							}
							#Failure
							scope:target = {
								trigger_event = {
									id = seduce_ongoing.2004
									days = { 3 5 }
								}
							}
						}
					}
				}
				20 = {
					#Target becomes ill
					scope:target = {
						trigger_event = {
							id = seduce_ongoing.2006
							days = { 3 5 }
						}
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
				ai_zeal = -0.5
			}
			compare_modifier = {
				value = diplomacy
				multiplier = 10
			}
		}
	}

	option = { #Let's make fun of superstition
		name = seduce_ongoing.2001.b
		duel = {
			skill = learning
			value = 8
			20 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
					min = -19
				}
				#Success
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.2008
						days = { 3 5 }
					}
				}
				show_as_tooltip = {
					scope:target = {
						add_opinion = {
							modifier = romance_opinion
							target = scope:owner
							opinion = 20
						}
					}
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
				}
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1
					min = -9
				}
				#Failure
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.2010
						days = { 3 5 }
					}
				}
				show_as_tooltip = {
					scope:target = {
						add_opinion = {
							modifier = respect_opinion
							target = scope:owner
							opinion = -15
						}
					}
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
				}
			}
		}
		ai_chance = {
			base = 100
			compare_modifier = {
				value = learning
				multiplier = 10
			}
		}
	}

	option = { #I'll pass on this
		name = seduce_ongoing.2001.c
		custom_tooltip = seduce_ongoing.2001.c.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 20
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}


#Drinking the potion:
#Target: Success, it was fun and charming
seduce_ongoing.2002 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2002.desc

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = flirtation
	}
	theme = seduce_scheme

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		exists = scope:scheme
	}

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.2003
		}
	}

	option = {
		name = seduce_ongoing.2002.a
		reverse_add_opinion = {
			modifier = romance_opinion
			target = scope:owner
			opinion = 20
		}
		add_opinion = {
			modifier = romance_opinion
			target = scope:owner
			opinion = 20
		}
	}
}

#Schemer: Success! It was fun and charming
seduce_ongoing.2003 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2003.desc

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	theme = seduce_scheme
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.2003.a
		scope:target = {
			add_opinion = {
				modifier = romance_opinion
				target = scope:owner
				opinion = 20
			}
		}
		show_as_tooltip = {
			add_opinion = {
				modifier = romance_opinion
				target = scope:target
				opinion = 20
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

#Target: Failure, it was kind of weird
seduce_ongoing.2004 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2004.desc


	left_portrait = {
		character = root
		animation = disgust
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}
	theme = seduce_scheme

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.2005
		}
	}

	option = {
		name = seduce_ongoing.2004.a
		add_character_modifier = {
			modifier = seduce_rested_modifier
			years = 5
		}
		scope:target = {
			add_opinion = {
				modifier = respect_opinion
				target = scope:owner
				opinion = -10
			}
		}
	}
}

#Schemer: Failure, it got weird
seduce_ongoing.2005 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2005.desc

	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	theme = unfriendly
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.2005.a
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					modifier = respect_opinion
					target = scope:owner
					opinion = -10
				}
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

#Target: Failure, I fell ill!
seduce_ongoing.2006 = {
	type = character_event
	title = seduce_ongoing.2006.t
	desc = seduce_ongoing.2006.desc

	left_portrait = {
		character = root
		animation = sick
	}
	right_portrait = {
		character = scope:owner
		animation = crying
	}
	theme = physical_health

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.2007
		}
		contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes }
		add_opinion = {
			modifier = respect_opinion
			target = scope:owner
			opinion = -10
		}
		add_opinion = {
			modifier = romance_opinion
			target = scope:owner
			opinion = -10
		}
	}

	option = {
		name = seduce_ongoing.2006.a
		custom_tooltip = seduce_ongoing.2006.a.tt
	}
}

#Schemer: Failure, they fell ill!
seduce_ongoing.2007 = {
	type = character_event
	title = seduce_ongoing.2006.t
	desc = seduce_ongoing.2007.desc

	left_portrait = {
		character = root
		animation = crying
	}
	right_portrait = {
		character = scope:target
		animation = sick
	}
	theme = physical_health

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.2007.a
		show_as_tooltip = {
			scope:target = {
				contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes }
				add_opinion = {
					modifier = respect_opinion
					target = scope:owner
					opinion = -10
				}
				add_opinion = {
					modifier = romance_opinion
					target = scope:owner
					opinion = -10
				}
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

#Making fun of superstition:
#Target: Success, it was a good time
seduce_ongoing.2008 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2008.desc

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = happiness
	}
	theme = seduce_scheme

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.2009
		}
	}

	option = {
		name = seduce_ongoing.2008.a
		reverse_add_opinion = {
			modifier = romance_opinion
			target = scope:owner
			opinion = 15
		}
		add_opinion = {
			modifier = romance_opinion
			target = scope:owner
			opinion = 15
		}
	}
}

#Schemer: Success, it was a good time
seduce_ongoing.2009 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2009.desc

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = happiness
	}
	theme = seduce_scheme
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.2009.a
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					modifier = romance_opinion
					target = scope:owner
					opinion = 15
				}
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

#Target: Failure, it was kind of offensive
seduce_ongoing.2010 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2010.desc

	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:owner
		animation = sadness
	}
	theme = unfriendly

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.2011
		}
	}

	option = {
		name = seduce_ongoing.2010.a
		add_prestige = medium_prestige_gain
		add_opinion = {
			modifier = respect_opinion
			target = scope:owner
			opinion = -15
		}
	}
}

#Schemer: Failure, I upset them
seduce_ongoing.2011 = {
	type = character_event
	title = seduce_ongoing.2001.t
	desc = seduce_ongoing.2011.desc

	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	theme = unfriendly

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.2011.a
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					modifier = respect_opinion
					target = scope:owner
					opinion = -15
				}
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

###END LOVE POTION CHAIN


####
# A Walk in Town
# 4011 - 4018
# by Petter Vilberg and Linnéa Thimrén
####

seduce_ongoing.4011 = {
	type = character_event
	title = seduce_ongoing.4011.t
	desc = seduce_ongoing.4011.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		scope:scheme = {
			scheme_progress > scheme_progress_33
		}
		is_landed = yes
		scope:target = {
			NOT = { is_consort_of = scope:owner }
			exists = court_owner
			exists = court_owner.capital_province
		}
	}

	weight_multiplier = {
		base = 0.75
		#More likely if you're close to each other
		modifier = {
			add = 0.25
			seduction_target_is_close_trigger = yes
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target.court_owner = {
			capital_province = {
				barony = {
					save_scope_as = court_location
				}
			}
		}
	}

	option = { #Direct approach
		name = seduce_ongoing.4011.a
		random_list = {
			50 = {
				#Success!
				compare_modifier = {
					value = stewardship
					multiplier = 2
				}
				show_as_tooltip = {
					scope:target = {
						add_opinion = {
							target = scope:owner
							modifier = romance_opinion
							opinion = 25
						}
					}
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4012
						days = { 20 30 }
					}
				}
			}
			50 = {
				#Things go bad
				modifier = {
					add = 25
					scope:target = { is_married = yes }
					NOT = { scope:owner = { is_consort_of = scope:target } }
				}
				modifier = { #Increase chance of failure if target loves their spouse
					add = 25
					scope:target = {
						is_married = yes
						any_spouse = {
							reverse_has_opinion_modifier = {
								target = scope:target
								modifier = love_opinion
							}
						}
					}
					NOT = { scope:owner = { is_consort_of = scope:target } }
				}
				show_as_tooltip = {
					scope:target = {
						add_opinion = {
							target = scope:owner
							modifier = respect_opinion
							opinion = -15
						}
					}
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4013
						days = { 20 30 }
					}
				}
			}
		}
		stress_impact = {
			shy = medium_stress_impact_gain
			craven = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
				ai_honor = 0.25
			}
		}
	}

	option = { #Subtle approach
		name = seduce_ongoing.4011.b
		random_list = {
			50 = { #Success
				compare_modifier = {
					value = intrigue
					multiplier = 1
				}
				compare_modifier = {
					value = diplomacy
					multiplier = 1
				}
				show_as_tooltip = {
					scope:target = {
						add_opinion = {
							target = scope:owner
							modifier = romance_opinion
							opinion = 15
						}
					}
					seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4016
						days = { 20 30 }
					}
				}
			}
			50 = { #Failure
				custom_tooltip = seduce_ongoing.4011.b.failure
				seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
				scope:owner = {
					trigger_event = {
						id = seduce_ongoing.4017
						days = { 20 30 }
					}
				}
			}
		}
		stress_impact = {
			impatient = medium_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				add = 100
				has_trait = shy
			}
		}
	}

	option = { #Don't do it
		name = seduce_ongoing.4011.c
		custom_tooltip = seduce_ongoing.4011.c.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		stress_impact = {
			impatient = major_stress_impact_gain
		}
		ai_chance = {
			base = 20
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}


#Target: A fun day
seduce_ongoing.4012 = {
	type = character_event
	title = seduce_ongoing.4011.t
	desc = {
		desc = seduce_ongoing.4012.opening
		desc = seduce_ongoing.4012.end
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = flirtation
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.4014
		}
	}

	option = {
		name = seduce_ongoing.4012.a
		reverse_add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 25
		}
		add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 25
		}
	}
}


#Target: An embarrassing walk
seduce_ongoing.4013 = {
	type = character_event
	title = seduce_ongoing.4011.t
	desc = {
		desc = seduce_ongoing.4012.opening
		desc = seduce_ongoing.4013.end
	}

	theme = unfriendly
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:owner
		animation = disapproval
	}

	trigger = {
		exists = scope:scheme
		scope:owner = {
			is_alive = yes
		}
	}

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.4015
		}
	}

	option = {
		name = seduce_ongoing.4013.a
		add_prestige = medium_prestige_gain
		add_opinion = {
			target = scope:owner
			modifier = respect_opinion
			opinion = -15
		}
	}
}


#Schemer: Target had a great day
seduce_ongoing.4014 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.4014.desc
	sender = scope:target
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.4014.a
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 25
				}
				reverse_add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 25
				}
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}


#Schemer: Target had a terrible day
seduce_ongoing.4015 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.4015.desc
	sender = scope:target
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:target = {
			random_spouse = {
				weight = {
					base = 101
					opinion_modifier = {
						who = scope:target
						opinion_target = this
					}
				}
				save_scope_as = spouse
			}
		}
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = respect_opinion
					opinion = -15
				}
			}
		}
	}

	option = {
		name = seduce_ongoing.4015.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}


#Target: A fun day
seduce_ongoing.4016 = {
	type = character_event
	title = seduce_ongoing.4011.t
	desc = {
		desc = seduce_ongoing.4012.opening
		desc = seduce_ongoing.4016.end
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = flirtation
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:owner = {
			trigger_event = seduce_ongoing.4018
		}
	}

	option = {
		name = seduce_ongoing.4016.a
		reverse_add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 15
		}
		add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 15
		}
	}
}


#Schemer: Target did not see the point
seduce_ongoing.4017 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.4017.desc
	sender = scope:target
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.4017.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

#Schemer: Target had a great day
seduce_ongoing.4018 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.4018.desc
	sender = scope:target
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.4018.a
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 15
				}
			}
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 15
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

###END WALK IN TOWN CHAIN



###########################
# Below their balcony
# 4101 - 4111
# by Linnéa Thimrén
####

#What do you do?
seduce_ongoing.4101 = {
	type = character_event
	title = seduce_ongoing.4101.t
	desc = {
		desc = seduce_ongoing.4101.desc_opening
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:target.court_owner
					scope:target.court_owner = {
						this = scope:owner
					}
				}
				desc = seduce_ongoing.4101.desc_same_court
			}
			desc = seduce_ongoing.4101.desc_other_court
		}
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = admiration
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		NOT = { is_consort_of = scope:target }
		exists = scope:target.location.barony
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target.location.barony = { save_scope_as = court_location }
		set_object_of_significance_effect = yes
	}

	option = { #Try to get their attention
		name = seduce_ongoing.4101.a
		custom_tooltip = seduce_ongoing.4101.a.tt
		custom_tooltip = seduce_ongoing.5101.success_tt
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
		save_scope_value_as = {
			name = balcony_approach
			value = flag:yell
		}
		ai_chance = {
			base = 100
			modifier = {
				add = 50
				has_trait = gregarious
			}
			ai_value_modifier = {
				ai_rationality = 0.5
			}
		}
	}

	option = { #Climb up!
		name = seduce_ongoing.4101.b
		trigger = {
			is_healthy = yes
		}
		custom_tooltip = seduce_ongoing.4101.b.tt
		custom_tooltip = seduce_ongoing.5101.success_tt
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 30
				}
			}
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
		save_scope_value_as = {
			name = balcony_approach
			value = flag:climb
		}
		ai_chance = {
			base = 100
			modifier = {
				add = 50
				has_trait = impatient
			}
			ai_value_modifier = {
				ai_boldness = 0.5
			}
		}
	}

	option = { #leave a gift
		name = seduce_ongoing.4101.c
		custom_tooltip = seduce_ongoing.4101.c.tt
		custom_tooltip = seduce_ongoing.5101.success_tt
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
		save_scope_value_as = {
			name = balcony_approach
			value = flag:gift
		}
		ai_chance = {
			base = 100
			modifier = {
				add = 50
				OR = {
					has_trait = shy
					has_trait = craven
				}
			}
			ai_value_modifier = {
				ai_rationality = 0.5
			}
		}
	}

	option = { #I should keep my feelings to myself for now
		name = seduce_ongoing.4101.d
		custom_tooltip = seduce_ongoing.4101.d.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 30
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		if = {
			limit = {
				exists = scope:balcony_approach
			}
			if = {
				limit = {
					scope:balcony_approach = flag:yell
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4102
						days = { 10 20 }
					}
				}
			}
			else_if = {
				limit = {
					scope:balcony_approach = flag:climb
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4105
						days = { 10 20 }
					}
				}
			}
			else_if = {
				limit = {
					scope:balcony_approach = flag:gift
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.4108
						days = { 10 20 }
					}
				}
			}
		}
	}
}


#Target: someone is yelling outside my balcony
seduce_ongoing.4102 = {
	type = character_event
	title = seduce_ongoing.4102.t
	desc = seduce_ongoing.4102.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = eavesdrop
	}
	right_portrait = {
		character = scope:owner
		animation = personality_forgiving
	}

	trigger = {
		exists = scope:scheme
	}

	option = { #I'm into it
		name = seduce_ongoing.4102.a
		scope:owner = {
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 15
			}
			trigger_event = seduce_ongoing.4103
		}
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			compare_modifier = {
				target = scope:owner
				value = diplomacy
				multiplier = 5
			}
			modifier = {
				add = 50
				OR = {
					has_opinion_modifier = {
						target = scope:owner
						modifier = romance_opinion
					}
					has_opinion_modifier = {
						target = scope:owner
						modifier = love_opinion
					}
				}
			}
			modifier = {
				add = 50
				has_personality_extroverted_trigger = yes
			}
			ai_value_modifier = {
				ai_boldness = 0.5
			}
		}
	}

	option = { #I don't want this
		name = seduce_ongoing.4102.b

		scope:owner = {
			trigger_event = seduce_ongoing.4104
		}

		add_prestige = medium_prestige_gain

		ai_chance = {
			base = 200
			modifier = {
				add = 200
				is_married = yes
			}
			modifier = {
				add = 50
				has_personality_introverted_trigger = yes
			}
		}
	}
}

#Schemer: Target is flattered
seduce_ongoing.4103 = {
	type = character_event
	title = seduce_ongoing.4101.t
	desc = seduce_ongoing.4103.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.4103.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		scope:target = {
			add_opinion = {
				target = root
				modifier = romance_opinion
				opinion = 15
			}
		}
	}
}

#Schemer: target just wants you to shut up
seduce_ongoing.4104 = {
	type = character_event
	title = seduce_ongoing.4101.t
	desc = seduce_ongoing.4104.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = shame
	}
	right_portrait = {
		character = scope:target
		animation = anger
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:target = {
			if = {
				limit = { root = { is_ai = no }	}
				assign_quirk_effect = yes
			}
		}
	}

	option = {
		name = seduce_ongoing.4104.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}


#Target: owner comes climbing up
seduce_ongoing.4105 = {
	type = character_event
	title = seduce_ongoing.4102.t
	desc = seduce_ongoing.4105.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:owner
		animation = love
	}

	trigger = {
		exists = scope:scheme
	}

	option = { #I am charmed
		name = seduce_ongoing.4105.a
		scope:owner = {
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 25
			}
			trigger_event = seduce_ongoing.4106
		}
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			compare_modifier = {
				target = scope:owner
				value = diplomacy
				multiplier = 5
			}
			modifier = {
				add = 50
				OR = {
					has_opinion_modifier = {
						target = scope:owner
						modifier = romance_opinion
					}
					has_opinion_modifier = {
						target = scope:owner
						modifier = love_opinion
					}
				}
			}
			modifier = {
				add = 20
				has_personality_dominant_trigger = yes
			}
		}
	}

	option = { #I don't want this
		name = seduce_ongoing.4105.b

		add_character_modifier = {
			modifier = seduce_rested_modifier
			years = 5
		}

		scope:owner = {
			trigger_event = seduce_ongoing.4107
		}

		ai_chance = {
			base = 200
			ai_value_modifier = {
				ai_rationality = 0.5
			}
		}
	}

	option = { #Intruder! Thief!!
		name = seduce_ongoing.4105.c
		trigger = {
			has_trait = paranoid
		}
		trait = paranoid

		add_character_modifier = {
			modifier = seduce_obviously_courted_modifier
			years = 5
		}

		scope:owner = {
			trigger_event = seduce_ongoing.4107
		}

		ai_chance = {
			base = 400
		}
	}
}

#Schemer: Target is flattered
seduce_ongoing.4106 = {
	type = character_event
	title = seduce_ongoing.4101.t
	desc = seduce_ongoing.4106.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.4106.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		scope:target = {
			add_opinion = {
				target = root
				modifier = romance_opinion
				opinion = 25
			}
		}
	}
}

#Schemer: Target is uninterested
seduce_ongoing.4107 = {
	type = character_event
	title = seduce_ongoing.4101.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:target = { has_trait = paranoid }
				}
				desc = seduce_ongoing.4107.desc_paranoid
			}
			desc = seduce_ongoing.4107.desc
		}
	}

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		triggered_animation = {
			trigger = { scope:target = { has_trait = paranoid } }
			animation = fear
		}
		triggered_animation = {
			trigger = { scope:target = { NOT = { has_trait = paranoid } } }
			animation = anger
		}
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.4107.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
		if = {
			limit = {
				scope:target = { has_trait = paranoid }
			}
			custom_tooltip = seduce_ongoing.4107.a.tt
		}
	}
}

#Target: a gift was left for me outside
seduce_ongoing.4108 = {
	type = character_event
	title = seduce_ongoing.4102.t
	desc = seduce_ongoing.4108.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = boredom
	}
	right_portrait = {
		character = scope:owner
		animation = flirtation
	}

	trigger = {
		exists = scope:scheme
		scope:target = { is_alive = yes }
	}

	option = { #I am charmed
		name = seduce_ongoing.4108.a
		scope:owner = {
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 15
			}
			trigger_event = seduce_ongoing.4109
		}
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			compare_modifier = {
				target = scope:owner
				value = diplomacy
				multiplier = 5
			}
			modifier = {
				add = 50
				OR = {
					has_opinion_modifier = {
						target = scope:owner
						modifier = romance_opinion
					}
					has_opinion_modifier = {
						target = scope:owner
						modifier = love_opinion
					}
				}
			}
			modifier = {
				add = 50
				has_trait = shy
			}
		}
	}

	option = { #I don't want this
		name = seduce_ongoing.4108.b
		add_gold = minor_gold_value
		scope:owner = {
			trigger_event = seduce_ongoing.4110
		}

		ai_chance = {
			base = 200
			ai_value_modifier = {
				ai_boldness = 0.5
			}
			modifier = {
				add = 100
				has_personality_dominant_trigger = yes
			}
		}
	}
}

#Schemer: Target is flattered
seduce_ongoing.4109 = {
	type = character_event
	title = seduce_ongoing.4101.t
	desc = seduce_ongoing.4109.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.4109.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		scope:target = {
			add_opinion = {
				target = root
				modifier = romance_opinion
				opinion = 15
			}
		}
	}
}

#Schemer: Target is uninterested
seduce_ongoing.4110 = {
	type = character_event
	title = seduce_ongoing.4101.t
	desc = seduce_ongoing.4110.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.4110.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

###END BALCONY CHAIN




##################
# Seducing a rival Chain
# 5001 - 5006
# by Linnéa Thimrén
##################

#To check that the target will enjoy at least one of the options

scripted_trigger seduce_ongoing_5001_conversation_trigger = {
	OR = {
		has_personality_extroverted_trigger = yes
		ai_rationality > medium_positive_boldness
		has_trait = gregarious
	}
	NOT = { has_trait = shy }
}

scripted_trigger seduce_ongoing_5001_mockery_trigger = {
	OR = {
		has_personality_malicious_trigger = yes
		ai_compassion < high_negative_compassion
	}
	NOR = {
		has_trait = gregarious
		has_trait = compassionate
	}
}


scripted_trigger seduce_ongoing_5001_bodily_trigger = {
	OR = {
		has_personality_extroverted_trigger = yes
		ai_energy > medium_positive_energy
		has_trait = lustful
	}
	NOT = { has_trait = shy }
}


# Approach rival
seduce_ongoing.5001 = {
	type = character_event
	title = {
		first_valid = {
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:target
				}
				desc = seduce_ongoing.5001.t_rival
			}
			desc = seduce_ongoing.5001.t
		}
	}
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					tier_difference = {
						target = scope:target
						value >= 0
					}
				}
				desc = seduce_ongoing.5001.desc_tier_up
			}
			desc = seduce_ongoing.5001.desc_tier_down
		}
		desc = seduce_ongoing.5001.desc_ending
	}

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		triggered_animation = {
			trigger = {
				tier_difference = {
					target = scope:target
					value < 0
				}
			}
			animation = stress
		}
		triggered_animation = {
			trigger = {
				tier_difference = {
					target = scope:target
					value >= 0
				}
			}
			animation = happiness
		}
	}
	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		exists = scope:target.court_owner
		OR = {
			has_relation_rival = scope:target
			reverse_opinion = {
				target = scope:target
				value < 0
			}
		}
		scope:target = {
			OR = {
				seduce_ongoing_5001_conversation_trigger = yes
				seduce_ongoing_5001_mockery_trigger = yes
				seduce_ongoing_5001_bodily_trigger = yes
			}
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		set_object_of_significance_effect = yes
		scope:target = {
			if = {
				limit = { root = { is_ai = no }	}
				assign_quirk_effect = yes
			}
		}
		if = {
			limit = {
				scope:target = {
					court_owner != scope:owner
					court_owner = {
						any_courtier = {
							is_available_ai_adult = yes
							reverse_opinion = {
								target = scope:target
								value <= 10
							}
							OR = {
								is_of_major_interest_to_root_trigger = yes
								is_of_minor_interest_to_root_trigger = yes
								has_any_good_relationship_with_root_trigger = yes
							}
						}
					}
				}
			}
			scope:target = {
				court_owner = {
					random_courtier = {
						limit = {
							is_available_ai_adult = yes
							reverse_opinion = {
								target = scope:target
								value <= 10
							}
							is_of_major_interest_to_root_trigger = yes
						}
						alternative_limit = {
							is_available_ai_adult = yes
							reverse_opinion = {
								target = scope:target
								value <= 10
							}
							is_of_minor_interest_to_root_trigger = yes
						}
						alternative_limit = {
							is_available_ai_adult = yes
							reverse_opinion = {
								target = scope:target
								value <= 10
							}
							has_any_good_relationship_with_root_trigger = yes
						}
						alternative_limit = {
							is_available_ai_adult = yes
							reverse_opinion = {
								target = scope:target
								value <= 10
							}
						}
						save_scope_as = mocked_courtier
					}
				}
			}
		}
		else_if = {
			limit = {
				any_courtier = {
					is_available_ai_adult = yes
					reverse_opinion = {
								target = scope:target
								value <= 10
							}
					OR = {
						is_of_major_interest_to_root_trigger = yes
						is_of_minor_interest_to_root_trigger = yes
						has_any_good_relationship_with_root_trigger = yes
					}
				}
			}
			random_courtier = {
				limit = {
					is_available_ai_adult = yes
					reverse_opinion = {
						target = scope:target
						value <= 10
					}
				}
				weight = {
					base = 1
					modifier = {
						add = 0.7
						is_of_major_interest_to_root_trigger = yes
					}
					modifier = {
						add = 0.5
						is_of_minor_interest_to_root_trigger = yes
					}
					modifier = {
						add = 0.5
						has_any_good_relationship_with_root_trigger = yes
					}
				}
				save_scope_as = mocked_courtier
			}
		}
		if = {
			limit = {
				exists = scope:mocked_courtier
			}
			scope:mocked_courtier = {
				if = {
					limit = { root = { is_ai = no }	}
					assign_quirk_effect = yes
				}
			}
		}

		save_scope_value_as = { #Here to prevent errors in After - Should not result in any further effects
			name = rival_approach
			value = flag:none
		}
	}

	option = { #Entice them with interesting conversations
		name = seduce_ongoing.5001.a
		custom_tooltip = seduce_ongoing.5001.a.tt
		save_scope_value_as = {
			name = rival_approach
			value = flag:conversation
		}
	}

	option = { #Find other target
		name = seduce_ongoing.5001.b
		trigger = { exists = scope:mocked_courtier }
		custom_tooltip = seduce_ongoing.5001.b.tt
		save_scope_value_as = {
			name = rival_approach
			value = flag:mockery
		}
	}

	option = { #Tempt them bodily
		name = {
			trigger = {
				tier_difference = {
					target = scope:target
					value >= 0
				}
			}
			text = seduce_ongoing.5001.c_tier_up
		}
		name = {
			trigger = { always = yes }
			text = seduce_ongoing.5001.c_tier_down
		}
		custom_tooltip = seduce_ongoing.5001.c.tt
		save_scope_value_as = {
			name = rival_approach
			value = flag:bodily
		}
	}

	option = { #Back out
		name = seduce_ongoing.5001.d
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		#Evaluate what makes for a "right" choice
		hidden_effect = {
			scope:target = {
				if = {
					limit = {
						OR = {
							AND = {
								OR = {
									has_personality_extroverted_trigger = yes
									ai_rationality > medium_positive_boldness
									has_trait = gregarious
								}
								scope:rival_approach = flag:conversation
							}
							AND = {
								OR = {
									has_personality_malicious_trigger = yes
									ai_compassion < high_negative_compassion
								}
								scope:rival_approach = flag:mockery
							}
							AND = {
								OR = {
									has_personality_extroverted_trigger = yes
									ai_energy > medium_positive_energy
									has_trait = lustful
								}
								scope:rival_approach = flag:bodily
							}
						}
					}
					save_scope_value_as = {
						name = made_great_choice
						value = yes
					}
				}

				if = {
					limit = {
						scope:rival_approach = flag:conversation
					}
					random_list = {
						100 = { #Success
							trigger_event = {
								id = seduce_ongoing.5003
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.5005
									days = { 5 8 }
								}
							}
						}
						100 = { #Failure
							trigger = {
								NOT = { exists = scope:made_great_choice }
							}
							modifier = {
								add = 100
								has_trait = shy
							}
							trigger_event = {
								id = seduce_ongoing.5004
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.5006
									days = { 5 8 }
								}
							}
						}
					}
				}
				else_if = {
					limit = {
						scope:rival_approach = flag:mockery
					}
					random_list = {
						100 = { #Success
							modifier = {
								add = -40
								has_trait = gregarious
							}
							modifier = {
								add = -40
								has_trait = compassionate
							}
							trigger_event = {
								id = seduce_ongoing.5003
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.5005
									days = { 5 8 }
								}
							}
						}
						200 = { #Failure
							trigger = {
								NOT = { exists = scope:made_great_choice }
							}
							trigger_event = {
								id = seduce_ongoing.5004
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.5006
									days = { 5 8 }
								}
							}
						}
					}
				}
				else_if = {
					limit = {
						scope:rival_approach = flag:bodily
					}
					random_list = {
						70 = { #Success
							modifier = {
								add = 30
								scope:owner = { has_trait = seducer }
							}
							trigger_event = {
								id = seduce_ongoing.5003
								days = { 2 5 }
							}
							scope:owner = {
								hidden_effect = {
									if = {
										limit = {
											can_set_relation_potential_lover_trigger = { CHARACTER = scope:target }
										}
										set_relation_potential_lover = scope:target
									}
								}
								trigger_event = {
									id = seduce_ongoing.5005
									days = { 5 8 }
								}
							}
						}
						100 = { #Failure
							trigger = {
								NOT = { exists = scope:made_great_choice }
							}
							modifier = {
								add = 40
								has_trait = shy
							}
							trigger_event = {
								id = seduce_ongoing.5004
								days = { 2 5 }
							}
							scope:owner = {
								trigger_event = {
									id = seduce_ongoing.5006
									days = { 5 8 }
								}
							}
						}
					}
				}
			}
		}
	}
}


#Target: Success
seduce_ongoing.5003 = {
	type = character_event
	title = seduce_ongoing.5003.t
	desc = {
		desc = seduce_ongoing.5003.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:conversation
				}
				desc = seduce_ongoing.5003.conversation
			}
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:mockery
				}
				desc = seduce_ongoing.5003.mockery
			}
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:bodily
				}
				desc = seduce_ongoing.5003.bodily
			}
			desc = seduce_ongoing.5003.fallback
		}
	}

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = admiration
	}
	theme = seduce_scheme
	override_background = {
		reference = garden
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5003.a
		add_character_modifier = {
			modifier = seduce_obviously_courted_modifier
			years = 5
		}
	}
}

#Target: Failure
seduce_ongoing.5004 = {
	type = character_event
	title = seduce_ongoing.5003.t
	desc = {
		desc = seduce_ongoing.5004.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:conversation
				}
				desc = seduce_ongoing.5004.conversation
			}
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:mockery
				}
				desc = seduce_ongoing.5004.mockery
			}
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:bodily
				}
				desc = seduce_ongoing.5004.bodily
			}
			desc = seduce_ongoing.5004.fallback
		}
	}

	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:owner
		animation = disgust
	}
	theme = unfriendly
	override_background = {
		reference = garden
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5004.a
		add_character_modifier = {
			modifier = seduce_obviously_courted_modifier
			years = 5
		}
	}
}

#Owner: Success
seduce_ongoing.5005 = {
	type = character_event
	title = seduce_ongoing.5001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:conversation
				}
				desc = seduce_ongoing.5005.conversation
			}
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:mockery
				}
				desc = seduce_ongoing.5005.mockery
			}
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:bodily
				}
				desc = seduce_ongoing.5005.bodily
			}
			desc = seduce_ongoing.5005.fallback
		}
		desc = seduce_ongoing.5005.ending
	}

	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = admiration
	}
	theme = seduce_scheme
	override_background = {
		reference = garden
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5005.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}


#Owner: Failure
seduce_ongoing.5006 = {
	type = character_event
	title = seduce_ongoing.5001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:conversation
				}
				desc = seduce_ongoing.5006.conversation
			}
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:mockery
				}
				desc = seduce_ongoing.5006.mockery
			}
			triggered_desc = {
				trigger = {
					scope:rival_approach = flag:bodily
				}
				desc = seduce_ongoing.5006.bodily
			}
			desc = seduce_ongoing.5006.fallback
		}
	}

	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:target
		triggered_animation = {
			trigger = { scope:rival_approach = flag:conversation }
			animation = boredom
		}
		triggered_animation = {
			trigger = { scope:rival_approach = flag:mockery }
			animation = disapproval
		}
		triggered_animation = {
			trigger = { scope:rival_approach = flag:bodily }
			animation = disgust
		}
	}
	theme = unfriendly
	override_background = {
		reference = garden
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		get_quirk_character_effect = yes
	}

	option = {
		name = seduce_ongoing.5006.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

###END SEDUCING RIVAL CHAIN




###
# Both wrathful
# 5011 - 5020
# by Linnéa Thimrén
###
seduce_ongoing.5011 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5011.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = schadenfreude
	}
	right_portrait = {
		character = scope:target
		animation = rage
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		is_healthy = yes
		has_trait = wrathful
		scope:target = {
			has_trait = wrathful
			is_healthy = yes
		}
	}

	weight_multiplier = {
		base = 0.2
		modifier = {
			add = 2
			has_relation_rival = scope:target
		}
		modifier = {
			add = 0.5
			has_relation_potential_rival = scope:target
		}
		modifier = {
			add = 1
			scope:target = {
				OR = {
					has_trait = physique_good_2
					has_trait = physique_good_3
				}
			}
			OR = {
				has_trait = physique_good_2
				has_trait = physique_good_3
			}
		}
		modifier = {
			add = 5
			scope:scheme = {
				scheme_progress > scheme_progress_66
			}
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target = {
			if = {
				limit = {
					root = { is_ai = no }
				}
				assign_quirk_effect = yes
			}
		}
	}

	option = { #Keep fighting!
		name = seduce_ongoing.5011.a
		show_as_tooltip = {
			custom_tooltip = seduce_ongoing.5101.success_tt
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 25
				}
			}
		}
		random = {
			chance = 10
			increase_wounds_effect = { REASON = fight }
		}
		save_scope_value_as = {
			name = rival_fight_approach
			value = flag:fight
		}
		stress_impact = {
			craven = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 50
				has_trait = brave
			}
		}
	}

	option = { #Ask if they need any help
		name = seduce_ongoing.5011.b
		add_prestige = minor_prestige_loss
		custom_tooltip = seduce_ongoing.5101.success_tt
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 15
				}
			}
		}
		save_scope_value_as = {
			name = rival_fight_approach
			value = flag:help
		}
		stress_impact = {
			callous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 100
				has_trait = compassionate
			}
		}
	}

	option = { #Allow them to win
		name = seduce_ongoing.5011.c
		trigger = {
			scope:target = { has_trait = sadistic }
		}
		custom_tooltip = seduce_ongoing.5011.c.tt
		add_prestige = minor_prestige_loss
		custom_tooltip = seduce_ongoing.5101.success_tt
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 30
				}
			}
		}
		save_scope_value_as = {
			name = rival_fight_approach
			value = flag:submit
		}
		stress_impact = {
			arrogant = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 100
				has_personality_submissive_trigger = yes
			}
		}
	}

	option = { #Let up
		name = seduce_ongoing.5011.d
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 0
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		if = {
			limit = {
				exists = scope:rival_fight_approach
			}
			if = {
				limit = {
					scope:rival_fight_approach = flag:fight
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.5012
						days = { 10 20 }
					}
				}
			}
			else_if = {
				limit = {
					scope:rival_fight_approach = flag:help
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.5015
						days = { 10 20 }
					}
				}
			}
			else_if = {
				limit = {
					scope:rival_fight_approach = flag:submit
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.5018
						days = { 10 20 }
					}
				}
			}
		}
	}
}


#Target: Owner wants to keep fighting
seduce_ongoing.5012 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5012.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = schadenfreude
	}
	right_portrait = {
		character = scope:owner
		animation = rage
	}

	trigger = {
		exists = scope:scheme
	}

	option = { #Let's go!
		name = seduce_ongoing.5012.a
		reverse_add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 25
		}
		scope:owner = {
			trigger_event = seduce_ongoing.5013
		}
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			modifier = {
				add = 50
				OR = {
					has_opinion_modifier = {
						target = scope:owner
						modifier = romance_opinion
					}
					has_opinion_modifier = {
						target = scope:owner
						modifier = love_opinion
					}
				}
			}
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_vengefulness = 0.5
			}
		}
	}

	option = { #I don't want this
		name = seduce_ongoing.5012.b

		add_prestige = minor_prestige_gain

		scope:owner = {
			trigger_event = seduce_ongoing.5014
		}

		ai_chance = {
			base = 200
			modifier = {
				add = 200
				is_married = yes
			}
		}
	}
}

#Owner: Target was ready to throw down
seduce_ongoing.5013 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5013.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5013.a
		show_as_tooltip = {
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 25
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

#Owner: Target thinks owner needs to chill
seduce_ongoing.5014 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5014.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:target
		animation = anger
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5014.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}


#Target: Owner wants to help you
seduce_ongoing.5015 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5015.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = personality_compassionate
	}

	trigger = {
		exists = scope:scheme
	}

	option = { #Sure
		name = seduce_ongoing.5015.a
		reverse_add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 15
		}
		scope:owner = {
			trigger_event = seduce_ongoing.5016
		}
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			compare_modifier = {
				target = scope:owner
				value = diplomacy
				multiplier = 5
			}
			modifier = {
				add = 50
				OR = {
					has_opinion_modifier = {
						target = scope:owner
						modifier = romance_opinion
					}
					has_opinion_modifier = {
						target = scope:owner
						modifier = love_opinion
					}
				}
			}
			ai_value_modifier = {
				ai_compassion = 0.5
			}
		}
	}

	option = { #I don't want this
		name = seduce_ongoing.5015.b

		add_character_modifier = {
			modifier = seduce_figting_modifier
			years = 5
		}

		scope:owner = {
			trigger_event = seduce_ongoing.5017
		}

		ai_chance = {
			base = 200
			modifier = {
				add = 100
				is_married = yes
			}
			modifier = {
				add = 50
				has_personality_dominant_trigger = yes
			}
		}
	}
}

#Schemer: Target is flattered
seduce_ongoing.5016 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5016.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = personality_compassionate
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5013.a
		show_as_tooltip = {
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 15
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

#Schemer: Target is insulted
seduce_ongoing.5017 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5017.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:target
		animation = anger
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5014.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}


#Target: Owner submitted
seduce_ongoing.5018 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5018.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = anger
	}

	trigger = {
		exists = scope:scheme
	}

	option = { #Let's go!
		name = seduce_ongoing.5018.a
		trait = sadistic
		reverse_add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 30
		}
		scope:owner = {
			trigger_event = seduce_ongoing.5019
		}
	}

	option = { #I don't want this
		name = seduce_ongoing.5018.b

		add_prestige = medium_prestige_gain

		scope:owner = {
			trigger_event = seduce_ongoing.5020
		}
	}
}

#Owner: Target appreciated the gesture
seduce_ongoing.5019 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5019.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = schadenfreude
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5019.a
		show_as_tooltip = {
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 30
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

#Owner: Target thinks owner needs to chill
seduce_ongoing.5020 = {
	type = character_event
	title = seduce_ongoing.5011.t
	desc = seduce_ongoing.5020.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5020.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

###END FIGHT-SEDUCING RIVAL CHAIN




##################
# Seducing a vassal
# 5101 - 5104
# by Petter Vilberg and Linnéa Thimrén
##################

#How do I approach them?
seduce_ongoing.5101 = {
	type = character_event
	title = seduce_ongoing.5101.t
	desc = seduce_ongoing.5101.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		scope:scheme = {
			scheme_progress >= scheme_progress_33
		}
		scope:target = {
			is_vassal_of = scope:owner
			is_landed = yes
			NOT = { is_consort_of = scope:owner }
			NOT = { is_close_or_extended_family_of = scope:owner }
		}
	}

	immediate = { set_variable = scheme_event_active_flag }

	option = { #We are as equals
		name = seduce_ongoing.5101.a
		show_as_tooltip = {
			custom_tooltip = seduce_ongoing.5101.a.tt
			custom_tooltip = seduce_ongoing.5101.success_tt
			scope:target = {
				if = {
					limit = {
						can_add_hook = {
							type = favor_hook
							target = scope:owner
						}
					}
					add_hook = {
						type = favor_hook
						target = scope:owner
					}
				}
			}
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
		save_scope_value_as = {
			name = vassal_approach
			value = flag:equals
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
				ai_rationality = 0.5
			}
		}
	}

	option = { #Please, serve me in this way, too
		name = seduce_ongoing.5101.b
		custom_tooltip = seduce_ongoing.5101.b.tt
		custom_tooltip = seduce_ongoing.5101.success_tt
		show_as_tooltip = {
			seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		}
		save_scope_value_as = {
			name = vassal_approach
			value = flag:servitude
		}
		ai_chance = {
			base = 100
			modifier = {
				add = 200
				has_trait = arrogant
			}
			ai_value_modifier = {
				ai_boldness = 0.5
			}
		}
	}

	option = { #I should keep my feelings to myself for now
		name = seduce_ongoing.5101.c
		custom_tooltip = seduce_ongoing.5101.c.tt
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 30
		}
	}

	after = {
		remove_variable = scheme_event_active_flag
		if = {
			limit = {
				exists = scope:vassal_approach
			}
			if = {
				limit = {
					scope:vassal_approach = flag:equals
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.5102
						days = { 10 20 }
					}
				}
			}
			else_if = {
				limit = {
					scope:vassal_approach = flag:servitude
				}
				scope:target = {
					trigger_event = {
						id = seduce_ongoing.5105
						days = { 10 20 }
					}
				}
			}
		}
	}
}


#Target: Liege presents the case that you are equals
seduce_ongoing.5102 = {
	type = character_event
	title = seduce_ongoing.5101.t
	desc = seduce_ongoing.5102.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = flirtation
	}
	right_portrait = {
		character = scope:owner
		animation = personality_compassionate
	}

	trigger = {
		exists = scope:scheme
	}

	option = { #I'm flattered
		name = seduce_ongoing.5102.a
		if = {
			limit = {
				NOT = {
					has_hook_of_type = {
						target = scope:owner
						type = favor_hook
					}
				}
			}
			add_hook = {
				type = favor_hook
				target = scope:owner
			}
		}

		scope:owner = {
			trigger_event = seduce_ongoing.5103
		}
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			compare_modifier = {
				target = scope:owner
				value = diplomacy
				multiplier = 5
			}
			modifier = {
				add = 50
				has_trait = lustful
			}
			modifier = {
				add = 500
				has_personality_dominant_trigger = yes
			}
			ai_value_modifier = {
				ai_greed = 0.5
			}
		}
	}

	option = { #I don't want this
		name = seduce_ongoing.5102.b

		add_prestige = major_prestige_gain

		scope:owner = {
			trigger_event = seduce_ongoing.5104
		}

		ai_chance = {
			base = 200
			modifier = {
				add = 200
				is_married = yes
			}
			modifier = {
				add = 200
				has_personality_submissive_trigger = yes
			}
		}
	}
}

#Schemer: Target is flattered
seduce_ongoing.5103 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.5103.desc
	sender = {
		character = scope:target
		animation = personality_compassionate
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5103.a
		show_as_tooltip = {
			scope:target = {
				add_hook = {
					type = favor_hook
					target = scope:owner
				}
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

#Schemer: Target wants nothing more than their obligations
seduce_ongoing.5104 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.5104.desc
	sender = {
		character = scope:target
		animation = dismissal
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5104.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}


#Target: Liege wants you in other ways
seduce_ongoing.5105 = {
	type = character_event
	title = seduce_ongoing.5101.t
	desc = seduce_ongoing.5105.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:owner
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = { #Anything for you
		name = seduce_ongoing.5105.a
		scope:owner = {
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 15
			}
			trigger_event = seduce_ongoing.5106
		}
		add_opinion = {
			target = scope:owner
			modifier = romance_opinion
			opinion = 15
		}
		ai_chance = {
			base = 100
			opinion_modifier = {
				opinion_target = scope:owner
				multiplier = 2
			}
			compare_modifier = {
				target = scope:owner
				value = diplomacy
				multiplier = 5
			}
			modifier = {
				add = 50
				has_trait = lustful
			}
			modifier = {
				add = 500
				has_personality_submissive_trigger = yes
			}
		}
	}

	option = { #I don't want this
		name = seduce_ongoing.5105.b

		add_prestige = medium_prestige_gain

		scope:owner = {
			trigger_event = seduce_ongoing.5107
		}

		ai_chance = {
			base = 200
			ai_value_modifier = {
				ai_honor = 1
				ai_boldness = 0.5
			}
			modifier = {
				add = 300
				has_personality_dominant_trigger = yes
			}
		}
	}
}

#Schemer: Target is flattered
seduce_ongoing.5106 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.5106.desc
	sender = {
		character = scope:target
		animation = happiness
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5103.a
		show_as_tooltip = {
			scope:target = {
				add_opinion = {
					target = scope:owner
					modifier = romance_opinion
					opinion = 15
				}
			}
			add_opinion = {
				target = scope:target
				modifier = romance_opinion
				opinion = 15
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}
}

#Schemer: Target is insulted
seduce_ongoing.5107 = {
	type = letter_event
	opening = {
		desc = seduce_ongoing.target.opening
	}
	desc = seduce_ongoing.5104.desc
	sender = {
		character = scope:target
		animation = dismissal
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	option = {
		name = seduce_ongoing.5104.a
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = failure }
	}
}

###END SEDUCING VASSAL CHAIN



#########
# Talk to a foreign courtier target to "understand their liege"
# by Petter Vilberg and Linnéa Thimrén
########

seduce_ongoing.6001 = {
	type = character_event
	title = seduce_ongoing.6001.t
	desc = seduce_ongoing.6001.desc

	theme = seduce_scheme
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		exists = scope:target.court_owner
		OR = {
			has_lifestyle = diplomacy_lifestyle
			has_diplomacy_lifestyle_trait_trigger = yes
		}
		scope:target = {
			is_landed = no
			is_ai = yes
			court_owner != scope:owner
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target = {
			if = {
				limit = {
					any_spouse = {
						this = scope:target.court_owner
						reverse_opinion = {
							target = scope:target
							value < 10
						}
					}
				}
				random_spouse = {
					limit = {
						this = scope:target.court_owner
						reverse_opinion = {
							target = scope:target
							value < 10
						}
					}
					save_scope_as = spouse
				}
			}
		}
		scope:target.court_owner = {
			save_scope_as = court_owner
		}
	}

	option = { #Focus on target
		name = seduce_ongoing.6001.a
		if = {
			limit = { #If they are the displeased spouse of their liege
				exists = scope:spouse
			}
			scope:target = {
				add_opinion = {
					target = scope:spouse
					modifier = respect_opinion
					opinion = -20
				}
			}
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}

	option = { # Butter up to the court_owner instead
		name = seduce_ongoing.6001.b
		scope:court_owner = {
			add_opinion = {
				target = root
				modifier = respect_opinion
				opinion = 20
			}
		}
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 1
			}
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}



#############
# Military drill show-off
# by Petter Vilberg and Linnéa Thimrén
#############
seduce_ongoing.6011 = {
	type = character_event
	title = seduce_ongoing.6011.t
	desc = seduce_ongoing.6011.desc

	theme = war
	left_portrait = {
		character = root
		animation = hunting_horn
	}
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		seduction_target_is_close_trigger = yes
		is_available_adult = yes
		OR = {
			has_lifestyle = martial_lifestyle
			has_martial_lifestyle_trait_trigger = yes
		}
		scope:target = {
			is_available_adult = yes
			martial >= 10
			is_ai = yes
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender }
	}

	option = {
		name = seduce_ongoing.6011.a
		trigger = {
			has_martial_lifestyle_trait_trigger = yes
		}
		trait = strategist
		trait = overseer
		trait = gallant
		add_character_modifier = {
			modifier = seduce_warfare_military_ideas_modifier
			years = 5
		}
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
	}

	option = { #Retort
		name = seduce_ongoing.6011.b
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		stress_impact = {
			arrogant = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
			}
		}
	}

	option = { #Focus on the battle
		name = seduce_ongoing.6011.c
		add_character_modifier = {
			modifier = seduce_warfare_military_ideas_modifier
			years = 5
		}
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 50
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}



##########
# Discuss tactics
# by Petter Vilberg and Linnéa Thimrén
##########

seduce_ongoing.6021 = {
	type = character_event
	title = seduce_ongoing.6021.t
	desc = seduce_ongoing.6021.desc

	theme = war
	left_portrait = {
		character = root
		animation = reading
	}
	right_portrait = {
		character = scope:target
		animation = debating
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		is_available_adult = yes
		OR = {
			has_lifestyle = martial_lifestyle
			has_martial_lifestyle_trait_trigger = yes
		}
		scope:target = {
			is_available_adult = yes
			OR = {
				AND = {
					martial >= 10
					martial >= root.martial
				}
				has_lifestyle = martial_lifestyle
				has_martial_lifestyle_trait_trigger = yes
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 1
			has_martial_lifestyle_trait_trigger = yes
			scope:target = {
				has_martial_lifestyle_trait_trigger = yes
			}
		}
	}

	immediate = { set_variable = scheme_event_active_flag }

	option = { #Double up, because you're so cool!
		name = seduce_ongoing.6021.a
		trigger = {
			has_martial_lifestyle_trait_trigger = yes
		}
		trait = strategist
		trait = overseer
		trait = gallant
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		add_character_modifier = {
			modifier = seduce_warfare_military_ideas_modifier
			days = 3650
		}
		ai_chance = {
			base = 1000
		}
	}

	option = { #I never knew we had so much in common!
		name = seduce_ongoing.6021.b
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = 0.5
				ai_rationality = 0.5
			}
		}
	}

	option = { #Tell me more about your ideas...
		name = seduce_ongoing.6021.c
		add_character_modifier = {
			modifier = seduce_warfare_military_ideas_modifier
			days = 3650
		}
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
			}
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}


##########
# Both Diplomatic: Intense exchanges of diplomatic courtesy
# by Petter Vilberg and Linnéa Thimrén
##########

seduce_ongoing.6051 = {
	type = character_event
	title = seduce_ongoing.6051.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					seduction_target_is_close_trigger = yes
				}
				desc = seduce_ongoing.6051.close
			}
			desc = seduce_ongoing.6051.far
		}
		desc = seduce_ongoing.6051.end
	}

	theme = diplomacy
	left_portrait = {
		character = root
		animation = flirtation_left
	}
	right_portrait = {
		character = scope:target
		animation = flirtation
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	cooldown = { years = 2 }

	trigger = {
		NOT = { has_variable = scheme_event_active_flag }
		OR = {
			has_lifestyle = diplomacy_lifestyle
			has_diplomacy_lifestyle_trait_trigger = yes
		}
		scope:target = {
			is_available_ai_adult = yes
			OR = {
				has_lifestyle = diplomacy_lifestyle
				has_diplomacy_lifestyle_trait_trigger = yes
				diplomacy >= 15
			}
			has_opinion_modifier = {
				target = scope:owner
				modifier = romance_opinion
				value >= 10
			}
		}
	}

	immediate = {
		set_variable = scheme_event_active_flag
		scope:target = {
			add_opinion = {
				target = scope:owner
				modifier = romance_opinion
				opinion = 10
			}
		}
	}

	option = {
		name = seduce_ongoing.6051.a
		trigger = {
			has_diplomacy_lifestyle_trait_trigger = yes
		}
		trait = diplomat
		trait = family_first
		trait = august
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		add_character_modifier = {
			modifier = seduce_diplomatic_practice_modifier
			days = 1825
		}
		ai_chance = {
			base = 1000
		}
	}

	option = {
		name = seduce_ongoing.6051.b
		seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = 2 OUTCOME = success }
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 1
			}
		}
	}

	option = {
		name = seduce_ongoing.6051.c
		add_character_modifier = {
			modifier = seduce_diplomatic_practice_modifier
			days = 1825
		}
		scope:scheme = {
			set_variable = {
				name = declined_seduce_milestone_2_event
				value = yes
			}
		}
		ai_chance = {
			base = 100
		}
	}

	after = { remove_variable = scheme_event_active_flag }
}
