return_rome_decision = {
	picture = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"

	desc = return_rome_decision_desc
	selection_tooltip = return_rome_decision_tooltip

	is_shown = {
		is_independent_ruler = yes
		faith = faith:catholic
		exists = faith.religious_head
		NOT = {
			has_title = title:k_papal_state
		}
		faith.religious_head = {
			OR = {
				is_independent_ruler = yes
				NOT = {
					any_liege_or_above = {
						this = root
					}
				}
			}
		}
		any_sub_realm_county = {
			this = title:c_roma
		}
		NAND = {
			is_ai = no
			NOT = {
				any_sub_realm_county = {
					NOT = {
						this = title:c_roma
					}
				}
			}
		}
	}

	effect = {
		create_title_and_vassal_change = change
		scope:change = { set_title_and_vassal_change_type = returned }
		title:c_roma = {
			change_title_holder = {
				holder = faith.religious_head
				change = scope:change
			}
		}
		resolve_title_and_vassal_change = scope:change
		
		add_piety = major_piety_value
		
		faith.religious_head = {
			add_opinion = {
				target = root
				modifier = grateful_opinion
				opinion = 20
			}
		}

		stress_impact = {
			cynical = medium_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}
	}
	
	ai_check_interval = 12

	ai_potential = {
		is_at_war = no
		title:c_roma = {
			holder = {
				is_ai = yes
			}
		}
	}

	ai_will_do = {
		base = 100

		modifier = { # If you fought the pope to get rome, don't immediately hand it back
			factor = 0
			faith.religious_head = {
				has_opinion_modifier = {
					target = root
					modifier = declared_war
				}
			}
		}

		modifier = {
			factor = 0
			ai_zeal <= very_high_negative_ai_value
		}
	}
}