﻿court_fashion = {
	default = court_fashion_default
	
	court_fashion_default = {
		ai_will_do = {
			value = 100
		}
		owner_modifier = {
			legitimacy_gain_mult = -0.10
			attraction_opinion = -10
		}
	}
	
	court_fashion_acceptable = {
	
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_fashion_acceptable_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_fashion_acceptable_cost
				}
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 4
		}
		courtier_guest_modifier = {
		}
		ai_will_do = {
			value = 90
			if = {
				limit = {
					has_personality_extroverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_dominant_trigger = yes
				}
				add = 3
			}
			if = {
				limit = {
					has_trait = arrogant
				}
				add = 2
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	
	court_fashion_decent = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_fashion_decent_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_fashion_decent_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			legitimacy_gain_mult = 0.10
			court_grandeur_baseline_add = 8
			attraction_opinion = 10
		}
		courtier_guest_modifier = {
			monthly_prestige = 1
			attraction_opinion = 4
		}
		ai_will_do = {
			value = 80
			if = {
				limit = {
					has_personality_extroverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_dominant_trigger = yes
				}
				add = 3
			}
			if = {
				limit = {
					has_trait = arrogant
				}
				add = 2
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}

	}
	
	court_fashion_good = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_fashion_good_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_fashion_good_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = { 
			legitimacy_gain_mult = 0.15
			court_grandeur_baseline_add = 12
			attraction_opinion = 15
		}
		courtier_guest_modifier = {
			monthly_prestige = 1.5
			attraction_opinion = 8
		}
		ai_will_do = {
			value = 70
			if = {
				limit = {
					has_personality_extroverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_dominant_trigger = yes
				}
				add = 3
			}
			if = {
				limit = {
					has_trait = arrogant
				}
				add = 2
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	
	court_fashion_fantastic = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_fashion_fantastic_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_fashion_fantastic_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			legitimacy_gain_mult = 0.20
			court_grandeur_baseline_add = 16
			attraction_opinion = 20
		}
		courtier_guest_modifier = {
			monthly_prestige = 2
			attraction_opinion = 12
		}
		ai_will_do = {
			value = 60
			if = {
				limit = {
					has_personality_extroverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_dominant_trigger = yes
				}
				add = 3
			}
			if = {
				limit = {
					has_trait = arrogant
				}
				add = 2
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	#everyone is weighted to be more likely to wear low nobility clothing at higher levels
}

court_food_quality = {
	default = court_food_quality_default
	
	court_food_quality_default = {
		ai_will_do = {
			value = 100
		}
		owner_modifier = {
			fertility = -0.10
			stress_loss_mult = -0.1
		}

		owner_modifier_description = owner_court_food_quality_meager
	}
	
	court_food_quality_modest = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_food_quality_modest_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_food_quality_modest_cost
				}
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 4
		}

		courtier_guest_modifier = {
		}	
		ai_will_do = {
			value = 90
			if = {
				limit = {
					loves_food_trigger = yes
					ai_rationality <= high_negative_ai_value
				}
				add = 10
			}
			if = {
				limit = {
					loves_food_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_benevolent_trigger = yes
				}
				add = 3
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	
	court_food_quality_decent = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_food_quality_decent_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_food_quality_decent_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 8
			fertility = 0.10
			life_expectancy = 2
		}

		owner_modifier_description = owner_court_food_quality_decent

		courtier_guest_modifier = {
			stress_loss_mult = 0.1
		}	
		ai_will_do = {
			value = 80
			if = {
				limit = {
					loves_food_trigger = yes
					ai_rationality <= high_negative_ai_value
				}
				add = 10
			}
			if = {
				limit = {
					loves_food_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_benevolent_trigger = yes
				}
				add = 3
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	
	court_food_quality_lavish = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_food_quality_lavish_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_food_quality_lavish_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = { 
			court_grandeur_baseline_add = 12
			fertility = 0.15
			life_expectancy = 3
		}

		owner_modifier_description = owner_court_food_quality_lavish

		courtier_guest_modifier = {
			stress_loss_mult = 0.20
		}
		ai_will_do = {
			value = 70
			if = {
				limit = {
					loves_food_trigger = yes
					ai_rationality <= high_negative_ai_value
				}
				add = 10
			}
			if = {
				limit = {
					loves_food_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_benevolent_trigger = yes
				}
				add = 3
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	
	court_food_quality_exotic = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_food_quality_exotic_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_food_quality_exotic_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 16
			negate_health_penalty_add = 0.2
			fertility = 0.20
			life_expectancy = 4
		}

		owner_modifier_description = owner_court_food_quality_exotic

		courtier_guest_modifier = {
			stress_loss_mult = 0.30
			negate_health_penalty_add = 0.2
		}
		ai_will_do = {
			value = 60
			if = {
				limit = {
					loves_food_trigger = yes
					ai_rationality <= high_negative_ai_value
				}
				add = 10
			}
			if = {
				limit = {
					loves_food_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_benevolent_trigger = yes
				}
				add = 3
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
}

court_lodging_standards = {
	default = court_lodging_standards_default
	
	court_lodging_standards_default = {
		ai_will_do = {
			value = 100
		}
		owner_modifier = {
			courtier_and_guest_opinion = -10
			stress_gain_mult = 0.10
		}
	}
	
	court_lodging_standards_small = {
		cost = {
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_lodging_standards_small_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_lodging_standards_small_cost
				}
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 4
		}
		owner_modifier_description = owner_court_lodgings_small

		courtier_guest_modifier = {
		}
		ai_will_do = {
			value = 90
			if = {
				limit = {
					has_personality_introverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_benevolent_trigger = yes
				}
				add = 3
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
		courtier_guest_modifier_description = court_lodgings_small_inspirations
	}
	
	court_lodging_standards_middling = {
		cost = {
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_lodging_standards_middling_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_lodging_standards_middling_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 8
			courtier_and_guest_opinion = 10
			stress_gain_mult = -0.10
		}

		owner_modifier_description = owner_court_lodgings_middling

		courtier_guest_modifier = {
			monthly_lifestyle_xp_gain_mult = 0.10
		}
		ai_will_do = {
			value = 80
			if = {
				limit = {
					has_personality_introverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_benevolent_trigger = yes
				}
				add = 3
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
		courtier_guest_modifier_description = court_lodgings_middling_inspirations

	}
	
	court_lodging_standards_spacious = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_lodging_standards_spacious_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_lodging_standards_spacious_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 12
			courtier_and_guest_opinion = 15
			stress_gain_mult = -0.15
		}

		owner_modifier_description = owner_court_lodgings_spacious

		courtier_guest_modifier = {
			monthly_lifestyle_xp_gain_mult = 0.15
		}
		ai_will_do = {
			value = 70
			if = {
				limit = {
					has_personality_introverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_benevolent_trigger = yes
				}
				add = 3
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
		courtier_guest_modifier_description = court_lodgings_spacious_inspirations
	}
	
	court_lodging_standards_grand = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_lodging_standards_grand_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_lodging_standards_grand_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 16
			courtier_and_guest_opinion = 20
			stress_gain_mult = -0.20
		}

		owner_modifier_description = owner_court_lodgings_grand

		courtier_guest_modifier = {
			monthly_lifestyle_xp_gain_mult = 0.20
		}
		ai_will_do = {
			value = 60
			if = {
				limit = {
					has_personality_introverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_benevolent_trigger = yes
				}
				add = 3
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
		courtier_guest_modifier_description = court_lodgings_grand_inspirations

	}
}

court_servants = {
	default = court_servants_default
	
	court_servants_default = {
		ai_will_do = {
			value = 100
		}
		owner_modifier = {
			owned_legend_spread_mult = -0.10
			monthly_piety = -0.5
			enemy_hostile_scheme_phase_duration_add = -10
			personal_scheme_phase_duration_add = 10
		}
	}
	#guest recruitment cost handled in the dynamic_values file
	court_servants_few = {
		cost = {
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_servants_few_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_servants_few_cost
				}
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 4
		}

		owner_modifier_description = court_servants_few_guest_recruitment

		courtier_guest_modifier = {
		}
		ai_will_do = {
			value = 90
			if = {
				limit = {
					has_personality_extroverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_dominant_trigger = yes
				}
				add = 3
			}
			if = {
				limit = {
					ai_sociability > medium_positive_ai_value
				}
				add = 2
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	
	court_servants_some = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_court_servants_some_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_court_servants_some_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			owned_legend_spread_mult = 0.10
			monthly_piety = 0.5
			court_grandeur_baseline_add = 8
			enemy_hostile_scheme_phase_duration_add = 10
			personal_scheme_phase_duration_add = -10
		}

		owner_modifier_description = court_servants_some_guest_recruitment

		courtier_guest_modifier = {
			monthly_piety_gain_mult = 0.10
		}
		ai_will_do = {
			value = 80
			if = {
				limit = {
					has_personality_extroverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_dominant_trigger = yes
				}
				add = 3
			}
			if = {
				limit = {
					ai_sociability > medium_positive_ai_value
				}
				add = 2
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	
	court_servants_many = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_court_servants_many_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_court_servants_many_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			owned_legend_spread_mult = 0.15
			monthly_piety = 1
			court_grandeur_baseline_add = 12
			enemy_hostile_scheme_phase_duration_add = 20
			personal_scheme_phase_duration_add = -20
		}

		owner_modifier_description = court_servants_many_guest_recruitment

		courtier_guest_modifier = {
			monthly_piety_gain_mult = 0.20
		}
		ai_will_do = {
			value = 70
			if = {
				limit = {
					has_personality_extroverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_dominant_trigger = yes
				}
				add = 3
			}
			if = {
				limit = {
					ai_sociability > medium_positive_ai_value
				}
				add = 2
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
	
	court_servants_endless = {
		cost = { 
			round = no
			gold = {
				value = 0
				if = {
					limit = {
						has_treasury = no
					}
					add = court_servants_endless_cost
				}
			}
			treasury = {
				value = 0
				if = {
					limit = {
						has_treasury = yes
					}
					add = court_servants_endless_cost
				}
			}
		}
		can_pick = {
			NOT = {
				government_has_flag = government_is_tribal
			}
		}
		owner_modifier = {
			owned_legend_spread_mult = 0.20
			monthly_piety = 1.5
			court_grandeur_baseline_add = 16
			enemy_hostile_scheme_phase_duration_add = 30
			personal_scheme_phase_duration_add = -30
		}

		owner_modifier_description = court_servants_endless_guest_recruitment

		courtier_guest_modifier = {
			monthly_piety_gain_mult = 0.30
		}
		ai_will_do = {
			value = 60
			if = {
				limit = {
					has_personality_extroverted_trigger = yes
				}
				add = 5
			}
			if = {
				limit = {
					has_personality_dominant_trigger = yes
				}
				add = 3
			}
			if = {
				limit = {
					ai_sociability > medium_positive_ai_value
				}
				add = 2
			}
			if = { # Prefer over fashion
				limit = {
					ai_rationality > 0
				}
				add = 1
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
				}
				add = -1000
			}
		}
	}
}