﻿#IRON THRONE


#King's Justice - Executioner re-flavour
#Black Cells - Gaoler reflavour?


#Royal Counter
#Royal Scales
#Keeper of the Keys
#Warden of the Royal Mint

#High Reeve
#Justiciar (2)

#Gold Cloaks
#Commander of the Sea Watch

#Dragonmount Keeper / Dragon Pit Keeper?

#Master of the Crackclaw Point ?

goldcloaks_court_position = { #Seneschal / Eunuch hybrid
	sort_order = 980
	max_available_positions = 1
	court_position_asset = {
		animation = marshal
		background = "gfx/interface/illustrations/event_scenes/alley_day.dds"
	}
	opinion = {
		value = regular_court_position_opinion
	}
	aptitude_level_breakpoints = {
		20
		40
		60
		80
	}
	aptitude = {
		value = 25
		add = {
			value = stewardship
			multiply = 1.25
			max = 25
			desc = court_position_skill_stewardship
		}
		add = {
			value = martial
			multiply = 1.25
			max = 25
			desc = court_position_skill_martial
		}
		if = {
			limit = {
				has_trait = administrator
			}
			add = {
				value = 20
				desc = court_position_administrator_trait
			}
		}
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 20
				desc = court_position_overseer_trait
			}
		}
		add = general_aptitude_bonus
	}
	is_shown = {
		has_title = title:c_kings_landing
		OR = {
			any_vassal_or_below = {
				has_title = title:b_goldguard_heights
			}
			has_title = title:b_goldguard_heights
		}
	}
	valid_position = {
		has_title = title:c_kings_landing
	}
	valid_character = {
		scope:employee = {
			base_court_position_validity_trigger = { EMPLOYER = scope:liege }
			OR = {
				AND = {
					any_liege_or_above = {
						has_title = title:b_goldguard_heights
					}
					is_landed = no
				}
				has_title = title:b_goldguard_heights
			}
			NOR = {
				has_trait = kingsguard
				has_trait = maester
				# has_trait = archmaester
				has_trait = septon
			}
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:liege }
		}
	}
	revoke_cost = {
		prestige = {
			value = major_court_position_prestige_revoke_cost
			if = {
				limit = {
					exists = this
					is_ai = yes
				}
				multiply = 0
			}
		}
	}
	salary = {
		round = no
		gold = medium_court_position_salary
		prestige = major_court_position_prestige_salary
	}
	scaling_employer_modifiers = {
		terrible = {
			monthly_county_control_growth_add = 1.5
			enemy_hostile_scheme_phase_duration_add = 1
		}
		poor = {
			monthly_county_control_growth_add = 2
			enemy_hostile_scheme_phase_duration_add = 2
		}
		average = {
			monthly_county_control_growth_add = 2.5
			enemy_hostile_scheme_phase_duration_add = 4
		}
		good = {
			monthly_county_control_growth_add = 3
			enemy_hostile_scheme_phase_duration_add = 8
		}
		excellent = {
			monthly_county_control_growth_add = 3.5
			enemy_hostile_scheme_phase_duration_add = 10
		}
	}

	custom_employer_modifier_description = goldcloaks_employer_custom_effect_description
	is_powerful_agent = yes

	modifier = {
	}
	on_court_position_received = {
		agot_goldcloaks_title_accepted_effect = yes
	}

	on_court_position_revoked = {
		seneschal_title_revoked_effect = yes
		agot_goldcloaks_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		seneschal_title_revoked_effect = yes
		agot_goldcloaks_title_revoked_effect = yes
	}
	on_court_position_vacated = {
		court_position_vacated_event_fg_effect = {
			COURT_POSITION_TYPE = goldcloaks_court_position
		}
	}
	ai_position_score = {
		value = 1500
	}
	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		if = {
			limit = {
				NOT = {
					exists = scope:firing_court_position
				}
				scope:employee = {
					has_any_court_position = yes
				}
			}
			add = 50
		}
		if = {
			limit = {
				scope:employee = {
					has_title = title:b_goldguard_heights
				}
			}
			add = 100			#to stop AI from revoking alot
		}
	}
}

#AGOT - Flumph (Blood of Dragons MUSH)
sea_watch_commander_court_position = {
	sort_order = 978
	max_available_positions = 1
	court_position_asset = {
		animation = marshal
		background = "gfx/interface/illustrations/event_scenes/docks.dds"
	}
	skill = prowess
	opinion = {
		value = regular_court_position_opinion
	}
	aptitude_level_breakpoints = {
		20
		40
		60
		80
	}
	aptitude = {
		value = 25
		add = {
			value = martial
			multiply = 1.5
			max = 25
			desc = court_position_skill_martial
		}
		add = {
			value = diplomacy
			multiply = 1.5
			max = 25
			desc = court_position_skill_diplomacy
		}
		if = {
			limit = {
				has_trait = loyal
			}
			add = {
				value = 15
				desc = court_position_loyal_trait
			}
		}
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 10
				desc = court_position_overseer_trait
			}
		}
		if = {
			limit = {
				has_trait = brave
			}
			add = {
				value = 5
				desc = court_position_brave_trait
			}
		}
		if = {
			limit = {
				has_trait = diligent
			}
			add = {
				value = 5
				desc = court_position_diligent_trait
			}
		}
		if = {
			limit = {
				has_trait = just
			}
			add = {
				value = 5
				desc = court_position_just_trait
			}
		}
		if = {
			limit = {
				has_trait = greedy
			}
			add = {
				value = -5
				desc = court_position_greedy_trait
			}
		}
		if = {
			limit = {
				has_trait = trusting
			}
			add = {
				value = -5
				desc = court_position_trusting_trait
			}
		}
		if = {
			limit = {
				has_trait = craven
			}
			add = {
				value = -10
				desc = court_position_craven_trait
			}
		}
		if = {
			limit = {
				has_trait = deceitful
			}
			add = {
				value = -10
				desc = court_position_deceitful_trait
			}
		}
		if = {
			limit = {
				has_trait = disloyal
			}
			add = {
				value = -15
				desc = court_position_disloyal_trait
			}
		}
		#Sailors understand what a harbor requires
		if = {
			limit = { has_trait = lifestyle_mariner }
			if = {
				limit = {
					has_trait_xp = {
						trait = lifestyle_mariner
						value <= 50
					}
				}
				add = {
					value = 10
					desc = court_position_lifestyle_mariner
				}
			}
			else = {
				add = {
					value = 20
					desc = court_position_lifestyle_mariner
				}
			}
		}
	}
	is_shown = {
		has_title = title:h_the_iron_throne
	}
	valid_position = {
		has_title = title:h_the_iron_throne
	}
	valid_character = {
		scope:employee = {
			base_court_position_validity_trigger = { EMPLOYER = scope:liege }
			NOR = {
				has_trait = kingsguard
				has_trait = maester
				# has_trait = archmaester
				has_trait = septon
			}
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = 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 = sea_watch_commander_court_position
					any_court_position_holder = {
						type = sea_watch_commander_court_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
			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 = sea_watch_commander_court_position
						any_court_position_holder = {
							type = sea_watch_commander_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
		prestige = {
			value = minor_court_position_prestige_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 = sea_watch_commander_court_position
						any_court_position_holder = {
							type = sea_watch_commander_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 = {
			coastal_advantage = 1
			enemy_hostile_scheme_phase_duration_add = 1
		}
		poor = {
			coastal_advantage = 2
			enemy_hostile_scheme_phase_duration_add = 2
		}
		average = {
			coastal_advantage = 4
			enemy_hostile_scheme_phase_duration_add = 3
		}
		good = {
			coastal_advantage = 7
			enemy_hostile_scheme_phase_duration_add = 4
		}
		excellent = {
			coastal_advantage = 10
			enemy_hostile_scheme_phase_duration_add = 5
		}
	}

	custom_employer_modifier_description = generic_scheme_warning_employer_custom_effect_description
	is_powerful_agent = yes

	modifier = {
		martial = 1
		monthly_martial_lifestyle_xp_gain_mult = 0.3
		monthly_prestige = 0.25
	}

	on_court_position_received = {
		agot_sea_watch_commander_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		agot_sea_watch_commander_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		agot_sea_watch_commander_title_invalidated_effect = yes
	}
	on_court_position_vacated = {
		court_position_vacated_event_fg_effect = {
			COURT_POSITION_TYPE = sea_watch_commander_court_position
		}
	}

	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		if = {
			limit = {
				NOT = {
					exists = scope:firing_court_position
				}
				scope:employee = {
					has_any_court_position = yes
				}
			}
			add = 50
		}
	}
}

#AGOT - Flumph (Blood of Dragons MUSH)
royal_counter_court_position = {
	sort_order = 977
	max_available_positions = 1
	court_position_asset = {
		animation = steward
		background = "gfx/interface/illustrations/event_scenes/study.dds"
	}
	skill = stewardship
	opinion = {
		value = regular_court_position_opinion
	}
	aptitude_level_breakpoints = {
		20
		40
		60
		80
	}
	aptitude = {
		value = 25
		add = {
			value = stewardship
			multiply = 2
			max = 50
			desc = court_position_skill_stewardship
		}
		if = {
			limit = {
				has_trait = administrator
			}
			add = {
				value = 15
				desc = court_position_administrator_trait
			}
		}
		if = {
			limit = {
				has_trait = avaricious
			}
			add = {
				value = 10
				desc = court_position_avaricious_trait
			}
		}
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 10
				desc = court_position_overseer_trait
			}
		}
		if = {
			limit = {
				has_trait = diligent
			}
			add = {
				value = 5
				desc = court_position_diligent_trait
			}
		}
		if = {
			limit = {
				has_trait = honest
			}
			add = {
				value = 5
				desc = court_position_honest_trait
			}
		}
		if = {
			limit = {
				has_trait = greedy
			}
			add = {
				value = 10
				desc = court_position_greedy_trait
			}
		}
		if = {
			limit = {
				has_trait = temperate
			}
			add = {
				value = -5
				desc = court_position_temperate_trait
			}
		}
		if = {
			limit = {
				has_trait = generous
			}
			add = {
				value = -10
				desc = court_position_generous_trait
			}
		}
		if = {
			limit = {
				has_trait = lazy
			}
			add = {
				value = -10
				desc = court_position_lazy_trait
			}
		}
		if = {
			limit = {
				has_trait = deceitful
			}
			add = {
				value = -5
				desc = court_position_deceitful_trait
			}
		}
		add = general_aptitude_bonus
	}
	is_shown = {
		has_title = title:h_the_iron_throne
	}
	valid_position = {
		has_title = title:h_the_iron_throne
	}
	valid_character = {
		scope:employee = {
			base_court_position_validity_trigger = { EMPLOYER = scope:liege }
			NOR = {
				has_trait = kingsguard
				has_trait = maester
				# has_trait = archmaester
				has_trait = septon
			}
			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 = royal_counter_court_position
					any_court_position_holder = {
						type = royal_counter_court_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
			if = {
				limit = {
					exists = this
					is_ai = yes
				}
				multiply = 0
			}
		}
	}
	salary = {
		round = no
		gold = {
			value = major_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 = royal_counter_court_position
						any_court_position_holder = {
							type = royal_counter_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
		prestige = {
			value = minor_court_position_prestige_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 = royal_counter_court_position
						any_court_position_holder = {
							type = royal_counter_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 = {
			feudal_government_tax_contribution_mult = 0.05
		}
		poor = {
			feudal_government_tax_contribution_mult = 0.075
		}
		average = {
			feudal_government_tax_contribution_mult = 0.1
		}
		good = {
			feudal_government_tax_contribution_mult = 0.15
		}
		excellent = {
			feudal_government_tax_contribution_mult = 0.2
		}
	}

	modifier = {
		stewardship = 1
		monthly_income_mult = 0.1
	}

	on_court_position_received = {
		agot_royal_counter_court_position_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		agot_royal_counter_court_position_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		agot_royal_counter_court_position_title_invalidated_effect = yes
	}
	on_court_position_vacated = {
		court_position_vacated_event_effect = {
			COURT_POSITION_TYPE = royal_counter_court_position
		}
	}

	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		if = {
			limit = {
				NOT = {
					exists = scope:firing_court_position
				}
				scope:employee = {
					has_any_court_position = yes
				}
			}
			add = 50
		}
	}
}

#AGOT - Flumph (Blood of Dragons MUSH)
royal_scales_court_position = {
	sort_order = 977
	max_available_positions = 1
	court_position_asset = {
		animation = chancellor
		background = "gfx/interface/illustrations/event_scenes/study.dds"
	}
	skill = stewardship
	opinion = {
		value = regular_court_position_opinion
	}
	aptitude_level_breakpoints = {
		20
		40
		60
		80
	}
	aptitude = {
		value = 25
		add = {
			value = stewardship
			multiply = 1.75
			max = 50
			desc = court_position_skill_stewardship
		}
		add = {
			value = diplomacy
			multiply = 1.5
			max = 25
			desc = court_position_skill_diplomacy
		}
		if = {
			limit = {
				has_trait = administrator
			}
			add = {
				value = 20
				desc = court_position_administrator_trait
			}
		}
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 20
				desc = court_position_overseer_trait
			}
		}
		if = {
			limit = {
				has_trait = diligent
			}
			add = {
				value = 10
				desc = court_position_diligent_trait
			}
		}
		if = {
			limit = {
				has_trait = lazy
			}
			add = {
				value = -10
				desc = court_position_lazy_trait
			}
		}
		add = general_aptitude_bonus
	}
	is_shown = {
		has_title = title:h_the_iron_throne
	}
	valid_position = {
		has_title = title:h_the_iron_throne
	}
	valid_character = {
		scope:employee = {
			base_court_position_validity_trigger = { EMPLOYER = scope:liege }
			NOR = {
				has_trait = kingsguard
				has_trait = maester
				# has_trait = archmaester
				has_trait = septon
			}
			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 = royal_scales_court_position
					any_court_position_holder = {
						type = royal_scales_court_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
			if = {
				limit = {
					exists = this
					is_ai = yes
				}
				multiply = 0
			}
		}
	}
	salary = {
		round = no
		gold = {
			value = major_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 = royal_scales_court_position
						any_court_position_holder = {
							type = royal_scales_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
		prestige = {
			value = minor_court_position_prestige_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 = royal_scales_court_position
						any_court_position_holder = {
							type = royal_scales_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 = {
			republic_government_vassal_opinion = -20
			republic_government_tax_contribution_mult = 0.05
		}
		poor = {
			republic_government_vassal_opinion = -10
			republic_government_tax_contribution_mult = 0.1
		}
		average = {
			republic_government_vassal_opinion = 5
			republic_government_tax_contribution_mult = 0.15
		}
		good = {
			republic_government_vassal_opinion = 10
			republic_government_tax_contribution_mult = 0.2
		}
		excellent = {
			republic_government_vassal_opinion = 20
			republic_government_tax_contribution_mult = 0.25
		}
	}

	modifier = {
		stewardship = 1
		diplomacy = 1
	}

	on_court_position_received = {
		agot_royal_scales_court_position_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		agot_royal_scales_court_position_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		agot_royal_scales_court_position_title_invalidated_effect = yes
	}
	on_court_position_vacated = {
		court_position_vacated_event_effect = {
			COURT_POSITION_TYPE = royal_scales_court_position
		}
	}

	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		if = {
			limit = {
				NOT = {
					exists = scope:firing_court_position
				}
				scope:employee = {
					has_any_court_position = yes
				}
			}
			add = 50
		}
	}
}

#AGOT - Flumph (Blood of Dragons MUSH)
royal_mint_officer_court_position = {
	sort_order = 977
	max_available_positions = 1
	court_position_asset = {
		animation = reading
		background = "gfx/interface/illustrations/event_scenes/ep3_medi_estate.dds"
	}
	skill = stewardship
	opinion = {
		value = regular_court_position_opinion
	}
	aptitude_level_breakpoints = {
		20
		40
		60
		80
	}
	aptitude = {
		value = 25
		add = {
			value = stewardship
			multiply = 2
			max = 50
			desc = court_position_skill_stewardship
		}
		if = {
			limit = {
				has_trait = administrator
			}
			add = {
				value = 20
				desc = court_position_administrator_trait
			}
		}
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 20
				desc = court_position_overseer_trait
			}
		}
		if = {
			limit = {
				has_trait = diligent
			}
			add = {
				value = 10
				desc = court_position_diligent_trait
			}
		}
		if = {
			limit = {
				has_trait = lazy
			}
			add = {
				value = -10
				desc = court_position_lazy_trait
			}
		}
		add = general_aptitude_bonus
	}
	is_shown = {
		title:h_the_iron_throne = {
			exists = yes
		}
		top_liege ?= title:h_the_iron_throne.holder
		OR = {
			has_title = title:c_kings_landing
			has_title = title:c_oldtown
			has_title = title:c_lannisport
		}
	}
	valid_position = {
		title:h_the_iron_throne = {
			exists = yes
		}
		top_liege ?= title:h_the_iron_throne.holder
		OR = {
			has_title = title:c_kings_landing
			has_title = title:c_oldtown
			has_title = title:c_lannisport
		}
	}
	valid_character = {
		scope:employee = {
			base_court_position_validity_trigger = { EMPLOYER = scope:liege }
			NOR = {
				has_trait = kingsguard
				has_trait = maester
				# has_trait = archmaester
				has_trait = septon
			}
			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 = royal_mint_officer_court_position
					any_court_position_holder = {
						type = royal_mint_officer_court_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
			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 = royal_mint_officer_court_position
						any_court_position_holder = {
							type = royal_mint_officer_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
		prestige = {
			value = medium_court_position_prestige_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 = royal_mint_officer_court_position
						any_court_position_holder = {
							type = royal_mint_officer_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 = {
			urban_development_growth_factor = 0.1
			urban_tax_mult = 0.02
		}
		poor = {
			urban_development_growth_factor = 0.15
			urban_tax_mult = 0.04
		}
		average = {
			urban_development_growth_factor = 0.2
			urban_tax_mult = 0.06
		}
		good = {
			urban_development_growth_factor = 0.25
			urban_tax_mult = 0.08
		}
		excellent = {
			urban_development_growth_factor = 0.3
			urban_tax_mult = 0.1
		}
	}

	modifier = {
		stewardship = 1
		monthly_income = 2
	}

	on_court_position_received = {
		agot_royal_mint_officer_court_position_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		agot_royal_mint_officer_court_position_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		agot_royal_mint_officer_court_position_title_invalidated_effect = yes
	}
	on_court_position_vacated = {
		court_position_vacated_event_effect = {
			COURT_POSITION_TYPE = royal_mint_officer_court_position
		}
	}

	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		if = {
			limit = {
				NOT = {
					exists = scope:firing_court_position
				}
				scope:employee = {
					has_any_court_position = yes
				}
			}
			add = 50
		}
	}
}

#AGOT - Flumph (Blood of Dragons MUSH)
keeper_of_keys_court_position = {
	sort_order = 977
	max_available_positions = 1
	court_position_asset = {
		animation = reading
		background = "gfx/interface/illustrations/event_scenes/ep3_medi_estate.dds"
	}
	skill = stewardship
	opinion = {
		value = regular_court_position_opinion
	}
	aptitude_level_breakpoints = {
		20
		40
		60
		80
	}
	aptitude = {
		value = 25
		add = {
			value = stewardship
			multiply = 2.5
			max = 50
			desc = court_position_skill_stewardship
		}
		if = {
			limit = {
				has_trait = administrator
			}
			add = {
				value = 30
				desc = court_position_administrator_trait
			}
		}
		if = {
			limit = {
				has_trait = loyal
			}
			add = {
				value = 20
				desc = court_position_loyal_trait
			}
		}
		if = {
			limit = {
				has_trait = family_first
			}
			add = {
				value = 20
				desc = court_position_family_first_trait
			}
		}
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 15
				desc = court_position_overseer_trait
			}
		}
		if = {
			limit = {
				has_trait = diligent
			}
			add = {
				value = 15
				desc = court_position_diligent_trait
			}
		}
		if = {
			limit = {
				has_trait = lazy
			}
			add = {
				value = -10
				desc = court_position_lazy_trait
			}
		}
		if = {
			limit = {
				has_trait = deceitful
			}
			add = {
				value = -10
				desc = court_position_deceitful_trait
			}
		}
		if = {
			limit = {
				has_trait = eccentric
			}
			add = {
				value = -10
				desc = court_position_eccentric_trait
			}
		}
		add = general_aptitude_bonus
	}
	is_shown = {
		has_title = title:h_the_iron_throne
	}
	valid_position = {
		has_title = title:h_the_iron_throne
	}
	valid_character = {
		scope:employee = {
			base_court_position_validity_trigger = { EMPLOYER = scope:liege }
			NOR = {
				has_trait = kingsguard
				has_trait = maester
				# has_trait = archmaester
				has_trait = septon
			}
			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 = keeper_of_keys_court_position
					any_court_position_holder = {
						type = keeper_of_keys_court_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
			if = {
				limit = {
					exists = this
					is_ai = yes
				}
				multiply = 0
			}
		}
	}
	salary = {
		round = no
		gold = {
			value = major_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 = keeper_of_keys_court_position
						any_court_position_holder = {
							type = keeper_of_keys_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
		prestige = {
			value = minor_court_position_prestige_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 = keeper_of_keys_court_position
						any_court_position_holder = {
							type = keeper_of_keys_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 = {
			dynasty_opinion = 3
			court_grandeur_baseline_add = 3
			monthly_prestige = 0.5
		}
		poor = {
			dynasty_opinion = 6
			court_grandeur_baseline_add = 6
			monthly_prestige = 0.75
		}
		average = {
			dynasty_opinion = 9
			court_grandeur_baseline_add = 9
			monthly_prestige = 1
		}
		good = {
			dynasty_opinion = 12
			court_grandeur_baseline_add = 12
			monthly_prestige = 1.25
		}
		excellent = {
			dynasty_opinion = 15
			court_grandeur_baseline_add = 15
			monthly_prestige = 1.5
		}
	}

	custom_employer_modifier_description = generic_scheme_warning_employer_custom_effect_description
	is_powerful_agent = yes

	modifier = {
		monthly_prestige = 1
		liege_opinion = 10
		stewardship = 2
	}

	on_court_position_received = {
		agot_keeper_of_keys_court_position_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		agot_keeper_of_keys_court_position_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		agot_keeper_of_keys_court_position_title_invalidated_effect = yes
	}
	on_court_position_vacated = {
		court_position_vacated_event_effect = {
			COURT_POSITION_TYPE = keeper_of_keys_court_position
		}
	}

	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		if = {
			limit = {
				NOT = {
					exists = scope:firing_court_position
				}
				scope:employee = {
					has_any_court_position = yes
				}
			}
			add = 50
		}
	}
}

#AGOT - Flumph (Blood of Dragons MUSH)
high_reeve_court_position = {
	sort_order = 976
	max_available_positions = 1
	court_position_asset = {
		animation = castellan
		background = "gfx/interface/illustrations/event_scenes/alley.dds"
	}
	skill = diplomacy
	opinion = {
		value = regular_court_position_opinion
	}
	aptitude_level_breakpoints = {
		20
		40
		60
		80
	}
	aptitude = {
		value = 25
		add = {
			value = diplomacy
			multiply = 1.75
			max = 25
			desc = court_position_skill_diplomacy
		}
		add = {
			value = learning
			multiply = 1.75
			max = 25
			desc = court_position_skill_learning
		}
		if = {
			limit = {
				has_trait = diplomat
			}
			add = {
				value = 20
				desc = court_position_diplomat_trait
			}
		}
		if = {
			limit = {
				has_trait = overseer
			}
			add = {
				value = 20
				desc = court_position_overseer_trait
			}
		}
		if = {
			limit = {
				has_trait = diligent
			}
			add = {
				value = 10
				desc = court_position_diligent_trait
			}
		}
		if = {
			limit = {
				has_trait = scholar
			}
			add = {
				value = 10
				desc = court_position_scholar_trait
			}
		}
		if = {
			limit = {
				has_trait = just
			}
			add = {
				value = 15
				desc = court_position_just_trait
			}
		}
		if = {
			limit = {
				has_trait = patient
			}
			add = {
				value = 5
				desc = court_position_patient_trait
			}
		}
		if = {
			limit = {
				has_trait = greedy
			}
			add = {
				value = -5
				desc = court_position_greedy_trait
			}
		}
		if = {
			limit = {
				has_trait = sadistic
			}
			add = {
				value = -5
				desc = court_position_sadistic_trait
			}
		}
		if = {
			limit = {
				has_trait = trusting
			}
			add = {
				value = -5
				desc = court_position_trusting_trait
			}
		}
		if = {
			limit = {
				has_trait = lazy
			}
			add = {
				value = -10
				desc = court_position_lazy_trait
			}
		}
		add = general_aptitude_bonus
	}
	is_shown = {
		has_title = title:h_the_iron_throne
	}
	valid_position = {
		has_title = title:h_the_iron_throne
	}
	valid_character = {
		scope:employee = {
			base_court_position_validity_trigger = { EMPLOYER = scope:liege }
			NOR = {
				has_trait = kingsguard
				has_trait = maester
				# has_trait = archmaester
				has_trait = septon
			}
			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 = high_reeve_court_position
					any_court_position_holder = {
						type = high_reeve_court_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
			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 = high_reeve_court_position
						any_court_position_holder = {
							type = high_reeve_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
		prestige = {
			value = medium_court_position_prestige_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 = high_reeve_court_position
						any_court_position_holder = {
							type = high_reeve_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 = {
			county_opinion_add = 10
			monthly_county_control_growth_factor = 0.04
		}
		poor = {
			county_opinion_add = 15
			monthly_county_control_growth_factor = 0.08
		}
		average = {
			county_opinion_add = 20
			monthly_county_control_growth_factor = 0.12
		}
		good = {
			county_opinion_add = 25
			monthly_county_control_growth_factor = 0.16
		}
		excellent = {
			county_opinion_add = 30
			monthly_county_control_growth_factor = 0.2
		}
	}

	modifier = {
		diplomacy = 2
	}

	on_court_position_received = {
		agot_high_reeve_court_position_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		agot_high_reeve_court_position_title_accepted_effect = yes
	}
	on_court_position_invalidated = {
		agot_high_reeve_court_position_title_accepted_effect = yes
	}
	on_court_position_vacated = {
		court_position_vacated_event_effect = {
			COURT_POSITION_TYPE = high_reeve_court_position
		}
	}

	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		if = {
			limit = {
				NOT = {
					exists = scope:firing_court_position
				}
				scope:employee = {
					has_any_court_position = yes
				}
			}
			add = 50
		}
	}
}

#AGOT - Flumph (Blood of Dragons MUSH)
justiciar_court_position = {
	sort_order = 976
	max_available_positions = 2
	court_position_asset = {
		animation = marshal
		background = "gfx/interface/illustrations/event_scenes/armory.dds"
	}
	skill = diplomacy
	opinion = {
		value = regular_court_position_opinion
	}
	aptitude_level_breakpoints = {
		20
		40
		60
		80
	}
	aptitude = {
		value = 25
		add = {
			value = diplomacy
			multiply = 1.5
			max = 25
			desc = court_position_skill_diplomacy
		}
		add = {
			value = prowess
			multiply = 1.5
			max = 25
			desc = court_position_skill_prowess
		}
		if = {
			limit = {
				has_trait = diplomat
			}
			add = {
				value = 20
				desc = court_position_diplomat_trait
			}
		}
		if = {
			limit = {
				has_trait = brave
			}
			add = {
				value = 15
				desc = court_position_overseer_trait
			}
		}
		if = {
			limit = {
				has_trait = diligent
			}
			add = {
				value = 10
				desc = court_position_diligent_trait
			}
		}
		if = {
			limit = {
				has_trait = just
			}
			add = {
				value = 15
				desc = court_position_just_trait
			}
		}
		if = {
			limit = {
				has_trait = patient
			}
			add = {
				value = 5
				desc = court_position_patient_trait
			}
		}
		if = {
			limit = {
				has_trait = greedy
			}
			add = {
				value = -5
				desc = court_position_greedy_trait
			}
		}
		if = {
			limit = {
				has_trait = sadistic
			}
			add = {
				value = -5
				desc = court_position_sadistic_trait
			}
		}
		if = {
			limit = {
				has_trait = trusting
			}
			add = {
				value = -5
				desc = court_position_trusting_trait
			}
		}
		if = {
			limit = {
				has_trait = lazy
			}
			add = {
				value = -10
				desc = court_position_lazy_trait
			}
		}
		if = {
			limit = {
				has_trait = disloyal
			}
			add = {
				value = -10
				desc = court_position_disloyal_trait
			}
		}
		add = general_aptitude_bonus
	}
	is_shown = {
		has_title = title:h_the_iron_throne
	}
	valid_position = {
		has_title = title:h_the_iron_throne
	}
	valid_character = {
		scope:employee = {
			base_court_position_validity_trigger = { EMPLOYER = scope:liege }
			NOR = {
				has_trait = kingsguard
				has_trait = maester
				# has_trait = archmaester
				has_trait = septon
			}
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:liege }
			OR = {
				AND = {
					is_vassal_of = title:c_kings_landing.holder
					highest_held_title_tier <= tier_duchy
					highest_held_title_tier > tier_barony
				}
				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 = justiciar_court_position
					any_court_position_holder = {
						type = justiciar_court_position
						exists = dynasty
						house = prev.house
					}
				}
				multiply = 0
			}
			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 = justiciar_court_position
						any_court_position_holder = {
							type = justiciar_court_position
							exists = dynasty
							house = prev.house
						}
					}
				}
				multiply = {
					value = 0.0
					desc = inner_circle_salary_mod
					format = "BASE_VALUE_FORMAT_DECIMALS_MINUS_POSITIVE"
				}
			}
		}
		prestige = {
			value = minor_court_position_prestige_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 = justiciar_court_position
						any_court_position_holder = {
							type = justiciar_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 = {
			vassal_opinion = 1
			stress_gain_mult = -0.03
		}
		poor = {
			vassal_opinion = 2
			stress_gain_mult = -0.06
		}
		average = {
			vassal_opinion = 3
			stress_gain_mult = -0.09
		}
		good = {
			vassal_opinion = 4
			stress_gain_mult = -0.12
		}
		excellent = {
			vassal_opinion = 5
			stress_gain_mult = -0.15
		}
	}

	modifier = {
		diplomacy = 1
		prowess = 1
	}

	on_court_position_received = {
		agot_justiciar_court_position_title_accepted_effect = yes
	}
	on_court_position_revoked = {
		agot_justiciar_court_position_title_revoked_effect = yes
	}
	on_court_position_invalidated = {
		agot_justiciar_court_position_title_revoked_effect = yes
	}
	on_court_position_vacated = {
		court_position_vacated_event_fg_effect = {
			COURT_POSITION_TYPE = justiciar_court_position
		}
	}

	ai_candidate_score = {
		value = 50
		add = scope:base_value
		add = court_position_candidate_score_base_value
		if = {
			limit = {
				NOT = {
					exists = scope:firing_court_position
				}
				scope:employee = {
					has_any_court_position = yes
				}
			}
			add = 50
		}
	}
}