italy_odoacer_missions_1 = {
	slot = 1
	generic = no
	ai = yes
	potential = {
		AND = {
			tag = ITA
			NOT = { started_in = 494.1.1 }
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	ita_diplomats_to_constantinople_mission = {
		icon = mission_pf_cross
		required_missions = { }
		position = 1
		trigger = {
			reverse_has_opinion = {
				who = BYZ
				value = 40
			}
		}
		effect = {
			add_truce_with = BYZ
			add_legitimacy = 25
			custom_tooltip = ita_diplomats_to_constantinople_mission.tt
			hidden_effect = {
				every_province = {
					limit = {
						owned_by = ROW
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	
	ita_smother_the_last_embers_mission = {
		icon = mission_west_roman_soldier
		required_missions = { }
		position = 2
		trigger = {
			NOT = { exists = ROW }
		}
		effect = {
			add_legitimacy = 50
		}
	}
	
	ita_dismantle_the_alemanni_mission = {
		icon = mission_germanic_shields
		required_missions = { }
		position = 3
		provinces_to_highlight = {
			OR = {
				area = lorraine_area
				area = alsace_area
				area = upper_rhineland_area		#Baden
				area = upper_rhineland_area
				area = lower_swabia_area
				area = upper_swabia_area
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			lorraine_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			alsace_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			upper_rhineland_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			lower_swabia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			upper_swabia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_alemanni_auxiliaries"
				duration = 9125
			}
			ile_de_france_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	ita_gallo_roman_pretenders_mission = {
		icon = mission_celtic_nobles
		required_missions = { 
			ita_dismantle_the_alemanni_mission
			ita_burgundian_question_mission
		}
		position = 4
		provinces_to_highlight = {
			OR = {
				area = ile_de_france_area
				area = orleans_area
				area = loire_area
				area = normandy_area
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			ile_de_france_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			orleans_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			loire_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			normandy_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			poitou_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			massif_central_area = {		#Auverne
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			france_region = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_claim = ROOT		#is a TEMPORARY claim
			}
		}
	}
	
	ita_reconquest_of_gaul_mission = {
		icon = mission_roman_caesars_legions
		required_missions = { 
			ita_gallo_roman_pretenders_mission
		}
		position = 6
		provinces_to_highlight = {
			OR = {
				region = france_region
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			add_army_tradition = 10
			france_region = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_governors_of_gallia"
				duration = 10950
			}
		}
	}
}	

italy_odoacer_missions_2 = {
	slot = 2
	generic = no
	ai = yes
	potential = {
		AND = {
			tag = ITA
			NOT = { started_in = 494.1.1 }
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	ita_loyal_foederati_mission = {
		icon = give_him_back_his_legions
		required_missions = { }
		position = 1
		trigger = {
			army_tradition = 70
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_germanic_legions"
				duration = 10950
			}
		}
	}
	
	ita_theodoric_the_great_threat_mission = {
		icon = mission_krums_nikephoros_skull_cup
		required_missions = { 
			ita_ambitions_of_odovacar_rex_mission
		}
		position = 2
		provinces_to_highlight = {
			OR = {
				region = balkan_region
			}
			owned_by = OST
			has_discovered = ROOT
		}
		trigger = {
			balkan_region = {
				type = all
				NOT = { owned_by = OST }
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_undisputed_king_of_italy"
				duration = 10950
			}
		}
	}
	
	ita_burgundian_question_mission = {
		icon = mission_monarch_signing
		required_missions = { }
		position = 3
		provinces_to_highlight = {
			OR = {
				area = bourgogne_area	#East Burgundy
				area = west_burgundy_area
				area = savoy_dauphine_area
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = ita_burgundian_question_mission.tt1
					AND = {
						alliance_with = BUR
					}
					reverse_has_opinion = {
						who = BUR
						value = 100
					}
				}
				custom_trigger_tooltip = {
					tooltip = ita_burgundian_question_mission.tt2
					AND = {
						bourgogne_area = {
							type = all
							country_or_non_sovereign_subject_holds = ROOT
						}
						west_burgundy_area = {
							type = all
							country_or_non_sovereign_subject_holds = ROOT
						}
						savoy_dauphine_area = {
							type = all
							country_or_non_sovereign_subject_holds = ROOT
						}
					}
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_burgundian_auxiliaries"
				duration = 9125
			}
			provence_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	ita_press_the_visigoths_mission = {
		icon = mission_reclaim_andalucia
		required_missions = { 
			ita_burgundian_question_mission
		}
		position = 5
		provinces_to_highlight = {
			OR = {
				area = provence_area
				area = languedoc_area
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			provence_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			languedoc_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_fervor_of_conquest"
				duration = 9125
			}
			catalonia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			valencia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	ita_provinciae_of_hispania_mission = {
		icon = mission_latin_farmer_latifundia
		required_missions = { 
			ita_press_the_visigoths_mission
		}
		position = 6
		provinces_to_highlight = {
			OR = {
				area = valencia_area
				area = catalonia_area
				area = aragon_area
				area = toledo_area
				area = upper_andalucia_area
				area = lower_andalucia_area
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			valencia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			catalonia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			aragon_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			toledo_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			upper_andalucia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			lower_andalucia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_hispania_goldsmithing"
				duration = 10950
			}
			iberia_region = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	ita_suebi_of_gallaecia_mission = {
		icon = mission_gothic_warrior_4th_ce
		required_missions = { 
			ita_provinciae_of_hispania_mission
			ita_reconquest_of_gaul_mission
		}
		position = 7
		provinces_to_highlight = {
			OR = {
				region = iberia_region
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			iberia_region = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_rex_of_hispania"
				duration = -1
			}
		}
	}
	
	ita_set_sail_for_britannia_mission = {
		icon = mission_map_london_britannia
		required_missions = { 
			ita_suebi_of_gallaecia_mission
		}
		position = 8
		provinces_to_highlight = {
			OR = {
				region = british_isles_region
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 7
				region = british_isles_region
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_unstoppable_army"
				duration = 9125
			}
		}
	}
}

italy_odoacer_missions_3 = {
	slot = 3
	generic = no
	ai = yes
	potential = {
		AND = {
			tag = ITA
			NOT = { started_in = 494.1.1 }
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	ita_ambitions_of_odovacar_rex_mission = {
		icon = complete_the_risorgimento
		required_missions = { }
		position = 1
		trigger = {
			army_size_percentage = 0.9
			num_of_generals = 1
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_army_of_italy"
				duration = 9125
			}
			sicily_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			east_adriatic_coast_area = {		#Dalmatia
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	ita_claim_sicily_mission = {
		icon = mission_seize_the_isles
		required_missions = { 
			ita_ambitions_of_odovacar_rex_mission
		}
		position = 2
		provinces_to_highlight = {
			OR = {
				province_id = 4736		#Sicily
				province_id = 4737
				province_id = 124
				province_id = 125
				province_id = 2982
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			owns_or_non_sovereign_subject_of = 4736		#Sicily
			owns_or_non_sovereign_subject_of = 4737
			owns_or_non_sovereign_subject_of = 124
			owns_or_non_sovereign_subject_of = 125
			owns_or_non_sovereign_subject_of = 2982
		}
		effect = {
			baleares_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			corsica_sardinia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	ita_the_eastern_mediterranean_mission = {
		icon = mission_rb_mediterranean_authority
		required_missions = { 
			ita_claim_sicily_mission
		}
		position = 3
		provinces_to_highlight = {
			OR = {
				area = baleares_area
				area = corsica_sardinia_area
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			baleares_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			corsica_sardinia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_mediterranean_trade_networks"
				duration = 9125
			}
		}
	}
	
	ita_invasion_of_africa_mission = {
		icon = africa_proconsulare
		required_missions = { 
			ita_the_eastern_mediterranean_mission
		}
		position = 4
		provinces_to_highlight = {
			OR = {
				area = tunisia_area
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			tunisia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_great_italian_navy"
				duration = 10950
			}
			kabylia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			barbary_coast_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	ita_consolidate_african_domains_mission = {
		icon = mission_roman_plunder
		required_missions = { 
			ita_invasion_of_africa_mission
		}
		position = 6
		provinces_to_highlight = {
			OR = {
				province_id = 341
			}
		}
		trigger = {
			owns_core_province = 341	#Tunis/Carthage
			341 = {
				num_of_times_improved_by_owner = 2
			}
		}
		effect = {
			tunisia_area = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = "me_ita_breadbasket_of_carthage"
					duration = 10950
				}
			}
		}
	}
	
	ita_pillars_of_hercules_mission = {
		icon = mission_retake_ceuta
		required_missions = { 
			ita_consolidate_african_domains_mission
		}
		position = 7
		provinces_to_highlight = {
			OR = {
				AND = {
					OR = {
						province_id = 226		#Gibraltar
						province_id = 1749		#Cadiz
						province_id = 1751		#Ceuta
						province_id = 334		#Tanger
					}
					NOT = { 
						country_or_non_sovereign_subject_holds = ROOT
					}
				}
				province_id = 1293		#Sevilla / Strait of Gibraltar trade node
				
			}
			has_discovered = ROOT
		}
		trigger = {
			owns_or_non_sovereign_subject_of = 226
			owns_or_non_sovereign_subject_of = 1749
			owns_or_non_sovereign_subject_of = 1751
			owns_or_non_sovereign_subject_of = 334
			1293 = {
				trade_share = {
					country = ROOT
					share = 50
				}
			}
		}
		effect = {
			add_navy_tradition = 10
		}
	}
	
	ita_true_rex_of_rome_mission = {
		icon = a_roman_empire
		required_missions = { 
			ita_suebi_of_gallaecia_mission
			ita_pillars_of_hercules_mission
			ita_triumph_in_rome_mission
		}
		position = 8
		trigger = {
			stability = 3
			is_at_war = no
			is_free_or_tributary_trigger = yes
		}
		effect = {
			country_event = {
				id = mmetr_ITA_Odoacer_mission_events.1
			}
			
			tooltip = {
				change_tag = RO1
				set_government_rank = 3
				add_prestige = 30
			}
		}
	}
	
	ita_reunite_the_twin_capitals_mission = {
		icon = end_the_schism
		required_missions = { 
			ita_true_rex_of_rome_mission
		}
		position = 9
		provinces_to_highlight = {
			OR = {
				province_id = 118	#Roma/Rome
				province_id = 151	#Constantinople
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			owns_core_province = 118
			owns_core_province = 151
		}
		effect = {
			add_prestige = 20
			add_country_modifier = {
				name = "me_ita_great_unifier"
				duration = 10950
			}
		}
	}
}

italy_odoacer_missions_4 = {
	slot = 4
	generic = no
	ai = yes
	potential = {
		AND = {
			tag = ITA
			NOT = { started_in = 494.1.1 }
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	ita_odoacer_trustworthy_allies_mission = {
		icon = spagna_tarraconense
		required_missions = { }
		position = 1
		trigger = {
			custom_trigger_tooltip = {
				tooltip = building_alliances.tooltip
				num_of_allies = 2
				calc_true_if = {
					all_ally = {
						has_opinion = {
							who = ROOT
							value = 150
						}
					}
					amount = 2
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "influential_diplomacy"
				duration = 9125 #25 years
				
			}
		}
	}
	
	ita_subjugate_the_rugii_mission = {
		icon = mission_rb_unite_the_clans
		required_missions = { 
			ita_ambitions_of_odovacar_rex_mission
		}
		position = 2
		provinces_to_highlight = {
			OR = {
				area = east_bavaria_area
				area = austria_proper_area
				area = inner_austria_area
			}
			NOT = { 
				country_or_non_sovereign_subject_holds = ROOT
			}
			has_discovered = ROOT
		}
		trigger = {
			east_bavaria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			austria_proper_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			inner_austria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_army_tradition = 10
		}
	}
	
	ita_restore_ravenna_mission = {
		icon = sweep_the_po
		required_missions = { 
			ita_appease_the_senate_mission
		}
		position = 3
		provinces_to_highlight = {
			OR = {
				province_id = 114 # Ravenna
			}
			has_discovered = ROOT
		}
		trigger = {
			owns_core_province = 114
			114 = {
				fort_level = 1
				is_capital_of = ROOT
			}
			114 = {
				num_of_times_improved_by_owner = 3
				base_manpower = 3
			}
		}
		effect = {
			114 = {
				add_province_modifier = {
					name = "me_ita_capital_restored"
					duration = 10950
				}
			}
		}
	}
	
	ita_rebuild_the_eternal_city_mission = {
		icon = mission_roman_forum_imperial
		required_missions = { 
			ita_restore_ravenna_mission
		}
		position = 6
		provinces_to_highlight = {
			OR = {
				province_id = 118	#Roma/Rome
			}
			has_discovered = ROOT
		}
		trigger = {
			owns_core_province = 118
			118 = {
				num_of_times_improved_by_owner = 3
				base_manpower = 3
			}
			118 = {
				OR = {
					has_building = glorious_monument
					has_building = temple
				}
			}
			118 = {
				has_building = road
			}
		}
		effect = {
			118 = {
				add_province_modifier = {
					name = "me_ita_old_glory_restored"
					duration = -1
				}
			}
		}
	}
	
	ita_triumph_in_rome_mission = {
		icon = a_real_roman_empire
		required_missions = { 
			ita_rebuild_the_eternal_city_mission
			ita_consolidate_african_domains_mission
		}
		position = 7
		trigger = {
			owns_core_province = 118
			is_at_war = no
			had_recent_war = 5
			mil_power = 50
		}
		effect = {
			mil_power = -50
			add_ruler_modifier = {
				name = "me_ita_africanus"
				duration = -1
			}
		}
	}
}

italy_odoacer_missions_5 = {
	slot = 5
	generic = no
	ai = yes
	potential = {
		AND = {
			tag = ITA
			NOT = { started_in = 494.1.1 }
			NOT = { map_setup = map_setup_random }
		}
	}
	has_country_shield = yes
	
	ita_repair_the_viae_romanae_mission = {
		icon = prosper_in_piedmont
		required_missions = { }
		position = 1
		trigger = {
			road = 20
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_roman_roads"
				duration = -1
			}
		}
	}
	
	ita_appease_the_senate_mission = {
		icon = mission_roman_senate
		required_missions = { }
		position = 2
		trigger = {
			OR = {
				estate_loyalty = {
					estate = estate_nobles
					loyalty = 75
				}
				num_of_estate_agendas_completed = {
					estate = estate_nobles
					value = 4
				}
			}
			OR = {
				has_estate_privilege = estate_nobles_advisors
				has_estate_privilege = estate_nobles_right_of_counsel
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_roman_senate"
				duration = -1
			}
		}
	}
	
	ita_improved_copper_coinage_mission = {
		icon = dominant_economy
		required_missions = { 
			ita_appease_the_senate_mission
		}
		position = 3
		trigger = {
			years_of_income = 3
			OR = {
				master_of_mint = 1
				treasurer = 1
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_new_copper_coinage"
				duration = 18250		#50 years
			}
		}
	}
	
	ita_chalcedonian_bishops_mission = {
		icon = catholic_volunteers
		required_missions = { }
		position = 4
		trigger = {
			num_of_estate_agendas_completed = {
				estate = estate_church
				value = 3
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_bishop_of_rome"
				duration = 10950
			}
			define_advisor = {
				type = theologian
				skill = 2
				discount = yes
				culture = roman
				religion = chalcedonism
				discount = yes
			}
		}
	}
	
	ita_the_question_of_arianism_mission = {
		icon = mission_arius_arianism
		required_missions = {  
			ita_chalcedonian_bishops_mission
		}
		position = 5
		trigger = {
			is_at_war = no
			stability = 3
			OR = {
				religion = chalcedonism
				religion = arianism
			}
			OR = {
				dominant_religion = chalcedonism
				dominant_religion = arianism
			}
		}
		effect = {
			country_event = {
				id = mmetr_ITA_Odoacer_mission_events.2
			}
			if = {
				limit = {
					religion = arianism
				}
				custom_tooltip = ita_the_question_of_arianism_mission.tt1
			}
			else_if = {
				limit = {
					religion = chalcedonism
				}
				custom_tooltip = ita_the_question_of_arianism_mission.tt1
			}
		}
	}
	
	ita_great_churches_of_italia_mission = {
		icon = show_piety
		required_missions = {  
			ita_the_question_of_arianism_mission
		}
		position = 6
		trigger = {
			num_of_owned_provinces_with = {
				value = 15
				OR = {
					has_building = glorious_monument
					has_building = temple
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "me_ita_faithful_rulers"
				duration = 10950
			}
		}
	}
}

