political_actions = {
	MON_reopen_borders_for_refugees = {
		icon = generic_research

		cost = 25

		visible = {
			OR = {
				has_completed_focus = MON_provide_shelter_for_refugees
				has_completed_focus = MON_offer_facilities_for_exiled_scientists
			}
			NOT = {
				has_idea = MON_sheltering_refugees_of_war_idea
				has_idea = MON_sheltering_refugees_of_war_and_scientists_idea
			}
		}

		available = {
			OR = {
				any_neighbor_country = {
					NOT = {
						has_government = ROOT
					}
					has_war = yes
				}
			}
			has_war = no
		}

		complete_effect = {
			if = {
				limit = {
					has_completed_focus = MON_provide_shelter_for_refugees
				}
				add_ideas = MON_sheltering_refugees_of_war_idea
			}
			if = {
				limit = {
					has_completed_focus = MON_offer_facilities_for_exiled_scientists
				}
				add_ideas = MON_sheltering_refugees_of_war_and_scientists_idea
			}
		}
	}
}


propaganda_efforts = {
	MON_go_on_pilgrimage_to_the_burkhan_khaldun = {
	
		icon = generic_nationalism
		
		allowed = {
			OR = {
				original_tag = MON
				original_tag = TAN
				original_tag = MEN
				original_tag = BYA
			}
		}

		fire_only_once = yes

		visible = {
			819 = { is_core_of = ROOT }
			has_government = fascism
		}
		
		available = {
			controls_state = 819
			has_war_support > 0.5
		}

		highlight_states = {
			highlight_states_trigger = { state = 819 } 
		}

		cost = 60

		days_remove = 60

		cancel_if_not_visible = yes
		
		remove_effect = {
			add_country_leader_trait = MEN_spirit_of_genghis
		}
		
		ai_will_do = {
			factor = 10
		}
	}
}

MON_stance_of_mongolian_army = {
	MON_organize_military_maneuvers = {
		state_target = yes
		target_trigger = {
			FROM = {
				is_core_of = ROOT
				is_fully_controlled_by = ROOT
			}
		}
		icon = hol_draw_up_staff_plans
		fire_only_once = no
		cost = 10
		days_remove = 21
		days_re_enable = 90
		on_map_mode = map_only
		
		ai_will_do = {
			base = 50
			modifier = {	#don't burn pp too much
				factor = 0.15	
				has_country_flag = MON_army_maneuvers_completed_3
			}
			modifier = {	#no-no-no, not where we have many divisions!
				factor = 0.05
				divisions_in_state = { state = FROM size > 2 }
			}
			modifier = {	#no need for xp, so why waste more pp?
				add = -50
				has_army_experience > 100
			}
		}
		
		modifier = {
			experience_gain_army = 0.2
		}
		visible = {
			divisions_in_state = { state = FROM size > 0 }
		}
		available = {
			has_war = no
			divisions_in_state = { state = FROM size > 0 }
			NOT = { 
				has_country_flag = MON_already_doing_military_maneuvers
			}
		}
		complete_effect = {
			custom_effect_tooltip = GEN_90_days_tt
			set_country_flag = MON_already_doing_military_maneuvers
			FROM = {
				add_dynamic_modifier = { modifier = r56_military_exercises  }
			}
		}

		cancel_trigger = {
			divisions_in_state = { state = FROM size < 1 }
		}
		cancel_effect = {
			FROM = {
				remove_dynamic_modifier = { modifier = r56_military_exercises  }
			}
			clr_country_flag = MON_already_doing_military_maneuvers
		}
		remove_effect = {
			if = {
				limit = {
					has_country_flag = MON_army_maneuvers_completed_2
				}
				set_country_flag = MON_army_maneuvers_completed_3
			}
			if = {
				limit = {
					has_country_flag = MON_army_maneuvers_completed_1
				}
				set_country_flag = MON_army_maneuvers_completed_2
			}
			FROM = {
				remove_dynamic_modifier = { modifier = r56_military_exercises  }
			}
			set_country_flag = MON_army_maneuvers_completed_1
			clr_country_flag = MON_already_doing_military_maneuvers
		}
	}

	MON_draw_battleplan_against_FROM = {
		icon = hol_draw_up_staff_plans
		allowed = { 
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_ratify_battleplans
		}
		
		available = {
			has_completed_focus = MON_ratify_battleplans
			OR = {
				political_power_daily > 0.1
				has_political_power > 12
			}
			OR = {
				command_power > 30
				command_power_daily > 0.25
			}
		}

		target_trigger = {
			FROM = {
				is_neighbor_of = ROOT
				OR = {
					is_justifying_wargoal_against = ROOT
					has_wargoal_against = ROOT
					has_war = yes
				}
				NOT = {	#no double battleplans
					has_country_flag = MON_battleplan_drawn_against
				}
			}
		}
		
		fire_only_once = no

		days_remove = 120

		modifier = {
			political_power_cost = 0.1
			command_power_gain = -0.25
		}
		remove_effect = {
			FROM = {
				set_country_flag = MON_battleplan_drawn_against
			}
		}
	}

	MON_execute_battleplan_against_FROM = {
		icon = generic_operation
		allowed = { 
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_ratify_battleplans
		}
		
		available = {
			has_completed_focus = MON_ratify_battleplans
		}

		target_trigger = {
			FROM = {
				is_neighbor_of = ROOT
				has_country_flag = MON_battleplan_drawn_against
				has_war_with = ROOT
			}
		}
		fire_only_once = no

		days_remove = 2

		targeted_modifier = {
			tag = FROM
			attack_bonus_against = 0.1
			defense_bonus_against = 0.1
		}

		remove_effect = {
			FROM = {
				clr_country_flag = MON_battleplan_drawn_against
			}
		}
	}

	MON_promote_hamza_zaysanov_to_general = {
		icon = generic_operation
		allowed = { 
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_expand_the_general_staff
			has_completed_focus = MON_establish_provisional_airforce
		}
		
		available = {
			has_idea = MON_hamza_zaysanov
		}

		fire_only_once = yes

		cost = 10

		complete_effect = {
			add_war_support = 0.02
			air_experience = 5
			add_corps_commander_role = {
				character = MON_hamza_zaysanov
				traits = { cavalry_officer air_force_ties }
				skill = 2
				attack_skill = 3
				defense_skill = 1
				planning_skill = 2
				logistics_skill = 1
				legacy_id=-1
			}
		}
	}
}

MON_strengthen_mongolbank_category  = {
	
	MON_increase_production_quotas = {
		
		icon = generic_operation

		allowed = { 
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_strengthen_tugrik
		}
		
		available = {
			NOT = {
				has_idea = Mongolbank_very_high_funds
			}
		}

		days_remove = 45
		days_re_enable = 180

		cost = 15

		ai_will_do = {
			factor = 5
		}

		modifier = {
			industrial_capacity_factory = -0.15
		}

		remove_effect = {
			MON_mongol_bank_funds_increase = yes
		}
	}

	MON_reduce_scientists_funding = {
		
		icon = generic_research

		allowed = { 
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_strengthen_tugrik
		}
		
		available = {
			NOT = {
				has_idea = Mongolbank_very_high_funds
			}
			NOT = {
				has_idea = MON_ill_educated_population_idea
			}
		}

		days_remove = 30
		days_re_enable = 120

		cost = 75

		ai_will_do = {
			factor = 1
		}
		modifier = {
			research_speed_factor = -0.06
		}

		remove_effect = {
			MON_mongol_bank_funds_increase = yes
		}
	}

	MON_appropriate_civilian_goods = {
		
		icon = generic_construction

		allowed = { 
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_strengthen_tugrik
		}
		
		available = {
			NOT = {
				has_government = democratic
			}
			NOT = {
				has_idea = Mongolbank_very_high_funds
			}
			has_stability > 0.50
		}

		days_re_enable = 90

		cost = 25

		ai_will_do = {
			factor = 0
		}

		complete_effect = {
			add_stability = -0.08
			MON_mongol_bank_funds_increase = yes
		}
	}

	MON_decrease_army_funding = {
		
		icon = generic_operation

		allowed = { 
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_strengthen_tugrik
		}
		
		available = {
			has_war = no
			NOT = {
				has_idea = Mongolbank_very_high_funds
			}
			has_war_support > 0.50
		}

		days_re_enable = 150

		cost = 50

		ai_will_do = {
			factor = 0
		}

		complete_effect = {
			add_war_support = -0.1
			MON_mongol_bank_funds_increase = yes
		}
	}

	MON_buy_currency_abroad = {
		
		icon = ger_mefo_bills

		allowed = { 
			original_tag = MON
		}

		on_map_mode = map_and_decisions_view
		visible = {
			has_completed_focus = MON_strengthen_tugrik
		}
		
		available = {
			has_war = no
			NOT = {
				has_idea = Mongolbank_very_high_funds
			}
		}

		days_remove = 60
		days_re_enable = 120

		cost = 80

		ai_will_do = {
			factor = 5
		}

		modifier = {
			consumer_goods_factor = 0.1
		}

		remove_effect = {
			MON_mongol_bank_funds_increase = yes
		}
	}
}


##########################################################################
##########################################################################
##########################################################################
##########################################################################
##########################################################################
##########################################################################
##########################################################################
##########################################################################
##########################################################################
##########################################################################
##########################################################################

#### The beginning of the focus tree where the political path is decided
MON_1935_state_visit_to_moscow_category = {
	MON_external_policy_negotiations = {

		icon = SWI_dismiss_council

		available = {
			OR = {
				has_country_flag = mon_1935_defence_soviet_yes_assistance
				has_country_flag = mon_1935_defence_soviet_yes_self_reliance
				has_country_flag = mon_1935_defence_soviet_abandoned_mongolia
				has_country_flag = rt56rp_mon_1935_force_self_determination #RT56 RP
			}
		}

		priority = 10

		days_mission_timeout = 25

		fire_only_once = yes

		activation = {
			tag = MON 
		}

		cancel_if_not_visible = yes

		is_good = no

		timeout_effect = {
			country_event = {
				id = mongol.14
				days = 2
			}
		}

		complete_effect = {
			country_event = {
				id = mongol.13
				days = 2
			}
		}
	}
	
	rt56rp_MON_force_self_determination = { #RT56 RP
		cost = 0   days_remove = 0   fire_only_once = yes
		visible = {
			FROM = { tag = MON }
			MON = { is_ai = no }
		}
		complete_effect = {
			custom_effect_tooltip = rt56rp_mon_1935_force_self_determination_tt
			set_country_flag = rt56rp_mon_1935_force_self_determination
		}
	}

	MON_propose_mutual_assistance_treaty = {
		icon = hol_attract_foreign_investors

		cost = 5
		available = {
			has_government = SOV
			NOT = { has_country_flag = mon_1935_defence_soviet_yes_self_reliance }
		}

		visible = {	#can't discuss things if your government collapsed
			NOT = {
				has_country_flag = mon_1935_defence_soviet_imprison_genden_or_empty_train
			}
		}
		
		ai_will_do = {
			factor = 100
			modifier = {	#follows the focus tree
				factor = 20
				OR = {
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_SOCIALIST
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_SOCIALIST
					}
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_LEFTIST_TAKEOVER
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_LEFTIST_TAKEOVER
					}
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_HISTORICAL
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_HISTORICAL
					}
				}
			}
			modifier = {	#follows the focus tree
				factor = 0
				OR = {
					has_country_flag = MON_AI_RANDOM_MON_DEMOCRATIC_RIGHTIST
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_DEMOCRATIC_RIGHTIST
					}
					has_country_flag = MON_AI_RANDOM_MON_NEUTRALITY_GENDEN
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_NEUTRALITY_GENDEN
					}
				}
			}
		}

		fire_only_once = yes

		complete_effect = {
			SOV = {
				country_event = {
					id = mongol.2
					hours = 2
				}
			}
		}
	}

	MON_suggest_mongolian_self_reliance = {
		icon = generic_political_discourse

		cost = 10

		available = {
			has_government = communism 
			NOT = { has_country_flag = mon_1935_defence_soviet_yes_assistance }
		}

		visible = {	#can't discuss things if your government collapsed
			NOT = {
				has_country_flag = mon_1935_defence_soviet_imprison_genden_or_empty_train
			}
		}

		
		ai_will_do = {
			factor = 100
			modifier = {	#follows the focus tree
				factor = 20
				OR = {
					has_country_flag = MON_AI_RANDOM_MON_DEMOCRATIC_RIGHTIST
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_DEMOCRATIC_RIGHTIST
					}
					has_country_flag = MON_AI_RANDOM_MON_NEUTRALITY_GENDEN
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_NEUTRALITY_GENDEN
					}
				}
			}
			modifier = {	#follows the focus tree
				factor = 0
				OR = {
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_SOCIALIST
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_SOCIALIST
					}
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_LEFTIST_TAKEOVER
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_LEFTIST_TAKEOVER
					}
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_HISTORICAL
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_HISTORICAL
					}
				}
			}
		}

		fire_only_once = yes

		complete_effect = {
			SOV = {
				country_event = {
					id = mongol.5
					hours = 2
				}
			}
		}
	}

	MON_threat_stalin_with_japan = {
		icon = generic_ignite_civil_war

		custom_cost_text = r56_15_command_power_cost
		custom_cost_trigger = {
			command_power > 15
		}
		available = { 
			JAP = {
				NOT = {
					has_government = SOV
				}
			}
		}

		visible = {
			has_country_leader = {
				character = MON_peljidiin_genden
				ruling_only = yes 
			}
		}
		
		ai_will_do = {
			factor = 0
			modifier = {	#follows the focus tree
				factor = 0
				OR = {
					has_country_flag = MON_AI_RANDOM_MON_DEMOCRATIC_RIGHTIST
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_DEMOCRATIC_RIGHTIST
					}
					has_country_flag = MON_AI_RANDOM_MON_NEUTRALITY_GENDEN
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_NEUTRALITY_GENDEN
					}
				}
			}
			modifier = {	#follows the focus tree
				factor = 0
				OR = {
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_SOCIALIST
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_SOCIALIST
					}
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_LEFTIST_TAKEOVER
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_LEFTIST_TAKEOVER
					}
					has_country_flag = MON_AI_RANDOM_MON_COMMUNISM_HISTORICAL
					has_game_rule = {
						rule = MON_ai_behavior 
						option = MON_COMMUNISM_HISTORICAL
					}
				}
			}
		}

		fire_only_once = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -15
			}
			country_event = {
				id = mongol.8
				hours = 2
			}
		}
	}

	MON_trial_of_genden = {

		icon = generic_assassination

		available = {
			hidden_trigger = { always = no }
		}

		priority = 5

		days_mission_timeout = 210

		fire_only_once = yes

		activation = {
			has_country_flag = mon_1935_defence_soviet_imprison_genden_or_empty_train
		}

		visible = {
			NOT = {
				has_country_flag = MON_genden_rescued
			}
		}

		cancel_if_not_visible = yes

		is_good = no

		timeout_effect = {
			country_event = {
				id = mongol_genden.15
				days = 3
			}
		}
	}

	MON_exploit_nkvd_system = {
		icon = SOV_the_military_conspiracy

		custom_cost_text = r56_25_command_power_cost
		custom_cost_trigger = {
			command_power > 25
		}
		available = { 
			is_in_faction_with = SOV
			has_completed_focus = MON_assists_deviants_struggle
		}

		visible = {
			has_government = communism 
			has_country_flag = mon_1935_defence_soviet_imprison_genden_or_empty_train
			is_in_faction_with = SOV
		}

		ai_will_do = {
			factor = 10
		}

		fire_only_once = yes

		days_remove = 30

		complete_effect = {
			hidden_effect = {
				add_command_power = -25
			}
		}

		modifier = {
			command_power_gain = -0.5
			political_power_gain = -0.05
		}
		
		remove_effect = {
			set_country_flag = MON_exploited_nkvd
		}
	}

	MON_steal_railway_plan_moscow = {
	
		icon = eng_trade_unions_support
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_infiltrate_the_railway_system
		}
		
		available = {
			has_completed_focus = MON_infiltrate_the_railway_system
			has_country_flag = MON_exploited_nkvd
		}
		on_map_mode = map_and_decisions_view

		highlight_states = { 
			highlight_states_trigger = {
				state = 219
			}
		}
		
		fire_only_once = yes

		cost = 50

		cancel_if_not_visible = yes

		complete_effect = {
			random_list = {
				25 = {
					country_event = {
						id = mongol_genden.16
						hours = 12
					}
				}
				15 = {
					country_event = {
						id = mongol_genden.17
						hours = 18
					}
				}
				10 = {
					country_event = {
						id = mongol_genden.18
						days = 2
					}
				}
			}
		}
		
		ai_will_do = {
			factor = 50
		}
	}

	MON_nationalist_strike_in_kiev = {
	
		icon = revolt
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_exploited_nkvd
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_infiltrate_the_railway_system
		}
		on_map_mode = map_and_decisions_view

		highlight_states = { 
			highlight_states_trigger = {
				state = 202
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_25_command_power_cost
		custom_cost_trigger = {
			command_power > 25
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -25
			}
			every_country = {
				limit = {
					OR = {
						original_tag = ROOT
						controls_state = 202
					}
				}
				country_event = {
					id = mongol_genden.19
					hours = 12
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	MON_bribe_opportunistic_officials_in_kharkov = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_exploited_nkvd
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_infiltrate_the_railway_system
		}
		on_map_mode = map_and_decisions_view

		highlight_states = { 
			highlight_states_trigger = {
				state = 221
			}
		}
		
		fire_only_once = yes

		cost = 25

		cancel_if_not_visible = yes

		complete_effect = {
			MON = {
				country_event = {
					id = mongol_genden.21
					hours = 12
				}
			}
		}
		ai_will_do = {
			factor = 10
		}
	}

	MON_cossac_raid_in_rostov = {
	
		icon = revolt
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_exploited_nkvd
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_infiltrate_the_railway_system
		}
		on_map_mode = map_and_decisions_view

		highlight_states = { 
			highlight_states_trigger = {
				state = 218
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_10_command_power_cost
		custom_cost_trigger = {
			command_power > 10
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -10
			}
			every_country = {
				limit = {
					OR = {
						original_tag = ROOT
						controls_state = 218
					}
				}
				country_event = {
					id = mongol_genden.22
					hours = 12
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	MON_infiltrate_bryansk_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			has_country_flag = MON_genden_rescue_route_kiev
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 224
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_10_command_power_cost
		custom_cost_trigger = {
			command_power > 10
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -10
			}
			224 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	MON_infiltrate_moscow_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			224 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 219
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_50_command_power_cost
		custom_cost_trigger = {
			command_power > 10
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -50
			}
			219 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	MON_infiltrate_gorki_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			219 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 252
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_10_command_power_cost
		custom_cost_trigger = {
			command_power > 10
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -10
			}
			252 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	MON_infiltrate_kazan_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			252 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 249
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_10_command_power_cost
		custom_cost_trigger = {
			command_power > 10
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -10
			}
			249 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	MON_infiltrate_izhevsk_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			249 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 399
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_1_command_power_cost
		custom_cost_trigger = {
			command_power > 1
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
			}
			399 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	MON_infiltrate_sverdlovsk_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			399 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 653
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_5_command_power_cost
		custom_cost_trigger = {
			command_power > 5
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -5
			}
			653 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_infiltrate_tyumen_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			653 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 403
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_1_command_power_cost
		custom_cost_trigger = {
			command_power > 1
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
			}
			403 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_infiltrate_omsk_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			403 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 571
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_3_command_power_cost
		custom_cost_trigger = {
			command_power > 3
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -3
			}
			571 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_infiltrate_novosibirsk_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			571 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 570
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_3_command_power_cost
		custom_cost_trigger = {
			command_power > 3
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -3
			}
			570 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_infiltrate_kemerovo_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			570 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 569
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_1_command_power_cost
		custom_cost_trigger = {
			command_power > 1
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
			}
			569 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_infiltrate_krasnoyarsk_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			569 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 568
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_1_command_power_cost
		custom_cost_trigger = {
			command_power > 1
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
			}
			568 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_infiltrate_irkutsk_railway_station = {
	
		icon = generic_operation
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kiev
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			568 = {
				has_state_flag = MON_genden_save_here
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 566
			}
		}
		
		fire_only_once = yes

		custom_cost_text = r56_3_command_power_cost
		custom_cost_trigger = {
			command_power > 3
		}

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -3
			}
			566 = {
				set_state_flag = MON_genden_save_here
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	

	#Kharkov Route
	MON_propose_reschedule_in_voronezh = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 260
			}
		}
		
		fire_only_once = yes

		cost = 5

		cancel_if_not_visible = yes

		complete_effect = {
			260 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_lipetsk = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			260 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 258
			}
		}
		
		fire_only_once = yes

		cost = 1

		cancel_if_not_visible = yes

		complete_effect = {
			258 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_tambov = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			258 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 257
			}
		}
		
		fire_only_once = yes

		cost = 1

		cancel_if_not_visible = yes

		complete_effect = {
			257 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_penza = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			257 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 255
			}
		}
		
		fire_only_once = yes

		cost = 5

		cancel_if_not_visible = yes

		complete_effect = {
			255 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_kuibyshev = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			255 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 251
			}
		}
		
		fire_only_once = yes

		cost = 5

		cancel_if_not_visible = yes

		complete_effect = {
			251 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_ufa = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			251 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 651
			}
		}
		
		fire_only_once = yes

		cost = 5

		cancel_if_not_visible = yes

		complete_effect = {
			651 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_chelyabinsk = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			651 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 572
			}
		}
		
		fire_only_once = yes

		cost = 5

		cancel_if_not_visible = yes

		complete_effect = {
			572 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_omsk = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			572 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 571
			}
		}
		
		fire_only_once = yes

		cost = 3

		cancel_if_not_visible = yes

		complete_effect = {
			571 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_novosibirsk = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			571 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 570
			}
		}
		
		fire_only_once = yes

		cost = 3

		cancel_if_not_visible = yes

		complete_effect = {
			570 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_kemerovo = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			570 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 569
			}
		}
		
		fire_only_once = yes

		cost = 1

		cancel_if_not_visible = yes

		complete_effect = {
			569 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_krasnoyarsk = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			569 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 568
			}
		}
		
		fire_only_once = yes

		cost = 1

		cancel_if_not_visible = yes

		complete_effect = {
			568 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_propose_reschedule_in_irkutsk = {
	
		icon = hol_exchange_intelligence_data
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_country_flag = MON_genden_route_kharkov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			568 = {
				has_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 566
			}
		}
		
		fire_only_once = yes

		cost = 3

		cancel_if_not_visible = yes

		complete_effect = {
			566 = {
				set_state_flag = MON_genden_save_here_kharkov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_chechnya = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 821
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 5
			has_political_power > 5
		}
		custom_cost_text = decision_cost_CP_5_pp_5

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -5
				add_political_power = -5
			}
			821 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_makhachkala = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			821 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 232
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 3
			has_political_power > 3
		}
		custom_cost_text = decision_cost_CP_3_pp_3

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -3
				add_political_power = -3
			}
			232 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_azerbaijan = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			232 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 229
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 10
			has_political_power > 10
		}
		custom_cost_text = decision_cost_CP_10_pp_10
		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -10
				add_political_power = -10
			}
			229 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_turkmenistan = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			229 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 584
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 1
			has_political_power > 1
		}
		custom_cost_text = decision_cost_CP_1_pp_1

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
				add_political_power = -1
			}
			584 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_bukhara = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			584 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 830
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 2
			has_political_power > 2
		}
		custom_cost_text = decision_cost_CP_2_pp_2

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -2
				add_political_power = -2
			}
			830 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_tashkent = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			830 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 405
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 3
			has_political_power > 3
		}
		custom_cost_text = decision_cost_CP_3_pp_3

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -3
				add_political_power = -3
			}
			405 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_pamir = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			405 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 732
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 1
			has_political_power > 1
		}
		custom_cost_text = decision_cost_CP_1_pp_1

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
				add_political_power = -1
			}
			732 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_alma_ata = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			732 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 586
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 3
			has_political_power > 3
		}
		custom_cost_text = decision_cost_CP_3_pp_3

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -3
				add_political_power = -3
			}
			586 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_ayaguz = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			586 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 589
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 1
			has_political_power > 1
		}
		custom_cost_text = decision_cost_CP_1_pp_1

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
				add_political_power = -1
			}
			589 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_semipalatinsk = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			589 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 588
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 1
			has_political_power > 1
		}
		custom_cost_text = decision_cost_CP_1_pp_1

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
				add_political_power = -1
			}
			588 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	MON_buy_safe_passage_in_gorno_altaysk = {
	
		icon = hol_attract_foreign_investors
		
		allowed = {
			original_tag = MON
		}

		visible = {
			always = yes
			has_country_flag = MON_genden_route_rostov
		}
		
		available = {
			has_completed_focus = MON_return_of_prodigal_son
			588 = {
				has_state_flag = MON_genden_save_here_rostov_route
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = 654
			}
		}
		
		fire_only_once = yes

		custom_cost_trigger = {
			command_power > 1
			has_political_power > 1
		}
		custom_cost_text = decision_cost_CP_1_pp_1

		cancel_if_not_visible = yes

		complete_effect = {
			hidden_effect = {
				add_command_power = -1
				add_political_power = -1
			}
			654 = {
				set_state_flag = MON_genden_save_here_rostov_route
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
}


MON_on_the_crossroads_of_the_world_category = {

	MON_study_foreign_machinery = {

		icon = generic_industry

		allowed = {
			tag = MON
		}

		available = {
			FROM = {
				exists = yes	
				has_government = ROOT
				num_of_factories > 50 
				has_opinion	= {
					target = ROOT
					value > 19
				}
				NOT = {
					has_war_with = ROOT
				}
			}
			num_of_civilian_factories_available_for_projects > 1
			if = {
				limit = {
					FROM ={
						tag = SOV
					}
				}
				OR = {
					has_completed_focus = MON_approach_soviet_planners
					has_completed_focus = MON_strengthen_existing_industrial_contracts
				}
			}
			if = {
				limit = {
					FROM ={
						original_tag = CHI
					}
				}
				OR = {
					has_completed_focus = MON_faciliate_cooperation_with_china
					has_completed_focus = MON_strengthen_existing_industrial_contracts
					has_completed_focus = MON_appeal_to_china
				}
			}
			if = {
				limit = {
					FROM ={
						original_tag = JAP
					}
				}
				OR = {
					has_completed_focus = MON_approach_japan
					has_completed_focus = MON_strengthen_existing_industrial_contracts
				}
			}
			if = {
				limit = {
					FROM ={
						original_tag = PRC
					}
				}
				OR = {
					has_completed_focus = MON_strengthen_existing_industrial_contracts
					has_completed_focus = MON_approach_soviet_planners
				}
			}
		}

		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 20 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 20 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 20 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 20 compare = greater_than_or_equals }
						}
					}
					AND = {
						is_major = yes
						NOT = {
							tag = SOV
							original_tag = JAP
							original_tag = CHI
							original_tag = PRC
						}
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 100
					}
				}
			}
		}

		days_remove = 14
		days_re_enable = 90

		cost = 15

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {	#trying to not be going into the "foreign takeover" modifiers
				factor = 0
				OR = {
					AND = {
						FROM = {
							tag = SOV
						}
						check_variable = { sov_influence_in_mon = 85 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = JAP
						}
						check_variable = { jap_influence_in_mon = 85 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = CHI
						}
						check_variable = { chi_influence_in_mon = 85 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = PRC
						}
						check_variable = { prc_influence_in_mon = 85 compare = greater_than_or_equals }
					}
				}
			}
		}

		modifier = {
			civilian_factory_use = 1
		}

		complete_effect = {
			custom_effect_tooltip = GEN_90_days_tt
			FROM = {
				add_offsite_building = { type = industrial_complex level = 1 }
			}
		}

		remove_effect = {
			add_tech_bonus = {
				name = industrial_bonus
				bonus = 1
				uses = 1
				category = industry
			}
			FROM = {
				add_offsite_building = { type = industrial_complex level = -1 }
			}
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				MON_soviet_low_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				MON_jap_low_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				MON_chi_low_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				MON_prc_low_influence_increase_effect = yes
			}
		}
	}

	MON_study_foreign_electronics = {

		icon = generic_research

		allowed = {
			tag = MON
		}

		available = {
			FROM = {
				exists = yes	
				has_government = ROOT
				num_of_factories > 80 
				has_opinion	= {
					target = ROOT
					value > 19
				}
				NOT = {
					has_war_with = ROOT
				}
			}
			num_of_civilian_factories_available_for_projects > 1
			if = {
				limit = {
					FROM ={
						tag = SOV
					}
				}
				OR = {
					has_completed_focus = MON_approach_soviet_planners
					has_completed_focus = MON_strengthen_existing_industrial_contracts
				}
			}
			if = {
				limit = {
					FROM ={
						original_tag = CHI
					}
				}
				OR = {
					has_completed_focus = MON_faciliate_cooperation_with_china
					has_completed_focus = MON_strengthen_existing_industrial_contracts
					has_completed_focus = MON_appeal_to_china
				}
			}
			if = {
				limit = {
					FROM ={
						original_tag = JAP
					}
				}
				OR = {
					has_completed_focus = MON_approach_japan
					has_completed_focus = MON_strengthen_existing_industrial_contracts
				}
			}
		}

		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						is_major = yes
						NOT = {
							tag = SOV
							original_tag = JAP
							original_tag = CHI
							original_tag = PRC
						}
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 100
					}
				}
			}
		}

		days_remove = 21
		days_re_enable = 270

		cost = 25

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {	#trying to not be going into the "foreign takeover" modifiers
				factor = 0
				OR = {
					AND = {
						FROM = {
							tag = SOV
						}
						check_variable = { sov_influence_in_mon = 80 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = JAP
						}
						check_variable = { jap_influence_in_mon = 80 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = CHI
						}
						check_variable = { chi_influence_in_mon = 80 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = PRC
						}
						check_variable = { prc_influence_in_mon = 80 compare = greater_than_or_equals }
					}
				}
			}
		}

		modifier = {
			civilian_factory_use = 1
		}

		complete_effect = {
			custom_effect_tooltip = GEN_270_days_tt
			FROM = {
				add_offsite_building = { type = industrial_complex level = 1 }
			}
		}

		remove_effect = {
			add_tech_bonus = {
				name = electronics_bonus
				bonus = 1
				uses = 1
				category = electronics
			}
			FROM = {
				add_offsite_building = { type = industrial_complex level = -1 }
			}
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				MON_soviet_medium_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				MON_jap_medium_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				MON_chi_medium_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				MON_prc_medium_influence_increase_effect = yes
			}
		}
	}

	MON_manipulate_FROM_representatives = {

		icon = generic_speech
		available = {
			FROM = {
				exists = yes
				OR = {
					is_in_faction_with = ROOT
					has_government = ROOT#
					ROOT = {
						is_subject_of = FROM
					}
				}
			}
			if = {
				limit = {
					FROM ={
						tag = SOV
					}
				}
				OR = {
					has_completed_focus = MON_hold_plenum_of_central_committee
					has_completed_focus = MON_reach_out_to_moscow
				}
			}
		}
		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 20 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 20 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 20 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 20 compare = greater_than_or_equals }
						}
					}
				}
			}
		}

		days_remove = 20
		days_re_enable = 90

		cost = 5

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {	#don't do if high enough
				factor = 0
				OR = {
					AND = {
						FROM = {
							tag = SOV
						}
						check_variable = { sov_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = JAP
						}
						check_variable = { jap_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = CHI
						}
						check_variable = { chi_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = PRC
						}
						check_variable = { prc_influence_in_mon = 75 compare = greater_than_or_equals }
					}
				}
			}
		}

		modifier = {
			political_power_cost = 0.3
		}

		complete_effect = {
			custom_effect_tooltip = GEN_90_days_tt
		}
		
		remove_effect = {
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				random_list = {
					5 = {
						MON_soviet_low_influence_decrease_effect = yes
						SOV = { add_political_power = 5 }
					}
					15 = {
						MON_soviet_medium_influence_decrease_effect = yes
						SOV = { add_political_power = 10 }
					}
					25 = {
						MON_soviet_high_influence_decrease_effect = yes
						SOV = { add_political_power = 15 }
					}
				}
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				random_list = {
					5 = {
						MON_jap_low_influence_decrease_effect = yes
						JAP = { add_political_power = 5 }
					}
					15 = {
						MON_jap_medium_influence_decrease_effect = yes
						JAP = { add_political_power = 10 }
					}
					25 = {
						MON_jap_high_influence_decrease_effect = yes
						JAP = { add_political_power = 15 }
					}
				}
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				random_list = {
					5 = {
						MON_chi_low_influence_decrease_effect = yes
						CHI = { add_political_power = 5 }
					}
					15 = {
						MON_chi_medium_influence_decrease_effect = yes
						CHI = { add_political_power = 10 }
					}
					25 = {
						MON_chi_high_influence_decrease_effect = yes
						CHI = { add_political_power = 15 }
					}
				}
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				random_list = {
					5 = {
						MON_prc_low_influence_decrease_effect = yes
						PRC = { add_political_power = 5 }
					}
					15 = {
						MON_prc_medium_influence_decrease_effect = yes
						PRC = { add_political_power = 10 }
					}
					25 = {
						MON_prc_high_influence_decrease_effect = yes
						PRC = { add_political_power = 15 }
					}
				}
			}
		}
	}
	

	MON_solidify_ties_with_from_politicians = {
		icon = generic_political_discourse
		available = {
			FROM = {
				exists = yes
				NOT = {
					has_war_with = ROOT
				}
			}
			if = {
				limit = {
					FROM ={
						tag = SOV
					}
				}
				has_completed_focus = MON_hold_plenum_of_central_committee
			}
		}
		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 25 compare = less_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 25 compare = less_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 25 compare = less_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 25 compare = less_than_or_equals }
						}
					}
				}
			}
		}

		days_remove = 35
		days_re_enable = 90

		cost = 5

		fire_only_once = no

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 10
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 5 compare = less_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 5 compare = less_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 5 compare = less_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 5 compare = less_than_or_equals }
						}
					}
				}
			}
			modifier = {	#don't do if high enough
				factor = 0
				OR = {
					AND = {
						FROM = {
							tag = SOV
						}
						check_variable = { sov_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = JAP
						}
						check_variable = { jap_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = CHI
						}
						check_variable = { chi_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = PRC
						}
						check_variable = { prc_influence_in_mon = 75 compare = greater_than_or_equals }
					}
				}
			}
		}

		modifier = {
			political_power_gain = -0.2
		}

		complete_effect = {
			custom_effect_tooltip = GEN_90_days_tt
		}
		
		remove_effect = {
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				MON_soviet_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				MON_jap_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				MON_chi_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				MON_prc_high_influence_increase_effect = yes
			}
		}
	}

	MON_promote_an_independent_diplomatic_stance = {

		icon = GFX_decision_generic_scales
		available = {
			is_subject = no
			OR = {
				custom_trigger_tooltip = {
					tooltip = MON_sov_influence_more_30_tt
					check_variable = { sov_influence_in_mon = 30 compare = greater_than_or_equals }
				}
				custom_trigger_tooltip = {
					tooltip = MON_jap_influence_more_30_tt
					check_variable = { jap_influence_in_mon = 30 compare = greater_than_or_equals }
				}
				custom_trigger_tooltip = {
					tooltip = MON_chi_influence_more_30_tt
					check_variable = { chi_influence_in_mon = 30 compare = greater_than_or_equals }
				}
				custom_trigger_tooltip = {
					tooltip = MON_prc_influence_more_30_tt
					check_variable = { prc_influence_in_mon = 30 compare = greater_than_or_equals }
				}
			}
		}

		days_re_enable = 270

		cost = 75

		fire_only_once = no

		ai_will_do = {
			factor = 0.25
			modifier = {	#don't do if low enough already
				factor = 0
				check_variable = { sov_influence_in_mon = 10 compare = less_than_or_equals }
				check_variable = { jap_influence_in_mon = 10 compare = less_than_or_equals }
				check_variable = { chi_influence_in_mon = 10 compare = less_than_or_equals }
				check_variable = { prc_influence_in_mon = 10 compare = less_than_or_equals }
			}
		}

		complete_effect = {
			custom_effect_tooltip = GEN_270_days_tt
		}
		
		remove_effect = {
			MON_soviet_medium_influence_decrease_effect = yes
			MON_jap_medium_influence_decrease_effect = yes
			MON_chi_medium_influence_decrease_effect = yes
			MON_prc_medium_influence_decrease_effect = yes
		}
	}

	MON_obtain_new_weapon_designs = {

		icon = ger_military_buildup

		allowed = {
			tag = MON
		}
		visible = {
			OR = {
				check_variable = { sov_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { jap_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { chi_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { prc_influence_in_mon = 25 compare = greater_than_or_equals }
				AND = {
					is_in_faction = yes
					any_other_country = {
						is_major = yes
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 50
					}
				}
			}
			has_completed_focus = MON_experimental_mobility
		}
		available = {
			FROM = {
				exists = yes	
				has_government = ROOT
				num_of_factories > 50 
				has_opinion	= {
					target = ROOT
					value > 49
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = MON_weapon_prototype_development
		}

		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						is_major = yes
						NOT = {
							tag = SOV
							original_tag = JAP
							original_tag = CHI
							original_tag = PRC
						}
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 100
					}
				}
			}
		}

		days_remove = 30
		days_re_enable = 180

		cost = 30

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {	#don't do if high enough
				factor = 0
				OR = {
					AND = {
						FROM = {
							tag = SOV
						}
						check_variable = { sov_influence_in_mon = 85 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = JAP
						}
						check_variable = { jap_influence_in_mon = 85 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = CHI
						}
						check_variable = { chi_influence_in_mon = 85 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = PRC
						}
						check_variable = { prc_influence_in_mon = 85 compare = greater_than_or_equals }
					}
				}
			}
		}

		modifier = {
			civilian_factory_use = 2
		}

		complete_effect = {
			custom_effect_tooltip = GEN_180_days_tt
			FROM = {
				add_offsite_building = { type = industrial_complex level = 2 }
			}
		}
		
		remove_effect = {
			add_tech_bonus = {
				name = infantry_bonus
				bonus = 2
				uses = 2
				category = infantry_weapons
			}
			FROM = {
				add_offsite_building = { type = industrial_complex level = -2 }
			}
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				MON_soviet_low_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				MON_jap_low_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				MON_chi_low_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				MON_prc_low_influence_increase_effect = yes
			}
		}
	}

	MON_study_foreign_artillery_plans = {

		icon = generic_operation

		allowed = {
			tag = MON
		}
		visible = {
			OR = {
				check_variable = { sov_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { jap_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { chi_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { prc_influence_in_mon = 25 compare = greater_than_or_equals }
				AND = {
					is_in_faction = yes
					any_other_country = {
						is_major = yes
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 50
					}
				}
			}
			has_completed_focus = MON_investigate_improvement_opportunities
		}
		available = {
			FROM = {
				exists = yes	
				has_government = ROOT
				num_of_factories > 50 
				has_opinion	= {
					target = ROOT
					value > 49
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = MON_investigate_improvement_opportunities
		}

		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						is_major = yes
						NOT = {
							tag = SOV
							original_tag = JAP
							original_tag = CHI
							original_tag = PRC
						}
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 100
					}
				}
			}
		}

		days_remove = 40
		days_re_enable = 270

		cost = 30

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {	#don't do if high enough
				factor = 0
				OR = {
					AND = {
						FROM = {
							tag = SOV
						}
						check_variable = { sov_influence_in_mon = 80 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = JAP
						}
						check_variable = { jap_influence_in_mon = 80 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = CHI
						}
						check_variable = { chi_influence_in_mon = 80 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = PRC
						}
						check_variable = { prc_influence_in_mon = 80 compare = greater_than_or_equals }
					}
				}
			}
		}

		modifier = {
			civilian_factory_use = 2
		}

		complete_effect = {
			custom_effect_tooltip = GEN_270_days_tt
			FROM = {
				add_offsite_building = { type = industrial_complex level = 2 }
			}
		}
		
		remove_effect = {
			add_tech_bonus = {
				name = artillery_bonus
				bonus = 2
				uses = 1
				category = artillery
			}
			FROM = {
				add_offsite_building = { type = industrial_complex level = -2 }
			}
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				MON_soviet_medium_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				MON_jap_medium_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				MON_chi_medium_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				MON_prc_medium_influence_increase_effect = yes
			}
		}
	}

	MON_acquire_tank_designs = {

		icon = generic_tank

		allowed = {
			tag = MON
		}
		visible = {
			OR = {
				check_variable = { sov_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { jap_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { chi_influence_in_mon = 25 compare = greater_than_or_equals }
				check_variable = { prc_influence_in_mon = 25 compare = greater_than_or_equals }
				AND = {
					is_in_faction = yes
					any_other_country = {
						is_major = yes
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 100
					}
				}
			}
			has_completed_focus = MON_experimental_mobility
		}
		available = {
			FROM = {
				exists = yes	
				has_government = ROOT
				num_of_factories > 50 
				has_opinion	= {
					target = ROOT
					value > 49
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = MON_acquire_foreign_tank_designs
		}

		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 40 compare = greater_than_or_equals }
						}
					}
					AND = {
						is_major = yes
						NOT = {
							tag = SOV
							original_tag = JAP
							original_tag = CHI
							original_tag = PRC
						}
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 100
					}
				}
			}
		}

		days_remove = 60
		days_re_enable = 365

		cost = 45

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				is_historical_focus_on = yes
				OR = {
					has_political_power > 500
					num_of_factories > 15 	#can afford some tanks, maybe
				}
			}
			modifier = {	#don't do if high enough
				factor = 0
				OR = {
					AND = {
						FROM = {
							tag = SOV
						}
						check_variable = { sov_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = JAP
						}
						check_variable = { jap_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = CHI
						}
						check_variable = { chi_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = PRC
						}
						check_variable = { prc_influence_in_mon = 75 compare = greater_than_or_equals }
					}
				}
			}
		}

		modifier = {
			civilian_factory_use = 2
		}

		complete_effect = {
			custom_effect_tooltip = GEN_365_days_tt
			FROM = {
				add_offsite_building = { type = industrial_complex level = 2 }
			}
		}
		
		remove_effect = {
			add_tech_bonus = {
				name = armor_bonus
				bonus = 2
				uses = 1
				category = armor
			}
			FROM = {
				add_offsite_building = { type = industrial_complex level = -2 }
			}
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				MON_soviet_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				MON_jap_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				MON_chi_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				MON_prc_high_influence_increase_effect = yes
			}
		}
	}

	MON_obtain_plane_schematics = {

		icon = generic_air

		visible = {
			has_completed_focus = MON_establish_provisional_airforce
		}
		available = {
			FROM = {
				exists = yes	
				has_government = ROOT
				num_of_factories > 50 
				has_opinion	= {
					target = ROOT
					value > 49
				}
			}
			num_of_civilian_factories_available_for_projects > 2
			has_completed_focus = MON_foreign_air_equipment_coordination
		}

		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 45 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 45 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 45 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 45 compare = greater_than_or_equals }
						}
					}
					AND = {
						is_major = yes
						NOT = {
							tag = SOV
							original_tag = JAP
							original_tag = CHI
							original_tag = PRC
						}
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 100
					}
				}
			}
		}

		days_remove = 90
		days_re_enable = 365

		cost = 50

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				is_historical_focus_on = yes
				OR = {
					has_political_power > 500
					num_of_factories > 15 	#can afford some planes, maybe
				}
			}
			modifier = {	#don't do if high enough
				factor = 0
				OR = {
					AND = {
						FROM = {
							tag = SOV
						}
						check_variable = { sov_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = JAP
						}
						check_variable = { jap_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = CHI
						}
						check_variable = { chi_influence_in_mon = 75 compare = greater_than_or_equals }
					}
					AND = {
						FROM = {
							original_tag = PRC
						}
						check_variable = { prc_influence_in_mon = 75 compare = greater_than_or_equals }
					}
				}
			}
		}

		modifier = {
			civilian_factory_use = 2
		}

		complete_effect = {
			custom_effect_tooltip = GEN_365_days_tt
			FROM = {
				add_offsite_building = { type = industrial_complex level = 2 }
			}
		}
		
		remove_effect = {
			add_tech_bonus = {
				name = air_bonus
				bonus = 2
				uses = 1
				category = light_fighter
				category = cat_heavy_fighter
				category = cat_strategic_bomber
				category = tactical_bomber
				category = cas_bomber
				category = naval_bomber
			}
			FROM = {
				add_offsite_building = { type = industrial_complex level = -2 }
			}
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				MON_soviet_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				MON_jap_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				MON_chi_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				MON_prc_high_influence_increase_effect = yes
			}
		}
	}
	
	MON_foreign_takeover = {

		icon = SWI_consolidate_council_power

		priority = 5

		days_mission_timeout = 90

		fire_only_once = no

		activation = {
			is_subject = no
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				check_variable = { sov_influence_in_mon = 90 compare = greater_than_or_equals }
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				check_variable = { jap_influence_in_mon = 90 compare = greater_than_or_equals }
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				check_variable = { chi_influence_in_mon = 90 compare = greater_than_or_equals }
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				check_variable = { prc_influence_in_mon = 90 compare = greater_than_or_equals }
			}
		}

		available = {
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				OR = {
					is_subject = yes
					custom_trigger_tooltip = {
						tooltip = MON_sov_influence_less_85_tt
						check_variable = { sov_influence_in_mon = 85 compare = less_than_or_equals }
					}
				}
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				OR = {
					is_subject = yes
					custom_trigger_tooltip = {
						tooltip = MON_jap_influence_less_85_tt
						check_variable = { jap_influence_in_mon = 85 compare = less_than_or_equals }
					}
				}
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				OR = {
					is_subject = yes
					custom_trigger_tooltip = {
						tooltip = MON_chi_influence_less_85_tt
						check_variable = { chi_influence_in_mon = 85 compare = less_than_or_equals }
					}
				}
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				OR = {
					is_subject = yes
					custom_trigger_tooltip = {
						tooltip = MON_prc_influence_less_85_tt
						check_variable = { prc_influence_in_mon = 85 compare = less_than_or_equals }
					}
				}
			}
		}

		target_trigger = {
			FROM = {
				exists = yes
				is_subject = no
				NOT = { has_war_with = ROOT }
				OR = {
					AND = {
						tag = SOV
						ROOT = {
							check_variable = { sov_influence_in_mon = 90 compare = greater_than_or_equals }

						}
					}
					AND = {
						original_tag = JAP
						ROOT = {
							check_variable = { jap_influence_in_mon = 90 compare = greater_than_or_equals }
							
						}
					}
					AND = {
						original_tag = CHI
						ROOT = {
							check_variable = { chi_influence_in_mon = 90 compare = greater_than_or_equals }
							
						}
					}
					AND = {
						original_tag = PRC
						ROOT = {
							check_variable = { prc_influence_in_mon = 90 compare = greater_than_or_equals }
						}
					}
				}
			}
		}

		is_good = no

		complete_effect = {
			add_political_power = 20
		}

		timeout_effect = {
			FROM = {
				country_event = {
					id = mongol_foreign_influence.2
					hours = 12
				}
			}
			# IF THEY ACCEPT
			custom_effect_tooltip = if_they_accept_tt
			effect_tooltip = {
				FROM = {
					add_political_power = 15
					add_stability = -0.02
				}
				if = {
					limit = {
						FROM = {
							tag = SOV
						}
					}
					MON_soviet_low_influence_increase_effect = yes
				}
				if = {
					limit = {
						FROM = {
							original_tag = JAP
						}
					}
					MON_jap_low_influence_increase_effect = yes
				}
				if = {
					limit = {
						FROM = {
							original_tag = CHI
						}
					}
					MON_chi_low_influence_increase_effect = yes
				}
				if = {
					limit = {
						FROM = {
							original_tag = PRC
						}
					}
					MON_prc_low_influence_increase_effect = yes
				}
				every_other_country = {
					limit = {
						has_war_with = MON
						NOT = { is_in_faction_with = ROOT }
					}
					FROM = {
						add_to_war = {
							targeted_alliance = MON
							enemy = PREV
							hostility_reason = asked_to_join
						}
					}
				}
				FROM = { 
					set_autonomy = {
						target = MON
						autonomous_state = autonomy_dominion
						freedom_level = 0.1
					}
				}
				MON = {
					add_ideas = MON_foreign_tribute_idea
				}
			}

			# IF THEY REFUSE
			custom_effect_tooltip = if_they_refuse_tt
			effect_tooltip = {
				add_political_power = -25
				if = {
					limit = {
						FROM = {
							tag = SOV
						}
					}
					MON_soviet_high_influence_decrease_effect = yes
				}
				if = {
					limit = {
						FROM = {
							original_tag = JAP
						}
					}
					MON_jap_high_influence_decrease_effect = yes
				}
				if = {
					limit = {
						FROM = {
							original_tag = CHI
						}
					}
					MON_chi_high_influence_decrease_effect = yes
				}
				if = {
					limit = {
						FROM = {
							original_tag = PRC
						}
					}
					MON_prc_high_influence_decrease_effect = yes
				}
			}
		}
	}

	#civil war interventions
	MON_support_the_sov_leader_loyalists = {

		icon = SOV_place_hq_exiles

		cost = 10
		priority = 8

		visible = {
			has_completed_focus = MON_assist_the_revolutionary_struggle
			NOT = {
				has_global_flag = MON_picked_a_side_in_soviet_civil_war
			}
		}

		available = {
			FROM = {
				NOT = {
					has_war_with = ROOT
					is_in_faction_with = ROOT
				}
			}
			NOT = {
				has_country_flag = MON_pursuing_ties_with_one_scw_side
			}
		}
		target_trigger = {
			FROM = {
				OR = {	#basically checks if they are fighting each other - might be a problem late-game in case both exist though...
					AND = {
						original_tag = SOV
						has_war_with = SOS
					}
					AND = {
						original_tag = SOS
						has_war_with = SOV
					}
				}
				has_government = ROOT
				NOT = {	#if they already declined to prevent spam
					has_country_flag = MON_cannot_support_their_cause
				}
			}
		}

		ai_will_do = {
			factor = 1
		}

		days_remove = 14

		modifier = {
			political_power_gain = -0.05
		}

		complete_effect = {
			set_country_flag = MON_pursuing_ties_with_one_scw_side
		}

		remove_effect = {
			clr_country_flag = MON_pursuing_ties_with_one_scw_side
			FROM = {
				country_event = { 
					id = mongol_foreign_influence.3 
					hours = 12
				}
				# IF THEY ACCEPT
				custom_effect_tooltip = if_they_accept_tt
				effect_tooltip = {
					FROM = {
						add_political_power = 25
						add_war_support = 0.02
						add_popularity = {
							ideology = communism
							popularity = 0.03
						}
						diplomatic_relation = {
							country = MON
							relation = non_aggression_pact
							active = yes
						}
					}
					set_global_flag = MON_picked_a_side_in_soviet_civil_war
				}
				
				## IF THEY REFUSE
				custom_effect_tooltip = if_they_refuse_tt
				effect_tooltip = {
					FROM = {
						add_political_power = 10
					}
				}
			}
		}
	}

	#civil war interventions
	MON_allow_volunteer_work = {

		icon = generic_civil_support

		cost = 25
		priority = 10

		visible = {
			has_completed_focus = MON_assist_the_revolutionary_struggle
			NOT = {
				has_global_flag = SOV_soviet_civil_war_over
			}
		}

		available = {
			any_other_country = {
				OR = {
					AND = {
						original_tag = SOV
						has_war_with = SOS
					}
					AND = {
						original_tag = SOS
						has_war_with = SOV
					}
				}
				custom_trigger_tooltip = {
					tooltip = MON_supports_our_cause
					has_country_flag = MON_supports_our_cause
				}
			}
			has_global_flag = MON_picked_a_side_in_soviet_civil_war
		}

		ai_will_do = {
			factor = 100 #we love assisting our allies
		}


		fire_only_once = yes

		days_remove = 21

		modifier = {
			political_power_gain = -0.01
			consumer_goods_factor = 0.06
			weekly_manpower = 500
		}

		complete_effect = {
			add_war_support = 0.03
		}

		remove_effect = {
			add_ai_strategy = {
				type = send_volunteers_desire
				id = ROOT
				value = 300
			}
			set_rule = { can_send_volunteers = yes }
			add_timed_idea = {
				idea = MON_volunteers_in_war
				days = 1460
			}
		}
	}

	MON_reinforce_mutual_assistance_treaty = {

		icon = hol_radio_oranje

		cost = 50
		priority = 12

		visible = {
			has_completed_focus = MON_assist_the_revolutionary_struggle
			NOT = {
				has_global_flag = SOV_soviet_civil_war_over
			}
		}

		available = {
			any_other_country = {
				OR = {
					AND = {
						original_tag = SOV
						has_war_with = SOS
					}
					AND = {
						original_tag = SOS
						has_war_with = SOV
					}
				}
				custom_trigger_tooltip = {
					tooltip = MON_supports_our_cause
					has_country_flag = MON_supports_our_cause
				}
			}
			has_global_flag = MON_picked_a_side_in_soviet_civil_war
		}

		ai_will_do = {
			factor = 100 #we love assisting our allies
		}


		fire_only_once = yes

		days_remove = 28

		modifier = {
			war_support_weekly = 0.005
		}

		complete_effect = {
			every_other_country = {
				limit = {
					OR = {
						AND = {
							original_tag = SOV
							has_war_with = SOS
						}
						AND = {
							original_tag = SOS
							has_war_with = SOV
						}
					}
				}
				country_event = {
					id = mongol_foreign_influence.6
					days = 1
				}
			}
		}

		remove_effect = {
			if = {	#looks not better, but has clearer tooltip for the player
				limit = {
					SOV = {
						has_country_flag = MON_supports_our_cause
					}
				}
				MON = {
					create_wargoal = {
						target = SOS
						type = topple_government
						expire = 0
					}
				}
			}
			if = {
				limit = {
					SOS = {
						has_country_flag = MON_supports_our_cause
					}
				}
				MON = {
					create_wargoal = {
						target = SOV
						type = topple_government
						expire = 0
					}
				}
			}
			#random_other_country = {
			#	limit = {
			#		OR = {
			#			AND = {
			#				original_tag = SOV
			#				has_war_with = SOS
			#			}
			#			AND = {
			#				original_tag = SOS
			#				has_war_with = SOV
			#			}
			#		}
			#		NOT = {
			#			has_country_flag = MON_supports_our_cause
			#		}
			#	}
			#	MON = {
			#		create_wargoal = {
			#			target = PREV
			#			type = topple_government
			#			expire = 0
			#		}
			#	}
			#}
		}
	}

	MON_expand_the_recruitment_campaign = {

		icon = generic_military

		priority = 0

		available = {
			is_subject = no
			OR = {
				has_war_support > 0.25
				has_manpower < 2000
			}
		}

	
		visible = {
			OR = {
				has_completed_focus = MON_learn_from_lkhumbe_affair
				has_completed_focus = MON_contact_the_bandits
				has_completed_focus = MON_denounce_politizised_army
				has_completed_focus = MON_dealing_with_soviet_sympathisers
				has_completed_focus = MON_matters_of_internal_affairs
			}
		}

		days_re_enable = 270
		days_remove = 60

		cost = 15

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 100
				has_war_support > 0.50
			}
			modifier = {
				factor = 100
				has_manpower < 10
			}
		}

		modifier = {
			weekly_manpower = 250
			war_support_weekly = -0.002
		}

		complete_effect = {
			custom_effect_tooltip = GEN_270_days_tt
		}
	}


	MON_prepare_invasion_of_sov_insurgents = {

		icon = generic_prepare_civil_war 	
		target_trigger = {
			FROM = {
				is_subject = no
				is_major = no #not against majors, limited intervention, just in case
				NOT = { has_war_with = ROOT }
				NOT = { is_in_faction_with = ROOT }
				has_country_flag = SOV_breakaway_country_flag
			}
		}
		allowed = {
			original_tag = MON
		}
		available = {
			has_completed_focus = MON_contest_the_insurgents
			NOT = {
				has_country_flag = ROOT_prepairing_invasion
			}
		}

		visible = {
			has_completed_focus = MON_contest_the_insurgents
			is_subject = no
		}

		fire_only_once = no
		cost = 15

		ai_will_do = {
			factor = 10
		}

		days_remove = 14

		complete_effect = {
			ROOT = {
				add_ai_strategy = {
					type = prepare_for_war
					id = FROM
					value = 200
				}
			}
			FROM = { 
				country_event = {
					id = mongol_democratic.6 
					hours = 6
				}
				add_ai_strategy = {
					type = alliance
					id = ROOT
					value = -100
				}
				add_ai_strategy = {
					type = prepare_for_war
					id = ROOT
					value = 200
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = large_decrease
				}
			}
			set_country_flag = ROOT_prepairing_invasion
		}

		modifier = {
			political_power_gain = -0.05
			command_power_gain = -0.3
		}

		remove_effect = {
			if = {	#cancel NAP to prevent memes
				limit = {
					FROM = { has_non_aggression_pact_with = ROOT }
				}
				diplomatic_relation = {
					country = FROM
					relation = non_aggression_pact
					active = no
				}
			}
			clr_country_flag = ROOT_prepairing_invasion
			ROOT = {
				create_wargoal = {
					target = FROM
					type = topple_government
					expire = 270
				}
			}
		}
	}
}


########################################################################
########################################################################
########################################################################
########################################################################
########################################################################

MON_raids_operations_category = {
	MON_commit_small_raid = {
		icon = border_war		

		available = {
			FROM = {
				any_owned_state = {
					is_controlled_by = FROM
					any_neighbor_state = {
						is_fully_controlled_by = ROOT
						set_temp_variable = { var:attacker_state_temp = id }
						has_ROOT_at_least_1_div_in_current_state_scope = yes
						hidden_trigger = { NOT = { has_state_flag = border_incident_active } }
					}
					NOT = { has_state_flag = border_incident_active }
					set_temp_variable = { var:defender_state_temp = id }
				}
			}
			NOT = { has_non_aggression_pact_with = FROM }
		}

		visible = {
			#FROM = { has_not_initiated_border_incident_with_ROOT = yes }	#may be a viable option for future
			FROM = {
				exists = yes
				NOT = {
					is_subject_of = ROOT
				}
				NOT = {
					is_in_faction_with = ROOT
				}
				NOT = { 
					has_war_with = ROOT
				}
			}
			NOT = {
				is_subject_of = FROM
			}

			NOT = { has_border_war_with = FROM }
			FROM = {
				any_owned_state = {
					is_controlled_by = FROM
					NOT = { has_state_flag = border_incident_active }
					any_neighbor_state = {
						NOT = { has_state_flag = border_incident_active }
						is_fully_controlled_by = ROOT
					}
				}
			}
		}

		target_root_trigger = {
			original_tag = MON
			OR = {
				has_completed_focus = MON_subvert_soviet_control
				has_completed_focus = MON_ratify_mutual_assistance_treaty
				has_completed_focus = MON_appeal_to_china
				has_completed_focus = MON_approach_japan
			}
		}
		target_array = neighbors

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = JAP
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
					original_tag = TAN
					original_tag = SOV
				}
				NOT = { has_government = MON }
			}
		}
		allowed = {
			original_tag = MON
		}

		highlight_states = {
			highlight_states_trigger = {
				OR = {
					state = FROM.defender_state_vs_@ROOT
					AND = {
						is_owned_and_controlled_by = FROM
						NOT = { has_state_flag = border_incident_active }
						any_neighbor_state = {
							NOT = { has_state_flag = border_incident_active }
							is_fully_controlled_by = ROOT
						}
					}
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				any_controlled_state = {	#don't trigger multiple ones at the same time with that little divisions
					has_state_flag = border_incident_active
				}
			}
			modifier = {	#we are losing the war or having some internal issues
				factor = 0	
				OR = {
					surrender_progress > 0.01
					has_civil_war = yes
				}
			}
			modifier = {	#they are way too strong, better not provoke them
				factor = 0
				OR = {
					FROM = {
						has_army_manpower = { size > 700000 }		#arbitrary number here
					}
					strength_ratio = { tag = FROM ratio < 0.08 }	#with 6 starting divisions, shall be around 75 for FROM, starting CHI is slightly smaller
				}
			}
			modifier = {	#raid mengkukuo if its a player
				factor = 2
				FROM = {
					is_ai = no
					original_tag = MEN
					has_idea = MEN_mongol_raids
				}
			}
			modifier = {	#we don't like fascists and imperialists
				factor = 10
				has_government = communism
				FROM = {
					OR = {
						has_government = fascism
						original_tag = MAN
						original_tag = MEN
					}
				}
			}
			modifier = {	#we dont like japanese collaborators
				factor = 1.5
				FROM = {
					original_tag = MEN
					has_country_leader = {
						character = MEN_prince_demchugdongrub
						ruling_only = yes
					}
				}
			}
			modifier = {	#we are okay with neutral and democratic nations
				factor = 0.2
				FROM = {
					NOT = {
						original_tag = MAN
						original_tag = MEN
					}
					has_government = neutrality
					has_government = democratic
				}
			}
		}

		custom_cost_text = r56_15_command_power_cost
		custom_cost_trigger = {
			command_power > 15
		}

		fire_only_once = no

		days_remove = 4
		days_re_enable = 75

		war_with_target_on_remove = no

		complete_effect = {
			hidden_effect = {
				add_command_power = -15
				FROM = {
					random_owned_controlled_state = {
						limit = {
							NOT = { has_state_flag = border_incident_active }
							any_neighbor_state = {
								NOT = { has_state_flag = border_incident_active }
								has_ROOT_at_least_1_div_in_current_state_scope = yes
								is_fully_controlled_by = ROOT
							}
						}
						save_event_target_as = defender_state
						set_variable = { FROM.defender_state_vs_@ROOT = id }
						set_temp_variable = { defender_state_temp = id }
						set_state_flag = border_incident_active
					}
				}
				random_state = {
					limit = {
						is_fully_controlled_by = ROOT
						NOT = { has_state_flag = border_incident_active }
						has_ROOT_at_least_1_div_in_current_state_scope = yes
						any_neighbor_state = {
							state = var:FROM.defender_state_vs_@ROOT
						}
					}
					save_event_target_as = attacker_state
					set_variable = { FROM.attacker_state_vs_@ROOT = id }
					set_temp_variable = { attacker_state_temp = id }
					set_state_flag = border_incident_active
				}
			}
			custom_effect_tooltip = MON_border_clashes_small_raid_75
			FROM = {
				country_event = { id = mongol.19 hours = 6 }		
			}
		}
		remove_effect = {
			hidden_effect = {
				var:FROM.defender_state_vs_@ROOT = {
					save_event_target_as = defender_state 
				}
				var:FROM.attacker_state_vs_@ROOT = {
					save_event_target_as = attacker_state 
				}
				FROM = {
					random_owned_controlled_state = {
						limit = {
							NOT = { has_state_flag = border_incident_active }
							any_neighbor_state = {
								is_fully_controlled_by = ROOT
								has_ROOT_at_least_1_div_in_current_state_scope = yes
								NOT = { has_state_flag = border_incident_active }
							}
						}
						set_temp_variable = { defender_state_temp = id }
					}
				}
				random_state = {
					limit = {
						is_fully_controlled_by = ROOT
						NOT = { has_state_flag = border_incident_active }
						has_ROOT_at_least_1_div_in_current_state_scope = yes
						any_neighbor_state = {
							state = var:FROM.defender_state_vs_@ROOT
						}
					}
					set_temp_variable = { attacker_state_temp = id }
				}
			}
			if = {
				limit = {
					FROM = {
						has_country_flag = MON_raid_ignored
					}
				}
				ROOT = {
					country_event = { id = mongol.20 }
				}
				FROM = {
					var:attacker_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					var:defender_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					clear_variable = attacker_state_vs_@ROOT
					clear_variable = defender_state_vs_@ROOT
				}
			}
			else = {
				custom_effect_tooltip = MON_border_clashes_small_raid_warning
				start_border_war = {
					change_state_after_war = no
					combat_width = 20
					minimum_duration_in_days = 2
					attacker = {
						state = var:FROM.attacker_state_vs_@ROOT
						num_provinces = 1
						on_win = mongol.20
						on_lose = mongol.21
						on_cancel = mongol.22
					}
					
					defender = {
						state = var:FROM.defender_state_vs_@ROOT
						num_provinces = 1
						on_win = mongol.23
						on_lose = mongol.24
						on_cancel = mongol.25
					}
				}
				activate_targeted_decision = { target = FROM decision = MON_small_raid_cancelled }
				FROM = {
					activate_targeted_decision = { target = ROOT decision = MON_small_raid_cancelled }
				}
			}
		}
	}

	#Mission for Mongolia to finish the raid in 7 days
	MON_small_raid_cancelled = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			var:FROM.defender_state_vs_@ROOT = { has_border_war = no }
			var:FROM.attacker_state_vs_@ROOT = { has_border_war = no }
		}
		
		highlight_states = {
			highlight_states_trigger = {
				state = var:defender_state_temp
				state = var:FROM.defender_state_vs_@ROOT
			}
		}

		ai_will_do = {
			base = 0
		}

		days_mission_timeout = 7
		is_good = no

		fire_only_once = yes #Reactivation handled in effect

		timeout_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				cancel_border_war = {
					defender = var:defender_state_vs_@FROM
					attacker = var:attacker_state_vs_@FROM
				}
			}
			else = {
				cancel_border_war = {
					defender = var:FROM.defender_state_vs_@ROOT
					attacker = var:FROM.attacker_state_vs_@ROOT
				}
			}
		}
	}

	#Big raids
	MON_commit_big_raid = {
		icon = generic_prepare_civil_war		

		available = {
			FROM = {
				any_owned_state = {
					is_controlled_by = FROM
					any_neighbor_state = {
						is_fully_controlled_by = ROOT
						set_temp_variable = { var:attacker_state_temp = id }
						has_ROOT_at_least_3_div_in_current_state_scope = yes
						NOT = { has_state_flag = border_incident_active }
					}
					NOT = { has_state_flag = border_incident_active }
					set_temp_variable = { var:defender_state_temp = id }
				}
			}
			NOT = { has_non_aggression_pact_with = FROM }
		}

		visible = {
			#FROM = { has_not_initiated_border_incident_with_ROOT = yes }	#may be a viable option for future
			FROM = {
				exists = yes
				NOT = {
					is_subject_of = ROOT
				}
				NOT = {
					is_in_faction_with = ROOT
				}
				NOT = { 
					has_war_with = ROOT
				}
			}
			NOT = {
				is_subject_of = FROM
			}

			NOT = { has_border_war_with = FROM }
			FROM = {
				any_owned_state = {
					is_controlled_by = FROM
					NOT = { has_state_flag = border_incident_active }
					any_neighbor_state = {
						NOT = { has_state_flag = border_incident_active }
						is_fully_controlled_by = ROOT
					}
				}
			}
		}

		target_root_trigger = {
			original_tag = MON
			OR = {
				has_completed_focus = MON_subvert_soviet_control
				has_completed_focus = MON_ratify_mutual_assistance_treaty
				has_completed_focus = MON_appeal_to_china
				has_completed_focus = MON_approach_japan
			}
		}
		target_array = neighbors

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = JAP
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
					original_tag = TAN
					original_tag = SOV
				}
				NOT = { has_government = MON }
			}
		}
		allowed = {
			original_tag = MON
		}

		highlight_states = {
			highlight_states_trigger = {
				OR = {
					state = FROM.defender_state_vs_@ROOT
					AND = {
						is_owned_and_controlled_by = FROM
						NOT = { has_state_flag = border_incident_active }
						any_neighbor_state = {
							NOT = { has_state_flag = border_incident_active }
							is_fully_controlled_by = ROOT
						}
					}
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				any_controlled_state = {	#don't trigger multiple ones at the same time with that little divisions
					has_state_flag = border_incident_active
				}
			}
			modifier = {	#raid mengkukuo if its a player
				factor = 2
				FROM = {
					is_ai = no
					original_tag = MEN
					has_idea = MEN_mongol_raids
				}
			}
			modifier = {	#we don't like fascists and imperialists
				factor = 10
				has_government = communism
				FROM = {
					OR = {
						has_government = fascism
						original_tag = MAN
						original_tag = MEN
					}
				}
			}
			modifier = {	#we dont like japanese collaborators
				factor = 1.5
				FROM = {
					original_tag = MEN
					has_country_leader = {
						character = MEN_prince_demchugdongrub
						ruling_only = yes
					}
				}
			}
			modifier = {	#we are okay with neutral and democratic nations
				factor = 0.2
				FROM = {
					NOT = {
						original_tag = MAN
						original_tag = MEN
					}
					has_government = neutrality
					has_government = democratic
				}
			}
			modifier = {	#we are losing the war or having some internal issues
				factor = 0	
				OR = {
					surrender_progress > 0.01
					has_civil_war = yes
				}
			}
			modifier = {	#they are way too strong, better not provoke them
				factor = 0
				OR = {
					FROM = {
						has_army_manpower = { size > 700000 }		#arbitrary number here
					}
					strength_ratio = { tag = FROM ratio < 0.08 }	#with 6 starting divisions, shall be around 75 for FROM, starting CHI is slightly smaller
				}
			}
		}

		custom_cost_text = r56_35_command_power_cost
		custom_cost_trigger = {
			command_power > 35
		}

		fire_only_once = no

		days_remove = 14
		days_re_enable = 150

		war_with_target_on_remove = no

		complete_effect = {
			hidden_effect = {
				add_command_power = -35
				FROM = {
					random_owned_controlled_state = {
						limit = {
							NOT = { has_state_flag = border_incident_active }
							any_neighbor_state = {
								NOT = { has_state_flag = border_incident_active }
								has_ROOT_at_least_3_div_in_current_state_scope = yes
								is_fully_controlled_by = ROOT
							}
						}
						save_event_target_as = defender_state
						set_variable = { FROM.defender_state_vs_@ROOT = id }
						set_temp_variable = { defender_state_temp = id }
						set_state_flag = border_incident_active
					}
				}
				random_state = {
					limit = {
						is_fully_controlled_by = ROOT
						NOT = { has_state_flag = border_incident_active }
						has_ROOT_at_least_3_div_in_current_state_scope = yes
						any_neighbor_state = {
							state = var:FROM.defender_state_vs_@ROOT
						}
					}
					save_event_target_as = attacker_state
					set_variable = { FROM.attacker_state_vs_@ROOT = id }
					set_temp_variable = { attacker_state_temp = id }
					set_state_flag = border_incident_active
				}
			}
			custom_effect_tooltip = MON_border_clashes_big_raid_150
			FROM = {
				country_event = { id = mongol.19 hours = 6 }		
			}
		}
		remove_effect = {
			hidden_effect = {
				var:FROM.defender_state_vs_@ROOT = {
					save_event_target_as = defender_state 
				}
				var:FROM.attacker_state_vs_@ROOT = {
					save_event_target_as = attacker_state 
				}
				FROM = {
					random_owned_controlled_state = {
						limit = {
							NOT = { has_state_flag = border_incident_active }
							any_neighbor_state = {
								is_fully_controlled_by = ROOT
								has_ROOT_at_least_3_div_in_current_state_scope = yes
								NOT = { has_state_flag = border_incident_active }
							}
						}
						set_temp_variable = { defender_state_temp = id }
					}
				}
				random_state = {
					limit = {
						is_fully_controlled_by = ROOT
						NOT = { has_state_flag = border_incident_active }
						has_ROOT_at_least_3_div_in_current_state_scope = yes
						any_neighbor_state = {
							state = var:FROM.defender_state_vs_@ROOT
						}
					}
					set_temp_variable = { attacker_state_temp = id }
				}
			}
			if = {
				limit = {
					FROM = {
						has_country_flag = MON_raid_ignored
					}
				}
				ROOT = {
					country_event = { id = mongol.26 }
				}
				FROM = {
					var:attacker_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					var:defender_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					clear_variable = attacker_state_vs_@ROOT
					clear_variable = defender_state_vs_@ROOT
				}
			}
			else = {
				custom_effect_tooltip = MON_border_clashes_big_raid_warning
				start_border_war = {
					change_state_after_war = no
					combat_width = 60
					minimum_duration_in_days = 7
					attacker = {
						state = var:FROM.attacker_state_vs_@ROOT
						num_provinces = 2
						on_win = mongol.26
						on_lose = mongol.27
						on_cancel = mongol.28
					}
					
					defender = {
						state = var:FROM.defender_state_vs_@ROOT
						num_provinces = 2
						on_win = mongol.29
						on_lose = mongol.30
						on_cancel = mongol.31
					}
				}
				activate_targeted_decision = { target = FROM decision = MON_big_raid_cancelled }
				FROM = {
					activate_targeted_decision = { target = ROOT decision = MON_big_raid_cancelled }
				}
			}
		}
	}

	#Mission for Mongolia to finish the raid in 30 days
	MON_big_raid_cancelled = {

		icon = civil_war

		allowed = { always = no } #Activated from effect

		available = {
			var:FROM.defender_state_vs_@ROOT = { has_border_war = no }
			var:FROM.attacker_state_vs_@ROOT = { has_border_war = no }
		}
		
		highlight_states = {
			highlight_states_trigger = {
				state = var:defender_state_temp
				state = var:FROM.defender_state_vs_@ROOT
			}
		}

		ai_will_do = {
			base = 0
		}

		days_mission_timeout = 30
		is_good = no

		fire_only_once = yes #Reactivation handled in effect

		timeout_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				cancel_border_war = {
					defender = var:defender_state_vs_@FROM
					attacker = var:attacker_state_vs_@FROM
				}
			}
			else = {
				cancel_border_war = {
					defender = var:FROM.defender_state_vs_@ROOT
					attacker = var:FROM.attacker_state_vs_@ROOT
				}
			}
		}
	}

	MON_request_soviet_infantry = {

		icon = generic_military

		allowed = {
			tag = MON
		}
		visible = {
			has_completed_focus = MON_tackle_the_eastern_threat
		}
		available = {
			has_completed_focus = MON_tackle_the_eastern_threat
			SOV = {
				exists = yes
				is_in_faction_with = MON
			}
			has_country_flag = MON_khalkin_gol_soviets_invited
		}

		cost = 25

		fire_only_once = yes

		ai_will_do = {
			factor = 100
		}

		complete_effect = {
			add_war_support = -0.05
			MON_soviet_high_influence_increase_effect = yes
			division_template = {
				name = "Strelkovaya Diviziya"			# Rifle Division
				division_names_group = SOV_INF_01
			
				regiments = {
					infantry = { x = 0 y = 0 }
					infantry = { x = 0 y = 1 }
					infantry = { x = 0 y = 2 }
					infantry = { x = 1 y = 0 }
					infantry = { x = 1 y = 1 }
					infantry = { x = 1 y = 2 }
					infantry = { x = 2 y = 0 }
					infantry = { x = 2 y = 1 }
					infantry = { x = 2 y = 2 }
				}
				support = {
					artillery = { x = 0 y = 0 }
				}
			}
			819 = {
				create_unit = {
					division = "name = \"Pervaya Krasnoznamennaya Diviziya\" division_template = \"Strelkovaya Diviziya\" start_experience_factor = 0.3 start_equipment_factor = 0.9 force_equipment_variants = { infantry_equipment_0 = { owner = SOV } artillery_equipment_1 = { owner = SOV } }"
					owner = MON
				}
				create_unit = {
					division = "name = \"Vtoraya Krasnoznamennaya Diviziya\" division_template = \"Strelkovaya Diviziya\" start_experience_factor = 0.3 start_equipment_factor = 0.9 force_equipment_variants = { infantry_equipment_0 = { owner = SOV } artillery_equipment_1 = { owner = SOV } }"
					owner = MON
				}
				create_unit = {
					division = "name = \"82ya Strelkovaya Diviziya\" division_template = \"Strelkovaya Diviziya\" start_experience_factor = 0.4 start_equipment_factor = 0.9  force_equipment_variants = { infantry_equipment_0 = { owner = SOV } artillery_equipment_1 = { owner = SOV } }"
					owner = MON
				}
			}
		}
	}

	MON_request_soviet_tanks = {

		icon = generic_tank 

		allowed = {
			tag = MON
		}
		visible = {
			has_completed_focus = MON_tackle_the_eastern_threat
		}
		available = {
			has_completed_focus = MON_tackle_the_eastern_threat
			SOV = {
				exists = yes
				is_in_faction_with = MON
			}
			OR = {	#need to know what tanks are!
				has_tech = gwtank
				has_tech = gwtank_chassis
			}
			has_country_flag = MON_khalkin_gol_soviets_invited
		}

		cost = 50

		fire_only_once = yes

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			add_war_support = -0.10
			MON_soviet_high_influence_increase_effect = yes
			division_template = {
				name = "Tankovaya Brigada" 				#two tank brigades were moved to assist in maneuvers
				division_names_group = SOV_MEC_01
				regiments = {
					light_armor = { x = 0 y = 0 }
					light_armor = { x = 0 y = 1 }
					light_armor = { x = 1 y = 0 }		
					light_armor = { x = 1 y = 1 }		
					light_armor = { x = 1 y = 2 }		
					motorized = { x = 2 y = 0 }		
					motorized = { x = 2 y = 1 }	
					motorized = { x = 2 y = 2 }		
					motorized = { x = 2 y = 3 }		
				}
			}
			819 = {
				create_unit = {
					division = "name = \"4ja Tankovaya Brigada\" division_template = \"Tankovaya Brigada\" start_experience_factor = 0.4 start_equipment_factor = 0.95 force_equipment_variants = { infantry_equipment = { owner = SOV } motorized_equipment_1 = { owner = SOV } } light_tank_chassis_0 = { owner = SOV } }" 
					owner = MON
					prioritize_location = 12557
				}
				create_unit = {
					division = "name = \"7ja Tankovaya Brigada\" division_template = \"Tankovaya Brigada\" start_experience_factor = 0.4 start_equipment_factor = 0.95 force_equipment_variants = { infantry_equipment = { owner = SOV } motorized_equipment_1 = { owner = SOV } light_tank_chassis_0 = { owner = SOV } }" 
					owner = MON
					prioritize_location = 12629
				}
			}
		}
	}

	#Khalkin Gol
	MON_khalkin_gol = {
		icon = border_war
		allowed = {
			original_tag = MON
		}

		available = {
			has_completed_focus = MON_tackle_the_eastern_threat
			NOT = {
				has_war_with = JAP
				is_in_faction_with = JAP
			}
			819 = {
				custom_trigger_tooltip = {
					tooltip = MON_border_conflict_active
					NOT = { has_state_flag = border_incident_active }
				}
				any_neighbor_state = {
					OR = {
						is_controlled_by = JAP
						controller = {
							is_subject_of = JAP
						}
					}
				}
			}
		}

		visible = {
			has_completed_focus = MON_affirm_rearmament_program
		}

		highlight_states = {
			highlight_states_trigger = {
				state = 819
				state = 761
			}
		}
		
		fire_only_once = yes
		ai_will_do = {
			factor = 100
			modifier = {
				is_historical_focus_on = yes
				date < 1939.4.1
				factor = 0
			}
		}
		cost = 50
		days_remove = 30
		war_with_on_remove = JAP
		complete_effect = {
			819 = {
				save_event_target_as = MON_JAP_attacker_state
				set_state_flag = border_incident_active
			}
			761 = {
				save_event_target_as = MON_JAP_defender_state
				set_state_flag = border_incident_active
			}
			761 = {
				controller = {
					country_event = { id = mongol_khalkin_gol.1 days = 1 }
				}
				save_event_target_as = MON_JAP_defender_country
			}
			hidden_effect = {
				if = {
					limit = {
						is_in_faction_with = SOV
					}
					MON = {
						country_event = { id = mongol_khalkin_gol.6 days = 3 }
					}
				}
			}
		}
		remove_effect = {
			activate_targeted_decision = { target = MON decision = MON_khalkin_gol_forgotten }
			activate_targeted_decision = { target = MON decision = MON_escalate_incident_to_border_conflict_with_JAP }
		}
	}

	#Mission for defender warning that a conflict with FROM is coming
	MON_khalkin_gol_warning_DEFENDER = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			hidden_trigger = { always = no }
		}

		war_with_target_on_timeout = yes
		ai_will_do = {
			base = 0
		}

		days_mission_timeout = 30

		fire_only_once = yes

		is_good = no
		
		timeout_effect = {
			custom_effect_tooltip = escalation_possible_tooltip_for_defender
			custom_effect_tooltip = effects_if_border_conflict_is_lost
			effect_tooltip = {
				MON = {
					add_political_power = 120
					add_tech_bonus = {
						name = sov_jap_border_conflict_won
						uses = 2
						category = land_doctrine
						bonus = 1.0
					}
					add_tech_bonus = {
						name = sov_jap_border_conflict_won
						uses = 2
						category = armor
						bonus = 1.0
					}
				}
			}
			hidden_effect = {
				remove_targeted_decision = { target = MON decision = MON_khalkin_gol_warning_DEFENDER }
				activate_targeted_decision = { target = MON decision = MON_border_conflict_escalation_warning_JAP }
			}
		}
	}

	#Mission for defender warning FROM can escalate to war at any point is coming
	MON_border_conflict_escalation_warning_JAP = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			#var:ROOT.defender_state_vs_@FROM = {
			#	has_ROOT_at_least_1_div_in_current_state_scope = yes
			#}
			hidden_trigger = { always = no }
		}

		war_with_target_on_timeout = yes
		ai_will_do = {
			base = 0
		}

		days_mission_timeout = 30

		fire_only_once = yes

		is_good = no

		timeout_effect = {
			custom_effect_tooltip = from_cannot_escalate
			custom_effect_tooltip = effects_if_border_conflict_is_lost
			effect_tooltip = {
				MON = {
					add_political_power = 120
					add_tech_bonus = {
						name = sov_jap_border_conflict_won
						category = land_doctrine
						bonus = 2.0
					}
					add_tech_bonus = {
						name = sov_jap_border_conflict_won
						category = armor
						bonus = 2.0
					}
				}
			}
		}		
	}
	#Mission for attacker to escalate or incident is forgotten
	MON_khalkin_gol_forgotten = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			#var:ROOT.defender_state_vs_@FROM = {
			#	has_ROOT_at_least_1_div_in_current_state_scope = yes
			#}
			hidden_trigger = { always = no }
		}

		highlight_states = {
			highlight_states_trigger = {
				state = 819
				state = 761
			}
		}

		ai_will_do = {
			base = 0
		}

		days_mission_timeout = 30

		fire_only_once = yes

		is_good = no
		
		timeout_effect = {
			remove_targeted_decision = { target = event_target:MON_JAP_defender_country decision = MON_escalate_incident_to_border_conflict_with_JAP }
			add_popularity = {
				ideology = communism
				popularity = -0.1
			}
			add_war_support = -0.15 #Shameful Display
			hidden_effect = {
				819 = {
				}
				761 = {
					controller = {
						remove_targeted_decision = { target = MON decision = MON_khalkin_gol_warning_DEFENDER }
					}
				}
				JAP = {
					remove_targeted_decision = { target = MON decision = MON_khalkin_gol_warning_DEFENDER }
				}
				MON = {
					819 = {
						clr_state_flag = border_incident_active
					}
					761 = {
						clr_state_flag = border_incident_active
					}
				}
			}
		}
	}

	#Decision to escalate incident on border with JAP/puppet to border conflict
	MON_escalate_incident_to_border_conflict_with_JAP = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			819 = {
				OR = {
					is_fully_controlled_by = ROOT
					CONTROLLER = {
						is_subject_of = ROOT
					}
					CONTROLLER = {
						is_in_faction_with = ROOT
					}
				}
			}
			divisions_in_border_state = {
				state = 819
				border_state = 761
				size > 0
			}
		}

		highlight_states = {
			highlight_states_trigger = {
				state = 819
				state = 761	
			}
		}

		ai_will_do = {
			base = 10
			modifier = { 
				has_war = no
				factor = 10
			}
		}

		fire_only_once = yes #Reactivation handled in effect

		complete_effect = {
			remove_targeted_decision = { target = event_target:MON_JAP_defender_country decision = MON_khalkin_gol_forgotten }
			start_border_war = {
				change_state_after_war = no
				attacker = {
					state = 819
					num_provinces = 3
					on_win = mongol_khalkin_gol.2
					on_lose = mongol_khalkin_gol.3
					on_cancel = mongol_khalkin_gol.4
				}
				
				defender = {
					state = 761
					num_provinces = 4
					on_win = mongol_khalkin_gol.3
					on_lose = mongol_khalkin_gol.2
					on_cancel = mongol_khalkin_gol.4
				}
			}
			MON = {
				activate_targeted_decision = { target = ROOT decision = MON_border_conflict_escalate_conflict }
				activate_targeted_decision = { target = ROOT decision = MON_border_conflict_time_until_cancelled }
			}
			761 = {
				controller = {
					activate_targeted_decision = { target = ROOT decision = MON_border_conflict_escalate_conflict }
					activate_targeted_decision = { target = ROOT decision = MON_border_conflict_time_until_cancelled }
				}
			}
		}
	}
	#Mission for attacker to win border war against FROM in X days
	MON_border_conflict_time_until_cancelled = {

		icon = border_war

		allowed = { always = no } #Activated from effect

		available = {
			819 = { has_border_war = no }
			761 = { has_border_war = no }
		}
		
		highlight_states = {
			highlight_states_trigger = {
				state = 819
				state = 761
			}
		}

		ai_will_do = {
			base = 0
		}

		days_mission_timeout = 90
		is_good = no

		fire_only_once = yes #Reactivation handled in effect

		complete_effect = {

		}

		timeout_effect = {
			cancel_border_war = {
				defender = 819
				attacker = 761
			}
			hidden_effect = {
				remove_targeted_decision = { target = MON decision = MON_border_conflict_escalate_conflict }
				remove_targeted_decision = { target = JAP decision = MON_border_conflict_escalate_conflict }
			}
		}
	}

	#Decision to escalate conflict further
	MON_border_conflict_escalate_conflict = {

		icon = decision_generic_ignite_civil_war

		allowed = { always = no } #Activated from effect

		visible = {
			has_border_war_with = FROM
		}

		highlight_states= {
			highlight_states_trigger = {
				state = 819
				state = 761
			}
		}

		cost = 50

		ai_will_do = {
			base = 0
		}

		fire_only_once = yes #Reactivation handled in effect

		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				set_border_war_data = {
					attacker = 819
					defender = 761
					defender_modifier = 0.15
					combat_width = 100
				}
			}
			else = {
				set_border_war_data = {
					attacker = 819
					defender = 761
					attacker_modifier = 0.25
					combat_width = 100
				}
			}
			761 = {
				controller = {
					set_country_flag = {
						flag = MON_khalkin_gol_escalate_to_war_cooldown_@ROOT
						days = 60
						value = 1
					}
					remove_targeted_decision = { target = PREV decision = MON_border_conflict_escalate_conflict }
				}
			}
			set_country_flag = {
				flag = MON_khalkin_gol_escalate_to_war_cooldown_@SOV
				days = 60
				value = 1
			}
			custom_effect_tooltip = in_60_days
			activate_targeted_decision = { target = ROOT decision = MON_khalkin_gol_escalate_to_war }
		}
	}

	#Decision to escalate conflict further
	MON_khalkin_gol_escalate_to_war = {

		icon = decision_generic_ignite_civil_war

		allowed = { always = no } #Activated from effect

		visible = {
			NOT = { has_country_flag = MON_khalkin_gol_escalate_to_war_cooldown_@FROM }
			has_border_war_with = FROM
		}

		highlight_states = {
			highlight_states_trigger = {
				state = 819
				state = 761
			}
		}

		cost = 100

		ai_will_do = {
			base = 0
		}

		days_remove = 15

		fire_only_once = yes #Reactivation handled in effect

		war_with_target_on_remove = yes

		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				819 = { save_event_target_as = their_state }
				761 = { save_event_target_as = our_state }
			}
			else = {
				761 = { save_event_target_as = our_state }
				819 = { save_event_target_as = their_state }
			}
			761 = {
				controller = {
					country_event = { id = mongol_khalkin_gol.5 }
					hidden_effect = {
						remove_targeted_decision = { target = PREV decision = MON_khalkin_gol_escalate_to_war }
					}
				}
			}
		}

		remove_effect = {
			cancel_border_war = {
				dont_fire_events = yes
				defender = 761
				attacker = 819
			}
			declare_war_on = { target = FROM type = annex_everything }
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				819 = {
					clr_state_flag = border_incident_active
				}
				761 = {
					clr_state_flag = border_incident_active
				}
				
			}
			else = {
				FROM = {
					761 = {
						clr_state_flag = border_incident_active
					}
					819 = {
						clr_state_flag = border_incident_active
					}
				}
			}
		}
	}

	#Decision to back down from conflict
	MON_border_conflict_back_out_of_conflict = {

		allowed = { always = no } #Activated from effect

		visible = {
			has_border_war_with = FROM
		}

		highlight_states = {
			highlight_states_trigger = {
				state = 819
				state = 761
			}
		}

		ai_will_do = {
			base = 0
		}

		fire_only_once = yes #Reactivation handled in effect

		complete_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				finalize_border_war = {
					attacker_win = yes
					attacker = 819
					defender = 761
				}
			}
			else = {
				finalize_border_war = {
					attacker = 819
					defender = 761
					defender_win = yes
				}
			}
		}
	}
}

MON_internal_politics = {
	MON_choibalsan_plot = {

		icon = SWI_consolidate_council_power

		priority = 10

		days_mission_timeout = 210

		fire_only_once = yes

		activation = {
			has_completed_focus = MON_prepare_leftist_takeover
			NOT = {
				has_completed_focus = MON_seize_the_power
			}
		}

		available = {
			has_completed_focus = MON_seize_the_power
		}

		visible = {
			has_completed_focus = MON_prepare_leftist_takeover
			NOT = {
				has_completed_focus = MON_seize_the_power
			}
		}

		is_good = no

		timeout_effect = {
			MON = {
				country_event = {
					id = mongol.39
					days = 2
				}
			}
		}
	}

	MON_concessions_to_the_military = {

		icon = generic_military

		cost = 25

		days_re_enable = 120

		visible = {
			has_active_mission = MON_choibalsan_plot
		}

		complete_effect = {
			random_unit_leader = {
				limit = {
					NOT = {
						has_trait = politically_connected
					}
				}
				add_unit_leader_trait = politically_connected
			}
			add_days_mission_timeout = {
				mission = MON_choibalsan_plot
				days = 80
			}
		}
	}
	
	MON_disband_civil_militia = {

		icon = generic_military

		available = {
			has_completed_focus = MON_seize_the_power
			has_civil_war = no
		}

		priority = 10

		fire_only_once = yes

		ai_will_do = {
			factor = 10
		}
		visible = {
			has_completed_focus = MON_arm_civil_militia
		}

		cancel_if_not_visible = yes
		complete_effect = {
			remove_ideas = MON_civil_militia_idea
			add_political_power = 20
			add_popularity = {
				ideology = communism
				popularity = -0.03
			}
			add_manpower = 15000
			delete_unit_template_and_units = { division_template = "Irgenii Tsereg" }
		}
	}

	MON_soviet_backed_coup = {

		icon = SWI_consolidate_council_power

		available = {
			has_completed_focus = MON_leader_of_the_equal
		}

		priority = 15

		days_mission_timeout = 365

		fire_only_once = yes

		activation = {	#activated if the focus "Strong Leader Genden" is completed
			hidden_trigger = {
				always = no
			}
		}

		is_good = no

		timeout_effect = {
			MON = {
				country_event = {
					id = mongol_democratic.2
					days = 1
				}
			}
		}

		complete_effect = {
			add_political_power = 150
			add_stability = 0.1
		}
	}
	
	MON_get_rich_policy_progress = {

		icon = eng_trade_unions_support

		available = {
			hidden_trigger = { always = no }
		}

		priority = 5

		days_mission_timeout = 720

		fire_only_once = yes

		activation = {
			has_completed_focus = MON_get_rich
		}

		visible = {
			has_country_leader = {
				character = MON_peljidiin_genden
				ruling_only = yes 
			}
		}

		cancel_if_not_visible = yes

		is_good = yes

		timeout_effect = {
			add_political_power = 120
			remove_ideas = MON_get_rich_idea
		}
	}

	MON_monthly_economic_report = {
		icon = gre_paying_ifc_debt

		available = {
			hidden_trigger = { always = no }
		}

		priority = 5

		days_mission_timeout = 30

		activation = {
			has_completed_focus = MON_get_rich
			has_idea = MON_get_rich_idea
		}

		visible = {
			has_idea = MON_get_rich_idea
		}

		fire_only_once = no

		cancel_if_not_visible = yes

		is_good = yes

		timeout_effect = {
			random_list = {
				10 = {
					country_event = { id = mongol_genden.2 hours = 1 }
				}
				10 = {
					country_event = { id = mongol_genden.3 hours = 1 }
				}
				10 = {
					country_event = { id = mongol_genden.4 hours = 1 }
				}
				10 = {
					country_event = { id = mongol_genden.5 hours = 1 }
				}
				10 = {
					country_event = { id = mongol_genden.6 hours = 1 }
				}
				10 = {
					country_event = { id = mongol_genden.7 hours = 1 }
				}
				10 = {
					country_event = { id = mongol_genden.8 hours = 1 }
				}
			}
		}
	}

	MON_recruit_southern_bandits = {
		
		icon = generic_military

		allowed = { 
			original_tag = MON
		}
		
		fire_only_once = yes

		visible = {
			has_completed_focus = MON_matters_of_internal_affairs
		}
		
		available = {
			has_completed_focus = MON_guard_southern_border
		}

		days_re_enable = 30

		cost = 20

		ai_will_do = {
			factor = 0.5
		}

		complete_effect = {
			custom_effect_tooltip = GEN_30_days_tt
			add_stability = -0.03
			add_manpower = 1000
			add_popularity = {
				ideology = communism
				popularity = -0.05
			}
		}
	}

	MON_visit_monasteries = {
		
		icon = hol_exchange_intelligence_data

		allowed = { 
			original_tag = MON
		}
		
		fire_only_once = yes

		visible = {
			OR = {
				has_completed_focus = MON_matters_of_internal_affairs
				has_completed_focus = MON_strong_leader_genden
			}
		}
		
		available = {	#available for both paths
			if = {
				limit = {
					has_completed_focus = MON_matters_of_internal_affairs

				}
				has_completed_focus = MON_strengthen_buddhist_community
			}
			if = {
				limit = {
					has_completed_focus = MON_strong_leader_genden

				}
				has_completed_focus = MON_incorporate_buddhism
			}
		}

		days_re_enable = 60

		cost = 50

		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			custom_effect_tooltip = GEN_60_days_tt
			add_popularity = {
				ideology = neutrality
				popularity = 0.05
			}
			add_stability = 0.02
		}
	}

	MON_rural_ideological_education = {
		
		icon = generic_research

		allowed = { 
			original_tag = MON
		}
		
		fire_only_once = yes

		visible = {
			has_completed_focus = MON_matters_of_internal_affairs
		}
		
		available = {
			has_completed_focus = MON_ensure_rural_support
		}

		days_remove = 45
		days_re_enable = 90

		cost = 45

		ai_will_do = {
			factor = 1
		}

		modifier = {
			communism_drift = -0.05
			research_speed_factor = 0.02
			stability_weekly = 0.003
		}
		complete_effect = {
			custom_effect_tooltip = GEN_90_days_tt
		}
	}

	MON_spread_pan_asian_propaganda = {
		
		icon = generic_speech

		allowed = { 
			original_tag = MON
		}
		
		fire_only_once = yes

		visible = {
			has_completed_focus = MON_matters_of_internal_affairs
		}
		
		available = {
			has_completed_focus = MON_rally_the_radicals
		}

		days_remove = 60
		days_re_enable = 90

		cost = 30

		ai_will_do = {
			factor = 1
		}

		modifier = {
			neutrality_drift = 0.03
			fascism_drift = 0.07
			war_support_weekly = 0.005
		}
		complete_effect = {
			custom_effect_tooltip = GEN_90_days_tt
		}
	}

	MON_shelter_prc_trotskyists = {
		
		icon = SOV_the_stalin_constitution

		allowed = { 
			original_tag = MON
		}
		
		fire_only_once = yes

		visible = {
			has_completed_focus = MON_matters_of_internal_affairs
		}
		
		available = {
			has_completed_focus = MON_shelter_the_banished
		}

		days_remove = 100
		days_re_enable = 120

		cost = 50

		ai_will_do = {
			factor = 1
		}

		modifier = {
			communism_drift = 0.05
			weekly_manpower = 400
		}
		complete_effect = {
			custom_effect_tooltip = GEN_120_days_tt
			if = {
				limit = {
					NOT = {
						has_country_flag = MON_trotskyist_sheltered_1
					}
				}
				set_country_flag = MON_trotskyist_sheltered_1
			}
			if = {
				limit = {
					has_country_flag = MON_trotskyist_sheltered_1
					NOT = {
						has_country_flag = MON_trotskyist_sheltered_2
					}
				}
				set_country_flag = MON_trotskyist_sheltered_2	#allows Chen Duxiu to be invited as a chairman (ahistorical, for sure)
			}
		}
	}
}


MON_the_new_khanate = {
	
	MON_restore_the_image_of_the_monarchy = {
		
		icon = generic_political_rally

		allowed = { 
			original_tag = MON
		}

		visible = {
			OR = {
				has_completed_focus = MON_appeal_to_china
				has_completed_focus = MON_strengthen_buddhist_community
			}
			NOT = {
				has_country_flag = MON_abandoned_khan_search
			}
		}
		
		available = {
			has_completed_focus = MON_search_new_bogd_khan
		}

		days_remove = 30
		days_re_enable = 90

		cost = 50

		ai_will_do = {
			factor = 5
		}

		modifier = {
			neutrality_drift = 0.1
			political_power_gain = -0.05
		}
		complete_effect = {
			custom_effect_tooltip = GEN_90_days_tt
		}
	}

	MON_search_state_for_bogd_khan_reincarnation = {
	
		icon = eng_blackshirt_march
		
		allowed = {
			original_tag = MON
		}

		visible = {
			has_completed_focus = MON_strengthen_buddhist_community
			NOT = {
				has_country_flag = MON_abandoned_khan_search
				has_country_flag = MON_young_khan_was_found	#Found a Khan
			}
		}
		
		available = {
			has_completed_focus = MON_search_new_bogd_khan
			NOT = {
				has_country_flag = MON_search_for_khan_in_progress
			}
		}

		on_map_mode = map_only

		state_target = yes
		target_trigger = {
			FROM = {
				has_state_flag = MON_potential_bogd_khan_location
			}
		}
		highlight_states = { 
			highlight_states_trigger = {
				state = FROM
			}
		}
		
		fire_only_once = yes
		cost = 10

		complete_effect = {
			set_country_flag = MON_search_for_khan_in_progress
		}

		days_remove = 14
		modifier = {
			political_power_gain = -0.25
		}

		remove_effect = {
			FROM = {
				clr_state_flag = MON_potential_bogd_khan_location
			}
			if = {
				limit = {
					any_state = {
						has_state_flag = MON_potential_bogd_khan_location
						any_state = {	#Ensuring that if one state is present, the Khans reincarnation will be found!
							NOT = {
								state = PREV
							}
							has_state_flag = MON_potential_bogd_khan_location
						}
					}
				}
				random_list = {
					15 = {
						country_event = { id = mongol_anti_soviet.2 hours = 6 }
					}
					85 = {
						country_event = { id = mongol_anti_soviet.3 hours = 6 }
					}
				}
			}
			else = {
				random_list = {
					100 = {
						country_event = { id = mongol_anti_soviet.2 hours = 6 }
					}
					0 = {
						country_event = { id = mongol_anti_soviet.3 hours = 6 }
					}
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
}

MON_greater_mongolia = {
	#Southern Border Realignments
	MON_southern_border_realignment = {
		icon = generic_ignite_civil_war		

		available = {
			FROM = {
				any_owned_state = {
					is_claimed_by = ROOT
					is_controlled_by = FROM
					any_neighbor_state = {
						is_fully_controlled_by = ROOT
						set_temp_variable = { var:attacker_state_temp = id }
						has_ROOT_at_least_3_div_in_current_state_scope = yes
						NOT = { has_state_flag = border_incident_active }
					}
					NOT = { has_state_flag = border_incident_active }
					set_temp_variable = { var:defender_state_temp = id }
				}
			}
			NOT = { has_non_aggression_pact_with = FROM }
		}

		visible = {
			has_completed_focus = MON_dream_of_greater_mongolia
			FROM = { exists = yes }
			NOT = { has_war_with = FROM }
			#FROM = { has_not_initiated_border_incident_with_ROOT = yes }	#may be a viable option for future
			FROM = {
				NOT = {
					is_subject_of = ROOT
				}
				NOT = {
					is_in_faction_with = ROOT
				}
			}
			NOT = {
				is_subject_of = FROM
			}

			NOT = { has_border_war_with = FROM }
			FROM = {
				any_owned_state = {
					is_claimed_by = ROOT
					is_controlled_by = FROM
					NOT = { has_state_flag = border_incident_active }
					any_neighbor_state = {
						NOT = { has_state_flag = border_incident_active }
						is_fully_controlled_by = ROOT
					}
				}
			}
		}

		target_root_trigger = {
			original_tag = MON
		}
		target_array = neighbors

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = JAP
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
					original_tag = BYA	#might be tweaked for future
					original_tag = TAN
					original_tag = SOV
				}
			}
		}
		allowed = {
			original_tag = MON
		}

		highlight_states = {
			highlight_states_trigger = {
				OR = {
					state = FROM.defender_state_vs_@ROOT
					AND = {
						is_owned_and_controlled_by = FROM
						NOT = { has_state_flag = border_incident_active }
						any_neighbor_state = {
							NOT = { has_state_flag = border_incident_active }
							is_fully_controlled_by = ROOT
						}
					}
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		
		cost = 50

		fire_only_once = no

		days_remove = 21
		days_re_enable = 180

		war_with_target_on_remove = no

		complete_effect = {
			hidden_effect = {
				FROM = {
					set_country_flag = MON_potential_country_to_ignore_the_raid
					random_owned_controlled_state = {
						limit = {
							is_claimed_by = ROOT
							NOT = { has_state_flag = border_incident_active }
							any_neighbor_state = {
								NOT = { has_state_flag = border_incident_active }
								has_ROOT_at_least_1_div_in_current_state_scope = yes
								is_fully_controlled_by = ROOT
							}
						}
						set_state_flag = MON_potential_state_to_be_seized_if_raid_is_ignored
						save_event_target_as = defender_state
						set_variable = { FROM.defender_state_vs_@ROOT = id }
						set_temp_variable = { defender_state_temp = id }
						set_state_flag = border_incident_active
					}
				}
				random_state = {
					limit = {
						is_fully_controlled_by = ROOT
						NOT = { has_state_flag = border_incident_active }
						has_ROOT_at_least_1_div_in_current_state_scope = yes
						any_neighbor_state = {
							state = var:FROM.defender_state_vs_@ROOT
						}
					}
					save_event_target_as = attacker_state
					set_variable = { FROM.attacker_state_vs_@ROOT = id }
					set_temp_variable = { attacker_state_temp = id }
					set_state_flag = border_incident_active
				}
			}
			custom_effect_tooltip = MON_border_clashes_seize_land_180
			FROM = {
				country_event = { id = mongol.19 hours = 6 }		
			}
		}
		remove_effect = {
			hidden_effect = {
				var:FROM.defender_state_vs_@ROOT = {
					save_event_target_as = defender_state 
				}
				var:FROM.attacker_state_vs_@ROOT = {
					save_event_target_as = attacker_state 
				}
				FROM = {
					random_owned_controlled_state = {
						limit = {
							is_claimed_by = ROOT
							NOT = { has_state_flag = border_incident_active }
							any_neighbor_state = {
								is_fully_controlled_by = ROOT
								has_ROOT_at_least_1_div_in_current_state_scope = yes
								NOT = { has_state_flag = border_incident_active }
							}
						}
						set_temp_variable = { defender_state_temp = id }
					}
				}
				random_state = {
					limit = {
						is_fully_controlled_by = ROOT
						NOT = { has_state_flag = border_incident_active }
						has_ROOT_at_least_1_div_in_current_state_scope = yes
						any_neighbor_state = {
							state = var:FROM.defender_state_vs_@ROOT
						}
					}
					set_temp_variable = { attacker_state_temp = id }
				}
			}
			if = {
				limit = {
					FROM = {
						has_country_flag = MON_raid_ignored
					}
				}
				ROOT = {
					country_event = { id = mongol_greater_mongolia.100 }
				}
				FROM = {
					var:attacker_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					var:defender_state_vs_@ROOT = {
						clr_state_flag = border_incident_active
					}
					clear_variable = attacker_state_vs_@ROOT
					clear_variable = defender_state_vs_@ROOT
				}
			}
			else = {
				FROM = {	#to prevent bugs with multiple countries having these flags
					random_owned_controlled_state = {
						limit = {
							has_state_flag = MON_potential_state_to_be_seized_if_raid_is_ignored
						}
						clr_state_flag = MON_potential_state_to_be_seized_if_raid_is_ignored
					}
					clr_country_flag = MON_potential_country_to_ignore_the_raid
				}
				custom_effect_tooltip = MON_border_clashes_warning_seize
				start_border_war = {
					change_state_after_war = no
					attacker = {
						num_provinces = 4
						state = var:FROM.attacker_state_vs_@ROOT
						on_win = mongol_greater_mongolia.1
						on_lose = mongol_greater_mongolia.2
						on_cancel = mongol_greater_mongolia.3
					}
					defender = {
						num_provinces = 4
						state = var:FROM.defender_state_vs_@ROOT
						on_win = mongol_greater_mongolia.4
						on_lose = mongol_greater_mongolia.5
						on_cancel = mongol_greater_mongolia.6
					}
				}
				activate_targeted_decision = { target = FROM decision = MON_border_realignment_cancelled }
				FROM = {
					activate_targeted_decision = { target = ROOT decision = MON_border_realignment_cancelled }
				}
			}
		}
	}

	#Mission for Mongolia to finish the seize in 60 days
	MON_border_realignment_cancelled = {

		icon = civil_war

		allowed = { always = no } #Activated from effect

		available = {
			var:FROM.defender_state_vs_@ROOT = { has_border_war = no }
			var:FROM.attacker_state_vs_@ROOT = { has_border_war = no }
		}
		
		highlight_states = {
			highlight_states_trigger = {
				state = var:defender_state_temp
				state = var:FROM.defender_state_vs_@ROOT
			}
		}

		ai_will_do = {
			base = 0
		}

		days_mission_timeout = 60
		is_good = no

		fire_only_once = yes #Reactivation handled in effect

		timeout_effect = {
			if = {
				limit = { is_border_conflict_defender_vs_FROM = yes }
				cancel_border_war = {
					defender = var:defender_state_vs_@FROM
					attacker = var:attacker_state_vs_@FROM
				}
			}
			else = {
				cancel_border_war = {
					defender = var:FROM.defender_state_vs_@ROOT
					attacker = var:FROM.attacker_state_vs_@ROOT
				}
			}
		}
	}

	MON_unify_greater_mongolia = {

		icon = generic_form_nation
	
		allowed = {
			OR = {
				original_tag = MON
				original_tag = MEN
				original_tag = TAN
				original_tag = BYA
				original_tag = KUM
				original_tag = KAL
			}
		}

		available = {
			OR = {
				is_subject = no
				is_subject_of = SOV
				is_subject_of = JAP
			}
			if = {
				limit = {
					original_tag = MON
				}
				has_completed_focus = MON_incorporate_new_lands
			}
			if = {
				limit = {
					original_tag = MEN
				}
				OR = {
					has_completed_focus = MEN_propose_mongol_unification
					has_completed_focus = MEN_our_place_under_the_red_sun
					has_completed_focus = MEN_form_the_inner_mongolia_autonomous_region
					has_completed_focus = MEN_greater_mongolian_reunification
				}
			}
			#Outer Mongolia
			controls_state = 330
			controls_state = 817
			controls_state = 818
			controls_state = 819
			controls_state = 820
			#Tannu Tuva
			controls_state = 329
			#Xinjiang
			controls_state = 618
			controls_state = 760
			#Inner Mongolia
			controls_state = 616
			controls_state = 746
			controls_state = 621
			controls_state = 611
			controls_state = 612
			controls_state = 761
			controls_state = 715
			controls_state = 946
			controls_state = 1122
			controls_state = 1119
		}

		visible = {
			NOT = { has_global_flag = form_greater_mongolia_flag }
		}

		complete_effect = {
			set_cosmetic_tag = MON_GREATER
			custom_effect_tooltip = form_country_gs_required_coring_states_tt
			hidden_effect = {
				#Outer Mongolia
				add_state_core = 330
				add_state_core = 817
				add_state_core = 818
				add_state_core = 819
				add_state_core = 820
				#Tannu Tuva
				add_state_core = 329
				#Xinjiang
				add_state_core = 618
				add_state_core = 760
				#Inner Mongolia
				add_state_core = 616
				add_state_core = 746
				add_state_core = 621
				add_state_core = 611
				add_state_core = 612
				add_state_core = 761
				add_state_core = 715
				add_state_core = 946
				add_state_core = 1122
				add_state_core = 1119
			}
			add_state_claim = 564 #Buryatia
			add_state_claim = 563 #Chita
			add_state_claim = 237 #Kalmyikia
			add_state_claim = 654 #Altai
			add_state_claim = 755 #Qinghai
			add_state_claim = 617 #Xinjiang
			618 = {
				set_state_name = "Zngar"
			}
			760 = {
				set_state_name = "Khamil"
			}
			616 = {
				set_state_name = "Alshaa"
			}
			746 = {
				set_state_name = "Ih Juu"
			}
			946 = {
				set_state_name = "Juu Ud"
			}
			715 = {
				set_state_name = "Jirem"
			}
			761 = {
				set_state_name = "Khlnbuir"
			}
			hidden_effect = {
				set_province_name = { id = 12641 name = "Shete" }
			}
			unlock_decision_tooltip = MON_incorporate_buryatia
			unlock_decision_tooltip = MON_integrate_kalmykia
			unlock_decision_tooltip = MON_stimulate_oirat_minority_in_altai
			unlock_decision_tooltip = MON_stimulate_oirat_minority_in_haixi
			unlock_decision_tooltip = MON_stimulate_oirat_minority_in_urumqi
			hidden_effect = {
				news_event = { id = mongol_greater_mongolia.50 hours = 6 }
				set_global_flag = form_greater_mongolia_flag
			}
			add_ideas = generic_recent_political_unification
			add_ideas = generic_recent_army_unification
			add_ideas = generic_recent_economic_unification
		}

		ai_will_do = {
			factor = 200
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}

	MON_incorporate_buryatia = {

		icon = generic_nationalism
	
		allowed = {
			OR = {
				original_tag = MON
				original_tag = MEN
				original_tag = TAN
				original_tag = KUM
				original_tag = KAL
			}
		}

		visible = {
			if = {
				limit = {
					original_tag = MON
				}
				has_completed_focus = MON_incorporate_new_lands
			}
			if = {
				limit = {
					original_tag = MEN
				}
				has_completed_focus = MEN_greater_mongolian_reunification
			}
			NOT = {
				has_global_flag = MON_buryatia_incorporated
			}
		}

		available = {
			has_global_flag = form_greater_mongolia_flag
			OR = {
				is_subject = no
				is_subject_of = SOV
				is_subject_of = JAP
			}
			#Buryatia
			564 = {
				controls_or_subject_of = yes
				is_core_or_compliance_30 = yes
			}
			563 = {
				controls_or_subject_of = yes
				is_core_or_compliance_30 = yes
			}
		}

		highlight_states = {
			highlight_state_targets = {
				state = 564
				state = 563
			}
		}

		cost = 50

		fire_only_once = yes

		complete_effect = {
			every_state = {	#transfer states from subject
				limit = {
					OR = {
						state = 564
						state = 563
					}
					controller = { is_subject_of = ROOT }
				}
				ROOT = {
					transfer_state = PREV
				}
			}
			#Buryatia
			add_state_core = 564
			add_state_core = 563
			563 = {
				set_state_name = "Shete"
			}
			hidden_effect = {
				set_province_name = { id = 12641 name = "Shete" }
			}
			set_global_flag = MON_buryatia_incorporated
		}

		ai_will_do = {
			factor = 200
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}

	MON_integrate_kalmykia = {

		icon = generic_independence
	
		allowed = {
			OR = {
				original_tag = MON
				original_tag = MEN
				original_tag = BYA
				original_tag = TAN
				original_tag = KUM
			}
		}

		visible = {
			if = {
				limit = {
					original_tag = MON
				}
				has_completed_focus = MON_incorporate_new_lands
			}
			if = {
				limit = {
					original_tag = MEN
				}
				has_completed_focus = MEN_greater_mongolian_reunification
			}
			NOT = {
				has_global_flag = MON_kalmykia_integrated
			}
		}

		available = {
			has_global_flag = form_greater_mongolia_flag
			OR = {
				is_subject = no
				is_subject_of = SOV
				is_subject_of = JAP
			}
			#Kalmykia
			237 = {
				controls_or_subject_of = yes
				is_core_or_compliance_30 = yes
			}
		}

		highlight_states = {
			highlight_state_targets = {
				state = 237
			}
		}

		cost = 25

		days_remove = 15

		fire_only_once = yes

		ai_will_do = {
			factor = 200
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		remove_effect = {
			every_state = {	#transfer states from subject
				limit = {
					OR = {
						state = 237
					}
					controller = { is_subject_of = ROOT }
				}
				ROOT = {
					transfer_state = PREV
				}
			}
			#Kalmykia
			add_state_core = 237
			set_global_flag = MON_kalmykia_integrated		
		}
	}

	MON_stimulate_oirat_minority_in_altai = {

		icon = generic_civil_support
	
		allowed = {
			OR = {
				original_tag = MON
				original_tag = MEN
				original_tag = BYA
				original_tag = TAN
				original_tag = KUM
				original_tag = KAL
			}
		}

		visible = {
			if = {
				limit = {
					original_tag = MON
				}
				has_completed_focus = MON_incorporate_new_lands
			}
			if = {
				limit = {
					original_tag = MEN
				}
				has_completed_focus = MEN_greater_mongolian_reunification
			}
			NOT = {
				has_global_flag = MON_altai_integrated
			}
		}

		available = {
			has_global_flag = form_greater_mongolia_flag
			OR = {
				is_subject = no
				is_subject_of = SOV
				is_subject_of = JAP
			}
			#Altai
			654 = {
				controls_or_subject_of = yes
				is_core_or_compliance_30 = yes
			}
		}

		highlight_states = {
			highlight_state_targets = {
				state = 654
			}
		}

		cost = 10

		fire_only_once = yes

		ai_will_do = {
			factor = 200
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		days_remove = 30

		remove_effect = {
			every_state = {	#transfer states from subject
				limit = {
					OR = {
						state = 654
					}
					controller = { is_subject_of = ROOT }
				}
				ROOT = {
					transfer_state = PREV
				}
			}
			#Altai
			add_state_core = 654
			set_global_flag = MON_altai_integrated		
		}
	}

	MON_stimulate_oirat_minority_in_haixi = {

		icon = generic_civil_support
	
		allowed = {
			OR = {
				original_tag = MON
				original_tag = MEN
				original_tag = BYA
				original_tag = TAN
				original_tag = KAL
			}
		}

		visible = {
			if = {
				limit = {
					original_tag = MON
				}
				has_completed_focus = MON_incorporate_new_lands
			}
			if = {
				limit = {
					original_tag = MEN
				}
				has_completed_focus = MEN_greater_mongolian_reunification
			}
			NOT = {
				has_global_flag = MON_haixi_integrated
			}
		}

		available = {
			has_global_flag = form_greater_mongolia_flag
			OR = {
				is_subject = no
				is_subject_of = SOV
				is_subject_of = JAP
			}
			#Haixi
			755 = {
				controls_or_subject_of = yes
				is_core_or_compliance_30 = yes
			}
		}

		highlight_states = {
			highlight_state_targets = {
				state = 755
			}
		}

		cost = 10

		fire_only_once = yes

		ai_will_do = {
			factor = 200
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		days_remove = 30

		remove_effect = {
			every_state = {	#transfer states from subject
				limit = {
					OR = {
						state = 755
					}
					controller = { is_subject_of = ROOT }
				}
				ROOT = {
					transfer_state = PREV
				}
			}
			#Haixi
			add_state_core = 755
			set_global_flag = MON_haixi_integrated		
		}
	}

	MON_stimulate_oirat_minority_in_urumqi = {

		icon = generic_civil_support
	
		allowed = {
			OR = {
				original_tag = MON
				original_tag = MEN
				original_tag = BYA
				original_tag = KAL
			}
		}

		visible = {
			if = {
				limit = {
					original_tag = MON
				}
				has_completed_focus = MON_incorporate_new_lands
			}
			if = {
				limit = {
					original_tag = MEN
				}
				has_completed_focus = MEN_greater_mongolian_reunification
			}
			NOT = {
				has_global_flag = MON_urumqi_integrated
			}
		}

		available = {
			has_global_flag = form_greater_mongolia_flag
			OR = {
				is_subject = no
				is_subject_of = SOV
				is_subject_of = JAP
			}
			#Urumqi
			617 = {
				controls_or_subject_of = yes
				is_core_or_compliance_30 = yes
			}
		}

		highlight_states = {
			highlight_state_targets = {
				state = 617
			}
		}

		cost = 10

		fire_only_once = yes

		ai_will_do = {
			factor = 200
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		days_remove = 30

		remove_effect = {
			every_state = {	#transfer states from subject
				limit = {
					OR = {
						state = 617
					}
					controller = { is_subject_of = ROOT }
				}
				ROOT = {
					transfer_state = PREV
				}
			}
			#Haixi
			add_state_core = 617
			set_global_flag = MON_urumqi_integrated		
		}
	}

	MON_ulaabaatar_conference_ongoing = {

		icon = eng_blackshirt_speech

		available = {
			has_completed_focus = MON_gather_ulaanbaatar_conference
		}

		priority = 5

		days_remove = 90

		fire_only_once = yes

		visible = {
			has_completed_focus = MON_gather_ulaanbaatar_conference
			NOT = {
				has_global_flag = MON_abandoned_ulaabaatar_conference_flag
			}
		}

		modifier = {
			improve_relations_maintain_cost_factor = -0.5
		}

		cancel_if_not_visible = yes
		complete_effect = {	
			set_global_flag = MON_ul_conference_on_the_way
		}
		
		cancel_effect = {
			clr_global_flag = MON_ul_conference_on_the_way
		}

		remove_effect = {
			clr_global_flag = MON_ul_conference_on_the_way
			custom_effect_tooltip = MON_any_influence_more_50_outcome_tt
			if = {
				limit = {
					any_country = {
						has_country_flag = MON_attending_ulaanbaatar_conference
					}
					OR = {	
						check_variable = { sov_influence_in_mon = 50 compare = greater_than_or_equals }
						check_variable = { jap_influence_in_mon = 50 compare = greater_than_or_equals }
						check_variable = { chi_influence_in_mon = 50 compare = greater_than_or_equals }
					}
				}
				country_event = {
					id = mongol_greater_mongolia.29
				}
			}
			else = {
				country_event = {
					id = mongol_greater_mongolia.28
				}
			}
		}
	}

	MON_secure_soviet_support_ul_conference = {

		icon = SOV_place_hq

		available = {
			SOV = {
				has_country_flag = MON_attending_ulaanbaatar_conference
			}
		}

		priority = 3

		visible = {
			SOV = {
				has_country_flag = MON_attending_ulaanbaatar_conference
			}
			has_global_flag = MON_ul_conference_on_the_way
		}

		target_trigger = {
			FROM = {
				tag = SOV
			}
		}

		cost = 20

		days_re_enable = 15

		cancel_if_not_visible = yes

		complete_effect = {
			MON_soviet_medium_influence_increase_effect = yes
			SOV = { add_political_power = 20 }
		}
	}

	MON_secure_japanese_secure_ul_conference = {

		icon = jap_pacific_guardian

		available = {
			JAP = {
				has_country_flag = MON_attending_ulaanbaatar_conference
			}
		}

		priority = 3

		visible = {
			JAP = {
				has_country_flag = MON_attending_ulaanbaatar_conference
			}
			has_global_flag = MON_ul_conference_on_the_way
		}

		target_trigger = {
			FROM = {
				tag = JAP
			}
		}

		cost = 20

		days_re_enable = 15

		cancel_if_not_visible = yes
		
		complete_effect = {
			MON_jap_medium_influence_increase_effect = yes
			JAP = { add_political_power = 20 }
		}
	}

	MON_appeal_to_chinese_recognition_ul_conference = {

		icon = eng_trade_unions_demand

		available = {
			CHI = {
				has_country_flag = MON_attending_ulaanbaatar_conference
			}
		}

		priority = 3

		visible = {
			CHI = {
				has_country_flag = MON_attending_ulaanbaatar_conference
			}
			has_global_flag = MON_ul_conference_on_the_way
		}

		target_trigger = {
			FROM = {
				tag = CHI
			}
		}

		cost = 20

		days_re_enable = 15

		cancel_if_not_visible = yes
		
		complete_effect = {
			MON_chi_low_influence_increase_effect = yes
			CHI = { add_political_power = 10 }
		}
	}

	MON_prc_alliance_for_recognition = {

		icon = SWI_no_elected_president

		available = {
			is_subject = no
			is_in_faction = no
			PRC = {	
				is_in_faction = no
			}
			AND = {
				custom_trigger_tooltip = {
					tooltip = MON_sov_influence_less_50_tt
					check_variable = { sov_influence_in_mon = 50 compare = less_than_or_equals }
				}
				custom_trigger_tooltip = {
					tooltip = MON_jap_influence_less_50_tt
					check_variable = { jap_influence_in_mon = 50 compare = less_than_or_equals }
				}
				custom_trigger_tooltip = {
					tooltip = MON_chi_influence_less_50_tt
					check_variable = { chi_influence_in_mon = 50 compare = less_than_or_equals }
				}
			}
		}

		priority = 1

		fire_only_once = yes

		visible = {
			PRC = {
				has_country_flag = MON_attending_ulaanbaatar_conference
			}
			has_global_flag = MON_ul_conference_on_the_way
		}

		target_trigger = {
			FROM = {
				original_tag = PRC
			}
		}

		cost = 50

		days_re_enable = 10

		cancel_if_not_visible = yes
		
		complete_effect = {
			custom_effect_tooltip = MON_ul_conference_attendants_angry_tt
			PRC = { 
				country_event = { id = mongol_greater_mongolia.25 hours = 6 }
			}
		}
	}

	MON_request_state_after_conference = {
		state_target = yes
		target_trigger = {
			FROM = {
				OR = {
					has_state_flag = MON_can_request_for_greater_mongolia
					is_claimed_by = ROOT
					is_core_of = ROOT
				}
				NOT = {
					is_owned_by = ROOT
					is_controlled_by = ROOT
				}
			}
		}
		icon = generic_nationalism
		
		allowed = {
			original_tag = MON
		}

		visible = {
			FROM = {
				CONTROLLER = {
					has_country_flag = MON_supported_during_ul_conference
				}
			}
		}
		
		available = {
			FROM = {
				CONTROLLER = {
					NOT = {has_war_with = ROOT }
					OR = {
						AND = {
							is_subject = no
							has_country_flag = MON_supported_during_ul_conference
						}
						AND = {
							is_subject = yes
							OVERLORD = {
								has_country_flag = MON_supported_during_ul_conference
							}
						}
					}
				}
			}
			NOT = {
				has_country_flag = MON_state_request_in_progress
			}
		}
		on_map_mode = map_only

		highlight_states = { 
			highlight_states_trigger = {
				state = FROM
			}
		}

		cost = 50

		cancel_if_not_visible = yes
		
		complete_effect = {
			set_country_flag = MON_state_request_in_progress
			FROM = {
				set_state_flag = MON_requested_for_Greater_Mongolia
			}
			FROM = {
				CONTROLLER = {
					country_event = { id = mongol_greater_mongolia.30 }
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
}


MON_support_the_red_army  = {

	MON_provide_industrial_assistance = {
		
		icon = GFX_decision_supplies 

		allowed = {
			tag = MON
		}

		visible = {
			has_completed_focus = MON_hold_plenum_of_central_committee
		}

		available = {
			has_completed_focus = MON_support_the_red_army_focus
			SOV = {
				exists = yes
				is_in_faction_with = ROOT
				has_war = yes
			}
			NOT = {
				has_idea = MON_supporting_the_sov_struggle_mon
			}
		}

		fire_only_once = yes

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			MON_mongol_bank_funds_decrease = yes
			add_ideas = MON_supporting_the_sov_struggle_mon
			every_other_country = {
				limit = {
					is_in_faction_with = ROOT
					is_major = yes
				}
				add_ideas = MON_supporting_the_sov_struggle_sov
			}
		}
	}
	
	MON_form_revolutionary_tank_division = {
		
		icon = GFX_decision_generic_tank 

		allowed = {
			tag = MON
		}

		visible = {
			has_completed_focus = MON_support_the_red_army_focus
		}

		available = {
			has_completed_focus = MON_vessels_of_the_future_war
			SOV = {
				exists = yes
				is_in_faction_with = ROOT
			}
			OR = {	#need to know what tanks are!
				has_tech = gwtank
				has_tech = gwtank_chassis
			}
		}

		cost = 20

		days_re_enable = 270

		fire_only_once = yes

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			custom_effect_tooltip = GEN_270_days_tt
			MON_mongol_bank_funds_decrease = yes
			division_template = {
				name = "Revolutionary Tank Brigade" 				#Historical template
				division_names_group = SOV_MEC_01
				regiments = {
					light_armor = { x = 0 y = 0 }
					light_armor = { x = 0 y = 1 }	
					motorized = { x = 2 y = 0 }		
					motorized = { x = 2 y = 1 }	
				}
				support = {
					engineer = { x = 0 y = 0 }
					anti_tank = { x = 0 y = 1 }
				}
			}
			330 = {
				create_unit = {
					division = "name = \"112th Revolutionary Tank Brigade\" division_template = \"Revolutionary Tank Brigade\" start_experience_factor = 1.0 start_equipment_factor = 1.0 force_equipment_variants = { infantry_equipment_0 = { owner = SOV } motorized_equipment_1 = { owner = SOV } } light_tank_chassis_0 = { owner = SOV } }" 
					owner = MON
					prioritize_location = 4801 #was placed in Moscow for Soviets, but cmon, giving it to AI would be unfair
				}
			}
		}
	}

	MON_arat_air_squadron = {
		
		icon = GFX_decision_generic_air 

		allowed = {
			tag = MON
		}

		visible = {
			has_completed_focus = MON_support_the_red_army_focus
		}

		available = {
			has_completed_focus = MON_aerial_support_initiative
			SOV = {
				exists = yes
				is_in_faction_with = ROOT
			}
		}

		cost = 20

		days_re_enable = 180

		fire_only_once = yes

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			custom_effect_tooltip = GEN_180_days_tt
			MON_mongol_bank_funds_decrease = yes
			add_equipment_to_stockpile = {
				type = small_plane_airframe
				amount = 40	#originally 12, but this would be really weak
				producer = SOV
			}
		}
	}
	
	MON_suggest_industry_relocation = {
		
		icon = GFX_decision_generic_factory

		allowed = {
			tag = MON
		}

		visible = {
			OR = {
				has_completed_focus = MON_support_the_red_army_focus
				has_completed_focus = MON_thinking_out_of_bounds
			}
		}

		available = {
			has_completed_focus = MON_industrial_relocation
			surrender_progress <0.01
			SOV = {
				exists = yes
				is_in_faction_with = ROOT
				has_war = yes
				surrender_progress > 0.1
			}
		}
		days_re_enable = 30
		cost = 25

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			custom_effect_tooltip = GEN_30_days_tt
			SOV = { country_event = { id = mongol_soviet_puppet.12 hours = 2 } }
		}
	}
}

MON_a_puppet_republic = {

	MON_begin_communist_infiltration = {
		
		icon = GFX_decision_infiltrate_state 

		allowed = {
			tag = MON
		}

		visible = {
			original_tag = MON
			FROM = {
				NOT = { has_war_with = ROOT }
				NOT = { has_government = ROOT }
				NOT = { has_country_flag = MON_infiltration_ongoing_flag }
			}
			has_completed_focus = MON_reassure_the_soviets
		}

		available = {
			has_completed_focus = MON_thinking_out_of_bounds
			FROM = {
				NOT = { has_country_flag = MON_abandoned_internal_meddling_flag }
			}
		}

		target_root_trigger = {
			original_tag = MON
		}
		target_array = neighbors

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
				}
				has_civil_war = no
			}
		}

		cost = 10

		fire_only_once = yes

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			FROM = {
				add_popularity = {
					ideology = communism
					popularity = 0.05
				}
			}
			FROM = {
				MON = {
					set_variable = { var_MON_propaganda_meddling_awareness_@PREV = 0 }
				}
				set_country_flag = MON_infiltration_ongoing_flag
			}
		}
	}

	MON_promote_communist_ideas = {
		
		icon = GFX_decision_eng_propaganda_campaigns 

		allowed = {
			tag = MON
		}

		visible = {
			original_tag = MON
			FROM = {
				NOT = { has_war_with = ROOT }
				NOT = { has_government = ROOT }
				has_country_flag = MON_infiltration_ongoing_flag
			}
			has_completed_focus = MON_thinking_out_of_bounds
		}

		available = {
			has_completed_focus = MON_means_of_propaganda
			FROM = {
				NOT = { has_country_flag = MON_abandoned_internal_meddling_flag }
			}
		}

		target_root_trigger = {
			original_tag = MON
		}
		target_array = neighbors

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
				}
				has_civil_war = no
			}
		}

		cost = 50

		days_re_enable = 150

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			custom_effect_tooltip = GEN_150_days_tt
			FROM = {
				add_timed_idea ={
					idea = MON_communist_propaganda_idea
					days = 90
				}
				MON = {
					set_variable = { 
						var = MON_propaganda_bad_outcome 
						value = var_MON_propaganda_meddling_awareness_@PREV
					}
					clamp_variable = {
						var = MON_propaganda_bad_outcome
						min = 0
						max = 10
					}
					set_variable = { var = MON_propaganda_good_outcome value = 10 }
					subtract_from_variable = { var = MON_propaganda_good_outcome value = MON_propaganda_bad_outcome }	#so chanches are total 10
					add_to_variable = { var = var_MON_propaganda_meddling_awareness_@PREV value = 1 }
				}
			}	
			random_list = {
				MON_propaganda_bad_outcome = {
					FROM = { country_event = { id = mongol_soviet_puppet.2 hours = 1 } }
				}
				MON_propaganda_good_outcome = {
					add_political_power = 10
				}
			}
		}
	}

	MON_destabilize_neighbour = {
		
		icon = GFX_decision_generic_civil_support 

		allowed = {
			tag = MON
		}

		visible = {
			original_tag = MON
			FROM = {
				NOT = { has_war_with = ROOT }
				NOT = { has_government = ROOT }
				has_country_flag = MON_infiltration_ongoing_flag
			}
			has_completed_focus = MON_thinking_out_of_bounds
		}

		available = {
			has_completed_focus = MON_destabilize_the_central_plain
			FROM = {
				NOT = { has_country_flag = MON_abandoned_internal_meddling_flag }
			}
		}

		target_root_trigger = {
			original_tag = MON
		}
		target_array = neighbors

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
				}
				has_civil_war = no
			}
		}

		cost = 50

		days_re_enable = 180

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			custom_effect_tooltip = GEN_180_days_tt
			FROM = {
				add_stability = -0.05
				add_popularity = {
					ideology = communism
					popularity = 0.08
				}
				MON = {
					set_variable = { 
						var = MON_propaganda_bad_outcome 
						value = var_MON_propaganda_meddling_awareness_@PREV
					}
					clamp_variable = {
						var = MON_propaganda_bad_outcome
						min = 0
						max = 10
					}
					set_variable = { var = MON_propaganda_good_outcome value = 10 }
					subtract_from_variable = { var = MON_propaganda_good_outcome value = MON_propaganda_bad_outcome }	#so chanches are total 10
					add_to_variable = { var = var_MON_propaganda_meddling_awareness_@PREV value = 1 }
				}
			}	
			random_list = {
				MON_propaganda_bad_outcome = {
					FROM = { country_event = { id = mongol_soviet_puppet.2 hours = 1 } }
				}
				MON_propaganda_good_outcome = {
					add_political_power = 10
				}
			}
		}
	}

	MON_launch_an_uprising = {
		
		icon = decision_generic_ignite_civil_war 

		allowed = {
			tag = MON
		}

		visible = {
			original_tag = MON
			FROM = {
				communism > 0.25
				has_stability < 0.6
				has_civil_war = no
				NOT = { has_war_with = ROOT }
				NOT = { has_government = ROOT }
				#has_country_flag = MON_infiltration_ongoing_flag
			}
			has_completed_focus = MON_thinking_out_of_bounds
		}

		available = {
			has_completed_focus = MON_destabilize_the_central_plain
			FROM = {
				communism > 0.35
				has_stability < 0.5
				NOT = { has_country_flag = MON_abandoned_internal_meddling_flag }
			}
		}

		target_root_trigger = {
			original_tag = MON
		}

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
				}
				has_civil_war = no
			}
		}

		cost = 50

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			add_autonomy_ratio = {
				value = 0.1
				localization = MON_supporting_revolutionary_cause
			}
			FROM = {
				add_ideas = SOV_civil_war_ignited
				set_temp_variable = {var = civil_war_size_var value = party_popularity@communism }
				start_civil_war = {
					ideology = communism
					size = civil_war_size_var
					keep_political_leader = no
					keep_unit_leaders_trigger = {
						has_trait = hidden_sympathies
					}
				}
			}
			random_other_country = {
				limit = {
					original_tag = FROM
					has_government = MON
					has_civil_war = yes
				}
				add_ideas = SOV_civil_war_ignited
				set_country_flag = MON_communist_revolt
				save_event_target_as = MON_communist_uprisers
				set_rule = {
					can_join_factions = no
				}
			}
		}
	}

	MON_assist_communist_uprising = {
		
		icon = GFX_decision_generic_prepare_civil_war 

		allowed = {
			tag = MON
		}

		visible = {
			original_tag = MON
			FROM = {
				has_country_flag = MON_communist_revolt
				NOT = { has_war_with = ROOT }
				has_civil_war = yes
				has_government = MON
			}
			has_completed_focus = MON_destabilize_the_central_plain
		}

		available = {
			has_equipment = { infantry_equipment > 999 }
			has_completed_focus = MON_fruits_of_revolution
		}

		target_root_trigger = {
			original_tag = MON
		}

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
				}
				has_civil_war = yes
				has_government = MON
				has_country_flag = MON_communist_revolt
			}
		}

		cost = 10

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			random_other_country = {
				limit = {
					original_tag = FROM
					has_government = MON
					has_civil_war = yes
					has_country_flag = MON_communist_revolt
				}
				save_event_target_as = MON_communist_uprisers
			}
			send_equipment = {
				target = event_target:MON_communist_uprisers
				equipment = infantry_equipment
				amount = 1000
				old_prioritised = yes
			}
			if = {
				limit = { has_equipment = { support_equipment > 200 } }
				send_equipment = {
					target = event_target:MON_communist_uprisers
					equipment = support_equipment
					amount = 200
					old_prioritised = yes
				}
			}
			if = {
				limit = { has_equipment = { artillery_equipment > 100 } }
				send_equipment = {
					target = event_target:MON_communist_uprisers
					equipment = artillery_equipment
					amount = 100
					old_prioritised = yes
				}
			}
		}
	}

	MON_send_civil_militia = {
		
		icon = GFX_decision_generic_military 

		allowed = {
			tag = MON
		}

		visible = {
			original_tag = MON
			FROM = {
				NOT = { has_war_with = ROOT }
				has_civil_war = yes
				has_government = MON
				has_country_flag = MON_communist_revolt
			}
			has_completed_focus = MON_destabilize_the_central_plain
		}

		available = {
			has_equipment = { infantry_equipment > 1499 }
			has_completed_focus = MON_fruits_of_revolution
			FROM = {
				NOT = { has_country_flag = MON_abandoned_internal_meddling_flag }
			}
		}

		target_root_trigger = {
			original_tag = MON
		}

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
				}
				has_civil_war = yes
				has_government = MON
				has_country_flag = MON_communist_revolt
			}
		}

		cost = 25

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			hidden_effect = {
				add_equipment_to_stockpile = {
					type = infantry_equipment
					amount = -1500
				}
			}
			random_other_country = {
				limit = {
					original_tag = FROM
					has_government = MON
					has_civil_war = yes
					has_country_flag = MON_communist_revolt
				}
				division_template = {
					name = "Irgenii Tsereg"	#Civil militia in Mongolian transliteration
					priority = 0
					regiments = {
						militia = { x = 0 y = 0 }
						militia = { x = 0 y = 1 }
						militia = { x = 0 y = 2 }
						militia = { x = 1 y = 0 }
						militia = { x = 1 y = 1 }
					}
				}
				random_controlled_state = {
					create_unit = {
						division = "name = \"1. Irgenii Tsereg\" division_template = \"Irgenii Tsereg\" start_experience_factor = 0.3 start_equipment_factor = 0.8" 
						owner = PREV
					}
					create_unit = {
						division = "name = \"2. Irgenii Tsereg\" division_template = \"Irgenii Tsereg\" start_experience_factor = 0.5 start_equipment_factor = 1.0" 
						owner = PREV
					}
				}
			}
		}
	}

	MON_secure_the_newborn_regime = {
		
		icon = GFX_decision_eng_trade_unions_demand 

		allowed = {
			tag = MON
		}

		visible = {
			original_tag = MON
			FROM = {
				NOT = { has_war_with = ROOT }
			}
			has_completed_focus = MON_fruits_of_revolution
		}

		available = {
			has_completed_focus = MON_destabilize_the_central_plain
			FROM = {
				NOT = { has_country_flag = MON_abandoned_internal_meddling_flag }
			}
		}

		target_root_trigger = {
			original_tag = MON
		}

		target_trigger = {
			FROM = { 
				OR = {
					original_tag = MAN
					original_tag = MEN
					is_literally_china = yes
				}
				NOT = { 
					has_government = MON 
				}
				has_civil_war = yes
				any_enemy_country = {
					original_tag = FROM
					has_government = MON
					is_subject = no
					has_country_flag = MON_communist_revolt
				}
			}
		}

		cost = 20

		fire_only_once = yes

		ai_will_do = {
			factor = 50
		}

		complete_effect = {
			every_other_country = {
				limit = {
					original_tag = FROM
					has_government = MON
					is_subject = no
					has_country_flag = MON_communist_revolt
				}
				ROOT = {
					add_to_war = { targeted_alliance = PREV enemy = FROM hostility_reason = asked_to_join }
				}
				ROOT = {
					set_autonomy = {
						target = PREV
						autonomy_state = autonomy_integrated_puppet
					}
				}
				hidden_effect = { news_event = { id = mongol_soviet_puppet.11 days = 1 } }
			}
		}
	}
}

MON_thousand_year_rivalry = {
	MON_reinforce_the_issue_of_FROM = {
		
		icon = GFX_decision_concessions 	

		allowed = {
			original_tag = MON
		}

		state_target = yes
		target_trigger = {
			FROM = {
				is_owned_by = ROOT
				any_country_with_original_tag_of = {
					target = constant:country_groups.chinese_nations
					exists = yes
					FROM = {
						is_claimed_by = PREV
					}
				}
			}
		}

		on_map_mode = map_and_decisions_view

		days_remove = 14

		cost = 25

		visible = {
			FROM = {
				NOT = {
					has_state_flag = MON_negotiating_claims_over_this_state
				}
			}
		}

		available = {
			hidden_trigger = {
				NOT = { has_country_flag = MON_wait_for_a_goddamn_day_before_clicking_next_button_flag }
			}
			NOT = {
				has_country_flag = MON_already_reinforcing_the_territorial_issue_flag
			}
		}
		complete_effect = {
			set_country_flag = MON_already_reinforcing_the_territorial_issue_flag
			FROM = {
				set_state_flag = MON_negotiating_claims_over_this_state
			}
		}

		remove_effect = {
			random_other_country = {
				limit = {
					OR = {
						is_literally_china = yes
						original_tag = MAN
						original_tag = MEN
					}
					exists = yes
					FROM = {
						is_claimed_by = PREV
					}
				}
				country_event = {
					id = mongol_democratic.15
				}
			}
		}
	}
	MON_provide_political_support = {
		
		icon = generic_political_discourse 	

		target_trigger = {
			FROM = {
				has_country_flag = MON_chinese_nation_demanded_pp
			}
		}

		cost = 100

		complete_effect = {
			random_other_country = {
				limit = {
					has_country_flag = MON_chinese_nation_demanded_pp
				}
				add_political_power = 100
				every_state = {
					limit = {
						has_state_flag = MON_negotiating_claims_over_this_state
					}
					remove_claim_by = PREV
					clr_state_flag = MON_negotiating_claims_over_this_state
				}
				clr_country_flag = MON_chinese_nation_demanded_pp
			}
			clr_country_flag = MON_already_reinforcing_the_territorial_issue_flag
			hidden_effect = {
				set_country_flag = { flag = MON_wait_for_a_goddamn_day_before_clicking_next_button_flag value = 1 days = 1 }
			}
		}
	}
	
	MON_provide_weaponry = {
		
		icon = generic_prepare_civil_war 	

		target_trigger = {
			FROM = {
				has_country_flag = MON_chinese_nation_demanded_guns
			}
		}

		available = {
			has_equipment = { infantry_equipment > 1499 }
		}

		cost = 10

		complete_effect = {
			MON = {
				add_equipment_to_stockpile = {
					type = infantry_equipment
					amount = -1500
				}
			}
			random_other_country = {
				limit = {
					has_country_flag = MON_chinese_nation_demanded_guns
				}
				add_equipment_to_stockpile = {
					type = infantry_equipment
					amount = 1500
				}
				every_state = {
					limit = {
						has_state_flag = MON_negotiating_claims_over_this_state
					}
					remove_claim_by = PREV
					clr_state_flag = MON_negotiating_claims_over_this_state
				}
				clr_country_flag = MON_chinese_nation_demanded_guns
			}
			clr_country_flag = MON_already_reinforcing_the_territorial_issue_flag
			hidden_effect = {
				set_country_flag = { flag = MON_wait_for_a_goddamn_day_before_clicking_next_button_flag value = 1 days = 1 }
			}
		}
	}
	
	MON_relocate_civilian_facility = {
		
		icon = generic_factory 	

		target_trigger = {
			FROM = {
				has_country_flag = MON_chinese_nation_demanded_industry
			}
		}

		highlight_states = {
			highlight_states_trigger = {
				has_state_flag = MON_negotiating_claims_over_this_state
				industrial_complex > 0
			}
		}

		available = {
			any_owned_state = {
				has_state_flag = MON_negotiating_claims_over_this_state
				industrial_complex > 0
			}
		}

		complete_effect = {
			random_owned_state = {
				limit = {
					has_state_flag = MON_negotiating_claims_over_this_state
					industrial_complex > 0
				}
				remove_building = {
					type = industrial_complex
					level = 1
				}
			}
			random_other_country = {
				limit = {
					has_country_flag = MON_chinese_nation_demanded_industry
				}
				random_owned_state = {
					limit = {
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
				every_state = {
					limit = {
						has_state_flag = MON_negotiating_claims_over_this_state
					}
					remove_claim_by = PREV
					clr_state_flag = MON_negotiating_claims_over_this_state
				}
				clr_country_flag = MON_chinese_nation_demanded_industry
			}
			clr_country_flag = MON_already_reinforcing_the_territorial_issue_flag
			hidden_effect = {
				set_country_flag = { flag = MON_wait_for_a_goddamn_day_before_clicking_next_button_flag value = 1 days = 1 }
			}
		}
	}
	
	MON_relocate_arms_factory = {
		
		icon = ger_military_buildup 	

		target_trigger = {
			FROM = {
				has_country_flag = MON_chinese_nation_demanded_arms_factory
			}
		}
		highlight_states = {
			highlight_states_trigger = {
				has_state_flag = MON_negotiating_claims_over_this_state
				arms_factory > 0
			}
		}

		available = {
			any_owned_state = {
				has_state_flag = MON_negotiating_claims_over_this_state
				arms_factory > 0
			}
		}

		complete_effect = {
			random_owned_state = {
				limit = {
					has_state_flag = MON_negotiating_claims_over_this_state
					industrial_complex > 0
				}
				remove_building = {
					type = arms_factory
					level = 1
				}
			}
			random_other_country = {
				limit = {
					has_country_flag = MON_chinese_nation_demanded_arms_factory
				}
				random_owned_state = {
					limit = {
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
				every_state = {
					limit = {
						has_state_flag = MON_negotiating_claims_over_this_state
					}
					remove_claim_by = PREV
					clr_state_flag = MON_negotiating_claims_over_this_state
				}
				clr_country_flag = MON_chinese_nation_demanded_arms_factory
			}
			clr_country_flag = MON_already_reinforcing_the_territorial_issue_flag
			hidden_effect = {
				set_country_flag = { flag = MON_wait_for_a_goddamn_day_before_clicking_next_button_flag value = 1 days = 1 }
			}
		}
	}
	
	MON_revoke_tianxia_ties = {
		
		icon = GFX_decision_icon_kuomintang 

		allowed = {
			original_tag = MON
		}

		available = {
			has_capitulated = no
			is_subject = no
			is_in_faction = no
			NOT = {
				has_idea = ROOT_diplomatic_effort
			}
		}

		visible = {
			is_subject = no
			is_in_faction = no
			has_completed_focus = MON_five_races_under_one_union
		}

		target_trigger = {
			FROM = {
				is_faction_leader = yes
				is_subject = no
				has_capitulated = no
				NOT = {
					has_war_with = ROOT
				}
				OR = {
					has_government = democratic
					has_government = neutrality
				}
				is_literally_china = yes
			}
		}

		fire_only_once = no
		cost = 50

		ai_will_do = {
			factor = 5
			modifier = {
				ROOT = {
					has_government = neutrality
				}
				factor = 10
			}
		}

		days_remove = 45

		complete_effect = {
			add_ideas = ROOT_diplomatic_effort
		}

		remove_effect = {
			remove_ideas = ROOT_diplomatic_effort
			if = {
				limit = {
					FROM = {
						is_faction_leader = yes
					}
				}
				FROM = {
					country_event = generic.2
				}								
			}	
		}
	}
	
	MON_appeal_for_foreign_protection = {
		
		icon = eng_trade_unions_support

		allowed = {
			original_tag = MON
		}

		available = {
			has_capitulated = no
			is_subject = no
			is_in_faction = no
			NOT = {
				has_idea = ROOT_diplomatic_effort
			}
		}

		visible = {
			is_subject = no
			#has_completed_focus = MON_revoke_the_kyakhta_treaty
		}

		target_trigger = {
			FROM = {
				is_literally_china = yes
				is_subject = no
				has_capitulated = no
				NOT = {
					has_war_with = ROOT
				}
				OR = {
					has_government = democratic
					has_government = neutrality
				}
				has_focus_tree = china_nationalist_focus
			}
		}

		fire_only_once = no
		cost = 50

		ai_will_do = {
			factor = 5
			modifier = {
				ROOT = {
					has_government = neutrality
				}
				factor = 10
			}
		}

		days_remove = 60

		complete_effect = {
			add_ideas = ROOT_diplomatic_effort
		}

		remove_effect = {
			remove_ideas = ROOT_diplomatic_effort
			FROM = {
				country_event = {
					id = mongol_democratic.20
					hours = 12
				}
			}
			# IF THEY ACCEPT
			custom_effect_tooltip = if_they_accept_tt
			effect_tooltip = {
				every_other_country = {
					limit = {
						has_war_with = MON
						NOT = { is_in_faction_with = FROM }
					}
					FROM = {
						add_to_war = {
							targeted_alliance = MON
							enemy = PREV
							hostility_reason = asked_to_join
						}
					}
				}
				FROM = { 
					set_autonomy = {
						target = MON
						autonomous_state = autonomy_dominion
						freedom_level = 0.1
					}
				}
				set_rule = {
					can_decline_call_to_war = yes
				}
			}

			# IF THEY REFUSE
			custom_effect_tooltip = if_they_refuse_tt
			effect_tooltip = {
				add_political_power = 25
				add_stability = 0.02
			}
		}
	}
	
	MON_the_fate_of_tuva = {

		icon = eng_trade_unions_demand

		allowed = {
			OR = {
				original_tag = MON
				tag = SOV
				original_tag = TAN
			}
		}
		available = {
			hidden_trigger = { always = no }
		}

		priority = 25

		days_mission_timeout = 365

		fire_only_once = yes

		activation = {
			MON = {
				has_completed_focus = MON_the_battle_for_tuva_uriankai
			}
			TAN = {
				exists = yes
				is_subject = no
			}
		}

		visible = {
			TAN = {
				exists = yes
				is_subject = no
			}
		}

		cancel_if_not_visible = yes

		is_good = yes

		timeout_effect = {
			set_variable = { var = mon_battle_for_tuva_uriankai_influence value = MON.mon_battle_for_tuva_uriankai_influence }
			set_variable = { var = sov_battle_for_tuva_uriankai_influence value = MON.sov_battle_for_tuva_uriankai_influence }
			set_variable = { var = tan_battle_for_tuva_uriankai_influence value = MON.tan_battle_for_tuva_uriankai_influence }
			if = {
				limit = {
					check_variable = { var = mon_battle_for_tuva_uriankai_influence value = sov_battle_for_tuva_uriankai_influence compare = greater_than }
					check_variable = { var = mon_battle_for_tuva_uriankai_influence value = tan_battle_for_tuva_uriankai_influence compare = greater_than }
				}
				custom_effect_tooltip = MON_mon_dominance_in_tuva
				MON = {
					annex_country = { target = TAN transfer_troops = yes }
				}
			}
			if = {
				limit = {
					check_variable = { var = sov_battle_for_tuva_uriankai_influence value = mon_battle_for_tuva_uriankai_influence compare = greater_than }
					check_variable = { var = sov_battle_for_tuva_uriankai_influence value = tan_battle_for_tuva_uriankai_influence compare = greater_than }
				}
				custom_effect_tooltip = MON_sov_dominance_in_tuva
				SOV = {
					annex_country = { target = TAN transfer_troops = yes }
				}
			}
			if = {
				limit = {
					check_variable = { var = tan_battle_for_tuva_uriankai_influence value = sov_battle_for_tuva_uriankai_influence compare = greater_than }
					check_variable = { var = tan_battle_for_tuva_uriankai_influence value = mon_battle_for_tuva_uriankai_influence compare = greater_than }
				}
				custom_effect_tooltip = MON_tuv_dominance_in_tuva
				if = {
					limit = {
						OR = {
							tag = SOV
							original_tag = MON
						}
					}
					add_political_power = 120
				}
				if = {
					limit = {
						OR = {
							original_tag = TAN
						}
					}
					add_political_power = 300
					add_stability = 0.2
				}
			}
		}
	}
	
	MON_support_tuvan_economy = {
		
		icon = hol_attract_foreign_investors

		allowed = {
			OR = {
				original_tag = MON
				tag = SOV
			}
		}

		available = {
			NOT = {
				has_war_with = TAN
			}
		}

		visible = {
			TAN = {
				exists = yes
				is_subject = no
			}
			MON = {
				has_completed_focus = MON_the_battle_for_tuva_uriankai
			}
		}

		cancel_if_not_visible = yes

		fire_only_once = no
		cost = 25

		days_remove = 30
		complete_effect = {
			if = {
				limit = {
					original_tag = MON
					has_completed_focus = MON_transfer_the_funds_of_mongolbank
				}
				MON_mongol_bank_funds_decrease = yes
			}
			if = {
				limit = {
					original_tag = MON
					NOT = {
						has_completed_focus = MON_transfer_the_funds_of_mongolbank
					}
				}
				add_timed_idea ={
					idea = MON_investments_into_tuva
					days = 90
				}
			}
			if = {
				limit = {
					tag = SOV
				}
				add_timed_idea ={
					idea = MON_investments_into_tuva
					days = 45
				}
			}
		}

		remove_effect = {
			if = {
				limit = {
					original_tag = MON
				}
				custom_effect_tooltip = MON_mon_influence_flag_and_adj_tooltip	#Mongolia gain influence
				custom_effect_tooltip = MON_add_15_influence_tt
				add_to_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					value = 15
				}
				clamp_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			if = {
				limit = {
					tag = SOV
				}
				custom_effect_tooltip = MON_sov_influence_flag_and_adj_tooltip	#Soviets gain influence
				custom_effect_tooltip = MON_add_15_influence_tt
				add_to_variable = {
					var = MON_sov_influence_in_tuva_value
					value = 15
				}
				clamp_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			TAN = {
				add_timed_idea ={
					idea = MON_foreign_investments_to_tuva
					days = 120
				}
			}
		}
	}
	
	MON_invest_into_tuva = {
		
		icon = gre_investment_decisions

		allowed = {
			OR = {
				original_tag = MON
				tag = SOV
			}
		}

		available = {
			NOT = {
				has_war_with = TAN
			}
		}

		visible = {
			TAN = {
				exists = yes
				is_subject = no
			}
			MON = {
				has_completed_focus = MON_the_battle_for_tuva_uriankai
			}
		}

		fire_only_once = no
		cost = 50

		days_remove = 90

		custom_cost_trigger = {
			num_of_civilian_factories_available_for_projects > 1
		}
		custom_cost_text = decision_cost_civ_factory_2
		
		modifier = {
			civilian_factory_use = 2
		}

		remove_effect = {
			if = {
				limit = {
					original_tag = MON
				}
				custom_effect_tooltip = MON_mon_influence_flag_and_adj_tooltip	#Mongolia gain influence
				custom_effect_tooltip = MON_add_25_influence_tt
				add_to_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					value = 25
				}
				clamp_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			if = {
				limit = {
					tag = SOV
				}
				custom_effect_tooltip = MON_sov_influence_flag_and_adj_tooltip	#Soviets gain influence
				custom_effect_tooltip = MON_add_25_influence_tt
				add_to_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					value = 25
				}
				clamp_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			TAN = {
				random_list = {
					65 = {
						random_owned_controlled_state = {
							prioritize = { 329 }
							limit = {
								free_building_slots = {
									building = industrial_complex
									size > 0
									include_locked = yes
								}
							}
							add_extra_state_shared_building_slots = 1
							add_building_construction = {
								type = industrial_complex
								level = 1
								instant_build = yes
							}
						}
					}
					35 = {
						random_owned_controlled_state = {
							prioritize = { 329 }
							limit = {
								free_building_slots = {
									building = arms_factory
									size > 0
									include_locked = yes
								}
							}
							add_extra_state_shared_building_slots = 1
							add_building_construction = {
								type = arms_factory
								level = 1
								instant_build = yes
							}
						}
					}
				}
			}
		}
	}
	
	MON_bribe_tuvan_officials = {
		
		icon = generic_political_discourse

		allowed = {
			OR = {
				original_tag = MON
				tag = SOV
			}
		}

		available = {
			NOT = {
				has_war_with = TAN
			}
		}

		visible = {
			TAN = {
				exists = yes
				is_subject = no
			}
			MON = {
				has_completed_focus = MON_the_battle_for_tuva_uriankai
			}
		}

		fire_only_once = no
		cost = 50

		days_remove = 14

		remove_effect = {
			if = {
				limit = {
					original_tag = MON
				}
				custom_effect_tooltip = MON_mon_influence_flag_and_adj_tooltip	#Mongolia gain influence
				custom_effect_tooltip = MON_add_5_influence_tt
				add_to_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					value = 5
				}
				clamp_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_sov_influence_flag_and_adj_tooltip	#Soviets lose influence
				custom_effect_tooltip = MON_remove_10_influence_tt
				add_to_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					value = -10
				}
				clamp_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip	#Tuva loses influence
				custom_effect_tooltip = MON_remove_15_influence_tt
				add_to_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					value = -15
				}
				clamp_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			if = {
				limit = {
					tag = SOV
				}
				custom_effect_tooltip = MON_mon_influence_flag_and_adj_tooltip
				custom_effect_tooltip = MON_remove_10_influence_tt
				add_to_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					value = -10
				}
				clamp_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_sov_influence_flag_and_adj_tooltip
				custom_effect_tooltip = MON_add_5_influence_tt
				add_to_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					value = 5
				}
				clamp_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip
				custom_effect_tooltip = MON_remove_15_influence_tt
				add_to_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					value = -15
				}
				clamp_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			TAN = {
				add_political_power = 30
			}
		}
	}
	
	MON_secret_agitation = {
		
		icon = eng_propaganda_campaigns

		allowed = {
			OR = {
				original_tag = MON
				tag = SOV
			}
		}

		available = {
			NOT = {
				has_war_with = TAN
			}
		}

		visible = {
			TAN = {
				exists = yes
				is_subject = no
			}
			MON = {
				has_completed_focus = MON_the_battle_for_tuva_uriankai
			}
		}

		fire_only_once = no
		cost = 10

		days_remove = 30

		remove_effect = {
			if = {
				limit = {
					original_tag = MON
				}
				custom_effect_tooltip = MON_mon_influence_flag_and_adj_tooltip	#Mongolia gain influence
				custom_effect_tooltip = MON_add_10_influence_tt
				add_to_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					value = 10
				}
				clamp_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip	#Tuva loses influence
				custom_effect_tooltip = MON_remove_10_influence_tt
				add_to_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					value = -10
				}
				clamp_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			if = {
				limit = {
					tag = SOV
				}
				custom_effect_tooltip = MON_sov_influence_flag_and_adj_tooltip
				custom_effect_tooltip = MON_add_10_influence_tt
				add_to_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					value = 10
				}
				clamp_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip
				custom_effect_tooltip = MON_remove_10_influence_tt
				add_to_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					value = -10
				}
				clamp_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			TAN = {
				add_popularity = {
					ideology = communism
					popularity = -0.03
				}
				add_stability = -0.01
			}
		}
	}
	
	MON_launch_a_big_demonstration = {
		
		icon = generic_political_rally

		allowed = {
			OR = {
				original_tag = MON
				tag = SOV
			}
		}

		available = {
			NOT = {
				has_war_with = TAN
			}
		}

		visible = {
			TAN = {
				exists = yes
				is_subject = no
			}
			MON = {
				has_completed_focus = MON_the_battle_for_tuva_uriankai
			}
		}

		fire_only_once = no
		cost = 75

		days_remove = 60

		remove_effect = {
			if = {
				limit = {
					original_tag = MON
				}
				custom_effect_tooltip = MON_mon_influence_flag_and_adj_tooltip	#Mongolia gain influence
				custom_effect_tooltip = MON_add_20_influence_tt
				add_to_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					value = 20
				}
				clamp_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_sov_influence_flag_and_adj_tooltip	#Soviets lose influence
				custom_effect_tooltip = MON_remove_15_influence_tt
				add_to_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					value = -15
				}
				clamp_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip	#Tuva loses influence
				custom_effect_tooltip = MON_remove_25_influence_tt
				add_to_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					value = -25
				}
				clamp_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			if = {
				limit = {
					tag = SOV
				}
				custom_effect_tooltip = MON_mon_influence_flag_and_adj_tooltip
				custom_effect_tooltip = MON_remove_15_influence_tt
				add_to_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					value = -15
				}
				clamp_variable = {
					var = mon_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_sov_influence_flag_and_adj_tooltip
				custom_effect_tooltip = MON_add_20_influence_tt
				add_to_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					value = 20
				}
				clamp_variable = {
					var = sov_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
				custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip
				custom_effect_tooltip = MON_remove_25_influence_tt
				add_to_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					value = -25
				}
				clamp_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			TAN = {
				add_stability= -0.02
				add_popularity = {
					ideology = democratic
					popularity = 0.04
				}
				add_popularity = {
					ideology = neutrality
					popularity = 0.01
				}
			}
		}
	}
	
	MON_organize_a_political_assassination_in_tuva = {
		
		icon = generic_assassination

		allowed = {
			OR = {
				original_tag = MON
				tag = SOV
			}
		}

		visible = {
			TAN = {
				exists = yes
				is_subject = no
			}
			MON = {
				has_completed_focus = MON_the_battle_for_tuva_uriankai
			}
		}

		custom_cost_text = r56_15_command_power_cost
		custom_cost_trigger = {
			command_power > 15
		}

		fire_only_once = no

		days_remove = 30

		complete_effect = {
			add_political_power = -5
			hidden_effect = {
				add_command_power = -15
			}
		}

		remove_effect = {
			if = {
				limit = {
					original_tag = MON
				}
				custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip	#Tuva loses influence
				custom_effect_tooltip = MON_remove_15_influence_tt
				add_to_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					value = -15
				}
				clamp_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			if = {
				limit = {
					tag = SOV
				}
				custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip	#Tuva loses influence
				custom_effect_tooltip = MON_remove_15_influence_tt
				add_to_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					value = -15
				}
				clamp_variable = {
					var = tan_battle_for_tuva_uriankai_influence
					min = 0
					max = 100
				}
			}
			TAN = {
				add_stability= -0.05
				add_popularity = {
					ideology = communism
					popularity = -0.05
				}
			}
		}
	}
	
	MON_support_local_politicians = {
		
		icon = generic_form_nation

		allowed = {
			original_tag = TAN
		}

		visible = {
			TAN = {
				exists = yes
				is_subject = no
			}
			MON = {
				has_completed_focus = MON_the_battle_for_tuva_uriankai
			}
		}

		cost = 75

		fire_only_once = no

		days_remove = 14

		remove_effect = {
			custom_effect_tooltip = MON_tan_influence_flag_and_adj_tooltip	#Tuva gains influence
			custom_effect_tooltip = MON_add_25_influence_tt
			add_to_variable = {
				var = tan_battle_for_tuva_uriankai_influence
				value = 25
			}
			clamp_variable = {
				var = tan_battle_for_tuva_uriankai_influence
				min = 0
				max = 100
			}
			add_stability= 0.03
			add_popularity = {
				ideology = communism
				popularity = 0.05
			}
		}
	}

	#Decisions aimed onto the confrontations with warlords
	MON_plan_to_attack_warlord = {
		
		icon = hol_draw_up_staff_plans

		visible = {
			original_tag = MON
			has_capitulated = no
			MON = {
				has_completed_focus = MON_confrontations_with_warlords
			}
			NOT = {
				has_global_flag = MON_has_picked_a_warlord_to_attack
			}
		}

		target_trigger = {
			FROM = {
				is_subject = no #don't attack puppets/subjects of some other powers
				NOT = {
					has_country_flag = MON_is_willing_to_go_for_you
				}
				OR = {
					AND = {
						NOT = {
							original_tag = PRC
							original_tag = CHI
						}
						is_literally_china = yes
					}
					original_tag = MEN
					original_tag = MAN
				}
				ROOT = {	#Can't attack your overlord, buddy
					NOT = {
						is_subject_of = FROM
					}
				}
			}
		}

		available = {
			NOT = {
				has_global_flag = MON_has_picked_a_warlord_to_attack
			}
		}

		cost = 25

		fire_only_once = no

		days_remove = 14
		
		complete_effect = {
			add_war_support = 0.01
			set_global_flag = MON_has_picked_a_warlord_to_attack
			FROM = {
				set_country_flag = MON_is_willing_to_go_for_you
			}
		}
		
		remove_effect = {
			add_command_power = 25
		}
	}

	MON_invite_from_country_to_attack_warlord = {
		
		icon = generic_political_discourse

		visible = {
			original_tag = MON
			has_capitulated = no
			has_completed_focus = MON_confrontations_with_warlords
			has_global_flag = MON_has_picked_a_warlord_to_attack
			any_other_country = {
				has_country_flag = MON_is_willing_to_go_for_you
			}
		}

		target_trigger = {
			FROM = {
				is_subject = no #don't attack puppets/subjects of some other powers
				NOT = {	#can't invite country which you are going to attack
					has_country_flag = MON_is_willing_to_go_for_you
				}
				OR = {
					is_literally_china = yes
					original_tag = MEN
					original_tag = MAN
				}
				NOT = {	#already got an event and decided to stay out
					has_country_flag = MON_will_not_attack_warlord_together_woth_mongolia
				}
			}
		}

		cost = 5

		fire_only_once = no

		complete_effect = {
			FROM = {
				country_event = {
					id = mongol_foreign_influence.10
				}
			}
		}
	}

	MON_claim_the_warlord = {

		icon = {
			key = GFX_decision_generic_scales
			trigger = {
				FROM = {
					NOT = {
						has_state_flag = MON_state_fully_claimed_by_someone_already
						has_state_flag = MON_state_is_fully_claimed_by_@ROOT
					}
				}
			}
		}
		icon = {	#Too many other countries, decided to showcase that it is claimed by someone else already
			key = generic_form_nation 
			trigger = {
				FROM = {
					has_state_flag = MON_state_fully_claimed_by_someone_already
					NOT = {
						has_state_flag = MON_state_is_fully_claimed_by_@ROOT
					}
				}
			}
		}
		icon = {
			key = GFX_decision_india_forward
			trigger = {
				FROM = {
					has_state_flag = MON_state_fully_claimed_by_someone_already
					has_state_flag = MON_state_is_fully_claimed_by_@ROOT
				}
			}
		}

		allowed = {
			OR = {
				original_tag = MON
				is_literally_china = yes
			}
		}

		state_target = yes
		target_trigger = {
			FROM = {
				controller = {
					OR = {
						has_country_flag = MON_is_willing_to_go_for_you
						AND = {
							is_subject = yes
							OVERLORD = {
								has_country_flag = MON_is_willing_to_go_for_you
							}
						}
					}
				}
			}
		}

		visible = {
			has_capitulated = no
			MON = {
				has_completed_focus = MON_confrontations_with_warlords
			}
			OR = {
				original_tag = MON
				has_country_flag = MON_joined_mongolia_to_secure_one_of_the_warlords
			}
		}

		available = {
			any_country = {
				has_country_flag = MON_joined_mongolia_to_secure_one_of_the_warlords
			}
			NOT ={
				has_country_flag = MON_already_claiming_a_state
			}
			FROM = {
				NOT = {
					has_state_flag = MON_state_fully_claimed_by_someone_already
				}
			}
		}

		cost = 5

		fire_only_once = no

		days_remove = 14

		complete_effect = {
			set_country_flag = MON_already_claiming_a_state
		}

		remove_effect = {
			clr_country_flag = MON_already_claiming_a_state
			FROM = {
				add_to_variable = {
					var = var_warlord_claim_strength_@ROOT
					value = 1
				}
			}
			hidden_effect = {
				every_country = {
					limit = {
						OR = {
							original_tag = MON
							has_country_flag = MON_joined_mongolia_to_secure_one_of_the_warlords
						}
					}
					#If influenced five times, no other party cannot further influence it!
					if = {
						limit = {
							FROM = {
								check_variable = {
									var = var_warlord_claim_strength_@PREV
									value = 3
									compare = greater_than_or_equals
								}
							}
						}
						FROM = {
							set_state_flag = MON_state_fully_claimed_by_someone_already
						}
					}
					#In case country claims it, they get to keep it
					if = {
						limit = {
							FROM = {
								check_variable = {
									var = var_warlord_claim_strength_@ROOT
									value = 3
									compare = greater_than_or_equals
								}
							}
						}
						FROM = {
							set_state_flag = MON_state_is_fully_claimed_by_@ROOT
						}
					}
				}
			}
		}
	}

	MON_present_an_ultimatum = {

		icon = eng_trade_unions_demand

		allowed = {
			OR = {
				original_tag = MON
				is_literally_china = yes
			}
		}

		target_trigger = {
			FROM = {
				has_country_flag = MON_is_willing_to_go_for_you
			}
		}

		visible = {
			has_capitulated = no
			MON = {
				has_completed_focus = MON_confrontations_with_warlords
			}
			OR = {
				original_tag = MON
				has_country_flag = MON_joined_mongolia_to_secure_one_of_the_warlords
			}
		}

		available = {
			all_state = {
				OR = {
					NOT = { 
						controller = {
							OR = {
								tag = FROM
								is_subject_of = FROM
							}
						}
					}
					has_state_flag = MON_state_fully_claimed_by_someone_already
				}
			}	
		}

		cost = 25

		fire_only_once = no

		complete_effect = {
			clr_global_flag = MON_has_picked_a_warlord_to_attack  #Can further issue demands/ultimatums
			FROM = {	#event to demand lands
				country_event = {
					id = mongol_foreign_influence.13
					hours = 12
				}
			}
		}
	}
}

MON_central_asian_diplomacy = {

	MON_Kurultai_treaty_expansion = {
		
		icon = hol_exchange_intelligence_data 	
		target_trigger = {
			FROM = {
				is_subject = no
				is_in_faction = no
				is_major = no #not inviting major countries
				NOT = { has_war_with = ROOT }
				OR = {
					has_government = communism
					has_government = democratic
				}
				capital_scope = {
					OR = {
						region = 152
						region = 145
						region = 144
						region = 200
						region = 143
						region = 155
						region = 148
						region = 87
						region = 149
						region = 147
						region = 151
						region = 14
						region = 136
						region = 138
						region = 137
						region = 135
						region = 134
						region = 146
					}
				}	
			}
		}
		allowed = {
			original_tag = MON
		}
		available = {
			has_completed_focus = MON_expand_the_treaty
			NOT = {
				has_idea = ROOT_diplomatic_effort
			}
			FROM = {
				is_subject = no
				is_in_faction = no
				is_major = no #not inviting major countries
			}
		}

		visible = {
			is_subject = no
			has_completed_focus = MON_expand_the_treaty
		}
		fire_only_once = yes
		cost = 50

		ai_will_do = {
			factor = 20
		}

		days_remove = 30

		complete_effect = {
			add_ideas = ROOT_diplomatic_effort
		}

		remove_effect = {
			remove_ideas = ROOT_diplomatic_effort
			FROM = { 
				country_event = {
					id = generic.5 
					hours = 6 
				}
				add_opinion_modifier = { 
					target = ROOT 
					modifier = huge_increase
				}
				reverse_add_opinion_modifier = {
					target = ROOT
					modifier = huge_increase
				}
			}
		}
	}

	MON_promote_anti_soviet_sentiment = {
		icon = {
			key = GFX_decision_USSR_claim_state_4
			trigger = {
				FROM = {
					has_state_flag = MON_infiltration_level_0
				}
			}
		}
		icon = {
			key = GFX_decision_USSR_claim_state_3
			trigger = {
				FROM = {
					has_state_flag = MON_infiltration_level_1
				}
			}
		}
		icon = {
			key = GFX_decision_USSR_claim_state_2
			trigger = {
				FROM = {
					has_state_flag = MON_infiltration_level_2
				}
			}
		}
		icon = {
			key = GFX_decision_USSR_claim_state_1
			trigger = {
				FROM = {
					has_state_flag = MON_infiltration_level_3
				}
			}
		}
		allowed = {
			OR = {
				original_tag = MON
				tag = SOV
			}
		}
		available = {
			OR = {
				command_power > 7
				command_power_daily > 0.5
			}
		}
		state_target = yes
		target_trigger = {
			FROM = {
				is_controlled_by = SOV
				OR = {
					has_state_flag = MON_infiltration_level_0
					has_state_flag = MON_infiltration_level_1
					has_state_flag = MON_infiltration_level_2
					has_state_flag = MON_infiltration_level_3
				}
			}
		}
		fire_only_once = no
		cost = 15
		days_remove = 14
		on_map_mode = map_only

		ai_will_do = {
			base = 10
		}
		
		modifier = {
			command_power_gain = -0.5
		}
		remove_effect = {
			FROM = {
				if = {
					limit = {
						has_state_flag = MON_infiltration_level_2
					}
					clr_state_flag = MON_infiltration_level_2
					set_state_flag = MON_infiltration_level_3
				}
				if = {
					limit = {
						has_state_flag = MON_infiltration_level_1
					}
					clr_state_flag = MON_infiltration_level_1
					set_state_flag = MON_infiltration_level_2
				}
				if = {
					limit = {
						has_state_flag = MON_infiltration_level_0
					}
					clr_state_flag = MON_infiltration_level_0
					set_state_flag = MON_infiltration_level_1
				}
			}
		}
	}

	MON_join_demo_from_factionname = {

		icon = hol_exchange_intelligence_data

		allowed = {
			original_tag = MON
		}

		available = {
			has_capitulated = no
			is_subject = no
			is_in_faction = no
			NOT = {
				has_idea = ROOT_diplomatic_effort
			}
		}

		visible = {
			is_subject = no
			has_completed_focus = MON_seek_democratic_alliances
		}

		target_trigger = {
			FROM = {
				is_faction_leader = yes
				is_subject = no
				has_capitulated = no
				NOT = {
					has_war_with = ROOT
				}
				has_government = ROOT
			}
		}

		fire_only_once = yes
		cost = 50

		ai_will_do = {
			factor = 5
			modifier = {
				ROOT = {
					has_government = democratic
				}
				factor = 10
			}
		}

		days_remove = 45

		complete_effect = {
			add_ideas = ROOT_diplomatic_effort
		}

		remove_effect = {
			remove_ideas = ROOT_diplomatic_effort
			if = {
				limit = {
					FROM = {
						is_faction_leader = yes
					}
				}
				FROM = {
					country_event = generic.2
				}								
			}	
		}
	}

	MON_prepare_invasion_of_nation_in_asia = {
		
		icon = generic_spy 	
		target_trigger = {
			FROM = {
				is_subject = no
				is_major = no #not against majors, limited intervention
				NOT = { has_war_with = ROOT }
				NOT = { is_in_faction_with = ROOT }
				OR = {
					AND = {
						MON = {has_completed_focus = MON_strike_against_communist_menace } 
						has_government = communism
					}
					AND = {
						MON = {has_completed_focus = MON_bulwark_against_fascist_threat } 
						has_government = fascism
					}
				}
				any_owned_state = {
					is_on_continent = asia
				}
			}
		}
		allowed = {
			original_tag = MON
		}
		available = {
			NOT = {
				has_country_flag = ROOT_prepairing_invasion
			}
		}

		visible = {
			is_subject = no
		}

		fire_only_once = no
		cost = 25

		ai_will_do = {
			factor = 10
		}

		days_remove = 30

		complete_effect = {
			ROOT = {
				add_ai_strategy = {
					type = prepare_for_war
					id = FROM
					value = 200
				}
			}
			FROM = { 
				country_event = {
					id = mongol_democratic.6 
					hours = 6
				}
				add_ai_strategy = {
					type = alliance
					id = ROOT
					value = -100
				}
				add_ai_strategy = {
					type = prepare_for_war
					id = ROOT
					value = 200
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = large_decrease
				}
			}
			set_country_flag = ROOT_prepairing_invasion
		}

		modifier = {
			political_power_gain = -0.25
			command_power_gain = -0.2
		}

		remove_effect = {
			if = {	#cancel NAP to prevent memes
				limit = {
					FROM = { has_non_aggression_pact_with = ROOT }
				}
				diplomatic_relation = {
					country = FROM
					relation = non_aggression_pact
					active = no
				}
			}
			clr_country_flag = ROOT_prepairing_invasion
			ROOT = {
				create_wargoal = {
					target = FROM
					type = topple_government
					expire = 270
				}
			}
		}
	}
	
	MON_liberate_country = {

		icon = generic_civil_support

		target_non_existing = yes
		#target_array = occupied_countries

		target_trigger = {
			FROM = {
				NOT = {
					original_tag = CHI
					original_tag = PRC
					original_tag = SOV
				}
				any_state = {
					OR = {
						region = 149
						region = 148
						region = 152
						region = 147
						region = 151
						region = 14
						region = 136
						region = 145
						region = 146
						region = 144
						region = 200
						region = 162
						region = 143
					}
					is_core_of = FROM
					is_controlled_by = ROOT
				}
			}
		}

		days_remove = 120

		fire_only_once = yes
		allowed = {
			original_tag = MON
		}

		available = {
			has_completed_focus = MON_forge_asian_self_determination
			FROM = {
				all_state = {
					compliance > 20
					OR = {
						is_fully_controlled_by = ROOT
						NOT = {
							is_core_of = FROM
							custom_trigger_tooltip = {
								tooltip = MON_state_behind_the_urals_steppe_causasus_tt
								AND = {
									region = 149
									region = 148
									region = 152
									region = 147
									region = 151
									region = 14
									region = 136
									region = 145
									region = 146
									region = 144
									region = 200
									region = 162
									region = 143
								}
							}
						}
					}
				}
			}
		}

		ai_will_do = {
			factor = 100	#hey, we are good guys!
		}
		
		modifier = {
			political_power_gain = -0.2
		}

		remove_effect = {
			if = {
				limit = {
					FROM = {
						exists = no
					}
				}
				release = FROM
				every_controlled_state = {
					limit = {
						is_core_of = FROM
					}
					FROM = {
						transfer_state = PREV
					}
				}
			}
			if = {
				limit = {
					FROM = {
						exists = yes
						NOT = { has_government = democratic }
					}
				}
				every_controlled_state = {
					limit = {
						is_core_of = FROM
					}
					FROM = {
						set_state_controller = PREV
					}
				}
				FROM = {
					start_civil_war = { ideology = democratic size = 1 }
				}
				random_country = {
					limit= {
						original_tag = FROM
						has_government = democratic
					}
					every_state = {
						limit = {
							is_core_of = PREV
						}
						PREV = {
							transfer_state = PREV
						}
					}
				}
			}
			if = {
				limit = {
					FROM = {
						exists = yes
						has_government = democratic	#in case they are democratic, so that they don't get automatically annexed
					}
				}
				every_controlled_state = {
					limit = {
						is_core_of = FROM
					}
					FROM = {
						set_state_controller = PREV
					}
				}
				FROM = {
					start_civil_war = { ideology = neutrality size = 1 }
				}
				random_country = {
					limit= {
						original_tag = FROM
						has_government = neutrality
					}
					every_state = {
						limit = {
							is_core_of = PREV
						}
						PREV = {
							transfer_state = PREV
						}
					}
				}
			}
			FROM = {
				set_politics = {
					ruling_party = democratic
					elections_allowed = yes
				}
				hidden_effect = {
					add_popularity = {
						ideology = democratic
						popularity = 0.65	#to ensure they are really aligned to the cause
					}
				}
			}
			every_other_country = {
				limit = {
					has_war_together_with = ROOT
				}
				FROM = {
					give_military_access = PREV
				}
			}
			set_autonomy = {
				target = FROM
				autonomy_state = autonomy_dominion #autonomy_protectorate - as an alternative
			}
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
			FROM = {
				add_timed_idea ={
					idea = MON_provisional_regime_idea
					days = 365
				}
				add_ai_strategy = {	#you liberated us, nice!
					type = alliance
					id = ROOT
					value = 200
				}
				division_template = {
					name = "Irgenii Tsereg"
					priority = 2
					division_names_group = MON_INF_01
					regiments = {
						militia = { x = 0 y = 0 }
						militia = { x = 0 y = 1 }
						militia = { x = 0 y = 2 }
		
						militia = { x = 1 y = 0 }
						militia = { x = 1 y = 1 }
					}
				}
			}
			custom_effect_tooltip = CHI_raises_five_miltiia_divisions_tt
			hidden_effect = {
				FROM = {
					random_controlled_state = {
						create_unit = {
							division = "name = \"1. Irgenii Tsereg\" division_template = \"Irgenii Tsereg\" start_experience_factor = 0.51" 
							owner = FROM
						}
						create_unit = {
							division = "name = \"2. Irgenii Tsereg\" division_template = \"Irgenii Tsereg\" start_experience_factor = 0.42" 
							owner = FROM
						}
						create_unit = {
							division = "name = \"3. Irgenii Tsereg\" division_template = \"Irgenii Tsereg\" start_experience_factor = 0.63" 
							owner = FROM
						}
						create_unit = {
							division = "name = \"4. Irgenii Tsereg\" division_template = \"Irgenii Tsereg\" start_experience_factor = 0.63" 
							owner = FROM
						}
						create_unit = {
							division = "name = \"5. Irgenii Tsereg\" division_template = \"Irgenii Tsereg\" start_experience_factor = 0.63" 
							owner = FROM
						}
					}
				}
			}
		}
	}
}

MON_mongolian_naval_effort_category = {
	
	MON_lease_foreign_dockyards_decision = {

		icon = generic_operation

		allowed = {
			tag = MON
		}
		visible = {
			has_completed_focus = MON_lease_foreign_dockyards
		}
		available = {
			FROM = {
				exists = yes	
				has_government = ROOT
				num_of_factories > 75 
				dockyard > 5
				has_opinion	= {
					target = ROOT
					value > 49
				}
			}
			has_completed_focus = MON_lease_foreign_dockyards
		}

		target_trigger = {
			FROM = {
				OR = {
					AND = {
						tag = SOV
						MON = {
							check_variable = { sov_influence_in_mon = 35 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = JAP
						MON = {
							check_variable = { jap_influence_in_mon = 35 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = CHI
						MON = {
							check_variable = { chi_influence_in_mon = 35 compare = greater_than_or_equals }
						}
					}
					AND = {
						original_tag = PRC
						MON = {
							check_variable = { prc_influence_in_mon = 35 compare = greater_than_or_equals }
						}
					}
					AND = {
						is_major = yes
						NOT = {
							tag = SOV
							original_tag = JAP
							original_tag = CHI
							original_tag = PRC
						}
						is_in_faction_with = ROOT
						has_government = ROOT
						num_of_factories > 50
						dockyard > 3
					}
				}
			}
		}

		days_remove = 180
		days_re_enable = 365

		cost = 50

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				OR = {
					is_historical_focus_on = yes
					has_political_power > 200	#the more, the better
				}
			}
		}

		modifier = {
			civilian_factory_use = 3
		}

		complete_effect = {
			custom_effect_tooltip = GEN_365_days_tt
			add_offsite_building = { type = dockyard level = 2 }
			FROM = {
				add_offsite_building = { type = industrial_complex level = 3 }
			}
		}
		
		remove_effect = {
			add_offsite_building = { type = dockyard level = -2 }
			FROM = {
				add_offsite_building = { type = industrial_complex level = -3 }
			}
			if = {
				limit = {
					FROM = {
						tag = SOV
					}
				}
				MON_soviet_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = JAP
					}
				}
				MON_jap_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = CHI
					}
				}
				MON_chi_high_influence_increase_effect = yes
			}
			if = {
				limit = {
					FROM = {
						original_tag = PRC
					}
				}
				MON_prc_high_influence_increase_effect = yes
			}
		}
	}
	
	MON_force_the_dockyard_construction = {

		icon = generic_operation

		allowed = {
			tag = MON
		}
		visible = {
			has_completed_focus = MON_ensure_branches_independence
		}
		available = {
			has_completed_focus = MON_ensure_branches_independence
		}

		days_remove = 120
		days_re_enable = 270

		cost = 25

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				OR = {
					is_historical_focus_on = yes
					has_political_power > 200	#the more, the better
				}
			}
		}

		modifier = {
			civilian_factory_use = 3
		}

		complete_effect = {
			add_stability = -0.03
			custom_effect_tooltip = GEN_270_days_tt
		}
		
		remove_effect = {
			random_controlled_state = {
				limit = {
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}

	MON_transfer_subjects_battleship = {

		icon = generic_naval

		visible = {
			has_completed_focus = MON_naval_integration
		}
		available = {
			has_completed_focus = MON_naval_integration
		}

		target_trigger = {
			FROM = {
				is_subject_of = ROOT
				has_navy_size = {
					archetype = ship_hull_heavy
					size > 0
				}
			}
		}

		days_remove = 120
		cost = 50

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				OR = {
					is_historical_focus_on = no
					has_political_power > 200	#the more, the better
				}
			}
		}
	
		complete_effect = {
			FROM = {
				country_event = {id = mongol_army.3 hours = 6 }
			}
		}

		remove_effect = {
			custom_effect_tooltip = MON_gains_one_battleship_from_our_subject_tt
			FROM = {
				if = {
					limit = {
						has_navy_size = {
							archetype = ship_hull_heavy
							size > 0
						}
					}
					transfer_ship = {
						type = battleship
						target = ROOT
					}
				}
				add_autonomy_ratio = {
					value = 0.750
					localization = MON_sent_part_of_fleet_to_overlord
				}
			}
		}
	}

	MON_transfer_subjects_carrier = {

		icon = generic_naval

		visible = {
			has_completed_focus = MON_naval_integration
		}
		available = {
			has_completed_focus = MON_naval_integration
		}

		target_trigger = {
			FROM = {
				is_subject_of = ROOT
				has_navy_size = {
					unit = carrier
					size > 0
				}
			}
		}

		days_remove = 120
		cost = 40

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				OR = {
					is_historical_focus_on = no
					has_political_power > 200	#the more, the better
				}
			}
		}
		
		complete_effect = {
			FROM = {
				country_event = {id = mongol_army.3 hours = 6 }
			}
		}

		remove_effect = {
			custom_effect_tooltip = MON_gains_one_carrier_from_our_subject_tt
			FROM = {
				if = {
					limit = {
						has_navy_size = {
							unit = carrier
							size > 0
						}
					}
					transfer_ship = {
						type = carrier
						target = ROOT
					}
				}
				add_autonomy_ratio = {
					value = 0.600
					localization = MON_sent_part_of_fleet_to_overlord
				}
			}
		}
	}

	MON_transfer_subjects_two_heavy_cruisers = {

		icon = generic_naval

		visible = {
			has_completed_focus = MON_naval_integration
		}
		available = {
			has_completed_focus = MON_naval_integration
		}

		target_trigger = {
			FROM = {
				is_subject_of = ROOT
				has_navy_size = {
					unit = heavy_cruiser
					size > 1
				}
			}
		}

		days_remove = 90
		cost = 40

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				OR = {
					is_historical_focus_on = no
					has_political_power > 200	#the more, the better
				}
			}
		}
	
		complete_effect = {
			FROM = {
				country_event = {id = mongol_army.3 hours = 6 }
			}
		}

		remove_effect = {
			custom_effect_tooltip = MON_gains_two_heavy_cruisers_from_our_subject_tt
			FROM = {
				if = {
					limit = {
						has_navy_size = {
							unit = heavy_cruiser
							size > 1
						}
					}
					transfer_ship = {
						type = heavy_cruiser
						target = ROOT
					}
					transfer_ship = {
						type = heavy_cruiser
						target = ROOT
					}
				}
				add_autonomy_ratio = {
					value = 0.500
					localization = MON_sent_part_of_fleet_to_overlord
				}
			}
		}
	}

	MON_transfer_subjects_three_light_cruisers = {

		icon = generic_naval

		visible = {
			has_completed_focus = MON_naval_integration
		}
		available = {
			has_completed_focus = MON_naval_integration
		}

		target_trigger = {
			FROM = {
				is_subject_of = ROOT
				has_navy_size = {
					unit = light_cruiser
					size > 2
				}
			}
		}

		days_remove = 60
		cost = 30

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				OR = {
					is_historical_focus_on = no
					has_political_power > 200	#the more, the better
				}
			}
		}
	
		complete_effect = {
			FROM = {
				country_event = {id = mongol_army.3 hours = 6 }
			}
		}

		remove_effect = {
			custom_effect_tooltip = MON_gains_three_light_cruisers_from_our_subject_tt
			FROM = {
				if = {
					limit = {
						has_navy_size = {
							unit = light_cruiser
							size > 2
						}
					}
					transfer_ship = {
						type = light_cruiser
						target = ROOT
					}
					transfer_ship = {
						type = light_cruiser
						target = ROOT
					}
					transfer_ship = {
						type = light_cruiser
						target = ROOT
					}
				}
				add_autonomy_ratio = {
					value = 0.400
					localization = MON_sent_part_of_fleet_to_overlord
				}
			}
		}
	}

	MON_transfer_subjects_five_destroyers = {

		icon = generic_naval

		visible = {
			has_completed_focus = MON_naval_integration
		}
		available = {
			has_completed_focus = MON_naval_integration
		}

		target_trigger = {
			FROM = {
				is_subject_of = ROOT
				has_navy_size = {
					archetype = ship_hull_light
					size > 4
				}
			}
		}

		days_remove = 60
		cost = 20

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				OR = {
					is_historical_focus_on = no
					has_political_power > 200	#the more, the better
				}
			}
		}
	
		complete_effect = {
			FROM = {
				country_event = {id = mongol_army.3 hours = 6 }
			}
		}

		remove_effect = {
			custom_effect_tooltip = MON_gains_five_destroyers_from_our_subject_tt
			FROM = {
				if = {
					limit = {
						has_navy_size = {
							archetype = ship_hull_light
							size > 4
						}
					}
					transfer_ship = {
						type = destroyer
						target = ROOT
					}
					transfer_ship = {
						type = destroyer
						target = ROOT
					}
					transfer_ship = {
						type = destroyer
						target = ROOT
					}
					transfer_ship = {
						type = destroyer
						target = ROOT
					}
					transfer_ship = {
						type = destroyer
						target = ROOT
					}
				}
				add_autonomy_ratio = {
					value = 0.300
					localization = MON_sent_part_of_fleet_to_overlord
				}
			}
		}
	}

	MON_transfer_subjects_ten_submarines = {

		icon = generic_naval

		visible = {
			has_completed_focus = MON_naval_integration
		}
		available = {
			has_completed_focus = MON_naval_integration
		}

		target_trigger = {
			FROM = {
				is_subject_of = ROOT
				has_navy_size = {
					type = submarine
					size > 9
				}
			}
		}

		days_remove = 50
		cost = 15

		fire_only_once = no

		ai_will_do = {
			factor = 0.1
			modifier = {
				factor = 2
				OR = {
					is_historical_focus_on = no
					has_political_power > 200	#the more, the better
				}
			}
		}
	
		complete_effect = {
			FROM = {
				country_event = {id = mongol_army.3 hours = 6 }
			}
		}

		remove_effect = {
			custom_effect_tooltip = MON_gains_ten_submarines_from_our_subject_tt
			FROM = {
				if = {
					limit = {
						has_navy_size = {
							type = submarine
							size > 9
						}
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
					transfer_ship = {
						type = submarine
						target = ROOT
					}
				}
				add_autonomy_ratio = {
					value = 0.250
					localization = MON_sent_part_of_fleet_to_overlord
				}
			}
		}
	}
}
