targetted_decisions = {
######################################
####### Vatican				   #######
######################################
	Deposerc-list = {
		filter = all
		ai_target_filter = all
		ai = no
		diplomacy_icon = GFX_icon_Abdiquer_Vatican
		third_party_filter = all
        third_party = ROOT		
        third_party_potential = {
            FROMFROM = {
				age = 0
				religion = ROOT
				rightful_religious_head = ROOT
				is_theocracy = yes
				prisoner = no
				independent = no
				is_landed = yes
				in_revolt = no
				trait = Cardinal-Fraticelli
				NOT = {
					any_liege = {
						has_claim = d_fraticelli
					}
					has_claim = d_fraticelli
					any_vassal = {
						has_claim = d_fraticelli
					}
				}
				NOT = {
					top_liege = {
					#	custom_tooltip = {
					#		text = any_realm_character_deposer-fraticelli
							any_realm_character = {
								has_claim = d_fraticelli
							}
					#	}
					}
				}
			}
        }
		from_potential = {
			religion = fraticelli
			NOT = { has_landed_title = d_fraticelli }
		}
		potential = {
			ROOT = {
				has_landed_title = d_fraticelli
			}
		}
		allow = {
			age = 0
			has_landed_title = d_fraticelli
			prisoner = yes
			host = {
				character = FROM
			}
			any_character = {
				trait = Cardinal-Fraticelli
			}
		#	any_character = {
		#		title = title_cardinal_fraticelli
		#	}
			FROM = {	
				NOT = {
					any_liege = {
						has_claim = d_fraticelli
					}
					has_claim = d_fraticelli
					any_vassal = {
						has_claim = d_fraticelli
					}
				}
				NOT = {
					top_liege = {
						custom_tooltip = {
							text = any_realm_character_deposer-fraticelli
							any_realm_character = {
								has_claim = d_fraticelli
							}
						}
					}
				}
			}
		}
		effect = {
			if = {
				limit = {
					FROMFROM = {
						age = 0
						religion = ROOT
						rightful_religious_head = ROOT
						is_theocracy = yes
						prisoner = no
						independent = no
						is_landed = yes
						in_revolt = no
						trait = Cardinal-Fraticelli
						NOT = {
							any_liege = {
								has_claim = d_fraticelli
							}
							has_claim = d_fraticelli
							any_vassal = {
								has_claim = d_fraticelli
							}
						}
						NOT = {
							top_liege = {
							#	custom_tooltip = {
							#		text = any_realm_character_deposer-fraticelli
									any_realm_character = {
										has_claim = d_fraticelli
									}
							#	}
							}
						}
					}
				}
				FROM = {
					prestige = -500
					add_rival = ROOT
				}
				FROMFROM = {
					current_heir = {
						save_event_target_as = pope_desposer_fraticelli
					}	
					abdicate_to = event_target:pope_desposer_fraticelli
					save_event_target_as = sucesseur_deposer_fraticelli
					save_event_target_as = nouveau_pape_tete_F
				}
				FROMFROM = {
					remove_trait = excommunicated
					remove_character_modifier = accused_apostate
				}
				FROM = {
					add_favor = event_target:sucesseur_deposer_fraticelli
				}	
				ROOT = {
					transfer_scaled_wealth = {
						to = event_target:sucesseur_deposer_fraticelli
						value = all
					}
					any_artifact = {
						show_scope_change = no
						transfer_artifact = {
							from = PREV
							to = event_target:sucesseur_deposer_fraticelli
						}
					}
					imprison = no
					add_rival = event_target:sucesseur_deposer_fraticelli
					abdicate_to = event_target:sucesseur_deposer_fraticelli
					set_player_character = event_target:sucesseur_deposer_fraticelli
					imprison = event_target:sucesseur_deposer_fraticelli
					move_character = event_target:sucesseur_deposer_fraticelli
					remove_claim = d_fraticelli	
				#	add_trait = excommunicated
				#	add_character_modifier = {
				#		name = accused_apostate
				#		duration = -1
				#	}	
				}
				character_event = {
					id = nouveau-pape.2
				#	days = 1 #ne pas activer le jour ou l event en question n apparait pas
				}
			}
		}
	}
}