﻿#######################################
# General Court Positions
#######################################
master_of_elephants_court_position = {# Master of the Royal Elephants
	sort_order = 264
	max_available_positions = 1
	#category = court_position_category_royal
	skill = martial
	minimum_rank = kingdom # Should only be available for kings and emperors

	court_position_asset = {
		animation = throne_room_two_handed_passive_1
		background = "gfx/interface/illustrations/event_scenes/bp1_courtyard_indian.dds"
	}

	opinion = {
		value = ceremonial_court_position_opinion
	}

	# How high the aptitude has to be to reach the 5 different modifier levels
	aptitude_level_breakpoints = { 20 40 60 80 }

	# How good is this character in this position? root scope is the holder of the court position
	aptitude = {
		value = 25
		add = court_position_aptitude_boon_voyager_trait
		add = {
			value = martial
			multiply = 2.5
			max = 50
			desc = court_position_skill_martial
		}
		add = {
			value = prowess
			multiply = 2
			max = 50
			desc = court_position_skill_prowess
		}
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 10
				desc = court_position_overseer_trait
			}
		}
		add = court_position_aptitude_family_business_value
		add = court_position_aptitude_high_penalty_value
	}

	# Is this an available position for this court? (root is court owner)
	is_shown = {
		exists = capital_province
		capital_province = {
			OR = {
				geographical_region = world_india
				geographical_region = world_burma
			}
		}
		NOT = { government_has_flag = government_is_nomadic }
	}

	valid_position = {
		highest_held_title_tier >= tier_kingdom
		has_game_rule = zgc_court_positions_on		
	}

	is_shown_character = {
		scope:employee = {
			is_imprisoned = no
			is_vassal_of = scope:liege
		}
	}

	valid_character = {
		scope:employee = {
			OR = {
				is_vassal_of = scope:liege
				is_courtier_of = scope:liege
			}
		}
	}				
	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 = master_of_elephants_court_position
			# 		any_court_position_holder = {
			# 	        type = master_of_elephants_court_position
			# 			exists = dynasty
			# 			house = prev.house
			# 		}
			# 	}
			# 	multiply = 0
			# }
			if = { #Unop: Inner circle legacy allows revoking without cost
				limit = { unop_court_position_inner_circle_revoke_trigger = { LIEGE = root  POS = master_of_elephants } }
				desc = inner_circle_salary_mod
				multiply = 0.25 #ZGC
			}
			#ZGC
			if = {
				limit = { zgc_lowborn_court_position_holder_trigger = { LIEGE = root  POS = master_of_elephants } }
				desc = lowborn_court_position_holder
				multiply = 0.75
			}
			if = {
				limit = { zgc_infirm_court_position_holder_trigger = { LIEGE = root  POS = master_of_elephants } }
				desc = infirm_court_position_holder
				multiply = 0.1
			}
			#/ZGC
			if = {
				limit = {
					exists = this
					is_ai = yes
				}
				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 = master_of_elephants_court_position
						any_court_position_holder = {
					        type = master_of_elephants_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
				    value = 0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
			if = {
				limit = {
					scope:liege = {
						employs_court_position = master_of_elephants_court_position
						any_court_position_holder = {
					        type = master_of_elephants_court_position
					        scope:liege = {
								has_hook_of_type = {
									type = obligation_hook
									target = prev
								}
							}
						}
					}
				}
				multiply = {
					value = 0.5
					desc = obligation_hook_salary
				}
			}
		}
	}

	# These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints)
	scaling_employer_modifiers = {
		terrible = { 
			monthly_court_grandeur_change_mult = 0.05
			elephant_cavalry_damage_mult = 0.01
		}
		poor = {
			court_grandeur_baseline_add = 1
			monthly_court_grandeur_change_mult = 0.5
			elephant_cavalry_damage_mult = 0.02
			elephant_cavalry_toughness_mult = 0.01
		}
		average = {
			court_grandeur_baseline_add = 1
			monthly_court_grandeur_change_mult = 0.10
			elephant_cavalry_damage_mult = 0.03
			elephant_cavalry_toughness_mult = 0.02
		}
		good = {
			court_grandeur_baseline_add = 2
			monthly_court_grandeur_change_mult = 0.15
			elephant_cavalry_damage_mult = 0.04
			elephant_cavalry_toughness_mult = 0.03
		}
		excellent = {
			court_grandeur_baseline_add = 2
			monthly_court_grandeur_change_mult = 0.20
			elephant_cavalry_damage_mult = 0.05
			elephant_cavalry_toughness_mult = 0.04
		}
	}

	modifier = {
		monthly_prestige = 0.1
	}

	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
	}

	# Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation!
	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
	}
}
court_guru_court_position = {# Court Guru - For all Dharmic Faiths
	sort_order = 224
	max_available_positions = 1
	#category = court_position_category_common
	skill = learning
	minimum_rank = kingdom # Should only be available for kings and emperors

	court_position_asset = {
		animation = page_flipping
		background = "gfx/interface/illustrations/event_scenes/bp2_study_indian.dds"
	}

	opinion = {
		value = ceremonial_court_position_opinion
	}

	# How high the aptitude has to be to reach the 5 different modifier levels
	aptitude_level_breakpoints = { 20 40 60 80 }

	# How good is this character in this position? root scope is the holder of the court position
	aptitude = {
		value = 1
		add = court_position_aptitude_boon_voyager_trait
		add = {
			value = learning
			multiply = 2.5
			max = 50
			desc = court_position_skill_learning
		}
		# Dharmic virtues - Good Gurus should be virteous
		if = {# Honest is Good
			limit = {
				has_trait = honest
			}
			add = {
				value = 10
				desc = court_position_honest_trait
			}
		}
		if = {# Generous is Good
			limit = {
				has_trait = generous
			}
			add = {
				value = 15
				desc = court_position_generous_trait
			}
		}
		if = {# calm is Good
			limit = {
				has_trait = calm
			}
			add = {
				value = 15
				desc = court_position_calm_trait
			}
		}
		if = {# Temperate is a Hindu virtue
			limit = {
				has_trait = temperate
			}
			add = {
				value = 15
				desc = court_position_temperate_trait
			}
		}
		# Dharmic sins - Good Gurus should not be sinful
		if = {# Decitful is bad
			limit = {
				has_trait = deceitful
			}
			add = {
				value = -10
				desc = court_position_deceitful_trait
			}
		}
		if = {# Impatiant is bad
			limit = {
				has_trait = impatient
			}
			add = {
				value = -10
				desc = court_position_impatient_trait
			}
		}
		if = {# Wrathful is bad
			limit = {
				has_trait = wrathful
			}
			add = {
				value = -10
				desc = court_position_wrathful_trait
			}
		}
		if = {# Greedy is a sin
			limit = {
				has_trait = greedy
			}
			add = {
				value = -10
				desc = court_position_greedy_trait
			}
		}
		# Scholarly Traits - Good Archarya should be Scholars
		if = {# Scholars are good
			limit = {
				has_trait = scholar
			}
			add = {
				value = 15
				desc = court_position_scholar_trait
			}
		}
		if = {# Theologians are good
			limit = {
				has_trait = theologian
			}
			add = {
				value = 15
				desc = court_position_theologian_trait
			}
		}
		# General other aptitude values
		add = court_position_aptitude_family_business_value
		add = court_position_aptitude_low_penalty_value
	}

	# Is this an available position for this court? (root is court owner)
	is_shown = {
		faith.religion = { is_in_family = rf_eastern }
	}

	valid_position = {
		faith.religion = { is_in_family = rf_eastern }
		highest_held_title_tier >= tier_kingdom
		has_game_rule = zgc_court_positions_on		
	}

	valid_character = {
		scope:employee = {
			is_imprisoned = no
			faith.religion = { is_in_family = rf_eastern }
			trigger_if = {
				limit = {
					OR = {
						has_religion = religion:buddhism_religion
						has_religion = religion:jainism_religion
					}
				}
				has_trait = devoted
			}
			is_clergy = yes
			NOT = {# They have their own tantric master
				faith = faith:vajrayana
				faith = faith:lamaism
				faith = faith:gelug
				faith = faith:sakya
				faith = faith:kagyu
			}
			has_trait = education_learning
			trigger_if = {
				limit = {
					scope:liege.faith = {
						has_doctrine = doctrine_gender_male_dominated
					}
				}
				is_male = yes
			}
			trigger_if = {
				limit = {
					scope:liege.faith = {
						has_doctrine = doctrine_gender_female_dominated
					}
				}
				is_female = 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 = court_guru_court_position
			# 		any_court_position_holder = {
			# 	        type = court_guru_court_position
			# 			exists = dynasty
			# 			house = prev.house
			# 		}
			# 	}
			# 	multiply = 0
			# }
			if = { #Unop: Inner circle legacy allows revoking without cost
				limit = { unop_court_position_inner_circle_revoke_trigger = { LIEGE = root  POS = court_guru } }
				desc = inner_circle_salary_mod
				multiply = 0.25 #ZGC
			}
			#ZGC
			if = {
				limit = { zgc_lowborn_court_position_holder_trigger = { LIEGE = root  POS = court_guru } }
				desc = lowborn_court_position_holder
				multiply = 0.75
			}
			if = {
				limit = { zgc_infirm_court_position_holder_trigger = { LIEGE = root  POS = court_guru } }
				desc = infirm_court_position_holder
				multiply = 0.1
			}
			#/ZGC
			if = {
				limit = {
					exists = this
					is_ai = yes
				}
				multiply = 0
			}
		}
	}

	salary = {
		round = no
		gold = {
			value = minor_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 = court_guru_court_position
						any_court_position_holder = {
					        type = court_guru_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
			if = {
				limit = {
					scope:liege = {
						employs_court_position = court_guru_court_position
						any_court_position_holder = {
					        type = court_guru_court_position
					        scope:liege = {
								has_hook_of_type = {
									type = obligation_hook
									target = prev
								}
							}
						}
					}
				}
				multiply = {
					value = 0.5
					desc = obligation_hook_salary
				}
			}
		}
	}

	base_employer_modifier = {
		learning_per_piety_level = 1
	}

	scaling_employer_modifiers = {
		terrible = { 
			monthly_piety_gain_mult = 0.02
		}
		poor = {
			monthly_piety_gain_mult = 0.04
		}
		average = {
			monthly_piety_gain_mult = 0.06
		}
		good = {
			monthly_piety_gain_mult = 0.08
		}
		excellent = {
			monthly_piety_gain_mult = 0.1
		}
	}

	modifier = {
		monthly_prestige = 0.1
		diplomacy = 1
	}

	on_court_position_received = {
		basic_gained_court_position_effect = yes #chief_qadi_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		basic_revoked_court_position_effect = yes #chief_qadi_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		basic_invalidated_court_position_effect = yes #chief_qadi_title_invalidated_effect = yes
	}
	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 = {
					ai_zeal >= -25
				}
				add = 50
			}
		}
		add = court_position_debt_considerations_value
	}
}
#######################################
# Buddhist Court Positions
#######################################
chief_vajracharya_court_position = {# Vajracharya - Tantric Teacher
	sort_order = 223
	max_available_positions = 1
	#category = court_position_category_special
	skill = learning

	court_position_asset = {
		animation = prayer
		background = "gfx/interface/illustrations/event_scenes/ep2_wedding_bedroom_indian.dds"
	}

	opinion = {
		value = ceremonial_court_position_opinion
	}

	# How high the aptitude has to be to reach the 5 different modifier levels
	aptitude_level_breakpoints = { 20 40 60 80 }

	# How good is this character in this position? root scope is the holder of the court position
	aptitude = {
		value = 1
		add = court_position_aptitude_boon_voyager_trait
		add = {
			value = learning
			multiply = 2.5
			max = 50
			desc = court_position_skill_learning
		}
		# Buddhist virtues - Good Vajracharyas should be good Buddhists
		if = {# Honest is Good
			limit = {
				has_trait = honest
			}
			add = {
				value = 10
				desc = court_position_honest_trait
			}
		}
		if = {# Generous is Good
			limit = {
				has_trait = generous
			}
			add = {
				value = 15
				desc = court_position_generous_trait
			}
		}
		if = {# calm is Good
			limit = {
				has_trait = calm
			}
			add = {
				value = 15
				desc = court_position_calm_trait
			}
		}
		# Buddhist sins - Good Vajracharyas should not have Buddhist Sins
		if = {# Decitful is bad
			limit = {
				has_trait = deceitful
			}
			add = {
				value = -10
				desc = court_position_deceitful_trait
			}
		}
		if = {# Impatiant is bad
			limit = {
				has_trait = impatient
			}
			add = {
				value = -10
				desc = court_position_impatient_trait
			}
		}
		if = {# Wrathful is bad
			limit = {
				has_trait = wrathful
			}
			add = {
				value = -10
				desc = court_position_wrathful_trait
			}
		}
		# Scholarly Traits - Good Vajracharyas should be Scholars
		if = {# Scholars are good
			limit = {
				has_trait = scholar
			}
			add = {
				value = 15
				desc = court_position_scholar_trait
			}
		}
		if = {# Theologians are good
			limit = {
				has_trait = theologian
			}
			add = {
				value = 15
				desc = court_position_theologian_trait
			}
		}
		if = {# Mystic 3 means a great Tantric Master
			limit = {
				has_trait_xp = {
					trait = lifestyle_mystic
					value >= 100
				}
			}
			add = {
				value = 20
				desc = court_position_mystic_3_trait
			}
		}
		else_if = {# Mystic 2 means a good Tantric Master
			limit = {
				has_trait_xp = {
					trait = lifestyle_mystic
					value >= 50
				}
			}
			add = {
				value = 10
				desc = court_position_mystic_2_trait
			}
		}
		else_if = {# Mystic 1 means an okay Tantric Master
			limit = {
				has_trait = lifestyle_mystic
			}
			add = {
				value = 5
				desc = court_position_mystic_1_trait
			}
		}
		# General other aptitude values
		add = court_position_aptitude_family_business_value
		add = court_position_aptitude_low_penalty_value
	}

	# Is this an available position for this court? (root is court owner)
	is_shown = {
		OR = {
			faith = faith:vajrayana
			faith = faith:lamaism
			faith = faith:gelug
			faith = faith:sakya
			faith = faith:kagyu
		}
	}

	valid_position = {
		OR = {
			faith = faith:vajrayana
			faith = faith:lamaism
			faith = faith:gelug
			faith = faith:sakya
			faith = faith:kagyu
		}
		highest_held_title_tier >= tier_kingdom
		has_game_rule = zgc_court_positions_on		
	}

	valid_character = {
		scope:employee = {
			is_imprisoned = no
			OR = {
				faith = faith:vajrayana
				faith = faith:lamaism
				faith = faith:gelug
				faith = faith:sakya
				faith = faith:kagyu
			}
			has_trait = education_learning
			has_trait = devoted
			is_clergy = yes
			trigger_if = {
				limit = {
					scope:liege.faith = {
						has_doctrine = doctrine_gender_male_dominated
					}
				}
				is_male = yes
			}
			trigger_if = {
				limit = {
					scope:liege.faith = {
						has_doctrine = doctrine_gender_female_dominated
					}
				}
				is_female = 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 = chief_vajracharya_court_position
			# 		any_court_position_holder = {
			# 	        type = chief_vajracharya_court_position
			# 			exists = dynasty
			# 			house = prev.house
			# 		}
			# 	}
			# 	multiply = 0
			# }
			if = { #Unop: Inner circle legacy allows revoking without cost
				limit = { unop_court_position_inner_circle_revoke_trigger = { LIEGE = root  POS = chief_vajracharya } }
				desc = inner_circle_salary_mod
				multiply = 0.25 #ZGC
			}
			#ZGC
			if = {
				limit = { zgc_lowborn_court_position_holder_trigger = { LIEGE = root  POS = chief_vajracharya } }
				desc = lowborn_court_position_holder
				multiply = 0.75
			}
			if = {
				limit = { zgc_infirm_court_position_holder_trigger = { LIEGE = root  POS = chief_vajracharya } }
				desc = infirm_court_position_holder
				multiply = 0.1
			}
			#/ZGC
			if = {
				limit = {
					exists = this
					is_ai = yes
				}
				multiply = 0
			}
		}
	}

	salary = {
		round = no
		gold = {
			value = minor_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 = chief_vajracharya_court_position
						any_court_position_holder = {
					        type = chief_vajracharya_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
			if = {
				limit = {
					scope:liege = {
						employs_court_position = chief_vajracharya_court_position
						any_court_position_holder = {
					        type = chief_vajracharya_court_position
					        scope:liege = {
								has_hook_of_type = {
									type = obligation_hook
									target = prev
								}
							}
						}
					}
				}
				multiply = {
					value = 0.5
					desc = obligation_hook_salary
				}
			}
		}
	}

	base_employer_modifier = {
		learning_per_piety_level = 1
	}

	scaling_employer_modifiers = {
		terrible = { 
			monthly_piety_gain_mult = 0.02
		}
		poor = {
			monthly_piety_gain_mult = 0.04
		}
		average = {
			monthly_piety_gain_mult = 0.06
		}
		good = {
			monthly_piety_gain_mult = 0.08
		}
		excellent = {
			monthly_piety_gain_mult = 0.1
		}
	}

	modifier = {
		monthly_prestige = 0.1
		diplomacy = 1
	}

	on_court_position_received = {
		basic_gained_court_position_effect = yes #chief_qadi_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		basic_revoked_court_position_effect = yes #chief_qadi_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		basic_invalidated_court_position_effect = yes #chief_qadi_title_invalidated_effect = yes
	}
	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 = {
					ai_zeal >= -25
				}
				add = 50
			}
		}
		add = court_position_debt_considerations_value
	}
}
#######################################
# Hindu Court Positions
#######################################
bhangika_court_position = {# Bhangika - Hindu Charity position
	sort_order = 222
	max_available_positions = 1
	#category = court_position_category_royal
	skill = learning
	minimum_rank = kingdom # Should only be available for kings and emperors

	court_position_asset = {
		animation = storyteller
		background = "gfx/interface/illustrations/event_scenes/ep2_holysite_indian.dds"
	}

	opinion = {
		value = ceremonial_court_position_opinion
	}

	# How high the aptitude has to be to reach the 5 different modifier levels
	aptitude_level_breakpoints = { 20 40 60 80 }

	# How good is this character in this position? root scope is the holder of the court position
	aptitude = {
		value = 1
		add = court_position_aptitude_boon_voyager_trait
		add = {
			value = learning
			multiply = 2.5
			max = 50
			desc = court_position_skill_learning
		}
		if = {
			limit = {
				is_clergy = yes
			}
			add = {
				value = 20
				desc = court_position_clergy_trait
			}
		}
		if = {
			limit = {
				has_trait = generous
			}
			add = {
				value = 20
				desc = court_position_generous_trait
			}
		}
		if = {
			limit = {
				has_trait = compassionate
			}
			add = {
				value = 20
				desc = court_position_compassionate_trait
			}
		}
		if = {
			limit = {
				has_trait = greedy
			}
			add = {
				value = -10
				desc = court_position_greedy_trait
			}
		}
		if = {
			limit = {
				has_trait = profligate
			}
			add = {
				value = -10
				desc = court_position_profligate_trait
			}
		}
		if = {
			limit = {
				has_trait = avaricious
			}
			add = {
				value = -10
				desc = court_position_avaricious_trait
			}
		}
		if = {
			limit = {
				has_trait = devoted
				culture = { has_cultural_parameter = devoted_trait_bonuses }
			}
			add = {
				value = 20
				desc = tradition_monastic_communities_name
			}
		}
		add = court_position_aptitude_family_business_value
		add = court_position_aptitude_low_penalty_value
	}

	# Is this an available position for this court? (root is court owner)
	is_shown = {
		has_religion = religion:hinduism_religion
		NOT = { government_has_flag = government_is_nomadic }
	}

	valid_position = {
		has_religion = religion:hinduism_religion
		highest_held_title_tier >= tier_kingdom
		has_game_rule = zgc_court_positions_on		
	}

	is_shown_character = {
		scope:employee = {
			is_courtier_of = scope:liege
			has_religion = religion:hinduism_religion
		}
	}

	valid_character = {
		scope:employee = {
			is_imprisoned = no
			has_religion = religion:hinduism_religion
		}
	}

	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 = bhangika_court_position
			# 		any_court_position_holder = {
			# 	        type = bhangika_court_position
			# 			exists = dynasty
			# 			house = prev.house
			# 		}
			# 	}
			# 	multiply = 0
			# }
			if = { #Unop: Inner circle legacy allows revoking without cost
				limit = { unop_court_position_inner_circle_revoke_trigger = { LIEGE = root  POS = bhangika } }
				desc = inner_circle_salary_mod
				multiply = 0.25 #ZGC
			}
			#ZGC
			if = {
				limit = { zgc_lowborn_court_position_holder_trigger = { LIEGE = root  POS = bhangika } }
				desc = lowborn_court_position_holder
				multiply = 0.75
			}
			if = {
				limit = { zgc_infirm_court_position_holder_trigger = { LIEGE = root  POS = chief_vajracharya } }
				desc = infirm_court_position_holder
				multiply = 0.1
			}
			#/ZGC
			if = {
				limit = {
					exists = this
					is_ai = yes
				}
				multiply = 0
			}
		}
	}

	salary = {
		round = no
		gold = {
			value = minor_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 = bhangika_court_position
						any_court_position_holder = {
					        type = bhangika_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
			if = {
				limit = {
					scope:liege = {
						employs_court_position = bhangika_court_position
						any_court_position_holder = {
					        type = bhangika_court_position
					        scope:liege = {
								has_hook_of_type = {
									type = obligation_hook
									target = prev
								}
							}
						}
					}
				}
				multiply = {
					value = 0.5
					desc = obligation_hook_salary
				}
			}
		}
	}

	base_employer_modifier = {
		court_grandeur_baseline_add = 1
	}

	# These modifiers are employed based on what level the aptitude reaches (levels are defined as breakpoints)
	scaling_employer_modifiers = {
		terrible = { 
			monthly_piety_gain_mult = 0.05
		}
		poor = {
			monthly_piety_gain_mult = 0.1
		}
		average = {
			monthly_piety_gain_mult = 0.15
			monthly_court_grandeur_change_mult = 0.1
		}
		good = {
			monthly_piety_gain_mult = 0.15
			monthly_court_grandeur_change_mult = 0.15
		}
		excellent = {
			monthly_piety_gain_mult = 0.2
			monthly_court_grandeur_change_mult = 0.2
		}
	}

	modifier = {
		monthly_prestige = 0.1
		learning = 1
	}

	on_court_position_received = {
		high_almoner_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		high_almoner_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		high_almoner_title_invalidated_effect = yes
	}
	# Scripted value to determine whether an AI will hire/fire a position or not. Hires over 0, fires under -50. Look in _court_positions.info for more extensive documentation!
	candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		add = court_position_candidate_aptitude_value
		scope:liege = {
			# Zealous AI's like this
			if = {
				limit = {
					ai_zeal > 75
				}
				add = 50
			}
		}
		add = court_position_debt_considerations_value
	}
}
