﻿##terrible

action_physician_terrible = {
	priority = 500
	combine_into_one = no
	is_dangerous = yes
	check_create_action = {
		if = {
			limit = { 
				OR = { 
					physician_terrible_employ_landed_admin_check = { POS = court_physician_court_position }
					physician_terrible_employ_adventurer_check = { POS = court_physician_court_position}
				}
			}
			every_court_position_holder = {
				type = court_physician_court_position
				court_position_type:court_physician_court_position = {save_scope_as = court_position_type }
				limit = {
					physician_terrible_liege_trigger = yes
					aptitude:court_physician_court_position <= 1
				}				
				try_create_important_action = {
					important_action_type = action_physician_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}
			}
		}
	}
	effect = {
		open_interaction_window = {
			interaction = physician_terrible_revoke_position
			actor = root
			recipient = root
		}
	}
}

# incompetent court positions

action_court_position_terrible = {
	priority = 1000
	combine_into_one = yes
	is_dangerous = no
	check_create_action = { 
		if = {
			limit = {
				is_ai = no
				is_landed_or_landless_administrative = yes
			}
			every_court_position_holder = {
				type = cultural_emissary_court_position
				limit = { exists = this aptitude:cultural_emissary_court_position <= 1}				
				court_position_type:cultural_emissary_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = keeper_of_swans_court_position
				limit = { exists = this aptitude:keeper_of_swans_court_position <= 1}				
				court_position_type:keeper_of_swans_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = chief_qadi_court_position
				limit = { exists = this aptitude:chief_qadi_court_position <= 1}				
				court_position_type:chief_qadi_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = garuda_court_position
				limit = { exists = this aptitude:garuda_court_position <= 1}				
				court_position_type:garuda_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_gardener_court_position
				limit = { exists = this aptitude:court_gardener_court_position <= 1}				
				court_position_type:court_gardener_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = lady_in_waiting_court_position
				limit = { exists = this aptitude:lady_in_waiting_court_position <= 1}				
				court_position_type:lady_in_waiting_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = antiquarian_court_position
				limit = { exists = this aptitude:antiquarian_court_position <= 1}				
				court_position_type:antiquarian_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = travel_leader_court_position
				limit = { exists = this aptitude:travel_leader_court_position <= 1}				
				court_position_type:travel_leader_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = wet_nurse_court_position
				limit = { exists = this aptitude:wet_nurse_court_position <= 1}				
				court_position_type:wet_nurse_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_tutor_court_position
				limit = { exists = this aptitude:court_tutor_court_position <= 1}				
				court_position_type:court_tutor_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = food_taster_court_position
				limit = { exists = this aptitude:food_taster_court_position <= 1}				
				court_position_type:food_taster_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = master_of_horse_court_position
				limit = { exists = this aptitude:master_of_horse_court_position <= 1}				
				court_position_type:master_of_horse_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = master_of_hunt_court_position
				limit = { exists = this aptitude:master_of_hunt_court_position <= 1}				
				court_position_type:master_of_hunt_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = royal_architect_court_position
				limit = { exists = this aptitude:royal_architect_court_position <= 1}				
				court_position_type:royal_architect_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = high_almoner_court_position
				limit = { exists = this aptitude:high_almoner_court_position <= 1}				
				court_position_type:high_almoner_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = seneschal_court_position
				limit = { exists = this aptitude:seneschal_court_position <= 1}				
				court_position_type:seneschal_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = cupbearer_court_position
				limit = { exists = this aptitude:cupbearer_court_position <= 1}				
				court_position_type:cupbearer_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = chief_eunuch_court_position
				limit = { exists = this aptitude:chief_eunuch_court_position <= 1}				
				court_position_type:chief_eunuch_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_jester_court_position
				limit = { exists = this aptitude:court_jester_court_position <= 1}				
				court_position_type:court_jester_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_poet_court_position
				limit = { exists = this aptitude:court_poet_court_position <= 1}				
				court_position_type:court_poet_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_musician_court_position
				limit = { exists = this aptitude:court_musician_court_position <= 1}				
				court_position_type:court_musician_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = bodyguard_court_position
				limit = { exists = this aptitude:bodyguard_court_position <= 1}				
				court_position_type:bodyguard_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = champion_court_position
				limit = { exists = this aptitude:champion_court_position <= 1}				
				court_position_type:champion_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = executioner_court_position
				limit = { exists = this aptitude:executioner_court_position <= 1}				
				court_position_type:executioner_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_artificer_court_position
				limit = { exists = this aptitude:court_artificer_court_position <= 1}				
				court_position_type:court_artificer_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = master_assassin_court_position
				limit = { exists = this aptitude:master_assassin_court_position <= 1}				
				court_position_type:master_assassin_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = cave_hermit_court_position
				limit = { exists = this aptitude:cave_hermit_court_position <= 1}				
				court_position_type:cave_hermit_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = chronicler_court_position
				limit = { exists = this aptitude:chronicler_court_position <= 1}				
				court_position_type:chronicler_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_scholar_court_position
				limit = { exists = this aptitude:court_scholar_court_position <= 1}				
				court_position_type:court_scholar_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = charioteer_court_position
				limit = { exists = this aptitude:charioteer_court_position <= 1}				
				court_position_type:charioteer_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = bookmaker_court_position
				limit = { exists = this aptitude:bookmaker_court_position <= 1}				
				court_position_type:bookmaker_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = akolouthos_court_position
				limit = { exists = this aptitude:akolouthos_court_position <= 1}				
				court_position_type:akolouthos_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_brewmaster_court_position
				limit = { exists = this aptitude:court_brewmaster_court_position <= 1}				
				court_position_type:court_brewmaster_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = eparch_court_position
				limit = { exists = this aptitude:eparch_court_position <= 1}				
				court_position_type:eparch_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_astrologer_court_position
				limit = { exists = this aptitude:court_astrologer_court_position <= 1}				
				court_position_type:court_astrologer_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = boyan_court_position
				limit = { exists = this aptitude:boyan_court_position <= 1}				
				court_position_type:boyan_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = siege_engineer_court_position
				limit = { exists = this aptitude:siege_engineer_court_position <= 1}				
				court_position_type:siege_engineer_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = yurtchi_court_position
				limit = { exists = this aptitude:yurtchi_court_position <= 1}				
				court_position_type:yurtchi_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = cherbi_court_position
				limit = { exists = this aptitude:cherbi_court_position <= 1}				
				court_position_type:cherbi_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = yeke_jarquchi_court_position
				limit = { exists = this aptitude:yeke_jarquchi_court_position <= 1}				
				court_position_type:yeke_jarquchi_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = foreign_emissary_court_position
				limit = { exists = this aptitude:foreign_emissary_court_position <= 1}				
				court_position_type:foreign_emissary_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = keeper_of_the_horses_court_position
				limit = { exists = this aptitude:keeper_of_the_horses_court_position <= 1}				
				court_position_type:keeper_of_the_horses_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = grand_preceptor_court_position
				limit = { exists = this aptitude:grand_preceptor_court_position <= 1}				
				court_position_type:grand_preceptor_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = grand_mentor_court_position
				limit = { exists = this aptitude:grand_mentor_court_position <= 1}				
				court_position_type:grand_mentor_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = grand_guardian_court_position
				limit = { exists = this aptitude:grand_guardian_court_position <= 1}				
				court_position_type:grand_guardian_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = fire_dragon_engineer_court_position
				limit = { exists = this aptitude:fire_dragon_engineer_court_position <= 1}				
				court_position_type:fire_dragon_engineer_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = keeper_of_the_harem_court_position
				limit = { exists = this aptitude:keeper_of_the_harem_court_position <= 1}				
				court_position_type:keeper_of_the_harem_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = favored_minister_court_position
				limit = { exists = this aptitude:favored_minister_court_position <= 1}				
				court_position_type:favored_minister_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = minister_bureaucrat_court_position
				limit = { exists = this aptitude:minister_bureaucrat_court_position <= 1}				
				court_position_type:minister_bureaucrat_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_guru_court_position
				limit = { exists = this aptitude:court_guru_court_position <= 1}				
				court_position_type:court_guru_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_brahmin_court_position
				limit = { exists = this aptitude:court_brahmin_court_position <= 1}				
				court_position_type:court_brahmin_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = khlon_glan_court_position
				limit = { exists = this aptitude:khlon_glan_court_position <= 1}				
				court_position_type:khlon_glan_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
		}
	}
	effect = {
		open_interaction_window = {
			interaction = physician_terrible_revoke_position
			actor = root
			recipient = root
		}
	}
}

# incompetent officers
action_officer_terrible= {
	priority = 1000
	combine_into_one = yes
	is_dangerous = no
	check_create_action = { 
		if = {
			limit = {  
				is_ai = no
				is_landless_adventurer = yes
			}
			every_court_position_holder = {
				type = second_camp_officer
				limit = { exists = this aptitude:second_camp_officer <= 1}				
				court_position_type:second_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = quartermaster_camp_officer
				limit = { exists = this aptitude:quartermaster_camp_officer <= 1}				
				court_position_type:quartermaster_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = armorer_camp_officer
				limit = { exists = this aptitude:armorer_camp_officer <= 1}				
				court_position_type:armorer_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = chief_forager_camp_officer
				limit = { exists = this aptitude:chief_forager_camp_officer <= 1}				
				court_position_type:chief_forager_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = master_thief_camp_officer
				limit = { exists = this aptitude:master_thief_camp_officer <= 1}				
				court_position_type:master_thief_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = head_porter_camp_officer
				limit = { exists = this aptitude:head_porter_camp_officer <= 1}				
				court_position_type:head_porter_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = head_groom_camp_officer
				limit = { exists = this aptitude:head_groom_camp_officer <= 1}				
				court_position_type:head_groom_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = huntperson_camp_officer
				limit = { exists = this aptitude:huntperson_camp_officer <= 1}				
				court_position_type:huntperson_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = kennelperson_camp_officer
				limit = { exists = this aptitude:kennelperson_camp_officer <= 1}				
				court_position_type:kennelperson_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = chief_engineer_camp_officer
				limit = { exists = this aptitude:chief_engineer_camp_officer <= 1}				
				court_position_type:chief_engineer_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = witness_camp_officer
				limit = { exists = this aptitude:witness_camp_officer <= 1}				
				court_position_type:witness_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = person_haggler_camp_officer
				limit = { exists = this aptitude:person_haggler_camp_officer <= 1}				
				court_position_type:person_haggler_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = camp_cook_camp_officer
				limit = { exists = this aptitude:camp_cook_camp_officer <= 1}				
				court_position_type:camp_cook_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = master_bard_camp_officer
				limit = { exists = this aptitude:master_bard_camp_officer <= 1}				
				court_position_type:master_bard_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = stooge_camp_officer
				limit = { exists = this aptitude:stooge_camp_officer <= 1}				
				court_position_type:stooge_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = master_of_arms_camp_officer
				limit = { exists = this aptitude:master_of_arms_camp_officer <= 1}				
				court_position_type:master_of_arms_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = light_cavalry_captain_camp_officer
				limit = { exists = this aptitude:light_cavalry_captain_camp_officer <= 1}				
				court_position_type:light_cavalry_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = camelry_captain_camp_officer
				limit = { exists = this aptitude:camelry_captain_camp_officer <= 1}				
				court_position_type:camelry_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = elephantry_captain_camp_officer
				limit = { exists = this aptitude:elephantry_captain_camp_officer <= 1}				
				court_position_type:elephantry_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = heavy_cavalry_captain_camp_officer
				limit = { exists = this aptitude:heavy_cavalry_captain_camp_officer <= 1}				
				court_position_type:heavy_cavalry_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = horse_archer_captain_camp_officer
				limit = { exists = this aptitude:horse_archer_captain_camp_officer <= 1}				
				court_position_type:horse_archer_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = archer_captain_camp_officer
				limit = { exists = this aptitude:archer_captain_camp_officer <= 1}				
				court_position_type:archer_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = heavy_infantry_captain_camp_officer
				limit = { exists = this aptitude:heavy_infantry_captain_camp_officer <= 1}				
				court_position_type:heavy_infantry_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = light_infantry_captain_camp_officer
				limit = { exists = this aptitude:light_infantry_captain_camp_officer <= 1}				
				court_position_type:light_infantry_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = pike_captain_camp_officer
				limit = { exists = this aptitude:pike_captain_camp_officer <= 1}				
				court_position_type:pike_captain_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = master_of_spoils_camp_officer
				limit = { exists = this aptitude:master_of_spoils_camp_officer <= 1}				
				court_position_type:master_of_spoils_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = laureate_camp_officer
				limit = { exists = this aptitude:laureate_camp_officer <= 1}				
				court_position_type:laureate_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = camp_priest_camp_officer
				limit = { exists = this aptitude:camp_priest_camp_officer <= 1}				
				court_position_type:camp_priest_camp_officer = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = travel_leader_court_position
				limit = { exists = this aptitude:travel_leader_court_position <= 1}				
				court_position_type:travel_leader_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = bodyguard_court_position
				limit = { exists = this aptitude:bodyguard_court_position <= 1}				
				court_position_type:bodyguard_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_terrible
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
		}
	}
	effect = {
		open_interaction_window = {
			interaction = physician_terrible_revoke_position
			actor = root
			recipient = root
		}
	}
}



##landless need physician

action_poor_can_hire_court_physician = {
	priority = 300
	combine_into_one = no
	is_dangerous = yes
	check_create_action = {
		if = {
			limit = {
				NOT = { monthly_character_income > monthly_character_expenses }
				NOR = {
					employs_court_position = court_physician_court_position
					any_court_position_holder = {
						type = court_physician_court_position
					}
				}
			}
			try_create_important_action = {
				important_action_type = action_poor_can_hire_court_physician
				actor = root
			}
		}
	}

	effect = {
		open_appoint_court_position_window = court_physician_court_position
	}
}

### court positions hate you

action_court_position_hateyou = {
	priority = 450
	combine_into_one = yes
	is_dangerous = yes
	check_create_action = { 
		if = {
			limit = { 
				is_ai = no
				is_landed_or_landless_administrative = yes
			}
			every_court_position_holder = {
				type = court_physician_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:court_physician_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = lady_in_waiting_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:lady_in_waiting_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = food_taster_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:food_taster_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = cupbearer_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:cupbearer_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = chief_eunuch_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:chief_eunuch_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = bodyguard_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:bodyguard_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = cherbi_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:cherbi_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = grand_preceptor_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:grand_preceptor_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = grand_mentor_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:grand_mentor_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = grand_guardian_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:grand_guardian_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = keeper_of_the_harem_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:keeper_of_the_harem_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = favored_minister_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:favored_minister_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = minister_bureaucrat_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:minister_bureaucrat_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_court_position_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
		}
	}
	effect = {
		open_view_data = court_window
	}
}



### officers hate you 

action_officer_hateyou = {
	priority = 450
	combine_into_one = yes
	is_dangerous = yes
	check_create_action = { 
		if = {
			limit = {  
				is_ai = no
				is_landless_adventurer = yes
			}
			every_court_position_holder = {
				type = bodyguard_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:bodyguard_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
			every_court_position_holder = {
				type = court_physician_court_position
				limit = { exists = this physician_hateyou_trigger = yes }				
				court_position_type:court_physician_court_position = {save_scope_as = court_position_type }
				try_create_important_action = {
					important_action_type = action_officer_hateyou
					actor = root
					recipient = this
					court_position_type = scope:court_position_type
				}	
			}
		}
	}
	effect = {
		open_view_data = court_window
	}
}

# spymaster hateyou

action_consillor_hateyou_spymaster = {
	priority = 450
	combine_into_one = no
	is_dangerous = yes
	check_create_action = { 
		if = {
			limit = { physician_terrible_employ_councilor_landed_admin_check = { POS = councillor_spymaster } }
			every_councillor = {
				limit = { 
				has_council_position = councillor_spymaster 
				physician_terrible_liege_trigger = yes
				physician_hateyou_trigger = yes
				}
				try_create_important_action = {
					important_action_type = action_consillor_hateyou_spymaster
					actor = root
					recipient = this
				}
			}
		}
	}
	effect = {
		open_view_data = council_window
	}
}
