retake_corsica = {
	
	type = country

	allow = {
		tag = GEN
		is_subject = no
		is_lesser_in_union = no
		not = { owns = 1247 }		# Corsica
		is_core = 1247
	}
	abort = {
		or = {
			is_subject = yes
			is_lesser_in_union = yes	
		}
	}
	success = {
		owns = 1247
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	effect = {
		prestige = 0.08
	}
}

establish_a_genoese_cot = {
	
	type = country

	allow = {
		tag = GEN
		not = { num_of_cots = 1 }
		treasury = 250
		any_center_of_trade = {
			placed_merchants = 1
			cot_value = 400
		}
	}
	abort = {}
	success = {
		num_of_cots = 1
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			idea = national_trade_policy
		}	
	}
	effect = {
		merchants = 5
		treasury = 50
	}
}

defend_kaffa = {
	
	type = country

	allow = {
		tag = GEN
		owns = 285		# Kaffa
		exists = TUR
		war_with = TUR
	}
	abort = {
		or = {
			not = { war_with = TUR }
			not = { exists = TUR }
		}
	}
	success = {
		not = { war_with = TUR }
		owns = 285
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	effect = {
		stability = 2
	}
}

retake_kaffa = {
	
	type = country

	allow = {
		tag = GEN
		is_subject = no
		is_lesser_in_union = no
		not = { owns = 285 }		# Kaffa
		is_core = 285
	}
	abort = {
		or = {
			is_subject = yes
			is_lesser_in_union = yes	
		}	
	}
	success = {
		owns = 285
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	effect = {
		infamy -5
	}
}

retake_azow = {
	
	type = country

	allow = {
		tag = GEN
		is_subject = no
		is_lesser_in_union = no
		not = { owns = 286 }		# Azow
		is_core = 286
	}
	abort = {
		or = {
			is_subject = yes
			is_lesser_in_union = yes	
		}	
	}
	success = {
		owns = 286
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	effect = {
		treasury = 50
	}
}

end_bosphorous_sound_toll = {
	type = country
	
	allow = {
		tag = GEN
		government = merchant_republic
		is_subject = no
		is_lesser_in_union = no
		NOT = {
			has_country_modifier = black_sea_free_trade
		}
		151 = {
			owner = {
				has_country_modifier = bosphorous_sound_toll
				NOT = {
					tag = GEN
				}
			}
		}
		
		OR = {
			owns = 286
			owns = 285
		}
	}
	abort = {
		OR = {
			is_subject = yes
			is_lesser_in_union = yes	
		}	
	}
	success = {
		OR = {
			controls = 151
			AND = {
				controls = 149
				controls = 317
			}
			AND = {
				any_known_country = {
					has_country_modifier = bosphorous_sound_toll
					relation = {who = THIS value = 190}
				}
			}
		}
	}
	chance = {
		factor = 5000
		modifier = {
			factor = 2
			mil = 7
		}	
	}
	
	effect = {
		add_country_modifier = {
			name = "black_sea_free_trade"
			duration = -1
		}
	}
}