#############################################
#
# EVENTS FOR LOVE, PREGNANCY AND BIRTH
#
#############################################
# by Henrik Fhraeus
#############################################

#############################################
# EVENTS LEADING UP TO BASTARD PREGNANCY
#############################################

#############################################
# PREGNANCY STARTS SHOWING EVENTS
#############################################

# On-action event: Pregnancy starts showing
character_event = {
	id = 400
	desc = EVTDESC400
	picture = GFX_evt_pregnancy
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { trait = pregnant }
		father_of_unborn = { any_spouse = { character = ROOT } }
	}
	
	option = {
		name = OK
		add_trait = pregnant
		prestige = 10
		
		if = {
			limit = { father_of_unborn = { is_alive = yes } }
			father_of_unborn = { character_event = { id = 403 tooltip = EVTTOOLTIP403 } }
		}
	}
}

# On-action event: Pregnancy out of wedlock!
character_event = {
	id = 401
	desc = EVTDESC401
	picture = GFX_evt_pregnancy
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { trait = pregnant }
		father_of_unborn_known = yes
		father_of_unborn = { NOT = { any_spouse = { character = ROOT } } }
	}
	
	option = {
		name = OK
		add_trait = pregnant
		if = {
			limit = {
				OR = {
					religion = bio_directionist
					religion = terran_imperial
					religion = neo_feudal
					religion_group = religious_group
				}
			}
			piety = -50
			prestige = -50
			if = {
				limit = { father_of_unborn = { is_alive = yes } }
				father_of_unborn = { character_event = { id = 405 tooltip = EVTTOOLTIP405 } }
				break = yes
			}
		}
		if = {
			limit = { father_of_unborn = { is_alive = yes } }
			father_of_unborn = { character_event = { id = 403 tooltip = EVTTOOLTIP403 } }
		}
	}
}

# On-action event: Pregnancy in matrimony, with another father!
character_event = {
	id = 402
	desc = EVTDESC402
	picture = "GFX_evt_pregnancy"
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { trait = pregnant }
		father_of_unborn_known = no
		father_of_unborn = { NOT = { any_spouse = { character = ROOT } } }
	}
	
	option = {
		name = EVTOPTA402
		add_trait = pregnant
		spouse = { character_event = { id = 404 tooltip = EVTTOOLTIP404 } }
	}
}

# The husband is a proud father!
character_event = {
	id = 403
	picture = GFX_evt_pregnancy
	
	is_triggered_only = yes 
	
	desc = EVTDESC403

	option = {
		name = OK
		prestige = 5
	}
}

# The husband suspects something ain't right
character_event = {
	id = 404
	picture = GFX_evt_pregnancy
	
	is_triggered_only = yes 
	
	desc = EVTDESC404

	option = {
		name = EVTOPTA404
		if = {
			limit = { FROM = { father_of_unborn_known = yes } }
			opinion = { who = FROM modifier = opinion_potential_cuckold months = 7 }
		}
	}
}

# The actual father may be disgraced
character_event = {
	id = 405
	picture = GFX_evt_pregnancy
	
	is_triggered_only = yes 
	
	desc = EVTDESC405

	option = {
		name = OK
		if = {
			limit = {
				OR = {
					religion = neo_feudal
					religion = terran_imperial
					religion = bio_directionist
					religion_group = religious_group
				}
			}
			piety = -50
			prestige = -50
		}
	}
}

# Consort: Pregnancy starts showing
character_event = {
	id = 410
	desc = EVTDESC410
	picture = GFX_evt_pregnancy
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { trait = pregnant }
		father_of_unborn = {
			is_consort = ROOT
		}
	}
	
	option = {
		name = OK
		add_trait = pregnant
		prestige = 10
		
		if = {
			limit = {
				father_of_unborn = {
					is_alive = yes
				}
			}
			father_of_unborn = { character_event = { id = 413 tooltip = EVTTOOLTIP413 } }
		}
	}
}

# Consort: Pregnancy with another father!
character_event = {
	id = 412
	desc = EVTDESC412
	picture = "GFX_evt_pregnancy"
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { trait = pregnant }
		is_consort = yes
		father_of_unborn = {
			NOT = {
				is_consort = ROOT		
			}
		}
	}
	
	option = {
		name = EVTOPTA412
		add_trait = pregnant
		consort = { character_event = { id = 414 tooltip = EVTTOOLTIP414 } }
	}
}

# The consort's liege is a proud father!
character_event = {
	id = 413
	picture = GFX_evt_pregnancy
	
	is_triggered_only = yes 
	
	desc = EVTDESC413

	option = {
		name = OK
		prestige = 5
	}
}

# The consort's liege suspects something ain't right
character_event = {
	id = 414
	picture = GFX_evt_pregnancy
	
	is_triggered_only = yes 
	
	desc = EVTDESC414

	option = {
		name = EVTOPTA414
		if = {
			limit = {
				FROM = {
					father_of_unborn_known = yes
				}
			}
			opinion = {
				who = FROM
				modifier = opinion_potential_cuckold
				months = 7
			}
		}
	}
}

#############################################
# EVENTS ON THE BIRTH OF A BASTARD CHILD
#############################################
# On-action event: A bastard child is born, but is not recognized as such by the spouse of the mother
character_event = {
	id = 318
	desc = "EVTDESC318"
	picture = "GFX_evt_birth"
	
	is_triggered_only = yes 
	
	trigger = {
		real_father = {
			is_alive = yes
			ROOT = {
				father = {
					NOT = { character = PREVPREV }
				}
			}
		}
	}

	option = {
		name = "OK"
		real_father = {
			character_event = { id = 319 } # The real father is notified
		}
	}
}

character_event = {
	id = 319
	desc = "EVTDESC319"
	picture = "GFX_evt_birth"
	
	is_triggered_only = yes 
	
	option = {
		name = "EVTOPTA319"
		piety = -1
	}
}
