
# AI logic for how the Pope should respond to the hardcoded Ask for Excommunication action
# ROOT is the asker, FROM is the Pope, FROMFROM is the target
ask_for_excommunication_chance = {
	additive_modifier = {
		value = -65
		localisation_key = AIREASON_BASE_RELUCTANCE
		always = yes
	}
	additive_modifier = { #Slow down the AI
		value = -25
		localisation_key = AIREASON_BASE_RELUCTANCE
		ai = yes
	}
	additive_modifier = { #And Landless Mercenaries overall...
		value = -150
		localisation_key = AIREASON_BASE_RELUCTANCE
		ai = yes
		is_landed = no
	}
	additive_modifier = {
		value = -1000
		localisation_key = AIREASON_EXCOM_TARGET_HAS_REPENTED_SINS
		FROM = {
			has_opinion_modifier = { who = ROOT_FROMFROM modifier = opinion_repented_sins }
		}
	}
	additive_modifier = {
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_REQUESTED_EXCOM_ALREADY
		FROM = {
			has_opinion_modifier = {
				modifier = opinion_requested_excommunication
				who = ROOT
			}
		}
	}
	#The Papacy will not excommunicate other priests on demand.
	additive_modifier = { 
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_RULER_NO_PRIEST_EXCOMMUNICATION_DEMANDED
		NOT = { 
			character = FROM # The Pope will excommunicate priests by his own accord, but not on request from other rulers.
		}
		FROMFROM = { is_theocracy = yes } 
	}
	#The Papacy will tend to excommunicate bad priests.
	additive_modifier = { 
		value = 15
		#No loc needed, it's just for the Pope.
		character = FROM 
		FROMFROM = { 
			higher_real_tier_than = BARON
			is_theocracy = yes 
			
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	}
		} 
	}
	#Saintly Bloodline boost.
	additive_modifier = { 
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE
		NOT = { character = FROM }
		any_owned_bloodline = {
			has_bloodline_flag = saintly_bloodline
			NOT = { has_bloodline_flag = wicked_saint }
		} 
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_KINSLAYER
		OR = {
			trait = kinslayer
			trait = familial_kinslayer
			trait = dynastic_kinslayer
		}
	}
	additive_modifier = {
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_SINNER
		OR = {
			has_character_modifier = rampant_sinner_christian
			has_character_modifier = rampant_sinner_dharmic
			has_character_modifier = known_satanist
			has_character_modifier = known_witch
		}
	}

	## Universal modifiers ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_IS_EXCOMMUNICATED
		excommunicated_for = FROM
	}
	additive_modifier = {
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		NOT = { persistent_event_target:baptizing_pope_per = { character = FROM } }
	}
	additive_modifier = {
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		persistent_event_target:baptizing_pope_per = { character = FROM } #Ruler asking was baptized by this very same Pope.
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_myself
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		has_dlc = "Holy Fury"
		higher_tier_than = DUKE
		age = 16
		religion = FROM
		is_feudal = yes
		OR = { 
			religion = catholic
			religion = fraticelli
		}
		NOR = { 
			trait = crowned_by_pope 
			trait = crowned_by_bishop
			trait = crowned_by_priest
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		NOT = { persistent_event_target:coronation_priest_per = { character = FROM } } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		persistent_event_target:coronation_priest_per = { character = FROM } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = { 
		value = 7 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { vassal_of = ROOT } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		dynasty = FROM
		NOT = { is_close_relative = FROM }
	}
	additive_modifier = { 
		value = 8 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_close_relative = FROM
		NOT = { FROM = { is_child_of = ROOT } }
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { is_child_of = ROOT }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_friend = FROM
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_lover = FROM
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_rival = FROM
	}
	additive_modifier = { 
		value = 2 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		culture = FROM
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		primary_title = {  
			has_law = investiture_law_1
		} 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
 		is_preparing_crusade = yes 
		has_pledged_crusade_participation = yes
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = {
 			any_war = { using_cb = new_crusade }
 			any_war = { using_cb = crusade }
		}
	}
	#Influence over Cardinals.
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 25
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_fraticelli_cardinal
	}
	
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		NOT = { piety = -250 }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -250
		NOT = { piety = -100 }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -100
		NOT = { piety = -50 }
	}
	additive_modifier = { 
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 150
		NOT = { piety = 350 }
	}
	additive_modifier = { 
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 350
		NOT = { piety = 750 }
	}
	additive_modifier = { 
		value = 3
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 750
		NOT = { piety = 1500 }
	}
	additive_modifier = { 
		value = 4
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
			piety = 1500
			NOT = { piety = 2000 }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 2000
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER
		factor = 0.25 # +100 Opinion = +10 points
		who = ROOT	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = cynical
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = lustful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = gluttonous
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = greedy
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = slothful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = wroth
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = envious
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = proud
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = -1
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}


	## Modifiers evaluating the Excommunication Target ##
	#Always valid for all Papal actions.
	additive_modifier = { #Saintly Bloodline boost.
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		FROMFROM = {
			any_owned_bloodline = {
				has_bloodline_flag = saintly_bloodline
				NOT = { has_bloodline_flag = wicked_saint }
			} 
		} 
	}
	additive_modifier = {
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_KINSLAYER
		FROMFROM = {
			OR = {
				trait = kinslayer
				trait = familial_kinslayer
				trait = dynastic_kinslayer
			}
		}
	}
	additive_modifier = {
		value = 40
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_SINNER
		FROMFROM = {
			OR = {
				has_character_modifier = rampant_sinner_christian
				has_character_modifier = rampant_sinner_dharmic
				has_character_modifier = known_satanist
				has_character_modifier = known_witch
			}
		}
	}
	additive_modifier = {
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			NOT = { persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } }
		}
	}
	additive_modifier = {
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } #Ruler asking was baptized by this very same Pope.
		}
	}
	additive_modifier = {
		value = 100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER_TARGET
		FROMFROM = { 
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER_TARGET
		FROMFROM = { 
			has_dlc = "Holy Fury"
			higher_tier_than = DUKE
			age = 16
			religion = ROOT_FROM
			is_feudal = yes
			OR = { 
				religion = catholic
				religion = fraticelli
			}
			NOR = { 
				trait = crowned_by_pope 
				trait = crowned_by_bishop
				trait = crowned_by_priest
				trait = crowned_by_myself
			}
		}
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE_TARGET
		FROMFROM = { 
			trait = crowned_by_pope
			NOT = { persistent_event_target:coronation_priest_per = { character = ROOT_FROM } } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME_TARGET
		FROMFROM = { 
			trait = crowned_by_pope
			persistent_event_target:coronation_priest_per = { character = ROOT_FROM } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = { 
		value = -25 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE_TARGET
		FROM = { vassal_of = ROOT_FROMFROM } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = -5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY_TARGET
		FROM = { 
			dynasty = ROOT_FROMFROM 
			NOT = { is_close_relative = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = -10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE_TARGET
		FROM = { 
			is_close_relative = ROOT_FROMFROM
			NOT = { is_child_of = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = -15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT_TARGET
		FROM = { is_child_of = ROOT_FROMFROM }
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND_TARGET
		FROMFROM = { is_friend = ROOT_FROM }
	}
	additive_modifier = { 
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER_TARGET
		FROMFROM = { is_lover = ROOT_FROM }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL_TARGET
		FROMFROM = { is_rival = ROOT_FROM }
	}
	additive_modifier = { 
		value = -1 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE_TARGET
		FROMFROM = { culture = ROOT_FROM }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE_TARGET
		FROMFROM = {  
			primary_title = {  
				has_law = investiture_law_1
			} 
		} 
	}
	additive_modifier = { 
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE_TARGET
		FROMFROM = {  
	 		is_preparing_crusade = yes 
			has_pledged_crusade_participation = yes
		}
	}
	additive_modifier = { 
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE_TARGET
		FROMFROM = {  
			OR = {
	 			any_war = { using_cb = new_crusade }
	 			any_war = { using_cb = crusade }
			}
		}
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS_TARGET
		factor = -2
		min = -45
		value = num_vassals_with_minor_title
		who = FROMFROM
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS_TARGET
		factor = -2
		min = -45
		value = num_vassals_with_minor_title
		who = FROMFROM
		key = title_fraticelli_cardinal
	}
	#Asker's Piety.
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { piety = -250 } }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -250
			NOT = { piety = -100 } 
		}
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -100
			NOT = { piety = -50 } 
		}
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 150
			NOT = { piety = 350 } 
		}
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 350
			NOT = { piety = 750 } 
		}
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 750
			NOT = { piety = 1500 } 
		}
	}
	additive_modifier = { 
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 1500
			NOT = { piety = 2000 }
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { piety = 2000 }
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER_TARGET
		factor = -0.5 # +100 Opinion = +50 points
		who = FROMFROM	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = cynical }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = lustful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = gluttonous }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = greedy }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = slothful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = wroth }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = envious }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = proud }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = -2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
}

# AI logic for how the Pope should respond to the hardcoded Ask for Invasion action
# ROOT is the asker, FROM is the Pope, FROMFROM is the target title
ask_for_invasion_chance = {
	additive_modifier = {
		value = -50
		localisation_key = AIREASON_BASE_RELUCTANCE
		always = yes
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_KINSLAYER
		OR = {
			trait = kinslayer
			trait = familial_kinslayer
			trait = dynastic_kinslayer
		}
	}
	additive_modifier = {
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_SINNER
		OR = {
			has_character_modifier = rampant_sinner_christian
			has_character_modifier = rampant_sinner_dharmic
			has_character_modifier = known_satanist
			has_character_modifier = known_witch
		}
	}
	additive_modifier = {
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROTECTS_ANTIPOPE
		FROM = {
			NOR = {
				has_claim = k_papal_state
				has_claim = d_fraticelli
			}
		}
		FROMFROM = { 
			rightful_religious_head_scope = {
				OR = {
					has_claim = k_papal_state
					has_claim = d_fraticelli
				}
			}
		}
	}
	additive_modifier = { #Sexism
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_FEMALE
		is_female = no
		NOR = { #Random world woes
			has_religion_feature = religion_equal
			has_religion_feature = religion_matriarchal
			has_religion_feature = religion_feature_bon
		}
		FROMFROM = { 
			is_female = yes 
			primary_title = { 
				OR = {
					has_law = agnatic_succession
					has_law = cognatic_succession
				}
			}
		}
	}
	additive_modifier = { #Sexism
		value = 50
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_MALE
		is_female = yes
		NOR = { #Random world woes
			has_religion_feature = religion_equal
			has_religion_feature = religion_patriarchal
			has_religion_feature = religion_feature_bon
		}
		FROMFROM = { 
			is_female = no
			primary_title = { 
				OR = {
					has_law = enatic_succession
					has_law = enatic_cognatic_succession
				}
			}
		}
	}
	additive_modifier = { #Ageism
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_BABY
		is_adult = yes
		FROMFROM = { 
			NOT = { age = 5 }
		}
	}
	additive_modifier = { #Ageism
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_CHILD
		is_adult = yes
		FROMFROM = { 
			age = 5
			NOT = { age = 16 }
		}
	}
	additive_modifier = { #Ageism
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_HEIRLESSNESS
		is_adult = yes
		NOR = { 
			trait = celibate 
			trait = eunuch
			age = 40
		}
		FROMFROM = { 
			age = 40
			NOT = { 
				any_child = { is_alive = yes }
			}
		}
	}
	#The larger Root's realm is, the less likely the Pope is to grant the Invasion.
	additive_modifier = { #Realm size
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE
		realm_size = 25
		NOT = { realm_size = 50 }
	}
	additive_modifier = { #Realm size
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE
		realm_size = 50
		NOT = { realm_size = 75 }
	}
	additive_modifier = { #Realm size
		value = -75
		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE
		realm_size = 75
		NOT = { realm_size = 100 }
	}
	additive_modifier = { #Realm size
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE
		realm_size = 100
		NOT = { realm_size = 150 }
	}
	additive_modifier = { #Realm size
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE_IMPERIAL
		realm_size = 150
	}
	additive_modifier = { #Rank
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_HIGH_TIER_KING
		real_tier = KING
	}
	additive_modifier = { #Rank
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_HIGH_TIER_EMPEROR
		real_tier = EMPEROR
	}
	#The Smaller the target's realm is, the less likely the Pope is to grant the Invasion.
	additive_modifier = { #Realm size
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE_TARGET_TINY
		FROMFROM = { NOT = { realm_size = 15 } }
	}
	additive_modifier = { #Realm size
		value = -75
		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE_TARGET
		FROMFROM = { 
			realm_size = 15
			NOT = { realm_size = 30 } 
		}
	}
	additive_modifier = { #Realm size
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE_TARGET
		FROMFROM = { 
			realm_size = 30
			NOT = { realm_size = 50 } 
		}
	}
	additive_modifier = { #Realm size
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_ON_TARGET
		FROMFROM = { 
			primary_title = { ROOT = { has_weak_claim = PREV } } 
		}
	}
	additive_modifier = { #Realm size
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_ON_TARGET_STRONG
		FROMFROM = { 
			primary_title = { ROOT = { has_strong_claim = PREV } } 
		}
	}
	## Universal modifiers ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_IS_EXCOMMUNICATED
		excommunicated_for = FROM
	}
	#Saintly Bloodline boost.
	additive_modifier = { 
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE
		NOT = { character = FROM }
		any_owned_bloodline = {
			has_bloodline_flag = saintly_bloodline
			NOT = { has_bloodline_flag = wicked_saint }
		} 
	}
	additive_modifier = {
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		NOT = { persistent_event_target:baptizing_pope_per = { character = FROM } }
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		persistent_event_target:baptizing_pope_per = { character = FROM } #Ruler asking was baptized by this very same Pope.
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_myself
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		has_dlc = "Holy Fury"
		higher_tier_than = DUKE
		age = 16
		religion = FROM
		is_feudal = yes
		OR = { 
			religion = catholic
			religion = fraticelli
		}
		NOR = { 
			trait = crowned_by_pope 
			trait = crowned_by_bishop
			trait = crowned_by_priest
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		NOT = { persistent_event_target:coronation_priest_per = { character = FROM } } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		persistent_event_target:coronation_priest_per = { character = FROM } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = { 
		value = 30 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { vassal_of = ROOT } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		dynasty = FROM
		NOT = { is_close_relative = FROM }
	}
	additive_modifier = { 
		value = 10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_close_relative = FROM
		NOT = { FROM = { is_child_of = ROOT } }
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { is_child_of = ROOT }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_friend = FROM
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_lover = FROM
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_rival = FROM
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		culture = FROM
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		primary_title = {  
			has_law = investiture_law_1
		} 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
 		is_preparing_crusade = yes 
		has_pledged_crusade_participation = yes
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = {
 			any_war = { using_cb = new_crusade }
 			any_war = { using_cb = crusade }
		}
	}
	#Influence over Cardinals.
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 30
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_fraticelli_cardinal
	}
	
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		NOT = { piety = -250 }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -250
		NOT = { piety = -100 }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -100
		NOT = { piety = -50 }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 150
		NOT = { piety = 350 }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 350
		NOT = { piety = 750 }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 750
		NOT = { piety = 1500 }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
			piety = 1500
			NOT = { piety = 2000 }
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 2000
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER
		factor = 0.25 # +100 Opinion = +25 points
		who = ROOT	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = cynical
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = lustful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = gluttonous
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = greedy
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = slothful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = wroth
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = envious
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = proud
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}


	## Modifiers evaluating the Invasion Target ##
	#Always valid for all Papal actions.
	additive_modifier = { #Saintly Bloodline boost.
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		FROMFROM = { 
			any_owned_bloodline = {
				has_bloodline_flag = saintly_bloodline
				NOT = { has_bloodline_flag = wicked_saint }
			}
		} 
	}
	additive_modifier = {
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_KINSLAYER
		FROMFROM = {
			OR = {
				trait = kinslayer
				trait = familial_kinslayer
				trait = dynastic_kinslayer
			}
		}
	}
	additive_modifier = {
		value = 40
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_SINNER
		FROMFROM = {
			OR = {
				has_character_modifier = rampant_sinner_christian
				has_character_modifier = rampant_sinner_dharmic
				has_character_modifier = known_satanist
				has_character_modifier = known_witch
			}
		}
	}
	additive_modifier = {
		value = 55
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_EXCOMMUNICATED
		FROMFROM = {
			OR = {
				trait = excommunicated
			}
		}
	}
	additive_modifier = {
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			NOT = { persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } }
		}
	}
	additive_modifier = {
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } #Ruler asking was baptized by this very same Pope.
		}
	}
	additive_modifier = {
		value = 100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER_TARGET
		FROMFROM = { 
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER_TARGET
		FROMFROM = { 
			has_dlc = "Holy Fury"
			higher_tier_than = DUKE
			age = 16
			religion = ROOT_FROM
			is_feudal = yes
			OR = { 
				religion = catholic
				religion = fraticelli
			}
			NOR = { 
				trait = crowned_by_pope 
				trait = crowned_by_bishop
				trait = crowned_by_priest
				trait = crowned_by_myself
			}
		}
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE_TARGET
		FROMFROM = { 
			trait = crowned_by_pope
			NOT = { persistent_event_target:coronation_priest_per = { character = ROOT_FROM } } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME_TARGET
		FROMFROM = { 
			trait = crowned_by_pope
			persistent_event_target:coronation_priest_per = { character = ROOT_FROM } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = { 
		value = -50 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE_TARGET
		FROM = { vassal_of = ROOT_FROMFROM } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = -5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY_TARGET
		FROM = { 
			dynasty = ROOT_FROMFROM 
			NOT = { is_close_relative = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = -10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE_TARGET
		FROM = { 
			is_close_relative = ROOT_FROMFROM
			NOT = { is_child_of = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = -15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT_TARGET
		FROM = { is_child_of = ROOT_FROMFROM }
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND_TARGET
		FROMFROM = { is_friend = ROOT_FROM }
	}
	additive_modifier = { 
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER_TARGET
		FROMFROM = { is_lover = ROOT_FROM }
	}
	additive_modifier = { 
		value = 100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL_TARGET
		FROMFROM = { is_rival = ROOT_FROM }
	}
	additive_modifier = { 
		value = -5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE_TARGET
		FROMFROM = { culture = ROOT_FROM }
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE_TARGET
		FROMFROM = {  
			primary_title = {  
				has_law = investiture_law_1
			} 
		} 
	}
	additive_modifier = { 
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE_TARGET
		FROMFROM = {  
	 		is_preparing_crusade = yes 
			has_pledged_crusade_participation = yes
		}
	}
	additive_modifier = { 
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE_TARGET
		FROMFROM = {  
			OR = {
	 			any_war = { using_cb = new_crusade }
	 			any_war = { using_cb = crusade }
			}
		}
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS_TARGET
		factor = -2
		min = -45
		value = num_vassals_with_minor_title
		who = FROMFROM
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS_TARGET
		factor = -2
		min = -45
		value = num_vassals_with_minor_title
		who = FROMFROM
		key = title_fraticelli_cardinal
	}
	#Asker's Piety.
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { piety = -250 } }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -250
			NOT = { piety = -100 } 
		}
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -100
			NOT = { piety = -50 } 
		}
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 150
			NOT = { piety = 350 } 
		}
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 350
			NOT = { piety = 750 } 
		}
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 750
			NOT = { piety = 1500 } 
		}
	}
	additive_modifier = { 
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 1500
			NOT = { piety = 2000 }
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { piety = 2000 }
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER_TARGET
		factor = -0.5 # +100 Opinion = +50 points
		who = FROMFROM	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = cynical }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = lustful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = gluttonous }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = greedy }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = slothful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = wroth }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = envious }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = proud }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}

}

# AI logic for how the Pope should respond to the hardcoded Ask for Divorce action
# ROOT is the asker, FROM is the Pope, FROMFROM is the spouse
ask_for_divorce_chance = {
	additive_modifier = {
		value = -45
		localisation_key = AIREASON_BASE_RELUCTANCE
		always = yes
	}
	additive_modifier = { 
		value = 12
		localisation_key = POPE_AIREASON_MODIFIER_MARRIAGE_INCESTUOUS
		FROM = { 
			NOT = { has_religion_feature = religion_holy_family }
		}
		FROMFROM = { 
			dynasty = ROOT
		}
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MARRIAGE_INCESTUOUS
		FROM = { 
			NOT = { has_religion_feature = religion_holy_family }
		}
		FROMFROM = { 
			OR = { 
				is_cousin_of = ROOT
				is_aunt_uncle_of = ROOT
				is_nibling_of = ROOT
			}
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_CATHOLIC
		OR = {
			religion = catholic
			religion = fraticelli
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_MANDEAN
		OR = {
			religion = mandean
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_COPTIC
		religion = miaphysite
		FROMFROM = { 
			NOR = {
				has_character_modifier = incestuous_adulterer
				has_character_modifier = incestuous_adulteress
				has_character_modifier = adulterer
				has_character_modifier = adulteress
				has_character_modifier = known_sodomite
				has_character_modifier = known_sodomite_pagan
				has_character_modifier = cradle_robber
				has_character_modifier = adulterous_priest
			}
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_COPTIC
		religion = monophysite
		FROMFROM = { 
			NOR = {
				has_character_modifier = incestuous_adulterer
				has_character_modifier = incestuous_adulteress
				has_character_modifier = adulterer
				has_character_modifier = adulteress
				has_character_modifier = known_sodomite
				has_character_modifier = known_sodomite_pagan
				has_character_modifier = cradle_robber
				has_character_modifier = adulterous_priest
			}
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_COPTIC
		religion = judaizer
		FROMFROM = { 
			NOR = {
				has_character_modifier = incestuous_adulterer
				has_character_modifier = incestuous_adulteress
				has_character_modifier = adulterer
				has_character_modifier = adulteress
				has_character_modifier = known_sodomite
				has_character_modifier = known_sodomite_pagan
				has_character_modifier = cradle_robber
				has_character_modifier = adulterous_priest
			}
		}
	}
	additive_modifier = { 
		value = 1000
		localisation_key = POPE_AIREASON_MODIFIER_MARRIAGE_INCESTUOUS
		FROM = { 
			NOT = { has_religion_feature = religion_holy_family }
		}
		FROMFROM = { 
			OR = { 
				is_grandparent_of = ROOT
				is_parent_of = ROOT
				sibling = ROOT
				is_child_of = ROOT
				is_grandchild_of = ROOT
			}
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_MARRIAGE_INCESTUOUS
		FROM = { 
			has_religion_feature = religion_holy_family
		}
		FROMFROM = { 
			dynasty = ROOT 
			NOT = { is_close_relative = ROOT }
		}
	}
	additive_modifier = { 
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_MARRIAGE_INCESTUOUS
		FROM = { 
			has_religion_feature = religion_holy_family
		}
		FROMFROM = { 
			dynasty = ROOT 
			is_close_relative = ROOT
		}
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MARRIAGE_UNCONSUMATED
		FROMFROM = { 
			is_female = yes
			is_pregnant = no
			NOT = { intrigue = 8 }
			NOT = { num_of_children = 1 }
			NOT = { trait = lustful }
			age = 16
		}
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MARRIAGE_UNCONSUMATED
		FROMFROM = { 
			is_female = no
			NOT = { num_of_children = 1 }
			NOT = { trait = lustful }
			age = 16
		}
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MARRIAGE_EUNUCH
		FROMFROM = { 
			is_female = no
			trait = eunuch
		}
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_SPOUSE_UNFAITHFUL
		FROMFROM = { 
			OR = { 
				has_character_modifier = adulterer
				has_character_modifier = adulteress
				has_character_modifier = incestuous_adulterer
				has_character_modifier = incestuous_adulteress
			}
		}
	}
	additive_modifier = { 
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_SPOUSE_FAITHFUL
		FROMFROM = { 
			NOR = { 
				has_character_modifier = adulterer
				has_character_modifier = adulteress
				has_character_modifier = incestuous_adulterer
				has_character_modifier = incestuous_adulteress
			}
			trait = chaste
		}
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_SPOUSE_HEATHEN
		FROMFROM = { 
			NOT = { 
				religion_group = ROOT_FROM
			}
		}
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_KINSLAYER
		OR = {
			trait = kinslayer
			trait = familial_kinslayer
			trait = dynastic_kinslayer
		}
	}
	additive_modifier = {
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_SINNER
		OR = {
			has_character_modifier = rampant_sinner_christian
			has_character_modifier = rampant_sinner_dharmic
			has_character_modifier = known_satanist
			has_character_modifier = known_witch
		}
	}
	## Universal modifiers ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_IS_EXCOMMUNICATED
		excommunicated_for = FROM
	}
	additive_modifier = {
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		NOT = { persistent_event_target:baptizing_pope_per = { character = FROM } }
	}
	additive_modifier = {
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		persistent_event_target:baptizing_pope_per = { character = FROM } #Ruler asking was baptized by this very same Pope.
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_myself
	}
	additive_modifier = {
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		has_dlc = "Holy Fury"
		higher_tier_than = DUKE
		age = 16
		religion = FROM
		is_feudal = yes
		OR = { 
			religion = catholic
			religion = fraticelli
		}
		NOR = { 
			trait = crowned_by_pope 
			trait = crowned_by_bishop
			trait = crowned_by_priest
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		NOT = { persistent_event_target:coronation_priest_per = { character = FROM } } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = {
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		persistent_event_target:coronation_priest_per = { character = FROM } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = { 
		value = 18 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { vassal_of = ROOT } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = 0 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		dynasty = FROM
		NOT = { is_close_relative = FROM }
	}
	additive_modifier = { 
		value = 0 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_close_relative = FROM
		NOT = { FROM = { is_child_of = ROOT } }
	}
	additive_modifier = { 
		value = 0 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { is_child_of = ROOT }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_friend = FROM
	}
	additive_modifier = { 
		value = 40
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_lover = FROM
	}
	additive_modifier = { 
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_rival = FROM
	}
	additive_modifier = { 
		value = 0 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		culture = FROM
	}
	additive_modifier = { 
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -3
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		primary_title = {  
			has_law = investiture_law_1
		} 
	}
	additive_modifier = { 
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
 		is_preparing_crusade = yes 
		has_pledged_crusade_participation = yes
	}
	additive_modifier = { 
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = {
 			any_war = { using_cb = new_crusade }
 			any_war = { using_cb = crusade }
		}
	}
	#Influence over Cardinals.
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 20
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_fraticelli_cardinal
	}
	
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		NOT = { piety = -250 }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -250
		NOT = { piety = -100 }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -100
		NOT = { piety = -50 }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 150
		NOT = { piety = 350 }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 350
		NOT = { piety = 750 }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 750
		NOT = { piety = 1500 }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
			piety = 1500
			NOT = { piety = 2000 }
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 2000
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER
		factor = 0.25 # +100 Opinion = +25 points
		who = ROOT	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = cynical
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = lustful
	}
	additive_modifier = { 
		value = -2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = gluttonous
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = greedy
	}
	additive_modifier = { 
		value = -2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = slothful
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = wroth
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = envious
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = proud
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}


	## Modifiers evaluating the Divorce Target ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_KINSLAYER
		FROMFROM = {
			OR = {
				trait = kinslayer
				trait = familial_kinslayer
				trait = dynastic_kinslayer
			}
		}
	}
	additive_modifier = {
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_SINNER
		FROMFROM = {
			OR = {
				has_character_modifier = rampant_sinner_christian
				has_character_modifier = rampant_sinner_dharmic
				has_character_modifier = known_satanist
				has_character_modifier = known_witch
			}
		}
	}
	additive_modifier = {
		value = -1
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			NOT = { persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } }
		}
	}
	additive_modifier = {
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } #Ruler asking was baptized by this very same Pope.
		}
	}
	additive_modifier = {
		value = 100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER_TARGET
		FROMFROM = { 
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER_TARGET
		FROMFROM = { 
			has_dlc = "Holy Fury"
			higher_tier_than = DUKE
			age = 16
			religion = ROOT_FROM
			is_feudal = yes
			OR = { 
				religion = catholic
				religion = fraticelli
			}
			NOR = { 
				trait = crowned_by_pope 
				trait = crowned_by_bishop
				trait = crowned_by_priest
				trait = crowned_by_myself
			}
		}
	}
	additive_modifier = {
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE_TARGET
		FROMFROM = { 
			trait = crowned_by_pope
			NOT = { persistent_event_target:coronation_priest_per = { character = ROOT_FROM } } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = {
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME_TARGET
		FROMFROM = { 
			trait = crowned_by_pope
			persistent_event_target:coronation_priest_per = { character = ROOT_FROM } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = { 
		value = 0 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE_TARGET
		FROM = { vassal_of = ROOT_FROMFROM } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = -5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY_TARGET
		FROM = { 
			dynasty = ROOT_FROMFROM 
			NOT = { is_close_relative = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = -10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE_TARGET
		FROM = { 
			is_close_relative = ROOT_FROMFROM
			NOT = { is_child_of = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = -15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT_TARGET
		FROM = { is_child_of = ROOT_FROMFROM }
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND_TARGET
		FROMFROM = { is_friend = ROOT_FROM }
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER_TARGET
		FROMFROM = { is_lover = ROOT_FROM }
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL_TARGET
		FROMFROM = { is_rival = ROOT_FROM }
	}
	additive_modifier = { 
		value = 0 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE_TARGET
		FROMFROM = { culture = ROOT_FROM }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE_TARGET
		FROMFROM = {  
			primary_title = {  
				has_law = investiture_law_1
			} 
		} 
	}
	additive_modifier = { 
		value = -4
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE_TARGET
		FROMFROM = {  
	 		is_preparing_crusade = yes 
			has_pledged_crusade_participation = yes
		}
	}
	additive_modifier = { 
		value = -7
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE_TARGET
		FROMFROM = {  
			OR = {
	 			any_war = { using_cb = new_crusade }
	 			any_war = { using_cb = crusade }
			}
		}
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS_TARGET
		factor = -2
		min = -30
		value = num_vassals_with_minor_title
		who = FROMFROM
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS_TARGET
		factor = -2
		min = -45
		value = num_vassals_with_minor_title
		who = FROMFROM
		key = title_fraticelli_cardinal
	}
	#Asker's Piety.
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { piety = -250 } }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -250
			NOT = { piety = -100 } 
		}
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -100
			NOT = { piety = -50 } 
		}
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 150
			NOT = { piety = 350 } 
		}
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 350
			NOT = { piety = 750 } 
		}
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 750
			NOT = { piety = 1500 } 
		}
	}
	additive_modifier = { 
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 1500
			NOT = { piety = 2000 }
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { piety = 2000 }
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER_TARGET
		factor = -0.5 # +100 Opinion = +50 points
		who = FROMFROM	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = cynical }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = lustful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = gluttonous }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = greedy }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = slothful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = wroth }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = envious }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = proud }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 0
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
}

# AI logic for how the Pope should respond to the hardcoded Ask for Ask to Lift Excommunication action
# ROOT is the asker, FROM is the Pope, FROMFROM is the target
ask_to_lift_excommunication_chance = {
	additive_modifier = {
		value = -50
		localisation_key = AIREASON_BASE_RELUCTANCE
		always = yes
	}
	# Never allow on yourself. Use the new decision instead.
	additive_modifier = { 
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_LIFT_EX_ON_YOURSELF
		FROMFROM = { 
			character = ROOT
		}
	}
	additive_modifier = { #Waging war against me right now.
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_LIFT_EX_WHILE_WARRING
		FROMFROM = { 
			war_with = ROOT
		}
	}

	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_KINSLAYER
		OR = {
			trait = kinslayer
			trait = familial_kinslayer
			trait = dynastic_kinslayer
		}
	}
	additive_modifier = {
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_SINNER
		OR = {
			has_character_modifier = rampant_sinner_christian
			has_character_modifier = rampant_sinner_dharmic
			has_character_modifier = known_satanist
			has_character_modifier = known_witch
		}
	}
	## Universal modifiers ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_IS_EXCOMMUNICATED
		excommunicated_for = FROM
		NOT = { character = FROMFROM } # Redundant
	}
	additive_modifier = { #Saintly Bloodline boost.
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		any_owned_bloodline = {
			has_bloodline_flag = saintly_bloodline
			NOT = { has_bloodline_flag = wicked_saint }
		}
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		NOT = { persistent_event_target:baptizing_pope_per = { character = FROM } }
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		persistent_event_target:baptizing_pope_per = { character = FROM } #Ruler asking was baptized by this very same Pope.
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_myself
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		has_dlc = "Holy Fury"
		higher_tier_than = DUKE
		age = 16
		religion = FROM
		is_feudal = yes
		OR = { 
			religion = catholic
			religion = fraticelli
		}
		NOR = { 
			trait = crowned_by_pope 
			trait = crowned_by_bishop
			trait = crowned_by_priest
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		NOT = { persistent_event_target:coronation_priest_per = { character = FROM } } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		persistent_event_target:coronation_priest_per = { character = FROM } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = { 
		value = 50 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { vassal_of = ROOT } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		dynasty = FROM
		NOT = { is_close_relative = FROM }
	}
	additive_modifier = { 
		value = 10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_close_relative = FROM
		NOT = { FROM = { is_child_of = ROOT } }
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { is_child_of = ROOT }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_friend = FROM
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_lover = FROM
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_rival = FROM
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		culture = FROM
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		primary_title = {  
			has_law = investiture_law_1
		} 
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
 		is_preparing_crusade = yes 
		has_pledged_crusade_participation = yes
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = {
 			any_war = { using_cb = new_crusade }
 			any_war = { using_cb = crusade }
		}
	}
	#Influence over Cardinals.
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_fraticelli_cardinal
	}
	
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		NOT = { piety = -250 }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -250
		NOT = { piety = -100 }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -100
		NOT = { piety = -50 }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 150
		NOT = { piety = 350 }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 350
		NOT = { piety = 750 }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 750
		NOT = { piety = 1500 }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
			piety = 1500
			NOT = { piety = 2000 }
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 2000
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER
		factor = 0.25 # +100 Opinion = +25 points
		who = ROOT	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = cynical
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = lustful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = gluttonous
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = greedy
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = slothful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = wroth
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = envious
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = proud
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}


	## Modifiers evaluating the Excommunication Target ##
	#Always valid for all Papal actions.
	additive_modifier = { #Saintly Bloodline boost.
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		FROMFROM = { 
			any_owned_bloodline = {
				has_bloodline_flag = saintly_bloodline
				NOT = { has_bloodline_flag = wicked_saint }
			}
		} 
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD_TARGET
		FROMFROM = { 
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			NOT = { persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } }
		}
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME_TARGET
		FROMFROM = { 
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } #Ruler asking was baptized by this very same Pope.
		}
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER_TARGET
		FROMFROM = { 
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER_TARGET
		FROMFROM = { 
			has_dlc = "Holy Fury"
			higher_tier_than = DUKE
			age = 16
			religion = ROOT_FROM
			is_feudal = yes
			OR = { 
				religion = catholic
				religion = fraticelli
			}
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
			NOR = { 
				trait = crowned_by_pope 
				trait = crowned_by_bishop
				trait = crowned_by_priest
				trait = crowned_by_myself
			}
		}
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE_TARGET
		FROMFROM = { 
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
			trait = crowned_by_pope
			NOT = { persistent_event_target:coronation_priest_per = { character = ROOT_FROM } } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = {
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME_TARGET
		FROMFROM = { 
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
			trait = crowned_by_pope
			persistent_event_target:coronation_priest_per = { character = ROOT_FROM } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = { 
		value = 50 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE_TARGET
		FROM = { 
			vassal_of = ROOT_FROMFROM #Overrides base acceptance.
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
		} 
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY_TARGET
		FROM = { 
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
			dynasty = ROOT_FROMFROM 
			NOT = { is_close_relative = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = 10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE_TARGET
		FROM = { 
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
			is_close_relative = ROOT_FROMFROM
			NOT = { is_child_of = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT_TARGET
		FROM = { 
			is_child_of = ROOT_FROMFROM
			NOT = { character = ROOT } # Don't check against yourself, silly AI.
		}
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND_TARGET
		FROMFROM = { is_friend = ROOT_FROM }
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER_TARGET
		FROMFROM = { is_lover = ROOT_FROM }
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL_TARGET
		FROMFROM = { is_rival = ROOT_FROM }
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE_TARGET
		FROMFROM = { culture = ROOT_FROM }
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = {  
			primary_title = {  
				has_law = investiture_law_1
			} 
		} 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = {  
	 		is_preparing_crusade = yes 
			has_pledged_crusade_participation = yes
		}
	}
	additive_modifier = { 
		value = 100
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = {  
			OR = {
	 			any_war = { using_cb = new_crusade }
	 			any_war = { using_cb = crusade }
			}
		}
	}
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = { NOT = { piety = -250 } }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = { 
			piety = -250
			NOT = { piety = -100 } 
		}
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = { 
			piety = -100
			NOT = { piety = -50 } 
		}
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = { 
			piety = 150
			NOT = { piety = 350 } 
		}
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = { 
			piety = 350
			NOT = { piety = 750 } 
		}
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = { 
			piety = 750
			NOT = { piety = 1500 } 
		}
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = { 
			piety = 1500
			NOT = { piety = 2000 }
		}
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROMFROM = { piety = 2000 }
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = cynical }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = lustful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = gluttonous }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = greedy }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = slothful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = wroth }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = envious }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = proud }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE_TARGET
		FROMFROM = { NOT = { character = ROOT } } # Don't check against yourself, silly AI.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
}

# AI logic for how the Pope should respond to the hardcoded Ask for Money action
# ROOT is the asker, FROM is the Pope
ask_for_money_chance = {
	additive_modifier = {
		value = -50
		localisation_key = AIREASON_BASE_RELUCTANCE
		always = yes
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_KINSLAYER
		OR = {
			trait = kinslayer
			trait = familial_kinslayer
			trait = dynastic_kinslayer
		}
	}
	additive_modifier = {
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_SINNER
		OR = {
			has_character_modifier = rampant_sinner_christian
			has_character_modifier = rampant_sinner_dharmic
			has_character_modifier = known_satanist
			has_character_modifier = known_witch
		}
	}
	additive_modifier = {
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_OPPOSES_EXCOMMUNICATED_LIEGE	
		in_faction = faction_claimant
		liege = {
			excommunicated_for = FROM
		}
	}
	additive_modifier = {
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_FACTIONS_AGAINST_ANTIPOPE
		in_faction = faction_antiking
		FROM = {
			NOR = {
				has_claim = k_papal_state
				has_claim = d_fraticelli
			}
		}
	}
	additive_modifier = {
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_ASKED_MONEY_ALREADY
		FROM = {
			has_opinion_modifier = {
				modifier = asked_for_money
				who = ROOT
			}
		}
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_RULER_IS_RICH
		wealth = 150
		NOT = { wealth = 250 }
	}
	additive_modifier = {
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_RULER_IS_RICH
		wealth = 250
		NOT = { wealth = 400 }
	}
	additive_modifier = {
		value = -75
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_RULER_IS_RICH
		wealth = 400
		NOT = { wealth = 600 }
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_RULER_IS_RICH
		wealth = 600
	}
	additive_modifier = {
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_CHURH_IS_BANKRUPT
		FROM = {
			wealth = 100 
			NOT = { wealth = 250 } 
		}
	}
	additive_modifier = {
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_CHURCH_IS_BANKRUPT
		FROM = {
			wealth = 50 
			NOT = { wealth = 100 } 
		}
	}
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_CHURCH_IS_BANKRUPT_REALLY
		FROM = {
			NOT = { wealth = 50 } 
		}
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_POPE_GREEDY
		FROM = {
			trait = greedy
		}
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_LOAN_POPE_NO_REFUNDS
		FROM = {
			has_opinion_modifier = {
				who = ROOT
				modifier = opinion_coronation_money_refund
			}
		}
	}
	## Universal modifiers ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_IS_EXCOMMUNICATED
		excommunicated_for = FROM
	}
	additive_modifier = { #Saintly Bloodline boost.
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		any_owned_bloodline = {
			has_bloodline_flag = saintly_bloodline
			NOT = { has_bloodline_flag = wicked_saint }
		}
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		NOT = { persistent_event_target:baptizing_pope_per = { character = FROM } }
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		persistent_event_target:baptizing_pope_per = { character = FROM } #Ruler asking was baptized by this very same Pope.
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_myself
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		has_dlc = "Holy Fury"
		higher_tier_than = DUKE
		age = 16
		religion = FROM
		is_feudal = yes
		OR = { 
			religion = catholic
			religion = fraticelli
		}
		NOR = { 
			trait = crowned_by_pope 
			trait = crowned_by_bishop
			trait = crowned_by_priest
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		NOT = { persistent_event_target:coronation_priest_per = { character = FROM } } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		persistent_event_target:coronation_priest_per = { character = FROM } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = { 
		value = 50 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { vassal_of = ROOT } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		dynasty = FROM
		NOT = { is_close_relative = FROM }
	}
	additive_modifier = { 
		value = 10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_close_relative = FROM
		NOT = { FROM = { is_child_of = ROOT } }
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { is_child_of = ROOT }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_friend = FROM
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_lover = FROM
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_rival = FROM
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		culture = FROM
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		primary_title = {  
			has_law = investiture_law_1
		} 
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
 		is_preparing_crusade = yes 
		has_pledged_crusade_participation = yes
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = {
 			any_war = { using_cb = new_crusade }
 			any_war = { using_cb = crusade }
		}
	}
	#Influence over Cardinals.
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_fraticelli_cardinal
	}
	
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		NOT = { piety = -250 }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -250
		NOT = { piety = -100 }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -100
		NOT = { piety = -50 }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 150
		NOT = { piety = 350 }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 350
		NOT = { piety = 750 }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 750
		NOT = { piety = 1500 }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
			piety = 1500
			NOT = { piety = 2000 }
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 2000
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER
		factor = 0.25 # +100 Opinion = +25 points
		who = ROOT	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = cynical
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = lustful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = gluttonous
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = greedy
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = slothful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = wroth
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = envious
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = proud
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
}

# AI logic for how the Pope should respond to the hardcoded Ask for Crusade action
# ROOT is the asker, FROM is the Pope
ask_for_crusade_chance = {
	additive_modifier = {
		value = -50
		localisation_key = AIREASON_BASE_RELUCTANCE
		always = yes
	}
	additive_modifier = {
		value = 100
		localisation_key = POPE_AIREASON_MODIFIER_CRUSADE_ZEALOUS_POPE
		FROM = {
			trait = zealous
		}
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_KINSLAYER
		OR = {
			trait = kinslayer
			trait = familial_kinslayer
			trait = dynastic_kinslayer
		}
	}
	additive_modifier = {
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_SINNER
		OR = {
			has_character_modifier = rampant_sinner_christian
			has_character_modifier = rampant_sinner_dharmic
			has_character_modifier = known_satanist
			has_character_modifier = known_witch
		}
	}
#	additive_modifier = {
#		value = -25
#		localisation_key = POPE_AIREASON_MODIFIER_CRUSADE_POPE_SYMPATHETIC
#		OR = { 
#			AND = {
#				FROM = { trait = sympathy_pagans }
#				FROMFROM = { religion_group = pagan_group }
#			}
#			AND = {
#				FROM = { trait = sympathy_zoroastrianism }
#				FROMFROM = { religion_group = zoroastrian_group }
#			}
#			AND = {
#				FROM = { trait = sympathy_islam }
#				FROMFROM = { religion_group = muslim }
#			}
#			AND = {
#				FROM = { trait = sympathy_judaism }
#				FROMFROM = { religion_group = jewish_group }
#			}
#			AND = {
#				FROM = { trait = sympathy_indian }
#				FROMFROM = { religion_group = indian_group }
#			}
#		}
#	}
#	additive_modifier = {
#		value = 25
#		localisation_key = POPE_AIREASON_MODIFIER_CRUSADE_HOLY_LAND
#		FROMFROM = { 
#			completely_controls = d_jerusalem
#		}
#	}
#	additive_modifier = {
#		value = 50
#		localisation_key = POPE_AIREASON_MODIFIER_CRUSADE_ROME
#		FROMFROM = { 
#			completely_controls = d_latium
#		}
#	}
	#The Smaller the target's realm is, the less likely the Pope is to grant the Crusade.
#	additive_modifier = { #Realm size
#		value = -50
#		localisation_key = POPE_AIREASON_MODIFIER_CRUSADE_REALM_SIZE_TARGET_TINY
#		FROMFROM = { NOT = { realm_size = 10 } }
#	}
#	additive_modifier = { #Realm size
#		value = -25
#		localisation_key = POPE_AIREASON_MODIFIER_CRUSADE_REALM_SIZE_TARGET
#		FROMFROM = { 
#			realm_size = 10
#			NOT = { realm_size = 25 } 
#		}
#	}
#	additive_modifier = { #Realm size
#		value = -5
#		localisation_key = POPE_AIREASON_MODIFIER_REALM_SIZE_TARGET
#		FROMFROM = { 
#			realm_size = 25
#			NOT = { realm_size = 50 } 
#		}
#	}
	## Universal modifiers ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_IS_EXCOMMUNICATED
		excommunicated_for = FROM
	}
	additive_modifier = { #Saintly Bloodline boost.
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		any_owned_bloodline = {
			has_bloodline_flag = saintly_bloodline
			NOT = { has_bloodline_flag = wicked_saint }
		} 
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_FAITH_THREATENED
		religion_authority = 5.0
		NOT = { religion_authority = 7.0 }
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_FAITH_THREATENED
		religion_authority = 2.5
		NOT = { religion_authority = 5.0 }
	}
	additive_modifier = {
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_FAITH_THREATENED_FORREALS
		NOT = { religion_authority = 2.5 }
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		NOT = { persistent_event_target:baptizing_pope_per = { character = FROM } }
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		persistent_event_target:baptizing_pope_per = { character = FROM } #Ruler asking was baptized by this very same Pope.
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_myself
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		has_dlc = "Holy Fury"
		higher_tier_than = DUKE
		age = 16
		religion = FROM
		is_feudal = yes
		OR = { 
			religion = catholic
			religion = fraticelli
		}
		NOR = { 
			trait = crowned_by_pope 
			trait = crowned_by_bishop
			trait = crowned_by_priest
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		NOT = { persistent_event_target:coronation_priest_per = { character = FROM } } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		persistent_event_target:coronation_priest_per = { character = FROM } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = { 
		value = 50 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { vassal_of = ROOT } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		dynasty = FROM
		NOT = { is_close_relative = FROM }
	}
	additive_modifier = { 
		value = 10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_close_relative = FROM
		NOT = { FROM = { is_child_of = ROOT } }
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { is_child_of = ROOT }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_friend = FROM
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_lover = FROM
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_rival = FROM
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		culture = FROM
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		primary_title = {  
			has_law = investiture_law_1
		} 
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
 		is_preparing_crusade = yes 
		has_pledged_crusade_participation = yes
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = {
 			any_war = { using_cb = new_crusade }
 			any_war = { using_cb = crusade }
		}
	}
	#Influence over Cardinals.
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 4
		max = 80
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 4
		max = 80
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_fraticelli_cardinal
	}
	
	#Asker's Piety.
	additive_modifier = { 
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		NOT = { piety = -250 }
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -250
		NOT = { piety = -100 }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -100
		NOT = { piety = -50 }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 150
		NOT = { piety = 350 }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 350
		NOT = { piety = 750 }
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 750
		NOT = { piety = 1500 }
	}
	additive_modifier = { 
		value = 40
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
			piety = 1500
			NOT = { piety = 2000 }
	}
	additive_modifier = { 
		value = 80
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 2000
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER
		factor = 0.5 # +100 Opinion = +50 points
		who = ROOT	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = cynical
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = lustful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = gluttonous
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = greedy
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = slothful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = wroth
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = envious
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = proud
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
}

# AI logic for how the Pope should respond to the hardcoded Ask for Claim action
# ROOT is the asker, FROM is the Pope, FROMFROM is the target character, FROMFROMFROM is the target title
ask_for_claim_chance = {
	additive_modifier = {
		value = -50
		localisation_key = AIREASON_BASE_RELUCTANCE
		always = yes
	}
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_KINSLAYER
		OR = {
			trait = kinslayer
			trait = familial_kinslayer
			trait = dynastic_kinslayer
		}
	}
	additive_modifier = {
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_SINNER
		OR = {
			has_character_modifier = rampant_sinner_christian
			has_character_modifier = rampant_sinner_dharmic
			has_character_modifier = known_satanist
			has_character_modifier = known_witch
		}
	}
	additive_modifier = { #Title history
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_TITLE_HELD_BY_DYNASTY
		real_tier = EMPEROR
		FROMFROMFROM = { 
			any_previous_holder = { dynasty = ROOT }
		}
	}
	additive_modifier = { #Culture 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_CULTURE_AS_TARGET
		FROM = { 
			culture = ROOT
		}
	}
	additive_modifier = { #Dynasty
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_DYNASTY_AS_TARGET
		FROMFROM = {  
			NOT =  { dynasty = none }
			dynasty = ROOT
		}
	}
	additive_modifier = { #Close Relative
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_CLOSE_RELATIVE_OF_TARGET
		FROMFROM = { 
			is_close_relative = ROOT
		}
	}
	additive_modifier = { #Bullying
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = COUNT
		FROMFROM = { 
			lower_real_tier_than = ROOT
		}
	}
	additive_modifier = { #Bullying
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = DUKE
		FROMFROM = { 
			lower_real_tier_than = ROOT
		}
	}
	additive_modifier = { #Bullying
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = KING
		FROMFROM = { 
			real_tier = DUKE
		}
	}
	additive_modifier = { #Bullying
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = KING
		FROMFROM = { 
			real_tier = COUNT
		}
	}
	additive_modifier = { #Bullying
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = KING
		FROMFROM = { 
			real_tier = BARON
		}
	}
	additive_modifier = { #Bullying
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = EMPEROR
		FROMFROM = { 
			real_tier = KING
		}
	}
	additive_modifier = { #Bullying
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = EMPEROR
		FROMFROM = { 
			real_tier = DUKE
		}
	}
	additive_modifier = { #Bullying
		value = -35
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = EMPEROR
		FROMFROM = { 
			real_tier = COUNT
		}
	}
	additive_modifier = { #Bullying
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_CLAIM_SAME_LOWER_TIER_THAN_TARGET
		real_tier = EMPEROR
		FROMFROM = { 
			real_tier = BARON
		}
	}
	additive_modifier = { #Sexism
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_OF_CLAIM_IS_FEMALE
		is_female = no
		NOR = { #Random world woes
			has_religion_feature = religion_equal
			has_religion_feature = religion_matriarchal
			has_religion_feature = religion_feature_bon
		}
		FROMFROMFROM = { 
			OR = {
				has_law = agnatic_succession
				has_law = cognatic_succession
			}
		}
		FROMFROM = { 
			is_female = yes 
		}
	}
	additive_modifier = { #Sexism
		value = 50
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_OF_CLAIM_IS_MALE
		is_female = yes
		NOR = { #Random world woes
			has_religion_feature = religion_equal
			has_religion_feature = religion_patriarchal
			has_religion_feature = religion_feature_bon
		}
		FROMFROMFROM = { 
			OR = {
				has_law = enatic_succession
				has_law = enatic_cognatic_succession
			}
		}
		FROMFROM = { 
			is_female = no
		}
	}
	additive_modifier = { #Ageism
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_BABY
		is_adult = yes
		FROMFROM = { 
			NOT = { age = 5 }
		}
	}
	additive_modifier = { #Ageism
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_IS_CHILD
		is_adult = yes
		FROMFROM = { 
			age = 5
			NOT = { age = 16 }
		}
	}
	additive_modifier = { #Ageism
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_HEIRLESSNESS
		is_adult = yes
		NOR = { 
			trait = celibate 
			trait = eunuch
			age = 40
		}
		FROMFROM = { 
			age = 40
			NOT = { 
				any_child = { is_alive = yes }
			}
		}
	}
	## Universal modifiers ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_IS_EXCOMMUNICATED
		excommunicated_for = FROM
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		NOT = { persistent_event_target:baptizing_pope_per = { character = FROM } }
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		persistent_event_target:baptizing_pope_per = { character = FROM } #Ruler asking was baptized by this very same Pope.
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_myself
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		has_dlc = "Holy Fury"
		higher_tier_than = DUKE
		age = 16
		religion = FROM
		is_feudal = yes
		OR = { 
			religion = catholic
			religion = fraticelli
		}
		NOR = { 
			trait = crowned_by_pope 
			trait = crowned_by_bishop
			trait = crowned_by_priest
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 1
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		NOT = { persistent_event_target:coronation_priest_per = { character = FROM } } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		persistent_event_target:coronation_priest_per = { character = FROM } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = { 
		value = 50 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { vassal_of = ROOT } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		dynasty = FROM
		NOT = { is_close_relative = FROM }
	}
	additive_modifier = { 
		value = 10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_close_relative = FROM
		NOT = { FROM = { is_child_of = ROOT } }
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { is_child_of = ROOT }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_friend = FROM
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_lover = FROM
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_rival = FROM
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		primary_title = {  
			has_law = investiture_law_1
		} 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
 		is_preparing_crusade = yes 
		has_pledged_crusade_participation = yes
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = {
 			any_war = { using_cb = new_crusade }
 			any_war = { using_cb = crusade }
		}
	}
	#Influence over Cardinals.
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_fraticelli_cardinal
	}
	
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		NOT = { piety = -250 }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -250
		NOT = { piety = -100 }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -100
		NOT = { piety = -50 }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 150
		NOT = { piety = 350 }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 350
		NOT = { piety = 750 }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 750
		NOT = { piety = 1500 }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
			piety = 1500
			NOT = { piety = 2000 }
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 2000
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER
		factor = 0.25 # +100 Opinion = +25 points
		who = ROOT	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = cynical
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = lustful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = gluttonous
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = greedy
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = slothful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = wroth
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = envious
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = proud
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}


	## Modifiers evaluating the Claim Target Holder ##
	#Always valid for all Papal actions.
	additive_modifier = { #Saintly Bloodline boost.
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		FROMFROM = { 
			any_owned_bloodline = {
				has_bloodline_flag = saintly_bloodline
				NOT = { has_bloodline_flag = wicked_saint }
			}
		} 
	}
	additive_modifier = {
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_KINSLAYER
		FROMFROM = {
			OR = {
				trait = kinslayer
				trait = familial_kinslayer
				trait = dynastic_kinslayer
			}
		}
	}
	additive_modifier = {
		value = 40
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_SINNER
		FROMFROM = {
			OR = {
				has_character_modifier = rampant_sinner_christian
				has_character_modifier = rampant_sinner_dharmic
				has_character_modifier = known_satanist
				has_character_modifier = known_witch
			}
		}
	}
	additive_modifier = {
		value = 40
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_EXCOMMUNICATED
		FROMFROM = {
			OR = {
				trait = excommunicated
			}
		}
	}
	additive_modifier = {
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			NOT = { persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } }
		}
	}
	additive_modifier = {
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } #Ruler asking was baptized by this very same Pope.
		}
	}
	additive_modifier = {
		value = 100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER_TARGET
		FROMFROM = { 
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER_TARGET
		FROMFROM = { 
			has_dlc = "Holy Fury"
			higher_tier_than = DUKE
			age = 16
			religion = ROOT_FROM
			is_feudal = yes
			OR = { 
				religion = catholic
				religion = fraticelli
			}
			NOR = { 
				trait = crowned_by_pope 
				trait = crowned_by_bishop
				trait = crowned_by_priest
				trait = crowned_by_myself
			}
		}
	}
	additive_modifier = {
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE_TARGET
		FROMFROM = { 
			trait = crowned_by_pope
			NOT = { persistent_event_target:coronation_priest_per = { character = ROOT_FROM } } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = {
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME_TARGET
		FROMFROM = { 
			trait = crowned_by_pope
			persistent_event_target:coronation_priest_per = { character = ROOT_FROM } #Ruler asking was crowned by this very same Pope.
		}
	}
	additive_modifier = { 
		value = -50 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE_TARGET
		FROM = { vassal_of = ROOT_FROMFROM } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = -5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY_TARGET
		FROM = { 
			dynasty = ROOT_FROMFROM 
			NOT = { is_close_relative = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = -10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE_TARGET
		FROM = { 
			is_close_relative = ROOT_FROMFROM
			NOT = { is_child_of = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = -15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT_TARGET
		FROM = { is_child_of = ROOT_FROMFROM }
	}
	additive_modifier = { 
		value = -50
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND_TARGET
		FROMFROM = { is_friend = ROOT_FROM }
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER_TARGET
		FROMFROM = { is_lover = ROOT_FROM }
	}
	additive_modifier = { 
		value = 50
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL_TARGET
		FROMFROM = { is_rival = ROOT_FROM }
	}
	additive_modifier = { 
		value = -5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE_TARGET
		FROMFROM = { culture = ROOT_FROM }
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE_TARGET
		FROMFROM = {  
			primary_title = {  
				has_law = investiture_law_1
			} 
		} 
	}
	additive_modifier = { 
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE_TARGET
		FROMFROM = {  
	 		is_preparing_crusade = yes 
			has_pledged_crusade_participation = yes
		}
	}
	additive_modifier = { 
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE_TARGET
		FROMFROM = {  
			OR = {
	 			any_war = { using_cb = new_crusade }
	 			any_war = { using_cb = crusade }
			}
		}
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS_TARGET
		factor = -2
		min = -45
		value = num_vassals_with_minor_title
		who = FROMFROM
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS_TARGET
		factor = -2
		min = -45
		value = num_vassals_with_minor_title
		who = FROMFROM
		key = title_fraticelli_cardinal
	}
	#Target's Piety.
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { piety = -250 } }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -250
			NOT = { piety = -100 } 
		}
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -100
			NOT = { piety = -50 } 
		}
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 150
			NOT = { piety = 350 } 
		}
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 350
			NOT = { piety = 750 } 
		}
	}
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 750
			NOT = { piety = 1500 }
		}
	}
	additive_modifier = { 
		value = -20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = {  
			piety = 1500
			NOT = { piety = 2000 }
		}
	}
	additive_modifier = { 
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { piety = 2000 }
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = cynical }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = lustful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = gluttonous }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = greedy }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = slothful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = wroth }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = envious }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = proud }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER_TARGET
		factor = 0.25 # +100 Opinion = +25 points
		who = ROOT	 
		this = FROMFROM #The Pope's opinion of ROOT.
	}
}

# AI logic for how the Pope should respond to the hardcoded Nominate Bishop action
# ROOT is the asker, FROM is the Pope, FROMFROM is the potential bishop
nominate_bishop_chance = {
	additive_modifier = {
		value = -50
		localisation_key = AIREASON_BASE_RELUCTANCE
		always = yes
	}
	additive_modifier = { #Theological education
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BISHOP_EDUCATION
		FROMFROM = { 
			has_education_learning_trigger = yes
		}
	}
	#Tiered learning.
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_BISHOP_LEARNING
		FROMFROM = { 
			NOT = { learning = 5 }
		}
	}
	additive_modifier = { 
		value = 2
		localisation_key = POPE_AIREASON_MODIFIER_BISHOP_LEARNING
		FROMFROM = { 
			learning = 5
			NOT = { learning = 8 }
		}
	}
	additive_modifier = { 
		value = 4
		localisation_key = POPE_AIREASON_MODIFIER_BISHOP_LEARNING
		FROMFROM = { 
			learning = 8
			NOT = { learning = 12 }
		}
	}
	additive_modifier = { 
		value = 6
		localisation_key = POPE_AIREASON_MODIFIER_BISHOP_LEARNING
		FROMFROM = { 
			learning = 12
			NOT = { learning = 16 }
		}
	}
	additive_modifier = { 
		value = 8
		localisation_key = POPE_AIREASON_MODIFIER_BISHOP_LEARNING
		FROMFROM = { 
			learning = 16
			NOT = { learning = 20 }
		}
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BISHOP_LEARNING
		FROMFROM = { 
			learning = 20
		}
	}
	## Universal modifiers ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -1000
		localisation_key = POPE_AIREASON_MODIFIER_IS_EXCOMMUNICATED
		excommunicated_for = FROM
	}
	additive_modifier = { #Saintly Bloodline boost.
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		any_owned_bloodline = {
			has_bloodline_flag = saintly_bloodline
			NOT = { has_bloodline_flag = wicked_saint }
		}
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		NOT = { persistent_event_target:baptizing_pope_per = { character = FROM } }
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = { 
			trait = baptized_by_pope 
			trait = baptized_by_patriarch
		}
		persistent_event_target:baptizing_pope_per = { character = FROM } #Ruler asking was baptized by this very same Pope.
	}
	additive_modifier = {
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_NAPOLEON_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_myself
	}
	additive_modifier = {
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_UNCROWNED_RULER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		has_dlc = "Holy Fury"
		higher_tier_than = DUKE
		age = 16
		religion = FROM
		is_feudal = yes
		OR = { 
			religion = catholic
			religion = fraticelli
		}
		NOR = { 
			trait = crowned_by_pope 
			trait = crowned_by_bishop
			trait = crowned_by_priest
			trait = crowned_by_myself
		}
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		NOT = { persistent_event_target:coronation_priest_per = { character = FROM } } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = {
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_CROWNED_BY_ME
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		trait = crowned_by_pope
		persistent_event_target:coronation_priest_per = { character = FROM } #Ruler asking was crowned by this very same Pope.
	}
	additive_modifier = { 
		value = 50 
		localisation_key = POPE_AIREASON_MODIFIER_PET_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { vassal_of = ROOT } #Overrides base acceptance.
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		dynasty = FROM
		NOT = { is_close_relative = FROM }
	}
	additive_modifier = { 
		value = 10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_close_relative = FROM
		NOT = { FROM = { is_child_of = ROOT } }
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { is_child_of = ROOT }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_friend = FROM
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_lover = FROM
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		is_rival = FROM
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		culture = FROM
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT 
				modifier = opinion_supported_pope
			}
		} 
	}
	additive_modifier = { 
		value = -30
		localisation_key = POPE_AIREASON_MODIFIER_FREE_INVESTITURE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		primary_title = {  
			has_law = investiture_law_1
		} 
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_PLEDGED_TO_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
 		is_preparing_crusade = yes 
		has_pledged_crusade_participation = yes
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_WAGING_CRUSADE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		OR = {
 			any_war = { using_cb = new_crusade }
 			any_war = { using_cb = crusade }
		}
	}
	#Influence over Cardinals.
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_cardinal
	}
	additive_exported_value_modifier = {
		localisation_key = POPE_AIREASON_MODIFIER_CONTROLLED_CARDINALS
		factor = 2
		max = 45
		value = num_vassals_with_minor_title
		who = ROOT
		key = title_fraticelli_cardinal
	}
	
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		NOT = { piety = -250 }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -250
		NOT = { piety = -100 }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = -100
		NOT = { piety = -50 }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 150
		NOT = { piety = 350 }
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 350
		NOT = { piety = 750 }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 750
		NOT = { piety = 1500 }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
			piety = 1500
			NOT = { piety = 2000 }
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		piety = 2000
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER
		factor = 0.25 # +100 Opinion = +25 points
		who = ROOT	 
		this = FROM #The Pope's opinion of ROOT.
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = cynical
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = lustful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = gluttonous
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = greedy
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = slothful
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = wroth
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = envious
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = proud
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		trait = humble
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		trait = kind
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		trait = patient
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		trait = diligent
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		trait = charitable
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		trait = temperate
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		religion_group = christian #Reformed Pagans shouldn't use these.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		trait = chaste
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE
		NOT = { character = FROM } #Not on yourself, dirty Pope.
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		trait = zealous
	}


	## Modifiers evaluating the potential Bishop ##
	#Always valid for all Papal actions.
	additive_modifier = {
		value = -25
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_KINSLAYER
		FROMFROM = {
			OR = {
				trait = kinslayer
				trait = familial_kinslayer
				trait = dynastic_kinslayer
			}
		}
	}
	additive_modifier = {
		value = -40
		localisation_key = POPE_AIREASON_MODIFIER_TARGET_IS_SINNER
		FROMFROM = {
			OR = {
				has_character_modifier = rampant_sinner_christian
				has_character_modifier = rampant_sinner_dharmic
				has_character_modifier = known_satanist
				has_character_modifier = known_witch
			}
		}
	}
	additive_modifier = {
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_CHILD_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			NOT = { persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } }
		}
	}
	additive_modifier = {
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_BAPTIZED_BY_ME_TARGET
		FROMFROM = { 
			OR = { 
				trait = baptized_by_pope 
				trait = baptized_by_patriarch
			}
			persistent_event_target:baptizing_pope_per = { character = ROOT_FROM } #Ruler asking was baptized by this very same Pope.
		}
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_DYNASTY_TARGET
		FROM = { 
			dynasty = ROOT_FROMFROM 
			NOT = { is_close_relative = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = 10 
		localisation_key = POPE_AIREASON_MODIFIER_CLOSE_RELATIVE_TARGET
		FROM = { 
			is_close_relative = ROOT_FROMFROM
			NOT = { is_child_of = ROOT_FROMFROM }
		}
	}
	additive_modifier = { 
		value = 15 
		localisation_key = POPE_AIREASON_MODIFIER_MY_PARENT_TARGET
		FROM = { is_child_of = ROOT_FROMFROM }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MY_FRIEND_TARGET
		FROMFROM = { is_friend = ROOT_FROM }
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_MY_LOVER_TARGET
		FROMFROM = { is_lover = ROOT_FROM }
	}
	additive_modifier = { 
		value = -100
		localisation_key = POPE_AIREASON_MODIFIER_MY_RIVAL_TARGET
		FROMFROM = { is_rival = ROOT_FROM }
	}
	additive_modifier = { 
		value = 5 
		localisation_key = POPE_AIREASON_MODIFIER_SAME_CULTURE_TARGET
		FROMFROM = { culture = ROOT_FROM }
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_CARDINAL_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_cardinal
			}
		} 
	}
	additive_modifier = { 
		value = 30
		localisation_key = POPE_AIREASON_MODIFIER_MADE_ME_POPE_TARGET
		FROM = {  
			has_opinion_modifier = { 
				who = ROOT_FROMFROM 
				modifier = opinion_supported_pope
			}
		} 
	}
	#Asker's Piety.
	additive_modifier = { 
		value = -15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { NOT = { piety = -250 } }
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -250
			NOT = { piety = -100 } 
		}
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = -100
			NOT = { piety = -50 } 
		}
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 150
			NOT = { piety = 350 } 
		}
	}
	additive_modifier = { 
		value = 10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 350
			NOT = { piety = 750 } 
		}
	}
	additive_modifier = { 
		value = 15
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 750
			NOT = { piety = 1500 } 
		}
	}
	additive_modifier = { 
		value = 20
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { 
			piety = 1500
			NOT = { piety = 2000 }
		}
	}
	additive_modifier = { 
		value = 25
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PIETY_TARGET
		FROMFROM = { piety = 2000 }
	}
	additive_opinion_modifier = { 
		localisation_key = POPE_AIREASON_MODIFIER_OPINION_RULER_TARGET
		factor = -0.5 # +100 Opinion = +50 points
		who = FROMFROM	 
		this = FROM #The Pope's opinion of ROOT.
	}
	additive_modifier = { #Saintly Bloodline boost.
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HAS_SAINTLY_BLOODLINE_TARGET
		NOT = { character = FROM }
		FROMFROM = { 
			any_owned_bloodline = {
				has_bloodline_flag = saintly_bloodline
				NOT = { has_bloodline_flag = wicked_saint }
			}
		} 
	}
	# Modifiers vs Virtuous Pope
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = 5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CYNICAL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = cynical }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_LUSTFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = lustful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GLUTTONOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = gluttonous }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_GREEDY_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = greedy }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_SLOTHFUL_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = slothful }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_WROTH_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = wroth }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ENVIOUS_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = envious }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PROUD_TARGET
		FROM = { 
			NOR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = proud }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	#Modifiers vs Wicked Pope
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_HUMBLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = proud
			} 
		}
		FROMFROM = { trait = humble }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_KIND_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = envious
			} 
		}
		FROMFROM = { trait = kind }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_PATIENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = wroth
			} 
		}
		FROMFROM = { trait = patient }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_DILIGENT_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = slothful
			} 
		}
		FROMFROM = { trait = diligent }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHARITABLE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = greedy
			} 
		}
		FROMFROM = { trait = charitable }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_TEMPERATE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = gluttonous
			} 
		}
		FROMFROM = { trait = temperate }
	}
	additive_modifier = { 
		value = -5
		localisation_key = POPE_AIREASON_MODIFIER_RULER_CHASTE_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = lustful
			} 
		}
		FROMFROM = { trait = chaste }
		FROMFROM = { religion_group = christian }  #Reformed Pagans shouldn't use these. 
	}
	additive_modifier = { 
		value = -10
		localisation_key = POPE_AIREASON_MODIFIER_RULER_ZEALOUS_NEGATIVE_TARGET
		FROM = { 
			OR = { 
				
	OR = {
		trait = bad_priest_christian
		trait = bad_priest_muslim
		trait = bad_priest_norse
		trait = bad_priest_tengri
		trait = bad_priest_zoroastrian
		trait = bad_priest_aztec
	} 
				trait = cynical
			} 
		}
		FROMFROM = { trait = zealous }
	}
}
