decisions = {
	destroy_primary_title = {
		potential = {
			always = no
			realm_size = 50
			ai = no
		}
		allow = {
			is_adult = yes
			prisoner = no
			independent = yes
			NOT = { trait = incapable }
		}
		effect = {
			prestige = -1000
			ROOT = {
				primary_title = {
#					any_realm_province = {
#						limit = { kingdom = { has_holder = no } }
#						kingdom = {
#							grant_title = ROOT
#							prestige = 500
#						}
#					prestige = 2
#					}
					destroy_landed_title = THIS
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}
	breakaway = {
		potential = {
			always = no
			independent = no
			is_adult = yes
					primary_title = {
						dejure_liege_title = {
							OR = {
								holder_scope = {
									NOT = { same_realm = ROOT }
								}
								has_holder = no
							}
						}
					}
		}
		allow = {
		#	liege = {
		#		OR = {
		#			NOT = {	religion = ROOT }
		#			NOT = { culture = ROOT }
		#		}
		#	}
			OR = {
				AND = {
					tier = baron
					primary_title = {
						county = {
							NOT = {
								any_neighbor_province = {
									holder_scope = { same_realm = ROOT }
								}
							}
							holder_scope = {
								NOT = { same_realm = ROOT }
							}
						}
					}
				}
				AND = {
					NOT = { 
						tier = baron
					}
					NOT = {
						any_realm_province = {
							holder_scope = { 
								OR = {
									character = ROOT
									any_liege = { character = ROOT } 
								}
							}
							
							any_neighbor_province = {
								holder_scope = { 
									NOT = {
										OR = {
											character = ROOT
											any_liege = { character = ROOT } 
										}
									}
									same_realm = ROOT 
								}
							}							
						}
					}

				}
			}
		}
		effect = {
			if = {
				limit = {
					ROOT = { tier = baron }
				}
				ROOT = {
					primary_title = {
						county = {
							holder_scope = {
								ROOT = {
									set_defacto_liege = PREV
								}
							}
						}
					}
				}
			}
			if = {
				limit = {
					NOT = { tier = baron }
					ROOT = {
						dejure_liege_title = {
							has_holder = no
						}
					}
				}
				ROOT = { set_defacto_liege = ROOT }
			}
			if = {
				limit = {
					NOT = { tier = baron }
					ROOT = {
						primary_title = {
							dejure_liege_title = {
								has_holder = yes
							}
						}
					}
				}
				ROOT = { 
					primary_title = {
						dejure_liege_title = {
							holder_scope = {
								ROOT = {
									set_defacto_liege = PREV 
								}
							}
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}
}

