

force_convert_mission = {
	type = neighbor_countries
	allow = {
		this = { religion = catholic }
		OR = {
			religion = reformed
			religion = protestant
		}
		NOT = { num_of_cities = THIS }
	}
	abort = {
		or = {
			this = { not = { religion = catholic } }
			and = {
				not = { religion = reformed }
				not = { religion = protestant }
			}
		}
	}
	success = {
		religion = THIS
	}
	chance = {
		factor = 1
		modifier = {
			factor = 0
			idea = ecumenism
		}
		modifier = {
			factor = 0
			idea = humanist_tolerance
		}		
		modifier = {
			factor = 1.5
			idea = divine_supremacy
		}
		modifier = {
			factor = 1.0
			idea = church_attendance_duty
		}	
		modifier = {
			factor = 5.0
			idea = deus_vult
		}			
	}
	effect = {
		prestige = 0.10
		infamy = -2
	}
}


convert_province_mission = {
	type = our_provinces
	allow = {
		this = {
			war = no
			missionaries = 1
		}
		NOT =  { religion = THIS }
		NOT = { has_province_modifier = religious_migration }
	}
	abort = {
		has_province_modifier = religious_migration
		NOT = { owned_by = THIS }
	}
	success = {
		religion = THIS
	}
	chance = {
		factor = 1
		modifier = {
			factor = 0
			idea = ecumenism
		}
		modifier = {
			factor = 0
			idea = humanist_tolerance
		}		
		modifier = {
			factor = 1.5
			idea = divine_supremacy
		}
		modifier = {
			factor = 3.0
			idea = church_attendance_duty
		}		
	}
	effect = {
		prestige = 0.02
	}
}

restore_holy_see = {
	type = country
	allow = {
		religion = catholic
		monthly_income = 30
		NOT = { owns = 118 }
		NOT = { 118 = { owned_by = PAP } }
		excommunicated = no
	}
	abort = {
		118 = { owned_by = PAP }
		NOT = { religion = catholic }
	}
	success = {
		owns = 118
	}
	chance = {
		factor = 1
		
		modifier = {
			factor = 20
			defender_of_faith = yes
		}
		modifier = {
			factor = 2
			MIL = 7
		}		
		modifier = {
			factor = 0
			idea = ecumenism
		}
		modifier = {
			factor = 0
			idea = humanist_tolerance
		}		
		modifier = {
			factor = 1.5
			idea = divine_supremacy
		}
		modifier = {
			factor = 3.0
			idea = church_attendance_duty
		}		
		modifier = {
			factor = 3
			monthly_income = 50
		}	
		modifier = {
			factor = 3
			monthly_income = 100
		}
		modifier = {
			factor = 2
			118 = {	owner = { not = { religion = catholic } } }
		}
		modifier = {
			factor = 2
			118 = { any_neighbor_province = { owned_by = this } }
		}
	}
	effect = {
		118 = { secede_province = PAP }
		infamy = -5
		prestige = 0.05
	}
	
}



solidify_our_papal_relations = {
	type = country
	allow = {
		religion = catholic
		NOT = { war_with = PAP }
		exists = PAP
		excommunicated = no
		NOT = { relation = { who = PAP value = 50 } }
	}
	abort = {
		or = {
			war_with = PAP
			not = { religion = catholic }
			excommunicated = yes
		}
	}
	success = {
		relation = { who = PAP value = 150 }
	}
	chance = {
		factor = 1
		
		modifier = {
			factor = 2
			defender_of_faith = yes
		}
		modifier = {
			factor = 2
			DIP = 7
		}		
		modifier = {
			factor = 0
			idea = ecumenism
		}
		modifier = {
			factor = 0
			idea = humanist_tolerance
		}		
		modifier = {
			factor = 1.5
			idea = divine_supremacy
		}
		modifier = {
			factor = 3.0
			idea = church_attendance_duty
		}		

	}
	effect = {
		prestige = 0.02
	}
	
}