#############################################
#											#
# RIP Symptom and Disease events			#
# ID RIP.5000 - RIP.5100					#
#											#
#############################################

namespace = RIP

### Disease is set when first symptom is gained

# Cough can lead to
# - pneumonia
# - consumption
# - measles
# - flu
# - cancer
character_event = {
	id = RIP.5000
	desc = EVTDESCRIP.5000
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = cough

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_pneumonia
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.5

						age >= 6
						practical_age < 45
					}

					mult_modifier = {
						factor = 0.5
						health >= 5
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_pneumonia
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5011 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_consumption
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_consumption
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_consumption
						set_character_flag = developing_illness
					}

					if = {
						limit = { has_character_flag = got_consumption }

						character_event = {
							id = RIP.5015
							days = 14
							random = 14
						}
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_measles
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_measles
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_measles
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5018 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_flu
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_flu
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5020 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_cancer
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.15
						is_adult = no
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 45
					}

					mult_modifier = {
						factor = 2
						practical_age >= 45
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_cancer
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5025 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious }
						}

						set_character_flag = disease_not_serious

						# Remove cough
						random_list = {
							33 = { character_event = { id = RIP.11002 days =  10 random =  30 } }
							33 = { character_event = { id = RIP.11002 days =  90 random =  30 } }
							33 = { character_event = { id = RIP.11002 days = 700 random = 100 } }
						}
					}
				}
			}
		}
	}
}

# Fever can lead to
# - pneumonia
# - syphilis
# - consumption
# - slow_fever
# - camp_fever
# - bubonic_plague
# - measles smallpox/aztec_disease
# - flu
# - dysentery
# - gout
# - food_poisoning
# - rabies
character_event = {
	id = RIP.5001
	desc = EVTDESCRIP.5001
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = fever

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_pneumonia
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.5

						age >= 6
						practical_age < 45
					}

					mult_modifier = {
						factor = 0.5
						health >= 5
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_pneumonia
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5011 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						is_adult = yes
						year < 1000

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_syphilis
						}

						NOR = {
							has_character_flag = disease_not_serious
							trait = celibate
						}
					}

					mult_modifier = {
						factor = 0.01
						trait = chaste
					}

					# CK2Plus
					mult_modifier = {
						factor = 0.5
						year < 1200
					}

					mult_modifier = {
						factor = 0.1

						year < 1350
						NOT = { has_global_flag = aztec_arrival }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_syphilis
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5014 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_consumption
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_consumption
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_consumption
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5015 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_slow_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_slow_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_slow_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5016 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_camp_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_camp_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_camp_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5017 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_bubonic_plague
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_bubonic_plague
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_bubonic_plague
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5012 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_measles
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_measles
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_measles
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5018
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_smallpox
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_smallpox
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_smallpox
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5019 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						has_global_flag = aztec_arrival

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_aztec_disease
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_aztec_disease
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_aztec_disease
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5019 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_flu
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_flu
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5020 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_dysentery
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_dysentery
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5021 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						is_adult = yes

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_gout
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 30
					}

					mult_modifier = {
						factor = 2
						practical_age >= 30
					}

					mult_modifier = {
						factor = 2
						trait = gluttonous
					}

					mult_modifier = {
						factor = 2
						trait = drunkard
					}

					mult_modifier = {
						factor = 2
						trait = hedonist
					}

					mult_modifier = {
						factor = 1.5
						has_focus = focus_carousing
					}

					mult_modifier = {
						factor = 0.5
						trait = temperate
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_gout
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5022 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						age >= 4

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_food_poisoning
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.1
						age < 6
					}

					mult_modifier = {
						factor = 0.5
						age < 13
					}

					mult_modifier = {
						factor = 1.5
						trait = gluttonous
					}

					mult_modifier = {
						factor = 1.5
						trait = hedonist
					}

					mult_modifier = {
						factor = 1.5
						has_focus = focus_carousing
					}

					mult_modifier = {
						factor = 0.5
						trait = temperate
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_food_poisoning
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5023 # Disease develops
						days = 6
						random = 6
					}
				}

				10 = { # Uncommon
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_rabies
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_rabies
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5024 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious }
						}

						set_character_flag = disease_not_serious

						character_event = {
							id = RIP.11003 # Remove fever
							days = 10
							random = 30
						}
					}
				}
			}
		}
	}
}

# Diarrhea can lead to
# - slow_fever
# - camp_fever
# - flu
# - dysentery
# - food_poisoning
# - cancer
character_event = {
	id = RIP.5002
	desc = EVTDESCRIP.5002
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = diarrhea

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_slow_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_slow_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_slow_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5016 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_camp_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_camp_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_camp_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5017 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_flu
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 2
						age < 13
					}

					mult_modifier = {
						factor = 0.5
						age >= 13
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_flu
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5020 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_dysentery
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_dysentery
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5021 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						age >= 4

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_food_poisoning
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.1
						age < 6
					}

					mult_modifier = {
						factor = 0.5
						age < 13
					}

					mult_modifier = {
						factor = 1.5
						trait = gluttonous
					}

					mult_modifier = {
						factor = 1.5
						trait = hedonist
					}

					mult_modifier = {
						factor = 1.5
						has_focus = focus_carousing
					}

					mult_modifier = {
						factor = 0.5
						trait = temperate
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_food_poisoning
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5023
						days = 6
						random = 6
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_cancer
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.15
						is_adult = no
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 45
					}

					mult_modifier = {
						factor = 2
						practical_age >= 45
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_cancer
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5025 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious }
						}

						set_character_flag = disease_not_serious

						character_event = {
							id = RIP.11004 # Remove diarrhea
							days = 10
							random = 30
						}
					}
				}
			}
		}
	}
}

# Vomiting can lead to
# - flu
# - food_poisoning
# - cancer
character_event = {
	id = RIP.5003
	desc = EVTDESCRIP.5003
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = vomiting

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_flu
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 2
						age < 13
					}

					mult_modifier = {
						factor = 0.5
						age >= 13
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_flu
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5020 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						age >= 4

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_food_poisoning
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.1
						age < 6
					}

					mult_modifier = {
						factor = 0.5
						age < 13
					}

					mult_modifier = {
						factor = 1.5
						trait = gluttonous
					}

					mult_modifier = {
						factor = 1.5
						trait = hedonist
					}

					mult_modifier = {
						factor = 1.5
						has_focus = focus_carousing
					}

					mult_modifier = {
						factor = 0.5
						trait = temperate
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_food_poisoning
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5023 # Disease develops
						days = 6
						random = 6
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_cancer
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.15
						is_adult = no
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 45
					}

					mult_modifier = {
						factor = 2
						practical_age >= 45
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_cancer
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5025 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious }
						}

						set_character_flag = disease_not_serious

						character_event = {
							id = RIP.11005 # Remove vomiting
							days = 10
							random = 30
						}
					}
				}
			}
		}
	}
}

# Headache can lead to
# - syphilis
# - camp_fever
# - smallpox
# - aztec_disease
# - flu
# - cancer
character_event = {
	id = RIP.5004
	desc = EVTDESCRIP.5004
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = headache

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				100 = {
					trigger = {
						is_adult = yes
						year < 1000

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_syphilis
						}

						NOR = {
							has_character_flag = disease_not_serious
							trait = celibate
						}
					}

					mult_modifier = {
						factor = 0.01
						trait = chaste
					}

					mult_modifier = {
						factor = 0.75

						is_female = yes
						NOT = { trait = lustful }
					}

					# CK2Plus
					mult_modifier = {
						factor = 0.5
						year < 1200
					}

					mult_modifier = {
						factor = 0.1

						year < 1350
						NOT = { has_global_flag = aztec_arrival }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_syphilis
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5014 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_camp_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_camp_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_camp_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5017 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_smallpox
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_smallpox
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_smallpox
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5019 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						has_global_flag = aztec_arrival

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_azz
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_aztec_disease
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_aztec_disease
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5019 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_flu
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_flu
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5020 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_cancer
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.15
						is_adult = no
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 45
					}

					mult_modifier = {
						factor = 2
						practical_age >= 45
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_cancer
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5025 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious }
						}

						set_character_flag = disease_not_serious

						# Remove headache
						random_list = {
							33 = { character_event = { id = RIP.11009 days =  10 random =  30 } }
							33 = { character_event = { id = RIP.11009 days =  90 random =  45 } }
							33 = { character_event = { id = RIP.11009 days = 700 random = 100 } }
						}
					}
				}
			}
		}
	}
}

# chest_pain can lead to
# - pneumonia
# - consumption
# - cancer
character_event = {
	id = RIP.5005
	desc = EVTDESCRIP.5005
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = chest_pain

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_pneumonia
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.5

						age >= 6
						practical_age < 45
					}

					mult_modifier = {
						factor = 0.5
						health >= 5
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_pneumonia
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5011 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_consumption
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_consumption
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_consumption
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5015 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_cancer
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.15
						is_adult = no
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 45
					}

					mult_modifier = {
						factor = 2
						practical_age >= 45
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_cancer
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5025 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious }
						}

						# Remove chest pains
						# Chest pains can last a long time
						random_list = {
							25 = { character_event = { id = RIP.11006 years =  5 random = 200 } }
							25 = { character_event = { id = RIP.11006 years = 10 random = 365 } }

							25 = {
								mult_modifier = {
									factor = 3
									practical_age >= 50
								}

								character_event = { id = RIP.11006 years = 20 random = 3650 }
							}

							25 = {
								mult_modifier = {
									factor = 5
									practical_age < 30
								}

								character_event = { id = RIP.11006 months = 1 random = 60 }

								# Only protected from other illness if this is a short term effect
								set_character_flag = disease_not_serious
							}
						}
					}
				}
			}
		}
	}
}

# Cramps can lead to
# - food_poisoning
# - bubonic_plague
character_event = {
	id = RIP.5006
	desc = EVTDESCRIP.5006
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = cramps

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				100 = {
					trigger = {
						age >= 4

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_food_poisoning
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.1
						age < 6
					}

					mult_modifier = {
						factor = 0.5
						age < 13
					}

					mult_modifier = {
						factor = 1.5
						trait = gluttonous
					}

					mult_modifier = {
						factor = 1.5
						trait = hedonist
					}

					mult_modifier = {
						factor = 1.5
						has_focus = focus_carousing
					}

					mult_modifier = {
						factor = 0.5
						trait = temperate
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_food_poisoning
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5023 # Disease develops
						days = 6
						random = 6
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_bubonic_plague
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_bubonic_plague
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_bubonic_plague
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5012
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious }
						}

						set_character_flag = disease_not_serious

						character_event = {
							id = RIP.11007 # Remove cramps
							days = 10
							random = 30
						}
					}
				}
			}
		}
	}
}

# Rash can lead to
# - syphilis
# - camp_fever
# - measles
# - smallpox/aztec_disease
character_event = {
	id = RIP.5007
	desc = EVTDESCRIP.5007
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	hide_from = yes

	is_triggered_only = yes

	option = {
		name = ALAS

		add_trait = rash

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				100 = {
					trigger = {
						is_adult = yes
						year < 1000

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_syphilis
						}

						NOR = {
							has_character_flag = disease_not_serious
							trait = celibate
						}
					}

					mult_modifier = {
						factor = 0.01
						trait = chaste
					}

					# CK2Plus
					mult_modifier = {
						factor = 0.5
						year < 1200
					}

					mult_modifier = {
						factor = 0.1

						year < 1350
						NOT = { has_global_flag = aztec_arrival }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_syphilis
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5014 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_camp_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_camp_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_camp_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5017 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_measles
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_measles
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_measles
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5018 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_smallpox
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_smallpox
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_smallpox
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5019 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						has_global_flag = aztec_arrival

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_aztec_disease
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_aztec_disease
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_aztec_disease
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5019 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious }
						}

						set_character_flag = disease_not_serious

						# Remove rash
						random_list = {
							33 = { character_event = { id = RIP.11008 days =  10 random = 30 } }
							33 = { character_event = { id = RIP.11008 months = 3 random = 45 } }
							33 = { character_event = { id = RIP.11008 years =  1 random = 120 } }
						}
					}
				}
			}
		}
	}
}

# abdominal_pain can lead to
# - slow_fever
# - camp_fever
# - flu
# - dysentery
# - cancer
character_event = {
	id = RIP.5008
	desc = EVTDESCRIP.5008
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = abdominal_pain

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_slow_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_slow_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_slow_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5016 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_camp_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_camp_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_camp_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5017 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_flu
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_flu
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5020 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_dysentery
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_dysentery
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5021 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_cancer
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.15
						is_adult = no
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 45
					}

					mult_modifier = {
						factor = 2
						practical_age >= 45
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_cancer
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5025 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOR = {
								has_character_flag = developing_illness
								has_character_flag = disease_not_serious
							}
						}

						set_character_flag = disease_not_serious

						# Remove abdominal_pain
						random_list = {
							33 = { character_event = { id = RIP.11010 days =  10 random = 30 } }
							33 = { character_event = { id = RIP.11010 months = 3 random = 45 } }
							33 = { character_event = { id = RIP.11010 months = 6 random = 60 } }
						}
					}
				}
			}
		}
	}
}

# Fatigue can lead to
# - consumption
# - camp_fever
# - flu
# - gout
# - rabies
# - cancer
character_event = {
	id = RIP.5009
	desc = EVTDESCRIP.5009
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = fatigue

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_consumption
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_consumption
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_consumption
						set_character_flag = developing_illness
					}


					character_event = {
						id = RIP.5015 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_camp_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_camp_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_camp_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5017 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_flu
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_flu
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5020 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						is_adult = yes

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_gout
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 30
					}

					mult_modifier = {
						factor = 2
						practical_age >= 30
					}

					mult_modifier = {
						factor = 2
						trait = gluttonous
					}

					mult_modifier = {
						factor = 2
						trait = drunkard
					}

					mult_modifier = {
						factor = 2
						trait = hedonist
					}

					mult_modifier = {
						factor = 1.5
						has_focus = focus_carousing
					}

					mult_modifier = {
						factor = 0.5
						trait = temperate
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_gout
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5022 # Disease develops
						days = 14
						random = 14
					}
				}

				10 = { # Uncommon
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_rabies
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness}
						}

						set_character_flag = got_rabies
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5024 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_cancer
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.15
						is_adult = no
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 45
					}

					mult_modifier = {
						factor = 2
						practical_age >= 45
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness}
						}

						set_character_flag = got_cancer
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5025 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOT = { has_character_flag = disease_not_serious}
						}

						set_character_flag = disease_not_serious

						# Remove fatigue
						random_list = {
							33 = { character_event = { id = RIP.11011 days =  10 random = 30 } }
							33 = { character_event = { id = RIP.11011 months = 3 random = 45 } }
							33 = { character_event = { id = RIP.11011 months = 6 random = 60 } }
						}
					}
				}
			}
		}
	}
}

# Malaise can lead to
# - slow_fever
# - bubonic_plague
# - smallpox/aztec_disease
# - rabies
# - cancer
# - flu
character_event = {
	id = RIP.5010
	desc = EVTDESCRIP.5010
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = malaise

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			random_list = {
				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_slow_fever
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_slow_fever
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness}
						}

						set_character_flag = got_slow_fever
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5016 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_bubonic_plague
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_bubonic_plague
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_bubonic_plague
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5012 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_smallpox
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_smallpox
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_smallpox
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5019 # Disease develops
						days = 14
						random = 14
					}
				}

				1 = { # Rare when not an epidemic
					trigger = {
						has_global_flag = aztec_arrival

						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_aztec_disease
						}

						NOR = {
							has_character_flag = disease_not_serious
							has_character_flag = immune_aztec_disease
						}
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_aztec_disease
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5019 # Disease develops
						days = 14
						random = 14
					}
				}

				10 = { # Uncommon
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_rabies
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_rabies
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5024 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_cancer
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					mult_modifier = {
						factor = 0.25
						is_adult = no
					}

					mult_modifier = {
						factor = 0.25
						practical_age < 45
					}

					mult_modifier = {
						factor = 2
						practical_age >= 45
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_cancer
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5025 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						trigger_if = {
							limit = { has_character_flag = developing_illness }
							has_character_flag = got_flu
						}

						NOT = { has_character_flag = disease_not_serious }
					}

					if = {
						limit = {
							NOT = { has_character_flag = developing_illness }
						}

						set_character_flag = got_flu
						set_character_flag = developing_illness
					}

					character_event = {
						id = RIP.5032 # Disease develops
						days = 14
						random = 14
					}
				}

				100 = {
					trigger = {
						NOT = { has_character_flag = developing_illness }
					}

					if = {
						limit = {
							NOR = {
								has_character_flag = developing_illness
								has_character_flag = disease_not_serious
							}
						}

						set_character_flag = disease_not_serious

						# Remove malaise
						random_list = {
							33 = { character_event = { id = RIP.11012 days =  10 random = 30 } }
							33 = { character_event = { id = RIP.11012 months = 3 random = 45 } }
							33 = { character_event = { id = RIP.11012 months = 6 random = 60 } }
						}
					}
				}
			}
		}
	}
}

### Diseases develop

# Pneumonia:
# - cough
# - chest_pain
# - fever
character_event = {
	id = RIP.5011

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_pneumonia

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = cough
						trait = fever
						trait = chest_pain
					}
				}

				add_pneumonia_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = cough
						trait = chest_pain
						trait = fever
					}
				}

				character_event = {
					id = RIP.5026 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Syphilis (Great Pox/Aztec disease):
# - rash
# - fever
# - headache
character_event = {
	id = RIP.5014

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_syphilis

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = rash
						trait = fever
						trait = headache
					}
				}

				add_syphilis_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = rash
						trait = fever
						trait = headache
					}
				}

				character_event = {
					id = RIP.5027 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Tuberculosis:
# - cough
# - chest_pain
# - fever
# - fatigue
character_event = {
	id = RIP.5015

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_consumption

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = cough
						trait = chest_pain
						trait = fever
						trait = fatigue
					}
				}

				add_consumption_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = cough
						trait = chest_pain
						trait = fever
						trait = fatigue
					}
				}

				character_event = {
					id = RIP.5028 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Typhoid Fever:
# - malaise
# - fever
# - diarrhea
# - abdominal_pain
character_event = {
	id = RIP.5016

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_slow_fever

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = malaise
						trait = fever
						trait = diarrhea
						trait = abdominal_pain
					}
				}

				add_typhoid_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = malaise
						trait = fever
						trait = diarrhea
						trait = abdominal_pain
					}
				}

				character_event = {
					id = RIP.5029 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Typhus:
# - fever
# - headache
# - rash
# - fatigue
# - diarrhea
# - abdominal_pain
character_event = {
	id = RIP.5017

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_camp_fever

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = fever
						trait = headache
						trait = rash
						trait = fatigue
						trait = diarrhea
						trait = abdominal_pain
					}
				}

				add_camp_fever_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = fever
						trait = headache
						trait = rash
						trait = fatigue
						trait = diarrhea
						trait = abdominal_pain
					}
				}

				character_event = {
					id = RIP.5040 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Bubonic Plague:
# - malaise
# - fever
# - cramps
character_event = {
	id = RIP.5012

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_bubonic_plague

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = malaise
						trait = fever
						trait = cramps
					}
				}

				add_plague_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = malaise
						trait = fever
						trait = cramps
					}
				}

				character_event = { id = RIP.5013 } # Disease develops
			}
		}
	}
}

# Measles:
# - rash
# - fever
# - cough
character_event = {
	id = RIP.5018

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_measles

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = rash
						trait = fever
						trait = cough
					}
				}

				add_measles_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = rash
						trait = fever
						trait = cough
					}
				}

				character_event = {
					id = RIP.5031 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Smallpox:
# - malaise
# - fever
# - headache
# - rash
character_event = {
	id = RIP.5019

	is_triggered_only = yes
	hide_window = yes

	trigger = {
		OR = {
			has_character_flag = got_smallpox
			has_character_flag = got_aztec_disease
		}
	}

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = malaise
						trait = fever
						trait = headache
						trait = rash
					}
				}

				add_smallpox_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = malaise
						trait = fever
						trait = headache
						trait = rash
					}
				}

				# Disease develops
				if = {
					limit = { has_character_flag = got_smallpox }

					character_event = {
						id = RIP.5030
						days = 20
						random = 20
					}
				}
				else = {
					character_event = {
						id = RIP.5038
						days = 20
						random = 20
					}
				}
			}
		}
	}
}

# Flu:
# - malaise
# - fever
# - cough
# - fatigue
# - headache
# - diarrhea
# - abdominal_pain
character_event = {
	id = RIP.5020

	hide_window = yes
	is_triggered_only = yes

	has_character_flag = got_flu

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = malaise
						trait = fever
						trait = cough
						trait = fatigue
						trait = headache
						trait = diarrhea
						trait = abdominal_pain
					}
				}

				add_flu_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = malaise
						trait = fever
						trait = cough
						trait = fatigue
						trait = headache
						trait = diarrhea
						trait = abdominal_pain
					}
				}

				character_event = {
					id = RIP.5032 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Dysentery:
# - diarrhea
# - fever
# - abdominal_pain
character_event = {
	id = RIP.5021

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_dysentery

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = diarrhea
						trait = fever
						trait = abdominal_pain
					}
				}

				add_dysentery_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = diarrhea
						trait = fever
						trait = abdominal_pain
					}
				}

				character_event = {
					id = RIP.5033 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Gout:
# - fever
# - fatigue
character_event = {
	id = RIP.5022

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_gout

	immediate = {
		random_list = {
			100 = {
				trigger = {
					NAND = {
						trait = fever
						trait = fatigue
					}
				}

				add_gout_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = fever
						trait = fatigue
					}
				}

				character_event = {
					id = RIP.5034 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Food poisoning:
# - vomiting
# - diarrhea
# - cramps
# - fever
character_event = {
	id = RIP.5023

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_food_poisoning

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = vomiting
						trait = diarrhea
						trait = cramps
						trait = fever
					}
				}

				add_food_poisoning_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = vomiting
						trait = diarrhea
						trait = cramps
						trait = fever
					}
				}

				character_event = {
					id = RIP.5035 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Rabies:
# - fever
# - malaise
# - fatigue
character_event = {
	id = RIP.5024

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_rabies

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = malaise
						trait = fever
						trait = fatigue
					}
				}

				add_rabies_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = malaise
						trait = fever
						trait = fatigue
					}
				}

				character_event = {
					id = RIP.5036 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

# Cancer:
# - malaise
# - fatigue
# - cough
# - abdominal_pain
# - chest_pain
# - vomiting
# - diarrhea
# - headache
character_event = {
	id = RIP.5025

	is_triggered_only = yes
	hide_window = yes

	has_character_flag = got_cancer

	immediate = {
		random_list = {
			100 = {
				trigger = {
					calc_true_if = {
						amount < 3

						trait = malaise
						trait = fatigue
						trait = cough
						trait = abdominal_pain
						trait = chest_pain
						trait = vomiting
						trait = diarrhea
						trait = headache
					}
				}

				add_cancer_symptom_effect = yes # Disease effect
			}

			50 = {
				trigger = {
					OR = {
						trait = malaise
						trait = fatigue
						trait = cough
						trait = abdominal_pain
						trait = chest_pain
						trait = vomiting
						trait = diarrhea
						trait = headache
					}
				}

				character_event = {
					id = RIP.5037 # Disease develops
					days = 20
					random = 20
				}
			}
		}
	}
}

### Diseases manifest

# Pneumonia: cough chest pain fever
character_event = {
	id = RIP.5026
	desc = EVTDESCRIP.5026
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = pneumonic
		set_character_flag = manifest_pneumonia
		clr_character_flag = developing_illness
		clr_character_flag = got_pneumonia

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = cough }
			remove_trait = cough
		}

		if = {
			limit = { trait = chest_pain }
			remove_trait = chest_pain
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_pneumonic
				character_event = { id = RIP.5060 }
			}

		}
	}
}

# Syphilis/Pox:
# - rash
# - fever
# - headache
character_event = {
	id = RIP.5027
	desc = EVTDESCRIP.5027
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = great_pox
		set_character_flag = manifest_syphilis
		clr_character_flag = developing_illness
		clr_character_flag = got_syphilis

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = rash }
			remove_trait = rash
		}

		if = {
			limit = { trait = headache }
			remove_trait = headache
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_syphilis
				character_event = { id = RIP.5060 }
			}

		}
	}
}

# Tuberculosis:
# - cough
# - chest_pain
# - fever
# - fatigue
character_event = {
	id = RIP.5028
	desc = EVTDESCRIP.5028
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = consumption
		set_character_flag = manifest_consumption
		clr_character_flag = developing_illness
		clr_character_flag = got_consumption

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = cough }
			remove_trait = cough
		}

		if = {
			limit = { trait = chest_pain }
			remove_trait = chest_pain
		}

		if = {
			limit = { trait = fatigue }
			remove_trait = fatigue
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_consumption
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Typhoid Fever:
# - malaise
# - fever
# - diarrhea
# - abdominal_pain
character_event = {
	id = RIP.5029
	desc = EVTDESCRIP.5029
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = slow_fever
		set_character_flag = manifest_slow_fever
		clr_character_flag = developing_illness
		clr_character_flag = got_slow_fever

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = diarrhea }
			remove_trait = diarrhea
		}

		if = {
			limit = { trait = malaise }
			remove_trait = malaise
		}

		if = {
			limit = { trait = abdominal_pain }
			remove_trait = abdominal_pain
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_typhoid
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Typhus:
# - fever
# - headache
# - rash
# - fatigue
# - diarrhea
# - abdominal_pain
character_event = {
	id = RIP.5040
	desc = EVTDESCRIP.5040
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = camp_fever
		set_character_flag = manifest_camp_fever
		clr_character_flag = developing_illness
		clr_character_flag = got_camp_fever

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = diarrhea }
			remove_trait = diarrhea
		}

		if = {
			limit = { trait = rash }
			remove_trait = rash
		}

		if = {
			limit = { trait = abdominal_pain }
			remove_trait = abdominal_pain
		}

		if = {
			limit = { trait = fatigue }
			remove_trait = fatigue
		}

		if = {
			limit = { trait = headache }
			remove_trait = headache
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_camp_fever
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Bubonic plague:
# - fever
# - cramps
# - malaise
character_event = {
	id = RIP.5013
	desc = EVTDESCRIP.5013
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	hide_from = yes

	is_triggered_only = yes

	option = {
		name = ALAS

		add_trait = bubonic_plague
		set_character_flag = manifest_bubonic_plague
		clr_character_flag = developing_illness
		clr_character_flag = got_bubonic_plague

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = cramps }
			remove_trait = cramps
		}

		if = {
			limit = { trait = malaise }
			remove_trait = malaise
		}

		hidden_effect = {
			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_plague
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Measles:
# - rash
# - fever
# - cough
character_event = {
	id = RIP.5031
	desc = EVTDESCRIP.5031
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = measles
		set_character_flag = manifest_measles
		clr_character_flag = developing_illness
		clr_character_flag = got_measles

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = rash }
			remove_trait = rash
		}

		if = {
			limit = { trait = cough }
			remove_trait = cough
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_measles
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Smallpox:
# - malaise
# - fever
# - headache
# - rash
character_event = {
	id = RIP.5030
	desc = EVTDESCRIP.5030
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = smallpox
		set_character_flag = manifest_smallpox
		clr_character_flag = developing_illness
		clr_character_flag = got_smallpox

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = rash }
			remove_trait = rash
		}

		if = {
			limit = { trait = malaise }
			remove_trait = malaise
		}

		if = {
			limit = { trait = headache }
			remove_trait = headache
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_smallpox
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Aztec Disease:
# - malaise
# - fever
# - headache
# - rash
character_event = {
	id = RIP.5038
	desc = EVTDESCRIP.5038
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = aztec_disease
		set_character_flag = manifest_aztec_disease
		clr_character_flag = developing_illness
		clr_character_flag = got_aztec_disease

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = rash }
			remove_trait = rash
		}

		if = {
			limit = { trait = malaise }
			remove_trait = malaise
		}

		if = {
			limit = { trait = headache }
			remove_trait = headache
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = { in_seclusion = no }

				if = {
					limit = {
						is_parent_of = ROOT
						is_liege_of = ROOT
					}

					set_character_flag = announce_syphilis
					character_event = { id = RIP.5060 }
				}
				else_if = {
					limit = {
						trigger_if = {
							limit = { is_lover = ROOT }
							is_liege_of = ROOT
						}
						trigger_else = {
							is_married = ROOT
						}
					}

					character_event = { id = RIP.5061 }
				}
			}
		}
	}
}

# Flu:
# - malaise
# - fever
# - cough
# - fatigue
# - headache
# - diarrhea
# - abdominal_pain
# - vomiting
character_event = {
	id = RIP.5032
	desc = EVTDESCRIP.5032
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = flu
		set_character_flag = manifest_flu
		clr_character_flag = developing_illness
		clr_character_flag = got_flu

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = cough }
			remove_trait = cough
		}

		if = {
			limit = { trait = vomiting }
			remove_trait = vomiting
		}

		if = {
			limit = { trait = malaise }
			remove_trait = malaise
		}

		if = {
			limit = { trait = fatigue }
			remove_trait = fatigue
		}

		if = {
			limit = { trait = headache }
			remove_trait = headache
		}

		if = {
			limit = { trait = diarrhea }
			remove_trait = diarrhea
		}

		if = {
			limit = { trait = abdominal_pain }
			remove_trait = abdominal_pain
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_flu
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Dysentery:
# - diarrhea
# - fever
# - abdominal_pain
character_event = {
	id = RIP.5033
	desc = EVTDESCRIP.5033
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = dysentery
		set_character_flag = manifest_dysentery
		clr_character_flag = developing_illness
		clr_character_flag = got_dysentery

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = diarrhea }
			remove_trait = diarrhea
		}

		if = {
			limit = { trait = abdominal_pain }
			remove_trait = abdominal_pain
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_dysentery
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Gout:
# - fever
# - fatigue
character_event = {
	id = RIP.5034
	desc = EVTDESCRIP.5034
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = gout
		set_character_flag = manifest_gout
		clr_character_flag = developing_illness
		clr_character_flag = got_gout

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = fatigue }
			remove_trait = fatigue
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_gout
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Food Poisoning:
# - vomiting
# - diarrhea
# - cramps
# - fever
character_event = {
	id = RIP.5035
	desc = EVTDESCRIP.5035
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = food_poisoning
		set_character_flag = manifest_food_poisoning
		clr_character_flag = developing_illness
		clr_character_flag = got_food_poisoning

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = cramps }
			remove_trait = cramps
		}

		if = {
			limit = { trait = diarrhea }
			remove_trait = diarrhea
		}

		if = {
			limit = { trait = vomiting }
			remove_trait = vomiting
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_food_poisoning
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Rabies:
# - fever
# - malaise
# - fatigue
character_event = {
	id = RIP.5036
	desc = EVTDESCRIP.5036
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = rabies
		set_character_flag = manifest_rabies
		clr_character_flag = developing_illness
		clr_character_flag = got_rabies

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = fever }
			remove_trait = fever
		}

		if = {
			limit = { trait = fatigue }
			remove_trait = fatigue
		}

		if = {
			limit = { trait = malaise }
			remove_trait = malaise
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_rabies
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Cancer:
# - malaise
# - fatigue
# - cough
# - abdominal_pain
# - chest_pain
# - vomiting
# - diarrhea
# - headache
character_event = {
	id = RIP.5037
	desc = EVTDESCRIP.5037
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = ALAS

		add_trait = cancer
		set_character_flag = manifest_cancer
		clr_character_flag = developing_illness
		clr_character_flag = got_cancer

		add_disease_level_effect = yes
		blessing_removes_disease_effect = yes
		deaths_gift_removes_disease_effect = yes
		scrying_omen_fulfilled_by_gaining_disease_effect = yes

		if = {
			limit = { trait = abdominal_pain }
			remove_trait = abdominal_pain
		}

		if = {
			limit = { trait = cough }
			remove_trait = cough
		}

		if = {
			limit = { trait = malaise }
			remove_trait = malaise
		}

		if = {
			limit = { trait = fatigue }
			remove_trait = fatigue
		}

		if = {
			limit = { trait = chest_pain }
			remove_trait = chest_pain
		}

		if = {
			limit = { trait = vomiting }
			remove_trait = vomiting
		}

		if = {
			limit = { trait = diarrhea }
			remove_trait = diarrhea
		}

		if = {
			limit = { trait = headache }
			remove_trait = headache
		}

		hidden_effect = {
			if = {
				limit = { is_unimportant_trigger = yes }
				health = -3
			}

			character_event = {
				id = RIP.11031 # Get treatment
				days = 1
			}

			any_player = {
				limit = {
					trigger_if = {
						limit = { is_parent_of = ROOT }
						is_liege_of = ROOT
					}
					trigger_else = {
						is_married = ROOT
					}

					in_seclusion = no
				}

				set_character_flag = announce_cancer
				character_event = { id = RIP.5060 }
			}
		}
	}
}

# Leper becomes disfigured
character_event = {
	id = RIP.5041
	desc = RIP.5041.d
	picture = GFX_evt_plague_spreading
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # base_health_events.txt
	hide_from = yes

	trigger = {
		trait = leper
		NOT = { trait = disfigured }
	}

	option = {
		name = ALAS

		add_trait = disfigured
	}
}

############################################
# Scurvy
# Chance of getting scurvy for being at sea
############################################
# Scurvy - Trigger event
character_event = {
	id = RIP.5050

	is_triggered_only = yes # on_yearly_pulse
	hide_window = yes

	in_command = yes
	has_dlc = "Reapers"

	trigger = {
		location = { terrain = coastal_desert }
		NOT = { trait = scurvy }
	}

	immediate = {
		random_list = {
			10 = { # Scurvy
				mult_modifier = {
					factor = 500
					capital_scope = { has_disease = yes }
				}

				mult_modifier = {
					factor = 3
					trait = gluttonous
				}

				mult_modifier = {
					factor = 2
					has_character_flag = been_at_sea_1
				}

				mult_modifier = {
					factor = 3
					has_character_flag = been_at_sea_2
				}

				mult_modifier = {
					factor = 4
					has_character_flag = been_at_sea_3
				}

				character_event = { id = RIP.5051 }
			}

			90 = { # Still healthy
				if = {
					limit = { has_character_flag = been_at_sea_1 }

					clr_character_flag = been_at_sea_1
					set_character_flag = been_at_sea_2
				}
				else_if = {
					limit = { has_character_flag = been_at_sea_2 }

					clr_character_flag = been_at_sea_2
					set_character_flag = been_at_sea_3
				}
				else_if = {
					limit = {
						NOT = { has_character_flag = been_at_sea_3 }
					}

					set_character_flag = been_at_sea_1
				}

				character_event = {
					id = RIP.5056 # Clear scurvy flags
					days = 100
				}
			}
		}
	}
}

# Scurvy - Get scurvy
character_event = {
	id = RIP.5051
	desc = EVTDESC_RIP_5051
	picture = GFX_evt_merchant_ship_at_sea_republic

	is_triggered_only = yes
	hide_from = yes

	in_command = yes
	has_dlc = "Reapers"

	trigger = {
		location = { terrain = coastal_desert }
		NOT = { trait = scurvy }
	}

	option = {
		name = EVTOPTA_RIP_5051

		add_trait = scurvy
		add_disease_level_effect = yes

		character_event = {
			id = RIP.5052
			months = 1
		}

		clr_character_flag = been_at_sea_1
		clr_character_flag = been_at_sea_2
		clr_character_flag = been_at_sea_3
	}
}

# Scurvy - Lose scurvy event
character_event = {
	id = RIP.5052

	is_triggered_only = yes
	hide_window = yes

	trigger = {
		trait = scurvy
	}

	immediate = {
		if = {
			limit = {
				location = {
					NOT = { terrain = coastal_desert }
				}
			}

			if = {
				limit = {
					any_courtier_or_vassal = {
						has_minor_title = title_court_physician
					}
				}

				set_character_flag = physician_scurvy_treatment

				random_courtier_or_vassal = {
					limit = { has_minor_title = title_court_physician }
					save_event_target_as = physician
				}

				character_event = { id = RIP.5054 }
			}
			else = {
				character_event = {
					id = RIP.5055
					months = 2
					random = 20
				}
			}

			clr_character_flag = physician_scurvy_treatment
		}
		else = {
			repeat_event = {
				id = RIP.5052 # Try again later, when no longer at sea
				months = 2
			}
		}
	}
}

# Scurvy - Physician treatment
character_event = {
	id = RIP.5054
	desc = EVTDESC_RIP_5054
	picture = GFX_evt_doctor_tending_to_sick
	portrait = event_target:physician

	is_triggered_only = yes

	trigger = {
		trait = scurvy
	}

	option = {
		name = EVTOPTA_RIP_5054

		character_event = {
			id = RIP.5055
			months = 1
			random = 10
		}
	}
}

# Scurvy - Feeling better - Scurvy is removed
character_event = {
	id = RIP.5055
	desc = EVTDESC_RIP_5055
	picture = GFX_evt_recovery

	is_triggered_only = yes

	trigger = {
		trait = scurvy
	}

	option = {
		name = EVTOPTA_RIP_5055

		remove_trait = scurvy
		clear_disease_level_effect = yes
	}
}

# Scurvy - Clear event
character_event = {
	id = RIP.5056

	is_triggered_only = yes
	hide_window = yes

	trigger = {
		location = {
			NOT = { terrain = coastal_desert }
		}
	}

	fail_trigger_effect = {
		repeat_event = {
			id = RIP.5056 # Try again later, when no longer at sea
			months = 2
		}
	}

	immediate = {
		clr_character_flag = been_at_sea_1
		clr_character_flag = been_at_sea_2
		clr_character_flag = been_at_sea_3
	}
}

# Notification for sick children or spouses
character_event = {
	id = RIP.5060
	picture = GFX_evt_doctor_tending_to_sick
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDSC_RIP_5060_TUBERCULOSIS
		picture = GFX_evt_bring_out_your_dead
		trigger = {
			has_character_flag = announce_consumption
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_TYPHOID
		picture = GFX_evt_bring_out_your_dead
		trigger = {
			has_character_flag = announce_typhoid
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_TYPHUS
		picture = GFX_evt_bring_out_your_dead
		trigger = {
			has_character_flag = announce_camp_fever
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_PLAGUE
		picture = GFX_evt_plague_spreading
		trigger = {
			has_character_flag = announce_plague
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_MEASLES
		picture = GFX_evt_bring_out_your_dead
		trigger = {
			has_character_flag = announce_measles
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_SMALLPOX
		picture = GFX_evt_bring_out_your_dead
		trigger = {
			has_character_flag = announce_smallpox
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_SYPHILITIC
		picture = GFX_evt_bring_out_your_dead
		trigger = {
			has_character_flag = announce_syphilis
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_FLU
		trigger = {
			has_character_flag = announce_flu
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_DYSENTERY
		trigger = {
			has_character_flag = announce_dysentery
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_GOUT
		trigger = {
			has_character_flag = announce_gout
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_FOOD_POISONING
		trigger = {
			has_character_flag = announce_food_poisoning
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_RABIES
		trigger = {
			has_character_flag = announce_rabies
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_CANCER
		trigger = {
			has_character_flag = announce_cancer
			FROM = { prisoner = no }
		}
	}
	desc = {
		text = EVTDSC_RIP_5060_PNEUMONIC
		trigger = {
			has_character_flag = announce_pneumonic
			FROM = { prisoner = no }
		}
	}

	# Fallback text, in case they are imprisoned...
	desc = {
		text = EVTDSC_RIP_5060_PRISON
		picture = GFX_evt_bring_out_your_dead
		trigger = {
			FROM = { prisoner = yes }
		}
	}

	is_triggered_only = yes

	trigger = {
		trigger_if = {
			limit = { has_character_flag = no_relative_illness_notifications }

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

		NOT = { trait = in_hiding }
	}

	immediate = {
		if = {
			limit = {
				OR = {
					is_tribal = yes
					is_nomadic = yes
				}

				is_landed = yes
				in_seclusion = no
				NOT = { has_assigned_minor_title = title_court_physician }
			}

			any_courtier = {
				limit = {
					age >= 14
					ai = yes
					NOT = { character = FROM }
				}

				score_value = {
					value = 1

					# Find some kind of learned character, preferably...
					additive_modifier = {
						value = 100
						is_learned_trigger = yes
					}

					additive_modifier = {
						value = 200
						has_education_learning_trigger = yes
					}

					additive_modifier = {
						value = 300
						has_lifestyle_learning_trigger = yes
					}

					additive_modifier = {
						value = 10
						learning >= 8
					}

					additive_modifier = {
						value = 10
						learning >= 10
					}

					additive_modifier = {
						value = 10
						learning >= 12
					}

					additive_modifier = {
						value = 10
						learning >= 15
					}

					additive_modifier = {
						value = 10
						trait = kind
					}

					# Shouldn't be in prison/incapable, etc...
					additive_modifier = {
						block_general_event_trigger = yes
						value = -5000
					}
				}

				set_character_flag = is_court_physician
				save_event_target_as = new_physician
			}
		}
	}

	option = {
		name = EVTOPTA_RIP_5060 # Call for my court physician at once! - event RIP.11031 already called in previous event

		trigger = {
			is_landed = yes
			has_assigned_minor_title = title_court_physician
			FROM = { prisoner = no }
		}
	}

	option = {
		name = EVTOPTC_RIP_5060

		trigger = {
			is_landed = yes
			in_seclusion = no
			is_tribal = no
			is_nomadic = no
			NOT = { has_assigned_minor_title = title_court_physician }

			trigger_if = {
				limit = { has_character_flag = 3_year_physician_cooldown }

				had_character_flag = {
					flag = 3_year_physician_cooldown
					years >= 3
				}
			}

			FROM = { prisoner = no }
		}

		custom_tooltip = {
			text = employ_court_physician_tooltip

			set_character_flag = looking_for_court_physician
			clr_character_flag = 3_year_physician_cooldown
			set_character_flag = 3_year_physician_cooldown

			character_event = {
				id = RIP.11053
				days = 10
				random = 30
			}
		}
	}

	option = { # In case you are a tribal or nomad without a court physician...
		name = EVTOPTD_RIP_5060

		trigger = {
			event_target:new_physician = { always = yes } # Only show if someone fit the bill...
			FROM = { prisoner = no }
		}

		event_target:new_physician = {
			show_scope_change = no

			give_minor_title = title_court_physician
		}
	}

	option = {
		name = EVTOPTE_RIP_5060_release_prisoner

		trigger = {
			FROM = {
				prisoner = yes
				host = { character = ROOT }
			}
		}

		FROM = {
			show_scope_change = no

			imprison = no
		}
	}

	option = {
		name = EVTOPTB_RIP_5060

		custom_tooltip = {
			text = ignore_ill_relatives_tooltip

			clr_character_flag = no_relative_illness_notifications
			set_character_flag = no_relative_illness_notifications
		}
	}

	after = {
		clr_character_flag = announce_syphilis
		clr_character_flag = announce_pneumonic
		clr_character_flag = announce_consumption
		clr_character_flag = announce_typhoid
		clr_character_flag = announce_camp_fever
		clr_character_flag = announce_plague
		clr_character_flag = announce_measles
		clr_character_flag = announce_smallpox
		clr_character_flag = announce_flu
		clr_character_flag = announce_dysentery
		clr_character_flag = announce_gout
		clr_character_flag = announce_food_poisoning
		clr_character_flag = announce_rabies
		clr_character_flag = announce_cancer
	}
}

# Notification for spouse syphilis
character_event = {
	id = RIP.5061
	desc = EVTDSC_RIP_5061
	picture = GFX_evt_suspicious_noble
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	trigger = {
		FROM = { prisoner = no }
	}

	immediate = {
		FROM = {
			random_lover = {
				limit = {
					vassal_of = ROOT
					NOT = { character = ROOT }
				}

				save_event_target_as = syphilis_lover
			}
		}
	}

	# Punish
	option = {
		name = {
			text = EVTOPTA_RIP_5061_A
			trigger = {
				OR = {
					trait = aztec_disease
					trait = great_pox
				}
			}
		}
		name = {
			text = EVTOPTA_RIP_5061_B
			trigger = {
				NOR = {
					trait = aztec_disease
					trait = great_pox
				}
			}
		}

		trigger = {
			FROM = { is_landed = no }
		}

		if = {
			limit = { event_target:syphilis_lover = { always = yes } }
			custom_tooltip = { text = EVTOPTA_RIP_5061_TOOLTIP_A }
		}
		else = {
			custom_tooltip = { text = EVTOPTA_RIP_5061_TOOLTIP_B }
		}

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

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

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

			opinion = {
				name = opinion_traitor
				who = event_target:syphilis_lover
				years = 20
			}

			reverse_opinion = {
				name = harsh_punishment
				who = event_target:syphilis_lover
				years = 20
			}
		}

		hidden_effect = {
			reverse_imprison = FROM
			reverse_imprison = event_target:syphilis_lover
		}
	}

	# Take care
	option = {
		name = {
			text = EVTOPTB_RIP_5061_A
			trigger = {
				OR = {
					trait = aztec_disease
					trait = great_pox
				}
			}
		}
		name = {
			text = EVTOPTB_RIP_5061_B
			trigger = {
				NOR = {
					trait = aztec_disease
					trait = great_pox
				}
			}
		}

		custom_tooltip = { text = EVTOPTB_RIP_5061_TOOLTIP }

		random = {
			chance = 30
			add_trait_fully_kind_effect = yes
		}

		random_list = {
			60 = {
				mult_modifier = {
					factor = 1.3
					physician_good_trigger = yes
				}

				mult_modifier = {
					factor = 1.3
					is_smart_trigger = yes
				}

				mult_modifier = {
					factor = 1.3
					learning >= 12
				}

				FROM = {
					show_scope_change = no

					add_character_modifier = {
						name = good_care
						years = 1
					}
				}
			}

			40 = {
				mult_modifier = {
					factor = 1.3
					physician_bad_trigger = yes
				}

				mult_modifier = {
					factor = 1.3
					is_dumb_trigger = yes
				}

				mult_modifier = {
					factor = 1.3
					learning < 8
				}

				FROM = {
					show_scope_change = no

					add_character_modifier = {
						name = bad_care
						years = 1
					}
				}
			}
		}
	}

	# Dissmissive
	option = {
		name = EVTOPTC_RIP_5061
	}
}