﻿retired_paelex_court_position = {
	max_available_positions = 1

	opinion = {
		value = regular_court_position_opinion
	}

	aptitude_level_breakpoints = { 20 40 60 80 }

	aptitude = {
		value = 1
		add = {
			value = diplomacy
			desc = court_position_skill_diplomacy
		}
		add = {
			value = intrigue
			desc = court_position_skill_intrigue
		}
		add = {
			value = learning
			desc = court_position_skill_learning
		}
		add = {
			value = martial
			desc = court_position_skill_martial
		}
		add = {
			value = stewardship
			desc = court_position_skill_stewardship
		}
	}

	is_shown = {
		is_regula_trigger = yes
		is_female = yes
	}

	is_shown_character = {
		scope:employee = {
			is_courtier_of = scope:liege
			is_imprisoned = no
			has_trait = retired_paelex
			is_regula_trigger = yes
		}
	}

	revoke_cost = {
		prestige =  {
			value = major_court_position_prestige_revoke_cost

			# Set to 0 with Dynasty Perk Inner Circle
			if = {
				limit = {
					exists = dynasty
					dynasty = { has_dynasty_perk = fp2_coterie_legacy_1 }

					employs_court_position = retired_paelex_court_position
					any_court_position_holder = {
				        type = retired_paelex_court_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
		}
	}

	salary = {
		round = no
		gold = {
			value = medium_court_position_salary
			# Set to 0 with Dynasty Perk Inner Circle
			if = {
				limit = {
					scope:liege = {
						exists = dynasty
						dynasty = { has_dynasty_perk = fp2_coterie_legacy_1 }

						employs_court_position = retired_paelex_court_position
						any_court_position_holder = {
					        type = retired_paelex_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
	}

	scaling_employer_modifiers = {
		terrible = {
			same_faith_opinion = 5
			monthly_piety = 0.1
		}
		poor = {
			fertility = 0.05
			same_faith_opinion = 5
			monthly_piety = 0.2
		}
		average = {
			fertility = 0.05
			same_faith_opinion = 10
			monthly_piety = 0.3
		}
		good = {
			fertility = 0.10
			same_faith_opinion = 15
			monthly_piety = 0.4
			negate_health_penalty_add = minor_health_bonus
		}
		excellent = {
			fertility = 0.15
			same_faith_opinion = 20
			monthly_piety = 0.5
			negate_health_penalty_add = medium_health_bonus
		}
	}

	modifier = {
		monthly_prestige = 0.25
		monthly_piety = 0.5
	}

	on_court_position_received = {
		basic_gained_court_position_effect = yes
	}
	on_court_position_revoked = {
		basic_revoked_court_position_effect = yes
	}
	on_court_position_invalidated = {
		basic_invalidated_court_position_effect = yes
	}
	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		add = court_position_candidate_aptitude_value
		add = court_position_debt_considerations_value
	}
}
