###################################
#
# Events for Decadence in Muslim Dynasties
#
# Id 91000 - 91499 reserved
#
###################################

### Decadence Trait-Based Events

# Written by Henrik Eklund

### Raises Decadence

# Drunkard
character_event = {
	id = 91200
	desc = "EVTDESC91200"
	picture = "GFX_evt_drunk"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = drunkard
		NOT = { has_character_flag = decadence_drunkard }
	}

	mean_time_to_happen = {
		months = 200
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91200"
		piety = -50
		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 }
			}
		}
		set_character_flag = decadence_drunkard
		set_character_flag = decadence_change
	}
}

# Homosexual
character_event = {
	id = 91201
	desc = "EVTDESC91201"
	picture = "GFX_evt_carriage"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = homosexual
		NOT = { has_character_flag = decadence_homosexual }
	}

	mean_time_to_happen = {
		months = 200
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91201"
		piety = -50
		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 }
			}
		}
		set_character_flag = decadence_homosexual
		set_character_flag = decadence_change
	}
}

# Hedonist
character_event = {
	id = 91202
	desc = "EVTDESC91202"
	picture = "GFX_evt_lunatic"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = hedonist
		NOT = { has_character_flag = decadence_hedonist }
	}

	mean_time_to_happen = {
		months = 200
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91202"
		piety = -50
		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 }
			}
		}
		set_character_flag = decadence_hedonist
		set_character_flag = decadence_change
	}
}

# Impaler
character_event = {
	id = 91203
	desc = "EVTDESC91203"
	picture = "GFX_evt_torture"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = impaler
		NOT = { has_character_flag = decadence_impaler }
	}

	mean_time_to_happen = {
		months = 200
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91203"
		piety = -50
		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 }
			}
		}
		set_character_flag = decadence_impaler
		set_character_flag = decadence_change
	}
}

# Lustful
character_event = {
	id = 91204
	desc = "EVTDESC91204"
	picture = "GFX_evt_sultan"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = lustful
		NOT = { trait = homosexual }
		NOT = { has_character_flag = decadence_lustful }
	}

	mean_time_to_happen = {
		months = 200
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91204"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_lustful
		set_character_flag = decadence_change
	}
}

# Gluttonous
character_event = {
	id = 91205
	desc = "EVTDESC91205"
	picture = "GFX_evt_feast"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = gluttonous
		NOT = { has_character_flag = decadence_gluttonous }
	}

	mean_time_to_happen = {
		months = 200
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91205"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_gluttonous
		set_character_flag = decadence_change
	}
}

# Greedy
character_event = {
	id = 91206
	desc = "EVTDESC91206"
	picture = "GFX_evt_jugglers"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = greedy
		NOT = { has_character_flag = decadence_greedy }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91206"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_greedy
		set_character_flag = decadence_change
	}
}

# Slothful
character_event = {
	id = 91207
	desc = "EVTDESC91207"
	picture = "GFX_evt_carriage"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = slothful
		NOT = { has_character_flag = decadence_slothful }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91207"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_slothful
		set_character_flag = decadence_change
	}
}

# Envious
character_event = {
	id = 91208
	desc = "EVTDESC91208"
	picture = "GFX_evt_throne_room"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = envious
		NOT = { has_character_flag = decadence_envious }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91208"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_envious
		set_character_flag = decadence_change
	}
}

# Wroth
character_event = {
	id = 91209
	desc = "EVTDESC91209"
	picture = "GFX_evt_burning_house"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = wroth
		NOT = { has_character_flag = decadence_wroth }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91209"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_wroth
		set_character_flag = decadence_change
	}
}

# Proud
character_event = {
	id = 91210
	desc = "EVTDESC91210"
	picture = "GFX_evt_market"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = proud
		NOT = { has_character_flag = decadence_proud }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91210"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_proud
		set_character_flag = decadence_change
	}
}

# Deceitful
character_event = {
	id = 91211
	desc = "EVTDESC91211"
	picture = "GFX_evt_lunatic"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = deceitful
		NOT = { has_character_flag = decadence_deceitful }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91211"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_deceitful
		set_character_flag = decadence_change
	}
}

# Craven
character_event = {
	id = 91212
	desc = "EVTDESC91212"
	picture = "GFX_evt_throne_room"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = craven
		NOT = { has_character_flag = decadence_craven }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91212"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_craven
		set_character_flag = decadence_change
	}
}

# Content
character_event = {
	id = 91213
	desc = "EVTDESC91213"
	picture = "GFX_evt_child_talking"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = content
		NOT = { has_character_flag = decadence_content }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91213"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_content
		set_character_flag = decadence_change
	}
}

# Arbitrary
character_event = {
	id = 91214
	desc = "EVTDESC91214"
	picture = "GFX_evt_throne_room"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = arbitrary
		NOT = { has_character_flag = decadence_arbitrary }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91214"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_arbitrary
		set_character_flag = decadence_change
	}
}

# Cynical
character_event = {
	id = 91215
	desc = "EVTDESC91215"
	picture = "GFX_evt_bishop_muslim"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = cynical
		NOT = { has_character_flag = decadence_cynical }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91215"
		piety = -50
		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 }
			}
		}
		set_character_flag = decadence_cynical
		set_character_flag = decadence_change
	}
}

# Paranoid
character_event = {
	id = 91216
	desc = "EVTDESC91216"
	picture = "GFX_evt_carriage"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = paranoid
		NOT = { has_character_flag = decadence_paranoid }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91216"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_paranoid
		set_character_flag = decadence_change
	}
}

# Cruel
character_event = {
	id = 91217
	desc = "EVTDESC91217"
	picture = "GFX_evt_lunatic"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = cruel
		NOT = { has_character_flag = decadence_cruel }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91217"
		piety = -25
		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 }
			}
		}
		set_character_flag = decadence_cruel
		set_character_flag = decadence_change
	}
}

### Lowers Decadence

# Genius
character_event = {
	id = 91218
	desc = "EVTDESC91218"
	picture = "GFX_evt_monk_muslim"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		is_smart_trigger = yes
		NOT = { has_character_flag = decadence_genius }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91218"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_genius
		set_character_flag = decadence_change
	}
}

# Celibate
character_event = {
	id = 91219
	desc = "EVTDESC91219"
	picture = "GFX_evt_bishop_muslim"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = celibate
		NOT = { has_character_flag = decadence_celibate }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91219"
		piety = 50
		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 }
			}
		}
		set_character_flag = decadence_celibate
		set_character_flag = decadence_change
	}
}

# Scholar
character_event = {
	id = 91220
	desc = "EVTDESC91220"
	picture = "GFX_evt_monk_muslim"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = scholar
		NOT = { has_character_flag = decadence_scholar }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91220"
		piety = 50
		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 }
			}
		}
		set_character_flag = decadence_scholar
		set_character_flag = decadence_change
	}
}

# Chaste
character_event = {
	id = 91221
	desc = "EVTDESC91221"
	picture = "GFX_evt_birth"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = chaste
		NOT = { has_character_flag = decadence_chaste }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91221"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_chaste
		set_character_flag = decadence_change
	}
}

# Temperate
character_event = {
	id = 91222
	desc = "EVTDESC91222"
	picture = "GFX_evt_emissary"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = temperate
		NOT = { has_character_flag = decadence_temperate }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91222"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_temperate
		set_character_flag = decadence_change
	}
}

# Charitable
character_event = {
	id = 91223
	desc = "EVTDESC91223"
	picture = "GFX_evt_burning_house"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = charitable
		NOT = { has_character_flag = decadence_charitable }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91223"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_charitable
		set_character_flag = decadence_change
	}
}

# Diligent
character_event = {
	id = 91224
	desc = "EVTDESC91224"
	picture = "GFX_evt_monk_muslim"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = diligent
		NOT = { has_character_flag = decadence_diligent }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91224"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_diligent
		set_character_flag = decadence_change
	}
}

# Kind
character_event = {
	id = 91225
	desc = "EVTDESC91225"
	picture = "GFX_evt_emissary"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = kind
		NOT = { has_character_flag = decadence_kind }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91225"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_kind
		set_character_flag = decadence_change
	}
}

# Patient
character_event = {
	id = 91226
	desc = "EVTDESC91226"
	picture = "GFX_evt_throne_room"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = patient
		NOT = { has_character_flag = decadence_patient }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91226"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_patient
		set_character_flag = decadence_change
	}
}

# Humble
character_event = {
	id = 91227
	desc = "EVTDESC91227"
	picture = "GFX_evt_desert"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = humble
		NOT = { has_character_flag = decadence_humble }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91227"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_humble
		set_character_flag = decadence_change
	}
}

# Honest
character_event = {
	id = 91228
	desc = "EVTDESC91228"
	picture = "GFX_evt_emissary"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = honest
		NOT = { has_character_flag = decadence_honest }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91228"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_honest
		set_character_flag = decadence_change
	}
}

# Brave
character_event = {
	id = 91229
	desc = "EVTDESC91229"
	picture = "GFX_evt_moors"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = brave
		NOT = { has_character_flag = decadence_brave }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91229"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_brave
		set_character_flag = decadence_change
	}
}

# Ambitious
character_event = {
	id = 91230
	desc = "EVTDESC91230"
	picture = "GFX_evt_throne_room"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = ambitious
		NOT = { has_character_flag = decadence_ambitious }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91230"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_ambitious
		set_character_flag = decadence_change
	}
}

# Just
character_event = {
	id = 91231
	desc = "EVTDESC91231"
	picture = "GFX_evt_bishop_muslim"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = just
		NOT = { has_character_flag = decadence_just }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91231"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_just
		set_character_flag = decadence_change
	}
}

# Zealous
character_event = {
	id = 91232
	desc = "EVTDESC91232"
	picture = "GFX_evt_bishop_muslim"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = zealous
		NOT = { has_character_flag = decadence_zealous }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91232"
		piety = 50
		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 }
			}
		}
		set_character_flag = decadence_zealous
		set_character_flag = decadence_change
	}
}

# Mujahid
character_event = {
	id = 91233
	desc = "EVTDESC91233"
	picture = "GFX_evt_battle"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = mujahid
		NOT = { has_character_flag = decadence_mujahid }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91233"
		piety = 50
		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 }
			}
		}
		set_character_flag = decadence_mujahid
		set_character_flag = decadence_change
	}
}

# Hafiz
character_event = {
	id = 91234
	desc = "EVTDESC91234"
	picture = "GFX_evt_monk_muslim"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = hafiz
		NOT = { has_character_flag = decadence_hafiz }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91234"
		piety = 50
		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 }
			}
		}
		set_character_flag = decadence_hafiz
		set_character_flag = decadence_change
	}
}

# Hajjaj
character_event = {
	id = 91235
	desc = "EVTDESC91235"
	picture = "GFX_evt_kaaba"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		trait = hajjaj
		NOT = { has_character_flag = decadence_hajjaj }
	}

	mean_time_to_happen = {
		months = 300
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 2.0
			has_character_flag = decadence_change
			NOT = {
				had_character_flag = {
					flag = decadence_change
					days = 1825
				}
			}
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA91235"
		piety = 25
		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 }
			}
		}
		set_character_flag = decadence_hajjaj
		set_character_flag = decadence_change
	}
}

# Long period of peace
character_event = {
	id = 92000
	desc = "EVTDESC92000"
	picture = "GFX_evt_carriage"

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

	trigger = {
		OR = { higher_tier_than = baron is_patrician = yes }
		check_variable = { which = "years_of_peace" value = 9.5 }
		war = no
	}

	mean_time_to_happen = {
		months = 600
		modifier = {
			factor = 2.0
			always = no
		}
		modifier = {
			factor = 0.5
			check_variable = { which = "years_of_peace" value = 14.5 }
		}
		modifier = {
			factor = 0.5
			check_variable = { which = "years_of_peace" value = 19.5 }
		}
		modifier = {
			factor = 0.75
			tier = emperor
		}
		modifier = {
			factor = 0.9
			tier = king
		}
		modifier = {
			factor = 2.0
			tier = count
		}
	}

	option = {
		name = "EVTOPTA92000"
		piety = -50
		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 }
			}
		}
	}
}

# IMPORTANT EVENT
# Muslim gains the Decadent Trait
character_event = {
	id = 91300
	desc = EVTDESC91300
	picture = GFX_evt_sultan
	
	only_men = yes
	min_age = 16
	capable_only = yes
	prisoner = no
	religion_group = muslim
	
	trigger = {
		any_dynasty_member = { is_alive = yes count = 3 } # Does not trigger for tiny dynasties
		lower_tier_than = KING
		holy_order = no
		is_offmap_ruler = no
		NOR = {
			trait = decadent
			trait = zealous
			trait = mujahid
		}
		OR = {
			trait = lunatic
			trait = possessed
			trait = drunkard
			trait = homosexual
			trait = hedonist
			trait = impaler
			calc_true_if = {
				amount = 2
				trait = gluttonous
				trait = lustful
				trait = greedy
				trait = slothful
				trait = envious
				trait = wroth
				trait = proud
				trait = deceitful
				trait = craven
				trait = content
				trait = arbitrary
				trait = cynical
				trait = paranoid
				trait = cruel
			}
		}
		biggest_realm_size_relative = {
			NOT = { character = PREV }
			realm_size = 5
			same_realm = ROOT
		}
		NOR = {
			AND = {
				has_character_flag = was_straightened_up
				NOT = { had_character_flag = { flag = was_straightened_up days = 3650 } }
			}
			dynasty_head = { has_opinion_modifier = { who = ROOT modifier = opinion_straightened_up } }
			any_liege = {
 				dynasty = ROOT
				any_dynasty_member = {
					is_alive = yes
					trait = decadent
					count = 20
				}
			}
		}
	}
	
	mean_time_to_happen = {
		months = 60
		modifier = {
			factor = 0.5
			trait = indulgent_wastrel
		}
		modifier = {
			factor = 0.75
			trait = naive_appeaser
		}
		modifier = {
			factor = 0.75
			trait = amateurish_plotter
		}
		modifier = {
			factor = 0.1
			trait = hedonist
		}
		modifier = {
			factor = 0.5
			trait = homosexual
		}
		modifier = {
			factor = 0.5
			trait = gluttonous
		}
		modifier = {
			factor = 0.5
			trait = lustful
		}
		modifier = {
			factor = 0.1
			trait = bad_priest_muslim
		}
		modifier = {
			factor = 0.75
			trait = cynical
		}
		modifier = {
			factor = 0.75
			trait = arbitrary
		}
		modifier = {
			factor = 0.25
			trait = drunkard
		}
		modifier = {
			factor = 0.75
			trait = impaler
		}
		modifier = {
			factor = 0.75
			trait = greedy
		}
		modifier = {
			factor = 0.75
			trait = slothful
		}
		modifier = {
			factor = 0.75
			trait = envious
		}
		modifier = {
			factor = 0.75
			trait = wroth
		}
		modifier = {
			factor = 0.75
			trait = proud
		}
		modifier = {
			factor = 0.75
			trait = deceitful
		}
		modifier = {
			factor = 0.75
			trait = craven
		}
		modifier = {
			factor = 0.75
			trait = content
		}
		modifier = {
			factor = 0.75
			trait = paranoid
		}
		modifier = {
			factor = 0.75
			trait = cruel
		}
		modifier = {
			factor = 0.75
			OR = {
				trait = slow
				trait = dull
			}
		}
		modifier = {
			factor = 0.5
			trait = imbecile
		}
		modifier = {
			factor = 0.5
			trait = inbred
		}
		modifier = {
			factor = 2.0
			trait = detached_priest
		}
		modifier = {
			factor = 4.0
			trait = martial_cleric
		}
		modifier = {
			factor = 8.0
			trait = scholarly_theologian
		}
		modifier = {
			factor = 10.0
			trait = mastermind_theologian
		}
		modifier = {
			factor = 10.0
			trait = ashari
		}
		modifier = {
			factor = 5.0
			trait = temperate
		}
		modifier = {
			factor = 5.0
			trait = hafiz
		}
		modifier = {
			factor = 5.0
			trait = celibate
		}
		modifier = {
			factor = 3.0
			trait = chaste
		}
		modifier = {
			factor = 3.0
			trait = just
		}
		modifier = {
			factor = 3.0
			trait = diligent
		}
		modifier = {
			factor = 2.0
			trait = faqih
		}
		modifier = {
			factor = 2.0
			trait = genius
		}
		modifier = {
			factor = 2.0
			trait = humble
		}
		modifier = {
			factor = 1.25
			trait = scholar
		}
		modifier = {
			factor = 1.25
			trait = charitable
		}
		modifier = {
			factor = 1.25
			trait = kind
		}
		modifier = {
			factor = 1.25
			trait = patient
		}
		modifier = {
			factor = 1.25
			trait = honest
		}
		modifier = {
			factor = 1.25
			trait = brave
		}
		modifier = {
			factor = 1.25
			trait = ambitious
		}
		modifier = {
			factor = 2.5
			tier = BARON
		}
		modifier = {
			factor = 5.0
			tier = COUNT
		}
		modifier = {
			factor = 10.0
			tier = DUKE
		}
		modifier = {
			factor = 0.75
			highest_ranked_relative = {
				tier = KING
			}
		}
		modifier = {
			factor = 0.5
			highest_ranked_relative = {
				tier = EMPEROR
			}
		}
		modifier = {
			factor = 0.75
			biggest_realm_size_relative = {
				realm_size = 150
			}
		}
		modifier = {
			factor = 0.5
			biggest_realm_size_relative = {
				realm_size = 250
			}
		}
		modifier = {
			factor = 0.9
			any_dynasty_member = { is_alive = yes count = 25 }
		}
		modifier = {
			factor = 0.9
			any_dynasty_member = { is_alive = yes count = 50 }
		}
		modifier = {
			factor = 0.9
			any_dynasty_member = { is_alive = yes count = 75 }
		}
		modifier = {
			factor = 0.9
			any_dynasty_member = { is_alive = yes count = 100 }
		}
		modifier = {
			factor = 1.2
			dynasty_head = {
				any_dynasty_member = {
					is_alive = yes
					trait = decadent
					count = 8
				}
			}
		}
		modifier = {
			factor = 1.5
			dynasty_head = {
				any_dynasty_member = {
					is_alive = yes
					trait = decadent
					count = 12
				}
			}
		}
		modifier = {
			factor = 2.0
			dynasty_head = {
				any_dynasty_member = {
					is_alive = yes
					trait = decadent
					count = 16
				}
			}
		}
	}
	
	option = {
		name = EVTOPTA91300
		add_trait = decadent
		piety = -50
		hidden_tooltip = {
			random_dynasty_member  = {
				limit = {
					is_vassal_or_below = ROOT
					OR = {
 						independent = yes
 						NOT = { any_dynasty_member = { is_vassal_or_below = PREV } }
					}
				}
				if = {
					limit = { ai = no }
					character_event = { id = 91370 days = 1 }
				}
			}
		}
	}
}

# Muslim ruler tries to convince a dynasty member to lose the 'Decadent' Trait
# Fired from decision "convince_to_straighten_up"
character_event = {
	id = 91350
	desc = EVTDESC91350
	picture = GFX_evt_council
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91350 # Refuse
		ai_chance = {
			factor = 25
			modifier = {
				factor = 2
				NOT = {
					personal_opinion = {
						who = FROMFROM
						value = 0
					}
				}
			}
			modifier = {
				factor = 2
				NOT = {
					personal_opinion = {
						who = FROMFROM
						value = -25
					}
				}
			}
			modifier = {
				factor = 4
				NOT = {
					personal_opinion = {
						who = FROMFROM
						value = -50
					}
				}
			}
			modifier = {
				factor = 3
				is_ruler = yes
			}
			modifier = {
				factor = 3
				higher_tier_than = COUNT
			}
			modifier = {
				factor = 3
				higher_tier_than = DUKE
			}
			modifier = {
				factor = 10
				OR = {
					trait = lunatic
					trait = possessed
				}
			}
			modifier = {
				factor = 4
				trait = imbecile
			}
			modifier = {
				factor = 4
				trait = hedonist
			}
			modifier = {
				factor = 4
				trait = proud
			}
			modifier = {
				factor = 4
				trait = paranoid
			}
			modifier = {
				factor = 2
				OR = {
					trait = slow
					trait = dull
				}
			}
			modifier = {
				factor = 2
				trait = wroth
			}
			modifier = {
				factor = 2
				trait = gluttonous
			}			
			modifier = {
				factor = 2
				trait = slothful
			}
			modifier = {
				factor = 2
				trait = drunkard
			}
			modifier = {
				factor = 2
				trait = brave
			}
			modifier = {
				factor = 1.5
				diplomacy = 12
			}
			modifier = {
				factor = 1.5
				learning = 12
			}
			modifier = {
				factor = 1.5
				intrigue = 12
			}
		}
		FROMFROM = {
			character_event = {
				id = 91351
				days = 3
				tooltip = EVTTOOLTIP91351
			}
		}
	}
	option = {
		name = EVTOPTB91350 # Accept
		ai_chance = {
			factor = 5
			modifier = {
				factor = 2
				personal_opinion = {
					who = FROMFROM
					value = 25
				}
			}
			modifier = {
				factor = 2
				personal_opinion = {
					who = FROMFROM
					value = 50
				}
			}
			modifier = {
				factor = 2
				personal_opinion = {
					who = FROMFROM
					value = 75
				}
			}
			modifier = {
				factor = 4
				trait = temperate
			}
			modifier = {
				factor = 4
				trait = craven
			}
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 2
				trait = patient
			}
			modifier = {
				factor = 2
				trait = diligent
			}
			modifier = {
				factor = 2
				trait = trusting
			}
		}
		FROMFROM = {
			character_event = {
				id = 91352
				days = 3
				tooltip = EVTTOOLTIP91352
			}
		}
		piety = 25
		prestige = -100
		remove_trait = decadent
	}
}

# The decadent character refuses
character_event = {
	id = 91351
	desc = EVTDESC91351
	picture = GFX_evt_feast
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91351 # Denounce
		ai_chance = {
			factor = 1
		}
		opinion = {
			modifier = opinion_takfir
			who = FROM
			months = 240
		}	
		hidden_tooltip = {
			any_dynasty_member = {
				limit = {
					is_playable = yes
					NOT = { trait = decadent }
					NOT = { character = FROM }
				}
				opinion = {
					modifier = opinion_takfir
					who = FROM
					months = 240
				}
				character_event = {
					id = 91369
					days = 1
				}
			}
		}
	}
	option = {
		name = EVTOPTB91351 # Convince (diplo)
		ai_chance = {
			factor = 100
		}
		tooltip_info = diplomacy
		trigger = {
			diplomacy = 12
		}
		FROM = {
			character_event = {
				id = 91355
				days = 3
				tooltip = EVTTOOLTIP91355
			}
		}
	}
	option = {
		name = EVTOPTC91351 # Theological Debate (learning)
		ai_chance = {
			factor = 100
		}
		tooltip_info = learning
		trigger = {
			learning = 12
			religion = FROM
		}
		FROM = {
			character_event = {
				id = 91360
				days = 3
				tooltip = EVTTOOLTIP91360
			}
		}
	}
	option = {
		name = EVTOPTD91351 # Threaten (intrigue)
		ai_chance = {
			factor = 100
		}
		tooltip_info = intrigue
		trigger = {
			intrigue = 12
		}
		FROM = {
			character_event = {
				id = 91365
				days = 3
				tooltip = EVTTOOLTIP91365
			}
		}
	}
	option = {
		name = EVTOPTE91351 # Demand because of favor
		custom_tooltip = { text = EVTOPTE91351_TOOLTIP }
		ai_chance = { factor = 30 } 

		trigger = { holds_favor_on = FROM }

		remove_favor = FROM

		FROM = { character_event = { id = 91378 days = 5 } }
	}
}

# The decadent character accepts at once
character_event = {
	id = 91352
	desc = EVTDESC91352
	picture = GFX_evt_council
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91352
		FROM = { set_character_flag = was_straightened_up }
		opinion = {
			modifier = opinion_straightened_up
			who = FROM
			years = 100
		}
	}
}

# Attempt at diplomatic persuasion
character_event = {
	id = 91355
	desc = EVTDESC91355
	picture = GFX_evt_council
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91355 # Refuse
		ai_chance = {
			factor = 10
			modifier = {
				factor = 4
				trait = imbecile
			}
			modifier = {
				factor = 4
				trait = proud
			}
			modifier = {
				factor = 2
				trait = hedonist
			}
			modifier = {
				factor = 2
				OR = {
					trait = slow
					trait = dull
				}
			}
			modifier = {
				factor = 2
				trait = wroth
			}
			modifier = {
				factor = 2
				trait = drunkard
			}
			modifier = {
				factor = 2
				trait = brave
			}
		}
		FROM = {
			character_event = {
				id = 91356
				days = 3
				tooltip = EVTTOOLTIP91351
			}
		}
		prestige = -100
	}
	option = {
		name = EVTOPTB91355 # Accept
		ai_chance = {
			factor = 10
			modifier = {
				factor = 4
				trait = craven
			}
			modifier = {
				factor = 2
				trait = temperate
			}
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 2
				trait = trusting
			}
			modifier = {
				factor = 0.5
				is_ruler = yes
				lower_tier_than = DUKE
			}
			modifier = {
				factor = 0.1
				OR = {
					diplomacy = 12
					learning = 12
					intrigue = 12
					higher_tier_than = COUNT
				}
			}
		}
		FROM = {
			character_event = {
				id = 91357
				days = 3
				tooltip = EVTTOOLTIP91352
			}
		}
		remove_trait = decadent
	}
	option = {
		name = EVTOPTC91355 # Bribe (diplo)
		trigger = {
			diplomacy = 12
		}
		ai_chance = {
			factor = 100
		}
		tooltip_info = diplomacy
		FROM = {
			character_event = {
				id = 91372
				days = 3
			}
		}
	}
	option = {
		name = EVTOPTD91355 # Engage in theological debate (learning)
		trigger = {
			learning = 12
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 10
				OR = {
					trait = scholar
					trait = faqih
					trait = theologian
				}
			}
		}
		tooltip_info = learning
		FROM = {
			character_event = {
				id = 91373
				days = 3
			}
		}
	}	
	option = {
		name = EVTOPTE91355 # Seduce wife (intrigue)
		trigger = {
			FROM = { is_married = yes }
			OR = {
				intrigue = 12
				trait = seducer
				AND = {
					trait = fair
					intrigue = 8
				}
			}
			NOR = {
				trait = chaste
				trait = celibate
				trait = eunuch
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				NOR = {
					trait = lustful
					trait = hedonist
					trait = seducer
					trait = deceitful
					trait = cruel
				}
			}
		}
		tooltip_info = intrigue
		FROM = {
			random_spouse = {
				character_event = {
					id = 91374
					days = 3
				}
			}
		}
	}
}

# The decadent character refuses the diplomatic attempt
character_event = {
	id = 91356
	desc = EVTDESC91356
	picture = GFX_evt_jugglers
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91351 # Denounce
		opinion = {
			modifier = opinion_takfir
			who = FROM
			months = 240
		}	
		hidden_tooltip = {
			any_dynasty_member = {
				limit = {
					is_playable = yes
					NOT = { trait = decadent }
					NOT = { character = FROM }
				}
				opinion = {
					modifier = opinion_takfir
					who = FROM
					months = 240
				}
				character_event = {
					id = 91369
					days = 1
				}
			}
		}
	}
}

# The decadent character folds after the diplomatic attempt
character_event = {
	id = 91357
	desc = EVTDESC91357
	picture = GFX_evt_council
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91352
		FROM = { set_character_flag = was_straightened_up }
		opinion = {
			modifier = opinion_straightened_up
			who = FROM
			years = 100
		}
	}
}

# Attempt at religious persuasion
character_event = {
	id = 91360
	desc = EVTDESC91360
	picture = GFX_evt_bishop_muslim
	
	is_triggered_only = yes
	
	immediate = {
		random_independent_ruler = {
			limit = {
				religion = ROOT
				holy_order_not_expelled_trigger = yes
			}
			random_demesne_title = {
				limit = { holy_order = yes }
				save_event_target_as = join_holy_order
				break = yes
			}
		}
		random_independent_ruler = {
			limit = {
				any_realm_lord = {
					religion = ROOT
					NOT = { any_liege = { character = FROM } }
					holy_order_not_expelled_trigger = yes
				}
			}
			random_realm_lord = {
				limit = {
					religion = ROOT
					holy_order_not_expelled_trigger = yes
				}
				random_demesne_title = {
					limit = { holy_order = yes }
					save_event_target_as = join_holy_order
				}
			}
		}
	}
	
	option = {
		name = EVTOPTA91360 # Refuse
		ai_chance = {
			factor = 10
			modifier = {
				factor = 4
				trait = imbecile
			}
			modifier = {
				factor = 4
				trait = proud
			}
			modifier = {
				factor = 2
				trait = hedonist
			}
			modifier = {
				factor = 2
				OR = {
					trait = slow
					trait = dull
				}
			}
			modifier = {
				factor = 2
				trait = wroth
			}
			modifier = {
				factor = 2
				trait = drunkard
			}
			modifier = {
				factor = 2
				trait = brave
			}
		}
		FROM = {
			character_event = {
				id = 91356
				days = 3
				tooltip = EVTTOOLTIP91351
			}
		}
		piety = -100
	}
	option = {
		name = EVTOPTB91360 # Join a holy order	
		trigger = {
			is_ruler = no
			event_target:join_holy_order = { always = yes }
		}	
		ai_chance = {
			factor = 10
			modifier = {
				factor = 4
				trait = craven
			}
			modifier = {
				factor = 2
				trait = temperate
			}
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 2
				trait = trusting
			}
			modifier = {
				factor = 0.1
				OR = {
					trait = cynical
					diplomacy = 12
					learning = 12
					intrigue = 12
					any_spouse = { reverse_opinion = { who = ROOT value = 90 } }
				}
			}
		}
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = 91361
					days = 3
				}
			}
		}
		remove_trait = decadent
		piety = 100
		if = {
			limit = { has_character_modifier = estates_1 }
			remove_character_modifier = estates_1
			wealth = 40
		}
		if = {
			limit = { has_character_modifier = estates_2 }
			remove_character_modifier = estates_2
			wealth = 80
		}
		if = {
			limit = { has_character_modifier = estates_3 }
			remove_character_modifier = estates_3
			wealth = 120
		}
		if = {
			limit = { has_character_modifier = estates_4 }
			remove_character_modifier = estates_4
			wealth = 160
		}
		if = {
			limit = { has_character_modifier = estates_5 }
			remove_character_modifier = estates_5
			wealth = 200
		}
		any_spouse = {
			remove_spouse = ROOT
			hidden_tooltip = { character_event = { id = 91377 } }
		}
		event_target:join_holy_order = {
			holder_scope = {
				ROOT = {
					move_character = PREV
					transfer_scaled_wealth = { to = PREV value = all }
					any_child = {
						limit = {
							is_adult = no
							at_location = ROOT
						}
						move_character = FROM
					}
					end_inaccessibility_effect = yes					
				}
			}
		}
	}
	option = {
		name = EVTOPTD91360 # Go on Hajj
		trigger = {
			is_ruler = yes
			has_regent = no
			NOR = {
				trait = hajjaj
				trait = on_hajj
				trait = infirm
				trait = blinded
				is_ill = yes
				religion = druze
			}
		}
		ai_chance = {
			factor = 10
			modifier = {
				factor = 4
				trait = craven
			}
			modifier = {
				factor = 2
				trait = temperate
			}
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 2
				trait = trusting
			}
			modifier = {
				factor = 0.5
				is_ruler = yes
				lower_tier_than = DUKE
			}
			modifier = {
				factor = 0.1
				OR = {
					trait = cynical
					diplomacy = 12
					learning = 12
					intrigue = 12
					higher_tier_than = COUNT
				}
			}
		}
		remove_trait = decadent
		piety = 50		
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = 91362
					days = 3
				}
			}
		}
		clr_character_flag = promise_hajj
		set_character_flag = activated_hajj
		hidden_tooltip = {
			letter_event = { 
				id = 86000
			}
		}
	}
	option = {
		name = EVTOPTC91355 # Bribe (diplo)
		trigger = {
			diplomacy = 12
		}
		ai_chance = {
			factor = 100
		}
		tooltip_info = diplomacy
		FROM = {
			character_event = {
				id = 91372
				days = 3
			}
		}
	}
	option = {
		name = EVTOPTD91355 # Engage in theological debate (learning)
		trigger = {
			learning = 12
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 10
				OR = {
					trait = scholar
					trait = faqih
					trait = theologian
				}
			}
		}
		tooltip_info = learning
		FROM = {
			character_event = {
				id = 91373
				days = 3
			}
		}
	}
	option = {
		name = EVTOPTE91355 # Seduce wife (intrigue)
		trigger = {
			FROM = { is_married = yes }
			OR = {
				intrigue = 12
				trait = seducer
				AND = {
					trait = fair
					intrigue = 8
				}
			}
			NOR = {
				trait = chaste
				trait = celibate
				trait = eunuch
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				NOR = {
					trait = lustful
					trait = hedonist
					trait = seducer
					trait = deceitful
					trait = cruel
				}
			}
		}
		tooltip_info = intrigue
		FROM = {
			random_spouse = {
				character_event = {
					id = 91374
					days = 3
				}
			}
		}
	}
}

# The decadent character joined a holy order
character_event = {
	id = 91361
	desc = EVTDESC91361
	picture = GFX_evt_melee
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91361
		FROM = { set_character_flag = was_straightened_up }
		opinion = {
			modifier = opinion_straightened_up
			who = FROM
			years = 100
		}
	}
}

# The decadent character went on the Hajj
character_event = {
	id = 91362
	desc = EVTDESC91362
	picture = GFX_evt_kaaba
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91362
		FROM = { set_character_flag = was_straightened_up }
		opinion = {
			modifier = opinion_straightened_up
			who = FROM
			years = 100
		}
	}
}

# Attempt at Intrigue persuasion
character_event = {
	id = 91365
	desc = EVTDESC91365
	picture = GFX_evt_shadow
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91365 # Refuse
		ai_chance = {
			factor = 10
			modifier = {
				factor = 4
				trait = imbecile
			}
			modifier = {
				factor = 4
				trait = proud
			}
			modifier = {
				factor = 2
				trait = hedonist
			}
			modifier = {
				factor = 2
				OR = {
					trait = slow
					trait = dull
				}
			}
			modifier = {
				factor = 2
				trait = wroth
			}
			modifier = {
				factor = 2
				trait = drunkard
			}
			modifier = {
				factor = 2
				trait = brave
			}
		}
		FROM = {
			character_event = {
				id = 91366
				days = 3
				tooltip = EVTTOOLTIP91351
			}
		}
		prestige = -100
	}
	option = {
		name = EVTOPTB91365 # Accept
		ai_chance = {
			factor = 10
			modifier = {
				factor = 4
				trait = craven
			}
			modifier = {
				factor = 2
				trait = temperate
			}
			modifier = {
				factor = 2
				trait = humble
			}
			modifier = {
				factor = 2
				trait = trusting
			}
			modifier = {
				factor = 0.5
				is_ruler = yes
				lower_tier_than = DUKE
			}
			modifier = {
				factor = 0.1
				OR = {
					diplomacy = 12
					learning = 12
					intrigue = 12
					higher_tier_than = COUNT
				}
			}
		}
		FROM = {
			character_event = {
				id = 91367
				days = 3
				tooltip = EVTTOOLTIP91352
			}
		}
		remove_trait = decadent
	}
	option = {
		name = EVTOPTC91365 # Suicide
		trigger = {
			OR = {
				trait = craven
				trait = stressed
				trait = depressed
				is_maimed_trigger = yes
				trait = blinded
				trait = eunuch
				trait = pneumonic
				trait = leper
				trait = inbred
				trait = imbecile
			}
		}
		ai_chance = {
			factor = 5
		}
		hidden_tooltip = {
			FROM = {
				character_event = {
					id = 91368
					days = 3
				}
			}
		}
		death = {
			death_reason = death_suicide
		}
	}
	option = {
		name = EVTOPTC91355 # Bribe (diplo)
		trigger = {
			diplomacy = 12
		}
		ai_chance = {
			factor = 100
		}
		tooltip_info = diplomacy
		FROM = {
			character_event = {
				id = 91372
				days = 3
			}
		}
	}
	option = {
		name = EVTOPTD91355 # Engage in theological debate (learning)
		trigger = {
			learning = 12
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 10
				OR = {
					trait = scholar
					trait = faqih
					trait = theologian
				}
			}
		}
		tooltip_info = learning
		FROM = {
			character_event = {
				id = 91373
				days = 3
			}
		}
	}
	option = {
		name = EVTOPTE91355 # Seduce wife (intrigue)
		trigger = {
			FROM = { is_married = yes }
			OR = {
				intrigue = 12
				trait = seducer
				AND = {
					trait = fair
					intrigue = 8
				}
			}
			NOR = {
				trait = chaste
				trait = celibate
				trait = eunuch
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				NOR = {
					trait = lustful
					trait = hedonist
					trait = seducer
					trait = deceitful
					trait = cruel
				}
			}
		}
		tooltip_info = intrigue
		FROM = {
			random_spouse = {
				character_event = {
					id = 91374
					days = 3
				}
			}
		}
	}
}

# The decadent character refuses the Intrigue attempt
character_event = {
	id = 91366
	desc = EVTDESC91366
	picture = GFX_evt_jugglers
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91351 # Denounce
		opinion = {
			modifier = opinion_takfir
			who = FROM
			months = 240
		}
		
		hidden_tooltip = {
			any_dynasty_member = {
				limit = {
					is_offmap_ruler = no
					is_playable = yes
					NOT = { trait = decadent }
					NOT = { character = FROM }
				}
				opinion = {
					modifier = opinion_takfir
					who = FROM
					months = 240
				}
				character_event = {
					id = 91369
					days = 1
				}
			}
		}
	}
}

# The decadent character folds after the Intrigue attempt
character_event = {
	id = 91367
	desc = EVTDESC91367
	picture = GFX_evt_council
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91352
		FROM = { set_character_flag = was_straightened_up }
		opinion = {
			modifier = opinion_straightened_up
			who = FROM
			years = 100
		}
	}
}

# The decadent character suicides after the Intrigue attempt
character_event = {
	id = 91368
	desc = EVTDESC91368
	picture = GFX_evt_lunatic
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91368
	}
}

# Other rulers of the dynasty are notified of the failure to straighten the character up
character_event = {
	id = 91369
	desc = EVTDESC91369
	picture = GFX_evt_jugglers
	
	notification = yes
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91369
	}
}

# Player rulers of the dynasty are notified when someone goes decadent
character_event = {
	id = 91370
	desc = EVTDESC91370
	picture = GFX_evt_jugglers
	
	notification = yes
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91370
	}
}

# The decadent character tries to bribe dynasty head
character_event = {
	id = 91372
	desc = EVTDESC91372
	picture = GFX_evt_emissary
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91372 # Accept
		ai_chance = {
			factor = 4
		}	
		create_character = {
			random_traits = no
			dynasty = NONE
			female = no
			age = 20
			religion = ROOT
			culture = ROOT
			trait = eunuch
			trait = diligent
			trait = quick
			trait = brave
			trait = brilliant_strategist
			attributes = {
				martial = 10
			}
		}
	}
	option = {
		name = EVTOPTA91351 # Denounce
		ai_chance = {
			factor = 5
		}
		opinion = {
			modifier = opinion_takfir
			who = FROM
			months = 240
		}
		hidden_tooltip = {
			any_dynasty_member = {
				limit = {
					is_offmap_ruler = no
					is_playable = yes
					NOT = { trait = decadent }
					NOT = { character = ROOT }
				}
				opinion = {
					modifier = opinion_takfir
					who = FROM
					months = 240
				}
				character_event = {
					id = 91369
					days = 1
				}
			}
		}
	}
}

# The decadent character justifies his decadence
character_event = {
	id = 91373
	desc = EVTDESC91373
	picture = GFX_evt_library
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91373 # Accept
		ai_chance = {
			factor = 4
		}		
		piety = 100
	}
	option = {
		name = EVTOPTA91351 # Denounce
		ai_chance = {
			factor = 5
		}
		opinion = {
			modifier = opinion_takfir
			who = FROM
			months = 240
		}
		hidden_tooltip = {
			any_dynasty_member = {
				limit = {
					is_offmap_ruler = no
					is_playable = yes
					NOT = { trait = decadent }
					NOT = { character = ROOT }
				}
				opinion = {
					modifier = opinion_takfir
					who = FROM
					months = 240
				}
				character_event = {
					id = 91369
					days = 1
				}
			}
		}
	}
}

# The decadent character seduces the spouse of the dynasty head
character_event = {
	id = 91374
	desc = EVTDESC91374
	picture = GFX_evt_lovers
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91374 # Spouse falls for the decadent character
		ai_chance = {
			factor = 3
			modifier = {
				factor = 0
				trait = celibate
			}
			modifier = {
				factor = 2
				NOT = { opinion = { who = spouse value = 0 } }
			}
		}
		custom_tooltip = { text = EVTTOOLTIP91374A }
		FROMFROM = {
			character_event = {
				id = 91375 # Ask spouse to let your lover be
				days = 1
			}
		}
	}
	option = {
		name = EVTOPTB91374 # Spouse sees through the decadent character
		ai_chance = {
			factor = 5
		}
		custom_tooltip = { text = EVTTOOLTIP91374B }
		opinion = {
			who = FROM
			modifier = opinion_used
			months = 240
		}
		FROMFROM = {
			character_event = {
				id = 91376 # Tell spouse of the decadent character's plans
				days = 1
			}
		}
	}
}

# Dynasty head is asked by wife to leave decadent character alone
character_event = {
	id = 91375
	desc = EVTDESC91375
	picture = GFX_evt_quarrel
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91373 # Accept
		ai_chance = {
			factor = 4
		}	
		reverse_opinion = {
			modifier = opinion_pleased
			who = FROM
			months = 240
		}
	}
	option = {
		name = EVTOPTA91351 # Denounce
		ai_chance = {
			factor = 5
		}
		reverse_opinion = {
			modifier = opinion_very_disappointed
			who = FROM
			months = 240
		}
		opinion = {
			modifier = opinion_takfir
			who = FROMFROM
			months = 240
		}
		hidden_tooltip = {
			any_dynasty_member = {
				limit = {
					is_offmap_ruler = no
					is_playable = yes
					NOT = { trait = decadent }
					NOT = { character = ROOT }
				}
				opinion = {
					modifier = opinion_takfir
					who = FROMFROM
					months = 240
				}
				character_event = {
					id = 91369
					days = 1
				}
			}
		}
	}
}

# Dynasty head is informed about decadent character's attempt to seduce your spouse
character_event = {
	id = 91376
	desc = EVTDESC91376
	picture = GFX_evt_lovers
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA91351 # Denounce
		ai_chance = {
			factor = 5
		}
		opinion = {
			modifier = opinion_takfir
			who = FROMFROM
			months = 240
		}
		opinion = {
			modifier = honest_pos
			who = FROM
			months = 240
		}
		hidden_tooltip = {
			any_dynasty_member = {
				limit = {
					is_offmap_ruler = no
					is_playable = yes
					NOT = { trait = decadent }
					NOT = { character = ROOT }
				}
				opinion = {
					modifier = opinion_takfir
					who = FROMFROM
					months = 240
				}
				character_event = {
					id = 91369
					days = 1
				}
			}
		}
	}
}

# Spouse notified of divorce due to husband going off to join holy order
character_event = {
	id = 91377
	desc = EVTDESC_91377
	picture = GFX_evt_melee
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	
	option = {
		name = ALAS
		trigger = {
			opinion = { who = FROM value = 0 }
		}
		tooltip = { remove_spouse = FROM }
	}
	option = {
		name = GOOD_RIDDANCE
		trigger = {
			NOT = { opinion = { who = FROM value = 0 } }
		}
		tooltip = { remove_spouse = FROM }
	}
}

#Decadent character notified that he is forced through favor
character_event = {
	id = 91378
	desc = EVTDESC_91378
	picture = GFX_evt_council
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA91378

		remove_trait = decadent

		tooltip = { reverse_remove_favor = FROM }

		FROM = { character_event = { id = 91379 days = 5 } }

	}
}


#Confirmation for favor holder that decadent character shaped up
character_event = {
	id = 91379
	desc = EVTDESC_91379
	picture = GFX_evt_council
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes



	option = {
		name = EVTOPTA91379
		tooltip = { FROM = { remove_trait = decadent } }
		opinion = {
			modifier = opinion_straightened_up
			who = FROM
			months = 120
		}
	}
}