################################################################################
#
# Epidemic Diseases 傳染病
# https://ck2.paradoxwikis.com/Disease_modding
#
################################################################################
#
# 2.6有新值用於傳染病，這個檔案為2.6開始的版本
#
# 參考：..\common\disease\*
#
# 在CK2中疾病扮演著重要的角色
# 大多數的角色在生命中通常會伴隨著多種疾病，儘管有的人可能會因為疾病爆發而死去
# 所有疾病都由健康特質表示
#
# 一旦爆發了傳染病，將會：
# 在地圖上省份會受到污染，傳染全世界。如果一個角色在一個爆發了傳染病的省份上，他將會受到感染。
# 減少城市的收入
# 受感染的省份將會大大減少部隊數量，增加消耗，提高戰爭難度。使得長期攻城的花費降低，但也很難組織軍隊。
# 在特定的時間後消失
#
# 一個角色仍然停留在感染省份可以得到疾病
#
################################################################################
########################################
# 結構
########################################
<disease_name> = { # Consumption
	rip = yes
	contagiousness = 0.25
	outbreak_chance = 0.016
	effect = {
		local_tax_modifier = -0.25
		supply_limit = -2
		max_attrition = 0.05
		disease_defence = 0.2
	}
	yearly_province_pulse = {
		random_list = {		
			92 = {
				modifier = {
					factor = 1.1
					location = {
						hospital_level = 1
					}
				}
				modifier = {
					factor = 1.1
					location = {
						hospital_level = 2
					}
				}
				modifier = {
					factor = 1.1
					location = {
						hospital_level = 3
					}
				}
				modifier = {
					factor = 1.1
					location = {
						hospital_level = 4
					}
				}
				modifier = {
					factor = 1.1
					location = {
						hospital_level = 5
					}
				}
				modifier = {
					factor = 1.1
					location = {
						hospital_level = 6
					}
				}
			}
			8 = {
				increase_depopulation_effect = yes
			}
		}
	}
	icon = 1
	tooltip = TUBERCULOSIS_INFO
	months = 30
	trait = has_tuberculosis
	character_infection_chances = {
		months = 3
	}
	on_character_infection = {
		if = {
			limit = {
				NOR = {
					has_character_flag = immune_tuberculosis
					has_character_flag = got_tuberculosis
					trait = has_tuberculosis
					trait = horse
					
					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_typhus
					has_character_flag = got_typhoid_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
				}
			}			
			random_list = {
				10 = { # Get the disease
					modifier = {
						factor = 0
						has_character_modifier = in_seclusion
					}
					modifier = {
						factor = 0.1
						AND = {
							is_nomadic = yes
							NOT = { is_unimportant_trigger = yes }
						}
					}
					modifier = {
						factor = 0.5
						AND = {
							is_tribal = yes
							NOT = { is_unimportant_trigger = yes }
						}
					}
					modifier = {
						factor = 50
						is_unimportant_trigger = yes
					}
					set_character_flag = got_tuberculosis
					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
		}
	}
	always_get_message = no
	color = { 84 171 176 }
	
	timeperiod = { # Minor Outbreak
		start_date = 769.1.1
		end_date = 1452.1.1	
		
		outbreak_chance = 0.011

		months = 0
		
		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 = 1452.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 = 1452.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 = 1452.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 = 1452.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
	}
	disease_gfx = disease_gfx_tuberculosis
}

########################################
# 旗標
########################################
<disease_name>
疾病名稱。需本地化。在疾病地圖模式下顯示

rip
是新版本類型（是 The Reaper's Due 這個DLC專用，用於區分新舊版本。如果不設定則新舊版本都可用同時不需要編寫兩次）
類型：布爾值

contagiousness
傳染性
類型：百分比
例子：0.4

outbreak_chance
爆發機率
類型：百分比
例子：0.4

effect
這個傳染病所帶來的效果
類型：修飾語

yearly_province_pulse
每年在感染省份執行效果（？）
類型：-

icon
使用圖示（參考：..\gfx\interface\disease_icons.dds）
類型：整數

tooltip
爆發時在省份上的圖示的說明
類型：從句
例子：tooltip = AZTEC_DISEASE_INFO

months
爆發持續時間
類型：整數
例子：months = 5

trait
受到感染時得到對應的特質
類型：特質
例子：trait = has_aztec_disease

character_infection_chances
角色感染機率（？）
類型：從句
例子：character_infection_chances = { months = 3 }

on_character_infection
角色感染時的效果（？）
類型：從句

on_province_infection
省份感染時的效果（？）
類型：從句
例子：on_province_infection = { province_event = { id = RIP.11703 } }

always_get_message
類型：布爾值

color
在傳染病地圖模式顯示的顏色
類型：從句
例子：color = { 84 171 176 }

active
遊戲開始時這種疾病是不是存在或需要通過指令 activate_disease 啟動
類型：布爾值

timeperiod
傳染病的爆發時期
類型：從句

major
類型：布爾值

start_date
開始爆發時期
類型：從句
例子：start_date = 769.1.1

end_date
結束爆發時期
類型：從句
例子：end_date = 1452.1.1	

can_outbreak
允許爆發的條件
類型：從句

total_years_played
類型：整數

max_total_provinces
感染省份的數量上限
類型：整數
例子：max_total_provinces = 45

min_nb_province
感染鄰近省份的數量下限（0 為忽略）
類型：整數
例子：min_nb_province = 2

max_nb_province
感染鄰近省份的數量上限（0 為忽略）
類型：整數
例子：max_nb_province = 4

spread_through_water
可以通過水傳染（從河流、海洋等傳染到其他地區？）
類型：布爾值
例子：

one_only
在爆發時期只爆發一次
類型：布爾值

province_infection_duration
省份感染持續時間
類型：整數

outbreak_scenario
爆發情況
類型：從句

start_provinces
爆發時的開始省份

excluded_regions
爆發時不會感染的地區
類型：從句

disease_gfx
類型：從句
例子：disease_gfx = disease_gfx_tuberculosis

########################################
# 未確定
########################################
- Added "scenarios" to diseases: they exclude certain regions and determine possible starting provinces

