# Title decisions are possible vs _all_ titles and are shown in the Title Diplomacy View, not the Intrigue View. The taker is in the FROM scope.
#
# filter = [capital/primary_title/owned/vassal_owned/sub_realm_owned/realm_owned/dynasty_owned/all]
# ai_target_filter = [capital/primary_title/owned/vassal_owned/sub_realm_owned/realm_owned/dynasty_owned/all] (which titles for which the AI evaluates the decision.)
#	owned: all titles owned by the AI
#	vassal_owned: all titles owned by direct vassal rulers of the AI's employer
#	sub_realm_owned: all titles below the AI's employer
#	realm_owned: all titles in the same top realm as the AI
#	dynasty_owned: all titles owned by members of the same dynasty
#	all: all titles (Avoid if possible. VERY CPU-HEAVY!)
#	

title_decisions = {
	flag_province = {
		filter = owned
		ai_target_filter = owned
		
		from_potential = {
			
		}
		
		potential = {
            tier = COUNT
			location = {
				NOT = { has_province_flag = keep_it }
				owner = { character = FROM }
			}
			
		}
		
		allow = {
			location  = {
				NOT = { has_province_flag = keep_it }
			}
		}
		
		effect = {
			location = {
				set_province_flag = keep_it
				add_province_modifier = { name = "keep_it" duration = -1 }
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	
	unflag_province = {
		filter = owned
		ai_target_filter = owned
		
		from_potential = {
			
		}
		
		potential = {
			tier = COUNT
			location = {
				has_province_flag = keep_it
				owner = { character = FROM }
			}
		}
		
		allow = {
			location = {
				has_province_flag = keep_it
			}
		}
		
		effect = {
			location = {
				clr_province_flag = keep_it
				remove_province_modifier = keep_it
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 0
		}
	}
}