# DEI GRATIA (DAVID)

###########################
# Curia Controller Events #
###########################

#Event ID range: 55 Christianity + 1 Catholic + 5 Curia + xx

#%% remove this line for MEIOU compatibility
#%$ add this line for MEIOU compatibility (remove comment)
#MEIOU compatible: religions, cultures, governments

#01 - Death of the Pope
#02 (55150) - Right of Exclusion
#03 - Deadlocked Conclave
#04 - Habemus Papam! (bought election)
#05 - Habemus Papam! (fair election)
#06 - Conclave Reform
#07 - Conclave Reforms Abrogated
#08 - Papal Reforms Falter
#09 - A case comes before the papal court
#10 - The pope withholds his blessings from $PROVINCENAME$
#11 - Conciliarism and Papism (secular or corrupt pope)
#12 - Conciliarism and Papism (reformer pope)
#13 - The Sale of Indulgences
#14 - Threat of Schism (reformer popes)
#15 - Threat of Schism (corrupt popes)
#16 - Calls for church council (reformer popes)
#17 - Calls for church council (corrupt popes)
#18 - Church Reform of Simony
#19 - Church Reform of Indulgence Selling
#20 - Church Reform of Benefices
#21 - Church Reform of Clerical Instruction
#22 - Church Reform of Pluralism
#23 - Church Reform of Nepotism
#24 - The Treaty of $PROVINCENAME$
#25 - Sublimis Dei
#26 - The triumph of the pope
#27 - A charge of heresy
#28 - Index of Forbidden Books
#29 - Founding of the Jesuits
#30 - The pope grants us title to the New World (notifier)
#31 - The Threat of the Reformation
#32 - Church council proposed
#33 - Fate of the Catholic Church (The Vernacular)
#34 - Fate of the Catholic Church (The Host)
#35 - Fate of the Catholic Church (Scripture and Tradition)
#36 - Fate of the Catholic Church (Faith and Good Works)
#37 - The Counter-Reformation
#38 - The Catholic Reformation
#39 - The Infidel Threat (crusade)
#40 - A Change in Policy
#41 - The Age of Reason
#42 - Decline of the Papacy
#43 - General Council Begins
#44 - Church council ends
#45 - Independence of the Vatican
#46 - Church council postponed
#47 - Church council threatened
#48 - Notifier of Conclave
#49 - Notifier of New Pope (Corrupt)
#50 - Notifier of New Pope (Worldly)
#51 - Notifier of New Pope (Pious)
#52 - Healing the Schism (secular veto conceded)
#53 - Healing the Schism (regular councils promised)
#54 - Lollardy (condemning Lollardy)
#55 - Healing the Schism (church council called)
#56 - Uniting the Church
#57 - Crusade against the Hussites
#58 - Compromise with Heresy
#59 - Subjugation of the Hussite Heresy (notifier)
#60 - Papal Ingratitude
#61 - The Gratitude of the Pope
#62 - A case comes before the papal court (consanguinity)
#63 - Consanguinity
#64 - A case comes before the papal court (grievance)
#65 - Unfinished Business

country_event = { #Death of the Pope

id = 551501

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { 
		OR = {
			has_country_flag = secular_pope
			has_country_flag = reformer_pope
			has_country_flag = corrupt_pope
			}
		}
	}

mean_time_to_happen = {

	months = 84 #84 Average length of papal reign is a mere 7 years - EU3 monarch lifespans do not model popes well

	modifier = { 
		PAP = { has_country_flag = reformer_pope } 
		factor = 0.8 #Reformer popes had a habit of dying young - some due to poison
		}
	modifier = { 
		PAP = { has_country_flag = pope_executed }
		factor = 0.01
		}
	modifier = { 
		PAP = { has_country_flag = independent_pope }
		factor = 0.8 #Reformer popes had a habit of dying young - some due to poison
		}
	}

title = "EVTNAME551501"
desc = "EVTDESC551501"

option = {
	name = "EVTOPTA551501" #The church calls a conclave
	ai_chance = { factor = 100 }
	PAP = { 
		relation = { who = THIS value = -100 }
		define_ruler = { 
			name = " " 
			regency = yes
			female = no 
			DIP = 4
			MIL = 4 
			ADM = 4 
			}		
		}
	any_owned = { 
		limit = { has_province_modifier = papal_sponsor }
		remove_province_modifier = papal_sponsor 
		}
	any_country = {
		limit = { 
			NOT = { capital_scope = { owned_by = THIS } }
			NOT = { ai = yes }
			religion = catholic
			has_country_flag = religious_news_trivial
			}
		country_event = 551548 #Death of the Pope
		}
	any_country = {
		limit = { 
			NOT = { capital_scope = { owned_by = THIS } }
			NOT = { ai = yes }
			NOT = { religion = catholic }
			religion_group = christian
			any_neighbor_country = { religion = catholic }
			has_country_flag = religious_news_all
			}
		country_event = 551548 #Death of the Pope
		}
	any_country = { 
		limit = { has_country_flag = royal_scandal }
		random = { 
			chance = 10 
			relation = { who = THIS value = 5 }
			clr_country_flag = dispensation_denied
			clr_country_flag = dispensation_granted
			clr_country_flag = royal_scandal
			clr_country_flag = dispensation_bribe
			clr_country_flag = dispensation_encouraged
			clr_country_flag = dispensation_discouraged
			PAP = { clr_country_flag = dispensation_requested }
			PA2 = { clr_country_flag = dispensation_requested }
			}
		}
	PAP = { 
		clr_country_flag = secular_pope
		clr_country_flag = reformer_pope
		clr_country_flag = corrupt_pope
		clr_country_flag = right_of_exclusion
		clr_country_flag = deadlocked_conclave
		clr_country_flag = response_to_synod
		clr_country_flag = canonization
		clr_country_flag = peasant_success
		clr_country_flag = chialism
		clr_country_flag = just_war
		clr_country_flag = pope_executed
		clr_country_flag = concordat_offered
		set_country_flag = death_of_pope
		clr_country_flag = papal_gratitude
		}
	any_country = {
		limit = { has_country_flag = papal_bastard }
		country_event = 551620
		}
	#Invisible maintenance follows
	clr_country_flag = curia_controller
	clr_country_flag = synod_refused
	clr_country_flag = chialism
	clr_country_flag = crusade_denied
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = curia_controller
			}
		clr_country_flag = curia_controller
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_denied
			NOT = { has_country_flag = hussite_crusade }
			}
		clr_country_flag = crusade_denied
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			tag = PA2
			}
		clr_country_flag = chialism
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = synod_refused
			}
		clr_country_flag = synod_refused
		}
	any_country = { 
		limit = { 
			OR = { 
				has_country_flag = crusade_sponsor
				has_country_flag = hussite_crusade
				}
			NOT = { has_country_modifier = morale_boost }
			}
		country_event = 55180
		PAP = { 
			clr_country_flag = crusade_called
			clr_country_flag = hussite_crusade_called
			}
		}
	random_country = {
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			NOT = { REB = { has_country_flag = orthodox_setup } }
			}
		REB = { set_country_flag = orthodox_setup }
		377 = { #Antioch (Orthodox)
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		382 = { #Antioch (Oriental Orthodox)
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		379 = { #Judea
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		358 = { #Alexandria
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		151 = { #Constantinople
			set_province_flag = patriarchate
			set_province_flag = cenobitic_order
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		295 = { #Moscow
			set_province_flag = metropolitan
			set_province_flag = cenobitic_order
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		280 = { #Kiev
			set_province_flag = metropolitan
			set_province_flag = cenobitic_order
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		TUR = { set_country_flag = captive_patriarch }
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = death_of_pope
			}
		clr_country_flag = death_of_pope
		}
	random_owned = { #Resets excommunications in case the last reactor country was annexed before they received the event
		limit = { 
			owner = { NOT = { has_country_flag = excommunication_reaction_1 } }
			owner = { NOT = { any_known_country = { has_country_flag = excommunication_reaction_1 } } }
			}
		owner = { 
			any_country = { 
				limit = { has_country_flag = excommunication_reaction_1 }
				clr_country_flag = excommunication_reaction_1
				}
			any_country = { 
				limit = { has_country_flag = excommunication_target_1 }
				clr_country_flag = excommunication_target_1
				}
			clr_global_flag = excommunication_1
			}
		}
	random_owned = { 
		limit = { 
			owner = { NOT = { has_country_flag = excommunication_reaction_2 } }
			owner = { NOT = { any_known_country = { has_country_flag = excommunication_reaction_2 } } }
			}
		owner = { 
			any_country = { 
				limit = { has_country_flag = excommunication_reaction_2 }
				clr_country_flag = excommunication_reaction_2
				}
			any_country = { 
				limit = { has_country_flag = excommunication_target_2 }
				clr_country_flag = excommunication_target_2
				}
			clr_global_flag = excommunication_2
			}
		}
	}
}

country_event = { #Right of Exclusion

id = 55150

is_triggered_only = yes #by decision

title = "EVTNAME551502"
desc = "EVTDESC551502"

option = { 
	name = "EVTOPTA551502" #Our candidate has been vetoed
	ai_chance = { factor = 100 }
	PAP = { 
		set_country_flag = right_of_exclusion 
		define_ruler = { 
			name = "" 
			regency = yes
			female = no 
			DIP = 3
			MIL = 3 
			ADM = 3
			}		
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	relation = { who = FROM value = -10 }
	prestige = -0.01
	}
}

country_event = { #Deadlocked Conclave - slows down elections

id = 551503

trigger = { 
	is_papal_controller = yes
	is_emperor = no
	NOT = { PAP = { has_country_flag = secular_pope } } 
	NOT = { PAP = { has_country_flag = reformer_pope } } 
	NOT = { PAP = { has_country_flag = corrupt_pope } } 
	NOT = { PAP = { has_country_flag = deadlocked_conclave } } 
	}

mean_time_to_happen = {

	months = 12 #Happened reasonably often

	modifier = { 
		PAP = { has_country_flag = conclave_reform } 
		factor = 2
		}
	}

title = "EVTNAME551503"
desc = "EVTDESC551503"

option = { 
	name = "EVTOPTA551503" #Wait it out
	ai_chance = { factor = 50 }
	PAP = { 
		set_country_flag = deadlocked_conclave 
		define_ruler = { 
			name = "" 
			regency = yes
			female = no 
			DIP = 3
			MIL = 3 
			ADM = 3 
			}		
		relation = { who = THIS value = 5 }
		stability = -1
		}
	}
option = { 
	name = "EVTOPTB551503" #Force them to choose
	ai_chance = { factor = 50 }
	prestige = -0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	PAP = { relation = { who = THIS value = -10 } }
	}
}

country_event = { #Papal Conclave (Bought election)

id = 551504

trigger = {
	is_papal_controller = yes
	NOT = { PAP = { has_country_flag = secular_pope } } 
	NOT = { PAP = { has_country_flag = reformer_pope } } 
	NOT = { PAP = { has_country_flag = corrupt_pope } } 
	}

mean_time_to_happen = {

	months = 6 #Could take as long as three years, but usually fast

	modifier = {
		NOT = { badboy = 0.1 }
		factor = 1.2
		}
	modifier = {
		NOT = { badboy = 0.05 }
		factor = 1.2
		}
	modifier = {
		NOT = { badboy = 0.25 }
		factor = 1.2
		}
	modifier = { 
		AND = { 
			NOT = { exists = PAP } 
			NOT = { owns = 118 } 
			}
		factor = 1.5 #The pope is railing against the Captivity
		}
	modifier = {
		theologian = 1
		factor = 1.2
		}
	modifier = {
		theologian = 3
		factor = 1.2
		}
	modifier = {
		theologian = 5
		factor = 1.2
		}
	modifier = {
		idea = divine_supremacy
		factor = 1.4
		}
	modifier = {
		idea = deus_vult
		factor = 1.1
		}
	modifier = {
		idea = church_attendance_duty
		factor = 1.1
		}
	modifier = { 
		PAP = { has_country_flag = reaction_to_reformation } 
		factor = 1.5
		}
	modifier = { 
		PAP = { has_country_flag = church_council } 
		factor = 2
		}
	modifier = {
		PAP = { has_country_flag = conclave_reform }
		factor = 0.5
		}
	modifier = {
		PAP = { has_country_flag = right_of_exclusion }
		factor = 1.5
		}
	modifier = { 
		PAP = { has_country_flag = deadlocked_conclave } 
		factor = 1.5
		}
	modifier = {
		PAP = { has_country_flag = last_pope_corrupt }
		factor = 1.25 #'After a fat pope, a thin one'
		}
	}

title = "EVTNAME551504"
desc = "EVTDESC551504"

option = {
	name = "EVTOPTA551504" #Secular pope
	ai_chance = { factor = 50 }
	set_country_flag = curia_controller
	prestige = +0.01
	diplomats = 1
	any_country = { 
		limit = { has_country_flag = right_of_exclusion }
		clr_country_flag = right_of_exclusion
		}
	any_country = {
		limit = { 
			tag = PAP 
			num_of_cities = 1
			relation = { who = THIS value = 0 }
			NOT = { war_with = THIS }
			NOT = { capital_scope = { owned_by = THIS } }
			}
		create_alliance = THIS
		}
	relation = { who = PAP value = 100 }
	capital_scope = { 
		add_province_modifier = { 
			name = "papal_sponsor"
			duration = 18250
			}
		}
	random_owned = {
		limit = { owner = { tag = PAP } }
		owner = { kill_ruler = THIS }
		}
	set_country_flag = conclave_over
	random_owned = { 
		limit = { owner = { NOT = { tag = PAP } } }
		PAP = { country_event = 551550 set_country_flag = conclave_over }
		}
	#Invisible Effects on other countries
	random_country = { 
		limit = { 
			tag = PA2
			PAP = { has_country_flag = conclave_over }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			ai = yes
			}
		relation = { who = PAP value = -50 }
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			NOT = { ai = yes }
			religion = catholic
			has_country_flag = religious_news_trivial
			}
		country_event = 551550
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			NOT = { ai = yes }
			NOT = { religion = catholic }
			religion_group = christian
			any_neighbor_country = { religion = catholic }
			has_country_flag = religious_news_all
			}
		country_event = 551550
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			relation = { who = THIS value = -50 } 
			has_country_flag = enemy_of_pope
			}
		clr_country_flag = enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			num_of_cities = 1
			NOT = { relation = { who = THIS value = -50 } } 
			NOT = { has_country_flag = enemy_of_pope } 
			has_country_flag = enemy_of_pope
			}
		set_country_flag = enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			relation = { who = THIS value = -150 }
			has_country_flag = hated_enemy_of_pope
			}
		clr_country_flag = hated_enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			NOT = { relation = { who = THIS value = -150 } } 
			NOT = { has_country_flag = hated_enemy_of_pope }
			}
		set_country_flag = hated_enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = dispensation_denied 
			relation = { who = THIS value = -150 }
			}
		clr_country_flag = dispensation_denied
		}
	random_owned = { 
		limit = { owner = { tag = PAP } }
		owner = { 
			clr_country_flag = conclave_over
			clr_country_flag = last_pope_reformer
			set_country_flag = last_pope_corrupt
			set_country_flag = secular_pope
			clr_country_flag = reformer_pope
			clr_country_flag = corrupt_pope
			clr_country_flag = antipope_risen
			clr_country_flag = independent_pope
			}
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = conclave_over
			}
		PAP = { 
			clr_country_flag = conclave_over
			clr_country_flag = last_pope_reformer
			clr_country_flag = last_pope_corrupt
			set_country_flag = secular_pope
			clr_country_flag = reformer_pope
			clr_country_flag = corrupt_pope
			clr_country_flag = antipope_risen
			clr_country_flag = independent_pope
			}
		}
 	}
option = {
	name = "EVTOPTB551504" #Corrupt pope
	ai_chance = { factor = 50 }
	set_country_flag = curia_controller
	any_country = { 
		limit = { has_country_flag = right_of_exclusion }
		clr_country_flag = right_of_exclusion
		}
	any_country = {
		limit = { 
			tag = PAP 
			num_of_cities = 1
			relation = { who = THIS value = 100 }
			NOT = { war_with = THIS }
			NOT = { capital_scope = { owned_by = THIS } }
			}
		create_alliance = THIS
		}
	relation = { who = PAP value = 200 }
	capital_scope = { 
		add_province_modifier = { 
			name = "papal_sponsor"
			duration = 18250
			}
		}
	random_owned = {
		limit = { owner = { tag = PAP } }
		owner = { kill_ruler = THIS }
		}
	set_country_flag = conclave_over
	random_owned = { 
		limit = { owner = { NOT = { tag = PAP } } }
		PAP = { country_event = 551549 set_country_flag = conclave_over }
		}
	#Invisible effects on other countries	
	random_country = { 
		limit = { 
			tag = PA2
			PAP = { has_country_flag = conclave_over }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			ai = yes
			}
		relation = { who = PAP value = -100 }
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			religion = catholic
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			NOT = { ai = yes }
			has_country_flag = religious_news_trivial
			}
		country_event = 551549
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			NOT = { religion = catholic }
			religion_group = christian
			any_neighbor_country = { religion = catholic }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			NOT = { ai = yes }
			has_country_flag = religious_news_all
			}
		country_event = 551549
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			relation = { who = THIS value = 50 } 
			has_country_flag = enemy_of_pope
			}
		clr_country_flag = enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			num_of_cities = 1
			NOT = { relation = { who = THIS value = 50 } } 
			NOT = { has_country_flag = enemy_of_pope } 
			has_country_flag = enemy_of_pope
			}
		set_country_flag = enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			relation = { who = THIS value = -50 }
			has_country_flag = hated_enemy_of_pope
			}
		clr_country_flag = hated_enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			NOT = { relation = { who = THIS value = -50 } } 
			NOT = { has_country_flag = hated_enemy_of_pope }
			}
		set_country_flag = hated_enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = dispensation_denied 
			relation = { who = THIS value = -50 }
			}
		clr_country_flag = dispensation_denied
		}
	random_owned = { 
		limit = { owner = { tag = PAP } }
		owner = { 
			clr_country_flag = conclave_over
			clr_country_flag = last_pope_reformer
			set_country_flag = last_pope_corrupt
			clr_country_flag = secular_pope
			clr_country_flag = reformer_pope
			set_country_flag = corrupt_pope
			clr_country_flag = antipope_risen
			clr_country_flag = independent_pope
			}
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = conclave_over
			}
		PAP = { 
			clr_country_flag = conclave_over
			clr_country_flag = last_pope_reformer
			set_country_flag = last_pope_corrupt
			clr_country_flag = secular_pope
			clr_country_flag = reformer_pope
			set_country_flag = corrupt_pope
			clr_country_flag = antipope_risen
			clr_country_flag = independent_pope
			}
		}
	}
}

country_event = { #Papal Conclave (Fair election)

id = 551505

trigger = {
	is_papal_controller = yes
	NOT = { PAP = { has_country_flag = secular_pope } } 
	NOT = { PAP = { has_country_flag = reformer_pope } } 
	NOT = { PAP = { has_country_flag = corrupt_pope } } 
	}

mean_time_to_happen = {

	months = 6

	modifier = { 
		badboy = 0.5 #50% of maximum
		factor = 1.2
		}
	modifier = { 
		badboy = 1 #100% of maximum
		factor = 1.2
		}
	modifier = { 
		badboy = 1.5 #150% of maximum
		factor = 1.2
		}
	modifier = {
		owns = 118 #Roma
		factor = 2.0 #The pope is a puppet
		}	
	modifier = {
		spymaster = 1
		factor = 1.2
		}
	modifier = {
		idea = espionage
		factor = 1.2
		}
	modifier = {
		idea = patron_of_art
		factor = 1.05
		}
	modifier = {
		idea = humanist_tolerance
		factor = 1.05
		}
	modifier = {
		PAP = { has_country_flag = conclave_reform }
		factor = 0.5
		}
	modifier = {
		PAP = { has_country_flag = right_of_exclusion }
		factor = 1.5
		}
	modifier = {
		PAP = { has_country_flag = church_council }
		factor = 1.5
		}
	modifier = { 
		PAP = { has_country_flag = deadlocked_conclave } 
		factor = 1.5
		}
	modifier = {
		PAP = { has_country_flag = last_pope_reformer }
		factor = 1.25 #'After a fat pope, a thin one'
		}
	}

title = "EVTNAME551504" #Same
desc = "EVTDESC551505"

option = {
	name = "EVTOPTA551505" #The new pope is a capable man (Secular pope)
	ai_chance = { factor = 50 }
	set_country_flag = curia_controller
	prestige = +0.01
	diplomats = 1
	any_country = { 
		limit = { has_country_flag = right_of_exclusion }
		clr_country_flag = right_of_exclusion
		}
	any_country = {
		limit = { 
			tag = PAP 
			num_of_cities = 1
			relation = { who = THIS value = 0 }
			NOT = { war_with = THIS }
			NOT = { capital_scope = { owned_by = THIS } }
			}
		create_alliance = THIS
		}
	relation = { who = PAP value = 100 }
	capital_scope = { 
		add_province_modifier = { 
			name = "papal_sponsor"
			duration = 18250
			}
		}
	random_owned = {
		limit = { owner = { tag = PAP } }
		owner = { kill_ruler = THIS }
		}
	set_country_flag = conclave_over
	random_owned = { 
		limit = { owner = { NOT = { tag = PAP } } }
		PAP = { country_event = 551550 set_country_flag = conclave_over }
		}
	#Invisible effects on other countries	
	random_country = { 
		limit = { 
			tag = PA2
			PAP = { has_country_flag = conclave_over }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			ai = yes
			}
		relation = { who = PAP value = -50 }
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			religion = catholic
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			NOT = { ai = yes }
			has_country_flag = religious_news_trivial
			}
		country_event = 551550
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			NOT = { religion = catholic }
			religion_group = christian
			any_neighbor_country = { religion = catholic }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			NOT = { ai = yes }
			has_country_flag = religious_news_all
			}
		country_event = 551550
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			relation = { who = THIS value = -50 } 
			has_country_flag = enemy_of_pope
			}
		clr_country_flag = enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			num_of_cities = 1
			NOT = { relation = { who = THIS value = -50 } } 
			NOT = { has_country_flag = enemy_of_pope } 
			has_country_flag = enemy_of_pope
			}
		set_country_flag = enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			relation = { who = THIS value = -150 }
			has_country_flag = hated_enemy_of_pope
			}
		clr_country_flag = hated_enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			NOT = { relation = { who = THIS value = -150 } } 
			NOT = { has_country_flag = hated_enemy_of_pope }
			}
		set_country_flag = hated_enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = dispensation_denied 
			relation = { who = THIS value = -150 }
			}
		clr_country_flag = dispensation_denied
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = conclave_over
			}
		PAP = {
			clr_country_flag = conclave_over
			clr_country_flag = last_pope_reformer
			clr_country_flag = last_pope_corrupt
			set_country_flag = secular_pope
			clr_country_flag = reformer_pope
			clr_country_flag = corrupt_pope
			clr_country_flag = antipope_risen
			clr_country_flag = independent_pope
			}
		}
	random_owned = { 
		limit = { owner = { tag = PAP } }
		owner = { 
			clr_country_flag = conclave_over
			clr_country_flag = last_pope_reformer
			clr_country_flag = last_pope_corrupt
			set_country_flag = secular_pope
			clr_country_flag = reformer_pope
			clr_country_flag = corrupt_pope
			clr_country_flag = antipope_risen
			clr_country_flag = independent_pope
			}
		}
	}
option = {
	name = "EVTOPTB551505" #The new pope is a pious man (Reformer pope)
	ai_chance = { factor = 50 }
	set_country_flag = curia_controller
	prestige = +0.01
	any_country = { 
		limit = { has_country_flag = right_of_exclusion }
		clr_country_flag = right_of_exclusion
		}
	any_country = {
		limit = { 
			tag = PAP 
			num_of_cities = 1
			relation = { who = THIS value = 50 }
			NOT = { war_with = THIS }
			NOT = { capital_scope = { owned_by = THIS } }
			}
		create_alliance = THIS
		}
	relation = { who = PAP value = 50 }
	capital_scope = { 
		add_province_modifier = { 
			name = "papal_sponsor"
			duration = 18250
			}
		}
	random_owned = {
		limit = { owner = { tag = PAP } }
		owner = { kill_ruler = THIS }
		}
	set_country_flag = conclave_over
	random_owned = { 
		limit = { owner = { NOT = { tag = PAP } } }
		PAP = { country_event = 551551 set_country_flag = conclave_over }
		}
	#Invisible effects on other countries
	random_country = { 
		limit = { 
			tag = PA2
			PAP = { has_country_flag = conclave_over }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			ai = yes
			}
		relation = { who = PAP value = -25 }
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			religion = catholic
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			NOT = { ai = yes }
			has_country_flag = religious_news_trivial
			}
		country_event = 551551
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			NOT = { religion = catholic }
			religion_group = christian
			any_neighbor_country = { religion = catholic }
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			NOT = { ai = yes }
			has_country_flag = religious_news_all
			}
		country_event = 551551
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			relation = { who = THIS value = -150 } 
			has_country_flag = enemy_of_pope
			}
		clr_country_flag = enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = hated_enemy_of_pope
			}
		clr_country_flag = hated_enemy_of_pope
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = dispensation_denied 
			}
		clr_country_flag = dispensation_denied
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = conclave_over }
			has_country_flag = conclave_over
			}
		PAP = { 
			clr_country_flag = conclave_over
			set_country_flag = last_pope_reformer
			clr_country_flag = last_pope_corrupt
			clr_country_flag = secular_pope
			set_country_flag = reformer_pope
			clr_country_flag = corrupt_pope
			clr_country_flag = antipope_risen
			clr_country_flag = independent_pope
			}
		}
	random_owned = { 
		limit = { owner = { tag = PAP } }
		owner = { 
			clr_country_flag = conclave_over
			set_country_flag = last_pope_reformer
			clr_country_flag = last_pope_corrupt
			clr_country_flag = secular_pope
			set_country_flag = reformer_pope
			clr_country_flag = corrupt_pope
			clr_country_flag = antipope_risen
			clr_country_flag = independent_pope
			}
		}
	}
}

country_event = { #Conclave Reform - faster elections

id = 551506

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { PAP = { has_country_flag = conclave_reform } } 
	OR = { 
		PAP = { has_country_flag = reformer_pope }
		PAP = { has_country_flag = papal_conciliarism }
		}
	}

mean_time_to_happen = { 

	months = 900 

	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.5
		}
	}

title = "EVTNAME551506"
desc = "EVTDESC551506"

option = { 
	name = "EVTOPTA551506" #Introduce stringent rules
	ai_chance = { factor = 50 } 
	prestige = +0.01
	PAP = { 
		set_country_flag = conclave_reform
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	PA2 = { set_country_flag = conclave_reform }
	}
option = {
	name = "EVTOPTB551506" #Introduce minor changes
	ai_chance = { factor = 50 }
	prestige = +0.01
	}
}

country_event = { #Conclave Reforms Abrogated

id = 551507

trigger = {
	PAP = { has_country_flag = corrupt_pope }
	PAP = { has_country_flag = conclave_reform }
	NOT = { PAP = { has_country_flag = papal_conciliarism } }
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	}

mean_time_to_happen = { months = 250 }

title = "EVTNAME551507"
desc = "EVTDESC551507"

option = { 
	name = "EVTOPTA551507" #The Curia has gained the upper hand
	prestige = -0.01
	PAP = { 
		clr_country_flag = conclave_reform
		stability = 1
		}
	}
}

country_event = { #Papal reform falters

id = 551508

trigger = {
	PAP = { has_country_flag = reformer_pope }
	NOT = { PAP = { has_country_flag = papal_conciliarism } }
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	}

mean_time_to_happen = { months = 336 }

title = "EVTNAME551508"
desc = "EVTDESC551508"

option = {
	name = "EVTOPTA551508" #Reform will have to wait
	ai_chance = { factor = 50 } 
	prestige = -0.01
	PAP = { 
		clr_country_flag = reformer_pope 
		set_country_flag = secular_pope
		}
	}
option = {
	name = "EVTOPTB551508" #Support the reforms of the church
	ai_chance = { factor = 50 }
	prestige = 0.01
	treasury = -50
	}
}

country_event = { #A case comes before the papal court (ally)

id = 551509

trigger = {
	PAP = { has_country_flag = dispensation_requested }
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	OR = { 
		PAP = { has_country_flag = corrupt_pope } 
		PAP = { has_country_flag = secular_pope }
		PAP = { has_country_flag = reformer_pope }
		}
	}

mean_time_to_happen = { 

	months = 12

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 0.5
		}
	modifier = { 
		PAP = { has_country_flag = reformer_pope }
		factor = 2.0
		}
	}

title = "EVTNAME551509"
desc = "EVTDESC551509"

option = { 
	name = "EVTOPTA551509" #Stay removed from the situation
	ai_chance = { 
		factor = 70
		days = 1
		modifier = { 
			any_known_country = { 
				marriage_with = THIS
				has_country_flag = royal_scandal
				}
			factor = 0.5
			}
		modifier = {
			ally = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 0.2
			}
		modifier = {
			overlord = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 0.2
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				war_with = THIS
				}
			factor = 0.2
			}
		modifier = { 
			capital_scope = { controller = { religion = catholic has_country_flag = royal_scandal } }
			factor = 0.2
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				NOT = { relation = { who = THIS value = -100 } }
				}
			factor = 0.5
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				relation = { who = THIS value = 100 }
				}
			factor = 0.5
			}
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_10 } }
		PAP = { treasury = 10 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_25 } }
		PAP = { treasury = 25 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_50 } }
		PAP = { treasury = 50 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_100 } }
		PAP = { treasury = 100 }
		}
	prestige = 0.01
	any_country = { 
		limit = { has_country_flag = royal_scandal }
		relation = { who = THIS value = -5 }
		relation = { who = PAP value = -5 }
		}
	#Invisible maintenance
	set_country_flag = missive_sent
	random_owned = {
		limit = { owner = { has_country_flag = missive_sent } }
		owner = { clr_country_flag = missive_sent }
		PAP = { clr_country_flag = dispensation_requested }
		PAP = { clr_country_flag = scandal_bribe_10 }
		PAP = { clr_country_flag = scandal_bribe_25 }
		PAP = { clr_country_flag = scandal_bribe_50 }
		PAP = { clr_country_flag = scandal_bribe_100 }
		PA2 = { clr_country_flag = dispensation_requested }
		}
	}
option = { 
	name = "EVTOPTB551509" #Write a missive encouraging leniency
	ai_chance = { 
		factor = 10 
		days = 1
		modifier = { 
			any_known_country = { 
				marriage_with = THIS
				has_country_flag = royal_scandal
				}
			factor = 2
			}
		modifier = {
			ally = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 5
			}
		modifier = {
			overlord = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 5
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				war_with = THIS
				}
			factor = 0.2
			}
		modifier = { 
			capital_scope = { controller = { religion = catholic has_country_flag = royal_scandal } }
			factor = 0.2
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				NOT = { relation = { who = THIS value = -100 } }
				}
			factor = 0.5
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				relation = { who = THIS value = 100 }
				}
			factor = 2
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_10 }
			PAP = { has_country_flag = corrupt_pope }
			factor = 1.2
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_25 }
			PAP = { has_country_flag = corrupt_pope }
			factor = 1.4
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_50 }
			PAP = { has_country_flag = corrupt_pope }
			factor = 2
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_100 }
			PAP = { has_country_flag = corrupt_pope }
			factor = 2.8
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_10 }
			PAP = { has_country_flag = secular_pope }
			factor = 1.1
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_25 }
			PAP = { has_country_flag = secular_pope }
			factor = 1.2
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_50 }
			PAP = { has_country_flag = secular_pope }
			factor = 1.4
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_100 }
			PAP = { has_country_flag = secular_pope }
			factor = 2
			}
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_10 } }
		owner = { treasury = 5 }
		PAP = { treasury = 5 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_25 } }
		owner = { treasury = 12 }
		PAP = { treasury = 12 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_50 } }
		owner = { treasury = 25 }
		PAP = { treasury = 25 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_100 } }
		owner = { treasury = 50 }
		PAP = { treasury = 50 }
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	any_country = { 
		limit = { has_country_flag = royal_scandal }
		relation = { who = THIS value = 10 }
		set_country_flag = dispensation_encouraged
		}
	#Invisible maintenance
	set_country_flag = missive_sent
	random_owned = {
		limit = { owner = { has_country_flag = missive_sent } }
		owner = { clr_country_flag = missive_sent }
		PAP = { clr_country_flag = dispensation_requested }
		PAP = { clr_country_flag = scandal_bribe_10 }
		PAP = { clr_country_flag = scandal_bribe_25 }
		PAP = { clr_country_flag = scandal_bribe_50 }
		PAP = { clr_country_flag = scandal_bribe_100 }
		PA2 = { clr_country_flag = dispensation_requested }
		}
	}
option = {
	name = "EVTOPTC551509" #Apply pressure on the pope to forgive
	ai_chance = { 
		factor = 5 
		days = 1
		modifier = { 
			any_known_country = { 
				marriage_with = THIS
				has_country_flag = royal_scandal
				}
			factor = 2
			}
		modifier = {
			ally = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 10
			}
		modifier = {
			overlord = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 10
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				war_with = THIS
				}
			factor = 0.1
			}
		modifier = { 
			capital_scope = { controller = { religion = catholic has_country_flag = royal_scandal } }
			factor = 0.1
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				NOT = { relation = { who = THIS value = -100 } }
				}
			factor = 0.2
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				relation = { who = THIS value = 100 }
				}
			factor = 2
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_10 }
			PAP = { has_country_flag = corrupt_pope }
			factor = 1.2
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_25 }
			PAP = { has_country_flag = corrupt_pope }
			factor = 1.4
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_50 }
			PAP = { has_country_flag = corrupt_pope }
			factor = 2
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_100 }
			PAP = { has_country_flag = corrupt_pope }
			factor = 2.8
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_10 }
			PAP = { has_country_flag = secular_pope }
			factor = 1.1
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_25 }
			PAP = { has_country_flag = secular_pope }
			factor = 1.2
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_50 }
			PAP = { has_country_flag = secular_pope }
			factor = 1.4
			}
		modifier = { 
			PAP = { has_country_flag = scandal_bribe_100 }
			PAP = { has_country_flag = secular_pope }
			factor = 2
			}
		}
	prestige = -0.01
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_10 } }
		owner = { treasury = 10 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_25 } }
		owner = { treasury = 25 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_50 } }
		owner = { treasury = 50 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_100 } }
		owner = { treasury = 100 }
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	any_country = { 
		limit = { has_country_flag = royal_scandal }
		relation = { who = THIS value = 25 }
		set_country_flag = dispensation_granted 
		}
	#Invisible maintenance
	set_country_flag = missive_sent
	random_owned = {
		limit = { owner = { has_country_flag = missive_sent } }
		owner = { clr_country_flag = missive_sent }
		PAP = { clr_country_flag = dispensation_requested }
		PAP = { clr_country_flag = scandal_bribe_10 }
		PAP = { clr_country_flag = scandal_bribe_25 }
		PAP = { clr_country_flag = scandal_bribe_50 }
		PAP = { clr_country_flag = scandal_bribe_100 }
		PA2 = { clr_country_flag = dispensation_requested }
		}
	}
option = { 
	name = "EVTOPTD551509" #Write a missive encouraging stringency
	ai_chance = { 
		factor = 10 
		days = 1
		modifier = { 
			any_known_country = { 
				marriage_with = THIS
				has_country_flag = royal_scandal
				}
			factor = 0.5
			}
		modifier = {
			ally = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 0.2
			}
		modifier = {
			overlord = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 0.2
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				war_with = THIS
				}
			factor = 5
			}
		modifier = { 
			capital_scope = { controller = { religion = catholic has_country_flag = royal_scandal } }
			factor = 5
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				NOT = { relation = { who = THIS value = -100 } }
				}
			factor = 2
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				relation = { who = THIS value = 100 }
				}
			factor = 0.5
			}
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_10 } }
		PAP = { treasury = 5 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_25 } }
		PAP = { treasury = 12 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_50 } }
		PAP = { treasury = 25 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scandal_bribe_100 } }
		PAP = { treasury = 50 }
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	any_country = { 
		limit = { has_country_flag = royal_scandal }
		relation = { who = THIS value = -10 }
		set_country_flag = dispensation_discouraged
		}
	#Invisible maintenance
	set_country_flag = missive_sent
	random_owned = {
		limit = { owner = { has_country_flag = missive_sent } }
		owner = { clr_country_flag = missive_sent }
		PAP = { clr_country_flag = dispensation_requested }
		PAP = { clr_country_flag = scandal_bribe_10 }
		PAP = { clr_country_flag = scandal_bribe_25 }
		PAP = { clr_country_flag = scandal_bribe_50 }
		PAP = { clr_country_flag = scandal_bribe_100 }
		PA2 = { clr_country_flag = dispensation_requested }
		}
	}
option = {
	name = "EVTOPTE551509" #Apply pressure on the pope to convict
	ai_chance = { 
		factor = 5 
		days = 1
		modifier = { 
			any_known_country = { 
				marriage_with = THIS
				has_country_flag = royal_scandal
				}
			factor = 0.5
			}
		modifier = {
			ally = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 0.1
			}
		modifier = {
			overlord = { 
				religion = catholic
				has_country_flag = royal_scandal
				}
			factor = 0.1
			}
		modifier = { 
			capital_scope = { controller = { religion = catholic has_country_flag = royal_scandal } }
			factor = 10
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				war_with = THIS
				}
			factor = 10
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				NOT = { relation = { who = THIS value = -100 } }
				}
			factor = 2
			}
		modifier = {
			any_known_country = { 
				religion = catholic
				has_country_flag = royal_scandal
				relation = { who = THIS value = 100 }
				}
			factor = 0.5
			}
		}
	badboy = +1
	prestige = -0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	any_country = { 
		limit = { has_country_flag = royal_scandal }
		relation = { who = THIS value = -25 }
		set_country_flag = dispensation_denied
		country_event = 551092
		}
	#Invisible maintenance
	set_country_flag = missive_sent
	random_owned = {
		limit = { owner = { has_country_flag = missive_sent } }
		owner = { clr_country_flag = missive_sent }
		PAP = { clr_country_flag = dispensation_requested }
		PAP = { clr_country_flag = scandal_bribe_10 }
		PAP = { clr_country_flag = scandal_bribe_25 }
		PAP = { clr_country_flag = scandal_bribe_50 }
		PAP = { clr_country_flag = scandal_bribe_100 }
		PA2 = { clr_country_flag = dispensation_requested }
		}
	}
}

province_event = { #The Pope withholds his blessing from $PROVINCENAME$

id = 551510

trigger = {
	has_province_modifier = papal_sponsor
	owner = { NOT = { has_country_flag = curia_controller } }
	OR = {
		PAP = { has_country_flag = corrupt_pope }
		PAP = { has_country_flag = secular_pope }
		PAP = { has_country_flag = reformer_pope }
		}
	}

mean_time_to_happen = { months = 1 }

title = "EVTNAME551510"
desc = "EVTDESC551510"

option = {
	name = "EVTOPTA551510"
	remove_province_modifier = papal_sponsor
	any_country = {
		limit = { has_country_flag = curia_controller }
		relation = { who = THIS value = -10 }
		}
	any_country = {
		limit = { 
			capital_scope = { owned_by = THIS } 
			capital_scope = { is_core = THIS }
			num_of_cities = 1 
			religion = catholic 
			}
		prestige = -0.01
		}
	}

}

country_event = { #Conciliarism and Papism (Secular and Corrupt Popes)

id = 551511

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { 
		NOT = { has_country_flag = papal_authority }
		NOT = { has_country_flag = papal_conciliarism }
		OR = { 
			has_country_flag = secular_pope 
			has_country_flag = corrupt_pope 
			}
		} 
	}

mean_time_to_happen = { 

	months = 1200

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 0.5
		}
	}

title = "EVTNAME551511"
desc = "EVTDESC551011" #Same text as 911

option = { 
	name = "EVTOPTA551511" #Make vague plans to call a council
	ai_chance = { factor = 50 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	}
option = { 
	name = "EVTOPTC551511" #Popes have doctrinal authority
	ai_chance = { factor = 50 }
	prestige = +0.01
	PAP = { 
		prestige = +0.01
		badboy = +0.5
		clr_country_flag = papal_conciliarism
		set_country_flag = papal_authority
		centralization_decentralization = -1
		change_variable = { which = conciliarism value = -1 }
		}
	emperor = { relation = { who = PAP value = -25 } }
	}
}

country_event = { #Conciliarism and Papism (Reformer Popes)

id = 551512

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { 
		NOT = { 
			has_country_flag = papal_authority
			has_country_flag = papal_conciliarism
			}
		has_country_flag = reformer_pope
		}
	}

mean_time_to_happen = { months = 1200 }

title = "EVTNAME551511" #Same 
desc = "EVTDESC551011" #Same 

option = { 
	name = "EVTOPTA551511" #Make vague plans to call a council
	ai_chance = { factor = 50 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	}
option = { 
	name = "EVTOPTB551511" #Only church councils can make policy
	ai_chance = { factor = 25 }
	prestige = -0.05
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		set_country_flag = papal_conciliarism
		add_country_modifier = {
		 	 name = "reform_tensions"
			duration = 365
			}
		stability = -1 
		badboy = -1
		centralization_decentralization = 2 
		change_variable = { which = conciliarism value = 1 }
		}
	emperor = { relation = { who = PAP value = 25 } }
	any_country = { 
		limit = { has_country_flag = conciliarism_suppressed } 
		relation = { who = PAP value = -10 }
		}
	any_country = { 
		limit = { has_country_flag = conciliarism } 
		relation = { who = PAP value = 25 }
		}
	}
option = { 
	name = "EVTOPTC551511" #Popes have doctrinal authority
	ai_chance = { factor = 25 }
	prestige = +0.01
	PAP = { 
		badboy = +0.5
		prestige = +0.01
		set_country_flag = papal_authority
		centralization_decentralization = -1
		change_variable = { which = conciliarism value = -1 }
		}
	emperor = { relation = { who = PAP value = -25 } }
	any_country = { 
		limit = { has_country_flag = conciliarism_suppressed } 
		relation = { who = PAP value = 10 }
		}
	any_country = { 
		limit = { has_country_flag = conciliarism } 
		relation = { who = PAP value = -25 }
		}
	}
}

country_event = { #The Sale of Indulgences

id = 551513

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { 
		has_country_flag = indulgences
		NOT = { has_country_flag = indulgences_banned }
		NOT = { has_country_flag = indulgences_permitted }
		OR = { 
			has_country_flag = corrupt_pope
			has_country_flag = secular_pope
			}
		}
	}

mean_time_to_happen = { months = 300 }

title = "EVTNAME551513"
desc = "EVTDESC551513"

option = { 
	name = "EVTOPTA551513" #Grant licenses to peddlers
	ai_chance = { factor = 75 }
	treasury = 50
	PAP = { 
		set_country_flag = indulgences_permitted
		treasury = 50
		}
	}
option = { 
	name = "EVTOPTB551513" #Condemn the sale of indulgences
	ai_chance = { factor = 20 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	}
option = { 
	name = "EVTOPTC551513" #Forbid any payment for dispensation
	ai_chance = { factor = 5 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { set_country_flag = indulgences_banned }
	PA2 = { set_country_flag = indulgences_banned }
	}
}

country_event = { #The threat of schism (Secular or Reformer)

id = 551514

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { 
		has_country_flag = synod_called
		NOT = { has_country_flag = response_to_synod }
		OR = {
			has_country_flag = secular_pope
			has_country_flag = reformer_pope
			}
		}
	}

mean_time_to_happen = { 

	months = 6

	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 2.0
		}
	}

title = "EVTNAME551514"
desc = "EVTDESC551514"

option = { 
	name = "EVTOPTA551514" #Call a church council
	ai_chance = { factor = 50 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		set_country_flag = response_to_synod
		set_country_flag = church_council_called 
		}
	any_country = { 
		limit = { has_country_flag = conciliarism_supported } 
		relation = { who = THIS value = 25 }
		}
	}
option = { 
	name = "EVTOPTB551514" #Make minor concessions
	ai_chance = { factor = 25 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	PAP = { set_country_flag = response_to_synod }
	}
option = { 
	name = "EVTOPTC551514" #Step down
	ai_chance = { factor = 25 }
	prestige = -0.05
	PAP = { 
		relation = { who = THIS value = -100 }
		prestige = -0.05
		stability = -1
		define_ruler = { 
			name = "(Abdicated)" 
			regency = yes
			female = no 
			DIP = 6
			MIL = 3
			ADM = 3
			}
		change_variable = { which = schism_resolution value = 1 }
		}
	any_owned = { 
		limit = { has_province_modifier = papal_sponsor }
		remove_province_modifier = papal_sponsor 
		}
	any_country = {
		limit = { 
			NOT = { capital_scope = { owned_by = THIS } }
			NOT = { ai = yes }
			religion = catholic
			has_country_flag = religious_news_trivial
			}
		country_event = 551548 #Death of the Pope
		}
	PAP = { 
		clr_country_flag = secular_pope
		clr_country_flag = reformer_pope
		clr_country_flag = corrupt_pope
		clr_country_flag = right_of_exclusion
		clr_country_flag = deadlocked_conclave
		clr_country_flag = response_to_synod
		clr_country_flag = canonization
		clr_country_flag = peasant_success
		clr_country_flag = chialism
		clr_country_flag = crusade_called
		clr_country_flag = hussite_crusade_called
		clr_country_flag = just_war
		clr_country_flag = pope_executed
		set_country_flag = death_of_pope
		set_country_flag = response_to_synod
		}
	any_country = {
		limit = { has_country_flag = papal_bastard }
		country_event = 551620
		}
	#Invisible maintenance follows
	clr_country_flag = curia_controller
	clr_country_flag = crusader
	clr_country_flag = crusade_refused
	clr_country_flag = synod_refused
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = curia_controller
			}
		clr_country_flag = curia_controller
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			tag = PA2
			}
		clr_country_flag = crusade_called
		clr_country_flag = hussite_crusade_called
		clr_country_flag = chialism
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_refused
			}
		clr_country_flag = crusade_refused
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_target
			}
		clr_country_flag = crusade_target
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_target_notified
			}
		clr_country_flag = crusade_target_notified
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_sponsor
			}
		clr_country_flag = crusade_sponsor
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusader
			}
		clr_country_flag = crusader
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = synod_refused
			}
		clr_country_flag = synod_refused
		}
	random_country = {
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			NOT = { REB = { has_country_flag = orthodox_setup } }
			}
		REB = { set_country_flag = orthodox_setup }
		377 = { #Antioch (Orthodox)
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		382 = { #Antioch (Oriental Orthodox)
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		379 = { #Judea
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		358 = { #Alexandria
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		151 = { #Constantinople
			set_province_flag = patriarchate
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		295 = { #Moscow
			set_province_flag = metropolitan
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		280 = { #Kiev
			set_province_flag = metropolitan
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		TUR = { set_country_flag = captive_patriarch }
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = death_of_pope
			}
		clr_country_flag = death_of_pope
		}
	random_owned = { 
		limit = { 
			PAP = { has_country_flag = secular_veto_conceded }
			}
		any_country = { 
			limit = { 
				OR = { 
					tag = FRA
					is_emperor = yes
					check_variable = { which = "secular_veto" value = 1 }
					}
				}
			set_variable = { which = "secular_veto" value = 0 }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 0.1
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 0.25
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 0.5
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 0.75
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 1
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 1.25
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 1.5
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 1.75
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 2
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = 150 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = 100 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = 50 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = 0 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = -50 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = -100} }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = -150} }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				war_with = FRA
				}
			FRA = { change_variable = { which = "secular_veto" value = 3 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = 150 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = 100 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = 50 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = 0 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = -50 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = -100 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = -150 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				emperor = { war_with = THIS } 
				}
			emperor = { change_variable = { which = "secular_veto" value = 3 } }
			}
		}
	}
}

country_event = { #The threat of schism (Secular or Corrupt)

id = 551515

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { 
		has_country_flag = synod_called
		OR = {
			has_country_flag = secular_pope
			has_country_flag = corrupt_pope
			}
		NOT = { 
			has_country_flag = response_to_synod 
			}
		}
	}

mean_time_to_happen = { 

	months = 6

	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 2.0
		}
}

title = "EVTNAME551514" #Same
desc = "EVTDESC551514" #Same

option = { 
	name = "EVTOPTA551514" #Call a church council
	ai_chance = { factor = 30 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { set_country_flag = response_to_synod }
	PAP = { set_country_flag = church_council_called }
	any_country = { 
		limit = { has_country_flag = conciliarism_supported } 
		relation = { who = THIS value = 25 }
		}
	}
option = { 
	name = "EVTOPTB551514" #Make minor concessions
	ai_chance = { factor = 35 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	PAP = { set_country_flag = response_to_synod }
	}
option = { 
	name = "EVTOPTC551515" #Threaten them with excommunication
	ai_chance = { factor = 35 }
	PAP = { set_country_flag = response_to_synod }
	any_country = { 
		limit = { has_country_flag = vote_for_anti_pope }
		relation = { who = THIS value = -50 }
		relation = { who = PAP value = -50 }
		}
	}
}

country_event = { #Calls for a general council (reformer popes)

id = 551516

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { 
		OR = { 
			has_country_flag = calls_for_council 
			has_country_flag = regular_councils_promised
			has_country_flag = regular_councils_supposedly_promised
			}
		NOT = { has_country_flag = church_council }
		NOT = { has_country_flag = church_council_called }
		OR = { 
			has_country_flag = reformer_pope
			has_country_flag = secular_pope
			has_country_flag = papal_conciliarism
			has_country_flag = regular_councils_promised
			has_country_flag = regular_councils_supposedly_promised
			}
		}
	}

mean_time_to_happen = { 

	months = 48

	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 2
		}
	modifier = { 
		exists = PA2
		factor = 0.5
		}
	modifier = { 
		AND = { 
			PAP = { has_country_flag = regular_councils_promised }
			NOT = { PAP = { has_country_flag = calls_for_council } }
			}
		factor = 2
		}
	modifier = { 
		AND = { 
			PAP = { has_country_flag = regular_councils_supposedly_promised }
			NOT = { PAP = { has_country_flag = calls_for_council } }
			}
		factor = 4
		}
	}

title = "EVTNAME551516"
desc = "EVTDESC551516"

option = {
	name = "EVTOPTA551516" #Call a church council
	ai_chance = { 
		factor = 25 
		days = 1
		modifier = { 
			exists = PA2
			factor = 2
			}
		modifier = { 
			NOT = { PAP = { has_country_flag = counter_reformation } }
			NOT = { PAP = { has_country_flag = catholic_reformation } }
			religion_years = { protestant = 10 }
			factor = 2
			}
		}
	any_country = { 
		limit = { has_country_flag = conciliarism_supported }
		relation = { who = THIS value = 25 }
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -3 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 NOT = { missionaries = 3 } } }
		owner = { missionaries = -2 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 3 } }
		owner = { missionaries = -3 }
		}
	PAP = { 
		set_country_flag = church_council_called 
		clr_country_flag = calls_for_council
		stability = -2
		prestige = -0.02
		}
	}
option = {
	name = "EVTOPTB551516" #Make plans to hold a church council
	ai_chance = { 
		factor = 25 
		days = 1
		modifier = { 
			exists = PA2
			factor = 1.5
			}
		modifier = { 
			NOT = { PAP = { has_country_flag = counter_reformation } }
			NOT = { PAP = { has_country_flag = catholic_reformation } }
			religion_years = { protestant = 10 }
			factor = 1.5
			}
		}
	any_country = { 
		limit = { has_country_flag = conciliarism_supported }
		relation = { who = THIS value = 10 }
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		set_country_flag = church_council_called
		set_country_flag = church_council_delays 
		clr_country_flag = calls_for_council
		stability = -1
		prestige = -0.01
		}
	}
option = {
	name = "EVTOPTC551516" #The church needs a firm hand
	ai_chance = { 
		factor = 50 
		days = 1
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1410
			factor = 0.8
			}
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1415
			factor = 0.8
			}
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1420
			factor = 0.8
			}
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1425
			factor = 0.8
			}
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1430
			factor = 0.8
			}
		}
	any_country = { 
		limit = { has_country_flag = conciliarism_suppressed }
		relation = { who = THIS value = 10 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = regular_councils_supposedly_promised } }
		PAP = { 
			prestige = -0.05
			clr_country_flag = regular_councils_supposedly_promised
			centralization_decentralization = -1
			change_variable = { which = conciliarism value = -1 }
			}
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = regular_councils_promised } }
		PAP = { 
			prestige = -0.05
			clr_country_flag = regular_councils_promised
			centralization_decentralization = -1
			set_country_flag = regular_councils_supposedly_promised
			change_variable = { which = conciliarism value = -1 }
			}
		}
	}
}

country_event = { #Calls for a general council (corrupt popes)

#major = yes

id = 551517

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { 
		has_country_flag = calls_for_council 
		NOT = { has_country_flag = church_council }
		NOT = { has_country_flag = church_council_called }
		NOT = { has_country_flag = papal_conciliarism }
		}
	OR = { 
		PAP = { has_country_flag = corrupt_pope }
		PAP = { has_country_flag = secular_pope }
		}
	}

mean_time_to_happen = { 

	months = 48

	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 2
		}
	modifier = { 
		exists = PA2
		factor = 0.5
		}
	modifier = { 
		AND = { 
			PAP = { has_country_flag = regular_councils_promised }
			NOT = { PAP = { has_country_flag = calls_for_council } }
			}
		factor = 2
		}
	modifier = { 
		AND = { 
			PAP = { has_country_flag = regular_councils_supposedly_promised }
			NOT = { PAP = { has_country_flag = calls_for_council } }
			}
		factor = 4
		}
	}

title = "EVTNAME551516" #Same
desc = "EVTDESC551516" #Same

option = {
	name = "EVTOPTB551516" #Same #Make plans to call a church council
	ai_chance = { 
		factor = 25 
		days = 1
		modifier = { 
			exists = PA2
			factor = 1.5
			}
		modifier = { 
			NOT = { PAP = { has_country_flag = counter_reformation } }
			NOT = { PAP = { has_country_flag = catholic_reformation } }
			religion_years = { protestant = 10 }
			factor = 1.5
			}
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	any_country = { 
		limit = { has_country_flag = conciliarism_supported }
		relation = { who = THIS value = 10 }
		}
	PAP = { 
		set_country_flag = church_council_called
		set_country_flag = church_council_delays 
		clr_country_flag = calls_for_council
		stability = -1
		prestige = -0.01
		}
	}
option = {
	name = "EVTOPTC551516" #Same #The church needs a firm hand
	ai_chance = { 
		factor = 75 
		days = 1
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1410
			factor = 0.8
			}
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1415
			factor = 0.8
			}
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1420
			factor = 0.8
			}
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1425
			factor = 0.8
			}
		modifier = { 
			PA2 = { has_country_flag = western_schism }
			year = 1430
			factor = 0.8
			}
		}
	any_country = { 
		limit = { has_country_flag = conciliarism_suppressed }
		relation = { who = THIS value = 10 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = regular_councils_supposedly_promised } }
		PAP = { 
			prestige = -0.05
			clr_country_flag = regular_councils_supposedly_promised
			centralization_decentralization = -1
			change_variable = { which = conciliarism value = -1 }
			}
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = regular_councils_promised } }
		PAP = { 
			prestige = -0.05
			clr_country_flag = regular_councils_promised
			centralization_decentralization = -1
			set_country_flag = regular_councils_supposedly_promised
			change_variable = { which = conciliarism value = -1 }
			}
		}
	}
}

country_event = { #Church Reforms (Simony)

id = 551518

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	OR = { 
		AND = { PAP = { has_country_flag = reformer_pope } PAP = { has_country_flag = papal_authority } }
		PAP = { has_country_flag = church_council }
		}
	NOT = { PAP = { has_country_flag = simony_abolished } }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 
	
	months = 2000

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 2
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = church_council }
		factor = 0.01 #1% - church councils last only a short time
		}
	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.7
		}
	modifier = { 
		PAP = { has_country_flag = reformation_council }
		factor = 1.4
		}
	modifier = {
		NOT = { religion_years = { protestant = 40 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 30 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 20 } }
		factor = 1.1
		}
	modifier = {
		NOT = { is_religion_enabled = hussite } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = reformed } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = protestant } 
		factor = 1.4
		}
	}

title = "EVTNAME551518"
desc = "EVTDESC551518"

option = { 
	name = "EVTOPTA551518" #Impose stringent rules to stop the practice
	ai_chance = { factor = 50 } 
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		stability = -1
		set_country_flag = simony_abolished
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	any_country = { 
		limit = { 
			NOT = { ai = yes }
			NOT = { capital_scope = { owned_by = THIS } }
			religion = catholic
			OR = { 
				AND = { 
					has_country_flag = religious_news_major
					OR = { 
						has_country_flag = simony
						defender_of_faith = yes
						government = papal_government
						has_country_flag = curia_controller
						}
					}
				has_country_flag = religious_news_trivial
				}
			}
		country_event = 551105
		}
	#Invisible effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		PAP = { set_country_flag = council_over }
		any_country = { 
			limit = { ai = yes has_country_flag = simony }
			clr_country_flag = simony
			}
		any_country = { 
			limit = { has_country_flag = synod_called }
			clr_country_flag = synod_called
			}
		PA2 = { set_country_flag = simony_abolished }
		PA2 = { set_country_flag = PAP_simony_abolished }
		}
	}
option = {
	name = "EVTOPTB551518" #Introduce minor changes
	ai_chance = { factor = 50 }
	prestige = +0.01
	#Invisible effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		random_country = { 
			limit = { has_country_flag = simony }
			clr_country_flag = simony
			}
		}
	}
}

country_event = { #Church Reforms (Indulgences)

id = 551519

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { 
		has_country_flag = indulgences
		OR = {
			AND = { 
				PAP = { has_country_flag = reformer_pope } 
				PAP = { has_country_flag = papal_authority } 
				}
			has_country_flag = church_council
			}
		NOT = { has_country_flag = indulgences_banned }
		}
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 
	
	months = 2000

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 2
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = church_council }
		factor = 0.01 #1% - church councils last only a short time
		}
	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.7
		}
	modifier = {
		NOT = { religion_years = { protestant = 40 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 30 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 20 } }
		factor = 1.1
		}
	modifier = {
		NOT = { is_religion_enabled = hussite } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = reformed } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = protestant } 
		factor = 1.4
		}
	}

title = "EVTNAME551519"
desc = "EVTDESC551519"

option = { 
	name = "EVTOPTA551519" #Forbid the sale of dispensation
	ai_chance = { factor = 50 } 
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		stability = -1
		set_country_flag = indulgences_banned
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	any_country = { 
		limit = { 
			NOT = { ai = yes }
			NOT = { capital_scope = { owned_by = THIS } }
			religion = catholic
			OR = { 
				AND = { 
					has_country_flag = religious_news_major
					OR = { 
						has_country_flag = indulgences_condemned
						defender_of_faith = yes
						government = papal_government
						has_country_flag = curia_controller
						}
					}
				has_country_flag = religious_news_trivial
				}
			}
		country_event = 551108
		}
	#Invisible effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		any_country = { 
			limit = { ai = yes has_country_flag = indulgences_condemned }
			clr_country_flag = indulgences_condemned
			}
		any_country = { 
			limit = { has_country_flag = synod_called }
			clr_country_flag = synod_called
			}
		PAP = { set_country_flag = council_over }
		PA2 = { set_country_flag = indulgences_banned }
		PA2 = { set_country_flag = PAP_indulgences_banned }
		}
	}
option = {
	name = "EVTOPTB551519" #Condemn the excesses of indulgence sellers
	ai_chance = { factor = 50 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	#Invisible effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		random_country = { 
			limit = { has_country_flag = indulgence }
			clr_country_flag = indulgence
			}
		}
	}
}

country_event = { #Church Reforms (Annates)

id = 551520

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	OR = { 
 		AND = { 
		 	PAP = { has_country_flag = reformer_pope } 
			PAP = { has_country_flag = papal_authority } 
			}
		PAP = { has_country_flag = church_council }
		}
	NOT = { exists = PA2 }
	NOT = { PAP = { has_country_flag = annate_abolished } }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 
	
	months = 2000

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 2
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = church_council }
		factor = 0.01 #1% - church councils last only a short time
		}
	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.7
		}
	modifier = {
		NOT = { religion_years = { protestant = 40 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 30 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 20 } }
		factor = 1.1
		}
	modifier = {
		NOT = { is_religion_enabled = hussite } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = reformed } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = protestant } 
		factor = 1.4
		}
	}

title = "EVTNAME551520"
desc = "EVTDESC551520"

option = { 
	name = "EVTOPTA551520" #End the practice of paying the annate
	ai_chance = { factor = 50 } 
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		stability = -1
		set_country_flag = annate_abolished
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	any_country = { 
		limit = { 
			NOT = { ai = yes }
			NOT = { capital_scope = { owned_by = THIS } }
			religion = catholic
			OR = { 
				AND = { 
					has_country_flag = religious_news_major
					OR = { 
						has_country_flag = simony
						defender_of_faith = yes
						government = papal_government
						has_country_flag = curia_controller
						}
					}
				has_country_flag = religious_news_trivial
				}
			}
		country_event = 551107
		}
	#Invisible effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		any_country = { 
			limit = { ai = yes has_country_flag = simony }
			clr_country_flag = simony
			}
		PAP = { set_country_flag = council_over }
		any_country = { 
			limit = { has_country_flag = synod_called }
			clr_country_flag = synod_called
			}
		PA2 = { set_country_flag = annate_abolished }
		PA2 = { set_country_flag = PAP_annate_abolished }
		}
	}
option = {
	name = "EVTOPTB551520" #Lower payments to a more manageable sum
	ai_chance = { factor = 50 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	#Invisible Effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		random_country = { 
			limit = { has_country_flag = simony }
			clr_country_flag = simony
			}
		}
	}
}

country_event = { #Church Reforms (Seminaries)

id = 551521

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	OR = { 
 		AND = { PAP = { has_country_flag = reformer_pope } PAP = { has_country_flag = papal_authority } }
		PAP = { has_country_flag = church_council }
		}
	NOT = { PAP = { has_country_flag = seminaries } }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 
	
	months = 2000

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 2
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = church_council }
		factor = 0.01 #1% - church councils last only a short time
		}
	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.7
		}
	modifier = {
		NOT = { religion_years = { protestant = 40 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 30 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 20 } }
		factor = 1.1
		}
	modifier = {
		NOT = { is_religion_enabled = hussite } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = reformed } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = protestant } 
		factor = 1.4
		}
	}

title = "EVTNAME551521"
desc = "EVTDESC551521"

option = { 
	name = "EVTOPTA551521" #Require each diocese to build a seminary
	ai_chance = { factor = 50 } 
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		stability = -1
		set_country_flag = seminaries
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	any_country = { 
		limit = { 
			NOT = { ai = yes }
			NOT = { capital_scope = { owned_by = THIS } }
			religion = catholic
			OR = { 
				AND = { 
					has_country_flag = religious_news_major
					OR = { 
						has_country_flag = absenteeism
						defender_of_faith = yes
						government = papal_government
						has_country_flag = curia_controller
						}
					}
				has_country_flag = religious_news_trivial
				}
			}
		country_event = 551109
		}
	#Invisible Effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		any_country = { 
			limit = { has_country_flag = absenteeism }
			clr_country_flag = absenteeism
			}
		PAP = { set_country_flag = council_over }
		any_country = { 
			limit = { has_country_flag = synod_called }
			clr_country_flag = synod_called
			}
		PA2 = { set_country_flag = seminaries }
		PA2 = { set_country_flag = PAP_seminaries }
		}
	}
option = {
	name = "EVTOPTB551521" #Demand that bishops supervise their diocese
	ai_chance = { factor = 50 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	#Invisible Effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		random_country = { 
			limit = { has_country_flag = absenteeism }
			clr_country_flag = absenteeism
			}
		}
	}
}

country_event = { #Church Reforms (Pluralism)

id = 551522

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	OR = { 
 		AND = { PAP = { has_country_flag = reformer_pope } PAP = { has_country_flag = papal_authority } }
		PAP = { has_country_flag = church_council }
		}
	NOT = { PAP = { has_country_flag = clerical_residence } }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 
	
	months = 2000

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 2
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = church_council }
		factor = 0.01 #1% - church councils last only a short time
		}
	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.7
		}
	modifier = {
		NOT = { religion_years = { protestant = 40 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 30 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 20 } }
		factor = 1.1
		}
	modifier = {
		NOT = { is_religion_enabled = hussite } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = reformed } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = protestant } 
		factor = 1.4
		}
	}

title = "EVTNAME551522"
desc = "EVTDESC551522"

option = { 
	name = "EVTOPTA551522" #Require clerical residence
	ai_chance = { factor = 50 } 
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		stability = -1
		set_country_flag = clerical_residence
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	any_country = { 
		limit = { 
			NOT = { ai = yes }
			NOT = { capital_scope = { owned_by = THIS } }
			religion = catholic
			OR = { 
				AND = { 
					has_country_flag = religious_news_major
					OR = { 
						has_country_flag = absenteeism
						defender_of_faith = yes
						government = papal_government
						has_country_flag = curia_controller
						}
					}
				has_country_flag = religious_news_trivial
				}
			}
		country_event = 551110
		}
	#Invisible Effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		any_country = { 
			limit = { has_country_flag = absenteeism }
			clr_country_flag = absenteeism
			}
		PAP = { set_country_flag = council_over }
		any_country = { 
			limit = { has_country_flag = synod_called }
			clr_country_flag = synod_called
			}
		PA2 = { set_country_flag = clerical_residence }
		PA2 = { set_country_flag = PAP_clerical_residence }
		}
	}
option = {
	name = "EVTOPTB551522" #Emphasize the importance of parishes
	ai_chance = { factor = 50 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	#Invisible Effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		random_country = { 
			limit = { has_country_flag = absenteeism }
			clr_country_flag = absenteeism
			}
		}
	}
}

country_event = { #Church Reforms (Nepotism)

id = 551523

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	OR = { 
 		AND = { PAP = { has_country_flag = reformer_pope } PAP = { has_country_flag = papal_authority } }
		PAP = { has_country_flag = church_council }
		}
	NOT = { PAP = { has_country_flag = nepotism_abolished } }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 
	
	months = 2000

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 2
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = church_council }
		factor = 0.01 #1% - church councils last only a short time
		}
	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.7
		}
	modifier = {
		NOT = { religion_years = { protestant = 40 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 30 } }
		factor = 1.1
		}
	modifier = {
		NOT = { religion_years = { protestant = 20 } }
		factor = 1.1
		}
	modifier = {
		NOT = { is_religion_enabled = hussite } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = reformed } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = protestant } 
		factor = 1.4
		}
	}

title = "EVTNAME551523"
desc = "EVTDESC551523"

option = { 
	name = "EVTOPTA551523" #Impose stringent rules to stop the practice
	ai_chance = { factor = 50 } 
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		stability = -1
		set_country_flag = nepotism_abolished
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	any_country = { 
		limit = { 
			NOT = { ai = yes }
			NOT = { capital_scope = { owned_by = THIS } }
			religion = catholic
			OR = { 
				AND = { 
					has_country_flag = religious_news_major
					government = papal_government
					}
				AND = { 
					has_country_flag = religious_news_trivial
					defender_of_faith = yes
					}
				has_country_flag = religious_news_all
				}
			}
		country_event = 551106
		}
	#Invisible Effects
	set_country_flag = effect_of_reforms
	random_owned = {
		limit = { owner = { has_country_flag = effect_of_reforms } }
		owner = { clr_country_flag = effect_of_reforms }
		PA2 = { set_country_flag = nepotism_abolished }
		PA2 = { set_country_flag = PAP_nepotism_abolished }
		}
	}
option = {
	name = "EVTOPTB551523" #Condemn the practice
	ai_chance = { factor = 50 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	}
}

province_event = { #The Treaty of Tordesillas

id = 551524

trigger = {
	OR = {
		AND = {
			owner = { religion = catholic }
			owner = { has_country_flag = curia_controller }
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			owner = { tag = PAP }
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			owner = { is_papal_controller = yes }
			}
		}
	PAP = { 
		has_country_flag = america1 
		has_country_flag = america2
		OR = { 
			has_country_flag = corrupt_pope
			has_country_flag = secular_pope
			has_country_flag = reformer_pope
			}
		NOT = { has_country_flag = tordesillas }
		}
	NOT = { exists = PA2 }
	}

mean_time_to_happen = { months = 12 } 

title = "EVTNAME551524"
desc = "EVTDESC551524"

option = {
	name = "EVTOPTB551524" #Divide the world between the claimants
	ai_chance = { 
		factor = 80
		days = 1
		modifier = { 
			any_known_country = { has_country_flag = discovered_america war_with = THIS }
			factor = 0.5
			}
		modifier = { 
			any_known_country = { has_country_flag = claimed_america war_with = THIS }
			factor = 0.5
			}
		modifier = {
			capital_scope = { controller = { has_country_flag = discovered_america war_with = THIS } }
			factor = 0.5
			}
		modifier = {
			capital_scope = { controller = { has_country_flag = claimed_america war_with = THIS } }
			factor = 0.5
			}
		modifier = {
			has_country_flag = claimed_america
			factor = 5
			}
		modifier = {
			ally = { has_country_flag = claimed_america }
			factor = 2
			}
		modifier = {
			overlord = { has_country_flag = claimed_america }
			factor = 5
			}
		} 
	owner = { 
		prestige = 0.10
		treasury = 20
		}
	any_country = { 
		limit = { 
			OR = {
				has_country_flag = discovered_america 
				has_country_flag = claimed_america
				}
			}
		country_event = 551530
		relation = { who = THIS value = 100 } 
		}
	PAP = { 
		set_country_flag = tordesillas 
		clr_country_flag = america1
		clr_country_flag = america2
		treasury = 20
		} 
	PA2 = { 
		set_country_flag = tordesillas
		clr_country_flag = america1
		clr_country_flag = america2
		}
	}
option = {
	name = "EVTOPTA551524" #Grant a monopoly to the first to arrive
	ai_chance = { 
		factor = 10
		days = 1
		modifier = { 
			any_known_country = { has_country_flag = discovered_america war_with = THIS }
			factor = 0.5
			}
		modifier = {
			has_country_flag = discovered_america
			factor = 5
			}
		modifier = {
			ally = { has_country_flag = discovered_america }
			factor = 2
			}
		modifier = {
			overlord = { has_country_flag = discovered_america }
			factor = 5
			}
		modifier = {
			capital_scope = { controller = { has_country_flag = discovered_america war_with = THIS } }
			factor = 0.1
			}
		modifier = {
			any_known_country = { 
				has_country_flag = discovered_america
				has_country_flag = enemy_of_pope
				}
			factor = 0.7
			}
		modifier = {
			any_known_country = { 
				has_country_flag = discovered_america
				has_country_flag = hated_enemy_of_pope
				}
			factor = 0.7
			}
		} 
	owner = { prestige = -0.01 treasury = 10 }
	any_country = { 
		limit = { has_country_flag = discovered_america } 
		relation = { who = THIS value = 100 } 
		country_event = 551530
		}
	any_country = { 
		limit = { has_country_flag = claimed_america } 
		relation = { who = THIS value = -100 } 
		} 
	PAP = { 
		set_country_flag = tordesillas 
		clr_country_flag = america1
		clr_country_flag = america2
		treasury = 10
		} 
	PA2 = { 
		set_country_flag = tordesillas
		clr_country_flag = america1
		clr_country_flag = america2
		}
	}
option = {
	name = "EVTOPTC551524" #The Americas are free for any to conquer
	ai_chance = { 
		factor = 8
		days = 1
		modifier = { 
			any_known_country = { has_country_flag = discovered_america war_with = THIS }
			factor = 2
			}
		modifier = { 
			any_known_country = { has_country_flag = claimed_america war_with = THIS }
			factor = 2
			}
		modifier = {
			capital_scope = { controller = { has_country_flag = discovered_america war_with = THIS } }
			factor = 2
			}
		modifier = {
			capital_scope = { controller = { has_country_flag = claimed_america war_with = THIS } }
			factor = 2
			}
		modifier = {
			has_country_flag = claimed_america
			factor = 0.2
			}
		modifier = {
			ally = { has_country_flag = claimed_america }
			factor = 0.5
			}
		modifier = {
			overlord = { has_country_flag = claimed_america }
			factor = 0.2
			}
		modifier = {
			has_country_flag = discovered_america
			factor = 0.2
			}
		modifier = {
			ally = { has_country_flag = discovered_america }
			factor = 0.5
			}
		modifier = {
			overlord = { has_country_flag = discovered_america }
			factor = 0.2
			}
		} 
	PAP = { 
		set_country_flag = tordesillas 
		clr_country_flag = america1
		clr_country_flag = america2
		set_country_flag = american_colonization_open
		} 
	PA2 = { 
		set_country_flag = tordesillas
		clr_country_flag = america1
		clr_country_flag = america2
		set_country_flag = american_colonization_open
		}
	any_country = { 
		limit = { has_country_flag = discovered_america } 
		relation = { who = THIS value = -50 } 
		clr_country_flag = discovered_america
		set_country_flag = claimed_america
		}
	any_country = { 
		limit = { has_country_flag = claimed_america } 
		relation = { who = THIS value = -50 } 
		}
	}
option = { 
	name = "EVTOPTD551524" #The New World should remain unspoiled
	ai_chance = { 
		factor = 2
		days = 1
		modifier = { 
			any_known_country = { has_country_flag = discovered_america war_with = THIS }
			factor = 2
			}
		modifier = { 
			any_known_country = { has_country_flag = claimed_america war_with = THIS }
			factor = 2
			}
		modifier = {
			capital_scope = { controller = { has_country_flag = discovered_america war_with = THIS } }
			factor = 2
			}
		modifier = {
			capital_scope = { controller = { has_country_flag = claimed_america war_with = THIS } }
			factor = 2
			}
		modifier = {
			NOT = { badboy = 0.1 }
			factor = 2
			}
		modifier = {
			has_country_flag = claimed_america
			factor = 0.2
			}
		modifier = {
			ally = { has_country_flag = claimed_america }
			factor = 0.5
			}
		modifier = {
			overlord = { has_country_flag = claimed_america }
			factor = 0.2
			}
		modifier = {
			has_country_flag = discovered_america
			factor = 0.2
			}
		modifier = {
			ally = { has_country_flag = discovered_america }
			factor = 0.5
			}
		modifier = {
			overlord = { has_country_flag = discovered_america }
			factor = 0.2
			}
		} 
	owner = { prestige = 0.01 }
	PAP = { 
		set_country_flag = tordesillas 
		clr_country_flag = america1
		clr_country_flag = america2
		} 
	PA2 = { 
		set_country_flag = tordesillas
		clr_country_flag = america1
		clr_country_flag = america2
		}
	any_country = { 
		limit = { has_country_flag = discovered_america } 
		relation = { who = THIS value = -100 } 
		clr_country_flag = discovered_america
		set_country_flag = claimed_america
		}
	any_country = { 
		limit = { has_country_flag = claimed_america } 
		relation = { who = THIS value = -100 } 
		}
	}		
}

country_event = { #Sublimus Dei

id = 551525

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { 
		OR = { 
			has_country_flag = corrupt_pope
			has_country_flag = secular_pope
			has_country_flag = reformer_pope
			}
		has_country_flag = tordesillas
		NOT = { has_country_flag = sublimus_dei }
		}
	}

mean_time_to_happen = { months = 480 }

title = "EVTNAME551525" 
desc = "EVTDESC551525"

option = { 
	name = "EVTOPTA551525" #They have souls and should not be enslaved
	ai_chance = { factor = 90 } 
	PAP = { 
		innovative_narrowminded = -1 
		set_country_flag = sublimus_dei
		}
	PA2 = { set_country_flag = sublimus_dei }
	any_country = { 
		limit = { OR = { has_country_flag = discovered_america has_country_flag = claimed_america } } 
		relation = { who = THIS value = -50 } 
		}
	}
option = { #They are animals and deserve to be slaves
	name = "EVTOPTB551525"
	ai_chance = { factor = 10 } 
	PAP = { 
		innovative_narrowminded = 1 
		set_country_flag = sublimus_dei
		}
	any_country = { 
		limit = { OR = { has_country_flag = discovered_america has_country_flag = claimed_america } } 
		relation = { who = THIS value = 25 } 
		}
	}
}

country_event = { #The triumph of the pope

id = 551526

trigger = {
	tag = PAP
	NOT = { exists = PA2 }
	PAP = { has_country_flag = church_schism } 
	}

mean_time_to_happen = { 

	months = 6

	modifier = { 
		PAP = { has_country_flag = potential_schism }
		factor = 5
		}
	}

title = "EVTNAME551526" #The triumph of the pope
desc = "EVTDESC551526"

option = {
	name = "EVTOPTA551624" #Same #Step down and heal the schism
	ai_chance = { factor = 60 }
	random_owned = { 
		limit = { owner = { stability = 3 } }
		owner = { prestige = 0.10 }
		}
	random_owned = { 
		limit = { owner = { stability = 2 NOT = { stability = 3 } } }
		owner = { prestige = 0.05 stability = 1 }
		}
	random_owned = { 
		limit = { owner = { NOT = { stability = 2 } } }
		owner = { stability = 2 }
		}
	PA2 = { country_event = 551636 }
	random_owned = {
		limit = { 
			OR = {
				NOT = { PAP = { has_country_flag = secular_veto_conceded } }
				NOT = { PAP = { has_country_flag = regular_councils_promised } }
				NOT = { PAP = { has_country_flag = lollardy_banned } }
				}
			}
		random_country = {
			limit = {
				OR = {
					AND = {
						religion = catholic
						has_country_flag = curia_controller
						}
					AND = {
						PAP = { has_country_flag = independent_pope }
						tag = PAP
						}
					AND = {
						PAP = { has_country_flag = independent_pope }
						NOT = { exists = PAP }
						is_papal_controller = yes
						}
					}
				}
			}
		country_event = 551566
		}
	PAP = { 
		set_country_flag = church_council_called
		clr_country_flag = church_schism
		clr_country_flag = secular_pope
		clr_country_flag = corrupt_pope
		clr_country_flag = reformer_pope
		centralization_decentralization = 1
		set_country_flag = schism_aftermath
		}
	any_country = { 
		limit = { has_country_flag = Roman_Catholic }
		prestige = +0.03
		relation = { who = THIS value = 100 }
		}
	any_country = { 
		limit = { has_country_flag = support_antipope }
		prestige = -0.03
		relation = { who = THIS value = 50 }
		}
	random_owned = {
		limit = { PAP = { has_country_flag = schism_aftermath } }
		any_country = {
			limit = { has_country_flag = Roman_Catholic }
			clr_country_flag = Roman_Catholic
			}
		any_country = {
			limit = { has_country_flag = support_antipope }
			clr_country_flag = support_antipope
			}
		any_country = {
			limit = { has_country_flag = vote_for_anti_pope }
			clr_country_flag = vote_for_anti_pope
			}
		any_country = {
			limit = { has_country_flag = vote_for_Roman_pope }
			clr_country_flag = vote_for_Roman_pope
			}
		any_country = { 
			limit = { has_country_flag = synod_refused }
			clr_country_flag = synod_refused
			}
		any_country = { 
			limit = { has_country_flag = call_synod }
			clr_country_flag = call_synod
			}
		any_country = { 
			limit = { has_country_flag = vote_for_anti_pope }
			clr_country_flag = vote_for_anti_pope
			}
		any_country = { 
			limit = { has_country_flag = vote_for_Roman_pope }
			clr_country_flag = vote_for_Roman_pope
			}
		any_country = { 
			limit = { has_country_flag = synod_vote_against }
			clr_country_flag = synod_vote_against
			}
		any_country = {
			limit = { has_country_flag = enemy_of_pope }
			clr_country_flag = enemy_of_pope
			}
		any_country = {
			limit = { has_country_flag = hated_enemy_of_pope }
			clr_country_flag = hated_enemy_of_pope
			}
		PAP = { clr_country_flag = schism_aftermath }
		}
	}
option = {
	name = "EVTOPTB551624" #Same #Purge the church of dissent
	ai_chance = { factor = 40 }
	random_owned = { 
		limit = { owner = { stability = 3 } }
		owner = { prestige = 0.15 }
		}
	random_owned = { 
		limit = { owner = { stability = 2 NOT = { stability = 3 } } }
		owner = { prestige = 0.10 stability = 1 }
		}
	random_owned = { 
		limit = { owner = { stability = 1 NOT = { stability = 2 } } }
		owner = { prestige = 0.05 stability = 2 }
		}
	random_owned = { 
		limit = { owner = { NOT = { stability = 1 } } }
		owner = { stability = 3 }
		}
	PA2 = { country_event = 551636 }
	random_owned = {
		limit = { 
			OR = {
				NOT = { PAP = { has_country_flag = secular_veto_conceded } }
				NOT = { PAP = { has_country_flag = regular_councils_promised } }
				NOT = { PAP = { has_country_flag = lollardy_banned } }
				}
			}
		random_country = {
			limit = {
				OR = {
					AND = {
						religion = catholic
						has_country_flag = curia_controller
						}
					AND = {
						PAP = { has_country_flag = independent_pope }
						tag = PAP
						}
					AND = {
						PAP = { has_country_flag = independent_pope }
						NOT = { exists = PAP }
						is_papal_controller = yes
						}
					}
				}
			}
		country_event = 551566
		}
	PAP = { 
		clr_country_flag = church_schism
		centralization_decentralization = -2
		innovative_narrowminded = 1
		set_country_flag = schism_aftermath
		}
	any_country = { 
		limit = { has_country_flag = Roman_Catholic }
		prestige = +0.03
		relation = { who = THIS value = 100 }
		}
	any_country = { 
		limit = { has_country_flag = support_antipope }
		prestige = -0.06
		relation = { who = THIS value = -50 }
		}
	random_owned = {
		limit = { PAP = { has_country_flag = schism_aftermath } }
		any_country = {
			limit = { has_country_flag = Roman_Catholic }
			clr_country_flag = Roman_Catholic
			}
		any_country = {
			limit = { has_country_flag = support_antipope }
			clr_country_flag = support_antipope
			}
		any_country = {
			limit = { has_country_flag = vote_for_anti_pope }
			clr_country_flag = vote_for_anti_pope
			}
		any_country = {
			limit = { has_country_flag = vote_for_Roman_pope }
			clr_country_flag = vote_for_Roman_pope
			}
		any_country = { 
			limit = { has_country_flag = synod_refused }
			clr_country_flag = synod_refused
			}
		any_country = { 
			limit = { has_country_flag = call_synod }
			clr_country_flag = call_synod
			}
		any_country = { 
			limit = { has_country_flag = vote_for_anti_pope }
			clr_country_flag = vote_for_anti_pope
			}
		any_country = { 
			limit = { has_country_flag = vote_for_Roman_pope }
			clr_country_flag = vote_for_Roman_pope
			}
		any_country = { 
			limit = { has_country_flag = synod_vote_against }
			clr_country_flag = synod_vote_against
			}
		any_country = {
			limit = { has_country_flag = enemy_of_pope }
			clr_country_flag = enemy_of_pope
			}
		any_country = {
			limit = { has_country_flag = hated_enemy_of_pope }
			clr_country_flag = hated_enemy_of_pope
			}
		PAP = { clr_country_flag = schism_aftermath }
		}
	}
}

province_event = { #A charge of heresy

id = 551527

trigger = {
	NOT = { PAP = { has_country_flag = decline_of_papacy } }
	NOT = { PAP = { badboy = 0.75 } }
	owner = { 
		OR = {
			AND = {
				religion = catholic
				has_country_flag = curia_controller
				}
			AND = {
				PAP = { has_country_flag = independent_pope }
				is_papal_controller = yes
				}
			}
		}
	controller = { 
		has_country_flag = hated_enemy_of_pope 
		religion = catholic
		NOT = { capital_scope = { owned_by = THIS } }
		NOT = { has_country_flag = curia_controller }
		NOT = { tag = PAP }
		NOT = { is_papal_controller = yes }
		NOT = { has_country_flag = excommunicated }
		NOT = { has_country_flag = excommunication_decree }
		NOT = { has_country_flag = just_war }
		}
	PAP = { 
		OR = {
			has_country_flag = secular_pope
			has_country_flag = reformer_pope
			has_country_flag = corrupt_pope
			}
		}
	}

mean_time_to_happen = { 

	months = 12

	modifier = {
		PAP = { has_country_flag = reformer_pope }
		factor = 2
		}
	modifier = {
		PAP = { has_country_flag = corrupt_pope }
		factor = 0.5
		}
	
	}

title = "EVTNAME551527"
desc = "EVTDESC551527"

option = { 
	name = "EVTOPTA551527"
	ai_chance = { factor = 75 }
	prestige = -0.02
	badboy = +0.5
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			NOT = { missionaries = 1 }
			}
		diplomats = -1
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			missionaries = 1
			}
		missionaries = -1
		}
	controller = { 
		relation = { who = THIS value = -50 }
		set_country_flag = excommunication_decree
		set_country_flag = excommunication_unjust_war
		}
	}
option = { 
	name = "EVTOPTB551527"
	ai_chance = { factor = 25 }
	prestige = 0.01
	badboy = -0.25
	controller = { 
		set_country_flag = just_war 
		relation = { who = THIS value = 50 }
		}
	}
}

country_event = { #Index of Forbidden Books

id = 551528

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = forbidden_books }
	NOT = { PAP = { has_country_flag = forbidden_index } }
	NOT = { PAP = { has_country_flag = forbidden_index_denied } }
	OR = { 
		PAP = { has_country_flag = reformer_pope }
		PAP = { has_country_flag = secular_pope }
		PAP = { has_country_flag = corrupt_pope }
		}
	}

mean_time_to_happen = { months = 120 }

title = "EVTNAME551528"
desc = "EVTDESC551528"

option = { 
	name = "EVTOPTA551528" #Better safe than sorry
	ai_chance = { factor = 75 }
	random_owned = { 
		limit = { owner = { stability = 3 } }
		owner = { prestige = 0.05 }
		}
	random_owned = { 
		limit = { owner = { NOT = { stability = 3 } } }
		owner = { stability = 1 }
		}
	PAP = { 
		innovative_narrowminded = 1
		centralization_decentralization = -1
		set_country_flag = forbidden_index
		stability = 1
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = forbidden_index } }
		PA2 = { set_country_flag = forbidden_index }
		}
	}
option = { 
	name = "EVTOPTB551528" #Pare it down to the essentials
	ai_chance = { factor = 20 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	PAP = { centralization_decentralization = -1 }
	PAP = { set_country_flag = forbidden_index_denied }
	random_owned = {
		limit = { PAP = { has_country_flag = forbidden_index_denied } }
		PA2 = { set_country_flag = forbidden_index_denied }
		}
	}
option = { 
	name = "EVTOPTC551528" #Allow each nation to decide
	ai_chance = { factor = 5 }
	PAP = { 
		centralization_decentralization = 1
		set_country_flag = forbidden_index_denied 
		}
	random_owned = {
		limit = { PAP = { has_country_flag = forbidden_index_denied } }
		PA2 = { set_country_flag = forbidden_index_denied }
		}
	}
}

country_event = { #Founding of the Jesuits

id = 551529

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	is_religion_enabled = protestant
	religion_years = { protestant = 10 }
	PAP = { NOT = { has_country_flag = jesuits_founded } }
	OR = { 
		PAP = { has_country_flag = reformer_pope }
		PAP = { has_country_flag = secular_pope }
		PAP = { has_country_flag = corrupt_pope }
		}
	}

mean_time_to_happen = { 

	months = 240 #240 #Founded in 1540, 23 years after the Reformation began

	modifier = { 
		PAP = { has_country_flag = reformer_pope }
		factor = 0.5
		}
	modifier = { 
		PAP = { has_country_flag = tradition_counts }
		factor = 0.75
		}
	modifier = { 
		PAP = { has_country_flag = elite_priests }
		factor = 0.75
		}
	modifier = { 
		PAP = { has_country_flag = good_works_needed }
		factor = 0.75
		}
	modifier = { 
		PAP = { has_country_flag = latin_only }
		factor = 0.75
		}
	}

title = "EVTNAME551529"
desc = "EVTDESC551529"

option = { 
name = "EVTOPTA551529" #Give them free reign to fight heresy
	ai_chance = { factor = 80 }
	prestige = +0.01
	PAP = { 
		set_country_flag = jesuits_founded
		set_country_flag = jesuit_influence 
		set_country_flag = jesuit_influence_strong
		innovative_narrowminded = 1
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = jesuits_founded } }
		PA2 = { 
			set_country_flag = jesuits_founded
			set_country_flag = jesuit_influence 
			set_country_flag = jesuit_influence_strong
			}
		}
	}
option = { 
	name = "EVTOPTB551529" #Keep them on a short leash
	ai_chance = { factor = 20 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	PAP = {
		set_country_flag = jesuits_founded
		set_country_flag = jesuit_influence
		centralization_decentralization = -1
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = jesuits_founded } }
		PA2 = { 
			set_country_flag = jesuits_founded
			set_country_flag = jesuit_influence 
			}
		}
	}
}

country_event = { #Title to the New World

id = 551530

is_triggered_only = yes

title = "EVTNAME551530"
desc = "EVTDESC551530"

option = {
	name = "EVTOPTA551530"
	relation = { who = PAP value = 50 }
	colonists = 5
	random_owned = {
		limit = { owner = { has_country_flag = claimed_america } }
		owner = { 
			clr_country_flag = claimed_america
			set_country_flag = discovered_america
			add_core = 760 #Porto Seguro (first landing in Brazil by Portuguese)
			prestige = 0.05
			}
		}
	random_owned = {
		limit = { owner = { has_country_flag = discovered_america } }
		owner = { 
			add_core = 852 #Mexico, capital of Aztec Empire
			prestige = 0.05
			}
		}
	}

}

country_event = { #The threat of the Reformation

id = 551531

trigger = {
	PAP = { has_country_flag = reformation_council_demands }
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { PAP = { has_country_flag = church_council_called } }
	NOT = { PAP = { has_country_flag = church_council } }
	NOT = { PAP = { has_country_flag = reformation_council_called } }
	OR = { 
 		PAP = { has_country_flag = corrupt_pope }
		PAP = { has_country_flag = reformer_pope }
		PAP = { has_country_flag = secular_pope }
		PAP = { has_country_flag = papal_conciliarism }
		}
	}

mean_time_to_happen = { months = 6 }

title = "EVTNAME551531"
desc = "EVTDESC551037"

option = { 
name = "EVTOPTA551531" #A matter of squabbling monks
	ai_chance = { 
		factor = 25
		days = 1
		modifier = {
			PAP = { has_country_flag = reformation_council_begging }
			factor = 0.65
			}
		modifier = {
			PAP = { has_country_flag = papal_conciliarism }
			factor = 0.65
			}
		modifier = {
			NOT = { religion_years = { protestant = 5 } }
			factor = 1.4
			}
		modifier = {
			NOT = { religion_years = { protestant = 10 } }
			factor = 1.4
			}
		}
	PAP = {
		clr_country_flag = reformation_council_demands
		clr_country_flag = reformation_council_begging
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = regular_councils_supposedly_promised } }
		PAP = { 
			prestige = -0.05
			clr_country_flag = regular_councils_supposedly_promised
			centralization_decentralization = -1
			}
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = regular_councils_promised } }
		PAP = { 
			prestige = -0.05
			clr_country_flag = regular_councils_promised
			centralization_decentralization = -1
			set_country_flag = regular_councils_supposedly_promised
			}
		}
	}
option = { 
	name = "EVTOPTB551531" #Call a church council to deal with it
	ai_chance = { 
		factor = 50 
		days = 1
		modifier = { 
			is_religion_enabled = reformed
			factor = 1.1
			}
		modifier = {
			religion_years = { protestant = 20 }
			factor = 1.4
			}
		modifier = {
			religion_years = { protestant = 30 }
			factor = 1.4
			}
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -3 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 NOT = { missionaries = 3 } } }
		owner = { missionaries = -2 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 3 } }
		owner = { missionaries = -3 }
		}
	PAP = { 
		clr_country_flag = reformation_council_demands 
		clr_country_flag = reformation_council_begging
		set_country_flag = reformation_council_called
		set_country_flag = church_council_called
		set_country_flag = reaction_to_reformation
		}
	random_owned = { 
		limit = { owner = { NOT = { is_emperor = yes } } }
		emperor = { relation = { who = THIS value = 25 } }
		}
	}
}

country_event = { #Church council proposed

id = 551532

#major = yes

trigger = { 
	PAP = { has_country_flag = council_site_chosen }
	NOT = { has_country_flag = council_site_approved }
	religion = catholic
	OR = { 
		has_country_flag = curia_controller
		is_emperor = yes
		tag = FRA
		tag = PAP
		has_country_flag = great_power
		}
	NOT = { government = republic }
	num_of_cities = 4
	}

mean_time_to_happen = { 

	months = 8

	modifier = { 
		DIP = 8
		factor = 0.8
		}
	modifier = { 
		DIP = 6
		factor = 0.8
		}
	modifier = { 
		NOT = { DIP = 5 }
		factor = 1.2
		}
	}

title = "EVTNAME551532"
desc = "EVTDESC551532"

option = { 
	name = "EVTOPTA551532" #Send representatives to the council
	ai_chance = { 
		factor = 75
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				relation = { who = THIS value = 150 }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				relation = { who = THIS value = 100 }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				relation = { who = THIS value = 50 }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				prestige = 0.25
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				prestige = 0.5
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				prestige = 0.75
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				NOT = { badboy = 0.10 }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				marriage_with = THIS
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				alliance_with = THIS
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				trade_agreement_with = THIS
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				culture_group = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				is_religion_enabled = protestant
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				is_religion_enabled = reformed
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				defender_of_faith = yes
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				PAP = { has_country_flag = decline_of_religion }
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				OR = { 
					vassal_of = THIS
					junior_union_with = THIS
					senior_union_with = THIS
					overlord_of = THIS
					}
				}
			factor = 3
			}
		}
	set_country_flag = council_site_approved
	set_country_flag = attend_council
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	relation = { who = PAP value = 10 }
	}
option = { 
	name = "EVTOPTB551532" #Demand it be held in a more acceptable location
	ai_chance = { 
		factor = 25
		days = 1
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				NOT = { relation = { who = THIS value = 0 } }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				NOT = { relation = { who = THIS value = -50 } }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				NOT = { relation = { who = THIS value = -100 } }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				NOT = { relation = { who = THIS value = -150 } }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				NOT = { prestige = 0 }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				NOT = { prestige = -0.25 }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				NOT = { prestige = -0.5 }
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				badboy = 0.25
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				badboy = 0.5
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				badboy = 0.75
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				badboy = 1
				}
			factor = 1.2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				casus_belli = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				any_owned_province = { is_core = THIS }
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				truce_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				war_with = THIS
				}
			factor = 3
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = council_host_country
				trade_embargo_by = THIS
				}
			factor = 1.4
			}
		}
	set_country_flag = council_site_vetoed
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 2 } missionaries = 1 } } 
		owner = { diplomats = -1 missionaries = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	prestige = 0.01
	any_country = { 
		limit = { 
			has_country_flag = council_site_approved
			NOT = { has_country_flag = council_host_country }
			}
		relation = { who = THIS value = -10 }
		clr_country_flag = council_site_approved
		}
	any_country = { 
		limit = { has_country_flag = council_host_country }
		relation = { who = THIS value = -50 }
		clr_country_flag = council_host_country
		clr_country_flag = council_site_approved
		}
	PAP = { clr_country_flag = council_site_chosen }
	}

}

country_event = { #Fate of the Catholic Church (the Vernacular)

id = 551533

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { has_country_flag = church_council }
	NOT = { PAP = { has_country_flag = latin_only } }
	NOT = { PAP = { has_country_flag = vernacular_allowed } }
	religion_years = { protestant = 10 }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 

	months = 12

	modifier = {
		ai = yes
		factor = 0.7
		}
	
	}

title = "EVTNAME551533"
desc = "EVTDESC551533"

option = { 
	name = "EVTOPTA551533" #Unity through Latin
	ai_chance = { factor = 75 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = latin_tendency } }
		PAP = { set_country_flag = latin_only clr_country_flag = vernacular_tendency innovative_narrowminded = 1 }
		}
	PAP = { 
		set_country_flag = latin_tendency
		set_country_flag = council_accomplishments
		prestige = +0.01
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = latin_only } }
		PAP = { clr_country_flag = latin_tendency }
		any_country = { 
			limit = { 
				NOT = { ai = yes }
				NOT = { capital_scope = { owned_by = THIS } }
				religion = catholic
				OR = { 
					AND = { 
						has_country_flag = religious_news_major
						OR = { 
							defender_of_faith = yes
							government = papal_government
							has_country_flag = curia_controller
							}
						}
					has_country_flag = religious_news_trivial
					}
				}
			country_event = 551111
			}
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			PAP = { has_country_flag = jesuits_founded }
			OR = { 
				PAP = { has_country_flag = good_works_needed } 
				PAP = { has_country_flag = faith_alone } 
				}
			OR = { 
				PAP = { has_country_flag = tradition_counts } 
				PAP = { has_country_flag = solo_scriptoris } 
				}
			OR = { 
				PAP = { has_country_flag = bread_and_wine } 
				PAP = { has_country_flag = elite_priests } 
				}
			OR = { 
				PAP = { has_country_flag = latin_only } 
				PAP = { has_country_flag = vernacular_allowed } 
				}
			OR = { #Any two of the four decisions will allow this event
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = tradition_counts }
					}
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = elite_priests }
					}
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = latin_only }
					}
				AND = { 
					PAP = { has_country_flag = tradition_counts }
					PAP = { has_country_flag = elite_priests }
					}
				AND = { 
					PAP = { has_country_flag = tradition_counts }
					PAP = { has_country_flag = latin_only }
					}
				AND = { 
					PAP = { has_country_flag = elite_priests }
					PAP = { has_country_flag = latin_only }
					}
				}
			}
		country_event = 551537
		}
	}
option = { 
	name = "EVTOPTB551533" #Allow the local tongue to be used
	ai_chance = { factor = 25 }
	prestige = -0.02
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = vernacular_tendency } }
		PAP = { set_country_flag = vernacular_allowed clr_country_flag = latin_tendency innovative_narrowminded = -1 }
		any_country = { 
			limit = { 
				NOT = { ai = yes }
				NOT = { capital_scope = { owned_by = THIS } }
				religion = catholic
				OR = { 
					AND = { 
						has_country_flag = religious_news_major
						OR = { 
							defender_of_faith = yes
							government = papal_government
							has_country_flag = curia_controller
							}
						}
					has_country_flag = religious_news_trivial
					}
				}
			country_event = 551112
			}
		}
	PAP = { 
		set_country_flag = vernacular_tendency
		set_country_flag = council_accomplishments
		prestige = -0.02
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = vernacular_allowed } }
		PAP = { clr_country_flag = vernacular_tendency }
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			PAP = { has_country_flag = jesuits_founded }
			NOT = { PAP = { has_country_flag = counter_reformation } }
			NOT = { PAP = { has_country_flag = catholic_reformation } }
			OR = { 
				PAP = { has_country_flag = good_works_needed } 
				PAP = { has_country_flag = faith_alone } 
				}
			OR = { 
				PAP = { has_country_flag = tradition_counts } 
				PAP = { has_country_flag = solo_scriptoris } 
				}
			OR = { 
				PAP = { has_country_flag = bread_and_wine } 
				PAP = { has_country_flag = elite_priests } 
				}
			OR = { 
				PAP = { has_country_flag = latin_only } 
				PAP = { has_country_flag = vernacular_allowed } 
				}
			OR = { #Any two of the four decisions will allow this event
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = solo_scriptoris }
					}
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = bread_and_wine }
					}
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = vernacular_allowed }
					}
				AND = { 
					PAP = { has_country_flag = solo_scriptoris }
					PAP = { has_country_flag = bread_and_wine }
					}
				AND = { 
					PAP = { has_country_flag = solo_scriptoris }
					PAP = { has_country_flag = vernacular_allowed }
					}
				AND = { 
					PAP = { has_country_flag = vernacular_allowed }
					PAP = { has_country_flag = bread_and_wine }
					}
				}
			OR = { 
				PAP = { has_country_flag = clerical_residence }
				PAP = { has_country_flag = simony_abolished }
				PAP = { has_country_flag = annate_abolished }
				PAP = { has_country_flag = seminaries }
				PAP = { has_country_flag = papal_conciliarism }
				PAP = { has_country_flag = nepotism_abolished }
				PAP = { has_country_flag = indulgences_banned }
				}
			}
		country_event = 551538
		}
	}
}

country_event = { #Fate of the Catholic Church (the Host)

id = 551534

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { has_country_flag = church_council }
	NOT = { PAP = { has_country_flag = elite_priests } }
	NOT = { PAP = { has_country_flag = bread_and_wine } }
	religion_years = { protestant = 10 }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 

	months = 12

	modifier = {
		ai = yes
		factor = 0.7
		}
	
	}

title = "EVTNAME551533" #Same
desc = "EVTDESC551534"

option = { 
	name = "EVTOPTA551534" #Priests have a special relationship with God
	ai_chance = { factor = 75 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = elite_tendency } }
		PAP = { set_country_flag = elite_priests clr_country_flag = both_hosts_tendency innovative_narrowminded = 1 }
		any_country = { 
			limit = { 
				NOT = { ai = yes }
				NOT = { capital_scope = { owned_by = THIS } }
				religion = catholic
				OR = { 
					AND = { 
						has_country_flag = religious_news_major
						OR = { 
							defender_of_faith = yes
							government = papal_government
							has_country_flag = curia_controller
							}
						}
					has_country_flag = religious_news_trivial
					}
				}
			country_event = 551113
			}
		}
	PAP = { 
		set_country_flag = elite_tendency
		set_country_flag = council_accomplishments
		prestige = +0.01
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = elite_priests } }
		PAP = { clr_country_flag = elite_tendency }
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			PAP = { has_country_flag = jesuits_founded }
			OR = { 
				PAP = { has_country_flag = good_works_needed } 
				PAP = { has_country_flag = faith_alone } 
				}
			OR = { 
				PAP = { has_country_flag = tradition_counts } 
				PAP = { has_country_flag = solo_scriptoris } 
				}
			OR = { 
				PAP = { has_country_flag = bread_and_wine } 
				PAP = { has_country_flag = elite_priests } 
				}
			OR = { 
				PAP = { has_country_flag = latin_only } 
				PAP = { has_country_flag = vernacular_allowed } 
				}
			OR = { #Any two of the four decisions will allow this event
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = tradition_counts }
					}
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = elite_priests }
					}
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = latin_only }
					}
				AND = { 
					PAP = { has_country_flag = tradition_counts }
					PAP = { has_country_flag = elite_priests }
					}
				AND = { 
					PAP = { has_country_flag = tradition_counts }
					PAP = { has_country_flag = latin_only }
					}
				AND = { 
					PAP = { has_country_flag = elite_priests }
					PAP = { has_country_flag = latin_only }
					}
				}
			}
		country_event = 551537
		}
	}
option = { 
	name = "EVTOPTB551534" #All may partake of both hosts
	ai_chance = { factor = 25 }
	prestige = -0.02
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = both_hosts_tendency } }
		PAP = { set_country_flag = bread_and_wine clr_country_flag = elite_tendency innovative_narrowminded = -1 }
		any_country = { 
			limit = { 
				NOT = { ai = yes }
				NOT = { capital_scope = { owned_by = THIS } }
				religion = catholic
				OR = { 
					AND = { 
						has_country_flag = religious_news_major
						OR = { 
							defender_of_faith = yes
							government = papal_government
							has_country_flag = curia_controller
							}
						}
					has_country_flag = religious_news_trivial
					}
				}
			country_event = 551114
			}
		}
	PAP = { 
		set_country_flag = both_hosts_tendency
		set_country_flag = council_accomplishments
		prestige = -0.02
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = bread_and_wine } }
		PAP = { clr_country_flag = both_hosts_tendency }
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			PAP = { has_country_flag = jesuits_founded }
			NOT = { PAP = { has_country_flag = counter_reformation } }
			NOT = { PAP = { has_country_flag = catholic_reformation } }
			OR = { 
				PAP = { has_country_flag = good_works_needed } 
				PAP = { has_country_flag = faith_alone } 
				}
			OR = { 
				PAP = { has_country_flag = tradition_counts } 
				PAP = { has_country_flag = solo_scriptoris } 
				}
			OR = { 
				PAP = { has_country_flag = bread_and_wine } 
				PAP = { has_country_flag = elite_priests } 
				}
			OR = { 
				PAP = { has_country_flag = latin_only } 
				PAP = { has_country_flag = vernacular_allowed } 
				}
			OR = { #Any two of the four decisions will allow this event
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = solo_scriptoris }
					}
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = bread_and_wine }
					}
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = vernacular_allowed }
					}
				AND = { 
					PAP = { has_country_flag = solo_scriptoris }
					PAP = { has_country_flag = bread_and_wine }
					}
				AND = { 
					PAP = { has_country_flag = solo_scriptoris }
					PAP = { has_country_flag = vernacular_allowed }
					}
				AND = { 
					PAP = { has_country_flag = vernacular_allowed }
					PAP = { has_country_flag = bread_and_wine }
					}
				}
			OR = { 
				PAP = { has_country_flag = clerical_residence }
				PAP = { has_country_flag = simony_abolished }
				PAP = { has_country_flag = annate_abolished }
				PAP = { has_country_flag = seminaries }
				PAP = { has_country_flag = papal_conciliarism }
				PAP = { has_country_flag = nepotism_abolished }
				PAP = { has_country_flag = indulgences_banned }
				}
			}
		country_event = 551538
		}
	}
}

country_event = { #Fate of the Catholic Church (Scripture and Tradition)

id = 551535

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { has_country_flag = church_council }
	NOT = { PAP = { has_country_flag = tradition_counts } }
	NOT = { PAP = { has_country_flag = solo_scriptoris } }
	religion_years = { protestant = 10 }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 

	months = 12

	modifier = {
		ai = yes
		factor = 0.7
		}
	
	}

title = "EVTNAME551533" #Same
desc = "EVTDESC551535"

option = { 
	name = "EVTOPTA551535" #Scripture and Tradition are equally important
	ai_chance = { factor = 75 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = tradition_tendency } }
		PAP = { set_country_flag = tradition_counts clr_country_flag = scripture_tendency innovative_narrowminded = 1 }
		}
	PAP = { 
		set_country_flag = tradition_tendency
		set_country_flag = council_accomplishments
		prestige = +0.01
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = tradition_counts } }
		PAP = { clr_country_flag = tradition_tendency }
		any_country = { 
			limit = { 
				NOT = { ai = yes }
				NOT = { capital_scope = { owned_by = THIS } }
				religion = catholic
				OR = { 
					AND = { 
						has_country_flag = religious_news_major
						OR = { 
							defender_of_faith = yes
							government = papal_government
							has_country_flag = curia_controller
							}
						}
					has_country_flag = religious_news_trivial
					}
				}
			country_event = 551115
			}
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			PAP = { has_country_flag = jesuits_founded }
			OR = { 
				PAP = { has_country_flag = good_works_needed } 
				PAP = { has_country_flag = faith_alone } 
				}
			OR = { 
				PAP = { has_country_flag = tradition_counts } 
				PAP = { has_country_flag = solo_scriptoris } 
				}
			OR = { 
				PAP = { has_country_flag = bread_and_wine } 
				PAP = { has_country_flag = elite_priests } 
				}
			OR = { 
				PAP = { has_country_flag = latin_only } 
				PAP = { has_country_flag = vernacular_allowed } 
				}
			OR = { #Any two of the four decisions will allow this event
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = tradition_counts }
					}
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = elite_priests }
					}
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = latin_only }
					}
				AND = { 
					PAP = { has_country_flag = tradition_counts }
					PAP = { has_country_flag = elite_priests }
					}
				AND = { 
					PAP = { has_country_flag = tradition_counts }
					PAP = { has_country_flag = latin_only }
					}
				AND = { 
					PAP = { has_country_flag = elite_priests }
					PAP = { has_country_flag = latin_only }
					}
				}
			}
		country_event = 551537
		}
	}
option = { 
	name = "EVTOPTB551535" #We must be based on scripture alone
	ai_chance = { factor = 25 }
	prestige = -0.02
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = scripture_tendency } }
		PAP = { set_country_flag = solo_scriptoris clr_country_flag = tradition_tendency innovative_narrowminded = -1 }
		any_country = { 
			limit = { 
				NOT = { ai = yes }
				NOT = { capital_scope = { owned_by = THIS } }
				religion = catholic
				OR = { 
					AND = { 
						has_country_flag = religious_news_major
						OR = { 
							defender_of_faith = yes
							government = papal_government
							has_country_flag = curia_controller
							}
						}
					has_country_flag = religious_news_trivial
					}
				}
			country_event = 551116
			}
		}
	PAP = { 
		set_country_flag = scripture_tendency
		set_country_flag = council_accomplishments
		prestige = -0.02
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = solo_scriptoris } }
		PAP = { clr_country_flag = scripture_tendency }
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			PAP = { has_country_flag = jesuits_founded }
			NOT = { PAP = { has_country_flag = counter_reformation } }
			NOT = { PAP = { has_country_flag = catholic_reformation } }
			OR = { 
				PAP = { has_country_flag = good_works_needed } 
				PAP = { has_country_flag = faith_alone } 
				}
			OR = { 
				PAP = { has_country_flag = tradition_counts } 
				PAP = { has_country_flag = solo_scriptoris } 
				}
			OR = { 
				PAP = { has_country_flag = bread_and_wine } 
				PAP = { has_country_flag = elite_priests } 
				}
			OR = { 
				PAP = { has_country_flag = latin_only } 
				PAP = { has_country_flag = vernacular_allowed } 
				}
			OR = { #Any two of the four decisions will allow this event
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = solo_scriptoris }
					}
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = bread_and_wine }
					}
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = vernacular_allowed }
					}
				AND = { 
					PAP = { has_country_flag = solo_scriptoris }
					PAP = { has_country_flag = bread_and_wine }
					}
				AND = { 
					PAP = { has_country_flag = solo_scriptoris }
					PAP = { has_country_flag = vernacular_allowed }
					}
				AND = { 
					PAP = { has_country_flag = vernacular_allowed }
					PAP = { has_country_flag = bread_and_wine }
					}
				}
			OR = { 
				PAP = { has_country_flag = clerical_residence }
				PAP = { has_country_flag = simony_abolished }
				PAP = { has_country_flag = annate_abolished }
				PAP = { has_country_flag = seminaries }
				PAP = { has_country_flag = papal_conciliarism }
				PAP = { has_country_flag = nepotism_abolished }
				PAP = { has_country_flag = indulgences_banned }
				}
			}
		country_event = 551538
		}
	}

}

country_event = { #Fate of the Catholic Church (Faith and Good Works)

id = 551536

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { has_country_flag = church_council }
	NOT = { PAP = { has_country_flag = good_works_needed } }
	NOT = { PAP = { has_country_flag = faith_alone } }
	religion_years = { protestant = 10 }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 

	months = 12

	modifier = {
		ai = yes
		factor = 0.7
		}
	
	}

title = "EVTNAME551533" #Same
desc = "EVTDESC551536"

option = { 
	name = "EVTOPTA551536" #Faith without works is dead
	ai_chance = { factor = 75 }
	prestige = +0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = works_tendency } }
		PAP = { set_country_flag = good_works_needed clr_country_flag = faith_tendency innovative_narrowminded = 1 }
		}
	PAP = { 
		set_country_flag = works_tendency
		set_country_flag = council_accomplishments
		prestige = +0.01
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = good_works_needed } }
		PAP = { clr_country_flag = works_tendency }
		any_country = { 
			limit = { 
				NOT = { ai = yes }
				NOT = { capital_scope = { owned_by = THIS } }
				religion = catholic
				OR = { 
					AND = { 
						has_country_flag = religious_news_major
						OR = { 
							defender_of_faith = yes
							government = papal_government
							has_country_flag = curia_controller
							}
						}
					has_country_flag = religious_news_trivial
					}
				}
			country_event = 551117
			}
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			PAP = { has_country_flag = jesuits_founded }
			OR = { 
				PAP = { has_country_flag = good_works_needed } 
				PAP = { has_country_flag = faith_alone } 
				}
			OR = { 
				PAP = { has_country_flag = tradition_counts } 
				PAP = { has_country_flag = solo_scriptoris } 
				}
			OR = { 
				PAP = { has_country_flag = bread_and_wine } 
				PAP = { has_country_flag = elite_priests } 
				}
			OR = { 
				PAP = { has_country_flag = latin_only } 
				PAP = { has_country_flag = vernacular_allowed } 
				}
			OR = { #Any two of the four decisions will allow this event
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = tradition_counts }
					}
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = elite_priests }
					}
				AND = { 
					PAP = { has_country_flag = good_works_needed }
					PAP = { has_country_flag = latin_only }
					}
				AND = { 
					PAP = { has_country_flag = tradition_counts }
					PAP = { has_country_flag = elite_priests }
					}
				AND = { 
					PAP = { has_country_flag = tradition_counts }
					PAP = { has_country_flag = latin_only }
					}
				AND = { 
					PAP = { has_country_flag = elite_priests }
					PAP = { has_country_flag = latin_only }
					}
				}
			}
		country_event = 551537
		}
	}
option = { 
	name = "EVTOPTB551536" #Faith alone will let you into Heaven
	ai_chance = { factor = 25 }
	prestige = -0.02
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = faith_tendency } }
		PAP = { set_country_flag = faith_alone clr_country_flag = works_tendency clr_country_flag = faith_tendency innovative_narrowminded = -1 }
		}
	PAP = { 
		set_country_flag = faith_tendency
		set_country_flag = council_accomplishments
		prestige = -0.02
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = faith_alone } }
		PAP = { clr_country_flag = faith_tendency }
		any_country = { 
			limit = { 
				NOT = { ai = yes }
				NOT = { capital_scope = { owned_by = THIS } }
				religion = catholic
				OR = { 
					AND = { 
						has_country_flag = religious_news_major
						OR = { 
							defender_of_faith = yes
							government = papal_government
							has_country_flag = curia_controller
							}
						}
					has_country_flag = religious_news_trivial
					}
				}
			country_event = 551118
			}
		}
	any_country = { 
		limit = { 
			capital_scope = { owned_by = THIS }
			capital_scope = { is_core = THIS }
			num_of_cities = 1
			PAP = { has_country_flag = jesuits_founded }
			NOT = { PAP = { has_country_flag = counter_reformation } }
			NOT = { PAP = { has_country_flag = catholic_reformation } }
			OR = { 
				PAP = { has_country_flag = good_works_needed } 
				PAP = { has_country_flag = faith_alone } 
				}
			OR = { 
				PAP = { has_country_flag = tradition_counts } 
				PAP = { has_country_flag = solo_scriptoris } 
				}
			OR = { 
				PAP = { has_country_flag = bread_and_wine } 
				PAP = { has_country_flag = elite_priests } 
				}
			OR = { 
				PAP = { has_country_flag = latin_only } 
				PAP = { has_country_flag = vernacular_allowed } 
				}
			OR = { #Any two of the four decisions will allow this event
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = solo_scriptoris }
					}
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = bread_and_wine }
					}
				AND = { 
					PAP = { has_country_flag = faith_alone }
					PAP = { has_country_flag = vernacular_allowed }
					}
				AND = { 
					PAP = { has_country_flag = solo_scriptoris }
					PAP = { has_country_flag = bread_and_wine }
					}
				AND = { 
					PAP = { has_country_flag = solo_scriptoris }
					PAP = { has_country_flag = vernacular_allowed }
					}
				AND = { 
					PAP = { has_country_flag = vernacular_allowed }
					PAP = { has_country_flag = bread_and_wine }
					}
				}
			OR = { 
				PAP = { has_country_flag = clerical_residence }
				PAP = { has_country_flag = simony_abolished }
				PAP = { has_country_flag = annate_abolished }
				PAP = { has_country_flag = seminaries }
				PAP = { has_country_flag = papal_conciliarism }
				PAP = { has_country_flag = nepotism_abolished }
				PAP = { has_country_flag = indulgences_banned }
				}
			}
		country_event = 551538
		}
	}
}

country_event = { #The Counter-Reformation

id = 551537

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { has_country_flag = jesuits_founded }
	NOT = { PAP = { has_country_flag = counter_reformation } }
	NOT = { PAP = { has_country_flag = catholic_reformation } }
	OR = { 
		PAP = { has_country_flag = good_works_needed } 
		PAP = { has_country_flag = faith_alone } 
		}
	OR = { 
		PAP = { has_country_flag = tradition_counts } 
		PAP = { has_country_flag = solo_scriptoris } 
		}
	OR = { 
		PAP = { has_country_flag = bread_and_wine } 
		PAP = { has_country_flag = elite_priests } 
		}
	OR = { 
		PAP = { has_country_flag = latin_only } 
		PAP = { has_country_flag = vernacular_allowed } 
		}
	OR = { #Any two of the four decisions will allow this event
		AND = { 
			PAP = { has_country_flag = good_works_needed }
			PAP = { has_country_flag = tradition_counts }
			}
		AND = { 
			PAP = { has_country_flag = good_works_needed }
			PAP = { has_country_flag = elite_priests }
			}
		AND = { 
			PAP = { has_country_flag = good_works_needed }
			PAP = { has_country_flag = latin_only }
			}
		AND = { 
			PAP = { has_country_flag = tradition_counts }
			PAP = { has_country_flag = elite_priests }
			}
		AND = { 
			PAP = { has_country_flag = tradition_counts }
			PAP = { has_country_flag = latin_only }
			}
		AND = { 
			PAP = { has_country_flag = elite_priests }
			PAP = { has_country_flag = latin_only }
			}
		}
	}

mean_time_to_happen = { 

	months = 30

	modifier = { 
		innovative_narrowminded = 0
		factor = 0.75
		}
	modifier = { 
		innovative_narrowminded = 2
		factor = 0.75
		}
	modifier = { 
		innovative_narrowminded = 4
		factor = 0.75
		}
	}

title = "EVTNAME551537"
desc = "EVTDESC551537"

option = { 
	name = "EVTOPTA551537" #There can be no compromise with heresy
	random_owned = { 
		limit = { 
			OR = {
				AND = {
					owner = { religion = catholic }
					owner = { has_country_flag = curia_controller }
					}
				AND = {
					PAP = { has_country_flag = independent_pope }
					owner = { tag = PAP }
					}
				AND = {
					PAP = { has_country_flag = independent_pope }
					NOT = { exists = PAP }
					owner = { is_papal_controller = yes }
					}
				}
			}
		owner = { prestige = +0.01 }
		PAP = { 
			set_country_flag = counter_reformation
			clr_country_flag = reformation_council_called
			clr_country_flag = reformation_council_begging
			clr_country_flag = reformation_council_demands
			prestige = +0.01
			stability = +1
			}
		random_owned = {
			limit = { PAP = { has_country_flag = counter_reformation } }
			PA2 = { 
				set_country_flag = counter_reformation
				clr_country_flag = reformation_council_called
				clr_country_flag = reformation_council_begging
				clr_country_flag = reformation_council_demands
				}
			}
		owner = { 
			any_country = { 
				limit = { 
					religion = catholic
					NOT = { capital_scope = { owned_by = THIS } }
					NOT = { ai = yes }
					has_country_flag = religious_news_major
					}
				country_event = 551537
				}
			any_country = { 
				limit = { 
					NOT = { religion = catholic }
					NOT = { capital_scope = { owned_by = THIS } }
					NOT = { ai = yes }
					OR = { 
						religion_group = christian
						any_neighbor_country = { religion_group = christian }
						}
					has_country_flag = religious_news_trivial
					}
				country_event = 551537
				}
			}
		}
	}
}

country_event = { #The Catholic Reformation

id = 551538

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	PAP = { has_country_flag = jesuits_founded }
	NOT = { PAP = { has_country_flag = counter_reformation } }
	NOT = { PAP = { has_country_flag = catholic_reformation } }
	OR = { 
		PAP = { has_country_flag = good_works_needed } 
		PAP = { has_country_flag = faith_alone } 
		}
	OR = { 
		PAP = { has_country_flag = tradition_counts } 
		PAP = { has_country_flag = solo_scriptoris } 
		}
	OR = { 
		PAP = { has_country_flag = bread_and_wine } 
		PAP = { has_country_flag = elite_priests } 
		}
	OR = { 
		PAP = { has_country_flag = latin_only } 
		PAP = { has_country_flag = vernacular_allowed } 
		}
	OR = { #Any two of the four decisions will allow this event
		AND = { 
			PAP = { has_country_flag = faith_alone }
			PAP = { has_country_flag = solo_scriptoris }
			}
		AND = { 
			PAP = { has_country_flag = faith_alone }
			PAP = { has_country_flag = bread_and_wine }
			}
		AND = { 
			PAP = { has_country_flag = faith_alone }
			PAP = { has_country_flag = vernacular_allowed }
			}
		AND = { 
			PAP = { has_country_flag = solo_scriptoris }
			PAP = { has_country_flag = bread_and_wine }
			}
		AND = { 
			PAP = { has_country_flag = solo_scriptoris }
			PAP = { has_country_flag = vernacular_allowed }
			}
		AND = { 
			PAP = { has_country_flag = vernacular_allowed }
			PAP = { has_country_flag = bread_and_wine }
			}
		}
	OR = { 
		PAP = { has_country_flag = clerical_residence }
		PAP = { has_country_flag = simony_abolished }
		PAP = { has_country_flag = annate_abolished }
		PAP = { has_country_flag = seminaries }
		PAP = { has_country_flag = papal_conciliarism }
		PAP = { has_country_flag = nepotism_abolished }
		PAP = { has_country_flag = indulgences_banned }
		}
	}

mean_time_to_happen = { 

	months = 60

	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.25	
		}
	modifier = { 
		PAP = { has_country_flag = clerical_residence }
		factor = 0.8
		}
	modifier = { 
		PAP = { has_country_flag = simony_abolished }
		factor = 0.8
		}
	modifier = { 
		PAP = { has_country_flag = annate_abolished }
		factor = 0.8
		}
	modifier = { 
		PAP = { has_country_flag = nepotism_abolished }
		factor = 0.8
		}
	modifier = { 
		PAP = { has_country_flag = indulgences_banned }
		factor = 0.8
		}
	modifier = { 
		PAP = { has_country_flag = seminaries }
		factor = 0.8
		}
	}

title = "EVTNAME551538"
desc = "EVTDESC551538"

option = { 
	name = "EVTOPTB551538" #Demand absolute submission to the church
	ai_chance = { factor = 75 }
	prestige = -0.05
	PAP = { 
		set_country_flag = absolute_submission
		set_country_flag = catholic_reformation
		clr_country_flag = reformation_council_called
		clr_country_flag = reformation_council_begging
		clr_country_flag = reformation_council_demands
		prestige = -0.05
		stability = -2
		}
	random_owned = {
		limit = { PAP = { has_country_flag = catholic_reformation } }
		PA2 = { 
			set_country_flag = catholic_reformation 
			clr_country_flag = reformation_council_called
			clr_country_flag = reformation_council_begging
			clr_country_flag = reformation_council_demands
			}
		any_country = {
			limit = { 
				OR = { 
					religion = catholic 
					religion = reformed 
					religion = protestant
					#%$ religion = anglican
					#%$ religion = gallican
					} 
				}
			set_country_flag = absolute_submission
			}
		}
	}
option = { 
	name = "EVTOPTA551538" #Allow heretics to keep their stolen property
	ai_chance = { factor = 25 }
	prestige = -0.10
	stability = -1
	PAP = { 
		set_country_flag = catholic_reformation 
		clr_country_flag = reformation_council_called
		clr_country_flag = reformation_council_begging
		clr_country_flag = reformation_council_demands
		prestige = -0.10
		stability = -2
		}
	random_owned = { 
		limit = { PAP = { has_country_flag = catholic_reformation } }
		PA2 = { 
			set_country_flag = catholic_reformation 
			clr_country_flag = reformation_council_called
			clr_country_flag = reformation_council_begging
			clr_country_flag = reformation_council_demands
			}
		}
	}
}
country_event = { #The Infidel Threat

id = 551539

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = crusade_demand }
	NOT = { exists = PA2 }
	OR = { 
		PAP = { has_country_flag = corrupt_pope }
		PAP = { has_country_flag = secular_pope }
		PAP = { has_country_flag = reformer_pope }
		}
	}

mean_time_to_happen = { 

	months = 3

	modifier = { 
		idea = deus_vult
		factor = 0.5
		}
	}

title = "EVTNAME551539"
desc = "EVTDESC551539"

option = { 
name = "EVTOPTA551539" #Call a crusade
	ai_chance = { 
		factor = 50 
		days = 1
		modifier = { 
			idea = deus_vult
			factor = 1.4
			}
		modifier = { 
			MIL = 6
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = crusade_sponsor
				has_country_flag = crusade_promised
				religion = catholic
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = crusade_sponsor
				NOT = { religion = catholic }
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = crusade_sponsor
				has_country_flag = humanism
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = crusade_sponsor
				has_country_flag = conciliarism_supported
				}
			factor = 0.7
			}
		modifier = { 
			any_neighbor_country = { has_country_flag = crusade_sponsor }
			factor = 2
			}
		modifier = { 
			any_neighbor_country = { has_country_flag = crusade_target }
			factor = 2
			}
		} 
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		clr_country_flag = crusade_demand
		set_country_flag = crusade_called
		set_country_flag = crusader
		}
	any_country = { 
		limit = { has_country_flag = crusade_target }
		set_country_flag = crusade_target_notified
		add_casus_belli = THIS
		relation = { who = THIS value = -100 }
		}
	any_country = { 
		limit = { has_country_flag = crusade_sponsor }
		relation = { who = THIS value = 50 }
		clr_country_flag = crusade_promised
		country_event = 55177
		}
	set_country_flag = crusader
	random_owned = { 
		limit = { owner = { has_country_flag = crusader } }
		PA2 = { 
			clr_country_flag = crusade_demand
			set_country_flag = crusade_called
			}
		}
	}
option = { 
	name = "EVTOPTB551539" #Other matters demand our attention
	ai_chance = { 
		factor = 50 
		days = 1
		modifier = { 
			any_known_country = { 
				has_country_flag = crusade_sponsor
				has_country_flag = crusade_promised
				religion = catholic
				}
			factor = 0.5
			}
		modifier = { 
			PAP = { has_country_flag = crusade_sponsor }
			factor = 0.5
			}
		modifier = { 
			has_country_flag = crusade_sponsor
			factor = 0
			}
		} 
	any_country = { 
		limit = { has_country_flag = hussite_crusade }
		relation = { who = THIS value = -50 }
		set_country_flag = crusade_denied
		country_event = 55305
		}
	any_country = { 
		limit = { has_country_flag = crusade_sponsor }
		relation = { who = THIS value = -50 }
		clr_country_flag = crusade_sponsor
		set_country_flag = crusade_denied
		country_event = 55178
		}
	set_country_flag = crusade_busy
	random_owned = {
		limit = { owner = { has_country_flag = crusade_busy } }
		owner = { clr_country_flag = crusade_busy }
		PAP = { clr_country_flag = crusade_demand }
		PA2 = { clr_country_flag = crusade_demand }
		any_country = { 
			limit = { has_country_flag = crusade_target }
			clr_country_flag = crusade_target
			}
		}
	}
}

country_event = { #A Change in Policy

id = 551540

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	has_country_flag = excommunication_decree
	}

mean_time_to_happen = { months = 1 }

title = "EVTNAME551540"
desc = "EVTDESC551540"

option = { 
	name = "EVTOPTA551540"
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	clr_country_flag = excommunication_decree
	clr_country_flag = excommunication_broken_promises
	clr_country_flag = excommunication_unjust_war
	clr_country_flag = excommunication_invading_Rome
	clr_country_flag = excommunication_sponsoring_schism
	clr_country_flag = excommunication_hussites
	clr_country_flag = excommunication_secular_Rome
	clr_country_flag = excommunication_heathen_friendship
	}
}

country_event = { #The Age of Reason

id = 551541

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = second_great_schism }
	NOT = { PAP = { has_country_flag = decline_of_religion } }
	NOT = { PAP = { has_country_flag = decline_of_papacy } } 
	year = 1600
	}

mean_time_to_happen = { 

	months = 120

	}

title = "EVTNAME551541" 
desc = "EVTDESC551046" #Same

option = {
	name = "EVTOPTA551541" #Religion is declining in importance
	prestige = -0.01
	missionaries = -1
	PAP = { prestige = -0.01 }
	PAP = { set_country_flag = decline_of_religion }
	PA2 = { set_country_flag = decline_of_religion }
	}
}

country_event = { #Decline of the Papacy

id = 551542

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = decline_of_religion }
	NOT = { PAP = { has_country_flag = decline_of_papacy } } 
	}

mean_time_to_happen = { 

	months = 180

	}

title = "EVTNAME551542" 
desc = "EVTDESC551542"

option = {
	name = "EVTOPTA551542" #He is a shadow of the past
	prestige = -0.10
	PAP = { 
		prestige = -0.10 
		badboy = -5
		set_country_flag = decline_of_papacy
		}
	random_owned = {
		limit = { PAP = { has_country_flag = decline_of_papacy } }
		PA2 = { set_country_flag = decline_of_papacy }
		}
	}
}

country_event = { #General Council begins

id = 55543

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = council_begins }
	}

mean_time_to_happen = { 

	months = 1

	}

title = "EVTNAME551543"
desc = "EVTDESC551543"

option = {
	name = "EVTOPTA551543"
	random_owned = { 
		limit = { 
			owner = { NOT = { missionaries = 1 } } 
			OR = { 
				AND = {
					owner = { religion = catholic }
					owner = { has_country_flag = curia_controller }
					}
				AND = {
					PAP = { has_country_flag = independent_pope }
					owner = { tag = PAP }
					}
				AND = {
					PAP = { has_country_flag = independent_pope }
					NOT = { exists = PAP }
					owner = { is_papal_controller = yes }
					}
				}
			} 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { 
			owner = { missionaries = 1 } 
			OR = { 
				AND = {
					owner = { religion = catholic }
					owner = { has_country_flag = curia_controller }
					}
				AND = {
					PAP = { has_country_flag = independent_pope }
					owner = { tag = PAP }
					}
				AND = {
					PAP = { has_country_flag = independent_pope }
					NOT = { exists = PAP }
					owner = { is_papal_controller = yes }
					}
				}
			}
		owner = { missionaries = -1 }
		}
	random_country = { 
		limit = { 
			religion = catholic
			any_owned_province = { has_province_modifier = church_council } 
			}
		relation = { who = THIS value = 5 }
		}
	PAP = { 
		set_country_flag = church_council 
		clr_country_flag = council_begins
		}
	PA2 = { set_country_flag = union_council }
	}

}

country_event = { #Church council ends

id = 551544

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = council_over_success }
	}

mean_time_to_happen = { 

	months = 1

	}

title = "EVTNAME551544"
desc = "EVTDESC551544"

option = {
	name = "EVTOPTA551544"
	prestige = 0.03
	any_country = { 
		limit = { has_country_flag = attend_council religion = catholic }
		relation = { who = THIS value = +5 }
		clr_country_flag = attend_council
		}
	PAP = { 
		relation = { who = THIS value = +25 }
		clr_country_flag = church_council 
		clr_country_flag = council_over_success
		clr_country_flag = council_over_failure
		clr_country_flag = council_over_threatened
		clr_country_flag = council_over
		}
	}

}

country_event = { #Independence of the Vatican

id = 551545

is_triggered_only = yes #By decision

title = "EVTNAME551545"
desc = "EVTDESC551545"

option = {
	name = "EVTOPTA551545" #Offer to recognize the usurper
	ai_chance = { 
		factor = 50
		days = 1
		modifier = { 
			PAP = { has_country_flag = decline_of_religion }
			factor = 1.4
			}
		modifier = { 
			PAP = { has_country_flag = decline_of_papacy }
			factor = 1.4
			}
		modifier = {
			118 = { owner = { war_with = THIS } }
			factor = 0.2
			}
		modifier = {
			118 = { owner = { badboy = 2 } }
			factor = 0.8
			}
		modifier = {
			118 = { owner = { badboy = 1.5 } }
			factor = 0.8
			}
		modifier = {
			118 = { owner = { badboy = 1 } }
			factor = 0.8
			}
		modifier = { 
			118 = { owner = { badboy = 0.75 } }
			factor = 0.8
			}
		modifier = { 
			118 = { owner = { badboy = 0.5 } }
			factor = 0.8
			}
		modifier = { 
			118 = { owner = { badboy = 0.25 } }
			factor = 0.8
			}
		modifier = { 
			is_core = 118
			factor = 0.7
			}
		modifier = { 
			118 = { owner = { marriage_with = THIS } }
			factor = 1.4
			}
		modifier = { 
			118 = { owner = { alliance_with = THIS } }
			factor = 1.4
			}
		modifier = { 
			overlord = { owns = 118 }
			factor = 2
			}
		}
	prestige = -0.05
	random_owned = {
		limit = { owner = { has_country_flag = Roman_crusade } }
		owner = { 
			remove_core = 118
			clr_country_flag = Roman_crusade
			}
		}
	random_country = { 
		limit = { owns = 118 }
		relation = { who = THIS value = 50 }
		country_event = 551629
		}
	any_country = {
		limit = {
			religion = catholic
			idea = divine_supremacy
			num_of_cities = 1
			NOT = { capital_scope = { owned_by = THIS } }
			}
		relation = { who = THIS value = -25 }
		}
	}
option = {
	name = "EVTOPTB551545" #Rome is the rightful seat of the pope
	ai_chance = { 
		factor = 50 
		days = 1
		modifier = { 
			owns = 118
			factor = 0
			}
		modifier = { 
			118 = { owner = { NOT = { religion = catholic } } }
			NOT = { idea = ecumenism }
			factor = 1.4
			}
		modifier = { 
			118 = { owner = { has_country_flag = excommunicated } }
			factor = 1.4
			}
		}
	set_country_flag = Roman_crusade
	add_core = 118
	random_country = { 
		limit = { owns = 118 }
		country_event = 551638
		relation = { who = THIS value = -25 }
		casus_belli = THIS
		}
	}
}

country_event = { #Church council postponed

id = 551546

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = council_over_failure }
	}

mean_time_to_happen = { 

	months = 1

	}

title = "EVTNAME551546"
desc = "EVTDESC551546"

option = {
	name = "EVTOPTA551546"
	prestige = -0.01
	any_country = { 
		limit = { has_country_flag = attend_council }
		relation = { who = THIS value = -5 }
		clr_country_flag = attend_council
		}
	PAP = { 
		relation = { who = THIS value = -5 }
		clr_country_flag = church_council
		clr_country_flag = council_over_threatened
		clr_country_flag = council_over_success
		clr_country_flag = council_over_failure
		clr_country_flag = council_over
		}
	}

}

country_event = { #Church council threatened

id = 551547

trigger = { 
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = council_over_threatened }
	}

mean_time_to_happen = { 

	months = 1

	}

title = "EVTNAME551547"
desc = "EVTDESC551547"

option = {
	name = "EVTOPTA551547"
	prestige = -0.01
	any_country = { 
		limit = { has_country_flag = attend_council }
		relation = { who = THIS value = -5 }
		clr_country_flag = attend_council
		}
	PAP = { 
		relation = { who = THIS value = -5 }
		clr_country_flag = church_council
		clr_country_flag = council_over_threatened
		clr_country_flag = council_over_success
		clr_country_flag = council_over_failure
		clr_country_flag = council_over
		}
	}
}

country_event = { #Death of the Pope notifier

id = 551548

is_triggered_only = yes

title = "EVTNAME551501"
desc = "EVTDESC551501"

option = {
	name = "EVTOPTA551548" #Follow the news from the Holy See
	set_variable = { which = "conclave_news" value = 2 }
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } diplomats = 1 }
		owner = { diplomats = -1 set_variable = { which = "conclave_news" value = 3 } }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 set_variable = { which = "conclave_news" value = 4 } }
		}
	}
option = {
	name = "EVTOPTB551548" #We have more pressing matters
	set_variable = { which = "conclave_news" value = 2 }
	}
}

country_event = { #Election of the Pope notifier

id = 551549

is_triggered_only = yes

title = "EVTNAME551549"
desc = "EVTDESC551549"

immediate = { 
	random_owned = { 
		limit = { owner = { has_country_flag = enemy_of_pope } }
		owner = { change_variable = { which = "conclave_news" value = -1 } }
		}
	random_owned = { 
		limit = { owner = { has_country_flag = hated_enemy_of_pope } }
		owner = { change_variable = { which = "conclave_news" value = -1 } }
		}
	}

option = {
	name = "EVTOPTA551549"
	random_owned = {
		limit = { owner = { tag = PAP } }
		owner = { kill_ruler = THIS }
		}
	random_owned = {
		limit = { 
			owner = { NOT = { tag = PA2 } } 
			exists = PA2
			owner = { religion = catholic }
			}
		owner = { 
			relation = { who = PA2 value = -50 } 
			clr_country_flag = support_antipope
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				NOT = { religion = catholic }
				religion_group = christian
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 1 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 0 }
				NOT = { check_variable = { which = "conclave_news" value = 1 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = -20 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 1 }
				NOT = { check_variable = { which = "conclave_news" value = 2 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = -10 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 2 }
				NOT = { check_variable = { which = "conclave_news" value = 3 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 1 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 3 }
				NOT = { check_variable = { which = "conclave_news" value = 4 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 10 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 4 }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 20 }
			}
		}
	set_variable = { which = "conclave_news" value = 0 }
	}
}

country_event = { #Election of the Pope notifier

id = 551550

is_triggered_only = yes

title = "EVTNAME551549"
desc = "EVTDESC551550"

immediate = { 
	random_owned = { 
		limit = { owner = { has_country_flag = enemy_of_pope } }
		owner = { change_variable = { which = "conclave_news" value = -1 } }
		}
	random_owned = { 
		limit = { owner = { has_country_flag = hated_enemy_of_pope } }
		owner = { change_variable = { which = "conclave_news" value = -1 } }
		}
	}

option = {
	name = "EVTOPTA551550"
	random_owned = {
		limit = { owner = { tag = PAP } }
		owner = { kill_ruler = THIS }
		}
	random_owned = {
		limit = { 
			owner = { NOT = { tag = PA2 } } 
			exists = PA2
			owner = { religion = catholic }
			}
		owner = { 
			relation = { who = PA2 value = -5 } 
			clr_country_flag = support_antipope
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				NOT = { religion = catholic }
				religion_group = christian
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 1 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 0 }
				NOT = { check_variable = { which = "conclave_news" value = 1 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = -20 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 1 }
				NOT = { check_variable = { which = "conclave_news" value = 2 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = -10 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 2 }
				NOT = { check_variable = { which = "conclave_news" value = 3 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 1 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 3 }
				NOT = { check_variable = { which = "conclave_news" value = 4 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 10 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 4 }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 20 }
			}
		}
	set_variable = { which = "conclave_news" value = 0 }
	}
}

country_event = { #Election of the Pope notifier

id = 551551

is_triggered_only = yes

title = "EVTNAME551549"
desc = "EVTDESC551551"

immediate = { 
	random_owned = { 
		limit = { owner = { has_country_flag = enemy_of_pope } }
		owner = { change_variable = { which = "conclave_news" value = -1 } }
		}
	random_owned = { 
		limit = { owner = { has_country_flag = hated_enemy_of_pope } }
		owner = { change_variable = { which = "conclave_news" value = -1 } }
		}
	}

option = {
	name = "EVTOPTA551551"
	random_owned = {
		limit = { owner = { tag = PAP } }
		owner = { kill_ruler = THIS }
		}
	random_owned = {
		limit = { 
			owner = { NOT = { tag = PA2 } } 
			exists = PA2
			owner = { religion = catholic }
			}
		owner = { relation = { who = PA2 value = 25 } }
		}
	random_owned = { 
		limit = { 
			owner = { 
				NOT = { religion = catholic }
				religion_group = christian
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 1 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 0 }
				NOT = { check_variable = { which = "conclave_news" value = 1 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = -20 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 1 }
				NOT = { check_variable = { which = "conclave_news" value = 2 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = -10 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 2 }
				NOT = { check_variable = { which = "conclave_news" value = 3 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 1 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 3 }
				NOT = { check_variable = { which = "conclave_news" value = 4 } }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 10 }
			}
		}
	random_owned = { 
		limit = { 
			owner = { 
				religion = catholic
				check_variable = { which = "conclave_news" value = 4 }
				}
			}
		any_country = { 
			limit = { 
				OR = { 
					has_country_flag = curia_controller
					tag = PAP
					}
				NOT = { capital_scope = { owned_by = THIS } }
				}
			relation = { who = THIS value = 20 }
			}
		}
	set_variable = { which = "conclave_news" value = 0 }
	}
}

country_event = { #Healing the Schism

id = 551552

trigger = { 
	exists = PA2
	PAP = { has_country_flag = church_council }
	NOT = { PAP = { has_country_flag = secular_veto_conceded } }
	NOT = { PAP = { has_country_flag = council_over } }
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	}

mean_time_to_happen = { 

	months = 12

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.2
		}
	}

title = "EVTNAME551552"
desc = "EVTDESC551552"

option = { 
	name = "EVTOPTA551552" #Grant secular princes a veto
	ai_chance = { 
		factor = 50 
		days = 1
		modifier = { 
			factor = 1.2
			year = 1405 #There is more pressure to make concessions the longer a schism lasts
			}
		modifier = { 
			factor = 1.2
			year = 1410
			}
		modifier = { 
			factor = 1.2
			year = 1415
			}
		modifier = { 
			factor = 1.2
			year = 1420
			}
		modifier = { 
			factor = 1.2
			year = 1425
			}
		modifier = { 
			factor = 1.2
			year = 1430
			}
		modifier = { 
			factor = 1.2
			year = 1435
			}
		modifier = { 
			factor = 1.2
			year = 1440
			}
		} 
	prestige = -0.05
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			OR = { 
				tag = FRA
				is_emperor = yes
				has_country_flag = curia_controller
				}
			num_of_cities = 4
			}
		relation = { who = THIS value = 100 }
		}
	PAP = { 
		stability = -1
		prestige = -0.10
		centralization_decentralization = 1
		set_country_flag = secular_veto_conceded
		change_variable = { which = conciliarism value = 1 }
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		set_country_flag = council_over
		}
	any_country = { 
		limit = { 
			NOT = { capital_scope = { owned_by = THIS } }
			num_of_cities = 1
			religion = catholic
			NOT = { ai = yes }
			OR = { 
				government = papal_government
				has_country_flag = religious_news_trivial
				AND = { 
					has_country_flag = religious_news_major
					OR = { 
						tag = FRA
						tag = PAP
						tag = PA2
						is_emperor = yes
						has_country_flag = great_power
						}
					}
				}
			}
		country_event = 551101 #Notifier
		}
	#Invisible effects
	}
option = {
	name = "EVTOPTB551552" #Call on the cardinals to unite
	ai_chance = { factor = 50 }
	any_country = { 
		limit = { 
			religion = catholic
			OR = { 
				tag = FRA
				is_emperor = yes
				has_country_flag = curia_controller
				num_of_cities = 10
				}
			num_of_cities = 4
			}
		relation = { who = THIS value = -25 }
		}
	}
}



country_event = { #Healing the Schism

id = 551553

trigger = { 
	exists = PA2
	PAP = { has_country_flag = church_council }
	NOT = { PAP = { has_country_flag = regular_councils_promised } }
	NOT = { PAP = { has_country_flag = council_over } }
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	}

mean_time_to_happen = { 

	months = 12

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.2
		}
	}

title = "EVTNAME551553"
desc = "EVTDESC551553"

option = { 
	name = "EVTOPTA551553" #Promise to hold regular councils
	ai_chance = { 
		factor = 50 
		days = 1
		modifier = { 
			factor = 1.2
			year = 1405 #There is more pressure to make concessions the longer a schism lasts
			}
		modifier = { 
			factor = 1.2
			year = 1410
			}
		modifier = { 
			factor = 1.2
			year = 1415
			}
		modifier = { 
			factor = 1.2
			year = 1420
			}
		modifier = { 
			factor = 1.2
			year = 1425
			}
		modifier = { 
			factor = 1.2
			year = 1430
			}
		modifier = { 
			factor = 1.2
			year = 1435
			}
		modifier = { 
			factor = 1.2
			year = 1440
			}
		} 
	prestige = -0.05
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 } }
		owner = { missionaries = -2 }
		}
	PAP = { 
		stability = -1
		prestige = -0.10
		centralization_decentralization = 2
		set_country_flag = regular_councils_promised
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		set_country_flag = council_over
		change_variable = { which = conciliarism value = 2 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { ai = yes }
			NOT = { capital_scope = { owned_by = THIS } }
			OR = { 
				tag = PAP
				tag = PA2
				has_country_flag = religious_news_trivial
				}
			}
		country_event = 551102 #Notifier
		}
	any_country = { 
		limit = { 
			religion = catholic
			OR = { 
				tag = FRA
				is_emperor = yes
				has_country_flag = curia_controller
				num_of_cities = 10
				}
			num_of_cities = 4
			}
		relation = { who = THIS value = 25 }
		}
	}
option = {
	name = "EVTOPTB551553" #Maintain the superiority of the papacy
	ai_chance = { factor = 50 }
	any_country = { 
		limit = { 
			religion = catholic
			OR = { 
				tag = FRA
				is_emperor = yes
				has_country_flag = curia_controller
				num_of_cities = 10
				}
			num_of_cities = 4
			}
		relation = { who = THIS value = -25 }
		}
	}
}

country_event = { #Lollardy

id = 551554

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	OR = { 
		AND = { PAP = { has_country_flag = reformer_pope } PAP = { has_country_flag = papal_authority } }
		PAP = { has_country_flag = church_council }
		}
	NOT = { PAP = { has_country_flag = lollardy_banned } }
	NOT = { has_country_flag = lollards_ignored }
	NOT = { PAP = { has_country_flag = counter_reformation } }
	NOT = { PAP = { has_country_flag = catholic_reformation } }
	NOT = { PAP = { has_country_flag = council_over } }
	NOT = { is_religion_enabled = protestant }
	}

mean_time_to_happen = { 
	
	months = 180

	modifier = { 
		NOT = { exists = PA2 }
		factor = 0.5
		}
	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = reformer_pope }
		factor = 0.7
		}
	modifier = { 
		PAP = { has_country_flag = church_council }
		factor = 0.1 #church councils last only a short time
		}
	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.7
		}
	}

title = "EVTNAME551554"
desc = "EVTDESC551554"

option = { 
	name = "EVTOPTA551554" #Excommunicate the Lollards
	ai_chance = { factor = 80 } 
	prestige = 0.01
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	PAP = { 
		prestige = 0.01
		set_country_flag = lollardy_banned
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	any_country = { 
		limit = { 
			NOT = { capital_scope = { owned_by = THIS } }
			NOT = { ai = yes }
			religion = catholic
			OR = { 
				AND = { 
					has_country_flag = religious_news_major
					any_owned_province = { OR = { culture = english culture = czech } }
					}
				has_country_flag = religious_news_trivial
				}
			}
		}
	any_country = { 
		limit = { has_country_flag = ignore_lollards }
		clr_country_flag = ignore_lollards
		}
	any_country = { 
		limit = { has_country_flag = lollards_ignored }
		clr_country_flag = lollards_ignored
		}
	}
option = {
	name = "EVTOPTB551554" #Ignore them
	ai_chance = { 
		factor = 20
		days = 1
		modifier = { 
			has_country_flag = ignore_lollards
			factor = 0.5
			}
		}
	any_country = { 
		limit = { 
			OR = { 
				primary_culture = english
				primary_culture = czech
				}
			num_of_cities = 1 
			NOT = { capital_scope = { owned_by = THIS } }
		}
		relation = { who = THIS value = -25 }
		}
	random_owned = { 
		limit = { has_country_flag = ignore_lollards }
		owner = { clr_country_flag = ignore_lollards set_country_flag = lollards_ignored }
		}
	random_owned = { 
		limit = { NOT = { has_country_flag = ignore_lollards } NOT = { has_country_flag = lollards_ignored } }
		owner = { set_country_flag = ignore_lollards }
		}
	}
}

country_event = { #Healing the Schism (calling church council)

id = 551555

trigger = { 
	exists = PA2
	exists = PAP
	religion = catholic
	OR = {
		is_emperor = yes
		has_country_flag = curia_controller
		defender_of_faith = yes
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	OR = { 
		missionaries = 2
		diplomats = 2
		AND = { missionaries = 1 diplomats = 1 }
		}
	PAP = { 
		OR = { 
			has_country_flag = calls_for_council 
			has_country_flag = regular_councils_promised
			has_country_flag = regular_councils_supposedly_promised
			}
		NOT = { has_country_flag = church_council }
		NOT = { has_country_flag = church_council_called }
		OR = { 
			has_country_flag = reformer_pope
			has_country_flag = secular_pope
			has_country_flag = papal_conciliarism
			has_country_flag = regular_councils_promised
			has_country_flag = regular_councils_supposedly_promised
			}
		}
	PAP = { NOT = { has_country_flag = potential_schism } }
	NOT = { badboy = 1 } #Fighting badboy wars
	}

mean_time_to_happen = { 

	months = 48

	modifier = { 
		war = yes
		factor = 2
		}
	}

title = "EVTNAME551555"
desc = "EVTDESC551555"

option = {
	name = "EVTOPTA551555" #Demand a council be called to end the schism
	ai_chance = { factor = 50 }
	any_country = { 
		limit = { 
			has_country_flag = conciliarism_supported 
			num_of_cities = 4
			}
		relation = { who = THIS value = 25 }
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -3 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 NOT = { missionaries = 2 } } }
		owner = { missionaries = -1 diplomats = -2 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 2 NOT = { missionaries = 3 } } }
		owner = { missionaries = -2 diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 3 } }
		owner = { missionaries = -3 }
		}
	PAP = { 
		set_country_flag = church_council_called 
		clr_country_flag = calls_for_council
		stability = -2
		prestige = -0.02
		}
	random_owned = { 
		limit = { owner = { has_country_flag = curia_controller } }
		owner = { country_event = 551556 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			OR = {
				has_country_flag = curia_controller
				AND = {
					PAP = { has_country_flag = independent_pope }
					tag = PAP
					}
				AND = {
					PAP = { has_country_flag = independent_pope }
					NOT = { exists = PAP }
					is_papal_controller = yes
					}
				}
			}
		country_event = 551556
		}
	}
option = {
	name = "EVTOPTB551555" #Words will not end this conflict
	ai_chance = { factor = 50 }
	}
}

country_event = { #Uniting the Church

id = 551556

is_triggered_only = yes

title = "EVTNAME551556"
desc = "EVTDESC551556"

option = {
	name = "EVTOPTA551556" #Step down and call a church council to elect a new pope
	ai_chance = { factor = 50 }
	prestige = -0.05
	PAP = { 
		relation = { who = THIS value = -100 }
		prestige = -0.05
		stability = -1
		define_ruler = { 
			name = "(Abdicated)" 
			regency = yes
			female = no 
			DIP = 6
			MIL = 3
			ADM = 3
			}
		change_variable = { which = schism_resolution value = 1 }
		}
	any_owned = { 
		limit = { has_province_modifier = papal_sponsor }
		remove_province_modifier = papal_sponsor 
		}
	any_country = {
		limit = { 
			NOT = { capital_scope = { owned_by = THIS } }
			NOT = { ai = yes }
			religion = catholic
			has_country_flag = religious_news_trivial
			}
		country_event = 551548 #Death of the Pope
		}
	PAP = { 
		clr_country_flag = secular_pope
		clr_country_flag = reformer_pope
		clr_country_flag = corrupt_pope
		clr_country_flag = right_of_exclusion
		clr_country_flag = deadlocked_conclave
		clr_country_flag = response_to_synod
		clr_country_flag = canonization
		clr_country_flag = peasant_success
		clr_country_flag = chialism
		clr_country_flag = crusade_called
		clr_country_flag = hussite_crusade_called
		clr_country_flag = just_war
		clr_country_flag = pope_executed
		set_country_flag = death_of_pope
		}
	any_country = {
		limit = { has_country_flag = papal_bastard }
		country_event = 551620
		}
	#Invisible maintenance follows
	clr_country_flag = curia_controller
	clr_country_flag = crusader
	clr_country_flag = crusade_refused
	clr_country_flag = synod_refused
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = curia_controller
			}
		clr_country_flag = curia_controller
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			tag = PA2
			}
		clr_country_flag = crusade_called
		clr_country_flag = hussite_crusade_called
		clr_country_flag = chialism
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_refused
			}
		clr_country_flag = crusade_refused
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_target
			}
		clr_country_flag = crusade_target
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_target_notified
			}
		clr_country_flag = crusade_target_notified
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusade_sponsor
			}
		clr_country_flag = crusade_sponsor
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = crusader
			}
		clr_country_flag = crusader
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = synod_refused
			}
		clr_country_flag = synod_refused
		}
	random_country = {
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			NOT = { REB = { has_country_flag = orthodox_setup } }
			}
		REB = { set_country_flag = orthodox_setup }
		377 = { #Antioch (Orthodox)
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		382 = { #Antioch (Oriental Orthodox)
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		379 = { #Judea
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		358 = { #Alexandria
			set_province_flag = patriarchate_closed
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		151 = { #Constantinople
			set_province_flag = patriarchate
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		295 = { #Moscow
			set_province_flag = metropolitan
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		280 = { #Kiev
			set_province_flag = metropolitan
			any_neighbor_province = { clr_province_flag = metropolitan }
			}
		TUR = { set_country_flag = captive_patriarch }
		}
	any_country = { 
		limit = { 
			PAP = { has_country_flag = death_of_pope }
			has_country_flag = death_of_pope
			}
		clr_country_flag = death_of_pope
		}
	random_owned = { 
		limit = { 
			PAP = { has_country_flag = secular_veto_conceded }
			}
		any_country = { 
			limit = { 
				OR = { 
					tag = FRA
					is_emperor = yes
					check_variable = { which = "secular_veto" value = 1 }
					}
				}
			set_variable = { which = "secular_veto" value = 0 }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 0.1
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 0.25
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 0.5
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 0.75
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 1
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 1.25
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 1.5
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 1.75
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				badboy = 2
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = 150 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = 100 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = 50 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = 0 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = -50 } }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = -100} }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { relation = { who = FRA value = -150} }
				}
			FRA = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				war_with = FRA
				}
			FRA = { change_variable = { which = "secular_veto" value = 3 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = 150 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = 100 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = 50 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = 0 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = -50 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = -100 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				NOT = { emperor = { relation = { who = THIS value = -150 } } }
				}
			emperor = { change_variable = { which = "secular_veto" value = 1 } }
			}
		any_country = { 
			limit = { 
				is_papal_controller = yes
				emperor = { war_with = THIS } 
				}
			emperor = { change_variable = { which = "secular_veto" value = 3 } }
			}
		}
	}
option = {
	name = "EVTOPTB551556" #Press our claim to the papacy
	ai_chance = { factor = 50 }
	prestige = 0.01
	}

}

country_event = { #Crusade against the Hussites

id = 551557

trigger = { 
	religion = catholic
	OR = {
		is_emperor = yes
		has_country_flag = curia_controller
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = hussite_crusade_asked }
	}

mean_time_to_happen = { months = 1 }

title = "EVTNAME551557"
desc = "EVTDESC551557"

option = { 
	name = "EVTOPTA551557" #Call all good Catholics to fight this heresy
	ai_chance = { 
		factor = 90 
		days = 1
		modifier = { 
			idea = divine_supremacy
			factor = 1.4
			}
		modifier = { 
			idea = deus_vult
			factor = 2
			}
		modifier = { 
			idea = church_attendance_duty
			factor = 1.4
			}
		modifier = { 
			idea = humanist_tolerance
			factor = 0.7
			}
		modifier = { 
			idea = ecumenism
			factor = 0.7
			}
		}
	prestige = 0.01
	random_country = { 
		limit = { has_country_flag = hussite_crusade }
		relation = { who = THIS value = 50 }
		country_event = 55177
		}
	PAP = { 
		clr_country_flag = hussite_crusade_asked
		set_country_flag = hussite_crusade_called
		}
	}
option = {
	name = "EVTOPTB551557" #It will die down on its own
	prestige = -0.02
	random_country = { 
		limit = { has_country_flag = hussite_crusade }
		relation = { who = THIS value = -50 }
		country_event = 55978
		}
	PAP = { clr_country_flag = hussite_crusade_asked }
	}

}

country_event = { #Subjugation of the Hussites

id = 551559

trigger = { 
	religion = catholic
	OR = {
		is_emperor = yes
		has_country_flag = curia_controller
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = hussite_subjugation }
	NOT = { PAP = { has_country_flag = decline_of_papacy } }
	}

mean_time_to_happen = { months = 1 }

title = "EVTNAME551559"
desc = "EVTDESC551559"

option = { 
	name = "EVTOPTA551559"
	prestige = 0.01
	any_country = { 
		limit = { has_country_flag = hussite_subjugation NOT = { capital_scope = { owned_by = THIS } } num_of_cities = 1 }
		relation = { who = THIS value = 50 }
		clr_country_flag = hussite_subjugation
		}
	PAP = { clr_country_flag = hussite_subjugation }
	}

}


country_event = { #Compromise with Heresy

id = 551558

trigger = { 
	religion = catholic
	OR = {
		is_emperor = yes
		has_country_flag = curia_controller
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	PAP = { has_country_flag = hussite_compact }
	NOT = { PAP = { has_country_flag = decline_of_papacy } }
	}

mean_time_to_happen = { 

	months = 180

	}

title = "EVTNAME551558"
desc = "EVTDESC551558"

option = { 
	name = "EVTOPTA551558" #Uphold the compacta
	ai_chance = { 
		factor = 70 
		days = 1
		modifier = {
			PAP = { has_country_flag = corrupt_pope }
			factor = 0.7
			}
		modifier = { 
			idea = ecumenism
			factor = 2
			}
		modifier = { 
			idea = deus_vult
			factor = 0.5
			}
		}
	add_country_modifier = {
		name = "religious_tolerance"
		duration = 730
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	any_country = { 
		limit = { has_country_flag = hussite_compacta NOT = { capital_scope = { owned_by = THIS } num_of_cities = 1 } }
		relation = { who = THIS value = 25 }
		}
	}
option = { 
	name = "EVTOPTB551558" #Declare the compacta to be void
	ai_chance = { factor = 30 }
	add_country_modifier = {
		name = "religious_intolerance"
		duration = 730
		}
	random_owned = { 
		limit = { owner = { NOT = { diplomats = 1 } } } 
		owner = { missionaries = -1 }
		}
	random_owned = { 
		limit = { owner = { diplomats = 1 } }
		owner = { diplomats = -1 }
		}
	PAP = { 
		clr_country_flag = hussite_compact
		set_country_flag = compacta_void
		prestige = 0.01
		innovative_narrowminded = 1
		}
	any_country = { 
		limit = { has_country_flag = hussite_compacta NOT = { capital_scope = { owned_by = THIS } } num_of_cities = 1 }
		relation = { who = THIS value = -25 }
		}
	}
}

country_event = { #Papal Ingratitude

id = 551560

is_triggered_only = yes

title = "EVTNAME551560"
desc = "EVTDESC551560"

option = { 
	name = "EVTOPTA551560"
	casus_belli = PAP
	}

}

country_event = { #The Gratitude of the Pope

id = 551561

trigger = { 
	religion = catholic
	has_country_flag = curia_controller
	exists = PAP
	NOT = { tag = PAP }
	NOT = { PAP = { has_country_flag = decline_of_papacy } }
	NOT = { PAP = { has_country_flag = papal_gratitude } }
	PAP = { has_country_flag = corrupt_pope }
	NOT = { PAP = { war = yes } }
	NOT = { PAP = { war_exhaustion = 2 } }
	}

mean_time_to_happen = { 

	months = 12

	}

title = "EVTNAME551561"
desc = "EVTDESC551561"

option = { 
	name = "EVTOPTA551561"
	PAP = { set_country_flag = papal_gratitude }
	relation = { who = PAP value = 25 }
	random_owned = { 
		limit = { has_province_flag = church_property }
		clr_province_flag = church_property
		owner = { treasury = 10 }
		}
	random_owned = { 
		limit = { 
			has_province_flag = monastic_order 
			owner = { stability = 0 }
			}
		clr_province_flag = monastic_order
		set_province_flag = church_property
		owner = { treasury = 10 }
		}
	random_owned = { 
		limit = { 
			has_province_flag = monastic_order 
			owner = { NOT = { stability = 0 } }
			}
		owner = { stability = 1 }
		clr_province_flag = monastic_order
		}
	random_owned = { 
		limit = { PAP = { NOT = { treasury = 50 } } }
		owner = { prestige = 0.01 }
		}
	random_owned = { 
		limit = { PAP = { treasury = 50 } }
		owner = { prestige = -0.005 }
		}
	random_owned = { 
		limit = { PAP = { treasury = 50 NOT = { treasury = 100 } } }
		owner = { treasury = 5 }
		PAP = { treasury = -5 }
		}
	random_owned = { 
		limit = { PAP = { treasury = 100 NOT = { treasury = 200 } } }
		owner = { treasury = 10 }
		PAP = { treasury = -10 }
		}
	random_owned = { 
		limit = { PAP = { treasury = 200 NOT = { treasury = 400 } } }
		owner = { treasury = 20 }
		PAP = { treasury = -20 }
		}
	random_owned = { 
		limit = { PAP = { treasury = 400 NOT = { treasury = 800 } } }
		owner = { treasury = 40 }
		PAP = { treasury = -40 }
		}
	random_owned = { 
		limit = { PAP = { treasury = 800 NOT = { treasury = 1600 } } }
		owner = { treasury = 80 }
		PAP = { treasury = -80 }
		}
	random_owned = { 
		limit = { PAP = { treasury = 1600 } }
		owner = { treasury = 160 }
		PAP = { treasury = -160 }
		}
	}

}

country_event = { #A case comes before the Papal Court (consanguinity)

id = 551562

trigger = { 
	PAP = { has_country_flag = consanguinity }
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	OR = { 
		PAP = { has_country_flag = reformer_pope }
		PAP = { has_country_flag = secular_pope }
		PAP = { has_country_flag = corrupt_pope }
		}
	}

mean_time_to_happen = { 

	months = 3 

	modifier = { 
		has_country_flag = marriage_on_hold
		factor = 0.5
		}
	modifier = { 
		has_country_flag = engagement_on_hold
		factor = 0.5
		}
	}

title = "EVTNAME551562"
desc = "EVTDESC551562"

immediate = { PAP = { set_country_flag = consanguinity_issues } }

option = { 
	name = "EVTOPTA551562" #Grant permission for the wedding
	ai_chance = { 
		factor = 80 
		days = 1
		modifier = { 
			any_known_country = { 
				has_country_flag = marriage_on_hold
				has_country_flag = enemy_of_pope
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = marriage_on_hold
				has_country_flag = hated_enemy_of_pope
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = engagement_on_hold
				has_country_flag = enemy_of_pope
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = engagement_on_hold
				has_country_flag = hated_enemy_of_pope
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = marriage_on_hold
				war_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = engagement_on_hold
				war_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = marriage_on_hold
				truce_with = THIS
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = engagement_on_hold
				truce_with = THIS
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = marriage_on_hold
				badboy = 0.5
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = engagement_on_hold
				badboy = 0.5
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = marriage_on_hold
				badboy = 1.0
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = engagement_on_hold
				badboy = 1.0
				}
			factor = 0.7
			}
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	prestige = 0.003
	random_owned = { 
		limit = { has_country_flag = marriage_on_hold }
		owner = { country_event = 551086 }
		}
	any_country = { 
		limit = { has_country_flag = marriage_on_hold }
		relation = { who = THIS value = 10 }
		country_event = 551086
		}
	}
option = { 
	name = "EVTOPTB551562" #Forbid this impure union
	ai_chance = { 
		factor = 20 
		days = 1
		modifier = { 
			has_country_flag = marriage_on_hold
			factor = 0
			}
		modifier = { 
			has_country_flag = engagement_on_hold
			factor = 0
			}
		modifier = { 
			any_known_country = {
				has_country_flag = marriage_on_hold
				alliance_with = THIS
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = {
				has_country_flag = engagement_on_hold
				alliance_with = THIS
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = {
				has_country_flag = marriage_on_hold
				marriage_with = THIS
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = {
				has_country_flag = engagement_on_hold
				marriage_with = THIS
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = {
				has_country_flag = marriage_on_hold
				trade_agreement_with = THIS
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = {
				has_country_flag = engagement_on_hold
				trade_agreement_with = THIS
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = {
				has_country_flag = marriage_on_hold
				overlord_of = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = {
				has_country_flag = engagement_on_hold
				overlord_of = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = {
				has_country_flag = marriage_on_hold
				NOT = { badboy = 0.10 }
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = {
				has_country_flag = engagement_on_hold
				NOT = { badboy = 0.10 } 
				}
			factor = 0.7
			}
		}
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	prestige = 0.005
	random_owned = { 
		limit = { has_country_flag = marriage_on_hold }
		owner = { country_event = 551087 }
		}
	any_country = { 
		limit = { has_country_flag = marriage_on_hold }
		relation = { who = THIS value = -20 }
		country_event = 551087
		}
	}

}

country_event = { #Church Reform of Consanguinity

id = 551563

trigger = {
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	NOT = { exists = PA2 }
	OR = { 
		AND = { PAP = { has_country_flag = reformer_pope } PAP = { has_country_flag = papal_authority } }
		PAP = { has_country_flag = church_council }
		}
	PAP = { has_country_flag = consanguinity_issues }
	NOT = { PAP = { has_country_flag = limited_consanguinity_allowed } }
	NOT = { PAP = { has_country_flag = council_over } }
	}

mean_time_to_happen = { 
	
	months = 2000

	modifier = { 
		PAP = { has_country_flag = corrupt_pope }
		factor = 2
		}
	modifier = { 
		PAP = { has_country_flag = secular_pope }
		factor = 1.4
		}
	modifier = { 
		PAP = { has_country_flag = church_council }
		factor = 0.01 #1% - church councils last only a short time
		}
	modifier = { 
		PAP = { has_country_flag = papal_conciliarism }
		factor = 0.7
		}
	modifier = {
		NOT = { is_religion_enabled = reformed } 
		factor = 1.4
		}
	modifier = {
		NOT = { is_religion_enabled = protestant } 
		factor = 1.4
		}
	}

title = "EVTNAME551563"
desc = "EVTDESC551563"

option = { 
	name = "EVTOPTA551563" #Limit it to the fourth degree of separation
	ai_chance = { factor = 50 } 
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	PAP = { 
		set_country_flag = limited_consanguinity_allowed
		add_country_modifier = {
			name = "reform_tensions"
			duration = 365
			}
		}
	any_country = { 
		limit = { 
			NOT = { ai = yes }
			NOT = { capital_scope = { owned_by = THIS } }
			religion = catholic
			OR = { 
				AND = { 
					has_country_flag = religious_news_major
					has_country_flag = marriage_on_hold
					}
				AND = { 
					has_country_flag = religious_news_trivial
					OR = { 
						has_country_flag = consanguinity_issues
						defender_of_faith = yes
						government = papal_government
						has_country_flag = curia_controller
						}
					}
				has_country_flag = religious_news_all
				}
			}
		country_event = 551119
		}
	any_country = { 
		limit = { has_country_flag = consanguinity_issues }
		clr_country_flag = consanguinity_issues
		}
	PA2 = { set_country_flag = limited_consanguinity_allowed }
	}
option = {
	name = "EVTOPTB551563" #Maintain the current rules
	ai_chance = { factor = 50 }
	prestige = +0.005
	random_owned = { 
		limit = { owner = { NOT = { missionaries = 1 } } } 
		owner = { diplomats = -1 }
		}
	random_owned = { 
		limit = { owner = { missionaries = 1 } }
		owner = { missionaries = -1 }
		}
	}
}

country_event = { #A case comes before the Papal Court (grievance)

id = 551564

trigger = { 
	PAP = { has_country_flag = arbiting_grievance }
	OR = {
		AND = {
			religion = catholic
			has_country_flag = curia_controller
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			tag = PAP
			}
		AND = {
			PAP = { has_country_flag = independent_pope }
			NOT = { exists = PAP }
			is_papal_controller = yes
			}
		}
	OR = { 
		PAP = { has_country_flag = reformer_pope }
		PAP = { has_country_flag = secular_pope }
		PAP = { has_country_flag = corrupt_pope }
		}
	}

mean_time_to_happen = { 

	months = 3

	modifier = { 
		has_country_flag = aggrieved_first_party
		factor = 0.5
		}
	modifier = { 
		has_country_flag = aggrieved_second_party
		factor = 0.5
		}
	}

title = "EVTNAME551564"
desc = "EVTDESC551564"

option = { 
	name = "EVTOPTA551564" #Try to find a compromise acceptable to both sides
	ai_chance = { 
		factor = 60 
		days = 1
		modifier = { 
			has_country_flag = aggrieved_second_party
			factor = 0.5
			}
		modifier = { 
			has_country_flag = aggrieved_first_party
			factor = 0.5
			}
		}
	random_owned = { 
		limit = { owner = { NOT = { has_country_flag = aggrieved_first_party } } }
		owner = { prestige = 0.01 }
		}
	random_owned = { 
		limit = { owner = { has_country_flag = aggrieved_first_party } }
		owner = { country_event = 551091 prestige = 0.02 }
		}
	random_country = { 
		limit = { has_country_flag = aggrieved_first_party }
		relation = { who = THIS value = 5 }
		country_event = 551091
		relation = { who = PAP value = 5 }
		}
	random_country = { 
		limit = { has_country_flag = aggrieved_second_party }
		relation = { who = THIS value = 5 }
		relation = { who = PAP value = 5 }
		}
	}
option = { 
	name = "EVTOPTB551564" #Rule in favor of the plaintiff
	ai_chance = { 
		factor = 20 
		days = 1
		modifier = { 
			has_country_flag = aggrieved_second_party
			factor = 0
			}
		modifier = { 
			has_country_flag = aggrieved_first_party
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				badboy = 0.5
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				badboy = 0.5
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				badboy = 1
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				badboy = 1
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				war_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				war_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				vassal_of = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				vassal_of = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				overlord_of = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				overlord_of = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				overlord_of = PAP
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				overlord_of = PAP
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				alliance_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				alliance_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				marriage_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				marriage_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				trade_agreement_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				trade_agreement_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				trade_embargo_by = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				trade_embargo_by = THIS
				}
			factor = 2
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_5 }
			factor = 1.2
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_10 }
			factor = 1.4
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_20 }
			factor = 2
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_40 }
			factor = 2.8
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_80 }
			factor = 3.9
			}
		modifier = { 
			PAP = { has_country_flag = secular_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_5 }
			factor = 1.1
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_10 }
			factor = 1.2
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_20 }
			factor = 1.4
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_40 }
			factor = 2
			}
		modifier = { 
			PAP = { has_country_flag = corrupt_pope }
			any_known_country = { has_country_flag = aggrieved_bribe_80 }
			factor = 2.8
			}
		}
	random_owned = { 
		limit = { owner = { NOT = { has_country_flag = aggrieved_first_party } } }
		owner = { prestige = 0.005 }
		}
	random_owned = { 
		limit = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party 
				has_country_flag = aggrieved_bribe_5
				}
			}
		treasury = 2.5
		PAP = { treasury = 2.5 }
		}
	random_owned = { 
		limit = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party 
				has_country_flag = aggrieved_bribe_10
				}
			}
		treasury = 5
		PAP = { treasury = 5 }
		}
	random_owned = { 
		limit = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party 
				has_country_flag = aggrieved_bribe_20
				}
			}
		treasury = 10
		PAP = { treasury = 10 }
		}
	random_owned = { 
		limit = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party 
				has_country_flag = aggrieved_bribe_40
				}
			}
		treasury = 20
		PAP = { treasury = 20 }
		}
	random_owned = { 
		limit = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party 
				has_country_flag = aggrieved_bribe_80
				}
			}
		treasury = 40
		PAP = { treasury = 40 }
		}
	random_country = { 
		limit = { has_country_flag = aggrieved_first_party }
		relation = { who = THIS value = 25 }
		country_event = 551089
		relation = { who = PAP value = 25 }
		}
	random_owned = { 
		limit = { owner = { has_country_flag = aggrieved_first_party } }
		owner = { country_event = 551089 prestige = -0.01 }
		}
	random_country = { 
		limit = { has_country_flag = aggrieved_second_party }
		relation = { who = THIS value = -25 }
		relation = { who = PAP value = -25 }
		}
	}
option = { 
	name = "EVTOPTC551564" #Rule against the plaintiff
	ai_chance = { 
		factor = 20 
		days = 1
		modifier = { 
			has_country_flag = aggrieved_second_party
			factor = 2
			}
		modifier = { 
			has_country_flag = aggrieved_first_party
			factor = 0
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				badboy = 0.5
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				badboy = 0.5
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				badboy = 1
				}
			factor = 0.7
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				badboy = 1
				}
			factor = 1.4
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				war_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				war_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				vassal_of = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				vassal_of = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				overlord_of = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				overlord_of = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				overlord_of = PAP
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				overlord_of = PAP
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				alliance_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				alliance_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				marriage_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				marriage_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				trade_agreement_with = THIS
				}
			factor = 2
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				trade_agreement_with = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_second_party
				trade_embargo_by = THIS
				}
			factor = 0.5
			}
		modifier = { 
			any_known_country = { 
				has_country_flag = aggrieved_first_party
				trade_embargo_by = THIS
				}
			factor = 2
			}
		}
	random_owned = { 
		limit = { owner = { NOT = { has_country_flag = aggrieved_first_party } } }
		owner = { prestige = 0.005 }
		}
	random_owned = { 
		limit = { owner = { has_country_flag = aggrieved_first_party } }
		owner = { country_event = 551090 prestige = 0.03 }
		}
	random_country = { 
		limit = { has_country_flag = aggrieved_first_party }
		relation = { who = THIS value = -25 }
		country_event = 551090
		relation = { who = PAP value = -25 }
		}
	random_country = { 
		limit = { has_country_flag = aggrieved_second_party }
		relation = { who = THIS value = 25 }
		relation = { who = PAP value = 25 }
		}
	}

}

country_event = { #A tribunal is called

id = 551565

is_triggered_only = yes

title = "EVTNAME551565"
desc = "EVTDESC551565"

immediate = { 
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			badboy = 0.25
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 1 }
		change_variable = { which = "tribunal_secretary_intimus" value = 1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			badboy = 0.5
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 1 }
		change_variable = { which = "tribunal_secretary_intimus" value = 1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			badboy = 0.75
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 1 }
		change_variable = { which = "tribunal_secretary_intimus" value = 1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			badboy = 1
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 1 }
		change_variable = { which = "tribunal_secretary_intimus" value = 1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			badboy = 1.25
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 1 }
		change_variable = { which = "tribunal_secretary_intimus" value = 1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			badboy = 1.5
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 1 }
		change_variable = { which = "tribunal_secretary_intimus" value = 1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			badboy = 1.75
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 1 }
		change_variable = { which = "tribunal_secretary_intimus" value = 1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			badboy = 2
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 1 }
		change_variable = { which = "tribunal_secretary_intimus" value = 1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			NOT = { ai = yes }
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 2 }
		change_variable = { which = "tribunal_secretary_intimus" value = 2 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 2 }
		change_variable = { which = "tribunal_dean_of_college" value = 2 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			war_with = THIS
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 8 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 4 }
		change_variable = { which = "tribunal_secretary_intimus" value = 2 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 0 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			war_with = PAP
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 0 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 4 }
		change_variable = { which = "tribunal_secretary_intimus" value = 2 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 8 }
		change_variable = { which = "tribunal_dean_of_college" value = 1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			ally = { NOT = { religion = catholic } }
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 0 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 2 }
		change_variable = { which = "tribunal_secretary_intimus" value = 4 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 8 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			ally = { NOT = { religion_group = christian } }
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 0 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 2 }
		change_variable = { which = "tribunal_secretary_intimus" value = 4 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 1 }
		change_variable = { which = "tribunal_dean_of_college" value = 8 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			any_owned_province = { is_core = THIS }
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 0 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 0 }
		change_variable = { which = "tribunal_secretary_intimus" value = 0 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 0 }
		change_variable = { which = "tribunal_dean_of_college" value = 0 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			
			}
		change_variable = { which = "tribunal_crown_cardinal" value = 0 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = 0 }
		change_variable = { which = "tribunal_secretary_intimus" value = 0 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = 0 }
		change_variable = { which = "tribunal_dean_of_college" value = 0 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			marriage_with = THIS
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -1 }
		change_variable = { which = "tribunal_secretary_intimus" value = -1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -1 }
		change_variable = { which = "tribunal_dean_of_college" value = -1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			marriage_with = PAP
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -1 }
		change_variable = { which = "tribunal_secretary_intimus" value = -1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -1 }
		change_variable = { which = "tribunal_dean_of_college" value = -1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			trade_agreement_with = THIS
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -1 }
		change_variable = { which = "tribunal_secretary_intimus" value = -1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -1 }
		change_variable = { which = "tribunal_dean_of_college" value = -1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			trade_agreement_with = PAP
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -1 }
		change_variable = { which = "tribunal_secretary_intimus" value = -1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -1 }
		change_variable = { which = "tribunal_dean_of_college" value = -1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			alliance_with = THIS
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -1 }
		change_variable = { which = "tribunal_secretary_intimus" value = -1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -1 }
		change_variable = { which = "tribunal_dean_of_college" value = -1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			alliance_with = PAP
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -1 }
		change_variable = { which = "tribunal_secretary_intimus" value = -1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -1 }
		change_variable = { which = "tribunal_dean_of_college" value = -1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			vassal_of = THIS
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -1 }
		change_variable = { which = "tribunal_secretary_intimus" value = -1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -1 }
		change_variable = { which = "tribunal_dean_of_college" value = -1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			vassal_of = PAP
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -2 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -1 }
		change_variable = { which = "tribunal_secretary_intimus" value = -1 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -1 }
		change_variable = { which = "tribunal_dean_of_college" value = -1 }
		}
	any_country = { 
		limit = { 
			religion = catholic
			NOT = { has_country_flag = curia_controller }
			NOT = { tag = PAP }
			any_known_country = { OR = { has_country_flag = curia_controller AND = { tag = PAP has_country_flag = independent_pope } } }
			government = theocracy
			}
		change_variable = { which = "tribunal_crown_cardinal" value = -1 }
		change_variable = { which = "tribunal_chancellor_holy_roman_church" value = -2 }
		change_variable = { which = "tribunal_secretary_intimus" value = -2 }
		change_variable = { which = "tribunal_camerlengo_of_papal_state" value = -2 }
		change_variable = { which = "tribunal_dean_of_college" value = -2 }
		}
	}

option = { 
	name = "EVTOPTA551565"
	set_global_flag = tribunal_decision
	prestige = -0.01
	badboy = +1
	random_country = { 
		limit = { has_country_flag = tribunal_crown_cardinal }
		country_event = 551064
		}
	any_country = { 
		limit = { 
			has_global_flag = tribunal_decision
			OR = { 
				has_country_flag = tribunal_crown_cardinal
				has_country_flag = tribunal_camerlengo_of_papal_state
				has_country_flag = tribunal_dean_of_college
				has_country_flag = tribunal_chancellor_holy_roman_church
				has_country_flag = tribunal_secretary_intimus
				}
			}
		clr_country_flag = tribunal_crown_cardinal
		clr_country_flag = tribunal_camerlengo_of_papal_state
		clr_country_flag = tribunal_dean_of_college
		clr_country_flag = tribunal_chancellor_holy_roman_church
		clr_country_flag = tribunal_secretary_intimus
		}
	clr_global_flag = tribunal_decision
	}
option = { 
	name = "EVTOPTB551565"
	set_global_flag = tribunal_decision
	prestige = -0.01
	badboy = +1
	random_country = { 
		limit = { has_country_flag = tribunal_camerlengo_of_papal_state }
		country_event = 551064
		}
	any_country = { 
		limit = { 
			has_global_flag = tribunal_decision
			OR = { 
				has_country_flag = tribunal_crown_cardinal
				has_country_flag = tribunal_camerlengo_of_papal_state
				has_country_flag = tribunal_dean_of_college
				has_country_flag = tribunal_chancellor_holy_roman_church
				has_country_flag = tribunal_secretary_intimus
				}
			}
		clr_country_flag = tribunal_crown_cardinal
		clr_country_flag = tribunal_camerlengo_of_papal_state
		clr_country_flag = tribunal_dean_of_college
		clr_country_flag = tribunal_chancellor_holy_roman_church
		clr_country_flag = tribunal_secretary_intimus
		}
	clr_global_flag = tribunal_decision
	}
option = { 
	name = "EVTOPTC551565"
	set_global_flag = tribunal_decision
	prestige = -0.01
	badboy = +1
	random_country = { 
		limit = { has_country_flag = tribunal_dean_of_college }
		country_event = 551064
		}
	any_country = { 
		limit = { 
			has_global_flag = tribunal_decision
			OR = { 
				has_country_flag = tribunal_crown_cardinal
				has_country_flag = tribunal_camerlengo_of_papal_state
				has_country_flag = tribunal_dean_of_college
				has_country_flag = tribunal_chancellor_holy_roman_church
				has_country_flag = tribunal_secretary_intimus
				}
			}
		clr_country_flag = tribunal_crown_cardinal
		clr_country_flag = tribunal_camerlengo_of_papal_state
		clr_country_flag = tribunal_dean_of_college
		clr_country_flag = tribunal_chancellor_holy_roman_church
		clr_country_flag = tribunal_secretary_intimus
		}
	clr_global_flag = tribunal_decision
	}
option = { 
	name = "EVTOPTD551565"
	set_global_flag = tribunal_decision
	prestige = -0.01
	badboy = +1
	random_country = { 
		limit = { has_country_flag = tribunal_chancellor_holy_roman_church }
		country_event = 551064
		}
	any_country = { 
		limit = { 
			has_global_flag = tribunal_decision
			OR = { 
				has_country_flag = tribunal_crown_cardinal
				has_country_flag = tribunal_camerlengo_of_papal_state
				has_country_flag = tribunal_dean_of_college
				has_country_flag = tribunal_chancellor_holy_roman_church
				has_country_flag = tribunal_secretary_intimus
				}
			}
		clr_country_flag = tribunal_crown_cardinal
		clr_country_flag = tribunal_camerlengo_of_papal_state
		clr_country_flag = tribunal_dean_of_college
		clr_country_flag = tribunal_chancellor_holy_roman_church
		clr_country_flag = tribunal_secretary_intimus
		}
	clr_global_flag = tribunal_decision
	}
option = { 
	name = "EVTOPTE551565"
	set_global_flag = tribunal_decision
	prestige = -0.01
	badboy = +1
	random_country = { 
		limit = { has_country_flag = tribunal_secretary_intimus }
		country_event = 551064
		}
	any_country = { 
		limit = { 
			has_global_flag = tribunal_decision
			OR = { 
				has_country_flag = tribunal_crown_cardinal
				has_country_flag = tribunal_camerlengo_of_papal_state
				has_country_flag = tribunal_dean_of_college
				has_country_flag = tribunal_chancellor_holy_roman_church
				has_country_flag = tribunal_secretary_intimus
				}
			}
		clr_country_flag = tribunal_crown_cardinal
		clr_country_flag = tribunal_camerlengo_of_papal_state
		clr_country_flag = tribunal_dean_of_college
		clr_country_flag = tribunal_chancellor_holy_roman_church
		clr_country_flag = tribunal_secretary_intimus
		}
	clr_global_flag = tribunal_decision
	}
option = { 
	name = "EVTOPTF551565"
	any_country = { 
		limit = { 
			has_global_flag = tribunal_decision
			OR = { 
				has_country_flag = tribunal_crown_cardinal
				has_country_flag = tribunal_camerlengo_of_papal_state
				has_country_flag = tribunal_dean_of_college
				has_country_flag = tribunal_chancellor_holy_roman_church
				has_country_flag = tribunal_secretary_intimus
				}
			}
		clr_country_flag = tribunal_crown_cardinal
		clr_country_flag = tribunal_camerlengo_of_papal_state
		clr_country_flag = tribunal_dean_of_college
		clr_country_flag = tribunal_chancellor_holy_roman_church
		clr_country_flag = tribunal_secretary_intimus
		}
	clr_global_flag = tribunal_decision
	}


}

country_event = { #Unfinished Business

id = 551566

is_triggered_only = yes

title = "EVTNAME551566"
desc = "EVTDESC551566"

option = {
	name = "EVTOPTA551566" #Let us deal with these issues
	random_owned = {
		limit = { NOT = { PAP = { has_country_flag = secular_veto_conceded } } } 
		owner = { country_event = 551552 } 
		}
	random_owned = { 
		limit = { NOT = { PAP = { has_country_flag = regular_councils_promised } } }
		owner = { country_event = 551553 }
		}
	random_owned = {
		limit = { NOT = { PAP = { has_country_flag = lollardy_banned } } }
		owner = { country_event = 551554 }
		}
	}

}

