# Estonia: immigration from the Russian Empire
# Victoria II's engine weights mass emigration toward the New World, so the
# Baltic provinces rarely receive migrants even when life is good here.
# These events model the historic westward movement of people within the
# Russian Empire toward the prosperous Baltic provinces.

# Province modifier: attractive frontier for settlers
# (appended to event_modifiers.txt)

country_event = {
	id = 95561
	title = "EVTNAME95561"
	desc = "EVTDESC95561"
	picture = "emigration"

	trigger = {
		OR = {
			tag = EST
			tag = UBD
		}
		civilized = yes
		year = 1840
		not = { has_country_flag = open_to_settlers }
		not = { has_country_flag = borders_closed_to_settlers }
		any_owned_province = {
			OR = { is_core = EST is_core = UBD }
			average_militancy = 3
		}
	}

	mean_time_to_happen = {
		months = 60
		modifier = {
			factor = 0.5
			war = no
		}
		modifier = {
			factor = 0.5
			prestige = 30
		}
	}

	option = {
		name = "EVTOPTA95561"
		any_owned = {
			limit = { OR = { is_core = EST is_core = UBD } }
			add_province_modifier = {
				name = baltic_settler_influx
				duration = 3650
			}
		}
		set_country_flag = open_to_settlers
		# With full unemployment subsidies the state absorbs the risk of
		# joblessness, so settlers come regardless of local unemployment
		if = {
			limit = { unemployment_subsidies = good_subsidies }
			add_country_modifier = {
				name = settlers_do_not_fear_idleness
				duration = 3650
			}
		}
		any_pop = {
			limit = {
				type = farmers
				culture = estonian
			}
			militancy = 1
		}
	}

	option = {
		name = "EVTOPTB95561"
		set_country_flag = borders_closed_to_settlers
		any_pop = {
			limit = {
				type = farmers
				culture = estonian
			}
			consciousness = 1
			militancy = -1
		}
	}
}
