##########################################
# COUNCILOR TITLES
##########################################

#	attribute: This attribute is added to the ruler's for governance purposes
#	viceroy: This is the Viceroy title for de jure Kingdoms
#	allow: conditions for the character to hold the title
#	gain_effect: fires when the title is granted
#	lose_effect: fires when a title is lost if dismissal_trigger evaluates to false
#	The other fields are all character modifiers.

job_chancellor = {
	is_chancellor = yes
	is_voter = yes
	attribute = diplomacy
	dignity = 0.33
	opinion_effect = 10

	monthly_salary = 0.2
	monthly_prestige = 0.75 
	#2.6: vanilla went from .015 to .75 for all non-spymaster jobs (except spiritual, which is .5)
	#Plus value was .025 so a buff that dramatic seemed worth updating

	allow = {
		can_be_chancellor_trigger = yes
	}
	gain_effect = {
		remove_opinion = { who = FROM modifier = opinion_fired_from_council }
		remove_opinion = { who = FROM modifier = opinion_recently_fired }
		if = {
			limit = { FROM = { primary_title = { has_law = council_privileges_1 } } }
			opinion = { who = FROM modifier = grateful_council_term months = 12 }
		}
	}
	dismiss_trigger = {
		tooltip = { FROM = { primary_title = { NOT = { has_law = council_privileges_1 } } } }
		hidden_tooltip = { OR = { trait = incapable is_inaccessible_trigger = yes FROM = { NOT = { has_character_flag = lifetime_appointments } } } }
	}
	lose_effect = {
		opinion = { who = FROM modifier = opinion_fired_from_council }
		opinion = { who = FROM modifier = opinion_recently_fired }
		remove_opinion = { who = FROM modifier = grateful_council_term }
	}
	retire_effect = {
	}

	action = action_improve_relations
	action = action_fabricate_claims
	action = action_clan_sentiment # Replaces Fabricate Claims for Nomads
	action = action_sow_dissent

	lift_fow = yes
}

# NOTE: The allow trigger for this job also determines who can command armies!
job_marshal = {
	is_marshal = yes
	is_voter = yes
	attribute = martial
	dignity = 0.33
	opinion_effect = 10

	monthly_salary = 0.2
	monthly_prestige = 0.75

	allow = {
		can_be_marshal_trigger = yes
	}
	gain_effect = {
		remove_opinion = { who = FROM modifier = opinion_fired_from_council }
		remove_opinion = { who = FROM modifier = opinion_recently_fired }
		if = {
			limit = { FROM = { primary_title = { has_law = council_privileges_1 } } }
			opinion = { who = FROM modifier = grateful_council_term months = 12 }
		}
	}
	dismiss_trigger = {
		tooltip = { FROM = { primary_title = { NOT = { has_law = council_privileges_1 } } } }
		hidden_tooltip = { OR = { trait = incapable is_inaccessible_trigger = yes FROM = { NOT = { has_character_flag = lifetime_appointments } } } }
	}
	lose_effect = {
		opinion = { who = FROM modifier = opinion_fired_from_council }
		opinion = { who = FROM modifier = opinion_recently_fired }
		remove_opinion = { who = FROM modifier = grateful_council_term }
	}
	retire_effect = {
	}
	
	action = action_assist_arrest
	action = action_train_troops
	action = action_train_troops_nomadic
	action = action_advance_mil_tech
	action = action_organize_raid # Replaces action_advance_mil_tech for Tribes

	lift_fow = yes
}

job_treasurer = {
	is_treasurer = yes
	is_voter = yes
	attribute = stewardship
	dignity = 0.2
	opinion_effect = 10
	
	monthly_salary = 0.2
	monthly_prestige = 0.75
	
	allow = {
		can_be_treasurer_trigger = yes
	}
	gain_effect = {
		remove_opinion = { who = FROM modifier = opinion_fired_from_council }
		remove_opinion = { who = FROM modifier = opinion_recently_fired }
		if = {
			limit = { FROM = { primary_title = { has_law = council_privileges_1 } } }
			opinion = { who = FROM modifier = grateful_council_term months = 12 }
		}
	}
	dismiss_trigger = {
		tooltip = { FROM = { primary_title = { NOT = { has_law = council_privileges_1 } } } }
		hidden_tooltip = { OR = { trait = incapable is_inaccessible_trigger = yes FROM = { NOT = { has_character_flag = lifetime_appointments } } } }
	}
	lose_effect = {
		opinion = { who = FROM modifier = opinion_fired_from_council }
		opinion = { who = FROM modifier = opinion_recently_fired }
		remove_opinion = { who = FROM modifier = grateful_council_term }
	}
	retire_effect = {
	}

	action = action_squeeze_peasants
	action = action_collect_tribute # Replaces action_squeeze_peasants for Nomads
	action = action_settle_tribe # Replaces action_squeeze_peasants for Tribes
	action = action_oversee_construction
	action = action_advance_eco_tech
	action = action_build_legend # Replaces action_advance_eco_tech for Tribes


	lift_fow = yes
}

job_spymaster = {
	is_spymaster = yes
	is_voter = yes
	attribute = intrigue
	dignity = 0.1
	opinion_effect = 10

	monthly_salary = 0.2
	monthly_prestige = 0.75

	allow = {
		can_be_spymaster_trigger = yes
	}
	gain_effect = {
		remove_opinion = { who = FROM modifier = opinion_fired_from_council }
		remove_opinion = { who = FROM modifier = opinion_recently_fired }
		if = {
			limit = { FROM = { primary_title = { has_law = council_privileges_1 } } }
			opinion = { who = FROM modifier = grateful_council_term months = 12 }
		}
	}
	dismiss_trigger = {
		tooltip = { FROM = { primary_title = { NOT = { has_law = council_privileges_1 } } } }
		hidden_tooltip = { OR = { trait = incapable is_inaccessible_trigger = yes FROM = { NOT = { has_character_flag = lifetime_appointments } } } }
	}
	lose_effect = {
		opinion = { who = FROM modifier = opinion_fired_from_council }
		opinion = { who = FROM modifier = opinion_recently_fired }
		remove_opinion = { who = FROM modifier = grateful_council_term }
	}
	retire_effect = {
	}

	action = action_uncover_plots
	action = action_organize_spies
	action = action_study_technology

	lift_neighbor_fow = yes
}

job_spiritual = {
	is_spiritual = yes
	is_voter = yes
	attribute = learning
	dignity = 0.15
	opinion_effect = 10
	
	monthly_salary = 0.2
	monthly_piety = 0.5
	
	allow = {
		can_be_spiritual_trigger = yes
	}
	gain_effect = {
		remove_opinion = { who = FROM modifier = opinion_fired_from_council }
		remove_opinion = { who = FROM modifier = opinion_recently_fired }
		if = {
			limit = { FROM = { primary_title = { has_law = council_privileges_1 } } }
			opinion = { who = FROM modifier = grateful_council_term months = 12 }
		}
	}
	dismiss_trigger = {
		tooltip = { FROM = { primary_title = { NOT = { has_law = council_privileges_1 } } } }
		hidden_tooltip = {
			OR = {
				FROM = { NOT = { has_character_flag = lifetime_appointments } }
				NOT = { religion = FROM }
				trait = incapable
				is_inaccessible_trigger = yes
			}
		}
	}
	lose_effect = {
		opinion = { who = FROM modifier = opinion_fired_from_council }
		opinion = { who = FROM modifier = opinion_recently_fired }
		remove_opinion = { who = FROM modifier = grateful_council_term }
	}
	retire_effect = {
	}

	action = action_inquisition
	action = action_advance_cul_tech
	action = action_improve_rel_relations
	action = action_charity
	action = action_build_zeal # Tribal replacement for 'action_advance_cul_tech'

	lift_fow = yes
}

