conquer_silesia = {
	
	type = country

	allow = {
		or = {
			tag = BRA
			tag = PRU
		}
		is_lesser_in_union = no
		is_subject = no
		264 = {		# Silesia
			not = { owned_by = this }
			any_neighbor_province = { owned_by = this }
		}
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes
		}
	}
	success = {
		owns = 264
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}
	}
	immediate = {
		add_temp_claim = 264
	}
	abort_effect = {
		remove_temp_claim = 264
	}
	effect = {
		prestige = 0.05
	}
}

conquer_warmia_pru = {
	
	type = country

	allow = {
		tag = PRU
		is_lesser_in_union = no
		is_subject = no
		42 = {		# Warmia
			not = { owned_by = this }
			any_neighbor_province = { owned_by = this }
		}
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes
		}	
	}
	success = {
		owns = 42
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}
	}
	immediate = {
		add_temp_claim = 42
	}
	abort_effect = {
		remove_temp_claim = 42
	}
	effect = {
		army_tradition = 0.2
		infamy = -1
	}
}

connect_brandenburg_and_prussia = {
	
	type = country

	allow = {
		tag = BRA
		exists = PRU
		is_lesser_in_union = no
		is_subject = no
		not = { war_with = PRU }
		or = {
			42 = {		# Warmia
				not = { owned_by = this }
				not = { owned_by = PRU }
				any_neighbor_province = { owned_by = this }
			}
			43 = {		# Danzig
				not = { owned_by = this }
				not = { owned_by = PRU }
				any_neighbor_province = { owned_by = this }
			}
			48 = {		# Hinterpommern
				not = { owned_by = this }
				not = { owned_by = PRU }
				any_neighbor_province = { owned_by = this }
			}
		}
		or = {
			42 = { any_neighbor_province = { owned_by = PRU } }
			43 = { any_neighbor_province = { owned_by = PRU } }
			48 = { any_neighbor_province = { owned_by = PRU } }
		}
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes
			not = { exists = PRU }
			war_with = PRU
		}
	}
	success = {
		owns = 42
		owns = 43
		owns = 48
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			relation = { who = BRA value = 100 }
		}
		modifier = {
			factor = 2
			adm = 7
		}
		modifier = {
			factor = 2
			PRU = { vassal_of = BRA }
		}
		modifier = {
			factor = 2
			alliance_with = PRU
		}
	}
	immediate = {
		add_temp_claim = 42
		add_temp_claim = 43
		add_temp_claim = 48
	}
	abort_effect = {
		remove_temp_claim = 42
		remove_temp_claim = 43
		remove_temp_claim = 48
	}
	effect = {
		prestige = 0.1
	}
}

connect_the_prussian_lands = {
	
	type = country

	allow = {
		tag = BRA
		not = { exists = PRU }
		is_lesser_in_union = no
		is_subject = no
		owns = 41			# Königsberg
		owns = 50			# Berlin
		or = {
			42 = {		# Warmia
				not = { owned_by = this }
				any_neighbor_province = { owned_by = this }
			}
			43 = {		# Danzig
				not = { owned_by = this }
				any_neighbor_province = { owned_by = this }
			}
			48 = {		# Vorpommern
				not = { owned_by = this }
				any_neighbor_province = { owned_by = this }
			}
		}
	}
	abort = {
		or = {
			not = { owns = 41 }
			not = { owns = 50 }
			is_lesser_in_union = yes
			is_subject = yes
		}
	}
	success = {
		owns = 42
		owns = 43
		owns = 48
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			adm = 7
		}
	}
	immediate = {
		add_temp_claim = 42
		add_temp_claim = 43
		add_temp_claim = 48
	}
	abort_effect = {
		remove_temp_claim = 42
		remove_temp_claim = 43
		remove_temp_claim = 48
	}
	effect = {
		prestige = 0.1
	}
}

conquer_swedish_pomerania = {
	
	type = country

	allow = {
		or = {
			tag = BRA
			tag = PRU
		}
		is_lesser_in_union = no
		is_subject = no
		47 = { any_neighbor_province = { owned_by = this } }		# Vorpommern
		exists = SWE
		SWE = { owns = 47 }
		not = { relation = { who = SWE value = 0 } }
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes		
		}
	}
	success = {
		owns = 47
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	immediate = {
		add_temp_claim = 47
	}
	abort_effect = {
		remove_temp_claim = 47
	}
	effect = {
		prestige = 0.05
	}
}

conquer_hinterpommern = {
	
	type = country

	allow = {
		tag = BRA
		is_lesser_in_union = no
		is_subject = no
		48 = {		# Stettin
			not = { owned_by = this }
			any_neighbor_province = { owned_by = this }
		}
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes		
		}	
	}
	success = {
		owns = 48
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	immediate = {
		add_temp_claim = 48
	}
	abort_effect = {
		remove_temp_claim = 48
	}
	effect = {
		stability = 1
	}
}

brandenburg_prussia_relations = {
	
	type = country

	allow = {
		tag = BRA
		exists = PRU
		not = { war_with = PRU }
		not = { relation = { who = PRU value = 100 } }
	}
	abort = {
		or = {
			not = { exists = PRU }
			war_with = PRU
		}
	}
	success = {
		relation = { who = PRU value = 150 }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			not = { relation = { who = PRU value = 0 } }
		}
		modifier = {
			factor = 2
			not = { relation = { who = PRU value = -100 } }
		}
	}
	effect = {
		stability = 1
	}
}

prussia_brandenburg_relations = {
	
	type = country

	allow = {
		tag = PRU
		exists = BRA
		not = { war_with = BRA }
		not = { relation = { who = BRA value = 100 } }
	}
	abort = {
		or = {
			not = { exists = BRA }
			war_with = BRA
		}
	}
	success = {
		relation = { who = BRA value = 150 }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			not = { relation = { who = BRA value = 0 } }
		}
		modifier = {
			factor = 2
			not = { relation = { who = BRA value = -100 } }
		}
	}
	effect = {
		stability = 1
	}
}

vassalize_prussia = {
	
	type = country

	allow = {
		tag = BRA
		is_subject = no
		is_lesser_in_union = no
		exists = PRU
		PRU = {
			neighbour = this
			not = { vassal_of = BRA }
			not = { num_of_cities = this }
			is_lesser_in_union = no
			is_subject = no
		}
	}
	abort = {
		or = {
			not = { exists = PRU }
			PRU = { is_lesser_in_union = yes }
			is_subject = yes
			is_lesser_in_union = yes
		}
	}
	success = {
		PRU = { vassal_of = BRA }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			not = { relation = { who = PRU value = 0 } }
		}
	}
	immediate = {
		casus_belli = {
			type = cb_vassalize_mission
			months = 120
			target = PRU
		}
	}
	abort_effect = {
		remove_casus_belli = {
			type = cb_vassalize_mission
			target = PRU
		}
	}
	effect = {
		prestige = 0.1
		remove_casus_belli = {
			type = cb_vassalize_mission
			target = PRU
		}
	}
}

annex_prussia = {
	
	type = country

	allow = {
		tag = BRA
		is_subject = no
		is_lesser_in_union = no
		exists = PRU
		PRU = {
			vassal_of = BRA
			neighbour = this
			not = { num_of_cities = this }
			owns = 41		# Königsberg
			religion_group = this
		}
	}
	abort = {
		or = {
			not = { exists = PRU }
			PRU = { not = { religion_group = this } }
		}
	}
	success = {
		not = { exists = PRU }
		owns = 41
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			relation = { who = PRU value = 100 }
		}
		modifier = {
			factor = 2
			relation = { who = PRU value = 200 }
		}
	}
	effect = {
		stability = 3
	}
}

brandenburg_breaks_free_from_poland = {
	
	type = country

	allow = {
		tag = BRA
		exists = POL
		BRA = { vassal_of = POL }
		POL = { neighbour = this }
	}
	abort = {
		not = { exists = POL }
	}
	success = {
		BRA = { not = { vassal_of = POL } }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			not = { relation = { who = POL value = 0 } }
		}
	}
	effect = {
		stability = 2
		army_tradition = 0.3
	}
}

prussia_breaks_free_from_poland = {
	
	type = country

	allow = {
		tag = PRU
		exists = POL
		PRU = { vassal_of = POL }
		POL = { neighbour = this }
	}
	abort = {
		not = { exists = POL }
	}
	success = {
		PRU = { not = { vassal_of = POL } }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			not = { relation = { who = POL value = 0 } }
		}
	}
	effect = {
		stability = 2
		army_tradition = 0.3
	}
}

prussia_partitions_poland = {
	
	type = country

	allow = {
		tag = PRU
		year = 1700
		exists = POL
		exists = HAB
		exists = RUS
		is_subject = no
		is_lesser_in_union = no
		POL = {
			owns = 43
			owns = 254
			owns = 255
			owns = 256
			owns = 258
			neighbour = PRU
			neighbour = RUS
			neighbour = HAB
		}
		or = {
			is_core = 43
			is_core = 254
			is_core = 255
			is_core = 256
			is_core = 258
		}
		relation = { who = RUS value = 0 }
		relation = { who = HAB value = 0 }
	}
	abort = {
		not = { exists = POL }
	}
	success = {
		or = {
			owns = 43
			owns = 254
			owns = 255
			owns = 256
			owns = 258
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			POL = { not = { num_of_cities = this } }
		}
		modifier = {
			factor = 2
			not = { relation = { who = POL value = 0 } }
		}
	}
	effect = {
		prestige = 0.1
	}
}

conquer_ratibor = {
	
	type = country

	allow = {
		or = {
			tag = BRA
			tag = PRU
		}
		is_subject = no
		is_lesser_in_union = no
		year = 1700
		263 = {		# Ratibor
			not = { owned_by = this }
			any_neighbor_province = { owned_by = this }
		}
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes		
		}	
	}
	success = {
		owns = 263
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	immediate = {
		add_temp_claim = 263
	}
	abort_effect = {
		remove_temp_claim = 263
	}
	effect = {
		army_tradition = 0.1
		infamy = 2
	}
}

subjugate_westphalia = {
	
	type = country

	allow = {
		tag = PRU
		exists = WES
		is_subject = no
		is_lesser_in_union = no
		not = { westphalian_region = { owned_by = this } }
		WES = { neighbour = this }
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes		
		}	
	}
	success = {
		westphalian_region = { owned_by = this }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	immediate = {
		westphalian_region = {
			add_temp_claim = THIS
		}
	}
	abort_effect = {
		westphalian_region = {
			remove_temp_claim = THIS
		}
	}
	effect = {
		prestige = 0.1
	}
}
