has_upgraded_capital_4 = {
	custom_tooltip = {
		fail_text = "requires_building_capital_4"
		OR = {
			is_planet_class = pc_habitat
			has_modifier = resort_colony
			has_modifier = slave_colony			
			owner = { is_regular_empire = no }
			has_building = building_avb_capital_4
			has_building = building_avb_capital_5
			has_building = building_avb_capital_6
		}
	}
	custom_tooltip = {
		fail_text = "requires_building_machine_capital_4"
		OR = {
			is_planet_class = pc_habitat
			owner = { is_machine_empire = no }
			has_building = building_avb_machine_capital_4
			has_building = building_avb_machine_capital_5
			has_building = building_avb_machine_capital_6
		}
	}
	custom_tooltip = {
		fail_text = "requires_building_hive_capital_3"
		OR = {
			is_planet_class = pc_habitat
			owner = { is_hive_empire = no }
			has_building = building_avb_hive_capital_3
			has_building = building_avb_hive_capital_4
		}
	}
	custom_tooltip = {
		fail_text = "requires_building_hab_capital_3"
		OR = {	
			NOT = { is_planet_class = pc_habitat }
			has_building = building_avb_hab_capital_3
		}
	}
	custom_tooltip = {
		fail_text = "requires_building_resort_capital_3"
		OR = {	
			NOT = { has_modifier = resort_colony }
			has_building = building_avb_resort_capital_3
		}
	}		
	custom_tooltip = {
		fail_text = "requires_building_slave_capital_3"
		OR = {	
			NOT = { has_modifier = slave_colony }
			has_building = building_avb_slave_capital_3
		}
	}		
}

has_upgraded_capital_5 = {
	custom_tooltip = {
		fail_text = "requires_building_capital_5"
		OR = {
			is_planet_class = pc_habitat
			has_modifier = resort_colony
			has_modifier = slave_colony			
			owner = { is_regular_empire = no }
			has_building = building_avb_capital_5
			has_building = building_avb_capital_6
		}
	}
	custom_tooltip = {
		fail_text = "requires_building_machine_capital_5"
		OR = {
			is_planet_class = pc_habitat
			owner = { is_machine_empire = no }
			has_building = building_avb_machine_capital_5
			has_building = building_avb_machine_capital_6
		}
	}
	custom_tooltip = {
		fail_text = "requires_building_hive_capital_3"
		OR = {
			is_planet_class = pc_habitat
			owner = { is_hive_empire = no }
			has_building = building_avb_hive_capital_3
			has_building = building_avb_hive_capital_4
		}
	}
	# custom_tooltip = {
		# fail_text = "requires_building_hab_capital_3"
		# OR = {	
			# NOT = { is_planet_class = pc_habitat }
			# has_building = building_avb_hab_capital_3
		# }
	# }
	# custom_tooltip = {
		# fail_text = "requires_building_resort_capital_3"
		# OR = {	
			# NOT = { has_modifier = resort_colony }
			# has_building = building_avb_resort_capital_3
		# }
	# }		
	# custom_tooltip = {
		# fail_text = "requires_building_slave_capital_3"
		# OR = {	
			# NOT = { has_modifier = slave_colony }
			# has_building = building_avb_slave_capital_3
		# }
	# }		
}

has_upgraded_capital_6 = {
	custom_tooltip = {
		fail_text = "requires_building_capital_6"
		OR = {
			is_planet_class = pc_habitat
			has_modifier = resort_colony
			has_modifier = slave_colony			
			owner = { is_regular_empire = no }
			has_building = building_avb_capital_6
		}
	}
	custom_tooltip = {
		fail_text = "requires_building_machine_capital_6"
		OR = {
			is_planet_class = pc_habitat
			owner = { is_machine_empire = no }
			has_building = building_avb_machine_capital_6
		}
	}
	# custom_tooltip = {
		# fail_text = "requires_building_hive_capital_3"
		# OR = {
			# is_planet_class = pc_habitat
			# owner = { is_hive_empire = no }
			# has_building = building_avb_hive_capital_4
		# }
	# }
	# custom_tooltip = {
		# fail_text = "requires_building_hab_capital_3"
		# OR = {	
			# NOT = { is_planet_class = pc_habitat }
			# has_building = building_avb_hab_capital_3
		# }
	# }
	# custom_tooltip = {
		# fail_text = "requires_building_resort_capital_3"
		# OR = {	
			# NOT = { has_modifier = resort_colony }
			# has_building = building_avb_resort_capital_3
		# }
	# }		
	# custom_tooltip = {
		# fail_text = "requires_building_slave_capital_3"
		# OR = {	
			# NOT = { has_modifier = slave_colony }
			# has_building = building_avb_slave_capital_3
		# }
	# }		
}