namespace = ancrel
#reserved: ancrel.2000- ancrel.3999

###RESTORE THE PONTIFEX MAXIMUS

narrative_event = {
	id = ancrel.2102
	title = EVTNAME_ancrel_2102
	desc = EVTDESC_ancrel_2102
	picture = GFX_evt_roman_temple
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes
	hide_from = yes
	show_root = yes
	major = yes
	
	major_trigger = {
		religion = roman_pagan
	}

	option = {
		name = EVTOPTA_ancrel_2102
	}
}

### FLAMINES MAIORES
# Written by Jon Severinsson

# The Flamen Dialis must resign
character_event = {
	id = ancrel.2110
	desc = EVTDESC_ancrel_2110
	picture = GFX_evt_council
	border = GFX_event_normal_frame_religion
	
	religion = roman_pagan
	min_age = 16

	trigger = {
		has_minor_title = title_flamen_dialis
		NOT = {
			any_spouse = {
				is_alive = yes
				has_minor_title = title_flaminica_dialis
			}
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = OK
		remove_title = title_flamen_dialis
		remove_character_modifier = modifier_flamen_dialis
	}
}

# The Flamen Martialis must resign
character_event = {
	id = ancrel.2111
	desc = EVTDESC_ancrel_2111
	picture = GFX_evt_council
	border = GFX_event_normal_frame_religion
	
	religion = roman_pagan
	min_age = 16

	trigger = {
		has_minor_title = title_flamen_martialis
		NOT = {
			any_spouse = {
				is_alive = yes
				has_minor_title = title_flaminica_martialis
			}
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = OK
		remove_title = title_flamen_martialis
		remove_character_modifier = modifier_flamen_martialis
	}
}

# The Flamen Quirinalis must resign
character_event = {
	id = ancrel.2112
	desc = EVTDESC_ancrel_2112
	picture = GFX_evt_council
	border = GFX_event_normal_frame_religion
	
	religion = roman_pagan
	min_age = 16

	trigger = {
		has_minor_title = title_flamen_quirinalis
		NOT = {
			any_spouse = {
				is_alive = yes
				has_minor_title = title_flaminica_quirinalis
			}
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = OK
		remove_title = title_flamen_quirinalis
		remove_character_modifier = modifier_flamen_quirinalis
	}
}

# Cleanup when a Flamines lost his title some other way
character_event = {
	id = ancrel.2113
	hide_window = yes
	
	is_triggered_only = yes

	trigger = {
		OR = {
			AND = {
				has_character_modifier = modifier_flamen_dialis
				NOT = { has_minor_title = title_flamen_dialis }
			}
			AND = {
				has_character_modifier = modifier_flamen_martialis
				NOT = { has_minor_title = title_flamen_martialis }
			}
			AND = {
				has_character_modifier = modifier_flamen_quirinalis
				NOT = { has_minor_title = title_flamen_quirinalis }
			}
		}
	}

	immediate = {
		if = {
			limit = {
				has_character_modifier = modifier_flamen_dialis
				NOT = { has_minor_title = title_flamen_dialis }
			}
			remove_character_modifier = modifier_flamen_dialis
		}
		if = {
			limit = {
				has_character_modifier = modifier_flamen_martialis
				NOT = { has_minor_title = title_flamen_martialis }
			}
			remove_character_modifier = modifier_flamen_martialis
		}
		if = {
			limit = {
				has_character_modifier = modifier_flamen_quirinalis
				NOT = { has_minor_title = title_flamen_quirinalis }
			}
			remove_character_modifier = modifier_flamen_quirinalis
		}
	}
}

### HELLENIC FLAVOUR EVENTS
# Written by Patrick Marchand

# Augur hit by lightning
character_event = {
	id = ancrel.2240
	desc = EVTDESC_ancrel_2240
	picture = GFX_evt_lightning_strike
	border = GFX_event_normal_frame_religion
	
	religion = roman_pagan
	only_rulers = yes
	
	trigger = {
		is_abroad_trigger = no
		is_landed = yes
	}
	
	mean_time_to_happen = {
		months = 750
		modifier = {
			factor = 0.5
			trait = zealous
		}
		modifier = {
			factor = 2.0
			trait = cynical
		}
		modifier = {
			factor = 0.5
			trait = paranoid
		}
		modifier = {
			factor = 0.5
			trait = mystic
		}
		modifier = {
			factor = 0.5
			trait = ambitious
		}
		modifier = {
			factor = 1.5
			trait = content
		}
	}
	
	option = {
		name = EVTOPTA_ancrel_2240
		trigger = {
			NOT = {trait = paranoid}
		}
		piety = 25
	}
	
	option = {
		name = EVTOPTB_ancrel_2240
		trigger = {
			trait = paranoid
		}
		tooltip_info = paranoid
		piety = 50
		random_list = {
			50 = {
				piety = 25
			}
			15 = {
				add_trait = stressed
			}
			35 = {}
		}
	}
}

# Drunken Actors
character_event = {
	id = ancrel.2241
	desc = EVTDESC_ancrel_2241
	picture = GFX_evt_jugglers
	border = GFX_event_normal_frame_religion
	
	religion_group = hellenic_pagan_group
	only_rulers = yes
	
	trigger = {
		is_abroad_trigger = no
		is_landed = yes
	}
	
	mean_time_to_happen = {
		months = 1000

		modifier = {
			factor = 0.4
			trait = poet
		}
		modifier = {
			factor = 2.0
			trait = cynical
		}
		modifier = {
			factor = 0.3
			trait = wroth
		}
		modifier = {
			factor = 0.6
			trait = brave
		}
		modifier = {
			factor = 0.5
			trait = proud
		}
		modifier = {
			factor = 1.8
			trait = content
		}
		modifier = {
			factor = 0.5
			trait = drunkard
		}
	}
	
	option = {
		name = EVTOPTA_ancrel_2241
		prestige = -50
	}
	option = {
		name = EVTOPTB_ancrel_2241
		change_learning  = 1
		random_list = {
			70 = {}
			20 = {
				add_trait = drunkard
			}
			10 = {
				add_trait = slothful
			}
		}
	}
}

### VESTALES
# Written by Jon Severinsson

# The Vestalis Maxima should be the guardian of all underage Vestalis
character_event = {
	id = ancrel.2120
	hide_window = yes
	
	religion = roman_pagan
	only_women = yes

	is_triggered_only = yes

	trigger = {
		has_minor_title = title_vestalis_maxima
		top_liege = {
			any_realm_character = {
				has_minor_title = title_vestalis
				age = 6
				NOT = { age = 16 }
				NOT = { educator = { character = ROOT } }
			}
		}
	}

	immediate = {
		top_liege = {
			any_realm_character = {
				limit = {
					has_minor_title = title_vestalis
					age = 6
					NOT = { age = 16 }
					NOT = { educator = { character = ROOT } }
				}
				set_guardian = ROOT
			}
		}
	}
}

# A vestalis must retire after 30 years
character_event = {
	id = ancrel.2121
	desc = EVTDESC_ancrel_2121
	picture = GFX_evt_princess_byzantine
	
	has_character_flag = flag_vestalis

	is_triggered_only = yes

	trigger = {
		had_character_flag = {
			flag = flag_vestalis
			days = 10958 # 30 years
		}
		OR = {
			has_minor_title = title_vestalis
			has_minor_title = title_vestalis_maxima
		}
	}

	option = {
		name = OK
		if = {
			limit = { has_minor_title = title_vestalis }
			remove_title = title_vestalis
		}
		if = {
			limit = { has_minor_title = title_vestalis_maxima }
			remove_title = title_vestalis_maxima
		}
		remove_trait = celibate
		remove_trait = vestalis
		add_trait = retired_vestalis
		recalc_succession = yes
		clr_character_flag = flag_vestalis
		hidden_tooltip = {
			496 = { change_variable = { which = "num_vestales" value = -1 } }
		}
	}
}

# Cleanup when a Vestalis lost her title by some way other than retireing
character_event = {
	id = ancrel.2122
	hide_window = yes
	
	has_character_flag = flag_vestalis

	is_triggered_only = yes

	trigger = {
		NOR = {
			has_minor_title = title_vestalis
			has_minor_title = title_vestalis_maxima
		}
	}

	immediate = {
		remove_trait = celibate
		remove_trait = vestalis
		recalc_succession = yes
		clr_character_flag = flag_vestalis
		hidden_tooltip = {
			496 = { change_variable = { which = "num_vestales" value = -1 } }
		}
	}
}

#[on_death] Cleanup when a Vestalis dies
character_event = {
	id = ancrel.2123
	hide_window = yes

	is_triggered_only = yes

	has_character_flag = flag_vestalis

	immediate = {
		clr_character_flag = flag_vestalis
		hidden_tooltip = {
			496 = { change_variable = { which = "num_vestales" value = -1 } }
		}
	}
}

# A vassal has nominated a vestalis
character_event = {
	id = ancrel.2124
	desc = EVTDESC_ancrel_2124
	picture = GFX_evt_princess_byzantine

	is_triggered_only = yes

	option = {
		name = EVTOPTA_ancrel_2124
		trigger = {
			NOT = { 496 = { check_variable = { which = "num_vestales" value = 5 } } }
		}
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0
				FROM = {
					OR = {
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
			}
			modifier = {
				factor = 1.5
				dynasty = FROM
			}
			modifier = {
				factor = 0.8
				NOT = { FROM = { host = { reverse_opinion = { who = ROOT value = -40 } } } }
			}
			modifier = {
				factor = 1.25
				FROM = { host = { reverse_opinion = { who = ROOT value = 40 } } }
			}
			modifier = {
				factor = 0.5
				496 = { check_variable = { which = "num_vestales" value = 4 } }
			}
			modifier = {
				factor = 2
				NOT = { 496 = { check_variable = { which = "num_vestales" value = 2 } } }
			}
		}
		FROM = {
			clr_character_flag = flag_nominated_as_vestalis
			host = {
				prestige = 50
				piety = 50
				opinion = { who = ROOT modifier = opinion_nominated_vestalis years = 10 }
			}
		}
		hidden_tooltip = { FROM = { banish = ROOT } } # Move FROM to ROOT's court
		FROM = {
			give_minor_title = title_vestalis
			hidden_tooltip = {
				remove_trait = hedonist
				add_trait = celibate
				add_trait = vestalis
				recalc_succession = yes
				set_character_flag = flag_vestalis
				496 = { change_variable = { which = "num_vestales" value = 1 } }
			}
		}
	}
	option = {
		name = EVTOPTB_ancrel_2124
		trigger = {
			NOT = { 496 = { check_variable = { which = "num_vestales" value = 5 } } }
		}
		ai_chance = {
			factor = 40
		}
		FROM = { host = { prestige = -10 } }
	}
	option = {
		name = EVTOPTC_ancrel_2124
		trigger = {
			496 = { check_variable = { which = "num_vestales" value = 5 } }
		}
	}
}

### HOLY ORDERS

# The Herculeans founded
narrative_event = {
	id = ancrel.2565
	title = EVTNAME_ancrel_2565
	desc = EVTDESC_ancrel_2565
	picture = GFX_evt_roman_temple
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes
	
	hide_from = yes
	
	option = {
		name = EVTOPTA_ancrel_2565
		hidden_tooltip = {
			any_playable_ruler = {
				limit = {
					ai = no
				}
				narrative_event = { id = ancrel.2566 }
			}
		}
	}
}

# The player is informed of the Herculeans
narrative_event = {
	id = ancrel.2566
	title = EVTNAME_ancrel_2566
	desc = EVTDESC_ancrel_2566
	picture = GFX_evt_roman_temple
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ancrel_2566
		trigger = {
			religion = hellenic_pagan
		}
	}
	
	option = {
		name = EVTOPTB_ancrel_2566
		trigger = {
			NOT = {
				religion = hellenic_pagan
			}
		}
	}
}

# The Sacred Band founded
narrative_event = {
	id = ancrel.2567
	title = EVTNAME_ancrel_2567
	desc = EVTDESC_ancrel_2567
	picture = GFX_evt_roman_temple
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes
	
	hide_from = yes
	
	option = {
		name = EVTOPTA_ancrel_2567
		hidden_tooltip = {
			any_playable_ruler = {
				limit = {
					ai = no
				}
				narrative_event = { id = ancrel.2568 }
			}
		}
	}
}

# The player is informed of the Sacred Band
narrative_event = {
	id = ancrel.2568
	title = EVTNAME_ancrel_2568
	desc = EVTDESC_ancrel_2568
	picture = GFX_evt_roman_temple
	border = GFX_event_narrative_frame_war
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ancrel_2566
		trigger = {
			religion = hellenic_pagan
		}
	}
	
	option = {
		name = EVTOPTB_ancrel_2566
		trigger = {
			NOT = {
				religion = hellenic_pagan
			}
		}
	}
}

#The Herculeans ask for land in Achaia
character_event = {
	id = ancrel.2573
	title = EVTNAME_ancrel_2573
	desc = EVTDESC_ancrel_2573
	
	picture = GFX_evt_roman_temple
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes
	
	trigger = {
		has_landed_title = c_achaia
		is_title_active = d_herculean
		d_herculean = { owner = { religion = ROOT } }
		top_liege = {
			d_herculean = { owner = { religion = PREVPREV } }
		}
		476 = { NOT = { num_of_settlements = 4 } } #Achaia has a free slot
		NOT = { has_character_flag = no_land_to_herculeans }
	}

	weight_multiplier = {
		days = 1
	}
	
	option = {
		name = EVTOPTA_ancrel_2573
		d_herculean = {
			owner = {
				opinion = {
					modifier = opinion_granted_barony_to_holy_order
					who = ROOT
					years = 100
				 }
			}
		}
		piety = 100
		hidden_tooltip = {
			476 = { province_event = { id = ancrel.2574 days = 10 } } 
		}
		random = {
			chance = 50
			add_trait = zealous
		}
		random = {
			chance = 50
			add_trait = holy_warrior
		}
		random = {
			chance = 25
			add_trait = charitable
		}
	}
	
	option = {
		name = EVTOPTB_ancrel_2573
		set_character_flag = no_land_to_herculeans
		piety = -50
		remove_trait = zealous
	}
}

province_event = {
	id = ancrel.2574
	title = EVTNAME_ancrel_2574
	desc = EVTDESC_ancrel_2574
	
	picture = GFX_evt_roman_temple
	border = GFX_event_normal_frame_war
	
	is_triggered_only = yes
	
	immediate = {
		build_holding = {
			title = b_kalavryta
			type = castle
			holder = FROM
		}
		d_herculean = { 
			owner = { 
				b_kalavryta = { 
					set_name = "Olympus Mons" 
					gain_title = PREV
				}									
			} 
		}
	}
	
	option = {
		name = OK
	}
}

### HELLENIC CULT EVENTS

# Approached by the Cult of Orpheus
narrative_event = {
	id = ancrel.2575
	title = EVTNAME_ancrel_2580
	desc = EVTDESC_ancrel_2575
	picture = GFX_evt_roman_temple

	religion = roman_pagan
	min_age = 16
	capable_only = yes
	prisoner = no
	
	is_triggered_only = yes
	
	trigger = {
		is_adult = yes
		NOR = {
			trait = cult_of_orpheus
			trait = cult_of_cybele
			trait = cult_of_serapis
			trait = cult_of_despoina
			trait = cult_of_trophonius
			trait = mystery_mithras_corax
			trait = mystery_mithras_nymphus
			trait = mystery_mithras_miles
			trait = mystery_mithras_leo
			trait = mystery_mithras_perses
			trait = mystery_mithras_heliodromus
			trait = mystery_mithras_pater
		}
		OR = {
			is_female = no
			is_ruler = yes
			mother = { trait = cult_of_orpheus }
			father = { trait = cult_of_orpheus }
		}
		OR = {
			diplomacy = 8
			mother = { trait = cult_of_orpheus }
			father = { trait = cult_of_orpheus }
		}
		NOR = {
			is_inaccessible_trigger = yes
			has_character_flag = refused_orpheus
			has_character_flag = joined_hellenic_cult
		}
		is_not_busy_trigger = yes
	}
	
	weight_multiplier  = {
		days = 1
		modifier = {
			factor = 0.5
			NOT = { diplomacy = 8 }
		}
		modifier = {
			factor = 1.33
			diplomacy = 10
		}
		modifier = {
			factor = 1.33
			diplomacy = 12
		}
		modifier = {
			factor = 1.33
			diplomacy = 14
		}
	}
	
	immediate = {
		set_character_flag = joined_hellenic_cult
	}
	
	option = {
		name = EVTOPTA_ancrel_2575 #Joins
		add_trait = cult_of_orpheus
		narrative_event = { id = ancrel.2580 days = 3 tooltip = initiation_rites }
	}
	option = {
		name = EVTOPTB_ancrel_2575 #Refuses
		trigger = {
			ai = no
		}
		set_character_flag = refused_orpheus
		clr_character_flag = joined_hellenic_cult
	}
}

# Approached by the Cult of Cybele
narrative_event = {
	id = ancrel.2576
	title = EVTNAME_ancrel_2580
	desc = EVTDESC_ancrel_2576
	picture = GFX_evt_roman_temple

	religion = roman_pagan
	min_age = 16
	capable_only = yes
	prisoner = no
	
	is_triggered_only = yes
	
	trigger = {
		is_adult = yes
		NOR = {
			trait = cult_of_orpheus
			trait = cult_of_cybele
			trait = cult_of_serapis
			trait = cult_of_despoina
			trait = cult_of_trophonius
			trait = mystery_mithras_corax
			trait = mystery_mithras_nymphus
			trait = mystery_mithras_miles
			trait = mystery_mithras_leo
			trait = mystery_mithras_perses
			trait = mystery_mithras_heliodromus
			trait = mystery_mithras_pater
		}
		OR = {
			is_female = yes
			is_ruler = yes
			mother = { trait = cult_of_cybele }
			father = { trait = cult_of_cybele }
		}
		OR = {
			stewardship = 8
			mother = { trait = cult_of_cybele }
			father = { trait = cult_of_cybele }
		}
		NOR = {
			is_inaccessible_trigger = yes
			has_character_flag = refused_cybele
			has_character_flag = joined_hellenic_cult
		}
		is_not_busy_trigger = yes
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 0.5
			NOT = { stewardship = 8 }
		}
		modifier = {
			factor = 1.33
			stewardship = 10
		}
		modifier = {
			factor = 1.33
			stewardship = 12
		}
		modifier = {
			factor = 1.33
			stewardship = 14
		}
	}
	
	immediate = {
		set_character_flag = joined_hellenic_cult
	}
	
	option = {
		name = EVTOPTA_ancrel_2575 #Joins
		add_trait = cult_of_cybele
		narrative_event = { id = ancrel.2580 days = 3 tooltip = initiation_rites }
	}
	option = {
		name = EVTOPTB_ancrel_2575 #Refuses
		trigger = {
			ai = no
		}
		set_character_flag = refused_cybele
		clr_character_flag = joined_hellenic_cult
	}
}

# Approached by the Cult of Serapis
narrative_event = {
	id = ancrel.2577
	title = EVTNAME_ancrel_2580
	desc = EVTDESC_ancrel_2577
	picture = GFX_evt_roman_temple

	religion = roman_pagan
	min_age = 16
	capable_only = yes
	prisoner = no
	
	is_triggered_only = yes
	
	trigger = {
		is_adult = yes
		NOR = {
			trait = cult_of_orpheus
			trait = cult_of_cybele
			trait = cult_of_serapis
			trait = cult_of_despoina
			trait = cult_of_trophonius
			trait = mystery_mithras_corax
			trait = mystery_mithras_nymphus
			trait = mystery_mithras_miles
			trait = mystery_mithras_leo
			trait = mystery_mithras_perses
			trait = mystery_mithras_heliodromus
			trait = mystery_mithras_pater
		}
		OR = {
			is_female = no
			is_ruler = yes
			mother = { trait = cult_of_serapis }
			father = { trait = cult_of_serapis }
		}
		OR = {
			martial = 8
			mother = { trait = cult_of_serapis }
			father = { trait = cult_of_serapis }
		}
		NOR = {
			is_inaccessible_trigger = yes
			has_character_flag = refused_serapis
			has_character_flag = joined_hellenic_cult
		}
		is_not_busy_trigger = yes
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 0.5
			NOT = { martial = 8 }
		}
		modifier = {
			factor = 1.33
			martial = 10
		}
		modifier = {
			factor = 1.33
			martial = 12
		}
		modifier = {
			factor = 1.33
			martial = 14
		}
	}
	
	immediate = {
		set_character_flag = joined_hellenic_cult
	}
	
	option = {
		name = EVTOPTA_ancrel_2575 #Joins
		add_trait = cult_of_serapis
		narrative_event = { id = ancrel.2580 days = 3 tooltip = initiation_rites }
	}
	option = {
		name = EVTOPTB_ancrel_2575 #Refuses
		trigger = {
			ai = no
		}
		set_character_flag = refused_serapis
		clr_character_flag = joined_hellenic_cult
	}
}

# Approached by the Cult of Despoina
narrative_event = {
	id = ancrel.2578
	title = EVTNAME_ancrel_2580
	desc = EVTDESC_ancrel_2578
	picture = GFX_evt_roman_temple

	religion = roman_pagan
	min_age = 16
	capable_only = yes
	prisoner = no
	
	is_triggered_only = yes
	
	trigger = {
		is_adult = yes
		NOR = {
			trait = cult_of_orpheus
			trait = cult_of_cybele
			trait = cult_of_serapis
			trait = cult_of_despoina
			trait = cult_of_trophonius
			trait = mystery_mithras_corax
			trait = mystery_mithras_nymphus
			trait = mystery_mithras_miles
			trait = mystery_mithras_leo
			trait = mystery_mithras_perses
			trait = mystery_mithras_heliodromus
			trait = mystery_mithras_pater
		}
		OR = {
			is_female = yes
			is_ruler = yes
			mother = { trait = cult_of_despoina }
			father = { trait = cult_of_despoina }
		}
		OR = {
			intrigue = 8
			mother = { trait = cult_of_despoina }
			father = { trait = cult_of_despoina }
		}
		NOR = {
			is_inaccessible_trigger = yes
			has_character_flag = refused_despoina
			has_character_flag = joined_hellenic_cult
		}
		is_not_busy_trigger = yes
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 0.5
			NOT = { intrigue = 8 }
		}
		modifier = {
			factor = 1.33
			intrigue = 10
		}
		modifier = {
			factor = 1.33
			intrigue = 12
		}
		modifier = {
			factor = 1.33
			intrigue = 14
		}
	}
	
	immediate = {
		set_character_flag = joined_hellenic_cult
	}
	
	option = {
		name = EVTOPTA_ancrel_2575 #Joins
		add_trait = cult_of_despoina
		narrative_event = { id = ancrel.2580 days = 3 tooltip = initiation_rites }
	}
	option = {
		name = EVTOPTB_ancrel_2575 #Refuses
		trigger = {
			ai = no
		}
		set_character_flag = refused_despoina
		clr_character_flag = joined_hellenic_cult
	}
}

# Approached by the Cult of Trophonius
narrative_event = {
	id = ancrel.2579
	title = EVTNAME_ancrel_2580
	desc = EVTDESC_ancrel_2579
	picture = GFX_evt_roman_temple

	religion = roman_pagan
	min_age = 16
	capable_only = yes
	prisoner = no
	
	is_triggered_only = yes
	
	trigger = {
		is_adult = yes
		NOR = {
			trait = cult_of_orpheus
			trait = cult_of_cybele
			trait = cult_of_serapis
			trait = cult_of_despoina
			trait = cult_of_trophonius
			trait = mystery_mithras_corax
			trait = mystery_mithras_nymphus
			trait = mystery_mithras_miles
			trait = mystery_mithras_leo
			trait = mystery_mithras_perses
			trait = mystery_mithras_heliodromus
			trait = mystery_mithras_pater
		}
		OR = {
			is_female = no
			is_ruler = yes
			mother = { trait = cult_of_trophonius }
			father = { trait = cult_of_trophonius }
		}
		OR = {
			learning = 8
			mother = { trait = cult_of_trophonius }
			father = { trait = cult_of_trophonius }
		}
		NOR = {
			is_inaccessible_trigger = yes
			has_character_flag = refused_trophonius
			has_character_flag = joined_hellenic_cult
		}
		is_not_busy_trigger = yes
	}
	
	weight_multiplier = {
		days = 1
		modifier = {
			factor = 0.5
			NOT = { learning = 8 }
		}
		modifier = {
			factor = 1.33
			learning = 10
		}
		modifier = {
			factor = 1.33
			learning = 12
		}
		modifier = {
			factor = 1.33
			learning = 14
		}
	}
	
	immediate = {
		set_character_flag = joined_hellenic_cult
	}
	
	option = {
		name = EVTOPTA_ancrel_2575 #Joins
		add_trait = cult_of_trophonius
		narrative_event = { id = ancrel.2580 days = 3 tooltip = initiation_rites }
	}
	option = {
		name = EVTOPTB_ancrel_2575 #Refuses
		trigger = {
			ai = no
		}
		set_character_flag = refused_trophonius
		clr_character_flag = joined_hellenic_cult
	}
}

# Initiation event into the cult (players only)
narrative_event = {
	id = ancrel.2580
	title = EVTNAME_ancrel_2580
	desc = EVTDESC_ancrel_2580
	picture = GFX_evt_roman_temple
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		piety = 25
		hidden_tooltip = {
			add_character_modifier = {
				name = recent_mithras_promotion
				duration = 365
				hidden = yes
			}
		}
	}
}

# Character is approached by the Mithraic Mysteries
narrative_event = {
	id = ancrel.2581
	title = EVTNAME_ancrel_2581
	desc = EVTDESC_ancrel_2581
	picture = GFX_evt_cult_initiation

	religion = hellenic_pagan	
	min_age = 16
	capable_only = yes
	prisoner = no
	
	is_triggered_only = yes
	
	trigger = {
		is_adult = yes
		is_title_active = d_pontifex_maximus
		OR = {
			is_female = no
			is_ruler = yes
			mother = {
				OR = {
					trait = mystery_mithras_miles
					trait = mystery_mithras_heliodromus
					trait = mystery_mithras_pater
				}
			}
			father = {
				OR = {
					trait = mystery_mithras_miles
					trait = mystery_mithras_heliodromus
					trait = mystery_mithras_pater
				}
			}
		}
		OR = {
			trait = cult_of_orpheus
			trait = cult_of_cybele
			trait = cult_of_serapis
			trait = cult_of_despoina
			trait = cult_of_trophonius
			mother = {
				OR = {
					trait = mystery_mithras_leo
					trait = mystery_mithras_perses
					trait = mystery_mithras_miles
					trait = mystery_mithras_heliodromus
					trait = mystery_mithras_pater
				}
			}
			father = {
				OR = {
					trait = mystery_mithras_leo
					trait = mystery_mithras_perses
					trait = mystery_mithras_miles
					trait = mystery_mithras_heliodromus
					trait = mystery_mithras_pater
				}
			}
		}
		OR = {
			diplomacy = 12
			stewardship = 12
			martial = 12
			intrigue = 12
			learning = 12
			mother = {
				OR = {
					trait = mystery_mithras_leo
					trait = mystery_mithras_perses
					trait = mystery_mithras_miles
					trait = mystery_mithras_heliodromus
					trait = mystery_mithras_pater
				}
			}
			father = {
				OR = {
					trait = mystery_mithras_leo
					trait = mystery_mithras_perses
					trait = mystery_mithras_miles
					trait = mystery_mithras_heliodromus
					trait = mystery_mithras_pater
				}
			}
		}
		NOR = {
			is_inaccessible_trigger = yes
			trait = wounded
			is_maimed_trigger = yes
			trait = inbred
			is_dumb_trigger = yes
			is_weak_trigger = yes
			has_character_flag = approached_by_mithras
			has_character_modifier = recent_mithras_promotion
		}
	}
	
	immediate = {
		set_character_flag = approached_by_mithras
	}
	
	option = {
		name = EVTOPTA_ancrel_2581
		narrative_event = { id = ancrel.2582 tooltip = what_happens_now }
	}
}

# Mithraic Mysteries initiation ceremony (also, chance to decline joining)
narrative_event = {
	id = ancrel.2582
	title = EVTNAME_ancrel_2581
	desc = EVTDESC_ancrel_2582
	picture = GFX_evt_cult_initiation
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ancrel_2582 #accept
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				trait = craven
			}
			modifier = {
				factor = 0.5
				trait = paranoid
			}
			modifier = {
				factor = 0.5
				trait = cynical
			}
		}
		add_trait = mystery_mithras_corax
		if = {
			limit = {
				trait = cult_of_orpheus
			}
			remove_trait = cult_of_orpheus
		}
		if = {
			limit = {
				trait = cult_of_cybele
			}
			remove_trait = cult_of_cybele
		}
		if = {
			limit = {
				trait = cult_of_trophonius
			}
		}
		if = {
			limit = {
				trait = cult_of_serapis
			}
			remove_trait = cult_of_serapis
		}
		if = {
			limit = {
				trait = cult_of_despoina
			}
			remove_trait = cult_of_despoina
		}
		hidden_tooltip = {
			add_character_modifier = {
				name = recent_mithras_promotion
				duration = 1825
				hidden = yes
			}
		}
	}
	option = {
		name = EVTOPTB_ancrel_2582 #run away!
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				NOR = {
					trait = craven
					trait = paranoid
					trait = cynical
				}
			}
		}
		random_list = {
			65 = {
				custom_tooltip = { text = get_away }
			}
			30 = {
				add_trait = wounded
			}
			5 = {
				add_maimed_trait_effect = yes
			}
		}
	}
}

# Mithraic Mysteries promotion
narrative_event = {
	id = ancrel.2583
	title = EVTNAME_ancrel_2581
	desc = EVTDESC_ancrel_2583
	picture = GFX_evt_cult_initiation
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_ancrel_2583 #approved
		trigger = {
			OR = {
				AND = {
					trait = mystery_mithras_corax
					OR = {
						prestige = 100
						piety = 100
					}
				}
				AND = {
					trait = mystery_mithras_nymphus
					OR = {
						prestige = 200
						piety = 200
					}
				}
				AND = {
					trait = mystery_mithras_miles
					OR = {
						prestige = 300
						piety = 300
					}
				}
				AND = {
					trait = mystery_mithras_leo
					OR = {
						prestige = 400
						piety = 400
					}
				}
				AND = {
					trait = mystery_mithras_perses
					OR = {
						prestige = 500
						piety = 500
					}
				}
				AND = {
					trait = mystery_mithras_heliodromus
					OR = {
						prestige = 600
						piety = 600
					}
				}
			}
		}
		if = {
			limit = {
				trait = mystery_mithras_heliodromus
			}
			remove_trait = mystery_mithras_heliodromus
			add_trait = mystery_mithras_pater
		}
		if = {
			limit = {
				trait = mystery_mithras_perses
			}
			remove_trait = mystery_mithras_perses
			add_trait = mystery_mithras_heliodromus
		}
		if = {
			limit = {
				trait = mystery_mithras_leo
			}
			remove_trait = mystery_mithras_leo
			add_trait = mystery_mithras_perses
		}
		if = {
			limit = {
				trait = mystery_mithras_miles
			}
			remove_trait = mystery_mithras_miles
			add_trait = mystery_mithras_leo
		}
		if = {
			limit = {
				trait = mystery_mithras_nymphus
			}
			remove_trait = mystery_mithras_nymphus
			add_trait = mystery_mithras_leo
		}
		if = {
			limit = {
				trait = mystery_mithras_corax
			}
			remove_trait = mystery_mithras_corax
			add_trait = mystery_mithras_nymphus
		}
	}
	option = {
		name = EVTOPTB_ancrel_2583 #denied
		trigger = {
			NOR = {
				AND = {
					trait = mystery_mithras_corax
					OR = {
						prestige = 100
						piety = 100
					}
				}
				AND = {
					trait = mystery_mithras_nymphus
					OR = {
						prestige = 200
						piety = 200
					}
				}
				AND = {
					trait = mystery_mithras_miles
					OR = {
						prestige = 300
						piety = 300
					}
				}
				AND = {
					trait = mystery_mithras_leo
					OR = {
						prestige = 400
						piety = 400
					}
				}
				AND = {
					trait = mystery_mithras_perses
					OR = {
						prestige = 500
						piety = 500
					}
				}
				AND = {
					trait = mystery_mithras_heliodromus
					OR = {
						prestige = 600
						piety = 600
					}
				}
			}
		}
	}
}

