## Categories used in this file must have use_for_ai_budget = yes defined in economic_categories ##
## It is possible to have multiple entries with the same category and resource ##

#################
## Expenditure ##
#################


dark_matter_expenditure_planets = {
	resource = sr_dark_matter
	type = expenditure
	category = planets

	potential = {
		always = yes
	}

	weight = {
		weight = 0.2
	}
}

dark_matter_expenditure_ships = {
	resource = sr_dark_matter
	type = expenditure
	category = ships

	potential = {
		always = yes
	}

	weight = {
		weight = 0.1
		modifier = {
			factor = 10
			has_ascension_perk = ap_become_the_crisis
			has_crisis_level = crisis_level_5
			NOT = {
				count_controlled_fleet = {
					count >= 1
					limit = {
						is_ship_size = star_eater
					}
				}
			}
		}
	}
	desired_min = {
		base = 0
		modifier = {
			add = 10000
			has_ascension_perk = ap_become_the_crisis
			NOT = {
				count_controlled_fleet = {
					count >= 1
					limit = {
						is_ship_size = star_eater
					}
				}
			}
		}
	}
}

dark_matter_expenditure_megastructures = {
	resource = sr_dark_matter
	type = expenditure
	category = megastructures
	potential = {
		has_ascension_perk = ap_become_the_crisis
		has_crisis_level = crisis_level_5
	}

	weight = {
		weight = 0.8
	}

	desired_min = {
		base = 0
		modifier = {
			add = 20000
			any_owned_megastructure = {
				is_megastructure_type = crisis_sphere_0
				is_upgrading = no
			}
		}
		modifier = {
			add = 30000
			any_owned_megastructure = {
				is_megastructure_type = crisis_sphere_1
				is_upgrading = no
			}
		}
		modifier = {
			add = 40000
			any_owned_megastructure = {
				is_megastructure_type = crisis_sphere_2
				is_upgrading = no
			}
		}
		modifier = {
			add = 50000
			any_owned_megastructure = {
				is_megastructure_type = crisis_sphere_3
				is_upgrading = no
			}
		}
	}
}

dark_matter_expenditure_upgrade = {
	resource = sr_dark_matter
	type = expenditure
	category = ship_upgrades

	potential = {
		always = yes
	}

	weight = {
		base = 0.1
	}
}

dark_matter_expenditure_trade = {
	resource = sr_dark_matter
	type = expenditure
	category = trade

	potential = {
		always = yes
	}

	weight = {
		weight = 0.1
	}
}

dark_matter_expenditure_starbases = {
	resource = sr_dark_matter
	type = expenditure
	category = starbases

	potential = {
		has_technology = tech_dark_matter_detection
	}

	weight = {
		weight = 0.2
	}
}

# Upkeep -----------------------------------------------------------------

dark_matter_upkeep_planets = {
	resource = sr_dark_matter
	type = upkeep
	category = planets

	potential = {
		always = yes
	}

	weight = {
		weight = 0.9
	}
}

dark_matter_upkeep_ships = {
	resource = sr_dark_matter
	type = upkeep
	category = ships

	potential = {
		always = yes
	}

	weight = {
		weight = 0.1
	}
}

dark_matter_upkeep_edicts = {
	resource = sr_dark_matter
	type = upkeep
	category = edicts

	potential = {
		always = yes
	}

	weight = {
		base = 0.25
	}
}

dark_matter_upkeep_starbases = {
	resource = sr_dark_matter
	type = upkeep
	category = starbases

	potential = {
		has_technology = tech_dark_matter_detection
	}

	weight = {
		weight = 0.1
	}
}
