conquer_franken = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		area = franconia_area
		owner = {
			NOT = { alliance_with = ROOT }
			NOT = { vassal_of = ROOT }
		}
	}
	
	allow = {
		normal_or_historical_nations = yes
		tag = BAV	
		is_subject = no
		upper_bavaria_area = {
			type = all
			owned_by = ROOT
		}
		lower_bavaria_area = {
			type = all
			owned_by = ROOT
		}
		franconia_area = {
			NOT = { owned_by = ROOT }
			NOT = { owner = { vassal_of = root } }
			NOT = { owner = { alliance_with = root } }
		}
		NOT = { has_country_flag = conquered_franconia }
		NOT = { has_country_modifier = bavarian_ambition }
	}
	abort = {
		is_subject = yes
	}
	success = {
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}
		modifier = {
			factor = 2
			adm = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		set_country_flag = conquered_franconia
		add_country_modifier = {
			name = "bavarian_ambition"
			duration = 3650
		}
		every_target_province = {
			add_province_modifier = {
				name = "faster_integration"
				duration = 3650
			}
		}
	}
}


conquer_pfalz = { #Oberpfalz
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		normal_or_historical_nations = yes
		tag = BAV		
		is_subject = no
		OR = {
			owns = 64
			owns = 3101
		}
		1757 = {		# Oberpfalz
			NOT = { owned_by = ROOT }
			NOT = { owner = { alliance_with = ROOT } }
		}
		NOT = { has_country_modifier = bavarian_ambition }
		NOT = { has_country_flag = conquered_oberpfalz }
	}
	abort = {
		is_subject = yes
	}
	success = {
		owns = 1757 #Oberpfalz
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}
		modifier = {
			factor = 2
			adm = 4
		}
	}
	immediate = {
		add_claim = 1757
	}
	abort_effect = {
		remove_claim = 1757
	}
	effect = {
		set_country_flag = conquered_oberpfalz
		add_country_modifier = {
			name = "bavarian_ambition"
			duration = 3650
		}
		1757 = {
			add_province_modifier = {
				name = "faster_integration"
				duration = 3650
			}
		}
	}
}


conquer_alzey = { #Conquer Palatinate
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		normal_or_historical_nations = yes
		tag = BAV
		is_subject = no
		1761 = {		# Worms
			NOT = { owned_by = ROOT }
			NOT = { owner = { alliance_with = ROOT } }
			OR = {
				any_neighbor_province = { owned_by = ROOT }
				77 = {
					any_neighbor_province = { owned_by = ROOT }
				}
			}
		}
		77 = {		# Worms
			NOT = { owned_by = ROOT }
			NOT = { owner = { alliance_with = ROOT } }
		}
		NOT = { has_country_modifier = bavarian_ambition }
		NOT = { has_country_flag = conquered_palatinate }
	}
	abort = {
		is_subject = yes
	}
	success = {
		owns = 1761
		owns = 77
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}
		modifier = {
			factor = 2
			adm = 4
		}
	}
	immediate = {
		add_claim = 1761
		add_claim = 77
	}
	abort_effect = {
		remove_claim = 1761
		remove_claim = 77
	}
	effect = {
		1761 = {
			if = {
				limit = { NOT = { is_core = ROOT } }
				add_province_modifier = {
					name = "faster_integration"
					duration = 3650
				}
			}
		}
		77 = {
			if = {
				limit = { NOT = { is_core = ROOT } }
				add_province_modifier = {
					name = "faster_integration"
					duration = 3650
				}
			}
		}
		set_country_flag = conquered_palatinate
		add_country_modifier = {
			name = "bavarian_ambition"
			duration = 3650
		}
	}
}


conquer_ansbach = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		normal_or_historical_nations = yes
		tag = BAV	
		is_subject = no
		71 = {		# Ansbach
			NOT = { owned_by = ROOT }
			NOT = { owner = { alliance_with = ROOT } }
			any_neighbor_province = { owned_by = ROOT }
		}
		NOT = { has_country_modifier = bavarian_ambition }
		NOT = { has_country_flag = ansbach_conquered_by_bav }
	}
	abort = {
		is_subject = yes
	}
	success = {
		owns = 71
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}
		modifier = {
			factor = 2
			adm = 4
		}
	}
	immediate = {
		add_claim = 71
	}
	abort_effect = {
		remove_claim = 71
	}
	effect = {
		set_country_flag = ansbach_conquered_by_bav
		add_country_modifier = {
			name = "bavarian_ambition"
			duration = 3650
		}
	}
}
