﻿# Keeper of Secrets Position

keeper_of_secrets_court_position = {
	sort_order = 260
	max_available_positions = 1
	skill = intrigue

	court_position_asset = {
		animation = drink_goblet
		background = "gfx/interface/illustrations/event_scenes/fp2_corridor_night.dds"
	}

	opinion = {
		value = regular_court_position_opinion
	}

	aptitude_level_breakpoints = { 20 40 60 80 }

	aptitude = {
		value = 20
		add = {
			value = intrigue
			multiply = 3.0
			max = 60
			desc = court_position_skill_intrigue
		}
		if = {
			limit = { has_trait = schemer }
			add = { value = 20 desc = court_position_schemer_trait }
		}
		if = {
			limit = { has_trait = vengeful }
			add = { value = 20 desc = court_position_vengeful_trait }
		}
		if = {
			limit = { has_trait = deceitful }
			add = { value = 15 desc = court_position_deceitful_trait }
		}
		if = {
			limit = { has_trait = ambitious }
			add = { value = 15 desc = court_position_ambitious_trait }
		}
		if = {
			limit = { has_trait = paranoid }
			add = { value = 10 desc = court_position_paranoid_trait }
		}
		if = {
			limit = { has_trait = education_intrigue }
			add = {
				value = 4
				if = {
					limit = { has_trait = education_intrigue_2 }
					add = 4
				}
				else_if = {
					limit = { has_trait = education_intrigue_3 }
					add = 8
				}
				else_if = {
					limit = { has_trait = education_intrigue_4 }
					add = 12
				}
				else_if = {
					limit = { has_trait = education_intrigue_5 }
					add = 22
				}
				desc = education_intrigue
			}
		}
		if = {
			limit = { has_trait = intellect_good_3 }
			add = { value = 40 desc = court_position_intellect_good_3_trait }
		}
		else_if = {
			limit = { has_trait = intellect_good_2 }
			add = { value = 20 desc = court_position_intellect_good_2_trait }
		}
		else_if = {
			limit = { has_trait = intellect_good_1 }
			add = { value = 10 desc = court_position_intellect_good_1_trait }
		}
		if = {
			limit = { has_trait = honest }
			add = { value = -20 desc = court_position_honest_trait }
		}
		if = {
			limit = { has_trait = just }
			add = { value = -15 desc = court_position_just_trait }
		}
	}

	is_shown = {
		has_ep1_court_positions_dlc_trigger = yes
		highest_held_title_tier >= 3
	}

	valid_position = {
		highest_held_title_tier >= 3
		is_landless_adventurer = no
	}

	valid_character = {
		scope:employee = {
			is_imprisoned = no
			is_adult = yes
			is_ruler = no
		}
	}

	revoke_cost = {
		prestige = {
			value = major_court_position_prestige_revoke_cost
		}
	}

	salary = {
		gold = 1.2
		prestige = 0.3
	}

	scaling_employer_modifiers = {
		terrible = {
			enemy_hostile_scheme_phase_duration_add = 1
			hostile_scheme_phase_duration_add = -1
		}
		poor = {
			enemy_hostile_scheme_phase_duration_add = 2
			hostile_scheme_phase_duration_add = -2
			intrigue_lifestyle_xp_gain_mult = 0.05
		}
		average = {
			intrigue_lifestyle_xp_gain_mult = 0.10
			enemy_hostile_scheme_phase_duration_add = 4
			hostile_scheme_phase_duration_add = -3
		}
		good = {
			intrigue_lifestyle_xp_gain_mult = 0.15
			enemy_hostile_scheme_phase_duration_add = 8
			hostile_scheme_phase_duration_add = -5
		}
		excellent = {
			intrigue_lifestyle_xp_gain_mult = 0.20
			enemy_hostile_scheme_phase_duration_add = 16
			hostile_scheme_phase_duration_add = -7
		}
	}

	custom_employer_modifier_description = keeper_of_secrets_employer_custom_effect_description

	modifier = {
		intrigue = 2
		monthly_prestige = 0.3
	}

	candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		add = court_position_candidate_aptitude_value
		scope:liege = {
			if = {
				limit = {
					OR = {
						has_trait = paranoid
						has_trait = deceitful
					}
				}
				add = 40
			}
		}
		add = court_position_debt_considerations_value
	}
}