namespace = mistress_birth

#Override vanilla trigger so we can use it here
scripted_trigger override_allow_naming_on_birth_of_dynasty_child_trigger = {
	save_temporary_scope_as = naming_dynasty_member
	exists = $CHILD$
	is_ai = no
	#No parent is naming the kid, and it's not your child (at least not officially...)
	$CHILD$ = {
		any_parent = {
			NOR = {
				allow_naming_on_birth_of_child_trigger = { CHILD = $CHILD$ }
				this = scope:naming_dynasty_member
			}
		}
	}
	$CHILD$.host = scope:naming_dynasty_member
}

mistress_birth.0001 = {
	hidden = yes
	trigger = {
		birth_will_happen_as_usual_trigger = yes
		has_court_position = mistress_court_position
		is_courtier_of = scope:real_father
	}
	
	immediate = {
		#NOTE: Sets up secrets and notifies real_father and father if the child is a bastard, and they should know the Secret.
		pregnancy_maintainance_effect = yes
		###
		# Bastard event firing
		###
		if = {
			limit = {
				OR = {
					has_character_flag = bastard_pregnancy
					has_character_flag = unmarried_bastard_pregnancy
				}
				has_character_flag = pregnancy_real_father_of_bastard_is_known_flag
			}
			
			if = {
				limit = {
					exists = scope:child.house
					scope:child.house = scope:mother.house
				}
				scope:mother = {
					save_scope_as = legitimizer
				}
			}
			else_if = {
				limit = {
					exists = scope:child.house
					scope:child.house = scope:real_father.house
				}
				scope:real_father = {
					save_scope_as = legitimizer
				}
			}
			
			if = {
				limit = { exists = scope:legitimizer }
				scope:legitimizer = {
					if = {
						limit = {
							faith = {
								has_doctrine_parameter = bastards_none
							}
						}
						trigger_event = mistress_birth.2011
					}
					else = {
						trigger_event = mistress_birth.2001
					}
				}
			}
		}
		
		if = { #Check whether the father should get a regular notification event
			limit = { exists = scope:father }
			scope:father = {
				if = {
					limit = {
						OR = {
							any_consort = {
								this = scope:mother
								NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag }
							}
							#If you split up before the pregnancy was showing etc.
							any_former_spouse = {
								this = scope:mother
								NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag }
							}
							any_former_concubine = {
								this = scope:mother
								NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag }
							}
							any_former_concubinist = {
								this = scope:mother
								NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag }
							}
						}
						NOT = { is_in_list = illegitimacy_secret_knowers }
					}
					random_list = {
						95 = { #Normal birth event for father
							if = {
								limit = { #If you split up before the pregnancy was showing etc. and now the mother isn't around then we just want to give the father a toast
									NOT = { is_consort_of = scope:mother }
									NOT = { is_at_same_location = scope:mother }
								}
								send_interface_toast = {
									title = birth.father_is_former_consort_toast
									left_icon = scope:mother
									right_icon = scope:child
									if = {
										limit = {
											scope:child = { has_trait = twin }
										}
										custom_tooltip = birth.father_is_former_consort_toast_tt_twins
									}
									else = {
										custom_tooltip = birth.father_is_former_consort_toast_tt
									}
								}
							}
							else = { #Normal event
								trigger_event = birth.1003
							}
						}
						5 = { #Other parent (mother) suggest a name
							trigger = {
								is_consort_of = scope:mother
								allow_naming_on_birth_of_child_trigger = { CHILD = scope:child }
								scope:child = {
									exists = mother
									mother = { is_ai = yes }
									NOT = { has_trait = twin }
								}
							}
							opinion_modifier = {
								who = scope:child.mother
								opinion_target = scope:child.father
								min = 0
								max = 10
								multiplier = 0.1
							}
							modifier = {
								any_child = { is_alive = yes count > 1 }
								add = -5
							}
							modifier = {
								NOT = { scope:child.father = scope:child.real_father }
								add = 5
							}
							modifier = {
								scope:child.mother = {
									OR = {
										has_trait = lunatic
										has_trait = possessed
									}
								}
								add = 15
							}
							modifier = { # Event is less common for AI rulers.
								scope:child.father = { is_ai = yes }
								factor = 0.25
							}
							trigger_event = birth.9002
						}
					}
				}
			}
		}
		
		#To trigger events for sickly child and ill mother!
		if = {
			limit = {
				has_character_flag = birth_child_will_become_sickly
			}
			trigger_event = {
				id = birth.3031
				days = { 10 30 }
			}
		}
		if = {
			limit = {
				has_character_flag = birth_mother_will_become_ill
			}
			trigger_event = {
				id = birth.3041
				days = { 10 30 }
			}
		}
		
		#Chance to gain cool modifier if you've birthed a lot of kids!
		if = {
			limit = {
				any_child = {
					even_if_dead = yes
					count >= 4
				}
				NOT = {
					has_character_modifier = mothered_many_children_modifier
				}
			}
			random = {
				chance = 10
				modifier = {
					add = 25
					any_child = {
						even_if_dead = yes
						count >= 5
					}
				}
				modifier = {
					add = 25
					any_child = {
						even_if_dead = yes
						count >= 7
					}
				}
				modifier = {
					add = 25
					any_child = {
						even_if_dead = yes
						count >= 9
					}
				}
				modifier = {
					add = 50
					any_child = {
						even_if_dead = yes
						count >= 10
					}
				}
				trigger_event = {
					id = birth.0002
					days = { 7 14 }
				}
			}
		}
		pregnancy_cleanup_effect = yes
		
		
		#Special traits from event learning_medicine.1023
		if = {
			limit = { has_character_flag = medicine_learning_fertility_treamtent_unexpected_trait }
			remove_character_flag = medicine_learning_fertility_treamtent_unexpected_trait
			scope:child = {
				random_list = {
					2 = {
						trigger = {
							NOR = {
								has_trait = beauty_good
								has_trait = beauty_bad
							}
						}
						add_trait = beauty_good_3
					}
					1 = {
						trigger = {
							NOR = {
								has_trait = beauty_good
								has_trait = beauty_bad
							}
						}
						add_trait = beauty_bad_3
					}
					2 = {
						trigger = {
							NOR = {
								has_trait = physique_good
								has_trait = physique_bad
							}
						}
						add_trait = physique_good_3
					}
					1 = {
						trigger = {
							NOR = {
								has_trait = physique_good
								has_trait = physique_bad
							}
						}
						add_trait = physique_bad_3
					}
					2 = {
						trigger = {
							NOR = {
								has_trait = intellect_good
								has_trait = intellect_bad
							}
						}
						add_trait = intellect_good_3
					}
					1 = {
						trigger = {
							NOR = {
								has_trait = intellect_good
								has_trait = intellect_bad
							}
						}
						add_trait = intellect_bad_3
					}
					1 = { add_trait = dwarf }
					2 = { add_trait = giant }
					1 = { add_trait = albino }
				}
			}
		}
		
		
		#Is a player part of the same dynasty, and my host? Give them the chance to name the child!
		if = {
			limit = {
				exists = scope:child.dynasty
			}
			scope:child.dynasty = {
				if = {
					limit = {
						any_dynasty_member = {
							override_allow_naming_on_birth_of_dynasty_child_trigger = { CHILD = scope:child }
							NOT = { is_parent_of = scope:child } # parents should get their own naming event
						}
					}
					random_dynasty_member = {
						limit = {
							override_allow_naming_on_birth_of_dynasty_child_trigger = { CHILD = scope:child }
							NOT = { is_parent_of = scope:child }
						}
						trigger_event = birth.1010
					}
				}
			}
		}
	}
}

# Alt to birth.2001 for mistress. UPDATED 8/25
#KNOWN BASTARD BIRTH
#Event for Potential Legitimizer
mistress_birth.2001 = {
	type = character_event
	title = mistress_birth.2001.t
	desc = {
		triggered_desc = {
			trigger = {
				is_female = yes
				scope:child = { NOT = { has_trait = twin } }
			}
			desc = birth.2001.desc.mother.standard
		}
		triggered_desc = {
			trigger = {
				is_female = yes
				scope:child = { has_trait = twin }
			}
			desc = birth.2001.desc.mother.twins
		}
		triggered_desc = {
			trigger = {
				is_male = yes
				scope:child = { NOT = { has_trait = twin } }
			}
			desc = birth.2001.desc.father.standard
		}
		triggered_desc = {
			trigger = {
				is_male = yes
				scope:child = { has_trait = twin }
			}
			desc = birth.2001.desc.father.twins
		}
	}
	theme = pregnancy
	override_background = { reference = relaxing_room }
	lower_left_portrait = scope:child
	lower_center_portrait = {
		trigger = { exists = scope:child_2 }
		character = scope:child_2
	}
	left_portrait = {
		character = scope:other_parent
		triggered_animation = {
			trigger = {
				this = scope:child.mother
			}
			animation = newborn
		}
		triggered_animation = {
			trigger = { always = yes }
			animation = worry
		}
	}
	
	immediate = {
		play_music_cue = mx_cue_seduction
		hidden_effect = {
			scope:child = { remove_inherited_descendent_traits_effect = yes }
			if = {
				limit = { exists = scope:child_2 }
				scope:child_2 = { remove_inherited_descendent_traits_effect = yes }
			}
		}
		#To get the picture of the other parent, and send correct follow-up events
		if = {
			limit = {
				scope:mother = root
			}
			scope:real_father = {
				save_scope_as = other_parent
			}
		}
		else = {
			scope:mother = {
				save_scope_as = other_parent
			}
		}
		save_scope_as = legitimizer
		if = {
			limit = {
				exists = house.house_head
			}
			house.house_head = {
				save_scope_as = house_head
			}
		}
		scope:child = {
			save_scope_as = bastard #Necessary for the House Head approval calculation
		}
	}
	
	#NAMING WIDGET
	widgets = {
		widget = {
			is_shown = {
				allow_naming_on_birth_of_child_trigger = { CHILD = scope:child }
			}
			gui = "event_window_widget_name_child"
			container = "dynamic_birth_name"
			controller = name_character
			setup_scope = { scope:child = { save_scope_as = name_character_target } }
		}
	}
	
	#Legitimize
	option = {
		name = {
			trigger = { scope:child = { NOT = { has_trait = twin } } }
			text = birth.2001.a.standard
		}
		name = {
			trigger = { scope:child = { has_trait = twin } }
			text = birth.2001.a.twins
		}
		trigger = {
			custom_description = {
				text = bastard_not_of_my_house_trigger
				object = scope:child
				exists = scope:child.house
			}
			custom_description = {
				text = bastard_not_of_my_house_trigger
				object = scope:child
				house = scope:child.house
			}
			trigger_if = { # Does the House Head approve?
				limit = {
					NOT = { house.house_head = root }
				}
				custom_description = {
					text = house_head_would_not_approve_trigger
					subject = house.house_head
					object = scope:child
					house_head_would_approve_legitimization_trigger = {
						LEGITIMIZER = root
						BASTARD = scope:child
					}
				}
			}
			is_allowed_to_legitimize_children_trigger = yes
		}
		show_as_unavailable = {
			always = yes
		}
		
		add_prestige = {
			value = bastard_legitimization_prestige_cost
			multiply = -1
		}
		
		#To block multiple notifications
		save_scope_value_as = {
			name = newborn_legitimization
			value = yes
		}
		
		legitimize_bastard_interaction_opinions_effect = {
			BASTARD = scope:child
			HOUSE_HEAD = root.house.house_head
			LEGITIMIZER = root
		}
		
		if = { # Move the child to the legitimizer's court if relevant
			limit = {
				scope:child = {
					NOT = { is_in_the_same_court_as_or_guest = root }
				}
				exists = court_owner
			}
			if = {
				limit = {
					NOT = { is_courtier_of = ROOT } # Check that char is not already at your court (theoretical fix)
					OR = {
						this = court_owner
						is_courtier_of = court_owner
					}
				}
				add_courtier = scope:child
			}
			else = {
				scope:child = { visit_court_of = root.court_owner }
			}
		}
		
		hidden_effect = {
			scope:mother = {
				every_child = {
					limit = {
						OR = {
							this = scope:child
							is_twin_of = scope:child
						}
					}
					
					legitimize_bastard_interaction_opinions_effect = {
						BASTARD = this
						HOUSE_HEAD = root.house.house_head
						LEGITIMIZER = root
					}
				}
			}
			
			scope:other_parent = {
				trigger_event = birth.2002
			}
		}
		
		
		ai_chance = {
			base = 10
			
			modifier = {
				is_landed = yes
				NOT = { exists = player_heir }
				NOR = {
					AND = {
						exists = primary_title
						primary_title = { has_title_law = male_only_law }
						scope:child = { is_female = yes }
					}
					AND = {
						exists = primary_title
						primary_title = { has_title_law = female_only_law }
						scope:child = { is_male = yes }
					}
				}
				age > 45
				factor = 50
			}
			modifier = {
				is_married = no
				factor = 1.5
			}
			modifier = {
				ai_compassion >= high_positive_compassion
				factor = 2
			}
		}
	}
	
	#Child remains a normal bastard
	option = {
		name = {
			text = birth.2001.b.standard
		}
		name = {
			text = birth.2001.b.no_legitimization_in_faith
			trigger = {
				faith = {
					has_doctrine_parameter = bastards_always
				}
			}
		}
		
		custom_tooltip = bastard_remains_bastard_tt
		
		#other_parent gets the correct birth event
		scope:other_parent = {
			trigger_event = birth.2003 #The legitimizer did not legitimize
		}
		
		#Spouse of mother must know about baby
		if = {
			limit = {
				scope:mother = {
					is_married = yes
					NOT = { primary_spouse = scope:real_father }
				}
			}
			scope:mother.primary_spouse = {
				trigger_event = mistress_birth.9001
			}
		}
		
		ai_chance = {
			base = 100
		}
	}
}

# Alt to birth.2011 for mistress. UPDATED 8/25
### Legitimizer's Faith does not have bastardy
mistress_birth.2011 = {
	type = character_event
	title = mistress_birth.2011.t
	desc = mistress_birth.2011.desc
	theme = pregnancy
	override_background = { reference = relaxing_room }
	left_portrait = {
		character = scope:other_parent
		animation = happiness
	}
	right_portrait = {
		character = scope:mother.primary_partner
		animation = disapproval
		trigger = {
			exists = scope:mother.primary_partner
			NOT = { root = scope:mother.primary_partner }
		}
	}
	lower_left_portrait = scope:child
	
	immediate = {
		play_music_cue = mx_cue_seduction
		
		#To get the picture of the other parent, and send correct follow-up events
		if = {
			limit = {
				scope:mother = root
			}
			scope:real_father = {
				save_scope_as = other_parent
			}
		}
		else = {
			scope:mother = {
				save_scope_as = other_parent
			}
		}
		save_scope_as = legitimizer
		
		# It's already added elsewhere, but we want this here for tooltip reasons.
		scope:child = {
			show_as_tooltip = {
				add_bastard_trait_based_on_faith_effect = yes
			}
		}
	}
	
	#NAMING WIDGET
	widgets = {
		widget = {
			is_shown = {
				allow_naming_on_birth_of_child_trigger = { CHILD = scope:child }
			}
			gui = "event_window_widget_name_child"
			container = "dynamic_birth_name"
			controller = name_character
			setup_scope = { scope:child = { save_scope_as = name_character_target } }
		}
	}
	
	option = {
		name = birth.1001.a
		scope:other_parent = {
			trigger_event = birth.2012
		}
		
		#Spouse of mother must know about baby
		if = {
			limit = {
				exists = scope:mother.primary_spouse
				scope:mother.primary_spouse = {
					NOR = {
						this = scope:legitimizer
						this = scope:other_parent
						this = scope:real_father
					}
				}
			}
			scope:mother.primary_spouse = {
				trigger_event = mistress_birth.9001
			}
		}
	}
}

# Your spouse is a mistress and gives birth. replaces birth.2102
mistress_birth.9001 ={
	type = character_event
	title = mistress_birth.9001.t
	desc = mistress_birth.9001.desc
	theme = bastardy
	left_portrait = scope:mother
	right_portrait = scope:real_father
	
	trigger = {
		scope:mother = {
			is_married = yes
			has_court_position = mistress_court_position
			is_courtier_of = scope:real_father
		}
	}
	
	immediate = {
		play_music_cue = "mx_cue_succession"
	}
	
	option = { # Compensate me >:(
		name =  mistress_birth.9001.a
		add_prestige = minor_prestige_loss
		
		scope:real_father = {
			trigger_event = {
				id = mistress_birth.9002
				days = 3
			}
		}
		
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_greed = 2
				ai_vengefulness = 0.5
				ai_energy = 0.25
				ai_boldness = 1
				ai_rationality = 0.25
			}
		}
	}
	
	option = { # Compensate me even more!
		name =  mistress_birth.9001.b
		trigger = {
			OR = {
				has_trait = ambitious
				has_trait = wrathful
				has_trait = vengeful
				has_trait = schemer
			}
		}
		
		add_prestige = minor_prestige_loss
		scope:real_father = {
			trigger_event = {
				id = mistress_birth.9003
				days = 3
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_vengefulness = 2
				ai_greed = 1
				ai_boldness = 2
				ai_energy = 0.25
				ai_rationality = 0.25
			}
			
			modifier = {
				OR = {
					has_relation_rival = scope:real_father
					opinion = {
						target = scope:real_father
						value <= -20
					}
				}
				add = 30
			}
		}
	}
	
	option = { # Eh...Let it be (compassionateness, craven etc has stress relief, otherwise stress gain)
		name =  mistress_birth.9001.c
		stress_impact = {
			greedy = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			ambitious = medium_stress_impact_gain
			craven = minor_stress_impact_loss
			arbitrary = minor_stress_impact_loss
			content = medium_stress_impact_loss
			compassionate = medium_stress_impact_loss
			forgiving = minor_stress_impact_loss
			lazy = medium_stress_impact_loss
		}
		add_prestige = medium_prestige_loss
		
		ai_chance = {
			base = 30
			ai_value_modifier = {
				ai_compassion = 1
				ai_energy = -0.25
				ai_sociability = -0.25
				ai_boldness = -0.5
				ai_vengefulness = -0.5
			}
			
			modifier = {
				OR = {
					has_relation_rival = scope:real_father
					opinion = {
						target = scope:real_father
						value <= -20
					}
				}
				add = -60
			}
			
			modifier = { # Weight up for stress.
				has_trait = content
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = lazy
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = forgiving
				add = 5
			}
			
			modifier = { # Weight up for stress.
				has_trait = compassionate
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = arbitrary
				add = 5
			}
			
			modifier = { # Weight up for stress.
				has_trait = craven
				add = 5
			}
			
			modifier = {	# Weight down for stress.
				add = -15
				has_trait = greedy
			}
			modifier = {	# Weight down for stress.
				add = -15
				has_trait = wrathful
			}
			modifier = {	# Weight down for stress.
				add = -15
				has_trait = ambitious
			}
		}
	}
}

# You're asked to give money to your paramour's spouse
mistress_birth.9002 = {
	#Tyranny gain, prestiege loss, opinion loss if you don't comply
	type = character_event
	title = mistress_birth.9002.t
	desc = mistress_birth.9002.desc
	theme = realm
	right_portrait = {
		character = scope:father
		animation = scheme
	}
	
	left_portrait = {
		character = scope:mother
		animation = newborn
	}
	
	# Fine...
	option = {
		name = mistress_birth.9002.a
		stress_impact = {
			greedy = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			ambitious = medium_stress_impact_gain
			arbitrary = minor_stress_impact_loss
			content = medium_stress_impact_loss
			compassionate = medium_stress_impact_loss
			generous = medium_stress_impact_loss
			lazy = medium_stress_impact_loss
		}
		
		pay_short_term_gold = {
			target = scope:father
			gold = medium_gold_value
		}
		
		scope:father = {
			set_variable = {
				name = compensation_paramour_spouse
				value = scope:father.medium_gold_value
				days = 10
			}
		}
		
		if = {
			limit = {
				has_character_modifier = inconsiderate_liege
			}
			remove_character_modifier = inconsiderate_liege
		}
		
		ai_chance = {
			base = 60
			ai_value_modifier = {
				ai_greed = -2
				ai_compassion = 1
				ai_energy = -0.5
				ai_honor = 1
				ai_sociability = 0.25
			}
			
			modifier = { # Weight up for stress.
				has_trait = content
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = lazy
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = forgiving
				add = 5
			}
			
			modifier = { # Weight up for stress.
				has_trait = compassionate
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = arbitrary
				add = 5
			}
			
			modifier = { # Weight up for stress.
				has_trait = craven
				add = 5
			}
			
			modifier = { # Weight down for stress.
				add = -15
				has_trait = greedy
			}
			modifier = { # Weight down for stress.
				add = -15
				has_trait = wrathful
			}
			modifier = { # Weight down for stress.
				add = -15
				has_trait = ambitious
			}
		}
		
		scope:father = {
			trigger_event = {
				id = mistress_birth.9004
				days = 3
			}
		}
	}
	
	# No :)
	option = {
		name = mistress_birth.9002.b
		stress_impact = {
			compassionate = medium_stress_impact_gain
			generous = medium_stress_impact_gain
		}
		scope:father = {
			add_opinion = {
				target = scope:real_father
				modifier = angry_opinion
				opinion = -30
			}
		}
		add_character_modifier = {
			modifier = inconsiderate_liege
			years = 5
		}
		add_tyranny = minor_tyranny_gain
		
		ai_chance = {
			base = 40
			ai_value_modifier = {
				ai_greed = 2
				ai_compassion = -2
				ai_honor = -0.5
				ai_vengefulness = 0.5
				ai_sociability = -0.25
			}
		}
		
		scope:father = {
			trigger_event = {
				id = mistress_birth.9005
				days = 3
			}
		}
	}
}

# You're asked to give a hook to your paramour's spouse
mistress_birth.9003 = {
	#Tyranny gain, prestiege loss, opinion loss if you don't comply
	type = character_event
	title = mistress_birth.9003.t
	desc = mistress_birth.9003.desc
	theme = realm
	right_portrait = {
		character = scope:father
		animation = scheme
	}
	
	left_portrait = {
		character = scope:mother
		animation = newborn
	}
	
	# Fine
	option = {
		name = mistress_birth.9003.a
		
		stress_impact = {
			greedy = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			ambitious = medium_stress_impact_gain
			arbitrary = minor_stress_impact_loss
			content = medium_stress_impact_loss
			compassionate = medium_stress_impact_loss
			generous = medium_stress_impact_loss
			lazy = medium_stress_impact_loss
		}
		
		ai_chance = {
			base = 40
			ai_value_modifier = {
				ai_greed = -1
				ai_vengefulness = -1
				ai_compassion = 1
				ai_energy = -0.5
				ai_honor = 1
				ai_sociability = 0.25
			}
			
			modifier = { # Weight up for stress.
				has_trait = content
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = lazy
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = forgiving
				add = 5
			}
			
			modifier = { # Weight up for stress.
				has_trait = compassionate
				add = 15
			}
			
			modifier = { # Weight up for stress.
				has_trait = arbitrary
				add = 5
			}
			
			modifier = { # Weight up for stress.
				has_trait = craven
				add = 5
			}
			
			modifier = { # Weight down for stress.
				add = -15
				has_trait = greedy
			}
			modifier = { # Weight down for stress.
				add = -15
				has_trait = wrathful
			}
			modifier = { # Weight down for stress.
				add = -15
				has_trait = ambitious
			}
		}
		
		scope:father = {
			add_hook = {
				type = favor_hook
				target = scope:real_father
			}
		}
		
		if = {
			limit = {
				has_character_modifier = inconsiderate_liege
			}
			remove_character_modifier = inconsiderate_liege
		}
		
		scope:father = {
			trigger_event = {
				id = mistress_birth.9006
				days = 3
			}
		}
	}
		
		# No :)
	option = {
		name = mistress_birth.9003.b
		stress_impact = {
			compassionate = medium_stress_impact_gain
			generous = medium_stress_impact_gain
		}
		
		ai_chance = {
			base = 60
			ai_value_modifier = {
				ai_greed = 1
				ai_compassion = -1
				ai_honor = -1
				ai_vengefulness = 2
				ai_sociability = -0.25
			}
		}
		
		scope:father = {
			trigger_event = {
				id = mistress_birth.9007
				days = 3
			}
		}
	}
}

# Liege responds to your request for monetary compensation and accepts
mistress_birth.9004 = {
	type = letter_event
	opening = {
		desc = mistress_birth.9004.opening
	}
	desc = mistress_birth.9004.desc
	sender = scope:real_father
	option = {
		name = mistress_birth.9004.a
		
		show_as_tooltip = {
			custom_tooltip = {
				text = mistress_birth.9004.a.tt
			}
			
			stress_impact = {
				greedy = minor_stress_impact_loss
			}
			scope:father = {
				add_character_flag = {
					flag = cuckold_is_monetary_compensated
					years = 5
				}
			}
		}
	}
}

# Liege responds to your request for monetary compensation and refuses
mistress_birth.9005 = {
	type = letter_event
	opening = {
		desc = mistress_birth.9005.opening
	}
	desc = mistress_birth.9005.desc
	sender = scope:real_father
	option = {
		name = mistress_birth.9005.a
		stress_impact = {
			greedy = minor_stress_impact_gain
		}
		
		add_character_flag = {
			flag = cuckold_is_not_monetary_compensated
			years = 5
		}
		
		set_relation_rival = {
			reason = cuckolded_by_liege_without_benefit
			target = scope:real_father
		}
		scope:father = {
			add_opinion = {
				target = scope:real_father
				modifier = angry_opinion
				opinion = -30
			}
		}
		
		scope:real_father = {
			add_character_modifier = {
				modifier = inconsiderate_liege
				years = 5
			}
			add_tyranny = minor_tyranny_gain
		}
	}
}

# Liege responds to your request for hook compensation and accepts
mistress_birth.9006 = {
	type = letter_event
	opening = {
		desc = mistress_birth.9004.opening
	}
	desc = mistress_birth.9006.desc
	sender = scope:real_father
	
	option = {
		name = mistress_birth.9006.a
		custom_tooltip = mistress_birth.9006.a.tt
		stress_impact = {
			ambitious = minor_stress_impact_loss
		}
		
		add_prestige = medium_prestige_gain
		
		scope:father = {
			add_character_flag = {
				flag = cuckold_is_hook_compensated
				years = 5
			}
		}
	}
}

# Liege responds to your request for hook compensation and refuses
mistress_birth.9007 = {
	type = letter_event
	opening = {
		desc = mistress_birth.9005.opening
	}
	desc = mistress_birth.9005.desc
	sender = scope:real_father
	
	option = {
		name = mistress_birth.9005.a
		stress_impact = {
			greedy = minor_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}
		
		add_prestige = medium_prestige_loss
		
		add_character_flag = {
			flag = cuckold_is_not_hook_compensated
			years = 5
		}
		
		set_relation_rival = {
			reason = cuckolded_by_liege_without_benefit
			target = scope:real_father
		}
		
		scope:father = {
			add_opinion = {
				target = scope:real_father
				modifier = angry_opinion
				opinion = -30
			}
		}
		
		scope:real_father = {
			add_character_modifier = {
				modifier = inconsiderate_liege
				years = 5
			}
		}
	}
}



