﻿
justiciar_position = {
	skill = diplomacy
	max_available_positions = 1
	category = court_position_category_common

	opinion = {
		value = regular_court_position_opinion
	}

	# How good is this character in this position? root scope is the holder of the court position
	aptitude = {
		value = 0
		
		add = {
			value = diplomacy
			subtract = 12
			multiply = 5
			max = 60
			desc = court_position_skill_diplomacy
		}
		
		if = {
			limit = {
				has_trait = diligent
			}
			add = { 
				value = 20
				desc = court_position_diligent_trait
			}
		}
		else_if = {
			limit = {
				has_trait = lazy
			}
			add = { 
				value = -20
				desc = court_position_lazy_trait
			}
		}
		
		if = {
			limit = {
				has_trait = cynical
			}
			add = {
				value = 20
				desc = court_position_cynical_trait
			}
		}
		
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 20
				desc = court_position_overseer_trait
			}
		}

		if = {
			limit = {
				has_trait = scholar
			}
			add = {
				value = 15
				desc = court_position_scholar_trait
			}
		}
		
		if = {
			limit = {
				has_trait = theologian
			}
			add = { 
				value = 5
				desc = court_position_patient_trait
			}
		}

		if = {
			limit = {
				has_trait = savior
			}
			add = { 
				value = 5
				desc = court_position_savior_trait
			}
		}
		
		add = court_position_aptitude_low_penalty_value
	}

	is_shown = { }

	# Is this an available position for this court? (root is court owner)
	valid_position = { }

	is_shown_character = {
		scope:employee = {
			OR = {
				is_courtier_of = scope:liege
				is_councillor_of = scope:liege
			}
		}
	}

	valid_character = {
		scope:employee = { is_imprisoned = no }
	}

	revoke_cost = {
	}

	salary = {
		gold = medium_court_position_salary
		round = no
	}
	
	# How high the aptitude has to be to reach the 5 different modifier levels
	aptitude_level_breakpoints = { 10 25 35 50 }

	# These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints) 
	scaling_employer_modifiers = {
		aptitude_level_1 = {		
			monthly_tyranny = -0.01
		}
		aptitude_level_2 = {
			monthly_tyranny = -0.05
		}
		aptitude_level_3 = {
			monthly_tyranny = -0.07
		}
		aptitude_level_4 = {
			monthly_tyranny = -0.1
		}
		aptitude_level_5 = {
			monthly_tyranny = -0.15
		}
	}

	custom_employer_modifier_description = cft_custom_effect_description

	modifier = {
		monthly_prestige = medium_court_position_prestige_salary
	}
	
	on_court_position_received = {
		basic_gained_court_position_effect = yes
	}

	on_court_position_revoked = { 
		basic_revoked_court_position_effect = yes
	}

	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
	}
	
}








