﻿#EK NOTE: pirates get their own amenties, so we have to limit them from picking the vanilla ones
court_fashion = {
	default = court_fashion_default
	
	court_fashion_default = {
		ai_will_do = {
			value = 100
		}
	}
	
	court_fashion_acceptable = {
	
		can_pick = { NOT = { government_has_flag = government_is_pirate }} #EK EDIT
		cost = { 
			round = no
			gold = court_fashion_acceptable_cost 
		}
		owner_modifier = {
			monthly_prestige_gain_mult = 0.01
			court_grandeur_baseline_add = 4
		}
		courtier_guest_modifier = {
			monthly_prestige = 0.2
		}
		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 = court_fashion_decent_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = {
			monthly_prestige_gain_mult = 0.02
			court_grandeur_baseline_add = 8
		}
		courtier_guest_modifier = {
			monthly_prestige = 0.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 = court_fashion_good_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = { 
			monthly_prestige_gain_mult = 0.03
			court_grandeur_baseline_add = 12
		}
		courtier_guest_modifier = {
			monthly_prestige = 0.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 = court_fashion_fantastic_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = {
			monthly_prestige_gain_mult = 0.04
			court_grandeur_baseline_add = 16	
		}
		courtier_guest_modifier = {
			monthly_prestige = 1.6
		}
		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_description = owner_court_food_quality_meager
	}
	
	court_food_quality_modest = {
		can_pick = { NOT = { government_has_flag = government_is_pirate }} #EK EDIT
		cost = { 
			round = no
			gold = court_food_quality_modest_cost
		}
		owner_modifier = {
			court_grandeur_baseline_add = 4
		}

		courtier_guest_modifier = {
			stress_loss_mult = 0.1
		}	
		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 = court_food_quality_decent_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = {
			court_grandeur_baseline_add = 8
		}

		owner_modifier_description = owner_court_food_quality_decent

		courtier_guest_modifier = {
			stress_loss_mult = 0.2
		}	
		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 = court_food_quality_lavish_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = { 
			court_grandeur_baseline_add = 12
		}

		owner_modifier_description = owner_court_food_quality_lavish

		courtier_guest_modifier = {
			stress_loss_mult = 0.3
		}
		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 = court_food_quality_exotic_cost
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = {
			court_grandeur_baseline_add = 16
			negate_health_penalty_add = 0.2
		}

		owner_modifier_description = owner_court_food_quality_exotic

		courtier_guest_modifier = {
			stress_loss_mult = 0.4
			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
		}
	}
	
	court_lodging_standards_small = {
		can_pick = { NOT = { government_has_flag = government_is_pirate }} #EK EDIT
		cost = {
			round = no
			gold = court_lodging_standards_small_cost 
		}
		owner_modifier = {
			court_grandeur_baseline_add = 4
		}
		owner_modifier_description = owner_court_lodgings_small

		courtier_guest_modifier = {
			stress_gain_mult = -0.05
		}
		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 = court_lodging_standards_middling_cost
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 8
		}

		owner_modifier_description = owner_court_lodgings_middling

		courtier_guest_modifier = {
			stress_gain_mult = -0.1
		}
		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 = court_lodging_standards_spacious_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 12
		}

		owner_modifier_description = owner_court_lodgings_spacious

		courtier_guest_modifier = {
			stress_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 = court_lodging_standards_grand_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
		}
		owner_modifier = {
			court_grandeur_baseline_add = 16
		}

		owner_modifier_description = owner_court_lodgings_grand

		courtier_guest_modifier = {
			stress_gain_mult = -0.2
		}
		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
		}
	}
	#guest recruitment cost handled in the dynamic_values file
	court_servants_few = {
		can_pick = { NOT = { government_has_flag = government_is_pirate }} #EK EDIT
		cost = {
			round = no
			gold = court_servants_few_cost 
		}
		owner_modifier = {
			court_grandeur_baseline_add = 4
			enemy_hostile_scheme_phase_duration_add = 4
			personal_scheme_phase_duration_add = -4
		}

		owner_modifier_description = court_servants_few_guest_recruitment

		courtier_guest_modifier = {
			enemy_hostile_scheme_phase_duration_add = 2
			personal_scheme_phase_duration_add = -2
		}
		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 = court_court_servants_some_cost
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = {
			court_grandeur_baseline_add = 8
			enemy_hostile_scheme_phase_duration_add = 8
			personal_scheme_phase_duration_add = -8
		}

		owner_modifier_description = court_servants_some_guest_recruitment

		courtier_guest_modifier = {
			enemy_hostile_scheme_phase_duration_add = 4
			personal_scheme_phase_duration_add = -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 = {
					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 = court_court_servants_many_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = {
			court_grandeur_baseline_add = 12
			enemy_hostile_scheme_phase_duration_add = 12
			personal_scheme_phase_duration_add = -12
		}

		owner_modifier_description = court_servants_many_guest_recruitment

		courtier_guest_modifier = {
			enemy_hostile_scheme_phase_duration_add = 6
			personal_scheme_phase_duration_add = -6
		}
		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 = court_servants_endless_cost 
		}
		can_pick = {
			custom_tooltip = {
				text = government_is_tribal_tt
				NOT = { government_has_flag = government_is_tribal }
			}
			NOT = { government_has_flag = government_is_pirate } #EK EDIT
		}
		owner_modifier = {
			court_grandeur_baseline_add = 16
			enemy_hostile_scheme_phase_duration_add = 16
			personal_scheme_phase_duration_add = -16
		}

		owner_modifier_description = court_servants_endless_guest_recruitment

		courtier_guest_modifier = {
			enemy_hostile_scheme_phase_duration_add = 8
			personal_scheme_phase_duration_add = -8
		}
		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
			}
		}
	}
}

