emp_pap_slot_1 = {
	slot = 1 
	generic = no 
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
	}
	potential = {
		has_dlc = "Emperor"
		NOT = { map_setup = map_setup_random }
		tag = PAP
	}
	has_country_shield = yes
	
	emp_pap_patrimony_of_st_peter = {
		icon = conquer_tuscany
		required_missions = {  }
		position = 1
		
		provinces_to_highlight = {
			OR = {
				area = central_italy_area
				area = emilia_romagna_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}

		trigger = {
			custom_trigger_tooltip = {
				tooltip = emp_pap_patrimony_of_st_peter_tt
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					value = 6 # out of 8
					OR = {
						area = central_italy_area
						area = emilia_romagna_area
					}
				}
			}
		}
		effect = {
			tuscany_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			liguria_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			piedmont_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}

	emp_pap_suppress_the_italian_cities = {
		icon = mission_dominate_genoa
		required_missions = { emp_pap_patrimony_of_st_peter }
		position = 2
		
		provinces_to_highlight = {
			OR = {
				area = tuscany_area
				area = liguria_area
				area = piedmont_area
			}
			NOT = {
				owned_by = ROOT
			}
		}
		
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 9 # out of 12
				OR = {
					area = tuscany_area
					area = liguria_area
					area = piedmont_area
				}
			}
		}
		effect = {
			venetia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			lombardy_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			po_valley_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	emp_pap_sweep_the_po = {
		icon = sweep_the_po
		required_missions = { emp_pap_suppress_the_italian_cities }
		position = 3
		
		provinces_to_highlight = {
			OR = {
				area = venetia_area
				area = lombardy_area
				area = po_valley_area
			}
			NOT = {
				owned_by = ROOT
			}
		}
		
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 9 # out of 13
				OR = {
					area = venetia_area
					area = lombardy_area
					area = po_valley_area
				}
			}
		}
		effect = {
			corsica_sardinia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			sicily_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			western_sicily_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	emp_pap_island_screens = {
		icon = mission_seize_the_isles
		required_missions = { emp_pap_sweep_the_po }
		position = 4
		
		provinces_to_highlight = {
			OR = {
				area = corsica_sardinia_area
				area = sicily_area
				area = western_sicily_area
			}
			NOT = {
				owned_by = ROOT
			}
		}
		
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 8 # out of 10
				OR = {
					area = corsica_sardinia_area
					area = sicily_area
					area = western_sicily_area
				}
			}
		}
		effect = {
			naples_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			calabria_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			apulia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	emp_pap_italian_supremacy = {
		icon = mission_rule_italy
		required_missions = { emp_pap_island_screens }
		position = 5
		
		provinces_to_highlight = {
			region = italy_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		
		trigger = {
			italy_region = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "pap_italian_federation"
				duration = 7300
			}
		}
	}
	
	emp_pap_end_the_schism = {
		icon = end_the_schism
		required_missions = { emp_pap_the_holy_league } 
		position = 6
		
		provinces_to_highlight = {
			OR = {
				province_id = 151
				province_id = 295
			}
			owner = {
				NOT = { religion = catholic }
			}
		}

		trigger = {
			OR = {
				AND = {
					151 = { owner = { religion = catholic } }
					295 = { owner = { religion = catholic } }
				}
				custom_trigger_tooltip = {
					tooltip = catholics_healed_schism_tt
					has_global_flag = catholics_healed_schism
				}
			}
		}
		effect = {
			if = {
				limit = { NOT = { has_global_flag = catholics_healed_schism } }
				custom_tooltip = emp_pap_end_the_schism_tt
				hidden_effect = {
					set_global_flag = catholics_healed_schism
					every_country = {
						limit = { 
							religion = orthodox 
							knows_country = PAP
						}
						country_event = { id = flavor_pap.11 }
					}
				}
			}
			else = {
				add_adm_power = 100
			}
			add_country_modifier = {
				name = teu_crusade_end_of_the_schism
				duration = -1
			}
			if = {
				limit = {
					151 = {
						NOT = { religion = catholic }
					}
				}
				151 = { change_religion = catholic }
			}
			if = {
				limit = {
					295 = {
						NOT = { religion = catholic }
					}
				}
				295 = { change_religion = catholic }
			}
		}
	}
}

emp_pap_slot_2 = {
	slot = 2
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
	}
	potential = {
		has_dlc = "Emperor"
		NOT = { map_setup = map_setup_random }
		tag = PAP
	}
	has_country_shield = yes
	
	emp_pap_swiss_guard = {
		icon = form_the_swiss_guard
		required_missions = {  }
		position = 1
		
		provinces_to_highlight = {
			if = {
				limit = { exists = SWI }
				owned_by = SWI
			}
			else = {
				OR = {
					area = switzerland_area
					area = romandie_area
				}
			}
		}

		trigger = {
			OR = {
				any_owned_province = {
					OR = {
						area = switzerland_area
						area = romandie_area
					}
				}
				SWI = {
					has_opinion = {
						who = ROOT
						value = 100
					}
				}
			}
		}
		effect = {
			set_country_flag = pap_swiss_guard_mission_flag
			custom_tooltip = emp_pap_swiss_guard_mercs_enabled
			tooltip = {
				add_country_modifier = {
					name = "pap_papal_swiss_guard"
					duration = 7300
				}
			}
			country_event = { id = papacy_events.1 }
		}
	}
	
	emp_pap_catholic_volunteers = {
		icon = catholic_volunteers
		required_missions = { emp_pap_swiss_guard } 
		position = 2

		trigger = {
			army_size_percentage = 1
			manpower_percentage = 0.5
		}
		effect = {
			create_general = {
				tradition = 60
			}
		}
	}
	
	emp_pap_roman_navy = {
		icon = build_a_roman_navy
		required_missions = { emp_pap_catholic_volunteers } 
		position = 3
		
		trigger = {
			navy_size_percentage = 1
			navy_tradition = 20
		}
		effect = {
			add_navy_tradition = 25
		}
	}
	
	emp_pap_the_holy_league = {
		icon = the_holy_league
		required_missions = { emp_pap_roman_navy emp_pap_prester_john } 
		position = 5
		
		trigger = {
			any_ally = {
				custom_trigger_tooltip = {
					tooltip = faux_is_catholic
					religion = catholic
				}
				is_great_power = yes
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { num_of_allies = 1 }
				}
				custom_tooltip = emp_pap_the_holy_league_tt
			}
			else = {
				every_ally = {
					limit = { religion = catholic }
					add_country_modifier = {
						name = "pap_papal_military_aid"
						duration = 3650
					}
				}
			}
			add_country_modifier = {
				name = "pap_roman_leadership"
				duration = 3650
			}
		}
	}
	
	emp_pap_levantine_missions = {
		icon = levantine_missions
		required_missions = { emp_pap_the_holy_league } 
		position = 6
		
		provinces_to_highlight = {
			region = mashriq_region
			owner = {
				NOT = { religion = catholic }
			}
		}

		trigger = {
			calc_true_if = {
				desc = emp_pap_levantine_missions_tt
				amount = 16 # just over half of Mashriq's 31 total provinces
				all_province = {
					region = mashriq_region
					owner = {
						religion = catholic
					}
				}
			}
		}
		effect = {
			if = {
				limit = {
					exists = KOJ
					KOJ = { religion = catholic }
				}
				KOJ = {
					add_country_modifier = {
						name = kni_converted_the_holy_land
						duration = 7300
					}
				}
			}
			if = {
				limit = {
					379 = {
						owner = {
							religion = catholic
						}
					}
				}
				379 = {
					if = {
						limit = { NOT = { religion = catholic } }
						change_religion = catholic
					}
					add_province_modifier = {
						name = pap_latin_patriarch_of_jerusalem
						duration = -1
					}
				}
			}
			add_country_modifier = {
				name = "pap_eastern_mediterranean_routes"
				duration = 7300
			}
		}
	}
	
	emp_pap_mission_to_china = {
		icon = mission_to_china
		required_missions = { emp_pap_levantine_missions } 
		position = 7
		
		provinces_to_highlight = {
			OR = {
				region = north_china_region
				region = south_china_region
			}
			has_discovered = ROOT
		}

		trigger = {
			custom_trigger_tooltip = {
				tooltip = emp_pap_mission_to_china_tt
				north_china_region = {
					has_discovered = ROOT
				}
				south_china_region = {
					has_discovered = ROOT
				}
			}
			calc_true_if = {
				desc = emp_pap_mission_to_china_tt2
				all_province = {
					OR = {
						region = north_china_region
						region = south_china_region
					}
					owner = { religion = catholic }
				}
				amount = 4 # Taiwan is three provinces, so at least one non-Taiwanese province must be taken
			}
		}
		effect = {
			custom_tooltip = emp_pap_mission_to_china_noncatholic_tt
			hidden_effect = {
				every_province = {
					limit = {
						OR = {
							region = north_china_region
							region = south_china_region
						}
						owner = {
							religion = catholic
						}
						NOT = { religion = catholic }
					}
					add_province_modifier = {
						name = pap_chinese_jesuits_noncatholic
						duration = 7300
					}
				}
			}
			custom_tooltip = emp_pap_mission_to_china_catholic_tt
			hidden_effect = {
				every_province = {
					limit = {
						OR = {
							region = north_china_region
							region = south_china_region
						}
						owner = {
							religion = catholic
						}
						religion = catholic
					}
					add_province_modifier = {
						name = pap_chinese_jesuits_catholic
						duration = 7300
					}
				}
			}
			if = {
				limit = {
					exists = MNG
					MNG = {
						NOT = {
							OR = {
								has_country_flag = mng_accepted_jesuits
								has_country_flag = mng_rejects_jesuits
							}
						}
					}
				}
				MNG = {
					country_event = { id = flavor_mng.7 }
				}
			}
			else_if = {
				limit = {
					exists = MNG
					MNG = {
						OR = {
							has_country_flag = mng_accepted_jesuits
							has_country_flag = mng_rejects_jesuits
						}
					}
				}
				MNG = {
					country_event = { id = flavor_pap.13 }
				}
			}
			else_if = {
				limit = {
					NOT = { exists = MNG }
					any_country = {
						is_emperor_of_china = yes
					}
				}
				every_country = {
					limit = { is_emperor_of_china = yes }
					country_event = { id = flavor_pap.14 }
				}
			}
			else_if = {
				limit = {
					NOT = { exists = MNG }
					any_country = {
						NOT = { is_emperor_of_china = yes }
					}
					1816 = { NOT = { owned_by = PAP } }
				}
				every_country = {
					limit = { owns = 1816 }
					country_event = { id = flavor_pap.14 }
				}
			}
			else = {
				add_adm_power = 100
			}
		}
	}
}

emp_pap_slot_3 = {
	slot = 3
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
	}
	potential = {
		has_dlc = "Emperor"
		NOT = { map_setup = map_setup_random }
		tag = PAP
	}
	has_country_shield = yes
	
	emp_pap_catholic_alliances = {
		icon = catholic_confraternity
		required_missions = {  }
		position = 1

		trigger = {
			custom_trigger_tooltip = {
				tooltip = emp_pap_catholic_alliances_tt
				calc_true_if = {
					all_ally = {
						religion = catholic
					}
					amount = 3
				}
			}
		}
		effect = {
			add_dip_power = 100
		}
	}
	
	emp_pap_support_the_knightly_orders = {
		icon = support_the_orders
		required_missions = { emp_pap_catholic_alliances }
		position = 2
		
		provinces_to_highlight = {
			OR = {
				owned_by = KNI
				owned_by = LIV
				owned_by = TEU
			}
		}
		
		trigger = {
			if = {
				limit = { exists = KNI }
				KNI = {
					has_opinion = {
						who = ROOT
						value = 100
					}
				}
			}
			if = {
				limit = { exists = LIV }
				LIV = {
					has_opinion = {
						who = ROOT
						value = 100
					}
				}
			}
			if = {
				limit = { exists = TEU }
				TEU = {
					has_opinion = {
						who = ROOT
						value = 100
					}
				}
			}
			estate_loyalty = {
				estate = estate_nobles
				loyalty = 60
			}
			NOT = {
				estate_influence = {
					estate = estate_nobles
					influence = 50
				}
			}
		}
		effect = {
			add_army_tradition = 20
		}
	}
	
	emp_pap_eastern_alliances = {
		icon = shield_of_christendom
		required_missions = { emp_pap_support_the_knightly_orders }
		position = 3
		
		trigger = {
			if = {
				limit = {
					any_known_country = {
						religion_group = christian
						capital_scope = {
							OR = {
								region = balkan_region
								region = anatolia_region
								region = caucasia_region
							}
						}
					}
				}
				custom_trigger_tooltip = {
					tooltip = emp_pap_eastern_alliances_trigger_tt
					OR = {
						any_ally = {
							capital_scope = {
								OR = {
									region = balkan_region
									region = anatolia_region
									region = caucasia_region
								}
							}
							religion_group = christian
						}
						any_subject_country = {
							capital_scope = {
								OR = {
									region = balkan_region
									region = anatolia_region
									region = caucasia_region
								}
							}
							religion_group = christian
						}
					}
				}
			}
			else = {
				num_of_owned_provinces_with = {
					value = 7
					OR = {
						region = balkan_region
						region = anatolia_region
						region = caucasia_region
					}
				}
			}
		}
		effect = {
			custom_tooltip = emp_pap_eastern_alliances_tt
			hidden_effect = {
				every_ally = {
					limit = {
						capital_scope = {
							OR = {
								region = balkan_region
								region = anatolia_region
								region = caucasia_region
							}
						}
						religion_group = christian
					}
					add_country_modifier = {
						name = pap_gasmoulikon_corps
						duration = 5475
					}
				}
				every_subject_country = {
					limit = {
						capital_scope = {
							OR = {
								region = balkan_region
								region = anatolia_region
								region = caucasia_region
							}
						}
						religion_group = christian
					}
					add_country_modifier = {
						name = pap_gasmoulikon_corps
						duration = 5475
					}
				}
			}
			add_mil_power = 100
			
		}
	}
	
	emp_pap_prester_john = {
		icon = prester_john
		required_missions = { emp_pap_eastern_alliances }
		position = 4
		
		provinces_to_highlight = {
			region = horn_of_africa_region
			has_discovered = ROOT
		}

		trigger = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = emp_pap_prester_john_tt
					any_known_country = {
						capital_scope = {
							region = horn_of_africa_region
						}
						religion_group = christian
						has_opinion = {
							who = ROOT
							value = 100
						}
					}
				}
				custom_trigger_tooltip = {
					tooltip = emp_pap_prester_john_land_tt
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						value = 6
						region = horn_of_africa_region
					}
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = pap_african_connections
				duration = 3650
			}
		}
	}
	
	emp_pap_pontifical_universities = {
		icon = pontifical_universities
		required_missions = { emp_pap_establish_vatican_library }
		position = 5

		trigger = {
			num_of_owned_and_controlled_institutions = 1
			num_of_owned_provinces_with = {
				value = 3
				has_building = university
			}
		}
		effect = {
			add_adm_power = 75
			add_dip_power = 75
			add_mil_power = 75
		}
	}
	
	emp_pap_mission_to_japan = {
		icon = mission_to_japan
		required_missions = { emp_pap_levantine_missions } 
		position = 7
		
		provinces_to_highlight = {
			region = japan_region
			has_discovered = ROOT
		}
		
		trigger = {
			custom_trigger_tooltip = {
				tooltip = emp_pap_mission_to_japan_tt
				japan_region = {
					has_discovered = ROOT
				}
			}
			calc_true_if = {
				desc = emp_pap_mission_to_japan_tt2
				all_province = {
					region = japan_region
					owner = { religion = catholic }
				}
				amount = 3
			}
		}
		effect = {
			every_known_country = {
				limit = {
					capital_scope = {
						region = japan_region
					}
					religion = catholic
				}
				add_country_modifier = {
					name = pap_japanese_jesuits
					duration = 7300
				}
			}
		
			if = {
				limit = {
					4182 = {
						owner = {
							OR = {
								tag = POR
								tag = CAS
								tag = SPA
								tag = ARA
							}
							religion = catholic
						}
						religion = catholic
					}
				}
				4182 = {
					add_province_modifier = {
						name = pap_visitor_of_missions_in_the_indies_catholic
						duration = 7300
					}
				}
			}
			else_if = {
				limit = {
					4182 = {
						owner = {
							OR = {
								tag = POR
								tag = CAS
								tag = SPA
								tag = ARA
							}
							religion = catholic
						}
						NOT = { religion = catholic }
					}
				}
				4182 = {
					add_province_modifier = {
						name = pap_visitor_of_missions_in_the_indies_noncatholic
						duration = 7300
					}
				}
			}
			
			if = {
				limit = { 
					exists = JAP 
					NOT = { has_dlc = "Mandate of Heaven" }
					JAP = { 
						NOT = { religion = catholic }
						has_country_flag = western_trade_flag 
						NOT = { has_country_flag = kirishitan_have_appeared }
					}
				}
				JAP = {
					country_event = { id = flavor_jap.9 }
				}
			}
			else_if = {
				limit = {
					exists = JAP
					has_dlc = "Mandate of Heaven"
					JAP = {
						is_incident_possible = incident_spread_of_christianity
					}
				}
				JAP = { 
					country_event = { id = shinto_events.38 }
				}
			}
			else_if = {
				limit = { 
					exists = JAP 
					JAP = { NOT = { religion = catholic } }
				}
				JAP = {
					country_event = { id = flavor_pap.15 }
				}
			}

			else_if = {
				limit = { 
					NOT = { exists = JAP }
					NOT = { has_dlc = "Mandate of Heaven" }
					any_country = { 
						OR = {
							has_reform = shogunate
							owns = 1020
						}
						NOT = { religion = catholic }
						has_country_flag = western_trade_flag 
						NOT = { has_country_flag = kirishitan_have_appeared }
					}
				}
				every_country = {
					limit = { 
						OR = {
							has_reform = shogunate
							owns = 1020
						}
					}
					country_event = { id = flavor_jap.9 }
				}
			}
			else_if = {
				limit = {
					NOT = { exists = JAP }
					any_country = {
						OR = {
							has_reform = shogunate
							owns = 1020
						}
						NOT = { religion = catholic }
						is_incident_possible = incident_spread_of_christianity
					}
					has_dlc = "Mandate of Heaven"
				}
				every_country = { 
					limit = {
						OR = {
							has_reform = shogunate
							owns = 1020
						}
					}
					country_event = { id = shinto_events.38 }
				}
			}
			else_if = {
				limit = { 
					NOT = { exists = JAP }
					any_country = {
						OR = {
							has_reform = shogunate
							owns = 1020
						}
						NOT = { religion = catholic }
					}
				}
				every_country = {
					limit = {
						OR = {
							has_reform = shogunate
							owns = 1020
						}
					}
					country_event = { id = flavor_pap.15 }
				}
			}
			else_if = {
				limit = {
					any_country = {
						owns = 1020
						NOT = { tag = PAP }
					}
				}
				every_country = {
					limit = {
						owns = 1020
						NOT = { tag = PAP }
					}
					country_event = { id = flavor_pap.12 }
				}
			}
			else = {
				every_owned_province = {
					limit = { region = japan_region }
					add_nationalism = -10
				}
			}
		}
	}
}

emp_pap_slot_4 = {
	slot = 4
	generic = no 
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
	}
	potential = {
		has_dlc = "Emperor"
		NOT = { map_setup = map_setup_random }
		tag = PAP
	}
	has_country_shield = yes
	
	emp_pap_rebuild_the_papal_treasury = {
		icon = mission_african_gold
		required_missions = {  }
		position = 1
		
		trigger = {
			treasury = 500
			NOT = { num_of_loans = 1 }
		}
		effect = {
			custom_tooltip = emp_pap_rebuild_the_papal_treasury_effect_tooltip
			hidden_effect = {
				every_country = {
					limit = {
						religion = catholic
						NOT = { tag = ROOT }
					}
					add_country_modifier = {
						name = pap_higher_curia_contribution_hidden_modifier
						duration = 7300
						hidden = yes
					}
				}
			}
		}
	}
	
	emp_pap_restore_curia_funding = {
		icon = balance_the_estates
		required_missions = { emp_pap_rebuild_the_papal_treasury }
		position = 2
		
		trigger = {
			curia_treasury_size = 2000
		}
		effect = {
			add_prestige = 20
		}
	}
	
	emp_pap_new_st_peters_basilica = {
		icon = new_st_peters_basilica
		required_missions = { emp_pap_restore_curia_funding }
		position = 3
		
		provinces_to_highlight = {
			province_id = 118
		}

		trigger = {
			118 = {
				has_building = cathedral
				development = 40
				owned_by = root
			}
		}
		effect = {
			if = {
				limit = { has_dlc = "Leviathan" }
				118 = {
					if = {
						limit = {
							NOT = {
								has_great_project = {
									type = stpeters_cathedral
									tier = 3
								}
							}
						}
						add_great_project_tier = {
							type = stpeters_cathedral
							tier = 1
						}
					}
					else = {
						add_base_tax = 3
					}
				}
			}
			add_country_modifier = {
				name = "pap_st_peters_basilica"
				duration = -1
			}
		}
	}
	
	emp_pap_establish_vatican_library = {
		icon = found_the_vatican_library
		required_missions = { } 
		position = 4
		completed_by = 1450.1.1
		
		trigger = {
			has_institution = renaissance
			owns = 118
		}
		effect = {
			set_country_flag = vatican_library_mission_flag
			country_event = {
				id = papacy_events.11
			}
		}
	}
	
	emp_pap_subiaco_press = {
		icon = subiaco_press
		required_missions = { emp_pap_establish_vatican_library }
		position = 5
		completed_by = 1560.1.1
		
		trigger = {
			has_institution = printing_press
		}
		effect = {
			if = {
				limit = { has_dlc = "Rule Britannia" }
				change_innovativeness = 3
				add_country_modifier = {
					name = pap_papal_press_rb
					duration = 7300
				}
			}
			else = {
				add_country_modifier = {
					name = pap_papal_press_no_rb
					duration = 10950
				}
			}
		}
	}
}

emp_pap_slot_5 = {
	slot = 5
	generic = no 
	ai = yes
	potential_on_load = {
		has_dlc = "Emperor"
	}
	potential = {
		has_dlc = "Emperor"
		NOT = { map_setup = map_setup_random }
		tag = PAP
	}
	has_country_shield = yes
	
	emp_pap_support_eastern_catholiczation = {
		icon = eastern_catholicization
		required_missions = {  }
		position = 1
		
		provinces_to_highlight = {
			if = {
				limit = {
					exists = LIT
					LIT = {
						religion = catholic
					}
				}
				owned_by = LIT
			}
			else_if = {
				limit = {
					NOT = { exists = LIT }
					exists = POL
					POL = {
						religion = catholic
					}
				}
				owned_by = POL
			}
			else_if = {
				limit = {
					NOT = { exists = LIT }
					NOT = { exists = POL }
					exists = PLC
					PLC = {
						religion = catholic
					}
				}
				owned_by = PLC
			}
			else = {
				region = ruthenia_region
				NOT = { religion = catholic }
			}
		}

		trigger = {
			if = {
				limit = {
					exists = LIT
					LIT = {
						religion = catholic
					}
				}
				LIT = {
					has_opinion = {
						who = ROOT
						value = 100
					}
				}
			}
			else_if = {
				limit = {
					NOT = { exists = LIT }
					exists = POL
					POL = {
						religion = catholic
					}
				}
				POL = {
					has_opinion = {
						who = ROOT
						value = 100
					}
				}
			}
			else_if = {
				limit = {
					NOT = { exists = LIT }
					NOT = { exists = POL }
					exists = PLC
					PLC = {
						religion = catholic
					}
				}
				PLC = {
					has_opinion = {
						who = ROOT
						value = 100
					}
				}
			}
			else = {
				ruthenia_region = {
					type = all
					religion = catholic
				}
			}
		}
		effect = {
			if = {
				limit = {
					exists = LIT
					LIT = {
						religion = catholic
					}
				}
				LIT = {
					country_event = { id = flavor_pap.12 }
				}
				custom_tooltip = emp_pap_support_eastern_catholiczation_lit_tt
			}
			else_if = {
				limit = {
					exists = POL
					NOT = { exists = LIT }
					POL = {
						religion = catholic
					}
				}
				POL = {
					country_event = { id = flavor_pap.12 }
				}
				custom_tooltip = emp_pap_support_eastern_catholiczation_pol_tt
			}
			else_if = {
				limit = {
					exists = PLC
					NOT = { exists = POL }
					NOT = { exists = LIT }
					POL = {
						religion = catholic
					}
				}
				PLC = {
					country_event = { id = flavor_pap.12 }
				}
				custom_tooltip = emp_pap_support_eastern_catholiczation_plc_tt
			}
			if = {
				limit = {
					has_dlc = "Common Sense"
				}
				add_devotion = 20
			}
			else = {
				add_legitimacy = 20
			}
		}
	}
	
	emp_pap_start_the_counter_reformation = {
		icon = counter_reformation
		required_missions = { emp_pap_support_eastern_catholiczation }
		position = 2
		
		trigger = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = obj_convert_10_provinces_tooltip
					check_variable = { which = num_converted_religion value = 10 }
				}
				AND = {
					is_council_enabled = yes
					OR = {
						council_position = concilatory
						council_position = harsh
					}
				}
			}
		}
		effect = {
			add_prestige = 25
		}
	}
	
	emp_pap_concessions = {
		icon = victor_for_the_true_faith
		required_missions = { emp_pap_start_the_counter_reformation }
		position = 3
		
		trigger = {
			is_council_enabled = yes
			is_all_concessions_in_council_taken = yes
		}
		effect = {
			custom_tooltip = council_of_trent_members_tt
			hidden_effect = {
				every_country = {
					limit = {
						OR = {
							council_position = concilatory
							council_position = harsh
						}
					}
					add_opinion = {
						who = ROOT
						modifier = council_of_trent_participation
					}
				}
			}
		}
	}
	
	emp_pap_back_the_catholic_powers = {
		icon = back_the_league
		required_missions = { emp_pap_concessions }
		position = 4
		
		trigger = {
			if = {
				limit = { 
					has_dlc = "Art of War"
					hre_leagues_enabled = yes
					hre_religion_treaty = no
					hre_religion_locked = no
					any_country = {
						is_emperor = yes
					}
				}
				in_league = catholic
			}
			else_if = {
				limit = { any_country = { is_emperor = yes } }
				is_religion_enabled = protestant
				any_ally = {
					religion = catholic
					is_part_of_hre = yes
				}
			}
			else = {
				any_ally = {
					religion = catholic
					capital_scope = {
						OR = {
							region = north_german_region
							region = south_german_region
						}
					}
				}
			}
		}
		effect = {
			if = {
				limit = { 
					has_dlc = "Art of War" 
					in_league = catholic
					any_country = {
						is_emperor = yes
					}
					NOT = {
						hre_religion_locked = yes
						hre_religion_treaty = yes
						NOT = { hre_religion = catholic }
					}
				}
				custom_tooltip = emp_pap_back_the_catholic_powers_league_tt
				hidden_effect = {
					every_country = {
						limit = {
							NOT = { tag = ROOT }
							in_league = catholic
							NOT = { has_country_modifier = pap_papal_military_aid }
						}
						add_country_modifier = {
							name = pap_papal_military_aid
							duration = 3650
						}
					}
				}
			}
			else_if = {
				limit = {
					any_country = {
						is_emperor = yes
					}
				}
				every_ally = {
					limit = {
						religion = catholic
						is_part_of_hre = yes
					}
					add_country_modifier = {
						name = pap_papal_military_aid
						duration = 3650
					}
				}
			}
			else = {
				every_ally = {
					limit = {
						religion = catholic
						capital_scope = {
							OR = {
								region = north_german_region
								region = south_german_region
							}
						}
					}
					add_country_modifier = {
						name = pap_papal_military_aid
						duration = 3650
					}
				}
			}
			add_stability_or_adm_power = yes
			add_war_exhaustion = -2
		}
	}
	
	emp_pap_fight_the_heretics = {
		icon = defenestrate_the_heretics
		required_missions = { emp_pap_back_the_catholic_powers }
		position = 5
		
		trigger = {
			OR = {
				is_religion_enabled = protestant
				is_defender_of_faith_of_tier = 4
				AND = {
					hre_religion_locked = yes
					hre_religion = catholic
				}
			}	
		}
		effect = {
			if = {
				limit = {
					has_dlc = "Cradle of Civilization"
					NOT = { army_professionalism = 490 }
				}
				add_army_professionalism = 10
			}
			else = {
				add_mil_power = 100
			}
		}
	}
	
	emp_pap_destroy_heretic_strongholds = {
		icon = crush_heretic_strongholds
		required_missions = { emp_pap_fight_the_heretics }
		position = 6
		
		provinces_to_highlight = {
			is_part_of_hre = yes
			owner = {
				NOT = { religion = catholic }
			}
		}

		trigger = {
			if = {
				limit = {
					hre_size = 1
				}
				custom_trigger_tooltip = {
					tooltip = emp_pap_destroy_heretic_strongholds_tt
					NOT = {
						any_province = {
							is_part_of_hre = yes
							owner = {
								NOT = { religion = catholic }
							}
						}
					}
				}
			}
			else = {
				custom_trigger_tooltip = {
					tooltip = emp_pap_destroy_heretic_strongholds_tt2
					NOT = {
						any_country = {
							culture_group = germanic
							NOT = { religion = catholic }
						}
					}
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "pap_universal_church"
				duration = -1
			}
		}
	}
}
	