﻿###Trade district
###Dedicated Road

district_01 = {
	construction_time = mbrxxx_construction_time_half_year

	can_construct_potential = {
		has_building_or_higher = city_01
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_1_cost
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_1
	}
	county_modifier = {
		development_growth = 0.10
	}
	
	next_building = district_02

	type_icon = "icon_building_district.dds"
	
	ai_value = {
		base = 1
		modifier = {
			add = 4
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_foundation
	flag = mbrxxx_district
}

###Stall permits

district_02 = {
	construction_time = mbrxxx_construction_time_1_year

	can_construct_potential = {
		culture = {
			has_innovation = innovation_crop_rotation
		}
	}

	cost_gold = cheap_building_tier_2_cost
	
	province_modifier = {
		monthly_income = 0.3
	}
	county_modifier = {
		development_growth = 0.20
	}
	
	next_building = district_03
	ai_value = {
		base = 0
		modifier = {
			add = 9
			scope:holder = {
				has_government = republic_government
			}
		}
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_district
}

#tavern

district_03 = {
	construction_time = mbrxxx_construction_time_1_year

	can_construct = {
		has_building_or_higher = city_02
		culture = {
			has_innovation = innovation_manorialism
		}
	}

	cost_gold = cheap_building_tier_3_cost
	
	province_modifier = {
		monthly_income = 0.7
	}
	county_modifier = {
		development_growth = 0.20
		county_opinion_add = 1
	}
	
	next_building = district_04
	ai_value = {
		base = 0
		modifier = {
			add = 8
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_district
}

###brothel

district_04 = {
	construction_time = mbrxxx_construction_time_1_and_half_years

	can_construct = {
		culture = {
			has_innovation = innovation_manorialism
		}
	}

	cost_gold = cheap_building_tier_4_cost

	province_modifier = {
		monthly_income = 1.1
	}

	county_modifier = {
		development_growth = 0.20
		county_opinion_add = 3
	}
	
	next_building = district_05
	ai_value = {
		base = 0
		modifier = {
			add = 7
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_district
}

###brewery

district_05 = {
	construction_time = mbrxxx_construction_time_1_and_half_years

	can_construct = {
		has_building_or_higher = city_03
		culture = {
			has_innovation = innovation_windmills
		}
	}

	cost_gold = cheap_building_tier_5_cost

	province_modifier = {
		monthly_income = 1.6
	}
	county_modifier = {
		development_growth = 0.20
		county_opinion_add = 5
	}

	next_building = district_06
	ai_value = {
		base = 0
		modifier = {
			add = 6
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_district
}

###tools & weapon smith

district_06 = {
	construction_time = mbrxxx_construction_time_2_years

	can_construct = {
		culture = {
			has_innovation = innovation_windmills
		}
	}


	cost_gold = cheap_building_tier_6_cost

	max_garrison = 100

	province_modifier = {
		monthly_income = 2.1
	}
	county_modifier = {
		development_growth = 0.20
		county_opinion_add = 5
	}

	character_modifier = {
		skirmishers_damage_mult = 0.04
		skirmishers_toughness_mult = 0.04
		retreat_losses = -0.1
	}

	next_building = district_07

	ai_value = {
		base = 0
		modifier = {
			add = 5
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_district
}

###City Council

district_07 = {
	construction_time = mbrxxx_construction_time_2_years

	can_construct = {
		has_building_or_higher = city_04
		culture = {
			has_innovation = innovation_cranes
		}
	}


	cost_gold = cheap_building_tier_7_cost

	max_garrison = 100

	province_modifier = {
		monthly_income = 2.3
	}
	county_modifier = {
		development_growth = 0.30
		monthly_county_control_growth_factor = 0.2
		monthly_county_control_growth_add = 0.2
		county_opinion_add = 6
	}

	character_modifier = {
		skirmishers_damage_mult = 0.04
		skirmishers_toughness_mult = 0.04
		retreat_losses = -0.1
	}

	next_building = district_08

	ai_value = {
		base = 0
		modifier = {
			add = 4
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_district
}

###large tavern

district_08 = {
	construction_time = mbrxxx_construction_time_2_and_half_years

	can_construct = {
		culture = {
			has_innovation = innovation_cranes
		}
	}

	cost_gold = cheap_building_tier_8_cost

	max_garrison = 150
	
	province_modifier = {
		monthly_income = 2.7
	}
	county_modifier = {
		development_growth = 0.30
		monthly_county_control_growth_factor = 0.3
		monthly_county_control_growth_add = 0.3
		county_opinion_add = 8
	}

	character_modifier = {
		skirmishers_damage_mult = 0.04
		skirmishers_toughness_mult = 0.04
		retreat_losses = -0.1
	}

	ai_value = {
		base = 0
		modifier = {
			add = 3
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_district
}

###Slaughterhouses
###Local Abattoirs
slaughterhouse_01 = {
	construction_time = mbrxxx_construction_time_half_year

	can_construct_potential = {
		building_slaughterhouse_requirement_terrain = yes
		building_requirement_tribal = no
	}

	can_construct = {
		has_building_or_higher = city_01
		has_building_or_higher = pastures_01
		
	}

	cost_gold = cheap_building_tier_1_cost
	
	province_modifier = {
		monthly_income = 0.3
	}
	county_modifier = {
		supply_limit = 500
	}
	
	next_building = slaughterhouse_02

	type_icon = "icon_building_slaughterhouse.dds"
	
	ai_value = {
		base = 1
		modifier = {
			add = 4
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_foundation
	flag = mbrxxx_slaughterhouse
}

###Butchery
slaughterhouse_02 = {
	construction_time = mbrxxx_construction_time_1_year

	can_construct = {
		has_building_or_higher = city_02
		has_building_or_higher = pastures_02
		scope:holder.culture = {
			has_innovation = innovation_crop_rotation
		}
	}

	cost_gold = cheap_building_tier_2_cost
	
	province_modifier = {
		monthly_income = 0.9
	}
	county_modifier = {
		supply_limit = 1000
		development_growth_factor = 0.01
	}
	
	next_building = slaughterhouse_03
	
	ai_value = {
		base = 1
		modifier = {
			add = 4
			scope:holder = {
				has_government = republic_government
			}
		}
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_slaughterhouse
}

###Livestock market
slaughterhouse_03 = {
	construction_time = mbrxxx_construction_time_1_year

	can_construct = {
		has_building_or_higher = city_03
		has_building_or_higher = pastures_03
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}

	cost_gold = cheap_building_tier_3_cost
	
	province_modifier = {
		monthly_income = 1.5
	}
	county_modifier = {
		supply_limit = 2000
		development_growth_factor = 0.02
	}
	
	next_building = slaughterhouse_04

	ai_value = {
		base = 1
		modifier = {
			add = 4
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_slaughterhouse
}

###easteries
slaughterhouse_04 = {
	construction_time = mbrxxx_construction_time_1_and_half_years

	can_construct = {
		has_building_or_higher = city_04
		has_building_or_higher = pastures_04
		scope:holder.culture = {
			has_innovation = innovation_windmills
		}
	}

	cost_gold = cheap_building_tier_4_cost
	
	province_modifier = {
		monthly_income = 2.3
		levy_reinforcement_rate = 0.20
	}

	county_modifier = {
		supply_limit = 3500
		development_growth_factor = 0.03
	}
	
	ai_value = {
		base = 1
		modifier = {
			add = 4
			scope:holder = {
				has_government = republic_government
			}
		}
	}

	flag = mbrxxx_building
	flag = MRBXXX_upgrade
	flag = mbrxxx_slaughterhouse
}
