 # Triggers are in Province scope. The From Scope contains the settlement holder (character)
 # start trigger is in title scope.

hospital = {

	hospital_building_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		desc = hospital_building_1_desc
		trigger = {
			#OR = {
				TECH_CONSTRUCTION = 2
			#	owner = { any_realm_province = { owner = { character = ROOT } } }
			#}
		}
		gold_cost = 250
		build_time = 360
		ai_creation_factor = 5
		
		hospital_level = 1
		disease_defence = 0.05
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	hospital_building_2 = {
		potential = {
			has_dlc = "Reapers"
		}
		desc = hospital_building_2_desc
		trigger = { TECH_CONSTRUCTION = 3 }
		gold_cost = 500
		build_time = 365
		upgrades_from = hospital_building_1
		ai_creation_factor = 20
		
		hospital_level = 1
		disease_defence = 0.1
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	hospital_building_3 = {
		potential = {
			has_dlc = "Reapers"
		}
		desc = hospital_building_3_desc
		trigger = { TECH_CONSTRUCTION = 4 }
		gold_cost = 1000
		build_time = 730
		upgrades_from = hospital_building_2
		ai_creation_factor = 20
		
		hospital_level = 1
		disease_defence = 0.15
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	hospital_building_4 = {
		potential = {
			has_dlc = "Reapers"
		}
		desc = hospital_building_4_desc
		trigger = { TECH_CONSTRUCTION = 5 }
		gold_cost = 2000
		build_time = 365
		upgrades_from = hospital_building_3
		ai_creation_factor = 90
		
		hospital_level = 1
		disease_defence = 0.2
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	hospital_building_5 = {
		potential = {
			has_dlc = "Reapers"
		}
		desc = hospital_building_5_desc
		trigger = { TECH_CONSTRUCTION = 6 }
		gold_cost = 4000
		build_time = 1095
		upgrades_from = hospital_building_4
		ai_creation_factor = 89
		
		hospital_level = 1
		disease_defence = 0.25
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	leper_colony_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = { hospital_building_1 }
		desc = leper_colony_building_desc
		trigger = { TECH_CONSTRUCTION = 2 }
		gold_cost = 300
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		disease_defence = 0.1
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	soup_kitchen_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = { hospital_building_1 }
		desc = soup_kitchen_building_desc
		trigger = { TECH_CONSTRUCTION = 2 }
		gold_cost = 250
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		disease_defence = 0.04
		liege_piety = 0.10
		church_opinion = 2
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	chapel_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = { hospital_building_1 }
		desc = chapel_building_desc
		trigger = { TECH_CONSTRUCTION = 3 }
		gold_cost = 600
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		disease_defence = 0.02
		liege_piety = 0.1
		church_opinion = 2
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	translation_house_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = { hospital_building_2 }
		desc = translation_house_building_desc
		trigger = { TECH_CONSTRUCTION = 3 }
		gold_cost = 400
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		liege_prestige = 0.25
		economy_techpoints = 0.04
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	pilgrims_inn_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = { hospital_building_1 }
		desc = pilgrims_inn_building_desc
		trigger = { TECH_CONSTRUCTION = 3 }
		gold_cost = 400
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		liege_prestige = 0.25
		liege_piety = 0.10
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	library_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = { hospital_building_1 }
		desc = library_building_desc
		trigger = { TECH_CONSTRUCTION = 3 }
		gold_cost = 450
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		tech_growth_modifier = 0.25
		culture_techpoints = 0.03
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	pharmacology_laboratory_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = { hospital_building_3 }
		desc = pharmacology_laboratory_building_desc
		trigger = { TECH_CONSTRUCTION = 4 }
		gold_cost = 450
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		tech_growth_modifier = 0.25
		disease_defence = 0.02
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	medical_academy_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = {
			hospital_building_3
			library_1
		}
		desc = medical_academy_building_desc
		trigger = { TECH_CONSTRUCTION = 4 }
		gold_cost = 500
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		disease_defence = 0.02
		culture_techpoints = 0.03
		economy_techpoints = 0.03
		military_techpoints = 0.03
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	observatory_1 = {
		potential = {
			has_dlc = "Reapers"
		}
		prerequisites = {
			hospital_building_3
			pharmacology_laboratory_1
		}
		desc = observatory_building_desc
		trigger = { TECH_CONSTRUCTION = 4 }
		gold_cost = 400
		build_time = 365
		ai_creation_factor = 5
		add_number_to_name = no
		
		culture_techpoints = 0.03
		military_techpoints = 0.03
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}

	ct_planned_infrastructure_3 = { #Cleared Pathways
		desc = ct_planned_infrastructure_3_desc
		potential = { 
			OR = {
				FROMFROM = { has_building = ct_planned_infrastructure_3 } #Show the building only if it has been already built or if the owner has the proper bloodline to build it.
				FROM = {
					any_owned_bloodline = {
						has_bloodline_flag = bloodline_architect 
					}
				}
				FROM = {
					any_liege = {
						any_owned_bloodline = {
							has_bloodline_flag = bloodline_architect 
						}	
					}
				}
			}
		}
		trigger = { 
			TECH_CITY_CONSTRUCTION = 5
			custom_tooltip = {
				text = tooltip_has_architect_bloodline
				hidden_tooltip = {
					OR = {
						FROM = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_architect 
							}
						}
						FROM = {
							any_liege = {
								any_owned_bloodline = {
									has_bloodline_flag = bloodline_architect 
								}	
							}
						}
					}
				}
			}
		}

		gold_cost = 450
		build_time = 760

		disease_defence = 0.05

		add_number_to_name = no
		
		ai_creation_factor = 88

		extra_tech_building_start = 1.2
	}

	ct_planned_infrastructure_4 = { #Great Acqueduct
		desc = ct_planned_infrastructure_4_desc
		trigger = { 
			TECH_CITY_CONSTRUCTION = 7
			custom_tooltip = {
				text = tooltip_has_architect_bloodline
				hidden_tooltip = {
					OR = {
						FROM = {
							any_owned_bloodline = {
								has_bloodline_flag = bloodline_architect 
							}
						}
						FROM = {
							any_liege = {
								any_owned_bloodline = {
									has_bloodline_flag = bloodline_architect 
								}	
							}
						}
					}
				}
			}
		}

		upgrades_from = ct_planned_infrastructure_3
		gold_cost = 750
		build_time = 1250
		disease_defence = 0.1

		add_number_to_name = no
		
		ai_creation_factor = 88

		extra_tech_building_start = 1.2
	}
}
