lithuania_poland_relations = {
	
	type = country

	allow = {
		tag = LIT
		exists = POL
		not = { war_with = POL }
		not = { marriage_with = POL }
		is_lesser_in_union = no
		is_subject = no
		government = monarchy
		POL = {
			government = monarchy
			is_lesser_in_union = no
			is_subject = no
		}
	}
	abort = {
		or = {
			war_with = POL
			is_lesser_in_union = yes
			is_subject = yes
			not = { government = monarchy }
			POL = {
				or = {
					not = { government = monarchy }
					is_lesser_in_union = yes
					is_subject = yes
				}
			}
		}
	}
	success = {
		marriage_with = POL
		relation = { who = POL value = 100 }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			not = { relation = { who = POL value = 0 } }
		}
		modifier = {
			factor = 2
			not = { relation = { who = POL value = -100 } }
		}
	}
	effect = {
		stability = 1
	}
}

conquer_samogitia = {
	
	type = country

	allow = {
		tag = LIT
		exists = TEU
		war_with = TEU
		is_lesser_in_union = no
		is_subject = no
		TEU = {
			owns = 271		# Samogitia
			neighbour = this
		}
	}
	abort = {
		or = {
			not = { war_with = TEU }
			is_lesser_in_union = yes
			is_subject = yes
		}
	}
	success = {
		not = { war_with = TEU }
		owns = 271
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}
		modifier = {
			factor = 2
			adm = 7
		}
	}
	immediate = {
		add_temp_claim = 271
	}
	abort_effect = {
		remove_temp_claim = 271
	}
	effect = {
		war_exhaustion = -5
		stability = 1
	}
}

retake_chernigov = {
	
	type = country

	allow = {
		tag = LIT
		or = {
			exists = MOS
			exists = RUS
		}
		is_lesser_in_union = no
		is_subject = no
		not = { alliance_with = MOS }
		not = { alliance_with = RUS }
		or = {
			MOS = {
				neighbour = this
				owns = 289		# Chernigov
			}
			RUS = {
				neighbour = this
				owns = 289		# Chernigov
			}
		}
		289 = { any_neighbor_province = { owned_by = this } }
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes		
		}
	}
	success = {
		owns = 289
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}
		modifier = {
			factor = 2
			or = {
				not = { relation = { who = MOS value = 0 } }
				not = { relation = { who = RUS value = 0 } }
			}
		}
	}
	immediate = {
		add_temp_claim = 289
	}
	abort_effect = {
		remove_temp_claim = 289
	}
	effect = {
		prestige = 0.03
		infamy = -2
	}
}

retake_smolensk = {
	
	type = country

	allow = {
		tag = LIT
		or = {
			exists = MOS
			exists = RUS
		}
		is_lesser_in_union = no
		is_subject = no
		not = { alliance_with = MOS }
		not = { alliance_with = RUS }
		or = {
			MOS = {
				neighbour = this
				owns = 293		# Smolensk
			}
			RUS = {
				neighbour = this
				owns = 293		# Smolensk
			}			
		}
		293 = { any_neighbor_province = { owned_by = this } }
	}
	abort = {
		or = {
			is_lesser_in_union = yes
			is_subject = yes	
		}
	}
	success = {
		owns = 293
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}
		modifier = {
			factor = 2
			or = {
				not = { relation = { who = MOS value = 0 } }
				not = { relation = { who = RUS value = 0 } }
			}
		}
	}
	immediate = {
		add_temp_claim = 293
	}
	abort_effect = {
		remove_temp_claim = 293
	}
	effect = {
		army_tradition = 0.1
		prestige = 0.03
	}
}

defeat_the_livonian_order = {
	
	type = country

	allow = {
		tag = LIT
		is_subject = no
		is_lesser_in_union = no
		exists = LIV
		not = { relation = { who = LIV value = 0 } }
		LIV = {
			neighbour = this
			not = { num_of_cities = this }
			or = {
				owns = 36
				owns = 37
				owns = 39
				owns = 273
			}
		}
	}
	abort = {
		not = { exists = LIV }
		LIV = {	
			not = { owns = 36 }
			not = { owns = 37 }
			not = { owns = 39 }
			not = { owns = 273 }
		}
	}
	success = {
		or = {
			owns = 36
			owns = 37
			owns = 39
			owns = 273
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}
	}
	immediate = {
		add_temp_claim = 36
		add_temp_claim = 37
		add_temp_claim = 39
		add_temp_claim = 273
	}
	abort_effect = {
		remove_temp_claim = 36
		remove_temp_claim = 37
		remove_temp_claim = 39
		remove_temp_claim = 273
	}
	effect = {
		prestige = 0.1
	}
}
