###################################
#
# Events for Feasts
#
# Id 72000 - 72999 is reserved
#
###################################
#
# Designed by Johan Andersson
# Written by Sara Wendel-rtqvist
# Reworked by Rylock

# Starting the feast
character_event = {
	id = 72109
	desc = EVTDESC72109
	picture = GFX_evt_feast

	is_triggered_only = yes

	only_rulers = yes
	only_capable = yes
	prisoner = no
	war = no
	has_character_flag = planning_feast

	trigger = {
		month >= 10
		is_inaccessible_trigger = no
	}

	fail_trigger_effect = {
		if = {
			limit = {
				is_ruler = yes
				has_character_flag = planning_feast
			}

			# Try again next month
			repeat_event = {
				id = 72109
				months = 1
			}
		}
	}

	immediate = {
		add_character_modifier = {
			name = holding_large_feast
			duration = -1
		}

		set_character_flag = held_recent_feast
		clr_character_flag = planning_feast
		clr_character_flag = sent_invitations
		clr_character_flag = host_feast_started
		clr_character_flag = feast_jongleur
		clr_character_flag = feast_musicians
		clr_character_flag = dealt_with_robber_band
		clr_character_flag = guest_daughter_event
		clr_character_flag = guest_claim_event
		clr_character_flag = feast_minstrel
		clr_character_flag = feast_fireeaters
		clr_character_flag = feast_conjurer
		clr_character_flag = feast_acrobats
		clr_character_flag = feast_dancers
		clr_character_flag = lavishly_food
		clr_character_flag = medium_food
		clr_character_flag = low_food
		clr_character_flag = castle_problems
		clr_character_flag = feast_jester
		clr_character_flag = feast_drunkard_guest
		clr_character_flag = feast_duel
		clr_character_flag = feast_boar_hunt

		hidden_effect = {
			character_event = {
				id = 72003 # food preparations
				days = 25
				random = 10
			}

			character_event = {
				id = 72997 # first pre-feast event trigger
				days = 7
				random = 5
			}

			add_character_modifier = {
				name = do_not_disturb
				days = 85
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72109
	}
}

# Main trigger for pre-feast events
character_event = {
	id = 72997

	hide_window = yes
	is_triggered_only = yes

	war = no

	trigger = {
		has_character_modifier = holding_large_feast
		NOT = { has_character_flag = host_feast_started }
	}

	immediate = {
		random_list = {
			10 = {
				trigger = {
					NOT = { has_character_flag = feast_jongleur }
				}

				mult_modifier = {
					factor = 0.5

					lower_real_tier_than = KING

					OR = {
						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
					}
				}

				character_event = { id = 72000 } # wandering jongleurs
			}

			10 = {
				trigger = {
					NOT = { has_character_flag = feast_minstrel }
				}

				mult_modifier = {
					factor = 0.5
					lower_tier_than = KING
					OR = {
						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
					}
				}
				character_event = { id = 72001 } # traveling minstrel
			}
			10 = {
				trigger = {
					NOT = { has_character_flag = feast_musicians }
				}

				mult_modifier = {
					factor = 0.5

					lower_real_tier_than = KING

					OR = {
						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
					}
				}

				character_event = { id = 72002 } # musician
			}

			20 = {
				trigger = {
					job_treasurer = { character = yes }
					NOT = { has_character_flag = castle_problems }
				}

				mult_modifier = {
					factor = 0.5

					OR = {
						has_character_flag = dealt_with_robber_band
						has_character_flag = feast_boar_hunt
					}
				}

				character_event = { id = 72004 } # castle problems
			}

			50 = {
				trigger = {
					job_marshal = { character = yes }
					NOT = { has_character_flag = dealt_with_robber_band }

					location = {
						has_province_modifier = highway_robber_band
					}
				}

				mult_modifier = {
					factor = 0.5

					OR = {
						has_character_flag = castle_problems
						has_character_flag = feast_boar_hunt
					}
				}

				character_event = { id = 72005 } # highway robber band
			}

			10 = {
				trigger = {
					NOT = { has_character_flag = feast_fireeaters }
				}

				mult_modifier = {
					factor = 0.5

					lower_real_tier_than = KING

					OR = {
						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
					}
				}

				character_event = { id = 72006 } # fire-eaters
			}

			10 = {
				trigger = {
					NOT = { has_character_flag = feast_conjurer }
				}

				mult_modifier = {
					factor = 0.5

					lower_real_tier_than = KING

					OR = {
						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
					}
				}

				character_event = { id = 72007 } # conjurer
			}

			20 = {
				trigger = {
					job_marshal = { character = yes }

					NOR = {
						religion = cathar
						religion = jain
						religion_group = jewish_group
						has_character_flag = feast_boar_hunt
					}
				}

				mult_modifier = {
					factor = 2.5
					trait = hunter
				}

				mult_modifier = {
					factor = 0.5

					OR = {
						has_character_flag = castle_problems
						has_character_flag = dealt_with_robber_band
					}
				}

				character_event = { id = 72008 } # boar hunt
			}

			10 = {
				trigger = {
					NOT = { has_character_flag = feast_acrobats }
				}

				mult_modifier = {
					factor = 0.5

					lower_real_tier_than = KING

					OR = {
						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
					}
				}

				character_event = { id = 72009 } # acrobats
			}

			10 = {
				trigger = {
					NOT = { has_character_flag = feast_dancers }
				}

				mult_modifier = {
					factor = 0.5

					lower_real_tier_than = KING

					OR = {
						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
					}
				}

				character_event = { id = 72120 } # traveling dancers
			}

			100 = {
				trigger = {
					trigger_if = {
						limit = { higher_real_tier_than = COUNT }

						OR = {
							has_character_flag = feast_jongleur
							has_character_flag = feast_minstrel
							has_character_flag = feast_musicians
							has_character_flag = feast_fireeaters
							has_character_flag = feast_conjurer
							has_character_flag = feast_acrobats
							has_character_flag = feast_dancers
						}
					}
				}

				mult_modifier = {
					factor = 2
					real_tier = COUNT
				}

				mult_modifier = {
					factor = 0.5
					higher_real_tier_than = DUKE
				}

				mult_modifier = {
					factor = 2

					OR = {
						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
					}
				}

				mult_modifier = {
					factor = 5

					calc_true_if = {
						amount >= 2

						has_character_flag = feast_jongleur
						has_character_flag = feast_minstrel
						has_character_flag = feast_musicians
						has_character_flag = feast_fireeaters
						has_character_flag = feast_conjurer
						has_character_flag = feast_acrobats
						has_character_flag = feast_dancers
						has_character_flag = castle_problems
						has_character_flag = dealt_with_robber_band
						has_character_flag = feast_boar_hunt
					}
				}

				# no event
			}
		}

		repeat_event = {
			id = 72997
			days = 10
			random = 5
		}
	}
}


###################################
# Events before the Feast
###################################

### A troop of wandering jongleurs seek your patronage ###
character_event = {
	id = 72000
	desc = EVTDESC72000
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	option = {
		name = EVTOPTA72000

		wealth = -10
		set_character_flag = feast_jongleur

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 0.1
				wealth < 30
			}

			mult_modifier = {
				factor = 30
				wealth >= 30
			}
		}
	}

	option = {
		name = EVTOPTB72000

		prestige = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 30
				wealth < 30
			}

			mult_modifier = {
				factor = 0.1
				wealth >= 30
			}
		}
	}
}

# A travelling minstrel seeks your patronage
character_event = {
	id = 72001
	desc = EVTDESC72001
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72001

		set_character_flag = feast_minstrel
		wealth = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 0.1
				wealth < 30
			}

			mult_modifier = {
				factor = 30
				wealth >= 30
			}
		}
	}

	option = {
		name = EVTOPTB72001

		prestige = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 30
				wealth < 30
			}

			mult_modifier = {
				factor = 0.1
				wealth >= 30
			}
		}
	}
}

# Musicians seek your patronage
character_event = {
	id = 72002
	desc = EVTDESC72002
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72002

		set_character_flag = feast_musicians
		wealth = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 0.1
				wealth < 30
			}

			mult_modifier = {
				factor = 30
				wealth >= 30
			}
		}
	}

	option = {
		name = EVTOPTB72002

		prestige = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 30
				wealth < 30
			}

			mult_modifier = {
				factor = 0.1
				wealth >= 30
			}
		}
	}
}

# Food Preparations
character_event = {
	id = 72003
	desc = EVTDESC72003
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		if = {
			limit = {
				any_artifact = {
					has_artifact_flag = cooking
					NOT = { artifact_type = gastronomic_tonics } # Not really about food
				}
			}

			random_artifact = {
				limit = {
					has_artifact_flag = cooking

					OR = {
						is_artifact_equipped = yes

						# If ROOT already cannibal, someone else should be around to become cannical...
						trigger_if = {
							limit = {
								artifact_type = the_omnivore
								ROOT = { trait = cannibal }
							}

							ROOT = {
								any_courtier = {
									is_adult = yes
									NOT = { trait = cannibal }
									is_inaccessible_or_incapable_trigger = no
								}
							}
						}
					}

					NOT = { artifact_type = gastronomic_tonics } # Not really about food
				}

				preferred_limit = {
					quality >= 3
				}

				preferred_limit = {
					quality >= 2
				}

				preferred_limit = {
					quality >= 1
				}

				save_event_target_as = book_target
			}

			if = { # If ROOT is already a cannibal_trait...
				limit = {
					trait = cannibal

					event_target:book_target = {
						artifact_type = the_omnivore
					}
				}

				random_courtier = {
					limit = {
						NOT = { trait = cannibal }
						is_adult = yes
						is_inaccessible_or_incapable_trigger = no
					}

					preferred_limit = {
						has_education_stewardship_trigger = yes
						family_of_root_trigger = yes
						is_evil_trigger = yes
					}

					preferred_limit = {
						has_education_stewardship_trigger = yes
						family_of_root_trigger = yes
					}

					preferred_limit = {
						family_of_root_trigger = yes
					}

					preferred_limit = {
						has_education_stewardship_trigger = yes
					}

					save_event_target_as = potential_cannibal
				}
			}
		}
	}

	option = {
		name = {
			text = EVTOPTD72003 # Why don't we use this as inspiration?

			trigger = {
				event_target:book_target = { quality > 1 }
			}
		}

		name = {
			text = EVTOPTD72003_cheap # Let's make use of this little thing
			trigger = {
				event_target:book_target = { quality < 2 }
			}
		}

		tooltip_info_custom = available_because_books_tt

		trigger = {
			event_target:book_target = { always = yes }
		}

		if = {
			limit = {
				event_target:book_target = {
					quality < 2
				}
			}

			set_character_flag = low_food
			prestige = -5
		}

		else_if = {
			limit = {
				event_target:book_target = {
					quality == 2
				}
			}

			if = {
				limit = {
					event_target:book_target = {
						artifact_type = the_omnivore
					}
				}

				if = {
					limit = { trait = cannibal }

					custom_tooltip = { text = EVTOPTD72003_buddy_cannibal_tt }

					event_target:potential_cannibal = {
						show_scope_change = no

						add_trait = cannibal
					}
				}
				else = {
					custom_tooltip = { text = EVTOPTD72003_cannibal_tt }
					add_trait = cannibal
				}

				set_character_flag = lavishly_food
				wealth = -10
				prestige = 20
			}
			else = {
				set_character_flag = medium_food
				wealth = -5
				prestige = 5
			}
		}
		else = { # Means it's quality 3/higher
			set_character_flag = lavishly_food
			wealth = -10
			prestige = 20
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				NOT = { trait = greedy }
			}

			mult_modifier = {
				factor = 2
				NOT = { trait = gluttonous }
			}

			mult_modifier = {
				factor = 2
				real_tier = DUKE
			}
		}
	}

	option = {
		name = EVTOPTA72003 # Spend lavishly on food

		trigger = {
			NOT = { trait = temperate }
		}

		gain_weight_small_effect = yes
		weight_trait_check_effect = yes
		set_character_flag = lavishly_food
		wealth = -20
		prestige = 10

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 0.5
				trait = greedy
			}

			mult_modifier = {
				factor = 3
				trait = gluttonous
			}

			mult_modifier = {
				factor = 0.1
				trait = temperate
			}

			mult_modifier = {
				factor = 2
				higher_real_tier_than = DUKE
			}
		}
	}

	option = {
		name = EVTOPTB72003 # Spend medium on food

		set_character_flag = medium_food
		wealth = -10

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 0.5
				NOT = { trait = greedy }
			}

			mult_modifier = {
				factor = 2
				NOT = { trait = gluttonous }
			}

			mult_modifier = {
				factor = 2
				real_tier = DUKE
			}
		}
	}

	option = {
		name = EVTOPTC72003 # Spend low on food

		trigger = {
			NOT = { trait = gluttonous }
		}

		set_character_flag = low_food
		wealth = -5
		prestige = -5

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 2.5
				trait = greedy
			}

			mult_modifier = {
				factor = 0.1
				trait = gluttonous
			}

			mult_modifier = {
				factor = 2
				real_tier = COUNT
			}
		}
	}

	after = {
		character_event = {
			id = 72010 # send invitations
			days = 2
			random = 5
		}

		clear_delayed_event = { id = 72997 } # Stop getting more preperation events
	}
}

# Castle problems
character_event = {
	id = 72004
	desc = EVTDESC72004
	picture = GFX_evt_castle_construction

	is_triggered_only = yes

	option = {
		name = EVTOPTA72004

		set_character_flag = castle_problems
		scaled_wealth = -0.2
	}
}

# Send Marshal to deal with Highway Robber Band
character_event = {
	id = 72005
	desc = EVTDESC72005
	picture = GFX_evt_bandits

	is_triggered_only = yes

	option = {
		name = EVTOPTA72005

		job_marshal = {
			show_scope_change = no

			random_list = {
				5 = {
					death = { death_reason = death_rabble }
				}

				50 = {
					ROOT = {
						show_scope_change = no

						location = {
							show_scope_change = no

							remove_province_modifier = highway_robber_band
						}
					}
				}

				45 = { }
			}
		}
	}

	option = {
		name = EVTOPTB72005

		prestige = -10
	}
}

# Fire-eaters seek your patronage
character_event = {
	id = 72006
	desc = EVTDESC72006
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72006

		set_character_flag = feast_fireeaters
		wealth = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 0.1
				wealth < 30
			}

			mult_modifier = {
				factor = 20
				wealth >= 30
			}
		}
	}

	option = {
		name = EVTOPTB72006

		prestige = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 20
				wealth < 30
			}

			mult_modifier = {
				factor = 0.1
				wealth >= 30
			}
		}
	}
}

# A Conjurer seeks your patronage
character_event = {
	id = 72007
	desc = EVTDESC72007
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72007

		set_character_flag = feast_conjurer
		wealth = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 0.1
				wealth < 30
			}

			mult_modifier = {
				factor = 20
				wealth >= 30
			}
		}
	}

	option = {
		name = EVTOPTB72007

		prestige = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 20
				wealth < 30
			}

			mult_modifier = {
				factor = 0.1
				wealth >= 30
			}
		}
	}
}

# Hunt for boars for winter feast
character_event = {
	id = 72008
	desc = EVTDESC72008
	picture = GFX_evt_hunt

	is_triggered_only = yes

	immediate = {
		set_character_flag = feast_boar_hunt
	}

	option = {
		name = EVTOPTA72008

		job_marshal = {
			show_scope_change = no

			prestige = 10

			opinion = {
				name = opinion_flattered
				who = ROOT
				years = 10
			}

			random_list = {
				80 = { }
				10 = { change_martial = 1 }
				7 = { add_trait_wounded_effect = yes }
				2 = { add_maimed_trait_effect = yes }
				1 = { death = { death_reason = death_accident_boar } }
			}

			hidden_effect = {
				change_variable = {
					which = lifestyle_martial
					value = 1
				}
			}
		}
	}

	option = {
		name = EVTOPTB72008

		trigger = {
			any_child = {
				practical_age >= 14
				vassal_of = ROOT
				is_abroad = no
				prisoner = no
				health_traits < 1
				is_alive = yes
			}
		}

		any_child = {
			limit = {
				practical_age >= 14

				trigger_if = {
					limit = { is_female = yes }

					OR = {
						has_law = status_of_women_4
						has_gender_equal_game_rule_trigger = yes
						has_religion_feature = religion_matriarchal
						has_religion_feature = religion_equal
						has_religion_feature = religion_feature_bon
					}
				}

				is_abroad = no
				prisoner = no
				vassal_of = ROOT
				health_traits < 1
				is_alive = yes
			}

			score_value = {
				value = 10
				interesting_courtier_selection_score = yes
			}

			prestige = 10

			opinion = {
				name = opinion_flattered
				who = ROOT
				years = 10
			}

			random_list = {
				80 = { }
				10 = { change_martial = 1 }
				7 = { add_trait_wounded_effect = yes }
				2 = { add_maimed_trait_effect = yes }
				1 = { death = { death_reason = death_accident_boar } }
			}

			hidden_effect = {
				change_variable = {
					which = lifestyle_martial
					value = 1
				}
			}
		}
	}

	option = {
		name = EVTOPTC72008

		trigger = {
			practical_age >= 14

			trigger_if = {
				limit = { is_female = yes }

				OR = {
					has_law = status_of_women_4
					has_gender_equal_game_rule_trigger = yes
					has_religion_feature = religion_matriarchal
					has_religion_feature = religion_equal
					has_religion_feature = religion_feature_bon
				}
			}

			health_traits < 1
			NOT = { trait = craven }
		}

		prestige = 10

		random_list = {
			80 = { }
			10 = { change_martial = 1 }
			7 = { add_trait_wounded_effect = yes }
			2 = { add_maimed_trait_effect = yes }
			1 = { death = { death_reason = death_accident_boar } }
		}

		hidden_effect = {
			change_variable = {
				which = lifestyle_martial
				value = 1
			}
		}
	}

	option = {
		name = EVTOPTD72008
	}
}

# Acrobats seek your patronage
character_event = {
	id = 72009
	desc = EVTDESC72009
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72009

		set_character_flag = feast_acrobats
		wealth = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 0.1
				wealth <= 30
			}

			mult_modifier = {
				factor = 20
				wealth >= 30
			}
		}
	}

	option = {
		name = EVTOPTB72009

		prestige = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 20
				wealth < 30
			}

			mult_modifier = {
				factor = 0.1
				wealth >= 30
			}
		}
	}
}

# Traveling Dancers seek your patronage
character_event = {
	id = 72120
	desc = EVTDESC72120
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	option = {
		name = EVTOPTA72120

		set_character_flag = feast_dancers
		wealth = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 0.1
				wealth < 30
			}

			mult_modifier = {
				factor = 20
				wealth >= 30
			}
		}
	}

	option = {
		name = EVTOPTB72120

		prestige = -10

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 20
				wealth < 30
			}

			mult_modifier = {
				factor = 0.1
				wealth >= 30
			}
		}
	}
}

###################################
# Invitations to Feast
###################################

# Send invites
character_event = {
	id = 72010
	desc = EVTDESC72010
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72010

		set_character_flag = sent_invitations

		character_event = {
			id = 72015 # start the feast
			days = 10
		}

		any_vassal = {
			limit = {
				block_general_event_trigger = no
				war = no
				NOT = { has_character_modifier = holding_large_feast }
			}

			letter_event = {
				id = 72011 # send invitation
				days = 1
				random = 2
				tooltip = EVTTOOLTIP72011
			}
		}
	}
}

# Vassal is invited to the feast
letter_event = {
	id = 72011

	desc = {
		text = EVTDESC72011
		trigger = {
			FROM = {
				NOT = { has_character_flag = nerthus_feast }
			}
		}
	}

	desc = {
		text = EVTDESC72011_nerthus
		trigger = {
			FROM = { has_character_flag = nerthus_feast }
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTA72011 # Travel to the feast

		set_character_flag = coming_to_feast

		add_character_modifier = {
			name = do_not_disturb
			days = 40
			hidden = yes
		}

		ai_chance = {
			factor = 1

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value >= -40
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value >= -20
				}
			}
		}
	}

	option = {
		name = EVTOPTB72011 # Refuse

		FROM = {
			show_scope_change = no

			letter_event = {
				id = 72012
				days = 1
				tooltip = EVTTOOLTIP72012
			}

			opinion = {
				name = opinion_dislike
				who = ROOT
				years = 10
			}
		}

		ai_chance = {
			factor = 1

			trigger  = {
				opinion = {
					who = FROM
					value < 0
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < -60
				}
			}

			mult_modifier = {
				factor = 2

				opinion = {
					who = FROM
					value < -80
				}
			}
		}
	}
}

# Vassal refused to come to the feast
letter_event = {
	id = 72012
	desc = EVTDESC72012

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72012

		tooltip = {
			opinion = {
				name = opinion_dislike
				who = FROM
				years = 10
			}
		}
	}
}

# The guests have arrived
character_event = {
	id = 72015
	picture = GFX_evt_feast

	desc = {
		text = EVTDESC72015
		trigger = {
			NOT = { has_character_flag = nerthus_feast }
		}
	}
	desc = {
		text = EVTDESC72015_nerthus
		trigger = {
			has_character_flag = nerthus_feast
		}
	}

	is_triggered_only = yes

	immediate = {
		set_character_flag = host_feast_started
	}

	option = {
		name = EVTOPTA72015

		any_vassal = {
			limit = { has_character_flag = coming_to_feast }

			character_event = {
				id = 72016
				tooltip = EVTTOOLTIP72016
			}
		}

		character_event = {
			id = 72995 # first main trigger event
			days = 5
			random = 5
		}

		character_event = {
			id = 72110 # feast ends
			days = 30
		}
	}
}

# Welcome to the feast!
character_event = {
	id = 72016
	desc = EVTDESC72016
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72016

		set_character_flag = guest_feast_started

		if = {
			limit = { num_of_rivals > 0 }

			random = {
				chance = 10

				mult_modifier = {
					factor = 2
					trait = patient
				}

				mult_modifier = {
					factor = 2
					trait = deceitful
				}

				mult_modifier = {
					factor = 1.5
					intrigue >= 10
				}

				mult_modifier = {
					factor = 1.5
					intrigue >= 15
				}

				mult_modifier = {
					factor = 1.5
					intrigue >= 20
				}

				character_event = {
					id = 100520 # Poison rival during liege's feast
					days = 4
					random = 8
				}
			}
		}

		character_event = {
			id = 72996 # main guest trigger event
			days = 3
			random = 25
		}
	}
}

###################################
# Events during feast
###################################

# Main trigger for host's feast events
character_event = {
	id = 72995

	hide_window = yes
	is_triggered_only = yes

	only_capable = yes

	immediate = {
		random_list = {
			10 = {
				trigger = {
					any_courtier = {
						has_minor_title = title_court_jester

						opinion = {
							who = ROOT
							value < 25
						}
					}

					NOT = { has_character_flag = feast_jester }

					any_vassal = {
						has_character_flag = guest_feast_started
					}
				}

				mult_modifier = {
					factor = 2

					any_courtier = {
						has_minor_title = title_court_jester

						opinion = {
							who = ROOT
							value < -25
						}
					}
				}

				character_event = { id = 72060 } # Jester jokes about your rule
			}

			50 = {
				trigger = { has_character_flag = feast_jongleur }
				character_event = { id = 72063 } # Jongleurs entertain the guests
			}

			50 = {
				trigger = { has_character_flag = feast_minstrel }
				character_event = { id = 72065 } # Minstrel entertain the guests
			}

			50 = {
				trigger = { has_character_flag = feast_musicians }
				character_event = { id = 72067 } # Musicians entertain the guests
			}

			50 = {
				trigger = { has_character_flag = feast_fireeaters }
				character_event = { id = 72069 } # Fire-eaters entertain the guests
			}

			50 = {
				trigger = { has_character_flag = feast_conjurer }
				character_event = { id = 72071 } # Conjurer entertain the guests
			}

			50 = {
				trigger = { has_character_flag = feast_acrobats }
				character_event = { id = 4160 } # Travelling Acrobats
			}

			50 = {
				trigger = { has_character_flag = feast_dancers }
				character_event = { id = 4165 } # Travelling dancers
			}

			10 = {
				trigger = {
					NOT = { religion = cathar }
					fertility >= 0.4
					practical_age < 60

					trigger_if = {
						limit = {
							ai = yes

							OR = {
								has_lover = yes
								is_married = yes
							}
						}

						OR = {
							trait = lustful
							trait = hedonist
							trait = deceitful
							trait = master_seducer
							trait = master_seductress

							any_spouse = {
								reverse_opinion = {
									who = ROOT
									value < 0
								}
							}
						}
					}

					any_vassal = {
						has_character_flag = guest_feast_started

						OR = {
							AND = {
								is_valid_romance_target = ROOT
								practical_age < 30
								is_adult = yes
								is_pregnant = no

								opinion = {
									who = ROOT
									value >= 20
								}

								NOR = {
									trait = celibate
									trait = chaste
									trait = eunuch
									is_close_relative = ROOT
									is_married = ROOT
									is_lover = ROOT
								}
							}

							any_spouse = {
								is_valid_romance_target = ROOT
								practical_age < 40
								is_adult = yes
								is_pregnant = no
								is_abroad = no
								prisoner = no

								opinion = {
									who = ROOT
									value >= 20
								}

								NOR = {
									trait = celibate
									trait = eunuch
									trait = chaste
									character = ROOT
									is_close_relative = ROOT
									is_lover = ROOT
								}
							}
						}
					}
				}

				mult_modifier = {
					factor = 4
					trait = lustful
				}

				mult_modifier = {
					factor = 3
					has_focus = focus_seduction
				}

				mult_modifier = {
					factor = 2
					trait = hedonist
				}

				mult_modifier = {
					factor = 0.1
					trait = chaste
				}

				# Save possible targets
				random_vassal = {
					limit = {
						has_character_flag = guest_feast_started
						is_married = yes
						is_valid_romance_target = ROOT
						practical_age < 30
						is_adult = yes
						is_pregnant = no

						opinion = {
							who = ROOT
							value >= 20
						}

						NOR = {
							trait = celibate
							trait = chaste
							trait = eunuch
							is_close_relative = ROOT
							is_married = ROOT
							is_lover = ROOT
						}
					}

					save_event_target_as = pretty_married_vassal
				}

				random_vassal = {
					limit = {
						has_character_flag = guest_feast_started
						is_valid_romance_target = ROOT
						is_married = no
						practical_age < 30
						is_adult = yes
						is_pregnant = no

						opinion = {
							who = ROOT
							value = 20
						}

						NOR = {
							trait = celibate
							trait = chaste
							trait = eunuch
							is_close_relative = ROOT
							is_married = ROOT
							is_lover = ROOT
						}
					}

					save_event_target_as = pretty_single_vassal
				}

				random_vassal = {
					limit = {
						has_character_flag = guest_feast_started
						is_married = yes

						any_spouse = {
							is_valid_romance_target = ROOT
							practical_age < 40
							is_adult = yes
							is_pregnant = no
							is_abroad = no
							prisoner = no

							opinion = {
								who = ROOT
								value >= 20
							}

							NOR = {
								character = ROOT
								is_close_relative = ROOT
								is_lover = ROOT
								trait = celibate
								trait = eunuch
								trait = chaste
							}
						}
					}

					random_spouse = {
						limit = {
							is_valid_romance_target = ROOT
							practical_age < 40
							is_adult = yes
							is_pregnant = no
							is_abroad = no
							prisoner = no

							opinion = {
								who = ROOT
								value >= 20
							}

							NOR = {
								character = ROOT
								is_close_relative = ROOT
								is_lover = ROOT
								trait = celibate
								trait = eunuch
								trait = chaste
							}
						}

						save_event_target_as = pretty_vassal_spouse
					}
				}

				character_event = { id = 72075 } # Friendly with another guest's spouse
			}

			5 = {
				trigger = {
					num_of_friends < 3
					NOT = { religion = cathar }

					any_vassal = {
						has_character_flag = guest_feast_started
						num_of_friends < 3

						NOR = {
							is_friend = ROOT
							is_rival = ROOT
							is_lover = ROOT
						}
					}
				}

				mult_modifier = {
					factor = 2
					trait = gregarious
				}

				mult_modifier = {
					factor = 2
					trait = trusting
				}

				mult_modifier = {
					factor = 0.5
					trait = shy
				}

				mult_modifier = {
					factor = 0.5
					trait = paranoid
				}

				character_event = { id = 72080 } # Late night talk: First person
			}

			10 = {
				trigger = {
					NOT = { has_character_flag = guest_claim_event }

					any_claim = {
						ROOT = { has_strong_claim = PREV }
						can_be_given_away = yes

						holder_scope = {
							has_character_flag = guest_feast_started
							vassal_of = ROOT
						}
					}
				}

				character_event = { id = 72085 } # Claim on visitor's title
			}

			10 = {
				trigger = {
					NOT = { has_character_flag = guest_daughter_event }

					trigger_if = {
						limit = {
							is_female = no
							has_living_children = no
						}

						OR = {
							religion_group = christian
							religion_group = jewish_group
						}

						trigger_if = {
							limit = { trait = chaste }

							is_married = no
							is_betrothed = no
						}

						fertility >= 0.4
						has_lover = no
						NOT = { trait = shy }

						any_vassal = {
							has_character_flag = guest_feast_started

							any_child = {
								is_valid_romance_target = PREVPREV
								is_adult = yes
								practical_age < 26
								fertility >= 0.4
								is_married = no
								is_betrothed = no
								is_consort = no
								has_lover = no
								is_abroad = no
								prisoner = no

								opinion = {
									who = PREVPREV
									value >= 20
								}
							}
						}
					}
					trigger_else = {
						any_child = {
							is_female = no
							same_realm = ROOT

							OR = {
								religion_group = christian
								religion_group = jewish_group
							}

							trigger_if = {
								limit = { trait = chaste }

								is_married = no
								is_betrothed = no
							}

							is_adult = yes
							practical_age < 26
							fertility >= 0.4
							has_lover = no
							is_incapable = no
							is_abroad = no
							prisoner = no
							NOT = { trait = shy }

							ROOT = {
								any_vassal = {
									has_character_flag = guest_feast_started

									any_child = {
										is_valid_romance_target = PREVPREVPREV
										practical_age < 26
										fertility >= 0.4
										is_married = no
										is_betrothed = no
										is_consort = no
										has_lover = no
										is_abroad = no
										prisoner = no

										opinion = {
											who = PREVPREVPREV
											value >= 20
										}
									}
								}
							}
						}
					}
				}

				mult_modifier = {
					factor = 2
					trait = gregarious
				}

				mult_modifier = {
					factor = 0.1
					trait = paranoid
				}

				set_character_flag = guest_daughter_event

				# Host
				if = {
					limit = {
						is_female = no
						has_living_children = no

						OR = {
							religion_group = christian
							religion_group = jewish_group
						}

						trigger_if = {
							limit = { trait = chaste }

							is_married = no
							is_betrothed = no
						}

						fertility >= 0.4
						has_lover = no
						NOT = { trait = shy }
						war = no

						any_vassal = {
							has_character_flag = guest_feast_started

							any_child = {
								is_valid_romance_target = PREVPREV
								practical_age < 26
								fertility >= 0.4
								is_married = no
								is_betrothed = no
								has_lover = no
								is_abroad = no
								prisoner = no

								opinion = {
									who = PREVPREV
									value >= 20
								}

							}
						}
					}

					# Host "falls in love" with unmarried daughter of vassal
					character_event = { id = 72090 }
				}
				else = {
					any_child = {
						limit = {
							OR = {
								religion_group = christian
								religion_group = jewish_group
							}

							is_female = no
							is_vassal_or_below_of = ROOT

							trigger_if = {
								limit = { trait = chaste }

								is_married = no
								is_betrothed = no
							}

							is_adult = yes
							practical_age < 26
							fertility >= 0.4
							has_lover = no
							NOT = { trait = shy }

							ROOT = {
								any_vassal = {
									has_character_flag = guest_feast_started

									any_child = {
										is_valid_romance_target = PREVPREVPREV
										practical_age < 26
										fertility >= 0.4
										is_married = no
										is_betrothed = no
										has_lover = no
										is_abroad = no
										prisoner = no

										opinion = {
											who = PREVPREVPREV
											value >= 20
										}
									}
								}
							}
						}

						score_value = {
							value = 10
							interesting_courtier_selection_score = yes
						}

						# Host's son "falls in love" with unmarried daughter of vassal
						character_event = { id = 72090 }
					}
				}
			}

			100 = {
				# no event
			}
		}

		repeat_event = {
			id = 72995
			days = 5
			random = 5
		}
	}
}

# Main trigger for guest's feast events
character_event = {
	id = 72996

	hide_window = yes
	is_triggered_only = yes

	war = no
	prisoner = no
	only_capable = yes

	trigger = {
		vassal_of = event_target:feast_host
	}

	immediate = {
		random_list = {
			10 = {
				trigger = {
					liege = {
						has_character_flag = lavishly_food

						NOR = {
							has_character_modifier = feast_event_timer
							has_character_modifier = complain_food_timer
							has_character_modifier = compliment_food_timer
							has_opinion_modifier = { who = ROOT name = opinion_happy }
							has_opinion_modifier = { who = ROOT name = opinion_irritated }
						}
					}
				}

				mult_modifier = {
					factor = 2
					liege = { trait = gluttonous }
				}

				character_event = { id = 72020 } # Lavish Food
			}

			10 = {
				trigger = {
					liege = {
						has_character_flag = medium_food

						NOR = {
							has_character_modifier = feast_event_timer
							has_character_modifier = complain_food_timer
							has_character_modifier = compliment_food_timer
							has_opinion_modifier = { who = ROOT name = opinion_happy }
							has_opinion_modifier = { who = ROOT name = opinion_irritated }
						}
					}
				}

				character_event = { id = 72021 } # Medium Food
			}

			10 = {
				trigger = {
					liege = {
						has_character_flag = low_food

						NOR = {
							has_character_modifier = feast_event_timer
							has_character_modifier = complain_food_timer
							has_character_modifier = compliment_food_timer
							has_opinion_modifier = { who = ROOT name = opinion_happy }
							has_opinion_modifier = { who = ROOT name = opinion_irritated }
						}
					}
				}

				mult_modifier = {
					factor = 2
					liege = { trait = temperate }
				}

				character_event = { id = 72022 } # Low Food
			}

			5 = {
				trigger = {
					num_of_friends < 3
					NOT = { religion = cathar }

					liege = {
						NOT = { has_character_modifier = feast_event_timer }

						any_vassal = {
							has_character_flag = guest_feast_started
							is_adult = yes
							num_of_friends < 3

							NOR = {
								character = ROOT
								is_friend = ROOT
								is_rival = ROOT

								any_claim = {
									holder = ROOT
								}

								any_demesne_title = {
									claimed_by = ROOT
								}
							}
						}
					}
				}

				mult_modifier = {
					factor = 2
					trait = gregarious
				}

				mult_modifier = {
					factor = 2
					trait = trusting
				}

				mult_modifier = {
					factor = 0.5
					trait = shy
				}

				mult_modifier = {
					factor = 0.5
					trait = paranoid
				}

				character_event = { id = 72025 } # Late night talk
			}

			5 = {
				trigger = {
					martial >= 9

					OR = {
						trait = duelist
						trait = brave
						trait = wroth
						trait = cruel
					}

					trigger_if = {
						limit = { is_female = yes }

						OR = {
							trait = martial_lady
							trait = martial_lady_tengri
							trait = martial_lady_pagan
						}
					}

					NOR = {
						trait = wounded
						trait = craven
						religion = cathar
					}

					is_maimed_trigger = no

					liege = {
						any_vassal = {
							has_character_flag = guest_feast_started
							is_adult = yes

							trigger_if = {
								limit = { is_female = yes }

								OR = {
									trait = martial_lady
									trait = martial_lady_tengri
									trait = martial_lady_pagan
								}
							}

							can_be_maimed_trigger = yes

							NOR = {
								character = ROOT
								trait = wounded
							}

							reverse_opinion = {
								who = ROOT
								value < -50
							}

							opinion = {
								who = ROOT
								value < -50
							}
						}

						NOR = {
							has_character_flag = feast_duel
							has_character_modifier = feast_event_timer
						}
					}
				}

				mult_modifier = {
					factor = 2
					trait = brave
				}

				mult_modifier = {
					factor = 3
					has_focus = focus_war
				}

				character_event = { id = 72030 } # Duel
			}

			5 = {
				trigger = {
					practical_age < 60
					fertility >= 0.4
					is_pregnant = no
					NOT = { religion = cathar }

					trigger_if = {
						limit = {
							ai = yes

							OR = {
								has_lover = yes
								is_married = yes
							}
						}

						OR = {
							trait = lustful
							trait = hedonist
							trait = deceitful
							trait = master_seducer
							trait = master_seductress

							any_spouse = {
								reverse_opinion = {
									who = ROOT
									value < 0
								}
							}
						}
					}

					liege = {
						NOT = { has_character_modifier = feast_event_timer }

						any_vassal = {
							has_character_flag = guest_feast_started
							NOT = { character = ROOT }

							OR = {
								AND = {
									is_valid_romance_target = ROOT
									practical_age < 30
									prisoner = no
									is_pregnant = no
									is_abroad = no

									opinion = {
										who = ROOT
										value >= 20
									}

									NOR = {
										trait = celibate
										trait = eunuch
										is_married = ROOT
										is_lover = ROOT
									}
								}

								any_spouse = {
									is_valid_romance_target = ROOT
									practical_age < 30
									prisoner = no
									is_pregnant = no
									is_abroad = no

									opinion = {
										who = ROOT
										value >= 20
									}

									NOR = {
										trait = celibate
										trait = eunuch
										is_married = ROOT
										is_lover = ROOT
									}
								}
							}
						}
					}
				}

				mult_modifier = {
					factor = 4
					trait = lustful
				}

				mult_modifier = {
					factor = 3
					has_focus = focus_seduction
				}

				mult_modifier = {
					factor = 2
					trait = hedonist
				}

				mult_modifier = {
					factor = 0.1
					trait = chaste
				}

				liege = {
					any_vassal = {
						limit = {
							has_character_flag = guest_feast_started
							NOT = { character = ROOT }

							any_spouse = {
								is_valid_romance_target = ROOT
								practical_age < 30
								prisoner = no
								is_pregnant = no
								is_abroad = no

								opinion = {
									who = ROOT
									value >= 20
								}

								NOR = {
									trait = celibate
									trait = eunuch
								}
							}
						}

						score_value = {
							value = 10
				        	interesting_courtier_selection_score = yes
						}

						any_spouse = {
							limit = {
								is_valid_romance_target = ROOT
								practical_age < 30
								prisoner = no
								is_pregnant = no
								is_abroad = no

								opinion = {
									who = ROOT
									value >= 20
								}

								NOR = {
									trait = celibate
									trait = eunuch
								}
							}

							score_value = {
								value = 10
				        		interesting_courtier_selection_score = yes
							}

							save_event_target_as = target_pretty_guest_spouse
						}
					}

					any_vassal = {
						limit = {
							has_character_flag = guest_feast_started
							is_valid_romance_target = ROOT
							practical_age < 30
							prisoner = no
							is_pregnant = no
							is_abroad = no

							opinion = {
								who = ROOT
								value >= 20
							}

							NOR = {
								character = ROOT
								trait = celibate
								trait = eunuch
							}
						}

						score_value = {
							value = 10
				        	interesting_courtier_selection_score = yes
						}

						save_event_target_as = target_pretty_guest
					}

					character_event = { id = 72040 } # Friendly with another guest's spouse
				}
			}

			30 = {
				trigger = {
					NOT = { trait = drunkard }

					liege = {
						NOR = {
							has_character_modifier = feast_event_timer
							has_character_flag = feast_drunkard_guest
						}
					}
				}

				character_event = { id = 72045 } # Drink too much wine: become drunkard or insult host
			}

			10 = {
				trigger = {
					NOT = { trait = drunkard }

					liege = {
						NOR = {
							has_character_modifier = feast_event_timer
							has_character_flag = feast_drunkard_guest
						}
					}
				}

				character_event = { id = 72046 } # Drink too much wine: embarass yourself
			}

			10 = {
				trigger = {
					NOT = { trait = drunkard }

					liege = {
						NOR = {
							has_character_modifier = feast_event_timer
							has_character_flag = feast_drunkard_guest
						}
					}
				}

				character_event = { id = 72048 } # Drink too much wine: fall asleep
			}

			10 = {
				trigger = {
					liege = {
						location = {
							has_province_modifier = highway_robber_band
						}

						NOR = {
							has_character_modifier = feast_event_timer

							reverse_has_opinion_modifier = {
								name = opinion_dislike
								who = ROOT
							}
						}
					}
				}

				character_event = { id = 72050 } # Highway Robber Band: Guest Complains
			}

			10 = {
				trigger = {
					lower_real_tier_than = DUKE

					OR = {
						trait = wroth
						trait = cruel
						trait = impaler
					}

					NOT = { trait = just }

					liege = {
						personality_traits < 6

						NOR = {
							has_character_modifier = feast_event_timer

							location = {
								has_province_modifier = peasants_upset
							}
						}
					}
				}

				character_event = { id = 72055 } # Guest kills Host's servant
			}

			100 = {
				mult_modifier = {
					factor = 0.1
					ai = no
				}

				repeat_event = {
					id = 72996
					days = 5
					random = 10
				}
			}
		}
	}
}

# Lavish Food
character_event = {
	id = 72020
	desc = EVTDESC72020
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72020 # Approve publicly
		trigger = {
			NOT = { trait = temperate }
		}

		gain_weight_small_effect = yes
		weight_trait_check_effect = yes

		liege = {
			show_scope_change = no

			add_character_modifier = {
				name = compliment_food_timer
				days = 14
				hidden = yes
			}

			character_event = {
				id = 72023
				tooltip = EVTTOOLTIP72023 # Liege is glad you liked it
			}
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 5
				trait = gluttonous
			}
		}
	}

	option = {
		name = EVTOPTB72020 # Disapprove

		trigger = {
			NOT = { trait = gluttonous }
		}

		liege = {
			show_scope_change = no

			add_character_modifier = {
				name = complain_food_timer
				days = 14
				hidden = yes
			}

			character_event = {
				id = 72024
				tooltip = EVTTOOLTIP72024 # Liege dislike you complaining about the food
			}
		}

		ai_chance = {
			factor = 20

			mult_modifier = {
				factor = 5
				trait = temperate
			}
		}
	}

	option = {
		name = EVTOPTC72020

		prestige = -10
	}
}

# Medium Food
character_event = {
	id = 72021
	desc = EVTDESC72021
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72021 # Approve publicly

		liege = {
			show_scope_change = no

			add_character_modifier = {
				name = compliment_food_timer
				days = 14
				hidden = yes
			}

			character_event = {
				id = 72023
				tooltip = EVTTOOLTIP72023 # Liege is glad you liked it
			}
		}
	}

	option = {
		name = EVTOPTB72021 # Disapprove

		liege = {
			show_scope_change = no

			add_character_modifier = {
				name = complain_food_timer
				days = 14
				hidden = yes
			}

			character_event = {
				id = 72024
				tooltip = EVTTOOLTIP72024 # Liege dislike you complaining about the food
			}
		}
	}

	option = {
		name = EVTOPTC72021

		prestige = -10
	}
}

# Low Food
character_event = {
	id = 72022
	desc = EVTDESC72022
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72022 # Approve publicly

		trigger = {
			NOT = { trait = gluttonous }
		}

		liege = {
			show_scope_change = no

			add_character_modifier = {
				name = compliment_food_timer
				days = 14
				hidden = yes
			}

			character_event = {
				id = 72023
				tooltip = EVTTOOLTIP72023 # Liege is glad you liked it
			}
		}

		ai_chance = {
			factor = 20

			mult_modifier = {
				factor = 5
				trait = temperate
			}
		}
	}

	option = {
		name = EVTOPTB72022 # Disapprove

		trigger = {
			NOT = { trait = temperate }
		}

		liege = {
			show_scope_change = no

			add_character_modifier = {
				name = complain_food_timer
				days = 14
				hidden = yes
			}

			character_event = {
				id = 72024
				tooltip = EVTTOOLTIP72024 # Liege dislike you complaining about the food
			}
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 5
				trait = gluttonous
			}
		}
	}

	option = {
		name = EVTOPTC72022

		prestige = -10
	}
}

# Liege is glad you liked the food at the feast
character_event = {
	id = 72023
	desc = EVTDESC72023
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72023

		opinion = {
			name = opinion_happy
			who = FROM
			years = 10
		}

		reverse_opinion = {
			name = opinion_approves
			who = FROM
			years = 10
		}
	}
}

# Liege dislikes you complaining about the food at the feast
character_event = {
	id = 72024
	desc = EVTDESC72024
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72024

		opinion = {
			name = opinion_irritated
			who = FROM
			years = 10
		}

		reverse_opinion = {
			name = opinion_disapprove
			who = FROM
			years = 10
		}
	}
}

# Late night talk: First person
character_event = {
	id = 72025
	desc = EVTDESC72025
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72025

		liege = {
			show_scope_change = no

			random_vassal = {
				show_scope_change = no

				limit = {
					has_character_flag = guest_feast_started
					is_adult = yes
					num_of_friends < 3

					NOR = {
						character = ROOT
						is_friend = ROOT
						is_rival = ROOT

						any_claim = {
							holder = ROOT
						}

						any_demesne_title = {
							claimed_by = ROOT
						}
					}
				}

				add_friend = ROOT

				character_event = {
					id = 72026
					tooltip = EVTTOOLTIP72026
				}
			}
		}
	}
}

# Late night talk: Second person
character_event = {
	id = 72026
	desc = EVTDESC72026
	picture = GFX_evt_feast

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72026

		tooltip = {
			add_friend = FROM
		}
	}
}

# Duel: Start
character_event = {
	id = 72030
	desc = EVTDESC72030
	picture = GFX_evt_melee

	is_triggered_only = yes

	option = {
		name = EVTOPTA72030

		liege = {
			show_scope_change = no

			save_event_target_as = feast_duel_host
			set_character_flag = feast_duel

			random_vassal = {
				show_scope_change = no

				limit = {
					has_character_flag = guest_feast_started
					is_adult = yes
					can_be_maimed_trigger = yes

					trigger_if = {
						limit = { is_female = yes }

						OR = {
							trait = martial_lady
							trait = martial_lady_tengri
							trait = martial_lady_pagan
						}
					}

					NOR = {
						character = ROOT
						trait = wounded
					}

					reverse_opinion = {
						who = ROOT
						value < -50
					}

					opinion = {
						who = ROOT
						value < -50
					}
				}

				save_event_target_as = feast_duel_target

				character_event = {
					id = 72031
					tooltip = EVTTOOLTIP72031
				}
			}
		}
	}

	option = {
		name = EVTOPTB72030 # Decline
		prestige = -10
	}
}

# Duel: Accept or Decline
character_event = {
	id = 72031
	desc = EVTDESC72031
	picture = GFX_evt_melee

	is_triggered_only = yes

	immediate = {
		event_target:feast_duel_host = {
			character_event = {
				id = 72038 # Inform liege
			}
		}
	}

	option = {
		name = EVTOPTA72031 # Accept

		set_character_flag = feast_duelist
		FROM = { set_character_flag = feast_duelist }

		# Begin duel
		hidden_effect = {
			e_rebels = {
				holder_scope = {
					character_event = { id = DuelEngine.0 }
				}
			}
		}

		ai_chance = {
			factor = 100

			mult_modifier = {
				factor = 2
				trait = poor_warrior
			}

			mult_modifier = {
				factor = 3
				trait = trained_warrior
			}

			mult_modifier = {
				factor = 4
				trait = skilled_warrior
			}

			mult_modifier = {
				factor = 5
				trait = master_warrior
			}

			mult_modifier = {
				factor = 5
				trait = duelist
			}

			mult_modifier = {
				factor = 2
				trait = brave
			}

			mult_modifier = {
				factor = 2
				trait = proud
			}

			mult_modifier = {
				factor = 1.5
				trait = wroth
			}

			mult_modifier = {
				factor = 1.5
				is_strong_trigger = yes
			}
		}
	}

	option = {
		name = EVTOPTB72031 # Decline

		prestige = -10

		if = {
			limit = {
				NOT = { trait = craven }
			}

			random = {
				chance = 25
				add_trait = craven
			}
		}

		hidden_effect = {
			event_target:feast_duel_host = {
				character_event = {
					id = 72039 # Inform liege
					days = 1
				}
			}
		}

		clear_event_target = duel_challenger
		clear_event_target = feast_duel_target
		clear_event_target = feast_duel_host

		ai_chance = {
			factor = 100

			mult_modifier = {
				factor = 2
				FROM = { trait = poor_warrior }
			}

			mult_modifier = {
				factor = 3
				FROM = { trait = trained_warrior }
			}

			mult_modifier = {
				factor = 4
				FROM = { trait = skilled_warrior }
			}

			mult_modifier = {
				factor = 5
				FROM = { trait = master_warrior }
			}

			mult_modifier = {
				factor = 5
				FROM = { trait = duelist }
			}

			mult_modifier = {
				factor = 2
				FROM = { is_strong_trigger = yes }
			}

			mult_modifier = {
				factor = 2
				trait = craven
			}

			mult_modifier = {
				factor = 2
				trait = paranoid
			}

			mult_modifier = {
				factor = 2
				is_weak_trigger = yes
			}

			mult_modifier = {
				factor = 2
				trait = dwarf
			}

			mult_modifier = {
				factor = 2
				trait = hunchback
			}

			mult_modifier = {
				factor = 2
				trait = leper
			}

			mult_modifier = {
				factor = 2
				trait = wounded
			}

			mult_modifier = {
				factor = 4
				is_maimed_trigger = yes
			}
		}
	}
}

# Duel
character_event = {
	id = 72033
	desc = EVTDESC72033
	picture = GFX_evt_melee

	is_triggered_only = yes

	option = {
		name = EVTOPTA72033

		trigger = { has_character_flag = wounded_opponent }

		change_martial = 1
		clr_character_flag = wounded_opponent
		clr_character_flag = maimed_opponent
		clr_character_flag = killed_opponent

		event_target:feast_duel_host = {
			show_scope_change = no

			character_event = {
				id = 72036 # Inform liege
				tooltip = EVTTOOLTIP72036
			}
		}
	}

	option = {
		name = EVTOPTB72033

		trigger = { has_character_flag = maimed_opponent }

		change_martial = 2
		clr_character_flag = maimed_opponent

		event_target:feast_duel_host = {
			show_scope_change = no

			character_event = {
				id = 72037 # Inform liege
				tooltip = EVTTOOLTIP72037
			}
		}
	}

	option = {
		name = EVTOPTC72033

		trigger = { has_character_flag = killed_opponent }

		change_martial = 3
		clr_character_flag = killed_opponent

		event_target:feast_duel_host = {
			show_scope_change = no

			character_event = {
				id = 72035
				tooltip = EVTTOOLTIP72035
			}
		}

		hidden_effect = {
			if = {
				limit = {
					has_focus = focus_war
					has_dlc = "Way of Life"
				}

				character_event = {
					id = WoL.11200 # fire focus success
					days = 3
				}
			}
		}
	}
}

# Duel: The End (No harm)
character_event = {
	id = 72034
	desc = EVTDESC72034
	picture = GFX_evt_melee

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72034

		opinion = {
			name = opinion_dislike
			who = event_target:round_winner
			years = 10
		}

		reverse_opinion = {
			name = opinion_dislike
			who = event_target:round_winner
			years = 10
		}

		clear_event_target = round_winner
		clear_event_target = round_loser
		clear_event_target = feast_duel_host
	}
}

# Duel: The End (loser killed)
character_event = {
	id = 72035
	desc = EVTDESC72035
	picture = GFX_evt_melee

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72035

		opinion = {
			name = opinion_dislike
			who = event_target:round_winner
			years = 10
		}
	}

	option = {
		name = EVTOPTB72035

		opinion = {
			name = opinion_satisfied
			who = event_target:round_winner
			years = 10
		}
	}

	option = {
		name = EVTOPTC72035

		reverse_opinion = {
			name = opinion_dislike
			who = event_target:round_winner
			years = 10
		}
	}

	after = {
		clear_event_target = round_winner
		clear_event_target = round_loser
		clear_event_target = feast_duel_host
	}
}

# Duel: Liege is notified about wounded opponent
character_event = {
	id = 72036
	desc = EVTDESC72036
	picture = GFX_evt_melee

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72036

		opinion = {
			name = opinion_dislike
			who = event_target:round_winner
			years = 10
		}
	}

	option = {
		name = EVTOPTB72036

		opinion = {
			name = opinion_satisfied
			who = event_target:round_winner
			years = 10
		}
	}

	option = {
		name = EVTOPTC72036

		reverse_opinion = {
			name = opinion_dislike
			who = event_target:round_winner
			years = 10
		}
	}

	after = {
		clear_event_target = round_winner
		clear_event_target = round_loser
		clear_event_target = feast_duel_host
	}
}

# Duel: Liege is notified about maimed opponent
character_event = {
	id = 72037
	desc = EVTDESC72037
	picture = GFX_evt_melee

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72037

		opinion = {
			name = opinion_dislike
			who = event_target:round_winner
			years = 10
		}
	}

	option = {
		name = EVTOPTB72037

		opinion = {
			name = opinion_satisfied
			who = event_target:round_winner
			years = 10
		}
	}

	option = {
		name = EVTOPTC72037

		reverse_opinion = {
			name = opinion_dislike
			who = event_target:round_winner
			years = 10
		}
	}
}

# Liege is notified
character_event = {
	id = 72038
	desc = EVTDESC72038
	picture = GFX_evt_melee

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72038
	}
}

# Liege is notified - nothing happened
character_event = {
	id = 72039
	desc = EVTDESC72039
	picture = GFX_evt_melee

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72039
	}
}

# Friendly with another guest's spouse
character_event = {
	id = 72040
	desc = EVTDESC72040
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72040 # Both married

		trigger = {
			OR = {
				event_target:target_pretty_guest_spouse = {
					always = yes
				}

				event_target:target_pretty_guest = {
					is_married = yes
				}
			}

			is_married = yes

			trigger_if = {
				limit = { ai = yes }

				NOR = {
					trait = lustful
					trait = hedonist
					trait = deceitful
					trait = master_seducer
					trait = master_seductress
				}
			}
		}

		prestige = -5
	}

	option = {
		name = EVTOPTC72040 # Target married

		trigger = {
			OR = {
				event_target:target_pretty_guest_spouse = {
					always = yes
				}

				event_target:target_pretty_guest = {
					is_married = yes
				}
			}

			is_married = no

			trigger_if = {
				limit = { ai = yes }

				NOR = {
					trait = lustful
					trait = hedonist
					trait = deceitful
					trait = master_seducer
					trait = master_seductress
				}
			}
		}

		prestige = -5
	}

	option = {
		name = EVTOPTD72040 # Both single, bad idea anyway

		trigger = {
			event_target:target_pretty_guest = {
				is_married = no
			}

			is_married = no

			trigger_if = {
				limit = { ai = yes }

				NOR = {
					trait = lustful
					trait = hedonist
					trait = deceitful
					trait = master_seducer
					trait = master_seductress
				}
			}
		}

		prestige = -5
	}

	option = {
		name = EVTOPTB72040

		trigger = {
			event_target:target_pretty_guest_spouse = {
				always = yes
			}
		}

		event_target:target_pretty_guest_spouse = {
			show_scope_change = no

			character_event = {
				id = 72041
				tooltip = EVTTOOLTIP72041
			}
		}
	}

	option = {
		name = EVTOPTB72040

		trigger = {
			event_target:target_pretty_guest = {
				always = yes
			}
		}

		event_target:target_pretty_guest = {
			show_scope_change = no

			character_event = {
				id = 72041
				tooltip = EVTTOOLTIP72041
			}
		}
	}
}

# Spouse answers the 'invitation'
character_event = {
	id = 72041
	desc = EVTDESC72041
	picture = GFX_evt_lovers

	is_triggered_only = yes

	immediate = {
		clear_event_target = target_pretty_guest_spouse
		clear_event_target = target_pretty_guest
	}

	option = {
		name = EVTOPTA72041 # Tumble

		if = {
			limit = {
				same_sex = FROM
				NOT = { trait = homosexual }
			}

			random = {
				chance = 10

				add_trait = homosexual
				set_character_flag = revealed_homosexual@ROOT
			}
		}

		# Break up with an existing lover unless hedonist/etc.
		if = {
			limit = {
				has_lover = yes
				ai = yes

				any_lover = {
					NOR = {
						character = FROM
						is_married = ROOT
						is_consort = ROOT
					}

					ROOT = {
						likes_better_than = {
							who = FROM
							than = PREV
						}
					}
				}

				NOR = {
					trait = lustful
					trait = hedonist
					trait = deceitful
					trait = master_seducer
					trait = master_seductress
				}
			}

			random_lover = {
				limit = {
					NOR = {
						character = FROM
						is_married = ROOT
						is_consort = ROOT
					}

					ROOT = {
						likes_better_than = {
							who = FROM
							than = PREV
						}
					}
				}

				character_event = {
					id = WoL.1103
					days = 1
				}
			}
		}

		FROM = {
			# Possibility to become lovers
			character_event = { id = 72042 } # Become lovers?

			# Also advance WoL traits if applicable
			if = {
				limit = { has_dlc = "Way of Life" }
				character_event = { id = WoL.96 }
			}

			# Borrow WoL's "chance of pregnancy" code because it sanity checks gender/age/fertility
			character_event = { id = WoL.98 }
		}

		hidden_effect = {
			random = {
				chance = 50
				venereal_disease_effect = yes
			}
		}

		ai_chance = {
			factor = 50

			trigger = {
				trigger_if = {
					limit = { is_married = yes }

					OR = {
						any_spouse = {
							reverse_opinion = {
								who = ROOT
								value < 0
							}
						}

						trait = lustful
						trait = deceitful
						trait = hedonist
					}
				}
			}

			mult_modifier = {
				factor = 1.2
				FROM = { diplomacy >= 12 }
			}

			mult_modifier = {
				factor = 1.2
				FROM = { diplomacy >= 15 }
			}

			mult_modifier = {
				factor = 1.2
				FROM = { diplomacy >= 18 }
			}

			mult_modifier = {
				factor = 0.8
				FROM = { diplomacy < 8 }
			}

			mult_modifier = {
				factor = 0.8
				FROM = { diplomacy < 6 }
			}

			mult_modifier = {
				factor = 0.8
				FROM = { diplomacy < 4 }
			}

			mult_modifier = {
				factor = 0.5
				FROM = { diplomacy < 2 }
			}

			mult_modifier = {
				factor = 0.75
				NOT = { religion = FROM }
			}

			mult_modifier = {
				factor = 0.75
				NOT = { culture = FROM }
			}

			mult_modifier = {
				factor = 0.75
				NOT = { culture_group = FROM }
			}

			mult_modifier = {
				factor = 2.0

				OR = {
					is_female = no
					age >= 45
				}
			}

			mult_modifier = {
				factor = 0.25

				has_lover = yes

				NOR = {
					trait = lustful
					trait = deceitful
					trait = hedonist

					any_lover = {
						ROOT = {
							likes_better_than = {
								who = FROM
								than = PREV
							}
						}
					}
				}
			}

			mult_modifier = {
				factor = 0.25

				personal_opinion = {
					who = FROM
					value < 20
				}
			}

			mult_modifier = {
				factor = 1.5

				personal_opinion = {
					who = FROM
					value >= 40
				}
			}

			mult_modifier = {
				factor = 2.0

				personal_opinion = {
					who = FROM
					value >= 60
				}
			}

			mult_modifier = {
				factor = 1.5
				FROM = { has_character_modifier = wol_seducer_1 }
			}

			mult_modifier = {
				factor = 1.5
				FROM = { trait = attractive }
			}

			mult_modifier = {
				factor = 2.25
				FROM = { has_character_modifier = wol_seducer_2 }
			}

			mult_modifier = {
				factor = 5.0
				FROM = {
					OR = {
						trait = master_seducer
						trait = master_seductress
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTC72041

		piety = 5

		ai_chance = {
			factor = 150

			trigger = {
				NOR = {
					trait = lustful
					trait = hedonist
				}
			}
		}
	}
}

# Become lovers?
# old 72042 is obsolete (husband should find out through normal mechanics for cuckoo pregnancy. Or not.)
character_event = {
	id = 72042
	desc = EVTDESC72077
	picture = GFX_evt_lovers

	is_triggered_only = yes

	option = {
		name = EVTOPTA_WOL_306 # Love and leave

		custom_tooltip = { text = EVTOPTA_WOL_306_CUSTOM }

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 0.1
				num_of_lovers < 1
			}

			mult_modifier = {
				factor = 0.5
				trait = kind
			}

			mult_modifier = {
				factor = 10
				num_of_lovers >= 3
			}

			mult_modifier = {
				factor = 10
				num_of_lovers >= 5
			}

			mult_modifier = {
				factor = 10
				trait = cruel
			}

			mult_modifier = {
				factor = 2
				trait = arbitrary
			}

			mult_modifier = {
				factor = 2
				same_sex = FROM
			}

			mult_modifier = {
				factor = 2

				OR = {
					is_married = yes
					FROM = { is_married = yes }
				}
			}
		}
	}

	option = {
		name = EVTOPTB_WOL_306 # Our love must grow

		add_lover = FROM

		trigger = { is_valid_romance_target = FROM }

		ai_chance = { factor = 100 }
	}
}

# Drink too much wine: become drunkard or insult host
character_event = {
	id = 72045
	desc = EVTDESC72045
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72045

		random = {
			chance = 25
			add_trait_drunkard_effect = yes
		}
	}

	option = {
		name = EVTOPTB72045

		liege = {
			show_scope_change = no

			set_character_flag = feast_drunkard_guest

			character_event = {
				id = 72052
				tooltip = EVTTOOLTIP72052
			}
		}
	}
}

# Liege is insulted when guest refuses more wine
character_event = {
	id = 72052
	desc = EVTDESC72052
	picture = GFX_evt_drunk

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72052

		opinion = {
			name = opinion_insulted
			who = FROM
			years = 10
		}
	}
}

# Drink too much wine: Embarass yourself
character_event = {
	id = 72046
	desc = EVTDESC72046
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72046

		liege = {
			show_scope_change = no

			set_character_flag = feast_drunkard_guest

			character_event = {
				id = 72047
				tooltip = EVTTOOLTIP72047
			}

			job_treasurer = {
				show_scope_change = no

				if = {
					limit = {
						NOT = { trait = drunkard }
					}

					opinion = {
						name = opinion_dislike
						who = ROOT
						years = 10
					}
				}
			}
		}
	}
}

# Host is not happy about drunkard falling asleep
character_event = {
	id = 72047
	desc = EVTDESC72047
	picture = GFX_evt_drunk

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72047

		opinion = {
			name = opinion_disgusted
			who = FROM
			years = 10
		}
	}
}

# Drink too much wine: Fall asleep
character_event = {
	id = 72048
	desc = EVTDESC72048
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72048

		prestige = -10

		liege = {
			show_scope_change = no

			set_character_flag = feast_drunkard_guest

			character_event = {
				id = 72049
				tooltip = EVTTOOLTIP72049
			}

			opinion = {
				name = opinion_disgusted
				who = ROOT
				years = 10
			}
		}
	}
}

# Host is not happy about drunkard falling asleep
character_event = {
	id = 72049
	desc = EVTDESC72049
	picture = GFX_evt_drunk

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72049

		tooltip = {
			opinion = {
				name = opinion_disgusted
				who = FROM
				years = 10
			}
		}
	}
}

# Highway Robber Band: Guest Complains
character_event = {
	id = 72050
	desc = EVTDESC72050
	picture = GFX_evt_bandits

	is_triggered_only = yes

	option = {
		name = EVTOPTA72050

		liege = {
			show_scope_change = no

			character_event = {
				id = 72051
				tooltip = EVTTOOLTIP72051
			}
		}
	}
}

# Highway Robber Band: The End
character_event = {
	id = 72051
	desc = EVTDESC72051
	picture = GFX_evt_bandits

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72051

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_dislike
				who = ROOT
				years = 10
			}
		}
	}
}

# Guest kills Host's servant
character_event = {
	id = 72055
	desc = EVTDESC72055
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72055

		liege = {
			show_scope_change = no

			character_event = {
				id = 72056
				tooltip = EVTTOOLTIP72056
			}
		}
	}
}

# Guest kills Host's servant: Imprison?
character_event = {
	id = 72056
	desc = EVTDESC72056
	picture = GFX_evt_scandal

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { ai = no }

			add_character_modifier = {
				name = feast_event_timer
				days = 3
				hidden = yes
			}
		}
	}

	option = {
		name = EVTOPTA72056

		FROM = {
			show_scope_change = no

			imprison = ROOT

			opinion = {
				name = opinion_arrest_attempt
				who = ROOT
				years = 20
			}

			character_event = { id = 72057 }
		}

		add_trait_fully_silently_just_effect = yes
	}

	option = {
		name = EVTOPTC72056

		trigger = {
			OR = {
				intrigue >= 12
				diplomacy >= 12
			}
		}

		scaled_wealth = -0.20
	}

	option = {
		name = EVTOPTB72056

		add_trait_fully_silently_arbitrary_effect = yes

		location = {
			show_scope_change = no

			add_province_modifier = {
				name = peasants_upset
				months = 3
			}
		}
	}
}

# Guest kills Host's servant: The end
character_event = {
	id = 72057
	desc = EVTDESC72057
	picture = GFX_evt_into_the_dungeon

	is_triggered_only = yes

	option = {
		name = EVTOPTA72057

		opinion = {
			name = opinion_angry
			who = FROM
			years = 20
		}

		clr_character_flag = coming_to_feast
		clr_character_flag = guest_feast_started
		clr_character_flag = wounded_opponent
		clr_character_flag = maimed_opponent
		clr_character_flag = killed_opponent
		clr_character_flag = passionated_guest
	}
}

# Jester jokes about your rule
character_event = {
	id = 72060
	desc = EVTDESC72060
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	immediate = {
		random_courtier = {
			limit = {
				has_minor_title = title_court_jester

				opinion = {
					who = ROOT
					value < 25
				}
			}

			save_event_target_as = insulting_jester
		}
	}

	option = {
		name = EVTOPTA72060

		random = {
			chance = 20

			if = {
				limit = { trait = arbitrary }
				add_trait_fully_cruel_effect = yes
			}
			else_if = {
				limit = { trait = cruel }
				add_trait_fully_arbitrary_effect = yes
			}
		}

		event_target:insulting_jester = {
			show_scope_change = no

			opinion = {
				name = opinion_arrest_attempt
				who = ROOT
				years = 20
			}

			imprison = ROOT
		}

		any_vassal = {
			show_scope_change = no

			limit = { has_character_flag = guest_feast_started }

			character_event = {
				id = 72061
				tooltip = EVTTOOLTIP72061
			}

			opinion = {
				name = opinion_disappointed
				who = ROOT
				years = 10
			}
		}
	}

	option = {
		name = EVTOPTB72060

		prestige = -10

		any_vassal = {
			show_scope_change = no

			limit = { has_character_flag = guest_feast_started }

			character_event = {
				id = 72062
				tooltip = EVTTOOLTIP72062
			}

			opinion = {
				name = opinion_approves
				who = ROOT
				years = 10
			}
		}
	}
}

# Jester is thrown into dungeon: Guests react
character_event = {
	id = 72061
	desc = EVTDESC72061
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72061

		tooltip = {
			opinion = {
				name = opinion_disappointed
				who = FROM
				years = 10
			}
		}
	}
}

# Jester is ignored: Guests react
character_event = {
	id = 72062
	desc = EVTDESC72062
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72062

		tooltip = {
			opinion = {
				name = opinion_approves
				who = FROM
				years = 10
			}
		}
	}
}

# Jongleurs entertain the guests
character_event = {
	id = 72063
	desc = EVTDESC72063
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	immediate = {
		clr_character_flag = feast_jongleur
	}

	option = {
		name = EVTOPTA72063

		prestige = 10

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_gregarious_effect = yes
			}
		}

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_charitable_effect = yes
			}
		}

		random_vassal = {
			show_scope_change = no

			limit = { has_character_flag = guest_feast_started }

			character_event = {
				id = 72064
				tooltip = EVTTOOLTIP72064
			}

			opinion = {
				name = opinion_approves
				who = ROOT
				years = 10
			}
		}
	}
}

# Visitor likes jongleurs
character_event = {
	id = 72064
	desc = EVTDESC72064
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72064

		tooltip = {
			opinion = {
				name = opinion_approves
				who = FROM
				years = 10
			}
		}
	}
}

# Minstrel entertain the guests
character_event = {
	id = 72065
	desc = EVTDESC72065
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		clr_character_flag = feast_minstrel
	}

	option = {
		name = EVTOPTA72065

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_gregarious_effect = yes
			}
		}

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_charitable_effect = yes
			}
		}

		prestige = 10

		random_vassal = {
			show_scope_change = no

			limit = { has_character_flag = guest_feast_started }

			character_event = {
				id = 72066
				tooltip = EVTTOOLTIP72066
			}

			opinion = {
				name = opinion_approves
				who = ROOT
				years = 10
			}
		}
	}
}

# Visitor likes minstrel
character_event = {
	id = 72066
	desc = EVTDESC72066
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72066

		tooltip = {
			opinion = {
				name = opinion_approves
				who = FROM
				years = 10
			}
		}
	}
}

# Musicians entertain the guests
character_event = {
	id = 72067
	desc = EVTDESC72067
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		clr_character_flag = feast_musicians
	}

	option = {
		name = EVTOPTA72067

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_gregarious_effect = yes
			}
		}

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_charitable_effect = yes
			}
		}

		prestige = 10

		random_vassal = {
			show_scope_change = no

			limit = { has_character_flag = guest_feast_started }

			character_event = {
				id = 72068
				tooltip = EVTTOOLTIP72068
			}

			opinion = {
				name = opinion_approves
				who = ROOT
				years = 10
			}
		}
	}
}

# Visitor likes musicians
character_event = {
	id = 72068
	desc = EVTDESC72068
	picture = GFX_evt_feast

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72068

		tooltip = {
			opinion = {
				name = opinion_approves
				who = FROM
				years = 10
			}
		}
	}
}

# Fire-eaters entertain the guests
character_event = {
	id = 72069
	desc = EVTDESC72069
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		clr_character_flag = feast_fireeaters
	}

	option = {
		name = EVTOPTA72069

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_gregarious_effect = yes
			}
		}

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_charitable_effect = yes
			}
		}

		prestige = 10

		random_vassal = {
			show_scope_change = no

			limit = { has_character_flag = guest_feast_started }

			character_event = {
				id = 72070
				tooltip = EVTTOOLTIP72070
			}

			opinion = {
				name = opinion_approves
				who = ROOT
				years = 10
			}
		}
	}
}

# Visitor likes fire-eaters
character_event = {
	id = 72070
	desc = EVTDESC72070
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72070

		tooltip = {
			opinion = {
				name = opinion_approves
				who = FROM
				years = 10
			}
		}
	}
}

# Conjurer entertain the guests
character_event = {
	id = 72071
	desc = EVTDESC72071
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		clr_character_flag = feast_conjurer
	}

	option = {
		name = EVTOPTA72071

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_gregarious_effect = yes
			}
		}

		if = {
			limit = { personality_traits < 5 }

			random = {
				chance = 25
				add_trait_fully_charitable_effect = yes
			}
		}

		prestige = 10

		random_vassal = {
			show_scope_change = no

			limit = { has_character_flag = guest_feast_started }

			character_event = {
				id = 72072
				tooltip = EVTTOOLTIP72072
			}

			opinion = {
				name = opinion_approves
				who = ROOT
				years = 10
			}
		}
	}
}

# Visitor likes Conjurer
character_event = {
	id = 72072
	desc = EVTDESC72072
	picture = GFX_evt_feast

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72072

		tooltip = {
			opinion = {
				name = opinion_approves
				who = FROM
				years = 10
			}
		}
	}
}

# Travelling Acrobats
character_event = {
	id = 4160
	desc = EVTDESC4160
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	immediate = {
		clr_character_flag = feast_acrobats

		random_vassal = {
			limit = { has_character_flag = guest_feast_started }
			character_event = { id = 72115 }
		}
	}

	option = {
		name = EVTOPTD4160

		prestige = 10
	}
}

# Visitor likes acrobats
character_event = {
	id = 72115
	desc = EVTDESC72115
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	option = {
		name = EVTOPTA72115

		opinion = {
			name = opinion_approves
			who = FROM
			years = 10
		}

		FROM = {
			character_event = { id = 72116 }
		}
	}
}

# Liege likes that visitor likes acrobats
character_event = {
	id = 72116
	desc = EVTDESC72116
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	option = {
		name = EVTOPTA72116

		opinion = {
			name = opinion_approves
			who = FROM
			years = 10
		}
	}
}

# Travelling Dancers
character_event = {
	id = 4165
	desc = EVTDESC4165
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	immediate = {
		clr_character_flag = feast_dancers
	}

	option = {
		name = EVTOPTA4165

		prestige = 15
	}
}

# Friendly with another guest's spouse
character_event = {
	id = 72075
	picture = GFX_evt_feast

	desc = {
		text = EVTDESC72075
		trigger = {
			prefers_men_trigger = no
		}
	}

	desc = {
		text = EVTDESC72075_male
		trigger = {
			prefers_men_trigger = yes
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTA72075

		prestige = -5
	}

	option = {
		name = EVTOPTB72075

		trigger = {
			event_target:pretty_vassal_spouse = {
				always = yes
			}
		}

		event_target:pretty_vassal_spouse = {
			show_scope_change = no

			character_event = {
				id = 72076
				tooltip = EVTTOOLTIP72076
			}
		}
	}

	option = {
		name = EVTOPTB72075

		trigger = {
			event_target:pretty_single_vassal = {
				always = yes
			}
		}

		event_target:pretty_single_vassal = {
			show_scope_change = no

			character_event = {
				id = 72076
				tooltip = EVTTOOLTIP72076
			}
		}
	}

	option = {
		name = EVTOPTB72075

		trigger = {
			event_target:pretty_married_vassal = {
				always = yes
			}
		}

		event_target:pretty_married_vassal = {
			show_scope_change = no

			character_event = {
				id = 72076
				tooltip = EVTTOOLTIP72076
			}
		}
	}
}

# Spouse answers the 'invitation'
character_event = {
	id = 72076
	desc = EVTDESC72076
	picture = GFX_evt_lovers

	is_triggered_only = yes

	immediate = {
		clear_event_target = pretty_married_vassal
		clear_event_target = pretty_single_vassal
		clear_event_target = pretty_vassal_spouse
	}

	option = {
		name = EVTOPTA72076 # Tumble

		if = {
			limit = {
				same_sex = FROM
				NOT = { trait = homosexual }
			}

			random = {
				chance = 10
				add_trait = homosexual
				set_character_flag = revealed_homosexual@ROOT
			}
		}

		# Break up with an existing lover unless hedonist/etc.
		if = {
			limit = {
				has_lover = yes
				ai = yes

				any_lover = {
					NOR = {
						character = FROM
						is_married = ROOT
						is_consort = ROOT
					}

					ROOT = {
						likes_better_than = {
							who = FROM
							than = PREV
						}
					}
				}

				NOR = {
					trait = lustful
					trait = hedonist
					trait = deceitful
					trait = master_seducer
					trait = master_seductress
				}
			}

			random_lover = {
				limit = {
					NOR = {
						character = FROM
						is_married = ROOT
						is_consort = ROOT
					}

					ROOT = {
						likes_better_than = {
							who = FROM
							than = PREV
						}
					}
				}

				character_event = {
					id = WoL.1103
					days = 1
				}
			}
		}

		FROM = {
			# Chance to become lovers
			character_event = { id = 72077 }

			# Also advance WoL traits if applicable
			if = {
				limit = { has_dlc = "Way of Life"}
				character_event = { id = WoL.96 }
			}

			# Borrow WoL's "chance of pregnancy" code because it sanity checks gender/age/fertility
			character_event = { id = WoL.98 }
		}

		ai_chance = {
			factor = 50

			trigger = {
				trigger_if = {
					limit = { is_married = yes }

					OR = {
						trait = lustful
						trait = deceitful
						trait = hedonist

						any_spouse = {
							reverse_opinion = {
								who = ROOT
								value < 0
							}
						}
					}
				}
			}

			mult_modifier = {
				factor = 1.2
				FROM = { diplomacy >= 12 }
			}

			mult_modifier = {
				factor = 1.2
				FROM = { diplomacy >= 15 }
			}

			mult_modifier = {
				factor = 1.2
				FROM = { diplomacy >= 18 }
			}

			mult_modifier = {
				factor = 0.8
				FROM = { diplomacy < 8 }
			}

			mult_modifier = {
				factor = 0.8
				FROM = { diplomacy < 6 }
			}

			mult_modifier = {
				factor = 0.8
				FROM = { diplomacy < 4 }
			}

			mult_modifier = {
				factor = 0.5
				FROM = { diplomacy < 2 }
			}

			mult_modifier = {
				factor = 0.5
				NOT = { trait = homosexual }
				same_sex = FROM
			}

			mult_modifier = {
				factor = 0.75
				NOT = { religion = FROM }
			}

			mult_modifier = {
				factor = 0.75
				NOT = { culture = FROM }
			}

			mult_modifier = {
				factor = 0.75
				NOT = { culture_group = FROM }
			}

			mult_modifier = {
				factor = 2.0

				OR = {
					is_female = no
					practical_age >= 45
				}
			}

			mult_modifier = {
				factor = 0.25

				has_lover = yes

				NOR = {
					trait = lustful
					trait = deceitful
					trait = hedonist

					any_lover = {
						ROOT = {
							likes_better_than = {
								who = FROM
								than = PREV
							}
						}
					}
				}
			}

			mult_modifier = {
				factor = 0.25

				personal_opinion = {
					who = FROM
					value < 20
				}
			}

			mult_modifier = {
				factor = 1.5

				personal_opinion = {
					who = FROM
					value >= 40
				}
			}

			mult_modifier = {
				factor = 2.0

				personal_opinion = {
					who = FROM
					value >= 60
				}
			}

			mult_modifier = {
				factor = 1.5
				FROM = { has_character_modifier = wol_seducer_1 }
			}

			mult_modifier = {
				factor = 1.5
				FROM = { trait = attractive }
			}

			mult_modifier = {
				factor = 2.25
				FROM = { has_character_modifier = wol_seducer_2 }
			}

			mult_modifier = {
				factor = 5.0

				FROM = {
					OR = {
						trait = master_seducer
						trait = master_seductress
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTB72076

		piety = 5

		ai_chance = {
			factor = 150

			trigger = {
				NOR = {
					trait = lustful
					trait = hedonist
				}
			}
		}
	}
}

# Become lovers?
# Old 72077 is obsolete (husband should find out through normal mechanics for cuckoo pregnancy. Or not.)
character_event = {
	id = 72077
	desc = EVTDESC72077
	picture = GFX_evt_lovers

	is_triggered_only = yes

	option = {
		name = EVTOPTA_WOL_306 # Love and leave

		custom_tooltip = { text = EVTOPTA_WOL_306_CUSTOM }

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 0.1
				num_of_lovers < 1
			}

			mult_modifier = {
				factor = 0.5
				trait = kind
			}

			mult_modifier = {
				factor = 10
				num_of_lovers >= 3
			}

			mult_modifier = {
				factor = 10
				num_of_lovers >= 5
			}

			mult_modifier = {
				factor = 10
				trait = cruel
			}

			mult_modifier = {
				factor = 2
				trait = arbitrary
			}

			mult_modifier = {
				factor = 2
				same_sex = FROM
			}

			mult_modifier = {
				factor = 2

				OR = {
					is_married = yes
					FROM = { is_married = yes }
				}
			}
		}
	}

	option = {
		name = EVTOPTB_WOL_306 # Our love must grow

		trigger = { is_valid_romance_target = FROM }

		add_lover = FROM

		ai_chance = { factor = 100 }
	}
}

# Late night talk: First person
character_event = {
	id = 72080
	desc = EVTDESC72080
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72080

		random_vassal = {
			show_scope_change = no

			limit = {
				has_character_flag = guest_feast_started
				num_of_friends < 3

				NOR = {
					is_friend = ROOT
					is_rival = ROOT
				}
			}

			add_friend = ROOT

			character_event = {
				id = 72081
				tooltip = EVTTOOLTIP72081
			}
		}
	}
}

# Late night talk: Second person
character_event = {
	id = 72081
	desc = EVTDESC72081
	picture = GFX_evt_feast

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72081

		tooltip = {
			add_friend = FROM
		}
	}
}

# Claim on visitor's title
character_event = {
	id = 72085
	desc = EVTDESC72085
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		set_character_flag = guest_claim_event

		random_claim = {
			limit = {
				ROOT = { has_strong_claim = PREV }
				can_be_given_away = yes

				holder_scope = {
					has_character_flag = guest_feast_started
					vassal_of = ROOT
				}
			}

			holder_scope = {
				save_event_target_as = claimant_guest
			}
		}
	}

	option = {
		name = EVTOPTA72085

		prestige = -10

		event_target:claimant_guest = {
			show_scope_change = no

			opinion = {
				name = opinion_arrest_attempt
				who = ROOT
				years = 20
			}

			imprison = ROOT
			character_event = { id = 72089 }
		}

		any_vassal = {
			show_scope_change = no

			limit = {
				has_character_flag = guest_feast_started
				NOT = { character = event_target:claimant_guest }
			}

			opinion = {
				name = opinion_angry
				who = ROOT
				years = 10
			}
		}
	}

	option = {
		name = EVTOPTB72085

		event_target:claimant_guest = {
			show_scope_change = no

			character_event = {
				id = 72086
				tooltip = EVTTOOLTIP72086
			}
		}
	}

	option = {
		name = EVTOPTC72085

		prestige = -10

		random_claim = {
			show_scope_change = no

			limit = {
				ROOT = { has_strong_claim = PREV }
				can_be_given_away = yes
				holder = event_target:claimant_guest
			}

			remove_claim = ROOT
		}
	}
}

# Vassal decides if any_liege gets title
character_event = {
	id = 72086
	desc = EVTDESC72086
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72086 # Grant any_liege title

		character_event = {
			id = 72087
			tooltip = EVTTOOLTIP72087
		}
	}

	option = {
		name = EVTOPTB72086 # Refuse

		character_event = {
			id = 72088
			tooltip = EVTTOOLTIP72088
		}
	}
}

# Liege gets title
character_event = {
	id = 72087
	desc = EVTDESC72087
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72087

		random_claim = {
			show_scope_change = no

			limit = {
				ROOT = { has_strong_claim = PREV }
				can_be_given_away = yes
				holder = FROM
			}

			grant_title = ROOT
		}
	}
}

# Liege does not get title
character_event = {
	id = 72088
	desc = EVTDESC72088
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72088

		opinion = {
			name = opinion_disappointed
			who = FROM
			years = 20
		}
	}
}

# Imprisoned by liege who wants title
character_event = {
	id = 72089
	desc = EVTDESC72089
	picture = GFX_evt_into_the_dungeon

	is_triggered_only = yes

	option = {
		name = EVTOPTA72089

		tooltip = {
			imprison = FROM
		}
	}

	option = {
		name = EVTOPTB72089

		FROM = {
			show_scope_change = no

			random_claim = {
				show_scope_change = no

				limit = {
					FROM = { has_strong_claim = PREV }
					can_be_given_away = yes
					holder = ROOT
				}

				grant_title = FROM
			}
		}

		imprison = no
	}
}

# Host or Host's son "falls in love" with unmarried daughter of vassal
character_event = {
	id = 72090
	desc = EVTDESC72090
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		if = {
			limit = {
				character = event_target:feast_host
				has_living_children = no
			}

			random_vassal = {
				limit = {
					has_character_flag = guest_feast_started

					any_child = {
						is_valid_romance_target = ROOT
						practical_age < 26
						fertility >= 0.4
						is_married = no
						is_pregnant = no
						is_betrothed = no
						has_lover = no
						is_abroad = no
						prisoner = no

						opinion = {
							who = ROOT
							value >= 20
						}
					}
				}

				any_child = {
					limit = {
						is_valid_romance_target = ROOT
						practical_age < 26
						fertility >= 0.4
						is_married = no
						is_pregnant = no
						is_betrothed = no
						has_lover = no
						is_abroad = no
						prisoner = no

						opinion = {
							who = ROOT
							value >= 20
						}
					}

					score_value = {
						value = 10
						interesting_courtier_selection_score = yes
					}

					save_event_target_as = vassals_daughter
					save_event_target_as = sex_partner
				}
			}
		}
		else = {
			father = {
				random_vassal = {
					limit = {
						has_character_flag = guest_feast_started

						any_child = {
							is_valid_romance_target = ROOT
							practical_age < 26
							fertility = 0.4
							is_married = no
							is_pregnant = no
							is_betrothed = no
							has_lover = no
							is_abroad = no
							prisoner = no

							opinion = {
								who = ROOT
								value >= 20
							}
						}
					}

					any_child = {
						limit = {
							is_valid_romance_target = ROOT
							practical_age < 26
							fertility = 0.4
							is_married = no
							is_pregnant = no
							is_betrothed = no
							has_lover = no
							is_abroad = no
							prisoner = no

							opinion = {
								who = ROOT
								value >= 20
							}
						}

						score_value = {
							value = 10
							interesting_courtier_selection_score = yes
						}

						save_event_target_as = vassals_daughter
						save_event_target_as = sex_partner
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTA72090 # Flirt

		event_target:guest_daughter = {
			show_scope_change = no

			opinion = {
				name = opinion_flattered
				who = ROOT
				years = 10
			}
		}

		event_target:guest_father = {
			show_scope_change = no

			character_event = {
				id = 72091
				tooltip = EVTTOOLTIP72091
			}
		}
	}

	option = {
		name = EVTOPTB72090 # Tumble

		prestige = 15

		hidden_effect = {
			unprotected_sex_effect_event_target = yes
		}

		event_target:vassals_daughter = {
			show_scope_change = no

			if = {
				limit = { is_pregnant = yes }

				ROOT = {
					save_event_target_as = impregnated_vassal_daughter
				}

				father = {
					character_event = {
						id = 72097
						days = 60
						random = 15
					}
				}
			}

			add_lover = ROOT

			father = {
				show_scope_change = no

				character_event = {
					id = 72092
					tooltip = EVTTOOLTIP72092
				}
			}
		}
	}
}

# Liege or liege's son flirted with my daughter! I'm so proud!
character_event = {
	id = 72091
	desc = EVTDESC72091
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72091

		prestige = 10
	}
}

# Liege or liege's son seduced my daughter!
character_event = {
	id = 72092
	desc = EVTDESC72092
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72092

		trigger = {
			FROM = {
				NOT = { character = event_target:feast_host }
			}
		}

		prestige = -10

		FROM = {
			show_scope_change = no

			father = {
				show_scope_change = no

				character_event = {
					id = 72093
					tooltip = EVTTOOLTIP72093
				}
			}
		}
	}

	option = {
		name = EVTOPTB72092

		trigger = {
			FROM = {
				character = event_target:feast_host
			}
		}

		prestige = -10

		FROM = {
			show_scope_change = no

			character_event = {
				id = 72094
				tooltip = EVTTOOLTIP72094
			}
		}
	}

	option = {
		name = EVTOPTC72092 # Grovel

		trigger = {
			FROM = {
				NOT = { character = event_target:feast_host }
			}
		}

		prestige = -10

		FROM = {
			show_scope_change = no

			father = {
				show_scope_change = no

				character_event = {
					id = 72095
					tooltip = EVTTOOLTIP72095
				}
			}
		}
	}

	option = {
		name = EVTOPTD72092 # Grovel

		trigger = {
			FROM = {
				character = event_target:feast_host
			}
		}

		prestige = -10

		FROM = {
			show_scope_change = no

			character_event = {
				id = 72096
				tooltip = EVTTOOLTIP72096
			}
		}
	}
}

# My son seduced a vassal's daughter and now he's angry
character_event = {
	id = 72093
	desc = EVTDESC72093
	picture = GFX_evt_pregnancy

	is_triggered_only = yes

	option = {
		name = EVTOPTA72093

		opinion = {
			name = opinion_angry
			who = FROM
			years = 10
		}

		reverse_opinion = {
			name = opinion_angry
			who = FROM
			years = 10
		}
	}
}

# I seduced a vassal's daughter and now he's angry
character_event = {
	id = 72094
	desc = EVTDESC72094
	picture = GFX_evt_pregnancy

	is_triggered_only = yes

	option = {
		name = EVTOPTA72094

		opinion = {
			name = opinion_angry
			who = FROM
			years = 10
		}

		reverse_opinion = {
			name = opinion_angry
			who = FROM
			years = 10
		}
	}
}

# My son seduced a vassal's daughter and he is upset
character_event = {
	id = 72095
	desc = EVTDESC72095
	picture = GFX_evt_pregnancy

	is_triggered_only = yes

	option = {
		name = EVTOPTA72095

		reverse_opinion = {
			name = opinion_upset
			who = FROM
			years = 10
		}
	}
}

# I seduced a vassal's daughter and he is upset
character_event = {
	id = 72096
	desc = EVTDESC72096
	picture = GFX_evt_pregnancy

	is_triggered_only = yes

	option = {
		name = EVTOPTA72096

		reverse_opinion = {
			name = opinion_upset
			who = FROM
			years = 10
		}
	}
}

# Two months later...
character_event = {
	id = 72097
	desc = EVTDESC72097
	picture = GFX_evt_pregnancy

	is_triggered_only = yes

	prisoner = no

	trigger = {
		event_target:vassals_daughter = {
			is_alive = yes
			is_pregnant = yes
			is_married = no
			is_betrothed = no
		}

		FROM = {
			is_married = no
			is_betrothed = no
			NOT = { war_with = ROOT }
		}
	}

	option = {
		name = {
			text = EVTOPTA72097 # The seducer (FROM) must marry my daughter!
			trigger = { vassal_of = FROM }
		}
		name = {
			text = EVTOPTB72097 # My liege must order the seducer (FROM) to marry my daughter!
			trigger = {
				NOT = { vassal_of = FROM }
			}
		}

		FROM = {
			show_scope_change = no

			if = {
				limit = { is_liege_of = ROOT }

				character_event = {
					id = 72098
					tooltip = EVTTOOLTIP72098
				}
			}
			else = {
				character_event = {
					id = 72099
					tooltip = EVTTOOLTIP72099
				}
			}
		}
	}

	option = {
		name = EVTOPTC72097 # Hold my anger

		prestige = 10
	}
}

# FROM demands ROOT to marry pregnant daughter
character_event = {
	id = 72098
	desc = EVTDESC72098
	picture = GFX_evt_marriage

	is_triggered_only = yes

	option = {
		name = EVTOPTA72098 # Accept

		add_spouse = event_target:vassals_daughter
	}

	option = {
		name = EVTOPTB72098 # Refuse

		reverse_opinion = {
			name = grievously_offended
			who = FROM
			years = 20
		}
	}
}

# FROM demands ROOT to marry pregnant daughter with his son
character_event = {
	id = 72099
	desc = EVTDESC72099
	picture = GFX_evt_marriage

	is_triggered_only = yes

	option = {
		name = EVTOPTA72099 # Accept

		event_target:impregnated_vassal_daughter = {
			show_scope_change = no

			character_event = {
				id = 72100
				tooltip = EVTTOOLTIP72100
			}
		}
	}

	option = {
		name = EVTOPTB72099 # Refuse

		reverse_opinion = {
			name = grievously_offended
			who = FROM
			years = 20
		}
	}
}

# Liege's son marries vassal's pregnant daughter
character_event = {
	id = 72100
	desc = EVTDESC72100
	picture = GFX_evt_marriage

	is_triggered_only = yes

	option = {
		name = EVTOPTA72100 # Accept

		add_spouse = event_target:vassals_daughter
	}
}

###################################
# Events to end the Feast
###################################

# The feast has ended
character_event = {
	id = 72110
	desc = EVTDESC72110
	picture = GFX_evt_feast

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { has_character_flag = nerthus_feast }

			clr_character_flag = nerthus_feast

			narrative_event = {
				id = Plus.2352
				days = 10
				random = 20
			}
		}
	}

	option = {
		name = EVTOPTA72110

		prestige = 10

		if = {
			limit = {
				trigger_if = {
					limit = { has_character_flag = feast_mood_boost }

					had_character_flag = {
						flag = feast_mood_boost
						years >= 5
					}
				}
			}

			set_character_flag = feast_mood_boost
			pf_court_plus2_effect = yes
		}

		hidden_effect = {
			change_variable = {
				which = lifestyle_hedonist
				value = 1
			}

			remove_character_modifier = holding_large_feast
			remove_do_not_disturb_effect = yes
			clr_character_flag = sent_invitations
			clr_character_flag = host_feast_started
			clr_character_flag = feast_jongleur
			clr_character_flag = feast_musicians
			clr_character_flag = dealt_with_robber_band
			clr_character_flag = guest_daughter_event
			clr_character_flag = guest_claim_event
			clr_character_flag = feast_minstrel
			clr_character_flag = feast_fireeaters
			clr_character_flag = feast_conjurer
			clr_character_flag = feast_acrobats
			clr_character_flag = feast_dancers
			clr_character_flag = lavishly_food
			clr_character_flag = medium_food
			clr_character_flag = low_food
			clr_character_flag = castle_problems
			clr_character_flag = feast_jester
			clr_character_flag = feast_drunkard_guest
			clr_character_flag = feast_duel
			clr_character_flag = feast_boar_hunt

			# CK2Plus
			clr_character_flag = nerthus_feast
			clr_character_flag = planning_feast
			set_character_flag = held_recent_feast
		}

		custom_tooltip = {
			text = EVTOPTA72110_TOOLTIP

			any_vassal = {
				limit = { has_character_flag = guest_feast_started }

				character_event = {
					id = 72111
					# tooltip = EVTTOOLTIP72111
				}

				remove_opinion = {
					name = opinion_enjoyed_feast
					who = ROOT
				}

				opinion = {
					name = opinion_enjoyed_feast
					who = ROOT
					years = 2
				}

				remove_do_not_disturb_effect = yes
				clr_character_flag = coming_to_feast
				clr_character_flag = guest_feast_started
				clr_character_flag = wounded_opponent
				clr_character_flag = maimed_opponent
				clr_character_flag = killed_opponent
				clr_character_flag = passionated_guest
			}
		}
	}
}

# Vassal: Feast ended
character_event = {
	id = 72111
	desc = EVTDESC72111
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72111

		prestige = 5
	}
}

character_event = {
	id = 72114

	hide_window = yes
	is_triggered_only = yes # on_war_started

	immediate = {
		ROOT = {
			if = {
				limit = {
					OR = {
						has_character_modifier = holding_large_feast
						has_character_flag = planning_feast
						has_character_flag = celebrating_nowruz
					}
				}

				character_event = { id = 72112 }
			}
		}

		FROM = {
			if = {
				limit = {
					OR = {
						has_character_modifier = holding_large_feast
						has_character_flag = planning_feast
						has_character_flag = celebrating_nowruz
					}
				}

				character_event = { id = 72112 }
			}
		}
	}
}

# The feast is cancelled due to war
character_event = {
	id = 72112
	desc = EVTDESC72112
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA72112

		if = {
			limit = { has_character_flag = nerthus_feast }
			piety = -100
		}

		if = {
			limit = { has_character_flag = planning_feast }
			clr_character_flag = planning_feast
			scaled_wealth = 0.25
		}

		if = {
			limit = { has_character_flag = celebrating_nowruz }

			piety = -5

			hidden_effect = {
				add_character_modifier = {
					name = feast_event_timer
					months = 1
				}
			}
		}

		hidden_effect = {
			remove_do_not_disturb_effect = yes
			remove_character_modifier = holding_large_feast
			clr_character_flag = planning_feast
			clr_character_flag = nerthus_feast
			clr_character_flag = sent_invitations
			clr_character_flag = host_feast_started
			clr_character_flag = feast_jongleur
			clr_character_flag = feast_musicians
			clr_character_flag = dealt_with_robber_band
			clr_character_flag = guest_daughter_event
			clr_character_flag = guest_claim_event
			clr_character_flag = feast_minstrel
			clr_character_flag = feast_fireeaters
			clr_character_flag = feast_conjurer
			clr_character_flag = feast_acrobats
			clr_character_flag = feast_dancers
			clr_character_flag = lavishly_food
			clr_character_flag = medium_food
			clr_character_flag = low_food
			clr_character_flag = castle_problems
			clr_character_flag = feast_jester
			clr_character_flag = feast_drunkard_guest
			clr_character_flag = feast_duel
			clr_character_flag = feast_boar_hunt
			clr_character_flag = celebrating_nowruz

			clear_delayed_event = { id = 72109 } # Starting the feast
			clear_delayed_event = { id = 72003 } # food preparations
			clear_delayed_event = { id = 72010 } # send invitations
			clear_delayed_event = { id = 72997 } # pre feast events
			clear_delayed_event = { id = 72995 } # main feast events for host
			clear_delayed_event = { id = 72110 } # The feast has ended
		}

		any_realm_lord = {
			limit = {
				OR = {
					has_character_flag = coming_to_feast
					has_character_flag = guest_feast_started
				}
			}

			letter_event = {
				id = 72113
				tooltip = EVTTOOLTIP72113
			}

			hidden_effect = {
				remove_do_not_disturb_effect = yes
				clr_character_flag = coming_to_feast
				clr_character_flag = guest_feast_started
				clr_character_flag = wounded_opponent
				clr_character_flag = maimed_opponent
				clr_character_flag = killed_opponent
				clr_character_flag = passionated_guest
				clear_delayed_event = { id = 72996 } # main east events for guests
			}
		}
	}
}

# Feast cancelled: notify invited vassals
letter_event = {
	id = 72113
	desc = EVTDESC72113

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA72113
	}
}

### Poison rival during liege's feast ###
character_event = {
	id = 100520
	desc = EVTDESC100520
	picture = GFX_evt_feast

	is_triggered_only = yes

	has_character_flag = guest_feast_started
	rivals = yes
	min_age = 16
	only_capable = yes
	prisoner = no
	war = no

	trigger = {
		in_command_trigger = no

		NOR = {
			has_character_modifier = master_poisoner
			has_character_modifier = the_content
		}

		liege = {
			has_character_flag = host_feast_started
		}

		any_rival = {
			has_character_flag = guest_feast_started
			same_liege = ROOT
			is_adult = yes
			is_incapable = no
			prisoner = no
			war = no
			in_command_trigger = no
		}
	}

	option = {
		name = EVTOPTA100520

		random_rival = {
			show_scope_change = no

			limit = {
				has_character_flag = guest_feast_started
				same_liege = ROOT
				is_adult = yes
				is_incapable = no
				prisoner = no
				war = no
				in_command_trigger = no
			}

			random_list = {
				50 = {
					ROOT = {
						character_event = { id = 100521 }
					}
				}

				20 = {
					tooltip = {
						if = {
							limit = { has_dlc = "Reapers" }
							add_trait = vomiting
						}
						else = {
							add_trait = ill
						}
					}

					set_character_flag = poisoned_ill
					character_event = { id = 100522 }
				}

				15 = {
					tooltip = {
						add_trait = infirm
					}

					set_character_flag = poisoned_infirm
					character_event = { id = 100522 }
				}

				10 = {
					tooltip = {
						death = { death_reason = death_murder_poison }
					}

					set_character_flag = poisoned_killed
					character_event = { id = 100522 }
				}

				5 = {
					liege = {
						show_scope_change = no

						if = {
							limit = { has_dlc = "Reapers" }

							set_character_flag = disease_not_serious
							add_trait = vomiting

							character_event = {
								id = RIP.11005
								days = 10
								random = 30
							}
						}
						else = {
							add_trait = ill
						}

						character_event = {
							id = 100523
							tooltip = EVTTOOLTIP100523
						}
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTB100520

		add_character_modifier = {
			name = the_content
			years = 1
		}
	}
}

# Nothing happened
character_event = {
	id = 100521
	desc = EVTDESC100521
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA100521

		add_character_modifier = {
			name = the_failed_poisoner
			years = 1
		}
	}
}

# Rival is poisoned!
character_event = {
	id = 100522
	desc = EVTDESC100522
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA100522

		trigger = { has_character_flag = death_murder_poison }

		if = {
			limit = { intrigue >= 15 }

			custom_tooltip = { text = EVTTOOLTIP100524 }
			show_portrait = FROM
		}

		FROM = {
			character_event = {
				id = 100524
				days = 1
				random = 1
			}
		}

		death = { death_reason = death_accident }
	}

	option = {
		name = EVTOPTB100522

		trigger = { has_character_flag = poisoned_infirm }

		add_trait = infirm

		if = {
			limit = { intrigue >= 15 }

			custom_tooltip = { text = EVTTOOLTIP100524 }
			show_portrait = FROM
		}

		FROM = {
			character_event = {
				id = 100524
				days = 1
				random = 1
			}
		}
	}

	option = {
		name = EVTOPTC100522

		trigger = { has_character_flag = poisoned_ill }

		if = {
			limit = { has_dlc = "Reapers" }

			set_character_flag = disease_not_serious
			add_trait = vomiting

			character_event = {
				id = RIP.11005
				days = 10
				random = 30
			}
		}
		else = {
			add_trait = ill
		}

		if = {
			limit = { intrigue >= 15 }

			custom_tooltip = { text = EVTTOOLTIP100524 }
			show_portrait = FROM
		}

		FROM = {
			character_event = {
				id = 100524
				days = 1
				random = 1
			}
		}
	}
}

# Liege is poisoned
character_event = {
	id = 100523
	desc = EVTDESC100523
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA100523

		if = {
			limit = { has_dlc = "Reapers" }

			set_character_flag = disease_not_serious
			add_trait = vomiting

			character_event = {
				id = RIP.11005
				days = 10
				random = 30
			}
		}
		else = {
			add_trait = ill
		}

		if = {
			limit = { num_of_vassals < 2 }

			random_vassal = {
				show_scope_change = no

				limit = {
					practical_age >= 40
					has_character_flag = guest_feast_started
				}

				set_character_flag = poisoned_at_feast

				if = {
					limit = { has_dlc = "Reapers" }

					set_character_flag = disease_not_serious
					add_trait = vomiting

					character_event = {
						id = RIP.11005
						days = 10
						random = 30
					}
				}
				else = {
					add_trait = ill
				}
			}
		}
		else_if = {
			limit = { num_of_vassals < 3 }

			random_vassal = {
				show_scope_change = no

				limit = {
					is_adult = yes
					trait = drunkard
					has_character_flag = guest_feast_started
				}

				set_character_flag = poisoned_at_feast

				if = {
					limit = { has_dlc = "Reapers" }

					set_character_flag = disease_not_serious
					add_trait = vomiting

					character_event = {
						id = RIP.11005
						days = 10
						random = 30
					}
				}
				else = {
					add_trait = ill
				}
			}
		}

		if = {
			limit = { num_of_vassals >= 4 }

			random_vassal = {
				show_scope_change = no

				limit = {
					is_adult = yes
					trait = gluttonous
					has_character_flag = guest_feast_started
				}

				set_character_flag = poisoned_at_feast

				if = {
					limit = { has_dlc = "Reapers" }

					set_character_flag = disease_not_serious
					add_trait = vomiting

					character_event = {
						id = RIP.11005
						days = 10
						random = 30
					}
				}
				else = {
					add_trait = ill
				}
			}
		}

		if = {
			limit = {
				intrigue < 15

				job_spymaster = {
					intrigue < 15
				}
			}

			any_vassal = {
				show_scope_change = no

				limit = { has_character_flag = guest_feast_started }

				opinion = {
					name = opinion_poisoner
					who = ROOT
					years = 5
				}
			}
		}
		else = {
			custom_tooltip = {
				text = EVTTOOLTIP100525

				character_event = { id = 100525 }
			}
		}
	}
}

# ROOT gets news about success: Rival is ill/infirm or dead
character_event = {
	id = 100524
	desc = EVTDESC100524
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA100524

		trigger = {
			FROM = { has_character_flag = death_accident }
		}

		FROM = { clr_character_flag = death_accident }

		add_character_modifier = {
			name = master_poisoner
			years = 3
		}

		FROM = {
			show_scope_change = no

			random_child = {
				show_scope_change = no

				limit = {
					is_primary_heir = yes
					is_female = no
					practical_age >= 10
					is_abroad = no
				}

				random = {
					chance = 25

					opinion = {
						name = opinion_killed_father
						who = ROOT
						years = 100
					}

					tooltip = {
						add_rival = ROOT
					}

					character_event = {
						id = 100526
						days = 1
						random = 7
						tooltip = EVTTOOLTIP100526
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTB100524

		trigger = {
			FROM = { has_character_flag = poisoned_infirm }
		}

		FROM = { clr_character_flag = poisoned_infirm }

		add_character_modifier = {
			name = master_poisoner
			years = 2
		}
	}

	option = {
		name = EVTOPTC100524

		trigger = {
			FROM = { has_character_flag = poisoned_ill }
		}

		FROM = { clr_character_flag = poisoned_ill }

		add_character_modifier = {
			name = master_poisoner
			years = 1
		}
	}
}

# Liege discovers ROOT was behind the poisoning
character_event = {
	id = 100525
	desc = EVTDESC100525
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = EVTOPTA100525

		opinion = {
			name = opinion_poisoner
			who = FROMFROM
			years = 10
		}

		any_vassal = {
			show_scope_change = no

			limit = {
				OR = {
					has_character_flag = poisoned_at_feast
					has_character_flag = guest_feast_started
				}
			}

			clr_character_flag = poisoned_at_feast

			opinion = {
				name = opinion_poisoner
				who = FROMFROM
				years = 10
			}
		}

		FROMFROM = {
			show_scope_change = no

			set_character_flag = imprisoned_poisoner
			imprison = ROOT
			character_event = { id = 100527 }
		}

		ai_chance = { factor = 10 }
	}

	option = {
		name = EVTOPTB100525

		opinion = {
			name = opinion_poisoner
			who = FROMFROM
			years = 10
		}

		any_vassal = {
			show_scope_change = no

			limit = {
				OR = {
					has_character_flag = poisoned_at_feast
					has_character_flag = guest_feast_started
				}
			}

			clr_character_flag = poisoned_at_feast

			opinion = {
				name = opinion_poisoner
				who = FROMFROM
				years = 10
			}
		}

		FROMFROM = {
			show_scope_change = no

			set_character_flag = banished_poisoner
			banish = yes
			character_event = { id = 100527 }
		}
	}

	option = {
		name = EVTOPTC100525

		add_character_modifier = {
			name = mod_forgives_poisoner
			years = 1
		}

		any_vassal = {
			show_scope_change = no

			limit = {
				OR = {
					has_character_flag = poisoned_at_feast
					has_character_flag = guest_feast_started
				}
			}

			clr_character_flag = poisoned_at_feast

			opinion = {
				name = opinion_poisoner
				who = FROMFROM
				years = 10
			}
		}

		opinion = {
			name = opinion_poisoner
			who = FROMFROM
			years = 10
		}

		ai_chance = { factor = 61 }
	}
}

# Rival's son swears revenge
character_event = {
	id = 100526
	desc = EVTDESC100526
	picture = GFX_evt_death

	is_triggered_only = yes

	option = {
		name = EVTOTPA100526

		tooltip = {
			opinion = {
				name = opinion_killed_father
				who = FROM
				years = 100
			}
		}

		add_rival = FROM

		opinion = {
			name = grievously_offended
			who = FROM
			years = 10
		}
	}
}

# ROOT is imprisoned/banished
character_event = {
	id = 100527
	desc = EVTDESC100527
	picture = GFX_evt_into_the_dungeon

	is_triggered_only = yes

	option = {
		name = EVTOTPA100527

		trigger = { has_character_flag = imprisoned_poisoner }

		clr_character_flag = imprisoned_poisoner

		tooltip = {
			imprison = FROM
		}
	}

	option = {
		name = EVTOTPB100527

		trigger = { has_character_flag = banished_poisoner }

		clr_character_flag = banished_poisoner

		tooltip = {
			banish = yes
		}
	}
}