###########################################
#                                         #
# M&M Monastic Orders Events              #
#                                         #
# ID MNM.4000-MNM.4999		              #
#                                         #
###########################################

#IDs:
#4100-4199 David
#4200-4399 Milla -> Matthew used 4300 for 2.8 MO additions
#4399 Used to clear secluded meditation/prayer mission in certain cases
#4400-4599 Mathilda -> Drikus used 4435 - 4443
#4600-4799 Drikus
#4800-4999 Jakob

namespace = MNM

###JOINING###

#From on_character_ask_to_join_society
character_event = {
    id = MNM.4450
	hide_window = yes
    is_triggered_only = yes
    trigger = {
    	FROM = { leader = { is_monastic_member_trigger = yes } }
    }
    immediate = {
    	FROM = { leader = { character_event = { id = MNM.4451 } } }
    }
}

#Ping event
character_event = {
    id = MNM.4451
	hide_window = yes
    is_triggered_only = yes
    immediate = {
    	FROM = { letter_event = { id = MNM.4452 } }
    }
}

#Welcome letter
letter_event = {
    id = MNM.4452
    desc = EVTDESC_MNM_4452
    border = GFX_event_letter_frame_religion

    is_triggered_only = yes
	
	immediate = { set_character_flag = society_join_block }
	
    option = { 
        name = EVTOPTA_MNM_44511

        FROM = { ROOT = { join_prev_monastic_order_society = yes } }
		
		scaled_wealth = -0.25

        #FROM = { society = { save_event_target_as = joining_society } }
        #join_society = event_target:joining_society
		
		clr_character_flag = society_join_block
    }
}

###MISSIONS###
#4000 is tombola
character_event = {
	id = MNM.4000
	hide_window = yes

	is_triggered_only = yes
	is_in_society = yes
	only_capable = yes

	trigger = {
		is_monastic_member_trigger = yes
		is_society_grandmaster = no
		has_any_quest = no
		NOT = { is_inaccessible_trigger = yes }
		NOT = { has_character_modifier = quest_cooldown_timer }
	}

	immediate = {
		random_society_member = {
			limit = {
				is_society_grandmaster = yes
				same_society_as = ROOT
			}
			save_event_target_as = monastic_leader
		}

		random_list = {
			10 = { 
				set_character_flag = monastic_orders_holy_seclusion
			}
			10 = { 
				modifier = { factor = 0 is_playable = no }
				set_character_flag = monastic_orders_mission_charity
			}
			10 = {
				modifier = { factor = 0 NOT = { has_dlc ="Way of Life" } }
				modifier = { factor = 0 has_focus = focus_theology }
				modifier = { factor = 0 is_playable = no } # Only playable characters get focuses
				set_character_flag = monastic_orders_mission_theology
			}
			10 = {
				modifier = { factor = 0 is_playable = no }
				modifier = {
					NOT = { religion_group = christian}
					factor = 0
				}
				modifier = {
					trait = pilgrim
					factor = 0
				}
				modifier = {
					trait = on_pilgrimage
					factor = 0
				}
				modifier = {
					NOT = {
						has_dlc = "Sons of Abraham"
					}
					factor = 0
				}
				set_character_flag = monastic_orders_mission_christian_pilgrimage
			}
			10 = {
				modifier = { factor = 0 is_playable = no }
				modifier = {
					NOT = { religion_group = indian_group }
					factor = 0
				}
				modifier = {
					trait = indian_pilgrim
					factor = 0
				}
				modifier = {
					trait = on_indian_pilgrimage
					factor = 0
				}
				set_character_flag = monastic_orders_mission_dharmic_pilgrimage
			}
			10 = {
				trigger = {
					is_playable = yes
					any_demesne_province = {
						num_of_empty_holdings = 1			
					}
				}
				modifier = {
					factor = 0 is_tribal = yes
				}
				modifier = {
					factor = 0 is_nomadic = yes
				}
				modifier = { factor = 0 is_playable = no }
				set_character_flag = monastic_orders_mission_temple
			}
			50 = { # AI bypasses missions at times
				modifier = {
					factor = 0
					ai = no
				}
				random_list = {
					70 = {
						modifier = {
							factor = 0.9
							society_influence >= 30
						}
						modifier = {
							factor = 0.9
							society_influence >= 40
						}
						modifier = {
							factor = 0.8
							society_influence >= 50
						}
						modifier = {
							factor = 0.7
							society_influence >= 70
						}
						modifier = {
							factor = 0.6
							society_influence >= 80
						}
						modifier = {
							factor = 0.5
							society_influence >= 90
						}
						add_mission_succeed_influence_effect = yes
						monastic_order_purity_effect = yes
					}
					30 = {
						add_mission_fail_influence_effect = yes
					}
				}
			}
			85 = {
				modifier = {
					factor = 0
					ai = no
				}
				#Do nothing for AI
			}
		}
		event_target:monastic_leader = { character_event = { id = MNM.4010 days = 7 random = 7 } }
	}
}

#Tombola Ping Event
character_event = {
	id = MNM.4010
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		FROM = {
			trigger_switch = {
				on_trigger = has_character_flag
				monastic_orders_holy_seclusion = 				{ clr_character_flag = monastic_orders_holy_seclusion society_quest_event = { id = MNM.4402 } }
				monastic_orders_mission_charity = 				{ clr_character_flag = monastic_orders_mission_charity society_quest_event = { id = MNM.4011 } }
				monastic_orders_mission_theology = 				{ clr_character_flag = monastic_orders_mission_theology society_quest_event = { id = MNM.4015 } }
				monastic_orders_mission_christian_pilgrimage = 	{ clr_character_flag = monastic_orders_mission_christian_pilgrimage society_quest_event = { id = MNM.4019 } }
				monastic_orders_mission_dharmic_pilgrimage = 	{ clr_character_flag = monastic_orders_mission_dharmic_pilgrimage society_quest_event = { id = MNM.8095 } }
				monastic_orders_mission_temple = 				{ clr_character_flag = monastic_orders_mission_temple society_quest_event = { id = MNM.4023 } }
			}
		}
	}
}

#QUEST: Do penance/meditate
society_quest_event = {
	id = MNM.4402
	border = GFX_event_letter_frame_religion

	desc = {
		trigger = { is_christian_monastic_member_trigger = yes }
		text = EVTDESC_4402_PENANCE
	}
	desc = {
		trigger = { is_dharmic_monastic_member_trigger = yes }
		text = EVTDESC_4402_MEDITATION
	}

	is_triggered_only = yes

	option = {
		name = ACCEPT

		if = {
			limit = { is_christian_monastic_member_trigger = yes }
			set_quest = quest_monastic_order_penance
		}
		if = {
			limit = { is_dharmic_monastic_member_trigger = yes }
			set_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = DECLINE
		custom_tooltip = { text = decline_quest_tooltip }

		add_character_modifier = {
			name = quest_cooldown_timer
			hidden = yes
			days = 1000
		}

		ai_chance = { factor = 0 }
	}
}

#Penance/meditation begins
character_event = {
	id = MNM.4403
	picture = GFX_evt_secluded_in_prayer
	desc = EVTDESC_4403
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = {
			trigger = {
				OR = {
					is_christian_monastic_member_trigger = yes
					society_member_of = monastic_order_hindu
				}
			}
			text = EVTOPTA_MNM_4403_GOD
		}
		name = {
			trigger = {
				OR = {
					society_member_of = monastic_order_buddhist
					society_member_of = monastic_order_jain
				}
			}
			text = EVTOPTA_MNM_4403_NOGOD
		}

		hidden_effect = {
			set_variable = { which = holy_seclusion_points value = 0 }
			set_character_flag = holy_seclusion_timer
			character_event = { id = MNM.4404 days = 40 random = 30 } 
		}
	}
}

#Tombola & outcome evaluator for meditation/penance
character_event = {
	id = MNM.4404
	hide_window = yes

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	immediate = {
		if = {
			limit = {
				OR = {
					is_monastic_member_trigger = no
					NOR = {
						has_quest = quest_monastic_order_penance
						has_quest = quest_monastic_order_meditation
					}
				}
			}
			character_event = { id = MNM.4399 }
			break = yes
		}
		if = {
			limit = { 
				OR = {
					has_quest = quest_monastic_order_penance
					has_quest = quest_monastic_order_meditation
				}
				OR = {
					has_character_modifier = in_meditation
					has_character_modifier = doing_penance
				}
			}
			if = {
				limit = { 
					NOR = {
						check_variable = { which = holy_seclusion_points value = 4 } 
						NOT = { check_variable = { which = holy_seclusion_points value = -2 } }
					}
				}
				clear_event_target = interrupting_child
				random_list = { #Next mission
					30 = { #Struggle with a vice
						modifier = { 
							factor = 0 
							trait = temperate
							trait = charitable
							trait = diligent
							OR = {
								religion = hindu
								NOT = { trait = lustful }
							}
						}
						modifier = {
							factor = 0
							has_character_flag = holy_seclusion_struggled_with_vice
						}
						set_character_flag = holy_seclusion_struggled_with_vice
						random_list = {
							10 = { 
								modifier = { factor = 0 OR = { NOT = { trait = lustful } religion = hindu } }
								set_character_flag = holy_seclusion_lustful
							}
							10 = { 
								modifier = { factor = 0 trait = temperate }
								set_character_flag = holy_seclusion_gluttonous
							}
							10 = { 
								modifier = { factor = 0 trait = charitable }
								set_character_flag = holy_seclusion_greedy
							}
							10 = { 
								modifier = { factor = 0 trait = diligent }
								set_character_flag = holy_seclusion_slothful
							}
						}

						character_event = { id = MNM.4405 }
					}
					10 = { #Lonely
						modifier = {
							factor = 0
							NAND = {
								OR = {
									trait = gregarious
									trait = socializer
								}
								any_courtier = {
									is_adult = yes
									prisoner = no
									NOR = { 
										is_friend = ROOT 
										is_lover = ROOT
										is_rival = ROOT
										any_spouse = { character = ROOT }
									}
								}
							}
						}
						modifier = {
							factor = 0
							has_character_flag = holy_seclusion_struggled_with_loneliness
						}
						set_character_flag = holy_seclusion_struggled_with_loneliness
						character_event = { id = MNM.4410 }
					}
					10000 = { #Scripture reading 
						modifier = {
							factor = 0
							OR = {
								NOT = {	any_courtier = { has_job_title = job_spiritual } }
								has_character_flag = holy_seclusion_scripture_reading
							}
						}
						set_character_flag = holy_seclusion_scripture_reading
						character_event = { id = MNM.4414 }
					}
					#Child interrupting
					10 = {
						modifier = {
							factor = 0
							NOT = { 
								any_child = {
									age = 4
									host = { character = ROOT }
									is_adult = no
									prisoner = no
									opinion = { who = ROOT value = 5 }
								}
							}
						}
						modifier = {
							factor = 0
							has_character_flag = holy_seclusion_interrupting_child
						}
						random_child = {
							limit = {
								age = 4
								host = { character = ROOT }
								is_adult = no
								prisoner = no
								opinion = { who = ROOT value = 5 }
							}
							save_event_target_as = interrupting_child
						}
						random_child = {
							limit = {
								age = 4
								host = { character = ROOT }
								is_adult = no
								prisoner = no
								opinion = { who = ROOT value = 5 }
								is_primary_heir = ROOT
								NOR = { 
									has_opinion_modifier = { modifier = kind_parent who = ROOT }
									has_opinion_modifier = { modifier = cruel_parent who = ROOT }
								}
							}
							save_event_target_as = interrupting_child
						}
						set_character_flag = holy_seclusion_interrupting_child
						event_target:interrupting_child = { character_event = { id = MNM.4419 } }
					}
					10 = { #General success 
						modifier = {
							is_virtous = yes
							factor = 1.5
						}
						modifier = {
							is_wicked = yes
							factor = 0.7
						}
						modifier = {
							is_learned_trigger = yes
							factor = 1.5
						}
						character_event = { id = MNM.4426 }
					}
					10 = { #If all missions have been done already....
						modifier = {
							factor = 0
							NAND = {
								has_character_flag = holy_seclusion_struggled_with_vice
								has_character_flag = holy_seclusion_struggled_with_loneliness
								has_character_flag = holy_seclusion_scripture_reading
								has_character_flag = holy_seclusion_interrupting_child
							}
						}
						clr_character_flag = holy_seclusion_struggled_with_vice
						clr_character_flag = holy_seclusion_struggled_with_loneliness
						clr_character_flag = holy_seclusion_scripture_reading
						clr_character_flag = holy_seclusion_interrupting_child
					}
				}
				character_event = { id = MNM.4404 days = 40 random = 30 } #Sends the tombola again
			}
			if = {
				limit = { 
					OR = {
						check_variable = { which = holy_seclusion_points value = 4 } 
						NOT = { check_variable = { which = holy_seclusion_points value = -2 } }
					}
				} 

				random_society_member = {
					limit = {
						is_society_grandmaster = yes
						same_society_as = ROOT
					}
					character_event = { id = MNM.4427 } #Mission success/fail
				}
			}
		}
	}
}

#Penance/seclusion: Dealing with vice
character_event = {
	id = MNM.4405
	picture = GFX_evt_dark_love
	border = GFX_event_normal_frame_religion
	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	hide_from = yes

	desc = {
		trigger = { has_character_flag = holy_seclusion_lustful }
		text = EVTDESC_4405_LUSTFUL
		picture = GFX_evt_dark_love
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_gluttonous }
		text = EVTDESC_4405_GLUTTONOUS
		picture = GFX_evt_dark_feast
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_greedy }
		text = EVTDESC_4405_GREEDY
		picture = GFX_evt_charity
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_slothful }
		text = EVTDESC_4405_SLOTHFUL
		picture = GFX_evt_recovery
	}

	#Indulge
	option = {
		name = {
			trigger = { has_character_flag = holy_seclusion_lustful }
			text = EVTOPTA_4405_LUSTFUL
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_gluttonous }
			text = EVTOPTA_4405_GLUTTONOUS
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_greedy }
			text = EVTOPTA_4405_GREEDY
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_slothful }
			text = EVTOPTA_4405_SLOTHFUL
		}

		random_list = {
			65 = { 
				custom_tooltip = { 
					text = EVTOPTA_MNM_4405_tt_success
					character_event = { id = MNM.4406 days = 3 }
				}
			}
			35 = {
				custom_tooltip = { 
					text = EVTOPTA_MNM_4405_tt_fail
					character_event = { id = MNM.4407 days = 3 }
				}
			}
		}
	}

	#Fight it
	option = {
		name = {
			trigger = { has_character_flag = holy_seclusion_lustful }
			text = EVTOPTB_4405_LUSTFUL
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_gluttonous }
			text = EVTOPTB_4405_GLUTTONOUS
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_greedy }
			text = EVTOPTB_4405_GREEDY
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_slothful }
			text = EVTOPTB_4405_SLOTHFUL
		}

		if = {
			limit = { has_character_flag = holy_seclusion_greedy }
			scaled_wealth = { value = -0.5 min = -50 }
		}

		random_list = {
			40 = { 
				custom_tooltip = { 
					text = EVTOPTB_MNM_4405_tt_success
					character_event = { id = MNM.4408 days = 14 }
				}
			}
			60 = {
				custom_tooltip = { 
					text = EVTOPTB_MNM_4405_tt_fail
					character_event = { id = MNM.4409 days = 14 }
				}
			}
		}
	}
}

#Vice outcome - small success
character_event = {
	id = MNM.4406
	picture = GFX_evt_dark_love
	border = GFX_event_normal_frame_religion
	is_triggered_only = yes
	hide_from = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	desc = {
		trigger = { 
			has_character_flag = holy_seclusion_lustful 
			event_target:holy_seclusion_lover = { always = yes }
		}
		text = EVTDESC_4406_LUSTFUL_A
		picture = GFX_evt_dark_love
	}
	desc = {
		trigger = { 
			has_character_flag = holy_seclusion_lustful 
			event_target:holy_seclusion_lover = { always = no }
		}
		text = EVTDESC_4406_LUSTFUL_B
		picture = GFX_evt_dark_love
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_gluttonous }
		text = EVTDESC_4406_GLUTTONOUS
		picture = GFX_evt_feast
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_greedy }
		text = EVTDESC_4406_GREEDY
		picture = GFX_evt_charity
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_slothful }
		text = EVTDESC_4406_SLOTHFUL
		picture = GFX_evt_recovery
	}

	immediate = {
		if = {
			limit = { has_character_flag = holy_seclusion_lustful }
			random_courtier = {
				limit = {
					age = 16
					root_attraction_trigger = yes
					prisoner = no
					NOT = { trait = incapable }
					NOT = { trait = celibate }
					NOT = { is_close_relative = ROOT }
					is_married = no
					is_attractive_trigger = yes
				}
				save_event_target_as = holy_seclusion_lover
			}
		}
	}

	option = {
		name = {
			trigger = { has_character_flag = holy_seclusion_lustful }
			text = EVTOPTA_4406_LUSTFUL
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_gluttonous }
			text = EVTOPTA_4406_GLUTTONOUS
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_greedy }
			text = EVTOPTA_4406_GREEDY
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_slothful }
			text = EVTOPTA_4406_SLOTHFUL
		}

		custom_tooltip = { 
			text = EVTOPTA_4406_TOOLTIP 
		}

		hidden_effect = { change_variable = { which = holy_seclusion_points value = 1 } }

		if = {
			limit = { 
				has_character_flag = holy_seclusion_lustful 
				event_target:holy_seclusion_lover = { NOT = { is_lover = ROOT } }
			}
			random = {
				chance = 30
				event_target:holy_seclusion_lover = { add_lover = ROOT }
			}
		}

		hidden_effect = {
			clr_character_flag = holy_seclusion_lustful
			clr_character_flag = holy_seclusion_gluttonous
			clr_character_flag = holy_seclusion_greedy
			clr_character_flag = holy_seclusion_slothful
		}
	}
}

#vice outcome - small failure
character_event = {
	id = MNM.4407
	picture = GFX_evt_recovery
	border = GFX_event_normal_frame_religion
	is_triggered_only = yes
	hide_from = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	desc = {
		trigger = { has_character_flag = holy_seclusion_lustful }
		text = EVTDESC_4407_LUSTFUL
		picture = GFX_evt_recovery
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_gluttonous }
		text = EVTDESC_4407_GLUTTONOUS
		picture = GFX_evt_drunk
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_greedy }
		text = EVTDESC_4407_GREEDY
		picture = GFX_evt_drunk
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_slothful }
		text = EVTDESC_4407_SLOTHFUL
		picture = GFX_evt_drunk
	}

	option = {
		name = {
			trigger = { has_character_flag = holy_seclusion_lustful }
			text = EVTOPTA_4407_LUSTFUL
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_gluttonous }
			text = EVTOPTA_4407_GLUTTONOUS
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_greedy }
			text = EVTOPTA_4407_GREEDY
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_slothful }
			text = EVTOPTA_4407_SLOTHFUL
		}

		custom_tooltip = { 
			text = EVTOPTA_4407_TOOLTIP 
		}

		hidden_effect = {
			clr_character_flag = holy_seclusion_lustful
			clr_character_flag = holy_seclusion_gluttonous
			clr_character_flag = holy_seclusion_greedy
			clr_character_flag = holy_seclusion_slothful
		}
	}
}

#Vice outcome big success
character_event = {
	id = MNM.4408
	picture = GFX_evt_secluded_in_prayer
	border = GFX_event_normal_frame_religion
	is_triggered_only = yes
	hide_from = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	desc = {
		trigger = { has_character_flag = holy_seclusion_lustful }
		text = EVTDESC_4408_LUSTFUL
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_gluttonous }
		text = EVTDESC_4408_GLUTTONOUS
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_greedy }
		text = EVTDESC_4408_GREEDY
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_slothful }
		text = EVTDESC_4408_SLOTHFUL
	}


	option = {
		name = {
			trigger = { has_character_flag = holy_seclusion_lustful }
			text = EVTOPTA_4408_LUSTFUL
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_gluttonous }
			text = EVTOPTA_4408_GLUTTONOUS
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_greedy }
			text = EVTOPTA_4408_GREEDY
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_slothful }
			text = EVTOPTA_4408_SLOTHFUL
		}

		custom_tooltip = { 
			text = EVTOPTA_4408_TOOLTIP 
		}

		hidden_effect = { change_variable = { which = holy_seclusion_points value = 2 } }
		hidden_effect = { monastic_order_purity_effect = yes }
		
		if = {
			limit = { has_character_flag = holy_seclusion_lustful }

			add_trait = celibate
			add_character_modifier = {
				name = promise_of_celibacy
				years = 3
			}

			random = {
				chance = 50
				remove_trait_silently_lustful_effect = yes
			}
		}

		if = {
			limit = { has_character_flag = holy_seclusion_gluttonous }
			if = {
				limit = { NOT = { trait = gluttonous } }
				random = {
					chance = 50
					add_trait_temperate_effect = yes
				}
			}
			if = {
				limit = { trait = gluttonous }
				random = {
					chance = 50
					remove_trait_silently_gluttonous_effect = yes
				}
			}
		}

		if = {
			limit = { has_character_flag = holy_seclusion_greedy }

			if = {
				limit = { NOT = { trait = greedy } }
				random = {
					chance = 50
					add_trait_charitable_effect = yes
				}
			}
			if = {
				limit = { trait = greedy }
				random = {
					chance = 50
					remove_trait_silently_greedy_effect = yes
				}
			}
		}

		if = {
			limit = { has_character_flag = holy_seclusion_slothful }

			if = {
				limit = { NOT = { trait = slothful } }
				random = {
					chance = 50
					add_trait_diligent_effect = yes
				}
			}
			if = {
				limit = { trait = slothful }
				random = {
					chance = 50
					remove_trait_slothful_effect = yes
				}
			}
		}

		hidden_effect = {
			clr_character_flag = holy_seclusion_lustful
			clr_character_flag = holy_seclusion_gluttonous
			clr_character_flag = holy_seclusion_greedy
			clr_character_flag = holy_seclusion_slothful
		}
	}
}

#vice outcome - big failure
character_event = {
	id = MNM.4409
	picture = GFX_evt_drunk
	border = GFX_event_normal_frame_religion
	is_triggered_only = yes
	hide_from = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	desc = {
		trigger = { has_character_flag = holy_seclusion_lustful }
		text = EVTDESC_4409_LUSTFUL
		picture = GFX_evt_brothel
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_gluttonous }
		text = EVTDESC_4409_GLUTTONOUS
		picture = GFX_evt_drunk
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_greedy }
		text = EVTDESC_4409_GREEDY
		picture = GFX_evt_drunk
	}
	desc = {
		trigger = { has_character_flag = holy_seclusion_slothful }
		text = EVTDESC_4409_SLOTHFUL
		picture = GFX_evt_drunk
	}

	option = {
		name = {
			trigger = { has_character_flag = holy_seclusion_lustful }
			text = EVTOPTA_4409_LUSTFUL
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_gluttonous }
			text = EVTOPTA_4409_GLUTTONOUS
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_greedy }
			text = EVTOPTA_4409_GREEDY
		}
		name = {
			trigger = { has_character_flag = holy_seclusion_slothful }
			text = EVTOPTA_4409_SLOTHFUL
		}

		custom_tooltip = { 
			text = EVTOPTA_4409_TOOLTIP 
		}

		hidden_effect = { change_variable = { which = holy_seclusion_points value = -5 } }
		
		if = {
			limit = { 
				has_character_flag = holy_seclusion_lustful 
				NOT = { trait = lovers_pox }
			}
			add_trait = lovers_pox
			if = {
				limit = { is_married = yes }
				character_event = { id = 20 }
			}
		}

		if = {
			limit = { has_character_flag = holy_seclusion_gluttonous }
			if = {
				limit = { NOT = { trait = gluttonous } }
				random = {
					chance = 30
					add_trait_gluttonous_effect = yes
				}
			}
		}


		if = {
			limit = { has_character_flag = holy_seclusion_greedy }
			scaled_wealth = { value = 0.5 min = 50 }
			if = {
				limit = { NOT = { trait = greedy } }
				random = {
					chance = 30
					add_trait_greedy_effect = yes
				}
			}
		}

		if = {
			limit = { has_character_flag = holy_seclusion_slothful }
			if = {
				limit = { NOT = { trait = slothful } }
				random = {
					chance = 30
					add_trait_slothful_effect = yes
				}
			}
		}

		if = {
			limit = { is_christian_monastic_member_trigger = yes }
			add_character_modifier = {
				name = rampant_sinner_christian
				years = 3
			}
		}
		if = {
			limit = { is_dharmic_monastic_member_trigger = yes }
			add_character_modifier = {
				name = rampant_sinner_dharmic
				years = 3
			}
		}

		hidden_effect = {
			clr_character_flag = holy_seclusion_lustful
			clr_character_flag = holy_seclusion_gluttonous
			clr_character_flag = holy_seclusion_greedy
			clr_character_flag = holy_seclusion_slothful
		}
	}
}

#Penance/meditation: struggle with loneliness
character_event = {
	id = MNM.4410
	desc = EVTDESC_MNM_4410
	picture = GFX_evt_secluded_in_prayer
	border = GFX_event_normal_frame_diplomacy
	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	immediate = {
		random_courtier = {
			limit = {
				is_adult = yes
				prisoner = no
				NOR = { 
					is_friend = ROOT 
					is_rival = ROOT
					is_lover = ROOT
					any_spouse = { character = ROOT }
				}
			}
			save_event_target_as = potential_friend
		}
	}

	#Go out and talk with them
	option = {
		name = EVTOPTA_MNM_4410
		custom_tooltip = { text = EVTOPTA_MNM_4410_TOOLTIP }
		hidden_effect = { character_event = { id = MNM.4411 days = 2 } }
		random = {
			chance = 50
			tooltip = { add_friend = event_target:potential_friend }
			set_character_flag = new_friend
		}

	}

	option = {
		name = EVTOPTB_MNM_4410

		random_list = {
			65 = {
				custom_tooltip = { text = EVTOPTA_4406_TOOLTIP }
				hidden_tooltip = { character_event = { id = MNM.4412 days = 2 } }
			}
			35 = {
				custom_tooltip = { text = EVTOPTA_4407_TOOLTIP }
				tooltip = {
					if = {
						limit = { trait = stressed NOT = { trait = depressed } }
						random = {
							chance = 50
							tooltip = { add_trait = depressed }
							set_character_flag = add_depressed
						}
					}
					if = {
						limit = { NOT = { trait = stressed } }
						random = {
							chance = 50
							tooltip = { add_trait = stressed }
							set_character_flag = add_stressed
						}
					}
				}
				hidden_tooltip = { character_event = { id = MNM.4413 days = 2 } }
			}	
		}

		tooltip = {
			if = {
				limit = { trait = gregarious }
				random = {
					chance = 20
					tooltip = { remove_trait = gregarious }
					set_character_flag = lose_gregarious
				}
			}
		}
	}
}

#You went to talk to them
character_event = {
	id = MNM.4411
	desc = EVTDESC_MNM_4411
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4411
		custom_tooltip = { text = EVTOPTA_MNM_4410_TOOLTIP }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = -1 } }
		if = {
			limit = { has_character_flag = new_friend }
			add_friend = event_target:potential_friend
			clr_character_flag = new_friend
		}
	}
}

#You managed to deal with it
character_event = {
	id = MNM.4412
	desc = EVTDESC_MNM_4412
	picture = GFX_evt_secluded_in_prayer
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4412
		custom_tooltip = { text = EVTOPTA_4406_TOOLTIP }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = 1 } }

		if = {
			limit = { has_character_flag = lose_gregarious }
			remove_trait = gregarious
			clr_character_flag = lose_gregarious
		}
	}
}

#You get very lonely
character_event = {
	id = MNM.4413
	desc = EVTDESC_MNM_4413
	picture = GFX_evt_recovery
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4413
		custom_tooltip = { text = EVTOPTA_4406_TOOLTIP }

		if = {
			limit = { has_character_flag = lose_gregarious }
			remove_trait = gregarious
			clr_character_flag = lose_gregarious
		}
		if = {
			limit = { has_character_flag = add_depressed }
			add_trait = depressed
			clr_character_flag = add_depressed
		}
		if = {
			limit = { has_character_flag = add_stressed }
			add_trait = stressed
			clr_character_flag = add_stressed
		}
	}
}

#You struggle with the scripture
character_event = {
	id = MNM.4414
	desc = EVTDESC_MNM_4414
	picture = GFX_evt_secluded_in_prayer
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	immediate = {
		random_courtier = {
			limit = { has_job_title = job_spiritual }
			save_event_target_as = court_spiritual
		}
	}

	#You keep reading
	option = {
		name = EVTOPTA_MNM_4414

		random_list = {
			35 = {
				modifier = {
					is_smart_trigger = yes
					factor = 1.4
				}
				modifier = {
					learning = 14
					factor = 1.4
				}
				modifier = {
					learning = 16
					factor = 1.4
				}
				modifier = {
					is_learned_trigger = yes
					factor = 2
				}
				custom_tooltip = { text = EVTOPTA_MNM_4414_TOOLTIP_SUCCESS }
				hidden_effect = { character_event = { id = MNM.4415 days = 3 } }
			}
			65 = {
				modifier = {
					is_dumb_trigger = yes
					factor = 1.5
				}
				modifier = {
					NOT = { learning = 8 }
					factor = 1.5
				}
				custom_tooltip = { text = EVTOPTA_MNM_4414_TOOLTIP_FAILURE }
				hidden_effect = { character_event = { id = MNM.4416 days = 3 } }
			}
		}
	}

	option = {
		name = EVTOPTB_MNM_4414

		random_list = {
			65 = {
				custom_tooltip = { text = EVTOPTB_MNM_4414_TOOLTIP_SUCCESS }
				hidden_effect = { character_event = { id = MNM.4417 days = 3 } }
			}
			35 = {
				custom_tooltip = { text = EVTOPTB_MNM_4414_TOOLTIP_FAILURE }
				hidden_effect = { character_event = { id = MNM.4418 days = 3 } }
			}
		}
	}
}

#You interpret the text
character_event = {
	id = MNM.4415
	desc = EVTDESC_MNM_4415
	picture = GFX_evt_library
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = {
			trigger = { NOR = { religion = buddhist religion = jain } }
			text = EVTOPTA_MNM_4415_A
		}
		name = {
			trigger = { OR = { religion = buddhist religion = jain } }
			text = EVTOPTA_MNM_4415_B
		}
		custom_tooltip = { text = EVTOPTA_MNM_4414_TOOLTIP_SUCCESS }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = 2 } }
		hidden_effect = { monastic_order_purity_effect = yes }

		piety = 100

		if = {
			limit = { NOT = { trait = erudite } }
			add_trait = erudite
		}
	}
}

#You fail to interpret the text 
character_event = {
	id = MNM.4416
	desc = EVTDESC_MNM_4416
	picture = GFX_evt_recovery
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	hide_from = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = {
			trigger = { NOR = { religion = buddhist religion = jain } }
			text = EVTOPTA_MNM_4416_A
		}
		name = {
			trigger = { OR = { religion = buddhist religion = jain } }
			text = EVTOPTA_MNM_4416_B
		}
		custom_tooltip = { text = EVTOPTA_MNM_4414_TOOLTIP_FAILURE }
	}
}

#You get help
character_event = {
	id = MNM.4417
	desc = EVTDESC_MNM_4417
	picture = GFX_evt_bishop
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = {
			trigger = { NOR = { religion = buddhist religion = jain } }
			text = EVTOPTA_MNM_4415_A
		}
		name = {
			trigger = { OR = { religion = buddhist religion = jain } }
			text = EVTOPTA_MNM_4415_B
		}
		custom_tooltip = { text = EVTOPTB_MNM_4414_TOOLTIP_SUCCESS }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = 1 } }
	}
}

#Unhelpful court chaplain
character_event = {
	id = MNM.4418
	desc = EVTDESC_MNM_4418
	picture = GFX_evt_recovery
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4418
		custom_tooltip = { text = EVTOPTB_MNM_4414_TOOLTIP_FAILURE }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = -1 } }
		
		if = {
			limit = {
				event_target:court_spiritual = { is_alive = yes }
			}
			opinion = {
				who = event_target:court_spiritual
				modifier = opinion_ungrateful
				years = 5
			}

			reverse_opinion = {
				who = event_target:court_spiritual
				modifier = opinion_ignorant
				years = 5
			}
		}
	}
}

#Your child wants your attention ping
character_event = {
	id = MNM.4419
	hide_window = yes
	is_triggered_only = yes
	immediate = { FROM = { character_event = { id = MNM.4420 } } }
}

character_event = {
	id = MNM.4420
	desc = EVTDESC_MNM_4420
	picture = GFX_evt_child_play
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	#Teach them about the scripture
	option = {
		name = EVTOPTA_MNM_4420

		random_list = {
			50 = {
				modifier = {
					factor = 1.5
					event_target:interrupting_child = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.5
					event_target:interrupting_child = { OR = { trait = idolizer trait = zealous } }
				}
				modifier = {
					factor = 1.5
					event_target:interrupting_child = { opinion = { who = ROOT value = 50 } }
				}
				custom_tooltip = { text = EVTOPTA_MNM_4420_TOOLTIP_SUCCESS }
				event_target:interrupting_child = { 
					set_character_flag = understood_lesson
					hidden_tooltip = { character_event = { id = MNM.4421 days = 2 } }
				}
			}
			50 = {
				modifier = {
					factor = 1.5
					event_target:interrupting_child = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 1.5
					event_target:interrupting_child = { trait = cynical }
				}
				custom_tooltip = { text = EVTOPTA_MNM_4420_TOOLTIP_FAILURE }
				event_target:interrupting_child = { 
					set_character_flag = failed_lesson
					hidden_tooltip = { character_event = { id = MNM.4421 days = 2 } }
				}
			}
		}
	}

	#Be patient with them
	option = {
		name = EVTOPTB_MNM_4420
		custom_tooltip = { text = EVTOPTB_MNM_4420_TOOLTIP }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = -1 } }

		random = {
			chance = 20	
			add_trait_kind_effect = yes
		}	

		random_list = {
			80 = {
				reverse_opinion = {
					who = event_target:interrupting_child
					modifier = kind_parent
					years = 10
				}
			}
			20 = {
				modifier = {
					factor = 0
					is_friend = event_target:interrupting_child
				}
				add_friend = event_target:interrupting_child
			}
		}
	}

	#Sho away
	option = {
		name = EVTOPTC_MNM_4420

		random_list = {
			65 = {
				modifier = {
					is_benevolent_trigger = yes
					factor = 1.5
				}
				modifier = {
					has_pleasant_personality_trigger = yes
					factor = 1.5
				}
				custom_tooltip = { text = EVTOPTC_MNM_4420_TOOLTIP_SUCCESS }
				event_target:interrupting_child = { 
					set_character_flag = kindly_rejected
					hidden_tooltip = { character_event = { id = MNM.4421 days = 2 } }
				}
			}
			35 = {
				modifier = {
					is_evil_trigger = yes
					factor = 1.5
				}
				modifier = {
					has_unpleasant_personality_trigger = yes
					factor = 1.5
				}
				custom_tooltip = { text = EVTOPTC_MNM_4420_TOOLTIP_FAILURE }
				event_target:interrupting_child = { 
					set_character_flag = cruelly_rejected
					hidden_tooltip = { character_event = { id = MNM.4421 days = 2 } }
				}
			}
		}
	}
}

#Child ping event
character_event = {
	id = MNM.4421
	hide_window = yes
	is_triggered_only = yes
	immediate = { 
		trigger_switch = {
			on_trigger = has_character_flag 
			understood_lesson 	= { FROM = { character_event = { id = MNM.4422 } } clr_character_flag = understood_lesson }
			failed_lesson 		= { FROM = { character_event = { id = MNM.4423 } } clr_character_flag = failed_lesson }
			kindly_rejected 	= { FROM = { character_event = { id = MNM.4424 } } clr_character_flag = kindly_rejected }
			cruelly_rejected 	= { FROM = { character_event = { id = MNM.4425 } } clr_character_flag = cruelly_rejected }
		}
	}
}

#Understood lesson
character_event = {
	id = MNM.4422
	desc = EVTDESC_MNM_4422
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4422
		custom_tooltip = { text = EVTOPTA_MNM_4420_TOOLTIP_SUCCESS }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = 2 } }
		hidden_effect = { monastic_order_purity_effect = yes }

		event_target:interrupting_child = {
			if = {
				limit = {
					has_dlc = "Zeus"
					NOT = { trait = idolizer }
				}
				add_trait = idolizer
			}
			if = {
				limit = {
					NOT = { has_dlc = "Zeus" }
					NOT = { trait = zealous }
				}
				add_trait = zealous
			}
			if = {
				limit = { NOT = { is_smart_trigger = yes } }
				random = {
					chance = 20
					add_trait = shrewd
				}
			}
		}

		random_list = {
			80 = {
				reverse_opinion = {
					who = event_target:interrupting_child
					modifier = kind_parent
					years = 10
				}
			}
			20 = {
				modifier = {
					factor = 0
					is_friend = event_target:interrupting_child
				}
				add_friend = event_target:interrupting_child
			}
		}
	}
}

#Did not understand lesson
character_event = {
	id = MNM.4423
	desc = EVTDESC_MNM_4423
	picture = GFX_evt_child_bully
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4423
		custom_tooltip = { text = EVTOPTA_MNM_4420_TOOLTIP_FAILURE }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = -1 } }

		event_target:interrupting_child = {
			if = {
				limit = { NOT = { is_dumb_trigger = yes } }
				random = {
					chance = 15
					add_trait = dull
				}
			}
		}
	}
}	

#Kindly rejected
character_event = {
	id = MNM.4424
	desc = EVTDESC_MNM_4424
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4424
		custom_tooltip = { text = EVTOPTC_MNM_4420_TOOLTIP_SUCCESS }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = 1 } }
	}
}

#Cruelly rejected
character_event = {
	id = MNM.4425
	desc = EVTDESC_MNM_4425
	picture = GFX_evt_child_bully
	border = GFX_event_normal_frame_diplomacy
	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	immediate = { 
		event_target:interrupting_child = {
			mother_even_if_dead = {
				if = {
					limit = { NOT = { character = ROOT } }
					save_event_target_as = other_parent
				}
			}
			father_even_if_dead = {
				if = {
					limit = { NOT = { character = ROOT } }
					save_event_target_as = other_parent
				}
			}
		}
	}

	option = {
		name = EVTOPTA_MNM_4425
		custom_tooltip = { text = EVTOPTC_MNM_4420_TOOLTIP_FAILURE }
		hidden_effect = { change_variable = { which = holy_seclusion_points value = -2 } }

		random = {
			chance = 20 
			add_trait_cruel_effect = yes
		}

		random_list = {
			80 = {
				reverse_opinion = {
					who = event_target:interrupting_child
					modifier = cruel_parent
					years = 10
				}
			}
			20 = {
				modifier = {
					factor = 0
					is_friend = event_target:interrupting_child
				}
				add_rival = event_target:interrupting_child
			}
		}
	}
}

#General good outcome
character_event = {
	id = MNM.4426
	picture = GFX_evt_religious_exultation
	border = GFX_event_normal_frame_religion
	is_triggered_only = yes
	hide_from = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	desc = {
		trigger = { has_character_flag = success_seculison_desc_A }
		text = EVTDESC_MNM_4425_A
	}
	desc = {
		trigger = { has_character_flag = success_seculison_desc_B }
		text = EVTDESC_MNM_4425_B
	}
	desc = {
		trigger = { has_character_flag = success_seculison_desc_C }
		text = EVTDESC_MNM_4425_C
	}


	immediate = {
		random_list = { #This setup
			33 = { 
				modifier = { factor = 0 has_character_flag = success_seculison_desc_A }
				set_character_flag = success_seculison_desc_A
				clr_character_flag = success_seculison_desc_B
				clr_character_flag = success_seculison_desc_C
			}
			33 = { 
				modifier = { factor = 0 has_character_flag = success_seculison_desc_B }
				set_character_flag = success_seculison_desc_B
				clr_character_flag = success_seculison_desc_A
				clr_character_flag = success_seculison_desc_C
			}
			33 = { 
				modifier = { factor = 0 has_character_flag = success_seculison_desc_C }
				set_character_flag = success_seculison_desc_C
				clr_character_flag = success_seculison_desc_B
				clr_character_flag = success_seculison_desc_A
			}
		}
	}

	option = {
		name = {
			trigger = {
				NOR = {
					society_member_of = monastic_order_buddhist
					society_member_of = monastic_order_jain
				}
			}
			text = EVTOPTA_MNM_4426_GOD
		}
		name = {
			trigger = {
				OR = {
					society_member_of = monastic_order_buddhist
					society_member_of = monastic_order_jain
				}
			}
			text = EVTOPTA_MNM_4426_NOGOD
		}
		custom_tooltip = { text = EVTOPTA_4406_TOOLTIP }

		hidden_effect = {
			change_variable = { which = holy_seclusion_points value = 1 }
			#clr_character_flag = success_seculison_desc_A
			#clr_character_flag = success_seculison_desc_B
			#clr_character_flag = success_seculison_desc_C
		}
	}
}

#Fail/success evaluation for penance/meditation
character_event = {
	id = MNM.4427
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		if = {
			limit = { FROM = { check_variable = { which = holy_seclusion_points value = 4 } } }
			FROM = { letter_event = { id = MNM.4428 } }
		}
		if = {
			limit = { FROM = { NOT = { check_variable = { which = holy_seclusion_points value = -2 } } } }
			FROM = { letter_event = { id = MNM.4429 } }
		}
	}
}

#Penance/meditation success
letter_event = {
	id = MNM.4428
	border = GFX_event_letter_frame_religion
	desc = EVTDESC_MNM_4428
	is_triggered_only = yes
	
	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4428

		if = {
			limit = { has_quest = quest_monastic_order_penance }
			clr_quest = quest_monastic_order_penance
			sound_effect = monastic_orders_penance
			remove_character_modifier = doing_penance
		}
		if = {
			limit = { has_quest = quest_monastic_order_meditation }
			clr_quest = quest_monastic_order_meditation
			sound_effect = monastic_orders_meditate_in_seclusion
			remove_character_modifier = in_meditation
		}
		add_society_currency_medium_effect = yes
		hidden_effect = { 
			monastic_order_purity_effect = yes 
			clr_character_flag = success_seculison_desc_A #Flags from 4426
			clr_character_flag = success_seculison_desc_B
			clr_character_flag = success_seculison_desc_C
			clr_character_flag = holy_seclusion_struggled_with_vice
			clr_character_flag = holy_seclusion_scripture_reading
			clr_character_flag = holy_seclusion_timer
			clr_character_flag = holy_seclusion_struggled_with_loneliness
			clr_character_flag = holy_seclusion_interrupting_child
		}
	}
}

#Penance/meditation failure
letter_event = {
	id = MNM.4429
	border = GFX_event_letter_frame_religion
	desc = EVTDESC_MNM_4429
	is_triggered_only = yes

	trigger = {
		OR = {
			is_christian_monastic_member_trigger = yes
			is_dharmic_monastic_member_trigger = yes
		}
		OR = {
			has_quest = quest_monastic_order_penance
			has_quest = quest_monastic_order_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4429

		if = {
			limit = { has_quest = quest_monastic_order_penance }
			clr_quest = { id = quest_monastic_order_penance failure = yes }
			remove_character_modifier = doing_penance
		}
		if = {
			limit = { has_quest = quest_monastic_order_meditation }
			clr_quest = { id = quest_monastic_order_meditation failure = yes }
			remove_character_modifier = in_meditation
		}
		hidden_effect = {
			clr_character_flag = success_seculison_desc_A #Flags from 4426
			clr_character_flag = success_seculison_desc_B
			clr_character_flag = success_seculison_desc_C
		}
	}
}

#Left Monastic Order or cancelled seclusion mission, and therefore rejoins the world of the living
character_event = {
	id = MNM.4399
	border = GFX_event_normal_frame_religion
	desc = EVTDESC_MNM_4399
	picture = GFX_evt_recovery

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			remove_character_modifier = doing_penance
			remove_character_modifier = in_meditation
		}
	}

	option = {
		name = EVTOPTA_MNM_4399

		if = {
			limit = { has_quest = quest_monastic_order_penance }
			clr_quest = { id = quest_monastic_order_penance failure = yes }
		}
		if = {
			limit = { has_quest = quest_monastic_order_meditation }
			clr_quest = { id = quest_monastic_order_meditation failure = yes }
		}
		hidden_effect = {
			hidden_effect = {
				clr_character_flag = success_seculison_desc_A #Flags from 4426
				clr_character_flag = success_seculison_desc_B
				clr_character_flag = success_seculison_desc_C
				clr_character_flag = holy_seclusion_struggled_with_vice
				clr_character_flag = holy_seclusion_scripture_reading
				clr_character_flag = holy_seclusion_timer
				clr_character_flag = holy_seclusion_struggled_with_loneliness
				clr_character_flag = holy_seclusion_interrupting_child
			}
		}
	}
}


#MISSION: Do charity
society_quest_event = {
	id = MNM.4011
	desc = EVTDESC_MNM_4011
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes

	option = {
		name = ACCEPT
		set_quest = quest_monastic_order_donate_to_charity
	}
	option = {
		name = DECLINE
		custom_tooltip = { text = decline_quest_tooltip }

		add_character_modifier = {
			name = quest_cooldown_timer
			hidden = yes
			days = 1000
		}

		ai_chance = { factor = 0 }
	}
}


#MISSION: Theology focus
society_quest_event = {
	id = MNM.4015
	desc = EVTDESC_MNM_4015
	picture = GFX_evt_secluded_in_prayer
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes

	trigger = {
		NOR = {
			has_focus = focus_theology
			has_any_quest = yes
		}
	}

	option = {
		name = ACCEPT
		set_quest = quest_monastic_order_theology_focus
	}

	option = {
		name = DECLINE
		custom_tooltip = { text = decline_quest_tooltip }

		add_character_modifier = {
			name = quest_cooldown_timer
			hidden = yes
			days = 1000
		}

		ai_chance = { factor = 0 }
	}
}

#send to grandmaster for Ping
character_event = {
	id = MNM.4016
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		random_society_member = {
			limit = {
				same_society_as = ROOT
				is_society_grandmaster = yes
			}
			character_event = {
				id = MNM.4017
			}
		}
	}
}


#Ping
character_event = {
	id = MNM.4017
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		FROM = {
			letter_event = {
				id = MNM.4018
			}
		}
	}
}

letter_event = {
	id = MNM.4018
	desc = EVTDESC_MNM_4018
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes


	option = {
		name = EVTOPT_MNM_4018
		
		clr_quest = quest_monastic_order_theology_focus
		sound_effect = monastic_orders_pick_theology_focus
		hidden_effect = { monastic_order_purity_effect = yes }
		
		add_society_currency_minor_effect = yes
	}

}


#MISSION: Christian Pilgrimage
society_quest_event = {
	id = MNM.4019
	desc = EVTDESC_MNM_4019
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes


	option = {
		name = ACCEPT
		set_quest = quest_monastic_order_pilgrimage_christian
	}
	
	option = {
		name = DECLINE
		custom_tooltip = { text = decline_quest_tooltip }

		add_character_modifier = {
			name = quest_cooldown_timer
			hidden = yes
			days = 1000
		}

		ai_chance = { factor = 0 }
	}
}

#send to grandmaster for Ping
character_event = {
	id = MNM.4020
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		random_society_member = {
			limit = {
				same_society_as = ROOT
				is_society_grandmaster = yes
			}
			character_event = {
				id = MNM.4021
			}
		}
	}
}


#Ping
character_event = {
	id = MNM.4021
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		FROM = {
			letter_event = {
				id = MNM.4022
			}
		}
	}
}

letter_event = {
	id = MNM.4022
	desc = EVTDESC_MNM_4022
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes


	option = {
		name = EVTOPT_MNM_4022
		
		clr_quest = quest_monastic_order_pilgrimage_christian
		sound_effect = monastic_orders_pilgrimage
		hidden_effect = { monastic_order_purity_effect = yes }
		
		add_society_currency_major_effect = yes
	}
}


#MISSION: Dharmic Pilgrimage
society_quest_event = {
	id = MNM.8095
	desc = EVTDESC_MNM_4019
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes


	option = {
		name = ACCEPT
		set_quest = quest_indian_monastic_order_pilgrimage
	}
	option = {
		name = DECLINE

		hidden_effect = {
			add_character_modifier = {
				name = quest_cooldown_timer
				hidden = yes
				days = 1000
			}
		}
	}
}


#send to grandmaster for Ping
character_event = {
	id = MNM.8096
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		random_society_member = {
			limit = {
				same_society_as = ROOT
				is_society_grandmaster = yes
			}
			character_event = {
				id = MNM.8097
			}
		}
	}
}


#Ping
character_event = {
	id = MNM.8097
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		FROM = {
			letter_event = {
				id = MNM.8099
			}
		}
	}
}

#Done
letter_event = {
	id = MNM.8099
	desc = EVTDESC_MNM_8099
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes

	trigger = { has_quest = quest_indian_monastic_order_pilgrimage }

	option = {
		name = EVTOPT_MNM_8099
		
		clr_quest = quest_indian_monastic_order_pilgrimage
		sound_effect = monastic_orders_pilgrimage
		
		add_society_currency_major_effect = yes
	}
}

#MISSION: Build a Temple
society_quest_event = {
	id = MNM.4023
	desc = EVTDESC_MNM_4023
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes


	option = {
		name = ACCEPT
		set_quest = monastic_orders_temple_construction
	}
	option = {
		name = DECLINE
		custom_tooltip = { text = decline_quest_tooltip }

		add_character_modifier = {
			name = quest_cooldown_timer
			hidden = yes
			days = 1000
		}

		ai_chance = { factor = 0 }
	}
}

#send to grandmaster for Ping
character_event = {
	id = MNM.4024
	is_triggered_only = yes
	hide_window = yes
	
	trigger = {
		has_quest = monastic_orders_temple_construction
		FROM = {
			holding_type = temple
		}
	}
	
	immediate = {
		random_society_member = {
			limit = {
				same_society_as = ROOT
				is_society_grandmaster = yes
			}
			character_event = {
				id = MNM.4025
			}
		}
	}
}


#Ping
character_event = {
	id = MNM.4025
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		FROM = {
			letter_event = {
				id = MNM.4026
			}
		}
	}
}

letter_event = {
	id = MNM.4026
	desc = EVTDESC_MNM_4026
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes
	
	option = {
		name = EVTOPT_MNM_4026
		clr_quest = monastic_orders_temple_construction
		sound_effect = monastic_orders_build_temple_holding
		hidden_effect = { monastic_order_purity_effect = yes }
		add_society_currency_major_effect = yes
	}
}



###POWERS###

#POWER: Swapping Celibacy
character_event = {
	id = MNM.4090
	desc = EVTDESC_MNM_4090
	picture = GFX_evt_secluded_in_prayer
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPT_MNM_4090
		add_trait = celibate
	}
}

character_event = {
	id = MNM.4091
	desc = EVTDESC_MNM_4091
	picture = GFX_evt_pregnancy
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes


	option = {
		name = EVTOPT_MNM_4091
		remove_trait = celibate
	}
}

# #POWER: Passive trait improvement ###Purity effect now only triggered through mission success
# character_event = {
	# id = MNM.4430
	# hide_window = yes
# 
	# religion_group = indian_group
	# is_in_society = yes
	# capable_only = yes
	# prisoner = no
	# min_age = 16
# 	
	# is_triggered_only = yes
	# is_in_society = yes
# 	
	# trigger = { 
		# OR = {
			# society_member_of = monastic_order_buddhist
			# society_member_of = monastic_order_jain
		# }
	# }
# 
	# immediate = {
		# change_variable = { which = "global_passive_purity_possible" value = 1 }
		# random = {
			# chance = 20
			# modifier = {
				# factor = 1.3
				# society_rank >= 2
			# }
			# modifier = {
				# factor = 1.3
				# society_rank >= 3
			# }
			# modifier = {
				# factor = 1.3
				# society_rank >= 4
			# }
			# change_variable = { which = "global_passive_purity_fired" value = 1 }
			# character_event = { id = MNM.4400 }
		# }
	# }
# }


#POWER: Invite monk or nun 
character_event = {
    id = MNM.4432
    hide_window = yes

    is_triggered_only = yes

    trigger = { is_monastic_member_trigger = yes }

	immediate = {
		clr_character_flag = ascetic_arriving
		random_list = {
			#Nun
			60 = {
				modifier = {
					factor = 0.2
					NOR = {			
						primary_title = {
							has_law = female_council_law_4
						}
						has_game_rule = {
							name = gender
							value = all
						}
					}
				}
				random_list = {
					33 = {
						create_character = {
							random_traits = yes
							dynasty = none
							religion = ROOT
							female = yes
							age = 19
							health = 6
						}
						new_character = { save_event_target_as = ascetic }
					}
					33 = {
						create_character = {
							random_traits = yes
							dynasty = none
							religion = ROOT
							female = yes
							age = 37
							health = 6
						}
						new_character = { save_event_target_as = ascetic }
					}
					33 = {
						create_character = {
							random_traits = yes
							dynasty = none
							religion = ROOT
							female = yes
							age = 68
							health = 6
						}
						new_character = { save_event_target_as = ascetic }
					}
				}
			}
			#Monk
			40 = {
				random_list = {
					33 = {
						create_character = {
							random_traits = yes
							dynasty = none
							religion = ROOT
							female = no
							age = 22
							health = 6
						}
						new_character = { save_event_target_as = ascetic }
					}
					33 = {
						create_character = {
							random_traits = yes
							dynasty = none
							religion = ROOT
							female = no
							age = 42
							health = 6
						}
						new_character = { save_event_target_as = ascetic }
					}
					33 = {
						create_character = {
							random_traits = yes
							dynasty = none
							religion = ROOT
							female = no
							age = 65
							health = 6
						}
						new_character = { save_event_target_as = ascetic }
					}
				}
			}
		}

		event_target:ascetic = {
			join_prev_monastic_order_society = yes
		
			#Set correct education
			remove_education_effect = yes
			random_list = {
				60 = { add_trait = scholarly_theologian }
				40 = { add_trait = mastermind_theologian }
			}

			#Up  learning
			random_list = {
				25 = { change_learning = 3 }
				25 = { change_learning = 4 }
				25 = { change_learning = 5 }
				25 = { change_learning = 6 }
			}

			#Set some interesting traits 

			#Nun/monk traits
			add_ascetic_trait_effect = yes
			add_trait = celibate
			add_trait = zealous
			remove_trait = cynical
			if = {
				limit = {
					religion_group = indian_group
					NOT = { religion = taoist }
					NOT = { religion = bon }
				}
				remove_trait = kshatriya
				remove_trait = vaishya
				add_trait = brahmin
			}

			#Nice congential
			random_list = {
				10 = {
					add_trait = fair
					remove_trait = ugly
				}
				5 = {
					add_trait = genius
					remove_trait = imbecile
					remove_trait = quick
					remove_trait = slow
				}
				10 = {
					add_trait = quick
					remove_trait = imbecile
					remove_trait = genius
					remove_trait = slow
				}
				5 = {
					add_trait = strong
					remove_trait = weak
				}
				100 = { }
			}

			#Lifestyle
			remove_lifestyle_trait_effect = yes
			random_list = {
				15 = { add_trait = scholar }
				15 = { add_trait = theologian }
				10 = { add_trait = mystic }
				20 = { 
					modifier = {
						factor = 0
						NOT = { ROOT = { society_member_of = monastic_order_benedictine } }
					}
					add_trait = gardener
				}
			}

			#Virtues
			remove_trait = lustful
			remove_trait = wroth
			remove_trait = gluttonous
			remove_trait = cruel
			random = {
				chance = 20
				add_trait = chaste
			}
			random = {
				chance = 20
				remove_trait = envious
				add_trait = kind
			}
			random = {
				chance = 20
				remove_trait = greedy
				add_trait = charitable
			}
			random = {
				chance = 10
				add_trait = temperate
			}
			random = {
				chance = 5
				add_trait = patient
				remove_trait = wroth
			}
			random = {
				chance = 10
				add_trait = humble
				remove_trait = proud
			}
			random = {
				chance = 5
				remove_trait = slothful
				remove_trait = diligent
			}

			#Misc traits
			remove_trait = deceitful
			remove_trait = arbitrary
			random = {
				chance = 10
				add_trait = honest
			}
			random = {
				chance = 10
				add_trait = just
			}
			random = {
				chance = 15
				add_trait = erudite
			}
			random = {
				chance = 10
				add_trait = content
				remove_trait = ambitious
			}
			random = {
				chance = 15
				add_trait = homosexual
			}
			if = {
				limit = { has_dlc = "Reapers" }
				random = {
					chance = 33
					add_trait = physician
				}
			}

			#Nicknames
			random_list = {
				10 = {
					give_nickname = nick_the_holy
				}
				10 = { 
					modifier = {
						factor = 0
						NAND = {
							trait = kind
							trait = charitable
							trait = humble
						}
					}
					give_nickname = nick_the_saint
				}
				10 = { 
					modifier = {
						factor = 0
						NAND = {
							trait = kind
							trait = charitable
						}
					}
					give_nickname = nick_the_kind
				}
				10 = { 
					modifier = {
						factor = 0
						NAND = {
							trait = charitable
							trait = just
						}
					}
					give_nickname = nick_the_good
				}
				10 = { 
					modifier = {
						factor = 0
						OR = {
							is_smart_trigger = yes
							trait = just
							trait = patient
							trait = scholar
						}
					}
					give_nickname = nick_the_wise
				}
				10 = { 
					modifier = {
						factor = 0
						NOT = { religion_group = christian }
					}
					give_nickname = nick_the_confessor
				}
				10 = { 
					modifier = {
						factor = 0
						NOT = { religion_group = christian }
					}
					give_nickname = nick_the_blessed
				}
				10 = { 
					modifier = {
						factor = 0
						NOT = { religion_group = christian }
					}
					give_nickname = nick_the_apostle
				}
				10 = { 
					modifier = {
						factor = 0
						NOT = { religion_group = christian }
					}
					give_nickname = nick_the_pious
				}
				50 = { }
			}
			character_event = { id = MNM.4433 }	
		}
	}
}

#Ping event for new monk/nun
character_event = {
	id = MNM.4433
	hide_window = yes

	is_triggered_only = yes

	immediate = {
		FROM = { character_event = { id = MNM.4434 } }
	}
}

#Introduction of new monk/nun
character_event = {
	id = MNM.4434
	desc = EVTDESC_MNM_4434
	picture = GFX_evt_monastery_nuns
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_MNM_4434
		reverse_opinion = {
			who = FROM
			modifier = opinion_loyal_servant
		}
	}
}

#POWER: Benedictine becomes diligent
#Ping event for Benedictine Diligent (mentee)
character_event = {
	id = MNM.4600
	hide_window = yes

	is_triggered_only = yes

	trigger = { NOT = { trait = diligent } }

	immediate = { 
		save_event_target_as = benedictines_diligent_mentee
		if = {
    	    limit = {
    	        NOT = {
    	            any_society_member = {
    	                society_member_of = monastic_order_benedictine
    	                trait = diligent
    	                NOT = { character = ROOT }
    	            }
    	        }
    	    }
    	    random_society_member = {
    	        limit = {
    	            society_member_of = monastic_order_benedictine
    	            ai = yes
    	            NOT = { trait = diligent }
    	            NOT = { character = ROOT }
    	        }
    	        add_trait = diligent
    	    }
    	}
		random_society_member = {
    	    limit = {
    	        society_member_of = monastic_order_benedictine
    	        trait = diligent
    	        NOT = { character = ROOT }
    	    }
    	    save_event_target_as = benedictines_diligent_mentor
    	}
   		random_society_member = {
    	    limit = {
    	        society_member_of = monastic_order_benedictine
    	        society_rank = { rank == 4 }
    	        trait = diligent
    	        NOT = { character = ROOT }
    	    }
    	    save_event_target_as = benedictines_diligent_mentor
    	}
    	event_target:benedictines_diligent_mentor = { character_event = { id = MNM.4601 } }
	}
}

#Benedictine Diligent Mentor: should I help fellow benedictine become diligent?
character_event = {
	id = MNM.4601
	picture = GFX_evt_monastery_monks

	trigger = { is_monastic_member_trigger = yes }

	desc = {
		trigger = { #target is slothful
			event_target:benedictines_diligent_mentee = {
				trait = slothful
			} 
		}
		text = EVTDESC_MNM_4601_SLOTHFUL
	}
	desc = {
		trigger = { #target is not diligent
			event_target:benedictines_diligent_mentee = {
				NOT = { 
					trait = slothful 
				}
			}
		}
		text = EVTDESC_MNM_4601_REGULAR
	}

	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { #offer to help in exchange for money
		name = EVTOPTA_MNM_4601
		custom_tooltip = { text = EVTOPTA_MNM_4601_TOOLTIP }
		hidden_effect = {
			event_target:benedictines_diligent_mentee = {
				letter_event = { id = MNM.4603 days = 7 random = 7 }
			}
		}
		event_target:benedictines_diligent_mentee = {
			set_character_flag = appear_in_option
			clr_character_flag = appear_in_option
		}
	}

	option = { #nah
		name = EVTOPTB_MNM_4601
		custom_tooltip = { text = EVTOPTB_MNM_4601_TOOLTIP }
		ai_chance = { factor = 0 }
	}
}


#Benedictines Diligent Mentee: receive offer of help
letter_event = {
	id = MNM.4603
	border = GFX_event_letter_frame_religion

	desc = {
		trigger = { trait = slothful }
		text = EVTDESC_MNM_4603_SLOTHFUL
	}
	desc = {
		trigger = { 
			NOT = { trait = slothful }
		}
		text = EVTDESC_MNM_4603_REGULAR
	}

	is_triggered_only = yes

	option = { #accept help in exchange for money
		name = EVTOPTA_MNM_4603
		hidden_effect = {
			event_target:benedictines_diligent_mentor = {
				letter_event = { id = MNM.4604 days = 7 random = 7 }
			}
		}
		transfer_scaled_wealth = {
			to = event_target:benedictines_diligent_mentor
			value = 0.25
			min = 30
		}
		ai_chance = { factor = 0.9 }
	}

	option = { #HOW DARE HE?!
		trigger = { trait = slothful }
		name = EVTOPTB_MNM_4603_SLOTHFUL
		hidden_effect = {
			event_target:benedictines_diligent_mentor = {
				set_character_flag = MNM_4603_rejected_help_outraged
				letter_event = { id = MNM.4608 days = 7 random = 7 }
			}
		}
		opinion = {
			who = event_target:benedictines_diligent_mentor
			modifier = opinion_outraged
			years = 5
		}
		prestige = 100
		ai_chance = { 
			factor = 0.1 
			modifier = {
				factor = 2
				trait = proud
			}
			modifier = {
				factor = 0.5
				trait = humble
			}
		}
	}

	option = { #I don't need help
		trigger = { NOT = { trait = slothful } }
		name = EVTOPTC_MNM_4603_REGULAR
		hidden_effect = {
			event_target:benedictines_diligent_mentor = {
				set_character_flag = MNM_4603_rejected_help_normal
				letter_event = { id = MNM.4608 days = 7 random = 7 }
			}
		}
		prestige = 25
		ai_chance = { 
			factor = 0.1 
			modifier = {
				factor = 2
				trait = proud
			}
			modifier = {
				factor = 0.5
				trait = humble
			}
		}
	}
}

#Benedictines Diligent Mentor: mentee accepted offer
letter_event = {
	id = MNM.4604
	border = GFX_event_letter_frame_religion

	desc = { text = EVTDESC_MNM_4604 }

	is_triggered_only = yes

	trigger = { is_monastic_member_trigger = yes }

	option = { #Give help
		name = EVTOPTA_MNM_4604
		custom_tooltip = { text = EVTOPTA_MNM_4604_TOOLTIP }
		hidden_effect = {
			event_target:benedictines_diligent_mentee = {
				character_event = { id = MNM.4605 days = 7 random = 7 }
			}
		}
		tooltip = {
			event_target:benedictines_diligent_mentee = {
				transfer_scaled_wealth = {
					to = event_target:benedictines_diligent_mentor
					value = 0.25
					min = 50
				}
			}
			reverse_opinion = {
				who = event_target:benedictines_diligent_mentee
				modifier = opinion_very_grateful
				years = 5
			}
		}
	}
}

#Benedictines Diligent Mentee: help received
character_event = {
	id = MNM.4605
	picture = GFX_evt_monastery_monks

	desc = { text = EVTDESC_MNM_4605 }
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { #Receive help
		name = EVTOPTA_MNM_4605
		hidden_effect = {
			event_target:benedictines_diligent_mentor = {
				character_event = { id = MNM.4606 days = 7 random = 7 }
			}
		}
		opinion = {
			who = event_target:benedictines_diligent_mentor
			modifier = opinion_very_grateful
			years = 5
		}
	}
}

#Ping event for Benedictines Diligent: add Diligent (and remove slothful)
character_event = {
	id = MNM.4606
	hide_window = yes

	is_triggered_only = yes

	immediate = { 
		event_target:benedictines_diligent_mentee = {
			character_event = { id = MNM.4607 days = 30 random = 30 }
		}
	}
}

#Benedictines Diligent Mentee: add Diligent (and remove slothful)
character_event = {
	id = MNM.4607
	picture = GFX_evt_monastery_monks

	desc = {
		trigger = { trait = slothful }
		text = EVTDESC_MNM_4607_SLOTHFUL
	}
	desc = {
		trigger = { 
			NOT = { trait = slothful }
		}
		text = EVTDESC_MNM_4607_REGULAR
	}
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	immediate = {
		if = {
			limit = {
				trait = slothful
			}
			set_character_flag = MNM_4609_had_slothful
		}
		if = {
			limit = {
				NOT = { trait = slothful }
			}
			set_character_flag = MNM_4609_not_had_slothful
		}
	}

	option = {
		name = EVTOPTA_MNM_4607
		if = {
			limit = { trait = slothful }
			remove_trait = slothful
		}
		add_trait = diligent
		hidden_effect = {
			character_event = { id = MNM.4609 }
		}
	}
}

#Benedictine Diligent mentor: mentee rejected offer
letter_event = {
	id = MNM.4608
	border = GFX_event_letter_frame_religion

	desc = {
		trigger = { 
			has_character_flag = MNM_4603_rejected_help_outraged
		} 
		text = EVTDESC_MNM_4608_OUTRAGED 
	}
	desc = {
		trigger = { 
			has_character_flag = MNM_4603_rejected_help_normal
		} 
		text = EVTDESC_MNM_4608_NORMAL 
	}

	is_triggered_only = yes

	option = { #Oh dear...
		trigger = {
			has_character_flag = MNM_4603_rejected_help_outraged
		}
		name = EVTOPTA_MNM_4608_OUTRAGED
		custom_tooltip = { text = EVTOPTA_MNM_4608_TOOLTIP }
		tooltip = {
			reverse_opinion = {
				who = event_target:benedictines_diligent_mentee
				modifier = opinion_outraged
				years = 5
			}
		}
	}
	option = { #Alright then
		trigger = {
			has_character_flag = MNM_4603_rejected_help_normal
		}
		name = EVTOPTA_MNM_4608_NORMAL
		custom_tooltip = { text = EVTOPTA_MNM_4608_TOOLTIP }
	}
}

#Benedictines Diligent notify mentor mentee became Diligent
character_event = {
	id = MNM.4609
	picture = GFX_evt_monastery_monks

	desc = {
		trigger = { #target is slothful
			event_target:benedictines_diligent_mentee = {
				has_character_flag =  MNM_4609_had_slothful
			} 
		}
		text = EVTDESC_MNM_4609_SLOTHFUL
	}
	desc = {
		trigger = { #target is not diligent
			event_target:benedictines_diligent_mentee = {
				NOR = { 
					has_character_flag = MNM_4609_not_had_slothful 
				}
			}
		}
		text = EVTDESC_MNM_4609_REGULAR
	}
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVTOPTA_MNM_4609
		tooltip = { 
			event_target:benedictines_diligent_mentee = {
				if = {
					limit = { trait = slothful }
					remove_trait = slothful
				}
				add_trait = diligent
			}
		}
		hidden_effect = {
			event_target:benedictines_diligent_mentee = {
				clr_character_flag = MNM_4609_had_slothful
				clr_character_flag = MNM_4609_not_had_slothful
			}
		}
	}
}

#POWER: Convert County
#Notification for ruler who performs the power
character_event = {
	id = MNM.4990
	picture = GFX_evt_charity
	desc = EVTDESC_MNM_4990
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	notification = yes
	
	option = {
		name = EXCELLENT
	}
}

#Notification event for county owner if different from user
character_event = {
	id = MNM.4991
	picture = GFX_evt_charity
	desc = EVTDESC_MNM_4991
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = I_SEE
	}
}

#POWER: Rk2 Remove sin "spiritual_guidance"
#Notification for when you do it on someone
character_event = {
	id = MNM.4950
	picture = GFX_evt_secluded_in_prayer
	desc = EVTDESC_MNM_4950
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
	}
}

#Notification for when you are targeted
character_event = {
	id = MNM.4951
	picture = GFX_evt_secluded_in_prayer
	desc = EVTDESC_MNM_4951
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = I_SEE
		if = {
			limit = { has_character_flag = spiritual_guidance_lustful }
			tooltip = { remove_trait = lustful }
		}
		if = {
			limit = { has_character_flag = spiritual_guidance_gluttonous }
			tooltip = { remove_trait = gluttonous }
		}
		if = {
			limit = { has_character_flag = spiritual_guidance_greedy }
			tooltip = { remove_trait = greedy }
		}
		if = {
			limit = { has_character_flag = spiritual_guidance_slothful }
			tooltip = { remove_trait = slothful }
		}
		if = {
			limit = { has_character_flag = spiritual_guidance_wroth }
			tooltip = { remove_trait = wroth }
		}
		if = {
			limit = { has_character_flag = spiritual_guidance_envious }
			tooltip = { remove_trait = envious }
		}
		if = {
			limit = { has_character_flag = spiritual_guidance_proud }
			tooltip = { remove_trait = proud }
		}
		clr_character_flag = spiritual_guidance_lustful
		clr_character_flag = spiritual_guidance_gluttonous
		clr_character_flag = spiritual_guidance_greedy
		clr_character_flag = spiritual_guidance_slothful
		clr_character_flag = spiritual_guidance_wroth
		clr_character_flag = spiritual_guidance_envious
		clr_character_flag = spiritual_guidance_proud
	}
}

#POWER: Rk3 Remove sin "teach_virtue"
#Notification for when you do it on someone
character_event = {
	id = MNM.4960
	picture = GFX_evt_religious_exultation
	desc = EVTDESC_MNM_4960
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
	}
}

#Notification for when you are targeted
character_event = {
	id = MNM.4961
	picture = GFX_evt_religious_exultation
	desc = EVTDESC_MNM_4961
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes
	
	option = {
		name = I_SEE
		if = {
			limit = { has_character_flag = teach_virtue_chaste }
			tooltip = { add_trait = chaste }
		}
		if = {
			limit = { has_character_flag = teach_virtue_temperate }
			tooltip = { add_trait = temperate }
		}
		if = {
			limit = { has_character_flag = teach_virtue_charitable }
			tooltip = { add_trait = charitable }
		}
		if = {
			limit = { has_character_flag = teach_virtue_diligent }
			tooltip = { add_trait = diligent }
		}
		if = {
			limit = { has_character_flag = teach_virtue_patient }
			tooltip = { add_trait = patient }
		}
		if = {
			limit = { has_character_flag = teach_virtue_kind }
			tooltip = { add_trait = kind }
		}
		if = {
			limit = { has_character_flag = teach_virtue_humble }
			tooltip = { add_trait = humble }
		}
		clr_character_flag = teach_virtue_chaste
		clr_character_flag = teach_virtue_temperate
		clr_character_flag = teach_virtue_charitable
		clr_character_flag = teach_virtue_diligent
		clr_character_flag = teach_virtue_patient
		clr_character_flag = teach_virtue_kind
		clr_character_flag = teach_virtue_humble
	}
}


###ACTIONS###

#ACTION: Donating to charity

#Leader Ping for charity
character_event = {
	id = MNM.4013
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		FROM = {
			letter_event = {
				id = MNM.4014
			}
		}
	}
}

letter_event = {
	id = MNM.4014
	desc = EVTDESC_MNM_4014
	border = GFX_event_letter_frame_religion

	is_triggered_only = yes

	trigger = {
		is_monastic_member_trigger = yes
	}

	option = {
		name = EVTOPT_MNM_4014
			
		wealth = -100
		if = {
			limit = { NOT = { has_quest = quest_monastic_order_donate_to_charity } }
			add_society_currency_minor_effect = yes
		}
		
		if = {
			limit = { has_quest = quest_monastic_order_donate_to_charity }
			clr_quest = quest_monastic_order_donate_to_charity
			sound_effect = monastic_orders_donate_charity
			hidden_effect = { monastic_order_purity_effect = yes }
			add_society_currency_medium_effect = yes
		}

		add_character_modifier = {
			modifier = recently_donated_to_charity
			days = 360
		}
		if = {
			limit = { NOT = { trait = greedy } }
			random = {
				chance = 30
				add_trait = charitable
			}
		}
		if = {
			limit = { trait = greedy }
			random = {
				chance = 40
				remove_trait = greedy
			}
		}
		clr_character_flag = donate_to_charity_cooldown
	}
}


###MISC###

#Soul purity effect

character_event = {
	id = MNM.4400
	picture = GFX_evt_religious_exultation
	border = GFX_event_normal_frame_religion

	desc = {
		trigger = { has_character_flag = purity_remove_cynical }
		text = EVTDESC_4400_REMOVE_CYNICAL
	}
	desc = {
		trigger = { has_character_flag = purity_remove_gluttonous }
		text = EVTDESC_4400_REMOVE_GLUTTONOUS
	}
	desc = {
		trigger = { has_character_flag = purity_remove_greedy }
		text = EVTDESC_4400_REMOVE_GREEDY
	}
	desc = {
		trigger = { has_character_flag = purity_remove_slothful }
		text = EVTDESC_4400_REMOVE_SLOTHFUL
	}
	desc = {
		trigger = { has_character_flag = purity_remove_envious }
		text = EVTDESC_4400_REMOVE_ENVIOUS
	}
	desc = {
		trigger = { has_character_flag = purity_remove_wroth }
		text = EVTDESC_4400_REMOVE_WROTH
	}
	desc = {
		trigger = { has_character_flag = purity_remove_proud }
		text = EVTDESC_4400_REMOVE_PROUD
	}
	desc = {
		trigger = { has_character_flag = purity_remove_deceitful }
		text = EVTDESC_4400_REMOVE_DECEITFUL
	}
	desc = {
		trigger = { has_character_flag = purity_remove_cruel }
		text = EVTDESC_4400_REMOVE_CRUEL
	}
	desc = {
		trigger = { has_character_flag = purity_remove_lustful }
		text = EVTDESC_4400_REMOVE_LUSTFUL
	}
	desc = {
		trigger = { has_character_flag = purity_add_humble }
		text = EVTDESC_4400_ADD_HUMBLE
	}
	desc = {
		trigger = { has_character_flag = purity_add_charitable }
		text = EVTDESC_4400_ADD_CHARITABLE
	}
	desc = {
		trigger = { has_character_flag = purity_add_chaste }
		text = EVTDESC_4400_ADD_CHASTE
	}
	desc = {
		trigger = { has_character_flag = purity_add_kind }
		text = EVTDESC_4400_ADD_KIND
	}
	desc = {
		trigger = { has_character_flag = purity_add_temperate }
		text = EVTDESC_4400_ADD_TEMPERATE
	}
	desc = {
		trigger = { has_character_flag = purity_add_honest }
		text = EVTDESC_4400_ADD_HONEST
	}
	desc = {
		trigger = { has_character_flag = purity_remove_ambitious }
		text = EVTDESC_4400_REMOVE_AMBITIOUS
	}
	desc = {
		trigger = { has_character_flag = purity_add_content }
		text = EVTDESC_4400_ADD_CONTENT
	}
	desc = {
		trigger = { has_character_flag = purity_add_patient }
		text = EVTDESC_4400_ADD_PATIENT
	}
	desc = {
		trigger = { has_character_flag = purity_add_diligent }
		text = EVTDESC_4400_ADD_DILIGENT
	}

	is_triggered_only = yes

	trigger = {
		is_monastic_member_trigger = yes
		OR = {
			trait = cynical
			trait = gluttonous
			trait = greedy
			trait = slothful
			trait = envious
			trait = wroth
			trait = proud
			trait = deceitful
			trait = cruel
			AND = {
				trait = lustful
				NOT = { religion = hindu }
			}
			trait = ambitious
			NOT = { trait = humble }
			NOT = { trait = charitable }
			NOT = { trait = kind }
			NOT = { trait = temperate }
			NOT = { trait = honest }
			NAND = {
				trait = chaste
				NOT = { religion = hindu }
			}
			NOT = { trait = patient }
			NOT = { trait = diligent }
			NOT = { trait = content }
		}
	}

	immediate = {
		#FIRST STAGE
		#Removes cynic, gluttonous, greedy, slothful, lustful, envious, wrath, pride, deceitful, 
		#Adds humble, charitable
		if = {
			limit = {
				OR = {
					trait = cynical
					trait = gluttonous
					trait = greedy
					trait = slothful
					trait = envious
					trait = wroth
					trait = proud
					trait = deceitful
					trait = cruel
					AND = {
						trait = lustful
						NOT = { religion = hindu }
					}
					NOT = { trait = humble }
					NOT = { trait = charitable }
				}
			}
			random_list = {
				15 = {
					modifier = { factor = 0 NOT = { trait = cynical } }
					set_character_flag = purity_remove_cynical
				}
				10 = {
					modifier = { factor = 0 NOT = { trait = gluttonous } }
					set_character_flag = purity_remove_gluttonous
				}
				10 = {
					modifier = { factor = 0 NOT = { trait = greedy } }
					set_character_flag = purity_remove_greedy
				}
				10 = {
					modifier = { factor = 0 NOT = { trait = slothful } }
					set_character_flag = purity_remove_slothful
				}
				10 = {
					modifier = { factor = 0 NOT = { trait = envious } }
					set_character_flag = purity_remove_envious
				}
				10 = {
					modifier = { factor = 0 NOT = { trait = wroth } }
					set_character_flag = purity_remove_wroth
				}
				10 = {
					modifier = { factor = 0 NOT = { trait = proud } }
					set_character_flag = purity_remove_proud
				}
				10 = {
					modifier = { factor = 0 NOT = { trait = deceitful } }
					set_character_flag = purity_remove_deceitful
				}
				10 = {
					modifier = { factor = 0 NOT = { trait = cruel } }
					set_character_flag = purity_remove_cruel
				}
				10 = {
					modifier = { 
						factor = 0
						OR = {
							NOT = { trait = lustful }
							religion = hindu
						}
					}
					set_character_flag = purity_remove_lustful
				}
				10 = {
					modifier = {
						factor = 0
						OR = {
							trait = humble
							trait = proud
						}
					}
					set_character_flag = purity_add_humble
				}
				10 = {
					modifier = {
						factor = 0
						OR = {
							trait = charitable
							trait = greedy
						}
					}
					set_character_flag = purity_add_charitable
				}
			}
		}
	
		#SECOND STAGE
		#Add traits chaste, kind, temperate, honest
		if = {
			limit = {
				NOR = {
					trait = cynical
					trait = gluttonous
					trait = slothful
					trait = envious
					trait = wroth
					trait = deceitful
					trait = cruel
					AND = {
						trait = lustful
						NOT = { religion = hindu }
					}
				}
				trait = charitable
				trait = humble
				NAND = {
					AND = {
						trait = chaste
						NOT = { religion = hindu }
					}
					trait = kind
					trait = temperate
					trait = honest
				}
			}
			random_list = {
				10 = {
					modifier = {
						factor = 0
						OR = {
							trait = chaste
							religion = hindu
						}
					}
					set_character_flag = purity_add_chaste
				}
				10 = {
					modifier = { factor = 0 trait = kind }
					set_character_flag = purity_add_kind
				}
				10 = {
					modifier = { factor = 0 trait = temperate }
					set_character_flag = purity_add_temperate
				}
				10 = {
					modifier = { factor = 0 trait = honest }
					set_character_flag = purity_add_honest
				}
			}
		}
		#THIRD STAGE
		#Removes ambitious
		#Adds patient, diligent, content
		if = {
			limit = {
				NOR = {
					trait = cynical
					trait = slothful
					trait = wroth
					trait = cruel
				}
				trait = charitable
				trait = humble
				OR = {
					trait = chaste
					religion = hindu
				}
				trait = kind
				trait = temperate
				trait = honest
			}

			random_list = {
				10 = {
					modifier = { factor = 0 NOT = { trait = ambitious } }
					set_character_flag = purity_remove_ambitious
				}
				10 = {
					modifier = {
						factor =  0
						OR = {
							trait = ambitious
							trait = content
						}
					}
					set_character_flag = purity_add_content
				}
				10 = {
					modifier = { factor = 0 trait = patient }
					set_character_flag = purity_add_patient
				}
				10 = {
					modifier = { factor = 0 trait = diligent }
					set_character_flag = purity_add_diligent
				}
			}
		}
	}

	option = {
		name = {
			trigger = {
				NOR = {
					society_member_of = monastic_order_buddhist
					society_member_of = monastic_order_jain
				}
			}
			text = EVTOPTA_MNM_4400_GOD
		}
		name = {
			trigger = {
				OR = {
					society_member_of = monastic_order_buddhist
					society_member_of = monastic_order_jain
				}
			}
			text = EVTOPTA_MNM_4400_NOGOD
		}

		trigger_switch = {
			on_trigger = has_character_flag
			purity_remove_cynical		= { remove_trait = cynical }
			purity_remove_gluttonous	= { remove_trait = gluttonous }
			purity_remove_greedy		= { remove_trait = greedy }
			purity_remove_slothful		= { remove_trait = slothful }
			purity_remove_envious		= { remove_trait = envious }
			purity_remove_wroth			= { remove_trait = wroth }
			purity_remove_proud			= { remove_trait = proud }
			purity_remove_deceitful     = { remove_trait = deceitful }
			purity_remove_cruel			= { remove_trait = cruel }
			purity_remove_lustful		= { remove_trait = lustful }
			purity_add_humble			= { add_trait = humble }
			purity_add_charitable		= { add_trait = charitable }
			purity_add_chaste			= { add_trait = chaste }
			purity_add_kind				= { add_trait = kind }
			purity_add_temperate		= { add_trait = temperate }
			purity_add_honest			= { add_trait = honest }
			purity_remove_ambitious		= { remove_trait = ambitious }
			purity_add_content			= { add_trait = content }
			purity_add_patient			= { add_trait = patient }
			purity_add_diligent			= { add_trait = diligent }
		}

		clr_character_flag = purity_remove_cynical
		clr_character_flag = purity_remove_gluttonous
		clr_character_flag = purity_remove_greedy
		clr_character_flag = purity_remove_slothful
		clr_character_flag = purity_remove_envious
		clr_character_flag = purity_remove_wroth
		clr_character_flag = purity_remove_proud
		clr_character_flag = purity_remove_deceitful
		clr_character_flag = purity_remove_cruel
		clr_character_flag = purity_remove_lustful
		clr_character_flag = purity_add_humble
		clr_character_flag = purity_add_charitable
		clr_character_flag = purity_add_chaste
		clr_character_flag = purity_add_kind
		clr_character_flag = purity_add_temperate
		clr_character_flag = purity_add_honest
		clr_character_flag = purity_remove_ambitious
		clr_character_flag = purity_add_content
		clr_character_flag = purity_add_patient
		clr_character_flag = purity_add_diligent
	}
}

#Random relic reward for lvl 3 event
letter_event = {
	id = MNM.4431
	desc = EVTDESC_MNM_4431

	is_triggered_only = yes

	trigger = {
		society_rank >= 3
		is_christian_monastic_member_trigger = yes
		NOT = { has_artifact = fingerbone_of_saint }
	}

	option = {
	 	name = EVTOPTA_MNM_4428
		add_artifact = fingerbone_of_saint
	}
}

###INTERACTION EVENTS###

#Monastic Friendship & Love #

#Starter Event for Monastic Friendship - I need a friend.
character_event = {
	id = MNM.4435
	picture = GFX_evt_stone_church
	desc = EVTDESC_MNM_4435
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	only_capable = yes

	trigger = {
		NOT = { is_inaccessible_trigger = yes }
		NOT = { trait = homosexual }
		any_society_member = {
			same_society_as = ROOT
			NOT = { character = ROOT }
			ai = yes
			opinion = {
				who = ROOT
				value = 0
			}
			reverse_opinion = {
				who = ROOT
				value = 0
			}
			NOT = {
				trait = amateurish_plotter
				trait = flamboyant_schemer
				trait = intricate_webweaver
				trait = elusive_shadow
				is_rival = ROOT
				is_friend = ROOT
				is_lover = ROOT
				trait = chaste
				trait = celibate
			}
			OR = {
				AND = {
					is_female = no
					ROOT = { is_female = no }
				}
				AND = {
					is_female = yes
					ROOT = { is_female = yes }
				}
			}
		}
		OR = {
			society_member_of = monastic_order_benedictine
			society_member_of = monastic_order_dominican
			society_member_of = monastic_order_orthodox
			society_member_of = monastic_order_nestorian
			society_member_of = monastic_order_monophysite
			society_member_of = monastic_order_apostolic
			society_member_of = monastic_order_jain
			society_member_of = monastic_order_hindu
			society_member_of = monastic_order_buddhist
		}
	}

	immediate = {
		save_event_target_as = monastic_befriender
		random_society_member = {
			limit = {
				same_society_as = ROOT
				NOT = { character = ROOT }
				ai = yes
				AND = {
					opinion = {
						who = ROOT
						value = 0
					}
					reverse_opinion = {
						who = ROOT
						value = 0
					}
					NOT = {
						trait = amateurish_plotter
						trait = flamboyant_schemer
						trait = intricate_webweaver
						trait = elusive_shadow
						is_rival = ROOT
						is_friend = ROOT
						is_lover = ROOT
						trait = chaste
						trait = celibate
					}
					OR = {
						AND = {
							is_female = no
							ROOT = { is_female = no }
						}
						AND = {
							is_female = yes
							ROOT = { is_female = yes }
						}
					}
				}
			}
			save_event_target_as = monastic_friend
		}
	}

	option = { #I will come as summoned.
		name = EVTOPTA_MNM_4435	
		event_target:monastic_friend = {
			character_event = { id = MNM.4436 days = 30 random = 30 }
		}
	}
}

#Ping Event for Monastic Friendship
character_event = {
	id = MNM.4436
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		event_target:monastic_befriender = {
			character_event = { id = MNM.4437 }
		}
	}
}

#Become closer with other member (Shared activity might lead to friendship? What to do?)
character_event = {
	id = MNM.4437
	picture = GFX_evt_monastery_monks
	desc = {
		text = EVTDESC_MNM_4437
		picture = GFX_evt_monastery_monks
		trigger = {	is_female = no }
	}
	desc = { 
		text = EVTDESC_MNM_4437
		picture = GFX_evt_monastery_nuns
		trigger = {	is_female = yes }
	}
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		is_monastic_member_trigger = yes
	}


	immediate = {
		opinion = {
			who = FROM
			modifier = opinion_budding_friendship
		}
		FROM = {
			opinion = {
				who = ROOT
				modifier = opinion_budding_friendship
			}
		}
	}

	option = { #play a game of strategy
		name = EVTOPTA_MNM_4437
		random = {
			chance = 75
			add_character_modifier = {
				modifier = played_strategy_game
				years = 5
			}
		}
		custom_tooltip = {
			text = monastic_may_become_friends
			hidden_tooltip = {
				event_target:monastic_friend = {
					if = {
						limit = {
							OR = {
								trait = misguided_warrior
								trait = tough_soldier
								trait = skilled_tactician
								trait = brilliant_strategist
							}
						}
						character_event = { id = MNM.4438 days = 15 random = 15 }
					}
					if = {
						limit = {
							NOT = {
								trait = misguided_warrior
								trait = tough_soldier
								trait = skilled_tactician
								trait = brilliant_strategist
							}
						}
						character_event = { id = MNM.4442 days = 15 random = 15 }
					}
				}
			}
		}
	}

	option = { #discuss the holy scripture
		name = EVTOPTB_MNM_4437
		random = {
			chance = 75
			add_character_modifier = {
				modifier = discussed_scripture
				years = 5
			}
		}
		custom_tooltip = {
			text = monastic_may_become_friends
			hidden_tooltip = {
				event_target:monastic_friend = {
					if = {
						limit = {
							OR = {
								trait = detached_priest
								trait = martial_cleric
								trait = scholarly_theologian
								trait = mastermind_theologian
							}
						}
						character_event = { id = MNM.4438 days = 15 random = 15 }
					}
					if = {
						limit = {
							NOT = {
								trait = detached_priest
								trait = martial_cleric
								trait = scholarly_theologian
								trait = mastermind_theologian
							}
						}
						character_event = { id = MNM.4442 days = 15 random = 15 }
					}
				}
			}
		}
	}

	option = { #discuss the intricacies of managing a realm
		name = EVTOPTC_MNM_4437
		random = {
			chance = 75
			add_character_modifier = {
				modifier = discussed_realm_management
				years = 5
			}
		}
		custom_tooltip = {
			text = monastic_may_become_friends
			hidden_tooltip = {
				event_target:monastic_friend = {
					if = {
						limit = {
							OR = {
								trait = indulgent_wastrel
								trait = thrifty_clerk
								trait = fortune_builder
								trait = midas_touched
							}
						}
						character_event = { id = MNM.4438 days = 15 random = 15 }
					}
					if = {
						limit = {
							NOT = {
								trait = indulgent_wastrel
								trait = thrifty_clerk
								trait = fortune_builder
								trait = midas_touched
							}
						}
						character_event = { id = MNM.4442 days = 15 random = 15 }
					}
				}
			}
		}
	}

	option = { #take a stroll while engaging in small talk
		name = EVTOPTD_MNM_4437
		random = {
			chance = 75
			add_character_modifier = {
				modifier = took_stroll_small_talk
				years = 5
			}
		}
		custom_tooltip = {
			text = monastic_may_become_friends
			hidden_tooltip = {
				event_target:monastic_friend = {
					if = {
						limit = {
							OR = {
								trait = naive_appeaser
								trait = underhanded_rogue
								trait = charismatic_negotiator
								trait = grey_eminence
							}
						}
						character_event = { id = MNM.4438 days = 15 random = 15 }
					}
					if = {
						limit = {
							NOT = {
								trait = naive_appeaser
								trait = underhanded_rogue
								trait = charismatic_negotiator
								trait = grey_eminence
							}
						}
						character_event = { id = MNM.4442 days = 15 random = 15 }
					}
				}
			}
		}
	}
}

#Ping event for friendship established
character_event = {
	id = MNM.4438
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		event_target:monastic_befriender = {
			if = {
				limit = {
					NOT = {
						is_rival = FROM
					}
				}
				character_event = { id = MNM.4439 }
			}
		}
	}
}

#Friendship Established! Pursue it further, or focus on monastic duties?
character_event = {
	id = MNM.4439
	picture = GFX_evt_monastery_monks
	desc = {
		text = EVTDESC_MNM_4439
		picture = GFX_evt_monastery_monks
		trigger = {	is_female = no }
	}
	desc = { 
		text = EVTDESC_MNM_4439
		picture = GFX_evt_monastery_nuns
		trigger = {	is_female = yes }
	}
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		is_monastic_member_trigger = yes
	}


	immediate = {
		remove_opinion = {
			who = FROM
			modifier = opinion_budding_friendship
		}
		FROM = {
			remove_opinion = {
				who = ROOT
				modifier = opinion_budding_friendship
			}
		}
		add_friend = FROM
	}

	option = { #Focus on monastic duties
		name = EVTOPTA_MNM_4439
		ai_chance = {
			factor = 1
		}
		tooltip = {
			add_friend = FROM
		}
		piety = 25
		add_character_modifier = {
			modifier = focused_on_monastic_studies
			years = 10
		}
	}

	option = { #Pursue the friendship further
		name = EVTOPTB_MNM_4439
		ai_chance = {
			factor = 1
			modifier = {
				factor = 3
				OR = {
					trait = depressed
					trait = stressed
				}
			}
			modifier = {
				factor = 0
				NOR = {
					trait = depressed
					trait = stressed
				}
			}
		}
		tooltip = {
			add_friend = FROM
		}
		custom_tooltip = {
			text = monastic_may_lead_to_more
			hidden_tooltip = {
				random_list = {
					10 = {
						modifier = {
							factor = 0
							OR = {
								trait = chaste
								trait = celibate
							}
						}
						event_target:monastic_friend = {
							character_event = { id = MNM.4440 days = 30 random = 30 }
						}
					}
					10 = {
						modifier = {
							factor = 0
							trait = lustful
						}
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					trait = depressed
					trait = stressed
					NOT = { trait = gregarious }
				}
			}
			random_list = {
				10 = {
					modifier = {
						factor = 0
						NOT = { trait = depressed }
					}
					remove_trait = depressed
				}
				10 = {
					modifier = {
						factor = 0
						NOT = { trait = stressed }
					}
					remove_trait = stressed
				}
				10 = {
					modifier = {
						factor = 0
						trait = gregarious
					}
					modifier = {
						factor = 0
						trait = shy
					}
					add_trait = gregarious
					character_event = { id = 38265 }
				}
				10 = {
					modifier = {
						factor = 0
						trait = gregarious
					}
					modifier = {
						factor = 0
						NOT = { trait = shy }
					}
					remove_trait = shy
					character_event = { id = 38295 }
				}
				10 = {}
			}
		}
	}
}

#Ping event for 'tension'
character_event = {
	id = MNM.4440
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		event_target:monastic_befriender = {
			character_event = { id = MNM.4441 }
		}
	}
}

#Long lonely time without your spouse
character_event = {
	id = MNM.4441
	picture = GFX_evt_monastery_monks
	desc = {
		text = EVTDESC_MNM_4441
		picture = GFX_evt_monastery_monks
		trigger = {	is_female = no }
	}
	desc = { 
		text = EVTDESC_MNM_4441
		picture = GFX_evt_monastery_nuns
		trigger = {	is_female = yes }
	}
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		is_monastic_member_trigger = yes
	}

	option = { #Suppress the urge
		name = EVTOPTA_MNM_4441
		random_list = {
			10 = {
				modifier = {
					factor = 0
					trait = stressed
				}
				modifier = {
					factor = 0
					trait = depressed
				}
				add_trait = stressed
				character_event = { id = 38282 }
			}
			10 = {
				modifier = {
					factor = 0
					OR = {
						trait = lustful
						trait = chaste
					}
				}
				add_trait = chaste
				character_event = { id = 38274 }
			}
			10 = {
				modifier = {
					factor = 0
					NOT = { trait = lustful }
				}
				remove_trait = lustful
			}
		}
	}

	option = { #Do it
		name = EVTOPTB_MNM_4441
		add_trait = homosexual
		event_target:monastic_friend = {
			add_trait = homosexual
			set_character_flag = monastic_friend_lover_@ROOT
		}
		add_lover = FROM
		hidden_effect = {
			remove_friend = FROM
		}
	}
}

#Ping event for friendship not established
character_event = {
	id = MNM.4442
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		event_target:monastic_befriender = {
			character_event = { id = MNM.4443 }
		}
	}
}

#Friendship not established notification
character_event = {
	id = MNM.4443
	picture = GFX_evt_monastery_monks
	desc = {
		text = EVTDESC_MNM_4443
		picture = GFX_evt_monastery_monks
		trigger = {	is_female = no }
	}
	desc = { 
		text = EVTDESC_MNM_4443
		picture = GFX_evt_monastery_nuns
		trigger = {	is_female = yes }
	}
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		is_monastic_member_trigger = yes
	}

	immediate = {
		remove_opinion = {
			who = FROM
			modifier = opinion_budding_friendship
		}
		FROM = {
			remove_opinion = {
				who = ROOT
				modifier = opinion_budding_friendship
			}
		}
	}

	option = {
		name = EVTOPTA_MNM_4443
	}
}

## Monastery has Artifact: To Steal or not to Steal? #

#Starter Event for Monastery has Artifact
character_event = {
	id = MNM.4610
	picture = GFX_evt_relic_box
	desc = EVTDESC_MNM_4610
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes
	only_capable = yes
	only_playable = yes
	
	trigger = {
		NOT = { is_inaccessible_trigger = yes }
		NOT = { has_character_modifier = caught_stealing_artifact_penance }
		NOT = {	has_character_flag = monastic_stole_artifact }
		OR = {
			society_member_of = monastic_order_benedictine
			society_member_of = monastic_order_dominican
			society_member_of = monastic_order_orthodox
			society_member_of = monastic_order_nestorian
			society_member_of = monastic_order_monophysite
			society_member_of = monastic_order_apostolic
			society_member_of = monastic_order_jain
			society_member_of = monastic_order_hindu
			society_member_of = monastic_order_buddhist
		}
	}

	immediate = {
		save_event_target_as = monastic_artifact_stealer
		random_list = {
			10 = {
				modifier = { factor = 0 NOT = { religion_group = christian } }
				modifier = {
					factor = 0
					has_artifact = seamless_robe_of_jesus
				}
				set_character_flag = monastic_artifact_seamless_robe_of_jesus
			}
			10 = {
				modifier = { factor = 0 NOT = { religion_group = christian } }
				modifier = {
					factor = 0
					has_artifact = crown_of_thorns
				}
				set_character_flag = monastic_artifact_crown_of_thorns
			}
			20 = {
				modifier = { factor = 0 NOT = { religion_group = christian } }
				modifier = {
					factor = 0
					has_artifact = fragment_of_true_cross
				}
				set_character_flag = monastic_artifact_fragment_of_true_cross
			}
			20 = {
				modifier = { factor = 0 NOT = { religion_group = christian } }
				modifier = {
					factor = 0
					has_artifact = holy_foreskin
				}
				#Insert artifact event here
				set_character_flag = monastic_artifact_holy_foreskin
			}
			20 = {
				modifier = { factor = 0 NOT = { religion_group = christian } }
				modifier = {
					factor = 0
					has_artifact = image_of_edessa
				}
				set_character_flag = monastic_artifact_image_of_edessa
			}
			20 = {
				modifier = { 
					factor = 0 
					NOT = {
						religion_group = indian_group
					}
				}
				modifier = {
					factor = 0
					has_artifact = elaborate_danda
				}
				set_character_flag = monastic_artifact_elaborate_danda
			}
			20 = {
				modifier = { 
					factor = 0 
					NOT = {
						religion_group = indian_group
					}
				}
				modifier = {
					factor = 0
					has_artifact = sariraka_actual_body_part
				}
				set_character_flag = monastic_artifact_sariraka_actual_body_part
			}
			1 = {
				modifier = { 
					factor = 0 
					NOT = {
						religion_group = indian_group
					}
				}
				modifier = {
					factor = 0
					NOT = { has_character_modifier = relic_rumor_minor }
				}
				modifier = {
					factor = 0
					has_artifact = sarira
				}
				set_character_flag = monastic_artifact_sarira
			}
		}
	}

	option = { #That's nice I guess
		name = EVTOPTA_MNM_4610
		random = {
			chance = 25
			if = {
				limit = {
					trait = ambitious
				}
				remove_trait = ambitious
			}
			if = {
				limit = {
					NOT = { trait = ambitious }
					NOT = { trait = content }
				}
				add_trait = content
				character_event = { id = 38279 }
			}
		}
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				trait = content
			}
			modifier = {
				factor = 2
				trait = zealous
			}
		}
	}

	option = { #Pay for a celebration
		name = EVTOPTB_MNM_4610
		scaled_wealth = { value = -0.5 min = -50 }
		custom_tooltip = { text = EVTOPTB_MNM_4610_TT }
		hidden_effect = {
			character_event = { id = MNM.4618 days = 15 random = 30 }
		}
		ai_chance = {
			factor = 45
			modifier = {
				factor = 2
				trait = charitable
			}
			modifier = {
				factor = 2
				trait = zealous
			}
		}
	}

	option = { #Steal it!
		name = EVTOPTC_MNM_4610
		random = {
			chance = 50
			if = {
				limit = {
					NOT = { trait = ambitious }
					NOT = { trait = content }
				}
				add_trait = ambitious
				character_event = { id = 38278 }
			}
			if = {
				limit = {
					trait = content
				}
				remove_trait = content
				character_event = { id = 38299 }
			}
		}
		hidden_effect = {
			character_event = { id = MNM.4611 days = 15 random = 30 }
		}
		trigger_switch = {
			on_trigger = has_character_flag
			monastic_artifact_seamless_robe_of_jesus = { custom_tooltip = { text = EVTOPTC_MNM_4610_seamless_robe_of_jesus } }
			monastic_artifact_crown_of_thorns = { custom_tooltip = { text = EVTOPTC_MNM_4610_crown_of_thorns } }
			monastic_artifact_fragment_of_true_cross = { custom_tooltip = { text = EVTOPTC_MNM_4610_fragment_of_true_cross } }
			monastic_artifact_holy_foreskin = { custom_tooltip = { text = EVTOPTC_MNM_4610_holy_foreskin } }
			monastic_artifact_image_of_edessa = { custom_tooltip = { text = EVTOPTC_MNM_4610_image_of_edessa } }
			monastic_artifact_elaborate_danda = { custom_tooltip = { text = EVTOPTC_MNM_4610_elaborate_danda } }
			monastic_artifact_sariraka_actual_body_part = { custom_tooltip = { text = EVTOPTC_MNM_4610_sariraka_actual_body_part } }
			monastic_artifact_sarira = { custom_tooltip = { text = EVTOPTC_MNM_4610_sarira } }
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 2
				trait = ambitious
			}
			modifier = {
				factor = 2
				trait = greedy
			}
			modifier = {
				factor = 2
				trait = cynical
			}
		}
	}
}

#Monastic Artifact: planning for the theft
character_event = {
	id = MNM.4611
	picture = GFX_evt_shady_meeting
	desc = EVTDESC_MNM_4611
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		NOT = { is_inaccessible_trigger = yes }
	}

	immediate = {
		society = {
			random_society_member = {
				limit = {
					ai = yes
					is_lover = ROOT
					has_character_flag = monastic_friend_lover_@ROOT
					OR = {
						AND = {
							is_female = no
							ROOT = { is_female = no }
						}
						AND = {
							is_female = yes
							ROOT = { is_female = yes }
						}
					}
				}
				save_event_target_as = monastic_artifact_lover
			}
		}
	}

	option = { #Grab it and run
		name = EVTOPTA_MNM_4611
		custom_tooltip = { text = EVTOPTA_MNM_4611_TT }
		hidden_effect = {
			if = {
				limit = {
					NOT = { martial = 10 }
				}
				random_list = {
					5= {
						character_event = { id = MNM.4617 days = 15 random = 30 } #success
					}
					95 = {
						character_event = { id = MNM.4612 days = 15 random = 30 } #failure
					}
				}
			}
			if = {
				limit = {
					AND = {
						martial = 10
						NOT = { martial = 14 }
					}
				}
				random_list = {
					10 = {
						character_event = { id = MNM.4617 days = 15 random = 30 } #success
					}
					90 = {
						character_event = { id = MNM.4612 days = 15 random = 30 } #failure
					}
				}
			}
			if = {
				limit = {
					AND = {
						martial = 14
						NOT = { martial = 18 }
					}
				}
				random_list = {
					15 = {
						character_event = { id = MNM.4617 days = 15 random = 30 } #success
					}
					85 = {
						character_event = { id = MNM.4612 days = 15 random = 30 } #failure
					}
				}
			}
			if = {
				limit = {
					AND = {
						martial = 18
						NOT = { martial = 22 }
					}
				}
				random_list = {
					20 = {
						character_event = { id = MNM.4617 days = 15 random = 30 } #success
					}
					80 = {
						character_event = { id = MNM.4612 days = 15 random = 30 } #failure
					}
				}
			}
			if = {
				limit = {
					martial = 22
				}
				random_list = {
					25 = {
						character_event = { id = MNM.4617 days = 15 random = 30 } #success
					}
					75 = {
						character_event = { id = MNM.4612 days = 15 random = 30 } #failure
					}
				}
			}
		}
	}

	option = { #Bribe Abbot
		name = EVTOPTB_MNM_4611
		scaled_wealth = { value = -3 min = -300 }
		custom_tooltip = { text = EVTOPTB_MNM_4611_TT }
		hidden_effect = {
			random_list = {
				95 = {
					character_event = { id = MNM.4617 days = 15 random = 30 } #success
				}
				5 = {
					character_event = { id = MNM.4612 days = 15 random = 30 } #failure
				}
			}
		}
	}

	option = { #Trick everyone
		trigger = {
			intrigue = 18
		}

		name = EVTOPTC_MNM_4611
		custom_tooltip = { text = EVTOPTC_MNM_4611_TT }
		hidden_effect = {
			random_list = {
				50 = {
					character_event = { id = MNM.4617 days = 15 random = 30 } #success
				}
				50 = {
					character_event = { id = MNM.4612 days = 15 random = 30 } #failure
				}
			}
		}
	}

	option = { #Get lover to help
		trigger = {
			society = {
				any_society_member = {
					ai = yes
					is_lover = ROOT
					has_character_flag = monastic_friend_lover_@ROOT
					OR = {
						AND = {
							is_female = no
							ROOT = { is_female = no }
						}
						AND = {
							is_female = yes
							ROOT = { is_female = yes }
						}
					}
				}
			}
		}
		custom_tooltip = { text = EVTOPTD_MNM_4611_TT }
		name = EVTOPTD_MNM_4611
		hidden_effect = {
			set_character_flag = monastic_artifact_lover
			random_list = {
				25 = {
					character_event = { id = MNM.4617 days = 15 random = 30 } #success
				}
				75 = {
					character_event = { id = MNM.4612 days = 15 random = 30 } #failure
				}
			}
		}
		event_target:monastic_artifact_lover = {
			show_portrait = yes
		}
	}
}

#Initial ping event for failure event / getting caught
character_event = {
	id = MNM.4612
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		society = {
			random_society_member = {
				limit = {
					NOT = { is_society_grandmaster = yes }
					NOT = { is_friend = ROOT }
					NOT = { is_lover = ROOT }
					ai = yes
				}
				save_event_target_as = monastic_artifact_witness
				character_event = { id = MNM.4613 }
			}
		}
	}
}

#Second ping event for failure event / getting caught
character_event = {
	id = MNM.4613
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		random_list = {
			40 = {
				event_target:monastic_artifact_stealer = {
					character_event = { id = MNM.4614 }
				}
			}
			60 = {
				modifier = {
					factor = 0
					NOT = { event_target:monastic_artifact_stealer = { has_character_flag = monastic_artifact_lover } }
				}
				event_target:monastic_artifact_stealer = {
					character_event = { id = MNM.4616 }
				}
			}
		}
	}
}

#Monastic Artifact failure: got caught red-handed!
character_event = {
	id = MNM.4614
	picture = GFX_evt_eavesdropping
	desc = EVTDESC_MNM_4614
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	immediate = {
		add_character_modifier = { name = caught_red_handed years = 5 }
	}

	option = { #surrender
		name = EVTOPTA_MNM_4614
		custom_tooltip = { text = EVTOPTA_MNM_4614_TT }
		add_character_modifier = { name = caught_stealing_artifact_penance years = 10 }
		hidden_effect = {
			society = {
				any_society_member = {
					opinion = {
						who = ROOT
						modifier = stole_artifact_penance
						years = 10
					}
				}
			}
		}
	}

	option = { #rush past them
		name = EVTOPTB_MNM_4614
		custom_tooltip = { text = EVTOPTB_MNM_4614_TT }
		hidden_effect = {
			society = {
				any_society_member = {
					opinion = {
						who = ROOT
						modifier = stole_artifact
						years = 20
					}
				}
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_benedictine
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_benedictine
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_dominican
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_dominican
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_orthodox
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_orthodox
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_nestorian
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_nestorian
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_monophysite
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_monophysite
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_apostolic
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_apostolic
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_jain
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_jain
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_hindu
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_hindu
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_buddhist
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_buddhist
			}
		}
		character_event = { id = MNM.4615 days = 10 random = 10 }
	}

	option = { #Leave no witnesses!
		name = EVTOPTC_MNM_4614
		if = {
			limit = {
				trait = temperate
			}
			remove_trait = temperate
		}
		if = {
			limit = {
				NOT = { trait = greedy }
				NOT = { trait = temperate }
			}
			add_trait = greedy
		}
		custom_tooltip = { text = EVTOPTC_MNM_4614_TT }
		if = {
			limit = {
				combat_rating_diff = { who = event_target:monastic_artifact_witness value = 5 }
			}
			custom_tooltip = { text = holmgang_chances_great } #Tooltip reuse FTW
			hidden_tooltip = {
				random_list = {
					84 = {
						character_event = { id = MNM.4619 days = 0 }
					}
					10 = {
						character_event = { id = MNM.4620 days = 0 }
					}
					5 = {
						character_event = { id = MNM.4621 days = 0 }
					}
					1 = {
						character_event = { id = MNM.4622 days = 0 }
					}
				}
			}
			break = yes
		}
		if = {
			limit = {
				combat_rating_diff = { who = event_target:monastic_artifact_witness value = 3 }
				NOT = {
					combat_rating_diff = { who = event_target:monastic_artifact_witness value = 5 }
				}
			}
			custom_tooltip = { text = holmgang_chances_very_good }
			hidden_tooltip = {
				random_list = {
					70 = {
						character_event = { id = MNM.4619 days = 0 }
					}
					15 = {
						character_event = { id = MNM.4620 days = 0 }
					}
					10 = {
						character_event = { id = MNM.4621 days = 0 }
					}
					5 = {
						character_event = { id = MNM.4622 days = 0 }
					}
				}
			}
			break = yes
		}
		if = {
			limit = {
				combat_rating_diff = { who = event_target:monastic_artifact_witness value = 1 }
				NOT = {
					combat_rating_diff = { who = event_target:monastic_artifact_witness value = 3 }
				}
			}
			custom_tooltip = { text = holmgang_chances_good }
			hidden_tooltip = {
				random_list = {
					60 = {
						character_event = { id = MNM.4619 days = 0 }
					}
					20 = {
						character_event = { id = MNM.4620 days = 0 }
					}
					15 = {
						character_event = { id = MNM.4621 days = 0 }
					}
					5 = {
						character_event = { id = MNM.4622 days = 0 }
					}
				}
			}
			break = yes
		}
		if = {
			limit = {
				NOT = {
					combat_rating_diff = { who = event_target:monastic_artifact_witness value = 1 }
					event_target:monastic_artifact_witness = {
						combat_rating_diff = { who = ROOT value = 1 }
					}
				}
			}
			custom_tooltip = { text = holmgang_chances_even }
			hidden_tooltip = {
				random_list = {
					20 = {
						character_event = { id = MNM.4619 days = 0 }
					}
					20 = {
						character_event = { id = MNM.4620 days = 0 }
					}
					20 = {
						character_event = { id = MNM.4621 days = 0 }
					}
					40 = {
						character_event = { id = MNM.4622 days = 0 }
					}
				}
			}
			break = yes
		}
		if = {
			limit = {
				event_target:monastic_artifact_witness = {
					combat_rating_diff = { who = ROOT value = 1 }
				}
				NOT = {
					event_target:monastic_artifact_witness = {
						combat_rating_diff = { who = ROOT value = 3 }
					}
				}
			}
			custom_tooltip = { text = holmgang_chances_poor }
			hidden_tooltip = {
				random_list = {
					5 = {
						character_event = { id = MNM.4619 days = 0 }
					}
					15 = {
						character_event = { id = MNM.4620 days = 0 }
					}
					20 = {
						character_event = { id = MNM.4621 days = 0 }
					}
					60 = {
						character_event = { id = MNM.4622 days = 0 }
					}
				}
			}
			break = yes
		}
		if = {
			limit = {
				event_target:monastic_artifact_witness = {
					combat_rating_diff = { who = ROOT value = 3 }
				}
				NOT = {
					event_target:monastic_artifact_witness = {
						combat_rating_diff = { who = ROOT value = 5 }
					}
				}
			}
			custom_tooltip = { text = holmgang_chances_very_poor }
			hidden_tooltip = {
				random_list = {
					1 = {
						character_event = { id = MNM.4619 days = 0 }
					}
					4 = {
						character_event = { id = MNM.4620 days = 0 }
					}
					15 = {
						character_event = { id = MNM.4621 days = 0 }
					}
					80 = {
						character_event = { id = MNM.4622 days = 0 }
					}
				}
			}
			break = yes
		}
		if = {
			limit = {
				event_target:monastic_artifact_witness = {
					combat_rating_diff = { who = ROOT value = 5 }
				}
			}
			custom_tooltip = { text = holmgang_chances_terrible }
			hidden_tooltip = {
				random_list = {					
					1 = {
						character_event = { id = MNM.4620 days = 0 }
					}
					9 = {
						character_event = { id = MNM.4621 days = 0 }
					}
					90 = {
						character_event = { id = MNM.4622 days = 0 }
					}
				}
			}
			break = yes
		}
	}
}

character_event = { # win - no wound
	id = MNM.4619
	desc = EVTDESC_MNM.4619
	border = GFX_event_normal_frame_war
	picture = GFX_evt_melee

	is_triggered_only = yes

	immediate = {
		society = {
			random_society_member = {
				limit = {
					NOT = { is_society_grandmaster = yes }
					NOT = { is_friend = ROOT }
					NOT = { is_lover = ROOT }
					OR = {
						trait = greedy
						trait = deceitful
					}
					ai = yes
				}
				save_event_target_as = monastic_artifact_blackmailer
			}
		}
	}

	option = {
		name = EVTOPTA_MNM.4619
		event_target:monastic_artifact_witness = {
			save_event_target_as = target_victim
			death = { death_reason = death_murder_unknown killer = ROOT }
		}
		trigger_switch = {
			on_trigger = has_character_flag
			monastic_artifact_seamless_robe_of_jesus = { add_artifact = seamless_robe_of_jesus }
			monastic_artifact_crown_of_thorns = { add_artifact = crown_of_thorns }
			monastic_artifact_fragment_of_true_cross = { add_artifact = fragment_of_true_cross }
			monastic_artifact_holy_foreskin = { add_artifact = holy_foreskin }
			monastic_artifact_image_of_edessa = { add_artifact = image_of_edessa }
			monastic_artifact_elaborate_danda = { add_artifact = elaborate_danda }
			monastic_artifact_sariraka_actual_body_part = { add_artifact = sariraka_actual_body_part }
			monastic_artifact_sarira = { add_artifact = sarira }
		}
		hidden_effect = {
			set_character_flag = monastic_stole_artifact
			if = {
				limit = {
					NOT = { intrigue = 6 }
				}
				random_list = {
					75 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					25 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 6
						NOT = { intrigue = 10 }
					}
				}
				random_list = {
					50 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					50 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 10
						NOT = { intrigue = 14 }
					}
				}
				random_list = {
					40 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					60 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 14
						NOT = { intrigue = 18 }
					}
				}
				random_list = {
					30 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					70 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 18
						NOT = { intrigue = 22 }
					}
				}
				random_list = {
					20 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					80 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					intrigue = 22
				}
				random_list = {
					10 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					90 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
		}
	}
}

character_event = { # win - wound
	id = MNM.4620
	desc = EVTDESC_MNM.4620
	border = GFX_event_normal_frame_war
	picture = GFX_evt_melee

	is_triggered_only = yes

	trigger = { is_monastic_member_trigger = yes }

	option = {
		name = EVTOPTA_MNM.4620
		event_target:monastic_artifact_witness = {
			death = { death_reason = death_murder_unknown killer = ROOT }
		}
		add_trait_wounded_effect = yes
		trigger_switch = {
			on_trigger = has_character_flag
			monastic_artifact_seamless_robe_of_jesus = { add_artifact = seamless_robe_of_jesus }
			monastic_artifact_crown_of_thorns = { add_artifact = crown_of_thorns }
			monastic_artifact_fragment_of_true_cross = { add_artifact = fragment_of_true_cross }
			monastic_artifact_holy_foreskin = { add_artifact = holy_foreskin }
			monastic_artifact_image_of_edessa = { add_artifact = image_of_edessa }
			monastic_artifact_elaborate_danda = { add_artifact = elaborate_danda }
			monastic_artifact_sariraka_actual_body_part = { add_artifact = sariraka_actual_body_part }
			monastic_artifact_sarira = { add_artifact = sarira }
		}
		hidden_effect = {
			set_character_flag = monastic_stole_artifact
			if = {
				limit = {
					NOT = { intrigue = 6 }
				}
				random_list = {
					75 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					25 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 6
						NOT = { intrigue = 10 }
					}
				}
				random_list = {
					50 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					50 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 10
						NOT = { intrigue = 14 }
					}
				}
				random_list = {
					40 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					60 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 14
						NOT = { intrigue = 18 }
					}
				}
				random_list = {
					30 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					70 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 18
						NOT = { intrigue = 22 }
					}
				}
				random_list = {
					20 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					80 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					intrigue = 22
				}
				random_list = {
					10 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					90 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
		}
	}
}

character_event = { # win - maimed
	id = MNM.4621
	desc = EVTDESC_MNM.4621
	border = GFX_event_normal_frame_war
	picture = GFX_evt_melee

	is_triggered_only = yes

	trigger = { is_monastic_member_trigger = yes }

	option = {
		name = EVTOPTA_MNM.4621
		event_target:monastic_artifact_witness = {
			death = { death_reason = death_murder_unknown killer = ROOT }
		}
		if = {
			limit = {
				can_be_maimed_trigger = yes
			}
			add_maimed_trait_effect = yes
		}
		else = {
			add_trait_wounded_effect = yes
		}
		trigger_switch = {
			on_trigger = has_character_flag
			monastic_artifact_seamless_robe_of_jesus = { add_artifact = seamless_robe_of_jesus }
			monastic_artifact_crown_of_thorns = { add_artifact = crown_of_thorns }
			monastic_artifact_fragment_of_true_cross = { add_artifact = fragment_of_true_cross }
			monastic_artifact_holy_foreskin = { add_artifact = holy_foreskin }
			monastic_artifact_image_of_edessa = { add_artifact = image_of_edessa }
			monastic_artifact_elaborate_danda = { add_artifact = elaborate_danda }
			monastic_artifact_sariraka_actual_body_part = { add_artifact = sariraka_actual_body_part }
			monastic_artifact_sarira = { add_artifact = sarira }
		}
		hidden_effect = {
			set_character_flag = monastic_stole_artifact
			if = {
				limit = {
					NOT = { intrigue = 6 }
				}
				random_list = {
					80 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					20 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 6
						NOT = { intrigue = 10 }
					}
				}
				random_list = {
					60 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					40 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 10
						NOT = { intrigue = 14 }
					}
				}
				random_list = {
					50 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					50 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 14
						NOT = { intrigue = 18 }
					}
				}
				random_list = {
					40 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					60 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					AND = {
						intrigue = 18
						NOT = { intrigue = 22 }
					}
				}
				random_list = {
					30 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					70 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
			if = {
				limit = {
					intrigue = 22
				}
				random_list = {
					20 = {
						event_target:monastic_artifact_blackmailer = {
							character_event = { id = MNM.4623 days = 90 random = 30 } #someone figures it out
						}
					}
					80 = {
						hidden_effect = {
							clr_character_flag = monastic_artifact_lover
							clr_character_flag = monastic_artifact_seamless_robe_of_jesus
							clr_character_flag = monastic_artifact_crown_of_thorns
							clr_character_flag = monastic_artifact_fragment_of_true_cross
							clr_character_flag = monastic_artifact_holy_foreskin
							clr_character_flag = monastic_artifact_image_of_edessa
							clr_character_flag = monastic_artifact_elaborate_danda
							clr_character_flag = monastic_artifact_sariraka_actual_body_part
							clr_character_flag = monastic_artifact_sarira
						}
					}
				}
			}
		}
	}
}

character_event = { # loss - death
	id = MNM.4622
	desc = EVTDESC_MNM.4622
	border = GFX_event_normal_frame_war
	picture = GFX_evt_beheading

	is_triggered_only = yes

	option = {
		name = EVTOPTA_MNM.4622
		death = { death_reason = death_duel killer = event_target:monastic_artifact_witness }
	}
}

#Ran off with it despite leaving witnesses
character_event = {
    id = MNM.4615
    desc = EVTDESC_MNM_4615
    picture = GFX_evt_uncomfortable
    border = GFX_event_normal_frame_religion
    
    is_triggered_only = yes

    option = {
    	name = EVTOPTA_MNM_4615
    	trigger_switch = {
			on_trigger = has_character_flag
			monastic_artifact_seamless_robe_of_jesus = { add_artifact = seamless_robe_of_jesus }
			monastic_artifact_crown_of_thorns = { add_artifact = crown_of_thorns }
			monastic_artifact_fragment_of_true_cross = { add_artifact = fragment_of_true_cross }
			monastic_artifact_holy_foreskin = { add_artifact = holy_foreskin }
			monastic_artifact_image_of_edessa = { add_artifact = image_of_edessa }
			monastic_artifact_elaborate_danda = { add_artifact = elaborate_danda }
			monastic_artifact_sariraka_actual_body_part = { add_artifact = sariraka_actual_body_part }
			monastic_artifact_sarira = { add_artifact = sarira }
		}
		hidden_effect = {
			set_character_flag = monastic_stole_artifact
			clr_character_flag = monastic_artifact_lover
			clr_character_flag = monastic_artifact_seamless_robe_of_jesus
			clr_character_flag = monastic_artifact_crown_of_thorns
			clr_character_flag = monastic_artifact_fragment_of_true_cross
			clr_character_flag = monastic_artifact_holy_foreskin
			clr_character_flag = monastic_artifact_image_of_edessa
			clr_character_flag = monastic_artifact_elaborate_danda
			clr_character_flag = monastic_artifact_sariraka_actual_body_part
			clr_character_flag = monastic_artifact_sarira
		}
    }
}

#Lover stops witness letting you escape
character_event = {
	id = MNM.4616
	desc = EVTDESC_MNM_4616
    picture = GFX_evt_eavesdropping
    border = GFX_event_normal_frame_religion
    
    is_triggered_only = yes

    trigger = { is_monastic_member_trigger = yes }

    option = {
    	name = EVTOPTA_MNM_4616
    	trigger_switch = {
			on_trigger = has_character_flag
			monastic_artifact_seamless_robe_of_jesus = { add_artifact = seamless_robe_of_jesus }
			monastic_artifact_crown_of_thorns = { add_artifact = crown_of_thorns }
			monastic_artifact_fragment_of_true_cross = { add_artifact = fragment_of_true_cross }
			monastic_artifact_holy_foreskin = { add_artifact = holy_foreskin }
			monastic_artifact_image_of_edessa = { add_artifact = image_of_edessa }
			monastic_artifact_elaborate_danda = { add_artifact = elaborate_danda }
			monastic_artifact_sariraka_actual_body_part = { add_artifact = sariraka_actual_body_part }
			monastic_artifact_sarira = { add_artifact = sarira }
		}
		hidden_effect = {
			set_character_flag = monastic_stole_artifact
			clr_character_flag = monastic_artifact_lover
			clr_character_flag = monastic_artifact_seamless_robe_of_jesus
			clr_character_flag = monastic_artifact_crown_of_thorns
			clr_character_flag = monastic_artifact_fragment_of_true_cross
			clr_character_flag = monastic_artifact_holy_foreskin
			clr_character_flag = monastic_artifact_image_of_edessa
			clr_character_flag = monastic_artifact_elaborate_danda
			clr_character_flag = monastic_artifact_sariraka_actual_body_part
			clr_character_flag = monastic_artifact_sarira
		}
    }
}

#Stole the artifact without any witnesses!
character_event = {
	id = MNM.4617
	desc = EVTDESC_MNM_4617
    picture = GFX_evt_relic_box
    border = GFX_event_normal_frame_religion
    
    is_triggered_only = yes

	trigger = { is_monastic_member_trigger = yes }

    option = {
    	name = EVTOPTA_MNM_4617
    	trigger_switch = {
			on_trigger = has_character_flag
			monastic_artifact_seamless_robe_of_jesus = { add_artifact = seamless_robe_of_jesus }
			monastic_artifact_crown_of_thorns = { add_artifact = crown_of_thorns }
			monastic_artifact_fragment_of_true_cross = { add_artifact = fragment_of_true_cross }
			monastic_artifact_holy_foreskin = { add_artifact = holy_foreskin }
			monastic_artifact_image_of_edessa = { add_artifact = image_of_edessa }
			monastic_artifact_elaborate_danda = { add_artifact = elaborate_danda }
			monastic_artifact_sariraka_actual_body_part = { add_artifact = sariraka_actual_body_part }
			monastic_artifact_sarira = { add_artifact = sarira }
		}
		hidden_effect = {
			set_character_flag = monastic_stole_artifact
			clr_character_flag = monastic_artifact_lover
			clr_character_flag = monastic_artifact_seamless_robe_of_jesus
			clr_character_flag = monastic_artifact_crown_of_thorns
			clr_character_flag = monastic_artifact_fragment_of_true_cross
			clr_character_flag = monastic_artifact_holy_foreskin
			clr_character_flag = monastic_artifact_image_of_edessa
			clr_character_flag = monastic_artifact_elaborate_danda
			clr_character_flag = monastic_artifact_sariraka_actual_body_part
			clr_character_flag = monastic_artifact_sarira
		}
    }
}

#Celebrate the artifact
character_event = {
	id = MNM.4618
	desc = EVTDESC_MNM_4618
    picture = GFX_evt_charity
    border = GFX_event_normal_frame_religion

    is_triggered_only = yes
	
	trigger = { is_monastic_member_trigger = yes }

    option = {
    	name = EVTOPTA_MNM_4618
    	add_character_modifier = { name = artifact_patron years = 5 }
    	custom_tooltip = { text = society_pleased_with_celebration }
    	hidden_effect = {
    		society = {
				any_society_member = {
					opinion = {
						who = ROOT
						modifier = paid_for_celebration_artifact
						years = 5
					}
				}
			}
		}
    }
}

#Ping event for someone piecing it together
character_event = {
	id = MNM.4623
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		event_target:monastic_artifact_stealer = {
			letter_event = { id = MNM.4624 }
		}
	}
}

#Someone pieced it together
letter_event = {
	id = MNM.4624
	desc = EVTDESC_MNM_4624
    border = GFX_event_letter_frame_religion

    is_triggered_only = yes

    trigger = { is_monastic_member_trigger = yes }

    option = { #Bribe them!
    	name = EVTOPTA_MNM_4624
    	transfer_scaled_wealth = {
    		to = FROM
    		value = 3
    		min = 300
    	}
    }
    option = { #Return the artifact and pay them to keep quiet
    	trigger = {
    		OR = {
    			AND = {
    				has_character_flag = monastic_artifact_seamless_robe_of_jesus
    				has_artifact = seamless_robe_of_jesus
    			}
    			AND = {
    				has_character_flag = monastic_artifact_crown_of_thorns
    				has_artifact = crown_of_thorns
    			}
    			AND = {
    				has_character_flag = monastic_artifact_fragment_of_true_cross
    				has_artifact = fragment_of_true_cross
    			}
    			AND = {
    				has_character_flag = monastic_artifact_holy_foreskin
    				has_artifact = holy_foreskin
    			}
    			AND = {
    				has_character_flag = monastic_artifact_image_of_edessa
    				has_artifact = image_of_edessa
    			}
    			AND = {
    				has_character_flag = monastic_artifact_elaborate_danda
    				has_artifact = elaborate_danda
    			}
    			AND = {
    				has_character_flag = monastic_artifact_sariraka_actual_body_part
    				has_artifact = sariraka_actual_body_part
    			}
    			AND = {
    				has_character_flag = monastic_artifact_sarira
    				has_artifact = sarira
    			}
    		}
    	}
    	name = EVTOPTB_MNM_4624
    	transfer_scaled_wealth = {
    		to = FROM
    		value = 1
    		min = 100
    	}
    	trigger_switch = {
			on_trigger = has_character_flag
			monastic_artifact_seamless_robe_of_jesus = {
				destroy_artifact = seamless_robe_of_jesus
			}
			monastic_artifact_crown_of_thorns = {
				destroy_artifact = crown_of_thorns
			}
			monastic_artifact_fragment_of_true_cross = {
				destroy_artifact = fragment_of_true_cross
			}
			monastic_artifact_holy_foreskin = {
				destroy_artifact = holy_foreskin
			}
			monastic_artifact_image_of_edessa = {
				destroy_artifact = image_of_edessa
			}
			monastic_artifact_elaborate_danda = {
				destroy_artifact = elaborate_danda
			}
			monastic_artifact_sariraka_actual_body_part = {
				destroy_artifact = sariraka_actual_body_part
			}
			monastic_artifact_sarira = {
				destroy_artifact = sarira
			}
		}
    }
    option = { #Keep it!
    	name = EVTOPTC_MNM_4624
    	custom_tooltip = { text = EVTOPTC_MNM_4624_TT }
    	if = {
    		limit = {
    			has_character_flag = monastic_artifact_lover
    		}
    		custom_tooltip = { text = EVTOPTC_MNM_4624_2_TT }
    		event_target:monastic_artifact_lover = {
				show_portrait = yes
			}
    	}
    	tooltip = {
    		add_character_modifier = {
				name = known_murderer
				years = 50
			}
		}
    	hidden_effect = {
    		character_event = { id = 10 }
    		random = {
    			chance = 75
    			if = {
    				limit = {
    					has_character_flag = monastic_artifact_lover
    				}
    				event_target:monastic_artifact_lover = {
    					character_event = { id = MNM.4625 }
    				}
    			}
    		}
			society = {
				any_society_member = {
					opinion = {
						who = ROOT
						modifier = stole_artifact
						years = 20
					}
				}
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_benedictine
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_benedictine
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_dominican
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_dominican
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_orthodox
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_orthodox
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_nestorian
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_nestorian
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_monophysite
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_monophysite
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_apostolic
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_apostolic
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_jain
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_jain
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_hindu
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_hindu
			}
		}
		if = {
			limit = {
				society_member_of = monastic_order_buddhist
			}
			leave_society = yes
			hidden_effect = {
				set_character_flag = betrayed_monastic_order_buddhist
			}
		}
    }
    after = {
    	hidden_effect = {
			clr_character_flag = monastic_artifact_lover
			clr_character_flag = monastic_artifact_seamless_robe_of_jesus
			clr_character_flag = monastic_artifact_crown_of_thorns
			clr_character_flag = monastic_artifact_fragment_of_true_cross
			clr_character_flag = monastic_artifact_holy_foreskin
			clr_character_flag = monastic_artifact_image_of_edessa
			clr_character_flag = monastic_artifact_elaborate_danda
			clr_character_flag = monastic_artifact_sariraka_actual_body_part
			clr_character_flag = monastic_artifact_sarira
		}
    }
}

#Ping event for lover suicide
character_event = {
	id = MNM.4625
	is_triggered_only = yes
	hide_window = yes

	immediate = {
		event_target:monastic_artifact_stealer = {
			character_event = { id = MNM.4626 days = 5 random = 10 }
		}
	}
}

#Lover commits suicide
character_event = {
	id = MNM.4626
	picture = GFX_evt_bad_news

    trigger = { is_monastic_member_trigger = yes }

	desc = {
		text = EVTDESC_MNM_4626
		picture = GFX_evt_bad_news
		trigger = {	is_female = no }
	}
	desc = { 
		text = EVTDESC_MNM_4626
		picture = GFX_evt_bad_news_female
		trigger = {	is_female = yes }
	}
    border = GFX_event_normal_frame_religion

    is_triggered_only = yes

    option = {
    	name = EVTOPTA_MNM_4626
    	event_target:monastic_artifact_lover = {
    		death = { death_reason = death_suicide_hanging }
    	}
    }
}

############################################
####   Advising a Poet: Hidden start    ####
############################################
character_event = {
    id = MNM.3260
    hide_window = yes
	
	is_in_society = yes
	capable_only = yes
	prisoner = no
	min_age = 16
    
    is_triggered_only = yes

    trigger = {
    	is_monastic_member_trigger = yes

    	NOT = { has_character_modifier = patron_of_the_arts }
		NOT = { has_character_modifier = preserver_of_poetry }
		NOT = { has_character_modifier = published_poet }

    	society = {
		    any_society_member = {
	            ai = yes
	            is_incapable = no
	            prisoner = no
	            in_command = no
	            is_inaccessible_trigger = no
	            OR = {
					trait = poet
					learning = 15
					diplomacy = 15
	            }
	            NOT = { character = ROOT }
	            is_within_diplo_range = ROOT
	        }
	    }	
    }
       
    immediate = {
        # First look for someone at court
        society = {
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
                    OR = {
						trait = poet
						learning = 15
						diplomacy = 15
		            }
                    NOT = { character = ROOT }
                    host = { character = ROOT }
                }
                character_event = { id = MNM.3261 }
                break = yes
            }
            
            # Then look for someone in the same realm
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
                    OR = {
						trait = poet
						learning = 15
						diplomacy = 15
		            }
                    NOT = { character = ROOT }
                    same_realm = ROOT
                }
                character_event = { id = MNM.3261 }
                break = yes
            }
            
            # Then look abroad...
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
                    OR = {
						trait = poet
						learning = 15
						diplomacy = 15
		            }
                    NOT = { character = ROOT }
                    is_within_diplo_range = ROOT
                }
                character_event = { id = MNM.3261 }
                break = yes
            }
        }
    }
}


#Ping event for other member (the poet)
character_event = {
    id = MNM.3261
    hide_window = yes
    is_triggered_only = yes
    immediate = { FROM = { character_event = { id = MNM.3262 } } }
}

# A fellow member seeks your advice on some writing of theirs
character_event = {
    id = MNM.3262
    desc = EVTDESC_MNM_3262
    picture = GFX_evt_recieve_letter
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes
    
    trigger = {
    	FROM = { is_alive = yes }
    }

    immediate = {

    }

    option = { #Highlight X
        name = EVTOPTA_MNM_3262
        custom_tooltip = { text = EVTOPTA_MNM_3262_TT }
        set_character_flag = suggestion_A_flag
        hidden_effect = { FROM = { character_event = { id = MNM.3263 days = 15 random = 30 } } } #send new ping
    }
    option = { #Go more in Y direction
        name = EVTOPTB_MNM_3262
        custom_tooltip = { text = EVTOPTA_MNM_3262_TT }
        set_character_flag = suggestion_B_flag
        hidden_effect = { FROM = { character_event = { id = MNM.3263 days = 15 random = 30 } } } #send new ping
    }
    option = { # Writing is frivolous and dumb / opt out
        name = EVTOPTC_MNM_3262
        custom_tooltip = { text = EVTOPTC_MNM_3262_TT }

        reverse_opinion = {
            who = FROM
            modifier = opinion_disappointed
            years = 10
        }
    }
}

#Ping event for other member (the poet)
character_event = {
    id = MNM.3263
    hide_window = yes
    is_triggered_only = yes
    trigger = { is_alive = yes }
    immediate = { FROM = { character_event = { id = MNM.3264 } } }
}

character_event = {
    id = MNM.3264
    desc = EVTDESC_MNM_3264
    picture = GFX_evt_recieve_letter
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes
    
    trigger = {
    	FROM = { is_alive = yes }
    	is_monastic_member_trigger = yes
    }

    option = { # This should be published! (The writer will NOT be pleased)
        name = EVTOPTA_MNM_3264
        custom_tooltip = { text = EVTOPTA_MNM_3264_TT }
        set_character_flag = 3264_publish_flag
        wealth = -55

        add_character_modifier = {
            name = patron_of_the_arts
            years = 10
        }
    }
    option = { # Our Order will preserve these words for generations (The writer will be pleased)
        name = EVTOPTB_MNM_3264
        custom_tooltip = { text = EVTOPTB_MNM_3264_TT }
        set_character_flag = 3264_preserve_flag
        
        add_character_modifier = {
            name = preserver_of_poetry
            years = 10
        }
    }
    option = { # DEPRESSED - FEEL BETTER
        name = EVTOPTC_MNM_3264
        custom_tooltip = { text = EVTOPTC_MNM_3264_TT }
        random = {
            chance = 25
			remove_trait = depressed
            hidden_tooltip = {
				character_event = { id = 38314 days = 1 } # Notify lost Depressed
			}
        }
        set_character_flag = 3264_depressed_flag
        tooltip_info = depressed
        trigger = { trait = depressed }
    }
    option = { # DECEITFUL - STEAL TEXT
        name = EVTOPTD_MNM_3264
        custom_tooltip = { text = EVTOPTD_MNM_3264_TT }

        piety = -50

        set_character_flag = 3264_deceitful_flag
        add_character_modifier = {
            name = published_poet
            years = 15
        }
        tooltip_info = deceitful
        trigger = { trait = deceitful }
    }
    after = {
    	hidden_effect = { FROM = { character_event = { id = MNM.3265 days = 20 random = 10 } } } #send new ping
    }
}

#Ping event for other member (the poet)
character_event = {
    id = MNM.3265
    hide_window = yes
    is_triggered_only = yes
    immediate = {
    	FROM = {
	    	trigger_switch = { # Which event to send
	            on_trigger = has_character_flag
	            3264_publish_flag = {
	                character_event = { id = MNM.3266 }
	                clr_character_flag = 3264_publish_flag
	            }
	            3264_preserve_flag = {
	                character_event = { id = MNM.3267 }
	                clr_character_flag = 3264_preserve_flag
	            }
	            3264_depressed_flag = {
			    	character_event = { id = MNM.3268 }
	                clr_character_flag = 3264_depressed_flag
	            }
	            3264_deceitful_flag = {
			    	character_event = { id = MNM.3269 }
	                clr_character_flag = 3264_deceitful_flag
	            }
	        }
	    }
        if = {
        	limit = { NOT = { trait = poet } }
        	add_trait = poet
        }
    }
}


# The writer's reaction - PUBLISHED AGAINST THEIR WISHES
character_event = {
    id = MNM.3266
    picture = GFX_evt_recieve_letter
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes
    
    trigger = {
    	FROM = { is_alive = yes }
    }

	desc = {
		trigger = { has_character_flag = suggestion_A_flag }
		text = EVTDESC_MNM_3266_A
    }
    desc = {
        trigger = { has_character_flag = suggestion_B_flag }
        text = EVTDESC_MNM_3266_B
    }

    option = { # I seized an opportunity
        name = EVTOPTA_MNM_3266
        custom_tooltip = { text = EVTOPTA_MNM_3266_TT }

        reverse_opinion = {
            who = FROM
            modifier = opinion_insulted
            years = 10
        }
        hidden_effect = { character_event = { id = MNM.3270 } } #clean up
    }
}

# The writer's reaction - WRITINGS WILL BE SENT TO THE ORDER
character_event = {
    id = MNM.3267
    desc = EVTDESC_MNM_3267
    picture = GFX_evt_recieve_letter
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes
    
    trigger = {
    	FROM = { is_alive = yes }
    	is_monastic_member_trigger = yes
    }

    option = { # This should be preserved
        name = EVTOPTA_MNM_3267

        if = {
        	limit = {
				OR = {
					has_opinion_modifier = { who = FROM modifier = opinion_budding_friendship }
					reverse_has_opinion_modifier = { who = FROM modifier = opinion_budding_friendship }
					reverse_opinion = { who = FROM value = 50 }
					opinion = { who = FROM value = 50 }
				}
        	}
        	add_friend = FROM
        	break = yes
        }
        if = {
        	limit = { NOT = { is_friend = FROM } }
	        opinion = {
	            who = FROM
	            modifier = opinion_budding_friendship
	            years = 10
	        }
	        reverse_opinion = {
	            who = FROM
	            modifier = opinion_budding_friendship
	            years = 10
	        }
        }
        hidden_effect = { character_event = { id = MNM.3270 } } #clean up
    }
}

# The writer's reaction 3 - THEIR WRITING SAVED YOU FROM DEPRESSION
character_event = {
    id = MNM.3268
    desc = EVTDESC_MNM_3268
    picture = GFX_evt_recieve_letter
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes
    
    trigger = {
    	FROM = { is_alive = yes }
    	is_monastic_member_trigger = yes
    }

    option = { # This saved me
        name = EVTOPTA_MNM_3268
        custom_tooltip = { text = EVTOPTA_MNM_3268_TT }        

        if = {
        	limit = { NOT = { is_friend = FROM } }
	        opinion = {
	            who = FROM
	            modifier = opinion_budding_friendship
	            years = 10
	        }
	        reverse_opinion = {
	            who = FROM
	            modifier = opinion_budding_friendship
	            years = 10
	        }
        }
        hidden_effect = { character_event = { id = MNM.3270 } } #clean up
    }
}

# The writer's reaction - YOU STOLE THEIR WORK
character_event = {
    id = MNM.3269
    picture = GFX_evt_recieve_letter
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes
    
    trigger = {
    	FROM = { is_alive = yes }
    	is_monastic_member_trigger = yes
    }

	desc = {
		trigger = { has_character_flag = suggestion_A_flag }
		text = EVTDESC_MNM_3269_A
    }
    desc = {
        trigger = { has_character_flag = suggestion_B_flag }
        text = EVTDESC_MNM_3269_B
    }

    option = { # tough luck
        name = EVTOPTA_MNM_3269
        custom_tooltip = { text = EVTOPTA_MNM_3269_TT }

        reverse_opinion = {
            who = FROM
            modifier = opinion_betrayed
            years = 25
        }

        if = {
        	limit = {
        		NOT = { is_friend = FROM }
        		NOT = { is_rival = FROM }
        	}
        	random = {
	            chance = 25 
	            add_rival = FROM
	        }
        }
		if = {
			limit = {
				is_friend = FROM
        	}
        	remove_friend = FROM
        }
        hidden_effect = { character_event = { id = MNM.3270 } } #clean up
    }
}

character_event = { #clean up event
    id = MNM.3270
    is_triggered_only = yes
    hide_window = yes

    immediate = {
    	clr_character_flag = suggestion_A_flag
    	clr_character_flag = suggestion_B_flag
		clr_character_flag = 3264_publish_flag
		clr_character_flag = 3264_preserve_flag
		clr_character_flag = 3264_depressed_flag
    }
}

#######################################################
################## 4200 - Gardening ###################
#######################################################

character_event = {
    id = MNM.4200
    hide_window = yes
    
    is_triggered_only = yes
    only_capable = yes
    is_in_society = yes


    trigger = {
    	is_monastic_member_trigger = yes

    	NOT = { has_character_modifier = gardening_cooldown_timer }

    	society = {
		    any_society_member = {
	            ai = yes
	            is_incapable = no
	            prisoner = no
	            in_command = no
	            is_inaccessible_trigger = no
	            OR = {
					trait = gardener
					learning = 15
	            }
	            NOT = { character = ROOT }
	            is_within_diplo_range = ROOT
	        }
	    }	
    }
       
    immediate = {
        # First look for someone at court
        society = {
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
                    OR = {
						trait = gardener
						learning = 15
		            }
                    NOT = { character = ROOT }
                    host = { character = ROOT }
                }
                character_event = { id = MNM.4201 }
                break = yes
            }
            
            # Then look for someone in the same realm
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
                    OR = {
						trait = gardener
						learning = 15
						diplomacy = 15
		            }
                    NOT = { character = ROOT }
                    same_realm = ROOT
                }
                character_event = { id = MNM.4201 }
                break = yes
            }
            
            # Then look abroad...
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
                    OR = {
						trait = gardener
						learning = 15
		            }
                    NOT = { character = ROOT }
                    is_within_diplo_range = ROOT
                }
                character_event = { id = MNM.4201 }
                break = yes
            }
        }
	    add_character_modifier = {
			name = gardening_cooldown_timer
			hidden = yes
			days = 1825
		}
    }
}

#Ping event for other member (the botanist)
character_event = {
    id = MNM.4201
    hide_window = yes
    is_triggered_only = yes
    immediate = { FROM = { character_event = { id = MNM.4202 } } }
}

#Fellow member asks if you want to check out their roses
character_event = {
    id = MNM.4202
    desc = EVTDESC_MNM_4202
    picture = GFX_evt_gathering_of_minds
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    option = { #Go to the monastery/ashram
        name = {
        	text = EVTOPTA_MNM_4202_CHRISTIAN
        	trigger = { is_christian_monastic_member_trigger = yes }
        }
        name = {
        	text = EVTOPTA_MNM_4202_DHARMIC
        	trigger = { is_dharmic_monastic_member_trigger = yes }
        }
        custom_tooltip = { text = EVTOPTA_MNM_4202_TT }

        set_character_flag = 4202_visit_monastery_flag
    }
    option = { #Pay someone to acquire the roses
        name = EVTOPTB_MNM_4202
        custom_tooltip = { text = EVTOPTB_MNM_4202_TT }
        set_character_flag = 4202_hire_someone_flag
    }
    option = { # Send sample from my own garden
    	name = EVTOPTC_MNM_4202
    	custom_tooltip = { text = EVTOPTC_MNM_4202_TT }
    	set_character_flag = 4202_send_my_own_samples_flag

		tooltip_info = gardener
		trigger = { trait = gardener }
    }
	option = {# do nothing
    	name = EVTOPTD_MNM_4202
    	#custom_tooltip = { text = EVTOPTD_MNM_4202_TT }
    }
    after = {
    	FROM = { character_event = { id = MNM.4203 days = 15 random = 30 } }
    }
}

#Ping event for other member (the botanist)
character_event = {
    id = MNM.4203
    hide_window = yes
    is_triggered_only = yes
    immediate = {
    	FROM = {
	    	trigger_switch = { # which event to send
	            on_trigger = has_character_flag
	            4202_visit_monastery_flag = {
	                character_event = { id = MNM.4204 }
	                clr_character_flag = 4202_visit_monastery_flag
	            }
	            4202_hire_someone_flag = {
	                character_event = { id = MNM.4205 }
	                clr_character_flag = 4202_hire_someone_flag
	            }
	            4202_send_my_own_samples_flag = {
			    	character_event = { id = MNM.4206 }
	                clr_character_flag = 4202_send_my_own_samples_flag
	            }
	        }
        }
    }
}

#Visited the monastery
character_event = {
    id = MNM.4204
    desc = EVTDESC_MNM_4204
    picture = GFX_evt_garden
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    trigger = {
		is_monastic_member_trigger = yes
		NAND = {
			has_character_modifier = green_fingers
			has_character_modifier = dirty_hands
		}
	}

    option = { # It's like coming home
        name = EVTOPTA_MNM_4204

        custom_tooltip = { text = EVTOPTA_MNM_4204_TT }

        if = {
        	limit = { has_character_modifier = green_fingers }
        	add_trait = gardener
        }
        trigger = {
        	NOT = { lifestyle_traits = 1 }
        	NOT = { trait = gardener }
        	has_character_modifier = green_fingers
		}
    }

    option = { # Embrace this new interest
        name = EVTOPTB_MNM_4204
        custom_tooltip = { text = EVTOPTB_MNM_4204_TT }
        random_list = {
        	60 = {
        		modifier = {
        			factor = 10
        			trait = gardener
        		}
        		modifier = {
        			factor = 1.2
        			trait = diligent
        		}
        		modifier = {
        			factor = 1.1
        			learning = 12
        		}
        		add_character_modifier = {
		        	name = green_fingers
		        	years = 10
				}
        	}
        	40 = {
        		modifier = {
        			factor = 10
        			trait = imbecile
        		}
        		modifier = {
        			factor = 0.5
        			trait = genius
        		}
		        add_character_modifier = {
		        	name = dirty_hands
		        	years = 5
				}
        	}
        }
    }

    option = { # Praise the botanist
    	name = EVTOPTC_MNM_4204
    	custom_tooltip = { text = EVTOPTC_MNM_4204_TT }

    	reverse_opinion = {
            who = FROM
            modifier = opinion_was_praised
            years = 10
        }
    }
}

#I hired someone who brought me roses
character_event = {
    id = MNM.4205
    desc = EVTDESC_MNM_4205
    picture = GFX_evt_garden
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    trigger = { is_monastic_member_trigger = yes }

    option = { # Praise the botanist
    	name = EVTOPTA_MNM_4205
    	custom_tooltip = { text = EVTOPTA_MNM_4205_TT }

    	add_character_modifier = {
        	name = rose_gardens
        	years = 15
		}

    	reverse_opinion = {
            who = FROM
            modifier = opinion_was_praised
            years = 10
        }
    }
}

#I sent some of my own flowers to the botanist
character_event = {
    id = MNM.4206
    desc = EVTDESC_MNM_4206
    picture = GFX_evt_garden
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    trigger = { is_monastic_member_trigger = yes }

    option = { # I am happy to help
    	name = EVTOPTA_MNM_4206
    	custom_tooltip = { text = EVTOPTA_MNM_4206_TT }

		add_character_modifier = {
			name = the_name_of_the_rose
			years = 10
		}

    	reverse_opinion = {
            who = FROM
            modifier = opinion_was_praised
            years = 10
        }
    }
}


#######################################################
############ 4210 - Someone falls asleep ##############
#######################################################

character_event = { #Hidden start
    id = MNM.4210
    hide_window = yes
    
    is_triggered_only = yes
    only_capable = yes
    is_in_society = yes

    trigger = {
    	is_monastic_member_trigger = yes

    	NOT = { has_character_modifier = fell_asleep_in_church_cooldown_timer }

    	society = {
		    any_society_member = {
	            ai = yes
	            is_incapable = no
	            prisoner = no
	            in_command = no
	            is_inaccessible_trigger = no
	            has_vice_trigger = yes
	            NOT = { character = ROOT }
	            is_within_diplo_range = ROOT
	        }
	    }	
    }
       
    immediate = {
        # First look for someone at court
        society = {
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
					has_vice_trigger = yes
                    NOT = { character = ROOT }
                    host = { character = ROOT }
                }
                character_event = { id = MNM.4211 }
                break = yes
            }
            
            # Then look for someone in the same realm
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
                    has_vice_trigger = yes
                    NOT = { character = ROOT }
                    same_realm = ROOT
                }
                character_event = { id = MNM.4211 }
                break = yes
            }
            
            # Then look abroad...
            random_society_member = {
                limit = {
                    ai = yes
                    is_incapable = no
                    prisoner = no
                    in_command = no
                    is_inaccessible_trigger = no
                    has_vice_trigger = yes
                    NOT = { character = ROOT }
                    is_within_diplo_range = ROOT
                }
                character_event = { id = MNM.4211 }
                break = yes
            }
        }
	    add_character_modifier = {
			name = fell_asleep_in_church_cooldown_timer
			hidden = yes
			days = 1825
		}
    }
}


#Ping event for other member (the sleeper)
character_event = {
    id = MNM.4211
    hide_window = yes
    is_triggered_only = yes
    immediate = { FROM = { character_event = { id = MNM.4212 } } }
}

#Fellow member is snoring in temple
character_event = {
    id = MNM.4212
    desc = EVTDESC_MNM_4212
    picture = GFX_evt_gathering_of_minds
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    option = { #Wake them up
        name = EVTOPTA_MNM_4212
        set_character_flag = 4212_woke_them_up_flag
    }
    option = { #Let them sleep
        name = EVTOPTB_MNM_4212
        set_character_flag = 4212_let_them_sleep_flag
    }
    option = { # Prank
    	name = EVTOPTC_MNM_4212
    	set_character_flag = 4212_pranked_them_flag

		tooltip_info = lunatic
		trigger = { trait = lunatic }
    }

    after = {
    	FROM = { character_event = { id = MNM.4213 days = 1 } }
    }
}

#Ping event for other member (the sleeper)
character_event = {
    id = MNM.4213
    hide_window = yes
    is_triggered_only = yes
    immediate = {
    	FROM = {
	    	trigger_switch = { # which event to send
	            on_trigger = has_character_flag
	            4212_woke_them_up_flag = {
	                character_event = { id = MNM.4214 }
	                clr_character_flag = 4212_woke_them_up_flag
	            }
	            4212_let_them_sleep_flag = {
	                character_event = { id = MNM.4215 }
	                clr_character_flag = 4212_let_them_sleep_flag
	            }
	            4212_pranked_them_flag = {
			    	character_event = { id = MNM.4216 }
	                clr_character_flag = 4212_pranked_them_flag
	            }
	        }
        }
    }
}

# Woke them up
character_event = {
    id = MNM.4214
    desc = EVTDESC_MNM_4214
    picture = GFX_evt_gathering_of_minds
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    option = { # Think nothing of it, friend
        name = EVTOPTA_MNM_4214
	
    	reverse_opinion = {
            who = FROM
            modifier = opinion_grateful
            years = 10
        }
    }

    option = { # Insinuate that they owe you
        name = EVTOPTB_MNM_4214
        if = {
			limit = {
				has_dlc = "Conclave"
			}
			add_favor = FROM
		}
		trigger = {
			has_dlc = "Conclave"
		}
    }
}

# I let them sleep
character_event = {
    id = MNM.4215
    desc = EVTDESC_MNM_4215
    picture = GFX_evt_gathering_of_minds
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    option = { # They are embarrassed
    	name = EVTOPTA_MNM_4215

    	FROM = {
	    	add_character_modifier = {
	        	name = embarrassed_believer
	        	years = 5
			}
    	}
    }
}

#I pranked them
character_event = {
    id = MNM.4216
    desc = EVTDESC_MNM_4216
    picture = GFX_evt_gathering_of_minds
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes

    option = { # Amazing
    	name = EVTOPTA_MNM_4216

    	reverse_opinion = {
            who = FROM
            modifier = opinion_insulted
            years = 10
        }
    }
}

#I own heretical books!
character_event = {
    id = MNM.4217
    title = EVTTITLE_MNM_4217
    desc = EVTDESC_MNM_4217
    picture = GFX_evt_gathering_of_minds
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes
    only_capable = yes

    trigger = {
    	is_monastic_member_trigger = yes
		any_artifact = {
			AND = {
				OR = {
					has_artifact_flag = unholy
					has_artifact_flag = hermetics
				}
				has_artifact_flag = book
			}
		}
    }

    weight_multiplier = {
		factor = 1
		modifier = {
			factor = 2.0
			society_rank >= 3
		}
		modifier = {
			factor = 5.0
			society_member_of = monastic_order_dominican
		}
		modifier = {
			factor = 0.1
			has_character_flag = considered_burning_heretical_books
		}
	}

    immediate = {
    	random_artifact = {
			limit = {
				has_artifact_flag = book
				OR = {
					has_artifact_flag = unholy
					has_artifact_flag = hermetics
				}
			}
			set_artifact_flag = selected_book
		}
    }

    option = { # Amazing. Burn that baby.
    	name = {
    		text = EVTOPTA_MNM_4217
    		trigger = {
    			NOT = { trait = zealous }
    		}
    	}
    	name = {
    		text = EVTOPTA_MNM_4217_zealous
    		trigger = {
    			trait = zealous
    		}
    	}

    	hidden_effect = { #Checks if you're about to burn the Necronomicon...
    		if = {
    			limit = {
    				any_artifact = {
    					has_artifact_flag = selected_book
    					artifact_type = necronomicon
    				}
    			}
				set_character_flag = burned_unholy_books
				character_event = { id = MNM.4218 days = 100 random = 365 }
    		}
    	}

    	random_artifact = { #destroys a book...
			limit = {
				has_artifact_flag = selected_book
			}
			destroy_artifact = yes
		}

		prestige = 50
		add_society_currency_medium_effect = yes
    }

    option = { # I shall burn ALL the books... (only available if you have more than one book)
    	name = EVTOPTB_MNM_4217

    	name = {
    		text = EVTOPTB_MNM_4217
    		trigger = {
    			NOT = { trait = zealous }
    		}
    	}
    	name = {
    		text = EVTOPTB_MNM_4217_zealous
    		trigger = {
    			trait = zealous
    		}
    	}

    	hidden_effect = { #If you burn the Necronomicon...
    		if = {
    			limit = {
    				any_artifact = {
    					artifact_type = necronomicon
    				}
    			}
				set_character_flag = burned_unholy_books
				character_event = { id = MNM.4218 days = 100 random = 365 }
    		}
    	}

    	any_artifact = { #Burns any 'unholy' book...
			limit = {
				AND = {
					OR = {
						has_artifact_flag = unholy
						has_artifact_flag = hermetics
					}
					has_artifact_flag = book
				}
			}
			destroy_artifact = yes
		}


		prestige = 100
		add_society_currency_major_effect = yes

		trigger = {
			any_artifact = {
				count = 2
				OR = {
					has_artifact_flag = unholy
					has_artifact_flag = hermetics
				}
				has_artifact_flag = book
			}
		}
    }

    option = { # This sounds excessive!
    	name = {
    		text = EVTOPTC_MNM_4217
    		trigger = {
    			has_lifestyle_learning_trigger = no
    		}
    	}
    	name = {
    		text = EVTOPTC_MNM_4217_scholar
    		trigger = {
    			has_lifestyle_learning_trigger = yes
    		}
    	}
		set_character_flag = considered_burning_heretical_books
    }

    after = {
    	any_artifact = {
    		clr_artifact_flag = selected_book
    	}
    }
}

#The Necronomicon comes back
character_event = {
    id = MNM.4218
    title = EVTTITLE_MNM_4218
    desc = EVTDESC_MNM_4218
    picture = GFX_evt_ritual_scroll
    border = GFX_event_normal_frame_religion
    is_triggered_only = yes
    
    trigger = {
    	has_character_flag = burned_unholy_books
    	NOT = {
    		any_artifact = {
    			artifact_type = necronomicon
    		}
    	}
    }

    immediate = {
    	add_artifact = necronomicon
    }

    option = {      
        name = EVTOPTA_MNM_4218
        custom_tooltip = { text = EVTOPTA_MNM_4218_TT }

        random_artifact = { #destroys the book...
			limit = {
				artifact_type = necronomicon
			}
			destroy_artifact = yes
		}
    }
    option = {      
        name = EVTOPTB_MNM_4218
        custom_tooltip = { text = EVTOPTB_MNM_4218_TT }
    }
}

### Monastic Order Child Education Power ###
## 2.8 addition by Matthew Clohessy

character_event = {
	id = MNM.4300

	is_triggered_only = yes #triggered from on_childhood_pulse
	hide_window = yes

	trigger = { 
		educator = { 
			is_monastic_member_trigger = yes
			NOR = { #Buddhists and Jains have a different power
				society_member_of = monastic_order_buddhist
				society_member_of = monastic_order_jain
			}
		}
		NOT = { check_variable = { which = "monastic_order_education_event" value = 3 } }
	}

	immediate = {
		change_variable = { which = "monastic_order_education_event" value = 1 }
		random = {
			chance = 30
			educator = { character_event = { id = MNM.4301 days = 5 } }
		}
	}
}
#How do you try and nudge your ward
character_event = {
	id = MNM.4301
	desc = {
		text = EVT_DESCA_MNM_4301
		picture = GFX_evt_child_reading
		trigger = { 
			FROM = {
				age = 6
				NOT = { age = 8 }
			}
		}
	}
	desc = {
		text = EVT_DESCB_MNM_4301
		picture = GFX_evt_charity
		trigger = {
			FROM = {
				age = 8
				NOT = { age = 10 }
			}
		}
	}
	desc = {
		text = EVT_DESCC_MNM_4301
		picture = GFX_evt_stone_church
		trigger = {
			FROM = {
				age = 10
			}
		}
	}
	picture = GFX_evt_child_reading
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	immediate = {
		if = { #If no stat over 8 no extra bonues
			limit = {
				NOR = {
					diplomacy = 8
					martial = 8
					stewardship = 8
					intrigue = 8
				}
			}
			set_character_flag = monastic_order_education_learning
			break = yes
		}
		#Else mark a random stat over 8
		random_list = {
			1 = {
				trigger = { diplomacy = 8 }
				set_character_flag = monastic_order_education_diplomacy
			}
			1 = {
				trigger = { martial = 8 }
				set_character_flag = monastic_order_education_martial
			}
			1 = {
				trigger = { stewardship = 8 }
				set_character_flag = monastic_order_education_stewardship
			}
			1 = {
				trigger = { intrigue = 8 }
				set_character_flag = monastic_order_education_intrigue
			}
		}
	}

	option = { #No other stat bonus
		name = EVT_OPTA_MNM_4301
		trigger = { has_character_flag = monastic_order_education_learning }
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 3
				}
			}
		}
	}
	option = { #Diplomacy
		name = EVT_OPTA_MNM_4301
		trigger = { has_character_flag = monastic_order_education_diplomacy }
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 3
				}
			}
		}
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_diplomacy = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_diplomacy = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_diplomacy = 3
				}
			}
		}
	}
	option = { #Martial
		name = EVT_OPTA_MNM_4301
		trigger = { has_character_flag = monastic_order_education_martial }
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 3
				}
			}
		}
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_martial = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_martial = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_martial = 3
				}
			}
		}
	}
	option = { #Stewardship
		name = EVT_OPTA_MNM_4301
		trigger = { has_character_flag = monastic_order_education_stewardship }
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 3
				}
			}
		}
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_stewardship = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_stewardship = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_stewardship = 3
				}
			}
		}
	}
	option = { #Intrigue
		name = EVT_OPTA_MNM_4301
		trigger = { has_character_flag = monastic_order_education_intrigue }
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_learning = 3
				}
			}
		}
		random_list = {
			30 = {
				modifier = {
					factor = 0.9
					is_learned_trigger = yes
				}
				FROM = {
					change_intrigue = 1
				}
			}
			50 = {
				modifier = {
					factor = 0.5
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_intrigue = 2
				}
			}
			20 = {
				modifier = {
					factor = 0
					FROM = { is_dumb_trigger = yes }
				}
				modifier = {
					factor = 2
					FROM = { is_smart_trigger = yes }
				}
				modifier = {
					factor = 1.1
					learning = 12
				}
				modifier = {
					factor = 1.1
					learning = 14
				}
				modifier = {
					factor = 1.1
					learning = 16
				}
				modifier = {
					factor = 1.1
					learning = 18
				}
				modifier = {
					factor = 1.1
					learning = 20
				}
				modifier = {
					factor = 2
					is_learned_trigger = yes
				}
				FROM = {
					change_intrigue = 3
				}
			}
		}
	}
	after = {
		clr_character_flag = monastic_order_education_learning
		clr_character_flag = monastic_order_education_diplomacy
		clr_character_flag = monastic_order_education_martial
		clr_character_flag = monastic_order_education_stewardship
		clr_character_flag = monastic_order_education_intrigue
	}
}
#Child educated by a MO member reaches adulthood
character_event = {
	id = MNM.4302

	is_triggered_only = yes #triggered from some on_adulthood
	hide_window = yes

	trigger = { 
		educator = { 
			is_monastic_member_trigger = yes
			NOR = { #Buddhists and Jains have a different power
				society_member_of = monastic_order_buddhist
				society_member_of = monastic_order_jain
			}
		}
	}

	fail_trigger_effect = {
		#Clear the variable for students who temporarily were ward to an MO member
		set_variable = { which = "monastic_order_education_event" value = 0 }
	}

	immediate = {
		set_variable = { which = "monastic_order_education_event" value = 0 } #set variable to zero to prune from saves
		random = {
			chance = 30
			educator = { character_event = { id = MNM.4303 days = 5 } }
		}
	}
}
#Educator can try to sway their former student to be better
character_event = {
	id = MNM.4303
	desc = EVT_DESC_MNM_4303
	picture = GFX_evt_book_carolingian_script
	border = GFX_event_normal_frame_religion
	is_triggered_only = yes

	trigger = {
		is_monastic_member_trigger = yes
		NOR = { #Buddhists and Jains have a different power
			society_member_of = monastic_order_buddhist
			society_member_of = monastic_order_jain
		}
	}

	immediate = {
		FROM = {
			random_list = {
				1 = {
					trigger = { 
						trait = lustful
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_lustful
				}
				1 = {
					trigger = {  
						trait = gluttonous 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_gluttonous
				}
				1 = {
					trigger = {  
						trait = greedy 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_greedy
				}
				1 = {
					trigger = {  
						trait = slothful 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_slothful
				}
				1 = {
					trigger = {  
						trait = envious 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_envious
				}
				1 = {
					trigger = {  
						trait = wroth 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_wroth
				}
				1 = {
					trigger = {  
						trait = proud 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_proud
				}
				1 = {
					trigger = {  
						trait = deceitful 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_deceitful
				}
				1 = {
					trigger = {  
						trait = cruel 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_cruel
				}
				1 = {
					trigger = {  
						trait = cynical 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_remove_cynical
				}
				1 = {
					trigger = {  
						trait = ambitious 
						ROOT = { society_rank = 3 }
					}
					set_character_flag = monastic_order_education_remove_ambitious
				}
				1 = {
					trigger = {  
						NOT = { trait = humble } 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_add_humble
				}
				1 = {
					trigger = {  
						NOT = { trait = charitable } 
						ROOT = { society_rank = 1 }
					}
					set_character_flag = monastic_order_education_add_charitable
				}
				1 = {
					trigger = {  
						NOT = { trait = chaste } 
						ROOT = { society_rank = 2 }
					}
					set_character_flag = monastic_order_education_add_chaste
				}
				1 = {
					trigger = {  
						NOT = { trait = kind } 
						ROOT = { society_rank = 2 }
					}
					set_character_flag = monastic_order_education_add_kind
				}
				1 = {
					trigger = {  
						NOT = { trait = temperate } 
						ROOT = { society_rank = 2 }
					}
					set_character_flag = monastic_order_education_add_temperate
				}
				1 = {
					trigger = {  
						NOT = { trait = patient }
						ROOT = { society_rank = 3 }
					 }
					set_character_flag = monastic_order_education_add_patient
				}
				1 = {
					trigger = { 
						NOT = { trait = diligent } 
						ROOT = { society_rank = 3 }
					}
					set_character_flag = monastic_order_education_add_diligent
				}
				1 = {
					trigger = {  
						NOT = { trait = honest } 
						ROOT = { society_rank = 2 }
					}
					set_character_flag = monastic_order_education_add_honest
				}
				1 = {
					trigger = {  
						NOT = { trait = content } 
						ROOT = { society_rank = 3 }
					}
					set_character_flag = monastic_order_education_add_content
				}
			}
		}
	}
	
	option = {
		name = EVT_OPTA_MNM_43003
		FROM = { character_event = { id = MNM.4304 days = 1 } }
	}
}
#Your Monastic Order educator convinces you to be better
character_event = {
	id = MNM.4304
	desc = EVT_DESC_MNM_4304
	picture = GFX_evt_book_carolingian_script
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = { #Sounds good
		name = EVT_OPTA_MNM_4304
		trigger_switch = {
			on_trigger = has_character_flag
			monastic_order_education_remove_lustful		= { remove_trait = lustful }
			monastic_order_education_remove_gluttonous	= { remove_trait = gluttonous }
			monastic_order_education_remove_greedy		= { remove_trait = greedy }
			monastic_order_education_remove_slothful	= { remove_trait = slothful }
			monastic_order_education_remove_envious		= { remove_trait = envious }
			monastic_order_education_remove_wroth		= { remove_trait = wroth }
			monastic_order_education_remove_proud		= { remove_trait = proud }
			monastic_order_education_remove_deceitful   = { remove_trait = deceitful }
			monastic_order_education_remove_cruel		= { remove_trait = cruel }
			monastic_order_education_remove_cynical		= { remove_trait = cynical }
			monastic_order_education_remove_ambitious	= { remove_trait = ambitious }
			monastic_order_education_add_humble			= { add_trait = humble }
			monastic_order_education_add_charitable		= { add_trait = charitable }
			monastic_order_education_add_chaste			= { add_trait = chaste }
			monastic_order_education_add_kind			= { add_trait = kind }
			monastic_order_education_add_temperate		= { add_trait = temperate }
			monastic_order_education_add_patient		= { add_trait = patient }
			monastic_order_education_add_diligent		= { add_trait = diligent }
			monastic_order_education_add_honest			= { add_trait = honest }
			monastic_order_education_add_content		= { add_trait = content }
		}
		FROM = { character_event = { id = MNM.4305 days = 1 } }
	}
	option = { #No thanks I like my sins
		name = EVT_OPTB_MNM_4304
		trigger = { ai = no }
		piety = -10
		prestige = 20
		FROM = { character_event = { id = MNM.4306 days = 1 } }
	}
}
#Your ward did as you asked
character_event = {
	id = MNM.4305
	desc = EVT_DESC_MNM_4305
	picture = GFX_evt_book_carolingian_script
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVT_OPTA_MNM_4305
		piety = 10
		FROM = {
			show_scope_change = no
			trigger_switch = {
				on_trigger = has_character_flag
				monastic_order_education_remove_lustful		= { remove_trait = lustful }
				monastic_order_education_remove_gluttonous	= { remove_trait = gluttonous }
				monastic_order_education_remove_greedy		= { remove_trait = greedy }
				monastic_order_education_remove_slothful	= { remove_trait = slothful }
				monastic_order_education_remove_envious		= { remove_trait = envious }
				monastic_order_education_remove_wroth		= { remove_trait = wroth }
				monastic_order_education_remove_proud		= { remove_trait = proud }
				monastic_order_education_remove_deceitful   = { remove_trait = deceitful }
				monastic_order_education_remove_cruel		= { remove_trait = cruel }
				monastic_order_education_remove_cynical		= { remove_trait = cynical }
				monastic_order_education_remove_ambitious	= { remove_trait = ambitious }
				monastic_order_education_add_humble			= { add_trait = humble }
				monastic_order_education_add_charitable		= { add_trait = charitable }
				monastic_order_education_add_chaste			= { add_trait = chaste }
				monastic_order_education_add_kind			= { add_trait = kind }
				monastic_order_education_add_temperate		= { add_trait = temperate }
				monastic_order_education_add_patient		= { add_trait = patient }
				monastic_order_education_add_diligent		= { add_trait = diligent }
				monastic_order_education_add_honest			= { add_trait = honest }
				monastic_order_education_add_content		= { add_trait = content }
			}
			clr_character_flag = monastic_order_education_remove_lustful
			clr_character_flag = monastic_order_education_remove_gluttonous
			clr_character_flag = monastic_order_education_remove_greedy
			clr_character_flag = monastic_order_education_remove_slothful
			clr_character_flag = monastic_order_education_remove_envious
			clr_character_flag = monastic_order_education_remove_wroth
			clr_character_flag = monastic_order_education_remove_proud
			clr_character_flag = monastic_order_education_remove_deceitful
			clr_character_flag = monastic_order_education_remove_cruel
			clr_character_flag = monastic_order_education_remove_cynical
			clr_character_flag = monastic_order_education_remove_ambitious
			clr_character_flag = monastic_order_education_add_humble
			clr_character_flag = monastic_order_education_add_charitable
			clr_character_flag = monastic_order_education_add_chaste
			clr_character_flag = monastic_order_education_add_kind
			clr_character_flag = monastic_order_education_add_temperate
			clr_character_flag = monastic_order_education_add_patient
			clr_character_flag = monastic_order_education_add_diligent
			clr_character_flag = monastic_order_education_add_honest
			clr_character_flag = monastic_order_education_add_content
		}
	}
}
#Your ward ignored you
character_event = {
	id = MNM.4306
	desc = EVT_DESC_MNM_4306
	picture = GFX_evt_book_carolingian_script
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	option = {
		name = EVT_OPTA_MNM_4306
		piety = -10
		FROM = {
			clr_character_flag = monastic_order_education_remove_lustful
			clr_character_flag = monastic_order_education_remove_gluttonous
			clr_character_flag = monastic_order_education_remove_greedy
			clr_character_flag = monastic_order_education_remove_slothful
			clr_character_flag = monastic_order_education_remove_envious
			clr_character_flag = monastic_order_education_remove_wroth
			clr_character_flag = monastic_order_education_remove_proud
			clr_character_flag = monastic_order_education_remove_deceitful
			clr_character_flag = monastic_order_education_remove_cruel
			clr_character_flag = monastic_order_education_remove_cynical
			clr_character_flag = monastic_order_education_remove_ambitious
			clr_character_flag = monastic_order_education_add_humble
			clr_character_flag = monastic_order_education_add_charitable
			clr_character_flag = monastic_order_education_add_chaste
			clr_character_flag = monastic_order_education_add_kind
			clr_character_flag = monastic_order_education_add_temperate
			clr_character_flag = monastic_order_education_add_patient
			clr_character_flag = monastic_order_education_add_diligent
			clr_character_flag = monastic_order_education_add_honest
			clr_character_flag = monastic_order_education_add_content
		}
	}
}
