woc_moghulistan_1 = {
	slot = 1
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_moghulistan_nation = yes 
			AND = {
				was_moghulistan_nation = yes
				OR = {
					is_mongol_nation = yes
					is_tatar_nation = yes
					tag = MGE
					tag = YUA
					tag = ILK
					tag = GLH
				}
			}
		}
		NOT = { was_mongol_nation = yes }
		NOT = { was_tatar_nation = yes }
		has_dlc = "Winds of Change"
	}

	moghulistan_kazakhs = {
		icon = mission_kazakh_tribes
		position = 2
		required_missions = { moghulistan_at_the_centre_of_asia } 
		provinces_to_highlight = {  
			culture = khazak
			region = central_asia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			custom_trigger_tooltip = {
				tooltip = MOGHULISTAN_OWNS_ALL_KAZAKH_PROVINCES
				central_asia_region = {
					type = all
					OR = {
						AND = {
							culture = khazak
							country_or_non_sovereign_subject_holds = ROOT
						}
						NOT = { culture = khazak }
					}
				}
			}
		} 

		effect = {  
			add_accepted_culture_or_dip_power = { culture = khazak value = 100 } 
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_estate_loyalty = {
				estate = estate_nomadic_tribes
				loyalty = 10
			}
			
			give_claims = { region = ural_region }
			give_claims = { region = crimea_region }
		} 
	}

	moghulistan_persia = {
		icon = mission_into_persia_1
		position = 4
		required_missions = { moghulistan_into_iran } 
		provinces_to_highlight = {  
			region = persia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = persia_region
				value = 20
			}
		} 

		effect = {  
			custom_tooltip = TATARS_GAIN_DIP_POWER_PER_COT_IN_PERSIA
			hidden_effect = {
				every_owned_province = {
					limit = {
						region = persia_region
						province_has_center_of_trade_of_level = 1
					}
					owner = {
						add_dip_power = 25
					}
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			give_claims = { region = mashriq_region }
			give_claims = { region = anatolia_region }
		}
	}
	
	moghulistan_caucasia = {
		icon = mission_the_caucasus_rus
		position = 5
		required_missions = { moghulistan_persia } 
		provinces_to_highlight = {  
			region = caucasia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = caucasia_region
				value = 15
			}
		} 

		effect = {  
			custom_tooltip = HORDES_GRANT_HORDE_UNITY_PER_MOUNTAIN_PROVINCE_IN_REGION
			hidden_effect = {
				every_owned_province = {
					limit = {
						region = caucasia_region
						OR = {
							has_terrain = mountain
							has_terrain = hills
						}
					}
					owner = {
						add_legitimacy_equivalent = { amount = 2 republican_tradition = 2 }
					}
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_army_tradition_or_mil_power = { amount = 10 }
		} 
	}

	moghulistan_into_egypt = {
		icon = mission_egyptian_mamluk_soldier
		position = 6
		required_missions = { moghulistan_ilkhanate } 
		provinces_to_highlight = {
			OR = {
				region = mashriq_region
				region = egypt_region
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					region = mashriq_region
					region = egypt_region
				}
				value = 25
			}
		}

		effect = {
			if = {
				limit = {
					has_government_attribute = raze_province
				}
				custom_tooltip = TATARS_RAZING_CHURCHES_NOW_GRANTS_DUCATS
				set_country_flag = tatars_curch_raze_flag
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				complex_dynamic_effect = {
					first_custom_tooltip = TATARS_IF_CAIRO_AND_BAGHDAD_HAVE_BEEN_RAZED
					first_limit = "
						410 = {
							has_province_modifier = province_razed
						}
						361 = {
							has_province_modifier = province_razed
						}
					"
					first_effect = "
						change_innovativeness = 5
						add_adm_power = 50
						add_dip_power = 50
						add_mil_power = 50
					"
				}
			}
			else = {
				add_mil_power = 100
				add_prestige_or_monarch_power = { amount = 20 }
			}
		} 
	}

	moghulistan_tatars_conquest = {
		icon = mission_tatar_tribes
		position = 7
		provinces_to_highlight = {  
			OR = {
				region = crimea_region
				region = ural_region
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					region = crimea_region
					region = ural_region
				}
				value = 15
			}
		} 

		effect = {  
			add_country_modifier = {
				name = hordes_return_of_the_mongols_moghulistan
				duration = -1
			}
			
			give_claims = { region = crimea_region }
			give_claims = { region = ural_region }
		} 
	}

	moghulistan_golden_horde = {
		icon = mission_ulug_ulus
		position = 8
		required_missions = { moghulistan_tatars_conquest } 
		provinces_to_highlight = {  
			OR = {
				region = crimea_region
				region = ural_region
			}
			is_city = yes
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			crimea_region = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					is_city = no
				}
			}
			ural_region = {
				type = all
				OR = {
					country_or_non_sovereign_subject_holds = ROOT
					is_city = no
				}
			}
		} 

		effect = {
			add_estate_loyalty = {
				estate = estate_nomadic_tribes
				loyalty = 10
			}
			
			add_army_tradition_or_mil_power = { amount = 10 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			country_event_with_option_insight = {
				id = horde_mission_events.10
				option_1 = "
					custom_tooltip = HORDES_RELEASE_GOLDEN_HORDE
				"
				option_2 = "
					add_adm_power = 100
				"
			}
		} 
	}

	moghulistan_ryazan = {
		icon = mission_cossack_cavalry
		position = 9
		required_missions = { moghulistan_nizhny_novgorod } 
		provinces_to_highlight = {  
			OR = {
				province_id = 301
				province_id = 300
				province_id = 4255
				province_id = 2408
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			301 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			300 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			4255 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			2408 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 

		effect = {  
			add_country_modifier = {
				name = tatars_fall_of_ryazan_modifier
				duration = 5475
			}
			
			add_legitimacy_equivalent = { amount = 10 republican_tradition = 5 }
		} 
	}
}

woc_moghulistan_2 = {
	slot = 2
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_moghulistan_nation = yes 
			AND = {
				was_moghulistan_nation = yes
				OR = {
					is_mongol_nation = yes
					is_tatar_nation = yes
					tag = MGE
					tag = YUA
					tag = ILK
					tag = GLH
				}
			}
		}
		NOT = { was_mongol_nation = yes }
		NOT = { was_tatar_nation = yes }
		has_dlc = "Winds of Change"
	}

	moghulistan_at_the_centre_of_asia = {
		icon = mission_central_asian_steppes
		position = 1

		trigger = {  
			OR = {
				army_size_percentage = 0.9
				army_size = 10 # modified
			}
			num_of_generals = 1
		} 

		effect = {  
			create_general_with_pips = { tradition = 40 add_siege = 1 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			give_claims = { region = central_asia_region }
		}
	}

	moghulistan_revenge_against_timur = {
		icon = aq_qoyunlu_dethrone_the_timurids
		position = 2
		required_missions = { moghulistan_at_the_centre_of_asia } 
		provinces_to_highlight = {  
			if = {
				limit = {
					exists = TIM
				}
				is_capital_of = TIM
			}
			else = {
				province_id = 454
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
			}
		} 

		trigger = {  
			if = {
				limit = {
					exists = TIM
				}
				OR = {
					has_won_war_against = {
						who = TIM
						max_years_since = 25
					}
					war_score_against = {
						who = TIM
						value = 80
					}
				}
			}
			else = {
				454 = {
					country_or_non_sovereign_subject_holds = ROOT
				}
			}
		} 

		effect = {  
			give_claims = { region = khorasan_region }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			create_general_with_pips = { tradition = 60 add_siege = 1 }
		} 
	}

	moghulistan_into_iran = {
		icon = per_protect_the_west_iranian
		position = 3
		required_missions = {
			moghulistan_revenge_against_timur
			moghulistan_unification_of_chagatai
			moghulistan_kazakhs
		}
		provinces_to_highlight = {  
			region = khorasan_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = khorasan_region
				value = 15
			}
		} 

		effect = {  
			add_years_of_income = 0.6
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			change_government_reform_progress = 50

			custom_tooltip = SEPERATOR_TOOLTIP

			give_claims = { region = persia_region }
		}
	}

	moghulistan_ilkhanate = {
		icon = mission_ilkhanate
		position = 5
		required_missions = {
			moghulistan_persia
			moghulistan_into_iran
		}
		provinces_to_highlight = {  
			OR = {
				region = khorasan_region
				region = persia_region
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			khorasan_region = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
			persia_region = {
				type = all
				country_or_non_sovereign_subject_holds = ROOT
			}
		}

		effect = {
			country_event_with_option_insight = {
				id = horde_mission_events.5
				option_1 = "
					custom_tooltip = HORDES_RESTORE_YUAN_IN_PERSIA
					custom_tooltip = MONGOL_BROTHER_REALM_EXPLANATION
				"
				option_2 = "
					add_adm_power = 100
					add_mercantilism_or_monarch_power = { amount = 3 }
				"
				option_3 = "
					change_tag = ILK
				"
			}
		} 
	}

	moghulistan_anatolia = {
		icon = anatolian_frontier
		position = 6
		required_missions = { moghulistan_ilkhanate } 
		provinces_to_highlight = {  
			region = anatolia_region
			province_is_on_an_island = no
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = anatolia_region
				province_is_on_an_island = no
				value = 15
			}
		}

		effect = {  
			custom_tooltip = MOGHULISTAN_ORGANIZER_GRANTS_RAZE_GAIN
			set_country_flag = moghulistan_organizer_flag
			
			add_estate_loyalty = {
				estate = estate_nomadic_tribes
				loyalty = 15
			}
		} 
	}

	moghulistan_nizhny_novgorod = {
		icon = mission_conquer_50_development
		position = 8
		required_missions = {
			moghulistan_tatars_conquest
			moghulistan_tatar_yoke
		}
		provinces_to_highlight = {  
			area = galich_area
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				area = galich_area
				value = 3
			}
			306 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 

		effect = {  
			add_mil_power = 50
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			give_claims = { region = russia_region }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = MOGHULISTAN_MODIFY_RETURN_OF_THE_MONGOLS_1
			hidden_effect = {
				remove_country_modifier = hordes_return_of_the_mongols_moghulistan
				add_country_modifier = {
					name = hordes_return_of_the_mongols_moghulistan_1
					duration = -1
				}
			}
		}
	}

	moghulistan_russia = {
		icon = mission_plc_break_the_rus
		position = 10
		required_missions = {
			moghulistan_raid_ruthenia
			moghulistan_ryazan
		}
		provinces_to_highlight = {  
			region = russia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

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

		effect = {
			if = {
				limit = {
					has_dlc = "The Cossacks"
				}
				add_country_modifier = {
					name = hordes_cossacks
					duration = -1
				}
			}
			else = {
				add_yearly_manpower = 1.5
				add_mil_power = 100
			}
			
			add_prestige_or_monarch_power = { amount = 20 }
		}  
	}
}

woc_moghulistan_3 = {
	slot = 3
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_moghulistan_nation = yes 
			AND = {
				was_moghulistan_nation = yes
				OR = {
					is_mongol_nation = yes
					is_tatar_nation = yes
					tag = MGE
					tag = YUA
					tag = ILK
					tag = GLH
				}
			}
		}
		NOT = { was_mongol_nation = yes }
		NOT = { was_tatar_nation = yes }
		has_dlc = "Winds of Change"
	}

	moghulistan_unification_of_chagatai = {
		icon = mission_chagatai
		position = 2
		required_missions = { moghulistan_at_the_centre_of_asia } 
		provinces_to_highlight = {  
			OR = {
				area = jetysuu_area
				area = zungaria_area
				area = kashgaria_area
				area = shanshan_area
				area = tarim_basin_area
			}
			if = {
				limit = {
					OR = {
						tag = CHG
						tag = KAS
					}
				}
				owned_by = ROOT
			}
			else = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		} 

		trigger = {  
			if = {
				limit = {
					OR = {
						tag = CHG
						tag = KAS
					}
				}
				num_of_owned_provinces_with = {
					OR = {
						area = jetysuu_area
						area = zungaria_area
						area = kashgaria_area
						area = shanshan_area
						area = tarim_basin_area
					}
					value = 15
				}
			}
			else = {
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					OR = {
						area = jetysuu_area
						area = zungaria_area
						area = kashgaria_area
						area = shanshan_area
						area = tarim_basin_area
					}
					value = 15
				}
			}
		} 

		effect = {  
			if = {
				limit = {
					tag = CHG
				}
				override_country_name = CHAGATAI
				set_country_flag = chagatai_formed_flag
				set_country_flag = is_CHAGATAI_flag
			}
			
			custom_tooltip = MOGHULISTAN_MODIFY_GUARANTEED_LEADERSHIP_OF_HOST
			set_country_flag = hordes_no_at_for_guaranteed_leadership_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			hidden_effect = {
				if = {
					limit = {
						has_estate_privilege = estate_nomadic_tribes_guaranteed_leadgership_in_host
					}
					add_army_tradition = 5
				}
			}
			
			complex_dynamic_effect = {
				first_custom_tooltip = MOGHULISTAN_OF_GOLD_PROVINCE_OWNED
				first_limit = "
					2121 = {
						country_or_non_sovereign_subject_holds = ROOT
					}
				"
				first_effect = "
					2121 = {
						add_base_production = 3
					}
				"
			}
		} 
	}

	moghulistan_india = {
		icon = mission_indian_empire
		position = 4
		required_missions = {
			moghulistan_unification_of_chagatai
			moghulistan_into_iran
		}
		provinces_to_highlight = {  
			region = hindusthan_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = hindusthan_region
				value = 20
			}
			522 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}

		effect = {  
			add_country_modifier = {
				name = hordes_fall_of_hindustan
				duration = 5475
			}
			
			change_ruler_stat = {
				type = mil
				amount = 1
			}
		} 
	}

	moghulistan_southern_china = {
		icon = qng_conquer_south_china
		position = 6
		required_missions = { moghulistan_dragons_gate } 
		provinces_to_highlight = {  
			OR = {
				region = south_china_region
				region = xinan_region
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					region = south_china_region
					region = xinan_region
				}
				value = 25
			}
		} 

		effect = {
			add_prestige_or_monarch_power = { amount = 10 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			if = {
				limit = {
					has_dlc = "Rights of Man"
					NOT = { num_of_ruler_traits = { amount = 3 } }
					NOT = { ruler_has_personality = conqueror_personality }
				}
				add_ruler_personality = legendary_conqueror_personality
				
				custom_tooltip = SEPERATOR_TOOLTIP
			}
			else_if = {
				limit = {
					has_dlc = "Rights of Man"
					ruler_has_personality = conqueror_personality
				}
				
				remove_ruler_personality = conqueror_personality	
				add_ruler_personality = legendary_conqueror_personality
				
				custom_tooltip = SEPERATOR_TOOLTIP
			}
			
			complex_dynamic_effect = {
				first_custom_tooltip = TATARS_IF_YUAN_SUBJECT
				first_limit = "
					YUA = {
						is_subject_of = ROOT
					}
				"
				first_effect = "
					add_army_tradition_or_mil_power = { amount = 5 }
					
					custom_tooltip = SEPERATOR_TOOLTIP
					
					create_general_with_pips = { tradition = 60 add_shock = 1 add_manuever = 1 }
				"
			}
		}  
	}

	moghulistan_tatar_yoke = {
		icon = mission_break_the_tatar_yoke
		position = 7
		provinces_to_highlight = {  
			region = russia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		}

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

		effect = {  
			add_estate_loyalty = {
				estate = estate_nomadic_tribes
				loyalty = 10
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			give_claims = { area = galich_area }
			give_claims = { area = suzdal_area }
			give_claims = { id = 2423 }
			give_claims = { id = 1778 }
		} 
	}

	moghulistan_raid_ruthenia = {
		icon = mission_rule_ruthenia
		position = 9
		required_missions = { moghulistan_nizhny_novgorod } 
		provinces_to_highlight = {  
			region = ruthenia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = ruthenia_region
				value = 25
			}
		} 

		effect = {  
			custom_tooltip = MOGHULISTAN_MODIFY_RETURN_OF_THE_MONGOLS_2
			hidden_effect = {
				remove_country_modifier = hordes_return_of_the_mongols_moghulistan_1
				add_country_modifier = {
					name = hordes_return_of_the_mongols_moghulistan_2
					duration = -1
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			give_claims = { region = carpathia_region }
		}
	}

	moghulistan_pax_mongolica = {
		icon = mission_mongol_peace
		position = 11
		required_missions = {
			moghulistan_carpathia
			moghulistan_russia
		}
		trigger = {  
			tag = MGE
			mission_completed = moghulistan_anatolia
			mission_completed = moghulistan_dragon_throne
		} 

		effect = {
			country_event_with_effect_insight = {
				id = horde_mission_events.7
				effect = "
					custom_tooltip = HORDES_CREATE_PAX_MONGOLICA_MODIFIER_MOGHULISTAN
            
					custom_tooltip = SEPERATOR_TOOLTIP
					
					if = {
						limit = {
							has_dlc = \"Rights of Man\"
						}
						custom_tooltip = HORDES_CONQUERORS_GUARANTEED
						set_country_flag = hordes_guaranteed_conquerors
					}
					else = {
						change_mil = 2
						add_mil_power = 100
					}
				"
			}
		} 
	}
}
woc_moghulistan_4 = {
	slot = 4
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_moghulistan_nation = yes 
			AND = {
				was_moghulistan_nation = yes
				OR = {
					is_mongol_nation = yes
					is_tatar_nation = yes
					tag = MGE
					tag = YUA
					tag = ILK
					tag = GLH
				}
			}
		}
		NOT = { was_mongol_nation = yes }
		NOT = { was_tatar_nation = yes }
		has_dlc = "Winds of Change"
	}

	moghulistan_secure_trade_posts = {
		icon = mission_horde_caravans
		position = 1
		provinces_to_highlight = {  
			region = central_asia_region
			province_has_center_of_trade_of_level = 1
		} 

		trigger = {  
			OR = {
				development_in_provinces = {
					region = central_asia_region
					province_has_center_of_trade_of_level = 1
					value = 25
				}
				454 = {
					is_strongest_trade_power = ROOT
				}
			}
		} 

		effect = {  
			add_mercantilism_or_monarch_power = { amount = 3 }
			
			distribute_development = {
				type = production
				amount = 5
			}
		} 
	}

	moghulistan_control_over_northern_yuan = {
		icon = qng_end_yuan
		position = 3
		required_missions = {
			moghulistan_secure_trade_posts
			moghulistan_contact_with_mongols
			moghulistan_unification_of_chagatai
		}
		provinces_to_highlight = {  
			region = mongolia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = mongolia_region
				value = 15
			}
		} 

		effect = {  
			add_country_modifier = {
				name = tatars_like_a_dragon
				duration = -1
			}
			
			give_claims = { region = north_china_region }
			give_claims = { region = manchuria_region }
		} 
	}

	moghulistan_dragons_gate = {
		icon = mch_bypass_great_wall
		position = 5
		required_missions = { moghulistan_control_over_northern_yuan } 
		provinces_to_highlight = {  
			OR = {
				area = ordos_area
				area = gansu_area
				area = west_gansu_area
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					area = ordos_area
					area = gansu_area
					area = west_gansu_area
				}
				value = 6
			}
			698 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}

		effect = {  
			give_claims = { region = korea_region }
			country_event_with_effect_insight = {
				id = horde_mission_events.8
				effect = "
					add_army_tradition_or_mil_power = { amount = 10 }
		
					custom_tooltip = SEPERATOR_TOOLTIP
		
					if = {
						limit = {
							has_dlc = \"Leviathan\"
						}
						custom_tooltip = HORDES_UNLOCK_GREAT_WALL_OF_CHINA
						set_country_flag = hordes_unlocked_wall_of_china
					}
					else = {
						698 = {
							add_or_upgrade_fort_building = yes
						}
					}
				"
			}
		}
	}

	moghulistan_northern_china = {
		icon = mission_tumu_crisis
		position = 6
		required_missions = { moghulistan_dragons_gate } 
		provinces_to_highlight = {  
			region = north_china_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = north_china_region
				value = 20
			}
			1816 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
		}

		effect = {
			give_claims = { region = south_china_region }
			give_claims = { region = xinan_region }
			give_claims = { region = tibet_region }
			
			custom_tooltip = SEPERATOR_TOOLTIP
		
			add_prestige_or_monarch_power = { amount = 10 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = TATARS_MODIFY_LIKE_A_DRAGON_MODIFIER_1
			hidden_effect = {
				remove_country_modifier = tatars_like_a_dragon
				add_country_modifier = {
					name = tatars_like_a_dragon_1
					duration = -1
				}
			}
		}
	}

	moghulistan_dragon_throne = {
		icon = mission_seize_the_dragon_throne
		position = 7
		required_missions = {
			moghulistan_southern_china
			moghulistan_northern_china
		}
		provinces_to_highlight = {  
			OR = {
				region = north_china_region
				region = south_china_region
				region = xinan_region
			}
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {
			1816 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			1821 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			667 = {
				country_or_non_sovereign_subject_holds = ROOT
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					region = north_china_region
					region = south_china_region
					region = xinan_region
				}
				value = 100
			}
		}

		effect = {
			add_country_modifier_for_age = {
				name = hordes_fall_of_china
				age = age_of_reformation
			}
			
			add_legitimacy_equivalent = { amount = 15 republican_tradition = 10 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = TATARS_MODIFY_LIKE_A_DRAGON_MODIFIER_2
			hidden_effect = {
				remove_country_modifier = tatars_like_a_dragon_1
				add_country_modifier = {
					name = tatars_like_a_dragon_2
					duration = -1
				}
			}
		} 
	}

	moghulistan_carpathia = {
		icon = mission_destroy_the_hungarians
		position = 10
		required_missions = {
			moghulistan_land_raids
			moghulistan_raid_ruthenia
		}
		provinces_to_highlight = {  
			region = carpathia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = carpathia_region
				value = 20
			}
		}

		effect = {  
			country_event_with_effect_insight = {
				id = horde_mission_events.1
				effect = "
					custom_tooltip = HORDES_UNLOCK_HUNGARIAN_COMPANIES
					set_country_flag = hordes_unlock_hungarian_mercenaries_flag
					
					custom_tooltip = SEPERATOR_TOOLTIP
					
					add_ruler_personality = reaver_personality
					add_mil_power = 50
				"
			}
		} 
	}
}
woc_moghulistan_5 = {
	slot = 5
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_moghulistan_nation = yes 
			AND = {
				was_moghulistan_nation = yes
				OR = {
					is_mongol_nation = yes
					is_tatar_nation = yes
					tag = MGE
					tag = YUA
					tag = ILK
					tag = GLH
				}
			}
		}
		NOT = { was_mongol_nation = yes }
		NOT = { was_tatar_nation = yes }
		has_dlc = "Winds of Change"
	}

	moghulistan_contact_with_mongols = {
		icon = mission_oirat
		position = 2
		provinces_to_highlight = {  
			region = mongolia_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 
	
		trigger = {  
			OR = {
				AND = {
					OR = {
						OIR = {
							has_been_insulted_by_root = yes
						}
						is_enemy = OIR
					}
					army_size = 10 # modified
				}
				num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
					region = mongolia_region
					value = 10
				}
			}
		}
	
		effect = {  
			give_claims = { region = mongolia_region }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = TATARS_UNLOCK_YUAN_RESTORATION_DECISION
			
			set_country_flag = hordes_yuan_restoration
		} 
	}
	

	moghulistan_manchuria = {
		icon = mission_manchu_warrior
		position = 4
		required_missions = { moghulistan_control_over_northern_yuan } 
		provinces_to_highlight = {  
			region = manchuria_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = manchuria_region
				value = 20
			}
		} 

		effect = {
			capital_scope = {
				add_base_manpower = 1
				add_base_tax = 2
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			custom_tooltip = TATARS_RAZING_GRANTS_TRIBES_LOYALTY
			set_country_flag = hordes_unlock_tribes_loyalty_through_razing_flag
		} 
	}

	moghulistan_korea = {
		icon = mjz_into_korea
		position = 6
		required_missions = { moghulistan_dragons_gate } 
		provinces_to_highlight = {  
			region = korea_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = korea_region
				value = 15
			}
		}

		effect = {  
			custom_tooltip = HORDES_SHARE_SPOILS_GRANTS_TECH_COST_REDUCTION
			set_country_flag = hordes_share_spoils_buff_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_legitimacy_equivalent = { amount = 10 republican_tradition = 5 }

			custom_tooltip = SEPERATOR_TOOLTIP

			give_claims = { region = japan_region }
		}
	}

	moghulistan_japan = {
		icon = jap_train_samurai
		position = 8
		required_missions = { moghulistan_korea } 
		provinces_to_highlight = {  
			region = japan_region
			NOT = { country_or_non_sovereign_subject_holds = ROOT }
		} 

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				region = japan_region
				value = 20
			}
		} 

		effect = {  
			define_advisor = {
				type = army_reformer
				skill = 2
				cost_multiplier = 0.5
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			if = {
				limit = {
					has_dlc = "Rule Britannia"
				}
				set_country_flag = unlocked_japanese_atakebuna_doctrine_flag
				custom_tooltip = HORDES_UNLOCK_JAPANESE_NAVAL_DOCTRINE
			}
			else = {
				add_navy_tradition = 15
				add_dip_power = 100
			}
		} 
	}

	moghulistan_land_raids = {
		icon = mission_non-western_cavalry_raid
		position = 9
		trigger = {  
			if = {
				limit = {
					has_government_attribute = raze_province
				}
				custom_trigger_tooltip = {
					tooltip = TATARS_RAIZED_20_PROVINCES
					check_variable = {
						which = HordeProvincesRazed
						value = 20
					}
				}
			}
			else = {
				army_size = 10 # modified
			}
		} 

		effect = {  
			add_country_modifier = {
				name = tatars_raiding_traditions
				duration = 5475
			}
			
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				custom_tooltip = HORDES_UNLOCK_REAVER_RULER_PERSONALITY
				set_country_flag = unlocked_reaver_personality_flag
			}
			else = {
				change_ruler_stat = {
					type = mil
					amount = 2
				}
			}
		}
	}
}
