conquer_silesia = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		OR = {
			province_id = 264 #Breslau
			province_id = 3097 #Glogau
		}
		owner = {
			NOT = { alliance_with = ROOT }
			
		}
	}
	
	allow = {
		normal_or_historical_nations = yes
		OR = {
			tag = BRA
			tag = PRU
		}
		owns = 3096
		OR = {
			264 = {
				NOT = { owned_by = ROOT }
				NOT = { owner = { alliance_with = ROOT } }
			}
			3097 = {
				NOT = { owned_by = ROOT }
				NOT = { owner = { alliance_with = ROOT } }
			}
		}
		is_subject = no
		NOT = { has_country_modifier = prussian_ambition }
	}
	abort = {
		is_subject = yes
	}
	success = {
		all_target_province = { owned_by = ROOT }
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		set_country_flag = conquered_silesia
		add_country_modifier = {
			name = "prussian_ambition"
			duration = 3650
		}
	}
}


conquer_warmia_pru = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		normal_or_historical_nations = yes
		tag = PRU
		is_subject = no
		NOT = { has_country_modifier = prussian_ambition }
		NOT = { has_country_flag = conquered_warmia }
		42 = {		# Warmia
			NOT = { owned_by = ROOT }
			any_neighbor_province = { owned_by = ROOT }
			owner = {
				NOT = { alliance_with = ROOT }
			}
		}
	}
	abort = {
		is_subject = yes
	}
	success = {
		owns = 42
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		add_claim = 42
	}
	abort_effect = {
		remove_claim = 42
	}
	effect = {
		set_country_flag = conquered_warmia
		add_country_modifier = {
			name = "prussian_ambition"
			duration = 3650
		}
	}
}


connect_brandenburg_and_prussia = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		OR = {
			AND = {
				province_id = 48	# Stolp
				NOT = { owned_by = ROOT }
				NOT = { owned_by = PRU }
				any_neighbor_province = { owned_by = ROOT }
				OR = {
					any_neighbor_province = { owned_by = PRU }
					43 = {
						any_neighbor_province = {
							owned_by = PRU
						}
					}
				}
			}
			AND = {
				province_id = 43	# Danzig
				NOT = { owned_by = ROOT }
				NOT = { owned_by = PRU }
				any_neighbor_province = { owned_by = PRU }
				OR = {
					any_neighbor_province = { owned_by = ROOT }
					48 = {
						any_neighbor_province = {
							owned_by = ROOT
						}
					}
				}
			}
		}
	}
	allow = {
		normal_or_historical_nations = yes
		tag = BRA
		exists = PRU
		is_subject = no
		PRU = { vassal_of = BRA }
		NOT = { is_neighbor_of = PRU }
		NOT = { has_country_modifier = prussian_ambition }
		NOT = { has_country_flag = connected_brandenburg_prussia }
		OR = {
			48 = {		# Stolp
				NOT = { owned_by = ROOT }
				NOT = { owned_by = PRU }
				any_neighbor_province = { owned_by = ROOT }
				OR = {
					any_neighbor_province = { owned_by = PRU }
					43 = {
						any_neighbor_province = {
							owned_by = PRU
						}
					}
				}
			}
			43 = {		# Danzig
				NOT = { owned_by = ROOT }
				NOT = { owned_by = PRU }
				any_neighbor_province = { owned_by = PRU }
				OR = {
					any_neighbor_province = { owned_by = ROOT }
					48 = {
						any_neighbor_province = {
							owned_by = ROOT
						}
					}
				}
			}
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = PRU }
			war_with = PRU
		}
	}
	success = {
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			has_opinion = { who = PRU value = 100 }
		}
		modifier = {
			factor = 2
			adm = 4
		}
		modifier = {
			factor = 2
			alliance_with = PRU
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		set_country_flag = connect_brandenburg_and_prussia
		add_country_modifier = {
			name = "prussian_ambition"
			duration = 3650
		}
	}
}


connect_the_prussian_lands = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		OR = {
			area = west_prussia_area
			area = east_prussia_area
		}
		NOT = { owned_by = ROOT }
		NOT = { owner = { alliance_with = ROOT } }
	}
	allow = {
		normal_or_historical_nations = yes
		OR = {
			AND = {
				tag = BRA
				NOT = { exists = PRU }
			}
			AND = {
				tag = PRU
				NOT = { exists = BRA }
			}
		}
		is_subject = no
		owns = 50			# Berlin
		owns = 41			# Königsberg
		west_prussia_area = {
			NOT = { owned_by = ROOT }
			NOT = { owner = { alliance_with = ROOT } }
		}
		east_prussia_area = {
			NOT = { owned_by = ROOT }
			NOT = { owner = { alliance_with = ROOT } }
		}
		NOT = { has_country_modifier = prussian_ambition }
		NOT = { has_country_flag = connected_prussian_lands }
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { owns = 50 }
			NOT = { owns = 41 }
		}
	}
	success = {
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 5000
		modifier = {
			factor = 2
			owns = 2995
		}
		modifier = {
			factor = 2
			owns = 1841
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		set_country_flag = connected_prussian_lands
		add_country_modifier = {
			name = "prussian_ambition"
			duration = 3650
		}
	}
}


conquer_swedish_pomerania = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		OR = {
			province_id = 3121
			province_id = 48
			province_id = 1858
			province_id = 3095
			province_id = 47
			province_id = 46
			province_id = 3120
		}
		owned_by = SWE
		NOT = { owner = { alliance_with = ROOT } }
	}
	
	allow = {
		normal_or_historical_nations = yes
		OR = {
			tag = BRA
			tag = PRU
		}
		exists = SWE
		NOT = { alliance_with = SWE }
		is_subject = no
		OR = {
			3121 = { owned_by = SWE }
			48 = { owned_by = SWE }
			1858 = { owned_by = SWE }
			3095 = { owned_by = SWE }
			47 = { owned_by = SWE }
			46 = { owned_by = SWE }
			3120 = { owned_by = SWE }
		}
		NOT = { has_opinion = { who = SWE value = 50 } }
	}
	abort = {
		is_subject = yes		
	}
	success = {
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			SWE = { is_at_war = yes }
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		every_target_province = {
			add_province_modifier = {
				name = faster_integration
				duration = 3650
			}
		}
	}
}


conquer_hinterpommern = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		normal_or_historical_nations = yes
		OR = {
			tag = BRA
			tag = PRU
		}
		is_subject = no
		48 = {		# Kolberg
			NOT = { owned_by = ROOT }
			any_neighbor_province = { owned_by = ROOT }
			owner = {
				NOT = { alliance_with = ROOT }
			}
		}
		3095 = {		# Stolp
			NOT = { owned_by = ROOT }
			any_neighbor_province = { owned_by = ROOT }
			owner = {
				NOT = { alliance_with = ROOT }
			}
		}
	}
	abort = {
		is_subject = yes		
	}
	success = {
		owns = 48
		owns = 3095
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		add_claim = 48
		add_claim = 3095
	}
	abort_effect = {
		remove_claim = 48
		remove_claim = 3095
	}
	effect = {
		48 = {
			add_province_modifier = {
				name = faster_integration
				duration = 3650
			}
		}
		3095 = {
			add_province_modifier = {
				name = faster_integration
				duration = 3650
			}
		}
	}
}

vassalize_prussia = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		normal_or_historical_nations = yes
		tag = BRA
		exists = PRU
		is_subject = no
		PRU = {
			is_subject = no
			is_neighbor_of = ROOT
			NOT = { num_of_cities = ROOT }
			NOT = { total_development = 50 }
			NOT = { government = imperial_city }
		}
		NOT = {
			has_country_modifier = military_vassalization
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = PRU }
			PRU = { is_subject = yes }
			NOT = {
				has_casus_belli = {
					type = cb_vassalize_mission
					target = PRU
				}
			}
		}
	}
	success = {
		PRU = { vassal_of = BRA }
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			NOT = { has_opinion = { who = PRU value = 0 } }
		}
	}
	immediate = {
		add_casus_belli = {
			type = cb_vassalize_mission
			months = 300
			target = PRU
		}
	}
	abort_effect = {
		remove_casus_belli = {
			type = cb_vassalize_mission
			target = PRU
		}
	}
	effect = {
		add_country_modifier = {
			name = military_vassalization
			duration = 3650
		}
		hidden_effect = {
			remove_casus_belli = {
				type = cb_vassalize_mission
				target = PRU
			}
		}
	}
}

brandenburg_breaks_free_from_poland = {
	
	type = country

	category = MIL
	
	allow = {
		normal_or_historical_nations = yes
		tag = BRA
		has_regency = no
		OR = {
			AND = {
				exists = POL
				vassal_of = POL
			}
			AND = {
				exists = PLC
				vassal_of = PLC
			}
		}
		NOT = {
			has_country_modifier = prussian_ambition
		}
		NOT = { has_country_flag = free_of_poland_bra }
	}
	abort = {
		has_regency = yes
	}
	success = {
		is_subject = no
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			NOT = { has_opinion = { who = POL value = 0 } }
		}
		modifier = {
			factor = 2
			NOT = { has_opinion = { who = POL value = -50 } }
		}
	}
	effect = {
		set_country_flag = free_of_poland_bra
		add_country_modifier = {
			name = "prussian_ambition"
			duration = 3650
		}
	}
}


prussia_breaks_free_from_poland = {
	
	type = country

	category = MIL
	
	allow = {
		normal_or_historical_nations = yes
		tag = PRU
		has_regency = no
		OR = {
			AND = {
				exists = POL
				vassal_of = POL
			}
			AND = {
				exists = PLC
				vassal_of = PLC
			}
		}
		NOT = {
			has_country_modifier = prussian_ambition
		}
		NOT = { has_country_flag = free_of_poland_pru }
	}
	abort = {
		has_regency = yes
	}
	success = {
		is_subject = no
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			NOT = { has_opinion = { who = POL value = 0 } }
		}
		modifier = {
			factor = 2
			NOT = { has_opinion = { who = POL value = -50 } }
		}
	}
	effect = {
		set_country_flag = free_of_poland_pru
		add_country_modifier = {
			name = "prussian_ambition"
			duration = 3650
		}
	}
}

prussia_partitions_poland = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		OR = {
			owned_by = POL
			owned_by = PLC
		}
		OR = {
			area = west_prussia_area
			area = east_prussia_area
			area = wielkopolska_area
		}
	}
	
	allow = {
		normal_or_historical_nations = yes
		num_of_cities = 15
		tag = PRU
		is_subject = no
		is_lesser_in_union = no
		OR = {
			PLC = {
				is_neighbor_of = PRU
				num_of_cities = 10
				NOT = { alliance_with = PRU }
				any_owned_province = {
					OR = {
						area = east_prussia_area
						area = west_prussia_area
						area = wielkopolska_area
					}
				}
			}
			AND = {
				NOT = { exists = PLC }
				POL = {
					is_neighbor_of = PRU
					num_of_cities = 10
					NOT = { alliance_with = PRU }
					any_owned_province = {
						OR = {
							area = east_prussia_area
							area = west_prussia_area
							area = wielkopolska_area
						}
					}
				}
			}
		}
		NOT = { has_country_modifier = polish_partitions }
		NOT = { has_country_flag = partitioned_poland }
		owns = 41
		owns = 50
		owns = 42
	}
	abort = {
		is_subject = yes
	}
	success = {
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			any_owned_province = {
				area = wielkopolska_area
			}
		}
		modifier = {
			factor = 10
			east_prussia_area = {
				type = all
				owned_by = PRU
			}
		}
		modifier = {
			factor = 5
			west_prussia_area = {
				type = all
				owned_by = PRU
			}
		}
		modifier = {
			factor = 5
			is_year = 1700
		}
		modifier = {
			factor = 2
			exists = POL
			POL = {
				has_any_disaster = yes
			}
		}
		modifier = {
			factor = 2
			exists = PLC
			PLC = {
				has_any_disaster = yes
			}
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		set_country_flag = partitioned_poland
		add_country_modifier = {
			name = "polish_partitions"
			duration = 3650
		}
	}
}

conquer_ratibor = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		normal_or_historical_nations = yes
		OR = {
			tag = BRA
			tag = PRU
		}
		is_subject = no
		263 = {		# Ratibor
			NOT = { owned_by = ROOT }
			NOT = { is_core = ROOT }
			any_neighbor_province = { owned_by = ROOT }
			owner = {
				NOT = { alliance_with = ROOT }
			}
		}
	}
	abort = {
		is_subject = yes		
	}
	success = {
		owns = 263
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		add_claim = 263
	}
	abort_effect = {
		remove_claim = 263
	}
	effect = {
		263 = {
			add_province_modifier = {
				name = "faster_integration"
				duration = 3650
			}
		}
	}
}

subjugate_westphalia = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		area = westphalia_area
		NOT = { owned_by = ROOT }
		NOT = {
			owner = {
				alliance_with = ROOT
			}
		}
	}
	
	allow = {
		normal_or_historical_nations = yes
		tag = PRU
		exists = WES
		is_subject = no
		NOT = {
			westphalia_area = {
				owned_by = ROOT
			}
		}
		WES = {
			is_neighbor_of = ROOT
			NOT = { alliance_with = ROOT }
			any_owned_province = {
				area = westphalia_area
			}
		}
	}
	abort = {
		is_subject = yes
	}
	success = {
		all_target_province = { owned_by = ROOT }
	}
	chance = {
		factor = 3000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		every_target_province = {
			add_province_modifier = {
				name = "faster_integration"
				duration = 3650
			}
		}
	}
}
