# Written by Flavio

namespace = HFP

## Expanded pregnancy events

########################################## MISSING REGENT WARNING ##################

# Pregnant ruler notified she hasn't appointed a regent
character_event = {
	id = HFP.20400
	desc = EVTDESCHFP20400
	picture = GFX_evt_recovery

	is_triggered_only = yes # various events in base_birth_events.txt

	ai = no

	option = {
		name = EVTOPTBHFP20400 # I know just the guy

		trigger = {
			NOR = { # Not if you already have a regent
				has_assigned_minor_title = title_appointed_regent
				has_assigned_minor_title = title_regent
			}

			# Option only available if you have at least SOMEBODY that doesn't hate you in your court
			any_courtier_or_vassal = {
				is_adult = yes
				prisoner = no
				is_incapable = no
				has_regent = no

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

					is_friend = ROOT
					is_lover = ROOT
				}
			}
		}

		random_courtier_or_vassal = {
			show_scope_change = no

			limit = {
				is_adult = yes
				prisoner = no
				is_incapable = no
				has_regent = no

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

					is_friend = ROOT
					is_lover = ROOT
				}
			}

			# First search for person who both likes you, is trustworthy, and is competent
			preferred_limit = {
				stewardship >= 10

				OR = {
					opinion = {
						who = ROOT
						value >= 50
					}

					is_friend = ROOT
					is_lover = ROOT
				}

				NOR = {
					trait = deceitful
					trait = ambitious
				}
			}

			# Then search for person who likes you and is trustworthy
			preferred_limit = {
				OR = {
					opinion = {
						who = ROOT
						value >= 30
					}

					is_friend = ROOT
					is_lover = ROOT
				}

				NOR = {
					trait = deceitful
					trait = ambitious
				}
			}

			# Then search for person that likes you

			give_minor_title = title_appointed_regent
		}
	}

	option = {
		name = EVTOPTAHFP20400 # I'll think about it
	}

	after = {
		set_dynasty_flag = pregnancy_regent_warning
	}
}

# on_pregnancy, set clock for finishing phase at 2 months
character_event = {
	id = HFP.20401

	is_triggered_only = yes # on_pregnancy
	hide_window = yes

	immediate = {
		character_event = {
			id = HFP.20402
			days = 170
		}
	}
}

character_event = {
	id = HFP.20402

	is_triggered_only = yes
	hide_window = yes

	trigger = {
		trait = pregnant

		has_game_rule = {
			name = pregnancy_flavor
			value = on
		}
	}

	immediate = {
		add_trait = pregnancy_finishing
	}
}

# on_birth (fired on the child), remove the trait and check all flavor flags
character_event = {
	id = HFP.20403

	is_triggered_only = yes # on_birth
	hide_window = yes

	immediate = {
		mother = {
			remove_trait = pregnancy_finishing
			remove_trait = in_hiding
			remove_trait = travelling
			remove_character_modifier = mother_praying_health
			remove_character_modifier = mother_resting_health
			remove_character_modifier = mother_partying_health
			clr_character_flag = mother_asked_retirement
			clr_character_flag = flag_mother_dark_rest

			# Safety check, they should already have been removed
			clr_character_flag = mother_gossip_listening
			clr_character_flag = mother_gossip_talking
			clr_character_flag = mother_gossip_trusting
			clr_character_flag = mother_gossip_plotting
			clr_character_flag = mother_gossip_envious
			clr_character_flag = mother_gossip_shy
			clr_character_flag = mother_gossip_learning
			clr_character_flag = mother_gossip_content
			clr_character_flag = mother_gossip_gluttonous

			character_event = {
				id = HFP.20597 # Clears persistent Physician targets. They are still on on_birth since post-partum complications may require their services
				days = 35
			}
		}

		# Mother took part in fertility feast, chance of blessed girl
		if = {
			limit = {
				is_female = yes
				NOT = { trait = attractive }

				mother = {
					has_character_modifier = mother_fertility_festival_2
				}
			}

			random_list = {
				40 = {
					mult_modifier = {
						factor = 1.75
						mother_even_if_dead = { trait = ugly }
					}

					mult_modifier = {
						factor = 1.75
						father_even_if_dead = { trait = ugly }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = attractive }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = attractive }
					}

					mult_modifier = {
						factor = 1.75
						mother_even_if_dead = { any_child = { trait = attractive } } # Avoid entire litters of them
					}

					mult_modifier = {
						factor = 1.75
						father_even_if_dead = { any_child = { trait = attractive } } # Avoid entire litters of them
					}
				}

				60 = {
					remove_trait = hunchback
					remove_trait = dwarf
					remove_trait = ugly
					remove_trait = inbred
					remove_trait = sickly
					remove_trait = harelip
					remove_trait = lisp

					mother = { character_event = { id = HFP.20055 days = 3600 random = 200 } }
					father = { character_event = { id = HFP.20055 days = 3600 random = 200 } }
				}
			}
		}

		# Catholic/Orthodox Kings/Emperors: chance for special baptism
		father = { save_event_target_as = scoped_father }
		mother = { save_event_target_as = scoped_mother }

		event_target:scoped_father = {
			if = {
				limit = {
					trigger_if = {
						limit = { real_tier = event_target:scoped_mother }
						is_married_matrilineally = no
					}
					trigger_else = {
						higher_tier_than = event_target:scoped_mother
					}
				}
			}

			character_event = {
				id = HF.20100
				days = 12
			}
		}

		event_target:scoped_mother = {
			if = {
				limit = {
					trigger_if = {
						limit = { real_tier = event_target:scoped_father }
						is_married_matrilineally = yes
					}
					trigger_else = {
						higher_tier_than = event_target:scoped_father
					}
				}
			}

			character_event = {
				id = HF.20100
				days = 12
			}
		}

		clear_event_target = scoped_father
		clear_event_target = scoped_mother

		# Catholic/Orthodox rulers: chance of Churching after the first pregnancy is over
		mother = {
			if = {
				limit = {
					OR = {
						religion = catholic
						religion = orthodox
					}

					is_married = yes
					num_of_children < 2

					OR = {
						is_ruler = yes
						spouse = { is_ruler = yes }
					}

					NOR = {
						society_member_of = the_satanists
						has_character_modifier = adulteress
						has_character_modifier = incestuous_adulteress
					}
				}

				character_event = {
					id = HFP.20018
					days = 24
				}
			}
		}

		# Mother drunk/had drugs during pregnancy, chance of dumb child
		if = {
			limit = {
				mother = {
					trait = drunkard
				}
			}

			random = {
				chance = 30

				set_character_flag = flag_drunk_birth

				if = {
					limit = { trait = slow }

					remove_trait = slow
					add_trait = imbecile
					mother = { character_event = { id = HFP.20001 days = 451 } }
					father = { character_event = { id = HFP.20002 days = 450 } }
				}
				else_if = {
					limit = { trait = quick }
					remove_trait = quick
				}
				else_if = {
					limit = { trait = genius }
					remove_trait = genius
					add_trait = quick
				}
				else_if = {
					limit = { NOT = { trait = imbecile } }

					add_trait = slow
					mother = { character_event = { id = HFP.20001 days = 451 } }
					father = { character_event = { id = HFP.20002 days = 450 } }
				}
			}
		}

		if = {
			limit = {
				mother = {
					has_character_modifier = hashish_addict
				}
			}

			random = {
				chance = 30

				set_character_flag = flag_drugged_birth

				if = {
					limit = { trait = slow }

					remove_trait = slow
					add_trait = imbecile
					mother = { character_event = { id = HFP.20001 days = 451 } }
					father = { character_event = { id = HFP.20002 days = 450 } }
				}
				else_if = {
					limit = { trait = quick }
					remove_trait = quick
				}
				else_if = {
					limit = { trait = genius }
					remove_trait = genius
					add_trait = quick
				}
				else_if = {
					limit = { NOT = { trait = imbecile } }

					add_trait = slow
					mother = { character_event = { id = HFP.20001 days = 451 } }
					father = { character_event = { id = HFP.20002 days = 450 } }
				}
			}
		}

		random_list = { # Chance of imprinting (mother)
			50 = {
				mult_modifier = {
					factor = 0.5
					mother = { num_of_children >= 2 }
				}

				mult_modifier = {
					factor = 0.35
					mother = { num_of_children >= 3 }
				}

				mult_modifier = {
					factor = 0.25
					mother = { num_of_children >= 4 }
				}

				mult_modifier = {
					factor = 0.1
					mother = { num_of_children >= 5 }
				}

				mult_modifier = {
					factor = 0.5
					mother = { practical_age >= 30 }
				}

				mult_modifier = {
					factor = 1.5
					mother = { trait = kind }
				}

				mult_modifier = {
					factor = 1.5
					mother = { trait = charitable }
				}

				mult_modifier = {
					factor = 0.5
					mother = { trait = envious }
				}

				mult_modifier = {
					factor = 0.5
					mother = { trait = cruel }
				}

				mother = {
					character_event = {
						id = HFP.20599
						days = 70
					}
				}
			}

			50 = { }
		}

		random_list = { # Chance of imprinting (father)
			50 = {
				mult_modifier = {
					factor = 0.5
					father = { num_of_children >= 2 }
				}

				mult_modifier = {
					factor = 0.35
					father = { num_of_children >= 3 }
				}

				mult_modifier = {
					factor = 0.25
					father = { num_of_children >= 4 }
				}

				mult_modifier = {
					factor = 0.1
					father = { num_of_children >= 5 }
				}

				mult_modifier = {
					factor = 0.5
					father = { practical_age >= 30 }
				}

				mult_modifier = {
					factor = 1.5
					father = { trait = kind }
				}

				mult_modifier = {
					factor = 1.5
					father = { trait = charitable }
				}

				mult_modifier = {
					factor = 0.5
					father = { trait = envious }
				}

				mult_modifier = {
					factor = 0.5
					father = { trait = cruel }
				}

				father = {
					character_event = {
						id = HFP.20000
						days = 700
						random = 500
					}
				}
			}

			50 = { }
		}

		mother = {
			if = {
				limit = { has_character_flag = flag_vatican_prince } # The Papal orgy bears fruits

				clr_character_flag = flag_vatican_prince

				character_event = {
					id = HFP.20598 # Notify mother
					days = 7
					random = 7
				}
			}

			if = {
				limit = { trait = troubled_pregnancy }

				random = {
					chance = 80
					ROOT = { set_character_flag = flag_troubled_pregnancy_child }
				}
			}

			if = {
				limit = { trait = stressed }

				random = {
					chance = 30

					character_event = {
						id = HFP.20581 # Chance to recover from stressed
						days = 30
						random = 50
					}
				}
			}

			if = {
				limit = { has_character_flag = mother_craved_quail }

				clr_character_flag = mother_craved_quail

				random = {
					chance = 70

					ROOT = { add_trait = clubfooted }

					character_event = {
						id = HFP.20582 # Notify mother child gains 2 diplomacy
						days = 950
						random = 550
					}
				}
			}

			if = {
				limit = { has_character_flag = mother_craved_hare }

				clr_character_flag = mother_craved_hare

				random = {
					chance = 70

					ROOT = { add_trait = harelip }

					character_event = {
						id = HFP.20583 # Notify mother child gains 2 intrigue
						days = 950
						random = 550
					}
				}
			}

			if = {
				limit = { has_character_flag = mother_craved_trout }

				clr_character_flag = mother_craved_trout

				random = {
					chance = 70

					ROOT = { add_trait = ugly }

					character_event = {
						id = HFP.20584 # Notify mother child gains 2 learning
						days = 950
						random = 550
					}
				}
			}
		}

		if = {
			limit = {
				mother = { has_character_flag = mom_hopes_child_warrior }
			}

			mother = { clr_character_flag = mom_hopes_child_warrior }

			# Small chance of child actually gaining positive trait
			random_list = {
				20 = {
					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = weak }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = frail }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = inbred }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = hunchback }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = dwarf }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = weak }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = frail }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = inbred }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = hunchback }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = dwarf }
					}

					if = {
						limit = { trait = weak }
						remove_trait = weak
					}
					if = {
						limit = { trait = frail }
						remove_trait = frail
					}
					if = {
						limit = { trait = inbred }
						remove_trait = inbred
					}
					if = {
						limit = { trait = hunchback }
						remove_trait = hunchback
					}
					if = {
						limit = { trait = dwarf }
						remove_trait = dwarf
					}
					if = {
						limit = { trait = sickly }
						remove_trait = sickly
					}

					mother = {
						character_event = {
							id = HFP.20585 # Notify mother child gains 2 martial
							days = 250
							random = 250
						}
					}
				}

				80 = { } # No luck
			}
		}

		# Mother offered sacrifice for strong child
		if = {
			limit = {
				mother = { has_character_flag = mom_hopes_child_strong }
			}

			mother = { clr_character_flag = mom_hopes_child_strong }

			# Small chance of child actually gaining positive trait
			random_list = {
				20 = {
					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = weak }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = frail }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = inbred }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = hunchback }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = dwarf }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = weak }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = frail }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = inbred }
					}

					remove_trait = weak
					remove_trait = sickly
					add_trait = strong

					mother = {
						character_event = {
							id = HFP.20586 # Notify mother child is growing strong
							days = 250
							random = 250
						}
					}
				}

				80 = { # No luck
					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = strong }
					}

					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = strong }
					}
				}
			}
		}

		# Mother offered sacrifice for pretty child
		if = {
			limit = {
				mother = { has_character_flag = mom_hopes_child_pretty }
			}

			mother = { clr_character_flag = mom_hopes_child_pretty }

			# Small chance of child actually gaining positive trait
			random_list = {
				20 = {
					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = ugly }
					}

					mult_modifier = {
						factor = 2
						mother_even_if_dead = { trait = attractive }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = ugly }
					}

					mult_modifier = {
						factor = 2
						father_even_if_dead = { trait = attractive }
					}

					remove_trait = harelip
					remove_trait = ugly
					add_trait = attractive

					mother = {
						character_event = {
							id = HFP.20587 # Notify mother child is growing strong
							days = 250
							random = 250
						}
					}
				}

				80 = { } # No luck
			}
		}

		# Mother offered sacrifice for smart child
		if = {
			limit = {
				mother = { has_character_flag = mom_hopes_child_smart }
			}

			mother = { clr_character_flag = mom_hopes_child_smart }

			# Small chance of child actually gaining positive trait
			random_list = {
				20 = {
					mult_modifier = {
						factor = 0.5
						mother_even_if_dead = { trait = slow }
					}

					mult_modifier = {
						factor = 0.25
						mother_even_if_dead = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.5
						mother_even_if_dead = { trait = quick }
					}

					mult_modifier = {
						factor = 2
						mother_even_if_dead = { trait = genius }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = slow }
					}

					mult_modifier = {
						factor = 0.25
						father_even_if_dead = { trait = imbecile }
					}

					mult_modifier = {
						factor = 0.5
						father_even_if_dead = { trait = ugly }
					}

					mult_modifier = {
						factor = 1.5
						father_even_if_dead = { trait = quick }
					}

					mult_modifier = {
						factor = 2
						father_even_if_dead = { trait = genius }
					}

					remove_trait = slow
					remove_trait = imbecile

					if = {
						limit = { trait = quick }

						remove_trait = quick
						add_trait = genius
					}
					else = {
						add_trait = quick
					}

					mother = {
						character_event = {
							id = HFP.20588 # Notify mother child is growing smart
							days = 450
							random = 450
						}
					}
				}
				80 = { } # No luck
			}
		}

		# Mother wanted a boy/girl
		mother = {
			if = {
				limit = {
					OR = {
						has_character_flag = mom_hopes_child_boy
						has_character_flag = mom_hopes_child_girl
					}
				}

				character_event = {
					id = HFP.20589 # Did the bet pay out?
					days = 15
					random = 15
				}
			}
		}

		# Mother made a vow to the Holy Virgin
		if = {
			limit = {
				mother = {
					OR = {
						has_character_modifier = mother_vow_chastity
						has_character_modifier = mother_vow_humility
						has_character_modifier = mother_vow_charity
						has_character_modifier = mother_vow_temperance
					}
				}
			}

			# Possible divine intervention
			random_list = {
				70 = { } # Nothing happens

				30 = {
					# Broke the vow, decreased chance
					mult_modifier = {
						factor = 0.5

						mother = {
							has_character_modifier = mother_vow_temperance

							OR = {
								trait = gluttonous
								trait = hedonist
							}
						}
					}

					mult_modifier = {
						factor = 0.5

						mother = {
							has_character_modifier = mother_vow_charity
							trait = greedy
						}
					}

					mult_modifier = {
						factor = 0.5

						mother = {
							has_character_modifier = mother_vow_humility
							trait = proud
						}
					}

					mult_modifier = {
						factor = 0.5

						mother = {
							has_character_modifier = mother_vow_chastity
							trait = lustful
						}
					}


					# Remained true to the vow, increased chance

					mult_modifier = {
						factor = 1.75

						mother = {
							has_character_modifier = mother_vow_temperance
							trait = temperate
						}
					}

					mult_modifier = {
						factor = 1.75

						mother = {
							has_character_modifier = mother_vow_charity
							trait = charitable
						}
					}

					mult_modifier = {
						factor = 1.75

						mother = {
							has_character_modifier = mother_vow_humility
							trait = humble
						}
					}

					mult_modifier = {
						factor = 1.75

						mother = {
							has_character_modifier = mother_vow_chastity

							OR = {
								trait = chaste
								trait = celibate
							}
						}
					}

					remove_trait = sickly
					remove_trait = inbred
					remove_trait = harelip
					remove_trait = clubfooted
					remove_trait = hunchback
					remove_trait = lisp
					remove_trait = stutter
					remove_trait = ugly
					remove_trait = dwarf
					remove_trait = slow
					remove_trait = imbecile
					remove_trait = weak
				}
			}

			mother = {
				character_event = {
					id = HFP.20590 # Did it work? If so, does she keep her word?
					days = 25
					random = 25
				}
			}
		}
	}
}

# Hard pregnancy starts
character_event = {
	id = HFP.20404
	desc = EVTDESCHFP20404
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes # various events in base_birth_events.txt

	trigger = {
		trait = pregnant
	}

	immediate = {
		add_trait = hard_pregnancy
	}

	option = { # Abort
		name = EVTOPTZHFP20404

		trigger = {
			is_playable = yes

			trigger_if = {
				limit = { is_married = yes }
				is_married_matrilineally = yes
			}

			NOR = {
				trait = kind

				AND = {
					religion_group = christian
					trait = zealous
				}
			}
		}

		custom_tooltip = { text = tooltip_20404_abortion }

		tiered_piety_negative_effect = yes
		remove_trait = hard_pregnancy
		remove_trait = pregnant

		add_character_modifier = {
			name = aborted_child
			years = 4
		}

		hidden_effect = {
			cancel_pregnancy = yes

			random_list = {
				25 = { character_event = { id = HFP.20064 days = 35 } } # Mother becomes depressed/insane
				25 = { character_event = { id = HFP.20065 days = 35 } } # Mother accidentally reveals the deed
				25 = { character_event = { id = HFP.20066 days = 35 } } # Mother permanently loses fertility
				25 = { } # Nothing happens
			}

			if = {
				limit = {
					is_married = yes
					NOT = { has_religion_feature = religion_matriarchal }

					spouse = {
						is_incapable = no
						is_inaccessible_trigger = no

						NOR = {
							trait = slow
							trait = imbecile
							trait = trusting
							trait = inbred
						}
					}
				}

				spouse = {
					character_event = {
						id = HFP.20061
						days = 15
					}
				}
			}
		}

		ai_chance = {
			factor = 1

			trigger = {
				NOT = { trait = brave }
			}

			mult_modifier = {
				factor = 10
				trait = craven
			}

			mult_modifier = {
				factor = 5
				has_religion_feature = religion_matriarchal
			}

			mult_modifier = {
				factor = 3
				trait = cruel
			}

			mult_modifier = {
				factor = 3
				trait = envious
			}
		}
	}

	option = {
		name = EVTOPTAHFP20404

		tooltip = {
			add_trait = hard_pregnancy
		}

		hidden_effect = {
			if = {
				limit = { is_married = yes }

				spouse = {
					character_event = { id = HFP.20405 }
				}
			}
			else_if = {
				limit = { has_assigned_minor_title = title_court_physician }

				random_courtier_or_vassal = {
					limit = { has_minor_title = title_court_physician }
					character_event = { id = HFP.20405 }
				}
			}
			else = {
				character_event = {
					id = HFP.20407 # If lonely, decide if to temporarily retire from rule
					days = 6
				}
			}
		}

		ai_chance = { factor = 99 }
	}
}

# Spouse/Physician informed of a hard pregnancy
character_event = {
	id = HFP.20405
	desc = EVTDESCHFP20405
	picture = GFX_evt_bad_news_female

	trigger = {
		FROM = { is_alive = yes }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20405

		FROM = {
			character_event = {
				id = HFP.20406 # Encourage spouse to keep safe
				days = 3
			}
		}

		ai_chance = {
			factor = 90

			mult_modifier = {
				factor = 0.1

				opinion = {
					who = FROM
					value < 20
				}
			}
		}
	}

	option = { # Do nothing
		name = EVTOPTBHFP20405

		FROM = {
			character_event = {
				id = HFP.20407 # If lonely, decide if to temporarily retire from rule
				days = 6
			}
		}

		ai_chance = { factor = 10 }
	}
}

# Mother adviced by spouse to stop retire for the pregnancy
character_event = {
	id = HFP.20406

	desc = {
		text = EVTDESCHFPA20406
		picture = GFX_evt_quarrel
		trigger = { is_married = FROM } # Desc for Spouse
	}
	desc = {
		text = EVTDESCHFPB20406
		picture = GFX_evt_court_physician
		trigger = {
			FROM = {
				has_minor_title = title_court_physician # Desc for Physician
				NOT = { is_married = ROOT } # Spouse could be liege's court physician
			}
		}
	}

	is_triggered_only = yes

	immediate = {
		set_character_flag = mother_asked_retirement
	}

	option = { # Yes, staying at court
		name = EVTOPTAHFP20406

		trigger = { is_pilgrim = no }

		custom_tooltip = {
			text = mother_staying_court

			random_list = {
				70 = { character_event = { id = HFP.20411 } } # Home hard pregnancy negative randomized events

				30 = { # Pregnancy goes well, without any more issues
					mult_modifier = {
						factor = 0.8
						trait = paranoid
					}

					mult_modifier = {
						factor = 0.7
						trait = stressed
					}

					mult_modifier = {
						factor = 0.5
						trait = depressed
					}

					mult_modifier = {
						factor = 0.7
						trait = lunatic
					}

					mult_modifier = {
						factor = 0.7
						trait = possessed
					}

					mult_modifier = {
						factor = 0.7
						is_ill = yes
					}
				}
			}
		}

		add_trait = in_hiding

		FROM = {
			show_scope_change = no

			character_event = { id = HFP.20408 } # Notify

			opinion = {
				name = opinion_kind
				who = ROOT
				years = 5
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.5

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

			mult_modifier = {
				factor = 1.5

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

			mult_modifier = {
				factor = 1.5

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

	option = { # Yes, going out
		name = EVTOPTBHFP20406

		custom_tooltip = {
			text = mother_going_countryside

			random_list = {
				60 = { character_event = { id = HFP.20412 } } # Countryside hard pregnancy negative randomized events

				40 = { # Pregnancy goes well, without any more issues
					mult_modifier = {
						factor = 0.8
						trait = paranoid
					}

					mult_modifier = {
						factor = 0.7
						trait = stressed
					}

					mult_modifier = {
						factor = 0.5
						trait = depressed
					}

					mult_modifier = {
						factor = 0.7
						trait = frail
					}

					mult_modifier = {
						factor = 0.7
						trait = weak
					}

					mult_modifier = {
						factor = 0.5
						is_ill = yes
					}
				}
			}
		}

		add_trait = travelling

		FROM = {
			show_scope_change = no

			character_event = { id = HFP.20409 } # Notify

			opinion = {
				name = opinion_kind
				who = ROOT
				years = 5
			}
		}

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 0.5
				trait = slothful
			}

			mult_modifier = {
				factor = 2
				trait = falconer
			}

			mult_modifier = {
				factor = 2
				trait = hunter
			}

			mult_modifier = {
				factor = 1.5
				trait = duelist
			}

			mult_modifier = {
				factor = 1.5
				trait = gardener
			}
		}
	}

	option = { # No
		name = EVTOPTCHFP20406

		trigger = { is_ruler = yes }

		custom_tooltip = {
			text = mother_keeps_ruling


			random_list = {
				30 = {
					mult_modifier = {
						factor = 1.2
						real_tier = COUNT
					}

					mult_modifier = {
						factor = 1.3
						real_tier = DUKE
					}

					mult_modifier = {
						factor = 1.5
						real_tier = KING
					}

					mult_modifier = {
						factor = 1.75
						real_tier = EMPEROR
					}

					mult_modifier = {
						factor = 1.75
						practical_age >= 40
					}

					mult_modifier = {
						factor = 1.75
						num_of_children >= 4
					}

					troubled_pregnancy_chance_low_effect = yes # Critical Failure: Troubled Pregnancy saving throw
				}

				60 = { character_event = { id = HFP.20411 } } # Home hard pregnancy negative randomized events

				10 = { # Pregnancy goes well, without any more issues
					mult_modifier = {
						factor = 0.8
						trait = paranoid
					}

					mult_modifier = {
						factor = 0.7
						trait = stressed
					}

					mult_modifier = {
						factor = 0.5
						trait = depressed
					}

					mult_modifier = {
						factor = 0.7
						trait = frail
					}

					mult_modifier = {
						factor = 0.7
						trait = weak
					}

					mult_modifier = {
						factor = 0.5
						is_ill = yes
					}
				}
			}
		}

		FROM = {
			show_scope_change = no

			character_event = { id = HFP.20410 } # Notify

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

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 2
				trait = stubborn
			}

			mult_modifier = {
				factor = 0.5
				trait = slothful
			}

			mult_modifier = {
				factor = 0.75
				is_ill = yes
			}
		}
	}
}

# Lonely mother decides if she wants to start regency or not
character_event = {
	id = HFP.20407
	desc = EVTDESCHFPA20407
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes

	trigger = {
		NOT = { has_character_flag = mother_asked_retirement }
	}

	option = { # Yes, staying at court
		name = EVTOPTAHFP20407

		custom_tooltip = {
			text = mother_staying_court_2

			random_list = {
				70 = { character_event = { id = HFP.20411 } } # Home hard pregnancy negative randomized events

				30 = { # Pregnancy goes well, without any more issues
					mult_modifier = {
						factor = 0.8
						trait = paranoid
					}

					mult_modifier = {
						factor = 0.7
						trait = stressed
					}

					mult_modifier = {
						factor = 0.5
						trait = depressed
					}

					mult_modifier = {
						factor = 0.7
						trait = lunatic
					}

					mult_modifier = {
						factor = 0.7
						trait = possessed
					}

					mult_modifier = {
						factor = 0.7
						is_ill = yes
					}
				}
			}
		}

		add_trait = in_hiding

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 2
				trait = slothful
			}
		}
	}

	option = { # Yes, going out
		name = EVTOPTBHFP20407

		trigger = { is_incapable = no }

		custom_tooltip = {
			text = mother_going_countryside_2

			random_list = {
				60 = { character_event = { id = HFP.20412 } } # Countryside hard pregnancy negative randomized events

				40 = { # Pregnancy goes well, without any more issues
					mult_modifier = {
						factor = 0.8
						trait = paranoid
					}

					mult_modifier = {
						factor = 0.7
						trait = stressed
					}

					mult_modifier = {
						factor = 0.5
						trait = depressed
					}

					mult_modifier = {
						factor = 0.7
						trait = frail
					}

					mult_modifier = {
						factor = 0.7
						trait = weak
					}

					mult_modifier = {
						factor = 0.5
						is_ill = yes
					}
				}
			}
		}

		add_trait = travelling

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 0.5
				trait = slothful
			}

			mult_modifier = {
				factor = 2
				trait = falconer
			}

			mult_modifier = {
				factor = 2
				trait = hunter
			}

			mult_modifier = {
				factor = 1.5
				trait = duelist
			}

			mult_modifier = {
				factor = 1.5
				trait = gardener
			}
		}
	}

	option = { # No
		name = EVTOPTCHFP20407

		trigger = { is_ruler = yes }

		custom_tooltip = {
			text = mother_keeps_ruling_2

			random_list = {
				30 = {
					mult_modifier = {
						factor = 1.2
						real_tier = COUNT
					}

					mult_modifier = {
						factor = 1.3
						real_tier = DUKE
					}

					mult_modifier = {
						factor = 1.5
						real_tier = KING
					}

					mult_modifier = {
						factor = 1.75
						real_tier = EMPEROR
					}

					mult_modifier = {
						factor = 1.75
						practical_age >= 40
					}

					mult_modifier = {
						factor = 1.75
						num_of_children >= 4
					}

					troubled_pregnancy_chance_low_effect = yes # Critical Failure: chance of Troubled Pregnancy
				}

				60 = { character_event = { id = HFP.20411 } } # Home hard pregnancy negative randomized events

				10 = { # Pregnancy goes well, without any more issues
					mult_modifier = {
						factor = 0.8
						trait = paranoid
					}

					mult_modifier = {
						factor = 0.7
						trait = stressed
					}

					mult_modifier = {
						factor = 0.5
						trait = depressed
					}

					mult_modifier = {
						factor = 0.7
						trait = frail
					}

					mult_modifier = {
						factor = 0.7
						trait = weak
					}

					mult_modifier = {
						factor = 0.5
						is_ill = yes
					}
				}
			}
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 2
				trait = stubborn
			}

			mult_modifier = {
				factor = 0.5
				trait = slothful
			}

			mult_modifier = {
				factor = 0.75
				is_ill = yes
			}
		}
	}
}

# Spouse/Physician informed mother will rest
character_event = {
	id = HFP.20408
	desc = EVTDESCHFP20408
	picture = GFX_evt_lovers

	is_triggered_only = yes
	notification = yes

	trigger = {
		FROM = { is_alive = yes }
	}

	ai = no

	option = {
		name = EVTOPTAHFP20408
	}
}

# Spouse/Physician informed mother will rest outside
character_event = {
	id = HFP.20409
	desc = EVTDESCHFP20409
	picture = GFX_evt_lovers

	is_triggered_only = yes
	notification = yes

	trigger = {
		FROM = { is_alive = yes }
	}

	ai = no

	option = {
		name = EVTOPTAHFP20409
	}
}

# Spouse/Physician informed mother will not rest
character_event = {
	id = HFP.20410
	desc = EVTDESCHFP20410
	picture = GFX_evt_quarrel

	trigger = {
		FROM = { is_alive = yes }
	}

	is_triggered_only = yes
	notification = yes

	option = {
		name = EVTOPTAHFP20410
	}
}

# Hidden random list for possible bad effects during hard pregnancy at home
character_event = {
	id = HFP.20411

	is_triggered_only = yes
	hide_window = yes

	trigger = {
		trait = hard_pregnancy
	}

	immediate = {
		clr_character_flag = mother_asked_retirement # If still active

		random_list = {
			35 = {
				mult_modifier = {
					factor = 1.5
					trait = stressed
				}

				mult_modifier = {
					factor = 1.5
					trait = cruel
				}

				mult_modifier = {
					factor = 1.5
					trait = envious
				}

				mult_modifier = {
					factor = 1.5 # Additives cause risk of troubled pregnancy
					trait = wroth
				}

				mult_modifier = {
					factor = 0.5
					trait = depressed
				}

				mult_modifier = {
					factor = 0.5
					trait = kind
				}

				mult_modifier = {
					factor = 0.5
					trait = patient
				}

				character_event = {
					id = HFP.20413 # Wroth pregnant
					days = 30
					random = 30
				}
			}

			35 = {
				mult_modifier = {
					factor = 1.5
					trait = stressed
				}

				mult_modifier = {
					factor = 1.5
					trait = hedonist
				}

				mult_modifier = {
					factor = 1.5
					trait = slothful
				}

				mult_modifier = {
					factor = 1.5 # Additives cause risk of troubled pregnancy
					trait = gluttonous
				}

				mult_modifier = {
					factor = 0.5
					trait = temperate
				}

				mult_modifier = {
					factor = 0.5
					trait = patient
				}

				character_event = {
					id = HFP.20414 # Glutton pregnant
					days = 30
					random = 30
				}
			}

			25 = {
				mult_modifier = {
					factor = 1.5
					trait = envious
				}

				mult_modifier = {
					factor = 1.5
					trait = slothful
				}

				mult_modifier = {
					factor = 1.5 # Additives cause risk of troubled pregnancy
					trait = depressed
				}

				mult_modifier = {
					factor = 0.5
					trait = humble
				}

				mult_modifier = {
					factor = 0.5
					trait = ambitious
				}

				character_event = {
					id = HFP.20415 # Depressed pregnant
					days = 30
					random = 30
				}
			}

			15 = {
				mult_modifier = {
					factor = 1.5
					trait = depressed
				}

				mult_modifier = {
					factor = 1.5
					trait = slothful
				}

				mult_modifier = {
					factor = 1.5
					trait = hedonist
				}

				mult_modifier = {
					factor = 1.5 # Additives cause risk of troubled pregnancy
					trait = drunkard
				}

				mult_modifier = {
					factor = 0.5
					trait = temperate
				}

				mult_modifier = {
					factor = 0.5
					trait = diligent
				}

				character_event = {
					id = HFP.20416 # Drunkard pregnant
					days = 30
					random = 30
				}
			}
		}
	}
}

# Hidden random list for possible bad effects during hard pregnancy outside
character_event = {
	id = HFP.20412

	is_triggered_only = yes
	hide_window = yes

	trigger = {
		trait = hard_pregnancy
	}

	immediate = {
		clr_character_flag = mother_asked_retirement # If still active

		random_list = {
			10 = {
				mult_modifier = {
					factor = 2
					trait = brawny
				}

				mult_modifier = {
					factor = 2
					trait = strong
				}

				mult_modifier = {
					factor = 1.5
					trait = diligent
				}

				mult_modifier = {
					factor = 1.5
					trait = falconer
				}

				mult_modifier = {
					factor = 1.5
					trait = hunter
				}

				mult_modifier = {
					factor = 1.5
					trait = duelist
				}

				mult_modifier = {
					factor = 1.5
					trait = shieldmaiden
				}

				# Pregnancy goes well
			}

			20 = {
				mult_modifier = {
					factor = 1.5
					trait = wounded
				}

				mult_modifier = {
					factor = 1.5
					trait = weak
				}

				mult_modifier = {
					factor = 1.5
					trait = frail
				}

				mult_modifier = {
					factor = 1.5
					trait = slow
				}

				mult_modifier = {
					factor = 1.75
					trait = imbecile
				}

				character_event = {
					id = HFP.20417 # Riding accident
					days = 30
					random = 30
				}
			}

			50 = {
				mult_modifier = {
					factor = 1.5
					trait = stressed
				}

				mult_modifier = {
					factor = 1.5
					trait = depressed
				}

				mult_modifier = {
					factor = 1.75
					is_ill = yes
				}

				mult_modifier = {
					factor = 0.5
					trait = strong
				}

				mult_modifier = {
					factor = 0.5
					trait = brawny
				}

				mult_modifier = {
					factor = 0.5
					trait = diligent
				}

				mult_modifier = {
					factor = 0.5
					trait = falconer
				}

				character_event = {
					id = HFP.20418 # Getting sick
					days = 30
					random = 30
				}
			}

			20 = {
				mult_modifier = {
					factor = 1.5
					trait = drunkard
				}

				mult_modifier = {
					factor = 1.5
					trait = gluttonous
				}

				mult_modifier = {
					factor = 1.5
					trait = hedonist
				}

				mult_modifier = {
					factor = 1.5
					trait = slothful
				}

				character_event = {
					id = HFP.20419 # Bad weather (localized by region)
					days = 30
					random = 30
				}
			}
		}
	}
}

# Became wroth pregnant
character_event = {
	id = HFP.20413
	desc = EVTDESCHFP20413
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	trigger = {
		trait = hard_pregnancy
	}

	option = {
		name = EVTOPTAHFP20413

		if = {
			limit = { trait = wroth } # If you already have the bad trait before this event, small chance of troubled pregnancy

			hidden_effect = {
				random = {
					chance = 1

					mult_modifier = {
						factor = 1.5
						trait = stressed
					}

					mult_modifier = {
						factor = 1.5
						trait = frail
					}

					mult_modifier = {
						factor = 1.5
						trait = weak
					}

					mult_modifier = {
						factor = 1.75
						is_ill = yes
					}

					troubled_pregnancy_chance_low_effect = yes # Critical Failure: chance of Troubled Pregnancy
				}
			}
		}
		else = {
			set_character_flag = wroth_pregnant # Check to see if trait is temporary, so that after pregnancy is over there is greater chance of recovery
			add_trait = wroth
		}

		character_event = { id = HFP.20442 days = 5 random = 10 } # Confirmation
		character_event = { id = HFP.20422 days = 200 } # Post-pregnancy recovery
	}

	option = {
		name = EVTOPTBHFP20413

		if = {
			limit = { trait = depressed }

			hidden_effect = {
				random = {
					chance = 20

					mult_modifier = {
						factor = 1.5
						trait = stressed
					}

					mult_modifier = {
						factor = 1.5
						trait = frail
					}

					mult_modifier = {
						factor = 1.5
						trait = weak
					}

					mult_modifier = {
						factor = 1.75
						is_ill = yes
					}

					troubled_pregnancy_chance_low_effect = yes # Critical Failure: chance of Troubled Pregnancy
				}
			}
		}
		else = {
			random = {
				chance = 40

				mult_modifier = {
					factor = 1.25
					trait = stressed
				}

				mult_modifier = {
					factor = 1.5
					trait = paranoid
				}

				mult_modifier = {
					factor = 0.5
					trait = patient # Countertrait
				}

				mult_modifier = {
					factor = 0.75
					trait = kind
				}

				mult_modifier = {
					factor = 2
					trait = wroth
				}

				tooltip = {
					add_trait = depressed
				}

				character_event = {
					id = HFP.20415 # Depressed pregnant
					days = 5
					random = 5
				}
			}
		}

		ai_chance = { factor = 0 }
	}
}

# Became gluttonous pregnant
character_event = {
	id = HFP.20414
	desc = EVTDESCHFP20414
	picture = GFX_evt_fancy_feast

	is_triggered_only = yes

	trigger = { trait = hard_pregnancy }

	option = {
		name = EVTOPTAHFP20414

		if = {
			limit = { trait = gluttonous } # If you already have the bad trait before this event, small chance of troubled pregnancy

			hidden_effect = {
				random = {
					chance = 1

					mult_modifier = {
						factor = 1.5
						trait = stressed
					}

					mult_modifier = {
						factor = 1.5
						trait = frail
					}

					mult_modifier = {
						factor = 1.5
						trait = weak
					}

					mult_modifier = {
						factor = 1.75
						is_ill = yes
					}

					troubled_pregnancy_chance_low_effect = yes  # Critical Failure: chance of Troubled Pregnancy.
				}
			}
		}
		else = {
			random = {
				chance = 40
				add_trait_fully_gluttonous_effect = yes
			}
		}

		if = {
			limit = { NOT = { has_character_flag = gluttonous_pregnant } }

			character_event = { id = HFP.20441 days = 15 random = 10 } # Confirmation
			character_event = { id = HFP.20421 days = 200 } # Post-pregnancy recovery
		}

		set_character_flag = gluttonous_pregnant # Avoid double event if fired by weird cravings, facilitate post-birth recovery
	}

	option = {
		name = EVTOPTBHFP20414

		if = {
			limit = { trait = depressed }

			hidden_effect = {
				random = {
					chance = 20

					mult_modifier = {
						factor = 1.5
						trait = stressed
					}

					mult_modifier = {
						factor = 1.5
						trait = frail
					}

					mult_modifier = {
						factor = 1.5
						trait = weak
					}

					mult_modifier = {
						factor = 1.75
						is_ill = yes
					}

					troubled_pregnancy_chance_low_effect = yes # Critical Failure: chance of Troubled Pregnancy
				}
			}
		}
		else = {
			random = {
				chance = 40

				mult_modifier = {
					factor = 1.25
					trait = stressed
				}

				mult_modifier = {
					factor = 1.5
					trait = paranoid
				}

				mult_modifier = {
					factor = 0.5
					trait = temperate # Countertrait
				}

				mult_modifier = {
					factor = 1.75
					trait = hedonist
				}

				mult_modifier = {
					factor = 2
					trait = gluttonous
				}

				tooltip = {
					add_trait = depressed
				}

				character_event = {
					id = HFP.20415 # Depressed pregnant
					days = 5
					random = 5
				}
			}
		}

		ai_chance = { factor = 0 }
	}
}

# Became depressed pregnant
character_event = {
	id = HFP.20415
	desc = EVTDESCHFP20415
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes

	trigger = { trait = hard_pregnancy }

	option = {
		name = EVTOPTAHFP20415
		tooltip_info = poet

		trigger = { trait = poet }

		tiered_prestige_reward_effect = yes

		if = {
			limit = { NOT = { trait = depressed } }

			add_trait = depressed
			set_character_flag = depressed_pregnant # Check to see if trait is temporary, so that after pregnancy is over there is greater chance of recovery
		}

		character_event = { id = HFP.20443 days = 5 random = 10 } # Confirmation
		character_event = { id = HFP.20423 days = 200 } # Post-pregnancy recovery
	}

	option = {
		name = EVTOPTBHFP20415

		trigger = {
			NOT = { trait = poet }
		}

		if = {
			limit = { trait = depressed }

			hidden_effect = {
				random = {
					chance = 20

					mult_modifier = {
						factor = 1.5
						trait = stressed
					}

					mult_modifier = {
						factor = 1.5
						trait = frail
					}

					mult_modifier = {
						factor = 1.5
						trait = weak
					}

					mult_modifier = {
						factor = 1.75
						is_ill = yes
					}

					troubled_pregnancy_chance_low_effect = yes # Critical Failure: chance of Troubled Pregnancy
				}
			}
		}
		else = {
			set_character_flag = depressed_pregnant # Check to see if trait is temporary, so that after pregnancy is over there is greater chance of recovery
			add_trait = depressed
		}

		character_event = {
			id = HFP.20423 # Post-pregnancy recovery
			days = 200
		}
	}
}

# Became drunkard pregnant
character_event = {
	id = HFP.20416
	desc = EVTDESCHFP20416
	picture = GFX_evt_drunk

	is_triggered_only = yes

	trigger = { trait = hard_pregnancy }

	option = {
		name = EVTOPTAHFP20416

		if = {
			limit = { trait = drunkard } # If you already have the bad trait before this event, small chance of troubled pregnancy.

			hidden_effect = {
				random = {
					chance = 1

					mult_modifier = {
						factor = 1.5
						trait = stressed
					}

					mult_modifier = {
						factor = 1.5
						trait = frail
					}

					mult_modifier = {
						factor = 1.5
						trait = weak
					}

					mult_modifier = {
						factor = 1.75
						is_ill = yes
					}

					troubled_pregnancy_chance_low_effect = yes # Critical Failure: chance of Troubled Pregnancy
				}
			}
		}
		else = {
			add_trait = drunkard
			set_character_flag = drunkard_pregnant # Check to see if trait is temporary, so that after pregnancy is over there is greater chance of recovery
		}

		set_character_flag = drunk_pregnant
		character_event = { id = HFP.20440 days = 5 random = 10 } # Confirmation
		character_event = { id = HFP.20420 days = 200 } # Post-pregnancy recovery
	}

	option = {
		name = EVTOPTBHFP20416

		if = {
			limit = { trait = depressed }

			hidden_effect = {
				random = {
					chance = 20

					mult_modifier = {
						factor = 1.5
						trait = stressed
					}

					mult_modifier = {
						factor = 1.5
						trait = frail
					}

					mult_modifier = {
						factor = 1.5
						trait = weak
					}

					mult_modifier = {
						factor = 1.75
						is_ill = yes
					}

					troubled_pregnancy_chance_low_effect = yes # Critical Failure: chance of Troubled Pregnancy
				}
			}
		}
		else = {
			random = {
				chance = 40

				mult_modifier = {
					factor = 1.25
					trait = stressed
				}

				mult_modifier = {
					factor = 1.5
					trait = paranoid
				}

				mult_modifier = {
					factor = 0.5
					trait = temperate # Countertrait
				}

				mult_modifier = {
					factor = 1.75
					trait = hedonist
				}

				mult_modifier = {
					factor = 2
					trait = drunkard
				}

				tooltip = {
					add_trait = depressed
				}

				character_event = {
					id = HFP.20415 # Depressed pregnant
					days = 5
					random = 5
				}
			}
		}

		ai_chance = { factor = 0 }
	}
}

# Countryside: Riding accident
character_event = {
	id = HFP.20417
	desc = EVTDESCHFP20417
	picture = GFX_evt_carriage

	is_triggered_only = yes

	trigger = { trait = hard_pregnancy }

	option = { # Take control of the horses
		name = EVTOPTAHFP20417
		tooltip_info = martial

		trigger = {
			OR = {
				martial >= 15
				trait = hunter
				trait = falconer
				trait = duelist
			}
		}

		tiered_prestige_reward_effect = yes
		troubled_pregnancy_chance_low_effect = yes # Critical failure: chance of Troubled Pregnancy
	}

	option = {
		name = EVTOPTBHFP20417

		trigger = {
			martial < 15

			NOR = {
				trait = hunter
				trait = falconer
				trait = duelist
			}
		}

		add_trait_silently_wounded_effect = yes
		troubled_pregnancy_chance_medium_effect = yes # Critical failure: chance of Troubled Pregnancy
	}
}

# Countryside: Health is dropping during travel
character_event = {
	id = HFP.20418
	desc = EVTDESCHFP20418
	picture = GFX_evt_carriage

	is_triggered_only = yes

	trigger = { trait = hard_pregnancy }

	immediate = {
		hidden_effect = {
			random_courtier_or_vassal = {
				limit = { has_minor_title = title_court_physician }
				save_event_target_as = localize_physician
			}
		}
	}

	option = { # Knows how to treat herself
		name = EVTOPTAHFP20418
		tooltip_info = learning

		trigger = {
			OR = {
				learning >= 15
				trait = scholar
				trait = gardener
				trait = mystic
				trait = physician
			}
		}

		health = -0.25
		troubled_pregnancy_chance_low_effect = yes # Critical failure: chance of Troubled Pregnancy

		ai_chance = { factor = 70 }
	}

	option = { # Ask my Physician
		name = EVTOPTBHFP20418

		trigger = { has_assigned_minor_title = title_court_physician }

		show_portrait = event_target:localize_physician
		wealth = -15
		health = -0.25

		ai_chance = { factor = 100 }
	}

	option = { # Ask my spouse's Physician
		name = EVTOPTCHFP20418

		trigger = {
			is_ruler = no

			spouse = {
				has_assigned_minor_title = title_court_physician
			}
		}

		health = -0.25

		ai_chance = { factor = 100 }
	}

	option = {
		name = EVTOPTDHFP20418

		trigger = {
			learning < 15

			NOR = {
				trait = scholar
				trait = gardener
				trait = mystic
				trait = physician
				has_assigned_minor_title = title_court_physician
				spouse = { has_assigned_minor_title = title_court_physician }
			}
		}

		health = -0.75
		troubled_pregnancy_chance_medium_effect = yes # Critical failure: chance of Troubled Pregnancy

		ai_chance = { factor = 10 }
	}
}

# Countryside: Bad weather
character_event = {
	id = HFP.20419
	desc = EVTDESCHFP20419 # Loc key tied to regions
	picture = GFX_evt_carriage

	is_triggered_only = yes

	trigger = { trait = hard_pregnancy }

	option = { # Endure
		name = EVTOPTAHFP20419
		tooltip_info = brave

		trigger = { trait = brave }

		health = -0.25
	}

	option = { # Endure
		name = EVTOPTAHFP20419
		tooltip_info = stubborn

		trigger = { trait = stubborn }

		health = -0.25
		troubled_pregnancy_chance_low_effect = yes # Critical failure: chance of Troubled Pregnancy
	}

	option = {
		name = EVTOPTBHFP20419

		trigger = {
			NOR = {
				trait = stubborn
				trait = brave
			}
		}

		health = -0.75
		troubled_pregnancy_chance_medium_effect = yes # Critical failure: chance of Troubled Pregnancy
	}
}


############ After Hard Pregnancy recovery ###############

# If drunk pregnant
character_event = {
	id = HFP.20420
	desc = EVTDESCHFP20420
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = { trait = drunkard }

	immediate = {
		clr_character_flag = drunk_pregnant
	}

	option = {
		name = EVTOPTAHFP20420

		custom_tooltip = {
			text = tooltip_recover_drunkard

			random_list = {
				50 = {
					mult_modifier = {
						factor = 1.5
						has_character_flag = drunk_pregnant
					}

					remove_trait_drunkard_effect = yes
				}

				50 = {
					spouse = {
						character_event = {
							id = HFP.20426 # Spouse complains
							days = 100
							random = 100
						}
					}
				}
			}
		}

		random = {
			chance = 30
			add_trait_stressed_effect = yes
		}
	}

	option = {
		name = EVTOPTBHFP20420

		spouse = {
			character_event = {
				id = HFP.20426 # Spouse complains
				days = 100
				random = 100
			}
		}
	}
}

# Gluttonous pregnant
character_event = {
	id = HFP.20421
	desc = EVTDESCHFP20421
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = { trait = gluttonous }

	immediate = {
		clr_character_flag = gluttonous_pregnant
	}

	option = {
		name = EVTOPTAHFP20421

		custom_tooltip = {
			text = tooltip_recover_gluttonous

			random_list = {
				50 = {
					mult_modifier = {
						factor = 1.5
						has_character_flag = gluttonous_pregnant
					}

					remove_trait_gluttonous_effect = yes
				}

				50 = {
					spouse = {
						character_event = {
							id = HFP.20424 # Spouse complains
							days = 100
							random = 100
						}
					}
				}
			}
		}

		random = {
			chance = 30
			add_trait_stressed_effect = yes
		}

		ai_chance = { factor = 40 }
	}

	option = {
		name = EVTOPTBHFP20421

		gain_weight_small_effect = yes
		weight_trait_check_effect = yes

		spouse = {
			character_event = {
				id = HFP.20424 # Spouse complains
				days = 100
				random = 100
			}
		}

		ai_chance = { factor = 60 }
	}
}

# Wroth pregnant
character_event = {
	id = HFP.20422
	desc = EVTDESCHFP20422
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		trait = wroth
	}

	immediate = {
		clr_character_flag = wroth_pregnant
	}

	option = {
		name = EVTOPTAHFP20422

		custom_tooltip = {
			text = tooltip_recover_wroth

			random_list = {
				50 = {
					mult_modifier = {
						factor = 1.5
						has_character_flag = wroth_pregnant
					}

					remove_trait_wroth_effect = yes
				}

				50 = {
					spouse = {
						character_event = {
							id = HFP.20428 # Spouse complains
							days = 100
							random = 100
						}
					}
				}
			}
		}

		random = {
			chance = 30
			add_trait_stressed_effect = yes
		}

		ai_chance = { factor = 70 }
	}

	option = {
		name = EVTOPTBHFP20422

		spouse = {
			character_event = {
				id = HFP.20428 # Spouse complains
				days = 100
				random = 100
			}
		}

		ai_chance = { factor = 30 }
	}
}

# Depressed pregnant
character_event = {
	id = HFP.20423
	desc = EVTDESCHFP20423
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		trait = depressed
	}

	option = {
		name = EVTOPTAHFP20423

		custom_tooltip = {
			text = tooltip_recover_depressed

			random_list = {
				50 = {
					mult_modifier = {
						factor = 1.5
						has_character_flag = depressed_pregnant
					}

					remove_trait_depressed_effect = yes
				}

				50 = {
					spouse = {
						character_event = {
							id = HFP.20430 # Spouse complains
							days = 100
							random = 100
						}
					}
				}
			}
		}

		gain_weight_small_effect = yes
		weight_trait_check_effect = yes

		random = {
			chance = 30
			add_trait_stressed_effect = yes
		}

		ai_chance = { factor = 80 }
	}

	option = {
		name = EVTOPTBHFP20423

		lose_weight_small_effect = yes
		weight_trait_check_effect = yes

		spouse = {
			character_event = {
				id = HFP.20430 # Spouse complains
				days = 100
				random = 100
			}
		}

		ai_chance = { factor = 20 }
	}

	after = {
		clr_character_flag = depressed_pregnant
	}
}

############ Spouse responses ###########

#### Spouse complains about fat wife ###
character_event = {
	id = HFP.20424
	picture = GFX_evt_birth

	desc = {
		text = EVTDESCHFP20424
		trigger = {
			FROM = {
				NOT = {
					has_opinion_modifier = {
						name = opinion_cravings
						who = ROOT
					}
				}
			}
		}
	}
	desc = {
		text = EVTDESCHFPB20424
		trigger = {
			FROM = {
				has_opinion_modifier = {
					name = opinion_cravings
					who = ROOT
				}
			}
		}
	}

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = gluttonous
			is_married = ROOT
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTZHFP20424
		tooltip_info = gluttonous

		trigger = { trait = gluttonous }

		custom_tooltip = {
			text = tooltip_HFP20424_Z

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

		tiered_prestige_reward_effect = yes

		FROM = {
			show_scope_change = no

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

			character_event = { id = HFP.20069 }
		}

		ai_chance = {
			factor = 60

			mult_modifier = {
				factor = 1.5
				trait = charitable
			}

			mult_modifier = {
				factor = 1.2
				trait = patient
			}

			mult_modifier = {
				factor = 1.2
				trait = proud
			}

			mult_modifier = {
				factor = 1.2
				trait = hedonist
			}

			mult_modifier = {
				factor = 1.75
				trait = kind
			}
		}
	}

	option = {
		name = {
			text = EVTOPTAHFP20424
			trigger = {
				FROM = {
					NOT = {
						has_opinion_modifier = {
							name = opinion_cravings
							who = ROOT
						}
					}
				}
			}
		}
		name = {
			text = EVTOPTAHFP20424_B
			trigger = {
				FROM = {
					has_opinion_modifier = {
						name = opinion_cravings
						who = ROOT
					}
				}
			}
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20425
				tooltip = tooltip_HFP20424_A
			}

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

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.2
				trait = temperate
			}

			mult_modifier = {
				factor = 1.2
				trait = wroth
			}

			mult_modifier = {
				factor = 1.2
				trait = proud
			}

			mult_modifier = {
				factor = 1.2
				trait = kind
			}

			mult_modifier = {
				factor = 1.2
				trait = gregarious
			}

			mult_modifier = {
				factor = 1.2
				trait = honest
			}
		}
	}

	option = {
		name = EVTOPTBHFP20424

		custom_tooltip = { text = tooltip_HFP20424_B }

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.2
				trait = shy
			}

			mult_modifier = {
				factor = 1.2
				trait = content
			}

			mult_modifier = {
				factor = 1.5
				trait = gluttonous
			}

			mult_modifier = {
				factor = 1.2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.2
				trait = drunkard
			}

			mult_modifier = {
				factor = 1.2
				trait = envious
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}
		}
	}
}

#### Fat wife receives complaint ###
character_event = {
	id = HFP.20425
	desc = EVTDESCHFP20425
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20425

		random = {
			chance = 75

			remove_trait = gluttonous
			remove_trait_stressed_effect = yes
			lose_weight_small_effect = yes
			weight_trait_check_effect = yes
			clr_character_flag = gluttonous_pregnant

			hidden_effect = {
				remove_opinion = {
					name = opinion_angry
					who = FROM
				}
			}

			FROM = {
				character_event = {
					id = HFP.20432
					days = 12
				}
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.35
				is_ruler = no
				FROM = { is_ruler = yes }
			}

			mult_modifier = {
				factor = 1.2
				trait = patient
			}

			mult_modifier = {
				factor = 1.2
				trait = humble
			}

			mult_modifier = {
				factor = 1.2
				trait = diligent
			}

			mult_modifier = {
				factor = 1.2
				trait = ambitious
			}

			mult_modifier = {
				factor = 1.2
				trait = just
			}

			mult_modifier = {
				factor = 1.2
				trait = honest
			}
		}
	}

	option = {
		name = EVTOPTBHFP20425

		gain_weight_small_effect = yes
		weight_trait_check_effect = yes

		FROM = {
			character_event = {
				id = HFP.20433
				days = 12
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.2
				trait = proud
			}

			mult_modifier = {
				factor = 1.2
				trait = drunkard
			}

			mult_modifier = {
				factor = 1.2
				trait = shy
			}

			mult_modifier = {
				factor = 1.2
				trait = content
			}

			mult_modifier = {
				factor = 1.2
				trait = arbitrary
			}

			mult_modifier = {
				factor = 1.2
				trait = wroth
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}
		}
	}
}

#### Spouse complains about drunkard wife ###
character_event = {
	id = HFP.20426
	desc = EVTDESCHFP20426
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = drunkard
			is_married = ROOT
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHFP20426

		FROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20427
				tooltip = tooltip_HFP20426_A
			}

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

		ai_chance = {
			factor = 60

			mult_modifier = {
				factor = 1.35
				is_ruler = no
				FROM = { is_ruler = yes }
			}

			mult_modifier = {
				factor = 1.2
				trait = temperate
			}

			mult_modifier = {
				factor = 1.2
				trait = wroth
			}

			mult_modifier = {
				factor = 1.2
				trait = proud
			}

			mult_modifier = {
				factor = 1.2
				trait = kind
			}

			mult_modifier = {
				factor = 1.2
				trait = gregarious
			}

			mult_modifier = {
				factor = 1.2
				trait = honest
			}
		}
	}

	option = {
		name = EVTOPTBHFP20426

		custom_tooltip = { text = tooltip_HFP20426_B }

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 1.2
				trait = shy
			}

			mult_modifier = {
				factor = 1.2
				trait = content
			}

			mult_modifier = {
				factor = 1.2
				trait = gluttonous
			}

			mult_modifier = {
				factor = 1.2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.5
				trait = drunkard
			}

			mult_modifier = {
				factor = 1.2
				trait = envious
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}
		}
	}
}

#### Drunkard wife receives complaint ###
character_event = {
	id = HFP.20427
	desc = EVTDESCHFP20427
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20427

		random = {
			chance = 75

			remove_trait = drunkard
			remove_trait_stressed_effect = yes
			clr_character_flag = drunkard_pregnant

			hidden_effect = {
				remove_opinion = {
					name = opinion_angry
					who = FROM
				}
			}

			FROM = {
				character_event = {
					id = HFP.20434
					days = 12
				}
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.35
				is_ruler = no
				FROM = { is_ruler = yes }
			}

			mult_modifier = {
				factor = 1.5
				trait = trusting
			}

			mult_modifier = {
				factor = 1.2
				trait = patient
			}

			mult_modifier = {
				factor = 1.2
				trait = humble
			}

			mult_modifier = {
				factor = 1.2
				trait = diligent
			}

			mult_modifier = {
				factor = 1.2
				trait = ambitious
			}

			mult_modifier = {
				factor = 1.2
				trait = just
			}

			mult_modifier = {
				factor = 1.2
				trait = honest
			}
		}
	}

	option = {
		name = EVTOPTBHFP20427

		hidden_effect = {
			FROM = {
				character_event = {
					id = HFP.20435
					days = 12
				}
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = stubborn
			}

			mult_modifier = {
				factor = 1.2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.2
				trait = proud
			}

			mult_modifier = {
				factor = 1.2
				trait = gluttonous
			}

			mult_modifier = {
				factor = 1.2
				trait = shy
			}

			mult_modifier = {
				factor = 1.2
				trait = content
			}

			mult_modifier = {
				factor = 1.2
				trait = arbitrary
			}

			mult_modifier = {
				factor = 1.2
				trait = wroth
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}
		}
	}
}

#### Spouse complains about wroth wife ###
character_event = {
	id = HFP.20428
	desc = EVTDESCHFP20428
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = wroth
			is_married = ROOT
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHFP20428

		FROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20429
				tooltip = tooltip_HFP20428_A
			}

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

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 1.5
				trait = brave
			}

			mult_modifier = {
				factor = 1.2
				trait = wroth
			}

			mult_modifier = {
				factor = 1.2
				trait = proud
			}

			mult_modifier = {
				factor = 1.2
				trait = kind
			}

			mult_modifier = {
				factor = 1.2
				trait = gregarious
			}

			mult_modifier = {
				factor = 1.2
				trait = honest
			}
		}
	}

	option = {
		name = EVTOPTBHFP20428

		custom_tooltip = { text = tooltip_HFP20428_B }

		ai_chance = {
			factor = 60

			mult_modifier = {
				factor = 1.2
				trait = shy
			}

			mult_modifier = {
				factor = 1.2
				trait = content
			}

			mult_modifier = {
				factor = 1.2
				trait = gluttonous
			}

			mult_modifier = {
				factor = 1.5
				trait = craven
			}

			mult_modifier = {
				factor = 1.2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.5
				trait = drunkard
			}

			mult_modifier = {
				factor = 1.2
				trait = humble
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}
		}
	}
}

#### Wroth wife receives complaint ###
character_event = {
	id = HFP.20429
	desc = EVTDESCHFP20429
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20429

		random = {
			chance = 60

			remove_trait = wroth
			remove_trait_stressed_effect = yes
			clr_character_flag = wroth_pregnant

			hidden_effect = {
				remove_opinion = {
					name = opinion_angry
					who = FROM
				}
			}

			FROM = {
				character_event = {
					id = HFP.20436
					days = 12
				}
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.35
				is_ruler = no
				FROM = { is_ruler = yes }
			}

			mult_modifier = {
				factor = 1.5
				trait = trusting
			}

			mult_modifier = {
				factor = 1.2
				trait = shy
			}

			mult_modifier = {
				factor = 1.2
				trait = humble
			}

			mult_modifier = {
				factor = 1.2
				trait = temperate
			}

			mult_modifier = {
				factor = 1.2
				trait = diligent
			}

			mult_modifier = {
				factor = 1.2
				trait = content
			}

			mult_modifier = {
				factor = 1.2
				trait = just
			}

			mult_modifier = {
				factor = 1.2
				trait = honest
			}
		}
	}

	option = {

		name = EVTOPTBHFP20429

		random = {
			chance = 40

			FROM = {
				show_scope_change = no

				add_trait_wounded_effect = yes

				character_event = {
					id = HFP.20437
					days = 1
				}
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = stubborn
			}

			mult_modifier = {
				factor = 1.2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.5
				trait = proud
			}

			mult_modifier = {
				factor = 1.2
				trait = gregarious
			}

			mult_modifier = {
				factor = 1.2
				trait = ambitious
			}

			mult_modifier = {
				factor = 1.2
				trait = arbitrary
			}

			mult_modifier = {
				factor = 1.2
				trait = strong
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}
		}
	}
}

#### Spouse complains about depressed wife ###
character_event = {
	id = HFP.20430
	desc = EVTDESCHFP20430
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = depressed
			is_married = ROOT
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTZHFP20430
		tooltip_info = shy

		trigger = { trait = shy }

		custom_tooltip = {
			text = tooltip_HFP20430_Z

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

		tiered_piety_reward_effect = yes

		FROM = {
			show_scope_change = no

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

			character_event = { id = HFP.20070 }
		}

		ai_chance = {
			factor = 60

			mult_modifier = {
				factor = 1.5
				trait = charitable
			}

			mult_modifier = {
				factor = 1.2
				trait = patient
			}

			mult_modifier = {
				factor = 1.2
				trait = humble
			}

			mult_modifier = {
				factor = 1.2
				trait = poet
			}

			mult_modifier = {
				factor = 1.75
				trait = kind
			}

			mult_modifier = {
				factor = 1.2
				trait = depressed
			}
		}
	}

	option = {
		name = EVTOPTAHFP20430

		FROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20431
				tooltip = tooltip_HFP20430_A
			}
		}

		ai_chance = {
			factor = 60

			mult_modifier = {
				factor = 1.5
				trait = charitable
			}

			mult_modifier = {
				factor = 1.2
				trait = patient
			}

			mult_modifier = {
				factor = 1.2
				trait = humble
			}

			mult_modifier = {
				factor = 1.2
				trait = just
			}

			mult_modifier = {
				factor = 1.75
				trait = kind
			}

			mult_modifier = {
				factor = 1.2
				trait = gregarious
			}

			mult_modifier = {
				factor = 1.2
				trait = honest
			}
		}
	}

	option = {
		name = EVTOPTBHFP20430

		custom_tooltip = {
			text = tooltip_HFP20430_B

			random = {
				chance = 60
				remove_trait_kind_effect = yes
			}
		}

		ai_chance = {
			factor = 60

			mult_modifier = {
				factor = 1.2
				trait = shy
			}

			mult_modifier = {
				factor = 1.2
				trait = content
			}

			mult_modifier = {
				factor = 1.2
				trait = proud
			}

			mult_modifier = {
				factor = 1.75
				trait = cruel
			}

			mult_modifier = {
				factor = 1.2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.5
				trait = drunkard
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}
		}
	}
}

#### Depressed wife receives complaint ###
character_event = {
	id = HFP.20431
	desc = EVTDESCHFP20431
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20431

		gain_weight_small_effect = yes
		weight_trait_check_effect = yes

		random = {
			chance = 75

			remove_trait_stressed_effect = yes
			clr_character_flag = depressed_pregnant

			FROM = {
				character_event = {
					id = HFP.20438
					days = 12
				}
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.35
				is_ruler = no
				FROM = { is_ruler = yes }
			}

			mult_modifier = {
				factor = 1.5
				trait = trusting
			}

			mult_modifier = {
				factor = 1.2
				trait = wroth
			}

			mult_modifier = {
				factor = 1.5
				trait = proud
			}

			mult_modifier = {
				factor = 1.2
				trait = ambitious
			}

			mult_modifier = {
				factor = 1.2
				trait = gregarious
			}

			mult_modifier = {
				factor = 1.2
				trait = lustful
			}

			mult_modifier = {
				factor = 1.2
				trait = just
			}

			mult_modifier = {
				factor = 1.2
				trait = strong
			}
		}
	}

	option = {
		name = EVTOPTBHFP20431

		lose_weight_small_effect = yes
		weight_trait_check_effect = yes

		random = {
			chance = 80

			health = -1

			hidden_effect = {
				FROM = {
					character_event = {
						id = HFP.20439
						days = 12
					}
				}
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = stubborn
			}

			mult_modifier = {
				factor = 1.2
				trait = slothful
			}

			mult_modifier = {
				factor = 1.5
				trait = humble
			}

			mult_modifier = {
				factor = 1.2
				trait = weak
			}

			mult_modifier = {
				factor = 1.2
				trait = shy
			}

			mult_modifier = {
				factor = 1.2
				trait = content
			}

			mult_modifier = {
				factor = 1.2
				trait = envious
			}

			mult_modifier = {
				factor = 1.2
				trait = patient
			}

			mult_modifier = {
				factor = 0.5
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.5
				is_lover = FROM
			}

			mult_modifier = {
				factor = 2
				is_rival = FROM
			}
		}
	}
}

############ Spouse receives comunication of success/failure ###########

character_event = { # Wife's back in shape
	id = HFP.20432
	desc = EVTDESCHFP20432
	picture = GFX_evt_lovers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20432
	}
}

character_event = { # Wife's become fat
	id = HFP.20433
	desc = EVTDESCHFP20433
	picture = GFX_evt_fancy_feast

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20433
	}
}

character_event = { # Wife's sober again
	id = HFP.20434
	desc = EVTDESCHFP20434
	picture = GFX_evt_lovers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20434
	}
}

character_event = { # Wife still drinks
	id = HFP.20435
	desc = EVTDESCHFP20435
	picture = GFX_evt_lovers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20435
	}
}
character_event = { # Wife's calm now
	id = HFP.20436
	desc = EVTDESCHFP20436
	picture = GFX_evt_lovers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20436
	}
}

character_event = { # Wife's wounded husband!
	id = HFP.20437
	desc = EVTDESCHFP20437
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20437

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

character_event = { # Wife's happy again
	id = HFP.20438
	desc = EVTDESCHFP20438
	picture = GFX_evt_lovers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20438
	}
}

character_event = { # Wife's become hollow
	id = HFP.20439
	desc = EVTDESCHFP20439
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20439
	}
}

########################################
# Pre-notifications during pregnancy

character_event = { # Wife enjoys drinking
	id = HFP.20440
	desc = EVTDESCHFP20440
	picture = GFX_evt_drunk

	is_triggered_only = yes

	ai = no

	trigger = {
		trait = drunkard
		trait = hard_pregnancy
	}

	option = {
		name = EVTOPTAHFP20440
		tooltip_info = drunkard
	}
}

character_event = { # Wife enjoys eating
	id = HFP.20441
	desc = EVTDESCHFP20441
	picture = GFX_evt_fancy_feast

	is_triggered_only = yes

	ai = no

	trigger = {
		trait = gluttonous
		NOT = { trait = troubled_pregnancy }
	}

	option = {
		name = EVTOPTAHFP20441
		tooltip_info = gluttonous
	}
}

character_event = { # Wife enjoys yelling
	id = HFP.20442
	desc = EVTDESCHFP20442
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	ai = no

	trigger = {
		trait = wroth
		trait = hard_pregnancy
	}

	option = {
		name = EVTOPTAHFP20442
		tooltip_info = wroth
	}
}

character_event = { # wife enjoys crying
	id = HFP.20443
	desc = EVTDESCHFP20443
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes

	ai = no

	trigger = {
		trait = depressed
		trait = hard_pregnancy
	}

	option = {
		name = EVTOPTAHFP20443
		tooltip_info = depressed
	}
}
###############################################################################

# HFP.20500 Troubled Pregnancy begins
character_event = {
	id = HFP.20500
	desc = EVTDESCHFP20500
	picture = GFX_evt_illness

	is_triggered_only = yes # troubled_pregnancy_chance_low/medium_effect

	immediate = {
		remove_trait = hard_pregnancy
		add_trait = troubled_pregnancy
	}

	option = {
		name = EVTOPTAHFP20500

		tooltip = {
			add_trait = troubled_pregnancy
		}

		hidden_effect = {
			# Used to determine if the mother dies or not, and if there are complications after the pregnancy
			set_variable = {
				which = troubled_pregnancy_variable
				value = 2
			}

			if = { # If married, spouse may offer assistance
				limit = { is_married = yes }

				spouse = {
					character_event = {
						id = HFP.20501
						days = 4
					}
				}
			}

			random_courtier_or_vassal = {
				limit = {
					OR = {
						has_minor_title = title_regent
						has_minor_title = title_appointed_regent
					}
				}

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

					character_event = {
						id = HFP.20502 # If regent doesn't like you, he may try to kill you in your vulnerable state
						days = 3
						random = 3
					}
				}
				else_if = {
					limit = { NOT = { is_married = FROM } } # Don't fire twice if the spouse is also the regent

					character_event = {
						id = HFP.20501 # If regent likes you, he'll try to help you, as if he were your spouse
						days = 6
					}
				}
			}

			if = { # Chance of a strange birth
				limit = {
					OR = {
						religion_group = christian
						religion_group = muslim
						religion_openly_tengri_or_reformed_trigger = yes
						religion_openly_norse_or_reformed_trigger = yes
					}

					NOT = { has_dynasty_flag = flag_vision_baby }
				}

				random_list = {
					70 = { }

					15 = {
						set_dynasty_flag = flag_vision_baby # Positive
						character_event = { id = HFP.20503 days = 43 random = 20 }
					}

					15 = {
						set_dynasty_flag = flag_vision_baby # Negative
						character_event = { id = HFP.20504 days = 33 random = 20 }
					}
				}
			}

			character_event = {
				id = HFP.20520 # Give mom chance to help herself
				days = 10
				random = 7
			}
		}
	}
}

# Notify Spouse and Regent of the ruler about what is happening and prompt either to offer help if possible
character_event = {
	id = HFP.20501

	desc = {
		text = EVTDESCHFPA20501
		picture = GFX_evt_bad_news
		trigger = { is_married = FROM }
	}
	desc = {
		text = EVTDESCHFPB20501
		picture = GFX_evt_illness
		trigger = {
			OR = {
				has_minor_title = title_regent
				has_minor_title = title_appointed_regent
			}
		}
	}

	is_triggered_only = yes

	option = { # Send Physician
		name = EVTOPTAHFP20501

		trigger = { has_assigned_minor_title = title_court_physician }

		custom_tooltip = {
			text = EVTOOLTIPAHFP20501

			if = {
				limit = { is_married = FROM }

				random_courtier_or_vassal = {
					limit = { has_minor_title = title_court_physician }
					save_event_target_as = pregnancy_spouse_physician
				}
			}
			else = {
				random_courtier_or_vassal = {
					limit = { has_minor_title = title_court_physician }
					save_event_target_as = pregnancy_regent_physician
				}
			}

			FROM = {
				character_event = {
					id = HFP.20505 # Notify woman
					days = 1
				}
			}
		}

		wealth = -50

		ai_chance = {
			factor = 70

			mult_modifier = {
				factor = 1.5

				any_courtier_or_vassal = {
					has_minor_title = title_court_physician
					trait = quick
				}
			}

			mult_modifier = {
				factor = 1.5

				any_courtier_or_vassal = {
					has_minor_title = title_court_physician
					trait = genius
				}
			}

			mult_modifier = {
				factor = 1.5

				any_courtier_or_vassal = {
					has_minor_title = title_court_physician
					learning >= 20
				}
			}

			mult_modifier = {
				factor = 0.5

				any_courtier_or_vassal = {
					has_minor_title = title_court_physician
					learning < 10
				}
			}
		}
	}

	option = { # Send Physician (no Reaper's Due)
		name = EVTOPTAHFP20501

		trigger = {
			is_ruler = yes
			FROM = { is_ruler = no }
			NOT = { has_dlc = "Reapers" }
		}

		custom_tooltip = {
			text = EVTOOLTIPAHFP20501
			FROM = { set_character_flag = pregnancy_healer_help }
		}

		wealth = -50

		ai_chance = { factor = 70 }
	}

	option = { # No Physician, but I am a Scholar myself
		name = EVTOPTBHFP20501

		custom_tooltip = { text = EVTOOLTIPBHFP20501 }

		trigger = {
			OR = {
				trait = scholar
				trait = mystic
				trait = physician
				learning >= 15
			}

			NOT = { has_assigned_minor_title = title_court_physician }
			is_inaccessible_or_incapable_trigger = no
		}

		if = {
			limit = { is_married = FROM }
			save_event_target_as = pregnancy_spouse_physician
		}
		else = {
			save_event_target_as = pregnancy_regent_physician
		}

		FROM = {
			character_event = { id = HFP.20506 } # Notify woman
		}

		ai_chance = {
			factor = 70

			mult_modifier = {
				factor = 1.5
				trait = quick
			}

			mult_modifier = {
				factor = 1.5
				trait = genius
			}

			mult_modifier = {
				factor = 1.5
				learning >= 20
			}

			mult_modifier = {
				factor = 0.5
				learning < 10
			}
		}
	}

	option = { # Send a Priest
		name = EVTOPTCHFP20501

		trigger = {
			is_not_unreformed_pagan_trigger = yes

			FROM = {
				NOR = {
					has_character_flag = pregnancy_priest_comfort
					has_character_flag = pregnancy_shaman_comfort
				}
			}
		}

		custom_tooltip = { text = EVTOOLTIPCHFP20501 }

		hidden_effect = {
			FROM = {
				set_character_flag = pregnancy_priest_comfort
				character_event = { id = HFP.20509 } # Notify woman
			}
		}

		piety = 100
		wealth = -20

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 2
				trait = zealous
			}
		}
	}

	option = { # Send a Shaman
		name = EVTOPTDHFP20501
		trigger = {
			is_unreformed_pagan_trigger = yes

			FROM = {
				OR = {
					has_character_flag = pregnancy_shaman_comfort
					has_character_flag = pregnancy_priest_comfort
				}
			}
		}

		custom_tooltip = { text = EVTOOLTIPDHFP20501 }

		hidden_effect = {
			FROM = {
				set_character_flag = pregnancy_shaman_comfort
				character_event = { id = HFP.20510 } # Notify woman
			}
		}

		piety = 50
		prestige = 50
		wealth = -5

		ai_chance = {
			factor = 20

			mult_modifier = {
				factor = 2
				is_tribal = yes
			}

			mult_modifier = {
				factor = 2.5
				is_nomadic = yes
			}

			mult_modifier = {
				factor = 2
				trait = zealous
			}
		}
	}

	option = { # Offer moral support
		name = EVTOPTEHFP20501

		trigger = { is_married = FROM }

		FROM = {
			show_scope_change = no

			set_character_flag = pregnancy_spouse_comfort

			character_event = {
				id = HFP.20519 # Notify woman
				tooltip = EVTOOLTIPEHFP20501
			}

			if = {
				limit = {
					opinion = {
						who = ROOT
						value >= -50
					}
				}

				opinion = {
					name = comforted_opinion
					who = ROOT
					years = 5
				}
			}
		}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 0.1

				# If you have a better option, you'd need to be an idiot not use that
				OR = {
					trait = zealous
					trait = cruel
					has_assigned_minor_title = title_court_physician

					AND = {
						is_inaccessible_trigger = no
						prisoner = no
						is_incapable = no

						OR = {
							trait = scholar
							trait = mystic
							trait = physician
							learning >= 15
						}
					}
				}

				NOR = {
					trait = slow
					trait = imbecile
					trait = inbred
				}
			}
		}
	}

	option = { # Do nothing
		name = EVTOPTFHFP20501

		ai_chance = {
			factor = 1

			trigger = {
				NOR = {
					is_lover = FROM
					is_friend = FROM
				}
			}

			mult_modifier = {
				factor = 50
				is_rival = FROM
			}

			mult_modifier = {
				factor = 10

				trait = greedy
				wealth < 0
			}

			mult_modifier = {
				factor = 10

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

			mult_modifier = {
				factor = 30

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

# Naughty Regent: So, how do we do it?
character_event = {
	id = HFP.20502
	desc = EVTDESCHFP20502
	picture = GFX_evt_shadow

	trigger = {
		FROM = { trait = troubled_pregnancy }

		OR = {
			has_minor_title = title_regent
			has_minor_title = title_appointed_regent
		}
	}

	is_triggered_only = yes

	option = { # Poison
		name = EVTOPTAHFP20502

		set_character_flag = flag_poisoning_mother

		custom_tooltip = {
			text = EVTOOLTIPAHFP20502

			random_list = {
				50 = { # Success
					mult_modifier = {
						factor = 0.5
						intrigue < 5
					}

					mult_modifier = {
						factor = 0.75
						intrigue < 10
					}

					mult_modifier = {
						factor = 1.25
						intrigue >= 10
					}

					mult_modifier = {
						factor = 1.25
						intrigue >= 15
					}

					mult_modifier = {
						factor = 1.5
						intrigue >= 20
					}

					mult_modifier = {
						factor = 1.75
						intrigue >= 25
					}

					mult_modifier = {
						factor = 1.2
						trait = amateurish_plotter
					}

					mult_modifier = {
						factor = 1.3
						trait = flamboyant_schemer
					}

					mult_modifier = {
						factor = 1.4
						trait = intricate_webweaver
					}

					mult_modifier = {
						factor = 1.5
						trait = elusive_shadow
					}

					mult_modifier = {
						factor = 1.5
						trait = master_schemer
					}

					mult_modifier = {
						factor = 1.5
						trait = quick
					}

					mult_modifier = {
						factor = 1.75
						trait = genius
					}

					mult_modifier = {
						factor = 1.25
						trait = deceitful
					}

					mult_modifier = {
						factor = 0.5
						trait = slow
					}

					mult_modifier = {
						factor = 0.25
						trait = imbecile
					}

					mult_modifier = {
						factor = 0.25
						trait = inbred
					}

					FROM = { character_event = { id = HFP.20511 } }
				}

				50 = { # Failure
					FROM = { character_event = { id = HFP.20515 } }
				}
			}
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 0.5
				intrigue < 5
			}

			mult_modifier = {
				factor = 0.75
				intrigue < 10
			}

			mult_modifier = {
				factor = 0.85
				intrigue < 15
			}

			mult_modifier = {
				factor = 1.25
				trait = deceitful
			}

			mult_modifier = {
				factor = 1.5
				trait = master_schemer
			}
		}
	}

	option = { # Smothering
		name = EVTOPTBHFP20502

		set_character_flag = flag_smothering_mother

		custom_tooltip = {
			text = EVTOOLTIPBHFP20502

			random_list = {
				50 = { # Success
					mult_modifier = {
						factor = 0.5
						combat_rating < 5
					}

					mult_modifier = {
						factor = 0.75
						combat_rating < 10
					}

					mult_modifier = {
						factor = 1.25
						combat_rating >= 10
					}

					mult_modifier = {
						factor = 1.25
						combat_rating >= 15
					}

					mult_modifier = {
						factor = 1.5
						combat_rating >= 20
					}

					mult_modifier = {
						factor = 1.75
						combat_rating >= 25
					}

					mult_modifier = {
						factor = 1.2
						trait = misguided_warrior
					}

					mult_modifier = {
						factor = 1.3
						trait = tough_soldier
					}

					mult_modifier = {
						factor = 1.4
						trait = skilled_tactician
					}

					mult_modifier = {
						factor = 1.5
						trait = brilliant_strategist
					}

					mult_modifier = {
						factor = 1.5
						trait = duelist
					}

					mult_modifier = {
						factor = 1.5
						trait = brawny
					}

					mult_modifier = {
						factor = 1.75
						trait = strong
					}

					mult_modifier = {
						factor = 1.25
						trait = hunter
					}

					mult_modifier = {
						factor = 0.5
						trait = frail
					}

					mult_modifier = {
						factor = 0.25
						trait = weak
					}

					mult_modifier = {
						factor = 0.75
						trait = inbred
					}

					FROM = { character_event = { id = HFP.20513 } }
				}

				50 = { # Failure
					FROM = { character_event = { id = HFP.20518 } }
				}
			}
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 0.5
				trait = weak
			}

			mult_modifier = {
				factor = 0.5
				trait = craven
			}

			mult_modifier = {
				factor = 0.5
				trait = frail
			}

			mult_modifier = {
				factor = 0.5
				combat_rating < 10
			}

			mult_modifier = {
				factor = 1.5
				trait = strong
			}

			mult_modifier = {
				factor = 1.5
				trait = brawny
			}
		}
	}

	option = { # Not doing it
		name = EVTOPTCHFP20502

		piety = 50

		ai_chance = {
			factor = 5

			mult_modifier = {
				factor = 0.1
				is_primary_heir = FROM
			}

			mult_modifier = {
				factor = 2
				trait = honest
			}

			mult_modifier = {
				factor = 0.75
				trait = deceitful
			}

			mult_modifier = {
				factor = 0.5
				trait = cruel
			}

			mult_modifier = {
				factor = 0.5
				trait = lunatic
			}

			mult_modifier = {
				factor = 0.5
				trait = possessed
			}

			mult_modifier = {
				factor = 0.5
				is_rival = FROM
			}

			mult_modifier = {
				factor = 0.75
				intrigue >= 12
			}
		}
	}
}

# Rare strange positive dream during pregnancy will cause strange birth (happens only once per dynasty)
character_event = {
	id = HFP.20503

	desc = {
		text = EVTDESCHFPA20503
		picture = GFX_evt_icon
		trigger = {
			OR = {
				religion_group = christian
				religion_group = muslim
			}
		}
	}
	desc = {
		text = EVTDESCHFPB20503
		picture = GFX_evt_comet
		trigger = { religion_openly_norse_or_reformed_trigger = yes }
	}
	desc = {
		text = EVTDESCHFPC20503
		picture = GFX_evt_wolf
		trigger = { religion_openly_tengri_or_reformed_trigger = yes }
	}

	is_triggered_only = yes

	trigger = { trait = pregnant }

	option = {
		name = EVTOPTAHFP20503

		trigger = {
			OR = {
				religion_group = christian
				religion_group = muslim
			}
		}

		set_character_flag = gabriel_baby
	}

	option = {
		name = EVTOPTBHFP20503

		trigger = { religion_openly_norse_or_reformed_trigger = yes }

		set_character_flag = thor_baby
	}

	option = {
		name = EVTOPTCHFP20503

		trigger = { religion_openly_tengri_or_reformed_trigger = yes }

		set_character_flag = tengri_baby
	}
}

# Rare strange negative dream during pregnancy will cause strange birth (happens only once per dynasty)
character_event = {
	id = HFP.20504

	desc = {
		text = EVTDESCHFPA20504
		picture = GFX_evt_icon
		trigger = { religion_group = christian }
	}
	desc = {
		text = EVTDESCHFPB20504
		picture = GFX_evt_irminsul_burning
		trigger = { religion_group = muslim }
	}
	desc = {
		text = EVTDESCHFPC20504
		picture = GFX_evt_torture
		trigger = { religion_openly_norse_or_reformed_trigger = yes }
	}
	desc = {
		text = EVTDESCHFPD20504
		picture = GFX_evt_illness
		trigger = { religion_openly_tengri_or_reformed_trigger = yes }
	}

	is_triggered_only = yes

	trigger = { trait = pregnant }

	option = {
		name = EVTOPTAHFP20504

		trigger = { religion_group = christian }

		set_character_flag = lucifer_baby
	}

	option = {
		name = EVTOPTBHFP20504

		trigger = { religion_group = muslim }

		set_character_flag = iblis_baby
	}

	option = {
		name = EVTOPTCHFP20504

		trigger = { religion_openly_norse_or_reformed_trigger = yes }

		set_character_flag = loki_baby
	}

	option = {
		name = EVTOPTDHFP20504

		trigger = { religion_openly_tengri_or_reformed_trigger = yes }

		set_character_flag = erlik_baby
	}
}

# Spouse/Regent has sent his physician to help. Do you want him?
character_event = {
	id = HFP.20505
	desc = EVTDESCHFPA20505
	picture = GFX_evt_court_physician

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20505

		if = {
			limit = { event_target:pregnancy_spouse_physician = { always = yes } }

			save_persistent_event_target = {
				name = pregnancy_spouse_physician_per
				scope = event_target:pregnancy_spouse_physician
			}
		}
		else = {
			save_persistent_event_target = {
				name = pregnancy_regent_physician_per
				scope = event_target:pregnancy_regent_physician
			}
		}

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_relieved
				who = ROOT
				years = 1
			}

			character_event = { id = HFP.20507 }
		}

		ai_chance = {
			factor = 80

			mult_modifier = {
				factor = 0.5
				is_married = FROM
				event_target:pregnancy_spouse_physician = { learning < 10 }
			}

			mult_modifier = {
				factor = 0.5
				NOT = { is_married = FROM }
				event_target:pregnancy_regent_physician = { learning < 10 }
			}
		}
	}

	option = {
		name = EVTOPTBHFP20505

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_worried
				who = ROOT
				years = 1
			}

			character_event = { id = HFP.20508 }
		}

		hidden_effect = {
			if = {
				limit = { is_married = FROM }
				clear_event_target = pregnancy_spouse_physician
			}
			else = {
				clear_event_target = pregnancy_regent_physician
			}
		}

		ai_chance = {
			factor = 20

			trigger = { is_ruler = yes }

			mult_modifier = {
				factor = 1.5
				trait = stubborn
			}

			mult_modifier = {
				factor = 1.5
				trait = envious
			}

			mult_modifier = {
				factor = 1.5
				trait = zealous
			}

			mult_modifier = {
				factor = 1.5
				is_rival = FROM
			}
		}
	}
}

# Spouse/Regent wishes to offer his services as physician. Do you want him?
character_event = {
	id = HFP.20506
	desc = EVTDESCHFPA20506
	picture = GFX_evt_library

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20506

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_relieved
				who = ROOT
				years = 1
			}

			character_event = { id = HFP.20507 }
		}

		if = {
			limit = { event_target:pregnancy_spouse_physician = { always = yes } }

			save_persistent_event_target = {
				name = pregnancy_spouse_physician_per
				scope = event_target:pregnancy_spouse_physician
			}
		}
		else = {
			save_persistent_event_target = {
				name = pregnancy_regent_physician_per
				scope = event_target:pregnancy_regent_physician
			}
		}

		ai_chance = {
			factor = 80

			mult_modifier = {
				factor = 0.5
				FROM = { learning < 10 }
			}
		}
	}

	option = {
		name = EVTOPTBHFP20506

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_worried
				who = ROOT
				years = 1
			}

			character_event = { id = HFP.20508 }
		}

		hidden_effect = {
			if = {
				limit = { is_married = FROM }
				clear_event_target = pregnancy_spouse_physician
			}
			else = {
				clear_event_target = pregnancy_regent_physician
			}
		}

		ai_chance = {
			factor = 20

			trigger = { is_ruler = yes }

			mult_modifier = {
				factor = 1.5
				trait = stubborn
			}

			mult_modifier = {
				factor = 1.5
				trait = envious
			}

			mult_modifier = {
				factor = 1.5
				trait = zealous
			}

			mult_modifier = {
				factor = 1.5
				is_rival = FROM
			}
		}
	}
}

# Notify regent/spouse that his physician will help woman
character_event = {
	id = HFP.20507
	picture = GFX_evt_bad_news

	desc = {
		text = EVTDESCHFPA20507
		trigger = {	# If spouse/regent receiving notification is also the physician
			FROM = {
				OR = {
					persistent_event_target:pregnancy_spouse_physician_per = { character = ROOT }
					persistent_event_target:pregnancy_regent_physician_per = { character = ROOT }
				}
			}
		}
	}
	desc = {
		text = EVTDESCHFPB20507
		trigger = {
			FROM = {
				NOR = {
					persistent_event_target:pregnancy_spouse_physician_per = { character = ROOT }
					persistent_event_target:pregnancy_regent_physician_per = { character = ROOT }
				}
			}
		}
	}

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20507

		tooltip = {
			opinion = {
				name = opinion_relieved
				who = FROM
				years = 1
			}
		}
	}
}

# Notify regent/spouse that woman needs no help
character_event = {
	id = HFP.20508
	desc = EVTDESCHFPA20508
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20508

		tooltip = {
			opinion = {
				name = opinion_worried
				who = FROM
				years = 1
			}
		}
	}
}

# Mother: Spouse/Regent sent a priest
character_event = {
	id = HFP.20509
	desc = EVTDESCHFPA20509
	picture = GFX_evt_library

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20509

		piety = 50
	}
}

# Mother: Spouse/Regent sent a shaman
character_event = {
	id = HFP.20510
	desc = EVTDESCHFPA20510
	picture = GFX_evt_library

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20510

		piety = 25
	}
}

# Mother: Regent succeeds in poisoning you
character_event = {
	id = HFP.20511
	desc = EVTDESCHFPA20511
	picture = GFX_evt_shadow

	is_triggered_only = yes
	hide_from = yes

	immediate = {
		FROM = {
			character_event = { id = HFP.20512 }
		}

		if = {
			limit = { multiplayer = yes }
			death = { death_reason = death_troubled_pregnancy }
		}
	}

	option = {
		name = EVTOPTAHFP20511

		if = {
			limit = { multiplayer = yes }

			tooltip = {
				death = { death_reason = death_troubled_pregnancy }
			}
		}
		else = {
			death = { death_reason = death_troubled_pregnancy }
		}
	}
}

# Notify regent that he has succeeded in poisoning pregnant woman
character_event = {
	id = HFP.20512
	desc = EVTDESCHFPA20512
	picture = GFX_evt_shadow

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20512
	}
}

# Mother: Regent succeeds in smothering you
character_event = {
	id = HFP.20513
	desc = EVTDESCHFPA20513
	picture = GFX_evt_shadow

	is_triggered_only = yes
	hide_from = yes

	immediate = {
		FROM = {
			character_event = { id = HFP.20514 }
		}

		if = {
			limit = { multiplayer = yes }
			death = { death_reason = death_childbirth }
		}
	}

	option = {
		name = EVTOPTAHFP20513

		if = {
			limit = { multiplayer = yes }

			tooltip = {
				death = { death_reason = death_childbirth }
			}
		}
		else = {
			death = { death_reason = death_childbirth }
		}
	}
}

# Notify regent that he has succeeded in smothering pregnant woman
character_event = {
	id = HFP.20514
	desc = EVTDESCHFPA20514
	picture = GFX_evt_shadow

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20514
	}
}

# Mother: Regent is discovered trying to use poison
character_event = {
	id = HFP.20515
	desc = EVTDESCHFPA20515
	picture = GFX_evt_shadow

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20515 # Guards! Seize [From.GetHerHim]!"

		opinion = {
			name = opinion_traitor
			who = FROM
			years = 30
		}

		FROM = {
			show_scope_change = no

			imprison = ROOT
			remove_title = title_regent
			character_event = { id = HFP.20516 }
		}

	}

	option = {
		name = EVTOPTBHFP20515 # Guards! Kill [From.GetHerHim]!"

		FROM = {
			show_scope_change = no

			tooltip = {
				death = {
					death_reason = death_execution
					killer = FROM
				}
			}

			character_event = { id = HFP.20517 }
		}
	}
}

# Regent imprisoned for his deed
character_event = {
	id = HFP.20516
	desc = EVTDESCHFPA20516
	picture = GFX_evt_into_the_dungeon

	is_triggered_only = yes

	option = {
		name = EVTOPTHFPA20516

		piety = -300

		tooltip = {
			reverse_opinion = {
				name = opinion_traitor
				who = FROM
				years = 30
			}
		}
	}
}

# Regent killed for his deed
character_event = {
	id = HFP.20517
	desc = EVTDESCHFPA20517
	picture = GFX_evt_beheading

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { multiplayer = yes }

			death = {
				death_reason = death_execution
				killer = FROM
			}
		}
	}

	option = {
		name = EVTOPTHFPA20517

		piety = -300

		if = {
			limit = { multiplayer = yes }

			tooltip = {
				death = {
					death_reason = death_execution
					killer = FROM
				}
			}
		}
		else = {
			death = {
				death_reason = death_execution
				killer = FROM
			}
		}
	}
}

# Mother: Regent is discovered trying to smother you
character_event = {
	id = HFP.20518
	desc = EVTDESCHFPA20518
	picture = GFX_evt_shadow

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20518 # Guards! Seize [FromFrom.GetHerHim]!"

		opinion = {
			name = opinion_traitor
			who = FROM
			years = 30
		}

		FROM = {
			show_scope_change = no

			imprison = ROOT
			remove_title = title_regent
			character_event = { id = HFP.20516 }
		}
	}

	option = {
		name = EVTOPTBHFP20518 # Guards! Kill [FromFrom.GetHerHim]!"

		FROM = {
			show_scope_change = no

			tooltip = {
				death = {
					death_reason = death_execution
					killer = FROM
				}
			}

			character_event = { id = HFP.20517 }
		}
	}
}

# Mother: Spouse/Regent offers moral support
character_event = {
	id = HFP.20519
	desc = EVTDESCHFPA20519
	picture = GFX_evt_lovers

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20519
	}
}

# Mother in troubled pregnancy: Offer chance to do something about it
character_event = {
	id = HFP.20520
	desc = EVTDESCHFPA20520
	picture = GFX_evt_illness

	is_triggered_only = yes

	option = { # My Physician will help me
		name = EVTOPTAHFP20520

		trigger = { has_assigned_minor_title = title_court_physician }

		wealth = -50

		random_courtier_or_vassal = {
			limit = { has_minor_title = title_court_physician }

			ROOT = {
				save_persistent_event_target = {
					name = pregnancy_mother_physician_per
					scope = PREV
				}
			}
		}

		ai_chance = {
			factor = 70

			mult_modifier = {
				factor = 1.5

				any_courtier_or_vassal = {
					has_minor_title = title_court_physician
					trait = quick
				}
			}

			mult_modifier = {
				factor = 1.5

				any_courtier_or_vassal = {
					has_minor_title = title_court_physician
					trait = genius
				}
			}

			mult_modifier = {
				factor = 1.5

				any_courtier_or_vassal = {
					has_minor_title = title_court_physician
					learning >= 20
				}
			}

			mult_modifier = {
				factor = 0.5

				any_courtier_or_vassal = {
					has_minor_title = title_court_physician
					learning < 10
				}
			}
		}
	}

	option = { # Call for a Healer (don't have Physicians due to lack of Reaper's Due DLC)
		name = EVTOPTBHFP20520

		trigger = {
			is_ruler = yes
			NOT = { has_dlc = "Reapers" }
		}

		set_character_flag = pregnancy_healer_help
		wealth = -50

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 0.75
				trait = zealous
			}
		}
	}

	option = { # Call for a Priest
		name = EVTOPTCHFP20520

		trigger = {
			is_ruler = yes
			is_not_unreformed_pagan_trigger = yes

			NOR = {
				has_character_flag = pregnancy_priest_comfort # Already taken from the spouse/regent
				has_character_flag = pregnancy_shaman_comfort
			}
		}

		set_character_flag = pregnancy_priest_comfort
		piety = 100
		wealth = -20

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 2
				trait = zealous
			}
		}
	}

	option = { # Call for a Shaman
		name = EVTOPTDHFP20520

		trigger = {
			is_ruler = yes
			is_unreformed_pagan_trigger = yes

			NOR = {
				has_character_flag = pregnancy_shaman_comfort # Already taken from the spouse/regent
				has_character_flag = pregnancy_priest_comfort
			}
		}

		set_character_flag = pregnancy_shaman_comfort
		piety = 50
		prestige = 50
		wealth = -5

		ai_chance = {
			factor = 20

			mult_modifier = {
				factor = 2
				is_tribal = yes
			}

			mult_modifier = {
				factor = 2.5
				is_nomadic = yes
			}

			mult_modifier = {
				factor = 2
				trait = zealous
			}
		}
	}

	option = { # Do nothing
		name = EVTOPTEHFP20520
	}

	after = { # Now for randomized pain
		character_event = {
			id = HFP.20521
			days = 15
			random = 15
		}
	}
}

character_event = {
	id = HFP.20521

	is_triggered_only = yes
	hide_window = yes

	immediate = {
		random_list = {
			5 = {
				mult_modifier = {
					factor = 0.25
					trait = cough
				}

				character_event = { id = HFP.20522 } # Asthma
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = vomiting
				}

				character_event = { id = HFP.20523 } # Vomiting
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = rash
				}

				character_event = { id = HFP.20524 } # Hair and rashes
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = malaise
				}

				character_event = { id = HFP.20525 } # Metalmouth
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = fever
				}

				character_event = { id = HFP.20526 } # Fever and sweat
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = headache
				}

				character_event = { id = HFP.20527 } # Amnesia
			}

			5 = {
				character_event = { id = HFP.20528 } # Panic attack
			}

			5 = {
				character_event = { id = HFP.20529 } # Undernourishment
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = stressed
				}

				character_event = { id = HFP.20530 } # Epileptic episode
			}

			10 = {
				mult_modifier = {
					factor = 0.25
					trait = cramps
				}

				character_event = { id = HFP.20531 } # Blood and cramps
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = infection
				}

				character_event = { id = HFP.20532 } # Teeth hurting and falling
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = fatigue
				}

				character_event = { id = HFP.20533 } # Insomnia
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = fatigue
				}

				character_event = { id = HFP.20534 } # Hallucinations
			}

			5 = {
				mult_modifier = {
					factor = 0.25
					trait = fatigue
				}

				character_event = { id = HFP.20535 } # Sleepwalking
			}

			3 = {
				mult_modifier = {
					factor = 0.9
					health < 2
				}

				mult_modifier = {
					factor = 0.8
					practical_age >= 40
				}

				mult_modifier = {
					factor = 1.25
					has_character_modifier = mother_comforted
				}

				mult_modifier = {
					factor = 0.95 # Fasting
					has_character_modifier = mother_vow_temperance
				}

				mult_modifier = {
					factor = 1.15
					has_character_modifier = mother_vow_charity
				}

				mult_modifier = {
					factor = 1.15
					has_character_modifier = mother_vow_humility
				}

				mult_modifier = {
					factor = 1.15
					has_character_modifier = mother_vow_chastity
				}

				mult_modifier = {
					factor = 0.9
					has_character_modifier = mother_bad_omen
				}

				mult_modifier = {
					factor = 1.15
					has_character_modifier = mother_good_omen
				}

				mult_modifier = {
					factor = 1.25
					has_character_modifier = mother_minor_rest
				}

				mult_modifier = {
					factor = 1.45
					has_character_modifier = mother_resting_health
				}

				mult_modifier = {
					factor = 1.15
					has_character_modifier = mother_praying_health
				}

				mult_modifier = {
					factor = 0.9
					has_character_modifier = mother_partying_health
				}

				mult_modifier = {
					factor = 0.8
					has_character_modifier = mother_exposed_to_elements
				}

				mult_modifier = {
					factor = 0.7
					persistent_event_target:pregnancy_mother_physician_per = { learning < 5 }
				}

				mult_modifier = {
					factor = 0.8
					persistent_event_target:pregnancy_mother_physician_per = { learning < 10 }
				}

				mult_modifier = {
					factor = 0.9
					persistent_event_target:pregnancy_mother_physician_per = { trait = slow }
				}

				mult_modifier = {
					factor = 0.8
					persistent_event_target:pregnancy_mother_physician_per = { trait = imbecile }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_mother_physician_per = { trait = scholar }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_mother_physician_per = { trait = physician }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_mother_physician_per = { trait = quick }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_mother_physician_per = { trait = genius }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_mother_physician_per = { learning >= 10 }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_mother_physician_per = { learning >= 15 }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_mother_physician_per = { learning >= 20 }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_mother_physician_per = { learning >= 25 }
				}

				mult_modifier = {
					factor = 0.7
					persistent_event_target:pregnancy_spouse_physician_per = { learning < 5 }
				}

				mult_modifier = {
					factor = 0.8
					persistent_event_target:pregnancy_spouse_physician_per = { learning < 10 }
				}

				mult_modifier = {
					factor = 0.9
					persistent_event_target:pregnancy_spouse_physician_per = { trait = slow }
				}

				mult_modifier = {
					factor = 0.8
					persistent_event_target:pregnancy_spouse_physician_per = { trait = imbecile }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_spouse_physician_per = { trait = scholar }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_spouse_physician_per = { trait = physician }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_spouse_physician_per = { trait = quick }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_spouse_physician_per = { trait = genius }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_spouse_physician_per = { learning >= 10 }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_spouse_physician_per = { learning >= 15 }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_spouse_physician_per = { learning >= 20 }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_spouse_physician_per = { learning >= 25 }
				}

				mult_modifier = {
					factor = 0.7
					persistent_event_target:pregnancy_regent_physician_per = { learning < 5 }
				}

				mult_modifier = {
					factor = 0.8
					persistent_event_target:pregnancy_regent_physician_per = { learning < 10 }
				}

				mult_modifier = {
					factor = 0.9
					persistent_event_target:pregnancy_regent_physician_per = { trait = slow }
				}

				mult_modifier = {
					factor = 0.8
					persistent_event_target:pregnancy_regent_physician_per = { trait = imbecile }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_regent_physician_per = { trait = scholar }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_regent_physician_per = { trait = physician }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_regent_physician_per = { trait = quick }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_regent_physician_per = { trait = genius }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_regent_physician_per = { learning >= 10 }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_regent_physician_per = { learning >= 15 }
				}

				mult_modifier = {
					factor = 1.25
					persistent_event_target:pregnancy_regent_physician_per = { learning >= 20 }
				}

				mult_modifier = {
					factor = 1.5
					persistent_event_target:pregnancy_regent_physician_per = { learning >= 25 }
				}

				# Every successful healing on random event reduces variable, lower the variable, more likely mother is to recover.
				mult_modifier = {
					factor = 1.25
					check_variable = { which = troubled_pregnancy_variable value >= -1 }
				}

				mult_modifier = {
					factor = 1.25
					check_variable = { which = troubled_pregnancy_variable value >= -2 }
				}

				mult_modifier = {
					factor = 1.5
					check_variable = { which = troubled_pregnancy_variable value >= -4 }
				}

				mult_modifier = {
					factor = 1.75
					check_variable = { which = troubled_pregnancy_variable value >= -6 }
				}

				character_event = { id = HFP.20536 } # RECOVERY
			}

			1 = {
				# Every failed healing on random event increases variable, higher the variable, more likely mother is to die
				mult_modifier = {
					factor = 1.25
					check_variable = { which = troubled_pregnancy_variable value >= 1 }
				}

				mult_modifier = {
					factor = 1.25
					check_variable = { which = troubled_pregnancy_variable value >= 2 }
				}

				mult_modifier = {
					factor = 1.5
					check_variable = { which = troubled_pregnancy_variable value >= 3 }
				}

				mult_modifier = {
					factor = 2
					check_variable = { which = troubled_pregnancy_variable value >= 4 }
				}

				mult_modifier = {
					factor = 3
					check_variable = { which = troubled_pregnancy_variable value >= 5 }
				}

				character_event = { id = HFP.20537 } # DEATH
			}
		}
	}
}

# Troubled pregnancy: Asthma
character_event = {
	id = HFP.20522
	desc = EVTDESCHFPA20522	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20522

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_522 }

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

			if = {
				limit = { trait = cough }
				health = -0.05
			}
			else = {
				add_trait = cough
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.05
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_easy_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Vomiting
character_event = {
	id = HFP.20523
	desc = EVTDESCHFPA20523	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20523

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_523 }

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

			if = {
				limit = { trait = vomiting }
				health = -0.05
			}
			else = {
				add_trait = cough
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.05
			}
			else = {
				add_trait = ill
			}
		}

		lose_weight_small_effect = yes
		weight_trait_check_effect = yes
		troubled_pregnancy_variable_easy_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Hair and Rashes
character_event = {
	id = HFP.20524
	desc = EVTDESCHFPA20524	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20524

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_524 }

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

			if = {
				limit = { trait = rash }
				health = -0.05
			}
			else = {
				add_trait = rash
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.05
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_easy_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Metalmouth
character_event = {
	id = HFP.20525
	desc = EVTDESCHFPA20525	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20525

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_525 }

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

			if = {
				limit = { trait = malaise }
				health = -0.05
			}
			else = {
				add_trait = malaise
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.05
			}
			else = {
				add_trait = ill
			}
		}

		lose_weight_small_effect = yes
		weight_trait_check_effect = yes
		troubled_pregnancy_variable_easy_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Fever and Sweat
character_event = {
	id = HFP.20526
	desc = EVTDESCHFPA20526	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20526

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_526 }

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

			if = {
				limit = { trait = fever }
				health = -0.05
			}
			else = {
				add_trait = fever
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.05
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_easy_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Amnesia
character_event = {
	id = HFP.20527
	desc = EVTDESCHFPA20527	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20527

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_527 }

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

			if = {
				limit = { trait = headache }
				health = -0.05
			}
			else = {
				add_trait = headache
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.05
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_easy_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Panic Attack
character_event = {
	id = HFP.20528
	desc = EVTDESCHFPA20528	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20528

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_528 }

		troubled_pregnancy_variable_easy_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

##### More Dangerous ones

# Troubled pregnancy: Undernourishment
character_event = {
	id = HFP.20529
	desc = EVTDESCHFPA20529	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20529

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_529 }

		lose_weight_medium_effect = yes
		weight_trait_check_effect = yes
		troubled_pregnancy_variable_hard_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Epilectic Episode
character_event = {
	id = HFP.20530
	desc = EVTDESCHFPA20530	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20530

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_530 }

		if = {
			limit = { trait = stressed }
			health = -0.05
		}
		else = {
			add_trait = stressed
		}

		troubled_pregnancy_variable_hard_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Blood and Cramps
character_event = {
	id = HFP.20531
	desc = EVTDESCHFPA20531	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20531

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_531 }

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

			if = {
				limit = { trait = cramps }
				health = -0.07
			}
			else = {
				add_trait = cramps
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.07
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_hard_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Teeth Hurting and Falling
character_event = {
	id = HFP.20532
	desc = EVTDESCHFPA20532	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20532

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_532 }

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

			if = {
				limit = { trait = infection }
				health = -0.07
			}
			else = {
				add_trait = infection
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.07
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_hard_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Insomnia
character_event = {
	id = HFP.20533
	desc = EVTDESCHFPA20533	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20533

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_533 }

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

			if = {
				limit = { trait = fatigue }
				health = -0.05
			}
			else = {
				add_trait = fatigue
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.05
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_hard_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Hallucinations
character_event = {
	id = HFP.20534
	desc = EVTDESCHFPA20534	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20534

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_534 }

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

			if = {
				limit = { trait = fatigue }
				health = -0.02
			}
			else = {
				add_trait = fatigue
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.02
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_hard_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Sleepwalking
character_event = {
	id = HFP.20535
	desc = EVTDESCHFPA20535	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20535

		custom_tooltip = { text = tooltip_troubled_pregnancy_helpers_535 }

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

			if = {
				limit = { trait = fatigue }
				health = -0.07
			}
			else = {
				add_trait = fatigue
			}
		}
		else = {
			if = {
				limit = { trait = ill }
				health = -0.07
			}
			else = {
				add_trait = ill
			}
		}

		troubled_pregnancy_variable_hard_effect = yes

		character_event = {
			id = HFP.20521 # More randomized pain
			days = 25
			random = 25
		}
	}
}

# Troubled pregnancy: Recovery
character_event = {
	id = HFP.20536
	desc = EVTDESCHFPA20536	# Possible custom loc keys added to describe help from spouse/physicians/priests
	picture = GFX_evt_recovery

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	immediate = {
		remove_trait = cough
		remove_trait = fever
		remove_trait = vomiting
		remove_trait = cramps
		remove_trait = rash
		remove_trait = headache
		remove_trait = fatigue
		remove_trait = malaise
		remove_trait = infection
		remove_trait = stressed
		health = 0.1
	}

	option = {
		name = EVTOPTAHFP20536

		hidden_effect = {
			# Not set to 0, still small chance of post-birth complications
			change_variable = {
				which = troubled_pregnancy_variable
				value = -4
			}

			clr_character_flag = pregnancy_healer_help
			clr_character_flag = pregnancy_priest_comfort
			clr_character_flag = pregnancy_shaman_comfort
			clr_character_flag = pregnancy_spouse_comfort
			clr_character_flag = mother_asked_retirement

			# Send notifications to all doctors
			persistent_event_target:pregnancy_mother_physician_per = { character_event = { id = HFP.20553 } }
			persistent_event_target:pregnancy_spouse_physician_per = { character_event = { id = HFP.20553 } }
			persistent_event_target:pregnancy_regent_physician_per = { character_event = { id = HFP.20553 } }

			# And to the spouse, if he already isn't one of them
			if = {
				limit = {
					persistent_event_target:pregnancy_mother_physician_per = { NOT = { is_married = ROOT } }
					persistent_event_target:pregnancy_spouse_physician_per = { NOT = { is_married = ROOT } }
					persistent_event_target:pregnancy_regent_physician_per = { NOT = { is_married = ROOT } }
				}

				spouse = { character_event = { id = HFP.20554 } }
			}
		}

		remove_trait = troubled_pregnancy
		set_character_flag = survivor_mom # More likely to have difficult pregnancies in the future, unlocks chance to go celibate for rulers
	}
}

# Physician notified of mother recovering from troubled pregnancy before childbirth
character_event = {
	id = HFP.20553
	desc = EVTDESCHFPA20553
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20553

		piety = 30
		remove_trait_silently_stressed_effect = yes
	}
}

# Spouse (who is not a physician) notified of mother recovering from troubled pregnancy before childbirth
character_event = {
	id = HFP.20554
	desc = EVTDESCHFPA20554
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20554

		piety = 30
		remove_trait_silently_stressed_effect = yes
	}
}

# Troubled pregnancy: DEATH before birth
character_event = {
	id = HFP.20537
	desc = EVTDESCHFPA20537
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
		trait = pregnant
	}

	option = {
		name = EVTOPTAHFP20537

		hidden_effect = {
			remove_trait = cough
			remove_trait = fever
			remove_trait = diarrhea
			remove_trait = vomiting
			remove_trait = chest_pain
			remove_trait = cramps
			remove_trait = rash
			remove_trait = headache
			remove_trait = abdominal_pain
			remove_trait = fatigue
			remove_trait = malaise
			remove_trait = infection
		}

		spouse = { save_event_target_as = scoped_father }

		# Hollow child is born in this circumstance, giving another chance to avoid game over
		custom_tooltip = {
			text = tooltip_HFP20537_A

			create_character = {
				random_traits = no
				dynasty = ROOT
				culture = ROOT
				religion = ROOT
				female = 50
				age = 0
			}

			new_character = {
				set_mother = ROOT

				random = {
					chance = 5
					add_trait = clubfooted
				}

				random = {
					chance = 5
					add_trait = ugly
				}

				lose_weight_large_effect = yes
				lose_weight_medium_effect = yes
				add_trait = malnourished
				save_event_target_as = hollow_baby
				set_character_flag = flag_hollow_child_primed

				if = { # If a dad exists...
					limit = { event_target:scoped_father = { always = yes } }

					set_father = event_target:scoped_father

					if = { # and mom is not matrilineally married...
						limit = { ROOT = { is_married_matrilineally = no } }

						event_target:hollow_baby = {
							dynasty = event_target:scoped_father
							culture = event_target:scoped_father
							religion = event_target:scoped_father
						}
					}
				}
			}

			event_target:scoped_father = { # Check if father likes mother
				if = {
					limit = {
						opinion = {
							who = ROOT
							value >= 40
						}
					}

					set_character_flag = flag_loved_dead_mother
				}

				character_event = { id = HFP.20056 }
			}

			death = { death_reason = death_troubled_pregnancy }
		}
	}
}

# on_birth baby vision child event
character_event = {
	id = HFP.20538
	desc = EVTDESCHFP20538
	picture = GFX_evt_comet

	is_triggered_only = yes # 313, base_birth_events.txt

	option = {
		name = EVTOPTAHFP20538 # Yay! I'm vision baby!"

		if = {
			limit = { mother = { has_character_flag = gabriel_baby } }

			mother = { character_event = { id = HFP.20539 days = 1 } }
			father = { character_event = { id = HFP.20539 days = 1 } }

			change_diplomacy = 2
			remove_trait = hunchback
			remove_trait = dwarf
			remove_trait = inbred
			remove_trait = lisp
			remove_trait = stutter
			remove_trait = freckles
			remove_trait = clubfooted
			remove_trait = slow
			remove_trait = imbecile
			remove_trait = harelip
			remove_trait = ugly
			remove_trait = weak
			remove_trait = sickly

			random_list = {
				50 = {
					trigger = {
						NOT = { trait = attractive }
					}

					add_trait = attractive
				}

				50 = {
					trigger = {
						NOR = {
							trait = genius
							trait = quick
						}
					}

					add_trait = quick
				}
			}
		}
		else_if = {
			limit = { mother = { has_character_flag = lucifer_baby } }

			mother = { character_event = { id = HFP.20540 days = 1 } }
			father = { character_event = { id = HFP.20540 days = 1 } }

			change_intrigue = 1
			add_trait = lefthanded
		}
		else_if = {
			limit = { mother = { has_character_flag = iblis_baby } }

			mother = { character_event = { id = HFP.20540 days = 1 } }
			father = { character_event = { id = HFP.20540 days = 1 } }

			change_learning = 1
			add_trait = hunchback
		}
		else_if = {
			limit = { mother = { has_character_flag = thor_baby } }

			mother = { character_event = { id = HFP.20539 days = 1 } }
			father = { character_event = { id = HFP.20539 days = 1 } }

			change_martial = 2
			remove_trait = hunchback
			remove_trait = dwarf
			remove_trait = inbred
			remove_trait = lisp
			remove_trait = stutter
			remove_trait = freckles
			remove_trait = clubfooted
			remove_trait = slow
			remove_trait = imbecile
			remove_trait = harelip
			remove_trait = ugly
			remove_trait = weak
			remove_trait = sickly
			add_trait = strong
		}
		else_if = {
			limit = { mother = { has_character_flag = loki_baby } }

			mother = { character_event = { id = HFP.20540 days = 1 } }
			father = { character_event = { id = HFP.20540 days = 1 } }

			change_intrigue = 1
			add_trait = blinded
			add_trait = giant
		}
		else_if = {
			limit = { mother = { has_character_flag = tengri_baby } }

			mother = { character_event = { id = HFP.20539 days = 1 } }
			father = { character_event = { id = HFP.20539 days = 1 } }

			change_martial = 2
			remove_trait = hunchback
			remove_trait = dwarf
			remove_trait = inbred
			remove_trait = lisp
			remove_trait = stutter
			# remove_trait = freckles
			remove_trait = clubfooted
			remove_trait = slow
			remove_trait = imbecile
			remove_trait = harelip
			remove_trait = ugly
			remove_trait = weak
			remove_trait = sickly
			add_trait = shrewd
		}
		if = {
			limit = { mother = { has_character_flag = erlik_baby } }

			mother = { character_event = { id = HFP.20540 days = 1 } }
			father = { character_event = { id = HFP.20540 days = 1 } }

			change_stewardship = 1
			add_trait = frail
		}
	}
}

# Parent receives news of miraculous birth
character_event = {
	id = HFP.20539
	desc = EVTDESCHFP20539
	picture = GFX_evt_recovery

	is_triggered_only = yes

	immediate = {
		clr_character_flag = gabriel_baby
		clr_character_flag = lucifer_baby
		clr_character_flag = iblis_baby
		clr_character_flag = thor_baby
		clr_character_flag = loki_baby
		clr_character_flag = tengri_baby
		clr_character_flag = erlik_baby
	}

	option = {
		name = EVTOPTAHFP20539
	}
}

# Parent receives news of ominous birth
character_event = {
	id = HFP.20540
	desc = EVTDESCHFP20540
	picture = GFX_evt_recovery

	is_triggered_only = yes

	immediate = {
		clr_character_flag = gabriel_baby
		clr_character_flag = lucifer_baby
		clr_character_flag = iblis_baby
		clr_character_flag = thor_baby
		clr_character_flag = loki_baby
		clr_character_flag = tengri_baby
		clr_character_flag = erlik_baby
	}

	option = {
		name = EVTOPTAHFP20540 # I'm just glad this is over."
	}
}

############################# POST BIRTH TROUBLED PREGNANCY OUTCOMES #######################

# Post-fever
character_event = {
	id = HFP.20541
	desc = EVTDESCHFP20541
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
	}

	option = {
		name = EVTOPTAHFP20541 # Why am I shaking?

		custom_tooltip = {
			text = tooltip_troubled_pregnancy_helpers_541

			random_list = {
				25 = {
					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_mother_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_mother_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_mother_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_mother_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 25 }
					}

					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_spouse_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_spouse_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_spouse_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_spouse_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 25 }
					}

					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_regent_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_regent_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_regent_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_regent_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 25 }
					}

					character_event = { id = HFP.20544 days = 5 random = 5 } # Recovers completely
				}

				45 = { character_event = { id = HFP.20545 days = 5 random = 5 } } # Recovers weakened
				20 = { character_event = { id = HFP.20546 days = 5 random = 5 } } # Remains infirm
				 5 = { character_event = { id = HFP.20547 days = 5 random = 5 } } # DEATH
			}
		}
	}
}

# Hair loss
character_event = {
	id = HFP.20542
	desc = EVTDESCHFP20542
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
	}

	option = {
		name = EVTOPTAHFP20542 # What's happening to me?!

		custom_tooltip = {
			text = tooltip_troubled_pregnancy_helpers_542

			random_list = {
				35 = {
					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_mother_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_mother_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_mother_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_mother_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 25 }
					}

					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_spouse_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_spouse_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_spouse_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_spouse_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 25 }
					}

					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_regent_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_regent_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_regent_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_regent_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 25 }
					}

					character_event = { id = HFP.20544 days = 5 random = 5 } # Recovers completely
				}

				50 = { character_event = { id = HFP.20545 days = 5 random = 5 } } # Recovers weakened
				10 = { character_event = { id = HFP.20546 days = 5 random = 5 } } # Remains infirm
				 5 = { character_event = { id = HFP.20547 days = 5 random = 5 } } # DEATH
			}
		}
	}
}

# Blood
character_event = {
	id = HFP.20543
	desc = EVTDESCHFP20543
	picture = GFX_evt_illness

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
	}

	option = {
		name = EVTOPTAHFP20543 # I will bleed out!

		custom_tooltip = {
			text = tooltip_troubled_pregnancy_helpers_531

			random_list = {
				10 = {
					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_mother_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_mother_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_mother_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_mother_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_mother_physician_per = { learning >= 25 }
					}

					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_spouse_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_spouse_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_spouse_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_spouse_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_spouse_physician_per = { learning >= 25 }
					}

					mult_modifier = {
						factor = 0.7
						persistent_event_target:pregnancy_regent_physician_per = { learning < 5 }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_regent_physician_per = { learning < 10 }
					}

					mult_modifier = {
						factor = 0.9
						persistent_event_target:pregnancy_regent_physician_per = { trait = slow }
					}

					mult_modifier = {
						factor = 0.8
						persistent_event_target:pregnancy_regent_physician_per = { trait = imbecile }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { trait = scholar }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { trait = physician }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { trait = quick }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { trait = genius }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 10 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 15 }
					}

					mult_modifier = {
						factor = 1.25
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 20 }
					}

					mult_modifier = {
						factor = 1.5
						persistent_event_target:pregnancy_regent_physician_per = { learning >= 25 }
					}

					character_event = { id = HFP.20544 days = 5 random = 5 } # Recovers completely
				}

				40 = { character_event = { id = HFP.20545 days = 5 random = 5 } } # Recovers weakened
				20 = { character_event = { id = HFP.20546 days = 5 random = 5 } } # Remains infirm
				30 = { character_event = { id = HFP.20547 days = 5 random = 5 } } # DEATH
			}
		}

		lose_weight_small_effect = yes
		weight_trait_check_effect = yes
	}
}

# Complete recovery
character_event = {
	id = HFP.20544
	desc = EVTDESCHFP20544
	picture = GFX_evt_recovery

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
	}

	immediate = {
		remove_trait = cough
		remove_trait = fever
		remove_trait = vomiting
		remove_trait = cramps
		remove_trait = rash
		remove_trait = headache
		remove_trait = fatigue
		remove_trait = malaise
		remove_trait = infection
		remove_trait = stressed
		clr_character_flag = pregnancy_healer_help
		clr_character_flag = pregnancy_priest_comfort
		clr_character_flag = pregnancy_shaman_comfort
		clr_character_flag = pregnancy_spouse_comfort
		clr_character_flag = mother_asked_retirement
		set_character_flag = survivor_mom
	}

	option = {
		name = EVTOPTAHFP20544 # I won't mind getting up now

		remove_trait = troubled_pregnancy

		spouse = { character_event = { id = HFP.20548 } }
	}
}

# Partial recovery
character_event = {
	id = HFP.20545
	desc = EVTDESCHFP20545
	picture = GFX_evt_recovery

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
	}

	immediate = {
		remove_trait = cough
		remove_trait = fever
		remove_trait = vomiting
		remove_trait = cramps
		remove_trait = rash
		remove_trait = headache
		remove_trait = fatigue
		remove_trait = malaise
		remove_trait = infection
		remove_trait = stressed
		clr_character_flag = pregnancy_healer_help
		clr_character_flag = pregnancy_priest_comfort
		clr_character_flag = pregnancy_shaman_comfort
		clr_character_flag = pregnancy_spouse_comfort
		clr_character_flag = mother_asked_retirement
	}

	option = {
		name = EVTOPTAHFP20545 # I think I'll rest another couple of days still...

		if = {
			limit = { trait = brawny }
			remove_trait = brawny
		}
		else_if = {
			limit = { trait = frail }
			health = -1.0
		}
		else = {
			add_trait = frail
		}

		remove_trait = troubled_pregnancy
		set_character_flag = survivor_mom

		spouse = { character_event = { id = HFP.20549 } }
	}
}

# remains infirm
character_event = {
	id = HFP.20546
	desc = EVTDESCHFP20546
	picture = GFX_evt_recovery

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
	}

	immediate = {
		remove_trait = cough
		remove_trait = fever
		remove_trait = vomiting
		remove_trait = cramps
		remove_trait = rash
		remove_trait = headache
		remove_trait = fatigue
		remove_trait = malaise
		remove_trait = infection
		remove_trait = stressed
		clr_character_flag = pregnancy_healer_help
		clr_character_flag = pregnancy_priest_comfort
		clr_character_flag = pregnancy_shaman_comfort
		clr_character_flag = pregnancy_spouse_comfort
		clr_character_flag = mother_asked_retirement
	}

	option = {
		name = EVTOPTAHFP20546 # Who goes there?

		if = {
			limit = { trait = infirm }
			health = -1.0
		}
		else = {
			add_trait = infirm
		}

		remove_trait = troubled_pregnancy
		set_character_flag = survivor_mom

		spouse = { character_event = { id = HFP.20550 } }
	}
}

# Death after birth
character_event = {
	id = HFP.20547
	desc = EVTDESCHFP20547
	picture = GFX_evt_recovery

	is_triggered_only = yes

	trigger = {
		trait = troubled_pregnancy
	}

	immediate = {
		remove_trait = cough
		remove_trait = fever
		remove_trait = vomiting
		remove_trait = cramps
		remove_trait = rash
		remove_trait = headache
		remove_trait = fatigue
		remove_trait = malaise
		remove_trait = infection
		remove_trait = stressed
		clr_character_flag = pregnancy_healer_help
		clr_character_flag = pregnancy_priest_comfort
		clr_character_flag = pregnancy_shaman_comfort
		clr_character_flag = pregnancy_spouse_comfort
		clr_character_flag = mother_asked_retirement

		if = {
			limit = { multiplayer = yes }
			death = { death_reason = death_troubled_pregnancy }
		}

		spouse = { character_event = { id = HFP.20551 } }
	}

	option = {
		name = EVTOPTAHFP20547 # I'll rest just a little more...

		if = {
			limit = { multiplayer = yes }

			tooltip = {
				death = { death_reason = death_troubled_pregnancy }
			}
		}
		else = {
			death = { death_reason = death_troubled_pregnancy }
		}
	}
}

# Spouse notified of full recovery
character_event = {
	id = HFP.20548
	desc = EVTDESCHFP20548
	picture = GFX_evt_recovery

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20548 # That's a relief. To when the next son?
	}
}

# Spouse notified of partial recovery
character_event = {
	id = HFP.20549
	desc = EVTDESCHFP20549
	picture = GFX_evt_recovery

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20549 # It can still manage another couple of toddlers, right?
	}
}

# Spouse notified of infirmity
character_event = {
	id = HFP.20550
	desc = EVTDESCHFP20550
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20550 # It can still manage another couple of toddlers, right?
	}
}

# Spouse notified of death
character_event = {
	id = HFP.20551
	desc = EVTDESCHFP20551
	picture = GFX_evt_bad_news_female

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20551 # My darling!

		if = {
			limit = {
				OR = {
					is_lover = FROM

					opinion = {
						who = FROM
						value >= 50
					}
				}
			}

			random = {
				chance = 40
				add_trait_depressed_effect = yes
			}
		}
	}
}

# Spouse notified of troubled pregnancy after birth
character_event = {
	id = HFP.20552
	picture = GFX_evt_bad_news_female

	desc = {
		text = EVTDESCHFPA20552
		trigger = {
			FROM = { has_character_flag = troubled_pregnancy_relapse }
		}
	}
	desc = {
		text = EVTDESCHFPB20552
		trigger = {
			FROM = {
				NOT = { has_character_flag = troubled_pregnancy_relapse }
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20552 # That's unfortunate
		FROM = { clr_character_flag = troubled_pregnancy_relapse }
	}
}

## 20553 and 20554 ids taken by notifications to physician/spouse of recovery during pregnancy


# Clear hard pregnancy on_birth
character_event = {
	id = HFP.20555

	is_triggered_only = yes # on_birth
	hide_window = yes

	trigger = {
		mother = { trait = hard_pregnancy }
	}

	immediate = {
		mother = {
			remove_trait = hard_pregnancy
			remove_trait = in_hiding
			remove_trait = travelling
			clr_character_flag = mother_asked_retirement # If still on for whatever reason
		}
	}
}

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

# on_pregnancy positive events
character_event = {
	id = HFP.20556

	is_triggered_only = yes # on_pregnancy
	hide_window = yes

	trigger = {
		NOT = {
			has_game_rule = {
				name = pregnancy_flavor
				value = off
			}
		}
	}

	immediate = {
		clr_character_flag = flag_mother_dark_rest
		clr_character_flag = mother_gossip_listening # Safety check, they should already have been removed
		clr_character_flag = mother_gossip_talking
		clr_character_flag = mother_gossip_trusting
		clr_character_flag = mother_gossip_plotting
		clr_character_flag = mother_gossip_envious
		clr_character_flag = mother_gossip_shy
		clr_character_flag = mother_gossip_learning
		clr_character_flag = mother_gossip_content
		clr_character_flag = mother_gossip_gluttonous
		clr_character_flag = flag_mother_festival_gregarious
		clr_character_flag = flag_mother_festival_kind
		clr_character_flag = flag_mother_festival_piety
		clr_character_flag = flag_mother_festival_proud
		clr_character_flag = flag_mother_festival_ambitious
		clr_character_flag = flag_mother_festival_prestige
		clr_character_flag = flag_mother_festival_peasants
		clr_character_flag = flag_mother_festival_vassals
		clr_character_flag = flag_mother_festival_gluttonous
		clr_character_flag = flag_mother_festival_drunkard
		clr_character_flag = flag_mother_festival_chaste
		clr_character_flag = flag_mother_festival_lustful

		any_lover = {
			limit = {
				ai = no
				is_female = no # So lesbian lovers will not believe the child is theirs
			}

			character_event = { id = HFP.20067 }
		}

		# First pregnancy scare
		random_list = {
			20 = { }

			80 = {
				trigger = { has_children = no }

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				mult_modifier = {
					factor = 1.5
					practical_age < 20
				}

				mult_modifier = {
					factor = 1.5
					is_married = no
				}

				mult_modifier = {
					factor = 1.75
					trait = craven
				}

				mult_modifier = {
					factor = 0.5
					trait = brave
				}

				character_event = {
					id = HFP.20557
					days = 7
					random = 5
				}
			}
		}

		# Random stuff
		random_list = {
			# Pregnancy Glow
			10 = {
				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 0.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 0.35
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 0.25
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 0.15
					num_of_children >= 5
				}

				mult_modifier = {
					factor = 1.5
					practical_age < 25
				}

				mult_modifier = {
					factor = 0.25
					practical_age >= 35
				}

				mult_modifier = {
					factor = 0.1
					practical_age >= 45
				}

				character_event = {
					id = HFP.20003
					days = 25
					random = 10
				}
			}

			# Dark Rest
			10 = {
				trigger = {
					OR = {
						is_playable = yes
						spouse = { is_playable = yes }
					}
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 0.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 0.35
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 0.25
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 0.15
					num_of_children >= 5
				}

				mult_modifier = {
					factor = 1.5
					practical_age < 25
				}

				mult_modifier = {
					factor = 0.25
					practical_age >= 35
				}

				mult_modifier = {
					factor = 0.1
					practical_age >= 45
				}

				# Fires for woman if landed, otherwise husband
				if = {
					limit = { is_playable = yes }

					character_event = {
						id = HFP.20030
						months = 2
						random = 10
					}
				}
				else = {
					spouse = {
						character_event = {
							id = HFP.20030
							months = 2
							random = 10
						}
					}
				}
			}

			# Baby kicks
			20 = {
				mult_modifier = {
					factor = 0.5
					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 0.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 0.35
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 0.25
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 0.15
					num_of_children >= 5
				}

				character_event = {
					id = HFP.20558
					days = 80
					random = 20
				}
			}

			# Gender wager
			30 = {
				trigger = {
					has_living_children = yes

					# Don't already have an heir
					trigger_if = {
						limit = {
							OR = {
								has_law = agnatic_succession
								has_law = cognatic_succession
							}
						}

						NOT = {
							any_child = { is_female = no }
						}
					}
					trigger_else_if = {
						limit = {
							OR = {
								has_law = enatic_cognatic_succession
								has_law = enatic_succession
							}
						}

						NOT = {
							any_child = { is_female = yes }
						}
					}
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 0.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 0.35
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 0.25
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 0.15
					num_of_children >= 5
				}

				mult_modifier = { # Doesn't really matter
					factor = 0.5

					OR = {
						has_law = status_of_women_4
						has_law = true_cognatic_succession
					}
				}

				character_event = {
					id = HFP.20559
					months = 2
					random = 10
				}
			}

			# Ordering new dresses
			15 = {
				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 0.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 0.35
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 0.25
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 0.15
					num_of_children >= 5
				}

				mult_modifier = {
					factor = 0.5
					trait = temperate
				}

				mult_modifier = {
					factor = 1.5
					trait = gluttonous
				}

				mult_modifier = {
					factor = 0.25
					trait = malnourished
				}

				mult_modifier = {
					factor = 1.75
					trait = fat
				}

				mult_modifier = {
					factor = 1.5
					trait = sturdy
				}

				mult_modifier = {
					factor = 0.5
					trait = frail
				}

				character_event = {
					id = HFP.20560
					days = 80
					random = 100
				}
			}

			# Positive omen
			5 = {
				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 0.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 0.35
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 0.25
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 0.15
					num_of_children >= 5
				}

				mult_modifier = {
					factor = 1.5
					trait = zealous
				}

				mult_modifier = {
					factor = 0.5
					trait = cynical
				}

				mult_modifier = {
					factor = 1.5
					is_tribal = yes
				}

				mult_modifier = {
					factor = 1.5
					is_nomadic = yes
				}

				character_event = {
					id = HFP.20565
					days = 65
					random = 20
				}
			}

			# Negative omen
			5 = {
				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 0.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 0.35
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 0.25
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 0.15
					num_of_children >= 5
				}

				mult_modifier = {
					factor = 1.5
					trait = zealous
				}

				mult_modifier = {
					factor = 0.5
					trait = cynical
				}

				mult_modifier = {
					factor = 1.5
					is_tribal = yes
				}

				mult_modifier = {
					factor = 1.5
					is_nomadic = yes
				}

				character_event = {
					id = HFP.20567
					days = 65
					random = 20
				}
			}

			# Nothing
			15 = {
				mult_modifier = {
					factor = 0.5
					has_children = no
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 1.5
					num_of_children >= 1
				}

				mult_modifier = {
					factor = 1.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 1.5
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 1.75
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 1.8
					num_of_children >= 5
				}

				mult_modifier = {
					factor = 1.5
					practical_age >= 35
				}

				mult_modifier = {
					factor = 1.75
					practical_age >= 40
				}
			}
		}

		# Vows and sacrifices for healthy child (rulers only)
		random_list = {
			# Holy Virgin for Christians
			45 = {
				trigger = {
					is_ruler = yes
					religion_group = christian
					num_of_children < 3
					is_devil_worshiper_trigger = no
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				mult_modifier = {
					factor = 0.25
					has_children = yes
				}

				character_event = {
					id = HFP.20569
					days = 15
					random = 8
				}
			}

			# Fertility festival for baltic, norse, finnish pagans
			90 = {
				trigger = {
					OR = {
						higher_real_tier_than = COUNT
						spouse = { higher_real_tier_than = COUNT }
					}

					OR = {
						religion_openly_norse_or_reformed_trigger = yes
						religion_openly_baltic_or_reformed_trigger = yes
						religion_openly_finnish_or_reformed_trigger = yes
					}

					is_married = yes
					is_main_spouse = yes
					num_of_children < 3

					spouse = {
						OR = {
							religion_openly_norse_or_reformed_trigger = yes
							religion_openly_baltic_or_reformed_trigger = yes
							religion_openly_finnish_or_reformed_trigger = yes
						}

						is_inaccessible_or_incapable_trigger = no
					}

					NOR = {
						has_character_modifier = mother_fertility_festival_1
						has_character_modifier = mother_fertility_festival_2
						has_character_modifier = mother_festival_blessing
					}
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				mult_modifier = {
					factor = 0.25
					has_children = yes
				}

				mult_modifier = {
					factor = 1.5
					is_attractive_trigger = yes
				}

				mult_modifier = {
					factor = 1.5
					practical_age < 30
				}

				mult_modifier = {
					factor = 1.5

					OR = {
						real_tier = KING
						spouse = { real_tier = KING }
					}
				}

				mult_modifier = {
					factor = 1.75

					OR = {
						real_tier = EMPEROR
						spouse = { real_tier = EMPEROR }
					}
				}

				mult_modifier = {
					factor = 0.85
					is_ill = yes
				}

				spouse = {
					character_event = {
						id = HFP.20043
						days = 15
						random = 8
					}
				}
			}

			# Sacrifices for Pagans
			50 = {
				trigger = {
					is_ruler = yes
					religion_group = pagan_group

					OR = {
						is_tribal = yes
						is_nomadic = yes
					}
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				mult_modifier = { # If she qualifies for Fertility Festival, prioritize that instead
					factor = 0.2

					OR = {
						higher_real_tier_than = COUNT
						spouse = { higher_real_tier_than = COUNT }
					}

					OR = {
						religion_openly_norse_or_reformed_trigger = yes
						religion_openly_baltic_or_reformed_trigger = yes
						religion_openly_finnish_or_reformed_trigger = yes
					}

					is_married = yes
					is_main_spouse = yes
					num_of_children < 3

					spouse = {
						OR = {
							religion_openly_norse_or_reformed_trigger = yes
							religion_openly_baltic_or_reformed_trigger = yes
							religion_openly_finnish_or_reformed_trigger = yes
						}

						is_inaccessible_or_incapable_trigger = no
					}

					NOR = {
						has_character_modifier = mother_fertility_festival_1
						has_character_modifier = mother_fertility_festival_2
						has_character_modifier = mother_festival_blessing
					}
				}

				mult_modifier = {
					factor = 0.5
					has_children = yes
				}

				mult_modifier = {
					factor = 1.25
					trait = weak
				}

				mult_modifier = {
					factor = 1.25
					trait = frail
				}

				mult_modifier = {
					factor = 1.5
					trait = inbred
				}

				mult_modifier = {
					factor = 1.25
					trait = hunchback
				}

				mult_modifier = {
					factor = 1.25
					trait = dwarf
				}

				mult_modifier = {
					factor = 1.25
					father_even_if_dead = { trait = weak }
				}

				mult_modifier = {
					factor = 1.25
					father_even_if_dead = { trait = frail }
				}

				mult_modifier = {
					factor = 1.25
					father_even_if_dead = { trait = inbred }
				}

				mult_modifier = {
					factor = 1.25
					father_even_if_dead = { trait = hunchback }
				}

				mult_modifier = {
					factor = 1.25
					father_even_if_dead = { trait = dwarf }
				}

				character_event = {
					id = HFP.20571
					days = 15
					random = 8
				}
			}

			# Nothing
			45 = {
				mult_modifier = {
					factor = 0.5
					has_children = no
				}

				mult_modifier = {
					factor = 0.75 # Young mom is scared
					practical_age < 20
				}

				mult_modifier = {
					factor = 0.75 # Old mom is scared
					practical_age >= 37
				}

				mult_modifier = {
					factor = 1.5
					is_ill = no
				}

				mult_modifier = {
					factor = 0.75
					trait = zealous
				}

				mult_modifier = {
					factor = 1.5
					trait = cynical
				}

				mult_modifier = {
					factor = 2
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 3
					num_of_children >= 5
				}

				mult_modifier = {
					factor = 1.5
					practical_age >= 35
				}
			}
		}

		# Mother has weird cravings
		random_list = {
			# Yes
			10 = {
				mult_modifier = {
					factor = 1.5

					num_of_children < 3

					NOT = {
						any_child = {
							OR = {
								trait = harelip
								trait = ugly
								trait = clubfooted
							}
						}
					}
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				mult_modifier = {
					factor = 1.75
					trait = hedonist
				}

				mult_modifier = {
					factor = 1.5
					trait = gluttonous
				}

				mult_modifier = {
					factor = 0.35
					trait = temperate
				}

				character_event = {
					id = HFP.20573
					days = 40
					random = 10
				}
			}

			# No
			90 = {
				mult_modifier = {
					factor = 0.5
					has_children = no
				}

				mult_modifier = {
					factor = 1.75
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 2
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 3
					num_of_children >= 5
				}
			}
		}

		# Mother receives solace from...
		random_list = {
			# Other sons
			30 = {
				trigger = {
					any_child = {
						age >= 6
						is_inaccessible_or_incapable_trigger = no
					}
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				mult_modifier = {
					factor = 0.75

					NOT = {
						any_child = {
							age >= 6
							is_inaccessible_or_incapable_trigger = no
							trait = kind
						}
					}
				}

				random_child = {
					limit = {
						age >= 6
						is_inaccessible_or_incapable_trigger = no
					}

					character_event = {
						id = HFP.20574
						months = 4
						random = 20
					}
				}
			}

			# Spouse
			30 = {
				trigger = {
					any_spouse = { is_inaccessible_or_incapable_trigger = no }
				}

				mult_modifier = {
					factor = 0.75

					NOT = {
						any_spouse = {
							is_inaccessible_or_incapable_trigger = no
							trait = kind
						}
					}
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				mult_modifier = {
					factor = 0.15
					is_ruler = no
					is_main_spouse = no
				}

				mult_modifier = {
					factor = 0.25
					has_character_modifier = adulteress
				}

				mult_modifier = {
					factor = 0.25
					has_character_modifier = incestuous_adulteress
				}

				random_spouse = {
					limit = { is_inaccessible_or_incapable_trigger = no }

					character_event = {
						id = HFP.20574
						months = 4
						random = 20
					}
				}
			}

			# Lover
			30 = {
				trigger = {
					any_lover = {
						NOT = { is_married = ROOT } # Loving husbands get event above
						is_inaccessible_or_incapable_trigger = no
					}

					is_consort = no
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				random_lover = {
					limit = {
						NOT = { is_married = ROOT }
						is_inaccessible_or_incapable_trigger = no
					}

					character_event = {
						id = HFP.20575
						months = 4
						random = 20
					}
				}
			}

			# Spouse organizes Gossiping
			40 = {
				trigger = {
					is_married = yes
					is_main_spouse = yes

					spouse = {
						is_incapable = no
						prisoner = no
					}

					# Only for rulers with vassals (or spouses of rulers)
					OR = {
						is_playable = yes
						spouse = { is_playable = yes }
					}
				}

				mult_modifier = {
					factor = 0.5

					has_game_rule = {
						name = pregnancy_flavor
						value = limited
					}
				}

				# Make events less likely to become recurring at every pregnancy
				mult_modifier = {
					factor = 0.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 0.35
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 0.25
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 0.15
					num_of_children >= 5
				}

				mult_modifier = {
					factor = 1.65
					trait = gregarious
				}

				mult_modifier = {
					factor = 1.5
					practical_age < 25
				}

				mult_modifier = {
					factor = 0.25
					practical_age >= 35
				}

				mult_modifier = {
					factor = 0.1
					practical_age >= 45
				}

				spouse = {
					character_event = {
						id = HFP.20005 # Fires on husband first
						months = 4
						random = 20
					}
				}
			}

			# Nobody
			40 = {
				mult_modifier = {
					factor = 0.85
					has_children = no
				}

				mult_modifier = {
					factor = 1.25
					num_of_children >= 1
				}

				mult_modifier = {
					factor = 1.5
					num_of_children >= 2
				}

				mult_modifier = {
					factor = 1.75
					num_of_children >= 3
				}

				mult_modifier = {
					factor = 2
					num_of_children >= 4
				}

				mult_modifier = {
					factor = 3
					num_of_children >= 5
				}
			}
		}
	}
}

# First pregnancy scare
character_event = {
	id = HFP.20557
	desc = EVTDESCHFPA20557
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Pray for good health
		name = EVTOPTAHFP20557

		add_character_modifier = {
			name = mother_praying_health
			duration = -1 # Removed on birth
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 2
				trait = zealous
			}

			mult_modifier = {
				factor = 0.5
				trait = cynical
			}
		}
	}

	option = { # Rest
		name = EVTOPTBHFP20557

		add_character_modifier = {
			name = mother_resting_health
			duration = -1 # Removed on birth
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 2
				trait = temperate
			}

			mult_modifier = {
				factor = 2
				trait = shrewd
			}
		}
	}

	option = { # Go out, distract yourself
		name = EVTOPTCHFP20557

		add_character_modifier = {
			name = mother_partying_health
			duration = -1 # Removed on birth
		}

		ai_chance = {
			factor = 20

			mult_modifier = {
				factor = 2
				trait = hedonist
			}

			mult_modifier = {
				factor = 2
				trait = gregarious
			}
		}
	}
}

# Baby kicks
character_event = {
	id = HFP.20558
	desc = EVTDESCHFPA20558
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Hope he's a warrior
		name = EVTOPTAHFP20558

		custom_tooltip = { text = tooltip_hoping_child_warrior }

		random = {
			chance = 30
			add_trait_stressed_effect = yes
		}

		set_character_flag = mom_hopes_child_warrior
	}

	option = { # Rest a moment
		name = EVTOPTBHFP20558

		prestige = -50
		remove_trait_silently_stressed_effect = yes

		add_character_modifier = {
			name = mother_minor_rest
			days = 20
		}
	}
}

# Mother of one thinks about what will her next child be
character_event = {
	id = HFP.20559
	picture = GFX_evt_princess_byzantine

	desc = {
		text = EVTDESCHFPA20559
		trigger = {
			OR = {
				has_law = agnatic_succession
				has_law = cognatic_succession
			}
		}
	}
	desc = {
		text = EVTDESCHFPB20559
		trigger = {
			OR = {
				has_law = enatic_succession
				has_law = enatic_cognatic_succession
			}
		}
	}
	desc = {
		text = EVTDESCHFPC20559
		trigger = { has_law = true_cognatic_succession }
	}

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Hope he's a boy
		name = EVTOPTAHFP20559

		custom_tooltip = {
			text = tooltip_hoping_child_boy
			set_character_flag = mom_hopes_child_boy
		}

		ai_chance = { factor = 50 }
	}

	option = { # Hope he's a girl
		name = EVTOPTBHFP20559

		custom_tooltip = {
			text = tooltip_hoping_child_girl
			set_character_flag = mom_hopes_child_girl
		}

		ai_chance = { factor = 50 }
	}

	option = { # Doesn't matter
		name = EVTOPTCHFP20559

		ai_chance = { factor = 10 }
	}
}

# Mother needs new dresses
character_event = {
	id = HFP.20560
	desc = EVTDESCHFPA20560
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Eat less
		name = EVTOPTAHFP20560
		tooltip_info = gluttonous

		trigger = { trait = gluttonous }

		tiered_prestige_negative_effect = yes
		remove_trait = gluttonous
		lose_weight_small_effect = yes
		weight_trait_check_effect = yes
		clr_character_flag = gluttonous_pregnant

		random = {
			chance = 30
			add_trait_stressed_effect = yes
		}

		ai_chance = { factor = 10 }
	}

	option = { # Ask husband
		name = EVTOPTBHFP20560

		trigger = {
			is_married = yes

			spouse = {
				is_inaccessible_or_incapable_trigger = no
				is_ruler = yes
			}
		}

		spouse = {
			show_scope_change = no

			character_event = {
				id = HFP.20561
				tooltip = tooltip_ask_dress_husband
			}
		}

		ai_chance = { factor = 50 }
	}

	option = { # Buy new dresses
		name = EVTOPTCHFP20560

		trigger = { is_ruler = yes }

		scaled_wealth = -0.1
		tiered_prestige_reward_effect = yes

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = humble
			}
		}
	}

	option = { # Doesn't matter
		name = EVTOPTDHFP20560

		tiered_prestige_negative_effect = yes
		tiered_piety_reward_effect = yes
		remove_trait_silently_proud_effect = yes

		random = {
			chance = 25
			add_trait_stressed_effect = yes
		}

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 0.5
				trait = proud
			}
		}
	}
}

# Husband: pregnant wife wants new dresses
character_event = {
	id = HFP.20561
	desc = EVTDESCHFPA20561
	picture = GFX_evt_daughter_asking_father

	is_triggered_only = yes

	option = { # Flattery
		name = EVTOPTAHFP20561
		tooltip_info = diplomacy

		trigger = { diplomacy >= 10 }

		FROM = {
			show_scope_change = no

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

			character_event = { id = HFP.20562 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = quick
			}

			mult_modifier = {
				factor = 1.5
				trait = genius
			}
		}
	}

	option = { # Buy clothes for her
		name = EVTOPTBHFP20561

		scaled_wealth = -0.1

		FROM = {
			show_scope_change = no

			tiered_prestige_reward_effect = yes

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

			character_event = { id = HFP.20563 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = greedy
			}

			mult_modifier = {
				factor = 1.75
				trait = charitable
			}
		}
	}

	option = { # No
		name = EVTOPTCHFP20561

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_denied_request
				who = ROOT
				years = 5
			}

			tooltip = {
				random = {
					chance = 40
					add_trait_stressed_effect = yes
				}
			}

			character_event = { id = HFP.20564 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = charitable
			}

			mult_modifier = {
				factor = 1.75
				trait = greedy
			}
		}
	}
}

# Wife flattered by husband
character_event = {
	id = HFP.20562
	desc = EVTDESCHFPA20562
	picture = GFX_evt_lovers

	is_triggered_only = yes

	ai = no

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = {
		name = EVTOPTAHFP20562

		tooltip = {
			opinion = {
				name = opinion_flattered
				who = FROM
				years = 5
			}
		}
	}
}

# Wife gets clothes from husband
character_event = {
	id = HFP.20563
	desc = EVTDESCHFPA20563
	picture = GFX_evt_daughter_asking_father

	is_triggered_only = yes

	ai = no

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = {
		name = EVTOPTAHFP20563

		tooltip = {
			tiered_prestige_reward_effect = yes

			opinion = {
				name = opinion_flattered
				who = FROM
				years = 5
			}
		}
	}
}

# Wife doesn't get clothes from husband
character_event = {
	id = HFP.20564
	desc = EVTDESCHFPA20564
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = {
		name = EVTOPTAHFP20564

		tooltip = {
			opinion = {
				name = opinion_denied_request
				years = 5
				who = FROM
			}
		}

		random = {
			chance = 40
			add_trait_stressed_effect = yes
		}
	}
}

# Mother gets positive omen
character_event = {
	id = HFP.20565
	desc = EVTDESCHFPA20565
	picture = GFX_evt_comet

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Interpret
		name = EVTOPTAHFP20565
		tooltip_info = learning

		trigger = { learning >= 10 }

		piety = 300

		add_character_modifier = {
			name = mother_good_omen
			months = 5
		}

		spouse = { character_event = { id = HFP.20566 } }

		hidden_effect = {
			if = { # Chance of a strange positive birth
				limit = { NOT = { has_dynasty_flag = flag_vision_baby } }

				random_list = {
					90 = { } # No vision

					10 = {
						trigger = {
							OR = {
								religion_group = christian
								religion_group = muslim
								religion_openly_tengri_or_reformed_trigger = yes
								religion_openly_norse_or_reformed_trigger = yes
							}
						}

						set_dynasty_flag = flag_vision_baby # Positive

						character_event = {
							id = HFP.20503
							days = 43
							random = 20
						}
					}
				}
			}
		}

		ai_chance = { factor = 100 }
	}

	option = {
		name = EVTOPTBHFP20565

		tiered_piety_reward_effect = yes

		add_character_modifier = {
			name = mother_good_omen
			days = 100
		}

		spouse = { character_event = { id = HFP.20566 } }

		hidden_effect = {
			if = { # Chance of a strange positive birth
				limit = { NOT = { has_dynasty_flag = flag_vision_baby } }

				random_list = {
					99 = { } # No vision

					1 = {
						trigger = {
							OR = {
								religion_group = christian
								religion_group = muslim
								religion_openly_tengri_or_reformed_trigger = yes
								religion_openly_norse_or_reformed_trigger = yes
							}
						}

						set_dynasty_flag = flag_vision_baby	# Positive

						character_event = {
							id = HFP.20503
							days = 43
							random = 20
						}
					}
				}
			}
		}

		ai_chance = { factor = 50 }
	}
}

# Husband notified
character_event = {
	id = HFP.20566
	desc = EVTDESCHFPA20566
	picture = GFX_evt_comet

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20566
	}
}

# Mother gets negative omen
character_event = {
	id = HFP.20567
	desc = EVTDESCHFPA20567
	picture = GFX_evt_comet

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Interpret
		name = EVTOPTAHFP20567
		tooltip_info = learning

		trigger = { learning = 10 }

		piety = -50

		add_character_modifier = {
			name = mother_bad_omen
			days = 50
		}

		random = {
			chance = 15
			add_trait_stressed_effect = yes
		}

		spouse = { character_event = { id = HFP.20568 } }

		hidden_effect = {
			if = { # Chance of a strange bad birth
				limit = { NOT = { has_dynasty_flag = flag_vision_baby } }

				random_list = {
					99 = { } # No vision

					1 = {
						trigger = {
							OR = {
								religion_group = christian
								religion_group = muslim
								religion_openly_tengri_or_reformed_trigger = yes
								religion_openly_norse_or_reformed_trigger = yes
							}
						}

						set_dynasty_flag = flag_vision_baby # Negative

						character_event = {
							id = HFP.20504
							days = 33
							random = 20
						}
					}
				}
			}
		}

		ai_chance = { factor = 100 }
	}

	option = {
		name = EVTOPTBHFP20567

		tiered_piety_negative_effect = yes

		add_character_modifier = {
			name = mother_bad_omen
			days = 100
		}

		random = {
			chance = 30
			add_trait_stressed_effect = yes
		}

		spouse = { character_event = { id = HFP.20568 } }

		hidden_effect = {
			if = { # Chance of a strange bad birth.
				limit = { NOT = { has_dynasty_flag = flag_vision_baby } }

				random_list = {
					90 = { } # No vision

					10 = {
						trigger = {
							OR = {
								religion_group = christian
								religion_group = muslim
								religion_openly_tengri_or_reformed_trigger = yes
								religion_openly_norse_or_reformed_trigger = yes
							}
						}

						set_dynasty_flag = flag_vision_baby # Negative

						character_event = {
							id = HFP.20504
							days = 33
							random = 20
						}
					}
				}
			}
		}

		ai_chance = { factor = 50 }
	}
}

# Husband notified
character_event = {
	id = HFP.20568
	desc = EVTDESCHFPA20568
	picture = GFX_evt_comet

	is_triggered_only = yes

	option = { # Reinterpret the signs
		name = EVTOPTAHFP20568
		tooltip_info = learning

		trigger = { learning >= 10 }

		FROM = {
			show_scope_change = no

			hidden_effect = { # Remove the older one first
				remove_character_modifier = mother_bad_omen
			}

			add_character_modifier = {
				name = mother_bad_omen
				days = 50
			}
		}
	}

	option = {
		name = {
			text = EVTOPTBHFP20568_A
			trigger = { is_lover = FROM }
		}
		name = {
			text = EVTOPTBHFP20568_B
			trigger = {
				NOT = { is_lover = FROM }
			}
		}

		if = {
			limit = { is_lover = FROM }

			random = {
				chance = 30
				add_trait_stressed_effect = yes
			}
		}

		tooltip = {
			FROM = {
				show_scope_change = no

				add_character_modifier = {
					name = mother_bad_omen
					days = 100
				}

				random = {
					chance = 30
					add_trait_silently_stressed_effect = yes
				}
			}
		}
	}
}

# Christian Mother can make vow to the Holy Virgin
character_event = {
	id = HFP.20569
	desc = EVTDESCHFPA20569
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	religion_group = christian

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = {
		name = EVTOPTAHFP20569

		character_event = {
			id = HFP.20570 # Pick one
			tooltip = tooltip_mary_vow
		}

		ai_chance = {
			factor = 80

			mult_modifier = {
				factor = 0.35
				trait = cynical
			}
		}
	}

	option = { # No
		name = EVTOPTBHFP20569

		if = {
			limit = { trait = cynical }

			tiered_piety_negative_effect = yes
			tiered_prestige_reward_effect = yes
		}
		else = {
			random = {
				chance = 50
				add_trait_partially_cynical_effect = yes
			}
		}

		ai_chance = {
			factor = 20

			mult_modifier = {
				factor = 0.5
				trait = zealous
			}
		}
	}
}

# Holy Virgin: What vow are you going to take?
character_event = {
	id = HFP.20570
	desc = EVTDESCHFPA20570
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	# Chastity
	# Humility
	# Charity
	# Temperance

	option = {
		name = EVTOPTAHFP20570

		custom_tooltip = {
			text = tooltip_vow_chastity

			add_character_modifier = {
				name = mother_vow_chastity
				duration = -1 # Removed post-birth
			}
		}

		random = {
			chance = 25
			remove_trait_lustful_effect = yes
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = lustful
			}
		}
	}

	option = {
		name = EVTOPTBHFP20570

		custom_tooltip = {
			text = tooltip_vow_humility

			add_character_modifier = {
				name = mother_vow_humility
				duration = -1 # Removed post-birth
			}
		}

		random = {
			chance = 25
			remove_trait_proud_effect = yes
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = proud
			}
		}
	}

	option = {
		name = EVTOPTCHFP20570

		custom_tooltip = {
			text = tooltip_vow_charity

			add_character_modifier = {
				name = mother_vow_charity
				duration = -1 # Removed post-birth
			}
		}

		random = {
			chance = 25
			remove_trait_greedy_effect = yes
		}

		ai_chance = {
			factor = 50

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

	option = {
		name = EVTOPTDHFP20570

		custom_tooltip = {
			text = tooltip_vow_temperance

			add_character_modifier = {
				name = mother_vow_temperance
				duration = -1 # Removed post-birth
			}
		}

		lose_weight_medium_effect = yes
		weight_trait_check_effect = yes

		random = {
			chance = 25
			remove_trait_gluttonous_effect = yes
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = gluttonous
			}
		}
	}
}

# Pagan Mother can go offer sacrifice to the gods for healthy child
character_event = {
	id = HFP.20571
	desc = EVTDESCHFPA20571
	picture = GFX_evt_pagan
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	religion_group = pagan_group

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	option = {
		name = EVTOPTAHFP20571

		character_event = {
			id = HFP.20572 # Pick one
			days = 3
			tooltip = tooltip_pagan_mom_sacrifice
		}

		scaled_wealth = {
			value = -1
			min = -5
			max = -50
		}

		add_character_modifier = {
			name = mother_exposed_to_elements
			months = 2
		}

		ai_chance = {
			factor = 70

			trigger = {
				NOT = { trait = in_hiding }
			}

			mult_modifier = {
				factor = 0.35
				trait = cynical
			}

			mult_modifier = {
				factor = 0.5
				trait = craven
			}

			mult_modifier = {
				factor = 0.5
				trait = paranoid
			}

			mult_modifier = {
				factor = 0.5
				trait = frail
			}

			mult_modifier = {
				factor = 0.5
				is_ill = yes
			}
		}
	}

	option = { # No
		name = EVTOPTBHFP20571

		if = {
			limit = { trait = cynical }

			tiered_piety_negative_effect = yes
			tiered_prestige_reward_effect = yes
		}
		else = {
			random = {
				chance = 50
				add_trait_partially_cynical_effect = yes
			}
		}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 0.5
				trait = zealous
			}
		}
	}
}

# Pagan sacrifice: what are you wishing for?
character_event = {
	id = HFP.20572
	desc = EVTDESCHFPA20572
	picture = GFX_evt_mysterious_forest
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	# Strong child
	# Beautiful child
	# Bright child

	option = {
		name = EVTOPTAHFP20572

		custom_tooltip = {
			text = tooltip_mom_hopes_strong
			set_character_flag = mom_hopes_child_strong
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = strong
			}

			mult_modifier = {
				factor = 0.5
				trait = brawny
			}
		}
	}

	option = {
		name = EVTOPTBHFP20572

		custom_tooltip = {
			text = tooltip_mom_hopes_pretty
			set_character_flag = mom_hopes_child_pretty
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = attractive
			}
		}
	}

	option = {
		name = EVTOPTCHFP20572

		custom_tooltip = {
			text = tooltip_mom_hopes_smart
			set_character_flag = mom_hopes_child_smart
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = slow
			}

			mult_modifier = {
				factor = 0.25
				trait = imbecile
			}
		}
	}
}

# Mother has weird cravings
character_event = {
	id = HFP.20573
	desc = EVTDESCHFPA20573
	picture = GFX_evt_fancy_feast

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }
	}

	# Everything
	# Quail's leg
	# Hare's head
	# Trout's eye

	option = {
		name = EVTOPTAHFP20573
		tooltip_info = gluttonous

		trigger = {
			is_ruler = yes
			trait = gluttonous
		}

		custom_tooltip = { text = tooltip_mother_craved_all }
		gain_weight_small_effect = yes
		weight_trait_check_effect = yes
		tiered_prestige_reward_effect = yes
		scaled_wealth = -0.05

		add_character_modifier = {
				name = well_fed
				years = 2
		}

		if = {
			limit = { NOT = { has_character_flag = gluttonous_pregnant } }
			character_event = { id = HFP.20441 days = 15 random = 10 } # Confirmation.
			character_event = { id = HFP.20421 days = 200 } # Post-pregnancy recovery.
		}

		ai_chance = { factor = 50 }
	}

	option = {
		name = EVTOPTAHFP20573

		trigger = {
			is_ruler = yes
			NOT = { trait = gluttonous }
		}

		custom_tooltip = { text = tooltip_mother_craved_all }

		random = {
			chance = 20
			add_trait_gluttonous_effect = yes
		}

		tiered_prestige_reward_effect = yes

		scaled_wealth = {
			value = -0.05
			min = -5
			max = -100
		}

		add_character_modifier = {
			name = well_fed
			years = 2
		}

		ai_chance = { factor = 50 }
	}

	option = { # Quail's leg
		name = EVTOPTBHFP20573

		trigger = { is_ruler = yes }

		custom_tooltip = {
			text = tooltip_mother_craved_quail
			set_character_flag = mother_craved_quail
		}

		scaled_wealth = {
			value = -0.01
			min = -1
			max = -30
		}

		ai_chance = { factor = 20 }
	}

	option = { # Hare's head
		name = EVTOPTCHFP20573

		trigger = { is_ruler = yes }

		custom_tooltip = {
			text = tooltip_mother_craved_hare
			set_character_flag = mother_craved_hare
		}

		scaled_wealth = {
			value = -0.01
			min = -1
			max = -30
		}

		ai_chance = { factor = 20 }
	}

	option = { # Trout's eye
		name = EVTOPTDHFP20573

		trigger = { is_ruler = yes }

		custom_tooltip = {
			text = tooltip_mother_craved_trout
			set_character_flag = mother_craved_trout
		}

		scaled_wealth = {
			value = -0.01
			min = -1
			max = -30
		}

		ai_chance = { factor = 20 }
	}

	option = { # Useless courtier needs to ask her husband (if she has any)
		name = EVTOPTEHFP20573

		trigger = {
			is_ruler = no
			is_main_spouse = yes # Prevent concubine spamming
		}

		spouse = {
			character_event = { id = HFP.20596 }
		}
	}

	option = { # Useless courtier is not even the main wife and does nothing
		name = EVTOPTEHFP20573

		trigger = {
			is_ruler = no
			is_main_spouse = no
		}
	}
}

# Spouse: Mother has weird cravings
character_event = {
	id = HFP.20596
	desc = EVTDESCHFPA20596
	picture = GFX_evt_fancy_feast

	is_triggered_only = yes

	only_rulers = yes

	trigger = {
		FROM = {
			is_married = ROOT
			is_alive = yes
		}
	}

	# Everything
	# Quail's leg
	# Hare's head
	# Trout's eye

	option = {
		name = EVTOPTAHFP20596

		trigger = {
			NOT = { trait = greedy }
		}

		custom_tooltip = { text = tooltip_father_gave_all }

		scaled_wealth = -0.05

		FROM = {
			show_scope_change = no

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

			gain_weight_small_effect = yes
			weight_trait_check_effect = yes

			if = {
				limit = { NOT = { has_character_flag = gluttonous_pregnant } }

				character_event = { id = HFP.20441 days = 15 random = 10 } # Confirmation
				character_event = { id = HFP.20421 days = 200 } # Post-pregnancy recovery
			}

			random = {
				chance = 40
				add_trait_fully_gluttonous_effect = yes
			}

			add_character_modifier = {
				name = well_fed
				years = 2
			}
		}

		ai_chance = { factor = 20 }
	}

	option = { # Quail's leg
		name = EVTOPTBHFP20596

		custom_tooltip = { text = tooltip_father_gave_quail }

		scaled_wealth = -0.01
		FROM = { set_character_flag = mother_craved_quail }

		ai_chance = { factor = 20 }
	}

	option = { # Hare's head
		name = EVTOPTCHFP20596

		custom_tooltip = { text = tooltip_father_gave_hare }

		scaled_wealth = -0.01
		FROM = { set_character_flag = mother_craved_hare }

		ai_chance = { factor = 20 }
	}

	option = { # Trout's eye
		name = EVTOPTDHFP20596

		custom_tooltip = { text = tooltip_father_gave_trout }

		scaled_wealth = -0.01
		FROM = { set_character_flag = mother_craved_trout }

		ai_chance = { factor = 20 }
	}

	option = {
		name = EVTOPTEHFP20596
		tooltip_info = greedy

		trigger = { trait = greedy }

		FROM = {
			show_scope_change = no

			random = {
				chance = 30
				add_trait_stressed_effect = yes
			}

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

		ai_chance = { factor = 70 }
	}
}

# Son/Spouse: chance to offer solace to pregnant mother/wife
character_event = {
	id = HFP.20574
	picture = GFX_evt_bad_news_female

	desc = {
		text = EVTDESCHFPA20574
		trigger = {
			NOT = { is_married = FROM }
			is_adult = no
		}
	}
	desc = {
		text = EVTDESCHFPB20574
		trigger = {
			NOT = { is_married = FROM }
			is_adult = yes
		}
	}
	desc = {
		text = EVTDESCHFPC20574
		trigger = {
			FROM = {
				is_married = ROOT

				NOR = {
					has_character_modifier = adulteress
					has_character_modifier = incestuous_adulteress
				}
			}
		}
	}
	desc = {
		text = EVTDESCHFPD20574
		trigger = {
			FROM = {
				is_married = ROOT

				OR = {
					has_character_modifier = adulteress
					has_character_modifier = incestuous_adulteress
				}
			}
		}
	}

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = pregnant
			is_alive = yes
			is_pilgrim = no

			OR = {
				is_married = ROOT
				is_mother = ROOT
			}
		}
	}

	option = { # Buy something (spouse)
		name = EVTOPTAHFP20574

		trigger = { is_married = FROM }

		FROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20576
				tooltip = tooltip_buy_to_woman
			}

			tooltip = {
				add_character_modifier = {
					name = mother_comforted
					months = 2
					stacking = yes
				}
			}
		}

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

		random = {
			chance = 15
			add_trait_fully_charitable_effect = yes
		}

		random = {
			chance = 5
			add_trait_fully_kind_effect = yes
		}

		ai_chance = {
			factor = 60

			mult_modifier = {
				factor = 0.1
				is_rival = FROM
			}
		}
	}

	option = { # Spend time
		name = EVTOPTBHFP20574

		trigger = {
			OR = {
				is_child_of = FROM
				is_lover = FROM
			}
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20578
				tooltip = tooltip_spend_time_woman
			}

			tooltip = {
				add_character_modifier = {
					name = mother_comforted
					months = 1
					stacking = yes
				}
			}
		}

		random = {
			chance = 5
			add_trait_fully_kind_effect = yes
		}

		ai_chance = {
			factor = 70

			mult_modifier = {
				factor = 0.1
				is_rival = FROM
			}
		}
	}

	option = { # Do not do anything
		name = {
			text = EVTOPTCHFP20574
			trigger = {
				FROM = {
					NOR = {
						has_character_modifier = adulteress
						has_character_modifier = incestuous_adulteress
					}
				}
			}
		}
		name = {
			text = EVTOPTCHFP20574_B
			trigger = {
				FROM = {
					OR = {
						has_character_modifier = adulteress
						has_character_modifier = incestuous_adulteress
					}
				}
			}
		}

		tiered_piety_negative_effect = yes

	#	random = {
	#		chance = 5
	#		add_trait_fully_cruel_effect = yes
	#	}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 1.75
				trait = shy
			}

			mult_modifier = {
				factor = 1.75
				trait = greedy
			}

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

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

			mult_modifier = {
				factor = 0.5
				FROM = { trait = hard_pregnancy }
			}

			mult_modifier = {
				factor = 0.1
				is_friend = FROM
			}

			mult_modifier = {
				factor = 0.1
				is_lover = FROM
			}

			mult_modifier = {
				factor = 1.75

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

# Lover: Chance to visit pregnant lover in secret
character_event = {
	id = HFP.20575
	picture = GFX_evt_bad_news_female

	desc = {
		text = EVTDESCHFPA20575
		trigger = { is_female = no }
	}
	desc = {
		text = EVTDESCHFPB20575
		trigger = { is_female = yes }
	}

	is_triggered_only = yes

	trigger = {
		FROM = {
			is_lover = ROOT
			trait = pregnant
			is_alive = yes
			is_pilgrim = no
		}
	}

	option = { # Visit
		name = EVTOPTAHFP20575

		FROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20580
				tooltip = tooltip_visit_lover
			}

			tooltip = {
				add_character_modifier = {
					name = mother_comforted
					months = 1
					stacking = yes
				}
			}
		}

		ai_chance = {
			factor = 70

			mult_modifier = {
				factor = 1.5
				trait = brave
			}

			mult_modifier = {
				factor = 1.5
				trait = lustful
			}
		}
	}

	option = { # No
		name = EVTOPTBHFP20575

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 1.75
				trait = shy
			}

			mult_modifier = {
				factor = 1.75
				trait = paranoid
			}

			mult_modifier = {
				factor = 2
				trait = craven
			}
		}
	}
}

# Mother: Spouse gives presents to make you feel better
character_event = {
	id = HFP.20576
	desc = EVTDESCHFPA20576
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		is_married = FROM
		NOT = { trait = troubled_pregnancy }
		FROM = { is_alive = yes }
	}

	option = { # Chance for lover
		name = EVTOPTAHFP20576
		tooltip_info = trusting

		trigger = {
			trait = trusting
			NOT = { is_lover = FROM }
		}

		add_lover = FROM
		remove_trait_silently_stressed_effect = yes

		add_character_modifier = {
			name = mother_comforted
			months = 2
			stacking = yes
		}

		FROM = {
			character_event = { id = HFP.20577 }
		}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 1.5
				trait = lustful
			}

			mult_modifier = {
				factor = 0.5
				trait = chaste
			}

			mult_modifier = {
				factor = 0.5
				trait = shy
			}
		}
	}

	option = {
		name = EVTOPTBHFP20576

		add_character_modifier = {
			name = mother_comforted
			months = 2
			stacking = yes
		}

		ai_chance = {
			factor = 70

			mult_modifier = {
				factor = 1.5
				trait = greedy
			}

			mult_modifier = {
				factor = 1.5
				trait = paranoid
			}
		}
	}
}

# Notify spouse that woman has fallen in love with him
character_event = {
	id = HFP.20577
	desc = EVTDESCHFPA20577
	picture = GFX_evt_lovers

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20577

		tooltip = {
			add_lover = FROM
		}
	}
}

# Mother: Loving husband/child spends time with her
character_event = {
	id = HFP.20578
	picture = GFX_evt_princess_byzantine

	desc = {
		text = EVTDESCHFPA20578
		trigger = {
			FROM = {
				is_adult = no
				NOT = { is_married = ROOT }
			}
		}
	}
	desc = {
		text = EVTDESCHFPB20578
		trigger = {
			FROM = {
				is_adult = yes
				NOT = { is_married = ROOT }
			}
		}
	}
	desc = {
		text = EVTDESCHFPC20578
		trigger = { is_married = FROM }
	}

	is_triggered_only = yes

	trigger = {
		trait = pregnant
		NOT = { trait = troubled_pregnancy }

		FROM = {
			OR = {
				is_married = ROOT
				is_child_of = ROOT
			}

			is_alive = yes
		}
	}

	option = { # Chance for mother becoming child's friend
		name = EVTOPTAHFP20578

		trigger = {
			num_of_friends < 3

			NOR = {
				is_married = FROM
				is_friend = FROM
				is_rival = FROM
			}
		}

		add_friend = FROM
		remove_trait_silently_stressed_effect = yes

		add_character_modifier = {
			name = mother_comforted
			months = 1
			stacking = yes
		}

		FROM = {
			character_event = { id = HFP.20579 }
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = gregarious
			}

			mult_modifier = {
				factor = 0.5
				trait = cruel
			}

			mult_modifier = {
				factor = 0.5
				trait = shy
			}
		}
	}

	option = {
		name = EVTOPTBHFP20578

		add_character_modifier = {
			name = mother_comforted
			months = 1
			stacking = yes
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = kind
			}

			mult_modifier = {
				factor = 1.5
				trait = paranoid
			}
		}
	}
}

# Notify child that mother loves him
character_event = {
	id = HFP.20579
	picture = GFX_evt_princess_byzantine

	desc = {
		text = EVTDESCHFPA20579
		trigger = { is_adult = no }
	}
	desc = {
		text = EVTDESCHFPB20579
		trigger = { is_adult = yes }
	}

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20579

		tooltip = {
			add_friend = FROM
		}
	}
}

# Mother is visited by lover
character_event = {
	id = HFP.20580
	desc = EVTDESCHFPA20580
	picture = GFX_evt_lovers

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20580

		if = {
			limit = { trait = depressed }

			remove_trait = depressed
			clr_character_flag = depressed_pregnant
		}

		add_character_modifier = {
			name = mother_comforted
			months = 1
			stacking = yes
		}
	}
}

#################### Post-birth notifications ######################

# Mother recovers from stress after pregnancy
character_event = {
	id = HFP.20581
	desc = EVTDESCHFPA20581
	picture = GFX_evt_recovery

	is_triggered_only = yes

	trigger = {
		trait = stressed

		FROM = {
			is_alive = yes
			NOT = { trait = sickly } # Baby needs to be alive and well for mother to feel relieved
		}
	}

	immediate = {
		remove_trait = stressed
	}

	option = {
		name = EVTOPTAHFP20581

		tooltip = {
			remove_trait = stressed
		}
	}
}

# Mother craved for quail's leg: child is good at talking but clubfooted
character_event = {
	id = HFP.20582
	desc = EVTDESCHFPA20582
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = clubfooted
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHFP20582

		FROM = {
			show_scope_change = no

			change_diplomacy = 2
		}
	}
}

# Mother craved for hare's head: child is good at spying but harelipped
character_event = {
	id = HFP.20583
	desc = EVTDESCHFPA20583
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = harelip
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHFP20583

		FROM = {
			show_scope_change = no

			change_intrigue = 2
		}
	}
}

# Mother craved for trout's eye: child is good at learning but ugly
character_event = {
	id = HFP.20584
	desc = EVTDESCHFPA20584
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = ugly
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHFP20584

		FROM = {
			show_scope_change = no

			change_learning = 2
		}
	}
}

# Mother hoped for a warrior and she got one
character_event = {
	id = HFP.20585
	desc = EVTDESCHFPA20585
	picture = GFX_evt_birth

	is_triggered_only = yes

	trigger = {
		FROM = {
			is_alive = yes

			NOR = {
				trait = weak
				trait = frail
				trait = inbred
				trait = hunchback
				trait = dwarf
				trait = sickly
			}
		}
	}

	option = {
		name = EVTOPTAHFP20585

		FROM = {
			show_scope_change = no

			change_martial = 2
		}

		tiered_prestige_reward_effect = yes
	}
}

# Mother sacrificed to gods for strong kid and got one
character_event = {
	id = HFP.20586
	desc = EVTDESCHFPA20586
	picture = GFX_evt_birth
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = strong
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHFP20586

		tiered_piety_reward_effect = yes
	}
}

# Mother sacrificed to gods for pretty kid and got one
character_event = {
	id = HFP.20587
	desc = EVTDESCHFPA20587
	picture = GFX_evt_birth
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = attractive
			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHFP20587

		tiered_piety_reward_effect = yes
	}
}

# Mother sacrificed to gods for smart kid and got one
character_event = {
	id = HFP.20588
	desc = EVTDESCHFPA20588
	picture = GFX_evt_birth
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		FROM = {
			OR = {
				trait = quick
				trait = genius
			}

			is_alive = yes
		}
	}

	option = {
		name = EVTOPTAHFP20588

		tiered_piety_reward_effect = yes
	}
}

# Mother wanted a boy/girl and she got a...
character_event = {
	id = HFP.20589
	picture = GFX_evt_birth

	desc = {
		text = EVTDESCHFPA20589
		trigger = { has_character_flag = mom_hope_fulfilled }
	}
	desc = {
		text = EVTDESCHFPB20589
		trigger = { has_character_flag = mom_hope_unfulfilled }
	}

	is_triggered_only = yes

	trigger = {
		FROM = { is_alive = yes }
	}

	immediate = {
		if = {
			limit = {
				trigger_if = {
					limit = { has_character_flag = mom_hopes_child_boy }
					FROM = { is_female = no }
				}
				trigger_else = {
					FROM = { is_female = yes }
				}
			}

			set_character_flag = mom_hope_fulfilled
		}
		else = {
			set_character_flag = mom_hope_unfulfilled
		}
	}

	option = { # Success
		name = EVTOPTAHFP20589

		trigger = { has_character_flag = mom_hope_fulfilled }

		tiered_prestige_reward_effect = yes

		opinion = {
			name = opinion_kind
			who = FROM
			years = 40
		}
	}

	option = { # Failure - But still likes child
		name = EVTOPTBHFP20589
		tooltip_info = kind

		trigger = {
			has_character_flag = mom_hope_unfulfilled
			trait = kind
		}

		tiered_prestige_negative_effect = yes
	}

	option = { # Failure
		name = EVTOPTCHFP20589

		trigger = {
			has_character_flag = mom_hope_unfulfilled
			NOT = { trait = kind }
		}

		tiered_prestige_negative_effect = yes

		opinion = {
			name = opinion_dislike
			who = FROM
			years = 40
		}
	}

	after = {
		clr_character_flag = mom_hopes_child_boy
		clr_character_flag = mom_hopes_child_girl
		clr_character_flag = mom_hope_fulfilled
		clr_character_flag = mom_hope_unfulfilled
	}
}

# Mother made vow to the Holy Virgin, if child is healthy, time to pay up
character_event = {
	id = HFP.20590
	picture = GFX_evt_virgin_mary_icon
	border = GFX_event_normal_frame_religion

	desc = { # Success - Child is alive and healthy
		text = EVTDESCHFPA20590
		trigger = {
			FROM = {
				is_alive = yes

				NOR = {
					trait = sickly
					trait = inbred
					trait = harelip
					trait = clubfooted
					trait = hunchback
					trait = lisp
					trait = stutter
					trait = ugly
					trait = dwarf
					trait = slow
					trait = imbecile
					trait = weak
				}
			}
		}
	}
	desc = { # Failure - Child was born but is not healthy
		text = EVTDESCHFPB20590
		trigger = {
			FROM = {
				is_alive = yes

				OR = {
					trait = sickly
					trait = inbred
					trait = harelip
					trait = clubfooted
					trait = hunchback
					trait = lisp
					trait = stutter
					trait = ugly
					trait = dwarf
					trait = slow
					trait = imbecile
					trait = weak
				}
			}
		}
	}
	desc = { # Critical failure - the child is dead
		text = EVTDESCHFPC20590
		trigger = { FROM = { is_alive = no } }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20590

		trigger = {
			FROM = {
				is_alive = yes

				NOR = {
					trait = sickly
					trait = inbred
					trait = harelip
					trait = clubfooted
					trait = hunchback
					trait = lisp
					trait = stutter
					trait = ugly
					trait = dwarf
					trait = slow
					trait = imbecile
					trait = weak
				}
			}
		}

		if = {
			limit = { has_character_modifier = mother_vow_chastity }

			remove_character_modifier = mother_vow_chastity

			if = {
				limit = { trait = chaste }
				remove_trait = chaste

				if = {
					limit = { NOT = { trait = celibate } }
					add_trait = celibate
				}

				piety = 200
			}
			else_if = {
				limit = { trait = lustful }
				remove_trait = lustful
			}
			else = {
				add_trait = chaste
				piety = 100
			}
		}
		else_if = {
			limit = { has_character_modifier = mother_vow_humility }

			remove_character_modifier = mother_vow_humility

			if = {
				limit = { trait = humble }

				add_trait_fully_silently_content_effect = yes
				piety = 200
			}
			else_if = {
				limit = { trait = proud }
				remove_trait = proud
			}
			else = {
				add_trait = humble
				piety = 100
			}
		}
		else_if = {
			limit = { has_character_modifier = mother_vow_charity }

			remove_character_modifier = mother_vow_charity

			if = {
				limit = { trait = charitable }
				wealth = -100
				piety = 300
			}
			else_if = {
				limit = { trait = greedy }
				remove_trait = greedy
			}
			else = {
				add_trait = charitable
				piety = 100
			}
		}
		else_if = {
			limit = { has_character_modifier = mother_vow_temperance }

			remove_character_modifier = mother_vow_temperance

			if = {
				limit = { trait = temperate }
				# More later
				piety = 200
			}
			else_if = {
				limit = { trait = gluttonous }
				remove_trait = gluttonous
				lose_weight_small_effect = yes
				weight_trait_check_effect = yes
			}
			else = {
				add_trait = temperate
				piety = 100
				lose_weight_small_effect = yes
				weight_trait_check_effect = yes
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.25

				has_character_modifier = mother_vow_chastity
				trait = lustful
			}

			mult_modifier = {
				factor = 0.25

				has_character_modifier = mother_vow_charity
				trait = greedy
			}

			mult_modifier = {
				factor = 0.25

				has_character_modifier = mother_vow_temperance
				trait = gluttonous
			}

			mult_modifier = {
				factor = 0.25

				has_character_modifier = mother_vow_humility
				trait = proud
			}
		}
	}

	option = { # No, I won't keep my vow
		name = EVTOPTBHFP20590

		trigger = {
			FROM = {
				is_alive = yes

				NOR = {
					trait = sickly
					trait = inbred
					trait = harelip
					trait = clubfooted
					trait = hunchback
					trait = lisp
					trait = stutter
					trait = ugly
					trait = dwarf
					trait = slow
					trait = imbecile
					trait = weak
				}
			}
		}

		tiered_piety_negative_effect = yes

		trigger_switch = {
			on_trigger = has_character_modifier

			mother_vow_chastity   = { remove_character_modifier = mother_vow_chastity }
			mother_vow_temperance = { remove_character_modifier = mother_vow_temperance }
			mother_vow_charity    = { remove_character_modifier = mother_vow_charity }
			mother_vow_humility   = { remove_character_modifier = mother_vow_humility }
		}

		hidden_effect = {
			random = {
				chance = 15

				# The Virgin strikes son with sickness
				FROM = { character_event = { id = 6063 days = 25 } }
				character_event = { id = HFP.20591 days = 27 } # Notify
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 3
				trait = cynical
			}
		}
	}

	option = { # Child is not well or is dead, vow was useless
		name = EVTOPTCHFP20590

		trigger = {
			FROM = {
				OR = {
					is_alive = no
					trait = sickly
					trait = inbred
					trait = harelip
					trait = clubfooted
					trait = hunchback
					trait = lisp
					trait = stutter
					trait = ugly
					trait = dwarf
					trait = slow
					trait = imbecile
					trait = weak
				}
			}
		}

		tiered_piety_negative_effect = yes

		trigger_switch = {
			on_trigger = has_character_modifier

			mother_vow_chastity = { remove_character_modifier = mother_vow_chastity }
			mother_vow_temperance = { remove_character_modifier = mother_vow_temperance }
			mother_vow_charity = { remove_character_modifier = mother_vow_charity }
			mother_vow_humility = { remove_character_modifier = mother_vow_humility }
		}
	}
}

# Mother: you broke your vow and now your child is sick
character_event = {
	id = HFP.20591
	desc = EVTDESCHFPA20591
	picture = GFX_evt_bad_news_female
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20591

		tiered_piety_negative_effect = yes

		random = {
			chance = 25
			add_trait_depressed_effect = yes
		}
	}
}

# on_adulthood: Hidden event to determine if child of troubled birth will talk to mother about the event
character_event = {
	id = HFP.20592

	is_triggered_only = yes # on_adulthood
	hide_window = yes

	has_character_flag = flag_troubled_pregnancy_child

	trigger = {
		mother = {
			is_alive = yes
			is_incapable = no
			prisoner = no
		}
	}

	immediate = {
		character_event = {
			id = HFP.20594
			days = 30
			random = 30
		}
	}
}

# Child of troubled birth: approach mother about subject?
character_event = {
	id = HFP.20594
	desc = EVTDESCHFPA20594
	picture = GFX_evt_son_asking_father
	portrait = mother

	is_triggered_only = yes

	trigger = {
		mother = {
			is_alive = yes
			is_incapable = no
			prisoner = no
		}
	}

	immediate = {
		clr_character_flag = flag_troubled_pregnancy_child
	}

	option = {
		name = EVTOPTAHFP20594

		character_event = {
			id = HFP.20595
			tooltip = tooltip_troubled_child_talks
		}

		tooltip = {
			reverse_opinion = {
				name = opinion_kind
				who = mother
				years = 15
			}
		}

		if = {
			limit = { trait = kind }
			piety = 100
		}
		else = {
			random = {
				chance = 20
				add_trait_fully_kind_effect = yes
			}
		}

		ai_chance = { factor = 70 }
	}

	option = {
		name = EVTOPTBHFP20594

		if = {
			limit = { trait = cruel }
			tiered_prestige_reward_effect = yes
		}
		else = {
			random = {
				chance = 20
				add_trait_fully_cruel_effect = yes
			}
		}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 2
				trait = slow
			}

			mult_modifier = {
				factor = 3
				trait = imbecile
			}

			mult_modifier = {
				factor = 3
				trait = cruel
			}

			mult_modifier = {
				factor = 0.5
				trait = kind
			}
		}
	}
}

# Mother is grateful for the child's kindness
character_event = {
	id = HFP.20595
	desc = EVTDESCHFPA20595
	picture = GFX_evt_son_asking_father

	is_triggered_only = yes

	option = {
		name = EVTOPTBHFP20595

		tiered_prestige_reward_effect = yes

		opinion = {
			name = opinion_kind
			who = FROM
			years = 15
		}
	}
}

# id 20596 taken by husband version of weird cravings

# Clean up event 35 days post-birth to clear all persistent event targets
character_event = {
	id = HFP.20597

	is_triggered_only = yes
	hide_window = yes

	immediate = {
		clear_persistent_event_target = pregnancy_mother_physician_per
		clear_persistent_event_target = pregnancy_spouse_physician_per
		clear_persistent_event_target = pregnancy_regent_physician_per
	}
}

# Mother thinks about her son/daughter being the son/daughter of the Pope
character_event = {
	id = HFP.20598
	desc = EVTDESCHFPA20598
	picture = GFX_evt_pope_feast

	is_triggered_only = yes

	religion = catholic # TODO: Should this also include Fraticelli characters as well?

	trigger = {
		FROM = {
			is_alive = yes
			religion = catholic

			OR = {
				trait = bastard
				trait = legit_bastard
			}
		}
	}

	option = {
		name = EVTOPTBHFP20598

		FROM = {
			show_scope_change = no

			if = {
				limit = { is_female = no }
				give_nickname = nick_the_vatican_prince
			}
			else = {
				give_nickname = nick_the_vatican_princess
			}
		}

		trigger_switch = {
			on_trigger = real_tier

			COUNT = {
				FROM = {
					show_scope_change = no

					prestige = 100
					piety = -100
				}
			}

			DUKE = {
				FROM = {
					show_scope_change = no

					prestige = 150
					piety = -150
				}
			}

			KING = {
				FROM = {
					show_scope_change = no

					prestige = 300
					piety = -300
				}
			}

			EMPEROR = {
				FROM = {
					show_scope_change = no

					prestige = 500
					piety = -500
				}
			}
		}
	}
}

# delayed from on_birth event. Mother develops bond with child.
character_event = {
	id = HFP.20599
	picture = GFX_evt_birth

	desc = {
		text = EVTDESCHFPA20599
		trigger = {
			NOR = {
				has_character_flag = survivor_mom
				trait = kind
			}
		}
	}
	desc = {
		text = EVTDESCHFPB20599
		trigger = {
			trait = kind
			NOT = { has_character_flag = survivor_mom }
		}
	}
	desc = {
		text = EVTDESCHFPC20599
		trigger = {
			has_character_flag = survivor_mom
			NOT = { trait = kind }
		}
	}
	desc = {
		text = EVTDESCHFPD20599
		trigger = {
			has_character_flag = survivor_mom
			trait = kind
		}
	}

	is_triggered_only = yes

	only_capable = yes
	prisoner = no

	trigger = {
		FROM = {
			is_alive = yes
			prisoner = no
			is_incapable = no
			NOT = { trait = sickly }

			OR = {
				host = { character = ROOT }
				at_location = ROOT
				educator = { character = ROOT }
			}
		}
	}

	option = { # In love
		name = EVTOPTAHFP20599

		trigger = {
			NOT = { trait = cruel }
		}

		custom_tooltip = {
			text = tooltip_20599_A

			FROM = { health = 0.2 }
			gain_weight_small_effect = yes
		}

		add_character_modifier = {
			name = breastfeeding_infant
			years = 2
		}

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

		FROM = {
			show_scope_change = no

			random_list = {
				20 = { change_diplomacy = 1 }
				20 = { change_martial = 1 }
				20 = { change_stewardship = 1 }
				20 = { change_intrigue = 1 }
				20 = { change_learning = 1 }
			}
		}

		random = {
			chance = 30

			if = {
				limit = { trait = kind }
				piety = 25
			}
			else = {
				add_trait_fully_kind_effect = yes
			}
		}

		ai_chance = { factor = 50 }
	}

	option = { # Just relieved
		name = EVTOPTBHFP20599

		custom_tooltip = { text = tooltip_20599_B }

		ai_chance = { factor = 50 }
	}

	option = { # Annoyed
		name = EVTOPTCHFP20599

		trigger = {
			OR = {
				trait = cruel
				has_character_flag = survivor_mom
			}
		}

		custom_tooltip = {
			text = tooltip_20599_C

			FROM = { health = -0.2 }
			balance_weight_small_effect = yes
		}

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

		random = {
			chance = 30

			if = {
				limit = { trait = cruel }
				piety = -25
			}
			else = {
				add_trait_fully_cruel_effect = yes
			}
		}

		ai_chance = { factor = 40 }
	}
}

# delayed from on_birth event (of a few years). Father develops bond with child.
character_event = {
	id = HFP.20000
	picture = GFX_evt_family

	desc = {
		text = EVTDESCHFPA20000
		trigger = {
			NOT = { trait = kind }
		}
	}
	desc = {
		text = EVTDESCHFPB20000
		trigger = { trait = kind }
	}

	is_triggered_only = yes

	only_capable = yes
	prisoner = no

	trigger = {
		FROM = {
			is_alive = yes
			prisoner = no
			is_incapable = no

			NOR = {
				trait = sickly
				trait = bastard
			}

			OR = {
				host = { character = ROOT }
				at_location = ROOT
				educator = { character = ROOT }
			}
		}
	}

	option = { # In love
		name = EVTOPTAHFP20000

		trigger = {
			NOT = { trait = cruel }
		}

		custom_tooltip = {
			text = tooltip_20000_A

			FROM = { health = 0.2 }
			gain_weight_small_effect = yes
		}

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

		FROM = {
			show_scope_change = no

			random_list = {
				20 = { change_diplomacy = 1 }
				20 = { change_martial = 1 }
				20 = { change_stewardship = 1 }
				20 = { change_intrigue = 1 }
				20 = { change_learning = 1 }
			}
		}

		random = {
			chance = 30

			if = {
				limit = { trait = kind }
				piety = 25
			}
			else = {
				add_trait_fully_kind_effect = yes
			}
		}
	}

	option = { # Annoyed
		name = EVTOPTBHFP20000

		trigger = {
			NOT = { trait = kind }
		}

		custom_tooltip = {
			text = tooltip_20000_B

			FROM = { health = -0.2 }
			balance_weight_small_effect = yes
		}

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

		random = {
			chance = 20

			if = {
				limit = { trait = cruel }
				piety = -25
			}
			else = {
				add_trait_fully_cruel_effect = yes
			}
		}
	}
}

# Mother drunk/drugged during pregnancy, child is growing dumb
character_event = {
	id = HFP.20001
	picture = GFX_evt_birth

	desc = {
		text = EVTDESCHFPA20001
		trigger = { FROM = { has_character_flag = flag_drunk_birth } }
	}
	desc = {
		text = EVTDESCHFPB20001
		trigger = { FROM = { has_character_flag = flag_drugged_birth } }
	}

	is_triggered_only = yes

	trigger = {
		FROM = {
			OR = {
				trait = slow
				trait = imbecile
			}

			is_alive = yes
			is_incapable = no

			OR = {
				host = { character = ROOT }
				at_location = ROOT
				educator = { character = ROOT }
			}
		}
	}

	option = { # Concerned, try stopping the bad habit if still into it
		name = {
			text = EVTOPTAHFP20001_A # Still drinking
			trigger = {
				FROM = { has_character_flag = flag_drunk_birth }
				trait = drunkard
			}
		}
		name = {
			text = EVTOPTAHFP20001_B # Still smoking
			trigger = {
				FROM = { has_character_flag = flag_drugged_birth }
				has_character_modifier = hashish_addict
			}
		}
		name = {
			text = EVTOPTAHFP20001_C # Stopped drinking
			trigger = {
				FROM = { has_character_flag = flag_drunk_birth }
				NOT = { trait = drunkard }
			}
		}
		name = {
			text = EVTOPTAHFP20001_D # Stopped smoking
			trigger = {
				FROM = { has_character_flag = flag_drugged_birth }
				NOT = { has_character_modifier = hashish_addict }
			}
		}

		tiered_piety_negative_effect = yes

		tooltip = {
			FROM = {
				show_scope_change = no

				father = {
					show_scope_change = no

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

		if = {
			limit = {
				has_character_modifier = hashish_addict
				FROM = { has_character_flag = flag_drugged_birth }
			}

			if = {
				limit = { NOT = { has_character_modifier = withdrawal_symptoms } }

				add_character_modifier = {
					name = withdrawal_symptoms
					months = 5
				}
			}

			random = {
				chance = 20

				add_trait_stressed_effect = yes
				remove_character_modifier = hashish_addict

				if = {
					limit = { has_character_modifier = withdrawal_symptoms }
					remove_character_modifier = withdrawal_symptoms
				}
			}
		}

		else_if = {
			limit = {
				trait = drunkard
				FROM = { has_character_flag = flag_drunk_birth }
			}

			random = {
				chance = 20

				remove_trait = drunkard
				add_trait_stressed_effect = yes
			}
		}
	}

	option = { # Not concerned but still addicted
		name = EVTOPTBHFP20001

		trigger = {
			trigger_if = {
				limit = { FROM = { has_character_flag = flag_drunk_birth } }
				trait = drunkard
			}
			trigger_else = {
				has_character_modifier = hashish_addict
			}

			NOT = { trait = kind }
		}
	}

	after = {
		FROM = {
			clr_character_flag = flag_drugged_birth
			clr_character_flag = flag_drunk_birth
		}
	}
}

# Father: Mother drunk/drugged during pregnancy, child is growing dumb
character_event = {
	id = HFP.20002
	picture = GFX_evt_birth

	desc = {
		text = EVTDESCHFPA20002
		trigger = { FROM = { has_character_flag = flag_drunk_birth } }
	}
	desc = {
		text = EVTDESCHFPB20002
		trigger = { FROM = { has_character_flag = flag_drugged_birth } }
	}

	is_triggered_only = yes

	trigger = {
		FROM = {
			OR = {
				trait = slow
				trait = imbecile
			}

			is_alive = yes
			is_incapable = no
			NOT = { trait = bastard }

			OR = {
				host = { character = ROOT }
				at_location = ROOT
				educator = { character = ROOT }
			}
		}
	}

	option = {
		name = {
			text = EVTOPTAHFP20002_A # Still drinking
			trigger = {
				FROM = {
					has_character_flag = flag_drunk_birth

					mother = {
						trait = drunkard
						is_alive = yes
					}
				}
			}
		}
		name = {
			text = EVTOPTAHFP20002_B # Still smoking
			trigger = {
				FROM = {
					has_character_flag = flag_drugged_birth

					mother = {
						has_character_modifier = hashish_addict
						is_alive = yes
					}
				}
			}
		}
		name = {
			text = EVTOPTAHFP20002_C # Mother no longer addicted
			trigger = {
				FROM = {
					mother = {
						is_alive = yes

						NOR = {
							trait = drunkard
							has_character_modifier = hashish_addict
						}
					}
				}
			}
		}
		name = {
			text = EVTOPTAHFP20002_D # Mother died in the meantime
			trigger = {
				FROM = {
					mother = { is_alive = no }
				}
			}
		}

		FROM = {
			show_scope_change = no

			mother = {
				show_scope_change = no

				reverse_opinion = {
					name = opinion_irresponsible_mother
					who = ROOT
					years = 20
				}
			}
		}
	}
}

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

# Pregnancy glow
character_event = {
	id = HFP.20003
	picture = GFX_evt_homage_hf

	desc = {
		text = EVTDESCHFPA20003
		trigger = { is_attractive_trigger = yes }
	}
	desc = {
		text = EVTDESCHFPB20003
		trigger = {
			is_attractive_trigger = no
			is_unattractive_trigger = no
		}
	}
	desc = {
		text = EVTDESCHFPC20003
		trigger = { is_unattractive_trigger = yes }
	}

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		trait = pregnant
		NOR = {
			trait = hard_pregnancy
			trait = troubled_pregnancy
		}
	}

	option = { # Bask in it
		name = EVTOPTAHFP20003

		tiered_prestige_reward_effect = yes

		add_character_modifier = {
			name = mother_pregnancy_glow
			days = 80
		}

		if = {
			limit = { is_main_spouse = yes }

			spouse = {
				character_event = {
					id = HFP.20004
					days = 15
					random = 5
				}
			}
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 0.5
				trait = shy
			}

			mult_modifier = {
				factor = 0.5
				trait = humble
			}
		}
	}

	option = { # Be humble about it
		name = EVTOPTBHFP20003

		if = {
			limit = { trait = humble }
			tiered_piety_reward_effect = yes
		}
		else = {
			random = {
				chance = 30
				add_trait_partially_humble_effect = yes
			}
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.5
				trait = gregarious
			}

			mult_modifier = {
				factor = 0.5
				trait = proud
			}
		}
	}
}

# Pregnancy glow - Spouse notified
character_event = {
	id = HFP.20004
	picture = GFX_evt_homage_hf

	desc = {
		text = EVTDESCHFPA20004
		trigger = { FROM = { is_attractive_trigger = yes } }
	}
	desc = {
		text = EVTDESCHFPB20004
		trigger = {
			FROM = {
				is_attractive_trigger = no
				is_unattractive_trigger = no
			}
		}
	}
	desc = {
		text = EVTDESCHFPC20004
		trigger = { FROM = { is_unattractive_trigger = yes } }
	}

	trigger = {
		FROM = {
			is_married = ROOT
			is_alive = yes
		}
	}

	is_triggered_only = yes

	option = { # Appreciate it
		name = EVTOPTAHFP20004

		tiered_piety_negative_effect = yes

		FROM = {
			show_scope_change = no

			tooltip = {
				opinion = {
					name = opinion_flattered
					who = FROM
					years = 5
				}
			}

			character_event = { id = HFP.20029 }
		}

		remove_trait_silently_celibate_effect = yes

		random = {
			chance = 25
			add_trait_partially_lustful_effect = yes
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = lustful
			}

			mult_modifier = {
				factor = 0.5
				trait = chaste
			}

			mult_modifier = {
				factor = 0.01
				trait = celibate
			}

			mult_modifier = {
				factor = 0.25
				FROM = { has_character_modifier = incestuous_adulteress }
			}

			mult_modifier = {
				factor = 0.25
				FROM = { has_character_modifier = adulteress }
			}
		}
	}

	option = { # Not appropriate
		name = EVTOPTBHFP20004

		if = {
			limit = { trait = chaste }
			tiered_piety_reward_effect = yes
		}
		else = {
			random = {
				chance = 25
				add_trait_partially_chaste_effect = yes
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = chaste
			}

			mult_modifier = {
				factor = 0.5
				trait = lustful
			}

			mult_modifier = {
				factor = 0.1
				trait = hedonist
			}
		}
	}
}

# Pregnancy glow - Spouse is flattering you
character_event = {
	id = HFP.20029
	desc = EVTDESCHFPA20029
	picture = GFX_evt_homage_hf

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20029

		opinion = {
			name = opinion_flattered
			who = FROM
			years = 2
		}
	}
}

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

## The Gossiping - Only for rulers or spouses of rulers (COUNT or higher)
# Husband receives event to call other women to entertain wife
character_event = {
	id = HFP.20005
	desc = EVTDESCHFPA20005
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	trigger = {
		FROM = {
			trait = pregnant
			is_married = ROOT
			is_alive = yes
			is_incapable = no
			is_pilgrim = no
			NOT = { trait = troubled_pregnancy }
		}
	}

	option = { # Call relatives to entertain
		name = EVTOPTAHFP20005

		trigger = {
			OR = {
				ROOT = {
					is_ruler = yes

					any_courtier_or_vassal = {
						count >= 2

						is_female = yes
						block_general_event_trigger = no

						OR = {
							is_close_relative = FROM
							is_close_relative = ROOT
						}

						NOR = {
							character = FROM
							character = ROOT
						}
					}
				}

				FROM = {
					is_ruler = yes

					any_courtier_or_vassal = {
						count >= 2

						is_female = yes
						block_general_event_trigger = no

						OR = {
							is_close_relative = FROM
							is_close_relative = ROOT
						}

						NOR = {
							character = FROM
							character = ROOT
						}
					}
				}
			}
		}

		custom_tooltip = {
			text = tooltip_HFP20005_A

			FROM = {
				set_character_flag = flag_gossiping_relatives

				character_event = {
					id = HFP.20006 # Notification
					days = 10
					random = 15
				}
			}

			if = { # If husband is ruler, pick from his court
				limit = { is_ruler = yes }

				random_courtier_or_vassal = {
					limit = {
						is_female = yes
						block_general_event_trigger = no

						OR = {
							is_close_relative = FROM
							is_close_relative = ROOT
						}

						NOR = {
							character = FROM
							character = ROOT
						}
					}

					preferred_limit = { ai = no } # Ping player first

					character_event = {
						id = HFP.20010
						days = 5
						random = 5
					}
				}
			}
			else = { # Otherwise, pick from her court

				FROM = {
					random_courtier_or_vassal = {
						limit = {
							is_female = yes
							block_general_event_trigger = no

							OR = {
								is_close_relative = FROM
								is_close_relative = ROOT
							}

							NOR = {
								character = FROM
								character = ROOT
							}
						}

						preferred_limit = { ai = no } # Ping player first

						character_event = {
							id = HFP.20010
							days = 5
							random = 5
						}
					}
				}
			}
		}

		prestige = 30
		piety = 10

		tooltip = {
			FROM = {
				show_scope_change = no

				add_character_modifier = {
					name = mother_comforted
					months = 2
					stacking = yes
				}

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

		ai_chance = {
			factor = 100

			mult_modifier = {
				factor = 0.1
				trait = cruel
			}

			mult_modifier = {
				factor = 0.1
				trait = envious
			}

			mult_modifier = {
				factor = 0.25
				FROM = { has_character_modifier = adulteress }
			}

			mult_modifier = {
				factor = 0.25
				FROM = { has_character_modifier = incestuous_adulteress }
			}
		}
	}

	option = { # Hire servants
		name = EVTOPTBHFP20005

		FROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20006
				days = 10
				random = 15
				tooltip = tooltip_HFP20005_B
			}

			tooltip = {
				add_character_modifier = {
					name = mother_comforted
					months = 2
					stacking = yes
				}

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

		scaled_wealth = {
			value = -0.05
			min = -10
			max = -75
		}

		piety = 10

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.5
				trait = greedy
			}

			mult_modifier = {
				factor = 0.1
				trait = cruel
			}

			mult_modifier = {
				factor = 0.1
				trait = envious
			}

			mult_modifier = {
				factor = 0.25
				FROM = { has_character_modifier = adulteress }
			}

			mult_modifier = {
				factor = 0.25
				FROM = { has_character_modifier = incestuous_adulteress }
			}
		}
	}

	option = { # Do nothing
		name = EVTOPTCHFP20005

		piety = -10

		ai_chance = {
			factor = 10

			mult_modifier = {
				factor = 0.1
				trait = kind
			}

			mult_modifier = {
				factor = 0.1
				trait = charitable
			}

			mult_modifier = {
				factor = 2
				trait = cruel
			}

			mult_modifier = {
				factor = 2
				trait = envious
			}

			mult_modifier = {
				factor = 3
				FROM = { has_character_modifier = adulteress }
			}

			mult_modifier = {
				factor = 3
				FROM = { has_character_modifier = incestuous_adulteress }
			}
		}
	}
}

# Mother: Gossiping has been organized
character_event = {
	id = HFP.20006
	picture = GFX_evt_princess_byzantine

	desc = {
		text = EVTDESCHFPA20006
		trigger = { has_character_flag = flag_gossiping_relatives }
	}
	desc = {
		text = EVTDESCHFPB20006
		trigger = {
			NOT = { has_character_flag = flag_gossiping_relatives }
		}
	}

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = {
		name = EVTOPTAHFP20006
		tooltip_info = gregarious

		trigger = { trait = gregarious }

		remove_trait_silently_depressed_effect = yes

		add_character_modifier = {
			name = mother_comforted
			months = 2
			stacking = yes
		}

		opinion = {
			name = opinion_swayed_2
			who = FROM
			years = 2
		}
	}

	option = {
		name = EVTOPTBHFP20006

		trigger = {
			NOT = { trait = gregarious }
		}

		add_character_modifier = {
			name = mother_comforted
			months = 2
			stacking = yes
		}

		opinion = {
			name = opinion_swayed_2
			who = FROM
			years = 2
		}
	}

	after = {
		clr_character_flag = flag_gossiping_relatives

		hidden_effect = {
			# Fallback events if the mother either has no relative or if the random relative pinged either refused the gossiping or died in the meantime
			random_list = {
				45 = {
					character_event = {
						id = HFP.20007 # Mother enjoys herself, either becomes gregarious or trusting (patient offers chance for +1 learning)
						days = 20
						random = 5
					}
				}

				10 = {
					character_event = {
						id = HFP.20008 # Mother not enjoying herself, either becomes envious or shy (deceitful offers chance for +1 intrigue)
						days = 20
						random = 5
					}
				}

				45 = {
					character_event = {
						id = HFP.20009 # Mother pampered, either becomes content or gluttonous (diligent offers chance for +1 diplomacy)
						days = 20
						random = 5
					}
				}
			}
		}
	}
}

# Mother: Enjoying the gossiping
character_event = {
	id = HFP.20007
	desc = EVTDESCHFPA20007
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Listen and learn
		name = EVTOPTAHFP20007
		tooltip_info = patient

		trigger = { trait = patient }

		change_learning = 1

		ai_chance = { factor = 80 }
	}

	option = { # Becoming gregarious
		name = EVTOPTBHFP20007

		random = {
			chance = 50

			if = {
				limit = { trait = gregarious }
				change_diplomacy = 1
			}
			else = {
				add_trait_partially_gregarious_effect = yes
			}
		}

		ai_chance = { factor = 50 }
	}

	option = { # Relaxed and trusting
		name = EVTOPTCHFP20007

		remove_trait_silently_stressed_effect = yes

		random = {
			chance = 50

			if = {
				limit = { trait = trusting }
				change_diplomacy = 1
			}
			else = {
				add_trait_partially_trusting_effect = yes
			}
		}

		ai_chance = { factor = 20 }
	}
}

# Mother: Not enjoying the gossiping
character_event = {
	id = HFP.20008
	desc = EVTDESCHFPA20008
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Listen and plot
		name = EVTOPTAHFP20008
		tooltip_info = deceitful

		trigger = { trait = deceitful }

		change_intrigue = 1

		ai_chance = { factor = 80 }
	}

	option = { # Envy
		name = EVTOPTBHFP20008

		random = {
			chance = 50

			if = {
				limit = { trait = envious }
				change_intrigue = 1
			}
			else = {
				add_trait_partially_envious_effect = yes
			}
		}

		ai_chance = { factor = 50 }
	}

	option = { # Need some space
		name = EVTOPTCHFP20008

		remove_trait_silently_stressed_effect = yes

		random = {
			chance = 50

			if = {
				limit = { trait = shy }
				change_intrigue = 1
			}
			else = {
				add_trait_partially_shy_effect = yes
			}
		}

		ai_chance = { factor = 20 }
	}
}

# Mother: Pampered during gossiping
character_event = {
	id = HFP.20009
	desc = EVTDESCHFPA20009
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Do your part
		name = EVTOPTAHFP20009
		tooltip_info = diligent

		trigger = { trait = diligent }

		change_stewardship = 1

		ai_chance = { factor = 80 }
	}

	option = { # Becoming content
		name = EVTOPTBHFP20009

		random = {
			chance = 50

			if = {
				limit = { trait = content }
				change_stewardship = 1
			}
			else = {
				add_trait_partially_content_effect = yes
			}
		}

		ai_chance = { factor = 40 }
	}

	option = { # Becoming gluttonous
		name = EVTOPTCHFP20009

		remove_trait_stressed_effect = yes

		random = {
			chance = 50

			if = {
				limit = { trait = gluttonous }
				change_diplomacy = 1
				gain_weight_medium_effect = yes
				weight_trait_check_effect = yes
			}
			else = {
				add_trait_partially_gluttonous_effect = yes
			}
		}

		ai_chance = { factor = 20 }
	}
}

# Relative: You have been invited to the gossiping
character_event = {
	id = HFP.20010
	desc = EVTDESCHFPA20010
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes
	show_from_from = yes

	trigger = {
		FROMFROM = {
			is_alive = yes
			is_incapable = no
			NOT = { trait = troubled_pregnancy }
		}
	}

	option = { # Very well
		name = EVTOPTAHFP20010

		hidden_effect = {
			random_list = {
				90 = {
					character_event = {
						id = HFP.20011 # Gossip imput
						days = 12
						random = 5
					}
				}

				10 = {
					trigger = {
						num_of_friends < 3
						FROMFROM = { num_of_friends < 3 }

						NOR = {
							is_friend = FROMFROM
							is_rival = FROMFROM
							is_lover = FROMFROM
						}

						opinion = {
							who = FROMFROM
							value >= -30
						}
					}

					mult_modifier = {
						factor = 1.5
						trait = kind
					}

					mult_modifier = {
						factor = 1.5
						trait = charitable
					}

					mult_modifier = {
						factor = 1.5
						trait = gregarious
					}

					mult_modifier = {
						factor = 0.5
						trait = shy
					}

					mult_modifier = {
						factor = 0.5
						FROMFROM = { trait = shy }
					}

					FROMFROM = {
						character_event = {
							id = HFP.20016 # Becoming friends with mother
							days = 12
							random = 5
						}
					}
				}
			}
		}

		ai_chance = { factor = 80 }
	}

	option = { # No time for it
		name = EVTOPTBHFP20010

		piety = -5

		reverse_opinion = {
			name = opinion_disappointed
			who = FROM
			years = 5
		}

		reverse_opinion = {
			name = opinion_offended
			who = FROMFROM
			years = 5
		}

		ai_chance = {
			factor = 20

			trigger = {
				OR = {
					trait = shy
					trait = cruel
				}
			}
		}
	}
}

# Relative: Gossiping input
character_event = {
	id = HFP.20011
	desc = EVTDESCHFPA20011
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes
	show_from_from_from = yes

	trigger = {
		FROMFROMFROM = {
			is_alive = yes
			is_incapable = no
			NOT = { trait = troubled_pregnancy }
		}
	}

	immediate = {
		FROMFROMFROM = {
			clear_delayed_event = { id = HFP.20007 }
			clear_delayed_event = { id = HFP.20008 }
			clear_delayed_event = { id = HFP.20009 }
		}
	}

	option = { # Be talkative
		name = EVTOPTAHFP20011

		FROMFROMFROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20012
				tooltip = tooltip_evt20011_A
			}
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 0.1
				is_rival = FROMFROMFROM
			}

			mult_modifier = {
				factor = 1.5
				trait = gregarious
			}

			mult_modifier = {
				factor = 1.5
				trait = socializer
			}

			mult_modifier = {
				factor = 1.5
				trait = patient
			}

			mult_modifier = {
				factor = 1.5
				trait = shrewd
			}
		}
	}

	option = { # Be supportive
		name = EVTOPTBHFP20011

		FROMFROMFROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20013
				tooltip = tooltip_evt20011_B
			}
		}

		ai_chance = {
			factor = 40

			mult_modifier = {
				factor = 0.1
				is_rival = FROMFROMFROM
			}

			mult_modifier = {
				factor = 1.5
				trait = kind
			}

			mult_modifier = {
				factor = 1.5
				trait = hedonist
			}

			mult_modifier = {
				factor = 1.5
				trait = charitable
			}

			mult_modifier = {
				factor = 1.5
				trait = dull
			}
		}
	}

	option = { # Be mean
		name = EVTOPTCHFP20011

		FROMFROMFROM = {
			show_scope_change = no

			character_event = {
				id = HFP.20014
				tooltip = tooltip_evt20011_C
			}
		}

		ai_chance = {
			factor = 20

			mult_modifier = {
				factor = 0.1
				is_friend = FROMFROMFROM
			}

			mult_modifier = {
				factor = 0.1
				is_lover = FROMFROMFROM
			}

			mult_modifier = {
				factor = 0.1
				is_rival = FROMFROMFROM
			}

			mult_modifier = {
				factor = 1.5
				trait = cruel
			}

			mult_modifier = {
				factor = 1.5
				trait = envious
			}

			mult_modifier = {
				factor = 1.5
				trait = proud
			}

			mult_modifier = {
				factor = 1.5
				trait = stubborn
			}
		}
	}
}

# Mother: Enjoying the gossiping - Relative version
character_event = {
	id = HFP.20012
	desc = EVTDESCHFPA20012
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Listen and learn
		name = EVTOPTAHFP20007
		tooltip_info = patient

		trigger = { trait = patient }

		change_learning = 1
		set_character_flag = mother_gossip_listening

		ai_chance = { factor = 80 }
	}

	option = { # Becoming gregarious
		name = EVTOPTBHFP20007

		set_character_flag = mother_gossip_talking

		random = {
			chance = 50

			if = {
				limit = { trait = gregarious }
				change_diplomacy = 1
			}
			else = {
				add_trait_partially_gregarious_effect = yes
			}
		}

		ai_chance = { factor = 50 }
	}

	option = { # Relaxed and trusting
		name = EVTOPTCHFP20007

		set_character_flag = mother_gossip_trusting
		remove_trait_silently_stressed_effect = yes

		random = {
			chance = 50

			if = {
				limit = { trait = trusting }
				change_diplomacy = 1
			}
			else = {
				add_trait_partially_trusting_effect = yes
			}
		}

		ai_chance = { factor = 20 }
	}

	after = {
		FROM = {
			character_event = { id = HFP.20015 } # Notification to relative
		}
	}
}

# Mother: Not enjoying the gossiping - Relative version
character_event = {
	id = HFP.20013
	desc = EVTDESCHFPA20013
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Listen and plot
		name = EVTOPTAHFP20008
		tooltip_info = deceitful

		trigger = { trait = deceitful }

		set_character_flag = mother_gossip_plotting
		change_intrigue = 1

		ai_chance = { factor = 80 }
	}

	option = { # Envy
		name = EVTOPTBHFP20008

		set_character_flag = mother_gossip_envious

		random = {
			chance = 50

			if = {
				limit = { trait = envious }
				change_intrigue = 1
			}
			else = {
				add_trait_partially_envious_effect = yes
			}
		}

		ai_chance = { factor = 50 }
	}

	option = { # Need some space
		name = EVTOPTCHFP20008

		set_character_flag = mother_gossip_shy
		remove_trait_silently_stressed_effect = yes

		random = {
			chance = 50

			if = {
				limit = { trait = shy }
				change_intrigue = 1
			}
			else = {
				add_trait_partially_shy_effect = yes
			}
		}

		ai_chance = { factor = 20 }
	}

	after = {
		FROM = {
			character_event = { id = HFP.20015 } # Notification to relative
		}
	}
}

# Mother: Pampered during gossiping - Relative version
character_event = {
	id = HFP.20014
	desc = EVTDESCHFPA20014
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }
	}

	option = { # Do your part
		name = EVTOPTAHFP20009
		tooltip_info = diligent

		trigger = { trait = diligent }

		set_character_flag = mother_gossip_learning
		change_learning = 1

		ai_chance = { factor = 80 }
	}

	option = { # Becoming content
		name = EVTOPTBHFP20009

		set_character_flag = mother_gossip_content

		random = {
			chance = 50

			if = {
				limit = { trait = content }
				change_stewardship = 1
			}
			else = {
				add_trait_partially_content_effect = yes
			}
		}

		ai_chance = { factor = 40 }
	}

	option = { # Becoming gluttonous
		name = EVTOPTCHFP20009

		set_character_flag = mother_gossip_gluttonous
		remove_trait_silently_stressed_effect = yes

		random = {
			chance = 50

			if = {
				limit = { trait = gluttonous }
				change_diplomacy = 1
				gain_weight_medium_effect = yes
				weight_trait_check_effect = yes
			}
			else = {
				add_trait_partially_gluttonous_effect = yes
			}
		}

		ai_chance = { factor = 20 }
	}

	after = {
		FROM = {
			character_event = { id = HFP.20015 } # Notification to relative
		}
	}
}

# Relative: Notified of mother's reaction
character_event = {
	id = HFP.20015
	picture = GFX_evt_princess_byzantine

	desc = {
		text = EVTDESCHFPA20015
		trigger = { FROM = { has_character_flag = mother_gossip_listening } }
	}
	desc = {
		text = EVTDESCHFPB20015
		trigger = { FROM = { has_character_flag = mother_gossip_talking } }
	}
	desc = {
		text = EVTDESCHFPC20015
		trigger = { FROM = { has_character_flag = mother_gossip_trusting } }
	}
	desc = {
		text = EVTDESCHFPD20015
		trigger = { FROM = { has_character_flag = mother_gossip_plotting } }
	}
	desc = {
		text = EVTDESCHFPE20015
		trigger = { FROM = { has_character_flag = mother_gossip_envious } }
	}
	desc = {
		text = EVTDESCHFPF20015
		trigger = { FROM = { has_character_flag = mother_gossip_shy } }
	}
	desc = {
		text = EVTDESCHFPG20015
		trigger = { FROM = { has_character_flag = mother_gossip_learning } }
	}
	desc = {
		text = EVTDESCHFPH20015
		trigger = { FROM = { has_character_flag = mother_gossip_content } }
	}
	desc = {
		text = EVTDESCHFPI20015
		trigger = { FROM = { has_character_flag = mother_gossip_gluttonous } }
	}

	is_triggered_only = yes

	option = {
		name = {
			text = EVTOPTAHFP20015_A
			trigger = { FROM = { has_character_flag = mother_gossip_listening } }
		}
		name = {
			text = EVTOPTAHFP20015_B
			trigger = { FROM = { has_character_flag = mother_gossip_talking } }
		}
		name = {
			text = EVTOPTAHFP20015_C
			trigger = { FROM = { has_character_flag = mother_gossip_trusting } }
		}
		name = {
			text = EVTOPTAHFP20015_D
			trigger = { FROM = { has_character_flag = mother_gossip_plotting } }
		}
		name = {
			text = EVTOPTAHFP20015_E
			trigger = { FROM = { has_character_flag = mother_gossip_envious } }
		}
		name = {
			text = EVTOPTAHFP20015_F
			trigger = { FROM = { has_character_flag = mother_gossip_shy } }
		}
		name = {
			text = EVTOPTAHFP20015_G
			trigger = { FROM = { has_character_flag = mother_gossip_learning } }
		}
		name = {
			text = EVTOPTAHFP20015_H
			trigger = { FROM = { has_character_flag = mother_gossip_content } }
		}
		name = {
			text = EVTOPTAHFP20015_I
			trigger = { FROM = { has_character_flag = mother_gossip_gluttonous } }
		}

		if = {
			limit = { FROM = { has_character_flag = mother_gossip_listening } } # Mother took the reward instead

			prestige = 20

			reverse_opinion = {
				name = opinion_delighted
				who = FROM
				years = 3
			}
		}
		else_if = {
			limit = {
				FROM = {
					OR = {
						has_character_flag = mother_gossip_talking
						has_character_flag = mother_gossip_trusting
					}
				}
			}

			random = {
				chance = 25
				change_diplomacy = 1
			}

			reverse_opinion = {
				name = opinion_delighted
				who = FROM
				years = 3
			}
		}
		else_if = {
			limit = { FROM = { has_character_flag = mother_gossip_plotting } } # Mother took the reward instead

			prestige = 20

			reverse_opinion = {
				name = opinion_irritated
				who = FROM
				years = 3
			}
		}
		else_if = {
			limit = {
				FROM = {
					OR = {
						has_character_flag = mother_gossip_envious
						has_character_flag = mother_gossip_shy
					}
				}
			}

			random = {
				chance = 25
				change_intrigue = 1
			}

			reverse_opinion = {
				name = opinion_irritated
				who = FROM
				years = 3
			}
		}
		else_if = {
			limit = { FROM = { has_character_flag = mother_gossip_learning } } # Mother took the reward instead

			piety = 10

			reverse_opinion = {
				name = opinion_delighted
				who = FROM
				years = 3
			}
		}
		else_if = {
			limit = {
				FROM = {
					OR = {
						has_character_flag = mother_gossip_content
						has_character_flag = mother_gossip_gluttonous
					}
				}
			}

			random = {
				chance = 25
				change_stewardship = 1
			}

			reverse_opinion = {
				name = opinion_delighted
				who = FROM
				years = 3
			}
		}

		ai_chance = { factor = 80 }
	}

	after = {
		FROM = {
			clr_character_flag = mother_gossip_listening
			clr_character_flag = mother_gossip_talking
			clr_character_flag = mother_gossip_trusting
			clr_character_flag = mother_gossip_plotting
			clr_character_flag = mother_gossip_envious
			clr_character_flag = mother_gossip_shy
			clr_character_flag = mother_gossip_learning
			clr_character_flag = mother_gossip_content
			clr_character_flag = mother_gossip_gluttonous
		}
	}
}

# Mother: Becoming friend with relative
character_event = {
	id = HFP.20016
	desc = EVTDESCHFPA20016
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		NOT = { trait = troubled_pregnancy }

		FROM = {
			is_alive = yes
			is_incapable = no
		}
	}

	option = { # Yes
		name = EVTOPTAHFP20016

		add_friend = FROM

		FROM = {
			character_event = { id = HFP.20017 } # Notification to relative
		}
	}

	option = { # No
		name = EVTOPTBHFP20016

		ai_chance = { factor = 0 }
	}
}

# Relative: Becoming friend with mother
character_event = {
	id = HFP.20017
	desc = EVTDESCHFPA20017
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	ai = no

	option = { # Yes
		name = EVTOPTAHFP20017

		tooltip = {
			add_friend = FROM
		}
	}
}

##############################################
## Post-partum Churching of the Mother (one month after on_birth)
## Only for Catholic Rulers (or main spouses of Rulers) who are married and have produced a(n apparently) legitimate child

# Does mother want to go?
character_event = {
	id = HFP.20018
	desc = EVTDESCHFPA20018
	picture = GFX_evt_birth
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		OR = {
			religion = catholic
			religion = orthodox
		}

		NOT = { trait = troubled_pregnancy }
	}

	immediate = {
		FROM = { save_event_target_as = newborn_baby }
	}

	option = { # Yes
		name = EVTOPTAHFP20018

		character_event = {
			id = HFP.20019
			tooltip = tooltip_HFP20018_A
		}

		ai_chance = { factor = 95 }
	}

	option = { # No
		name = EVTOPTBHFP20018

		remove_trait_zealous_effect = yes
		tiered_piety_negative_effect = yes

		ai_chance = {
			factor = 5

			trigger = {
				OR = {
					trait = cynical
					society_member_of = the_satanists
				}
			}
		}
	}
}

# What does mother do?
character_event = {
	id = HFP.20019
	desc = EVTDESCHFPA20019
	picture = GFX_evt_woman_praying_hf
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { # Making donation
		name = EVTOPTAHFP20019

		scaled_wealth = {
			value = -0.1
			min = -50
			max = -150
		}

		set_character_flag = flag_churching_wealth

		ai_chance = { factor = 40 }
	}

	option = { # Humbling yourself
		name = EVTOPTBHFP20019

		tiered_prestige_negative_effect = yes
		set_character_flag = flag_churching_prestige

		ai_chance = { factor = 30 }
	}

	option = { # Confessing sins
		name = EVTOPTCHFP20019

		tiered_piety_negative_effect = yes
		set_character_flag = flag_churching_piety

		ai_chance = { factor = 30 }
	}

	option = { # Nothing
		name = EVTOPTDHFP20019

		tiered_prestige_reward_effect = yes
		set_character_flag = flag_churching_nothing

		ai_chance = { factor = 5 }
	}

	after = {
		hidden_effect = {
			random_list = {
				7 = { # Ecstatic vision
					trigger = {
						event_target:newborn_baby = {
							is_alive = yes

							# Jesus knows... somehow
							is_father_real_father = yes
						}
					}

					mult_modifier = {
						factor = 0.1
						trait = cynical
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_churching_nothing
					}

					mult_modifier = {
						factor = 0.1
						society_member_of = the_satanists
					}

					mult_modifier = {
						factor = 1.25
						trait = trusting
					}

					mult_modifier = {
						factor = 1.35
						trait = zealous
					}

					mult_modifier = {
						factor = 1.5
						trait = celibate
					}

					mult_modifier = {
						factor = 1.35
						trait = chaste
					}

					mult_modifier = {
						factor = 1.35
						trait = temperate
					}

					mult_modifier = {
						factor = 1.35
						trait = humble
					}

					mult_modifier = {
						factor = 1.35
						trait = charitable
					}

					mult_modifier = {
						factor = 1.35
						trait = kind
					}

					mult_modifier = {
						factor = 1.35
						trait = patient
					}

					mult_modifier = {
						factor = 1.35
						trait = diligent
					}

					mult_modifier = {
						factor = 1.15
						piety >= 150
					}

					mult_modifier = {
						factor = 1.15
						piety >= 250
					}

					mult_modifier = {
						factor = 1.25
						piety >= 350
					}

					mult_modifier = {
						factor = 1.25
						piety >= 450
					}

					set_character_flag = flag_churching_vision
				}

				50 = { # Good feeling
					mult_modifier = {
						factor = 0.75 # Jesus knows... somehow
						event_target:newborn_baby = { is_father_real_father = no }
					}

					mult_modifier = {
						factor = 0.75
						society_member_of = the_satanists
					}

					set_character_flag = flag_churching_positive
				}

				50 = { # Bad feeling
					mult_modifier = {
						factor = 0.9
						piety >= 25
					}

					mult_modifier = {
						factor = 0.9
						piety >= 50
					}

					mult_modifier = {
						factor = 0.9
						piety >= 75
					}

					mult_modifier = {
						factor = 0.9
						piety >= 100
					}

					mult_modifier = {
						factor = 0.8
						piety >= 150
					}

					mult_modifier = {
						factor = 1.5
						trait = possessed
					}

					mult_modifier = {
						factor = 1.5
						trait = lunatic
					}

					mult_modifier = {
						factor = 1.5
						trait = kinslayer
					}

					mult_modifier = {
						factor = 1.45
						trait = familial_kinslayer
					}

					mult_modifier = {
						factor = 1.25
						trait = dynastic_kinslayer
					}

					mult_modifier = {
						factor = 0.65
						has_character_flag = flag_churching_wealth
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_churching_piety
					}

					mult_modifier = {
						factor = 0.85
						has_character_flag = flag_churching_prestige
					}

					mult_modifier = {
						factor = 1.25
						has_character_flag = flag_churching_nothing
					}

					set_character_flag = flag_churching_negative
				}

				7 = { # Choke on Communion
					mult_modifier = {
						factor = 0.1 # Nothing to fight over
						event_target:newborn_baby = { is_alive = no }
					}

					mult_modifier = {
						factor = 1.5
						society_member_of = the_satanists
					}

					mult_modifier = {
						factor = 0.5
						has_character_flag = flag_churching_wealth
					}

					mult_modifier = {
						factor = 0.65
						has_character_flag = flag_churching_piety
					}

					mult_modifier = {
						factor = 0.75
						has_character_flag = flag_churching_prestige
					}

					mult_modifier = {
						factor = 1.75
						has_character_flag = flag_churching_nothing
					}

					mult_modifier = {
						factor = 0.5
						trait = cynical
					}

					mult_modifier = {
						factor = 5 # Jesus knows... somehow
						event_target:newborn_baby = { is_father_real_father = no }
					}

					mult_modifier = {
						factor = 1.5
						trait = possessed
					}

					mult_modifier = {
						factor = 1.5
						trait = lunatic
					}

					mult_modifier = {
						factor = 1.5
						trait = kinslayer
					}

					mult_modifier = {
						factor = 1.45
						trait = familial_kinslayer
					}

					mult_modifier = {
						factor = 1.25
						trait = dynastic_kinslayer
					}

					mult_modifier = {
						factor = 1.5
						trait = paranoid
					}

					mult_modifier = {
						factor = 1.25
						trait = hedonist
					}

					mult_modifier = {
						factor = 1.25
						trait = lustful
					}

					mult_modifier = {
						factor = 1.25
						trait = gluttonous
					}

					mult_modifier = {
						factor = 1.25
						trait = proud
					}

					mult_modifier = {
						factor = 1.25
						trait = greedy
					}

					mult_modifier = {
						factor = 1.25
						trait = envious
					}

					mult_modifier = {
						factor = 1.25
						trait = wroth
					}

					mult_modifier = {
						factor = 1.25
						trait = slothful
					}

					set_character_flag = flag_churching_sinner
				}
			}

			character_event = { id = HFP.20020 }
		}
	}
}

# Response
character_event = {
	id = HFP.20020
	border = GFX_event_normal_frame_religion
	picture = GFX_evt_woman_praying_hf

	desc = {
		text = EVTDESCHFPA20020
		trigger = { has_character_flag = flag_churching_vision }
	}
	desc = {
		text = EVTDESCHFPB20020
		trigger = { has_character_flag = flag_churching_positive }
	}
	desc = {
		text = EVTDESCHFPC20020
		trigger = { has_character_flag = flag_churching_negative }
	}
	desc = { # As she chokes, mother calls out for real father's name
		text = EVTDESCHFPD20020
		trigger = { has_character_flag = flag_churching_sinner }
	}

	is_triggered_only = yes

	immediate = {
		clr_character_flag = flag_churching_wealth
		clr_character_flag = flag_churching_prestige
		clr_character_flag = flag_churching_piety
		clr_character_flag = flag_churching_nothing
	}

	option = {
		name = {
			text = EVTOPTAHFP20020_A
			trigger = { has_character_flag = flag_churching_vision }
		}
		name = {
			text = EVTOPTAHFP20020_B
			trigger = { has_character_flag = flag_churching_positive }
		}
		name = {
			text = EVTOPTAHFP20020_C
			trigger = { has_character_flag = flag_churching_negative }
		}
		name = {
			text = EVTOPTAHFP20020_D
			trigger = { has_character_flag = flag_churching_sinner }
		}

		trigger_switch = {
			on_trigger = has_character_flag

			# Churching resulted in very positive vision:
			flag_churching_vision = {
				tiered_piety_reward_effect = yes
				remove_trait_silently_stressed_effect = yes

				random = {
					chance = 30
					remove_trait_cynical_effect = yes
				}

				spouse = {
					character_event = { id = HFP.20021 } # Notify husband
				}

				event_target:newborn_baby = {
					character_event = {
						id = HFP.20027 # Child is blessed
						days = 2500
						random = 250
					}
				}
			}

			# Churching resulted in positive feeling:
			flag_churching_positive = {
				tiered_piety_reward_effect = yes

				spouse = {
					character_event = { id = HFP.20021 } # Notify husband
				}
			}

			# Churching resulted in negative feeling:
			flag_churching_negative = {
				tiered_piety_negative_effect = yes

				random = {
					chance = 40
					add_trait_stressed_effect = yes
				}

				spouse = {
					character_event = { id = HFP.20021 } # Notify husband
				}
			}

			# Churching resulted in very negative omen:
			flag_churching_sinner = {
				tiered_piety_negative_effect = yes

				if = {
					limit = { NOT = { trait = stressed } }
					add_trait = stressed
				}
				else = {
					add_trait_fully_silently_paranoid_effect = yes
				}

				event_target:newborn_baby = {
					prestige = -100

					if = { # If child is not actually illegitimate
						limit = { is_father_real_father = yes }
						set_father = 0
					}
					else = { # If child is actually illegitimate
						real_father_even_if_dead = {
							character_event = { id = HFP.20025 } # Notify real father
						}

						set_father = real_father_even_if_dead
					}
				}

				if = { # If spouse is higher tier, the child is no longer an heir
					limit = { lower_real_tier_than = spouse }

					event_target:newborn_baby = {
						add_trait = bastard
						dynasty = mother_bastard
					}
				}

				spouse = {
					character_event = { id = HFP.20021 } # Notify husband
				}
			}
		}
	}

	after = {
		character_event = {
			id = HFP.20026 # Clear all flags
			months = 1
		}
	}
}

# Husband notified of the Churching
character_event = {
	id = HFP.20021
	picture = GFX_evt_woman_praying_hf
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESCHFPA20021
		trigger = { FROM = { has_character_flag = flag_churching_vision } }
	}
	desc = {
		text = EVTDESCHFPB20021
		trigger = { FROM = { has_character_flag = flag_churching_positive } }
	}
	desc = {
		text = EVTDESCHFPC20021
		trigger = { FROM = { has_character_flag = flag_churching_negative } }
	}
	desc = {
		text = EVTDESCHFPD20021
		trigger = { FROM = { has_character_flag = flag_churching_sinner } }
	}

	is_triggered_only = yes

	trigger = {
		FROM = {
			is_married = ROOT
			is_alive = yes
		}
	}

	option = { # Single option because Churching was positive
		name = {
			text = EVTOPTAHFP20021_A
			trigger = { FROM = { has_character_flag = flag_churching_vision } }
		}
		name = {
			text = EVTOPTAHFP20021_B
			trigger = { FROM = { has_character_flag = flag_churching_positive } }
		}

		trigger = {
			FROM = {
				OR = {
					has_character_flag = flag_churching_vision
					has_character_flag = flag_churching_positive
				}
			}
		}

		# Churching resulted in very positive vision:
		if = {
			limit = { FROM = { has_character_flag = flag_churching_vision } }

			tiered_piety_reward_effect = yes
			remove_trait_silently_stressed_effect = yes
			remove_trait_silently_depressed_effect = yes
		}

		# Churching resulted in positive feeling:
		else = { # flag_churching_positive
			tiered_piety_reward_effect = yes
			remove_trait_silently_stressed_effect = yes
		}

		ai_chance = { factor = 100 }
	}

	option = { # Churching was negative, high diplomacy offers comfort
		name = EVTOPTBHFP20021
		tooltip_info = diplomacy

		trigger = {
			FROM = { has_character_flag = flag_churching_negative }
			diplomacy >= 10
		}

		FROM = {
			show_scope_change = no

			character_event = { id = HFP.20022 } # Spouse comforted

			tooltip = {
				remove_trait_silently_stressed_effect = yes

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

		if = {
			limit = { trait = kind }
			tiered_piety_reward_effect = yes
		}
		else = {
			random = {
				chance = 30
				add_trait_partially_kind_effect = yes
			}
		}

		ai_chance = { factor = 100 }
	}

	option = { # Churching was negative
		name = EVTOPTCHFP20021

		trigger = {
			FROM = { has_character_flag = flag_churching_negative }
		}

		ai_chance = { factor = 10 }
	}

	option = { # Churching was horrible, but husband forgives wife
		name = EVTOPTDHFP20021
		trigger = {
			FROM = { has_character_flag = flag_churching_sinner }

			NOR = {
				trait = cruel
				trait = envious
			}
		}

		FROM = {
			show_scope_change = no

			remove_trait_silently_stressed_effect = yes

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

			character_event = { id = HFP.20023 } # Spouse forgiven
		}

		tiered_piety_reward_effect = yes
		tiered_prestige_negative_effect = yes

		random = {
			chance = 50
			add_trait_fully_kind_effect = yes
		}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 1.75
				trait = kind
			}

			mult_modifier = {
				factor = 1.75
				trait = patient
			}

			mult_modifier = {
				factor = 1.5
				trait = humble
			}
		}
	}

	option = { # Churching was horrible, and husband is outraged
		name = EVTOPTEHFP20021

		trigger = {
			FROM = { has_character_flag = flag_churching_sinner }
		}

		FROM = {
			show_scope_change = no

			character_event = { id = HFP.20024 } # Spouse denounced

			if = {
				limit = { higher_tier_than = ROOT }
				tiered_prestige_negative_effect = yes
			}

			add_character_modifier = {
				name = adulteress
				years = 10
			}
		}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 1.75
				trait = wroth
			}

			mult_modifier = {
				factor = 1.75
				trait = paranoid
			}

			mult_modifier = {
				factor = 1.5
				trait = envious
			}

			mult_modifier = {
				factor = 1.5
				trait = cruel
			}

			mult_modifier = {
				factor = 1.5
				trait = zealous
			}
		}
	}
}

# Mother: Husband comforted you
character_event = {
	id = HFP.20022
	desc = EVTDESCHFPA20022
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20022

		remove_trait_silently_stressed_effect = yes

		opinion = {
			name = comforted_opinion
			who = FROM
			years = 2
		}
	}
}

# Mother: Husband forgave you
character_event = {
	id = HFP.20023
	desc = EVTDESCHFPA20023
	picture = GFX_evt_lovers
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20023

		remove_trait_silently_stressed_effect = yes

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

# Mother: Husband is upset
character_event = {
	id = HFP.20024
	desc = EVTDESCHFPA20024
	picture = GFX_evt_quarrel
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20024

		tooltip = {
			if = {
				limit = { lower_tier_than = FROM }
				tiered_prestige_negative_effect = yes
			}

			add_character_modifier = {
				name = adulteress
				years = 10
			}
		}
	}
}

# Real father notified mother revealed his identity
character_event = {
	id = HFP.20025
	desc = EVTDESCHFPA20025
	picture = GFX_evt_woman_praying_hf
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20025

		tiered_piety_negative_effect = yes
	}
}

# Churching flags on the mother cleared after a month
character_event = {
	id = HFP.20026

	is_triggered_only = yes
	hide_window = yes

	immediate = {
		clr_character_flag = flag_churching_vision
		clr_character_flag = flag_churching_positive
		clr_character_flag = flag_churching_negative
		clr_character_flag = flag_churching_sinner
	}
}

# Child is blessed, give random trait
character_event = {
	id = HFP.20027

	is_triggered_only = yes
	hide_window = yes

	immediate = {
		random_list = {
			5 = {
				trigger = {
					NOT = { trait = genius }
				}

				remove_trait = dull
				remove_trait = imbecile
				remove_trait = slow
				remove_trait = quick
				add_trait = genius
			}

			10 = {
				trigger = {
					NOR = {
						trait = quick
						trait = genius
					}
				}

				remove_trait = dull
				remove_trait = imbecile
				remove_trait = slow
				add_trait = quick
			}

			15 = {
				trigger = {
					NOT = { trait = strong }
				}

				remove_trait = weak
				remove_trait = frail
				add_trait = strong
			}

			20 = {
				trigger = {
					NOT = { trait = attractive }
				}

				remove_trait = ugly
				add_trait = attractive
			}

			25 = {
				trigger = {
					NOT = { trait = shrewd }
				}

				remove_trait = dull
				remove_trait = imbecile
				remove_trait = slow
				add_trait = shrewd
			}

			25 = {
				trigger = {
					NOT = { trait = brawny }
				}

				remove_trait = weak
				remove_trait = frail
				add_trait = brawny
			}
		}

		mother = { character_event = { id = HFP.20028 } }
		father = { character_event = { id = HFP.20028 } }
	}
}

# Parents notified of blessed child
character_event = {
	id = HFP.20028
	picture = GFX_evt_guardian

	desc = {
		text = EVTDESCHFPA20028
		trigger = { is_female = yes }
	}
	desc = {
		text = EVTDESCHFPB20028
		trigger = { is_female = no }
	}

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20028
	}
}

# Duplicate id fix: HFP.20029 taken for notification

# Dark rest. Fires for female rulers, or, if unlanded, for their spouse.
character_event = {
	id = HFP.20030
	picture = GFX_evt_woman_praying_hf

	desc = {
		text = EVTDESCHFPA20030
		trigger = { character = FROM }
	}
	desc = {
		text = EVTDESCHFPB20030
		trigger = {
			NOT = { character = FROM }
		}
	}

	trigger = {
		FROM = {
			trait = pregnant
			is_alive = yes
			is_incapable = no
			is_pilgrim = no
			NOT = { trait = troubled_pregnancy }

			OR = {
				is_married = ROOT
				character = ROOT
			}
		}
	}

	is_triggered_only = yes

	option = { # Resting in the dark
		name = {
			text = EVTOPTAHFP20030_A
			trigger = { trait = pregnant }
		}
		name = {
			text = EVTOPTAHFP20030_B
			trigger = {
				NOT = { trait = pregnant }
			}
		}

		if = {
			limit = { character = FROM }

			add_character_modifier = {
				name = mother_dark_rest
				months = 5
			}

			set_character_flag = flag_mother_dark_rest

			hidden_effect = {
				random_list = {
					25 = {
						character_event = {
							id = HFP.20031 # Becomes learned
							days = 10
							random = 10
						}
					}

					25 = {
						mult_modifier = {
							factor = 0.5
							trait = shy
						}

						character_event = {
							id = HFP.20033 # Becomes paranoid
							days = 10
							random = 10
						}
					}

					25 = {
						mult_modifier = {
							factor = 0.5
							trait = gregarious
						}

						character_event = {
							id = HFP.20035 # Becomes calmer
							days = 10
							random = 10
						}
					}

					25 = { } # Nothing
				}
			}
		}
		else = {
			FROM = { # Wife scope
				show_scope_change = no

				add_character_modifier = {
					name = mother_dark_rest
					months = 5
				}

				set_character_flag = flag_mother_dark_rest # Reduces chance of child being born sickly

				hidden_effect = {
					random_list = {
						25 = {
							character_event = {
								id = HFP.20031 # Becomes learned
								days = 10
								random = 10
							}
						}

						25 = {
							mult_modifier = {
								factor = 0.5
								trait = shy
							}

							character_event = {
								id = HFP.20033 # Becomes paranoid
								days = 10
								random = 10
							}
						}

						25 = {
							mult_modifier = {
								factor = 0.5
								trait = gregarious
							}

							character_event = {
								id = HFP.20035 # Becomes calmer
								days = 10
								random = 10
							}
						}

						25 = { } # Nothing
					}
				}
			}
		}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 0.1
				trait = gregarious
			}

			mult_modifier = {
				factor = 0.1
				trait = wroth
			}
		}
	}

	option = { # Talking
		name = {
			text = EVTOPTBHFP20030_A
			trigger = { character = FROM }
		}
		name = {
			text = EVTOPTBHFP20030_B
			trigger = {
				NOT = { character = FROM }
			}
		}

		if = {
			limit = { character = FROM }

			add_character_modifier = {
				name = mother_chatting
				months = 5
			}

			hidden_effect = {
				random_list = {
					35 = {
						character_event = {
							id = HFP.20037 # Becomes more gregarious
							days = 10
							random = 10
						}
					}

					35 = {
						character_event = {
							id = HFP.20039 # Becomes more popular
							days = 10
							random = 10
						}
					}

					5 = {
						trigger = {
							is_main_spouse = yes
							has_lover = no

							OR = {
								trait = kind
								has_focus = focus_family
								trait = socializer
								trait = gregarious
							}

							spouse = {
								has_lover = no
								root_attraction_trigger = yes
								attracted_to_root_trigger = yes

								OR = {
									trait = kind
									has_focus = focus_family
									trait = socializer
									trait = gregarious
								}
							}
						}

						character_event = {
							id = HFP.20041 # Falls in love with husband
							days = 10
							random = 10
						}
					}

					25 = { } # Nothing
				}
			}
		}
		else = {
			FROM = { # Wife scope
				show_scope_change = no

				add_character_modifier = {
					name = mother_chatting
					months = 5
				}

				hidden_effect = {
					random_list = {
						35 = {
							character_event = {
								id = HFP.20037 # Becomes more gregarious
								days = 10
								random = 10
							}
						}

						35 = {
							character_event = {
								id = HFP.20039 # Becomes more popular
								days = 10
								random = 10
							}
						}

						5 = {
							trigger = {
								is_main_spouse = yes
								has_lover = no
								root_attraction_trigger = yes
								attracted_to_root_trigger = yes

								OR = {
									trait = kind
									has_focus = focus_family
									trait = socializer
									trait = gregarious
								}

								ROOT = {
									has_lover = no

									OR = {
										trait = kind
										has_focus = focus_family
										trait = socializer
										trait = gregarious
									}
								}
							}

							character_event = {
								id = HFP.20041 # Falls in love with husband
								days = 10
								random = 10
							}
						}

						25 = { } # Nothing
					}
				}
			}
		}

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 0.1
				trait = shy
			}

			mult_modifier = {
				factor = 0.1
				trait = paranoid
			}
		}
	}

	option = { # Keep working
		name = EVTOPTCHFP20030

		trigger = { character = FROM }

		ai_chance = { factor = 0 }
	}
}

# Dark rest: Mother's learning increases
character_event = {
	id = HFP.20031
	desc = EVTDESCHFPA20031
	picture = GFX_evt_woman_praying_hf

	is_triggered_only = yes

	immediate = {
		spouse = {
			character_event = { id = HFP.20032 }
		}
	}

	option = {
		name = EVTOPTAHFP20031

		change_learning = 1

	}
}

# Dark rest: Mother's learning increases - spouse notified
character_event = {
	id = HFP.20032
	desc = EVTDESCHFPA20032
	picture = GFX_evt_woman_praying_hf

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20032
	}
}

# Dark rest: Mother becomes paranoid due to seclusion
character_event = {
	id = HFP.20033
	desc = EVTDESCHFPA20033
	picture = GFX_evt_woman_praying_hf

	is_triggered_only = yes

	immediate = {
		spouse = {
			character_event = { id = HFP.20034 }
		}
	}

	option = {
		name = EVTOPTAHFP20033

		if = {
			limit = { trait = trusting }
			remove_trait = trusting
		}
		else_if = {
			limit = { trait = paranoid }

			custom_tooltip = {
				text = tooltip_health_deteriorates
				health = -0.25
			}
		}
		else = {
			add_trait = paranoid
		}
	}
}

# Dark rest: Mother becomes paranoid due to seclusion - spouse notified
character_event = {
	id = HFP.20034
	desc = EVTDESCHFPA20034
	picture = GFX_evt_woman_praying_hf

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20034
	}
}

# Dark rest: Mother becomes calmer due to seclusion
character_event = {
	id = HFP.20035
	desc = EVTDESCHFPA20035
	picture = GFX_evt_recovery

	is_triggered_only = yes

	immediate = {
		spouse = {
			character_event = { id = HFP.20036 }
		}
	}

	option = {
		name = EVTOPTAHFP20035

		if = {
			limit = { trait = stressed }
			remove_trait = stressed
		}
		else = {
			custom_tooltip = {
				text = tooltip_health_improves
				health = 0.25
			}
		}
	}
}

# Dark rest: Mother becomes calmer due to seclusion - spouse notified
character_event = {
	id = HFP.20036
	desc = EVTDESCHFPA20036
	picture = GFX_evt_recovery

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20036
	}
}

# Dark rest: Mother becomes more gregarious
character_event = {
	id = HFP.20037
	desc = EVTDESCHFPA20037
	picture = GFX_evt_state_diplomacy

	is_triggered_only = yes

	immediate = {
		spouse = {
			character_event = { id = HFP.20038 }
		}
	}

	option = {
		name = EVTOPTAHFP20037

		if = {
			limit = { trait = gregarious }
			change_diplomacy = 1
		}
		else_if = {
			limit = { trait = shy }
			remove_trait = shy
		}
		else = {
			add_trait = gregarious
		}
	}
}

# Dark rest: Mother becomes more gregarious - spouse notified
character_event = {
	id = HFP.20038
	desc = EVTDESCHFPA20038
	picture = GFX_evt_state_diplomacy

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20038
	}
}

# Dark rest: Mother becomes more popular
character_event = {
	id = HFP.20039
	desc = EVTDESCHFPA20039
	picture = GFX_evt_homage_hf

	is_triggered_only = yes

	immediate = {
		spouse = {
			character_event = { id = HFP.20040 }
		}
	}

	option = {
		name = EVTOPTAHFP20039

		add_character_modifier = {
			name = mother_popular
			years = 5
		}
	}
}

# Dark rest: Mother becomes more popular - spouse notified
character_event = {
	id = HFP.20040
	desc = EVTDESCHFPA20040
	picture = GFX_evt_homage_hf

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20040
	}
}

# Dark rest: Mother falls in love with husband
character_event = {
	id = HFP.20041
	desc = EVTDESCHFPA20041
	picture = GFX_evt_lovers
	portrait = spouse

	is_triggered_only = yes

	immediate = {
		spouse = {
			save_event_target_as = scoped_spouse
			character_event = { id = HFP.20042 }
		}
	}

	option = {
		name = EVTOPTAHFP20041

		add_lover = event_target:scoped_spouse
	}
}

# Dark rest: Mother falls in love with husband - spouse notified
character_event = {
	id = HFP.20042
	desc = EVTDESCHFPA20042
	picture = GFX_evt_lovers

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20042

		add_lover = FROM
	}

	option = {
		name = EVTOPTBHFP20042

		remove_lover = FROM

		ai_chance = { factor = 0 }
	}
}

#############################################################
# Pagan festival of fertility
# Only for Count or higher married rulers (or their main spouse)
# Only for Norse, Finnish, Romuva
# Goddesses mentioned for loc: Freyja (norse), Zemyna (Romuva/baltic), Akka (Finnish)

# Spouse: Organize fertility festival for wife
character_event = {
	id = HFP.20043
	desc = EVTDESCHFPA20043
	picture = GFX_evt_viking_throneroom_oldgods
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		OR = {
			religion_openly_norse_or_reformed_trigger = yes
			religion_openly_baltic_or_reformed_trigger = yes
			religion_openly_finnish_or_reformed_trigger = yes
		}

		FROM = {
			is_married = ROOT
			trait = pregnant
			is_alive = yes
			is_incapable = no
			is_pilgrim = no

			OR = { # Can be of different but similar religion
				religion_openly_norse_or_reformed_trigger = yes
				religion_openly_baltic_or_reformed_trigger = yes
				religion_openly_finnish_or_reformed_trigger = yes
			}

			NOR = {
				trait = troubled_pregnancy
				has_character_modifier = out_traveling
				has_character_modifier = mother_fertility_festival_1
				has_character_modifier = mother_fertility_festival_2
			}
		}
	}

	option = { # Organize full festival
		name = EVTOPTAHFP20043

		if = {
			limit = { ai = no }

			scaled_wealth = {
				value = -0.25
				min = -25
				max = -100
			}
		}

		tiered_piety_reward_effect = yes

		spouse = {
			show_scope_change = no

			add_character_modifier = {
				name = mother_fertility_festival_2
				years = 4
			}

			opinion = {
				name = opinion_swayed_2
				who = ROOT
				years = 4
			}

			character_event = { id = HFP.20045 }
		}

		ai_chance = {
			factor = 60

			mult_modifier = {
				factor = 1.5
				trait = zealous
			}

			mult_modifier = {
				factor = 1.5
				trait = charitable
			}

			mult_modifier = {
				factor = 0.5
				trait = greedy
			}

			mult_modifier = {
				factor = 0.5
				wealth < 25
			}
		}
	}

	option = { # Give proper offerings
		name = EVTOPTBHFP20043

		if = {
			limit = { ai = no }

			scaled_wealth = {
				value = -0.05
				min = -5
				max = -50
			}
		}

		spouse = {
			show_scope_change = no

			add_character_modifier = {
				name = mother_fertility_festival_1
				years = 2
			}

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

			character_event = { id = HFP.20044 } # Notify wife, end line
		}

		ai_chance = {
			factor = 20

			mult_modifier = {
				factor = 0.5
				trait = greedy
			}

		#	mult_modifier = {
		#		factor = 0.5
		#		wealth < 0
		#	}
		}
	}

	option = { # Not interested
		name = EVTOPTCHFP20043

		tiered_piety_negative_effect = yes

		ai_chance = { factor = 10 }
	}
}

# Fertility festival: Mother has just been honored
character_event = {
	id = HFP.20044
	desc = EVTDESCHFPA20044
	picture = GFX_evt_viking_throneroom_oldgods
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20044

		tooltip = {
			add_character_modifier = {
				name = mother_fertility_festival_1
				years = 2
			}

			opinion = {
				name = opinion_swayed_1
				who = FROM
				years = 2
			}
		}
	}
}

# Mother: Festival has been organized for you
character_event = {
	id = HFP.20045
	desc = EVTDESCHFPA20045
	picture = GFX_evt_viking_throneroom_oldgods
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { # Excited
		name = EVTOPTAHFP20045

		trigger = {
			OR = {
				trait = gregarious
				trait = proud
				trait = socializer
				trait = hedonist
			}
		}

		set_character_flag = flag_mother_festival_excited
		tiered_prestige_reward_effect = yes

		ai_chance = { factor = 40 }
	}

	option = { # Flattered
		name = EVTOPTBHFP20045

		ai_chance = { factor = 20 }
	}

	option = { # Humbled
		name = EVTOPTCHFP20045

		trigger = {
			OR = {
				trait = shy
				trait = chaste
				trait = humble
			}
		}

		set_character_flag = flag_mother_festival_humbled
		tiered_piety_reward_effect = yes

		ai_chance = { factor = 40 }
	}

	after = {
		tooltip = {
			add_character_modifier = {
				name = mother_fertility_festival_2
				years = 4
			}

			opinion = {
				name = opinion_swayed_2
				who = FROM
				years = 4
			}
		}

		hidden_effect = {
			random_list = {
				20 = { # Mother of the realm
					mult_modifier = {
						factor = 0.2
						has_character_flag = flag_mother_festival_excited
					}

					mult_modifier = {
						factor = 1.25
						trait = humble
					}

					mult_modifier = {
						factor = 1.25
						trait = kind
					}

					mult_modifier = {
						factor = 1.25
						trait = charitable
					}

					mult_modifier = {
						factor = 0.75
						trait = proud
					}

					mult_modifier = {
						factor = 0.75
						trait = envious
					}

					mult_modifier = {
						factor = 0.75
						trait = cruel
					}

					character_event = {
						id = HFP.20046
						days = 5
						random = 5
					}
				}

				20 = { # A goddess am I
					mult_modifier = {
						factor = 0.2
						has_character_flag = flag_mother_festival_humbled
					}

					mult_modifier = {
						factor = 1.25
						trait = proud
					}

					mult_modifier = {
						factor = 1.25
						trait = envious
					}

					mult_modifier = {
						factor = 1.25
						trait = cruel
					}

					mult_modifier = {
						factor = 0.85
						trait = humble
					}

					mult_modifier = {
						factor = 0.75
						trait = shy
					}

					character_event = {
						id = HFP.20047
						days = 5
						random = 5
					}
				}

				10 = { # The people rejoice
					mult_modifier = {
						factor = 1.15
						trait = charitable
					}

					mult_modifier = {
						factor = 1.15
						trait = gregarious
					}

					mult_modifier = {
						factor = 1.25
						is_attractive_trigger = yes
					}

					mult_modifier = {
						factor = 0.75
						is_unattractive_trigger = yes
					}

					character_event = {
						id = HFP.20049
						days = 5
						random = 5
					}
				}

				10 = { # Vassals are happy
					mult_modifier = {
						factor = 1.15
						trait = kind
					}

					mult_modifier = {
						factor = 1.15
						trait = gregarious
					}

					mult_modifier = {
						factor = 1.25
						is_attractive_trigger = yes
					}

					mult_modifier = {
						factor = 0.75
						is_unattractive_trigger = yes
					}

					character_event = {
						id = HFP.20050
						days = 5
						random = 5
					}
				}

				20 = { # Avatar of fertility
					mult_modifier = {
						factor = 0.2
						trait = celibate
					}

					mult_modifier = {
						factor = 1.25
						trait = hedonist
					}

					mult_modifier = {
						factor = 0.5
						trait = temperate
					}

					mult_modifier = {
						factor = 0.1
						practical_age >= 40
					}

					character_event = {
						id = HFP.20052
						days = 5
						random = 5
					}
				}

				20 = { # The virtue of the goddess
					mult_modifier = {
						factor = 1.25

						NOR = {
							trait = lustful
							trait = chaste
							trait = celibate
						}
					}

					character_event = {
						id = HFP.20053
						days = 5
						random = 5
					}
				}
			}

			clr_character_flag = flag_mother_festival_excited
			clr_character_flag = flag_mother_festival_humbled
		}
	}
}

# Mother: Festival - Mother of the realm
character_event = {
	id = HFP.20046
	desc = EVTDESCHFPA20046
	picture = GFX_evt_homage_hf
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { # Gregarious
		name = EVTOPTAHFP20046

		if = {
			limit = { trait = gregarious }
			change_diplomacy = 1
		}
		else_if = {
			limit = { trait = shy }
			remove_trait = shy
		}
		else = {
			add_trait = gregarious
		}

		set_character_flag = flag_mother_festival_gregarious

		ai_chance = { factor = 40 }
	}

	option = { # Kind
		name = EVTOPTBHFP20046

		if = {
			limit = { trait = kind }
			change_diplomacy = 1
		}
		else = {
			add_trait_partially_silently_kind_effect = yes
		}

		set_character_flag = flag_mother_festival_kind

		ai_chance = { factor = 40 }
	}

	option = { # Piety
		name = EVTOPTCHFP20046

		tiered_piety_reward_effect = yes
		set_character_flag = flag_mother_festival_piety

		ai_chance = { factor = 20 }
	}

	after = {
		if = {
			limit = { is_married = yes }
			spouse = { character_event = { id = HFP.20054 } } # Spouse notified
		}
		else = {
			clr_character_flag = flag_mother_festival_gregarious
			clr_character_flag = flag_mother_festival_kind
			clr_character_flag = flag_mother_festival_piety
		}
	}
}

# Mother: Festival - A goddess am I
character_event = {
	id = HFP.20047
	desc = EVTDESCHFPA20047
	picture = GFX_evt_homage_hf
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { # Proud
		name = EVTOPTAHFP20047

		trigger = {
			NOT = { trait = proud }
		}

		if = {
			limit = { trait = humble }
			remove_trait = humble
		}
		else = {
			add_trait = proud
		}

		set_character_flag = flag_mother_festival_proud

		ai_chance = { factor = 50 }
	}

	option = { # Ambitious
		name = EVTOPTBHFP20047

		trigger = {
			NOT = { trait = ambitious }
		}

		if = {
			limit = { trait = content }
			remove_trait = content
		}
		else = {
			add_trait = ambitious
		}

		if = {
			limit = { NOT = { trait = lunatic } }

			random = {
				chance = 30

				add_trait = lunatic
				character_event = { id = HFP.20048 }
			}
		}

		set_character_flag = flag_mother_festival_ambitious

		ai_chance = { factor = 10 }
	}

	option = { # Piety
		name = EVTOPTCHFP20047

		tiered_prestige_reward_effect = yes
		set_character_flag = flag_mother_festival_prestige

		ai_chance = { factor = 40 }
	}

	after = {
		if = {
			limit = { is_married = yes }
			spouse = { character_event = { id = HFP.20054 } } # Spouse notified
		}
		else = {
			clr_character_flag = flag_mother_festival_proud
			clr_character_flag = flag_mother_festival_ambitious
			clr_character_flag = flag_mother_festival_prestige
		}
	}
}

# Mother: Festival - Gone insane
character_event = {
	id = HFP.20048
	desc = EVTDESCHFPA20048
	picture = GFX_evt_lunatic
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20048
		tooltip_info = lunatic
	}
}

# Mother: Festival - People are happy
character_event = {
	id = HFP.20049
	desc = EVTDESCHFPA20049
	picture = GFX_evt_viking_throneroom_oldgods
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20049

		if = {
			limit = { higher_real_tier_than = BARON }

			capital_scope = {
				show_scope_change = no

				add_province_modifier = {
					name = fertility_festival_province
					years = 2
				}
			}
		}

		set_character_flag = flag_mother_festival_peasants

		if = {
			limit = { is_married = yes }
			spouse = { character_event = { id = HFP.20054 } } # Spouse notified
		}
		else = {
			clr_character_flag = flag_mother_festival_peasants
		}
	}
}

# Mother: Festival - Vassals are happy
character_event = {
	id = HFP.20050
	desc = EVTDESCHFPA20050
	picture = GFX_evt_viking_throneroom_oldgods
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20050

		if = {
			limit = { higher_real_tier_than = BARON }

			custom_tooltip = {
				text = tooltip_HFPA20050

				any_courtier_or_vassal = {
					limit = {
						religion = ROOT
						is_adult = yes

						OR = {
							is_theocracy = yes
							trait = zealous
							trait = theologian
						}
					}

					character_event = { id = HFP.20051 }

					opinion = {
						name = opinion_mother_goddess
						who = ROOT
						years = 5
					}
				}
			}
		}

		set_character_flag = flag_mother_festival_vassals

		if = {
			limit = { is_married = yes }
			spouse = { character_event = { id = HFP.20054 } } # Spouse notified
		}
		else = {
			clr_character_flag = flag_mother_festival_vassals
		}
	}
}

# Vassals notified of popular festival
character_event = {
	id = HFP.20051
	desc = EVTDESCHFPA20051
	picture = GFX_evt_viking_throneroom_oldgods
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20051

		tooltip = {
			opinion = {
				name = opinion_mother_goddess
				who = FROM
				years = 5
			}
		}
	}
}

# Mother: Festival - Fertility bonus
character_event = {
	id = HFP.20052
	desc = EVTDESCHFPA20052
	picture = GFX_evt_homage_hf
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { # Gluttonous
		name = EVTOPTAHFP20052

		if = {
			limit = { trait = gluttonous }

			gain_weight_small_effect = yes
			weight_trait_check_effect = yes
		}
		else = {
			add_trait_partially_silently_gluttonous_effect = yes
		}

		set_character_flag = flag_mother_festival_gluttonous

		ai_chance = { factor = 50 }
	}

	option = { # Drunkard
		name = EVTOPTBHFP20052

		if = {
			limit = { trait = drunkard }

			gain_weight_small_effect = yes
			weight_trait_check_effect = yes
		}
		else = {
			add_trait = drunkard
		}

		set_character_flag = flag_mother_festival_drunkard

		ai_chance = { factor = 30 }
	}

	after = {
		add_character_modifier = {
			name = mother_festival_blessing
			years = 5
		}

		if = {
			limit = { is_married = yes }
			spouse = { character_event = { id = HFP.20054 } } # Spouse notified
		}
		else = {
			clr_character_flag = flag_mother_festival_gluttonous
			clr_character_flag = flag_mother_festival_drunkard
		}
	}
}

# Mother: Festival - Godly virtues
character_event = {
	id = HFP.20053
	desc = EVTDESCHFPA20053
	picture = GFX_evt_homage_hf
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { # Chaste
		name = EVTOPTAHFP20053

		if = {
			limit = { trait = lustful }
			remove_trait = lustful
		}
		else_if = {
			limit = { trait = chaste }
			tiered_piety_reward_effect = yes
		}
		else = {
			add_trait = chaste
		}

		set_character_flag = flag_mother_festival_chaste

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 0.2
				trait = lustful
			}
		}
	}

	option = { # Lustful
		name = EVTOPTBHFP20053

		if = {
			limit = { trait = chaste }
			remove_trait = chaste
		}
		else_if = {
			limit = { trait = lustful }
			tiered_prestige_reward_effect = yes
		}
		else = {
			add_trait = lustful
		}

		set_character_flag = flag_mother_festival_lustful

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 0.2
				trait = chaste
			}
		}
	}

	after = {
		if = {
			limit = { is_married = yes }
			spouse = { character_event = { id = HFP.20054 } } # Spouse notified
		}
		else = {
			clr_character_flag = flag_mother_festival_chaste
			clr_character_flag = flag_mother_festival_lustful
		}
	}
}

# Husband: Notification event
character_event = {
	id = HFP.20054
	picture = GFX_evt_homage_hf
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESCHFPA20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_gregarious } }
	}
	desc = {
		text = EVTDESCHFPB20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_kind } }
	}
	desc = {
		text = EVTDESCHFPC20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_piety } }
	}
	desc = {
		text = EVTDESCHFPD20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_proud } }
	}
	desc = {
		text = EVTDESCHFPE20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_ambitious } }
	}
	desc = {
		text = EVTDESCHFPF20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_prestige } }
	}
	desc = {
		text = EVTDESCHFPG20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_peasants } }
	}
	desc = {
		text = EVTDESCHFPH20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_vassals } }
	}
	desc = {
		text = EVTDESCHFPI20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_gluttonous } }
	}
	desc = {
		text = EVTDESCHFPL20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_drunkard } }
	}
	desc = {
		text = EVTDESCHFPM20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_chaste } }
	}
	desc = {
		text = EVTDESCHFPN20054
		trigger = { FROM = { has_character_flag = flag_mother_festival_lustful } }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20054_A

		if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_gregarious } }

			FROM = { clr_character_flag = flag_mother_festival_gregarious }
			tiered_piety_reward_effect = yes
		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_kind } }

			FROM = { clr_character_flag = flag_mother_festival_kind }
			tiered_piety_reward_effect = yes
		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_piety } }

			FROM = { clr_character_flag = flag_mother_festival_piety }
			tiered_piety_reward_effect = yes
		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_proud } }

			FROM = { clr_character_flag = flag_mother_festival_proud }
			tiered_prestige_reward_effect = yes
		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_ambitious } }

			FROM = { clr_character_flag = flag_mother_festival_ambitious }
			tiered_prestige_reward_effect = yes
		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_prestige } }

			FROM = { clr_character_flag = flag_mother_festival_prestige }
			tiered_prestige_reward_effect = yes
		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_peasants } }

			FROM = { clr_character_flag = flag_mother_festival_peasants }

			if = {
				limit = { higher_real_tier_than = BARON }

				capital_scope = {
					show_scope_change = no

					add_province_modifier = {
						name = fertility_festival_province
						years = 2
					}
				}
			}
		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_vassals } }

			FROM = { clr_character_flag = flag_mother_festival_vassals }

			if = {
				limit = { higher_real_tier_than = BARON }

				custom_tooltip = {
					text = tooltip_HFPA20054

					any_courtier_or_vassal = {
						limit = {
							religion = ROOT
							is_adult = yes

							OR = {
								is_theocracy = yes
								trait = zealous
								trait = theologian
							}
						}

						character_event = { id = HFP.20051 }

						opinion = {
							name = opinion_mother_goddess
							who = FROM
							years = 5
						}
					}
				}
			}
		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_gluttonous } }

			FROM = { clr_character_flag = flag_mother_festival_gluttonous }
			tiered_prestige_reward_effect = yes

		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_drunkard } }

			FROM = { clr_character_flag = flag_mother_festival_drunkard }
			tiered_prestige_reward_effect = yes

		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_chaste } }

			FROM = { clr_character_flag = flag_mother_festival_chaste }
			tiered_piety_reward_effect = yes

		}
		else_if = {
			limit = { FROM = { has_character_flag = flag_mother_festival_lustful } }

			FROM = { clr_character_flag = flag_mother_festival_lustful }
			tiered_piety_reward_effect = yes
		}
	}
}

# Child was blessed by goddess, becomes beautiful a few years later
character_event = {
	id = HFP.20055
	picture = GFX_evt_guardian
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESCHFPA20055
		trigger = { is_female = yes }
	}
	desc = {
		text = EVTDESCHFPB20055
		trigger = { is_female = no }
	}

	is_triggered_only = yes

	trigger = {
		FROM = {
			is_alive = yes
			is_incapable = no

			NOR = {
				trait = maimed
				trait = disfigured
				trait = one_eyed
				trait = great_pox
				trait = leper
				trait = mangled
			}
		}
	}

	option = {
		name = EVTOPTAHFP20055

		FROM = {
			show_scope_change = no

			piety = 30
			add_trait = attractive
			give_nickname = nick_the_heavenly
		}
	}
}

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

# Father: mother dies before birth, child is born weakly and pale
character_event = {
	id = HFP.20056
	picture = GFX_evt_death

	desc = {
		text = EVTDESCHFPA20056
		trigger = {
			NOT = { has_character_flag = flag_loved_dead_mother }
		}
	}
	desc = {
		text = EVTDESCHFPB20056
		trigger = { has_character_flag = flag_loved_dead_mother }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20056

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 1.5
				trait = patient
			}

			mult_modifier = {
				factor = 0.1
				has_character_flag = flag_loved_dead_mother
			}
		}
	}

	option = {
		name = EVTOPTBHFP20056

		trigger = {
			NOT = { trait = kind }
		}

		opinion = {
			name = opinion_killed_wife
			years = 50
			who = event_target:hollow_baby
		}

		ai_chance = { factor = 50 }
	}

	after = {
		clr_character_flag = flag_loved_dead_mother
	}
}

# Hollow child gains specific trait
character_event = {
	id = HFP.20057
	desc = EVTDESCHFPA20057
	picture = GFX_evt_child_reading

	is_triggered_only = yes # on_yearly_childhood_pulse
	hide_from = yes

	has_character_flag = flag_hollow_child_primed
	min_age = 7
	max_age = 10

	trigger = {
		trait = malnourished

		NOR = {
			has_nickname = nick_the_pale_prince
			has_nickname = nick_the_hollow
			has_character_flag = flag_hollow_child
		}
	}

	option = {
		name = EVTOPTAHFP20057

		if = {
			limit = {
				OR = {
					trait = brooding
					trait = envious
				}
			}
			change_intrigue = 2
		}
		else = {
			if = {
				limit = { has_dlc = "Conclave" }
				add_trait = brooding
			}
			else = {
				add_trait = envious
			}
		}

		ai_chance = { factor = 80 }
	}

	option = {
		name = EVTOPTBHFP20057

		if = {
			limit = {
				OR = {
					trait = timid
					trait = shy
				}
			}
			change_intrigue = 2
		}
		else = {
			if = {
				limit = { has_dlc = "Conclave" }
				add_trait = timid
			}
			else = {
				add_trait = shy
			}
		}

		ai_chance = { factor = 20 }
	}

	after = {
		clr_character_flag = flag_hollow_child_primed
		set_character_flag = flag_hollow_child

		if = {
			limit = { has_minor_title = title_prince }
			give_nickname = nick_the_pale_prince
		}
		else = {
			give_nickname = nick_the_hollow
		}
	}
}

# Hollow child gains adulthood trait and modifier
character_event = {
	id = HFP.20058
	desc = EVTDESCHFPA20058
	picture = GFX_evt_child_reading

	is_triggered_only = yes # on_adolescence

	has_character_flag = flag_hollow_child
	only_capable = yes

	trigger = { trait = malnourished }

	option = {
		name = EVTOPTAHFP20058

		if = {
			limit = { trait = brave }
			change_martial = 2
		}
		else = {
			remove_trait_silently_craven_effect = yes
			add_trait = brave
		}

		add_character_modifier = {
			name = hollow_child_brave
			duration = -1
		}
	}

	option = {
		name = EVTOPTBHFP20058

		if = {
			limit = { trait = erudite }
			change_learning = 2
		}
		else = {
			add_trait = erudite
		}

		add_character_modifier = {
			name = hollow_child_erudite
			duration = -1
		}
	}

	option = {
		name = EVTOPTCHFP20058

		if = {
			limit = { trait = cruel }
			change_intrigue = 2
		}
		else = {
			remove_trait_silently_kind_effect = yes
			add_trait = cruel
		}

		add_character_modifier = {
			name = hollow_child_cruel
			duration = -1
		}
	}

	after = {
		character_event = {
			id = HFP.20059
			days = 5
		}

		clr_character_flag = flag_hollow_child
	}
}

# Hollow child modifier notification
character_event = {
	id = HFP.20059
	picture = GFX_evt_child_reading

	desc = {
		text = EVTDESCHFPA20059
		picture = GFX_evt_child_bully
		trigger = { has_character_modifier = hollow_child_brave }
	}
	desc = {
		text = EVTDESCHFPB20059
		picture = GFX_evt_child_reading
		trigger = { has_character_modifier = hollow_child_erudite }
	}
	desc = {
		text = EVTDESCHFPC20059
		picture = GFX_evt_child_bully
		trigger = { has_character_modifier = hollow_child_cruel }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20059

		father = {
			character_event = {
				id = HFP.20060
				days = 5
			}
		}

		if = {
			limit = { educator = { NOT = { is_father = ROOT } } }

			educator = {
				character_event = {
					id = HFP.20060
					days = 5
				}
			}
		}
	}
}

# Educator/Father notified of strange behavior
character_event = {
	id = HFP.20060
	picture = GFX_evt_child_reading

	desc = {
		text = EVTDESCHFPA20060
		picture = GFX_evt_child_bully
		trigger = { FROM = { has_character_modifier = hollow_child_brave } }
	}
	desc = {
		text = EVTDESCHFPB20060
		picture = GFX_evt_child_reading
		trigger = { FROM = { has_character_modifier = hollow_child_erudite } }
	}
	desc = {
		text = EVTDESCHFPC20060
		picture = GFX_evt_child_bully
		trigger = { FROM = { has_character_modifier = hollow_child_cruel } }
	}

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTAHFP20060
	}
}

# Spouse: Mother aborted child to avoid hard pregnancy
character_event = {
	id = HFP.20061
	picture = GFX_evt_quarrel

	desc = {
		text = EVTDESCHFPA20061
		trigger = {
			FROM = {
				OR = {
					has_character_modifier = adulteress
					has_character_modifier = incestuous_adulteress
				}
			}
		}
	}
	desc = {
		text = EVTDESCHFPB20061
		trigger = {
			FROM = {
				NOR = {
					has_character_modifier = adulteress
					has_character_modifier = incestuous_adulteress
				}
			}
		}
	}

	is_triggered_only = yes

	option = { # Not my problem
		name = EVTOPTAHFP20061

		trigger = {
			FROM = {
				OR = {
					has_character_modifier = adulteress
					has_character_modifier = incestuous_adulteress
				}
			}
		}

		ai_chance = { factor = 100 }
	}

	option = { # Denounce her
		name = EVTOPTBHFP20061

		trigger = {
			NOT = { trait = kind }

			FROM = {
				NOR = {
					has_character_modifier = adulteress
					has_character_modifier = incestuous_adulteress
				}
			}
		}

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

		FROM = {
			show_scope_change = no

			tooltip = {
				add_character_modifier = {
					name = cowardly_infanticide
					years = 100
				}

				tiered_prestige_negative_effect = yes
			}

			character_event = { id = HFP.20062 }
		}

		ai_chance = {
			factor = 80

			mult_modifier = {
				factor = 1.25
				trait = proud
			}

			mult_modifier = {
				factor = 1.5
				religion_group = christian
				trait = zealous
			}

			mult_modifier = {
				factor = 1.5
				trait = envious
			}

			mult_modifier = {
				factor = 1.25
				trait = paranoid
			}
		}
	}

	option = { # Forgive her
		name = EVTOPTCHFP20061

		trigger = {
			NOT = { trait = cruel }

			FROM = {
				NOR = {
					has_character_modifier = adulteress
					has_character_modifier = incestuous_adulteress
				}
			}
		}

		FROM = {
			show_scope_change = no

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

			character_event = { id = HFP.20063 }
		}

		tiered_piety_reward_effect = yes

		ai_chance = {
			factor = 30

			mult_modifier = {
				factor = 1.25
				trait = humble
			}

			mult_modifier = {
				factor = 1.5
				trait = kind
			}

			mult_modifier = {
				factor = 1.5
				trait = trusting
			}
		}
	}

	option = { # Do not care
		name = EVTOPTDHFP20061

		trigger = {
			FROM = {
				NOR = {
					has_character_modifier = adulteress
					has_character_modifier = incestuous_adulteress
				}
			}
		}

		ai_chance = { factor = 0 }
	}
}

# Mother's crime exposed
character_event = {
	id = HFP.20062
	desc = EVTDESCHFPA20062
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20062

		add_character_modifier = {
			name = cowardly_infanticide
			years = 100
		}
	}
}

# Mother was forgiven
character_event = {
	id = HFP.20063
	desc = EVTDESCHFPA20063
	picture = GFX_evt_lovers

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20063

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

			tiered_prestige_negative_effect = yes
		}
	}
}

# Mother becomes depressed/insane after abortion
character_event = {
	id = HFP.20064
	desc = EVTDESCHFPA20064
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20064

		if = {
			limit = { NOT = { trait = depressed } }
			add_trait = depressed
		}
		else_if = {
			limit = { NOT = { trait = lunatic } }
			add_trait = lunatic
		}
		else = {
			health = -1.0
		}
	}
}

# Mother inadvertedly reveals her crime during night terror
character_event = {
	id = HFP.20065
	desc = EVTDESCHFPA20065
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	trigger = {
		NOT = { has_character_modifier = cowardly_infanticide } # Not if husband discovered and denounced the crime in the meantime already
	}

	option = {
		name = EVTOPTAHFP20065

		add_character_modifier = {
			name = cowardly_infanticide
			years = 100
		}
	}
}

# Mother bleeds, loses fertility
character_event = {
	id = HFP.20066
	desc = EVTDESCHFPA20066
	picture = GFX_evt_bad_news

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20066

		fertility = -0.25
	}
}

# Notify lover that his lover is pregnant
character_event = {
	id = HFP.20067
	picture = GFX_evt_pregnancy

	desc = {
		text = EVTDESCHFPA20067
		trigger = {
			FROM = { is_married = no }
		}
	}
	desc = {
		text = EVTDESCHFPB20067
		trigger = {
			FROM = { is_married = yes }
		}
	}

	is_triggered_only = yes

	trigger = {
		NOT = { is_married = FROM } # Otherwise double notification
	}

	option = {
		name = {
			text = EVTOPTAHFP20067
			trigger = {
				FROM = { is_married = no }
			}
		}
		name = {
			text = EVTOPTBHFP20067
			trigger = {
				FROM = { is_married = yes }
			}
		}
	}

}

# Cleanup on_birth event to remove illegitimate trait gained when a wife gives birth after the death of her husband
character_event = {
	id = HFP.20068

	is_triggered_only = yes # on_birth
	hide_window = yes

	trigger = {
		father_even_if_dead = {
			is_alive = no
			NOT = { trait = eunuch }
		}

		mother_even_if_dead = {
			NOR = {
				has_character_modifier = adulteress
				has_character_modifier = incestuous_adulteress
			}
		}
	}

	immediate = {
		remove_trait = bastard
		remove_trait = legit_bastard
	}
}

# Wife notified of kindred spirit I
character_event = {
	id = HFP.20069
	desc = EVTDESCHFPA20069
	picture = GFX_evt_fancy_feast

	is_triggered_only = yes

	ai = no

	trigger = {
		is_married = FROM
	}

	option = {
		name = EVTOPTAHFP20069

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

# Wife notified of kindred spirit II
character_event = {
	id = HFP.20070
	desc = EVTDESCHFPA20070
	picture = GFX_evt_homage_hf

	ai = no

	trigger = {
		is_married = FROM
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTAHFP20070

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