country_decisions = {

	form_kingdom_of_prussia = {
		major = yes
		potential = {
			normal_or_historical_nations = yes
			OR = {
				ai = no
				is_playing_custom_nation = no
			}
			tag = BRA
			NOT = { tag = PRU }
			OR = {
				NOT = { exists = PRU }
				ai = no
			}
			OR = {
				ai = no
				is_religion_enabled = hussite
				is_religion_enabled = protestant
				is_religion_enabled = reformed
			}
		}
		allow = {
			NOT = { exists = PRU }
			adm_tech = 15
			OR = {
				religion = hussite
				religion = protestant
				religion = reformed
			}
			owns_core_province = 41			# Königsberg
			OR = {
				owns_core_province = 43		# Danzig
				owns_core_province = 2995	# Stolp
			}
			is_at_war = no
		}
		effect = {
			change_tag = PRU
			if = {
				limit = {
					is_part_of_hre = yes
					is_elector = no
					is_emperor = no
				}
				every_owned_province = {
					limit = {
						is_part_of_hre = yes
					}
					set_in_empire = no
				}
			}
			if = {
				limit = {
					NOT = { government_rank = 2 }
				}
				set_government_rank = 2
			}
			random_owned_province = {
				limit = {
					OR = {
						culture = pommeranian
						culture = saxon
						culture = prussian
					}
				}
				add_base_tax = 1
			}
			add_country_modifier = {
				name = "centralization_modifier"
				duration = 3650
			}
			if = {
				limit = { has_dlc = "Rights of Man" }
				change_government = prussian_monarchy
			}
			if = {
				limit = { NOT = { has_dlc = "Rights of Man" } }
				change_government = feudal_monarchy
			}
			add_prestige = 5
			change_primary_culture = prussian
			PRU = {
				random_owned_province = {
					limit = { 
						is_capital = no 
						OR = {
							culture = saxon
							culture = pommeranian
						}
					} 
					change_culture = prussian
				}
			}
			west_prussia_area = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = PRU
			}
			east_prussia_area = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = PRU
			}
			capital_scope = {
				change_culture = prussian
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	prussian_nation = {
		major = yes
		potential = {
			normal_or_historical_nations = yes
			OR = {
				ai = no
				is_playing_custom_nation = no
			}
			tag = TEU
			NOT = { tag = PRU }
			OR = {
				NOT = { exists = PRU }
				ai = no
			}
			OR = {
				ai = no
				is_religion_enabled = hussite
				is_religion_enabled = protestant
				is_religion_enabled = reformed
			}
			is_colonial_nation = no
			OR = {
				is_former_colonial_nation = no
				AND = {
					is_former_colonial_nation = yes
					ai = no
				}
			}
		}
		allow = {
			NOT = { exists = PRU }
			adm_tech = 15
			is_at_war = no
			OR = {
				religion = reformed
				religion = hussite
				religion = protestant
			}
			owns_core_province = 41 # Königsberg
		}
		effect = {
			change_tag = PRU
			east_prussia_area = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = PRU
			}
			west_prussia_area = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = PRU
			}
			add_prestige = 25
			if = {
				limit = { has_dlc = "Rights of Man" }
				change_government = prussian_monarchy
			}
			if = {
				limit = { NOT = { has_dlc = "Rights of Man" } }
				change_government = absolute_monarchy
			}
			every_neighbor_country = {
				limit = { government = monarchy }
				add_opinion = { who = ROOT modifier = secularized_monastic_order }
			}
			set_capital = 41		# Ostpreussen
			if = {
				limit = {
					has_custom_ideas = no
					NOT = { has_idea_group = PRU_ideas }
				}
				country_event = { id = ideagroups.1 } #Swap Ideas
			}
			add_country_modifier = {
				name = "centralization_modifier"
				duration = 3650
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	prussian_nation_general = {
		major = yes
		potential = {
			normal_or_historical_nations = yes
			OR = {
				ai = no
				is_playing_custom_nation = no
			}
			OR = {
				ai = no
				is_religion_enabled = hussite
				is_religion_enabled = protestant
				is_religion_enabled = reformed
			}
			OR = {
				primary_culture = pommeranian
				primary_culture = saxon
				primary_culture = prussian
			}
			NOT = { tag = PRU }
			OR = {
				NOT = { exists = PRU }
				ai = no
			}
			NOT = { tag = GER }
			NOT = { tag = HLR }
			NOT = { tag = BRA }
			NOT = {
				tag = TEU
				government = monastic_order_government
			}
		}
		allow = {
			NOT = { exists = PRU }
			adm_tech = 15
			is_subject = no
			is_nomad = no
			is_at_war = no
			OR = {
				religion = reformed
				religion = hussite
				religion = protestant
			}
			owns_core_province = 41			# Königsberg
			owns_core_province = 42			# Warmia
			owns_core_province = 43			# Danzig
		}
		effect = {
			change_tag = PRU
			if = {
				limit = {
					is_part_of_hre = yes
					is_elector = no
					is_emperor = no
				}
				every_owned_province = {
					limit = {
						is_part_of_hre = yes
					}
					set_in_empire = no
				}
			}
			if = {
				limit = {
					NOT = { government_rank = 2 }
					government = monarchy
				}
				set_government_rank = 2
			}
			east_prussia_area = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = PRU
			}
			west_prussia_area = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = PRU
			}
			if = {
				limit = { has_dlc = "Rights of Man" }
				change_government = prussian_monarchy
			}
			if = {
				limit = { NOT = { has_dlc = "Rights of Man" } }
				change_government = absolute_monarchy
			}
			add_prestige = 25
			change_primary_culture = prussian
			capital_scope = {
				change_culture = prussian
			}
			random_owned_province = {
				limit = { 
					is_capital = no 
					OR = {
						culture = saxon
						culture = pommeranian
					}
				} 
				change_culture = prussian
			}
			if = {
				limit = {
					has_custom_ideas = no
					NOT = { has_idea_group = PRU_ideas }
				}
				country_event = { id = ideagroups.1 } #Swap Ideas
			}
			add_country_modifier = {
				name = "centralization_modifier"
				duration = 3650
			}
		}
		ai_will_do = {
			factor = 1
		}
	}

}
