# This file holds the diseases for The Reaper's due, with all new values and effects
# note the "rip = yes" -- this will make it so that the disease is The Reaper's Due exclusive, so that we can have both versions of the disease
# if "rip" is not specified, the disease will be available in both version (with the same values in both) and doesn't need to be set twice

consumption = {
	rip = yes
	always_get_message = no
	trait = consumption
	contagiousness = 0.25
	outbreak_chance = 0.016
	icon = 1
	tooltip = TUBERCULOSIS_INFO
	months = 30
	color = { 84 171 176 }
	disease_gfx = disease_gfx_tuberculosis

	effect = {
		local_tax_modifier = -0.25
		supply_limit = -2
		levy_size = -0.4
		max_attrition = 0.05
		local_build_time_modifier = 1.25
		local_revolt_risk = 0.002
		disease_defence = 0.2
	}

	yearly_province_pulse = {
		random_list = {
			92 = { # Nothing happens
				mult_modifier = {
					factor = 1.1
					hospital_level >= 1
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 2
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 3
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 4
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 5
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 6
				}
			}

			8 = {
				increase_depopulation_effect = yes
			}
		}
	}

	character_infection_chances = {
		months = 3
	}

	on_character_infection = {
		random_list = {
			10 = { # Get the disease
				trigger = {
					NOR = {
						has_character_modifier = in_seclusion
						has_character_flag = immune_consumption
						has_character_flag = got_consumption
						trait = consumption
						trait = horse
						trait = cat

						has_character_flag = got_bubonic_plague
						has_character_flag = got_aztec_disease
						has_character_flag = got_smallpox
						has_character_flag = got_measles
						has_character_flag = got_camp_fever
						has_character_flag = got_slow_fever
						has_character_flag = got_syphilis
						has_character_flag = got_pneumonia
						has_character_flag = got_cancer
						has_character_flag = got_rabies
						has_character_flag = got_gout
						has_character_flag = got_flu
						has_character_flag = got_dysentery
						has_character_flag = got_food_poisoning
					}
				}

				mult_modifier = {
					factor = 0.1
					is_nomadic = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 0.5
					is_tribal = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 50
					is_unimportant_trigger = no
				}

				clr_character_flag = disease_not_serious
				set_character_flag = got_consumption
				set_character_flag = developing_illness
				character_event = { id = RIP.5015 }
			}

			90 = { # Nothing happens
			}
		}
	}

	on_province_infection = {
		province_event = {
			id = RIP.11703 # Prosperity ended by epidemic
		}
	}

	timeperiod = { # Minor Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.011

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		max_total_provinces = 5

		spread_through_water = no

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.008

		max_total_provinces = 20

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.005

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		max_total_provinces = 20

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.001

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		months = 36

		max_total_provinces = 45

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.002

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		months = 36

		max_total_provinces = 45

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}
}

slow_fever = {
	rip = yes
	always_get_message = no
	trait = slow_fever
	contagiousness = 0.26
	outbreak_chance = 0.016
	icon = 2
	tooltip = TYPHOID_FEVER_INFO
	months = 30
	color = { 77 140 107 }
	disease_gfx = disease_gfx_typhoid_fever

	effect = {
		local_tax_modifier = -0.40
		supply_limit = -3
		max_attrition = 0.075
		disease_defence = 0.2
		levy_size = -0.25
		local_build_time_modifier = 1.5
		local_revolt_risk = 0.001
	}

	yearly_province_pulse = {
		random_list = {
			92 = {
				mult_modifier = {
					factor = 1.1
					hospital_level >= 1
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 2
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 3
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 4
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 5
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 6
				}
			}

			8 = {
				increase_depopulation_effect = yes
			}
		}
	}

	character_infection_chances = {
		months = 3
	}

	on_character_infection = {
		random_list = {
			10 = { # Get the disease
				trigger = {
					NOR = {
						has_character_modifier = in_seclusion
						has_character_flag = immune_slow_fever
						has_character_flag = got_slow_fever
						trait = slow_fever
						trait = horse
						trait = cat

						has_character_flag = got_bubonic_plague
						has_character_flag = got_aztec_disease
						has_character_flag = got_smallpox
						has_character_flag = got_measles
						has_character_flag = got_camp_fever
						has_character_flag = got_consumption
						has_character_flag = got_syphilis
						has_character_flag = got_pneumonia
						has_character_flag = got_cancer
						has_character_flag = got_rabies
						has_character_flag = got_gout
						has_character_flag = got_flu
						has_character_flag = got_dysentery
						has_character_flag = got_food_poisoning
					}
				}

				mult_modifier = {
					factor = 0.1
					is_nomadic = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 0.5
					is_tribal = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 50
					is_unimportant_trigger = yes
				}

				clr_character_flag = disease_not_serious
				set_character_flag = got_slow_fever
				set_character_flag = developing_illness
				character_event = { id = RIP.5016 }
			}

			90 = { # Nothing happens
			}
		}
	}

	on_province_infection = {
		province_event = {
			id = RIP.11703 #prosperity ended by epidemic
		}
	}

	timeperiod = { # Minor Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.011

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		max_total_provinces = 4

		spread_through_water = no

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.008

		max_total_provinces = 17

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.005

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		max_total_provinces = 17

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.001

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		months = 36

		max_total_provinces = 47

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.002

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		months = 36

		max_total_provinces = 47

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}
}

camp_fever = {
	rip = yes
	always_get_message = no
	trait = camp_fever
	contagiousness = 0.27
	outbreak_chance = 0.014
	icon = 3
	tooltip = TYPHUS_INFO
	months = 18
	color = { 161 191 42 }
	disease_gfx = disease_gfx_typhus

	effect = {
		local_tax_modifier = -0.40
		supply_limit = -3
		max_attrition = 0.075
		disease_defence = 0.2
		levy_size = -0.5
		local_build_time_modifier = 2
		local_revolt_risk = 0.003
	}

	yearly_province_pulse = {
		random_list = {
			92 = { # Nothing happens
				mult_modifier = {
					factor = 1.1
					hospital_level >= 1
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 2
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 3
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 4
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 5
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 6
				}
			}

			8 = {
				increase_depopulation_effect = yes
			}
		}
	}

	character_infection_chances = {
		months = 3
	}

	on_character_infection = {
		random_list = {
			10 = { # Get the disease
				trigger = {
					NOR = {
						has_character_modifier = in_seclusion
						has_character_flag = immune_camp_fever
						has_character_flag = got_camp_fever
						trait = camp_fever
						trait = horse
						trait = cat

						has_character_flag = got_bubonic_plague
						has_character_flag = got_aztec_disease
						has_character_flag = got_smallpox
						has_character_flag = got_measles
						has_character_flag = got_slow_fever
						has_character_flag = got_consumption
						has_character_flag = got_syphilis
						has_character_flag = got_pneumonia
						has_character_flag = got_cancer
						has_character_flag = got_rabies
						has_character_flag = got_gout
						has_character_flag = got_flu
						has_character_flag = got_dysentery
						has_character_flag = got_food_poisoning
					}
				}

				mult_modifier = {
					factor = 0.1
					is_nomadic = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 0.5
					is_tribal = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 50
					is_unimportant_trigger = yes
				}

				clr_character_flag = disease_not_serious
				set_character_flag = got_camp_fever
				set_character_flag = developing_illness
				character_event = { id = RIP.5017 }
			}

			90 = { # Nothing happens
			}
		}
	}

	on_province_infection = {
		province_event = {
			id = RIP.11703 #prosperity ended by epidemic
		}
	}

	timeperiod = { # Minor Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.011

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		max_total_provinces = 7

		spread_through_water = no

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.008

		max_total_provinces = 22

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.005

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		max_total_provinces = 22

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.001

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		months = 36

		max_total_provinces = 55

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.002

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		months = 36

		max_total_provinces = 55

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}
}

bubonic_plague = {
	rip = yes
	always_get_message = yes
	major = yes
	trait = bubonic_plague
	contagiousness = 0.55
	outbreak_chance = 0.01
	icon = 4
	tooltip = BUBONIC_PLAGUE_INFO
	months = 36
	color = { 255 0 0 }
	disease_gfx = disease_gfx_bubonic_plague

	effect = {
		local_tax_modifier = -0.75
		supply_limit = -4
		levy_size = -1.25
		local_build_time_modifier = 4
		local_revolt_risk = 0.005
		max_attrition = 0.075
	}

	yearly_province_pulse = {
		random_list = {
			10 = { # Nothing happens
				mult_modifier = {
					factor = 1.1
					hospital_level >= 1
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 2
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 3
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 4
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 5
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 6
				}
			}

			90 = {
				increase_depopulation_effect = yes
			}
		}
	}

	character_infection_chances = {
		months = 3
	}

	on_character_infection = {
		random_list = {
			90 = { # Get the disease
				trigger = {
					NOR = {
						has_character_modifier = in_seclusion
						has_character_flag = immune_bubonic_plague
						has_character_flag = got_bubonic_plague
						trait = bubonic_plague
						trait = horse
						trait = cat
					}

					trigger_if = {
						limit = { is_nomadic = yes }
						is_unimportant_trigger = no
					}
				}

				mult_modifier = {
					factor = 0.5
					is_tribal = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 5000
					is_unimportant_trigger = yes
				}

				# Clear out other diseases
				clr_character_flag = got_aztec_disease
				clr_character_flag = got_smallpox
				clr_character_flag = got_measles
				clr_character_flag = got_camp_fever
				clr_character_flag = got_slow_fever
				clr_character_flag = got_consumption
				clr_character_flag = got_syphilis
				clr_character_flag = got_pneumonia
				clr_character_flag = got_cancer
				clr_character_flag = got_rabies
				clr_character_flag = got_gout
				clr_character_flag = got_flu
				clr_character_flag = got_dysentery
				clr_character_flag = got_food_poisoning
				clr_character_flag = disease_not_serious

				set_character_flag = got_bubonic_plague
				set_character_flag = developing_illness
				character_event = { id = RIP.5012 }
			}

			10 = { # Nothing happens
			}
		}

		if = {
			limit = {
				NOT = { has_global_flag = black_death_happened }
			}
			set_global_flag = black_death_happened
		}
	}

	on_province_infection = {
		province_event = { id = RIP.10000 }
		province_event = { id = RIP.10005 }
		province_event = { id = RIP.11703 } # Prosperity ended by epidemic
	}

	timeperiod = {	# Dynamic plague outbreak
		start_date = 760.1.1
		end_date = 1400.1.1

		months = 0

		outbreak_chance = 0.01

		can_outbreak = {
			total_years_played >= 200
			NOT = { has_global_flag = black_death_happened }
			has_game_rule = {
				name = epidemics
				value = dynamic
			}
		}

		min_nb_province = 1		# ignored if 0
		max_nb_province = 20	# ignored if 0

		one_only = yes

		province_infection_duration = 36

		outbreak_scenario = { # Classic plague, misses India and respects the HPFZ
			chance = 0.30

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Classic plague, misses India but does not respect the HPFZ
			chance = 0.20

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
			}
		}

		outbreak_scenario = { # Classic plague, misses Africa rather than India and respects the HPFZ
			chance = 0.10

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_africa
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Classic plague, misses Africa rather than India but does not respect the HPFZ
			chance = 0.10

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_africa
			}
		}

		outbreak_scenario = { # Comes via India and misses Scandinavia and respects the HPFZ
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_europe_north
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Comes via India and misses Britain
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_europe_west_british_isles
			}
		}

		outbreak_scenario = { # Comes via India and misses the Steppe and Himalaya
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_steppe
				world_himalayas
			}
		}

	}

	timeperiod = { # Dynamic plague outbreak, take 2 (late game)
		start_date = 1400.1.1
		end_date = 9999.1.1

		months = 0

		outbreak_chance = 0.01

		can_outbreak = {
			total_years_played >= 500
			has_game_rule = {
				name = epidemics
				value = dynamic
			}
		}

		min_nb_province = 1		# ignored if 0
		max_nb_province = 20	# ignored if 0

		one_only = yes

		province_infection_duration = 36

		outbreak_scenario = { # Classic plague, misses India and respects the HPFZ
			chance = 0.30

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Classic plague, misses India but does not respect the HPFZ
			chance = 0.20

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
			}
		}

		outbreak_scenario = { # Classic plague, misses Africa rather than India and respects the HPFZ
			chance = 0.10

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_africa
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Classic plague, misses Africa rather than India but does not respect the HPFZ
			chance = 0.10

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_africa
			}
		}

		outbreak_scenario = { # Comes via India and misses Scandinavia and respects the HPFZ
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_europe_north
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Comes via India and misses Britain
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_europe_west_british_isles
			}
		}

		outbreak_scenario = { # Comes via India and misses the Steppe and Himalaya
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_steppe
				world_himalayas
			}
		}

	}

	timeperiod = {	# Delayed Dynamic plague outbreak
		start_date = 1100.1.1
		end_date = 1400.1.1

		months = 0

		outbreak_chance = 0.01

		can_outbreak = {
			total_years_played >= 25
			NOT = { has_global_flag = black_death_happened }
			has_game_rule = {
				name = epidemics
				value = delayed_dynamic
			}
		}

		min_nb_province = 1		# ignored if 0
		max_nb_province = 20	# ignored if 0

		one_only = yes

		province_infection_duration = 36

		outbreak_scenario = { # Classic plague, misses India and respects the HPFZ
			chance = 0.30

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Classic plague, misses India but does not respect the HPFZ
			chance = 0.20

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
			}
		}

		outbreak_scenario = { # Classic plague, misses Africa rather than India and respects the HPFZ
			chance = 0.10

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_africa
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Classic plague, misses Africa rather than India but does not respect the HPFZ
			chance = 0.10

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_africa
			}
		}

		outbreak_scenario = { # Comes via India and misses Scandinavia and respects the HPFZ
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_europe_north
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Comes via India and misses Britain
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_europe_west_british_isles
			}
		}

		outbreak_scenario = { # Comes via India and misses the Steppe and Himalaya
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_steppe
				world_himalayas
			}
		}

	}

	timeperiod = {	# Dynamic historical plague
		start_date = 1300.1.1
		end_date = 1400.1.1

		months = 0

		can_outbreak = {
			NOT = { has_global_flag = black_death_happened }
			has_game_rule = {
				name = epidemics
				value = dynamic
			}
		}

		min_nb_province = 1		# ignored if 0
		max_nb_province = 15	# ignored if 0

		one_only = yes

		outbreak_scenario = { # Classic plague, misses India and respects the HPFZ
			chance = 0.30

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Classic plague, misses India but does not respect the HPFZ
			chance = 0.20

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
			}
		}

		outbreak_scenario = { # Classic plague, misses Africa rather than India and respects the HPFZ
			chance = 0.10

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_africa
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Classic plague, misses Africa rather than India but does not respect the HPFZ
			chance = 0.10

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_africa
			}
		}

		outbreak_scenario = { # Comes via India and misses Scandinavia and respects the HPFZ
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_europe_north
				custom_historical_plague_free_zone
			}
		}

		outbreak_scenario = { # Comes via India and misses Britain
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_europe_west_british_isles
			}
		}

		outbreak_scenario = { # Comes via India and misses the Steppe and Himalaya
			chance = 0.10

			start_provinces = {
				1172 # Kundina
			}

			excluded_regions = {
				world_steppe
				world_himalayas
			}
		}
	}

	timeperiod = {	# Purely historical plague
		start_date = 1345.1.1
		end_date = 1453.1.1

		months = 0

		outbreak_chance = 1

		can_outbreak = {
			NOT = { has_global_flag = black_death_happened }
			has_game_rule = {
				name = epidemics
				value = historical
			}
		}

		min_nb_province = 1		# ignored if 0
		max_nb_province = 20	# ignored if 0

		one_only = yes

		outbreak_scenario = { # Classic plague
			chance = 1

			start_provinces = {
				1155 # Jiuquan
			}

			excluded_regions = {
				world_india_deccan
				world_india_bengal
				world_india_rajastan
				world_himalayas
				custom_historical_plague_free_zone
			}
		}
	}

	timeperiod = {	# Dynamic plague - becomes endemic
		start_date = 760.1.1
		end_date = 1400.1.1

		max_total_provinces = 35

		months = 24

		outbreak_chance = 0.00075

		can_outbreak = {
			had_global_flag = {
				flag = black_death_happened
				years = 50
			}
			has_game_rule = {
				name = epidemics
				value = dynamic
			}
		}

		min_nb_province = 1		# ignored if 0
		max_nb_province = 10	# ignored if 0

		one_only = no

		province_infection_duration = 30

	}

	timeperiod = {	# Absurdly deadly plague - doesn't care if it's happened before!
		start_date = 760.1.1
		end_date = 9999.1.1

		months = 50

		outbreak_chance = 0.0008

		min_nb_province = 1		# ignored if 0
		max_nb_province = 20	# ignored if 0

		can_outbreak = {
			total_years_played >= 20
			has_game_rule = {
				name = epidemics
				value = deadly
			}
		}

		one_only = no

	}
}

measles = {
	rip = yes
	always_get_message = no
	trait = measles
	contagiousness = 0.225
	outbreak_chance = 0.012
	icon = 5
	tooltip = MEASLES_INFO
	months = 18
	color = { 201 111 112 }
	disease_gfx = disease_gfx_measles

	effect = {
		local_tax_modifier = -0.1
		levy_size = -0.25
		local_build_time_modifier = 1
		supply_limit = -2
		max_attrition = 0.025
		disease_defence = 0.2
	}

	yearly_province_pulse = {
		random_list = {
			95 = { # Nothing happens
				mult_modifier = {
					factor = 1.1
					hospital_level >= 1
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 2
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 3
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 4
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 5
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 6
				}
			}

			5 = {
				increase_depopulation_effect = yes
			}
		}
	}

	character_infection_chances = {
		months = 3
	}

	on_character_infection = {
		random_list = {
			10 = { # Get the disease
				trigger = {
					NOR = {
						has_character_modifier = in_seclusion
						has_character_flag = immune_measles
						has_character_flag = got_measles
						trait = measles
						trait = horse
						trait = cat

						has_character_flag = got_bubonic_plague
						has_character_flag = got_aztec_disease
						has_character_flag = got_smallpox
						has_character_flag = got_camp_fever
						has_character_flag = got_slow_fever
						has_character_flag = got_consumption
						has_character_flag = got_syphilis
						has_character_flag = got_pneumonia
						has_character_flag = got_cancer
						has_character_flag = got_rabies
						has_character_flag = got_gout
						has_character_flag = got_flu
						has_character_flag = got_dysentery
						has_character_flag = got_food_poisoning
					}
				}

				mult_modifier = {
					factor = 0.1
					is_nomadic = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 0.5
					is_tribal = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 50
					is_unimportant_trigger = yes
				}

				clr_character_flag = disease_not_serious
				set_character_flag = got_measles
				set_character_flag = developing_illness
				character_event = { id = RIP.5018 }
			}

			90 = { # Nothing happens
			}
		}
	}

	on_province_infection = {
		province_event = {
			id = RIP.11703 # Prosperity ended by epidemic
		}
	}

	timeperiod = { # Minor Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.016

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		max_total_provinces = 5

		spread_through_water = no

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.006

		max_total_provinces = 19

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.005

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		max_total_provinces = 19

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.0008

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		months = 24

		max_total_provinces = 42

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.002

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		months = 24

		max_total_provinces = 42

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}
}

smallpox = {
	rip = yes
	always_get_message = no
	trait = smallpox
	contagiousness = 0.265
	outbreak_chance = 0.016
	icon = 6
	tooltip = SMALL_POX_INFO
	months = 18
	color = { 179 102 132 }
	disease_gfx = disease_gfx_small_pox

	effect = {
		local_tax_modifier = -0.25
		supply_limit = -3
		max_attrition = 0.05
		disease_defence = 0.2
		levy_size = -0.5
		local_build_time_modifier = 2
		local_revolt_risk = 0.003
	}

	yearly_province_pulse = {
		random_list = {
			92 = { # Nothing happens
				mult_modifier = {
					factor = 1.1
					hospital_level >= 1
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 2
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 3
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 4
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 5
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 6
				}
			}

			8 = {
				increase_depopulation_effect = yes
			}
		}
	}

	character_infection_chances = {
		months = 3
	}

	on_character_infection = {
		if = {
			limit = {
				NOR = {
					has_character_modifier = in_seclusion
					has_character_flag = immune_smallpox
					has_character_flag = got_smallpox
					trait = smallpox
					trait = horse
					trait = cat

					has_character_flag = got_bubonic_plague
					has_character_flag = got_aztec_disease
					has_character_flag = got_measles
					has_character_flag = got_camp_fever
					has_character_flag = got_slow_fever
					has_character_flag = got_consumption
					has_character_flag = got_syphilis
					has_character_flag = got_pneumonia
					has_character_flag = got_cancer
					has_character_flag = got_rabies
					has_character_flag = got_gout
					has_character_flag = got_flu
					has_character_flag = got_dysentery
					has_character_flag = got_food_poisoning
				}
			}

			random_list = {
				10 = { # Get the disease
					mult_modifier = {
						factor = 0.1
						is_nomadic = yes
						NOT = { is_unimportant_trigger = yes }
					}
					mult_modifier = {
						factor = 0.5
						is_tribal = yes
						NOT = { is_unimportant_trigger = yes }
					}
					mult_modifier = {
						factor = 50
						is_unimportant_trigger = yes
					}

					clr_character_flag = disease_not_serious
					set_character_flag = got_smallpox
					set_character_flag = developing_illness
					character_event = { id = RIP.5019 }
				}

				90 = { # Nothing happens
				}
			}
		}
	}

	on_province_infection = {
		province_event = {
			id = RIP.11703 #prosperity ended by epidemic
		}
	}

	timeperiod = { # Minor Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.011

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		max_total_provinces = 5

		spread_through_water = no

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.008

		max_total_provinces = 30

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.005

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		max_total_provinces = 30

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.001

		can_outbreak = {
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		months = 36

		max_total_provinces = 90

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.002

		can_outbreak = {
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		months = 36

		max_total_provinces = 90

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}
}

syphilis = {
	rip = yes
	always_get_message = no
	active = no
	trait = aztec_disease
	contagiousness = 0.28
	outbreak_chance = 0.010
	icon = 6
	tooltip = AZTEC_DISEASE_INFO
	months = 30
	color = { 207 144 89 }
	disease_gfx = disease_gfx_syphilis

	effect = {
		local_tax_modifier = -0.5
		supply_limit = -3
		max_attrition = 0.05
		disease_defence = 0.2
		local_revolt_risk = 0.001
	}

	yearly_province_pulse = {
		random_list = {
			90 = { # Nothing happens
				mult_modifier = {
					factor = 1.1
					hospital_level >= 1
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 2
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 3
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 4
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 5
				}
				mult_modifier = {
					factor = 1.1
					hospital_level >= 6
				}
			}

			10 = {
				increase_depopulation_effect = yes
			}
		}
	}

	character_infection_chances = {
		months = 3
	}

	on_character_infection = {
		random_list = {
			10 = { # Get the disease
				trigger = {
					NOR = {
						has_character_modifier = in_seclusion
						has_character_flag = immune_aztec_disease
						has_character_flag = got_aztec_disease
						trait = aztec_disease
						trait = horse
						trait = cat

						has_character_flag = got_bubonic_plague
						has_character_flag = got_smallpox
						has_character_flag = got_measles
						has_character_flag = got_camp_fever
						has_character_flag = got_slow_fever
						has_character_flag = got_consumption
						has_character_flag = got_syphilis
						has_character_flag = got_pneumonia
						has_character_flag = got_cancer
						has_character_flag = got_rabies
						has_character_flag = got_gout
						has_character_flag = got_flu
						has_character_flag = got_dysentery
						has_character_flag = got_food_poisoning
					}
				}

				mult_modifier = {
					factor = 0.1
					is_nomadic = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 0.5
					is_tribal = yes
					is_unimportant_trigger = no
				}
				mult_modifier = {
					factor = 50
					is_unimportant_trigger = yes
				}

				clr_character_flag = disease_not_serious
				set_character_flag = got_aztec_disease
				set_character_flag = developing_illness
				character_event = { id = RIP.5019 }
			}

			90 = { # Nothing happens
			}
		}
	}

	on_province_infection = {
		province_event = {
			id = RIP.11703 # Prosperity ended by epidemic
		}
	}

	timeperiod = { # Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.010

		can_outbreak = {
			has_global_flag = aztec_arrival
		}

		max_total_provinces = 15

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Normal Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.005

		can_outbreak = {
			has_global_flag = aztec_arrival
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		max_total_provinces = 15

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no
	}

	timeperiod = { # Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.001

		can_outbreak = {
			has_global_flag = aztec_arrival
			NOT = {
				has_game_rule = {
					name = minor_epidemics
					value = fewer
				}
			}
		}

		months = 36

		max_total_provinces = 92

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}

	timeperiod = { # 'More' Major Outbreak
		start_date = 769.1.1
		end_date = 9999.1.1

		outbreak_chance = 0.001

		can_outbreak = {
			has_global_flag = aztec_arrival
			has_game_rule = {
				name = minor_epidemics
				value = more
			}
		}

		months = 36

		max_total_provinces = 92

		min_nb_province = 2	# ignored if 0
		max_nb_province = 4	# ignored if 0

		one_only = no
	}
}

dancing_plague = {
	rip = yes
	always_get_message = yes
	trait = dancing_plague
	contagiousness = 0.025
	outbreak_chance = 0.0005
	icon = 7
	tooltip = DANCING_PLAGUE_INFO
	months = 12
	color = { 255 234 0 }
	disease_gfx = disease_gfx_dancing_plague

	effect = {
		city_tax_modifier = -0.1
		supply_limit = -1
		max_attrition = 0.01
		disease_defence = 0.2
	}

	yearly_province_pulse = {
	}

	character_infection_chances = {
		months = 3
	}

	on_character_infection = {
		random_list = {
			30 = { # Get the disease
				trigger = {
					age >= 12
					is_incapable = no

					NOR = {
						has_character_flag = immune_dancing_plague
						has_character_flag = got_dancing_plague
						trait = dancing_plague
						trait = horse
						trait = cat
					}
				}

				mult_modifier = {
					factor = 5
					trait = gluttonous
				}
				mult_modifier = {
					factor = 5
					trait = hedonist
				}
				mult_modifier = {
					factor = 0.5
					trait = temperate
				}
				mult_modifier = {
					factor = 0.5
					trait = gardener
				}
				mult_modifier = {
					factor = 50
					is_unimportant_trigger = yes
				}

				set_character_flag = got_dancing_plague
				character_event = { id = RIP.4002 }
			}

			70 = { # Nothing happens
				set_character_flag = immune_dancing_plague
				character_event = { id = RIP.4002 }
			}
		}
	}

	on_province_infection = {
		#province_event = {
		#	id = RIP.11703 # Prosperity ended by epidemic
		# }
	}

	timeperiod = {
		start_date = 769.1.1
		end_date = 9999.1.1

		can_outbreak = {
			has_dlc = "Reapers"
		}

		max_total_provinces = 10

		spread_through_water = no

		min_nb_province = 1	# ignored if 0
		max_nb_province = 1	# ignored if 0

		one_only = no

	}
}