lit_dlc_1 = {
	slot = 1 
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Lions of the North"
	}
	potential = {
		tag = LIT
		has_dlc = "Lions of the North"
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	lit_emblem_faith = {
		icon = catholic_confraternity 
		required_missions = { lit_stabilize_interior } 
		position = 2 
		trigger = { 
			estate_loyalty = {
				estate = estate_church
				loyalty = 60 
			}
			num_of_owned_provinces_with = {
				has_tax_building_trigger = yes 
				value = 8
			}
			if = {
				limit = { religion = catholic } 
				OR = { 
					PAP = { 
						has_opinion = { 
							who = ROOT 
							value = 125 
						}
						owes_favors = { who = ROOT value = 10 }
					}
					is_papal_controller = yes 
				}
			}
			else = { religious_unity = 0.85 }
		}
		effect = {
			add_country_modifier = {
				name = lit_wave_piety_modifier
				duration = 7300 
			}
			if = {
				limit = { religion = catholic }
				random_owned_province = { 
					limit = { 
						has_cardinal = no 
						has_owner_religion = yes 
					} 
					add_cardinal = yes 
				}
			}
			#if = { #Commented out, as there was an error regarding Saint Casimir identity
				#limit = { 
					#religion = catholic
					#has_ruler_flag = lit_casimir_alive_flag 
				#}
				#custom_tooltip = lit_canonize_casimir_tt
				#country_event = { id = flavor_lit.14 }
			#}
			else_if = {
				limit = { 
					religion = orthodox 
					has_dlc = "Third Rome"
				}
				add_patriarch_authority = 0.1
			}
			else = {				
				change_ruler_stat = {
					type = dip
					amount = 1
				}
			} 
		}
	}
	
	lit_privilege_vilnius = {
		icon = immaculate_government
		required_missions = { lit_emblem_faith }
		position = 3 
		trigger = {
			religious_unity = 1 
			OR = { 
				religion = orthodox
				custom_trigger_tooltip = {
					tooltip = lit_has_3_toh_tt
					has_global_modifier_value = {
						which = tolerance_heretic
						value = 3 
					}
				}
				has_estate_privilege = estate_burghers_enforced_interfaith_dialogue
				has_estate_privilege = estate_burghers_orthodox_tolerance
			}
			if = {
				limit = { has_estate = estate_nobles }
				OR = { 
					estate_loyalty = {
						estate = estate_nobles 
						loyalty = 65 
					}
					crown_land_share = 50 
				}
			}
			else = { has_adm_advisor_3 = yes } 
		}
		effect = {
			add_country_modifier = {
				name = lit_privilege_vilnius_modifier
				duration = 10950
			}
		}
	}
	
	sca_lit_religious_unity = {
		icon = mission_luther_theses
		required_missions = { lit_privilege_vilnius }
		position = 4
		trigger = {
			religious_unity = 1
			OR = { 
				full_idea_group = religious_ideas
				full_idea_group = humanist_ideas 
				monthly_adm = 10 
			}
		}
		effect = {
			if = {
				limit = {
					num_of_owned_provinces_with = {
						religion_group = ROOT
						NOT = { religion = ROOT }
						value = 20
					}
				}
				define_advisor = {
					culture = lithuanian
					type = theologian
					skill = 3
					cost_multiplier = 0.5
				}
				add_country_modifier = {
					name = "lit_conferedation_on_religion"
					duration = 7300
				}
			}
			else = {
				add_country_modifier = {
					name = "lithuanian_counter_reformation"
					duration = 7300
				}
				define_advisor = {
					culture = lithuanian
					type = inquisitor
					skill = 3
					cost_multiplier = 0.25
				}
			}
		}
	}

	lit_jesuit_academy = {
		icon = mission_lit_jesuit_academy 
		required_missions = { sca_lit_religious_unity }
		position = 5 
		provinces_to_highlight = { province_id = 272 } 
		trigger = {
			272 = { 
				OR = { 
					has_building = university 
					development = 30 
				}
			}
			if = { 
				limit = { has_dlc = "Mandate of Heaven" }
				272 = { 
					NOT = { devastation = 1 } 
					NOT = { unrest = 1 } 
				}
			}
			else = {
				272 = { NOT = { unrest = 1 } }
			}
			is_lacking_institutions = no 
		}
		effect = {
			country_event = { id = flavor_lit.15 } 
		}
	}
}

lit_dlc_2 = {
	slot = 2
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Lions of the North"
	}
	potential = {
		tag = LIT
		has_dlc = "Lions of the North"
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	lit_stabilize_interior = {
		icon = mission_lit_stabilize_interior 
		required_missions = { }
		position = 1
		trigger = {
			stability = 1 
			NOT = { average_autonomy_above_min = 10 }
			custom_trigger_tooltip = {
				tooltip = lit_all_estates_loyalty_55_tt
				if = { 
					limit = { has_estate = estate_nobles }
					estate_loyalty = {
						estate = estate_nobles 
						loyalty = 55 
					}
				}
				estate_loyalty = {
					estate = estate_church 
					loyalty = 55 
				}
				estate_loyalty = {
					estate = estate_nobles 
					loyalty = 55 
				}
				if = { 
					limit = { has_estate = estate_cossacks }
					estate_loyalty = {
						estate = estate_nobles 
						loyalty = 55 
					}
				}
				if = { 
					limit = { has_estate = estate_nomadic_tribes }
					estate_loyalty = {
						estate = estate_nomadic_tribes 
						loyalty = 55 
					}
				}
			}
		}
		effect = {
			if = {
				limit = { has_dlc = "Mandate of Heaven" }
				add_ruler_modifier = {
					name = lit_stable_rule_modifier
					duration = -1 
				}
			}
			else = {
				add_ruler_modifier = {
					name = lit_stable_rule_2_modifier
					duration = -1 
				}
			}
			change_ruler_stat = {
				type = adm
				amount = 1
			}
		}
	}
	
	lit_reform_magdeburg_laws = {
		icon = mission_lit_reform_magdeburg_laws
		required_missions = { lit_emblem_faith }
		position = 3 
		trigger = {
			num_of_owned_provinces_with = {
				has_trade_building_trigger = yes 
				development = 25 
				province_has_center_of_trade_of_level = 1 
				value = 3 
			}
			if = { 
				limit = { has_dlc = "Rights of Man" }
				OR = {
					ruler_has_personality = architectural_visionary_personality
					ruler_has_personality = lawgiver_personality
					has_global_modifier_value = {
						which = development_cost 
						value = 0.2
					}
					adm = 5 
					monthly_adm = 12 
				}
			}
			else = {
				OR = {
					has_global_modifier_value = {
						which = development_cost 
						value = 0.2
					}
					adm = 5
					treasury = 2000 
					monthly_adm = 12 
				}
			}
			OR = {
				has_idea = magdeburg_laws
				has_estate_privilege = estate_burghers_exclusive_trade_rights
				government_reform_progress = 250 
				estate_loyalty = {
					estate = estate_burghers 
					loyalty = 70 
				}
			}
		}
		effect = {
			custom_tooltip = lit_every_province_that_fulfills_req_tt
			tooltip = { 
				add_province_modifier = {
					name = lit_centers_urbanization_modifier
					duration = 7300 
				}
			}
			custom_tooltip = lit_reform_magdeburg_laws 
			hidden_effect = { 
				set_country_flag = lit_new_magdeburg_laws  
				swap_free_idea_group = yes 
				every_owned_province = { 
					limit = { 
						has_trade_building_trigger = yes 
						development = 25 
						province_has_center_of_trade_of_level = 1 
					}
					add_province_modifier = {
						name = lit_centers_urbanization_modifier
						duration = 9125 
					}
				}					
			}
		}
	}
	
	lit_elective_courts = {
		icon = reform_the_nomocanon 
		required_missions = { sca_lit_religious_unity } 
		position = 5
		trigger = {
			reform_level = 4
			stability = 3 
			num_of_owned_provinces_with = {
				has_courthouse_building_trigger = yes 
				value = 8 
			}
		}
		effect = {
			add_country_modifier = {
				name = lit_efficient_sejmiks_modifier
				duration = 5475 
			}
			add_adm_power = 100 
		}
	}

	lit_enforce_tribunal = {
		icon = reform_bergordnung
		required_missions = { lit_elective_courts lit_jesuit_academy }
		position = 6 
		trigger = {
			OR = {
				POL = {
					NOT = { liberty_desire = 5 }
					is_subject_of = ROOT 
					grown_by_development = 150 
					num_of_owned_provinces_with = {
						has_building = state_house 
						value = 3 
					}
				}
				AND = {
					crown_land_share = 60 
					NOT = { corruption = 1 } 
					NOT = { 
						num_of_estate_privileges = {
							estate = estate_nobles 
							value = 2 
						}
					}
				}
			}
		}
		effect = {
			change_government_reform_progress = 100 
			add_country_modifier = {
				name = lit_efficient_leg_proceedings_modifier
				duration = 7300
			}
		}
	}
}

lit_dlc_3 = {
	slot = 3
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Lions of the North"
	}
	potential = {
		tag = LIT
		has_dlc = "Lions of the North"
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	sca_lit_ukraine_2 = {
		icon = mission_eastern_european_city
		required_missions = { lit_stabilize_interior }
		position = 2
		provinces_to_highlight = {
			province_id = 280
		}
		trigger = {
			280 = {
				development = 20
			}
			if = {
				limit = {
					has_dlc = "Dharma"
				}
				280 = {
					OR = {
						base_production = 10
						province_has_center_of_trade_of_level = 3
					}
					has_trade_building_trigger = yes 
				}
			}
			else = {
				280 = {
					has_trade_building_trigger = yes 
					base_production = 10 
				}
			}
		}
		effect = {
			280 = {
				add_province_modifier = {
					name = "restoration_of_kiev"
					duration = -1
				}
			}
			if = { 
				limit = { 
					has_dlc = "Rights of Man" 
					NOT = { num_of_ruler_traits = { amount = 3 } }
				}
				add_ruler_personality = architectural_visionary_personality
			}
			else = { 
				change_ruler_stat = {
					type = adm
					amount = 2
				}
			}
		}
	}
	
	sca_lit_develop_sluck = {
		icon = mission_noble_council
		required_missions = { sca_lit_ukraine_2 }
		position = 3
		provinces_to_highlight = {
			province_id = 4545
			NOT = {
				OR = {
					has_building = counting_house
					has_building = workshop
				}
			}
		}
		trigger = {
			4545 = {
				has_manufactory_trigger = yes 
				has_production_building_trigger = yes 
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					base_production = 8
					has_manufactory_trigger = yes 
				}
				OR = {
					trade_goods = wool 
					trade_goods = cloth
					trade_goods = cotton 
				}
				value = 3 
			}
		}
		effect = {
			if = {
				limit = {
					has_estate = estate_nobles
				}
				add_estate_loyalty = {
					estate = estate_nobles
					loyalty = 15
				}
			}
			4545 = {
				add_base_production = 3
				add_province_modifier = {
					name = "sluck_sashes"
					duration = -1
				}
			}
		}
	}
	
	lit_build_manufactories = {
		icon = industrialized_rhineland
		required_missions = { sca_lit_develop_sluck lit_reform_magdeburg_laws }
		position = 4
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				has_manufactory_trigger = yes 
				base_production = 8 
				value = 6
			}
		}
		effect = {
			add_country_modifier = {
				name = "proto_industrialization"
				duration = 9125
			}
			add_years_of_income = 2
			custom_tooltip = lit_every_province_with_man_base_production_tt
			hidden_effect = {
				every_owned_province = {
					limit = { has_manufactory_trigger = yes }
					add_base_production = 1 
				}
			}
		}
	}
}

lit_dlc_4 = {
	slot = 4
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Lions of the North"
	}
	potential = {
		tag = LIT
		has_dlc = "Lions of the North"
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	sca_mission_lit_cossacks = {
		icon = mission_cossack_cavalry
		required_missions = {  }
		position = 1
		provinces_to_highlight = {
			OR = {
				province_id = 282
				province_id = 2406
				province_id = 283
			}
		}
		trigger = {
			OR = {
				is_subject = no 
				NOT = { liberty_desire = 10 }
			}
			if = {
				limit = {
					has_estate = estate_cossacks
				}
				estate_loyalty = {
					estate = estate_cossacks
					loyalty = 60
				}
				estate_influence = {
					estate = estate_cossacks
					influence = 40
				}
				has_estate_privilege = estate_cossacks_establish_the_cossack_regiments
				owns_core_province = 282
				owns_core_province = 2406
				owns_core_province = 283
			}
			else = {
				282 = {
					owned_by = ROOT
					is_state = yes
					NOT = { unrest = 1 }
					NOT = { local_autonomy = 30 }
				}
				2406 = {
					owned_by = ROOT
					is_state = yes
					NOT = { unrest = 1 }
					NOT = { local_autonomy = 30 }
				}
				283 = {
					owned_by = ROOT
					is_state = yes
					NOT = { unrest = 1 }
					NOT = { local_autonomy = 30 }
				}
			}
		}
		effect = {
			if = {
				limit = { has_dlc = "The Cossacks" }
				capital_scope = {
					cossack_cavalry = ROOT 
					cossack_cavalry = ROOT 
					cossack_cavalry = ROOT 
					cossack_cavalry = ROOT 
				}
			}
			else = { 
				capital_scope = {
					cavalry = ROOT 
					cavalry = ROOT 
					cavalry = ROOT 
					cavalry = ROOT 
				}
				add_army_tradition = 15
			}
			zaporizhia_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT	}
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			yedisan_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT	}
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			crimea_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT	}
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			azov_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT	}
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	sca_lit_conquer_crimea = {
		icon = mission_sca_lit_conquer_crimea
		required_missions = { sca_mission_lit_cossacks }
		position = 2
		provinces_to_highlight = {
			OR = {
				area = zaporizhia_area
				area = yedisan_area
				area = crimea_area
				area = azov_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		trigger = {
			zaporizhia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			yedisan_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			crimea_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			azov_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			owns_core_province = 285
		}
		effect = {
			country_event = { id = flavor_lit.17 }
		}
	}
	
	lit_harness_steppes = {
		icon = mission_lit_harness_steppes 
		required_missions = { sca_lit_conquer_crimea }
		position = 4
		trigger = {
			development_in_provinces = {
				value = 100 
				has_terrain = steppe
			}
			if = { 
				limit = { has_estate = estate_nomadic_tribes } 
				OR = {
					estate_loyalty = {
						estate = estate_nomadic_tribes
						loyalty = 60 
					}
					284 = {
						country_or_non_sovereign_subject_holds = ROOT 
						num_of_times_improved = 8 
					}
				}
			}
			else = { 
				284 = {
					country_or_non_sovereign_subject_holds = ROOT 
					num_of_times_improved = 8 
				}
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				has_terrain = steppe 
				num_of_buildings_in_province = 2 
				value = 4 
			}
		}
		effect = {
			custom_tooltip = lit_every_overlord_owned_or_subject_prov_1_random_dev
			tooltip = {
				add_province_modifier = {
					name = lit_harnessed_steppes_modifier
					duration = 7300 
				}
			}
			hidden_effect = {
				every_province = {
					limit = {
						OR = {
							owner = {
								overlord_of = LIT	
							}
							country_or_non_sovereign_subject_holds = ROOT 
						}
						has_terrain = steppe 
					}
					random_list = {
						40 = { add_base_production = 1 } 
						50 = { add_base_tax = 1 } 
						10 = { add_base_manpower = 1 } 
					}
					add_province_modifier = {
						name = lit_harnessed_steppes_modifier
						duration = 7300 
					}
				}
			}
		}
	}
	
	lit_great_power_politics = {
		icon = mission_lit_great_power_politics 
		required_missions = { lit_harness_steppes lit_build_manufactories sca_mission_lit_polish_union }
		position = 5
		trigger = {
			power_projection = 80 
			prestige = 90 
			if = {
				limit = {
					OR = { 
						has_dlc = "Emperor"
						has_dlc = "Rights of Man"
					}
				}
				custom_trigger_tooltip = {
					tooltip = lit_better_than_2_gp_tt 
					NOT = { great_power_rank = 3 } 
				}
			}
			else = { total_development = 800 } 
		}
		effect = { 
			add_permanent_power_projection = {
				type = 25_permanent_power_projection
				amount = 25
			}
			add_country_modifier = {
				name = lit_golden_age_lit_modifier
				duration = 9125
			}
			if = { 
				limit = { has_dlc = "Emperor" }
				custom_tooltip = lit_halve_hegemony_reqs_tt
				set_country_flag = halve_hegemony_requirements
			}
			else = { add_adm_power = 100 add_dip_power = 100 add_mil_power = 100 }
		}
	}
}

lit_dlc_5 = {
	slot = 5
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Lions of the North"
	}
	potential = {
		tag = LIT
		has_dlc = "Lions of the North"
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	
	lit_settle_polish_inheritance = {
		icon = mission_the_polish_throne 
		required_missions = { }
		position = 1 
		trigger = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = lit_declined_pu
					has_country_flag = lit_decline_pu_flag
				}
				AND = { 
					custom_trigger_tooltip = {
						tooltip = lit_accepted_pu
						has_country_flag = lit_accepted_pu
					}
					POL = { 
						has_opinion = {
							who = ROOT 
							value = 150 
						}
					}
					is_lesser_in_union = yes
				} 
				AND = {
					owns_core_province = 4538
					owns_core_province = 281
				}
				war_with = POL 
				POL = { exists = no } 
			}
			army_size_percentage = 0.9
		}
		effect = {
			if = { 
				limit = {	
					LIV = { exists = yes }
				}
				add_casus_belli = {
					type = cb_vassalize_mission
					months = 300
					target = LIV
				} 
			}
			else = { 
				custom_tooltip = lit_claim_livonian_lands_tt
			}
			custom_tooltip = lit_take_pu_lesser
			tooltip = { 
				complete_mission = lit_march_west 
				add_country_modifier = {
					name = lit_part_of_the_polish_domain_modifier
					duration = 5475
				}
			}
			custom_tooltip = pol_alternatively_tt
			tooltip = {
				if = { 
					limit = {
						valid_for_personal_unions_trigger = yes 
						POL = { valid_for_personal_unions_trigger = yes }
					}
					add_casus_belli = {
						type = cb_restore_personal_union
						months = 300
						target = POL
					} 
				}
				else = {
					poland_region = {
						limit = { 
							NOT = { owned_by = ROOT }
							NOT = { is_core = ROOT }
						}
						add_permanent_claim = ROOT 
					}
					add_prestige = 10 
				}
				remove_historical_friend = POL 
				POL = { remove_historical_friend = ROOT }
			}
			hidden_effect = {
				if = {
					limit = { is_subject_of = POL }
					complete_mission = lit_march_west 
					add_country_modifier = {
						name = lit_part_of_the_polish_domain_modifier
						duration = 5475
					}
				}	
				else_if = { 
					limit = {
						valid_for_personal_unions_trigger = yes 
						POL = { valid_for_personal_unions_trigger = yes }
					}
					add_casus_belli = {
						type = cb_restore_personal_union
						months = 300
						target = POL
					} 
					remove_historical_friend = POL 
					POL = { remove_historical_friend = ROOT }
				}
				else = {
					poland_region = {
						limit = { 
							NOT = { owned_by = ROOT }
							NOT = { is_core = ROOT }
						}
						add_permanent_claim = ROOT 
					}
					add_prestige = 10 
					remove_historical_friend = POL 
					POL = { remove_historical_friend = ROOT }
				}
				livonia_area = {
					limit = { 
						NOT = { owned_by = ROOT }
						NOT = { is_core = ROOT }
					}
					add_permanent_claim = ROOT 
				}
				estonia_ingria_area = {
					limit = { 
						NOT = { owned_by = ROOT }
						NOT = { is_core = ROOT }
					}
					add_permanent_claim = ROOT 
				}
				curonia_area = {
					limit = { 
						NOT = { owned_by = ROOT }
						NOT = { is_core = ROOT }
					}
					add_permanent_claim = ROOT 
				}
			}
			clr_country_flag = lit_decline_pu_flag
			clr_country_flag = lit_accepted_pu
		}
	}
	
	lit_march_west = {
		icon = mission_lit_march_west
		required_missions = { lit_settle_polish_inheritance }
		position = 2 
		trigger = {
			OR = {
				POL = { 
					is_subject_of = ROOT 
					grown_by_development = 100 
				}
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					region = poland_region 
					value = 12 
				}
			}
		}
		effect = {
			custom_tooltip = lit_poland_subject_tt
			tooltip = { 
				POL = { add_liberty_desire = -20 } 
			}
			custom_tooltip = pol_alternatively_tt
			tooltip = {
				change_ruler_stat = {
					type = adm
					amount = 1
				}
				change_ruler_stat = {
					type = dip
					amount = 1
				}
				change_ruler_stat = {
					type = mil
					amount = 1
				}
				poland_region = {
					limit = { country_or_non_sovereign_subject_holds = ROOT } 
					add_local_autonomy = -10 
				}
			}
			hidden_effect = { 
				if = {
					limit = { 
						POL = { is_subject_of = ROOT }
					}
					POL = { 
						add_liberty_desire = -20
						add_country_modifier = {
							name = lit_increased_dev_modifier
							duration = 1825
							hidden = yes 
						}
					}
				}
				else = {
					change_ruler_stat = {
						type = adm
						amount = 1
					}
					change_ruler_stat = {
						type = dip
						amount = 1
					}
					change_ruler_stat = {
						type = mil
						amount = 1
					}
					poland_region = {
						limit = { country_or_non_sovereign_subject_holds = ROOT } 
						add_local_autonomy = -10 
					}
				}
			}
		}
	}
	
	sca_lit_defeat_the_livonian_order = {
		icon = mission_livonian_knights
		required_missions = { lit_march_west }
		position = 3
		provinces_to_highlight = {
			OR = {
				area = livonia_area
				area = estonia_ingria_area
				area = curonia_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		trigger = {
			livonia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			estonia_ingria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			curonia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
		}
		effect = {		
			add_country_modifier = {
				name = "baltic_ambition_new"
				duration = 7300
			}
			malopolska_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			mazovia_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			west_prussia_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit =  {
					NOT = {
						NOV = {
							OR = {
								alliance_with = ROOT
								is_subject_of = ROOT
							}
						}
					}
				}
				novgorod_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	
	sca_mission_lit_polish_union = {
		icon = mission_sca_mission_lit_polish_union
		required_missions = { sca_lit_defeat_the_livonian_order }
		position = 4
		provinces_to_highlight = {
			OR = {
				area = malopolska_area
				area = mazovia_area
				area = west_prussia_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		trigger = {
			OR = {
				POL = {
					is_subject_of = ROOT
				}
				AND = {
					malopolska_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					mazovia_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					west_prussia_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
				}
			}
			grown_by_development = 250 
			monthly_income = 50
			OR = {
				num_accepted_cultures = 4 
				development_in_provinces = {
					value = 175
					culture = lithuanian
				}
			}
		}
		effect = {
			if = {
				limit = { 
					NOT = { government_rank = 3 }
				}
				add_government_reform = lithuanian_grand_kingdom
			}
			else = { add_adm_power = 50 }
			custom_tooltip = lit_4_ca_tt
			tooltip = {
				add_country_modifier = {
					name = lit_attracting_migrants_modifier
					duration = 3650 
				}
			}
			custom_tooltip = pol_alternatively_tt
			tooltip = {
				add_country_modifier = {
					name = lit_lithuanian_supremacy_modifier
					duration = 10950 
				}
			}
			hidden_effect = {
				if = {
					limit = { 
						development_in_provinces = {
							value = 200
							culture = lithuanian
						}
					}
					add_country_modifier = {
						name = lit_lithuanian_supremacy_modifier
						duration = 10950 
					}
				}
				else = {
					add_country_modifier = {
						name = lit_attracting_migrants_modifier
						duration = 3650 
					}
				}
			}
		}
	}
	
	sca_lit_conquer_novgorod = {
		icon = mission_conquer_novgorod
		required_missions = { sca_mission_lit_polish_union  }
		position = 5
		provinces_to_highlight = {
			area = novgorod_area
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		trigger = {
			OR = {
				novgorod_area = {
					type = all
					country_or_non_sovereign_subject_holds = ROOT	
				}
				NOV = {
					OR = {
						alliance_with = ROOT
						is_subject_of = ROOT
					}
					total_development = 150
				}
			}
		}
		effect = {
			if = {
				limit = {
					exists = RUS
					valid_for_personal_unions_trigger = yes
					RUS = {
						valid_for_personal_unions_trigger = yes
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = RUS
				}
			}
			else_if = {
				limit = {
					exists = MOS
					valid_for_personal_unions_trigger = yes
					MOS = {
						valid_for_personal_unions_trigger = yes
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = MOS
				}
			}
			else = {
				moscow_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				oka_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				vladimir_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				suzdal_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				ryazan_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	
	sca_lit_conquer_muscovy = {
		icon = mission_defeat_muscovy
		required_missions = { sca_lit_conquer_novgorod }
		position = 6
		provinces_to_highlight = {
			OR = {
				area = moscow_area
				area = oka_area
				area = vladimir_area
				area = suzdal_area
				area = ryazan_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		trigger = {
			moscow_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			oka_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}			
			vladimir_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			suzdal_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
			ryazan_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT	
			}
		}
		effect = {
			add_mil_power = 100
			if = {
				limit = {
					RUS = {
						is_subject_of = ROOT
						is_lesser_in_union = no
					}
				}
				RUS = {
					define_ruler = {
						name = "00000H&"
					}
				}
			}
			else_if = {
				limit = {
					MOS = {
						is_subject_of = ROOT
						is_lesser_in_union = no
					}
				}
				MOS = {
					define_ruler = {
						name = "00000H&"
					}
				}
			}
			if = {
				limit = {
					OR = {
						MOS = {
							is_subject_of = ROOT
						}
						RUS = {
							is_subject_of = ROOT
						}
					}
				}
				add_country_modifier = {
					name = "lit_lord_of_the_rus"
					duration = 7300
				}
			}
			else = {
				add_country_modifier = {
					name = "lit_conquered_rus"
					duration = 7300
				}
			}
		}
	}
}