namespace = DA

character_event = { # Hidden event to start an adoption event chain, if you are an old, childless dragon
	id = DA.1
	
	only_playable = yes
	only_capable = yes
	prisoner = no
	min_age = 40
	
	hide_window = yes

	# is_triggered_only = yes
	
	trigger = {
		OR = {
			has_game_rule = { 
				name = etl_allow_adoption_event
				value = unrestricted
			}
			AND = {
				has_game_rule = { 
					name = etl_allow_adoption_event
					value = dragons_only
				}
				culture = dragon_culture
			}
		}
		NOT = {
			has_character_flag = had_dragon_adoption_event
			trait = pregnant
			any_spouse = {
				trait = pregnant
			}
			any_consort = {
				trait = pregnant
			}
		}
		has_living_children = no

		is_landed = yes
		NOT = { government = order_government }
		is_theocracy = no
		OR = {
			is_republic = no
			is_merchant_republic = yes
		}
		# graphical_culture = dragongfx
	}

	mean_time_to_happen = {
		months = 600
		modifier = {
			factor = 0.9
			age >= 45
		}
		modifier = {
			factor = 0.8
			age >= 50
		}
		modifier = {
			factor = 0.75
			age >= 55
		}
		modifier = {
			factor = 0.6
			age >= 60
		}

		modifier = {
			factor = 0.75
			fertility < 0.15
		}
		modifier = {
			factor = 0.9
			fertility < 0.30
		}
		modifier = {
			factor = 2
			fertility >= 0.60
		}
		modifier = {
			factor = 3
			fertility >= 0.80
		}
		modifier = {
			factor = 3
			fertility >= 1
		}

		modifier = {
			factor = 0.25
			ai = no
		}
		modifier = {
			factor = 0.75
			is_married = no
		}
		modifier = {
			factor = 1.1
			has_children = yes
		}
		modifier = {
			factor = 3
			any_spouse = {
				is_female = yes
				age <= 45
			}
		}
	}

	immediate = {
		set_character_flag = had_dragon_adoption_event

		random_list = {
			25 = { # Find an abandoned dragon egg
				character_event = {
					id = DA.2
					days = 3
					random = 3
				}
				mult_modifier = {
					factor = 0.5
					OR = {
						trait = cruel
						trait = cynical
					}
				}
				# In case I wanna let this chain proc for non dragons
				mult_modifier = {
					factor = 0
					NOT = { graphical_culture = dragongfx }
				}
			}
			25 = { # A rowdy whelp is brought to your court
				character_event = {
					id = DA.4
					days = 3
					random = 3
				}
				mult_modifier = {
					factor = 0.5
					trait = cruel
				}
			}
			25 = { # Visit a temple and see a young orphan in prayer
				character_event = {
					id = DA.8
					days = 3
					random = 3
				}
				mult_modifier = {
					factor = 0
					trait = cynical
					trait = excommunicated
				}
			}
			25 = { # Councilors prepare a funky love-making potion for you
				character_event = {
					id = DA.11
					days = 3
					random = 3
				}
				mult_modifier = {
					factor = 0
					OR = {
						trait = celibate
						trait = eunuch
					}
				}
				mult_modifier = {
					factor = 0.5
					trait = chaste
				}
				mult_modifier = {
					factor = 0.5
					trait = homosexual
				}
				mult_modifier = {
					factor = 0.25
					trait = infirm
				}
				mult_modifier = {
					factor = 0
					age >= 45
					is_female = yes
				}
			}
		}
	}
}

character_event = { # The egg path - As you fly through a forest, you hear a big thump
	id = DA.2
	desc = DA_2_DESC
	picture = GFX_evt_garden
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = { # Check it out
		name = EVTOPTA_DA_2

		character_event = {
			id = DA.3
			days = 3
			random = 3
		}

		ai_chance = {
			factor = 2
			modifier = {
				factor = 3
				trait = brave
			}
		}
	}

	option = { # Maybe go back?
		name = EVTOPTB_DA_2

		random = {
			chance = 10
			add_trait = craven
		}

		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				OR = {
					trait = craven
					trait = slothful
				}
			}
		}
	}
}

character_event = { # The egg path - You spot a dead dragon, and next to it a dragon egg
	id = DA.3
	desc = DA_3_DESC
	picture = GFX_evt_mysterious_forest
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	immediate = {
		hidden_tooltip = {
			if = {
				limit = {
					has_law = enatic_succession
				}
				create_character = {
					# random_traits = no
					dynasty = none
					religion = ROOT
					culture = dragon_culture
					female = yes
					age = 1

					# attributes = {
					# 	martial = 6
					# 	diplomacy = 8
					# 	stewardship = 9
					# 	intrigue = 12
					# 	learning = 12
					# }
				}
			}
			else_if = {
				limit = {
					has_law = agnatic_succession
				}
				create_character = {
					# random_traits = no
					dynasty = none
					religion = ROOT
					culture = dragon_culture
					female = no
					age = 1

					# attributes = {
					# 	martial = 6
					# 	diplomacy = 8
					# 	stewardship = 9
					# 	intrigue = 12
					# 	learning = 12
					# }
				}
			}
			else = {
				create_character = {
					# random_traits = no
					dynasty = none
					religion = ROOT
					culture = dragon_culture
					age = 1

					# attributes = {
					# 	martial = 6
					# 	diplomacy = 8
					# 	stewardship = 9
					# 	intrigue = 12
					# 	learning = 12
					# }
				}
			}
			
			new_character = {
				save_event_target_as = the_child
			}
		}
	}

	option = { # Take the egg home and adopt it
		name = EVTOPTA_DA_3
		show_portrait = event_target:the_child

		prestige = -25

		if = {
			limit = {
				is_female = no
			}
			event_target:the_child = {
				set_father = PREV
				dynasty = PREV
				reverse_opinion = {
					name = opinion_very_grateful
					who = FROM
					years = 10
				}
			}
		}
		else = {
			event_target:the_child = {
				set_mother = PREV
				dynasty = PREV
				reverse_opinion = {
					name = opinion_very_grateful
					who = FROM
					years = 10
				}
			}
		}
		recalc_succession = yes

		add_trait = kind

		ai_chance = {
			factor = 2
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 0.5
				trait = proud
			}
		}
	}

	option = { # Take the egg to a temple
		name = EVTOPTB_DA_3

		piety = 50

		random = {
			chance = 50
			add_trait = kind
		}

		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				trait = zealous
			}
		}

		hidden_tooltip = {
			if = {
				limit = {
					any_vassal = {
						is_theocracy = yes
					}
				}
				random_vassal = {
					limit = {
						is_theocracy = yes
					}
					event_target:the_child = {
						move_character = PREV
					}
				}
			}
			else = {
				event_target:the_child = {
					death = {
						death_reason = death_missing
					}
				}
			}
		}
	}

	option = { # I don't want to be involved with this
		name = EVTOPTC_DA_3

		
		random_list = {
			25 = {
				add_trait = craven
			}
			25 = {
				add_trait = cruel
			}
			50 = {}
		}

		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				OR = {
					trait = craven
					trait = cruel
				}
			}
		}

		hidden_tooltip = {
			event_target:the_child = {
				death = {
					death_reason = death_missing
				}
			}
		}
	}
}

character_event = { # The rowdy whelp path - find a suitable vassal
	id = DA.4

	is_triggered_only = yes
	
	hide_window = yes

	immediate = {
		if = {
			limit = {
				any_vassal = {
					tier = COUNT
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
			}
			random_vassal = {
				limit = {
					tier = COUNT
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
				
				character_event = {
					id = DA.5
				}
			}
		}
		else_if = {
			limit = {
				any_vassal = {
					tier = BARON
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
			}
			random_vassal = {
				limit = {
					tier = BARON
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
				
				character_event = {
					id = DA.5
				}
			}
		}
		else = {
			random_courtier_or_vassal = {
				limit = {
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
				
				character_event = {
					id = DA.5
				}
			}
		}
	}
}

character_event = { # The rowdy whelp path - Ping pong that shit
	id = DA.5

	is_triggered_only = yes
	
	hide_window = yes

	immediate = {
		FROM = {
			character_event = {
				id = DA.6
			}
		}
	}
}

character_event = { # The rowdy whelp path - A child sneakily lives in the castle of your vassal, and refuses to be kicked out
	id = DA.6
	desc = DA_6_DESC
	picture = GFX_evt_scandal
	# ruler_listening_to_supplicant
	# GFX_evt_scandal
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = { # Hear your vassal out
		name = EVTOPTA_DA_6

		character_event = {
			id = DA.7
			days = 3
			random = 3
		}

		ai_chance = {
			factor = 2
		}
	}

	option = { # Just lock them up for a few days
		name = EVTOPTB_DA_6

		random = {
			chance = 10
			add_trait = cruel
		}

		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				OR = {
					trait = cruel
					trait = slothful
					trait = cynical
				}
			}
		}
	}
}

character_event = { # The rowdy whelp path - the child is brought before you, and you get to make a decision
	id = DA.7
	desc = DA_7_DESC
	picture = GFX_evt_judged_by_ruler
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	immediate = {
		hidden_tooltip = {
			if = {
				limit = {
					has_law = enatic_succession
				}
				create_character = {
					random_traits = no
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = yes
					age = 8

					add_trait = rowdy
					add_trait = playful

					attributes = {
						martial = 3
						diplomacy = 2
						stewardship = 2
						intrigue = 3
						learning = 2
					}
				}
			}
			else_if = {
				limit = {
					has_law = agnatic_succession
				}
				create_character = {
					random_traits = no
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 8

					add_trait = rowdy
					add_trait = playful

					attributes = {
						martial = 3
						diplomacy = 2
						stewardship = 2
						intrigue = 3
						learning = 2
					}
				}
			}
			else = {
				create_character = {
					random_traits = no
					dynasty = none
					religion = ROOT
					culture = ROOT
					age = 8

					add_trait = rowdy
					add_trait = playful

					attributes = {
						martial = 3
						diplomacy = 2
						stewardship = 2
						intrigue = 3
						learning = 2
					}
				}
			}
			
			new_character = {
				save_event_target_as = the_child
			}
		}
	}

	# portrait = event_target:the_child

	option = { # I will adopt this child
		name = EVTOPTA_DA_7

		show_portrait = event_target:the_child

		prestige = -75

		reverse_opinion = {
			name = opinion_annoyed
			who = FROMFROM
			years = 2
		}

		if = {
			limit = {
				is_female = no
			}
			event_target:the_child = {
				set_father = PREV
				dynasty = PREV
				reverse_opinion = {
					name = opinion_very_grateful
					who = FROM
					years = 10
				}
			}
		}
		else = {
			event_target:the_child = {
				set_mother = PREV
				dynasty = PREV
				reverse_opinion = {
					name = opinion_very_grateful
					who = FROM
					years = 10
				}
			}
		}
		recalc_succession = yes

		add_trait = kind

		ai_chance = {
			factor = 2
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 3
				trait = kind
			}
			modifier = {
				factor = 0.25
				trait = proud
			}
		}
	}

	option = { # Pay the child to go somewhere else
		name = EVTOPTB_DA_7

		scaled_wealth = {
			value = -0.1
			min = -5
			max = -25
		}

		reverse_opinion = {
			name = opinion_good_punishment
			who = FROMFROM
		}

		hidden_tooltip = {
			if = {
				limit = {
					any_vassal = {
						is_theocracy = yes
					}
				}
				random_vassal = {
					limit = {
						is_theocracy = yes
					}
					event_target:the_child = {
						move_character = PREV
					}
				}
			}
			else = {
				event_target:the_child = {
					banish = yes
				}
			}
		}

		ai_chance = {
			factor = 2
			modifier = {
				factor = 0.25
				trait = greedy
			}
			modifier = {
				factor = 0.25
				trait = proud
			}
		}
	}

	option = { # Just lock them up for a few days
		name = EVTOPTC_DA_7

		random = {
			chance = 60
			add_trait = cruel
		}

		reverse_opinion = {
			name = opinion_good_punishment
			who = FROMFROM
		}

		hidden_tooltip = {
			event_target:the_child = {
				death = {
					death_reason = death_missing
				}
			}
		}

		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				OR = {
					trait = cruel
					trait = slothful
					trait = cynical
				}
			}
			modifier = {
				factor = 0
				is_benevolent_trigger = yes
			}
		}
	}
}

character_event = { # The temple path - Late at night, you still spot a child deep in prayer
	id = DA.8
	desc = DA_8_DESC
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	immediate = {
		hidden_tooltip = {
			if = {
				limit = {
					has_law = enatic_succession
				}
				create_character = {
					random_traits = no
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = yes
					age = 7

					add_trait = timid

					attributes = {
						martial = 1
						diplomacy = 3
						stewardship = 1
						intrigue = 1
						learning = 4
					}
				}
			}
			else_if = {
				limit = {
					has_law = agnatic_succession
				}
				create_character = {
					random_traits = no
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 7

					add_trait = timid

					attributes = {
						martial = 1
						diplomacy = 3
						stewardship = 1
						intrigue = 1
						learning = 4
					}
				}
			}
			else = {
				create_character = {
					random_traits = no
					dynasty = none
					religion = ROOT
					culture = ROOT
					age = 7

					add_trait = timid

					attributes = {
						martial = 1
						diplomacy = 3
						stewardship = 1
						intrigue = 1
						learning = 4
					}
				}
			}
			
			new_character = {
				save_event_target_as = the_child
			}
		}
	}

	option = { # Approach them
		name = EVTOPTA_DA_8

		character_event = {
			id = DA.9
			days = 3
			random = 3
		}

		ai_chance = {
			factor = 2
		}
	}

	option = { # Leave them to their prayers, and pray yourself
		name = EVTOPTB_DA_8

		piety = 10

		ai_chance = {
			factor = 1
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 2
				trait = slothful
			}
		}
	}
}

character_event = { # The temple path - The child explains that they are an orphan, and this temple is their home
	id = DA.9
	desc = DA_9_DESC
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = { # Let them continue their story
		name = EVTOPTA_DA_9

		character_event = {
			id = DA.10
			days = 3
			random = 3
		}

		ai_chance = {
			factor = 2
		}
	}

	option = { # Then I shall pray for you
		name = EVTOPTB_DA_9

		piety = 15

		ai_chance = {
			factor = 1
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 2
				trait = slothful
			}
		}
	}
}

character_event = { # The temple path - The child wishes their prayers get answered, because they aren't treated well here
	id = DA.10
	desc = DA_10_DESC
	picture = GFX_evt_child_play
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = { # Then join me at my court... as [my dynasty]
		name = EVTOPTA_DA_10

		show_portrait = event_target:the_child

		prestige = -25

		if = {
			limit = {
				is_female = no
			}
			event_target:the_child = {
				set_father = PREV
				dynasty = PREV
				reverse_opinion = {
					name = opinion_very_grateful
					who = FROM
					years = 10
				}
			}
		}
		else = {
			event_target:the_child = {
				set_mother = PREV
				dynasty = PREV
				reverse_opinion = {
					name = opinion_very_grateful
					who = FROM
					years = 10
				}
			}
		}
		recalc_succession = yes

		add_trait = kind

		ai_chance = {
			factor = 2
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 3
				trait = kind
			}
			modifier = {
				factor = 0.25
				trait = proud
			}
		}

		ai_chance = {
			factor = 3
		}
	}
	
	option = { # Then join me at my court
		name = EVTOPTB_DA_10

		event_target:the_child = {
			reverse_opinion = {
				name = opinion_grateful
				who = FROM
			}
		}

		ai_chance = {
			factor = 2
		}
	}

	option = { # Life can be cruel, I'll pray that god helps you
		name = EVTOPTC_DA_10

		piety = 15

		ai_chance = {
			factor = 1
			modifier = {
				factor = 2
				trait = slothful
			}
			modifier = {
				factor = 2
				trait = zealous
			}
		}
	}
}

character_event = { # The love potion path - find a suitable vassal
	id = DA.11

	is_triggered_only = yes
	
	hide_window = yes

	immediate = {
		if = {
			limit = {
				any_vassal = {
					tier = COUNT
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
			}
			random_vassal = {
				limit = {
					tier = COUNT
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
				
				character_event = {
					id = DA.12
				}
			}
		}
		else_if = {
			limit = {
				any_vassal = {
					tier = BARON
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
			}
			random_vassal = {
				limit = {
					tier = BARON
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
				
				character_event = {
					id = DA.12
				}
			}
		}
		else = {
			random_courtier_or_vassal = {
				limit = {
					prisoner = no
					is_adult = yes
					is_incapable = no
				}
				
				character_event = {
					id = DA.12
				}
			}
		}
	}
}

character_event = { # The love potion path - Ping pong that shit
	id = DA.12

	is_triggered_only = yes
	
	hide_window = yes

	immediate = {
		FROM = {
			character_event = {
				id = DA.13
			}
		}
	}
}

character_event = { # The love potion path - Vassals offer you a solution with your infertility
	id = DA.13
	desc = DA_13_DESC
	picture = GFX_evt_council
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = { # Fine, let's try this
		name = EVTOPTA_DA_13

		character_event = {
			id = DA.14
			days = 3
			random = 3
		}

		ai_chance = {
			factor = 2
			modifier = {
				factor = 3
				trait = lustful
			}
		}
	}

	option = { # Absolutely not
		name = EVTOPTB_DA_13

		random = {
			chance = 50
			add_trait = chaste
		}

		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				OR = {
					trait = proud
					trait = slothful
					trait = chaste
				}
			}
		}
	}
}

character_event = { # The love potion path - Finding the "test subject"
	id = DA.14
	desc = DA_14_DESC
	picture = GFX_evt_outside_tavern_hf
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = { # With the spouse, obviously
		name = EVTOPTA_DA_14

		trigger = {
			OR = {
				is_senior_consort_party = yes
				is_married = yes
			}
			OR = {
				AND = {
					is_female = no
					any_spouse = {
						age < 45
					}
				}
				AND = {
					is_female = no
					any_consort = {
						age < 45
					}
				}
				AND = {
					is_female = yes
					age < 45
				}
			}
		}

		# hidden_tooltip = {
			# Check lovers
			if = {
				limit = {
					any_spouse = {
						OR = {
							age < 45
							is_female = no
						}
						is_lover = PREV
					}
				}
				random_spouse = {
					limit = {
						OR = {
							age < 45
							is_female = no
						}
						is_lover = PREV
					}
					save_event_target_as = the_lover
				}
			}
			else_if = {
				limit = {
					any_consort = {
						OR = {
							age < 45
							is_female = no
						}
						is_lover = PREV
					}
				}
				random_consort = {
					limit = {
						NOT = { character = PREV }
						OR = {
							age < 45
							is_female = no
						}
						is_lover = PREV
					}
					save_event_target_as = the_lover
				}
			}

			# Check not hated spouses
			else_if = {
				limit = {
					any_spouse = {
						personal_opinion  = {
							who = PREV
							value >= 0
						}
						OR = {
							age < 45
							is_female = no
						}
					}
				}
				random_spouse = {
					limit = {
						personal_opinion  = {
							who = PREV
							value >= 0
						}
						OR = {
							age < 45
							is_female = no
						}
					}
					save_event_target_as = the_lover
				}
			}
			else_if = {
				limit = {
					any_consort = {
						personal_opinion  = {
							who = PREV
							value >= 0
						}
						OR = {
							age < 45
							is_female = no
						}
					}
				}
				random_consort = {
					limit = {
						NOT = { character = PREV }
						personal_opinion = {
							who = PREV
							value >= 0
						}
						OR = {
							age < 45
							is_female = no
						}
					}
				}
			}

			# Just go for whatever
			else_if = {
				limit = {
					any_spouse = {
						OR = {
							age < 45
							is_female = no
						}
					}
				}
				random_spouse = {
					limit = {
						OR = {
							age < 45
							is_female = no
						}
					}
					save_event_target_as = the_lover
				}
			}
			else = {
				random_consort = {
					limit = {
						NOT = { character = PREV }
						OR = {
							age < 45
							is_female = no
						}
					}
					save_event_target_as = the_lover
				}
			}
		# }

		character_event = {
			id = DA.15
			days = 3
			random = 3
		}

		ai_chance = {
			factor = 3
			modifier = {
				factor = 3
				any_spouse = {
					personal_opinion = {
						who = PREV
    					value >= 0
					}
					reverse_personal_opinion = {
						who = PREV
    					value >= 0
					}
				}
			}
			modifier = {
				factor = 3
				any_consort = {
					personal_opinion = {
						who = PREV
    					value >= 0
					}
					reverse_personal_opinion = {
						who = PREV
    					value >= 0
					}
				}
			}
			modifier = {
				factor = 5
				any_spouse = {
					is_lover = PREV
				}
			}
			modifier = {
				factor = 5
				any_consort = {
					is_lover = PREV
				}
			}
		}

	}

	option = { # I have a lover
		name = EVTOPTB_DA_14

		trigger = {
			has_lover = yes
			OR = {
				AND = {
					is_female = no
					any_lover = {
						age < 45
					}
				}
				AND = {
					is_female = yes
					age < 45
				}
			}
			NOT = {
				trait = homosexual
			}
		}
		
		# hidden_tooltip = {
			random_lover = {
				limit = {
					OR = {
						age < 45
						is_female = no
					}
				}
				save_event_target_as = the_lover
			}
		# }

		character_event = {
			id = DA.15
			days = 3
			random = 3
		}

		ai_chance = {
			factor = 3
			modifier = {
				factor = 3
				trait = lustful
			}
		}
	}

	option = { # We can go to town
		name = EVTOPTC_DA_14

		character_event = {
			id = DA.16
			days = 3
			random = 3
		}

		ai_chance = {
			factor = 2
			modifier = {
				factor = 3
				trait = lustful
			}
			modifier = {
				factor = 1.5
				trait = gregarious
			}
			modifier = {
				factor = 0.25
				trait = shy
			}
			modifier = {
				factor = 0
				trait = homosexual
			}
		}
	}

	option = { # I don't want this, actually
		name = EVTOPTD_DA_14

		random = {
			chance = 50
			add_trait = chaste
		}

		ai_chance = {
			factor = 1
		}
	}
}

character_event = { # The love potion path - Laying with the chosen partner
	id = DA.15
	desc = DA_15_DESC
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	option = {
		name = { # If its for the stability of the realm
			text = EVTOPTA_DA_15
			trigger = {
				OR = {
					trait = homosexual
					trait = chaste
				}
			}
		}
		name = { # Let's enjoy this night
			text = EVTOPTB_DA_15
			trigger = {
				trait = lustful
			}
		}
		name = { # Let's hope the potion works
			text = EVTOPTC_DA_15
		}
		
		show_portrait = event_target:the_lover

		reverse_opinion = {
			who = event_target:the_lover
			modifier = opinion_budding_romance
		}

		hidden_tooltip = {
			impregnate = event_target:the_lover
			# clear_event_target = the_lover
		}
		

		hidden_tooltip = {
			if = {
				limit = {
					reverse_personal_opinion = {
						who = event_target:the_lover
						value >= 50
					}
					NOT = {
						is_lover = event_target:the_lover
					}
				}
				character_event = {
					id = DA.17
					days = 10
					random = 10
				}
			}
		}

	}
}

character_event = { # The love potion path - You spot someone at the tavern
	id = DA.16
	desc = DA_16_DESC
	picture = GFX_evt_dancing
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	immediate = {
		hidden_tooltip = {
			if = {
				limit = {
					is_female = no
				}
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = yes
					age = 25

					add_trait = lustful
					add_trait = fair
				}
			}
			else = {
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 25

					add_trait = lustful
					add_trait = fair
				}
			}
			
			new_character = {
				save_event_target_as = the_lover
			}
		}
	}

	option = { # Mead in my room, [event_target:the_lover.GetMilordMilady]?
		name = EVTOPTA_DA_16

		character_event = {
			id = DA.15
			days = 3
			random = 3
		}

		random = {
			chance = 50
			add_trait = lustful
		}

		ai_chance = {
			factor = 2
			modifier = {
				factor = 3
				trait = lustful
			}
		}
	}

	option = { # I don't want to do this
		name = EVTOPTB_DA_16

		prestige = -25

		random = {
			chance = 50
			add_trait = chaste
		}
		random = {
			chance = 25
			add_trait = shy
		}

		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				OR = {
					trait = shy
					trait = chaste
				}
			}
		}
		
		hidden_tooltip = {
			event_target:the_lover = {
				death = {
					death_reason = death_missing
				}
			}
		}
	}
}

character_event = { # The love potion path - Maybe we can be lovers?
	id = DA.17
	desc = DA_17_DESC
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = { # Let out love blossom
		name = EVTOPTA_DA_17

		add_lover = event_target:the_lover

		random = {
			chance = 50
			add_trait = lustful
		}

		ai_chance = {
			factor = 2
			modifier = {
				factor = 3
				trait = lustful
				trait = seducer
				trait = seductress
			}
		}
	}

	option = { # One time was enough
		name = EVTOPTB_DA_17

		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				OR = {
					trait = shy
					trait = chaste
					trait = content
				}
			}
			modifier = {
				factor = 10
				trait = homosexual
			}
		}
	}
}
