﻿can_make_expensive_purchase_trigger = {
	OR = {
		# Players can make their own decisions.
		is_ai = no
		# Some people are just really bad with money.
		has_trait = profligate
		## If a purchase is unwise but would be magnanimous, save this scope first to flag it as valid in the event.
		### If you're in a chain, don't forget to clear the scope up afterwards with clear_saved_scope, otherwise it might affect other usages of the trigger further down the chain.
		AND = {
			has_trait = improvident
			exists = scope:generous_purchase
		}
		# And if you've got the cash to spare, who cares?
		short_term_gold >= $PRICE$
	}
}

county_has_any_special_mine_building_trigger = {
	has_building_with_flag = special_mine
	#OR = {
	#	# Rammelsberg Mines
	#	has_building_or_higher = rammelsberg_mines_01
	#	# Kutna_hora Mines
	#	has_building_or_higher = kutna_hora_mines_01
	#	# Kremnica Mines
	#	has_building_or_higher = kremnica_mines_01
	#	# Falun Mines
	#	has_building_or_higher = falun_mines_01
	#	# Schwaz Mines
	#	has_building_or_higher = schwaz_mines_01
	#	# Argentiera Mines
	#	has_building_or_higher = argentiera_mines_01
	#	# Kollur Mines
	#	has_building_or_higher = kollur_mines_01
	#	# Siderokausia Mines
	#	has_building_or_higher = siderokausia_mines_01
	#	# Mali Mines
	#	has_building_or_higher = mali_mines_01
	#	# Konasamudram Mines
	#	has_building_or_higher = konasamudram_mines_01
	#	# Dean Mines
	#	has_building_or_higher = dean_mines_01
	#	# Phnom Dek Mines
	#	has_building_or_higher = phnom_dek_mines_01
	#	# Zawar Mines
	#	has_building_or_higher = zawar_mines_01
	#	# Takkeda Mines
	#	has_building_or_higher = takkeda_mines_01
	#	# Khetri Mines
	#	has_building_or_higher = khetri_mines_01
	#	# Taghaza Mines
	#	has_building_or_higher = taghaza_mines_01
	#	# Ijil Mines
	#	has_building_or_higher = ijil_mines_01
	#	# Turda Mines
	#	has_building_or_higher = turda_mines_01
	#	# Phocaea Mines
	#	has_building_or_higher = phocaea_mines_01
	#	# Pansjhir Mines
	#	has_building_or_higher = pansjhir_mines_01
	#	# Trepca Mines
	#	has_building_or_higher = trepca_mines_01
	#	# Rudnik Mines
	#	has_building_or_higher = rudnik_mines_01
	#	# Cevennes Mines
	#	has_building_or_higher = cevennes_mines_01
	#	# Allaq Mines
	#	has_building_or_higher = allaq_mines_01
	#	# Verespatak Mines
	#	has_building_or_higher = verespatak_mines_01
	#	# Nishapur Mines
	#	has_building_or_higher = nishapur_mines_01
	#	# Srebrenica Mines
	#	has_building_or_higher = srebrenica_mines_01
	#	# Ratnapura Mines
	#	has_building_or_higher = ratnapura_mines_01
	#	# Sar i Sang Mines
	#	has_building_or_higher = sar_i_sang_mines_01
	#	# Mogok Valley Mines
	#	has_building_or_higher = mogok_mines_01
	#}
}

location_has_multi_story_buildings_trigger = {
	$LOCATION$ = {
		# Filter out ocean-going people.
		## Yes, this will error otherwise.
		is_sea_province = no
		# We just want to make sure we're not dealing with a tribe, who likely won't have too many really tall buildings.
		NOT = { has_holding_type = tribal_holding }
		# And that the place isn't a total backwater, which would also stop it having too many tall buildings.
		county = { development_level >= 10 }
	}
}

location_has_fast_traffic_trigger = {
	$LOCATION$ = {
		# Filter out ocean-going people.
		## This one just might hypothetically error, so we check just in case.
		is_sea_province = no
		# We just want to make sure we're not dealing with a tribe, who would probably have carts but likely don't have to worry about them speeding much.
		NOT = { has_holding_type = tribal_holding }
		# And that the place isn't a total backwater, which would also keep the flow down.
		county = { development_level >= 20 }
	}
}
