woc_flavor_hordes_1 = {
	slot = 1
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = MGE
			tag = ILK
			tag = GLH
		}
		NOT = { was_tag = YUA }
		has_dlc = "Winds of Change"
	}
	
	tatars_strengthen_tribal_wargames = {
		icon = mission_tribal_wargames
		position = 12
		required_missions = { tatars_tribal_allegiance }
	
		trigger = {  
			num_of_battles = { amount = 50 }
			army_size = 20 # modified
			is_at_war = no
			has_regency = no
		} 
	
		effect = {
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				custom_tooltip = HORDES_GENERALS_CREATED_FROM_WARGAMES_INCREASED_CHANCE_AND_BETTER_STATS
				set_country_flag = horde_wargames_buff_flag
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				custom_tooltip = HORDES_WARGAMES_GRANT_HORDE_UNITY
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				country_event = { id = randomeventsstapehordes.8 }
			}
			else = {
				add_mil_power = 100
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				add_prestige_or_monarch_power = { amount = 10 }
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				create_general_with_pips = { tradition = 40 add_siege = 1 add_shock = 1 }
			}
		} 
	}
}
	
woc_shared_hordes_1 = {
	slot = 1
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
		has_dlc = "Winds of Change"
	}

	tatars_religious_question = {
		icon = mission_hands_praying
		position = 14

		trigger = {
			OR = {
				num_of_owned_provinces_with = {
					NOT = { religion = ROOT }
					value = 25
				}
				num_of_converted_provinces = { amount = 10 }
			}
		} 

		effect = {  
			if = {
				limit = {
					ai = no
				}
				custom_tooltip = HORDES_UNLOCK_PREVIEW_OF_RELIGIOUS_BRANCHING_MISSIONS
				enable_branching_mission_review_without_ai = { key = HORDES }
				set_country_flag = hordes_preview_religious_missions_flag
			}
			else = {
				random_list = {
					10 = {
						set_country_flag = hordes_tolerance_branch_flag
					}
					10 = {
						set_country_flag = hordes_devout_branch_flag
					}
					100 = {
						trigger = {
							OR = {
								religion = confucianism
								is_or_was_mongol_nation = yes
							}
						}
						set_country_flag = hordes_confucian_branch_flag
					}
				}
				swap_non_generic_missions = yes
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			define_advisor = {
				type = theologian
				skill = 2
				cost_multiplier = 0.5
			}
		} 
	}
}

woc_hordes_1_branching = {
	slot = 1
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		has_dlc = "Winds of Change"
		NOT = {
			OR = {
				has_country_flag = hordes_tolerance_branch_flag
				has_country_flag = hordes_devout_branch_flag
				has_country_flag = hordes_confucian_branch_flag
			}
		}
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
	}

	tatars_branching1 = {
		icon = mission_unknown_mission
		position = 15
		required_missions = { tatars_religious_question } 
		trigger = { custom_trigger_tooltip = { tooltip = HORDES_this_is_a_branching_mission always = no } }
		effect = { custom_tooltip = HORDES_this_is_a_branching_mission }
	}

	tatars_branching2 = {
		icon = mission_unknown_mission
		position = 16
		required_missions = { tatars_branching1 } 
		trigger = { custom_trigger_tooltip = { tooltip = HORDES_this_is_a_branching_mission always = no } }
		effect = { custom_tooltip = HORDES_this_is_a_branching_mission }
	}
}

woc_hordes_1_tolerance = {
	slot = 1
	generic = no
	ai = yes
	has_country_shield = yes
	potential = { 
		has_dlc = "Winds of Change"
		has_country_flag = hordes_tolerance_branch_flag
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
	}
	
	tatars_tolerance1 = {
		icon = mission_reliable_allies
		position = 15
		required_missions = { tatars_religious_question }

		trigger = {  
			not_in_mission_preview_mode = { key = HORDES }
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				NOT = { religion = ROOT }
				num_of_times_improved_by_owner = 2
				value = 10
			}
		} 

		effect = {  
			custom_tooltip = HORDES_THEOLOGIAN_GRANTS_TOLERANCE_OF_HERETICS_AND_HEATHENS
			set_country_flag = hordes_theologian_tolerance_buff_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			define_advisor = {
				type = theologian
				skill = 3
				cost_multiplier = 0.5
			}
		} 
	}

	tatars_tolerance2 = {
		icon = mission_mosque
		position = 16
		required_missions = { tatars_tolerance1 } 
		provinces_to_highlight = {  }

		trigger = {  
			not_in_mission_preview_mode = { key = HORDES }
			religious_unity = 1
			theologian = 3
			if = {
				limit = { has_dlc = "Rights of Man" }
				OR = {
					ruler_has_personality = tolerant_personality
					full_idea_group = humanist_ideas
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						NOT = { religion = ROOT }
						has_tax_building_trigger = yes
						value = 25
					}
				}
			}
			else = {
				OR = {
					full_idea_group = humanist_ideas
					num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
						NOT = { religion = ROOT }
						has_tax_building_trigger = yes
						value = 25
					}
				}
			}
		} 

		effect = {
			custom_tooltip = HORDES_UNLOCK_RELIGIOUS_TOLERANCE_TRIBAL_PRIVILEGE
			set_country_flag = hordes_religious_tolerance_tribal_privilege_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			distribute_development = {
				type = production
				amount = 5
			}
			
			distribute_development = {
				type = tax
				amount = 5
			}
		} 
	}
}

woc_hordes_1_devout = {
	slot = 1
	generic = no
	ai = yes
	has_country_shield = yes
	potential = { 
		has_dlc = "Winds of Change"
		has_country_flag = hordes_devout_branch_flag
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
	}
	
	tatars_devout1 = {
		icon = mission_raid_on_genoa
		position = 15
		required_missions = { tatars_religious_question } 

		trigger = {  
			not_in_mission_preview_mode = { key = HORDES }
			num_of_converted_provinces = {
				amount = 30
			}
			if = {
				limit = {
					is_nomad = yes
				}
				custom_trigger_tooltip = {
					tooltip = TATARS_RAIZED_35_PROVINCES
					check_variable = {
						which = HordeProvincesRazed
						value = 35
					}
				}
			}
			else = {
				num_of_cavalry = 15 # modified
			}
			inquisitor = 3
		} 

		effect = {  
			if = {
				limit = {
					religion = tengri_pagan_reformed
				}
				add_country_modifier = {
					name = hordes_followers_of_tengri
					duration = 7300
				}
			}
			else_if = {
				limit = {
					religion_group = muslim
				}
				add_country_modifier = {
					name = hordes_muslims_of_the_steppes
					duration = 7300
				}
			}
			else = {
				add_country_modifier = {
					name = horde_tribal_zealotry
					duration = 7300
				}
			}
			if = {
				limit = { has_dlc = "Rights of Man" }
				add_ruler_personality = zealot_personality
			}
		} 
	}

	tatars_devout2 = {
		icon = mission_break_the_tatar_yoke
		position = 16
		required_missions = { tatars_devout1 }

		trigger = {  
			not_in_mission_preview_mode = { key = HORDES }
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				religion = ROOT
				value = 150
			}
			if = {
				limit = { has_dlc = "Rights of Man" }
				OR = {
					ruler_has_personality = zealot_personality
					full_idea_group = religious_ideas
					AND = {
						inquisitor = 3
						monthly_adm = 12
					}
				}
			}
			else = {
				OR = {
					full_idea_group = religious_ideas
					AND = {
						inquisitor = 3
						monthly_adm = 12
					}
				}
			}
		} 

		effect = {  
			if = {
				limit = {
					religion = tengri_pagan_reformed
				}
				custom_tooltip = TENGRI_REMOVE_PRESTIGE_PENALTY_FROM_SWITCHING_SECONDARY_RELIGION
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				add_prestige_or_monarch_power = { amount = 15 }
			}
			else_if = {
				limit = {
					religion_group = muslim
				}
				
				set_country_flag = easier_unify_islam_flag
				if = {
					limit = { has_dlc = "Cradle of Civilization" }
					custom_tooltip = HORDES_EASIER_ISLAM_UNIFICATION
					custom_tooltip = SEPERATOR_TOOLTIP
				}
				else = {
					change_piety_effect = {
						amount = 0.25
					}
				}
				
				add_prestige_or_monarch_power = { amount = 15 }
			}
			else = {
				add_country_modifier = {
					name = hordes_religion_of_the_steppes
					duration = -1
				}
			}
		} 
	}
}

woc_hordes_1_confucian = {
	slot = 1
	generic = no
	ai = yes
	has_country_shield = yes
	potential = { 
		has_dlc = "Winds of Change"
		has_country_flag = hordes_confucian_branch_flag
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
	}
	
	tatars_confucian1 = {
		icon = mng_expand_yongle_dadian
		position = 15
		required_missions = { tatars_religious_question }

		trigger = {  
			not_in_mission_preview_mode = { key = HORDES }
			if = {
				limit = {
					has_dlc = "Mandate of Heaven"
				}
				has_harmonized_with = pagan
			}
			else = {
				development_in_provinces = {
					religion_group = pagan
					value = 200
				}
			}
			religious_unity = 0.9
		} 

		effect = {
			if = {
				limit = {
					has_dlc = "Mandate of Heaven"
				}
				add_country_modifier = {
					name = hordes_harmony_between_tengri_and_china
					duration = 7300
				}
			}
			else = {
				add_adm_power = 150
				change_adm = 1
			}
			
			custom_tooltip = HORDES_ALL_TENGRI_BONUSES_WILL_GAIN_THE_FOLLOWING
			tooltip = {
				capital_scope = {
					add_province_modifier = {
						name = hordes_integration_into_chinese_society
						duration = 5475
					}
				}
			}
			hidden_effect = {
				every_owned_province = {
					limit = {
						religion = tengri_pagan_reformed
					}
					add_province_modifier = {
						name = hordes_integration_into_chinese_society
						duration = 5475
					}
				}
			}
		}  
	}

	tatars_confucian2 = {
		icon = mng_inward_perfection
		position = 16
		required_missions = { tatars_confucian1 }

		trigger = {  
			not_in_mission_preview_mode = { key = HORDES }
			if = {
				limit = {
					has_dlc = "Mandate of Heaven"
				}
				num_of_harmonized = 4
				harmony = 75
			}
			else = {
				theologian = 3
				monthly_adm = 10
			}
			if = {
				limit = {
					has_estate = estate_church
				}
				estate_loyalty = {
					estate = estate_church
					loyalty = 70
				}
			}
		}  

		effect = {  
			if = {
				limit = {
					is_emperor_of_china = yes
				}
				add_mandate = 10
			}
			
			if = {
				limit = {
					has_dlc = "Mandate of Heaven"
				}
				custom_tooltip = HORDES_MODIFY_INWARD_PERFECTION_PRIVILEGE
				set_country_flag = hordes_inward_perfection_buff_flag
			}
			else = {
				change_adm = 1
				add_stability_or_adm_power = yes
			}
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_country_modifier = {
				name = hordes_harmony_of_faith
				duration = -1
			}
		}  
	}
}

woc_flavor_hordes_2 = {
	slot = 2
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = MGE
			tag = ILK
			tag = GLH
		}
		NOT = { was_tag = YUA }
		has_dlc = "Winds of Change"
	}
	
	tatars_tribal_allegiance = {
		icon = mission_tribal_allegiance
		position = 11

		trigger = {  
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				estate_loyalty = {
					estate = estate_nomadic_tribes
					loyalty = 65
				}
			}
			legitimacy_equivalent = 100
		} 
	
		effect = {
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				change_estate_land_share = {
					estate = estate_nomadic_tribes
					share = -5
				}
			}
			else = {
				add_prestige_or_monarch_power = { amount = 10 }
			}
			
			if = {
				limit = {
					NOT = { army_size_percentage = 1 }
				}
				capital_scope = {
					build_to_forcelimit = {
						cavalry = 1
					}
				}
				custom_tooltip = HORDES_BUILD_UP_TO_FORCELIMIT
			}
			else = {
				add_yearly_manpower = 0.8
			}
		}
	}

	tatars_managing_tribes = {
		icon = mission_tribe_management
		position = 13
		required_missions = { tatars_strengthen_tribal_wargames }
	
		trigger = {  
			crown_land_share = 65
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				NOT = {
					estate_influence = {
						estate = estate_nomadic_tribes
						influence = 65
					}
				}
				estate_loyalty = {
					estate = estate_nomadic_tribes
					loyalty = 60
				}
			}
			else = {
				ruler_total_stats = {
					amount = 9
				}
			}
		}
	
		effect = {
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				custom_tooltip = TATARS_UNLOCK_TRIBAL_ABSOLUTISM
				set_country_flag = hordes_tribal_absolutism_flag
			}
			else = {
				change_adm = 2
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_country_modifier = {
				name = hordes_curtailing_the_tribes
				duration = 5475
			}
		} 
	}
}

woc_shared_hordes_2 = {
	slot = 2
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
		has_dlc = "Winds of Change"
	}

	tatars_religious_unity = {
		icon = mission_horde_religion
		position = 15
		required_missions = { tatars_religious_question }

		trigger = {  
			religious_unity = 1
			OR = {
				num_of_owned_provinces_with = {
					NOT = { religion = ROOT }
					value = 50
				}
				num_of_converted_provinces = { amount = 50 }
			}
		}

		effect = {
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				custom_tooltip = HORDES_IF_RULER_HAS_SINNER_REMOVE
			
				custom_tooltip = SEPERATOR_TOOLTIP
				
				hidden_effect = {
					remove_ruler_personality = sinner_personality
				}
			}
			
			add_adm_power = 50
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			if = {
				limit = {
					is_nomad = yes
				}
				unlock_estate = { estate = estate_church }
			}
			else = {
				add_country_modifier = {
					name = hordes_unity_of_faith
					duration = 7300
				}
			}
		}  
	}
}

woc_flavor_hordes_3 = {
	slot = 3
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = MGE
			tag = ILK
			tag = GLH
		}
		NOT = { was_tag = YUA }
		has_dlc = "Winds of Change"
	}
	
	tatars_enable_nobility = {
		icon = mission_noble_tribes
		position = 12
		required_missions = {
			tatars_tribal_allegiance
			tatars_strengthen_basqaq_governors
		}

		trigger = {  
			crown_land_share = 45
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				estate_loyalty = {
					estate = estate_nomadic_tribes
					loyalty = 70
				}
			}
			else = {
				total_development = 500
			}
		} 

		effect = {
			unlock_estate = { estate = estate_nobles }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_yearly_manpower = 0.7
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_army_tradition_or_mil_power = { amount = 5 }
		}
	}

	tatars_any_child_can_be_khan = {
		icon = mission_hunting
		position = 14
		required_missions = {
			tatars_buff_tributaries
			tatars_managing_tribes
		}
	
		trigger = {  
			monthly_adm = 11
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				estate_loyalty = {
					estate = estate_nomadic_tribes
					loyalty = 80
				}
			}
			num_of_battles = { amount = 200 }
			OR = {
				mil = 4
				has_mil_advisor_3 = yes
			}
		} 
	
		effect = {  
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				custom_tooltip = HORDES_SECURE_SUCCESSION_WILL_MAKE_TRIBAL_SUCCESSION_CRISIS_NOT_FIRE
				set_country_flag = hordes_any_child_can_be_khans_flag
				
				custom_tooltip = SEPERATOR_TOOLTIP
				
				custom_tooltip = HORDES_CHILDREN_MAY_NO_LONGER_GAIN_HUNTING_ACCIDENTS
				set_country_flag = no_more_hunting_for_heir
				
				custom_tooltip = SEPERATOR_TOOLTIP
			}
			else = {
				add_estate_loyalty = {
					estate = all
					loyalty = 15
				}
				
				change_adm = 1
				change_dip = 1
				change_mil = 1
			}
			
			complex_dynamic_effect = {
				first_custom_tooltip = HORDES_IF_NO_HEIR_AND_HEIRS_ALLOWED
				first_limit = "
					has_heir = no
					has_government_attribute = heir
				"
				first_effect = "
					set_country_flag = unlock_lux_stella_flag
					country_event = { id = 9469 }
					clr_country_flag = unlock_lux_stella_flag
				"
			}
		} 
	}
}

woc_shared_hordes_3 = {
	slot = 3
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
		has_dlc = "Winds of Change"
	}

	tatars_raiding_hosts = {
		icon = mission_raid_hosts
		position = 15

		trigger = {  
			num_of_cavalry = 12 # modified
			num_of_battles = { amount = 30 }
		} 

		effect = {  
			create_general_with_pips { tradition = 25 add_shock = 3 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_country_modifier = {
				name = hordes_raised_hosts
				duration = 5475
			}
		} 
	}

	tatars_great_khan = {
		icon = mission_genghis_khan
		position = 16
		required_missions = {
			tatars_expansion_of_silk_road
			tatars_raiding_hosts
			tatars_religious_unity
		}

		trigger = {  
			if = {
				limit = {
					OR = {
						has_dlc = "Rights of Man"
						has_dlc = "Emperor"
					}
				}
				NOT = { great_power_rank = 2 }
			}
			else = {
				total_development = 2000
			}
			NOT = {
				any_country = {
					army_size = ROOT
				}
			}
			prestige = 90
		} 

		effect = {  
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				custom_tooltip = HORDES_IF_RULER_WINS_100_BATTLES_WHILST_CONQUEROR_GAIN_LEGENDARY_CONQUEROR
				set_country_flag = hordes_legendary_conqueror_battles_flag
				
				hidden_effect = {
					set_variable = {
						which = NumOfRulerBattles
						value = 0
					}
				}
			}
			else = {
				change_mil = 2
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_country_modifier = {
				name = hordes_new_great_khan
				duration = -1
			}
		}  
	}
}

woc_flavor_hordes_4 = {
	slot = 4
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = MGE
			tag = ILK
			tag = GLH
		}
		NOT = { was_tag = YUA }
		has_dlc = "Winds of Change"
	}
	
	tatars_strengthen_basqaq_governors = {
		icon = mission_strengthen_basqaqs
		position = 11

		trigger = {  
			OR = {
				num_of_subjects = 3
				grown_by_development = 150
			}
		} 

		effect = {  
			if = {
				limit = { has_dlc = "Mandate of Heaven" }
				custom_tooltip = HORDES_UNLOCK_BASQAQ_PRIVILEGE_FOR_TRIBES_AND_NOBILITY
			}
			else = {
				custom_tooltip = HORDES_UNLOCK_BASQAQ_PRIVILEGE_FOR_TRIBES_AND_NOBILITY_NO_MOH
			}
			set_country_flag = hordes_basqaqs_unlocked_flag
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_adm_power = 50
		}
	}

	tatars_buff_tributaries = {
		icon = mission_diplomatic_relation
		position = 13
		required_missions = { tatars_gathering_the_tribute }

		trigger = {  
			OR = {
				AND = {
					if = {
						limit = { has_dlc = "Common Sense" }
						government_rank = 3
					}
					if = {
						limit = {
							OR = {
								has_dlc = "Rights of Man"
								has_dlc = "Emperor"
							}
						}
						NOT = {
							great_power_rank = 4
						}
					}
					else = {
						total_development = 1000
					}
				}
				AND = {
					num_of_subjects = 5
					NOT = {
						any_subject_country = {
							liberty_desire = 35
						}
					}
				}
			}
		}

		effect = {
			if = {
				limit = {
					has_dlc = "Mandate of Heaven"
				}
				complex_dynamic_effect = {
					first_custom_tooltip = HORDES_IF_COMPLETED_VIA_TRIBUTARIES
					first_limit = "
						num_of_subjects = 5
						NOT = {
							any_subject_country = {
								liberty_desire = 35
							}
						}
					"
					first_effect = "
						custom_tooltip = TATAR_TRIBUTARIES_GAIN_REDUCED_LIBERTY_DESIRE
						
						custom_tooltip = SEPERATOR_TOOLTIP
						
						custom_tooltip = 100_DEV_TRIBUTARIES_GRANT_US_TAX_AND_MANPOWER_MODIFIERS
						
						set_country_flag = hordes_buffed_tributaries_flag
					"
					
					second_custom_tooltip = HORDES_IF_COMPLETED_VIA_GREAT_POWER
					second_limit = "
						government_rank = 3
						NOT = { great_power_rank = 4 }
						OR = {
							NOT = { num_of_subjects = 5 }
							any_subject_country = { liberty_desire = 35 }
						}
					"
					second_effect = "
						add_country_modifier = {
							name = hordes_modern_empire
							duration = -1
						}
						change_ruler_stat = {
							type = adm
							amount = 1
						}
					"
				}
			}
			else = {
				add_country_modifier = {
					name = hordes_modern_empire
					duration = -1
				}
				
				change_ruler_stat = {
					type = adm
					amount = 1
				}
			}
		}  
	}
}

woc_shared_hordes_4 = {
	slot = 4
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
		has_dlc = "Winds of Change"
	}

	tatars_expansion_of_silk_road = {
		icon = mission_silk_road
		position = 15
		required_missions = { tatars_new_trade_routes }
		
		provinces_to_highlight = {
			OR = {
				region = persia_region
				region = khorasan_region
			}
			OR = {
				NOT = { country_or_non_sovereign_subject_holds = ROOT }
				NOT = { base_production = 5 }
				NOT = { has_production_building_trigger = yes }
			}
		}

		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				OR = {
					region = persia_region
					region = khorasan_region
				}
				base_production = 5
				has_production_building_trigger = yes
				value = 5
			}
			custom_trigger_tooltip = {
				tooltip = HORDES_HAS_50_TRADE_POWER_IN_PERSIA
				2213 = {
					trade_share = {
						country = ROOT
						share = 50
					}
				}
			}
			custom_trigger_tooltip = {
				tooltip = HORDES_HAS_50_TRADE_POWER_IN_SAMARKAND
				454 = {
					trade_share = {
						country = ROOT
						share = 50
					}
				}
			}
		} 

		effect = {  
			if = {
				limit = { has_dlc = "Cradle of Civilization" }
				enable_trading_policy = { policy = hostile_trading_upgraded }
				enable_trading_policy = { policy = improve_inland_routes_upgraded }
				enable_trading_policy = { policy = establish_communities_upgraded }
				hidden_effect = {
					disable_trading_policy = { policy = hostile_trading }
					disable_trading_policy = { policy = improve_inland_routes }
					disable_trading_policy = { policy = establish_communities }
				}
			}
			else = {
				change_ruler_stat = {
					type = dip
					amount = 2
				}
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			define_advisor = {
				type = trader
				skill = 2
				cost_multiplier = 0.5
			}
		}
	}
}

woc_flavor_hordes_5 = {
	slot = 5
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = MGE
			tag = ILK
			tag = GLH
		}
		NOT = { 
			was_tag = YUA 
		}
		has_dlc = "Winds of Change"
	}
	
	tatars_gathering_the_tribute = {
		icon = mission_tribute_tax
		position = 12
		required_missions = { tatars_strengthen_basqaq_governors } 

		trigger = {  
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				num_of_estate_agendas_completed = {
					estate = estate_nomadic_tribes
					value = 4
				}
			}
			else = {
				monthly_adm = 11
			}
			
			has_adm_advisor_3 = yes
		} 

		effect = {  
			change_government_reform_progress = 50
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			if = {
				limit = {
					has_dlc = "Mandate of Heaven"
				}
				custom_tooltip = HORDES_BASAQS_NOW_GRANT_TRIPLES_LOYALTY_PER_TRIBUTE_RECEIVED
				set_country_flag = basaqs_tribes_loyalty_from_tribute_flag
			}
			else = {
				add_estate_loyalty = {
					estate = all
					loyalty = 20
				}
			}
		} 
	}
}

woc_shared_hordes_5 = {
	slot = 5
	generic = no
	ai = yes
	has_country_shield = yes
	potential_on_load = {
		has_dlc = "Winds of Change"
	}
	potential = { 
		OR = {
			is_tatar_nation = yes
			is_mongol_nation = yes
			is_moghulistan_nation = yes
			tag = YUA
			tag = MGE
			tag = ILK
			tag = GLH
		}
		has_dlc = "Winds of Change"
	}

	tatars_new_trade_routes = {
		icon = mission_horde_trade
		position = 14
		trigger = {  
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				province_has_center_of_trade_of_level = 2
				value = 5
			}
		} 

		effect = {  
			add_mercantilism_or_monarch_power = { amount = 2 }
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_country_modifier = {
				name = hordes_steppe_trade
				duration = 7300
			}
		}
	}

	tatars_intercontinental_trade = {
		icon = mission_horde_caravans
		position = 16
		required_missions = { tatars_new_trade_routes }
		
		provinces_to_highlight = {
			is_capital_of = ROOT
			OR = {
				NOT = { is_strongest_trade_power = ROOT }
				NOT = { trade_node_value = 35 }
			}
		}
	
		trigger = {  
			capital_scope = {
				is_strongest_trade_power = ROOT
				trade_node_value = 35
			}
			OR = {
				trader = 3
				monthly_dip = 10
			}
		} 
	
		effect = {
			if = {
				limit = {
					has_estate = estate_nomadic_tribes
				}
				custom_tooltip = HORDES_UNLOCK_NOMADIC_CARAVANS_PRIVILEGE
				set_country_flag = hordes_nomadic_caravans_flag
			}
			else = {
				add_mercantilism_or_monarch_power = { amount = 5 }
				add_years_of_income = 1.5
			}
			
			custom_tooltip = SEPERATOR_TOOLTIP
			
			add_dip_power = 100
		} 
	}
}