add_namespace = MONBW

#Clique gets opportunity to invade Mongolia - replaced by decision
country_event = {
	id = MONBW.1
	title = MONBW.1.t
	desc = MONBW.1.d
	fire_only_once = yes
	is_triggered_only = yes

	trigger = {
		has_war = no
		is_neighbor_of = MON
		OR = {
			tag = SHX
			tag = XSM
		}
		MON = { 
			is_in_faction = no
			is_subject = no
		}
		strength_ratio = {
			tag = MON
			ratio > 0.5
		}
	}

	mean_time_to_happen = {
		days = 150
		modifier = {
			factor = 0.5
			is_ai = no
		}
	}

	option = {
		name = MONBW.1.a
		declare_war_on = {
			target = MON 
			type = annex_everything
		}
	}
	option = {
		name = MONBW.1.b
	}
}

#Mongolian general splits
country_event = {
	id = MONBW.2
	title = MONBW.2.t
	desc = MONBW.2.d
	fire_only_once = yes
	is_triggered_only = yes

	trigger = {
		always = no
		NOT = { has_war_with = JAP }
		OR = {
			tag = SHX
			tag = XSM
		}
		has_full_control_of_state = 330
		owns_state = 330
		divisions_in_state = { 
			state = 330
			size > 5
		}
	}

	mean_time_to_happen = {
		days = 150
		modifier = {
			factor = 0.9
			divisions_in_state = { 
				state = 330
				size > 7
			}
		}
		modifier = {
			factor = 0.9
			divisions_in_state = { 
				state = 330
				size > 10
			}
		}
	}

	immediate = {
		start_civil_war = {
			ideology = fascism
			size = 0.5
			states = { 330 }
		}
		random_country = {
			limit = {
				OR = {
					original_tag = XSM
					original_tag = SHX
				}
				NOR = {
					original_tag = XSM
					original_tag = SHX
				}
			}
			#change_tag_from = MON
			save_event_target_as = MON_warlord
		}
		MON = {
			annex_country = { target = event_target:MON_warlord transfer_troops = yes }
			change_tag_from = event_target:MON_warlord
			set_politics = {
				ruling_party = neutrality
				elections_allowed = no
			}
			set_cosmetic_tag = MON_CHI
			if = {
				limit = { has_global_flag = KMT_mod_enabled }
				add_ideas = {
					cg_warlords
					cu_is_warlord
				}
			}
		}
		if = {
			limit = { tag = XSM }
			MON = { 
				create_country_leader = {
					name = "Ma Zhongying"
					#picture = "Portrait_SQI_Sun_Suzhen.tga"
					expire = "1965.1.1"
					ideology = despotism
					traits = {}
				}
			}
		}
		if = {
			limit = { tag = SHX }
			MON = { 
				create_country_leader = {
					name = "Wang Jingguo"
					#picture = "Portrait_SQI_Sun_Suzhen.tga"
					expire = "1965.1.1"
					ideology = despotism
					traits = {}
				}
			}
		}
	}

	option = {
		name = MONBW.2.a
		white_peace =MON
	}
	option = {
		name = MONBW.2.b
		declare_war_on = {
			target = MON 
			type = annex_everything
		}
		add_political_power = 40
	}
}

country_event = {
	id = MONBW.3
	title = MONBW.3.t
	desc = MONBW.3.d
	is_triggered_only = yes
	fire_only_once = yes
	hidden = yes

	immediate = {
		#761 = { set_state_flag = MON_clash_territory }
		#611 = { set_state_flag = MON_clash_territory }
		#612 = { set_state_flag = MON_clash_territory }
		621 = { set_state_flag = MON_clash_territory }
		746 = { set_state_flag = MON_clash_territory }
		616 = { set_state_flag = MON_clash_territory }
		756 = { set_state_flag = MON_clash_territory }
		618 = { set_state_flag = MON_clash_territory }
	}
}