﻿###########
## Pilgrimage Church
###########

pilgrimage_church_01 = {

	construction_time = slow_construction_time

	can_construct_potential = {
                county_is_pilgrimage_site_building_requirement_trigger = yes
                relic_hunter_is_valid_trigger = yes
		building_requirement_tribal = no
		NOT = {
			barony = {
				is_holy_site_of = scope:holder.faith
                        }
		}
	}

	can_construct = {
		scope:holder = {
			culture = {
				has_innovation = innovation_crop_rotation
			}
		}
	}

	is_enabled = {
		relic_hunter_is_valid_trigger = yes
	}

	show_disabled = yes

	cost_gold = 500
	
	character_modifier = {
		monthly_piety = 0.25
		monthly_dynasty_prestige_mult = 0.05
		holy_order_hire_cost_mult = -0.15
		clergy_opinion = 5
		monthly_county_control_change_factor = 0.05
	}

	province_modifier = {
		monthly_income = 1
	}

	county_modifier = {
		tax_mult = 0.2
		development_growth_factor = 0.2
		development_growth = 0.1
	}

	type_icon = "icon_structure_cologne_cathedral.dds"
	
	ai_value = {
		base = 100
		modifier = { # Fill all building slots before going for special buildings
			factor = 0
			free_building_slots > 0
		}
	}
}     

####################
# Common Buildings #
####################

### Pilgrim Hostel

common_pilgrim_hostel_01 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		OR = {
                        has_pilgrimage_church_building_requirement_trigger = yes
                        christian_special_building_trigger = yes
			custom_description = {
				text = holy_site_building_trigger
				barony = {
					is_holy_site_of = scope:holder.faith
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_1_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_1
	}
	character_modifier = {
		monthly_piety = 0.1
		same_faith_opinion = 5
		clergy_opinion = 5
	}
	county_modifier = {
		development_growth_factor = 0.05
	}
	
	next_building = common_pilgrim_hostel_02

	type_icon = "icon_building_monastic_schools.dds"
	
	ai_value = {
		base = 10
		ai_general_building_modifier = yes
	}
}

common_pilgrim_hostel_02 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		OR = {
                        has_pilgrimage_church_building_requirement_trigger = yes
                        christian_special_building_trigger = yes
			custom_description = {
				text = holy_site_building_trigger
				barony = {
					is_holy_site_of = scope:holder.faith
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_2_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
	}
	character_modifier = {
		monthly_piety = 0.1
		same_faith_opinion = 5
		clergy_opinion = 5
	}
	county_modifier = {
		development_growth_factor = 0.1
	}
	
	next_building = common_pilgrim_hostel_03

	type_icon = "icon_building_monastic_schools.dds"
	
	ai_value = {
		base = 10
		ai_general_building_modifier = yes
	}
}

common_pilgrim_hostel_03 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		OR = {
                        has_pilgrimage_church_building_requirement_trigger = yes
                        christian_special_building_trigger = yes
			custom_description = {
				text = holy_site_building_trigger
				barony = {
					is_holy_site_of = scope:holder.faith
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 02 }
	}

	can_construct = {
		trigger_if = {
			culture = {
				has_innovation = innovation_manorialism
			}
		}
	}

	cost_gold = normal_building_tier_3_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
	}
	character_modifier = {
		monthly_piety = 0.1
		same_faith_opinion = 5
		clergy_opinion = 5
	}
	county_modifier = {
		development_growth_factor = 0.15
	}
	
	next_building = common_pilgrim_hostel_04

	type_icon = "icon_building_monastic_schools.dds"
	
	ai_value = {
		base = 10
		ai_general_building_modifier = yes
	}
}

common_pilgrim_hostel_04 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		OR = {
                        has_pilgrimage_church_building_requirement_trigger = yes
                        christian_special_building_trigger = yes
			custom_description = {
				text = holy_site_building_trigger
				barony = {
					is_holy_site_of = scope:holder.faith
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 02 }
	}

	can_construct = {
		trigger_if = {
			culture = {
				has_innovation = innovation_manorialism
			}
		}
	}

	cost_gold = normal_building_tier_4_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
	}
	character_modifier = {
		monthly_piety = 0.1
		same_faith_opinion = 5
		clergy_opinion = 5
	}
	county_modifier = {
		development_growth_factor = 0.2
	}
	
	next_building = common_pilgrim_hostel_05

	type_icon = "icon_building_monastic_schools.dds"
	
	ai_value = {
		base = 10
		ai_general_building_modifier = yes
	}
}

common_pilgrim_hostel_05 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		OR = {
                        has_pilgrimage_church_building_requirement_trigger = yes
                        christian_special_building_trigger = yes
			custom_description = {
				text = holy_site_building_trigger
				barony = {
					is_holy_site_of = scope:holder.faith
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 03 }
	}

	can_construct = {
		trigger_if = {
			culture = {
				has_innovation = innovation_windmills
			}
		}
	}

	cost_gold = normal_building_tier_5_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
	}
	character_modifier = {
		monthly_piety = 0.1
		same_faith_opinion = 5
		clergy_opinion = 5
	}
	county_modifier = {
		development_growth_factor = 0.25
	}
	
	next_building = common_pilgrim_hostel_06

	type_icon = "icon_building_monastic_schools.dds"
	
	ai_value = {
		base = 10
		ai_general_building_modifier = yes
	}
}

common_pilgrim_hostel_06 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		OR = {
                        has_pilgrimage_church_building_requirement_trigger = yes
                        christian_special_building_trigger = yes
			custom_description = {
				text = holy_site_building_trigger
				barony = {
					is_holy_site_of = scope:holder.faith
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 03 }
	}

	can_construct = {
		trigger_if = {
			culture = {
				has_innovation = innovation_windmills
			}
		}
	}

	cost_gold = normal_building_tier_6_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
	}
	character_modifier = {
		monthly_piety = 0.1
		same_faith_opinion = 5
		clergy_opinion = 5
	}
	county_modifier = {
		development_growth_factor = 0.3
	}
	
	next_building = common_pilgrim_hostel_07

	type_icon = "icon_building_monastic_schools.dds"
	
	ai_value = {
		base = 10
		ai_general_building_modifier = yes
	}
}

common_pilgrim_hostel_07 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		OR = {
                        has_pilgrimage_church_building_requirement_trigger = yes
                        christian_special_building_trigger = yes
			custom_description = {
				text = holy_site_building_trigger
				barony = {
					is_holy_site_of = scope:holder.faith
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 04 }
	}

	can_construct = {
		trigger_if = {
			culture = {
				has_innovation = innovation_cranes
			}
		}
	}

	cost_gold = normal_building_tier_7_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
	}
	character_modifier = {
		monthly_piety = 0.1
		same_faith_opinion = 5
		clergy_opinion = 5
	}
	county_modifier = {
		development_growth_factor = 0.35
	}
	
	next_building = common_pilgrim_hostel_08

	type_icon = "icon_building_monastic_schools.dds"
	
	ai_value = {
		base = 10
		ai_general_building_modifier = yes
	}
}

common_pilgrim_hostel_08 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		OR = {
                        has_pilgrimage_church_building_requirement_trigger = yes
                        christian_special_building_trigger = yes
			custom_description = {
				text = holy_site_building_trigger
				barony = {
					is_holy_site_of = scope:holder.faith
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 04 }
	}

	can_construct = {
		trigger_if = {
			culture = {
				has_innovation = innovation_cranes
			}
		}
	}

	cost_gold = normal_building_tier_8_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
	}
	character_modifier = {
		monthly_piety = 0.1
		same_faith_opinion = 5
		clergy_opinion = 5
	}
	county_modifier = {
		development_growth_factor = 0.4
	}

	type_icon = "icon_building_monastic_schools.dds"
	
	ai_value = {
		base = 10
		ai_general_building_modifier = yes
	}
}