venice_missions_slot_1 = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
	}
	
	has_country_shield = yes
	
	ven_embrace_neoplatonism = {
		icon = ven_embrace_neoplatonism
		required_missions = { ven_scales_of_power }
		position = 2 
		trigger = {
			has_institution = renaissance
		}
		effect = {
			country_event = {
				id = flavor_ven.40 
			}
			custom_tooltip = event_insight_flavor_ven.40
		}
	}

	wof_ven_promote_the_carnevale = {
		icon = promote_the_carnevale
		position = 3
		required_missions = { ven_embrace_neoplatonism }
		
		trigger = {
			artist = 3
			if = {
				limit = { has_dlc = "Mandate of Heaven" }
				splendor = 800
			}
			else = { prestige = 50 }
		}
		effect = {
			country_event = {
				id = flavor_ven.42 #*
			}
			if = {
				limit = { has_dlc = "Mandate of Heaven" }
				custom_tooltip = event_insight_flavor_ven.42
			}
			else = {
				custom_tooltip = event_insight_flavor_ven.42.b
			}
		}
	}
}

venice_missions_slot_1_dummy = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
		NOT = { has_country_flag = ven_standing_army_missions_flag }
		NOT = { has_country_flag = ven_mercenary_army_missions_flag }
		NOT = { has_country_flag = ven_navy_missions_flag }
	}

	has_country_shield = yes

	ven_dummy_mission_1 = {
		icon = mission_locked_mission
		position = 7
		required_missions = { ven_army_republic }
		provinces_to_highlight = {

		}
		trigger = { always = no }
		effect = {
			custom_tooltip = complete_army_republic_to_preview_this_mission_tt
		}
	}

	ven_dummy_mission_2 = {
		icon = mission_locked_mission
		position = 8
		required_missions = { ven_dummy_mission_1 }
		provinces_to_highlight = {

		}
		trigger = { always = no }
		effect = {
			custom_tooltip = complete_army_republic_to_preview_this_mission_tt
		}
	}
}


venice_missions_slot_1_standing_army = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
		has_country_flag = ven_standing_army_missions_flag
		NOT = { has_country_flag = ven_mercenary_army_missions_flag }
		NOT = { has_country_flag = ven_navy_missions_flag }
	}
	has_country_shield = yes
	ven_standing_army_mission_1 = {
		icon = protect_against_austria
		position = 7
		provinces_to_highlight = {

		}
		required_missions = { ven_army_republic }
		trigger = {
			not_in_mission_preview_mode = { key = VEN }
			custom_trigger_tooltip = {
				tooltip = has_completed_either_idea_group_tt
				OR = {
					full_idea_group = offensive_ideas
					full_idea_group = defensive_ideas
					full_idea_group = quality_ideas
					full_idea_group = quantity_ideas
				}
			}
			if = {
				limit = { has_dlc = "Cradle of Civilization" }
				army_professionalism = 0.2
			}
			else = {
				OR = {
					army_tradition = 50
					army_size = 20 # modified
				}
			}
			has_mil_advisor_3 = yes
		}
		effect = {
			if = {
				limit = { full_idea_group = offensive_ideas }
				custom_tooltip = ven_offensive_ideas_yes_tt
			}
			else = {
				custom_tooltip = ven_offensive_ideas_no_tt
			}
			if = {
				limit = { full_idea_group = defensive_ideas }
				custom_tooltip = ven_defensive_ideas_yes_tt
			}
			else = {
				custom_tooltip = ven_defensive_ideas_no_tt
			}
			if = {
				limit = { full_idea_group = quality_ideas }
				custom_tooltip = ven_quality_ideas_yes_tt
			}
			else = {
				custom_tooltip = ven_quality_ideas_no_tt
			}
			if = {
				limit = { full_idea_group = quantity_ideas }
				custom_tooltip = ven_quantity_ideas_yes_tt
			}
			else = {
				custom_tooltip = ven_quantity_ideas_no_tt
			}
			hidden_effect = {
				if = { 
					limit = { full_idea_group = offensive_ideas }
					set_country_flag = ven_offensive_reward_flag
				}
				if = { 
					limit = { full_idea_group = defensive_ideas }
					set_country_flag = ven_defensive_reward_flag
					every_owned_province = {
						limit = {
							has_fort_building_trigger = yes
							NOT = { has_province_modifier = ven_defensive_stance_modifier } 
						}
						add_province_modifier = {
							name = ven_defensive_stance_modifier
							duration = -1
							hidden = yes
						}
					}
				}
				if = { 
					limit = { full_idea_group = quality_ideas }
					set_country_flag = ven_quality_reward_flag
				}
				if = { 
					limit = { full_idea_group = quantity_ideas }
					set_country_flag = ven_quantity_reward_flag
				}
			}
		}
	}

	ven_standing_army_mission_2 = {
		icon = ven_standing_army_mission_2 
		position = 8
		required_missions = { ven_standing_army_mission_1 }
		provinces_to_highlight = {

		}
		trigger = {
			not_in_mission_preview_mode = { key = VEN }
			num_of_owned_provinces_with = {
				value = 10
				has_building = soldier_households
			}
			num_of_owned_provinces_with = {
				value = 25
				has_manpower_building_trigger = yes
			}
			num_of_owned_provinces_with = {
				value = 25
				has_forcelimit_building_trigger = yes
			}
			OR = {
				army_size = 70 # modified
				has_global_modifier_value = {
					which = discipline
					value = 0.15
				}
				if = {
					limit = { has_dlc = "Cradle of Civilization" }
					army_professionalism = 0.5
				}
				else = { army_tradition = 70 }
			}
		}
		effect = {
			add_country_modifier = {
				name = ven_iron_wall_of_italy_modifier
				duration = -1
			}
		}
	}
}

venice_missions_slot_1_mercenary_army = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
		NOT = { has_country_flag = ven_standing_army_missions_flag }
		has_country_flag = ven_mercenary_army_missions_flag
		NOT = { has_country_flag = ven_navy_missions_flag }
	}
	has_country_shield = yes
	ven_mercenary_army_mission_1 = {
		icon = venture_captains
		position = 7
		provinces_to_highlight = {

		}
		required_missions = { ven_army_republic }
		trigger = {
			not_in_mission_preview_mode = { key = VEN }
			full_idea_group = mercenary_ideas
			if = {
				limit = {
					has_dlc = "Domination"
					NOT = { primary_culture = swiss }
				}
				has_reform = doppelsoldner_reform
			}
			else = { reform_level = 5 }
		}
		effect = {
			if = {
				limit = {
					has_dlc = "Domination"
					NOT = { primary_culture = swiss }
				}
				custom_tooltip = ven_elite_mercenaries_evolved_tt
			}
			else = {
				add_army_tradition_or_mil_power = {
					amount = 20
				}
			}
			if = {
				limit = { ai = no }
				custom_tooltip = ven_allow_replenishment_of_mercs_tt
				set_country_flag = ven_condottieri_flag
			}
			else = { add_mil_power = 100 }
		}
	}

	ven_mercenary_army_mission_2 = {
		icon = ven_mercenary_army_mission_2
		position = 8
		required_missions = { ven_mercenary_army_mission_1 }
		provinces_to_highlight = {

		}
		trigger = {
			not_in_mission_preview_mode = { key = VEN }
			num_of_mercenaries = 5
			if = {
				limit = {
					OR = {
						has_dlc = "Emperor"
						has_dlc = "Rights of Man"
					}
				}
				is_great_power = yes
				total_development = 700
			}
			else = { total_development = 700 }
		}
		effect = {
			add_country_modifier = {
				name = ven_men_of_war_modifier
				duration = -1
			}
		}
	}
}

venice_missions_slot_1_navy = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
		NOT = { has_country_flag = ven_standing_army_missions_flag }
		NOT = { has_country_flag = ven_mercenary_army_missions_flag }
		has_country_flag = ven_navy_missions_flag
	}
	has_country_shield = yes
	ven_navy_mission_1 = {
		icon = mission_launch_a_flagship
		position = 7
		required_missions = {
			ven_army_republic
		}
		trigger = {
			not_in_mission_preview_mode = { key = VEN }
			OR = {
				full_idea_group = naval_ideas
				full_idea_group = maritime_ideas
				full_idea_group = trade_ideas
			}
			navy_size = 50 # modified
		}
		effect = {
			if = {
				limit = { full_idea_group = naval_ideas }
				custom_tooltip = ven_naval_ideas_yes_tt
				if = {
					limit = { 
						OR = { 
							has_dlc = "Rule Britannia"
							has_dlc = "Domination"
							has_dlc = "Golden Century"
							has_dlc = "Lions of the North"
						}
					}
					add_country_modifier = {
						name = ven_marine_drilling_modifier
						duration = -1
					}
				}
				else = {
					add_country_modifier = {
						name = ven_marine_drilling_modifier2
						duration = -1
					}
				}
			}
			else = {
				custom_tooltip = ven_naval_ideas_no_tt
				if = {
					limit = { 
						OR = { 
							has_dlc = "Rule Britannia"
							has_dlc = "Domination"
							has_dlc = "Golden Century"
							has_dlc = "Lions of the North"
						}
					}
					add_country_modifier = {
						name = ven_marine_drilling_modifier
						duration = -1
					}
				}
				else = {
					add_country_modifier = {
						name = ven_marine_drilling_modifier2
						duration = -1
					}
				}
			}
			if = {
				limit = { full_idea_group = maritime_ideas }
				custom_tooltip = ven_maritime_ideas_yes_tt
				tooltip = { add_navy_tradition = 20 } 
			}
			else = {
				custom_tooltip = ven_maritime_ideas_no_tt
				tooltip = { add_navy_tradition = 20 } 
			}
			if = {
				limit = { full_idea_group = trade_ideas }
				custom_tooltip = ven_trade_ideas_yes_tt
				tooltip = { add_mercantilism_or_monarch_power = { amount = 3 } }
			}
			else = {
				custom_tooltip = ven_trade_ideas_no_tt
				tooltip = { add_mercantilism_or_monarch_power = { amount = 3 } }
			}
			hidden_effect = {
				if = {
					limit = { full_idea_group = naval_ideas }
					if = {
						limit = { 
							OR = { 
								has_dlc = "Rule Britannia"
								has_dlc = "Domination"
								has_dlc = "Golden Century"
								has_dlc = "Lions of the North"
							}
						}
						add_country_modifier = {
							name = ven_marine_drilling_modifier
							duration = -1
						}
					}
					else = {
						add_country_modifier = {
							name = ven_marine_drilling_modifier2
							duration = -1
						}
					}
				}
				if = {
					limit = { full_idea_group = maritime_ideas }
					
				}
				if = {
					limit = { full_idea_group = trade_ideas }
					every_owned_province = {
						limit = {
							OR = {
								has_dock_building_trigger = yes
								has_shipyard_building_trigger = yes
							}
						}
						add_base_production = 1
					}
					add_navy_tradition = 20			
				}
				if = {
					limit = { full_idea_group = trade_ideas }
					if = {
						limit = { has_reform = venice_merchants_reform }
						set_country_flag = ven_trade_ideas_reward_flag
					}
					add_mercantilism_or_monarch_power = { amount = 3 }
				}
			}
		}
	}

	ven_navy_mission_2 = {
		icon = ven_navy_mission_2
		position = 8
		required_missions = { ven_navy_mission_1 }
		provinces_to_highlight = {
			province_id = 112
			NOT = { owned_by = ROOT }
		}
		trigger = {
			not_in_mission_preview_mode = { key = VEN }
			navy_tradition = 85
			navy_size = 125 # modified
			if = {
				limit = { 
					OR = { 
						has_dlc = "Rule Britannia"
						has_dlc = "Domination"
						has_dlc = "Golden Century"
						has_dlc = "Lions of the North"
					}
				}
				num_of_marines = 50
			}
			num_of_owned_provinces_with = {
				value = 25
				OR = {
					has_dock_building_trigger = yes
					has_shipyard_building_trigger = yes
				}
			}
			owns = 112
		}
		effect = {
			add_country_modifier = {
				name = ven_venetian_thalassocracy_modifier
				duration = -1
			}
			if = {
				limit = { 
					has_dlc = "Leviathan" 
					112 = {
						NOT = {
							has_great_project = {
								type = venetian_arsenal_gp
								tier = 3
							}
						}
					}
				}
				112 = {
					add_great_project_tier = {
						type = venetian_arsenal_gp
						tier = 1
					}
				}
			}
			else = {
				change_ruler_stat = {
					type = dip
					amount = 2
				}
			}
		}
	}
}

venice_missions_slot_1_continued = {
	slot = 1
	generic = no
	ai = yes
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
	}
	has_country_shield = yes
	ven_savoy = {
		icon = unify_piedmont
		position = 9
		required_missions = { wof_ven_north_italian_rivals }
		provinces_to_highlight = {
			area = piedmont_area
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			piedmont_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			103 = {
				num_of_times_improved = 5
				if = {
					limit = { has_dlc = "Mandate of Heaven" }
					NOT = { devastation = 1 }
				}
				has_courthouse_building_trigger = yes
			}
		}
		effect = {
			country_event = {
				id = flavor_ven.49
			}
			custom_tooltip = event_insight_flavor_ven.49
		}
	}

	ven_mamluk_suez = {
		icon = mission_diplomatic_relation
		position = 12
		provinces_to_highlight = {
			OR = {
				province_id = 4316
				province_id = 2315
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			358 = {
				trade_share = {
					country = ROOT
					share = 25
				}
			}
			if = {
				limit = {
					MAM = {
						owns_core_province = 4316
						owns_core_province = 2315
					}
				}
				OR = {
					AND = {
						4316 = { 
							country_or_non_sovereign_subject_holds = ROOT 
							num_of_times_improved = 8
						}
						2315 = { 
							country_or_non_sovereign_subject_holds = ROOT 
							num_of_times_improved = 3
						}
					}
					AND = {
						MAM = {
							has_opinion = {
								who = ROOT
								value = 150
							}
						}
						MAM = {
							OR = {
								alliance_with = ROOT
								is_subject_of = ROOT
							}
						}
						if = {
							limit = { ai = no }
							years_of_income = 2
						}
						else = { years_of_income = 0.5 }
					}
				}
			}
			else_if = {
				limit = {
					EGY = {
						owns_core_province = 4316
						owns_core_province = 2315
					}
				}
				OR = {
					AND = {
						4316 = { 
							country_or_non_sovereign_subject_holds = ROOT 
							num_of_times_improved = 8
						}
						2315 = { 
							country_or_non_sovereign_subject_holds = ROOT 
							num_of_times_improved = 3
						}
					}
					AND = {
						EGY = {
							has_opinion = {
								who = ROOT
								value = 150
							}
						}
						EGY = {
							OR = {
								alliance_with = ROOT
								is_subject_of = ROOT
							}
						}
					}
				}
			}
			else = {
				4316 = { 
					country_or_non_sovereign_subject_holds = ROOT 
					num_of_times_improved = 8
				}
				2315 = { 
					country_or_non_sovereign_subject_holds = ROOT 
					num_of_times_improved = 3
				}
			}
		}
		effect = {
			if = {
				limit = {
					MAM = {
						has_opinion = {
							who = ROOT
							value = 150
						}
					}
					MAM = {
						OR = {
							alliance_with = ROOT
							is_subject_of = ROOT
						}
					}
					years_of_income = 2
				}
				custom_tooltip = ven_mamluk_friendship_yes_tt
			}
			else = { custom_tooltip = ven_mamluk_friendship_no_tt }
			tooltip = {
				if = {
					limit = {
						alliance_with = EGY
						EGY = { exists = yes }
					}
					add_historical_friend = EGY
					if = {
						limit = { 
							ai = no 
						}
						if = {
							limit = {
								EGY = {
									NOT = { mission_completed = mam_highway_empire }
								}
							}
							add_years_of_income = -2
						}
						else = { add_years_of_income = -0.25 }
					}
					else = {
						add_years_of_income = -0.25
					}
					EGY = { 
						add_historical_friend = ROOT 
						if = {
							limit = { 
								has_dlc = "King of Kings" 
								NOT = { mission_completed = mam_highway_empire }
							}
							complete_mission = mam_highway_empire
						}
						if = {
							limit = { 
								has_dlc = "Leviathan"  
								4316 = {
									NOT = {
										has_great_project = { 
											type = suez_canal 
											tier = 3 
										}
									}
								}
								NOT = { adm_tech = 22 }
							}
							country_event = { id = flavor_ven.54  }
						}
						else = {
							4316 = { add_base_production = 3 }
						}
					}
				}
				else = {
					add_historical_friend = MAM
					if = {
						limit = { 
							ai = no 
						}
						if = {
							limit = {
								MAM = {
									NOT = { mission_completed = mam_highway_empire }
								}
							}
							add_years_of_income = -2
						}
						else = { add_years_of_income = -0.25 }
					}
					else = {
						add_years_of_income = -0.25
					}
					MAM = { 
						add_historical_friend = ROOT 
						if = {
							limit = { 
								has_dlc = "King of Kings" 
								NOT = { mission_completed = mam_highway_empire }
							}
							complete_mission = mam_highway_empire
						}
						if = {
							limit = { 
								has_dlc = "Leviathan"  
								4316 = {
									NOT = {
										has_great_project = { 
											type = suez_canal 
											tier = 3 
										}
									}
								}
								NOT = { adm_tech = 22 }
							}
							country_event = { id = flavor_ven.54  }
						}
						else = {
							4316 = { add_base_production = 3 }
						}
					}
				}
			}
			if = {
				limit = {
					4316 = { 
						country_or_non_sovereign_subject_holds = ROOT 
						num_of_times_improved = 8
					}
					2315 = { 
						country_or_non_sovereign_subject_holds = ROOT 
						num_of_times_improved = 3
					}
				}
				custom_tooltip = ven_conquest_reward_yes_tt
			}
			else = { custom_tooltip = ven_conquest_reward_no_tt }
			tooltip = {
				2315 = {
					create_units_of_type_in_province = {
						custom_tooltip = spawn_10_lights_for_root
						who = ROOT
						amount = 10
						unit_type = light_ship
					}
				}
				red_sea_coast_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
			}
			hidden_effect = {
				if = {
					limit = {
						4316 = { 
							country_or_non_sovereign_subject_holds = ROOT 
							num_of_times_improved = 8
						}
						2315 = { 
							country_or_non_sovereign_subject_holds = ROOT 
							num_of_times_improved = 3
						}
					}
					2315 = {
						create_units_of_type_in_province = {
							custom_tooltip = spawn_10_lights_for_root
							who = ROOT
							amount = 10
							unit_type = light_ship
						}
					}
					red_sea_coast_area = {
						limit = {
							NOT = { is_permanent_claim = ROOT }
							NOT = { is_core = ROOT	}
						}
						add_permanent_claim = ROOT
					}
				}
				else = {
					if = {
						limit = {
							alliance_with = MAM 
						}
						add_historical_friend = MAM
						if = {
							limit = { 
								has_dlc = "King of Kings" 
								MAM = {
									NOT = { mission_completed = mam_highway_empire }
								}
							}
							MAM = { complete_mission = mam_highway_empire }
						}
						MAM = { add_historical_friend = ROOT }
						if = {
							limit = { 
								has_dlc = "Leviathan"  
								4316 = {
									NOT = {
										has_great_project = { 
											type = suez_canal 
											tier = 3 
										}
									}
								}
								NOT = { adm_tech = 22 }
							}
							MAM = { country_event = { id = flavor_ven.54  } }
							if = {
								limit = { ai = no }
								add_years_of_income = -2
							}
							else = { add_years_of_income = -1 }
						}
						else = {
							4316 = { add_base_production = 3 }
							add_years_of_income = -0.25
						}
					}
					else = {
						add_historical_friend = EGY
						EGY = { add_historical_friend = ROOT }
						if = {
							limit = { 
								has_dlc = "King of Kings" 
								EGY = {
									NOT = { mission_completed = mam_highway_empire }
								}
							}
							EGY = { complete_mission = mam_highway_empire }
						}
						if = {
							limit = { 
								has_dlc = "Leviathan"  
								4316 = {
									NOT = {
										has_great_project = { 
											type = suez_canal 
											tier = 3 
										}
									}
								}
								NOT = { adm_tech = 22 }
							}
							EGY = { country_event = { id = flavor_ven.54  } }
							if = {
								limit = { ai = no }
								add_years_of_income = -2
							}
							else = { add_years_of_income = -1 }
						}
						else = {
							4316 = { add_base_production = 3 }
							add_years_of_income = -0.25
						}
					}
				}
			}
		}
	}

	ven_circumnavigate_the_globe = {
		icon = mission_sail_to_the_east_indies
		position = 14
		required_missions = { ven_mamluk_suez }
		trigger = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = achievement_magellans_voyage_tooltip
					has_country_flag = circumnavigation_first
				}
				custom_trigger_tooltip = {
					tooltip = second_circumnavigation_tt
					has_country_flag = circumnavigation_done
				}
				full_idea_group = exploration_ideas
				full_idea_group = expansion_ideas
			}
		}
		effect = {
			add_country_modifier = {
				name = ven_wealth_of_the_new_world_modifier
				duration = 9125
			}
		}
	}
}

venice_missions_slot_2 = {
	slot = 2
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
	}
	
	has_country_shield = yes

	ven_scales_of_power = {
		icon = ven_scales_of_power
		position = 1
		trigger = {
			if = {
				limit = { has_reform = venice_merchants_reform }
				OR = {
					num_of_estate_privileges = {
						estate = estate_nobles
						value = 5
					}
					faction_influence = {
						faction = mr_aristocrats
						influence = 50
					}
					faction_influence = {
						faction = mr_traders
						influence = 50
					}
					faction_influence = {
						faction = mr_guilds
						influence = 50
					}
				}
			}
			else = {
				OR = {
					num_of_estate_privileges = {
						estate = estate_nobles
						value = 5
					}
					crown_land_share = 40
				}
			}
			estate_loyalty = {
				estate = estate_nobles
				loyalty = 60
			}
		}
		effect = {
			if = {
				limit = { has_reform = venice_merchants_reform }
				country_event = {
					id = flavor_ven.44
				}
				custom_tooltip = event_insight_flavor_ven.44
			}
			else = {
				add_republican_tradition = 10
				add_legitimacy = 10
				add_devotion = 10
			}
		}
	}

	ven_capital_of_europe = {
		icon = ven_capital_of_europe
		position = 2
		required_missions = { ven_scales_of_power }
		provinces_to_highlight = {
			OR = {
				AND = {
					province_id = 112
					NOT = { is_capital_of = ROOT }
				}
				AND = {
					superregion = europe_superregion
					NOT = { province_id = 112 }
					higher_development_than = 112
				}
				AND = {
					province_id = 112
					OR = {
						NOT = { owned_by = ROOT }
						NOT = { num_of_buildings_in_province = 6 }
						NOT = { development = 30 }
						has_trade_building_trigger = no
					}
				}
			}
		}
		trigger = {
			112 = {
				owned_by = ROOT
				has_trade_building_trigger = yes
				num_of_buildings_in_province = 6
				development = 30
			}
			capital_scope = {
				province_id = 112
				custom_trigger_tooltip = {
					tooltip = ven_highest_dev_capital_tt
					NOT = {
						europe_superregion = {
							NOT = { province_id = 112 }
							higher_development_than = 112
						}
					}
				}
			}	
		}
		effect = {
			if = {
				limit = {
					112 = { has_trade_building_trigger = no }
				}
				custom_tooltip = 112_gets_trade_upgrade_tt
			}
			else = {
				112 = { 
					upgrade_building = { trade = yes }
				}
			}
			112 = {
				add_scaled_local_adm_power = 11
				add_scaled_local_dip_power = 12
				add_scaled_local_mil_power = 9
			}
		}
	}

	wof_ven_expand_the_doges_palace = {
		icon = expand_the_doges_palace
		position = 4
		required_missions = { ven_capital_of_europe wof_ven_promote_the_carnevale }
		provinces_to_highlight = {
			province_id = 112
			OR = {
				NOT = { is_core = ROOT }
				NOT = { owned_by = ROOT }
			}
		}
		trigger = {
			112 = {
				if = {
					limit = { has_dlc = "Leviathan" }
					has_great_project = {
						type = doges_palace
						tier = 2
					}
				}
				else = { has_courthouse_building_trigger = yes }
			}
			owns_core_province = 112
		}
		effect = {
			country_event = {
				id = flavor_ven.45
			}
			custom_tooltip = event_insight_flavor_ven.45
		}
	}


	wof_ven_expand_the_terraferma = {
		icon = expand_the_terraferma
		position = 7
		required_missions = { ven_army_republic }
		
		trigger = { grown_by_states = 2 }
		effect = {
			add_country_modifier = {
				name = ven_buffer_states_modifier
				duration = 7300
			}
			tuscany_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			tirol_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit = {
					MLO = { humiliated_by = ROOT }
				}
				custom_tooltip = ven_lombardy_humiliation_yes_tt
				tooltip = { add_prestige_or_monarch_power = { amount = 10 } }
			}
			else = {
				custom_tooltip = ven_lombardy_humiliation_no_tt
				tooltip = { add_prestige_or_monarch_power = { amount = 10 } }
			}
			hidden_effect = {
				if = {
					limit = {
						MLO = {
							humiliated_by = ROOT
						}
					}
					add_prestige_or_monarch_power = { amount = 10 }
				}
			}
		}
	}

	wof_ven_north_italian_rivals = {
		icon = seize_lombardy
		position = 8
		required_missions = { wof_ven_expand_the_terraferma }
		
		provinces_to_highlight = {
			OR = {
				area = lombardy_area
				area = po_valley_area
				area = emilia_romagna_area
				area = tuscany_area
			}
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				owner = { 
					NOT = { is_in_trade_league_with = ROOT }
				}
			}
			
		}
		trigger = {
			lombardy_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owner = { is_in_trade_league_with = ROOT }
				}
			}
			po_valley_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owner = { is_in_trade_league_with = ROOT }
				}
			}
			emilia_romagna_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owner = { is_in_trade_league_with = ROOT }
				}
			}
			tuscany_area = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					owner = { is_in_trade_league_with = ROOT }
				}
			}
		}
		effect = {
			country_event = {
				id = flavor_ven.52
			}
			custom_tooltip = event_insight_flavor_ven.52
			custom_tooltip = ven_access_milanese_and_florentine_events_tt
			set_country_flag = ven_access_italian_events_flag
		}
	}

	wof_ven_challenge_papal_supremacy = {
		icon = counter_reformation
		position = 9
		required_missions = { wof_ven_north_italian_rivals }
		provinces_to_highlight = {
			province_id = 118
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			religious_unity = 1
			OR = {
				is_papal_controller = yes
				PAP = { is_subject_of = ROOT }
				owns = 118
			}
		}
		effect = {
			add_country_modifier = {
				name = "ven_autonomous_venetian_patriarchate"
				duration = 5475
			}
			if = {
				limit = { is_papal_controller = yes }
				custom_tooltip = ven_papal_controller_yes_tt
				tooltip = {
					add_papal_influence = 20
				}
			}
			else = {
				custom_tooltip = ven_papal_controller_no_tt
				tooltip = {
					add_papal_influence = 20
				}
			}
			if = {
				limit = {
					PAP = { is_subject_of = ROOT }
				}
				custom_tooltip = ven_papal_subject_yes_tt
				tooltip = {
					add_power_projection_mission = { amount = 10 }
				}
			}
			else = {
				custom_tooltip = ven_papal_subject_no_tt
				tooltip = {
					add_power_projection_mission = { amount = 20 }
				}
			}
			if = {
				limit = {
					owns = 118
				}
				custom_tooltip = ven_owns_rome_yes_tt
				tooltip = {
					118 = {
						change_religion = ROOT 
						change_culture = ROOT
						add_base_manpower = 2
						add_base_production = 2
					}
				}
			}
			else = {
				custom_tooltip = ven_owns_rome_no_tt
				tooltip = {
					118 = {
						change_religion = ROOT 
						change_culture = ROOT
						add_base_manpower = 2
						add_base_production = 2
					}
				}
			}
			hidden_effect = {
				if = {
					limit = { is_papal_controller = yes }
					add_papal_influence = 20
				}
				if = {
					limit = {
						PAP = { is_subject_of = ROOT }
					}
					add_power_projection_mission = { amount = 10 }
				}
				if = {
					limit = { owns = 118 }
					118 = {
						change_religion = ROOT 
						change_culture = ROOT
						add_base_manpower = 2
						add_base_production = 2
					}
				}
			}
		}
	}

	ven_conquer_italy = {
		icon = complete_the_risorgimento
		position = 10
		required_missions = { ven_savoy wof_ven_challenge_papal_supremacy ven_genoa }
		provinces_to_highlight = {
			region = italy_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 50
				region = italy_region
			}
		}
		effect = {
			add_country_modifier = {
				name = ven_united_italy_modifier
				duration = 7300
			}
		}
	}

	ven_zanzibar = {
		icon = mission_zanzibari_trade
		position = 13
		required_missions = { ven_aden_trade }
		provinces_to_highlight = {
			OR = {
				AND = {
					OR = {
						area = central_swahili_coast_area
						area = quelimane_area
					}
					NOT = { has_discovered = ROOT }
				}
				AND = {
					province_id = 1183
					OR = {
						is_city = no 
						NOT = { owned_by = ROOT }
					}
				}
			}
			
		}
		trigger = {
			custom_trigger_tooltip = {
				tooltip = ven_discover_zanzibar_coast_tt
				central_swahili_coast_area = { has_discovered = ROOT }
				quelimane_area = { has_discovered = ROOT }
			}
			1183 = {
				owned_by = ROOT
				is_city = yes
			}
		}
		effect = {
			if = {
				limit = { 
					1183 = { trade_goods = gold }
				}
				1183 = { add_base_production = 3 }
			}
			else = {
				1183 = { change_trade_goods = gold }
			}
			add_mercantilism_or_monarch_power = { amount = 3 }
			central_swahili_coast_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			quelimane_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}

	ven_global_trade = {
		icon = the_shape_of_trades_to_come
		position = 14
		required_missions = { ven_zanzibar }
		provinces_to_highlight = {
			country_or_non_sovereign_subject_holds = ROOT
			num_free_building_slots = 1 
			has_manufactory_trigger = no
		}
		trigger = {
			has_institution = global_trade
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 25
				has_manufactory_trigger = yes
			}
			if = {
				limit = { has_dlc = "Mandate of Heaven" }
				OR = {
					has_had_golden_age = yes
					in_golden_age = yes
				}
			}
		}
		effect = {
			if = {
				limit = { has_dlc = "Mandate of Heaven" }
				if = {
					limit = { has_had_golden_age = yes }
					reset_golden_age = yes
				}
				else = { extend_golden_age = 600 }
			}
			else = {
				add_country_modifier = {
					name = ven_venetian_era_of_high_commerce_modifier
					duration = -1
				}
			}
		}
	}
}

venice_missions_slot_3 = {
	slot = 3
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
	}
	
	has_country_shield = yes

	ven_san_zanipolo = {
		icon = ven_san_zanipolo
		position = 2
		required_missions = { wof_ven_new_pilings }
		
		provinces_to_highlight = {
			province_id = 112
		}

		trigger = {
			112 = { has_tax_building_trigger = yes }
			owns_core_province = 112
		}

		effect = {
			country_event = {
				id = flavor_ven.51
			}
			custom_tooltip = event_insight_flavor_ven.51
		}
	}

	wof_ven_nuova_promissione_ducale = {
		icon = nuova_promissione_ducale
		position = 3
		required_missions = { ven_capital_of_europe }
		
		trigger = {
			stability = 3
			legitimacy_equivalent = 80
			NOT = { corruption = 1 }
			reform_level = 3
		}
		effect = {
			if = {
				limit = {
					OR = {
						has_reform = venice_merchants_reform
						has_reform = lottery_reform
					}
				}
				change_ruler_stat = {
					type = dip
					amount = 1
				}
			}
			else_if = {
				limit = {
					OR = {
						current_age = age_of_absolutism
						current_age = age_of_revolutions
					}
					NOT = { absolutism = 80 }
					is_revolutionary = no
				}
				add_absolutism = 20
			}
			else = {
				add_mil_power = 200
			}
			if = {
				limit = {
					OR = {
						has_reform = venice_merchants_reform
						has_reform = lottery_reform
					}
				}
				unlock_government_reform = {
					government_reform = ven_promissione_ducale_reform
				}
			}
		}
	}

	wof_ven_standardize_relazioni = {
		icon = standardize_relazioni
		position = 4
		required_missions = { wof_ven_nuova_promissione_ducale }
		provinces_to_highlight = {
			is_capital = yes 
			owner = {
				NOT = { tag = ROOT }
				has_spy_network_in = {
					who = ROOT
					value = 25
				}
				NOT = {
					has_opinion = {
						who = ROOT
						value = 100
					}
				}
				NOT = {
					truce_with = ROOT
				}
			}
		}
		trigger = {
			all_neighbor_country = {
				OR = {
					NOT = {
						has_spy_network_in = {
							who = ROOT
							value = 25
						}
					}
					has_opinion = {
						who = ROOT
						value = 100
					}
					truce_with = ROOT	
				}
			}
			OR = {
				diplomat = 3
				spymaster = 3
			}
			if = {
				limit = {
					tag = VEN
					NOT = { has_country_flag = LNS_ideas_flag }
				}
				has_idea = state_inquisition
			}
			
		}
		effect = {
			if = {
				limit = { tag = VEN	}
				custom_tooltip = ven_upgrade_state_inuisition_idea_tt
				hidden_effect = {
					set_country_flag = ven_upgrade_state_inuisition_idea_flag
					swap_free_idea_group = yes
				}
			}
			else = {
				add_country_modifier = {
					name = ven_standardized_relazioni
					duration = 7300
				}
			}
		}
	}

	ven_of_wealth_and_power = {
		icon = ven_of_wealth_and_power
		position = 5
		required_missions = { wof_ven_plague_doctor_training wof_ven_standardize_relazioni ven_academy_of_the_unknowns wof_ven_expand_the_doges_palace }
		provinces_to_highlight = {
			ROOT = {
				home_trade_node = { province_id = PREV_PREV }
			}
		}
		trigger = {
			home_trade_node = { highest_value_trade_node = yes }
			num_of_trading_bonuses = 6
		}
		effect = {
			add_power_projection = {
				type = ven_cradle_of_opulence
				amount = 20
			}
			custom_tooltip = zim_amongst_the_great_powers_tt
			country_event = {
				id = flavor_ven.48
			}
			custom_tooltip = event_insight_flavor_ven.48
		}
	}

	ven_army_republic = {
		icon = ven_army_republic
		position = 6
		provinces_to_highlight = {

		}
		trigger = {
			army_size_percentage = 0.9
			num_of_generals = 1
			num_of_galley = 10
		}
		effect = {
			if = {
				limit = { ai = no }
				enable_branching_mission_review_without_ai = { key = VEN }
			}
			else = {
				random_list = {
					10 = { set_country_flag = ven_standing_army_missions_flag }
					10 = { set_country_flag = ven_mercenary_army_missions_flag }
					10 = { set_country_flag = ven_navy_missions_flag }
				}
			}
			lombardy_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			po_valley_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			emilia_romagna_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			if = {
				limit = {
					151 = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
				}
				151 = { add_permanent_claim = ROOT }
			}
		}
	}

	wof_ven_destroy_austria = {
		icon = conquer_austria
		position = 8
		required_missions = { wof_ven_expand_the_terraferma }
		provinces_to_highlight = {
			OR = {
				owned_by = HAB
				owned_by = AUH
			}
		}
		trigger = {
			OR = {
				AND = {
					NOT = { exists = HAB }
					NOT = { exists = AUH }
				}
				AND = {
					HAB = { is_subject_of = ROOT }
					NOT = { exists = AUH }
				}
				AND = {
					AUH = { is_subject_of = ROOT }
					NOT = { exists = HAB }
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "ven_political_monopolist"
				duration = -1
			}
		}
	}

	ven_genoa = {
		icon = mission_dominate_genoa
		position = 9
		required_missions = { wof_ven_north_italian_rivals }
		provinces_to_highlight = {
			province_id = 101
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			101 = { country_or_non_sovereign_subject_holds = ROOT }
		}
		effect = {
			if = {
				limit = { is_trade_league_leader = yes }
				custom_tooltip = ven_easier_to_invite_trade_league_members_yes_tt
				set_country_flag = ven_easier_to_invite_trade_league_members_yes_flag
			}
			else_if = {
				limit = { has_dlc = "Mare Nostrum" }
				custom_tooltip = ven_easier_to_invite_trade_league_members_no_tt
			}
			unlock_government_reform = {
				government_reform = merchant_representation_reform
			}
			define_admiral = {
				name = "Andrea Doria"
				shock = 4
				fire = 4
				manuever = 5
			}
		}
	}

	ven_exploration_missions = {
		icon = mission_look_west
		position = 11
		trigger = {
			OR = {
				exploration_ideas = 1 
				num_of_colonists = 1 
				num_of_explorers = 1
			}
		}
		effect = {
			add_country_modifier = {
				name = swe_search_for_new_world
				duration = 5475
			}
			if = {
				limit = {
					NOT = { national_focus = DIP }
				}
				custom_tooltip = ven_yes_dip_power_tt
				tooltip = { add_dip_power =  100 }
			}
			else_if = {
				limit = {
					OR = {
						national_focus = DIP
						has_dlc = "Res Publica"
						has_dlc = "Common Sense"
					}
				}
				custom_tooltip = ven_no_dip_power_tt
				tooltip = { add_dip_power =  100 }
			}
			hidden_effect = {
				if = {
					limit = {
						NOT = { national_focus = DIP }
						OR = {
							has_dlc = "Res Publica"
							has_dlc = "Common Sense"
						}
					}
					add_dip_power = 100
				}
			}
		}
	}

	ven_aden_trade = {
		icon = mission_dominate_trade_in_aden
		position = 12
		required_missions = { ven_exploration_missions }
		provinces_to_highlight = {
			OR = {
				area = tihama_al_yemen_area
				area = yemen_area
			}
			NOT = { has_discovered = ROOT }
		}
		trigger = {
			custom_trigger_tooltip = {
				tooltip = ven_discover_lower_arabia_tt
				tihama_al_yemen_area = { has_discovered = ROOT }
				yemen_area = { has_discovered = ROOT }
			}
		}
		effect = {
			tihama_al_yemen_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			yemen_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			4346 = {
				add_trade_modifier = {
					who = ROOT
					duration = 7300
					power = 100
					key = VEN_ADEN_GOODS_KEY
				}
			}

			if = {
				limit = {
					1099 = { owned_by = ROOT }
				}
				custom_tooltip = ven_yes_suqutra_owned_tt
				tooltip = {
					1099 = { 
						center_of_trade = 1
						add_province_modifier = {
							name = ven_colonial_outpost_modifier
							duration = -1
						}
					}
				}
			}
			else = {
				custom_tooltip = ven_no_suqutra_owned_tt
				tooltip = {
					1099 = { 
						center_of_trade = 1
						add_province_modifier = {
							name = ven_colonial_outpost_modifier
							duration = -1
						}
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						1099 = { owned_by = ROOT }
					}
					1099 = { 
						center_of_trade = 1
						add_province_modifier = {
							name = ven_colonial_outpost_modifier
							duration = -1
						}
					}
				}
			}
		}
	}

	wof_ven_this_mythical_realm = {
		icon = sources_of_trade
		position = 13
		required_missions = { ven_aden_trade }
		
		provinces_to_highlight = {
			OR = {
				trade_company_region = trade_company_east_india
				trade_company_region = trade_company_coromandel
				trade_company_region = trade_company_west_india
			}
			is_sea = no
			NOT = { owned_by = ROOT }
			has_discovered = ROOT
		}
		trigger = {
			custom_trigger_tooltip = {
				tooltip = emp_ven_this_mythical_realm_tt
				OR = {
					trade_company_east_india = { 
						owned_by = ROOT
						is_city = yes
					}
					trade_company_coromandel = {
						owned_by = ROOT
						is_city = yes
					}
					trade_company_west_india = {
						owned_by = ROOT
						is_city = yes
					}
				}
			}
		}
		effect = {
			add_mercantilism_or_monarch_power = { amount = 3 }
			custom_tooltip = ven_claims_on_every_coastal_cot_india_tt
			hidden_effect = {
				india_superregion = {
					limit = {
						has_port = yes 
						province_has_center_of_trade_of_level = 1
						NOT = { is_core = ROOT }
						NOT = { owned_by = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
			custom_tooltip = ven_claims_on_every_cot_malaya_tt
			hidden_effect = {
				malaya_region = {
					limit = {
						province_has_center_of_trade_of_level = 1
						NOT = { is_core = ROOT }
						NOT = { owned_by = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}

	ven_reach_malacca = {
		icon = mission_portuguese_malacca
		position = 14
		required_missions = { wof_ven_this_mythical_realm }
		
		provinces_to_highlight = {
			OR = {
				province_id = 1361
				AND = {
					region = malaya_region
					province_has_center_of_trade_of_level = 1 
					NOT = { country_or_non_sovereign_subject_holds = ROOT }
				}
			}
		}
		trigger = {
			1361 = {
				trade_share = {
					country = ROOT
					share = 50
				}
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 3
				province_has_center_of_trade_of_level = 1
				region = malaya_region
			}
		}
		effect = {
			add_country_modifier = {
				name = ven_foreign_merchant_missions_modifier
				duration = 7300
			}
			add_mercantilism_or_monarch_power = { amount = 2 }
			649 = { add_permanent_claim = ROOT }
			650 = { add_permanent_claim = ROOT }
		}
	}

	ven_spice_islands = {
		icon = mam_harness_spice_trade
		position = 15
		required_missions = { ven_reach_malacca }
		provinces_to_highlight = {
			OR = {
				province_id = 649
				province_id = 650
			}
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				NOT = { base_production = 10 }
			}
		}
		trigger = {
			649 = { 
				country_or_non_sovereign_subject_holds = ROOT 
				base_production = 10 
			}
			650 = { 
				country_or_non_sovereign_subject_holds = ROOT 
				base_production = 10 
			}
		}
		effect = {
			649 = {
				add_province_modifier = {
					name = ven_source_of_spice_modifier
					duration = -1
				}
			}
			650 = {
				add_province_modifier = {
					name = ven_source_of_spice_modifier
					duration = -1
				}
			}
			add_mercantilism_or_monarch_power = { amount = 2 }
		}
	}
}

venice_missions_slot_4 = {
	slot = 4
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
	}
	
	has_country_shield = yes

	wof_ven_new_pilings = {
		icon = new_pilings
		position = 1
		required_missions = {  }
		
		provinces_to_highlight = {
			province_id = 112
		}
		
		trigger = {
			112 = {
				owned_by = ROOT
				grown_by_development = 8
			}
		}
		effect = {
			112 = {
				add_province_modifier = {
					name = urban_expansion_modifier
					duration = 7300
				}
			}
		}
	}

	ven_sempiterni_compagnie = {
		icon = ven_sempiterni_compagnie
		position = 2
		required_missions = { wof_ven_new_pilings }
		provinces_to_highlight = {
			province_id = 112 
			NOT = { owned_by = ROOT }
		}
		trigger = {
			112 = {
				num_of_buildings_in_province = 4
				owned_by = ROOT
			}
		}
		effect = {
			country_event = { id = flavor_ven.46 }
			custom_tooltip = event_insight_flavor_ven.46
			
		}
	}

	ven_modern_banking_system = {
		icon = medici_bank_ledgers 
		position = 3
		required_missions = { ven_sempiterni_compagnie }
		trigger = {
			OR = {
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					value = 10
					has_tax_building_trigger = yes
				}
				monthly_adm = 10
			}
			OR = {
				full_idea_group = economic_ideas
				monthly_income = 100
				calc_true_if = {
					all_ally = {
						subsidised_percent_amount = { 
							value = 0.2
						}
					}
					amount = 3
				}
			}
		}
		effect = {
			if = {
				limit = { has_reform = venice_merchants_reform }
				custom_tooltip = ven_reduce_cost_of_guild_interactions_tt
				custom_tooltip = empty_line_tt
			}
			else = {
				add_inflation = -3
				add_years_of_income = 1
			}
			add_years_of_owned_provinces_production_income = {
				years = 5
				trigger = {
					has_tax_building_trigger = yes
				}
				custom_tooltip = TAX_BUILDING_INCOME_DESC
			}
		}
	}

	ven_academy_of_the_unknowns = {
		icon = ven_academy_of_the_unknowns
		position = 4
		required_missions = { ven_modern_banking_system }
		provinces_to_highlight = {
			NOT = { has_building = university }
			owned_by = ROOT
		}
		trigger = {
			num_of_owned_provinces_with = {
				has_building = university 
				value = 10
			}
			112 = {
				owned_by = ROOT 
				has_building = university
			}
		}
		effect = {
			set_country_flag = ven_academy_of_the_unknowns_reward_flag
			country_event = {
				id = flavor_ven.47
			}
			custom_tooltip = event_insight_flavor_ven.47
		}
	}

	wof_ven_the_francocracy = {
		icon = la_latinocrazia
		position = 7
		required_missions = { ven_army_republic wof_ven_expand_the_arsenal }
		
		provinces_to_highlight = {
			province_id = 151
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			151 = { country_or_non_sovereign_subject_holds = ROOT }
		}
		effect = {
			add_country_modifier = {
				name = ven_conquest_of_constantinople_modifier
				duration = 5475
			}
			if = {
				limit = {
					151 = { 
						owned_by = ROOT 
						NOT = { religion = ROOT }
						NOT = { culture = ROOT }
					}
				}
				151 = {
					change_culture = ROOT 
					change_religion = ROOT
				}
			}
			else = {
				151 = {
					add_base_tax = 1
					add_base_tax = 1
					add_base_manpower = 1
				}
			}
			
		}
	}

	ven_flagship = {
		icon = mission_rb_grow_the_channel
		position = 8
		required_missions = { wof_ven_expand_the_terraferma }
		trigger = {
			if = {
				limit = { has_dlc = "Golden Century" }
				has_flagship = yes
			}
			if = {
				limit = { has_dlc = "Rule Britannia" }
				has_naval_doctrine = any
			}
			else = { num_of_heavy_ship = 10 }
			capital_scope = { base_production = 15 }
		}
		effect = {
			country_event = {
				id = flavor_ven.53
			}
			custom_tooltip = event_insight_flavor_ven.53
		}
	}

	ven_med_power = {
		icon = mission_dominate_the_mediterranean
		position = 9
		required_missions = { ven_flagship }
		trigger = {
			navy_size = 100 # modified
			OR = {
				mercantilism = 50
				navy_tradition = 60
			}
		}
		effect = {
			add_country_modifier = {
				name = ven_meditteranean_patrols_modifier
				duration = 9125
			}
		}
	}

	wof_ven_contest_genoese_trade = {
		icon = mission_sea_battles
		position = 10
		required_missions = {ven_genoa }
		
		provinces_to_highlight = {
			province_id = 1298
			NOT = {
				trade_share = {
					country = ROOT
					share = 50
				}
			}
		}
		trigger = {
			1298 = {
				trade_share = {
					country = ROOT
					share = 50
				}
			}
		}
		effect = {
			add_mercantilism_or_monarch_power = { amount = 1 }
			add_country_modifier = {
				name = "ven_genoese_humiliation"
				duration = 5475
			}
		}
	}

	ven_discover_north_america = {
		icon = mission_establish_high_seas_navy
		required_missions = { ven_exploration_missions }
		position = 12
		provinces_to_highlight = {
			if = {
				limit = { is_random_new_world = no }
				OR = {
					colonial_region = colonial_eastern_america
					colonial_region = colonial_the_carribean
				}
			}
			else = {
				continent = new_world
			}
			NOT = { has_discovered = ROOT }
		}
		trigger = {
			if = {
				limit = { is_random_new_world = no }
				custom_trigger_tooltip = {
					tooltip = miss_discover_eastern_america
					colonial_eastern_america = { has_discovered = ROOT }
				}
				custom_trigger_tooltip = {
					tooltip = miss_discover_caribbean
					colonial_the_carribean = { has_discovered = ROOT }
				}
			}
			else = {
				new_world = {
					is_sea = no
					has_discovered = ROOT
				}
			}
		}		
		effect = {
			if = {
				limit = { has_dlc = "Rule Britannia" }
				change_innovativeness = 3
			}
			else = { add_adm_power = 50 add_dip_power = 50 add_mil_power = 50 }
			add_country_modifier = {
				name = ven_venetian_new_world_charters
				duration = 7300
			}
		}
	}

	ven_china = {
		icon = mission_open_up_china
		position = 14
		required_missions = { wof_ven_this_mythical_realm }
		provinces_to_highlight = {
			OR = {
				province_id = 667
				province_id = 668
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { is_core = ROOT }
			}
		}
		trigger = {
			owns_core_province = 667
			owns_core_province = 668
		}
		effect = {
			if = {
				limit = { has_government_mechanic = council_of_ten }
				add_government_power = {
					mechanic_type = council_of_ten
					power_type = authority_power
					value = -5
				}
			}
			add_mercantilism_or_monarch_power = { amount = 2 }
			custom_tooltip = ven_claims_on_every_coastal_cot_china_tt
			hidden_effect = {
				south_china_region = {
					limit = {
						has_port = yes 
						province_has_center_of_trade_of_level = 1
						NOT = { is_core = ROOT }
						NOT = { owned_by = ROOT }
					}
					add_permanent_claim = ROOT
				}
				north_china_region = {
					limit = {
						has_port = yes 
						province_has_center_of_trade_of_level = 1
						NOT = { is_core = ROOT }
						NOT = { owned_by = ROOT }
					}
					add_permanent_claim = ROOT
				}
				japan_region = {
					limit = {
						has_port = yes 
						province_has_center_of_trade_of_level = 1
						NOT = { is_core = ROOT }
						NOT = { owned_by = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
}

venice_missions_slot_5 = {
	slot = 5
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	
	potential = {
		has_dlc = "Winds of Change"
		tag = VEN
		NOT = { map_setup = map_setup_random }
	}
	
	has_country_shield = yes

	ven_patronize_the_scuole_grandi = {
		icon = ven_patronize_the_scuole_grandi
		position = 1
		required_missions = {  }
		provinces_to_highlight = {
			if = {
				limit = { has_dlc = "Golden Century" }
				NOT = { holy_order = scuola_grande }
			}
			else = {
				OR = {
					NOT = { has_tax_building_trigger = yes }
					NOT = { has_trade_building_trigger = yes }
				}
			}
			is_capital_of = root
		}
		trigger = {
			if = {
				limit = { has_dlc = "Golden Century" }
				custom_trigger_tooltip = {
					tooltip = capital_scuola_grande_tt
					capital_scope = {
						holy_order = scuola_grande
					}
				}
			}
			else = {
				capital_scope = {
					has_tax_building_trigger = yes
					has_trade_building_trigger = yes
				}
			}
			prestige = 20
		}
		effect = {
			if = {
				limit = {
					has_dlc = "Golden Century"
					has_dlc = "Rule Britannia"
				}
				custom_tooltip = ven_establish_scuola_effect_tt
				change_innovativeness = 1
			}
			else = {
				capital_scope = {
					add_base_tax = 2
					add_base_production = 2
				}
			}
			set_country_flag = ven_establish_scuola_effect_flag
		}
	}

	ven_movable_printing = {
		icon = aldine_press
		position = 2
		required_missions = { ven_patronize_the_scuole_grandi wof_ven_new_pilings }		
		trigger = {
			OR = {
				has_institution = printing_press
				AND = {
					capital_scope = {
						if = {
							limit = { has_dlc = "Mandate of Heaven" }
							is_prosperous = yes
						}
						else = {
							has_production_building_trigger = yes
						}
					}
					has_adm_advisor = yes
					monthly_adm = 10
				}
			}
		}
		effect = {
			define_advisor = {
				name = "Ottaviano Petrucci"
				type = natural_scientist
				cost_multiplier = 0.25
				skill = 3
			}
			custom_tooltip = empty_line_tt
			capital_scope = {
				add_province_modifier = {
					name = ven_first_printshops_of_italy_modifier
					duration = 3650
				}
			}
		}
	}

	wof_ven_plague_doctor_training = {
		icon = plague_doctor_training
		position = 4
		required_missions = { ven_movable_printing }
		
		trigger = {
			development_in_provinces = {
				value = 500
				has_building = university
			}
		}
		effect = {
			remove_plague_events = yes
			if = {
				limit = { government = republic }
				custom_tooltip = ven_lichking_rulers_tt
				set_country_flag = ven_lichking_rulers_flag
				hidden_effect = {
					add_ruler_modifier = {
						name = ven_plague_doctors_modifier
						duration = -1
						hidden = yes
					}
				}
			}
		}
	}

	wof_ven_expand_the_arsenal = {
		icon = expand_the_arsenal
		position = 6
		provinces_to_highlight = {
			province_id = 112
		}
		trigger = {
			if = {
				limit = { has_dlc = "Leviathan" }
				112 = { 
					OR = {
						has_great_project = {
							type = venetian_arsenal_gp
							tier = 2
						}
						has_dock_building_trigger = yes
					}
				}
			}
			else = {
				112 = { 
					num_of_times_improved = 4 
					has_dock_building_trigger = yes 
				}
			}
			112 = { has_any_ongoing_construction = no }
		}
		effect = {
			morea_area = {
				limit = {
					NOT = {
						is_permanent_claim = ROOT
						is_core = ROOT
					}
				}
				add_permanent_claim = ROOT
			}
			aegean_archipelago_area = {
				limit = {
					NOT = {
						is_permanent_claim = ROOT
						is_core = ROOT
					}
				}
				add_permanent_claim = ROOT
			}
			151 = {
				if = {
					limit = {
						NOT = {
							is_permanent_claim = ROOT
							is_core = ROOT
						}
					}
					add_permanent_claim = ROOT
				}
			}
			country_event = {
				id = flavor_ven.50 
			}
			custom_tooltip = event_insight_flavor_ven.50
		}
	}

	wof_ven_monopolize_adriatic_trade = {
		icon = mission_galleys_in_port
		position = 7
		required_missions = { wof_ven_expand_the_arsenal }
		
		provinces_to_highlight = {
			province_id = 137
			NOT = {
				trade_share = {
					country = ROOT
					share = 25
				}
			}
		}
		trigger = {
			137 = {
				trade_share = {
					country = ROOT
					share = 25
				}
			}
		}
		effect = {
			add_dip_power = 100
			add_mercantilism_or_monarch_power = { amount = 2 }
		}
	}

	wof_ven_reclaim_the_aegean = {
		icon = reclaim_the_aegean
		position = 8
		required_missions = { wof_ven_monopolize_adriatic_trade }
		
		provinces_to_highlight = {
			area = aegean_archipelago_area
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				owner = { 
					NOT = { is_in_trade_league_with = ROOT }
				}
			}
		}
		trigger = {
			if = {
				limit = { has_dlc = "Mare Nostrum" }
				aegean_archipelago_area = {
					type = all
					OR = {
						country_or_non_sovereign_subject_holds = ROOT
						owner = { is_in_trade_league_with = ROOT }
					}
				}
			}
			else = {
				aegean_archipelago_area = {
					type = all
					country_or_non_sovereign_subject_holds = ROOT
				}
			}
		}
		effect = {
			321 = {
				if = {
					limit = {
						NOT = {
							is_permanent_claim = ROOT
							is_core = ROOT
							owner = {
								NOT = { is_in_trade_league_with = ROOT }
							}
						}
					}
					add_permanent_claim = ROOT
				}
			}
			1320 = {
				add_trade_modifier = {
					who = ROOT
					duration = 5475
					power = 100
					key = VENETIAN_ISLAND_STATIONS_KEY
				}
			}
		}
	}

	wof_ven_annex_cyprus = {
		icon = kingdom_of_cyprus
		position = 9
		required_missions = { wof_ven_reclaim_the_aegean }
		
		provinces_to_highlight = {
			province_id = 321
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				owner = {
					NOT = { is_in_trade_league_with = ROOT }
				}
			}
		}
		trigger = {
			321 = {
				OR = {
					owner = { is_in_trade_league_with = ROOT }
					country_or_non_sovereign_subject_holds = ROOT
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "mediterranean_ambition"
				duration = 3650
			}
			delta_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			aleppo_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}

	wof_ven_control_the_means_of_transaction = {
		icon = control_the_means_of_transaction
		position = 10
		required_missions = { wof_ven_annex_cyprus }
		
		provinces_to_highlight = {
			OR = {
				area = delta_area
				area = aleppo_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			delta_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			aleppo_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			capital_scope = {
				add_province_modifier = {
					name = ven_office_of_foreign_commercial_affairs
					duration = -1
				}
			}
			358 = {
				add_trade_modifier = {
					who = ROOT
					duration = 5475
					power = 50
					key = PROTECTED_VENETIAN_MERCHANTS
				}
			}
			377 = {
				add_trade_modifier = {
					who = ROOT
					duration = 5475
					power = 50
					key = PROTECTED_VENETIAN_MERCHANTS
				}
			}
		}
	}

	ven_triangle_trade = {
		icon = mission_the_triangle_trade
		position = 12
		required_missions = { ven_exploration_missions }
		provinces_to_highlight = {
			OR = {
				AND = {
					OR = {
						if = {
							limit = { is_random_new_world = no }
							province_id = 1516
						}
						province_id = 1466
						province_id = 358
						province_id = 1320
						province_id = 137
					}
					NOT = {
						trade_share = {
							country = ROOT
							share = 50
						}
					}
				}
				AND = {
					OR = {
						province_id = 1293
						province_id = 1295
						province_id = 4346
						province_id = 1322
					}
					NOT = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
				}
				AND = {
					OR = {
						province_id = 1308
						province_id = 1298
					}
					NOT = {
						trade_share = {
							country = ROOT
							share = 85
						}
					}
				}
			}
		}
		trigger = {
			358 = {
				trade_share = {
					country = ROOT
					share = 50
				}
			}
			OR = {
				AND = {
					1298 = {
						trade_share = {
							country = ROOT
							share = 85
						}
					}
					if = {
						limit = { is_random_new_world = no }
						1516 = {
							trade_share = {
								country = ROOT
								share = 50
							}
						}
					}
					1466 = {
						trade_share = {
							country = ROOT
							share = 50
						}
					}
					1293 = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
					1295 = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
				}
				AND = {
					1308 = {
						trade_share = {
							country = ROOT
							share = 85
						}
					}
					1320 = {
						trade_share = {
							country = ROOT
							share = 50
						}
					}
					137 = {
						trade_share = {
							country = ROOT
							share = 50
						}
					}
					1322 = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
					4346 = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = ven_global_presence_modifier
				duration = -1
			}
			if = {
				limit = {
					1298 = {
						trade_share = {
							country = ROOT
							share = 85
						}
					}
					1516 = {
						trade_share = {
							country = ROOT
							share = 50
						}
					}
					1466 = {
						trade_share = {
							country = ROOT
							share = 50
						}
					}
					1293 = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
					1295 = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
				}
				custom_tooltip = ven_genoa_reward_yes_tt
				tooltip = {
					1298 = {
						add_trade_node_income = 30
					}
				}
			}
			else = {
				custom_tooltip = ven_genoa_reward_no_tt
				tooltip = {
					1298 = {
						add_trade_node_income = 30
					}
				}
			}
			if = {
				limit = {
					1308 = {
						trade_share = {
							country = ROOT
							share = 85
						}
					}
					1320 = {
						trade_share = {
							country = ROOT
							share = 50
						}
					}
					137 = {
						trade_share = {
							country = ROOT
							share = 50
						}
					}
					1322 = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
					4346 = {
						trade_share = {
							country = ROOT
							share = 25
						}
					}
				}
				custom_tooltip = ven_venice_reward_yes_tt
				tooltip = {
					1308 = {
						add_trade_node_income = 30
					}
				}
			}
			else = {
				custom_tooltip = ven_venice_reward_no_tt
				tooltip = {
					1308 = {
						add_trade_node_income = 30
					}
				}
			}
			hidden_effect = {
				if = {
					limit = {
						1298 = {
							trade_share = {
								country = ROOT
								share = 85
							}
						}
						1320 = {
							trade_share = {
								country = ROOT
								share = 50
							}
						}
						137 = {
							trade_share = {
								country = ROOT
								share = 50
							}
						}
						1322 = {
							trade_share = {
								country = ROOT
								share = 25
							}
						}
						4346 = {
							trade_share = {
								country = ROOT
								share = 25
							}
						}
					}
					1298 = {
						add_trade_node_income = 30
					}
				}
				else = {
					1308 = {
						add_trade_node_income = 30
					}
				}
			}
		}
	}

	ven_coromandel = {
		icon = mission_coromandel_trade
		position = 13
		required_missions = { ven_aden_trade }
		provinces_to_highlight = {
			province_id = 1340
		}
		trigger = {
			1340 = {
				trade_share = {
					country = ROOT
					share = 40
				}
			}
		}
		effect = {
			504 = {
				add_trade_modifier = {
					who = ROOT
					duration = 5475
					power = 125
					key = VEN_PRESENCE_IN_INDIA_KEY
				}
			}
			1343 = {
				add_trade_modifier = {
					who = ROOT
					duration = 5475
					power = 125
					key = VEN_PRESENCE_IN_INDIA_KEY
				}
			}
			add_country_modifier = {
				name = ven_wealth_of_india_modifier
				duration = -1
			}
		}
	}
}