################################################
#
# Events for Job Flavour
#
# ID 75000 - 75999 are reserved
#
##################################################
#
# Written by Sara Wendel-rtqvist


### Councillors are good at their work ###

# Chancellor is good at his/her job
character_event = {
	id = 75000
	desc = EVTDESC75000
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, good_councillor_events

	only_playable = yes
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		is_nomadic = no
		is_tribal = no

		job_chancellor = {
			diplomacy >= 12
			is_smart_trigger = yes
		}

		NOR = {
			has_character_modifier = town_appreciate
			has_character_modifier = castle_appreciate
		}
	}

	option = {
		name = EVTOPTA75000

		add_character_modifier = {
			name = town_appreciate
			years = 5
		}
	}

	option = {
		name = EVTOPTB75000

		add_character_modifier = {
			name = castle_appreciate
			years = 5
		}
	}

	after = {
		if = {
			limit = { has_dlc = "Reapers" }

			custom_tooltip = {
				text = capital_prospers_custom_tooltip

				capital_scope = {
					change_variable = {
						which = prosperity_value
						value = 6
					}
				}
			}
		}
	}
}

# Marshal is good at his/her job
character_event = {
	id = 75001
	desc = EVTDESC75001
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, good_councillor_events

	only_playable = yes
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		job_marshal = {
			martial >= 12
			is_smart_trigger = yes

			location = {
				NOT = { has_province_modifier = troops_increases }
			}
		}

		NOT = { has_character_modifier = troops_likes_marshal }
	}

	option = {
		name = EVTOPTA75001

		add_character_modifier = {
			name = troops_likes_marshal
			years = 5
		}

		if = {
			limit = { has_dlc = "Reapers" }

			custom_tooltip = {
				text = capital_prospers_custom_tooltip

				capital_scope = {
					change_variable = {
						which = prosperity_value
						value = 6
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTB75001

		job_marshal = {
			show_scope_change = no

			location = {
				show_scope_change = no

				add_province_modifier = {
					name = troops_increases
					years = 5
				}

				increase_prosperity_effect = yes
			}
		}
	}
}

# Steward is good at his/her job
character_event = {
	id = 75002
	desc = EVTDESC75002
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, good_councillor_events

	only_playable = yes
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		wealth < 50

		any_demesne_province = {
			revolt_risk >= 0.02
			owned_by = PREV
		}

		job_treasurer = {
			stewardship >= 12
			is_smart_trigger = yes
		}

		NOR = {
			has_character_modifier = steward_taxincome
			has_character_modifier = steward_revoltrisk
		}
	}

	option = {
		name = EVTOPTA75002

		add_character_modifier = {
			name = steward_taxincome
			years = 5
		}
	}

	option = {
		name = EVTOPTB75002

		add_character_modifier = {
			name = steward_revoltrisk
			years = 5
		}
	}

	after = {
		if = {
			limit = { has_dlc = "Reapers" }

			custom_tooltip = {
				text = capital_prospers_custom_tooltip

				capital_scope = {
					change_variable = {
						which = prosperity_value
						value = 6
					}
				}
			}
		}
	}
}

# Spymaster is good at his/her job
character_event = {
	id = 75003
	desc = EVTDESC75003
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, good_councillor_events

	only_playable = yes
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		job_spymaster = {
			intrigue >= 12
			is_smart_trigger = yes
		}

		NOR = {
			has_character_modifier = increase_arrest_chance
			has_character_modifier = increase_plot_power
		}
	}

	option = {
		name = EVTOPTA75003

		add_character_modifier = {
			name = increase_arrest_chance
			years = 5
		}
	}

	option = {
		name = EVTOPTB75003

		add_character_modifier = {
			name = increase_plot_power
			years = 5
		}
	}

	after = {
		if = {
			limit = { has_dlc = "Reapers" }

			custom_tooltip = {
				text = capital_prospers_custom_tooltip

				capital_scope = {
					change_variable = {
						which = prosperity_value
						value = 6
					}
				}
			}
		}
	}
}

### Lord Spiritual is good at his/her job ###
# CleanSlate: Event id 75005 merged with event id 75004
character_event = {
	id = 75004
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_religion

	desc = {
		text = EVTDESC75004
		trigger = {
			NOT = { religion_group = muslim }
		}
	}
	desc = {
		text = EVTDESC75005
		trigger = { religion_group = muslim }
	}

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, good_councillor_events

	only_playable = yes
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		job_spiritual = {
			learning >= 12
			is_smart_trigger = yes
		}

		NOR = {
			has_character_modifier = church_appreciates
			has_character_modifier = imam_appreciates
			has_character_modifier = spiritual_increase_piety
		}
	}

	option = {
		name = EVTOPTA75004

		trigger = {
			NOT = { religion_group = muslim }
		}

		add_character_modifier = {
			name = church_appreciates
			years = 5
		}
	}

	option = {
		name = EVTOPTA75005

		trigger = { religion_group = muslim }

		add_character_modifier = {
			name = imam_appreciates
			years = 5
		}
	}

	option = {
		name = {
			text = EVTOPTB75004
			trigger = {
				NOT = { religion_group = muslim }
			}
		}
		name = {
			text = EVTOPTB75005
			trigger = { religion_group = muslim }
		}

		piety = 25
	}

	after = {
		if = {
			limit = { has_dlc = "Reapers" }

			custom_tooltip = {
				text = capital_prospers_custom_tooltip

				capital_scope = {
					change_variable = {
						which = prosperity_value
						value = 6
					}
				}
			}
		}
	}
}

### Chief Mufti is good at his/her job - Muslim ###
# CleanSlate: Event id 75005 merged with event id 75004

### Lustful Chancellor ###

# The Chancellor is after my wife!
character_event = {
	id = 75010
	desc = EVTDESC75010
	picture = GFX_evt_lovers

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_rulers = yes
	only_men = yes
	is_married = yes
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		in_command_trigger = no
		independent = no

		trigger_if = {
			limit = { has_character_flag = event_75010 }

			had_character_flag = {
				flag = event_75010
				years >= 5
			}
		}

		liege = {
			war = no
			NOT = { has_character_modifier = lustful_chancellor_timer }

			job_chancellor = {
				is_adult = yes
				practical_age < 60
				at_location = ROOT
				is_female = no
				trait = lustful

				NOR = {
					character = ROOT
					trait = celibate
					trait = blinded
					has_character_flag = lustful_chancellor
				}
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		set_character_flag = event_75010

		liege = {
			job_chancellor = {
				set_character_flag = lustful_chancellor
			}
		}
	}

	option = {
		name = EVTOPTA75010

		liege = {
			show_scope_change = no

			character_event = {
				id = 75011
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75011
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 2
				trait = envious
			}

			mult_modifier = {
				factor = 0.05
				trait = kind
			}
		}
	}

	option = {
		name = EVTOPTB75010

		prestige = -5

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 0.05
				trait = envious
			}

			mult_modifier = {
				factor = 3
				trait = kind
			}
		}
	}
}

# Liege hears about FROM's complains about Chancellor chasing FROM's wife
character_event = {
	id = 75011
	desc = EVTDESC75011
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	option = {
		name = EVTOPTA75011

		show_portrait = job_chancellor

		FROM = {
			show_scope_change = no

			reverse_opinion = {
				name = opinion_complaining
				who = ROOT
				years = 10
			}

			character_event = {
				id = 75012
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75012
			}
		}

		job_chancellor = {
			show_scope_change = no

			imprison = FROM

			character_event = {
				id = 75013
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75013
			}
		}
	}

	option = {
		name = EVTOPTB75011

		job_chancellor = {
			show_scope_change = no

			opinion = {
				name = opinion_my_saviour
				who = FROM
				years = 10
			}

			character_event = {
				id = 75014
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75014
			}
		}

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_betrayed
				who = ROOT
				years = 10
			}

			character_event = {
				id = 75015
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75015
			}
		}
	}
}

# Imprison Chancellor: Notify Vassal
character_event = {
	id = 75012
	desc = EVTDESC75012
	picture = GFX_evt_into_the_dungeon

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA75012

		tooltip = {
			reverse_opinion = {
				name = opinion_complaining
				who = FROM
				years = 10
			}
		}
	}
}

# Imprison Chancellor
character_event = {
	id = 75013
	desc = EVTDESC75013
	picture = GFX_evt_into_the_dungeon

	is_triggered_only = yes

	option = {
		name = EVTOPTA75013

		opinion = {
			name = opinion_arrest_attempt
			who = FROM
			years = 20
		}

		tooltip = {
			imprison = FROM
		}
	}
}

# Clear Chancellor: Notify Chancellor
character_event = {
	id = 75014
	desc = EVTDESC75014
	picture = GFX_evt_emissary

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA75014

		tooltip = {
			opinion = {
				name = opinion_my_saviour
				who = FROM
				years = 10
			}
		}
	}
}

# Clear Chancellor: Notify Vassal
character_event = {
	id = 75015
	desc = EVTDESC75015
	picture = GFX_evt_lunatic

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA75015

		tooltip = {
			opinion = {
				name = opinion_betrayed
				who = ROOT
				years = 10
			}
		}
	}
}

### Diligent Chancellor ###

# Chancellor is diligent
character_event = {
	id = 75020
	desc = EVTDESC75020
	picture = GFX_evt_spymaster

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_rulers = yes
	has_job_title = yes
	only_capable = yes

	trigger = {
		has_job_title = job_chancellor
		trait = diligent
		liege = { prisoner = no }

		trigger_if = {
			limit = { has_character_flag = event_75020 }

			had_character_flag = {
				flag = event_75020
				years >= 5
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		set_character_flag = event_75020
	}

	option = {
		name = EVTOPTA75020

		trigger = {
			liege = {
				any_vassal = {
					opinion = {
						who = PREV
						value < 0
					}
				}
			}
		}

		liege = {
			show_scope_change = no

			character_event = {
				id = 75021
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75021
			}

			random_vassal = {
				show_scope_change = no

				limit = {
					opinion = {
						who = PREV
						value < 0
					}
				}

				character_event = {
					id = 75022
					days = 1
					random = 2
					tooltip = EVTTOOLTIP75022
				}
			}
		}
	}

	option = {
		name = EVTOPTB75020

		trigger = {
			liege = {
				is_married = yes

				spouse = {
					is_abroad = no
					prisoner = no
					is_alive = yes

					opinion = {
						who = PREV
						value < 0
					}
				}
			}
		}

		liege = {
			show_scope_change = no

			character_event = {
				id = 75023
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75023
			}

			spouse = {
				show_scope_change = no

				character_event = {
					id = 75024
					days = 1
					random = 2
					tooltip = EVTTOOLTIP75024
				}
			}
		}
	}

	option = {
		name = EVTOPTC75020

		liege = {
			show_scope_change = no

			character_event = {
				id = 75025
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75025
			}
		}
	}
}

# Liege finds random vassal likes him/her more
character_event = {
	id = 75021
	desc = EVTDESC75021
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = EVTOPTA75021

		random_vassal = {
			show_scope_change = no

			limit = {
				opinion = {
					who = PREV
					value < 0
				}
			}

			opinion = {
				name = opinion_glad
				who = ROOT
				years = 10
			}
		}

		scaled_wealth = -0.1

		FROM = {
			show_scope_change = no

			reverse_opinion = {
				name = opinion_happy
				who = ROOT
				years = 2
			}

			character_event = {
				id = 75026
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75026
			}
		}
	}

	option = {
		name = EVTOPTB75021 # It's just his/her job

		random_vassal = {
			show_scope_change = no

			limit = {
				opinion = {
					who = PREV
					value < 0
				}
			}

			opinion = {
				name = opinion_glad
				who = ROOT
				years = 10
			}
		}

		prestige = 10

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_disappointed
				who = ROOT
				years = 2
			}

			character_event = {
				id = 75027
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75027
			}
		}
	}
}

# Vassal likes liege more
character_event = {
	id = 75022
	desc = EVTDESC75022
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = EVTOPTA75022

		reverse_opinion = {
			name = opinion_glad
			who = liege
			years = 10
		}
	}
}

# Liege likes spouse more
character_event = {
	id = 75023
	desc = EVTDESC75023
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = EVTOPTA75023

		reverse_opinion = {
			name = opinion_glad
			who = spouse
			years = 10
		}

		scaled_wealth = -0.1

		opinion = {
			name = opinion_happy
			who = FROM
			years = 10
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = 75026
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75026
			}
		}
	}

	option = {
		name = EVTOPTB75023 # It's just his/her job

		reverse_opinion = {
			name = opinion_glad
			who = spouse
			years = 10
		}

		prestige = 10

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_disappointed
				who = ROOT
				years = 10
			}

			character_event = {
				id = 75027
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75027
			}
		}
	}
}

# Spouse likes liege more
character_event = {
	id = 75024
	desc = EVTDESC75024
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = EVTOPTA75024

		reverse_opinion = {
			name = opinion_glad
			who = spouse
			years = 10
		}
	}
}

# Courtiers like liege
character_event = {
	id = 75025
	desc = EVTDESC75025
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = EVTOPTA75025 # Reward

		any_courtier = {
			show_scope_change = no

			opinion = {
				name = opinion_impressed
				who = ROOT
				years = 10
			}
		}

		scaled_wealth = -0.1

		opinion = {
			name = opinion_happy
			who = FROM
			years = 10
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = 75026
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75026
			}
		}
	}

	option = {
		name = EVTOPTB75025 # It's just his/her job

		any_courtier = {
			show_scope_change = no

			opinion = {
				name = opinion_impressed
				who = ROOT
				years = 10
			}
		}

		prestige = 10

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_disappointed
				who = ROOT
				years = 10
			}

			character_event = {
				id = 75027
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75027
			}
		}
	}
}

# Chancellor is rewarded
character_event = {
	id = 75026
	desc = EVTDESC75026
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = EVTOPTA75026

		wealth = 5
	}
}

# Chancellor: Liege does not appreciate me
character_event = {
	id = 75027
	desc = EVTDESC75027
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = EVTOPTA75027

		remove_trait_silently_diligent_effect = yes
	}
}

### Slothful Chancellor ###

# Chancellor is slothful
character_event = {
	id = 75030
	desc = EVTDESC75030
	picture = GFX_evt_scandal

	is_triggered_only = yes

	has_job_title = yes
	only_capable = yes

	trigger = {
		has_job_title = job_chancellor
		trait = slothful
		independent = no

		trigger_if = {
			limit = { has_character_flag = event_75030 }

			had_character_flag = {
				flag = event_75030
				years >= 5
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		set_character_flag = event_75030
	}

	option = {
		name = EVTOPTA75030

		prestige = -5

		liege = {
			character_event = {
				id = 75031
				days = 1
				random = 2
			}
		}
	}
}

# Liege is notified about slothful Chancellor
character_event = {
	id = 75031
	desc = EVTDESC75031
	picture = GFX_evt_scandal

	is_triggered_only = yes

	option = {
		name = EVTOPTA75031 # Give a stern talking to Chancellor

		FROM = {
			show_scope_change = no

			character_event = {
				id = 75032
				tooltip = EVTTOOLTIP75032
			}
		}
	}

	option = {
		name = EVTOPTB75031 # Ignore it

		random = {
			chance = 25
			add_trait_fully_slothful_effect = yes
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = 75033
				tooltip = EVTTOOLTIP75033
			}
		}
	}
	option = {
		name = EVTOPTC75031 # This is worth throwing someone in jail over

		trigger = {
			FROM = {
				is_ruler = no
			}
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = 75034
				tooltip = EVTTOOLTIP75034
			}
		}
	}
}

# Chancellor is talked sternly to by Liege
character_event = {
	id = 75032
	desc = EVTDESC75032
	picture = GFX_evt_scandal

	is_triggered_only = yes

	option = {
		name = EVTOPTA75032

		FROM = {
			show_scope_change = no

			character_event = {
				id = 75035
				days = 3
				random = 3
				tooltip = EVTTOOLTIP75035
			}
		}

		random = {
			chance = 25
			add_trait_fully_wroth_effect = yes
		}
	}

	option = {
		name = EVTOPTB75032

		prestige = -5
		remove_trait_silently_slothful_effect = yes

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_glad
				who = ROOT
				years = 10
			}

			character_event = { id = 75036 }
		}
	}
}

# The issue is ignored
character_event = {
	id = 75033
	desc = EVTDESC75033
	picture = GFX_evt_scandal

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA75033
	}
}

# Chancellor is thrown in jail
character_event = {
	id = 75034
	desc = EVTDESC75034
	picture = GFX_evt_into_the_dungeon

	is_triggered_only = yes

	option = {
		name = EVTOPTA75034

		imprison = FROM

		opinion = {
			who = FROM
			name = opinion_arrest_attempt
			years = 20
		}
	}
}

# Liege: Chancellor is angry
character_event = {
	id = 75035
	desc = EVTDESC75035
	picture = GFX_evt_scandal

	is_triggered_only = yes

	option = {
		name = EVTOPTA75035

		opinion = {
			name = opinion_angry
			who = FROM
			years = 10
		}
	}
}

# Liege: Chancellor is no longer slothful
character_event = {
	id = 75036
	desc = EVTDESC75036
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	option = {
		name = EVTOPTA75036

		opinion = {
			name = opinion_glad
			who = FROM
			years = 10
		}
	}
}

### Lord Spiritual ###

# Lord Spiritual finds infidel
character_event = {
	id = 75040
	desc = EVTDESC75040
	picture = GFX_evt_heretic

	is_triggered_only = yes # on_yearly_pulse, random_events

	has_job_title = yes
	only_capable = yes

	trigger = {
		has_job_title = job_spiritual
		trait = zealous
		religion = liege
		has_secret_religion = no

		trigger_if = {
			limit = { has_character_flag = event_75040 }

			had_character_flag = {
				flag = event_75040
				years >= 5
			}
		}

		liege = {
			trait = zealous
			is_nomadic = no

			any_courtier = {
				is_adult = yes
				prisoner = no

				NOR = {
					religion_group = ROOT
					has_character_flag = banished_religion
					is_married = PREV
					is_consort = PREV
					is_lover = PREV

					secret_religion = {
						target_type = public
						target = ROOT
					}

					AND = {
						trait = pregnant
						father_of_unborn_known = yes

						father_of_unborn = {
							character = PREVPREV
						}
					}
				}
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		set_character_flag = event_75040

		liege = {
			random_courtier = {
				limit = {
					is_adult = yes
					prisoner = no

					NOR = {
						religion_group = ROOT
						has_character_flag = banished_religion
						is_married = PREV
						is_consort = PREV
						is_lover = PREV

						secret_religion = {
							target_type = public
							target = ROOT
						}

						AND = {
							trait = pregnant
							father_of_unborn_known = yes

							father_of_unborn = {
								character = PREVPREV
							}
						}
					}
				}

				save_event_target_as = target_infidel
			}
		}
	}

	option = {
		name =  EVTOPTA75040 # Demand to liege that vassal should be burned at the stake

		liege = {
			show_scope_change = no

			character_event = {
				id = 75041
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75041
			}
		}
	}

	option = {
		name = EVTOPTB75040 # Demand to liege that X should be exiled.

		liege = {
			show_scope_change = no

			character_event = {
				id = 75042
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75042
			}
		}
	}
}

# Liege burns infidel?
character_event = {
	id = 75041
	desc = EVTDESC75041
	picture = GFX_evt_heretic

	is_triggered_only = yes

	option = {
		name = EVTOPTA75041


		any_courtier = {
			show_scope_change = no

			limit = {
				religion = event_target:target_infidel
				prisoner = no

				NOR = {
					character = ROOT
					character = event_target:target_infidel
				}
			}

			opinion = {
				name = opinion_burned_same_faith
				who = ROOT
				years = 10
			}
		}

		event_target:target_infidel = {
			show_scope_change = no

			death = {
				death_reason = death_execution_burning
				killer = ROOT
			}
		}

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_satisfied
				who = ROOT
				years = 10
			}

			character_event = {
				id = 75043
				days = 1
				random = 2
			}
		}
	}

	option = {
		name = EVTOPTB75041

		reverse_opinion = {
			name = opinion_grateful
			who = event_target:target_infidel
			years = 10
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				trait = zealous
				prisoner = no
				religion = ROOT
				NOT = { character = ROOT }
			}

			opinion = {
				name = opinion_ignored_infidel
				who = ROOT
				years = 10
			}
		}

		FROM = {
			character_event = {
				id = 75044
				days = 1
				random = 2
			}
		}
	}
}

# Liege banish infidel?
character_event = {
	id = 75042
	desc = EVTDESC75042
	picture = GFX_evt_heretic

	is_triggered_only = yes

	option = {
		name = EVTOPTA75042

		event_target:target_infidel = {
			show_scope_change = no

			banish = yes
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				religion = event_target:target_infidel
				prisoner = no

				NOR = {
					character = ROOT
					character = event_target:target_infidel
				}
			}

			opinion = {
				name = opinion_banished_same_faith
				who = ROOT
				years = 10
			}
		}

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_satisfied
				who = ROOT
				years = 10
			}

			character_event = {
				id = 75045
				days = 1
				random = 2
			}
		}
	}

	option = {
		name = EVTOPTB75042

		reverse_opinion = {
			name = opinion_grateful
			who = event_target:target_infidel
			years = 2
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				trait = zealous
				religion = ROOT
				prisoner = no
				NOT = { character = ROOT }
			}

			opinion = {
				name = opinion_ignored_infidel
				who = ROOT
				years = 10
			}
		}

		FROM = {
			character_event = {
				id = 75046
				days = 1
				random = 2
			}
		}
	}
}

# Lord Spiritual: Liege burned X
character_event = {
	id = 75043
	desc = EVTDESC75043
	picture = GFX_evt_beheading

	is_triggered_only = yes

	option = {
		name = EVTOPTA75043

		prestige = 10
	}
}

# Lord Spiritual: Liege ignored demands
character_event = {
	id = 75044
	desc = EVTDESC75044
	picture = GFX_evt_lunatic

	is_triggered_only = yes

	option = {
		name = EVTOPTA75044

		prestige = -10
	}
}

# Lord Spiritual: Liege banished X
character_event = {
	id = 75045
	desc = EVTDESC75045
	picture = GFX_evt_carriage

	is_triggered_only = yes

	option = {
		name = EVTOPTA75045

		prestige = 10
	}
}

# Lord Spiritual: Liege ignored demands
character_event = {
	id = 75046
	desc = EVTDESC75046
	picture = GFX_evt_lunatic

	is_triggered_only = yes

	option = {
		name = EVTOPTA75046

		prestige = -10
	}
}

# Lord Spiritual finds a heretic
character_event = {
	id = 75050
	desc = EVTDESC75050
	picture = GFX_evt_heretic

	is_triggered_only = yes # on_yearly_pulse, random_events

	has_job_title = yes
	only_capable = yes

	trigger = {
		has_job_title = job_spiritual
		trait = zealous
		religion = liege

		trigger_if = {
			limit = { has_character_flag = event_75050 }

			had_character_flag = {
				flag = event_75050
				years >= 5
			}
		}

		liege = {
			trait = zealous

			any_courtier = {
				is_heresy_of = ROOT
				is_adult = yes
				prisoner = no

				NOR = {
					is_married = PREV
					is_consort = PREV
					is_lover = PREV

					secret_religion = {
						target_type = public
						target = ROOT
					}

					AND = {
						trait = pregnant
						father_of_unborn_known = yes

						father_of_unborn = {
							character = PREVPREV
						}
					}
				}
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		set_character_flag = 75050

		liege = {
			random_courtier = {
				limit = {
					is_heresy_of = ROOT
					is_adult = yes
					prisoner = no

					NOR = {
						is_married = PREV
						is_consort = PREV
						is_lover = PREV

						secret_religion = {
							target_type = public
							target = ROOT
						}

						AND = {
							trait = pregnant
							father_of_unborn_known = yes

							father_of_unborn = {
								character = PREVPREV
							}
						}
					}
				}

				save_event_target_as = target_heretic
			}
		}
	}

	option = {
		name = EVTOPTA75050 # Demand to liege that vassal should be burned at the stake

		liege = {
			show_scope_change = no

			character_event = {
				id = 75051
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75051
			}
		}
	}

	option = {
		name = EVTOPTB75050 # Demand to liege that X should be exiled.

		liege = {
			show_scope_change = no

			character_event = {
				id = 75052
				days = 1
				random = 2
				tooltip = EVTTOOLTIP75052
			}
		}
	}
}

# Liege burns heretic?
character_event = {
	id = 75051
	desc = EVTDESC75051
	picture = GFX_evt_heretic

	is_triggered_only = yes

	option = {
		name = EVTOPTA75051

		event_target:target_heretic = {
			show_scope_change = no

			death = {
				death_reason = death_execution_burning
				killer = ROOT
			}
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				religion = event_target:target_heretic
				prisoner = no

				NOR = {
					character = ROOT
					character = event_target:target_heretic
				}
			}

			opinion = {
				name = opinion_burned_same_faith
				who = ROOT
				years = 10
			}
		}

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_satisfied
				who = ROOT
				years = 10
			}

			character_event = {
				id = 75053
				days = 1
				random = 2
			}
		}
	}

	option = {
		name = EVTOPTB75051

		reverse_opinion = {
			name = opinion_grateful
			who = event_target:target_heretic
			years = 10
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				trait = zealous
				religion = ROOT
				prisoner = no
				NOT = { character = ROOT }
			}

			opinion = {
				name = opinion_ignored_infidel
				who = ROOT
				years = 10
			}
		}

		FROM = {
			character_event = {
				id = 75054
				days = 1
				random = 2
			}
		}
	}
}

# Liege banishes X
character_event = {
	id = 75052
	desc = EVTDESC75052
	picture = GFX_evt_carriage

	is_triggered_only = yes

	option = {
		name = EVTOPTA75052

		event_target:target_heretic = {
			show_scope_change = no

			banish = yes
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				religion = event_target:target_heretic
				prisoner = no

				NOR = {
					character = ROOT
					character = event_target:target_heretic
				}
			}

			opinion = {
				name = opinion_banished_same_faith
				who = ROOT
				years = 10
			}
		}

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_satisfied
				who = ROOT
				years = 10
			}

			character_event = {
				id = 75055
				days = 1
				random = 2
			}
		}
	}

	option = {
		name = EVTOPTB75052

		reverse_opinion = {
			name = opinion_grateful
			who = event_target:target_heretic
			years = 10
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				trait = zealous
				religion = ROOT
				prisoner = no
				NOT = { character = ROOT }
			}

			opinion = {
				name = opinion_ignored_infidel
				who = ROOT
				years = 10
			}
		}

		FROM = {
			character_event = {
				id = 75056
				days = 1
				random = 2
			}
		}
	}
}

# Lord Spiritual: Liege burned X
character_event = {
	id = 75053
	desc = EVTDESC75053
	picture = GFX_evt_beheading

	is_triggered_only = yes

	option = {
		name = EVTOPTA75053

		prestige = 10
	}
}

# Lord Spiritual: Liege ignored demands
character_event = {
	id = 75054
	desc = EVTDESC75054
	picture = GFX_evt_lunatic

	is_triggered_only = yes

	option = {
		name = EVTOPTA75054

		prestige = -10
	}
}

# Lord Spiritual: Liege banished X
character_event = {
	id = 75055
	desc = EVTDESC75055
	picture = GFX_evt_carriage

	is_triggered_only = yes

	option = {
		name = EVTOPTA75055

		prestige = 10
	}
}

# Lord Spiritual: Liege ignored demands
character_event = {
	id = 75056
	desc = EVTDESC75056
	picture = GFX_evt_lunatic

	is_triggered_only = yes

	option = {
		name = EVTOPTA75056

		prestige = -10
	}
}

### Steward ###

# Steward is Arbitrary: Ruler
character_event = {
	id = 75060
	desc = EVTDESC75060
	picture = GFX_evt_peasants

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes

	trigger = {
		job_treasurer = {
			trait = arbitrary

			trigger_if = {
				limit = { has_character_flag = event_75060 }

				had_character_flag = {
					flag = event_75060
					years >= 5
				}
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		job_treasurer = {
			set_character_flag = event_75060
		}
	}

	option = {
		name = EVTOPTA75060

		job_treasurer = {
			show_scope_change = no

			character_event = {
				id = 75061
				tooltip = EVTTOOLTIP75061
			}
		}
	}
}

# Steward is Arbitrary: Steward
character_event = {
	id = 75061
	desc = EVTDESC75061
	picture = GFX_evt_peasants

	is_triggered_only = yes

	option = {
		name = EVTOPTA75061

		FROM = {
			show_scope_change = no

			random_demesne_province = {
				show_scope_change = no

				limit = { owned_by = PREV }

				add_province_modifier = {
					name = arbitrary_steward
					years = 5
				}
			}
		}
	}
}

# Steward is Just: Ruler
character_event = {
	id = 75065
	desc = EVTDESC75065
	picture = GFX_evt_throne_room

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes

	trigger = {
		job_treasurer = {
			trait = just

			trigger_if = {
				limit = { has_character_flag = event_75065 }

				had_character_flag = {
					flag = event_75065
					years >= 5
				}
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		job_treasurer = {
			set_character_flag = event_75065
		}
	}

	option = {
		name = EVTOPTA75065

		job_treasurer = {
			show_scope_change = no

			character_event = {
				id = 75066
				tooltip = EVTTOOLTIP75066
			}
		}

		show_portrait = job_treasurer
	}
}

# Steward is Just: Steward
character_event = {
	id = 75066
	desc = EVTDESC75066
	picture = GFX_evt_throne_room

	is_triggered_only = yes

	option = {
		name = EVTOPTA75066

		FROM = {
			show_scope_change = no

			random_demesne_province = {
				show_scope_change = no

				limit = { owned_by = PREV }

				add_province_modifier = {
					name = just_steward
					years = 5
				}
			}
		}
	}
}

# Steward is Kind/Charitable: Ruler
character_event = {
	id = 75070
	desc = EVTDESC75070
	picture = GFX_evt_throne_room

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes

	trigger = {
		job_treasurer = {
			OR = {
				trait = kind
				trait = charitable
			}

			trigger_if = {
				limit = { has_character_flag = event_75070 }

				had_character_flag = {
					flag = event_75070
					years >= 5
				}
			}
		}

		any_demesne_province = {
			has_disease = yes
			owned_by = PREV
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		job_treasurer = {
			set_character_flag = event_75070
		}
	}

	option = {
		name = EVTOPTA75070

		job_treasurer = {
			show_scope_change = no

			character_event = {
				id = 75071
				tooltip = EVTTOOLTIP75071
			}
		}
	}
}

# Steward is Kind/Charitable: Steward
character_event = {
	id = 75071
	desc = EVTDESC75071
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75071

		FROM = {
			show_scope_change = no

			random_demesne_province = {
				show_scope_change = no

				limit = {
					has_disease = yes
					owned_by = PREV
				}

				reduce_disease = -0.33
			}
		}
	}
}

# Steward is Cruel: Ruler
character_event = {
	id = 75075
	desc = EVTDESC75075
	picture = GFX_evt_peasants
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes

	trigger = {
		job_treasurer = {
			trait = cruel

			trigger_if = {
				limit = { has_character_flag = event_75075 }

				had_character_flag = {
					flag = event_75075
					years >= 5
				}
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		job_treasurer = {
			set_character_flag = event_75075
		}
	}

	option = {
		name = EVTOPTA75075

		scaled_wealth = 0.2

		random_demesne_province = {
			show_scope_change = no

			limit = { owned_by = PREV }

			add_province_modifier = {
				name = peasants_upset
				years = 1
			}
		}
	}

	option = {
		name = EVTOPTB75075

		job_treasurer = {
			show_scope_change = no

			character_event = {
				id = 75076
				tooltip = EVTTOOLTIP75076
			}
		}
	}
}

# Steward is Cruel: Steward
character_event = {
	id = 75076
	desc = EVTDESC75076
	picture = GFX_evt_shadow
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75076

		change_stewardship = -1

		opinion = {
			name = opinion_betrayed
			who = FROM
			years = 10
		}
	}
}

# Steward is Diligent: Ruler
character_event = {
	id = 75080
	desc = EVTDESC75080
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes

	trigger = {
		job_treasurer = {
			trait = diligent

			trigger_if = {
				limit = { has_character_flag = event_75080 }

				had_character_flag = {
					flag = event_75080
					years >= 5
				}
			}
		}

		any_demesne_province = {
			has_province_modifier = thieves_guild
			owned_by = PREV
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		job_treasurer = {
			set_character_flag = event_75080
		}
	}

	option = {
		name = EVTOPTA75080

		remove_trait_silently_just_effect = yes

		random_vassal = {
			show_scope_change = no

			opinion = {
				name = opinion_associating_with_thieves
				who = ROOT
				years = 10
			}
		}

		random_demesne_province = {
			show_scope_change = no

			limit = {
				has_province_modifier = thieves_guild
				owned_by = PREV
			}

			remove_province_modifier = thieves_guild
		}
	}

	option = {
		name = EVTOPTB75080

		prestige = 5
	}
}

# Steward and the Economy: Ruler
character_event = {
	id = 75085
	desc = EVTDESC75085
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes

	trigger = {
		job_treasurer = {
			stewardship >= 15

			trigger_if = {
				limit = { has_character_flag = event_75085 }

				had_character_flag = {
					flag = event_75085
					years >= 5
				}
			}
		}

		capital_scope = {
			NOT = { has_province_modifier = intelligent_steward }
			owned_by = PREV
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		job_treasurer = {
			set_character_flag = event_75085
		}
	}

	option = {
		name = EVTOPTA75085 # Adapt his ideas

		scaled_wealth = -0.1

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = intelligent_steward
				years = 5
			}

			increase_prosperity_effect = yes
		}
	}

	option = {
		name = EVTOPTB75085

		job_treasurer = {
			show_scope_change = no

			opinion = {
				name = opinion_dislike
				who = ROOT
				years = 10
			}
		}
	}
}

# Steward is Deceitful
character_event = {
	id = 75090
	desc = EVTDESC75090
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes # on_yearly_pulse, random_events

	has_job_title = yes
	only_capable = yes

	trigger = {
		has_job_title = job_treasurer
		trait = deceitful
		wealth < 1500

		trigger_if = {
			limit = { has_character_flag = event_75090 }

			had_character_flag = {
				flag = event_75090
				years >= 5
			}
		}

		any_demesne_province = {
			OR = {
				has_province_modifier = highway_robber_band
				has_province_modifier = thieves_guild
				has_province_modifier = smugglers_ring
			}

			owned_by = PREV
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		set_character_flag = event_75090
	}

	option = {
		name = EVTOPTA75090

		wealth = 50

		random = {
			chance = 33

			liege = {
				show_scope_change = no

				character_event = {
					id = 75091
					tooltip = EVTTOOLTIP75091
				}
			}
		}
	}

	option = {
		name = EVTOPTB75090

		wealth = 10

		random = {
			chance = 10

			liege = {
				show_scope_change = no

				character_event = {
					id = 75091
					tooltip = EVTTOOLTIP75091
				}
			}
		}
	}
}

# Steward is Deceitful: Liege
character_event = {
	id = 75091
	desc = EVTDESC75091
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75091

		FROM = {
			show_scope_change = no

			imprison = ROOT
			character_event = { id = 75092 }

			opinion = {
				who = ROOT
				name = opinion_arrest_attempt
				years = 20
			}
		}
	}

	option = {
		name = EVTOPTB75091

		add_trait_fully_silently_arbitrary_effect = yes

		if = {
			limit = {
				FROM = { wealth >= 50 }
			}

			wealth = 50
		}

		FROM = {
			character_event = { id = 75093 }
		}
	}
}

# Steward is Deceitful: Steward
character_event = {
	id = 75092
	desc = EVTDESC75092
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA75092
	}
}

# Steward is Deceitful: Steward
character_event = {
	id = 75093
	desc = EVTDESC75093
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75093

		wealth = -50
	}
}

# Steward is Greedy: Ruler
character_event = {
	id = 75095
	desc = EVTDESC75095
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes
	lacks_dlc = "Conclave"

	trigger = {
		job_treasurer = {
			trait = greedy
			NOT = { has_character_flag = greedy_steward }

			trigger_if = {
				limit = { has_character_flag = event_75095 }

				had_character_flag = {
					flag = event_75095
					years >= 5
				}
			}
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 3
			trait = diligent
		}

		mult_modifier = {
			factor = 3
			stewardship >= 10
		}
	}

	immediate = {
		job_treasurer = {
			set_character_flag = event_75095
		}
	}

	option = {
		name = EVTOPTA75095

		job_treasurer = {
			show_scope_change = no

			set_character_flag = greedy_steward

			character_event = {
				id = 75096
				tooltip = EVTTOOLTIP75096
			}
		}
	}

	option = {
		name = EVTOPTB75095

		prestige = -10

		# random_list = {
		# 	80 = { }
		# 	10 = { add_trait_fully_slothful_effect = yes }
		# 	10 = { add_trait_fully_arbitrary_effect = yes }
		# }
	}
}

# Steward is greedy: Steward
character_event = {
	id = 75096
	desc = EVTDESC75096
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75096 # Deny

		FROM = {
			show_scope_change = no

			character_event = {
				id = 75097
				tooltip = EVTTOOLTIP75097
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 10
				trait = deceitful
			}
		}
	}

	option = {
		name = EVTOPTB75096 # Admit it

		FROM = {
			show_scope_change = no

			character_event = {
				id = 75098
				tooltip = EVTTOOLTIP75098
			}
		}

		ai_chance = {
			factor = 50

			mult_modifier = {
				factor = 10
				trait = honest
			}
		}
	}
}

# Steward is Greedy: Liege is shown proof
character_event = {
	id = 75097
	desc = EVTDESC75097
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75097

		prestige = -25
	}
}

# Steward is Greedy: Liege knows Steward stole money
character_event = {
	id = 75098
	desc = EVTDESC75098
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75098 # Fine the Steward

		wealth = 25

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_dislike
				who = ROOT
				years = 10
			}

			character_event = { id = 75099 }
		}
	}

	option = {
		name = EVTOPTB75098

		FROM = {
			show_scope_change = no

			imprison = ROOT
			character_event = { id = 75100 }

			opinion = {
				name = opinion_arrest_attempt
				who = ROOT
				years = 20
			}
		}
	}

	option = {
		name = EVTOPTC75098

		add_trait_fully_silently_arbitrary_effect = yes

		reverse_opinion = {
			name = opinion_upset
			who = FROM
			years = 10
		}
	}
}

# Steward is fined
character_event = {
	id = 75099
	desc = EVTDESC75099
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75099

		wealth = -25
		remove_trait_silently_greedy_effect = yes
	}
}

# Steward is imprisoned
character_event = {
	id = 75100
	desc = EVTDESC75100
	picture = GFX_evt_into_the_dungeon
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA75100

		remove_trait_silently_greedy_effect = yes
	}
}

### Marshal ###

# Marshal deals with highway robber
character_event = {
	id = 75105
	desc = EVTDESC75105
	picture = GFX_evt_bandits
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	has_job_title = yes
	only_capable = yes

	trigger = {
		has_job_title = job_marshal
		war = no
		in_command_trigger = no

		trigger_if = {
			limit = { has_character_flag = event_75105 }

			had_character_flag = {
				flag = event_75105
				years >= 5
			}
		}

		liege = {
			any_demesne_province = {
				has_province_modifier = highway_robber_band
				owned_by = PREV
			}
		}

		OR = {
			trait = diligent
			trait = brave
			martial >= 10
		}

		NOR = {
			trait = slothful
			trait = craven
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		set_character_flag = event_75105
	}

	option = {
		name = EVTOPTA75105

		liege = {
			show_scope_change = no

			character_event = {
				id = 75106
				tooltip = EVTTOOLTIP75106
			}
		}
	}

	option = {
		name = EVTOPTB75105

		add_trait_fully_silently_craven_effect = yes

		ai_chance = { factor = 0 }
	}
}

# Marshal deals with highway robber: Liege decides
character_event = {
	id = 75106
	desc = EVTDESC75106
	picture = GFX_evt_bandits
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA75106

		random_list = {
			95 = {
				random_demesne_province = {
					show_scope_change = no

					limit = {
						has_province_modifier = highway_robber_band
						owned_by = PREV
					}

					remove_province_modifier = highway_robber_band
				}

				add_character_modifier = {
					name = marshal_highway_robbers
					years = 5
				}
			}

			5 = {
				FROM = {
					show_scope_change = no

					add_trait_wounded_effect = yes
				}
			}
		}
	}

	option = {
		name = EVTOPTB75106

		random_list = {
			50 = {
				random_demesne_province = {
					show_scope_change = no

					limit = {
						has_province_modifier = highway_robber_band
						owned_by = PREV
					}

					remove_province_modifier = highway_robber_band
				}

				add_character_modifier = {
					name = marshal_highway_robbers
					years = 5
				}
			}

			20 = {
				FROM = {
					show_scope_change = no

					add_maimed_trait_effect = yes
				}
			}

			20 = {
				FROM = {
					show_scope_change = no

					add_trait_wounded_effect = yes
				}
			}

			10 = {
				FROM = {
					show_scope_change = no

					add_trait_infirm_effect = yes
				}
			}
		}
	}
}

# Marshal is wroth, not a ruler & liege has a city vassal somewhere
character_event = {
	id = 75110
	desc = EVTDESC75110
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	has_job_title = yes
	only_capable = yes

	trigger = {
		has_job_title = job_marshal
		trait = wroth
		is_ruler = no
		is_republic = no

		trigger_if = {
			limit = { has_character_flag = event_75110 }

			had_character_flag = {
				flag = event_75110
				years >= 5
			}
		}

		liege = {
			any_vassal = {
				is_republic = yes
			}
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		set_character_flag = event_75110
	}

	option = {
		name = EVTOPTA75110

		liege = {
			show_scope_change = no

			character_event = {
				id = 75111
				tooltip = EVTTOOLTIP75111
			}
		}
	}
}

# Liege decides if Marshal is guilty or not
character_event = {
	id = 75111
	desc = EVTDESC75111
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA75111

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_angry
				who = ROOT
				years = 10
			}

			tooltip = {
				wealth = -20
			}

			character_event = { id = 75112 }
		}

		# random = {
		# 	chance = 25
		# 	add_trait_fully_arbitrary_effect = yes
		# }

		random_demesne_province = {
			show_scope_change = no

			limit = { owned_by = PREV }

			add_province_modifier = {
				name = peasants_upset
				years = 2
			}
		}
	}

	option = {
		name = EVTOPTB75111

		FROM = {
			show_scope_change = no

			imprison = ROOT
			character_event = { id = 75113 }

			opinion = {
				name = opinion_arrest_attempt
				who = ROOT
				years = 20
			}

			opinion = {
				name = opinion_hate
				who = ROOT
				years = 10
			}
		}

		any_courtier = {
			show_scope_change = no

			limit = {
				opinion = {
					who = FROM
					value >= 30
				}
			}

			opinion = {
				name = opinion_upset
				who = ROOT
				years = 5
			}
		}

		random = {
			chance = 50
			add_trait_fully_just_effect = yes
		}
	}

	option = {
		name = EVTOPTC75111

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_relieved
				who = ROOT
				years = 3
			}

			character_event = {
				id = 75114
				tooltip = EVTTOOLTIP75114
			}
		}

		random = {
			chance = 50
			add_trait_fully_arbitrary_effect = yes
		}

		random_demesne_province = {
			show_scope_change = no

			limit = { owned_by = PREV }

			add_province_modifier = {
				name = peasants_upset
				years = 4
			}
		}
	}
}

# Marshal is fined
character_event = {
	id = 75112
	desc = EVTDESC75112
	picture = GFX_evt_lunatic
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA75112

		wealth = -20
	}
}

# Marshal is imprisoned
character_event = {
	id = 75113
	desc = EVTDESC75113
	picture = GFX_evt_into_the_dungeon
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA75113
	}
}

# Marshal is cleared
character_event = {
	id = 75114
	desc = EVTDESC75114
	picture = GFX_evt_emissary
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA75114
	}
}

# Ruler: Marshal has 15+ martial
character_event = {
	id = 75120
	desc = EVTDESC75120
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes

	trigger = {
		job_marshal = {
			martial >= 15

			trigger_if = {
				limit = { has_character_flag = event_75120 }

				had_character_flag = {
					flag = event_75120
					years >= 5
				}
			}
		}

		capital_scope = {
			NOT = { has_province_modifier = marshal_improves_capital }
		}
	}

	weight_multiplier = {
		factor = 1
	}

	immediate = {
		job_marshal = {
			set_character_flag = event_75120
		}
	}

	option = {
		name = EVTOPTA75120 # Adapt his ideas

		scaled_wealth = -0.1

		capital_scope = {
			show_scope_change = no

			add_province_modifier = {
				name = marshal_improves_capital
				years = 5
			}

			increase_prosperity_effect = yes
		}
	}

	option = {
		name = EVTOPTB75120

		reverse_opinion = {
			name = opinion_dislike
			who = job_marshal
			years = 10
		}
	}
}