############################
# AMENITIES COST VALUES
############################
# BASE VALUES

base_court_amenities_cost = {
	value = sub_realm_size
	divide = {
		add = 4
		subtract = {
			add = 0.25
			multiply = court_grandeur_current_level
		}
	}
	if = { # Add a baseline depending on rank
		limit = {
			highest_held_title_tier = tier_empire
		}
		add = 20
	}
	else = {
		add = 10
	}
	if = {
		limit = {
			culture = {
				has_cultural_era_or_later = culture_era_late_medieval
			}
		}
		multiply =  {
			value =  1.75
		}
	}
	else_if = {
		limit = {
			culture = {
				has_cultural_era_or_later = culture_era_high_medieval
			}
		}
		multiply = {
			value = 1.5
		}
	}
	else_if = {
		limit = {
			culture = {
				has_cultural_era_or_later = culture_era_early_medieval
			}
		}
		multiply = {
			value = 1.25
		} 
	}
}

court_amenities_cost_level_1 = {
	value = base_court_amenities_cost
	divide = 96
	min = 0.2
	if = {
		limit = {
			government_has_flag = government_is_tribal
		}
		min = 0.4
	}
}
court_amenities_cost_level_1_fashion = {
	value = court_amenities_cost_level_1
	if = {
		limit = {
			has_character_flag = court_free_fashion
		}
		min = 0
		multiply = 0
	}
}
court_amenities_cost_level_1_food = {
	value = court_amenities_cost_level_1
	if = {
		limit = {
			has_character_modifier = rivers_of_wine_modifier
		}
		multiply = 0.5
	}
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_food_taster_2_modifier
				has_character_modifier = employer_booner_food_taster_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_1_lodgings = {
	value = court_amenities_cost_level_1
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_seneschal_2_modifier
				has_character_modifier = employer_booner_seneschal_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_1_servants = {
	value = court_amenities_cost_level_1
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_cupbearer_2_modifier
				has_character_modifier = employer_booner_cupbearer_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_2 = {
	value = base_court_amenities_cost
	divide = 48
	min = 0.4
	if = {
		limit = {
			government_has_flag = government_is_tribal
		}
		min = 0.8
	}
}
court_amenities_cost_level_2_fashion = {
	value = court_amenities_cost_level_2
	if = {
		limit = {
			has_character_flag = court_cheaper_fashion
		}
		multiply = 0.8
	}
}
court_amenities_cost_level_2_food = {
	value = court_amenities_cost_level_2
	if = {
		limit = {
			has_character_flag = court_cheaper_food
		}
		multiply = 0.8
	}
	if = {
		limit = {
			has_character_modifier = rivers_of_wine_modifier
		}
		multiply = 0.5
	}
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_food_taster_2_modifier
				has_character_modifier = employer_booner_food_taster_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_2_lodgings = {
	value = court_amenities_cost_level_2
	if = {
		limit = {
			has_character_modifier = lodgings_epidemics_resistance_modifier_1
		}
		multiply = 0.85
	}
	if = {
		limit = {
			has_character_modifier = lodgings_epidemics_resistance_modifier_2
		}
		multiply = 0.75
	}
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_seneschal_2_modifier
				has_character_modifier = employer_booner_seneschal_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_2_servants = {
	value = court_amenities_cost_level_2
	if = {
		limit = {
			has_character_flag = court_cheaper_servants
		}
		multiply = 0.8
	}
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_cupbearer_2_modifier
				has_character_modifier = employer_booner_cupbearer_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_3 = {
	value = base_court_amenities_cost
	divide = 32
	min = 0.6
	if = {
		limit = {
			government_has_flag = government_is_tribal
		}
		min = 1.2
	}
}
court_amenities_cost_level_3_food = {
	value = court_amenities_cost_level_3
	if = {
		limit = {
			has_character_modifier = rivers_of_wine_modifier
		}
		multiply = 0.5
	}
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_food_taster_2_modifier
				has_character_modifier = employer_booner_food_taster_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_3_lodgings = {
	value = court_amenities_cost_level_3
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_seneschal_2_modifier
				has_character_modifier = employer_booner_seneschal_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_3_servants = {
	value = court_amenities_cost_level_3
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_cupbearer_2_modifier
				has_character_modifier = employer_booner_cupbearer_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_4 = {
	value = base_court_amenities_cost
	divide = 24
	min = 0.8
	if = {
		limit = {
			government_has_flag = government_is_tribal
		}
		min = 1.6
	}
}
court_amenities_cost_level_4_food = {
	value = court_amenities_cost_level_4
	if = {
		limit = {
			has_character_modifier = rivers_of_wine_modifier
		}
		multiply = 0.5
	}
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_food_taster_2_modifier
				has_character_modifier = employer_booner_food_taster_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_4_lodgings = {
	value = court_amenities_cost_level_4
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_seneschal_2_modifier
				has_character_modifier = employer_booner_seneschal_3_modifier
			}
		}
		multiply = 0.75
	}
}
court_amenities_cost_level_4_servants = {
	value = court_amenities_cost_level_4
	if = {
		limit = {
			OR = {
				has_character_modifier = employer_booner_cupbearer_2_modifier
				has_character_modifier = employer_booner_cupbearer_3_modifier
			}
		}
		multiply = 0.75
	}
}

############################
# FASHION COSTS
############################

court_fashion_acceptable_cost = {
	value = court_amenities_cost_level_1_fashion
}
court_fashion_decent_cost = {
	value = court_amenities_cost_level_2_fashion
}
court_fashion_good_cost = {
	value = court_amenities_cost_level_3
}
court_fashion_fantastic_cost = {
	value = court_amenities_cost_level_4
}

############################
# FOOD QUALITY COSTS
############################

court_food_quality_modest_cost = {
	value = court_amenities_cost_level_1_food
}
court_food_quality_decent_cost = {
	value = court_amenities_cost_level_2_food
}
court_food_quality_lavish_cost = {
	value = court_amenities_cost_level_3_food
}
court_food_quality_exotic_cost = {
	value = court_amenities_cost_level_4_food
}

############################
# LODGING STANDARTS COSTS
############################

court_lodging_standards_small_cost = {
	value = court_amenities_cost_level_1_lodgings
}
court_lodging_standards_middling_cost = {
	value = court_amenities_cost_level_2_lodgings
}
court_lodging_standards_spacious_cost = {
	value = court_amenities_cost_level_3_lodgings
}
court_lodging_standards_grand_cost = {
	value = court_amenities_cost_level_4_lodgings
}


############################
# COURT SERVANTS COSTS
############################

court_servants_few_cost = {
	value = court_amenities_cost_level_1_servants
}
court_court_servants_some_cost = {
	value = court_amenities_cost_level_2_servants
}
court_court_servants_many_cost = {
	value = court_amenities_cost_level_3_servants
}
court_servants_endless_cost = {
	value = court_amenities_cost_level_4_servants
}

# Referenced from code
# root is the character
# Determines how long amenity cooldowns are in months
court_amenity_cooldown_months = {
	value = 12
}
