dom_cas_missions_1 = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = CAS 
			tag = SPA 
		}
		NOT = { was_tag = ARA } 
	}
	has_country_shield = yes
	
	gc_cas_spa_army_ready2 = {
		icon = mission_assemble_an_army
		required_missions = {  }
		completed_by = 1445.1.1
		position = 1
		# free mission

		trigger = {
			army_size_percentage = 1
			navy_size_percentage = 1
			num_of_generals = 1
		}

		effect = {
			add_country_modifier = {
				name = "spa_rb_morale"
				duration = 5475
			}
			upper_andalucia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			210 = {
				if = {
					limit = {
						NOT = {
							is_permanent_claim = ROOT
							is_core = ROOT
						}
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	
	gc_cas_spa_reconquista_one2 = { #Duplicate
		icon = mission_unite_home_region
		required_missions = { gc_cas_spa_army_ready2 }
		position = 2

		provinces_to_highlight = {
			area = upper_andalucia_area
			NOT = { owned_by = ROOT }
		}

		trigger = {
			upper_andalucia_area = {
				type = all
				owned_by = ROOT
			}
		}

		effect = {
			set_country_flag = fate_of_granada_mission_flag 
			country_event = { id = flavor_spa.8 }
			126 = {
				add_permanent_claim = ROOT
			}
			northern_morocco_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_reconquista_four2 = {
		icon = mission_assemble_an_army
		required_missions = { gc_cas_spa_reconquista_one2 }
		position = 3
		provinces_to_highlight = {
			area = northern_morocco_area
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}

		trigger = {
			northern_morocco_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}

		effect = {
			add_country_modifier = {
			name = "completing_the_reconquista"
			duration = 5475
			}
			western_morocco_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_claim = ROOT }
				}
				add_claim = ROOT
			}
			algiers_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_claim = ROOT }
				}
				add_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_iberia_christian2 = {
		icon = mission_religious
		required_missions = { gc_cas_spa_reconquista_four2 }
		completed_by = 1511.1.1
		position = 4
		provinces_to_highlight = {
			region = iberia_region
			NOT = { religion_group = ROOT }
		}

		trigger = {
			iberia_region = {
				type = all
				religion_group = ROOT
			}
		}

		effect = {
			add_country_modifier = {
				name = "spa_rb_christian_iberia"
				duration = 5475
			}
			
			if = { 
				limit = { has_estate = estate_church }
				add_estate_loyalty = {
					estate = estate_church 
					loyalty = 20 
				}
			}
			add_prestige_or_monarch_power = { amount = 10 }
		}
	}
	
	spa_reform_armada2 = {
		icon = mission_spanish_armada
		required_missions = { spa_raise_army }
		position = 5
		trigger = {
			if = { 
				limit = { has_dlc = "Golden Century" }
				has_flagship = yes
			}
			if = {
				limit = {
					exists = GBR
				}
				num_of_heavy_ship = GBR
			}
			else_if = {
				limit = {
					exists = ENG
				}
				num_of_heavy_ship = ENG
			}
			else = {
				num_of_heavy_ship = 20
			}
		}
		effect = {
			add_country_modifier = {
				name = "spa_prepared_armada"
				duration = 7300
			}
			if = {
				limit = {
					exists = GBR
					valid_for_personal_unions_trigger = yes
					GBR = {
						valid_for_personal_unions_trigger = yes
						NOT = { religion = ROOT }
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = GBR
				}
			}
			else_if = {
				limit = {
					exists = ENG
					valid_for_personal_unions_trigger = yes
					ENG = {
						valid_for_personal_unions_trigger = yes
						NOT = { religion = ROOT }
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = ENG
				}
			}
			else = {
				wessex_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				home_counties_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				east_anglia_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				east_midlands_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				west_midlands_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				yorkshire_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				custom_tooltip = cas_armada_info_tt
			}
		}
	}
	
	gc_spa_invade_england2 = {
		icon = mission_invade_england
		required_missions = { spa_reform_armada2 }
		position = 6
		provinces_to_highlight = {
			OR = {
				area = wessex_area
				area = home_counties_area
				area = east_anglia_area
				area = east_midlands_area
				area = west_midlands_area
				area = yorkshire_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}

		trigger = {
			wessex_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			home_counties_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			east_anglia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			east_midlands_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			west_midlands_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			yorkshire_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_power_projection = {
				type = mission_rewards_power_projection
				amount = 50
			}
			if = {
				limit = {
					GBR = {
						is_subject_of_type = personal_union
						is_subject_of = ROOT
						NOT = { religion = ROOT }
					}
				}
				GBR = {
					change_religion = ROOT
				}
			}
			else_if = {
				limit = {
					ENG = {
						is_subject_of_type = personal_union
						is_subject_of = ROOT
						NOT = { religion = ROOT }
					}
				}
				ENG = {
					change_religion = ROOT
				}
			}
			else = {
				add_prestige = 25
			}
			if = {
				limit = {
					religion = catholic
				}
				add_papal_influence = 25
			}
		}
	}
}

dom_cas_missions_1_b = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			AND = {
				was_tag = ARA 
				tag = SPA 
			}
			tag = ARA 
		}
	}
	has_country_shield = yes
	
	gc_ara_navarra2 = {
		icon = mission_have_two_subjects
		required_missions = {  }
		position = 2
		provinces_to_highlight = {
			province_id = 210
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		trigger = {
			210 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = military_vassalization
				duration = 7300
			}
			provence_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			castille_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			toledo_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			asturias_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			leon_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			extremadura_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			basque_country = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_ara_consultate_of_the_sea2 = {
		icon = mission_consulate_of_the_sea
		required_missions = { }
		position = 4
		provinces_to_highlight = {
			OR = {
				province_id = 1298
				province_id = 1295
				AND = {
					OR = {
						province_id = 213
						province_id = 220
					}
					OR = {
						has_trade_building_trigger = no
						NOT = { owned_by = ROOT }
					}
				}
			}
		}
		trigger = {
			1295 = {
				trade_share = {
					country = ROOT
					share = 70
				}
			}
			1298 = {
				trade_share = {
					country = ROOT
					share = 15
				}
			}
			213 = {
				has_trade_building_trigger = yes
				owned_by = ROOT
			}
			220 = {
				has_trade_building_trigger = yes
				owned_by = ROOT
			}
			reform_level = 3
		}
		effect = {
			set_country_flag = ara_consulate_flag
			country_event = { id = flavor_ara.1 }
			liguria_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
			}
		}
	}
	
	gc_ara_genoa2 = {
		icon = mission_dominate_genoa
		required_missions = { gc_ara_consultate_of_the_sea2 }
		position = 5
		
		provinces_to_highlight = {
			OR = {
				AND = {
					OR = {
						area = corsica_sardinia_area
						area = liguria_area
					}
					NOT = { country_or_non_sovereign_subject_holds = ROOT }
				}
				AND = {
					province_id = 101
					OR = { 
						NOT = { province_has_center_of_trade_of_level = 3 }
						NOT = { development = 30 }
					}
				}
			}
		}
				
		trigger = {
			liguria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			corsica_sardinia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			if = {
				limit = {
					has_dlc = "Dharma"
				}
				101 = {
					OR = {
						province_has_center_of_trade_of_level = 3
						development = 30
					}
				}
			}
			else = {
				101 = {
					development = 30
				}
			}
		}
		effect = {
			italy_region = {
				limit = { 
					NOT = { owned_by = ROOT } 
					NOT = { is_core = ROOT }
				}
				add_permanent_claim = ROOT 
			}
			if = {
				limit = { 
					NOT = { mission_completed = gc_ara_naples2 }
				}
				provence_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
			if = { 
				limit = { 
					has_dlc = "Rights of Man" 
					NOT = { num_of_ruler_traits = { amount = 3 } }
				}				
				add_ruler_personality = entrepreneur_personality 
			}
			if = {
				limit = { 
					NOT = { mission_completed = gc_ara_occitania2 }
				}
				savoy_dauphine_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				languedoc_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				guyenne_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				pyrenees_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
			}
			add_mercantilism = 5 
		}
	}
	
	gc_ara_italy2 = {
		icon = mission_rule_italy
		required_missions = { gc_ara_genoa2 }
		position = 6
		provinces_to_highlight = {
			region = italy_region
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		trigger = {
			italy_region = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			east_adriatic_coast_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			croatia_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			carinthia_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			rascia_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			
			add_country_modifier = {
				name = ara_italian_influences_modifier
				duration = -1 
			}
		}
	}
}
	

dom_cas_missions_1_c = {
	slot = 1
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = CAS 
			tag = SPA 
		}
		
	}
	has_country_shield = yes
	
	spa_sevilla_port = {
		icon = adriatic_access
		required_missions = { }
		position = 7
		provinces_to_highlight = {
			province_id = 224
		}
		trigger = {
			224 = { owned_by = ROOT }
			224 = { 
				if = { 
					limit = { has_dlc = "Leviathan" } 
					num_of_times_expanded_infrastructure = 1
				}
			}
			224 = { num_of_times_improved = 10 }
			224 = { has_trade_building_trigger = yes }
			224 = { has_dock_building_trigger = yes }
			224 = { has_shipyard_building_trigger = yes } 
		}
		effect = {
			set_country_flag = sevilla_trade_center_flag 
			country_event = { id = flavor_spa.3153 }
			224 = {
				upgrade_building = { trade = yes }
			}
		}
	}
	
	spa_merchant_fleet = {
		icon = mission_coromandel_trade
		required_missions = { spa_sevilla_port }
		position = 8
		provinces_to_highlight = {
			owned_by = ROOT 
			has_port = yes 
			has_shipyard_building_trigger = no 
		}
		trigger = {
			num_of_owned_provinces_with = {
				has_shipyard_building_trigger = yes 
				value = 6
			}
			num_of_light_ship = 50
		}
		effect = {
			add_country_modifier = {
				name = spa_powerful_trade_ships_modifier
				duration = 9125 
			}
			add_country_modifier = {
				name = spa_employ_galleon_modifier
				duration = -1 
			}
			add_navy_tradition = 10
		}
	}
	
	gc_cas_spa_la_plata2 = {
		icon = mission_iberian_conquistador
		required_missions = { gc_cas_spa_caribbean_discovery2 }
		position = 9

		provinces_to_highlight = {
			colonial_region = colonial_la_plata
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = yes
		}

		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 5
				colonial_region = colonial_la_plata
				is_city = yes
			}
		}

		effect = {
			add_country_modifier = {
				name = "spa_rb_overseas_trade"
				duration = 5475
			}
			
			add_mercantilism = 2
		}
	}
	
	gc_cas_spa_new_granada2 = {
		icon = mission_new_kingdom_of_granada
		required_missions = { gc_cas_spa_spanish_main2 }
		completed_by = 1509.1.1
		position = 10
		provinces_to_highlight = {
			colonial_region = colonial_colombia
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			if = {
				limit = {
					has_dlc = "Golden Century"
					religion = catholic
				}
				custom_trigger_tooltip = {
					tooltip = colombia_holy_order_tooltip
					num_of_states_owned_or_owned_by_non_sovereign_subjects_with = {
						has_holy_order_trigger = yes
						colonial_region = colonial_colombia
						value = 5
					}
				}
			}
			else = {
				custom_trigger_tooltip = {
					tooltip = colombia_holy_order_alternative_tooltip
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						religion = ROOT
						colonial_region = colonial_colombia
						value = 25
					}
				}
			}
			colonial_colombia = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_dip_power = 100
			if = {
				limit = {
					government = monarchy
				}
				add_legitimacy = 25
			}
			add_country_modifier = {
				name = "spa_new_granada"
				duration = 7300
			}
			if = {
				limit = {
					any_subject_country = {
						OR = {
							is_subject_of_type = colony
							is_subject_of_type = crown_colony
							is_subject_of_type = private_enterprise
							is_subject_of_type = self_governing_colony
						}
						owns = 825
					}
					825 = { is_capital = no }
				}
				every_subject_country = {
					limit = {
						owns = 825
					}
					825 = {
						prev_move_capital_effect = yes
					}
				}
			}
		}
	}
}

dom_cas_missions_2 = {
	slot = 2
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = CAS 
			tag = SPA 
		}
		NOT = { was_tag = ARA } 
	}
	has_country_shield = yes
	
	spa_papal_favor = {
		icon = catholic_confraternity 
		required_missions = { gc_cas_spa_army_ready2 }
		position = 2
		provinces_to_highlight = {
			owned_by = PAP 
			is_capital = yes 
		}
		trigger = {
			if = { 
				limit = { 
					PAP = { exists = yes } 
				}
				PAP = {
					has_opinion = {
						who = ROOT 
						value = 150
					}
				}
			}
			if = { 
				limit = { religion = catholic }
				papal_influence = 50 
			}
			else = { stability = 2 }
			if = { 
				limit = { 
					NOT = { religion = catholic }
				}
				inquisitor = 1
			}
		}
		effect = {
			if = { 
				limit = { religion = catholic }
				random_owned_province = {
					limit = { has_cardinal = no } 
					add_cardinal = yes 
				}
				custom_tooltip = spa_every_cardinal_1_tax_tt
				hidden_effect = {
					every_owned_province = {
						limit = { has_cardinal = yes } 
						add_base_tax = 1 
					}
				}
			}
			else = { add_prestige_or_monarch_power = { amount = 30 } }
		}
	}
	
	spa_rein_in_france = {
		icon = king_of_france
		required_missions = { gc_cas_spa_reconquista_three2 }
		position = 3
		provinces_to_highlight = {
			region = france_region 
			NOT = { country_or_non_sovereign_subject_holds = ROOT } 
		}
		trigger = {
			OR = { 
				custom_trigger_tooltip = {
					tooltip = spa_any_ally_tt
					any_ally = {
						capital_scope = { region = france_region } 
						has_opinion = {
							who = ROOT 
							value = 180 
						}
						OR = { 
							is_great_power = yes 
							total_development = 500 
						}
					}
				}
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					region = france_region 
					value = 20
				}
			}
		}
		effect = {
			add_power_projection = {
				type = 10_permanent_power_projection
				amount = 10
			}
			custom_tooltip = zim_amongst_the_great_powers_tt
			
			if = {
				limit = { 
					any_ally = {
						capital_scope = { region = france_region } 
						has_opinion = {
							who = ROOT 
							value = 180 
						}
						OR = { 
							is_great_power = yes 
							total_development = 500 
						}
					}
				}
				random_ally = {
					limit = { 
						capital_scope = { region = france_region } 
						has_opinion = {
							who = ROOT 
							value = 180 
						}
						OR = { 
							is_great_power = yes 
							total_development = 500 
						}
					}
					add_historical_friend = ROOT 
					ROOT = { add_historical_friend = PREV }
				}
			}
		}
	}
	
	spa_raise_army = {
		icon = mission_castillian_aggression
		required_missions = { }
		position = 4
		trigger = {
			if = { 
				limit = { ai = no }
				army_size_percentage = 0.85
				navy_size_percentage = 0.85
				OR = { 
					army_tradition = 50 
					army_professionalism = 25
				}
				OR = { 
					navy_tradition = 30 
					if = {
						limit = { has_dlc = "Golden Century" }
						has_flagship = yes 
					}
					num_of_heavy_ship = 8 
				}
			}
			else = {
				army_size_percentage = 0.65
				navy_size_percentage = 0.65
				OR = { 
					army_tradition = 50 
					army_professionalism = 25
					navy_tradition = 30 
					has_flagship = yes 
					num_of_heavy_ship = 8 
				}
			}
		}

		effect = {
			add_country_modifier = {
				name = spa_backed_by_the_army_modifier
				duration = 9125 
			}
		}
	}
	
	spa_tercios_system = {
		icon = spa_tercios_system
		required_missions = { spa_raise_army }
		position = 5
		trigger = {
			num_of_owned_provinces_with = {
				has_manpower_building_trigger = yes 
				value = 15
			}
			reform_level = 4
			NOT = { current_age = age_of_discovery }
		}
		effect = {
			set_country_flag = enable_tercios_reform_flag
			add_government_reform = tercios_reform
			if = {
				limit = { has_dlc = "Cradle of Civilization" }
				add_army_professionalism = 5
			}
			else = { add_army_tradition = 10 }
		}
	}
	
	spa_reform_tercios = {
		icon = spa_reform_tercios
		required_missions = { spa_tercios_system }
		position = 6
		trigger = {
			num_of_tercio = 60
			OR = { 
				army_professionalism = 90
				army_tradition = 90 
			}
		}
		effect = {
			add_country_modifier = {
				name = spa_reformed_tercio_modifier
				duration = -1 
			}
			if = { 
				limit = { 
					has_dlc = "Rights of Man" 
					NOT = { num_of_ruler_traits = { amount = 3 } }
				}				
				add_ruler_personality = strict_personality
			}
			else = { 
				change_ruler_stat = {
					type = mil
					amount = 2
				}
			}
		}
	}
}

dom_cas_missions_2_b = {
	slot = 2
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			AND = {
				was_tag = ARA 
				tag = SPA 
			}
			tag = ARA 
		}
	}
	has_country_shield = yes
	
	dom_ara_intervene_castile = {
		icon = mission_intervene_in_castile
		required_missions = {  }
		position = 1
		provinces_to_highlight = {
			OR = {
				area = castille_area 
				area = toledo_area 
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			OR = { 
				CAS = { is_subject_of = ROOT }
				AND = {
					castille_area = {
						type = all 
						country_or_non_sovereign_subject_holds = ROOT 
					}
					toledo_area = {
						type = all 
						country_or_non_sovereign_subject_holds = ROOT 
					}
				}
				AND = {
					alliance_with = CAS 
					marriage_with = CAS 
					if = {
						limit = { has_dlc = "Leviathan" ai = no }
						CAS = {
							trust = {
								who = ROOT 
								value = 60 
							}
						}
					}
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = ara_iberian_struggle_modifier #Greetings to the CK3 team <3
				duration = 7300
			}
			if = {
				limit = { 
					CAS = {
						OR = {
							is_subject_of = ROOT 
							alliance_with = ROOT 
						}
					}
				}
				add_historical_friend = CAS 
				CAS = { add_historical_friend = ROOT }
			}
			else = { custom_tooltip = ara_if_cas_dip_tt } 
			
			if = {
				limit = {
					exists = POR
					valid_for_personal_unions_trigger = yes
					POR = {
						valid_for_personal_unions_trigger = yes
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = POR
				}
			}
			else = {
				alentejo_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				beieras_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	
	gc_ara_portugal2 = {
		icon = mission_union_with_portugal
		required_missions = { dom_ara_intervene_castile }
		position = 2
		provinces_to_highlight = {
			OR = {
				area = alentejo_area
				area = beieras_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		trigger = {
			alentejo_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			beieras_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_power_projection = {
				type = mission_rewards_power_projection
				amount = 30
			}
			add_prestige_or_monarch_power = { amount = 25 } 
		}
	}
	
	dom_ara_iberia = {
		icon = spread_the_von_wettins
		required_missions = { gc_ara_navarra2 gc_ara_portugal2 dom_ara_remensa_war }
		position = 3
		provinces_to_highlight = {
			region = iberia_region 
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			iberia_region = {
				type = all 
				country_or_non_sovereign_subject_holds = ROOT 
			}
			if = { 
				limit = { 
					OR = { 
						has_dlc = "Emperor" 
						has_dlc = "Rights of Man"
					}
				}
				is_great_power = yes 
			}
			total_development = 600
		}
		effect = {
			set_government_rank = 3 
			
			if = {
				limit = { has_dlc = "Golden Century" }
				add_country_modifier = {
					name = ara_a_new_power_modifier
					duration = -1 
				}
			}
			else = {
				add_prestige_or_monarch_power = { amount = 50 }
			}
		}
	}
	
	dom_ara_med = {
		icon = mission_dominate_the_mediterranean
		required_missions = { dom_ara_iberia gc_ara_consultate_of_the_sea2 gc_ara_constantinople2 }
		position = 5
		trigger = { 
			custom_trigger_tooltip = {
				tooltip = ara_strongest_med_fleet
				NOT = { 
					any_country = {
						capital_scope = { 
							OR = { 
								region = iberia_region
								region = france_region 
								region = italy_region 
								region = balkan_region 
								region = mashriq_region 
								region = egypt_region 
								region = anatolia_region 
							}
						}
						navy_size = ROOT 
					}
				}
			}
			OR = { 
				AND = {
					full_idea_group = maritime_ideas 
					num_of_owned_provinces_with = {
						has_dock_building_trigger = yes 
						value = 25 
					}
				}
				AND = {
					full_idea_group = naval_ideas 
					num_of_owned_provinces_with = {
						has_shipyard_building_trigger = yes 
						value = 25 
					}
				}
				AND = {
					full_idea_group = trade_ideas 
					num_of_owned_provinces_with = {
						has_trade_building_trigger = yes 
						value = 12 
					}
				}
				mercantilism = 75
			}
		}
		effect = {
			add_country_modifier = {
				name = ara_masters_med_modifier
				duration = -1 
			}		
		}
	}
	
	gc_ara_occitania2 = {
		icon = mission_invade_occitania
		required_missions = { gc_ara_genoa2 }
		position = 6
		provinces_to_highlight = {
			OR = {
				area = savoy_dauphine_area
				area = languedoc_area
				area = guyenne_area
				area = pyrenees_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		trigger = {
			savoy_dauphine_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			languedoc_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			guyenne_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			pyrenees_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			france_region = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_claim = ROOT
			}
			change_ruler_stat = {
				type = dip
				amount = 1
			}
			change_ruler_stat = {
				type = mil
				amount = 1
			}
		}
	}
}

dom_cas_missions_2_c = {
	slot = 2
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = { 
			tag = CAS 
			tag = SPA 
		}
		
	}
	has_country_shield = yes
	
	spa_dominate_sevilla = {
		icon = spa_dominate_sevilla
		required_missions = { spa_sevilla_port gc_cas_spa_plus_ultra2 }
		position = 8
		provinces_to_highlight = {
			province_id = 1293
		}
		trigger = {
			1293 = { 
				trade_share = {
					country = ROOT 
					share = 70
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = spa_spanish_affluence_modifier
				duration = 7300
			}
			if = { 
				limit = { 
					NOT = { mission_completed = gc_cas_spa_havana2 }
				}
				set_country_flag = spa_house_of_trade_flag
				country_event = { id = flavor_spa.1003 }
				custom_tooltip = spa_event_insight_1003_tt
			}
		}
	}
	
	gc_cas_spa_spanish_main2 = {
		icon = mission_establish_high_seas_navy
		required_missions = { gc_cas_spa_caribbean_discovery2 }
		position = 9
		provinces_to_highlight = {
			colonial_region = colonial_colombia
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = yes
		}
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 5
				colonial_region = colonial_colombia
				is_city = yes
			}
		}

		effect = {
			define_conquistador = {
				name = "Francisco Pizarro"
				fire = 4
				shock = 4
				manuever = 5
				siege = 1
			}
			upper_peru = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			potosi_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			antisuyu_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			kuntisuyu_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			huanuco_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			cajamarca_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			quito_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			794 = {
				add_permanent_claim = ROOT
			}
			2837 = {
				add_permanent_claim = ROOT
			}
			2823 = {
				add_permanent_claim = ROOT
			}
			2826 = {
				add_permanent_claim = ROOT
			}
			812 = {
				add_permanent_claim = ROOT
			}
			2822 = {
				add_permanent_claim = ROOT
			}
			2821 = {
				add_permanent_claim = ROOT
			}
			guatemala_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			east_yucatan_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			yucatan_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			chiapas_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			oaxaca_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}

			eastern_mexico_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			guerrero_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			michoacan_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			2657 = {
				add_permanent_claim = ROOT
			}
			2621 = {
				add_permanent_claim = ROOT
			}
			854 = {
				add_permanent_claim = ROOT
			}
			2642 = {
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_incans2 = {
		icon = mission_war_chest
		required_missions = { gc_cas_spa_spanish_main2 }
		position = 10
		provinces_to_highlight = {
			OR = {
				area = upper_peru
				area = potosi_area
				area = antisuyu_area
				area = kuntisuyu_area
				province_id = 794
				province_id = 2837
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = ROOT
		}

		trigger = {
			upper_peru = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			potosi_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			antisuyu_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			kuntisuyu_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			794 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			2837 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}

		effect = {
			add_country_modifier = {
				name = spa_overseas_wealth_modifier
				duration = 9125 
			}
			peru_region = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_potosi2 = {
		icon = mission_potosi_silver
		required_missions = { gc_cas_spa_incans2 }
		position = 11
		provinces_to_highlight = {
			OR = {
				AND = {
					province_id = 795
					NOT = { country_or_non_sovereign_subject_holds = ROOT }
				}
				AND = {
					province_id = 809
					NOT = { country_or_non_sovereign_subject_holds = ROOT }
				}
				AND = {
					OR = {
						province_id = 809
						province_id = 835
						province_id = 1516
					}
					NOT = { is_strongest_trade_power = ROOT }
				}
				AND = { 
					province_id = 809 
					NOT = { province_has_center_of_trade_of_level = 3 }
				}
			}
		}

		trigger = {
			owns_or_non_sovereign_subject_of = 809
			owns_or_non_sovereign_subject_of = 795
			809 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			if = {
				limit = {
					has_dlc = "Dharma"
				}
				809 = {
					province_has_center_of_trade_of_level = 3
				}
			}
			else = {
				809 = {
					OR = {
						has_building = trade_depot
						has_building = stock_exchange
					}
				}
			}
			809 = {
				is_strongest_trade_power = ROOT
			}
			835 = {
				is_strongest_trade_power = ROOT
			}
			1516 = {
				is_strongest_trade_power = ROOT
			}
		}
		effect = {
			custom_tooltip = gc_cas_spa_potosi_tt
			hidden_effect = {
				if = {
					limit = {
						any_subject_country = {
							OR = {
								is_subject_of_type = colony
								is_subject_of_type = crown_colony
								is_subject_of_type = private_enterprise
								is_subject_of_type = self_governing_colony
							}
							owns = 809
						}
					}
					every_subject_country = {
						limit = {
							owns = 809
						}
						809 = {
							prev_move_capital_effect = yes
						}
					}
				}
			}
			if = {
				limit = {
					has_dlc = "Leviathan"
				}
				795 = {
					set_great_project_tier_2 = {
						type = potosi
					}
				}
			}
			else = {
				795 = {
					add_province_modifier = {
						name = "spa_rb_gold_rush"
						duration = 5475
					}
				}
			}
			2946 = {
				add_province_modifier = {
					name = "spa_rb_gold_rush"
					duration = 5475
				}
			}
			2941 = {
				add_province_modifier = {
					name = "spa_rb_gold_rush"
					duration = 5475
				}
			}
			804 = {
				add_province_modifier = {
					name = "spa_rb_gold_rush"
					duration = 5475
				}
			}
		}
	}
	
	spa_new_world_silver = {
		icon = mission_african_gold
		required_missions = { gc_cas_spa_new_spain2 gc_cas_spa_potosi2 }
		position = 13
		provinces_to_highlight = {
			country_or_non_sovereign_subject_holds = ROOT 
			trade_goods = gold 
			NOT = { base_production = 10 }
		}
		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				trade_goods = gold 
				base_production = 10
				value = 10
			}
		}
		effect = {
			custom_tooltip = spa_every_gold_province_tt
			tooltip = {
				add_province_modifier = {
					name = spa_spanish_silver_and_gold_modifier
					duration = -1 
				} 
			}
			hidden_effect = {
				every_province = {
					limit = { 
						country_or_non_sovereign_subject_holds = ROOT 
						trade_goods = gold 
					}
					add_province_modifier = {
						name = spa_spanish_silver_and_gold_modifier
						duration = -1 
					}
				}
			}
		}
	}
}

dom_cas_missions_3 = {
	slot = 3
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = CAS 
			tag = SPA 
		}
		NOT = { was_tag = ARA }
	}
	has_country_shield = yes
	
	gc_cas_spa_reconquista_three2 = {
		icon = mission_have_two_subjects
		required_missions = { spa_infantes_aragon }
		position = 2
		provinces_to_highlight = {
			OR = {
				area = valencia_area
				area = catalonia_area
				area = aragon_area
			}
			NOT = { owned_by = 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
			}
		}

		effect = {
			if = {
				limit = {
					exists = POR
					valid_for_personal_unions_trigger = yes
					POR = {
						valid_for_personal_unions_trigger = yes
						NOT = { 
							alliance_with = ROOT 
							marriage_with = ROOT 
						}
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = POR
				}
			}
			else_if = {
				limit = {
					exists = POR
					valid_for_personal_unions_trigger = yes
					POR = {
						valid_for_personal_unions_trigger = yes
						OR = {
							alliance_with = ROOT 
							marriage_with = ROOT 
						}
					}
				}
				custom_tooltip = spa_pu_por_tt
			}		
			if = {
				limit = {
					exists = NAP
					valid_for_personal_unions_trigger = yes
					NAP = {
						valid_for_personal_unions_trigger = yes
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = NAP
				}
				sicily_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				western_sicily_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				calabria_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				apulia_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				naples_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				120 = {
					if = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
					add_permanent_claim = ROOT
					}
				}
			}
			else = {
				sicily_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				western_sicily_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				calabria_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				apulia_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				naples_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				120 = {
					if = {
						limit = {
							NOT = { is_core = ROOT }
							NOT = { is_permanent_claim = ROOT }
						}
						add_permanent_claim = ROOT
					}
				}
			}
		}
	}
	
	gc_cas_spa_italian_ambition2 = {
		icon = mission_italian_condottiere
		required_missions = { gc_cas_spa_reconquista_three2 }
		position = 3
		provinces_to_highlight = {
			OR = {
				area = sicily_area
				area = western_sicily_area
				area = calabria_area
				area = apulia_area
				area = naples_area
				province_id = 120
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}

		trigger = {
			OR = {
				NAP = {
					junior_union_with = ROOT
				}
				AND = {
					sicily_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					western_sicily_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					calabria_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					apulia_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					naples_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					120 = {
						country_or_non_sovereign_subject_holds = ROOT
					}
				}
			}
		}

		effect = {
			add_country_modifier = {
				name = "spa_rb_italian_ambition_mod"
				duration = 5475
			}
			tuscany_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			lombardy_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			po_valley_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			wallonia_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			flanders_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			brabant_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			hidden_effect = {
				remove_casus_belli = {
					type = cb_restore_personal_union
					target = NAP
				}
			}
		}
	}
	
	gc_cas_spa_italian_ambition_22 = {
		icon = mission_italian_conquest
		required_missions = { gc_cas_spa_italian_ambition2 }
		position = 4
		provinces_to_highlight = {
			OR = {
				area = tuscany_area
				area = lombardy_area
				area = po_valley_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}

		trigger = {
			tuscany_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			lombardy_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			po_valley_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "spa_milan"
				duration = 7300
			}
			
			change_ruler_stat = {
				type = adm
				amount = 1
			}
			change_ruler_stat = {
				type = dip
				amount = 1
			}
			change_ruler_stat = {
				type = mil
				amount = 1
			}
		}
	}
	
	spa_spanish_road = {
		icon = spa_spanish_road
		required_missions = { gc_cas_spa_italian_ambition_22 gc_spa_austrian_union2 }
		position = 5
		provinces_to_highlight = { 
			OR = {
				province_id = 101
				province_id = 205
				province_id = 193
				province_id = 94
			}
			OR = { 	
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				NOT = { controlled_by = ROOT }
				owner = { NOT = { gives_military_access_to = ROOT } }
			}
		}
		trigger = {
			OR = { 
				num_of_transport = 50 
				AND = {
					101 = { 
						OR = { 	
							country_or_non_sovereign_subject_holds = ROOT 
							controlled_by = ROOT 
							owner = { gives_military_access_to = ROOT }
						}
					}
					205 = { 
						OR = { 	
							controlled_by = ROOT 
							country_or_non_sovereign_subject_holds = ROOT 
							owner = { gives_military_access_to = ROOT }
						}
					}
					193 = { 
						OR = { 	
							controlled_by = ROOT 
							country_or_non_sovereign_subject_holds = ROOT 
							owner = { gives_military_access_to = ROOT }
						}
					}
					94 = { 
						OR = { 	
							controlled_by = ROOT 
							country_or_non_sovereign_subject_holds = ROOT 
							owner = { gives_military_access_to = ROOT }
						}
					}
				}
			}
		}
		effect = {
			low_countries_region = {
				limit = { 
					NOT = { is_core = ROOT } 
					NOT = { owned_by = ROOT } 
				}
				add_permanent_claim = ROOT 
			}
			add_country_modifier = {
				name = spa_long_range_logistics_modifier
				duration = 7300
			}
		}
	}
	
	gc_spa_spanish_netherlands2 = {
		icon = mission_spanish_netherlands
		required_missions = { spa_spanish_road }
		position = 6

		provinces_to_highlight = {
			region = low_countries_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}

		trigger = {
			low_countries_region = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
				religion = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = spa_victory_netherlands_modifier
				duration = -1 
			}
		}
	}
	
	gc_spa_hre2 = {
		icon = spa_universal_monarchy
		required_missions = { gc_spa_invade_england2 gc_spa_spanish_netherlands2 spa_fecho_imperio spa_system_councils spa_reform_tercios }

		trigger = {
			OR = {
				ROOT = {
					is_emperor = yes
					if = {
						limit = {
							has_dlc = "Emperor"
						}
						hre_reform_passed = emperor_erbkaisertum
					}
					else = {
						hre_reform_passed = erbkaisertum
					}
				}
				AND = {
					NOT = { hre_size = 1 }
					NOT = { exists = HLR }
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = spa_universal_empire_modifier
				duration = -1 
			}
			add_prestige_or_monarch_power = { amount = 50 } 
		}
	}
}

dom_cas_missions_3_b = {
	slot = 3
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			AND = {
				was_tag = ARA 
				tag = SPA 
			}
			tag = ARA 
		}
	}
	has_country_shield = yes
	
	dom_ara_remensa_war = {
		icon = dom_ara_remensa_war
		required_missions = {  }
		position = 2
		provinces_to_highlight = {
			area = catalonia_area 
			OR = {
				NOT = { owned_by = ROOT }
				local_autonomy_above_min = 10 
			}
		}
		trigger = {
			custom_trigger_tooltip = {
				tooltip = ara_had_remensa_war_event_tt
				has_country_flag = ara_remensa_flag
			}
			catalonia_area = {
				type = all
				owned_by = ROOT 
				NOT = { local_autonomy_above_min = 10 }
			}
			stability = 1 
			NOT = { num_of_rebel_armies = 1 }
			NOT = { num_of_rebel_controlled_provinces = 1 }
		}
		effect = {
			add_country_modifier = {
				name = ara_governmental_restructuring_modifier
				duration = 7300
			}
			change_government_reform_progress = 100 
		}
	}
	
	dom_ara_catalan_nobility = {
		icon = end_the_habsburgs
		required_missions = { dom_ara_remensa_war }
		position = 3
		trigger = { 
			if = {
				limit = { government = monarchy }
				catalonia_area = {
					type = all 
					NOT = { local_autonomy_above_min = 10 }
					owned_by = ROOT 
				}
				NOT = { 
					estate_influence = {
						estate = estate_nobles 
						influence = 40
					}
				}
			}
			crown_land_share = 60 
			legitimacy_equivalent = 85 
			OR = {
				stability = 3 
				full_idea_group = court_ideas 
				full_idea_group = economic_ideas 
				monthly_adm = 10 
			}
		}
		effect = {
			if = {
				limit = { government = monarchy }
				add_country_modifier = {
					name = ara_crushed_the_catalan_estates_modifier
					duration = 9125
				}
			}
			else = {
				add_country_modifier = {
					name = ara_unshackled_modifier
					duration = -1 
				}
			}
		}
	}
	
	gc_ara_constantinople2 = {
		icon = mission_city_of_the_world's_desire
		required_missions = { dom_ara_med_ambitions }
		position = 4
		provinces_to_highlight = {
			OR = {
				area = thrace_area
				area = macedonia_area
				province_id = 1320
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		trigger = {
			1320 = {
				is_strongest_trade_power = ROOT
			}
			thrace_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			macedonia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_mercantilism = 3
			hudavendigar_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			aydin_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			cukurova_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			kastamonu_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			151 = {
				add_base_tax = 2 
				add_base_production = 2 
				add_base_manpower = 2 
				change_religion = ROOT 
				change_culture = ROOT 
			}
			if = {
				limit = { religion = catholic }
				add_papal_influence = 50
				151 = { add_cardinal = yes }
			}
			else = {
				add_patriarch_authority = 0.1 
				add_church_power = 50 
				add_fervor = 25 
			}
		}
	}
	
	gc_ara_tunis2 = {
		icon = mission_conquer_tunis
		required_missions = { gc_ara_barbary_ports2 }
		position = 5
		provinces_to_highlight = {
			OR = {
				area = kabylia_area
				area = tunisia_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		trigger = {
			kabylia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			tunisia_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "ara_ship_trade_modifier"
				duration = 7300
			}
			delta_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			cyrenaica_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_ara_industry2 = {
		icon = mission_industria_sedera
		required_missions = { gc_ara_banking2  }
		position = 5
		trigger = {
			num_of_owned_provinces_with = {
				value = 10
				has_manufactory_trigger = yes
			}
			OR = {
				production_leader = {
					trade_goods = wine
					value = yes
				}
				production_leader = {
					trade_goods = glass
					value = yes
				}
				production_leader = {
					trade_goods = paper
					value = yes
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "industria_sedera"
				duration = 7300
			}
			add_ruler_personality = industrious_personality 
		}
	}
	
	gc_ara_golden_age2 = {
		icon = mission_golden_century
		required_missions = { gc_ara_italy2 gc_ara_occitania2 gc_ara_industry2 gc_ara_valencian_silk2 gc_ara_trade_guilds2 }
		trigger = {
			prestige = 80
			share_of_starting_income = 10
		}
		effect = {
			add_country_modifier = {
				name = "ara_golden_age"
				duration = 36500
			}
		}
	}
}

dom_cas_missions_3_c = {
	slot = 3
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = { 
			tag = CAS 
			tag = SPA 
		}
		
	}
	has_country_shield = yes
	
	gc_cas_spa_caribbean_discovery2 = {
		icon = explore_caribbean
		required_missions = { gc_cas_spa_plus_ultra2 }
		position = 8
		provinces_to_highlight = {
			colonial_region = colonial_the_carribean 
			NOT = { has_discovered = ROOT }
		}
		trigger = {
			if = {
				limit = {
					is_random_new_world = yes
				}
				custom_trigger_tooltip = {
					tooltip = cas_carib_rnw
					any_owned_province = {
						continent = new_world
					}
				}
			}
			else = {
				custom_trigger_tooltip = {
					tooltip = miss_discover_caribbean
					colonial_the_carribean = { has_discovered = ROOT }
				}
			}
		}

		effect = {
			create_conquistador = { tradition = 75 } 
			add_country_modifier = {
				name = "spa_hispaniola_discovered"
				duration = 5475
			}
		}
	}
	
	gc_cas_spa_caribbean_colony2 = {
		icon = mission_iberian_conquistador
		required_missions = { gc_cas_spa_caribbean_discovery2 }
		position = 9
		provinces_to_highlight = {
			colonial_region = colonial_the_carribean
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = ROOT
		}

		trigger = {
			custom_trigger_tooltip = {
				tooltip = miss_colonize_caribbean
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					value = 1
					colonial_region = colonial_the_carribean
					is_city = yes
				}
			}
		}

		effect = {
			add_prestige_or_monarch_power = { amount = 20 }
			add_country_modifier = {
				name = "the_unknown_frontier"
				duration = 5475
			}
		}
	}
	
	gc_cas_spa_mayans2 = {
		icon = mission_mayan_conquest
		required_missions = { gc_cas_spa_hispaniola2 }
		position = 11
		provinces_to_highlight = {
			region = central_america_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = ROOT
		}
		trigger = {
			custom_trigger_tooltip = {
				tooltip = spa_mayan_conquest_tooltip
				central_america_region = {
					type = all
					OR = {
						is_empty = yes
						country_or_non_sovereign_subject_holds = ROOT
					}
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = spa_transatlantic_migrations_modifier
				duration = 9125 
			}
		}
	}
	
	gc_cas_spa_california2 = {
		icon = mission_colonize_california
		required_missions = { gc_cas_spa_new_spain2 }
		position = 13
		provinces_to_highlight = {
			colonial_region = colonial_california
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = ROOT
		}

		trigger = {
			if = {
				limit = {
					has_dlc = "Golden Century"
					religion = catholic
				}
				2021 = {
					country_or_non_sovereign_subject_holds = ROOT
					has_holy_order_trigger = yes
				}
			}
			else = {
				2021 = {
					country_or_non_sovereign_subject_holds = ROOT
					religion = ROOT
				}
			}
			4637 = {
				country_or_non_sovereign_subject_holds = ROOT
				religion = ROOT
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 5
				colonial_region = colonial_california
				is_city = yes
			}
		}
		effect = {
			add_dip_power = 100
			2021 = {
				add_base_tax = 3
			}
			4637 = { add_center_of_trade_level = 1  add_base_production = 4 } 
			colonial_california = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
}

dom_cas_missions_4 = {
	slot = 4
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = CAS 
			tag = SPA 
		}
		NOT = { was_tag = ARA } 
	}
	has_country_shield = yes
	
	spa_infantes_aragon = {
		icon = spa_infantes_aragon
		required_missions = { }
		position = 1
		trigger = {
			if = {
				limit = { 
					tag = CAS 
					NOT = { is_year = 1470 }
				}
				custom_trigger_tooltip = {
					tooltip = ended_infantes_disaster_tt
					OR = { 
						has_country_flag = cas_royalist_flag 
						has_country_flag = cas_infantes_flag 
					}
					has_country_flag = ended_infantes_disaster_flag
				}
			}
			else = { 
				grown_by_development = 100 
			}
			if = {
				limit = { ai = no }
				stability = 1 
			}
		}
		effect = { 
			if = {
				limit = { has_disaster = infantes_of_aragon }
				end_disaster = infantes_of_aragon
			}
			
			custom_tooltip = spa_royalist_tt
			tooltip = {
				add_country_modifier = {
					name = spa_royalists_victorious_modifier
					duration = 9125
				}
				change_ruler_stat = {
					type = adm
					amount = 1
				}
				change_ruler_stat = {
					type = dip
					amount = 1
				}
				change_ruler_stat = {
					type = mil
					amount = 1
				}
			}
			
			custom_tooltip = spa_infantes_tt
			tooltip = {
				add_ruler_modifier = {
					name = spa_victorious_infantes_modifier
					duration = 5475
				}
				add_estate_influence_modifier = {
					estate = estate_nobles
					desc = est_val_infantes_victorious
					influence = 20
					duration = 9125
					add = yes
				}
				if = { 
					limit = {
						exists = ARA
						valid_for_personal_unions_trigger = yes
						ARA = {
							valid_for_personal_unions_trigger = yes
						}
					}
					add_casus_belli = {
						type = cb_restore_personal_union
						months = 300
						target = ARA
					}
				}
				if = {
					limit = { 
						NAV = { is_subject = no }
					}
					add_casus_belli = {
						type = cb_vassalize_mission
						months = 300
						target = NAV
					}
				}
			}
			hidden_effect = {
				if = {
					limit = { has_country_flag = cas_royalist_flag }
					add_country_modifier = {
						name = spa_royalists_victorious_modifier 
						duration = 9125
					}
					change_ruler_stat = {
						type = adm
						amount = 1
					}
					change_ruler_stat = {
						type = dip
						amount = 1
					}
					change_ruler_stat = {
						type = mil
						amount = 1
					}
				}
				else = {
					add_ruler_modifier = {
						name = spa_victorious_infantes_modifier
						duration = 5475
					}
					add_estate_influence_modifier = {
						estate = estate_nobles
						desc = est_val_infantes_victorious
						influence = 20
						duration = 9125
						add = yes
					}
					if = { 
						limit = {
							exists = ARA
							valid_for_personal_unions_trigger = yes
							ARA = {
								valid_for_personal_unions_trigger = yes
							}
						}
						add_casus_belli = {
							type = cb_restore_personal_union
							months = 300
							target = ARA
						}
					}
					if = {
						limit = { 
							NAV = { is_subject = no }
						}
						add_casus_belli = {
							type = cb_vassalize_mission
							months = 300
							target = NAV
						}
					}
				}
			}
		}
	}
	
	gc_cas_spa_reconquista_two2 = {
		icon = mission_cannons_firing
		required_missions = { spa_infantes_aragon }
		position = 2
		provinces_to_highlight = {
			OR = {
				area = beieras_area
				area = alentejo_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT  }
		}

		trigger = {
			beieras_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT 
			}
			alentejo_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT 
			}
		}

		effect = {
			add_prestige_or_monarch_power = { amount = 25 }
			add_stability_or_adm_power = yes 
			227 = { add_base_production = 2 } 
			231 = { add_base_production = 2 }
		}
	}
	
	spa_handle_austria = {
		icon = join_the_empire
		required_missions = { gc_cas_spa_reconquista_three2 gc_cas_spa_reconquista_two2  }
		position = 3
		provinces_to_highlight = { }
		trigger = {
			HAB = { 
				NOT = { army_size = ROOT } 
				NOT = { total_development = ROOT } 
			}
			OR = { 
				power_projection = 50 
				is_great_power = yes 
			}
		}	
		effect = { 
			add_country_modifier = {
				name = spa_bid_for_the_hab_crown_modifier
				duration = 5475
			}
			if = { 
				limit = {
					exists = HAB
					valid_for_personal_unions_trigger = yes
					HAB = {
						valid_for_personal_unions_trigger = yes
					}
				}
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = HAB
				}
			}
			else = {
				tirol_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				austria_proper_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
				inner_austria_area = {
					limit = {
						NOT = { is_core = ROOT }
						NOT = { is_permanent_claim = ROOT }
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	
	gc_spa_austrian_union2 = {
		icon = mission_the_austrian_succession
		required_missions = { spa_handle_austria }
		position = 4
		provinces_to_highlight = {
			OR = {
				area = inner_austria_area
				area = austria_proper_area
				area = tirol_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}

		trigger = {
			inner_austria_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			austria_proper_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			tirol_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "spanish_imperial_ambition"
				duration = 7300
			}
		}
	}
	
	spa_fecho_imperio = {
		icon = mission_imperial_spain
		required_missions = { gc_spa_austrian_union2 spa_new_capital }
		position = 6
		trigger = {
			total_development = 2000 
			if = { 
				limit = { 
					OR = { 
						has_dlc = "Rights of Man" 
						has_dlc = "Emperor" 
					}
				}
				NOT = { great_power_rank = 2 }
			}
			if = { 
				limit = { has_dlc = "Mandate of Heaven" }
				OR = { 
					in_golden_age = yes 
					has_had_golden_age = yes 
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = spa_universal_monarchy_modifier
				duration = -1 
			}
			if = {
				limit = { has_had_golden_age = yes } 
				reset_golden_age = yes 
			}
			else_if = {
				limit = { in_golden_age = yes } 
				extend_golden_age = 360
			}
			else = { 
				add_prestige_or_monarch_power = { amount = 100 }
			}
		}
	}
}

dom_cas_missions_4_b = {
	slot = 4
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			AND = {
				was_tag = ARA 
				tag = SPA 
			}
			tag = ARA 
		}
	}
	has_country_shield = yes
	
	gc_ara_navy2 = {
		icon = mission_aragonese_navy
		required_missions = {  }
		position = 1
		trigger = {
			naval_forcelimit = 30
			navy_size_percentage = 0.9
			num_of_admirals = 1
		}
		effect = {
			add_country_modifier = {
				name = ara_med_claim_modifier
				duration = 5475
			}
			capital_scope = {
				add_building = shipyard 
				add_base_production = 1
			}
			barbary_coast_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			algiers_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	dom_ara_med_ambitions = {
		icon = mission_rb_mediterranean_authority
		required_missions = { gc_ara_navy2 gc_ara_naples2 }
		position = 3
		trigger = {
			navy_size = 50
			sailors_percentage = 0.5
			num_of_galley = 20 
			if = {
				limit = { has_dlc = "Rule Britannia" }
				has_naval_doctrine = any 
			}
		}
		effect = {
			add_country_modifier = {
				name = mediterranean_ambition
				duration = 9125
			}
			morea_area = {
				limit = { 
					NOT = { is_core = ROOT } 
				}
				add_permanent_claim = ROOT 
			}
			northern_greece_area = {
				limit = { 
					NOT = { is_core = ROOT } 
				}
				add_permanent_claim = ROOT 
			}
			3003 = { add_permanent_claim = ROOT }
			macedonia_area = {
				limit = { 
					NOT = { is_core = ROOT } 
				}
				add_permanent_claim = ROOT 
			}
			thrace_area = {
				limit = { 
					NOT = { is_core = ROOT } 
				}
				add_permanent_claim = ROOT 
			}
		}
	}
	
	gc_ara_athens2 = {
		icon = mission_assemble_an_army
		required_missions = { dom_ara_med_ambitions }
		position = 4
		provinces_to_highlight = {
			OR = {
				area = morea_area
				area = northern_greece_area
				province_id = 3003
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		trigger = {
			morea_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			northern_greece_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			3003 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_navy_tradition = 20
			create_admiral = { tradition = 75 }  
			albania_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_ara_banking2 = {
		icon = mission_taula_de_canvi
		required_missions = { }
		position = 5
		trigger = {
			NOT = { num_of_loans = 1 }
			treasury = 1000
			num_of_owned_provinces_with = {
				has_tax_building_trigger = yes 
				value = 5 
			}
		}
		effect = {
			add_country_modifier = {
				name = "taula_de_canvi"
				duration = 7300
			}
			capital_scope = { add_base_tax = 3 } 
		}
	}
	
	gc_ara_valencian_silk2 = {
		icon = mission_valencian_silk
		required_missions = { gc_ara_banking2 }
		position = 6
		provinces_to_highlight = {
			province_id = 220
		}
		trigger = {
			owns_core_province = 220
			if = {
				limit = {
					has_dlc = "Dharma"
				}
				220 = {
					OR = { 
						province_has_center_of_trade_of_level = 3
						development = 20
					}
				}
			}
			else = {
				220 = {
					development = 20
				}
			}
		}
		effect = {
			220 = {
				change_trade_goods = silk
				add_province_modifier = {
					name = "llotja_de_la_seda"
					duration = -1
				}
			}
		}
	}
	
}

dom_cas_missions_4_c = {
	slot = 4
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = { 
			tag = CAS 
			tag = SPA 
		}
		
	}
	has_country_shield = yes
	
	gc_cas_spa_plus_ultra2 = {
		icon = mission_plus_ultra
		required_missions = { }
		position = 7
		provinces_to_highlight = {
			province_id = 4565
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}
		trigger = {
			num_of_explorers = 1
			custom_trigger_tooltip = {
				tooltip = spa_plus_ultra_tooltip
				OR = {
					owns_core_province = 4565
					any_owned_province = {
						OR = {
							continent = north_america
							continent = south_america
							continent = new_world
						}
					}
				}
			}
		}
		effect = {
			add_country_modifier = {
				name = "spa_plus_ultra"
				duration = 7300
			}
			if = { 
				limit = { 
					has_dlc = "Rights of Man" 
					NOT = { num_of_ruler_traits = { amount = 3 } }
				}				
				add_ruler_personality = expansionist_personality
			}
			else = { add_dip_power = 50 }
		}
	}
	
	dom_castile_exploration_ideas = {
		icon = imperial_navy
		required_missions = { gc_cas_spa_plus_ultra2 }
		position = 8
		
		trigger = { 
			OR = { 
				full_idea_group = exploration_ideas
				full_idea_group = expansion_ideas
			}
		}
	
		effect = {
			if = {
				limit = { has_dlc = "Rights of Man" }
				custom_tooltip = por_more_likely_to_get_expansionist_tt
				set_country_flag = por_more_likely_to_get_expansionist_flag 
				change_ruler_stat = {
					type = dip
					amount = 1
				}
			}
			else = {
				change_ruler_stat = {
					type = dip
					amount = 2
				}
				add_prestige_or_monarch_power = { amount = 10 }
			}
			
			if = {
				limit = { 
					POR = { 
						NOT = { mission_completed = dom_portugal_exploration_ideas }
					}
				}
				custom_tooltip = cas_race_portugal_event_tt
				country_event = { id = flavor_spa.199 }
			}
		}
	}
	
	dom_castile_circumnavigation = {
		icon = mission_explore_the_world
		required_missions = { dom_castile_exploration_ideas }
		position = 9
		
		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
				}
			}
		}
	
		effect = {
			if = {
				limit = { has_country_flag = circumnavigation_first }
				add_country_modifier = {
					name = por_first_circumnavigation_modifier
					duration = -1 
				}
			}
			else = {
				add_country_modifier = {
					name = por_first_circumnavigation_modifier
					duration = 9125
				}
			}
		}
	}
	
	gc_cas_spa_hispaniola2 = {
		icon = mission_claim_hispaniola
		required_missions = { gc_cas_spa_caribbean_colony2 }
		position = 10
		provinces_to_highlight = {
			OR = {
				AND = {
					OR = {
						area = hispaniola_area
						area = dominica_area
					}
					NOT = { country_or_non_sovereign_subject_holds = ROOT }

				}
				province_id = 490
			}
			has_discovered = ROOT
		}

		trigger = {
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				490 = {
					country_or_non_sovereign_subject_holds = ROOT
					OR = {
						has_building = temple
						has_building = cathedral
					}
				
				}
			}
			else = {
				490 = {
					country_or_non_sovereign_subject_holds = ROOT
				}
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 5
				OR = {
					area = hispaniola_area
					area = dominica_area
				}
				is_city = yes
			}
		}
		effect = {
			define_conquistador = {
				shock = 5
				fire = 5
				manuever = 6
				siege = 1
				name = "Hern�n Cort�s"
			}
			490 = {
				add_base_production = 3
				if = {
					limit = {
						NOT = {
							trade_goods = sugar
						}
					}
					change_trade_goods = sugar
				}
			}
			
			central_america_region = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_new_spain2 = {
		icon = mission_kingdom_of_new_spain
		required_missions = { gc_cas_spa_aztecs2 gc_cas_spa_mayans2 }
		position = 12
		provinces_to_highlight = {
			region = mexico_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = ROOT
		}

		trigger = {
			if = {
				limit = {
					has_dlc = "Golden Century"
					religion = catholic
				}
				custom_trigger_tooltip = {
					tooltip = mexico_holy_order_tooltip
					num_of_states_owned_or_owned_by_non_sovereign_subjects_with = {
						has_holy_order_trigger = yes
						region = mexico_region
						value = 5
					}
				}
			}
			else = {
				custom_trigger_tooltip = {
					tooltip = mexico_holy_order_alternative_tooltip
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						religion = ROOT
						region = mexico_region
						value = 25
					}
				}
			}
			mexico_region = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "viceroyalty_of_new_spain"
				duration = -1
			}
			if = {
				limit = {
					any_subject_country = {
						OR = {
							is_subject_of_type = colony
							is_subject_of_type = crown_colony
							is_subject_of_type = private_enterprise
							is_subject_of_type = self_governing_colony
						}
						owns = 852
					}
					852 = { is_capital = no }
				}
				every_subject_country = {
					limit = {
						owns = 852
					}
					852 = {
						prev_move_capital_effect = yes
					}
				}
			}
			west_florida_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
					is_empty = no
				}
				add_permanent_claim = ROOT
			}
			california_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
					is_empty = no
				}
				add_permanent_claim = ROOT
			}
			mississippi_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
					is_empty = no
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_florida2 = {
		icon = mission_colonize_florida
		required_missions = { gc_cas_spa_new_spain2 }
		position = 13

		provinces_to_highlight = {
			OR = {
				region = southeast_america_region
				area = west_florida_area
			}
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				NOT = { fort_level = 3 }
			}
			has_discovered = ROOT
		}

		trigger = {
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 3
				OR = {
					region = southeast_america_region
					area = west_florida_area
				}
				fort_level = 3
			}
		}
		effect = {
			add_mil_power = 100
			custom_tooltip = fortified_florida_tooltip
			hidden_effect = {
				every_province = {
					limit = {
						OR = {
							owned_by = ROOT
							owner = {
								is_subject_of = ROOT
							}
						}
						OR = {
							region = southeast_america_region
							area = west_florida_area
						}
						fort_level = 3
					}
					add_province_modifier = {
						name = "fortified_florida_modifier"
						duration = -1
					}
				}
			}
		}
	}
}

dom_cas_missions_5 = {
	slot = 5
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = CAS 
			tag = SPA 
		}
		NOT = { was_tag = ARA } 
	}
	has_country_shield = yes
	
	spa_reinforce_royal_authority = {
		icon = dreams_of_grandeur
		required_missions = { spa_infantes_aragon }
		position = 2
		trigger = { 
			OR = {
				custom_trigger_tooltip = {
					tooltip = spa_had_cas_civil_war_tt
					has_country_flag = spa_cas_ended_civil_war_flag
				}
				is_year = 1480 
				NOT = { 
					estate_influence = {
						estate = estate_nobles
						influence = 40
					}
				}
			}
			OR = {
				crown_land_share = 40
				estate_loyalty = {
					estate = estate_nobles 
					loyalty = 60 
				}
			}
		}	
		effect = {
			add_country_modifier = {
				name = spa_royal_authority_restored_modifier
				duration = 7300
			}
			if = { 
				limit = { has_estate = estate_nobles } 
				add_estate_loyalty_modifier = {
					estate = estate_nobles
					desc = estate_nobles_crown_authority_modifier
					loyalty = 10
					duration = 7300
				}
			}
		}
	}
	
	spa_law_and_order = {
		icon = mission_war_for_the_crown
		required_missions = { spa_reinforce_royal_authority }
		position = 3
		provinces_to_highlight = {
			OR = {
				province_id = 215 
				province_id = 223
			}
			OR = {
				num_of_times_expanded_infrastructure = 1 
				num_of_times_improved = 3
				has_courthouse_building_trigger = no
			}
		}
		trigger = {
			if = {
				limit = { ai = no }
				215 = {	
					country_or_non_sovereign_subject_holds = ROOT 
					OR = {
						num_of_times_expanded_infrastructure = 1 
						num_of_times_improved = 3
						has_courthouse_building_trigger = yes
					}
				}
				223 = {	
					country_or_non_sovereign_subject_holds = ROOT 
					OR = {
						num_of_times_expanded_infrastructure = 1 
						num_of_times_improved = 3
						has_courthouse_building_trigger = yes
					}
				}
				stability = 1
			}
			else = {
				215 = {	
					country_or_non_sovereign_subject_holds = ROOT 
					has_courthouse_building_trigger = yes
				}
				223 = {	
					country_or_non_sovereign_subject_holds = ROOT 
					has_courthouse_building_trigger = yes
				}
				stability = 0 
			} 
		}
		effect = {
			215 = { 
				upgrade_building = { government = yes }
				add_province_modifier = {
					name = spa_valladolid_court_modifier 
					duration = -1 
				}
			}
			223 = {
				upgrade_building = { government = yes }
				add_province_modifier = {
					name = spa_granada_court_modifier 
					duration = -1 
				}
			}
		}
	}
	
	spa_economic_reforms = {
		icon = mission_rb_monopolize_the_channel
		required_missions = { }
		position = 4
		trigger = {
			if = {
				limit = { ai = no } 
				OR = { 
					treasurer = 3 
					full_idea_group = economic_ideas 
				}
				OR = { 
					trade_income_percentage = 0.5
					full_idea_group = trade_ideas 
					estate_loyalty = {
						estate = estate_burghers 
						loyalty = 60 
					}
				}
				share_of_starting_income = 2
			}
			else = {
				has_adm_advisor = yes
				has_dip_advisor = yes 
				estate_loyalty = {
					estate = estate_burghers 
					loyalty = 60 
				}
				share_of_starting_income = 1.5
			}
		}
		effect = {
			country_event = { id = flavor_spa.22 }
		}
	}
	
	spa_new_capital = {
		icon = spa_new_capital
		required_missions = { spa_economic_reforms }
		position = 5
		provinces_to_highlight = {
			OR = {
				province_id = 217
				AND = {
					owned_by = ROOT 
					is_capital = yes
				}
			}
		}
		trigger = {
			OR = { 
				custom_trigger_tooltip = {
					tooltip = spa_recent_change_tt
					217 = { has_province_modifier = solo_madrid_es_corte } 
				}
				if = {
					limit = { ai = no } 
					capital_scope = { num_of_times_improved = 12 }
				}
				else = {
					capital_scope = { num_of_times_improved = 4 }
				}
			}
			if = { 
				limit = { has_dlc = "Leviathan" ai = no  } 
				capital_scope = { num_of_times_expanded_infrastructure = 1 }
			}
			capital_scope = { 
				OR = {
					has_building = state_house 
					num_of_buildings_in_province = 5
				}
			}
			if = { 
				limit = { 
					217 = { is_capital_of = ROOT } 
					has_dlc = "Leviathan"
					ai = no 
				} 
				217 = { 
					has_great_project = {
						type = el_escorial
						tier = 1 
					}
				}
			}
		}
		effect = { 
			capital_scope = { 
				change_trade_goods = paper
			}
			if = { 
				limit = { 
					217 = { is_capital_of = ROOT }
				}
				country_event = { id = flavor_spa.23 }
			}
			else = { 
				capital_scope = {
					add_base_tax = 2 
					add_base_production = 2 
					add_base_manpower = 2 
				}
			}
		}
	}
	
	spa_system_councils = {
		icon = hispanic_monarchy
		required_missions = { spa_new_capital }
		position = 6
		trigger = { 
			reform_level = 3
			OR = { 
				full_idea_group = administrative_ideas 
				adm = 6 
				monthly_adm = 15 
			}
			crown_land_share = 50
		}
		effect = {
			add_government_reform = system_of_councils_reform 
		}
	}
}

dom_cas_missions_5_b = {
	slot = 5
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			AND = {
				was_tag = ARA 
				tag = SPA 
			}
			tag = ARA 
		}
	}
	has_country_shield = yes
	
	gc_ara_naples2 = {
		icon = mission_unite_home_region
		required_missions = {  }
		position = 2
		provinces_to_highlight = {
			OR = {
				area = calabria_area
				area = apulia_area
				area = naples_area
				province_id = 120 
			}
			NOT = {
				owned_by = ROOT
			}
		}
		trigger = {
			calabria_area = {
				type = all
				owned_by = ROOT
			}
			apulia_area = {
				type = all
				owned_by = ROOT
			}
			naples_area = {
				type = all
				owned_by = ROOT
			}
			120 = {
				OR = { 
					NOT = { owned_by = NAP }
					owned_by = ROOT 
				}
			}
		}
		effect = {
			121 = {
				add_base_tax = 2
				add_base_manpower = 2
				add_base_production = 2
			}
			provence_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			morea_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			northern_greece_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			3003 = {
				if = {
					limit = {
						NOT = {
							is_permanent_claim = ROOT
							is_core = ROOT
						}
					}
					add_permanent_claim = ROOT
				}
			}
		}
	}
	
	gc_ara_provence2 = {
		icon = mission_humiliate_provence
		required_missions = { gc_ara_naples2 }
		position = 3
		provinces_to_highlight = {
			area = provence_area
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		trigger = {
			provence_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			
		}
		effect = {
			if = {
				limit = { 
					NOT = { mission_completed = gc_ara_genoa2 }
				}
				savoy_dauphine_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				languedoc_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				guyenne_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
				pyrenees_area = {
					limit = {
						NOT = { is_permanent_claim = ROOT }
						NOT = { is_core = ROOT	}
					}
					add_permanent_claim = ROOT
				}
			}
			else = {
				add_mil_power = 100 
				add_ruler_modifier = {
					name = ara_victory_over_provence_modifier
					duration = -1 
				}
			}
			4696 = {
				add_province_modifier = {
					name = "ara_toulon_dockyard"
					duration = -1
				}
			}
		}
	}
	
	gc_ara_barbary_ports2 = {
		icon = mission_combat_barbary_piracy
		required_missions = { dom_ara_med_ambitions }
		position = 4
		provinces_to_highlight = {
			OR = {
				area = barbary_coast_area
				area = algiers_area
			}
			NOT = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		
		trigger = {
			barbary_coast_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			algiers_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			add_country_modifier = {
				name = "refoming_barbary_pirates"
				duration = 7300
			}
			kabylia_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			tunisia_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			delta_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			cyrenaica_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_ara_alexandria2 = {
		icon = mission_occupy_alexandria
		required_missions = { gc_ara_barbary_ports2 }
		position = 5
		provinces_to_highlight = {
			OR = {
				area = delta_area
				area = cyrenaica_area
			}
			OR = {
				NOT = {
					country_or_non_sovereign_subject_holds = ROOT
				}
				province_id = 358
			}
		}
		
		trigger = {
			358 = {
				is_strongest_trade_power = ROOT
			}
			delta_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			cyrenaica_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}
		effect = {
			egypt_region = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			palestine_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT }
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			syria_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
			}
			
			add_country_modifier = {
				name = ara_maritime_administration_modifier
				duration = -1 
			}
		}
	}
	
	gc_ara_trade_guilds2 = {
		icon = mission_guilds_of_barcelona
		required_missions = { gc_ara_banking2 }
		position = 6
		provinces_to_highlight = {
			province_id = 213
		}
		trigger = {
			owns_core_province = 213
			if = {
				limit = {
					has_estate = estate_burghers
				}
				estate_loyalty = {
					estate = estate_burghers
					loyalty = 60
				}
				estate_influence = {
					estate = estate_burghers
					influence = 40
				}
				num_of_estate_privileges = {
					estate = estate_burghers
					value = 2
				}
			}
			else = {
				mercantilism = 20
			}
		}
		effect = {
			if = {
				limit = { 
					213 = { has_province_modifier = diamond_district }
				}
				213 = { 
					remove_province_modifier = diamond_district 
					add_province_modifier = {
						name = diamond_district2
						duration = -1 
					}
				}
			}
			else = {
				213 = {
					add_base_production = 3
					add_province_modifier = {
						name = "barcelona_guilds"
						duration = 7300
					}
				}
			}
		}
	}
}

dom_cas_missions_5_c = {
	slot = 5
	generic = no
	ai = yes
	potential_on_load = {
		has_dlc = "Domination"
	}
	potential = {
		has_dlc = "Domination"
		OR = {
			tag = CAS 
			tag = SPA 
		}
		
	}
	has_country_shield = yes
	
	gc_cas_spa_west_africa2 = {
		icon = mission_west_african_ports
		required_missions = {  }
		position = 7
		provinces_to_highlight = {
			OR = {
				AND = {
					region = guinea_region
					NOT = { country_or_non_sovereign_subject_holds = ROOT }
				}
				province_id = 1466
			}
			has_discovered = ROOT
		}

		trigger = {
			guinea_region = {
				owned_by = ROOT
			}
			1466 = {
				is_strongest_trade_power = ROOT
			}
		}
		effect = {
			add_mercantilism = 2
			
			add_country_modifier = {
				name = spa_invest_in_west_africa_modifier
				duration = 9125 
			}
		}
	}
	
	gc_cas_spa_discover_spice_islands2 = {
		icon = mission_sail_to_the_east_indies
		required_missions = { gc_cas_spa_west_africa2 gc_cas_spa_plus_ultra2 }
		position = 8
		trigger = {
			custom_trigger_tooltip = {
				tooltip = cas_spice_islands_tooltip
				moluccas_region = {
					type = all
					has_discovered = ROOT
				}
			}
		}
		effect = {
			mindanao_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			west_mindanao_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			visayas_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			palawan_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			luzon_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
			southern_luzon_area = {
				limit = {
					NOT = { is_core = ROOT }
					NOT = { is_permanent_claim = ROOT }
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_conquer_philippines2 = {
		icon = mission_las_islas_filipinas
		required_missions = { gc_cas_spa_discover_spice_islands2 }
		position = 9
		provinces_to_highlight = {
			OR = {
				area = mindanao_area
				area = west_mindanao_area
				area = visayas_area
				area = palawan_area
				area = luzon_area
				area = southern_luzon_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = ROOT
		}
		trigger = {
			southern_luzon_area = {
				type = all
				owned_by = ROOT
			}
			luzon_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			mindanao_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			west_mindanao_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			visayas_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			palawan_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			224 = { country_or_non_sovereign_subject_holds = ROOT }
		}
		effect = {
			224 = { change_trade_goods = cloves add_base_production = 3 } 
			southern_luzon_area = {
				limit = {
					owned_by = ROOT
				}
				change_religion = ROOT
			}
			luzon_area = {
				limit = {
					owned_by = ROOT
				}
				change_religion = ROOT
			}
			if = {
				limit = {
					has_dlc = "Dharma"
					656 = {
						NOT = {
							province_has_center_of_trade_of_level = 2
						}
					}
				}
				656 = {
					add_center_of_trade_level = 1
				}
			}
		}
	}
	
	gc_cas_spa_havana2 = {
		icon = mission_found_havana
		required_missions = { gc_cas_spa_caribbean_colony2 }
		position = 10
		provinces_to_highlight = {
			OR = {
				area = cuba_area
				area = east_cuba_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = ROOT
		}
		trigger = {
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				484 = {
					country_or_non_sovereign_subject_holds = ROOT
					OR = {
						has_building = workshop
						has_building = counting_house
					}
				}
			}
			else = {
				484 = {
					country_or_non_sovereign_subject_holds = ROOT
				}
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value =  5
				OR = {
					area = cuba_area
					area = east_cuba_area
				}
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { has_country_flag = spa_house_of_trade_flag }
					NOT = { mission_completed = spa_dominate_sevilla }
				}
				set_country_flag = spa_house_of_trade_flag
				country_event = { id = flavor_spa.1003 }
				custom_tooltip = spa_event_insight_1003_tt
			}
			else = {
				change_ruler_stat = {
					type = dip 
					amount = 1 
				}
				add_mercantilism = 3 
			}
			if = {
				limit = {
					any_subject_country = {
						OR = {
							is_subject_of_type = colony
							is_subject_of_type = crown_colony
							is_subject_of_type = private_enterprise
							is_subject_of_type = self_governing_colony
						}
						owns = 484
						484 = { is_capital = no }
					}
				}
				every_subject_country = {
					limit = {
						owns = 484
					}
					484 = {
						prev_move_capital_effect = yes
					}
				}
			}
			mexico_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT	}
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			eastern_mexico_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT	}
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
			puebla_area = {
				limit = {
					NOT = { is_permanent_claim = ROOT	}
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_aztecs2 = {
		icon = mission_iberian_conquistador
		required_missions = { gc_cas_spa_havana2 }
		position = 11
		provinces_to_highlight = {
			OR = {
				area = mexico_area
				area = eastern_mexico_area
				area = puebla_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
			has_discovered = ROOT
		}

		trigger = {
			mexico_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			eastern_mexico_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			puebla_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}

		effect = {
			add_country_modifier = {
				name = spa_aztecs_conquest_modifier
				duration = 7300
			}
			add_years_of_income = 1
			mexico_region = {
				limit = {
					NOT = { is_permanent_claim = ROOT	}
					NOT = { is_core = ROOT	}
				}
				add_permanent_claim = ROOT
			}
		}
	}
	
	gc_cas_spa_native_reductions2 = {
		icon = mission_native_reductions
		required_missions = { gc_cas_spa_new_spain2 }
		position = 13
		provinces_to_highlight = {
			province_id = 216
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				NOT = { has_building = university }
			}
		}
		trigger = {
			if = {
				limit = {
					has_dlc = "Golden Century"
					religion = catholic
				}
				custom_trigger_tooltip = {
					tooltip = native_reductions_tooltip
					num_of_states_owned_or_owned_by_non_sovereign_subjects_with = {
						has_holy_order_trigger = yes
						OR = {
							continent = north_america
							continent = south_america
						}
						value = 15
					}
				}
			}
			else = {
				custom_trigger_tooltip = {
					tooltip = native_reductions_alternative_tooltip
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						religion = ROOT
						OR = {
							continent = north_america
							continent = south_america
						}
						value = 75
					}
				}
			}			
			216 = { # school of salamanca
				has_building = university
			}
		}
		effect = {
			if = {
				limit = {
					religion = catholic
				}
				add_country_modifier = {
					name = spa_enforced_catholicism_modifier
					duration = -1 
				}
			}
			else = {
				add_dip_power = 100
			}
			if = {
				limit = {
					any_country = {
						is_subject_of = ROOT
						OR = {
							is_subject_of_type = colony
							is_subject_of_type = crown_colony
							is_subject_of_type = private_enterprise
							is_subject_of_type = self_governing_colony
						}
					}
				}
				every_country = {
					limit = {
						is_subject_of = ROOT
						is_subject_of_type = colony
					}
					add_country_modifier = {
						name = "spa_native_reductions"
						duration = 7300
					}
				}
			}
		}
	}
}
	
	