﻿cagm_court_cook_court_position = {
	sort_order = 211
	max_available_positions = 1
	minimum_rank = county
	skill = stewardship

	court_position_asset = {
		animation = admiration
		background = "gfx/interface/illustrations/event_scenes/bp1_kitchen_western.dds"
	}

	opinion = { value = regular_court_position_opinion }
	aptitude_level_breakpoints = { 20 40 60 80 }

	aptitude = {
		value = 10
		add = {
			value = stewardship
			multiply = 2
			max = 40
			desc = cagm_court_cook_aptitude_stewardship
		}
		add = {
			value = learning
			max = 20
			desc = cagm_court_cook_aptitude_learning
		}
		if = { limit = { has_trait = cagm_cook } add = { value = 15 desc = cagm_court_cook_aptitude_cook } }
		if = { limit = { has_trait_xp = { trait = cagm_cook value >= 50 } } add = { value = 15 desc = cagm_court_cook_aptitude_cook } }
		if = { limit = { has_trait_xp = { trait = cagm_cook value >= 100 } } add = { value = 15 desc = cagm_court_cook_aptitude_cook } }
		if = { limit = { has_trait = diligent } add = { value = 10 desc = court_position_diligent_trait } }
		if = { limit = { has_trait = patient } add = { value = 10 desc = court_position_patient_trait } }
		if = { limit = { has_trait = lifestyle_herbalist } add = { value = 5 desc = court_position_herbalist_trait } }
		if = { limit = { has_trait = lazy } add = { value = -15 desc = court_position_lazy_trait } }
		if = { limit = { has_trait = impatient } add = { value = -10 desc = court_position_impatient_trait } }
		add = court_position_aptitude_high_penalty_value
		add = general_aptitude_bonus
	}

	is_shown = {
		is_landed_or_landless_administrative = yes
		NOT = { government_has_flag = government_is_nomadic }
		NOT = { government_has_flag = government_is_landless_adventurer }
	}

	valid_position = {
		is_landed_or_landless_administrative = yes
		highest_held_title_tier >= tier_county
		NOT = { government_has_flag = government_is_nomadic }
		NOT = { government_has_flag = government_is_landless_adventurer }
	}

	is_shown_character = {
		scope:employee = { court_position_employee_shown_trigger = yes }
	}

	valid_character = {
		scope:employee = {
			liege = scope:liege
			is_adult = yes
			is_imprisoned = no
			NOT = { is_incapable = yes }
		}
	}

	revoke_cost = {
		prestige = {
			value = minor_court_position_prestige_revoke_cost
			if = { limit = { exists = this is_ai = yes } multiply = 0 }
		}
	}

	salary = {
		gold = {
			value = 0.25
			if = { limit = { scope:liege = { has_treasury = yes } } multiply = 0 }
		}
		treasury = {
			value = 0.25
			if = { limit = { scope:liege = { has_treasury = no } } multiply = 0 }
		}
		round = no
	}

	received_salary = {
		gold = { value = 0.25 }
		round = no
	}

	scaling_employer_modifiers = {
		terrible = { courtier_and_guest_opinion = 1 }
		poor = { courtier_and_guest_opinion = 2 }
		average = { courtier_and_guest_opinion = 3 stress_gain_mult = -0.02 }
		good = { courtier_and_guest_opinion = 5 stress_gain_mult = -0.04 }
		excellent = { courtier_and_guest_opinion = 8 stress_gain_mult = -0.06 }
	}

	custom_employer_modifier_description = cagm_court_cook_employer_custom_effect_description

	modifier = {
		stewardship = 1
		monthly_prestige = 0.10
	}

	on_court_position_vacated = {
		court_position_vacated_event_effect = { COURT_POSITION_TYPE = cagm_court_cook_court_position }
	}

	ai_position_score = {
		value = 35
		add = court_position_debt_considerations_value
	}

	ai_candidate_score = {
		value = 25
		add = scope:base_value
		add = court_position_candidate_score_base_value
		add = court_position_candidate_aptitude_value
	}
}
