azt_missions_1 = {
	slot = 1
	generic = no
	ai = yes
	
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		NOT = { map_setup = map_setup_random }
		is_random_new_world = no
		has_dlc = "Winds of Change"
		OR = {
			tag = AZT
			has_country_flag = unlock_aztec_missions_flag
		}
	} 

	azt_imperial_tributes = {
		icon = mission_mesoamerican_tributes
		position = 2
		required_missions = { azt_coronation_campaigns }

		trigger = {  
			num_of_subjects = 5
			if = {
				limit = {
					religion = nahuatl
					is_primitive = yes
					has_dlc = "El Dorado"
				}
				custom_trigger_tooltip = {
					tooltip = AZT_PASSED_TWO_REFORMS
					check_variable = {
						which = NahuatlReformCounter
						value = 2
					}
				}
			}
			NOT = {
				any_subject_country = {
					liberty_desire = 30
				}
			}
			stability = 2
		} 

		effect = {  
			custom_tooltip = AZT_SUCCESSFUL_TRIBUTES_GRANT_NOBILITY_LOYALTY
			set_country_flag = azt_imperial_tributes_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = AZT_NOBILITY_PRIMACY_GRANTS_TRIBUTARY_BONUSES
		} 
	}

	azt_mayan_frontier = {
		icon = mission_mayan_conquest
		position = 3
		provinces_to_highlight = {  
			region = central_america_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = central_america_region
				value = 3
			}
		} 

		effect = {  
			add_army_tradition_or_mil_power = { amount = 10 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_doom = -5
		} 
	}

	azt_north_mayans = {
		icon = mission_chichen_itza
		position = 4
		required_missions = { azt_mayan_frontier } 
		provinces_to_highlight = {  
			OR = {
				area = campeche_area
				area = yucatan_area
				area = east_yucatan_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 5
				OR = {
					area = campeche_area
					area = yucatan_area
					area = east_yucatan_area
				}
			}
			
			846 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 

		effect = {
			846 = {
				add_or_upgrade_tax_building = yes
				custom_tooltip = SEPERATOR_TOOLTIP
				add_base_tax = 2
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_government_power = {
				mechanic_type = blood_gathering_mechanic
				power_type = blood
				value = 20
			}
		} 
	}

	azt_mayan_cocoa = {
		icon = mission_cocoa
		position = 6
		required_missions = { azt_securing_central_america } 
		provinces_to_highlight = {  
			region = central_america_region
			NOT = { development = 10 }
			NOT = { num_of_buildings_in_province = 2 }
			trade_goods = cocoa
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = central_america_region
				development = 10
				num_of_buildings_in_province = 2
				trade_goods = cocoa
				value = 3
			}
		} 

		effect = {  
			add_years_of_income = 1
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = AZT_FIVE_PROVINCES_THAT_MEET_REQUIREMENT_GET_FOLLOWING
			tooltip = {
				add_province_modifier = {
					name = azt_hot_xocolatl
					duration = -1
				}
				
				add_or_upgrade_production_building = yes
			}
			
			hidden_effect = {
				if = {
					limit = {
						num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
							region = central_america_region
							development = 10
							num_of_buildings_in_province = 2
							trade_goods = cocoa
							value = 5
						}
					}
					pick_best_provinces = {
						5 = yes
						scope = every_owned_province
						scale = higher_development_than
						global_trigger = "
							region = central_america_region
							num_of_buildings_in_province = 2
							trade_goods = cocoa
						"
						event_target_name = chocolate_target
					}
					if = {
						limit = {
							has_saved_event_target = chocolate_target_1
						}
						event_target:chocolate_target_1 = {
							add_province_modifier = {
								name = azt_hot_xocolatl
								duration = -1
							}
							
							add_or_upgrade_production_building = yes
						}
					}
					if = {
						limit = {
							has_saved_event_target = chocolate_target_2
						}
						event_target:chocolate_target_2 = {
							add_province_modifier = {
								name = azt_hot_xocolatl
								duration = -1
							}
							
							add_or_upgrade_production_building = yes
						}
					}
					if = {
						limit = {
							has_saved_event_target = chocolate_target_3
						}
						event_target:chocolate_target_3 = {
							add_province_modifier = {
								name = azt_hot_xocolatl
								duration = -1
							}
							
							add_or_upgrade_production_building = yes
						}
					}
					if = {
						limit = {
							has_saved_event_target = chocolate_target_4
						}
						event_target:chocolate_target_4 = {
							add_province_modifier = {
								name = azt_hot_xocolatl
								duration = -1
							}
							
							add_or_upgrade_production_building = yes
						}
					}
					if = {
						limit = {
							has_saved_event_target = chocolate_target_5
						}
						event_target:chocolate_target_5 = {
							add_province_modifier = {
								name = azt_hot_xocolatl
								duration = -1
							}
							
							add_or_upgrade_production_building = yes
						}
					}
				}
				else = {
					central_america_region = {
						limit = {
							country_or_non_sovereign_subject_holds = ROOT
							development = 10
							num_of_buildings_in_province = 2
							trade_goods = cocoa
						}
						add_province_modifier = {
							name = azt_hot_xocolatl
							duration = -1
						}
						
						add_or_upgrade_production_building = yes
					}
				}
			}
		} 
	}

	azt_sacrifices_for_the_gods = {
		icon = mission_blood_sacrifices
		position = 7

		trigger = {  
			if = {
				limit = {
					has_government_mechanic = blood_gathering_mechanic
				}
				has_government_power = {
					mechanic_type = blood_gathering_mechanic
					power_type = blood
					value = 15
				}
			}
			else = {
				num_of_battles = { amount = 15 }
			}
			if = {
				limit = {
					has_dlc = "El Dorado"
					is_primitive = yes
					religion = nahuatl
				}
				custom_trigger_tooltip = {
					tooltip = AZT_PASSED_ONE_REFORM
					check_variable = {
						which = NahuatlReformCounter
						value = 1
					}
				}
			}
		} 

		effect = {  
			add_government_power = {
				mechanic_type = blood_gathering_mechanic
				power_type = blood
				value = 10
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			define_advisor = {
				type = theologian
				skill = 2
				cost_multiplier = 0.25
			}
		} 
	}

	azt_fifth_cradle = {
		icon = mission_hands_praying
		position = 8
		required_missions = { azt_sacrifices_for_the_gods }
	
		trigger = {  
			if = {
				limit = {
					religion = nahuatl
					has_dlc = "El Dorado"
				}
				is_primitive = no
				OR = {
					monthly_adm = 9
					theologian = 3
				}
			}
			else = {
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					has_tax_building_trigger = yes
					base_tax = 3
					value = 20
				}
			}
			is_at_war = no
		} 
	
		effect = {
			if = {
				limit = {
					has_estate = estate_church
				}
				add_estate_loyalty = {
					estate = estate_church
					loyalty = 10
				}
			}
			
			add_adm_power = 100
			
			if = {
				limit = {
					has_government_mechanic = blood_gathering_mechanic
				}
				custom_tooltip = AZT_BUFF_BLOOD_TOOLTIP
			}
			else = {
				add_country_modifier = {
					name = the_fifth_sun
					duration = -1
				}
			}
			set_country_flag = azt_blood_buffs_flag
		} 
	}
	

	azt_seperation_of_classes = {
		icon = mission_social_stratas
		position = 9
		required_missions = { azt_tlatoani }

		trigger = {  
			if = {
				limit = {
					has_estate = estate_nobles
				}
				num_of_estate_privileges = {
					estate = estate_nobles
					value = 4
				}
			}
			else = {
				monthly_mil = 9
			}
			num_of_provinces_developed = { amount = 10 }
		} 

		effect = {  
			if = {
				limit = {
					has_estate = estate_nobles
				}
				custom_tooltip = AZT_NOBLE_LEVIES_BUFF_TOOLTIP
				set_country_flag = azt_buff_noble_levies_flag
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				distribute_development = {
					type = manpower
					amount = 5
				}
			}
			else = {
				add_country_modifier = {
					name = azt_class_seperation
					duration = 7300
				}
				
				change_ruler_stat = {
					type = adm
					amount = 1
				}
			}
		} 
	}

	azt_chinampa_farms = {
		icon = mission_pue_irrigation_cannals
		position = 12
		required_missions = { azt_roads } 
		provinces_to_highlight = {  
			trade_goods = grain
			country_or_non_sovereign_subject_holds = ROOT
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				trade_goods = grain
				development = 10
				has_production_building_trigger = yes
				value = 5
			}
		} 

		effect = {  
			custom_tooltip = AZT_UNLOCK_CHINAMPA_FARMS_REFORM
			set_country_flag = azt_chinampa_reform_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_mercantilism_or_monarch_power = { amount = 5 }
		} 
	}

	azt_arts_and_crafts = {
		icon = mission_iron_and_copper
		position = 13
		required_missions = { azt_chinampa_farms }

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				has_production_building_trigger = yes
				base_production = 5
				value = 10
			}
			OR = {
				production_efficiency = 0.2
				production_income_percentage = 0.15
			}
		} 

		effect = {  
			custom_tooltip = AZT_UNLOCK_SPONSOR_ARTISANS_PRIVILEGE
			set_country_flag = azt_unlock_sponsor_artisans_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_dip_power = 50
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_years_of_income = 0.4
		} 
	}
}
azt_missions_2 = {
	slot = 2
	generic = no
	ai = yes
	
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		NOT = { map_setup = map_setup_random }
		is_random_new_world = no
		has_dlc = "Winds of Change"
		OR = {
			tag = AZT
			has_country_flag = unlock_aztec_missions_flag
		}
	} 

	azt_coronation_campaigns = {
		icon = mission_native_build_army_mission
		position = 1

		trigger = {
			OR = {
				army_size_percentage = 0.9
				army_size = 4 # modified
			}
			
		} 

		effect = {
			give_claims = { area = mexico_area }
			give_claims = { id = 850 }
			give_claims = { id = 4583 }
			give_claims = { id = 2644 }
			custom_tooltip = " "
			add_army_tradition_or_mil_power = { amount = 10 }
			custom_tooltip = " "
			if = {
				limit = {
					tag = AZT
				}
				country_event_with_effect_insight = {
					id = flavor_azt.19
					effect = "
						add_ruler_modifier = {
							name = azt_rise_of_montezuma
							duration = -1
						}
						custom_tooltip = AZT_MONTEZUMA_DESCRIPTION
					"
				}
			}
			else = {
				create_general_with_pips = { tradition = 50 add_shock = 1 }
			}
		} 
	}

	azt_tlaxcala = {
		icon = mission_aztecs_flower_wars
		position = 2
		required_missions = { azt_coronation_campaigns } 
		provinces_to_highlight = {  
			OR = {
				province_id = 2644
				province_id = 850
				province_id = 4583
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			2644 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			850 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			4583 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			OR = {
				tag = TLX
				NOT = { exists = TLX }
				TLX = { is_subject_of = ROOT }
			}
		} 

		effect = {  
			4583 = {
				add_or_upgrade_production_building = yes
			}
			
			custom_tooltip = " "
			
			give_claims = { area = puebla_area }
			give_claims = { area = mixteca_area }
			give_claims = { area = oaxaca_area }
			give_claims = { id = 2649 }
			give_claims = { id = 2638 }
			
			custom_tooltip = " "
			
			if = {
				limit = {
					tag = AZT
				}
				complex_dynamic_effect = {
					first_custom_tooltip = AZT_IF_MONTEZUMA_IS_ALIVE
					first_limit = "
						has_ruler_flag = azt_montezuma
					"
					first_effect = "
						country_event_with_effect_insight = {
							id = flavor_azt.20
							effect = \"
								custom_tooltip = AZT_MODIFY_RISE_OF_MONTEZUMA
							\"
						}
					"
				}
			}
			else = {
				2644 = {
					add_or_upgrade_tax_building = yes
				}
			}
		} 
	}

	azt_zapotec = {
		icon = mission_pue_sky_city
		position = 3
		required_missions = { azt_tlaxcala } 
		provinces_to_highlight = {  
			OR = {
				area = puebla_area
				area = mixteca_area
				area = oaxaca_area
				province_id = 2649
				province_id = 2638
				province_id = 844
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 10
				OR = {
					area = puebla_area
					area = mixteca_area
					area = oaxaca_area
					province_id = 2649
					province_id = 2638
				}
			}
			844 = {
				country_or_non_sovereign_subject_holds = ROOT
		  	}
		} 

		effect = {
			give_claims = { area = eastern_mexico_area }
			give_claims = { region = central_america_region }
			
			custom_tooltip = " "
			
			add_doom = -10
			
			custom_tooltip = " "
			if = {
				limit = {
					tag = AZT
				}
				complex_dynamic_effect = {
					first_custom_tooltip = AZT_IF_MONTEZUMA_IS_ALIVE
					first_limit = "
						has_ruler_flag = azt_montezuma
					"
					first_effect = "
						country_event_with_effect_insight = {
							id = flavor_azt.21
							effect = \"
								change_ruler_stat = {
									type = mil
									amount = 1
								}
								custom_tooltip = SEPERATOR_TOOLTIP
								custom_tooltip = AZT_MODIFY_RISE_OF_MONTEZUMA_2
							\"
						}
					"
				}
			}
			else = {
				844 = {
					add_or_upgrade_courthouse_building = yes
				}
			}
		} 
	}

	azt_south_mayans = {
		icon = mission_mayan_warriors
		position = 4
		required_missions = {
			azt_zapotec
			azt_mayan_frontier
		}
		provinces_to_highlight = {  
			OR = {
				area = guatemala_lowlands_area
				area = guatemala_area
				area = chiapas_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					area = guatemala_lowlands_area
					area = guatemala_area
					area = chiapas_area
				}
				value = 5
			}
		} 

		effect = {  
			add_country_modifier = {
				name = azt_securing_the_highlands
				duration = 5475
			}
			
			add_power_projection = {
				type = mission_rewards_power_projection
				amount = 25
			}
		} 
	}

	azt_securing_central_america = {
		icon = native_royal_marriage
		position = 5
		required_missions = {
			azt_south_mayans
			azt_north_mayans
		}
		provinces_to_highlight = {  
			region = central_america_region
			is_empty = no
			NOT = { 
				province_id = 838 
				area = costa_rica_area
				area = nicaragua_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 
	
		trigger = {  
			custom_trigger_tooltip = {
				tooltip = AZT_OWN_ALL_OF_COLONIZED_CENTRAL_AMERICA
				central_america_region = {
					type = all
					OR = {
						area = costa_rica_area
						area = nicaragua_area
						is_empty = yes
						country_or_non_sovereign_subject_holds = ROOT
					}
				}
			}
		} 
	
		effect = {
			if = {
				limit = {
					has_dlc = "Mandate of Heaven"
				}
				add_splendor = 100
			}
			else = {
				add_prestige_or_monarch_power = { amount = 15 }
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			if = {
				limit = {
					has_ruler_flag = azt_montezuma
				}
				complex_dynamic_effect = {
					first_custom_tooltip = AZT_IF_MONTEZUMA_IS_ALIVE
					first_limit = "
						has_ruler_flag = azt_montezuma
					"
					first_effect = "
						country_event_with_effect_insight = {
							id = flavor_azt.22
							effect = \"
								change_ruler_stat = {
									type = adm
									amount = 1
								}
								change_ruler_stat = {
									type = dip
									amount = 2
								}
							\"
						}
					"
				}
			}
			else = {
				add_mil_power = 100
				change_ruler_stat = {
					type = mil
					amount = 2
				}
			}
		} 
	}

	azt_tlatoani = {
		icon = mission_tlatoani
		position = 8
		required_missions = {
			azt_sacrifices_for_the_gods
			azt_city_alliance
		}

		trigger = {  
			OR = {
				AND = {
					num_of_subjects = 5
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						OR = {
							region = mexico_region
							region = central_america_region
						}
						value = 40
					}
					NOT = {
						any_subject_country = {
							liberty_desire = 50
						}
					}
				}
				AND = {
					NOT = {
						estate_influence = {
							estate = estate_nobles
							influence = 40
						}
					}
					monthly_mil = 10
				}
			}
		}

		effect = {
			add_mil_power = 50
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			complex_dynamic_effect = {
				first_custom_tooltip = AZT_IF_COMPLETED_VIA_SUBJECT
				first_limit = "
					num_of_subjects = 5
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						OR = {
							region = mexico_region
							region = central_america_region
						}
						value = 40
					}
					NOT = {
						any_subject_country = {
							liberty_desire = 50
						}
						monthly_mil = 10
					}
					estate_influence = {
						estate = estate_nobles
						influence = 40
					}
				"
				first_effect = "
					custom_tooltip = AZT_GAIN_BLOOD_PER_SUBJECT
					
					custom_tooltip = SEPERATOR_TOOLTIP
					
					add_army_tradition_or_mil_power = { amount = 15 }
				"
				second_custom_tooltip = AZT_IF_COMPLETED_VIA_NOBILITY
				second_limit = "
					NOT = {
						estate_influence = {
							estate = estate_nobles
							influence = 40
						}
					}
					monthly_mil = 10
				"
				second_effect = "
					add_stability = 1
					add_doom = -10
					add_estate_loyalty = {
						estate = estate_church
						loyalty = 10
					}
				"
			}
			hidden_effect = {
				if = {
					limit = {
						num_of_subjects = 5
						num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
							OR = {
								region = mexico_region
								region = central_america_region
							}
							value = 40
						}
						NOT = {
							any_subject_country = {
								liberty_desire = 50
							}
						}
					}
					every_subject_country = {
						overlord = {
							add_government_power = {
								mechanic_type = blood_gathering_mechanic
								power_type = blood
								value = 2
							}
						}
					}
				}
			}
		} 
	}

	azt_squashing_rebellious_tributaries = {
		icon = mission_mesoamerican_divine_monarch
		position = 9
		required_missions = { azt_tlatoani }

		trigger = {  
			num_of_wars = { amount = 10 }
			OR = {
				num_of_subjects = 5
				grown_by_development = 150
			}
		} 

		effect = {  
			custom_tooltip = AZT_EVERY_SUBJECT_LOSES_LD
			hidden_effect = {
				every_subject_country = {
					add_liberty_desire = -20
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = NAHUATL_TRIBUTARIES_GRANT_FURTHER_BONUSES
			set_country_flag = azt_buff_nahuatl_tributaries_flag
		} 
	}

	azt_fate_of_city_alliance = {
		icon = mission_aztec_fractured_alliance
		position = 10
		required_missions = {
			azt_religious_schools
			azt_squashing_rebellious_tributaries
			azt_seperation_of_classes
		}
		provinces_to_highlight = {  
			OR = {
				province_id = 852
				province_id = 4570
				province_id = 4571
			}
		} 

		trigger = {  
			development_in_provinces = {
				OR = {
					province_id = 852
					province_id = 4570
					province_id = 4571
				}
				value = 55
			}
			852 = {
				higher_development_than = 4570
				higher_development_than = 4571
			}
		} 

		effect = {
			if = {
				limit = {
					tag = AZT
				}
				country_event_with_option_insight = {
					id = flavor_azt.25
					option_1 = "
						remove_estate_privilege = estate_nobles_AZT_triple_alliance
						change_estate_land_share = {
							estate = estate_nobles
							share = -10
						}
					"
					option_2 = "
						custom_tooltip = AZT_MODIFY_TRIPLE_ALLIANCE_PRIVILEGE
						
						custom_tooltip = SEPERATOR_TOOLTIP
						
						custom_tooltip = AZT_GAIN_DEVELOPMENT_PER_SUBJECT
					"
				}
			}
			else = {
				change_government_reform_progress = 50
				add_adm_power = 100
				add_estate_loyalty = {
					estate = estate_nobles
					loyalty = 15
				}
			}
		} 
	}

	azt_roads = {
		icon = mission_pue_chaco_roads
		position = 11
		provinces_to_highlight = {  
			country_or_non_sovereign_subject_holds = ROOT
			NOT = { num_of_times_improved = 1 }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				num_of_times_improved = 1
				value = 10
			}
		} 
	
		effect = {  
			if = {
				limit = {
					has_dlc = "Cradle of Civilization"
				}
				enable_trading_policy = { policy = improve_inland_routes_upgraded }
				enable_trading_policy = { policy = establish_communities_upgraded }
				hidden_effect = {
					disable_trading_policy = { policy = improve_inland_routes }
					disable_trading_policy = { policy = establish_communities }
				}
			}
			else = {
				add_dip_power = 100
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_estate_loyalty = {
				estate = estate_burghers
				loyalty = 10
			}
		}  
	}

	azt_shifting_the_macehualtin = {
		icon = mission_macehualtin
		position = 13
		required_missions = { azt_chinampa_farms } 
		provinces_to_highlight = {  
			country_or_non_sovereign_subject_holds = ROOT
			OR = {
				region = central_america_region
				region = mexico_region
			}
			NOT = { development = 30 }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				development = 30
				OR = {
					region = central_america_region
					region = mexico_region
				}
				value = 5
			}
		} 

		effect = {  
			custom_tooltip = AZT_BUFF_NOBLE_LEVIES_LOYALTY
			set_country_flag = azt_noble_levies_loyalty_buff_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_yearly_manpower = 1
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			capital_scope = {
				add_base_manpower = 2
			}
		} 
	}

	azt_gold_income = {
		icon = mission_zambezi_gold
		position = 14
		required_missions = {
			azt_shifting_the_macehualtin
			azt_arts_and_crafts
		}
		provinces_to_highlight = {  
			OR = {
				region = central_america_region
				region = mexico_region
			}
			trade_goods = gold
		} 

		trigger = {
			mexico_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			development_in_provinces = {
				OR = {
					region = central_america_region
					region = mexico_region
				}
				trade_goods = gold
				value = 125
			}
			gold_income = 40
		} 

		effect = {  
			mexico_area = {
				add_province_modifier = {
					name = azt_gold_mines_of_mexico
					duration = -1
				}
			}
			
			custom_tooltip = AZT_UNLOCK_AZTEC_GOLD_MINES_PRIVILEGE
			set_country_flag = azt_mexican_gold_mines_flag
		} 
	}
}
azt_missions_3 = {
	slot = 3
	generic = no
	ai = yes
	
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		NOT = { map_setup = map_setup_random }
		is_random_new_world = no
		has_dlc = "Winds of Change"
		OR = {
			tag = AZT
			has_country_flag = unlock_aztec_missions_flag
		}
	} 

	azt_mexico = {
		icon = mission_jungle
		position = 2
		required_missions = {
			azt_western_expedition
			azt_coronation_campaigns
		}
		provinces_to_highlight = {  
			OR = {
				province_id = 4641
				province_id = 4573
				province_id = 2623
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			4641 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			4573 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			2623 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 

		effect = {  
			add_country_modifier = {
				name = azt_conflicts_with_purepecha_empire
				duration = 5475
			}
			
			give_claims = { area = michoacan_area }
			give_claims = { area = tierra_caliente_area }
		} 
	}

	azt_maize_farms = {
		icon = mission_iroquois_food_surplus
		position = 4
		required_missions = { azt_tarascan } 
		provinces_to_highlight = {
			OR = {
				region = mexico_region
				region = central_america_region
			}
			trade_goods = grain
		} 
	
		trigger = {  
			trade_goods_produced_amount = {
				trade_goods = grain
				amount = 5
			}
			
			2624 = {
				country_or_non_sovereign_subject_holds = ROOT
				base_production = 5
			}
		} 

		effect = {  
			distribute_development = {
				type = production
				amount = 5
				limit = "
					trade_goods = grain
				"
				tooltip = AZT_FOR_GRAIN_ONLY
			}
			
			2624 = {
				add_or_upgrade_production_building = yes
			}
		} 
	}

	azt_unify_mexico = {
		icon = mission_mesoamerica
		position = 6
		required_missions = {
			azt_securing_central_america
			azt_end_of_western_expedition
		}
		provinces_to_highlight = {  
			is_in_mesoamerica_trigger = yes
			is_empty = no
			NOT = {
				area = nicaragua_area
				area = durango_area
				area = costa_rica_area
			}
		} 

		trigger = {  
			custom_trigger_tooltip = {
				tooltip = AZT_OWNS_ALL_OF_MESOAMERICA
				mexico_region = {
					type = all
					OR = {
						country_or_non_sovereign_subject_holds = ROOT
						is_empty = yes
						area = durango_area
					}
				}
				central_america_region = {
					type = all
					OR = {
						country_or_non_sovereign_subject_holds = ROOT
						is_empty = yes
						area = costa_rica_area
						area = nicaragua_area
						
					}
				}
			}
		} 

		effect = {
			set_country_flag = mesoamerica_american_frontiers_flag
			custom_tooltip = AZT_UNLOCKS_ESTABLISHMENT_OF_AMERICAN_FRONTIERS
			custom_tooltip = SEPERATOR_TOOLTIP
			if = {
				limit = {
					tag = AZT
				}
				override_country_name = aztlan
				set_country_flag = is_aztlan_flag
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				complex_dynamic_effect = {
					first_custom_tooltip = AZT_IF_MONTEZUMA_IS_ALIVE
					first_limit = "
						has_ruler_flag = azt_montezuma
					"
					first_effect = "
						country_event_with_effect_insight = {
							id = flavor_azt.23
							effect = \"
								change_ruler_stat = {
									type = adm
									amount = 1
								}
								custom_tooltip = SEPERATOR_TOOLTIP
								change_ruler_stat = {
									type = dip
									amount = 1
								}
								
								custom_tooltip = SEPERATOR_TOOLTIP
								
								custom_tooltip = AZT_MODIFY_RISE_OF_MONTEZUMA_3
							\"
						}
					"
				}
			}
			else = {
				change_government_reform_progress = 50
			}
		} 
	}

	azt_city_alliance = {
		icon = mission_aztec_city_alliance
		position = 7
		provinces_to_highlight = { 
			OR = {
				AND = {
					OR = {
						province_id = 4570
						province_id = 4571
					}
					NOT = { num_of_times_improved = 1 }
				}
				AND = {
					province_id = 852
					NOT = { num_of_times_improved = 2 }
				}
				
			}
		} 
	
		trigger = {  
			852 = {
				owned_by = ROOT
				num_of_times_improved = 2
			}
			4570 = {
				owned_by = ROOT
				num_of_times_improved = 1
			}
			4571 = {
				owned_by = ROOT
				num_of_times_improved = 1
			}
		} 
	
		effect = {  
			capital_scope = {
				add_province_modifier = {
					name = azt_capital_of_the_alliance
					duration = 7300
				}
			}
			852 = {
				add_province_modifier = {
					name = azt_alliance_province
					duration = 7300
				}
			}
			4570 = {
				add_province_modifier = {
					name = azt_alliance_province
					duration = 7300
				}
			}
			4571 = {
				add_province_modifier = {
					name = azt_alliance_province
					duration = 7300
				}
			}
		} 
	}

	azt_religious_schools = {
		icon = mission_aztec_religious_classes
		position = 9
		required_missions = { azt_tlatoani } 
		provinces_to_highlight = {  
			country_or_non_sovereign_subject_holds = ROOT
			NOT = { has_tax_building_trigger = yes }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				has_tax_building_trigger = yes
				value = 10
			}
			if = {
				limit = {
					has_estate = estate_church
				}
				estate_loyalty = {
					estate = estate_church
					loyalty = 65
				}
			}
			else = {
				inquisitor = 3
				monthly_adm = 10
			}
		}

		effect = {  
			custom_tooltip = AZT_TEMPLES_GRANT_RELIGIOUS_BONUS
			set_country_flag = azt_temples_buffs_flag
			hidden_effect = {
				every_owned_province = {
					limit = {
						has_tax_building_trigger = yes
					}
					add_province_modifier = {
						name = azt_religious_classes
						duration = -1
						hidden = yes
					}
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			capital_scope = {
				if = {
					limit = {
						has_tax_building_trigger = yes
					}
					add_base_tax = 2
				}
			}
		} 
	}

	azt_blood_for_the_gods = {
		icon = mission_blood_for_the_gods
		position = 10
		required_missions = {
			azt_capital_of_the_empire
			azt_religious_schools
		}

		trigger = {  
			if = {
				limit = {
					has_government_mechanic = blood_gathering_mechanic
				}
				has_government_power = {
					mechanic_type = blood_gathering_mechanic
					power_type = blood
					value = 90
				}
				
				custom_trigger_tooltip = {
					tooltip = AZT_HELD_5_FESTIVALS
					check_variable = {
						which = AztFestivalsHeldVar
						value = 5
					}
				}
			}
			else = {
				num_of_converted_provinces = { amount = 45 }
			}
		} 

		effect = {  
			custom_tooltip = AZT_INQUISITORS_GRANT_BLOOD
			set_country_flag = azt_inquisitor_buff_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = AZT_FESTIVALS_NOW_GRANT_INQUISITORS
			set_country_flag = azt_festival_inquisitor_flag
		} 
	}

	azt_quauhpilli = {
		icon = mission_eagle_knight
		position = 12
		required_missions = {
			azt_warrior_societies
			azt_roads
		}

		trigger = {  
			monthly_mil = 12
			OR = {
				army_reformer = 2
				has_mil_advisor_3 = yes
			}
			army_size = 20 # modified
			if = {
				limit = {
					has_dlc = "Cradle of Civilization"
				}
				army_professionalism = 0.3
			}
			else = {
				army_tradition = 50
			}
		} 

		effect = {  
			custom_tooltip = AZT_BUFF_MILITARIZED_SOCIETY
			set_country_flag = azt_buffed_military_society_flag
			
			hidden_effect = {
				every_owned_province = {
					limit = {
						has_province_modifier = azt_military_culture_modifier
					}
					remove_province_modifier = azt_military_culture_modifier
					add_province_modifier = {
						name = azt_military_culture_modifier_buffed
						duration = -1
						hidden = yes
					}
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				custom_tooltip = AZT_MORE_LIKELY_MARTIAL_EDUCATOR_TRAIT
				set_country_flag = azt_more_martial_educators_flag
			}
			else = {
				add_army_tradition_or_mil_power = { amount = 20 }
			}
		} 
	}
}
azt_missions_4 = {
	slot = 4
	generic = no
	ai = yes
	
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		NOT = { map_setup = map_setup_random }
		is_random_new_world = no
		has_dlc = "Winds of Change"
		OR = {
			tag = AZT
			has_country_flag = unlock_aztec_missions_flag
		}
	} 

	azt_western_expedition = {
		icon = mission_native_dev_capital
		position = 1
		provinces_to_highlight = {
			OR = {
				area = mexico_area
				province_id = 2627
				province_id = 2648
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			mexico_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			2627 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			2648 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 

		effect = {  
			give_claims = { id = 4641 }
			give_claims = { id = 2623 }
			give_claims = { id = 4573 }
			custom_tooltip = " "
			2626 = {
				change_culture = ROOT
				set_local_autonomy = 0
				add_base_production = 1
			}
			4572 = {
				change_culture = ROOT
				set_local_autonomy = 0
				add_base_production = 1
			}
		} 
	}

	azt_tarascan = {
		icon = mission_rival_purepecha
		position = 3
		required_missions = { azt_mexico } 
		provinces_to_highlight = {  
			OR = {
				area = michoacan_area
				area = tierra_caliente_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 
	
		trigger = {  
			michoacan_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			tierra_caliente_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 
	
		effect = {
			give_claims = { area = jalisco_area }
			give_claims = { id = 4578 }
			give_claims = { id = 4640 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = AZT_GRANT_MODIFIER_IN_GRAIN_PROVINCES_IN_THE_REQUIRED_AREAS
			tooltip = {
				add_province_modifier = {
					name = azt_supply_of_maize
					duration = 7300
				}
			}
			
			add_years_of_owned_provinces_production_income = {
				years = 8
				trigger = {
					OR = {
						trade_goods = grain
						is_capital_of = ROOT
					}
				}
				custom_tooltip = GAIN_INCOME_FROM_GRAIN
			}
			
			hidden_effect = {
				michoacan_area = {
					limit = {
						trade_goods = grain
					}
					add_province_modifier = {
						name = azt_supply_of_maize
						duration = 7300
					}
				}
				tierra_caliente_area = {
					limit = {
						trade_goods = grain
					}
					add_province_modifier = {
						name = azt_supply_of_maize
						duration = 7300
					}
				}
			}
		} 
	}

	azt_end_of_western_expedition = {
		icon = mission_mesoamerican_leader_expedition
		position = 5
		required_missions = {
			azt_tarascan
			azt_subduing_migratory_tribes
		}
		provinces_to_highlight = {  
			OR = {
				area = jalisco_area
				province_id = 4640
				province_id = 4578
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			jalisco_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			4578 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			4640 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 

		effect = {
			custom_tooltip = AZT_BEST_WOOL_PROVINCE_IN_AREA
			tooltip = {
				4578 = {
					add_or_upgrade_production_building = yes
					add_base_production = 2
				}
			}
			hidden_effect = {
				random_owned_province = {
					limit = {
						OR = {
							area = jalisco_area
							province_id = 4640
							province_id = 4578
						}
						trade_goods = wool
					}
					add_or_upgrade_production_building = yes
					add_base_production = 2
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_years_of_owned_provinces_production_income = {
				years = 4
				trigger = {
					OR = {
						trade_goods = wool
						is_capital_of = ROOT
					}
				}
				custom_tooltip = AZT_FROM_WOOL
			}
		} 
	}

	azt_hueyi_teocalli = {
		icon = mission_chichen_itza
		position = 8
		required_missions = {
			azt_city_alliance
			azt_expansion_of_tenochtitlan
		}
		provinces_to_highlight = {  
			province_id = 852
			if = {
				limit = {
					has_dlc = "Leviathan"
				}
				OR = {
					NOT = {
						has_great_project = {
							type = tenochtitlan
							tier = 3
						}
					}
					NOT = { base_tax = 6 }
				}
			}
			else = {
				NOT = { has_tax_building_trigger = yes }
			}
		} 

		trigger = {  
			if = {
				limit = {
					has_dlc = "Leviathan"
				}
				852 = {
					has_great_project = {
						type = tenochtitlan
						tier = 3
					}
					base_tax = 6
				}
			}
			else = {
				852 = { has_tax_building_trigger = yes }
			}
		} 

		effect = {
			add_adm_power = 100
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			if = {
				limit = {
					has_dlc = "Leviathan"
				}
				custom_tooltip = AZT_UNLOCK_TENOCHTITLAN_CONDITIONAL_MODIFIER
				set_country_flag = azt_tenochtitlan_buff_flag
			}
			else = {
				add_estate_loyalty = {
					estate = estate_church
					loyalty = 10
				}
				852 = {
					add_or_upgrade_tax_building =  yes
				}
			}
		} 
	}

	azt_capital_of_the_empire = {
		icon = mission_pue_sky_city
		position = 9
		required_missions = {
			azt_hueyi_teocalli
			azt_tenochitlan_aqueduct
		}
		provinces_to_highlight = {  
			province_id = 852
			OR = {
				NOT = { development = 35 }
				is_prosperous = no
			}
		} 

		trigger = {  
			852 = {
				development = 35
				if = {
					limit = {
						has_dlc = "Mandate of Heaven"
					}
					is_prosperous = yes
				}
				else = {
					num_of_buildings_in_province = 3
				}
			}
		} 

		effect = {
			take_estate_land_share_massive = { estate = all }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			852 = {
				custom_tooltip = AZT_MODIFY_TENOCHITLAN_CITY_MODIFIER_2
				hidden_effect = {
					remove_province_modifier = azt_techchitlan_2
					add_province_modifier = {
						name = azt_techchitlan_3
						duration = -1
					}
				}
			}
		} 
	}

	azt_warrior_societies = {
		icon = mission_mesoamerican_soldiers_training
		position = 11

		trigger = {  
			army_size = 5 # modified
			if = {
				limit = {
					has_dlc = "Cradle of Civilization"
				}
				army_professionalism = 0.15
			}
			else = {
				army_tradition = 30
			}
		} 

		effect = {  
			custom_tooltip = AZT_UNLOCK_MILITARY_CULTURE_PRIVILEGE_NOBLES
			set_country_flag = azt_military_culture_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_yearly_manpower = 1
		} 
	}

	azt_telpochcalli_schools = {
		icon = mission_ne_longhouses
		position = 12
		required_missions = { azt_warrior_societies } 
		provinces_to_highlight = {  
			owned_by = ROOT
			NOT = { has_manpower_building_trigger = yes }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 10
				has_manpower_building_trigger = yes
				base_manpower = 5
			}
		} 

		effect = {  
			if = {
				limit = {
					has_dlc = "Golden Century"
				}
				custom_tooltip = AZT_UNLOCK_TELPOCHALLI_SCHOOLS_LOCAL_ORGANIZATION
				set_country_flag = azt_telpochalli_flag
			}
			else = {
				distribute_development = {
					type = tax
					amount = 10
				}
			}
			
			add_dip_power = 100
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			distribute_development = {
				type = manpower
				amount = 5
				limit = "
					has_manpower_building_trigger = yes
				"
			}
		} 
	}

	azt_calpulli_households = {
		icon = mission_calpulli_household
		position = 14
		required_missions = {
			azt_telpochcalli_schools
			azt_jaguars_and_eagles
		}
		provinces_to_highlight = {  
			country_or_non_sovereign_subject_holds = ROOT
			OR = {
				region = mexico_region
				region = central_america_region
			}
			OR = {
				NOT = { has_manpower_building_trigger = yes }
				NOT = { has_forcelimit_building_trigger = yes }
			}
		} 
	
		trigger = {  
			development_in_provinces = {
				OR = {
					region = mexico_region
					region = central_america_region
				}
				has_manpower_building_trigger = yes
				has_forcelimit_building_trigger = yes
				value = 100
			}
		} 

		effect = {  
			custom_tooltip = AZT_BUFF_MILITARY_BUILDINGS
			set_country_flag = azt_calpulli_houses_flag
			
			hidden_effect = {
				every_owned_province = {
					limit = {
						has_manpower_building_trigger = yes
					}
					add_province_modifier = {
						name = azt_barracks_households
						duration = -1
						hidden = yes
					}
				}
				every_owned_province = {
					limit = {
						has_forcelimit_building_trigger = yes
					}
					add_province_modifier = {
						name = azt_conscription_households
						duration = -1
						hidden = yes
					}
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			change_ruler_stat = {
				type = mil
				amount = 1
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			define_advisor = {
				type = quartermaster
				skill = 3
				cost_multiplier = 0.25
			}
		} 
	}
}
azt_missions_5 = {
	slot = 5
	generic = no
	ai = yes
	
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = {
		NOT = { map_setup = map_setup_random }
		is_random_new_world = no
		has_dlc = "Winds of Change"
		OR = {
			tag = AZT
			has_country_flag = unlock_aztec_missions_flag
		}
	} 

	azt_securing_obsidian = {
		icon = mission_obsidian_blades
		position = 2
		required_missions = { azt_western_expedition } 
		provinces_to_highlight = {  
			has_province_modifier = MAY_active_obsidian_source
		} 

		trigger = {  
			development_in_provinces = {
				has_province_modifier = MAY_active_obsidian_source
				value  = 50
			}
		} 

		effect = {  
			custom_tooltip = AZT_BUFF_OBSIDIAN_PRIVILEGE
			set_country_flag = azt_obsidian_blades_buff_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_years_of_owned_provinces_production_income = {
				years = 4
				trigger = {
					has_province_modifier = MAY_active_obsidian_source
				}
				custom_tooltip = AZT_FROM_OBSIDIAN
			}
		} 
	}

	azt_subduing_migratory_tribes = {
		icon = mission_iroquois_the_five_nations
		position = 4
		provinces_to_highlight = {  
			OR = {
				area = huasteca_area
				province_id = 2642
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 
	
		trigger = {  
			huasteca_area = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			2642 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 
	
		effect = {  
			huasteca_area = {
				change_culture = ROOT
				add_base_production = 1
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			2642 = {
				center_of_trade = 1
			}
		} 
	}

	azt_expansion_of_tenochtitlan = {
		icon = mission_tenochtitlan
		position = 7
		provinces_to_highlight = {  
			province_id = 852
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				NOT = { num_of_times_improved = 3 }
			}
		} 

		trigger = {  
			852 = {
				country_or_non_sovereign_subject_holds = ROOT
				num_of_times_improved = 3
			}
		} 

		effect = {  
			if = {
				limit = {
					852 = {
						has_province_modifier = azt_techchitlan_1
					}
				}
				852 = {
					add_base_tax = 2
					add_base_manpower = 2
					add_base_production = 2
				}
			}
			else = {
				852 = {
					add_province_modifier = {
						name = azt_techchitlan_1
						duration = -1
					}
				}
			}
		} 
	}

	azt_tenochitlan_aqueduct = {
		icon = mission_chapultepec_aqueduct
		position = 8
		required_missions = { azt_expansion_of_tenochtitlan } 
		provinces_to_highlight = {  
			province_id = 852
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				NOT = { num_of_buildings_in_province = 3 }
				NOT = { development = 20 }
			}
		} 

		trigger = {  
			852 = {
				country_or_non_sovereign_subject_holds = ROOT
				num_of_buildings_in_province = 3
				development = 20
			}
		} 

		effect = { 
			852 = {
				custom_tooltip = AZT_MODIFY_TENOCHITLAN_CITY_MODIFIER
				hidden_effect = {
					remove_province_modifier = azt_techchitlan_1
					add_province_modifier = {
						name = azt_techchitlan_2
						duration = -1
					}
				}
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				add_or_upgrade_university_building = yes
			}
		} 
	}

	azt_in_navel_of_the_moon = {
		icon = mission_lake_texcoco
		position = 10
		required_missions = { azt_capital_of_the_empire } 
		provinces_to_highlight = {  
			province_id = 852
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				NOT = { num_of_buildings_in_province = 5 }
				NOT = { development = 45 }
			}
		} 

		trigger = {  
			852 = {
				country_or_non_sovereign_subject_holds = ROOT
				num_of_buildings_in_province = 5
				development = 45
			}
		} 

		effect = {  
			852 = {
				custom_tooltip = AZT_MODIFY_TENOCHITLAN_CITY_MODIFIER_3
				hidden_effect = {
					remove_province_modifier = azt_techchitlan_3
					add_province_modifier = {
						name = azt_techchitlan_4
						duration = -1
					}
				}
				
				custom_tooltip = SEPERATOR_TOOLTIP
				if = {
					limit = { has_dlc = "Leviathan" }
					custom_tooltip = AZT_EXPAND_INFRASTRUCTURE_GIVES_REFORM_PROGRESS
				}
				set_province_flag = azt_tenochtitlan_expand_infrastructure_flag
			}
		} 
	}

	azt_prisoners_for_sacrifices = {
		icon = mission_blood_sacrifices
		position = 12
		required_missions = { azt_warrior_societies }

		trigger = {  
			num_of_battles = { amount = 100 }
			if = {
                limit = {
                    has_government_mechanic = blood_gathering_mechanic
                }
                has_government_power = {
                    mechanic_type = blood_gathering_mechanic
                    power_type = blood
                    value = 70
                }
            }	
		}

		effect = {  
			custom_tooltip = AZT_CAP_ON_BLOOD_FROM_CASUALTIES_IS_INCREASED_TO_40
			set_country_flag = azt_blood_cap_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_country_modifier = {
				name = azt_pleasing_the_gods
				duration = 7300
			}
		} 
	}

	azt_jaguars_and_eagles = {
		icon = mission_jaguar_knights
		position = 13

		trigger = {  
			army_tradition = 30
			OR = {
				monthly_mil = 13
				mil = 6
				ruler_has_personality = martial_educator_personality
			}
			if = {
				limit = {
					has_estate = estate_nobles
				}
				estate_loyalty = {
					estate = estate_nobles
					loyalty = 65
				}
			}
		} 

		effect = {  
			custom_tooltip = AZT_ALLOW_FREE_OFFICER_CORP
			set_country_flag = azt_free_officer_corp_flag
			hidden_effect = {
				if = {
					limit = {
						has_estate_privilege = estate_nobles_officer_corp
					}
					add_army_tradition = 5
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			create_general_with_pips = { tradition = 65 add_shock = 1 }
		} 
	}
}
