### Hospices

hospices_01 = {
	construction_time = standard_construction_time

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_1_cost
	
	character_modifier = {
		monthly_piety = 0.1
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_1
		epidemic_resistance = 5
	}
	
	next_building = hospices_02

	type_icon = "icon_building_hospice.dds"
	
	ai_value = {
		base = 7
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		modifier = {
			add = 1
			county.development_level >= 10
		}
		modifier = {
			add = 1
			county.development_level >= 15
		}
		modifier = {
			add = 1
			county.development_level >= 20
		}
		modifier = {
			add = 1
			county.development_level >= 25
		}
		modifier = {
			add = 10
			scope:holder = {
				OR = {
					government_has_flag = government_is_theocracy
					is_theocratic_lessee = yes
				}
			}
		}
		modifier = {
			factor = 0
			building_farm_estates_requirement_terrain = yes
			NOT = {
				has_building_or_higher = farm_estates_01
			}
		}
		modifier = {
			factor = 0
			building_cereal_fields_requirement_terrain = yes
			NOT = {
				has_building_or_higher = cereal_fields_01
			}
		}
	}
}

hospices_02 = {
	construction_time = standard_construction_time

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 01 }
		culture = {
			has_innovation = innovation_city_planning
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_2_cost
	
	character_modifier = {
		monthly_piety = 0.2
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_2
		epidemic_resistance = 7
	}
	
	next_building = hospices_03
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

hospices_03 = {
	construction_time = standard_construction_time

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		culture = {
			has_innovation = innovation_manorialism
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_3_cost
	
	character_modifier = {
		monthly_piety = 0.3
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_3
		stationed_maa_toughness_mult = 0.01
		epidemic_resistance = 10
	}

	next_building = hospices_04
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

hospices_04 = {
	construction_time = standard_construction_time

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		culture = {
			has_innovation = innovation_manorialism
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_4_cost
	
	character_modifier = {
		monthly_piety = 0.4
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_4
		stationed_maa_toughness_mult = 0.02
		epidemic_resistance = 12
	}

	next_building = hospices_05
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

hospices_05 = {
	construction_time = standard_construction_time

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		culture = {
			has_innovation = innovation_windmills
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_5_cost
	
	character_modifier = {
		monthly_piety = 0.5
		legitimacy_gain_mult = 0.01
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_5
		stationed_maa_toughness_mult = 0.03
		epidemic_resistance = 15
	}

	next_building = hospices_06
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

hospices_06 = {
	construction_time = standard_construction_time

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		culture = {
			has_innovation = innovation_windmills
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_6_cost
	
	character_modifier = {
		monthly_piety = 0.6
		legitimacy_gain_mult = 0.02
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_6
		stationed_maa_toughness_mult = 0.04
		epidemic_resistance = 17
	}

	next_building = hospices_07
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

hospices_07 = {
	construction_time = standard_construction_time

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		culture = {
			has_innovation = innovation_cranes
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_7_cost
	
	character_modifier = {
		monthly_piety = 0.7
		legitimacy_gain_mult = 0.03
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_7
		stationed_maa_toughness_mult = 0.05
		epidemic_resistance = 20
	}

	next_building = hospices_08
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

hospices_08 = {
	construction_time = standard_construction_time

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		culture = {
			has_innovation = innovation_cranes
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_8_cost
	
	character_modifier = {
		monthly_piety = 0.8
		legitimacy_gain_mult = 0.04
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_8
		stationed_maa_toughness_mult = 0.06
		epidemic_resistance = 25
	}

	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}
