﻿#### BASE CONSIDERATION OVER ALIGNMENT
######################################################
court_position_candidate_score_ket_base_value = {
	scope:liege = {
		# Not very likely to hire rivals
		if = {
			limit = {
				has_relation_rival = scope:employee
			}
			add = -1000
		}
		if = {
			limit = {
				NOT = { exists = scope:firing_court_position }
				scope:employee = { has_any_court_position = yes }
			}
			add = -150
		}
	}
}

#### GRAB THE BEST APTITUDE
######################################################
court_position_candidate_aptitude_ket_value = {
	scope:employee = {
		# Does the liege have a better candidate that they should be hiring instead?
		if = {
			limit = {
				scope:highest_available_aptitude > scope:employee_aptitude
			}
			add = -125
		}
		# More likely to pick a courtier with a high aptitude, less likely to pick one with low
		add = {
			value = scope:employee_aptitude
			multiply = 4
		}
	}
}

#### HAVE MONEY TO AFFORD
######################################################
court_position_debt_considerations_ket_value = {
	scope:liege = {
		if = {
			limit = {
				debt_level >= 5
			}
			add = -5000
		}
		else_if = {
			limit = {
				debt_level >= 4
			}
			add = -1000
		}
		else_if = {
			limit = {
				debt_level >= 3
			}
			add = -500
		}
		else_if = {
			limit = {
				debt_level >= 2
			}
			add = -200
		}
		else_if = {
			limit = {
				debt_level >= 1
			}
			add = -50
		}
		if = { # Needs money for WAR!
			limit = {
				ai_has_conqueror_personality = yes
			}
			add = -100
		}
	}
}

#### LIEGE - STRESSED
######################################################
court_position_stressed_ket_value = {
	scope:liege = {
			if = {	limit = {	stress_level >= 1	}
			add = 20	
}	}	}

#### EMPLOYEE - CLOSE STATUS ADVANTAGE
######################################################
court_position_royal_advantage_ket_value = {
	scope:employee = {
		if = {	
			limit = {	is_close_family_of = scope:liege }
			add = 30	
		}
		else_if = {	
			limit = {	is_consort_of = scope:liege }
			add = 20	
		}
	}
}

