#############################################
#
# Court Event Series
#
# Event ID 73000-73999 is reserved
#
#############################################
#Written by Johan Andersson

#A famous writer proposes to compose your family chronicles
character_event = {
	id = 73000
	desc = EVTDESC73000
	picture = GFX_evt_monk
	
	is_triggered_only = yes
	
	min_age = 25
	only_playable = yes
	prisoner = no
	
	trigger = {
		NOT = { trait = proud }
		NOT = { trait = humble }
		higher_tier_than = count
		OR = {
			NOT = { has_character_flag = event_73000 }
			had_character_flag = { flag = event_73000 days = 3650 }
		}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 2.0
			trait = ambitious
		}
		modifier = {
			factor = 0.1
			trait = shy
		}
		modifier = {
			factor = 0.8
			trait = stressed
		}
		modifier = {
			factor = 0.8
			trait = depressed
		}
		modifier = {
			factor = 0.75
			trait = lunatic
		}
		modifier = {
			factor = 0.75
			trait = possessed
		}
		modifier = {
			factor = 0.9
			is_ill = yes
		}
		modifier = {
			factor = 0.8
			trait = pneumonic
		}
		modifier = {
			factor = 0.8
			trait = syphilitic
		}
		modifier = {
			factor = 0.5
			trait = leper
		}
		modifier = {
			factor = 0.9
			trait = wounded
		}
		modifier = {
			factor = 0.8
			is_maimed_trigger = yes
		}
		modifier = {
			factor = 0.5
			trait = infirm
		}
		modifier = {
			factor = 0.4
			trait = incapable
		}
		modifier = {
			factor = 0.5
			trait = drunkard
		}
		modifier = {
			factor = 0.5
			trait = has_tuberculosis
		}
		modifier = {
			factor = 0.5
			trait = has_typhoid_fever
		}
		modifier = {
			factor = 0.5
			trait = has_typhus
		}
		modifier = {
			factor = 0.5
			trait = has_bubonic_plague
		}
		modifier = {
			factor = 0.5
			trait = has_measles
		}
		modifier = {
			factor = 0.5
			trait = has_small_pox
		}
	
	}
	
	immediate = { set_character_flag = event_73000 }
	
	option = {
		name = EVTOPTA73000 #Give him patronage
		trigger = {
			wealth = 25
		}
		wealth = -25
		prestige = 25
		random = {
			chance = 15
			add_trait = proud
			hidden_tooltip = { character_event = { id = 38261 }  }
		}
		if = {
			limit = { any_vassal = { leads_faction = faction_glory } }
			custom_tooltip = { text = GLORYFACTIONMOODPLUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_glory } set_variable = { which = "faction_mood_increase" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}
	option = {
		name = EVTOPTB73000 #Ignore him
		custom_tooltip = {
			text = ALL_DYNASTY_MEMBERS_MINUS_5
			hidden_tooltip = {
				any_dynasty_member = {
					limit = {
						is_close_relative = ROOT
						NOT = {
							character = ROOT
						}
					}
					opinion = {
						who = ROOT
						modifier = disrespects_dynasty
						months = 120
					}
				}
			}
		}
		random = {
			chance = 15
			add_trait = humble
			hidden_tooltip = { character_event = { id = 38260 }  }
		}
		if = {
			limit = { any_vassal = { leads_faction = faction_glory } }
			custom_tooltip = { text = GLORYFACTIONMOODMINUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_glory } set_variable = { which = "faction_mood_decrease" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}
}

#Your young wife takes a passion for romantic poetry. She keeps reading any sort of romantic poetry she can get hold of.
character_event = {
	id = 73001
	desc = EVTDESC73001
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	only_men = yes
	is_married = yes
	
	trigger = {
		OR = {
			NOT = { has_character_flag = event_73001 }
			had_character_flag = { flag = event_73001 days = 1825 }
		}
		spouse = {
			is_abroad_trigger = no
			prisoner = no
			is_alive = yes
			NOT = { age = 21 }
			NOT = { demesne_size = 1 }
			fertility = 0.15
		}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 4.0
			spouse = { is_pregnant = yes }
		}
		modifier = {
			factor = 2.0
			spouse = { trait = poet }
		}
		modifier = {
			factor = 1.5
			trait = gregarious
		}
	}
	
	immediate = { set_character_flag = event_73001 }
	
	option = {
		name = EVTOPTA73001 # Help her, by getting her more to read.
		trigger = {
			wealth = 25
		}
		wealth = -25
		spouse = {
			fertility = 0.1
			hidden_tooltip = { change_variable = { which = "lifestyle_diplomacy" value = 1 } }
		}
		if = {
			limit = {
				NOT = {
					trait = lustful
				}
			}
			add_trait = lustful
		}
		opinion = {
			who = ROOT
			modifier = spouse_encouraged
			months = 12
		}
	}
	option = {
		name = EVTOPTB73001 # That is her interests, not mine.
		piety = 5
		spouse = {
			fertility = -0.1
			opinion = {
				who = ROOT
				modifier = spouse_ignores_me
				months = 12
			}
		}		
	}
	option = {
		name = {
			text = EVTOPTC73001 # These are books created by satan!
			trigger = {
				religion_group = christian
			}
		}
		name = {
			text = EVTOPTD73001 # These are books created by Shaytan!
			trigger = {
				religion_group = muslim
			}
		}
		trigger = {
			OR = {
				religion_group = christian
				religion_group = muslim
			}
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				NOT= { trait = zealous }
			}
		}
		spouse = {
			if = {
				limit = {
					NOT = {
						religion_group = muslim
					}
				}
				add_trait = chaste
			}
		}
		piety = 10
	}
}

#The Church wants to organise a Miracle play for a local saint
character_event = {
	id = 73002
	desc = EVTDESC73002
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	religion_group = christian
	
	trigger = {
		OR = {
			NOT = { has_character_flag = event_73002 }
			had_character_flag = { flag = event_73002 days = 1825 }
		}
		in_command_trigger = no
		is_heretic = no
		any_vassal = {
			tier = baron
			is_theocracy = yes
			religion = ROOT
			NOT = {
				has_opinion_modifier = { who = ROOT modifier = ignores_local_saints }
			}
		}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 0.1
			trait = cynical
		}
	}
	
	immediate = { set_character_flag = event_73002 }

	option = {
		name = EVTOPTA73002 # It is for the glory of God!
		trigger = {
			wealth = 25
		}
		wealth = -25
		piety = 10
		if = {
			limit = { any_vassal = { leads_faction = faction_tradition } }
			custom_tooltip = { text = TRADITIONFACTIONMOODPLUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_tradition } set_variable = { which = "faction_mood_increase" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}
	option = {
		name = EVTOPTB73002 # If the Church wants it, the Church pays for it
		random_vassal = {
			limit = {
				tier = baron
				is_theocracy = yes
			}
			opinion = {
				who = ROOT
				modifier = ignores_local_saints
				years = 2
			}
		}
		if = {
			limit = { any_vassal = { leads_faction = faction_tradition } }
			custom_tooltip = { text = TRADITIONFACTIONMOODMINUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_tradition } set_variable = { which = "faction_mood_decrease" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}
}

#The Peasants wants to organise a great carnival and ask for your funding
character_event = {
	id = 73003
	desc = EVTDESC73003
	picture = GFX_evt_emissary
	
	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	religion_group = christian
	
	trigger = {
		OR = {
			NOT = { has_character_flag = event_73003 }
			had_character_flag = { flag = event_73003 days = 1825 }
		}
		war = no
		in_command_trigger = no
		tier = count
		wealth = 50
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 1.5
			trait = kind
		}
	}

	immediate = {
		random_demesne_province = {
			set_province_flag = province_target
		}
		set_character_flag = event_73003
	}

	option = {
		name = EVTOPTA73003 # We are rich, we can support this
		trigger = {
			NOT = { trait = greedy }
			wealth = 25
		}
		wealth = -25
		random_demesne_province = {
			limit = { has_province_flag = province_target }
			if = {
				limit = {
					NOT = { has_province_modifier = province_prosperity_2 }
				}
				random = {
					chance = 33
					#prosperity increase
					prov_prosperity_increase_effect = yes
				}
			}
			clr_province_flag = province_target
		}
	}
	option = {
		name = EVTOPTB73003 # They are just peasants..
		random_demesne_province = {
			limit = { has_province_flag = province_target }
			add_province_modifier = {
				name = peasants_scorned
				duration = 730
			}
			clr_province_flag = province_target
		}
		if = {
			limit = {
				trait = charitable
				wealth = 25
			}
			remove_trait = charitable
		}
	}
}

# A talented artist proposes to paint a portrait of your father
character_event = {
	id = 73004
	desc = EVTDESC73004
	picture = GFX_evt_monk
	
	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	
	trigger = {
		OR = {
			NOT = { has_character_flag = event_73004 }
			had_character_flag = { flag = event_73004 days = 1825 }
		}
		in_command_trigger = no
		father_even_if_dead = {
			is_alive = no
			prestige = 100
		}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 2.0
			trait = ambitious
		}
		modifier = {
			factor = 0.1
			trait = shy
		}
	}
	
	immediate = { set_character_flag = event_73004 }
	
	option = {
		name = EVTOPTA73004 #This will be grand in the main hall
		trigger = {
			scaled_wealth = 0.15
		}
		scaled_wealth = -0.15
		prestige = 10
		if = {
			limit = { any_vassal = { leads_faction = faction_glory } }
			custom_tooltip = { text = GLORYFACTIONMOODPLUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_glory } set_variable = { which = "faction_mood_increase" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}
	option = {
		name = EVTOPTB73004 #This is a waste of money
		any_dynasty_member = {
			limit = {
				NOT = { character = ROOT }
				is_close_relative = ROOT
			}
			opinion = {
				who = ROOT
				modifier = disrespects_dynasty
				months = 120
			}
		}
	}
}

#Luxury clothes are trendy at the moment. What about keeping your courtiers busy by changing the fashion at court?
character_event = {
	id = 73005
	desc = EVTDESC73005
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	
	trigger = {
		OR = {
			NOT = { has_character_flag = event_73005 }
			had_character_flag = { flag = event_73005 days = 1825 }
		}
		in_command_trigger = no
		OR = {
			trait = fair
			trait = ugly
		}
		NOT = {	trait = humble	}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 2.0
			trait = proud
			trait = fair
		}
		modifier = {
			factor = 0.8
			trait = stressed
		}
		modifier = {
			factor = 0.8
			trait = depressed
		}
		modifier = {
			factor = 0.75
			trait = lunatic
		}
		modifier = {
			factor = 0.75
			trait = possessed
		}
		modifier = {
			factor = 0.9
			is_ill = yes
		}
		modifier = {
			factor = 0.8
			trait = pneumonic
		}
		modifier = {
			factor = 0.8
			trait = syphilitic
		}
		modifier = {
			factor = 0.5
			trait = leper
		}
		modifier = {
			factor = 0.9
			trait = wounded
		}
		modifier = {
			factor = 0.8
			is_maimed_trigger = yes
		}
		modifier = {
			factor = 0.5
			trait = infirm
		}
		modifier = {
			factor = 0.4
			trait = incapable
		}
		modifier = {
			factor = 0.5
			trait = drunkard
		}
		modifier = {
			factor = 0.5
			trait = has_tuberculosis
		}
		modifier = {
			factor = 0.5
			trait = has_typhoid_fever
		}
		modifier = {
			factor = 0.5
			trait = has_typhus
		}
		modifier = {
			factor = 0.5
			trait = has_bubonic_plague
		}
		modifier = {
			factor = 0.5
			trait = has_measles
		}
		modifier = {
			factor = 0.5
			trait = has_small_pox
		}
	}

	immediate = { set_character_flag = event_73005 }
	option = {
		name = EVTOPTA73005 #Introduce fashion at the court
		trigger = {
			scaled_wealth = 0.2
		}
		scaled_wealth = -0.2
		prestige = 5
		piety = -5
		any_courtier = {
			limit = {
				is_adult = yes
				prisoner = no
				NOT = { trait = incapable }
			}
			wealth = -5
			prestige = 5
			piety = -5
		}
		if = {
			limit = { any_vassal = { leads_faction = faction_court } }
			custom_tooltip = { text = COURTFACTIONMOODPLUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_court } set_variable = { which = "faction_mood_increase" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}
	option = {
		name = EVTOPTB73005 #There are better ways of spending the taxes
		piety = 10
		if = {
			limit = { any_vassal = { leads_faction = faction_tradition } }
			custom_tooltip = { text = TRADITIONFACTIONMOODPLUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_tradition } set_variable = { which = "faction_mood_increase" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}
}

#Your son has got a servant maid pregnant
character_event = {
	id = 73006
	desc = EVTDESC73006
	picture = GFX_evt_pregnancy
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	
	trigger = {
		OR = {
			NOT = { has_character_flag = event_73006 }
			had_character_flag = { flag = event_73006 days = 1825 }
		}
		any_child = {
			is_married = no
			is_female = no
			liege = { character = ROOT }
			at_location = ROOT
			fertility = 0.33
			is_adult = yes
			NOT = { age = 21 }
			NOT = { demesne_size = 1 }
			NOT = { trait = chaste }
			NOT = { trait = celibate }
			NOT = { trait = eunuch }
			NOT = { is_ascetic_trigger = yes }
		}
	}
	immediate = {
		set_character_flag = event_73006
		random_child = {
			limit = {
				is_married = no
				is_female = no
				liege = { character = ROOT }
				at_location = ROOT
				fertility = 0.33
				is_adult = yes
				NOT = { age = 21 }
				NOT = { demesne_size = 1 }
				NOT = { trait = chaste }
				NOT = { trait = celibate }
				NOT = { trait = eunuch }
				NOT = { is_ascetic_trigger = yes }
			}
			save_event_target_as = knocked_up_maid
		}

	}
	option = {
		name = EVTOPTA73006 #That's my boy
		trigger = {
			NOT = { trait = chaste }
			NOT = { trait = celibate }
			NOT = { trait = eunuch }
		}
		piety = -10
		event_target:knocked_up_maid = {
			opinion = {
				modifier = approves_of_my_behaviour
				who = ROOT
				years = 2
			}
			add_trait = lustful
		}
	}
	option = {
		name = EVTOPTB73006 #Force him to adopt the child to prevent scandal
		piety = 10
		event_target:knocked_up_maid = {
			opinion = {
				modifier = resentful_of_my_behaviour
				who = ROOT
				years = 2
			}
			create_character = {
				age = 0
				trait = bastard
				culture = THIS
				religion = THIS
			}
			new_character = {
				set_father = prev
				dynasty = father
			}
			prestige = -5
		}
	}
	option = {
		name = EVTOPTC73006 #Give him a beating for messing with inferiors
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}
		event_target:knocked_up_maid = {
			opinion = {
				modifier = resentful_of_my_behaviour
				who = ROOT
				years = 2
			}
			add_trait = wroth
			add_trait = ambitious
		}
	}
	option = {
		name = EVTOPTD73006 #Send him to confess his sins
		trigger = {
			OR = {
				religion_group = christian
				religion_group = muslim
			}
		}
		event_target:knocked_up_maid = {
			add_trait = chaste
			piety = -10
		}
	}
}

### Bored wife: Your wife wants latest fashion fad.... ###
character_event = {
	id = 73007
	desc = EVTDESC73007
	picture = GFX_evt_courtiers_talking

	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	only_men = yes
	
	trigger = {
		OR = {
			NOT = { has_character_flag = event_73007 }
			had_character_flag = { flag = event_73007 days = 1825 }
		}
		in_command_trigger = no
		is_married = yes
		spouse = {
			is_abroad_trigger = no
			prisoner = no
			is_alive = yes
			NOT = { trait = shy }
			NOT = { trait = zealous }
			NOT = { demesne_size = 1 }
			opinion = { who = ROOT value = 10 }
		}
		NOT = { trait = zealous }
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 1.25
			spouse = { trait = stressed }
		}
		modifier = {
			factor = 2.0
			spouse = { trait = greedy }
		}
		modifier = {
			factor = 1.5
			spouse = { trait = fair }
		}
		modifier = {
			factor = 2.5
			spouse = { trait = ugly }
		}

	}
	
	immediate = { set_character_flag = event_73007 }
	option = {
		name = EVTOPTA73007 #My money is your money, darling
		trigger = {
			NOT = { trait = greedy }
		}
		if = {
			limit = { spouse = { trait = stressed  } }
			spouse = { remove_trait = stressed  }
		}
		if = {
			limit = {
				NOT = { trait = charitable }
			}
			add_trait = charitable
		}
		character_event = { id = 73005 days = 10 tooltip = EVTTOOLTIP73005 }
	}
	option = {
		name = EVTOPTB73007 #Let's go to the church instead, darling
		trigger = {
			NOT = { trait = cynical }
		}
		if = {
			limit = {
				NOT = { trait = zealous }
			}
			add_trait = zealous
		}
		spouse = {
			if = {
				limit = {
					NOT = { trait = zealous }
				}
				add_trait = zealous
			}
		}

	}
	option = {
		name = EVTOPTC73007 #Shoo, this is my money you're talking about
		if = {
			limit = {
				NOT = { trait = greedy }
			}
			add_trait = greedy
		}
		spouse = {
			opinion = {
				who = ROOT
				modifier = not_feeling_apreciated
				years = 5
			}
		}
	}
}

#A famous herald proposed his service
character_event = {
	id = 73008
	desc = EVTDESC73008
	picture = GFX_evt_emissary
	
	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	ai = no
	
	trigger = {
		capital_scope = { TECH_NOBLE_CUSTOMS = 4 }
		OR = {
			NOT = { has_character_flag = event_73008 }
			had_character_flag = { flag = event_73008 days = 1825 }
		}
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 0.05
			trait = shy
		}
		modifier = {
			factor = 1.25
			trait = gregarious
		}
	}
	
	immediate = { set_character_flag = event_73008 }
	option = {
		trigger = {
			scaled_wealth = 0.1
		}
		name = EVTOPTA73008 #Hire him.
		create_random_diplomat = {
			random_traits = yes
			dynasty = random
			female = no
			culture = ROOT
			religion = ROOT
		}
		scaled_wealth = -0.1
	}
	option = {
		name = EVTOPTB73008 #Not interested
		prestige = -5
	}

}

# A destitute noble FROM a former enemy court ask for permanent hospitality
character_event = {
	id = 73009
	desc = EVTDESC73009
	picture = GFX_evt_emissary
	
	is_triggered_only = yes
	
	min_age = 16
	only_playable = yes
	prisoner = no
	war = yes
	
	trigger = {
		OR = {
			NOT = { has_character_flag = event_73009 }
			had_character_flag = { flag = event_73009 days = 1825 }
		}
		any_current_enemy = {
			culture = ROOT
		}
	}

	weight_multiplier = {
		days = 1
		modifier = {
			factor = 1.5
			trait = kind
		}
		modifier = {
			factor = 0.2
			trait = cruel
		}
		modifier = {
			factor = 0.2
			trait = arbitrary
		}
		modifier = {
			factor = 0.8
			trait = stressed
		}
		modifier = {
			factor = 0.8
			trait = depressed
		}
		modifier = {
			factor = 0.75
			trait = lunatic
		}
		modifier = {
			factor = 0.75
			trait = possessed
		}
		modifier = {
			factor = 0.9
			is_ill = yes
		}
		modifier = {
			factor = 0.8
			trait = pneumonic
		}
		modifier = {
			factor = 0.8
			trait = syphilitic
		}
		modifier = {
			factor = 0.5
			trait = leper
		}
		modifier = {
			factor = 0.9
			trait = wounded
		}
		modifier = {
			factor = 0.8
			is_maimed_trigger = yes
		}
		modifier = {
			factor = 0.5
			trait = infirm
		}
		modifier = {
			factor = 0.4
			trait = incapable
		}
		modifier = {
			factor = 0.5
			trait = drunkard
		}
		modifier = {
			factor = 0.5
			trait = has_tuberculosis
		}
		modifier = {
			factor = 0.5
			trait = has_typhoid_fever
		}
		modifier = {
			factor = 0.5
			trait = has_typhus
		}
		modifier = {
			factor = 0.5
			trait = has_bubonic_plague
		}
		modifier = {
			factor = 0.5
			trait = has_measles
		}
		modifier = {
			factor = 0.5
			trait = has_small_pox
		}
	}

	immediate = { set_character_flag = event_73009 }
	option = {
		name = EVTOPTA73009  #Welcome him to your court
		trigger = {
			scaled_wealth = 0.2
		}
		scaled_wealth = -0.2
		create_random_soldier = {
			random_traits = yes
			dynasty = random
			female = no
			culture = ROOT
			religion = ROOT
		}
		new_character = {
			ROOT = {
				random_current_enemy = {
					limit = {
						culture = ROOT
					}
					random_demesne_title = {
						limit = {
							OR = {
								AND = {
									tier = baron
									is_capital = no
								}
								tier = count
							}
						}
						add_claim = prevprevprev
					}
				}
			}
		}
	}
	option = {
		name = EVTOPTB73009 #Tell him he can only stay for the night
		piety = 15
	}

}

#I've been readin 'Ars Moriendi', and it claims that death is not something to be afraid of.
character_event = {
	id = 73010
	desc = EVTDESC73010
	picture = GFX_evt_library
	
	min_age = 55
	only_playable = yes
	prisoner = no
	capable_only = yes
	religion_group = christian
	
	is_triggered_only = yes
	
	trigger = {
		year = 1415
		OR = {
			religion = catholic
			religion = cathar
			religion = fraticelli
			religion = waldensian
			religion = lollard
			religion = adoptionist
		}
		NOT = { has_character_flag = ars_moriendi }
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 1.5
			age = 58
		}
		modifier = {
			factor = 2.0
			age = 62
		}
		modifier = {
			factor = 100.0
			age = 65
		}
		modifier = {
			factor = 5.0
			trait = zealous
		}
		
		
		modifier = {
			factor = 1.25
			trait = stressed
		}
		modifier = {
			factor = 1.25
			trait = depressed
		}
		modifier = {
			factor = 1.5
			trait = lunatic
		}
		modifier = {
			factor = 1.5
			trait = possessed
		}
		modifier = {
			factor = 1.1
			is_ill = yes
		}
		modifier = {
			factor = 1.25
			trait = pneumonic
		}
		modifier = {
			factor = 1.25
			trait = syphilitic
		}
		modifier = {
			factor = 2.0
			trait = leper
		}
		modifier = {
			factor = 1.15
			trait = wounded
		}
		modifier = {
			factor = 1.25
			is_maimed_trigger = yes
		}
		modifier = {
			factor = 2.0
			trait = infirm
		}
		modifier = {
			factor = 3.0
			trait = incapable
		}
		modifier = {
			factor = 1.1
			trait = drunkard
		}
		modifier = {
			factor = 1.1
			trait = has_tuberculosis
		}
		modifier = {
			factor = 1.1
			trait = has_typhoid_fever
		}
		modifier = {
			factor = 1.5
			trait = has_typhus
		}
		modifier = {
			factor = 1.5
			trait = has_bubonic_plague
		}
		modifier = {
			factor = 1.1
			trait = has_measles
		}
		modifier = {
			factor = 1.1
			trait = has_small_pox
		}
	}
	
	immediate = {
		set_character_flag = ars_moriendi
	}
	
	option = {
		name = EVTOPTA73011 #I am avoiding tempration.
		trigger = {
			NOT = { trait = cynical }
			NOT = { trait = lustful }
			NOT = { trait = gluttonous }
			NOT = { trait = greedy }
			NOT = { trait = slothful }
			NOT = { trait = envious }
			NOT = { trait = wroth }
			NOT = { trait = proud }

		}
		health = -1
		piety = 100
	}
	option = {
		name = EVTOPTB73011 #Forgive me father, for I have sinned.
		trigger = {
			NOT = { trait = cynical }
			OR = {
				trait = lustful
				trait = gluttonous
				trait = greedy
				trait = slothful
				trait = envious
				trait = wroth
				trait = proud
			}
		}
		if = {
			limit = {
				trait = lustful
			}
			remove_trait = lustful
			piety = -20
		}
		if = {
			limit = {
				trait = gluttonous
			}
			remove_trait = gluttonous
			piety = -20
		}
		if = {
			limit = {
				trait = greedy
			}
			remove_trait = greedy
			piety = -20
		}
		if = {
			limit = {
				trait = slothful
			}
			remove_trait = slothful
			piety = -20
		}
		if = {
			limit = {
				trait = envious
			}
			remove_trait = envious
			piety = -20
		}
		if = {
			limit = {
				trait = wroth
			}
			remove_trait = wroth
			piety = -20
		}
		if = {
			limit = {
				trait = proud
			}
			remove_trait = proud
			piety = -20
		}
	}
	option = {
		name = EVTOPTC73011 	#I do not fear death...
		tooltip_info = cynical
		trigger = {
			trait = cynical
			NOT = { trait = craven }
		}
		piety = -5
		prestige = 5
		health = -2
	}
	option = {
		name = EVTOPTD73011 #I am just a poor sinner..
		piety = -10
		health = -2
	}
}



#####################################
# Ask for a job if I am good!
#####################################


# MARSHAL
character_event = {
	id = 73200
	desc = EVTDESC73200	#I want to be marshal, I am better...
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_war
	
	capable_only = yes
	prisoner = no
	min_age = 16
	lacks_dlc = "Zeus"

	trigger = {
		has_ambition = obj_become_marshal
		war = no
		independent = no
		is_councillor = no
		can_be_marshal_trigger = yes
		liege = {
			job_marshal = {
				same_liege = ROOT
				NOT = { martial = ROOT }
				NOT = { has_minor_title = title_regent }
			}
			primary_title = { NOT = { has_law = council_privileges_1 } }
			religion_group = ROOT
			NOR = {
				character = ROOT
				any_spouse = { character = ROOT }
				any_demesne_title = { temporary = yes }
				has_opinion_modifier = { who = ROOT modifier = requested_council_position }
			}
		}
		OR = {
			NOT = { has_character_flag = asked_for_job }
			liege = { ai = yes }
		}
		liege = {
			NOR = {
				has_character_flag = no_council_requests
				has_character_flag = asked_marshal_petition
				has_character_flag = lifetime_appointments
				reverse_has_opinion_modifier = { who = ROOT modifier = opinion_fired_from_council }
			}
		}
		NOR = {
			has_character_modifier = planning_claimant_adventure
			has_character_flag = ask_not_council
		}
	}
	
	mean_time_to_happen = {
		months = 12
		modifier = {
			factor = 0.25
			trait = ambitious
		}
	}
	
	immediate = {
		set_character_flag = asked_for_job
		liege = {  set_character_flag = asked_marshal_petition }
	}
	
	option = {
		name = EVTOPTA73200
		liege = { letter_event = { id = 73201 tooltip = EVTTOOLTIP73201 } }
	}
	option = {
		name = EVTOPTB73200
		trigger = {
			ai = no
		}
		set_character_flag = ask_not_council
	}
}

#Someone wants to be my marshal
letter_event = {
	id = 73201
	desc = EVTDESC73201
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA73201
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_marshal = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
				FROM = { NOT = { among_most_powerful_vassals = 5 } }
			}
		}
		job_marshal = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_marshal
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_marshal
		}
		clr_character_flag = asked_marshal_petition
	}
	option = {
		name = EVTOPTB73201
		trigger = {
			job_marshal = {
				NOT = { trait = stressed }
				NOT = { trait = depressed }
			}
		}
		ai_chance = {
			factor = 0
		}
		job_marshal = {
			letter_event = { id = 73202 tooltip = EVTTOOLTIP73202 }
		}
		hidden_tooltip = { FROM  = { character_event = { id = 73203 days = 128 random = 63  }	} }
	}
	option = {
		name = EVTOPTC73201
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_marshal = {
					OR = {
						NOT = { among_most_powerful_vassals = 5 }
						NOT = { opinion = { who = ROOT value = -10 } }
					}
				}
				FROM = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
			}
			modifier = {
				factor = 0
				NOT = { has_dlc = "Zeus" }
			}
		}
		FROM = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_marshal_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		ai_chance = {
			factor = 0
		}
		FROM = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_marshal_petition
		set_character_flag = no_council_requests
	}
}

#I am being replaced...
letter_event = {
	id = 73202
	desc = EVTDESC73202

	is_triggered_only = yes

	trigger = {
		has_job_title = job_marshal
	}

	option = {
		name = EVTOPTA73202
		random_list = {
			50 = { change_martial = 1 }
			50 = { 
				modifier = {
					factor = 0
					trait = stressed
				}
				modifier = {
					factor = 0
					trait = depressed
				}
				add_trait = stressed 
				hidden_tooltip = { character_event = { id = 38282 }} 
			}
		}
	}
	
	option = {
		name = EVTOPTB73202
		trigger = {
			NOT = { trait = ambitious }
			NOT = { trait = proud }
		}
		prestige = -5
	}
}

#Ask again
character_event = {
	id = 73203
	desc = EVTDESC73203
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_war
	
	prisoner = no
	capable_only = yes
	
	is_triggered_only = yes

	trigger = {
		liege = { NOT = { has_character_flag = lifetime_appointments } }
		liege = { primary_title = { NOT = { has_law = council_privileges_1 } } }
		is_councillor = no
		NOT = { liege = { spouse = { character = ROOT } } }
		NOT = { has_job_title = job_marshal }
		liege = {
			NOT = { character = ROOT }
			job_marshal = {
				same_liege = ROOT
				NOT = { martial = ROOT }
				NOT = { has_minor_title = title_regent }
			}
		}
		can_be_marshal_trigger = yes
	}

	option = {
		name = EVTOPTA73203
		liege = { letter_event = { id = 73204 tooltip = EVTTOOLTIP73204 } }
	}
}

#Asking again...
letter_event = {
	id = 73204
	desc = EVTDESC73204
	border = GFX_event_letter_frame_war
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA73204
		job_marshal = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_marshal
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_marshal
		}
		clr_character_flag = asked_marshal_petition
	}
	option = {
		name = EVTOPTC73204
		from = {
			prestige = -10
		}
		from = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_marshal_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		from = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_marshal_petition
		set_character_flag = no_council_requests
	}
}

# Spymaster
character_event = {
	id = 73210
	desc = EVTDESC73210	#I want to be spymaster, I am better...
	picture = GFX_evt_spymaster
	border = GFX_event_normal_frame_intrigue
	
	only_men = yes
	min_age = 16
	capable_only = yes
	prisoner = no
	lacks_dlc = "Zeus"

	trigger = {
		has_ambition = obj_become_spymaster
		war = no
		independent = no
		is_councillor = no
		can_be_spymaster_trigger = yes
		liege = {
			job_spymaster = {
				same_liege = ROOT
				NOT = { intrigue = ROOT }
				NOT = { has_minor_title = title_regent }
			}
			religion_group = ROOT
			NOR = {
				character = ROOT
				any_spouse = { character = ROOT }
				primary_title = { has_law = council_privileges_1 }
				any_demesne_title = { temporary = yes }
				has_opinion_modifier = { who = ROOT modifier = requested_council_position }
			}
		}
		OR = {
			NOT = { has_character_flag = asked_for_job }
			liege = { ai = yes }
		}
		liege = {
			NOR = {
				has_character_flag = asked_spymaster_petition
				has_character_flag = no_council_requests
				has_character_flag = lifetime_appointments
				reverse_has_opinion_modifier = { who = ROOT modifier = opinion_fired_from_council }
			}
		}
		NOR = {
			has_character_modifier = planning_claimant_adventure
			has_character_flag = ask_not_council
		}
	}
	
	mean_time_to_happen = {
		months = 12
		modifier = {
			factor = 0.25
			trait = ambitious
		}
	}
	immediate = {
		set_character_flag = asked_for_job
		liege = {  set_character_flag = asked_spymaster_petition }
	}
	
	option = {
		name = EVTOPTA73210
		liege = { letter_event = { id = 73211 tooltip = EVTTOOLTIP73211 } }
	}
	option = {
		name = EVTOPTB73200
		trigger = {
			ai = no
		}
		set_character_flag = ask_not_council
	}
}

#Someone wants to be my spymaster
letter_event = {
	id = 73211
	desc = EVTDESC73211
	
	prisoner = no
	capable_only = yes
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA73211
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_spymaster = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
				FROM = { NOT = { among_most_powerful_vassals = 5 } }
			}
		}
		job_spymaster = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_spymaster
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_spymaster
		}
		clr_character_flag = asked_spymaster_petition
	}
	option = {
		name = EVTOPTB73211 
		trigger = {
			job_spymaster = {
				NOT = { trait = stressed }
				NOT = { trait = depressed }
			}
		}
		ai_chance = {
			factor = 0
		}
		job_spymaster = {
			letter_event = { id = 73212 tooltip = EVTTOOLTIP73212 }
		}
		hidden_tooltip = { FROM  = { character_event = { id = 73213 days = 128 random = 63  }	} }
	}
	option = {
		name = EVTOPTC73211
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_spymaster = {
					OR = {
						NOT = { among_most_powerful_vassals = 5 }
						NOT = { opinion = { who = ROOT value = -10 } }
					}
				}
				FROM = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
			}
			modifier = {
				factor = 0
				NOT = { has_dlc = "Zeus" }
			}
		}
		FROM = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_spymaster_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		ai_chance = {
			factor = 0
		}
		from = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_spymaster_petition
		set_character_flag = no_council_requests
	}
}

#I am being replaced...
letter_event = {
	id = 73212
	desc = EVTDESC73212
	
	prisoner = no
	capable_only = yes
	
	is_triggered_only = yes

	trigger = {
		has_job_title = job_spymaster
	}

	option = {
		name = EVTOPTA73212
		random_list = {
			50 = { change_intrigue = 1 }
			50 = { 
				modifier = {
					factor = 0
					trait = stressed
				}
				modifier = {
					factor = 0
					trait = depressed
				}
				add_trait = stressed 
				hidden_tooltip = { character_event = { id = 38282 }} 
			}
		}
	}
	option = {
		name = EVTOPTB73212 
		trigger = {
			NOT = { trait = ambitious }
			NOT = { trait = proud }
		}
		prestige = -5
	}
}

#Ask again
character_event = {
	id = 73213
	desc = EVTDESC73213
	picture = GFX_evt_spymaster
	
	prisoner = no
	capable_only = yes
	
	is_triggered_only = yes

	trigger = {
		liege = { NOT = { has_character_flag = lifetime_appointments } }
		liege = { primary_title = { NOT = { has_law = council_privileges_1 } } }
		NOT = { liege = { spouse = { character = ROOT } } }
		NOT = { has_job_title = job_spymaster }
		is_councillor = no
		can_be_spymaster_trigger = yes
		liege = {
			NOT = { character = ROOT }
			job_spymaster = {
				same_liege = ROOT
				NOT = { intrigue = ROOT }
				NOT = { has_minor_title = title_regent }
			}
		}
	}

	option = {
		name = EVTOPTA73213
		liege = { letter_event = { id = 73214 tooltip = EVTTOOLTIP73214 } }
	}
}

#Asking again...
letter_event = {
	id = 73214
	desc = EVTDESC73214
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA73214
		job_spymaster = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_spymaster
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_spymaster
		}
		clr_character_flag = asked_spymaster_petition
	}
	option = {
		name = EVTOPTC73214
		from = {
			prestige = -10
		}
		from = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_spymaster_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		from = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_spymaster_petition
		set_character_flag = no_council_requests
	}
}

#Treasurer
character_event = {
	id = 73220
	desc = EVTDESC73220	#I want to be treasurer, I am better...
	picture = GFX_evt_spymaster

	capable_only = yes
	prisoner = no
	min_age = 16
	lacks_dlc = "Zeus"

	trigger = {
		has_ambition = obj_become_treasurer
		war = no
		independent = no
		is_councillor = no
		can_be_treasurer_trigger = yes
		liege = {
			religion_group = ROOT
			job_treasurer = {
				same_liege = ROOT
				NOT = { stewardship = ROOT }
				NOT = { has_minor_title = title_regent }
			}
			NOR = {
				character = ROOT
				any_spouse = { character = ROOT }
				primary_title = { has_law = council_privileges_1 }
				any_demesne_title = { temporary = yes }
				has_opinion_modifier = { who = ROOT modifier = requested_council_position }
			}
		}
		OR = {
			NOT = { has_character_flag = asked_for_job }
			liege = { ai = yes }
		}
		liege = {
			NOR = {
				has_character_flag = asked_treasurer_petition
				has_character_flag = no_council_requests
				has_character_flag = lifetime_appointments
				reverse_has_opinion_modifier = { who = ROOT modifier = opinion_fired_from_council }
			}
		}
		NOR = {
			has_character_modifier = planning_claimant_adventure
			has_character_flag = ask_not_council
		}
	}

	mean_time_to_happen = {
		months = 12
		modifier = {
			factor = 0.25
			trait = ambitious
		}
	}
	immediate = {
		set_character_flag = asked_for_job
		liege = {  set_character_flag = asked_treasurer_petition }
	}
	
	option = {
		name = EVTOPTA73220
		liege = { letter_event = { id = 73221 tooltip = EVTTOOLTIP73221 } }
	}
	option = {
		name = EVTOPTB73200
		trigger = {
			ai = no
		}
		set_character_flag = ask_not_council
	}
}

#Someone wants to be my treasurer
letter_event = {
	id = 73221
	desc = EVTDESC73221
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA73221
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_treasurer = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
				FROM = { NOT = { among_most_powerful_vassals = 5 } }
			}
		}
		job_treasurer = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_treasurer
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_treasurer
		}
		clr_character_flag = asked_treasurer_petition		
	}
	option = {
		name = EVTOPTB73221 
		trigger = {
			job_treasurer = {
				NOT = { trait = stressed }
				NOT = { trait = depressed }
			}
		}
		ai_chance = {
			factor = 0
		}
		job_treasurer = {
			letter_event = { id = 73222 tooltip = EVTTOOLTIP73222 }
		}
		hidden_tooltip = { FROM  = { character_event = { id = 73223 days = 128 random = 63  }	} }
	}
	option = {
		name = EVTOPTC73221
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_treasurer = {
					OR = {
						NOT = { among_most_powerful_vassals = 5 }
						NOT = { opinion = { who = ROOT value = -10 } }
					}
				}
				FROM = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
			}
			modifier = {
				factor = 0
				NOT = { has_dlc = "Zeus" }
			}
		}
		from = {
			prestige = -10
		}
		from = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_treasurer_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		ai_chance = {
			factor = 0
		}
		from = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_treasurer_petition
		set_character_flag = no_council_requests
	}
}

#I am being replaced...
letter_event = {
	id = 73222
	desc = EVTDESC73222
	
	is_triggered_only = yes

	trigger = {
		has_job_title = job_treasurer
	}

	option = {
		name = EVTOPTA73222
		random_list = {
			50 = { change_stewardship = 1 }
			50 = { 
				modifier = {
					factor = 0
					trait = stressed
				}
				modifier = {
					factor = 0
					trait = depressed
				}
				add_trait = stressed 
				hidden_tooltip = { character_event = { id = 38282 }} 
			}
		}
	}
	option = {
		name = EVTOPTB73222
		trigger = {
			NOT = { trait = ambitious }
			NOT = { trait = proud }
		}
		prestige = -5
	}
}

#Ask again
character_event = {
	id = 73223
	desc = EVTDESC73223
	picture = GFX_evt_spymaster
	
	prisoner = no
	capable_only = yes
	
	is_triggered_only = yes

	trigger = {
		liege = { NOT = { has_character_flag = lifetime_appointments } }
		liege = { primary_title = { NOT = { has_law = council_privileges_1 } } }
		NOT = { liege = { spouse = { character = ROOT } } }
		NOT = { has_job_title = job_treasurer }
		can_be_treasurer_trigger = yes
		is_councillor = no
		independent = no
		liege = {
			NOT = { character = ROOT }
			job_treasurer = {
				same_liege = ROOT
				NOT = { stewardship = ROOT }
				NOT = { has_minor_title = title_regent }
			}
		}
		prisoner = no
	}

	option = {
		name = EVTOPTA73223
		liege = { letter_event = { id = 73224 tooltip = EVTTOOLTIP73224 } }
	}
}

#Asking again...
letter_event = {
	id = 73224
	desc = EVTDESC73224
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA73224
		job_treasurer = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_treasurer
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_treasurer
		}
		clr_character_flag = asked_treasurer_petition

	}
	option = {
		name = EVTOPTC73224
		from = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_treasurer_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		from = {
			prestige = -10
		}
		from = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_treasurer_petition
		set_character_flag = no_council_requests
	}
}

# Lord Spiritual
character_event = {
	id = 73230
	desc = EVTDESC73230	#I want to be lord_spiritual, I am better...
	picture = GFX_evt_spymaster

	capable_only = yes
	prisoner = no
	lacks_dlc = "Zeus"
	min_age = 16

	trigger = {
		has_ambition = obj_become_spiritual
		war = no
		independent = no
		is_councillor = no
		OR = {
			trait = detached_priest
			trait = martial_cleric
			trait = scholarly_theologian
			trait = mastermind_theologian
		}
		liege = {
			religion = ROOT
			job_spiritual = {
				same_liege = ROOT
				NOT = { learning = ROOT }
				NOT = { has_minor_title = title_regent }
			}
			NOR = {
				character = ROOT
				any_spouse = { character = ROOT }
				primary_title = { has_law = council_privileges_1 }
				any_demesne_title = { temporary = yes }
				has_opinion_modifier = { who = ROOT modifier = requested_council_position }
			}
		}
		can_be_spiritual_trigger = yes
		OR = {
			learning = 10
			has_ambition = obj_become_spiritual
		}
		OR = {
			NOT = { has_character_flag = asked_for_job }
			liege = { ai = yes }
		}
		liege = {
			religion = ROOT
			NOR = {
				has_character_flag = lifetime_appointments
				has_character_flag = no_council_requests
				has_character_flag = asked_lord_spiritual_petition
				reverse_has_opinion_modifier = { who = ROOT modifier = opinion_fired_from_council }
			}
		}
		NOR = {
			has_character_modifier = planning_claimant_adventure
			has_character_flag = ask_not_council
		}
	}
	
	mean_time_to_happen = {
		months = 12
		modifier = {
			factor = 0.25
			trait = ambitious
		}
	}
	immediate = {
		set_character_flag = asked_for_job
		liege = {  set_character_flag = asked_lord_spiritual_petition }
	}
	
	option = {
		name = EVTOPTA73230
		liege = { letter_event = { id = 73231 tooltip = EVTTOOLTIP73231 } }
	}
	option = {
		name = EVTOPTB73200
		trigger = {
			ai = no
		}
		set_character_flag = ask_not_council
	}
}

#Someone wants to be my Lord Spiritual
letter_event = {
	id = 73231
	desc = EVTDESC73231
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA73231
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_spiritual = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
				FROM = { NOT = { among_most_powerful_vassals = 5 } }
			}
		}
		job_spiritual = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_spiritual
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_spiritual
		}
		clr_character_flag = asked_lord_spiritual_petition
		
	}
	option = {
		name = EVTOPTB73231
		trigger = {
			job_spiritual = {
				NOT = { trait = stressed }
				NOT = { trait = depressed }
			}
		}
		ai_chance = {
			factor = 0
		}
		job_spiritual = {
			letter_event = { id = 73232 tooltip = EVTTOOLTIP73232 }
		}
		hidden_tooltip = { FROM  = { character_event = { id = 73233 days = 128 random = 63  }	} }
	}
	option = {
		name = EVTOPTC73231
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_spiritual = {
					OR = {
						NOT = { among_most_powerful_vassals = 5 }
						NOT = { opinion = { who = ROOT value = -10 } }
					}
				}
				FROM = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
			}
			modifier = {
				factor = 0
				NOT = { has_dlc = "Zeus" }
			}
		}
		from = {
			prestige = -10
		}
		from = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_lord_spiritual_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		ai_chance = {
			factor = 0
		}
		from = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_lord_spiritual_petition
		set_character_flag = no_council_requests
	}
}

#I am being replaced...
letter_event = {
	id = 73232
	desc = EVTDESC73232
	
	is_triggered_only = yes

	trigger = {
		has_job_title = job_spiritual
	}

	option = {
		name = EVTOPTA73232
		random_list = {
			50 = { change_learning = 1 }
			50 = { 
				modifier = {
					factor = 0
					trait = stressed
				}
				modifier = {
					factor = 0
					trait = depressed
				}
				add_trait = stressed 
				hidden_tooltip = { character_event = { id = 38282 }} 
			}
		}
	}
	option = {
		name = EVTOPTB73232
		trigger = {
			NOT = { trait = ambitious }
			NOT = { trait = proud }
		}
		prestige = -5
	}
}

#Ask again
character_event = {
	id = 73233
	desc = EVTDESC73233
	picture = GFX_evt_spymaster
	
	prisoner = no
	capable_only = yes
	
	is_triggered_only = yes
	
	trigger = {
		liege = { NOT = { has_character_flag = lifetime_appointments } }
		liege = { primary_title = { NOT = { has_law = council_privileges_1 } } }
		NOT = { liege = { spouse = { character = ROOT } } }
		can_be_spiritual_trigger = yes
		independent = no
		is_councillor = no
		liege = {
			NOT = { character = ROOT }
			job_spiritual = {
				same_liege = ROOT
				NOT = { learning = ROOT }
				NOT = { has_minor_title = title_regent }
			}
		}
		prisoner = no
	}

	option = {
		name = EVTOPTA73233
		liege = { letter_event = { id = 73234 tooltip = EVTTOOLTIP73234 } }
	}
}

#Asking again...
letter_event = {
	id = 73234
	desc = EVTDESC73234

	is_triggered_only = yes
	

	option = {
		name = EVTOPTA73234
		job_spiritual = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_spiritual
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_spiritual
		}
		clr_character_flag = asked_lord_spiritual_petition

	}
	option = {
		name = EVTOPTC73234
		from = {
			prestige = -10
		}
		from = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_lord_spiritual_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		from = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_lord_spiritual_petition
		set_character_flag = no_council_requests
	}
}

# Chancellor
character_event = {
	id = 73240
	desc = EVTDESC73240	#I want to be Chancellor, I am better...
	picture = GFX_evt_spymaster
	
	capable_only = yes
	prisoner = no
	lacks_dlc = "Zeus"
	min_age = 16
	only_men = yes

	trigger = {
		has_ambition = obj_become_chancellor
		war = no
		independent = no
		is_councillor = no
		can_be_chancellor_trigger = yes
		liege = {
			job_chancellor = {
				same_liege = ROOT
				NOT = { diplomacy = ROOT }
				NOT = { has_minor_title = title_regent }
			}
			religion_group = ROOT
			NOR = {
				character = ROOT
				any_spouse = { character = ROOT }
				primary_title = { has_law = council_privileges_1 }
				any_demesne_title = { temporary = yes }
				has_opinion_modifier = { who = ROOT modifier = requested_council_position }
			}
		}
		OR = {
			NOT = { has_character_flag = asked_for_job }
			liege = { ai = yes }
		}
		liege = {
			NOR = {
				has_character_flag = asked_chancellor_petition
				has_character_flag = no_council_requests
				has_character_flag = lifetime_appointments
			}
		}
		NOR = {
			has_character_modifier = planning_claimant_adventure
			has_character_flag = ask_not_council
			has_opinion_modifier = { who = ROOT modifier = opinion_fired_from_council }
		}
	}
	
	mean_time_to_happen = {
		months = 12
		modifier = {
			factor = 0.25
			trait = ambitious
		}
	}
	immediate = {
		set_character_flag = asked_for_job
		liege = {  set_character_flag = asked_chancellor_petition }
	}
	
	option = {
		name = EVTOPTA73240
		liege = { letter_event = { id = 73241 tooltip = EVTTOOLTIP73241 } }
	}
	option = {
		name = EVTOPTB73200
		trigger = {
			ai = no
		}
		set_character_flag = ask_not_council
	}
}

#Someone wants to be my Chancellor
letter_event = {
	id = 73241
	desc = EVTDESC73241
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA73241
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_chancellor = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
				FROM = { NOT = { among_most_powerful_vassals = 5 } }
			}
		}
		job_chancellor = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_chancellor
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_chancellor
		}
		clr_character_flag = asked_chancellor_petition
		
	}
	option = {
		name = EVTOPTB73241
		trigger = {
			job_chancellor = {
				NOT = { trait = stressed }
				NOT = { trait = depressed }
			}
		}
		ai_chance = {
			factor = 0
		}
		job_chancellor = {
			letter_event = { id = 73242 tooltip = EVTTOOLTIP73242 }
		}
		hidden_tooltip = { FROM  = { character_event = { id = 73243 days = 128 random = 63  }	} }
	}
	option = {
		name = EVTOPTC73241
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_dlc = "Zeus"
				job_chancellor = {
					OR = {
						NOT = { among_most_powerful_vassals = 5 }
						NOT = { opinion = { who = ROOT value = -10 } }
					}
				}
				FROM = {
					among_most_powerful_vassals = 5
					opinion = { who = ROOT value = -10 }
				}
			}
			modifier = {
				factor = 0
				NOT = { has_dlc = "Zeus" }
			}
		}
		from = {
			prestige = -10
		}
		from = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_chancellor_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		from = {
			prestige = -10
		}
		ai_chance = {
			factor = 0
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_chancellor_petition
		set_character_flag = no_council_requests
	}
}

#I am being replaced...
letter_event = {
	id = 73242
	desc = EVTDESC73242
	
	is_triggered_only = yes

	trigger = {
		has_job_title = job_chancellor
	}

	option = {
		name = EVTOPTA73242
		random_list = {
			50 = { change_diplomacy = 1 }
			50 = { 
				modifier = {
					factor = 0
					trait = stressed
				}
				modifier = {
					factor = 0
					trait = depressed
				}
				add_trait = stressed 
				hidden_tooltip = { character_event = { id = 38282 }} 
			}
		}
	}
	option = {
		name = EVTOPTB73242
		trigger = {
			NOT = { trait = ambitious }
			NOT = { trait = proud }
		}
		prestige = -5
	}
}

#Ask again
character_event = {
	id = 73243
	desc = EVTDESC73243
	picture = GFX_evt_spymaster
	
	prisoner = no
	capable_only = yes
	
	is_triggered_only = yes

	trigger = {
		liege = { NOT = { has_character_flag = lifetime_appointments } }
		liege = { primary_title = { NOT = { has_law = council_privileges_1 } } }
		NOT = { liege = { spouse = { character = ROOT } } }
		independent = no
		is_councillor = no
		can_be_chancellor_trigger = yes
		liege = {
			NOT = { character = ROOT }
			job_chancellor = {
				same_liege = ROOT
				NOT = { diplomacy = ROOT }
				NOT = { has_minor_title = title_regent }
			}
		}
		prisoner = no
	}
	
	option = {
		name = EVTOPTA73243
		liege = { letter_event = { id = 73244 tooltip = EVTTOOLTIP73244 } }
	}
}

#Asking again...
letter_event = {
	id = 73244
	desc = EVTDESC73244
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA73244
		job_chancellor = {
			opinion = {
				modifier = opinion_fired_from_council
				who = ROOT
				years = 10
			}
			remove_title = job_chancellor
		}
		FROM = {
			clr_character_flag = asked_for_job
			remove_opinion = { who = ROOT modifier = opinion_fired_from_council }
			give_job_title = job_chancellor
		}
		clr_character_flag = asked_chancellor_petition

	}
	option = {
		name = EVTOPTC73244
		from = {
			prestige = -10
		}
		from = {
			opinion = {
				who = root
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_chancellor_petition
	}
	option = {
		name = EVTNOCOUNCILREQUESTS
		from = {
			prestige = -10
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_refused_council
			}
		}
		clr_character_flag = asked_chancellor_petition
		set_character_flag = no_council_requests
	}
}

