# Do not remove or rename this

# Possible Variables for Buildings:
# strategic_resource: strategic resource, deprecated, strategic resource used by the building.
# allow: trigger to check for allowing construction of building.
# prerequisites: Tech requirements for building.
# empire_unique: boolean, can only build one if set to true.
# cost: resource table, cost of building.
# is_orbital: boolean, can only be built in orbital station.
# modifier: modifier, deprecated, applies a modifier to planet; use planet_modifier instead.
# planet_modifier, country_modifier, army_modifier: applies modifier to planet/country/armies
# triggered_planet_modifier = { key (optional), potential, modifier }: applies conditional modifier to planet
# base_buildtime: int, number of days for construction.
# requires_pop, boolean, building will require a pop for production.
# required_resources, resource table, required resources for production.
# produced_resources, resource table, produced resources in production.
# upgrades, buildings list, buildings this building can upgrade into.
# is_listed, boolean, toggles if this building is shown in the non-upgrade buildable list.
# planet_unique, toggles if one can build multiple of this type on a single planet.
# ai_weight, weight for AI, default is set to one, weight set to 0 means that AI will never build it

#
# BALANCE
# can change the time and cost of all common buildings with these variables below

@b0time = 120
@b0cost = 30
@b0effect = 1
@b0upkeep = 0.5

@b1time = 210
@b1cost = 60
@b1effect = 2
@b1upkeep = 1

@b2time = 180
@b2cost = 90
@b2effect = 3
@b2upkeep = 1.5

@b3time = 180
@b3cost = 120
@b3effect = 4
@b3upkeep = 2

@b4time = 180
@b4cost = 150
@b4effect = 5
@b4upkeep = 2.5

@b5time = 180
@b5cost = 180
@b5effect = 8
@b5upkeep = 3

@science1 = 1
@science2 = 2
@science3 = 3
@science4 = 4
@science5 = 6

@natural_equilibrium_happiness = 0.02

#
#	PRECURSOR PRODUCTION
#

ta_building_precursor_power = {
	base_buildtime = 360
	planet_unique = yes
	
	cost = {
		minerals = @b4cost
	}
	
	produced_resources = {
		energy = 10
	}
	

	potential = {
		owner = {
			has_ascension_perk = ta_ap_precursorproduction 
		}
		planet = {
			NOT = { is_planet_class = pc_habitat }	
			NOT = { has_building = ta_building_precursor_minerals }
			NOT = { has_building = ta_building_precursor_food }
			NOT = { has_building = ta_building_precursor_research }
			NOT = { has_building = ta_building_precursor_unity }
			NOT = { has_building_construction = ta_building_precursor_minerals }
			NOT = { has_building_construction = ta_building_precursor_food }
			NOT = { has_building_construction = ta_building_precursor_research }
			NOT = { has_building_construction = ta_building_precursor_unity }
		}		
	}		
}

ta_building_precursor_minerals = {
	base_buildtime = 360
	planet_unique = yes
	
	cost = {
		minerals = @b4cost
	}
	
	produced_resources = {
		minerals = 12
	}
	

	potential = {
		owner = {
			has_ascension_perk = ta_ap_precursorproduction 
		}
		planet = {
			NOT = { is_planet_class = pc_habitat }	
			NOT = { has_building = ta_building_precursor_power }
			NOT = { has_building = ta_building_precursor_food }
			NOT = { has_building = ta_building_precursor_research }
			NOT = { has_building = ta_building_precursor_unity }
			NOT = { has_building_construction = ta_building_precursor_power }
			NOT = { has_building_construction = ta_building_precursor_food }
			NOT = { has_building_construction = ta_building_precursor_research }
			NOT = { has_building_construction = ta_building_precursor_unity }
		}			
	}		
}

ta_building_precursor_food = {
	base_buildtime = 360
	planet_unique = yes
	
	cost = {
		minerals = @b4cost
	}
	
	produced_resources = {
		food = 12
	}
	

	potential = {
		owner = {
			has_ascension_perk = ta_ap_precursorproduction 
		}
		planet = {
			NOT = { is_planet_class = pc_habitat }	
			NOT = { has_building = ta_building_precursor_minerals }
			NOT = { has_building = ta_building_precursor_power }
			NOT = { has_building = ta_building_precursor_research }
			NOT = { has_building = ta_building_precursor_unity }
			NOT = { has_building_construction = ta_building_precursor_minerals }
			NOT = { has_building_construction = ta_building_precursor_power }
			NOT = { has_building_construction = ta_building_precursor_research }
			NOT = { has_building_construction = ta_building_precursor_unity }
		}			
	}		
}

ta_building_precursor_research = {
	base_buildtime = 360
	planet_unique = yes
	
	cost = {
		minerals = @b4cost
	}
	
	produced_resources = {
		engineering_research = 7
		society_research = 7
		physics_research = 7
	}
	

	potential = {
		owner = {
			has_ascension_perk = ta_ap_precursorproduction 
		}
		planet = {
			NOT = { is_planet_class = pc_habitat }	
			NOT = { has_building = ta_building_precursor_minerals }
			NOT = { has_building = ta_building_precursor_power }
			NOT = { has_building = ta_building_precursor_food }
			NOT = { has_building = ta_building_precursor_unity }
			NOT = { has_building_construction = ta_building_precursor_minerals }
			NOT = { has_building_construction = ta_building_precursor_power }
			NOT = { has_building_construction = ta_building_precursor_food }
			NOT = { has_building_construction = ta_building_precursor_unity }
		}			
	}	
}

ta_building_precursor_unity = {
	base_buildtime = 360
	planet_unique = yes
	
	cost = {
		minerals = @b4cost
	}
	
	produced_resources = {
		unity = 12
	}
	

	potential = {
		owner = {
			has_ascension_perk = ta_ap_precursorproduction 
		}
		planet = {
			NOT = { is_planet_class = pc_habitat }	
			NOT = { has_building = ta_building_precursor_minerals }
			NOT = { has_building = ta_building_precursor_food }
			NOT = { has_building = ta_building_precursor_research }
			NOT = { has_building = ta_building_precursor_power }
			NOT = { has_building_construction = ta_building_precursor_minerals }
			NOT = { has_building_construction = ta_building_precursor_food }
			NOT = { has_building_construction = ta_building_precursor_research }
			NOT = { has_building_construction = ta_building_precursor_power }
		}		
	}		
}
