decisions = {
	claim_french_throne = {
	is_high_prio = yes
		potential = {
			religion_group = christian
			has_landed_title = k_england
			OR = {
				has_claim = k_france
				completely_controls = k_france
			}
			NOT = {
				has_global_flag = england_france_coa
			}
			ROOT = {
				NOT = {
					has_character_flag = restore_england_coa
				}
			}
			OR = {
				culture = norman
				culture = english
				culture = saxon
				culture = frankish
			}
			is_feudal = yes
		}
		
		allow = {
			war = no
			prisoner = no
			ROOT = {
				has_regent = no
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		
		effect = {
			prestige = 500
			narrative_event = { id = ck2expanded.0001}
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}
		
		revoke_allowed = {
			always = no
		}
	
		ai_will_do = {
			factor = 1
		}
	}			

	form_anglican_church = {
	is_high_prio = yes
		potential = {
			year = 1100
			religion = catholic
			has_landed_title = k_england
			NOT = {
				religion_head = {
					opinion = { who = ROOT 
								value = 1
					}
				}
			}
			NOT = {
				religion_head = {
					reverse_opinion = { who = ROOT 
								value = 1
					}
				}
			}
			NOT = {
				d_church_of_england = {
					has_holder = yes
				}
			}
			k_papal_state = {
				holder_scope = {
					NOT = {
						religion_authority = .5
					}
				}
			}
			is_feudal = yes
		}
	
		allow = {
			piety = 250
			OR = {
				AND = {
					ai = no
					has_landed_title = b_canterbury
				}
				AND = {
					ai = yes
				}
			}
			NOT = {trait = zealous}
			war = no
			prisoner = no
			ROOT = {
				has_regent = no
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		
		effect = {
			piety = 500
			narrative_event = { id = ck2expanded.0002}
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}

		revoke_allowed = {
		always = no #Not used in vanilla
		}
	
		ai_will_do = {
			factor = 1
		}
	}
	
	become_anglican = {
	is_high_prio = yes
		potential = {
			d_church_of_england = {
				has_holder = yes
			}
			has_landed_title = k_england
			NOT = {
				religion = anglican
			}
			is_feudal = yes
		}		
		
		allow = {
			piety = 250
			NOT = {trait = zealous}
			ROOT = {
				has_regent = no
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		
		effect = {
			piety = -250
			ROOT = {
				religion = anglican
			}
			k_papal_state = {
				holder_scope = {
					opinion = { modifier = protestant who = ROOT years = 20 }
				}
			}
		}
		
		revoke_allowed = {
		always = no #Not used in vanilla
		}
	
		ai_will_do = {
			factor = 1
		}
	}
	
	form_united_kingdom = {
	is_high_prio = yes
		potential = {
			OR = {
				has_landed_title = k_england
				has_landed_title = k_wales
				has_landed_title = k_scotland
				has_landed_title = k_ireland
			}
			e_united_kingdom = {
				has_holder = no
			}
			is_feudal = yes
		}
		
		allow = {
			ruled_years = 10
			war = no
			prisoner = no
			ROOT = {
				has_regent = no
			}
			OR = {
				has_landed_title = k_england
				completely_controls = k_england
			}
			OR = {
				has_landed_title = k_wales
				completely_controls = k_wales
			}
			OR = {	
				has_landed_title = k_scotland
				completely_controls = k_scotland
			}
			OR = {
				has_landed_title = k_ireland
				completely_controls = k_ireland
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		effect = {
			prestige = 1000
			narrative_event = { id = ck2expanded.0003}
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}

		revoke_allowed = {
		always = no #Not used in vanilla
		}
	
		ai_will_do = {
			factor = 1
		}
	}
	
	restore_church_england = {
	is_high_prio = yes
		potential = {
			d_church_of_england = {
				has_holder = no
			}
			has_landed_title = k_england
			religion = anglican
			is_feudal = yes
		}
		
		allow = {
			piety = 250
			has_landed_title = b_canterbury
			war = no
			prisoner = no
			ROOT = {
				has_regent = no
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		
		effect = {
			piety = 500
			narrative_event = { id = ck2expanded.0004}
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}

		revoke_allowed = {
		always = no #Not used in vanilla
		}
	
		ai_will_do = {
			factor = 1
		}
	}
	
	unite_netherlands = {
		is_high_prio = yes
		potential = {
			independent = yes
			is_female = no
			OR = {
				ai = yes
				AND = {
					capital_scope = { port = yes }
					has_dlc = "The Republic"
				}
			}
			k_netherlands = {
				has_holder = no
			}
			k_republic_netherlands = {
				has_holder = no
			}
			culture = dutch
			is_feudal = yes
		}
		allow = {
			culture = dutch
			OR = {
				capital_scope = {
					province = 80
				}
				primary_title = { 
					higher_tier_than = KING
				}
			}
			AND = {
				OR = {
					has_landed_title = d_holland
					completely_controls = d_holland
				}
				OR = {
					has_landed_title = d_gelre
					completely_controls = d_gelre
				}
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		effect = {
			hidden_tooltip = {
				set_character_flag = event_pause
			}
			narrative_event = { id = ck2expanded.0010 }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.5 # On average ca 1 year before taken
			modifier = {
				factor = 2.0
				stewardship = 10
			}
			modifier = {
				factor = 2.0
				is_republic = yes
			}
		}
	}
	
	form_prussia = {
		is_high_prio = yes
		potential = {
			AND = {
				religion_group = christian
				OR = {
					culture = german
					culture = new_prussian
					culture = silesian
				}
			}
			OR = {
				has_landed_title = d_prussia
				AND = {
					higher_tier_than = KING
					completely_controls = d_prussia
				}
			}
			independent = yes
			k_prussia = {
				has_holder = no
			}
			is_feudal = yes
		}
		allow = {
			OR = {
				capital_scope = {
					province = 371
				}
				primary_title = { 
					higher_tier_than = KING
				}
			}
			AND = {
				OR = {
					has_landed_title = d_prussia
					completely_controls = d_prussia
				}
				OR = {
					has_landed_title = d_kuyavia
					completely_controls = d_kuyavia
				}
				OR = {
					has_landed_title = d_greater_poland
					completely_controls = d_greater_poland
				}
				OR = {
					has_landed_title = d_pomeralia
					completely_controls = d_pomeralia
				}
				OR = {
					has_landed_title = d_pommerania
					completely_controls = d_pommerania
				}
				OR = {
					has_landed_title = d_meissen
					completely_controls = d_meissen
				}
				OR = {
					has_landed_title = d_silesia
					completely_controls = d_silesia
				}
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		
		effect = {
			prestige = 500
			hidden_tooltip = {
				set_character_flag = event_pause
			}
			narrative_event = { id = ck2expanded.0013 }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	restore_england_coa = {
		is_high_prio = yes
		potential = {
			has_landed_title = k_england
			has_global_flag = england_france_coa
			ROOT = {
				NOT = {
					has_character_flag = changed_england_coa
				}
			}
		}
		allow = {
			war = no
			prisoner = no
			ROOT = {
				has_regent = no
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		effect = {
			prestige = 250
			narrative_event = { id = ck2expanded.0014}
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}
		
		revoke_allowed = {
			always = no
		}
	
		ai_will_do = {
			factor = 1
		}
	}	
	
	form_kalmar_union = {
	is_high_prio = yes
		potential = {
			has_landed_title = k_denmark
			culture = danish
			e_kalmar_union = {
				has_holder = no
			}
			is_feudal = yes
		}
		
		allow = {
			ruled_years = 10
			war = no
			prisoner = no
			ROOT = {
				has_regent = no
			}
			OR = {
				has_landed_title = k_denmark
				completely_controls = k_denmark
			}
			OR = {
				has_landed_title = k_sweden
				completely_controls = k_sweden
			}
			OR = {	
				has_landed_title = k_norway
				completely_controls = k_norway
			}
			OR = {
				has_landed_title = d_finland
				completely_controls = d_finland
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		effect = {
			prestige = 1000
			narrative_event = { id = ck2expanded.0029}
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}

		revoke_allowed = {
		always = no #Not used in vanilla
		}
	
		ai_will_do = {
			factor = 1
		}
	}
	
	form_austria = {
		is_high_prio = yes
		potential = {
			AND = {
				religion_group = christian
				OR = {
					culture = german
				}
			}
			OR = {
				has_landed_title = d_osterreich
				AND = {
					higher_tier_than = KING
					completely_controls = d_osterreich
				}
			}
			independent = yes
			k_austria = {
				has_holder = no
			}
			is_feudal = yes
		}
		allow = {
			OR = {
				capital_scope = {
					province = 449
				}
				primary_title = { 
					higher_tier_than = KING
				}
			}
			AND = {
				OR = {
					has_landed_title = d_osterreich
					completely_controls = d_osterreich
				}
				OR = {
					has_landed_title = d_tyrol
					completely_controls = d_tyrol
				}
				OR = {
					has_landed_title = d_carinthia
					completely_controls = d_carinthia
				}
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		
		effect = {
			prestige = 1000
			narrative_event = { id = ck2expanded.0033 }
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}

		revoke_allowed = {
		always = no #Not used in vanilla
		}
	
		ai_will_do = {
			factor = 1
		}
	}
	form_hesse = {
		is_high_prio = yes
		potential = {
			AND = {
				religion_group = christian
				OR = {
					culture = german
					culture = hessian
				}
			}
			OR = {
				has_landed_title = d_baden
				AND = {
					higher_tier_than = KING
					completely_controls = d_baden
				}
			}
			independent = yes
			k_hesse = {
				has_holder = no
			}
			is_feudal = yes
		}
		allow = {
			OR = {
				capital_scope = {
					province = 125
				}
				primary_title = { 
					higher_tier_than = KING
				}
			}
			AND = {
				OR = {
					has_landed_title = d_baden
					completely_controls = d_baden
				}
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		
		effect = {
			prestige = 1000
			narrative_event = { id = ck2expanded.0043 }
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}

		revoke_allowed = {
		always = no #Not used in vanilla
		}
	
		ai_will_do = {
			factor = 1
		}
	}
	form_ukraine = {
		is_high_prio = yes
		potential = {
			AND = {
				OR = {
					culture = russian
					culture = ukrainian
				}
			}
			OR = {
				has_landed_title = d_kiev
				AND = {
					higher_tier_than = KING
					completely_controls = d_kiev
				}
			}
			independent = yes
			k_ukraine = {
				has_holder = no
			}
			is_feudal = yes
		}
		allow = {
			OR = {
				capital_scope = {
					province = 547
				}
				primary_title = { 
					higher_tier_than = KING
				}
			}
			AND = {
				OR = {
					has_landed_title = d_kiev
					completely_controls = d_kiev
				}
				OR = {
					has_landed_title = d_crimea
					completely_controls = d_crimea
				}
				OR = {
					has_landed_title = d_pereyaslavl
					completely_controls = d_pereyaslavl
				}
				OR = {
					has_landed_title = d_cherson
					completely_controls = d_cherson
				}
				OR = {
					has_landed_title = d_sarkel
					completely_controls = d_sarkel
				}
				OR = {
					has_landed_title = d_azov
					completely_controls = d_azov
				}
			}
			hidden_tooltip = {
				NOT = {
					ROOT = {
						has_character_flag = event_pause
					}
				}
			}
		}
		
		effect = {
			prestige = 1000
			narrative_event = { id = ck2expanded.0073 }
			hidden_tooltip = {
				set_character_flag = event_pause
			}
		}

		revoke_allowed = {
		always = no #Not used in vanilla
		}
	
		ai_will_do = {
			factor = 1
		}
	}
}


targetted_decisions = {
	declare_rival = {
		ai_target_filter = court
		from_potential = {
			is_adult = yes
			NOT = {
				has_character_flag = request_sent
			}
		}
		potential = {
			is_adult = yes
			NOT = {
				is_rival = FROM
				is_friend = FROM
				is_lover = FROM
			}
			NOT = { 
				character = FROM
			}
		}
		allow = {
			NOT = {
				opinion = {
					who = FROM
					value = -50
				}
				reverse_opinion = {
					who = FROM
					value = -50
				}
			}
			NOT = {
				num_of_rivals = 5
			}
			prisoner = no
			is_within_diplo_range = FROM
		}
		effect = {
			narrative_event = { id = ck2expanded.0024 }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.6
		}
	}
	
	declare_friend = {
		ai_target_filter = court
		from_potential = {
			is_adult = yes
			NOT = {
				has_character_flag = request_sent
			}
		}
		potential = {
			is_adult = yes
			NOT = {
				is_rival = FROM
				is_friend = FROM
				is_lover = FROM
			}
			NOT = { 
				character = FROM
			}
			NOT = {
				war_with = FROM
			}
		}
		allow = {
			opinion = {
				who = FROM
				value = 50
			}
			reverse_opinion = {
				who = FROM
				value = 50
			}
			NOT = {
				num_of_friends = 5
			}
			prisoner = no
			is_within_diplo_range = FROM
		}
		effect = {
			narrative_event = { id = ck2expanded.0025 }
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.6
		}
	}
	
	take_slave = {
		ai_target_filter = court
		from_potential = {
			has_law = slavery_1
			is_liege_of = ROOT
		}
		potential = {
			prisoner = yes
			is_landed = no
			NOT = {
				trait = slave
				culture = FROM
			}
			liege = {
				has_law = slavery_1
				character = FROM
			}
		}
		allow = {
			FROM = {
				prisoner = no
			}
		}
		effect = {
			ROOT = {
				add_trait = slave
				prestige = -500
				opinion = { modifier = enslaved who = FROM years = 50 }
				move_character = FROM
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 5
				trait = cruel
			}
		}
	}
	
	free_slave = {
		ai_target_filter = court
		from_potential = {
			is_liege_of = ROOT
			NOT = {
				has_character_flag = request_sent
			}
		}
		potential = {
			trait = slave
			liege = {
				character = FROM
			}
		}
		allow = {
			FROM = {
				prisoner = no
			}
		}
		effect = {
			ROOT = {
				remove_trait = slave
			}
			FROM = {
				piety = 20
			}
			
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 5
				trait = kind
			}
			modifier = {
				factor = 100
				has_law = slavery_0
			}
		}
	}
	
	sell_slave = {
		ai_target_filter = court
		from_potential = {
			is_liege_of = ROOT
			has_law = slavery_1
			NOT = {
				has_character_flag = request_sent
			}
		}
		potential = {
			trait = slave
			liege = {
				has_law = slavery_1
				character = FROM
			}
		}
		allow = {
			FROM = {
				prisoner = no
			}
		}
		effect = {
			FROM = {
				wealth = 25
			}
			ROOT = {
				banish = yes
				remove_trait = slave
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 5
		}
	}
	
	hire_tutor = {
		ai_target_filter = court
		from_potential = {
			is_liege_of = ROOT
			has_law = education_1
		}
		potential = {
			NOT = {
				has_character_modifier = private_tutor
			}
			OR = {
				father = { character = FROM }
				mother = { character = FROM }
			}
			is_adult = no
			is_landed = no
		}
		allow = {
			FROM = {
				scaled_wealth = 0.1
			}
		}
		effect = {
			ROOT = {
				add_character_modifier = { name = private_tutor duration = -1 }
			}
			FROM = {
				scaled_wealth = -0.1
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 5
		}
	}		
}
	
