
###########################################
#                                         #
# SoA minor religious events              #
#                                         #
# ID SoA.5200-SoA.5399                    #
#                                         #
###########################################

# Written by Tobias Bodlund

namespace = SoA

###########################################
#                                         #
# Relics - ID SoA.5200-SoA.5209           #
#                                         #
###########################################


# Plunders relic in war
character_event = {
	id = SoA.5200
	desc = EVTDESC_SoA_5200
	picture = GFX_evt_large_army
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_unit_entering_province, random_events, plunder_fingerbone

	only_playable = yes
	religion_group = christian
	war = yes
	has_dlc = "Sons of Abraham"

	trigger = {
		is_landed = yes

		NOR = {
			religion = waldensian
			has_artifact = finger_of_st_john
		}
	}

	option = {
		name = EVTOPTA_SoA_5200

		add_artifact = finger_of_st_john

		new_artifact = {
			set_creation_date = -1.1.1
		}

		piety = 10
	}

	option = {
		name = EVTOPTB_SoA_5200

		add_trait_fully_silently_charitable_effect = yes
		piety = 10
	}
}

# Buys relic at market
character_event = {
	id = SoA.5201
	desc = EVTDESC_SoA_5201
	picture = GFX_evt_market
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, fingerbone

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		wealth >= 20
		NOR = {
			has_artifact = finger_of_st_john
			religion = waldensian
		}
	}

	option = {
		name = EVTOPTA_SoA_5201

		wealth = -10
		add_artifact = finger_of_st_john

		new_artifact = {
			set_creation_date = -1.1.1
		}

		piety = 10
	}

	option = {
		name = EVTOPTB_SoA_5201

		random = {
			chance = 20
			add_trait_fully_cynical_effect = yes
		}
	}
}

# Given relic by priest who feels he cannot protect it at his little church
character_event = {
	id = SoA.5202
	desc = EVTDESC_SoA_5202
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, fingerbone

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		NOR = {
			has_artifact = finger_of_st_john
			religion = waldensian
		}
	}

	option = {
		name = EVTOPTA_SoA_5202

		add_artifact = finger_of_st_john

		new_artifact = {
			set_creation_date = -1.1.1
		}

		piety = 10
	}
}

# Misplaced relic
character_event = {
	id = SoA.5203
	desc = EVTDESC_SoA_5203
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, fingerbone

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		OR = {
			is_dumb_trigger = yes
			trait = slothful
		}

		has_artifact = finger_of_st_john
		NOT = { religion = waldensian }
	}

	option = {
		name = EVTOPTA_SoA_5203

		destroy_artifact = finger_of_st_john
	}
}

# Relic is stolen by raiders - Setup
character_event = {
	id = SoA.5220

	is_triggered_only = yes # on_siege_over_winner, random_events, fingerbone_stolen
	hide_window = yes

	has_dlc = "Sons of Abraham"

	trigger = {
		FROM = {
			owner = {
				religion_group = christian
				has_artifact = finger_of_st_john
			}
		}
	}

	immediate = {
		FROM = {
			owner = {
				character_event = { id = SoA.5204 }
			}
		}
	}
}

# Relic is stolen by raiders
character_event = {
	id = SoA.5204
	desc = EVTDESC_SoA_5204
	picture = GFX_evt_burning_house
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		is_landed = yes

		NOT = {
			any_demesne_province = {
				controlled_by = ROOT
				owned_by = PREV
			}
		}
	}

	option = {
		name = EVTOPTA_SoA_5204

		destroy_artifact = finger_of_st_john
	}
}

# Relic mixed up with other bones
character_event = {
	id = SoA.5205
	desc = EVTDESC_SoA_5205
	picture = GFX_evt_son_asking_father
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, fingerbone

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		has_artifact = finger_of_st_john
		NOT = { religion = waldensian }
	}

	option = {
		name = EVTOPTA_SoA_5205

		destroy_artifact = finger_of_st_john
	}

	option = {
		name = EVTOPTB_SoA_5205

		trigger = {
			NOT = { trait = zealous }
		}

		random = {
			chance = 30
			add_trait_fully_arbitrary_effect = yes
		}
	}

	option = {
		name = EVTOPTC_SoA_5205
		tooltip_info = learning

		trigger = { learning >= 13 }
	}
}

# Use relic to heal sickness?
character_event = {
	id = SoA.5206
	desc = EVTDESC_SoA_5206
	picture = GFX_evt_illness
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, fingerbone

	only_playable = yes
	religion_group = christian
	is_sick = yes
	has_dlc = "Sons of Abraham"
	lacks_dlc = "Reapers"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		trait = ill
		has_artifact = finger_of_st_john
		NOT = { religion = waldensian }
	}

	option = {
		name = EVTOPTA_SoA_5206

		trigger = {
			NOT = { trait = cynical }
		}

		random = {
			chance = 20

			remove_trait_ill_effect = yes
			add_trait_zealous_effect = yes
		}
	}

	option = {
		name = EVTOPTB_SoA_5206

		trigger = {
			NOT = { trait = zealous }
		}

		random = {
			chance = 20

			remove_trait_ill_effect = yes
			add_trait_cynical_effect = yes
		}
	}
}

# Bring relic out to bless the fields - Setup to fire the event between April and June
character_event = {
	id = SoA.5221

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, fingerbone
	hide_window = yes

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		has_artifact = finger_of_st_john
	}

	immediate = {
		trigger_switch = {
			on_trigger = month

			11 = {
				character_event = {
					id = SoA.5207
					months = 4
					random = 80
				}
			}

			10 = {
				character_event = {
					id = SoA.5207
					months = 5
					random = 80
				}
			}

			9 = {
				character_event = {
					id = SoA.5207
					months = 6
					random = 80
				}
			}

			8 = {
				character_event = {
					id = SoA.5207
					months = 7
					random = 80
				}
			}

			7 = {
				character_event = {
					id = SoA.5207
					months = 8
					random = 80
				}
			}

			4 = {
				character_event = { id = SoA.5207 }
			}

			3 = {
				character_event = {
					id = SoA.5207
					months = 1
					random = 80
				}
			}

			2 = {
				character_event = {
					id = SoA.5207
					months = 2
					random = 80
				}
			}

			1 = {
				character_event = {
					id = SoA.5207
					months = 1
					random = 80
				}
			}
		}
	}
}

# Bring relic out to bless the fields
character_event = {
	id = SoA.5207
	desc = EVTDESC_SoA_5207
	picture = GFX_evt_stone_church
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		has_artifact = finger_of_st_john
		month >= 4
		month < 7
		NOT = { religion = waldensian }
	}

	option = {
		name = EVTOPTA_SoA_5207

		random_demesne_province = {
			show_scope_change = no

			limit = { owned_by = PREV }

			add_province_modifier = {
				name = appeased_religious
				days = 1800
			}
		}
	}

	option = {
		name = EVTOPTB_SoA_5207

		add_trait_fully_silently_cynical_effect = yes
	}
}

# Commerce with relics
character_event = {
	id = SoA.5208
	desc = EVTDESC_SoA_5208
	picture = GFX_evt_market
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, fingerbone

	ai = no
	religion = catholic
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		is_heretic = no
		NOR = {
			has_character_modifier = defied_church
			has_character_modifier = church_appreciates
		}
	}

	option = {
		name = EVTOPTA_SoA_5208

		piety = 10
		scaled_wealth = -0.1

		add_character_modifier = {
			name = church_appreciates
			years = 2
		}
	}

	option = {
		name = EVTOPTB_SoA_5208

		add_character_modifier = {
			name = defied_church
			years = 2
		}
	}

	option = {
		name = EVTOPTC_SoA_5208

		trigger = {
			NOT = { trait = zealous }
		}

		scaled_wealth = 0.2

		add_character_modifier = {
			name = defied_church
			years = 2
		}

		add_trait_fully_silently_greedy_effect = yes

		random = {
			chance = 30
			add_trait_fully_cynical_effect = yes
		}
	}
}

# Donate owned relic to church?
character_event = {
	id = SoA.5209
	desc = EVTDESC_SoA_5209
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, fingerbone

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		has_artifact = finger_of_st_john
		NOT = { religion = waldensian }
	}

	option = {
		name = EVTOPTA_SoA_5209

		destroy_artifact = finger_of_st_john
		piety = 30
		add_trait_fully_silently_humble_effect = yes
	}

	option = {
		name = EVTOPTB_SoA_5209

		destroy_artifact = finger_of_st_john
		piety = 30
		prestige = 30

		add_character_modifier = {
			name = church_appreciates
			years = 3
		}
	}

	option = {
		name = EVTOPTC_SoA_5209

		add_character_modifier = {
			name = defied_church
			years = 3
		}
	}
}

# Remove relic modifier if no longer Christian
# character_event = {
#	id = SoA.5229
#	desc = EVTDESC_SoA_5229
#	picture = GFX_evt_throne_room
#	border = GFX_event_normal_frame_religion
#
#	only_playable = yes
#	min_age = 16
#	has_dlc = "Sons of Abraham"
#
#	trigger = {
#		has_artifact = finger_of_st_john
#
#		NOR = {
#			religion_group = christian
#			has_character_flag = kept_finger_as_trinket
#		}
#	}
#
#	mean_time_to_happen = {
#		days = 1
#	}
#
#	option = {
#		name = EVTOPTA_SoA_5229
#
#		prestige = 30
#		set_character_flag = kept_finger_as_trinket
#	}
#
#	option = {
#		name = EVTOPTB_SoA_5229
#
#		destroy_artifact = finger_of_st_john
#		wealth = 30
#	}
#
#	option = {
#		name = EVTOPTC_SoA_5229
#
#		destroy_artifact = finger_of_st_john
#
#		custom_tooltip = {
#			text = insulted_realm_christians
#
#			any_realm_character = {
#				limit = { religion_group = christian }
#
#				opinion = {
#					name = insulted
#					who = ROOT
#					years = 5
#				}
#			}
#		}
#	}
# }

###########################################
#                                         #
# Monks events - ID SoA.5210-SoA.5239     #
#                                         #
###########################################

# Monks make fantastic beer
character_event = {
	id = SoA.5210
	desc = EVTDESC_SoA_5210
	picture = GFX_evt_monastery_monks
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		location = {
			OR = {
				region = world_europe_west
				region = world_europe_south
				region = world_asia_minor
			}
		}
	}

	option = {
		name = EVTOPTA_SoA_5210

		random = {
			chance = 50
			change_learning = 1
		}

		random = {
			chance = 20
			add_trait_drunkard_effect = yes
		}
	}

	option = {
		name = EVTOPTB_SoA_5210

		random = {
			chance = 20
			add_trait_fully_temperate_effect = yes
		}
	}
}

# Monks make great wine
character_event = {
	id = SoA.5211
	desc = EVTDESC_SoA_5211
	picture = GFX_evt_monastery_monks
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		location = {
			OR = {
				region = world_europe_west
				region = world_europe_south
				region = world_asia_minor
			}
		}
	}

	option = {
		name = EVTOPTA_SoA_5211

		random = {
			chance = 50
			change_learning = 1
		}

		random = {
			chance = 20
			add_trait_drunkard_effect = yes
		}
	}

	option = {
		name = EVTOPTB_SoA_5211

		random = {
			chance = 20
			add_trait_fully_temperate_effect = yes
		}
	}
}

# Monks have healing herbs
character_event = {
	id = SoA.5212
	desc = EVTDESC_SoA_5212
	picture = GFX_evt_monastery_monks
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	is_sick = yes
	has_dlc = "Sons of Abraham"
	lacks_dlc = "Reapers"
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		trait = ill
		piety >= 1
	}

	option = {
		name = EVTOPTA_SoA_5212

		random = {
			chance = 30
			remove_trait_ill_effect = yes
		}
	}

	option = {
		name = EVTOPTB_SoA_5212

		add_trait_fully_silently_paranoid_effect = yes
	}
}

# Monk is fantastic painter
character_event = {
	id = SoA.5213
	desc = EVTDESC_SoA_5213
	picture = GFX_evt_stone_church
	border = GFX_event_normal_frame_religion

is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		NOT = { trait = blinded }
	}

	option = {
		name = EVTOPTA_SoA_5213

		wealth = -10
		prestige = 30
	}

	option = {
		name = EVTOPTB_SoA_5213
	}
}

# Monks produce beautiful books
character_event = {
	id = SoA.5214
	desc = EVTDESC_SoA_5214
	picture = GFX_evt_monk
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		NOT = { trait = blinded }
	}

	option = {
		name = EVTOPTA_SoA_5214

		wealth = -40
		prestige = 30

		random = {
			chance = 20
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTB_SoA_5214
	}
}

# Local monks come to visit often
character_event = {
	id = SoA.5215
	desc = EVTDESC_SoA_5215
	picture = GFX_evt_monastery_monks
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		in_seclusion = no
	}

	option = {
		name = EVTOPTA_SoA_5215

		piety = 20

		random = {
			chance = 30
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTB_SoA_5215

		add_trait_fully_silently_cynical_effect = yes
	}
}

# Child wants to be monk/nun
character_event = {
	id = SoA.5218
	desc = EVTDESC_SoA_5218
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	ai = no
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		NOR = {
			religion = cathar
			religion = bogomilist
		}

		any_child = {
			is_alive = yes
			religion_group = christian
			is_ruler = no
			age >= 13
			prisoner = no
			is_ill = no
			is_adult = no
			is_incapable = no

			NOR = {
				trait = cynical
				trait = stressed
				trait = depressed
				religion = cathar
				religion = bogomilist
				has_character_flag = monk_refused
				has_character_flag = is_child_of_destiny
			}
		}
	}

	immediate = {
		random_child = {
			limit = {
				is_alive = yes
				religion_group = christian
				is_ruler = no
				prisoner = no
				is_ill = no
				age >= 13
				is_adult = no
				is_ascetic_trigger = no

				NOR = {
					trait = cynical
					trait = incapable
					trait = stressed
					trait = depressed
					religion = cathar
					religion = bogomilist
					has_character_flag = monk_refused
					has_character_flag = is_child_of_destiny
				}
			}

			save_event_target_as = target_child
		}
	}

	option = {
		name = EVTOPTA_SoA_5218

		event_target:target_child = {
			show_scope_change = no

			set_christian_ascetic_effect = yes

			opinion = {
				name = opinion_grateful
				who = ROOT
				years = 100
			}
		}

		custom_tooltip = { text = EVTTOOLTIPA_SOA_5218 }

		ai_chance = { factor = 0 }
	}

	option = {
		name = EVTOPTB_SoA_5218

		event_target:target_child = {
			show_scope_change = no

			add_trait_silently_stressed_effect = yes

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

		custom_tooltip = { text = EVTTOOLTIPB_SOA_5218 }
	}
}

# Donate to local monastery
character_event = {
	id = SoA.5219
	desc = EVTDESC_SoA_5219
	picture = GFX_evt_monastery_monks
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		scaled_wealth = 0.1
	}

	option = {
		name = EVTOPTA_SoA_5219

		wealth = -30
		piety = 30
	}

	option = {
		name = EVTOPTB_SoA_5219

		piety = -5
	}
}

###########################################
#                                         #
# Miracle events - ID SoA.5240-SoA.5259   #
#                                         #
###########################################

# Stigmata
character_event = {
	id = SoA.5240
	desc = EVTDESC_SoA_5240
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, miracles

only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		is_heretic = no
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 3.3
			has_focus = focus_theology
		}
	}

	option = {
		name = EVTOPTA_SoA_5240

		add_trait_fully_silently_zealous_effect = yes
		piety = 10
	}

	option = {
		name = EVTOPTB_SoA_5240

		random = {
			chance = 50
			add_trait_fully_cynical_effect = yes
		}

		random = {
			chance = 20
			add_trait_stressed_effect = yes
		}
	}
}

# I saw the Virgin
character_event = {
	id = SoA.5241
	desc = EVTDESC_SoA_5241
	picture = GFX_evt_comet
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, miracles

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		is_heretic = no
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 3.3
			has_focus = focus_theology
		}
	}

	option = {
		name = EVTOPTA_SoA_5241

		trigger = {
			NOT = { trait = cynical }
		}

		add_trait_silently_zealous_effect = yes
		piety = 30
	}

	option = {
		name = EVTOPTB_SoA_5241

		trigger = {
			NOT = { trait = zealous }
		}

		random = {
			chance = 30
			add_trait_cynical_effect = yes
		}
	}
}

# Virgin birth
character_event = {
	id = SoA.5242
	desc = EVTDESC_SoA_5242
	picture = GFX_evt_pregnancy
	border = GFX_event_normal_frame_religion
	portrait = spouse

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, miracles

	religion_group = christian
	only_women = yes
	is_married = yes
	max_age = 45
	min_age = 17
	has_dlc = "Sons of Abraham"
	only_capable = yes
	prisoner = no

	trigger = {
		is_pregnant = no

		spouse = {
			trait = chaste
			trait = celibate
		}

		NOR = {
			trait = chaste
			trait = celibate
			trait = homosexual
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 2
			trait = lustful
		}

		mult_modifier = {
			factor = 1.25
			trait = hedonist
		}
	}

	option = {
		name = EVTOPTA_SoA_5242

		add_trait_fully_silently_zealous_effect = yes
	}

	option = {
		name = EVTOPTB_SoA_5242

		add_trait_fully_silently_deceitful_effect = yes
	}

	after = {
		spouse = {
			character_event = { id = SoA.5243 }
		}
	}
}

# Husband notified of virgin birth
character_event = {
	id = SoA.5243
	desc = EVTDESC_SoA_5243
	picture = GFX_evt_pregnancy
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5243

		FROM = {
			show_scope_change = no

			unsafe_impregnate = ROOT
			add_trait = pregnant
		}

		add_trait_fully_silently_zealous_effect = yes
	}

	option = {
		name = EVTOPTB_SoA_5243

		FROM = {
			show_scope_change = no

			unsafe_impregnate = ROOT
			add_trait = pregnant
		}

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

	option = {
		name = EVTOPTC_SoA_5243

		FROM = {
			show_scope_change = no

			unsafe_impregnate = 0
			add_trait = pregnant
		}

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

# Exorcism
character_event = {
	id = SoA.5244
	desc = EVTDESC_SoA_5244
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, miracles

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	only_capable = yes
	prisoner = no

	trigger = {
		trait = possessed
	}

	option = {
		name = EVTOPTA_SoA_5244

		random = {
			chance = 40

			remove_trait = possessed
			clr_character_flag = demon_child
			clr_character_flag = demon_child_fake
			clr_character_flag = child_exorcism

			if = {
				limit = { has_character_modifier =  voice_of_satan }
				remove_character_modifier = voice_of_satan
			}

			if = {
				limit = { has_character_modifier = voice_of_jesus }
				remove_character_modifier = voice_of_jesus
			}

			if = {
				limit = { has_character_modifier = holy_comet }
				remove_character_modifier = holy_comet
			}

			if = {
				limit = { has_character_modifier = lycanthropy }
				remove_character_modifier = lycanthropy
			}

			add_trait_fully_zealous_effect = yes
		}

		random = {
			chance = 20

			if = {
				limit = { has_dlc = "Reapers" }
				add_symptom_effect = yes
			}
			else = {
				add_trait_ill_effect = yes
			}
		}

		random = {
			chance = 10
			add_trait_wounded_effect = yes
		}
	}

	option = {
		name = EVTOPTB_SoA_5244

		add_trait_fully_silently_paranoid_effect = yes
	}

	option = {
		name = EVTOPTC_SoA_5244

		random = {
			chance = 20

			remove_trait = possessed
			clr_character_flag = demon_child
			clr_character_flag = demon_child_fake
			clr_character_flag = child_exorcism

			if = {
				limit = { has_character_modifier =  voice_of_satan }
				remove_character_modifier = voice_of_satan
			}

			if = {
				limit = { has_character_modifier = voice_of_jesus }
				remove_character_modifier = voice_of_jesus
			}

			if = {
				limit = { has_character_modifier = holy_comet }
				remove_character_modifier = holy_comet
			}

			if = {
				limit = { has_character_modifier = lycanthropy }
				remove_character_modifier = lycanthropy
			}
		}
	}
}

###########################################
#                                         #
# Immoral priest events                   #
# ID SoA.5300-SoA.5339                    #
#                                         #
###########################################

# Christian becoming a wicked priest
character_event = {
	id = SoA.5300

	hide_window = yes
	is_triggered_only = yes # on_bi_yearly_pulse

	religion_group = christian
	ai = yes
	min_age = 16
	only_capable = yes
	prisoner = no
	has_dlc = "Sons of Abraham"

	trigger = {
		is_priest = yes
		intrigue < 3
		diplomacy < 3
		NOT = { trait = bad_priest_christian }

		OR = {
			has_vice_trigger = yes
			trait = cynical
			trait = lunatic
			trait = possessed
			trait = homosexual
			trait = hedonist
		}
	}

	immediate = {
		add_trait = bad_priest_christian

		if = {
			limit = {
				is_ruler = yes
				has_nickname = no
			}

			trigger_switch = {
				on_trigger = trait

				possessed = { give_nickname = nick_the_bewitched }
				lunatic   = { give_nickname = nick_the_mad }

				fallback = {
					random_list = {
						70 = { give_nickname = nick_the_wicked }
						10 = { give_nickname = nick_the_black }
					}
				}
			}
		}

		# Wicked Pope or Patriarch!
		if = {
			limit = { controls_religion = yes }

			add_character_modifier = {
				name = bad_rel_head
				duration = -1
				hidden = yes
			}

			any_player = {
				limit = { religion = ROOT }

				character_event = {
					id = SoA.5312
					days = 8
					random = 7
				}
			}
		}
	}
}

# Muslim becoming a wicked caliph
character_event = {
	id = SoA.5301
	desc = EVTDESC_SoA_5301
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse

	only_playable = yes
	religion_group = muslim
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		controls_religion = yes
		intrigue < 3
		diplomacy < 3
		NOT = { trait = bad_priest_muslim }
		OR = {
			has_landed_title = d_sunni
			has_landed_title = d_shiite
			has_landed_title = d_yazidi
			has_landed_title = d_ibadi
			has_landed_title = d_hurufi
			has_landed_title = d_kharijite
		}
		OR = {
			trait = cynical
			trait = lustful
			trait = gluttonous
			trait = greedy
			trait = slothful
			trait = envious
			trait = wroth
			trait = proud
			trait = lunatic
			trait = possessed
			trait = hedonist
		}
	}

	option = {
		name = EVTOPTA_SoA_5301

		add_trait = bad_priest_muslim

		if = {
			limit = { has_nickname = no }

			trigger_switch = {
				on_trigger = trait

				possessed = { give_nickname = nick_the_bewitched }
				lunatic = { give_nickname = nick_the_mad }
				fallback = { give_nickname = nick_the_wicked }
			}
		}

		hidden_effect = {
			# Wicked Caliph!
			if = {
				limit = { controls_religion = yes }

				add_character_modifier = {
					name = bad_rel_head
					duration = -1
					hidden = yes
				}

				any_player = {
					limit = { religion = ROOT }

					character_event = {
						id = SoA.5314
						days = 8
						random = 7
					}
				}
			}
		}
	}
}

# Norse becoming an unworthy priest
character_event = {
	id = SoA.5302
	desc = EVTDESC_SoA_5302
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse

	religion_group = pagan_group
	min_age = 16
	only_capable = yes
	prisoner = no
	has_dlc = "Sons of Abraham"

	trigger = {
		religion_openly_norse_or_reformed_trigger = yes

		OR = {
			is_priest = yes
			controls_religion = yes
		}

		intrigue < 3
		diplomacy < 3
		NOT = { trait = bad_priest_norse }

		OR = {
			trait = cynical
			trait = gluttonous
			trait = greedy
			trait = slothful
			trait = envious
			trait = wroth
			trait = craven
			trait = lunatic
			trait = possessed
			trait = hedonist
			trait = arbitrary
		}
	}

	option = {
		name = EVTOPTA_SoA_5302

		add_trait = bad_priest_norse

		if = {
			limit = {
				is_ruler = yes
				has_nickname = no
			}

			trigger_switch = {
				on_trigger = trait

				possessed = { give_nickname = nick_the_bewitched }
				lunatic = { give_nickname = nick_the_mad }
				fallback = { give_nickname = nick_the_unready }
			}
		}

		hidden_effect = {
			# Wicked Fylkir!
			if = {
				limit = { controls_religion = yes }

				add_character_modifier = {
					name = bad_rel_head
					duration = -1
					hidden = yes
				}

				any_player = {
					limit = { religion = ROOT }

					character_event = {
						id = SoA.5316
						days = 8
						random = 7
					}
				}
			}
		}
	}
}

# Tengri becoming an unworthy priest
character_event = {
	id = SoA.5303

	is_triggered_only = yes # on_bi_yearly_pulse
	hide_window = yes

	religion_group = pagan_group
	min_age = 16
	only_capable = yes
	prisoner = no
	has_dlc = "Sons of Abraham"

	trigger = {
		religion_openly_tengri_or_reformed_trigger = yes

		OR = {
			is_priest = yes
			controls_religion = yes
		}

		intrigue < 3
		diplomacy < 3
		NOT = { trait = bad_priest_tengri }

		OR = {
			trait = cynical
			trait = arbitrary
			trait = paranoid
			trait = greedy
			trait = slothful
			trait = envious
			trait = wroth
			trait = lunatic
			trait = cruel
		}
	}

	immediate = {
		add_trait = bad_priest_tengri

		if = {
			limit = {
				is_ruler = yes
				has_nickname = no
			}

			trigger_switch = {
				on_trigger = trait

				possessed = { give_nickname = nick_the_bewitched }
				lunatic = { give_nickname = nick_the_mad }
				fallback = { give_nickname = nick_the_wicked }
			}
		}

		hidden_effect = {
			# Wicked Head Priest!
			if = {
				limit = { controls_religion = yes }

				add_character_modifier = {
					name = bad_rel_head
					duration = -1
					hidden = yes
				}

				any_player = {
					limit = { religion = ROOT }

					character_event = {
						id = SoA.5318
						days = 8
						random = 7
					}
				}
			}
		}
	}
}

# Zoroastrian becoming an immoral priest
character_event = {
	id = SoA.5304

	is_triggered_only = yes # on_bi_yearly_pulse
	hide_window = yes

	religion_group = zoroastrian_group
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		OR = {
			is_priest = yes
			controls_religion = yes
		}

		intrigue < 3
		diplomacy < 3
		NOT = { trait = bad_priest_zoroastrian }

		OR = {
			trait = cynical
			trait = arbitrary
			trait = greedy
			trait = slothful
			trait = envious
			trait = wroth
			trait = proud
			trait = lunatic
			trait = possessed
			trait = cruel
		}
	}

	immediate = {
		add_trait = bad_priest_zoroastrian

		if = {
			limit = {
				is_ruler = yes
				has_nickname = no
			}

			trigger_switch = {
				on_trigger = trait

				possessed = { give_nickname = nick_the_bewitched }
				lunatic = { give_nickname = nick_the_mad }
				fallback = { give_nickname = nick_the_wicked }
			}
		}

		hidden_effect = {
			# Wicked Moadaban-Moabad!
			if = {
				limit = { controls_religion = yes }

				add_character_modifier = {
					name = bad_rel_head
					duration = -1
					hidden = yes
				}

				any_player = {
					limit = { religion = ROOT }

					character_event = {
						id = SoA.5320
						days = 8
						random = 7
					}
				}
			}
		}
	}
}

# Aztec becoming an unworthy priest
character_event = {
	id = SoA.5305

	is_triggered_only = yes # on_bi_yearly_pulse
	hide_window = yes

	religion_group = pagan_group
	has_dlc = "Sons of Abraham"
	ai = yes
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		is_priest = yes
		religion_openly_aztec_or_reformed_trigger = yes
		intrigue < 3
		diplomacy < 3
		NOT = { trait = bad_priest_aztec }

		OR = {
			trait = cynical
			trait = craven
			trait = kind
			trait = slothful
			trait = gluttonous
			trait = lustful
			trait = hedonist
			trait = lunatic
			trait = possessed
			trait = arbitrary
		}
	}

	immediate = {
		add_trait = bad_priest_aztec

		if = {
			limit = {
				is_ruler = yes
				has_nickname = no
			}

			trigger_switch = {
				on_trigger = trait

				possessed = { give_nickname = nick_the_bewitched }
				lunatic = { give_nickname = nick_the_mad }
				kind = { give_nickname = nick_the_kind }
				craven = { give_nickname = nick_the_cowardly }
				fallback = { give_nickname = nick_the_unready }
			}
		}

		hidden_effect = {
			# Wicked Head Priest!
			if = {
				limit = { controls_religion = yes }

				add_character_modifier = {
					name = bad_rel_head
					duration = -1
					hidden = yes
				}

				any_player = {
					limit = { religion = ROOT }

					character_event = {
						id = SoA.5322
						days = 8
						random = 7
					}
				}
			}
		}
	}
}

# Check for Cadaver Synod
character_event = {
	id = SoA.5306

	is_triggered_only = yes # on_death
	hide_window = yes

	only_playable = yes
	religion = catholic # TODO: fraticelli as well?
	has_dlc = "Sons of Abraham"

	trigger = {
		has_landed_title = k_papacy
		trait = bad_priest_christian
		year < 1049
	}

	immediate = {
		give_nickname = nick_the_accursed

		any_player = {
			limit = { religion = ROOT }

			narrative_event = {
				id = SoA.5307
				days = 300
			}
		}
	}
}

# The Cadaver Synod
narrative_event = {
	id = SoA.5307
	title = EVTNAME_SoA_5307
	desc = EVTDESC_SoA_5307
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5307
	}
}

# Wicked Pope or Patriarch player notification
character_event = {
	id = SoA.5312
	desc = EVTDESC_SoA_5312
	picture = GFX_evt_pope_feast
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5312
	}
}

# Wicked Caliph player notification
character_event = {
	id = SoA.5314
	desc = EVTDESC_SoA_5314
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5314
	}
}

# Unworthy Fylkir player notification
character_event = {
	id = SoA.5316
	desc = EVTDESC_SoA_5316
	picture = GFX_evt_viking_throneroom_oldgods
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5316
	}
}

# Unworthy Head Priest player notification (Tengri)
character_event = {
	id = SoA.5318
	desc = EVTDESC_SoA_5318
	picture = GFX_evt_tengri_throneroom_oldgods
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5318
	}
}

# Immoral Moabadan-Moabad player notification
character_event = {
	id = SoA.5320
	desc = EVTDESC_SoA_5320
	picture = GFX_evt_marriage_zoroastrian_group
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5320
	}
}

# Unworthy Head Priest player notification (Aztec)
character_event = {
	id = SoA.5322
	desc = EVTDESC_SoA_5322
	picture = GFX_evt_throne_room
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5322
	}
}


###########################################
#                                         #
# Cluny Abbey                             #
# ID SoA.5340-SoA.5343                    #
#                                         #
###########################################

# Cluny priests are very influential
character_event = {
	id = SoA.5340

	is_triggered_only = yes # on_yearly_pulse, random_events, influential_monasteries
	hide_window = yes

	only_rulers = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	ai = yes
	only_capable = yes
	prisoner = no

	trigger = {
		has_landed_title = b_cluny
		is_priest = yes
		year >= 950
		is_catholic_branch = yes
		controls_religion = no
		is_antipope = no
	}

	immediate = {
		piety = 50
		prestige = 25
	}
}

# Donate to Cluny Abbey
narrative_event = {
	id = SoA.5341
	title = EVTNAME_SoA_5341
	desc = EVTDESC_SoA_5341
	picture = GFX_evt_monastery_monks
	border = GFX_event_narrative_frame_religion
	portrait = event_target:bishop_of_cluny

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		is_catholic_branch = yes
		wealth >= 200
		year >= 950

		b_cluny = {
			holder_scope = {
				religion = ROOT
				is_priest = yes
				controls_religion = no
				is_antipope = no
			}
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 3.3
			has_focus = focus_theology
		}
	}

	immediate = {
		b_cluny = {
			holder_scope = {
				save_event_target_as = bishop_of_cluny
			}
		}
	}

	option = {
		name = EVTOPTA_SoA_5341

		if = {
			limit = { wealth < 600 }

			transfer_scaled_wealth = {
				to = event_target:bishop_of_cluny
				value = 1
				min = 100
				max = 100
			}

			prestige = 50
			piety = 50
		}
		else = {
			transfer_scaled_wealth = {
				to = event_target:bishop_of_cluny
				value = 1
				min = 300
				max = 300
			}

			prestige = 100
			piety = 100
		}

		ai_chance = { factor = 20 }
	}

	option = {
		name = EVTOPTB_SoA_5341

		ai_chance = { factor = 80 }
	}
}

# Visit Cluny?
narrative_event = {
	id = SoA.5342
	title = EVTNAME_SoA_5342
	desc = EVTDESC_SoA_5342
	picture = GFX_evt_monastery_monks
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	ai = no
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no
	in_command = no

	trigger = {
		is_catholic_branch = yes
		year >= 950
		NOT = { trait = blinded }
		is_inaccessible_trigger = no

		distance = {
			where = b_cluny
			value < 300 # Not too far away
		}

		b_cluny = {
			holder_scope = {
				is_priest = yes
				religion = ROOT
				controls_religion = no
				is_antipope = no
			}
		}

	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 2
			has_focus = focus_theology
		}
	}

	option = {
		name = EVTOPTA_SoA_5342

		wealth = -10
		set_character_flag = do_not_disturb

		narrative_event = {
			id = SoA.5343
			days = 10
		}
	}

	option = {
		name = EVTOPTB_SoA_5342

		piety = -5
	}
}

# Visiting Cluny
narrative_event = {
	id = SoA.5343
	title = EVTNAME_SoA_5343
	desc = EVTDESC_SoA_5343
	picture = GFX_evt_monastery_nuns
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5343

		random = {
			chance = 20
			change_stewardship = 1
		}
	}

	option = {
		name = EVTOPTB_SoA_5343

		if = {
			limit = {
				lifestyle_traits < 1
				NOT = { has_dlc = "Way of Life" }
			}

			random = {
				chance = 50
				add_trait = scholar
			}
		}

		random = {
			chance = 20
			change_learning = 1
		}
	}

	option = {
		name = EVTOPTC_SoA_5343

		if = {
			limit = {
				lifestyle_traits < 1
				NOT = { has_dlc = "Way of Life" }
			}

			random = {
				chance = 50
				add_trait = hedonist
			}
		}

		random = {
			chance = 20
			change_intrigue = 1
		}
	}

	option = {
		name = EVTOPTD_SoA_5343

		piety = 30

		add_character_modifier = {
			name = the_pious
			months = 8
		}
	}

	after = {
		clr_character_flag = do_not_disturb
	}
}

###########################################
#                                         #
# Mount Athos                             #
# ID SoA.5344-SoA.5349                    #
#                                         #
###########################################

# Priests at Mount Athos are very influential
character_event = {
	id = SoA.5344

	is_triggered_only = yes # on_yearly_pulse, random_events, influential_monasteries
	hide_window = yes

	only_rulers = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	ai = yes
	only_capable = yes
	prisoner = no

	trigger = {
		has_landed_title = b_mntathos
		is_orthodox_branch = yes
		is_priest = yes
		year >= 885
	}

	immediate = {
		piety = 50
		prestige = 25
	}
}

# Donate to Mount Athos monasteries
narrative_event = {
	id = SoA.5345
	title = EVTNAME_SoA_5345
	desc = EVTDESC_SoA_5345
	picture = GFX_evt_monastery_monks
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	only_playable = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		is_orthodox_branch = yes
		wealth >= 200
		year >= 885

		b_mntathos = {
			holder_scope = {
				is_priest = yes
				religion = ROOT
			}
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 3.3
			has_focus = focus_theology
		}
	}

	immediate = {
		b_mntathos = {
			holder_scope = {
				save_event_target_as = bishop_of_mntathos
			}
		}
	}

	option = {
		name = EVTOPTA_SoA_5345

		if = {
			limit = { wealth < 600 }

			transfer_scaled_wealth = {
				to = event_target:bishop_of_mntathos
				value = 1
				min = 100
				max = 100
			}

			prestige = 50
			piety = 50
		}
		else = {
			transfer_scaled_wealth = {
				to = event_target:bishop_of_mntathos
				value = 1
				min = 300
				max = 300
			}

			prestige = 100
			piety = 100
		}

		ai_chance = { factor = 20 }
	}

	option = {
		name = EVTOPTB_SoA_5345

		ai_chance = { factor = 80 }
	}
}

# Visit Mount Athos?
narrative_event = {
	id = SoA.5346
	title = EVTNAME_SoA_5346
	desc = EVTDESC_SoA_5346
	picture = GFX_evt_icon
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, monk_flavour

	ai = no
	religion_group = christian
	has_dlc = "Sons of Abraham"
	prisoner = no
	only_capable = yes
	only_men = yes
	min_age = 16
	in_command = no

	trigger = {
		is_orthodox_branch = yes
		NOT = { trait = blinded }
		is_inaccessible_trigger = no
		year >= 885

		distance = {
			where = b_mntathos
			value < 300 # Not too far away
		}

		b_mntathos = {
			holder_scope = {
				is_priest = yes
				religion = ROOT
			}
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 2
			has_focus = focus_theology
		}
	}

	option = {
		name = EVTOPTA_SoA_5346

		wealth = -10
		set_character_flag = do_not_disturb

		narrative_event = {
			id = SoA.5347
			days = 10
		}
	}

	option = {
		name = EVTOPTB_SoA_5346

		piety = -5
	}
}

# Visiting Mount Athos
narrative_event = {
	id = SoA.5347
	title = EVTNAME_SoA_5347
	desc = EVTDESC_SoA_5347
	picture = GFX_evt_monastery_monks
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5347

		random = {
			chance = 20
			change_stewardship = 1
		}
	}

	option = {
		name = EVTOPTB_SoA_5347

		random = {
			chance = 20
			change_learning = 1
		}

		if = {
			limit = {
				lifestyle_traits < 1
				NOT = { has_dlc = "Way of Life" }
			}

			random = {
				chance = 50
				add_trait = scholar
			}
		}
	}

	option = {
		name = EVTOPTC_SoA_5347

		piety = 30

		add_character_modifier = {
			name = the_pious
			months = 8
		}
	}

	after = {
		clr_character_flag = do_not_disturb
	}
}

###########################################
#                                         #
# Jeanne d'Arc events                     #
# ID SoA.5350-SoA.5399                    #
#                                         #
###########################################

# Notify monarch of this new servant of the crown
narrative_event = {
	id = SoA.5353
	title = EVTNAME_SoA_5353
	desc = EVTDESC_SoA_5353
	picture = GFX_evt_large_army
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes # on_decade_pulse, random_events, jeanne_darc
	hide_from = yes

	ai = no
	only_independent = yes
	religion_group = christian
	has_dlc = "Sons of Abraham"
	war = yes
	min_age = 16
	prisoner = no

	trigger = {
		higher_real_tier_than = DUKE
		year >= 1000
		is_republic = no
		is_priest = no
		gender_equality_trigger = no
		NOT = { has_global_flag = jeanne_darc_spawned }

		primary_title = {
			culture = ROOT
		}
	}

	immediate = {
		set_global_flag = jeanne_darc_spawned

		create_character = {
			random_traits = no
			dynasty = none
			religion = ROOT
			culture = ROOT
			female = yes
			historical = yes
			age = 17
			add_trait = zealous
			add_trait = celibate
			add_trait = chaste
			add_trait = honest
			add_trait = brave
			add_trait = trusting
			add_trait = brilliant_strategist
			add_trait = inspiring_leader
			add_trait = aggressive_leader
			flag = no_court_invites

			attributes = {
				diplomacy = 15
				martial = 20
				stewardship = 5
				intrigue = 3
				learning = 3
			}
		}

		new_character = {
			set_character_flag = is_jeanne_darc
			set_character_flag = special_marshal
			save_global_event_target_as = jeanne_darc

			save_persistent_event_target = {
				name = original_liege
				scope = ROOT
			}

			if = {
				limit = { culture = french }

				set_name = "Jeanne"
				give_nickname = nick_darc
			}
			else = {
				give_nickname = nick_the_maid
			}

			add_character_modifier = {
				name = voice_of_jesus
				duration = -1
			}

			opinion = {
				name = opinion_loyal_servant
				who = ROOT
				years = 100
			}
		}

		random_realm_province = {
			limit = { held_under_PREV = yes }
			save_event_target_as = home_of_jeanne_darc
		}
	}

	option = {
		name = EVTOPTA_SoA_5353

		narrative_event = {
			id = SoA.5355
			months = 3
			random = 60
			tooltip = jeanne_arrives_message
		}
	}
}

# Jeanne d'Arc - Nobles react
narrative_event = {
	id = SoA.5355
	title = EVTNAME_SoA_5355
	desc = EVTDESC_SoA_5355
	picture = GFX_evt_scandal

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5355

		custom_tooltip = {
			text = most_lords_angry

			any_realm_lord = {
				limit = {
					is_priest = no
					is_republic = no

					NOR = {
						trait = charitable
						trait = kind
						trait = humble
					}
				}

				opinion = {
					name = opinion_angry
					who = ROOT
					months = 18
				}
			}
		}

		narrative_event = {
			id = SoA.5357
			months = 3
			random = 60
		}
	}

	option = {
		name = EVTOPTB_SoA_5355
		tooltip_info = diplomacy

		trigger = { diplomacy >= 15 }

		prestige = 10

		narrative_event = {
			id = SoA.5357
			months = 3
			random = 60
		}
	}

	option = {
		name = EVTOPTC_SoA_5355

		event_target:jeanne_darc = {
			show_scope_change = no

			imprison = yes
			clr_character_flag = special_marshal
		}

		narrative_event = {
			id = SoA.5391 # Trial for heresy!
			days = 5
		}
	}
}

narrative_event = {
	id = SoA.5357
	title = EVTNAME_SoA_5357
	desc = EVTDESC_SoA_5357
	picture = GFX_evt_daughter_asking_father
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5357

		narrative_event = { id = SoA.5358 }
	}

	option = {
		name = EVTOPTB_SoA_5357

		piety = 30
		add_trait_fully_silently_zealous_effect = yes

		narrative_event = { id = SoA.5359 }
	}

	option = {
		name = EVTOPTC_SoA_5357

		prestige = 30

		event_target:jeanne_darc = {
			show_scope_change = no

			prestige = -30
		}

		narrative_event = { id = SoA.5360 }
	}

	option = {
		name = EVTOPTD_SoA_5357

		trigger = {
			trait = lustful
			trait = cynical
			intrigue >= 10
			is_female = no
		}

		custom_tooltip = { text = TOOLTIP_SoA_5357 }

		random_list = {
			20 = {
				add_lover = event_target:jeanne_darc

				event_target:jeanne_darc = {
					show_scope_change = no

					remove_trait = celibate
					prestige = -50

					if = {
						limit = { has_nickname = nick_the_maid }
						give_nickname = nick_the_bold
					}
				}

				narrative_event = { id = SoA.5361 }
			}

			80 = { narrative_event = { id = SoA.5362 } }
		}
	}
}

narrative_event = {
	id = SoA.5358
	title = EVTNAME_SoA_5358
	desc = EVTDESC_SoA_5358
	picture = GFX_evt_daughter_asking_father
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5358

		narrative_event = {
			id = SoA.5364
			months = 3
			random = 60
		}
	}
}

narrative_event = {
	id = SoA.5359
	title = EVTNAME_SoA_5359
	desc = EVTDESC_SoA_5359
	picture = GFX_evt_knight_kneeling
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5359

		narrative_event = {
			id = SoA.5364
			months = 3
			random = 60
		}
	}
}

narrative_event = {
	id = SoA.5360
	title = EVTNAME_SoA_5360
	desc = EVTDESC_SoA_5360
	picture = GFX_evt_bad_news_female
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5360

		narrative_event = {
			id = SoA.5364
			months = 3
			random = 60
		}
	}
}

narrative_event = {
	id = SoA.5361
	title = EVTNAME_SoA_5361
	desc = EVTDESC_SoA_5361
	picture = GFX_evt_lovers
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5361

		narrative_event = {
			id = SoA.5364
			months = 3
			random = 60
		}
	}
}

narrative_event = {
	id = SoA.5362
	title = EVTNAME_SoA_5362
	desc = EVTDESC_SoA_5362
	picture = GFX_evt_bad_news_female
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = I_SEE

		narrative_event = {
			id = SoA.5364
			months = 3
			random = 60
		}
	}
}

# Peasants like Jeanne
narrative_event = {
	id = SoA.5364
	title = EVTNAME_SoA_5364
	desc = EVTDESC_SoA_5364
	picture = GFX_evt_stone_church

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5364

		add_character_modifier = {
			name = realm_religious_fervor
			years = 1
		}

		narrative_event = {
			id = SoA.5366
			months = 3
			random = 60
		}
	}
}

# Jeanne comes with advice to liege
narrative_event = {
	id = SoA.5366
	title = EVTNAME_SoA_5366
	desc = EVTDESC_SoA_5366
	picture = GFX_evt_throne_room

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5366

		piety = 30
		military_techpoints = 50

		custom_tooltip = {
			text = most_lords_angry

			any_realm_lord = {
				limit = {
					is_priest = no
					is_republic = no

					NOR = {
						trait = brilliant_strategist
						trait = skilled_tactician
						trait = humble
					}
				}

				opinion = {
					name = opinion_angry
					who = ROOT
					months = 18
				}
			}
		}

		narrative_event = {
			id = SoA.5368
			months = 3
			random = 60
		}
	}

	option = {
		name = EVTOPTB_SoA_5366

		prestige = 30

		narrative_event = {
			id = SoA.5368
			months = 3
			random = 60
		}
	}

	option = {
		name = EVTOPTC_SoA_5366

		event_target:jeanne_darc = {
			show_scope_change = no

			imprison = yes
			clr_character_flag = special_marshal
		}

		narrative_event = {
			id = SoA.5391 # Trial for heresy!
			days = 5
		}
	}
}

# Jeanne d'Arc - Church reacts
narrative_event = {
	id = SoA.5368
	title = EVTNAME_SoA_5368
	desc = EVTDESC_SoA_5368
	picture = GFX_evt_courtiers_talking
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5368

		custom_tooltip = {
			text = most_clergy_angry

			any_realm_lord = {
				limit = {
					is_priest = yes

					NOR = {
						trait = charitable
						trait = kind
						trait = humble
					}
				}

				opinion = {
					name = opinion_angry
					who = ROOT
					months = 18
				}
			}
		}

		narrative_event = {
			id = SoA.5370
			months = 3
			random = 60
		}
	}

	option = {
		name = EVTOPTB_SoA_5368
		tooltip_info = diplomacy

		trigger = { diplomacy >= 15 }

		prestige = 20

		narrative_event = {
			id = SoA.5370
			months = 3
			random = 60
		}
	}

	option = {
		name = EVTOPTC_SoA_5368

		event_target:jeanne_darc = {
			show_scope_change = no

			imprison = yes
			clr_character_flag = special_marshal
		}

		narrative_event = {
			id = SoA.5391 # Trial for heresy!
			days = 5
		}
	}
}

# Jeanne d'Arc - Jeanne's ways affect liege
narrative_event = {
	id = SoA.5370
	title = EVTNAME_SoA_5370
	desc = EVTDESC_SoA_5370
	picture = GFX_evt_princess_byzantine
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5370

		piety = 30

		random = {
			chance = 20
			add_trait_fully_zealous_effect = yes
		}
	}

	option = {
		name = EVTOPTB_SoA_5370

		random = {
			chance = 30
			add_trait_fully_cynical_effect = yes
		}
	}

	after = {
		narrative_event = {
			id = SoA.5373
			months = 3
			random = 60
		}
	}
}

# Jeanne d'Arc - Nobles complain again - issue of low birth
narrative_event = {
	id = SoA.5373
	title = EVTNAME_SoA_5373
	desc = EVTDESC_SoA_5373
	picture = GFX_evt_courtiers_talking
	portrait = job_chancellor

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5373

		custom_tooltip = {
			text = most_lords_angry

			any_realm_lord = {
				limit = {
					is_priest = no
					is_republic = no

					NOR = {
						trait = charitable
						trait = kind
						trait = humble
					}
				}

				opinion = {
					name = opinion_angry
					who = ROOT
					months = 18
				}
			}
		}

		narrative_event = {
			id = SoA.5398
			years = 4
		}
	}

	option = {
		name = EVTOPTB_SoA_5373

		event_target:jeanne_darc = {
			show_scope_change = no

			prestige = -100
		}

		narrative_event = {
			id = SoA.5398
			years = 4
		}
	}

	option = {
		name = EVTOPTC_SoA_5373

		event_target:jeanne_darc = {
			show_scope_change = no

			prestige = 200

			if = {
				limit = { has_nickname = nick_darc }

				dynasty = 848 # d'Arc
				give_nickname = nick_the_maid
			}
			else = {
				dynasty = 849 # New dynasty (Gladius Christi)
			}
		}

		narrative_event = {
			id = SoA.5398
			years = 4
		}
	}

	option = {
		name = EVTOPTD_SoA_5373

		event_target:jeanne_darc = {
			show_scope_change = no

			imprison = yes
			clr_character_flag = special_marshal
		}

		narrative_event = {
			id = SoA.5391 # Trial for heresy!
			days = 5
		}
	}
}

narrative_event = {
	id = SoA.5382
	title = EVTNAME_SoA_5382
	desc = EVTDESC_SoA_5382
	picture = GFX_evt_marriage

	is_triggered_only = yes # on_marriage

	trigger = {
		FROM = {
			has_character_flag = is_jeanne_darc
			NOT = { has_global_flag = jeanne_darc_married }
		}
	}

	immediate = {
		set_global_flag = jeanne_darc_married
	}

	option = {
		name = EVTOPTA_SoA_5382

		FROM = {
			show_scope_change = no

			clr_character_flag = special_marshal
			remove_title = job_marshal

			if = {
				limit = { has_nickname = nick_the_maid }
				give_nickname = nick_the_bold
			}
		}
	}
}

# If Jeanne d'Arc has a child
character_event = {
	id = SoA.5384

	is_triggered_only = yes # on_birth
	hide_window = yes

	trigger = {
		is_child_of = event_target:jeanne_darc
		NOT = { has_global_flag = jeanne_darc_mother }
	}

	immediate = {
		set_global_flag = jeanne_darc_mother

		liege = {
			narrative_event = { id = SoA.5385 }
		}
	}
}

narrative_event = {
	id = SoA.5385
	title = EVTNAME_SoA_5385
	desc = EVTDESC_SoA_5385
	picture = GFX_evt_birth
	portrait = event_target:jeanne_darc

	is_triggered_only = yes

	option = {
		name = EVTOPTA_SoA_5385

		event_target:jeanne_darc = {
			show_scope_change = no

			if = {
				limit = { has_nickname = nick_the_maid }
				give_nickname = nick_the_bold
			}
		}
	}
}

# Trial for heresy!
narrative_event = {
	id = SoA.5391
	title = EVTNAME_SoA_5391
	desc = EVTDESC_SoA_5391
	picture = GFX_evt_scandal
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5391

		narrative_event = {
			id = SoA.5392
			months = 1
			random = 30
		}
	}
}

# Trial of Jeanne d'Arc - give verdict
narrative_event = {
	id = SoA.5392
	title = EVTNAME_SoA_5392
	desc = EVTDESC_SoA_5392
	picture = GFX_evt_into_the_dungeon
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5392

		event_target:jeanne_darc = {
			set_character_flag = jeanne_guilty
		}

		narrative_event = { id = SoA.5394 }
	}

	option = {
		name = EVTOPTB_SoA_5392

		event_target:jeanne_darc = {
			set_character_flag = jeanne_innocent
		}

		narrative_event = { id = SoA.5395 }
	}
}

# Jeanne d'Arc is burned at the stake
narrative_event = {
	id = SoA.5394
	title = EVTNAME_SoA_5394
	desc = EVTDESC_SoA_5394
	picture = GFX_evt_riots_byzantine
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5394

		event_target:jeanne_darc = {
			show_scope_change = no

			death = { death_reason = death_execution_burning }
		}
	}
}

# Jeanne d'Arc aquitted
narrative_event = {
	id = SoA.5395
	title = EVTNAME_SoA_5395
	desc = EVTDESC_SoA_5395
	picture = GFX_evt_monastery_nuns
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5395

		event_target:jeanne_darc = {
			show_scope_change = no

			imprison = no
			add_trait = nun
		}

		narrative_event = {
			id = SoA.5398
			years = 4
		}
	}
}

# Notification of stormy times over for Jeanne d'Arc
narrative_event = {
	id = SoA.5398
	title = EVTNAME_SoA_5398
	desc = EVTDESC_SoA_5398
	picture = GFX_evt_princess_byzantine
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_SoA_5398
	}
}

# Jeanne d'Arc dies
narrative_event = {
	id = SoA.5399

	is_triggered_only = yes # on_death
	hide_window = yes

	trigger = {
		character = event_target:jeanne_darc
	}

	immediate = {
		# Clean-up
		persistent_event_target:original_liege = {
			clear_delayed_event = { id = SoA.5355 }
			clear_delayed_event = { id = SoA.5357 }
			clear_delayed_event = { id = SoA.5358 }
			clear_delayed_event = { id = SoA.5359 }
			clear_delayed_event = { id = SoA.5360 }
			clear_delayed_event = { id = SoA.5362 }
			clear_delayed_event = { id = SoA.5364 }
			clear_delayed_event = { id = SoA.5366 }
			clear_delayed_event = { id = SoA.5368 }
			clear_delayed_event = { id = SoA.5370 }
			clear_delayed_event = { id = SoA.5373 }
			clear_delayed_event = { id = SoA.5382 }
			clear_delayed_event = { id = SoA.5392 }
			clear_delayed_event = { id = SoA.5394 }
			clear_delayed_event = { id = SoA.5395 }
			clear_delayed_event = { id = SoA.5398 }
		}
	}
}

###########################################
#                                         #
# Unfortunate crusade-related events      #
# ID SoA.5400-SoA.5409                    #
#                                         #
###########################################

# Massacre at Beziers - fires from on_siege_over_winner
narrative_event = {
	id = SoA.5400
	title = EVTNAME_SoA_5400
	desc = EVTDESC_SoA_5400
	picture = GFX_evt_burning_house
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes # on_siege_over_winner, random_events

	only_rulers = yes
	has_dlc = "Sons of Abraham"

	trigger = {
		any_war = {
			OR = {
				using_cb = crusade
				using_cb = new_crusade
			}
		}

		top_liege = {
			is_parent_religion = ROOT
		}

		FROM = {
			holder_scope = {
				is_heretic = yes
				is_republic = yes
			}
		}
	}

	option = {
		name = EVTOPTA_SoA_5400

		add_trait_fully_silently_cruel_effect = yes
		wealth = 30

		FROM = {
			show_scope_change = no

			destroy_random_building = yes
			destroy_random_building = yes

			holder_scope = {
				any_courtier = {
					limit = { at_location = FROM }

					random = {
						chance = 50

						death = {
							death_reason = death_murder
							killer = ROOT
						}
					}
				}

				if = {
					limit = { at_location = FROM }

					random = {
						chance = 50

						death = {
							death_reason = death_murder
							killer = ROOT
						}
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTB_SoA_5400

		random = {
			chance = 30
			add_trait_fully_kind_effect = yes
		}
	}
}

### Replaced by Holy Fury events

# Shepherds' Crusade
# narrative_event = {
# 	id = SoA.5401
# 	title = EVTNAME_SoA_5401
# 	desc = EVTDESC_SoA_5401
# 	picture = GFX_evt_peasants
# 	border = GFX_event_narrative_frame_war
#
# 	only_playable = yes
# 	religion_group = christian
# 	war = yes
# 	has_dlc = "Sons of Abraham"
#
# 	trigger = {
# 		higher_real_tier_than = DUKE
# 		is_catholic_branch = yes
#
# 		any_war = {
# 			using_cb = crusade
# 		}
#
# 		NOR = {
# 			any_war = {
# 				OR = {
# 					using_cb = depose_liege
# 					using_cb = bid_for_independence
# 				}
# 			}
#
# 			has_global_flag = shepherds_crusade
# 		}
# 	}
#
# 	mean_time_to_happen = {
# 		months = 1000
# 	}
#
# 	immediate = {
# 		set_global_flag = shepherds_crusade
# 	}
#
# 	option = {
# 		name = EVTOPTA_SoA_5401
#
# 		trigger = {
# 			wealth >= 500
# 		}
#
# 		wealth = -500
# 	}
#
# 	option = {
# 		name = EVTOPTC_SoA_5401
#
# 		set_global_flag = shepherds_crusade_active
#
# 		hidden_effect = {
# 			random_realm_province = {
#				limit = { held_under_PREV = yes }
# 				save_event_target_as = shepherds_crusade_location
# 			}
#
# 			create_character = {
# 				random_traits = yes
# 				dynasty = none
# 				religion = ROOT
# 				culture = hungarian
# 				female = no
# 				age = 60
# 				add_trait = dutiful_cleric
# 				add_trait = zealous
# 			}
#
# 			new_character = {
#				set_christian_ascetic_effect = yes
# 				set_character_flag = shepherds_crusade_leader
# 				set_character_flag = special_marshal
# 				give_nickname = nick_the_master_of_hungary
# 				prestige = 50
# 				piety = 200
#
# 				create_title = {
# 					tier = DUKE
# 					landless = yes
# 					temporary = yes
# 					rebel = yes
# 					culture = event_target:shepherds_crusade_location
# 					name = SHEPHERDS_CRUSADE
# 					holder = THIS
# 				}
#
# 				while = {
# 					count = 3
#
# 					spawn_unit = {
# 						owner = THIS
# 						province = event_target:shepherds_crusade_location
# 						home = event_target:shepherds_crusade_location
# 						attrition = 1.0
# 						disband_on_peace = yes
#
# 						troops = {
# 							light_infantry = { 10000 10000 }
# 						}
# 					}
# 				}
#
# 				set_defacto_liege = ROOT
#
# 				reverse_war = {
# 					target = ROOT
# 					casus_belli = depose_liege
# 				}
#
# 				character_event = {
# 					id = SoA.5402 # Collapse which will come later
# 					years = 1
# 					random = 180
# 				}
# 			}
# 		}
# 	}
# }

# Shepherds crusade collapses
# character_event = {
# 	id = SoA.5402
#
# 	hide_window = yes
# 	is_triggered_only = yes
#
# 	immediate = {
# 		any_war = {
# 			limit = {
# 				attacker = { character = ROOT }
# 			}
#
# 			end_war = invalid
# 		}
#
# 		death = {
# 			death_reason = death_accident
# 		}
#
# 		clr_global_flag = shepherds_crusade_active
#
# 		FROM = {
# 			character_event = { id = SoA.5403 }
# 		}
# 	}
# }

# Notify player of Shepherds crusade collapse
# character_event = {
# 	id = SoA.5403
# 	desc = EVTDESC_SoA_5403
# 	picture = GFX_evt_stone_church
#
# 	is_triggered_only = yes
#
# 	option = {
# 		name = EVTOPTA_SoA_5403
# 	}
# }

# Shepherds' Crusade kills a local Jew or priest. Fired from 'on_siege_over_loc_chars'.
# Siege winner unit owner in the 'new_character' scope, lost holding title in FROM, local character in ROOT.
# character_event = {
# 	id = SoA.5406
#
# 	hide_window = yes
# 	is_triggered_only = yes
#
# 	trigger = {
# 		OR = {
# 			religion_group = jewish_group
# 			is_priest = yes
# 		}
#
# 		new_character = {
# 			rebel = yes
# 			has_character_flag = shepherds_crusade_leader
# 		}
# 	}
#
# 	immediate = {
# 		random = {
# 			chance = 50
#
# 			new_character = {
# 				ROOT = {
# 					death = {
# 						death_reason = death_rabble
# 						#killer = PREV
# 					}
# 				}
# 			}
#
# 			any_liege = { # Inform the victim's lieges
# 				character_event = { id = SoA.5409 }
# 			}
# 		}
# 	}
# }

# Liege notified of killing of character by Shepherds' Crusade
# character_event = {
# 	id = SoA.5409
# 	desc = EVTDESC_SoA_5409
# 	picture = GFX_evt_beheading
# 	border = GFX_event_normal_frame_war
#
# 	is_triggered_only = yes
#
# 	option = {
# 		name = EVTOPTA_SoA_5409
# 	}
# }

###########################################
#                                         #
# Religious tolerance events              #
# ID SoA.5410-SoA.                        #
#                                         #
###########################################

# Tolerant character making Christian friend
character_event = {
	id = SoA.5410
	desc = EVTDESC_SoA_5410
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, tolerance

	only_playable = yes
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		trait = sympathy_christendom

		any_courtier = {
			religion_group = christian
			is_adult = yes
			prisoner = no
			is_incapable = no
			NOT = { is_friend = ROOT }
		}
	}

	option = {
		name = EVTOPTA_SoA_5410

		random_courtier = {
			show_scope_change = no

			limit = {
				religion_group = christian
				is_adult = yes
				prisoner = no
				is_incapable = no
				NOT = { is_friend = ROOT }
			}

			add_friend = ROOT
		}
	}
}

# Tolerant character making Muslim friend
character_event = {
	id = SoA.5411
	desc = EVTDESC_SoA_5411
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, tolerance

	only_playable = yes
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		trait = sympathy_islam

		any_courtier = {
			religion_group = muslim
			is_adult = yes
			prisoner = no
			is_incapable = no
			NOT = { is_friend = ROOT }
		}
	}

	option = {
		name = EVTOPTA_SoA_5411

		random_courtier = {
			show_scope_change = no

			limit = {
				religion_group = muslim
				is_adult = yes
				prisoner = no
				is_incapable = no
				NOT = { is_friend = ROOT }
			}

			add_friend = ROOT
		}
	}
}

# Tolerant character making Pagan friend
character_event = {
	id = SoA.5412
	desc = EVTDESC_SoA_5412
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, tolerance

	only_playable = yes
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		trait = sympathy_pagans

		any_courtier = {
			religion_group = pagan_group
			is_adult = yes
			prisoner = no
			is_incapable = no
			NOT = { is_friend = ROOT }
		}
	}

	option = {
		name = EVTOPTA_SoA_5412

		random_courtier = {
			show_scope_change = no

			limit = {
				religion_group = pagan_group
				is_adult = yes
				prisoner = no
				is_incapable = no
				NOT = { is_friend = ROOT }
			}

			add_friend = ROOT
		}
	}
}

# Tolerant character making Zoroastrian friend
character_event = {
	id = SoA.5413
	desc = EVTDESC_SoA_5413
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, tolerance

	only_playable = yes
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		trait = sympathy_zoroastrianism

		any_courtier = {
			religion_group = zoroastrian_group
			is_adult = yes
			prisoner = no
			is_incapable = no
			NOT = { is_friend = ROOT }
		}
	}

	option = {
		name = EVTOPTA_SoA_5413

		random_courtier = {
			show_scope_change = no

			limit = {
				religion_group = zoroastrian_group
				is_adult = yes
				prisoner = no
				is_incapable = no
				NOT = { is_friend = ROOT }
			}

			add_friend = ROOT
		}
	}
}

# Tolerant character making Jewish friend
character_event = {
	id = SoA.5414
	desc = EVTDESC_SoA_5414
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, tolerance

	only_playable = yes
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		trait = sympathy_judaism

		any_courtier = {
			religion_group = jewish_group
			is_adult = yes
			prisoner = no
			is_incapable = no
			NOT = { is_friend = ROOT }
		}
	}

	option = {
		name = EVTOPTA_SoA_5414

		random_courtier = {
			show_scope_change = no

			limit = {
				religion_group = jewish_group
				is_adult = yes
				prisoner = no
				is_incapable = no
				NOT = { is_friend = ROOT }
			}

			add_friend = ROOT
		}
	}
}

# Zealous character insults other religions
character_event = {
	id = SoA.5420
	desc = EVTDESC_SoA_5420
	picture = GFX_evt_scandal
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, tolerance

	only_playable = yes
	has_dlc = "Sons of Abraham"
	min_age = 16
	only_capable = yes
	prisoner = no

	trigger = {
		higher_real_tier_than = COUNT
		trait = zealous
		trait = wroth
		diplomacy < 5

		any_realm_character = {
			NOT = { religion_group = ROOT }
			prisoner = no
			is_adult = yes
			is_incapable = no
			NOT = { is_friend = ROOT }
		}
	}

	option = {
		name = EVTOPTA_SoA_5420

		custom_tooltip = {
			text = insulted_realm_infidels

			any_realm_character = {
				limit = {
					NOT = { religion_group = ROOT }
					is_adult = yes
					prisoner = no
					is_incapable = no
					NOT = { is_friend = ROOT }
				}

				opinion = {
					name = insulted
					who = ROOT
					years = 1
				}
			}
		}
	}
}

# Muslim tolerance towards Judaism and Christianity
character_event = {
	id = SoA.5425
	desc = EVTDESC_SoA_5425
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes # on_bi_yearly_pulse, random_events, muslim_tolerance

	only_rulers = yes
	religion_group = muslim
	min_age = 16
	prisoner = no
	only_capable = yes

	trigger = {
		NAND = {
			trait = sympathy_judaism
			trait = sympathy_christendom
		}

		NOR = {
			trait = zealous
			trait = holy_warrior
			trait = ashari
			trait = mujahid

			has_alternate_start_parameter = {
				key = religion_names
				value = random
			}
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 2
			trait = cynical
		}
		modifier = {
			factor = 2
			trait = mutazilite
		}
	}

	option = {
		name = EVTOPTA_SoA_5425

		if = {
			limit = {
				NOT = { trait = sympathy_judaism }
			}

			add_trait = sympathy_judaism
		}

		if = {
			limit = {
				NOT = { trait = sympathy_christendom }
			}

			add_trait = sympathy_christendom
		}
	}
}