#Alternative Chinese Civil War trigger - written by CSRZ
#We rarely see the Chinese Civil War - even with historical focus on.
#These events are designed to work like battle royale. Chinese factions will be hyperagressive towards each other unitl only one faction is left.

#This shouldn't trigger if any of the Chinese factions is in alliance with any major nation

add_namespace = altchi

#Manchukuo collapse triggers civil war in China

country_event = {
	id = altchi.1

	trigger = {
		tag = USA
		OR = {
			NOT = { country_exists = MAN }
			MAN = {
				AND = {
					is_subject = yes
					NOT = { is_subject_of = JAP } #it was puppeted by someone else than Japan!
				}
			}
		}
		NOT = { JAP = { owns_state = 328 } } #in case where it was Japan that annexed Manchukuo
	}

	mean_time_to_happen = {
		days = 2
	}

	hidden = yes

	immediate = {
		set_global_flag = warlord_mayhem
	}
}

#civil war setup - Mao leaves United Front and recruits a ton of troops
country_event = {
	id = altchi.2
	title = altchi.2.t
	desc = altchi.2.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = PRC
		OR = {
			country_exists = CHI
			country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			country_exists = GXC
			country_exists = SIK
		}	
		has_global_flag = warlord_mayhem
		is_puppet = no
		NOT = { has_completed_focus = PRC_coalition_government } #had to be done to avoid bugs
		#checked - if any of the other Chinas is in faction with a major then communist China will lose
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.2.a
		ai_chance = { factor = 100 }
		create_faction = MUTUAL_ASSISTANCE_FACTION
		division_template = {
			name = "Militia"
			priority = 2
			division_names_group = PRC_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 }
			}
		}
		622 = {
			create_unit = {
				division = "name = \"1st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"2nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"3rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"4th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"5th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"6th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"7th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"8th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"9th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"10th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"11th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"12th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"13th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"14th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"15th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"16th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"17th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"18th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"19th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"20th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"21st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"22nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"23rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"24th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"25th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"26th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"27th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"28th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"29th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"30th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"31st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"32nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"33rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"34th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"35th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"36th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"37th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"38th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"39th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"40th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"41st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"42nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"43rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"44th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"45th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"46th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"47th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"48th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"49th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"50th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"51st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"52nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"53rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"54th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"55th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"56th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"57th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"58th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"59th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"60th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"61st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"62nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"63rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"64th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"65th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"66th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"67th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"68th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"69th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"70th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"71st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"72nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"73rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"74th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"75th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"76th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"77th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"78th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"79th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"80th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"81st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"82nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"83rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"84th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"85th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"86th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"87th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"88th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"89th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"90th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"91st Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"92nd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"93rd Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"94th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"95th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"96th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"97th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"98th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"99th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
			create_unit = {
				division = "name = \"100th Militia Regiment\" division_template = \"Militia\" start_experience_factor = 1.0" 
				owner = PRC
			}
		}
		PRC = {
			country_event = { 
				id = altchi.31 
				days = 60
			}
		}
	}

	option = {
		name = altchi.2.b
	}
}

####
#    - Tier II civil war - full battle royale
####

# Every warlord on his own

country_event = {
	id = altchi.11
	title = altchi.10.t
	desc = altchi.10.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = YUN
		#NOT = { country_exists = PRC }
		OR = {
			country_exists = CHI
			country_exists = XSM
			country_exists = SHX
			#country_exists = YUN
			country_exists = GXC
			country_exists = SIK
			country_exists = PRC
		}	
		has_global_flag = warlord_mayhem
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.10.a
		ai_chance = { factor = 100 }
		create_faction = YUN_FACTION
		YUN = {
			country_event = { 
				id = altchi.25 
				days = 60
			}
		}
	}

	option = {
		name = altchi.10.b
	}
}

country_event = {
	id = altchi.12
	title = altchi.10.t
	desc = altchi.10.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = GXC
		#NOT = { country_exists = PRC }
		OR = {
			country_exists = CHI
			country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			#country_exists = GXC
			country_exists = SIK
			country_exists = PRC
		}	
		has_global_flag = warlord_mayhem
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.10.a
		ai_chance = { factor = 100 }
		create_faction = GXC_FACTION
		GXC = {
			country_event = { 
				id = altchi.26 
				days = 60
			}
		}
	}

	option = {
		name = altchi.10.b
	}
}

country_event = {
	id = altchi.13
	title = altchi.10.t
	desc = altchi.10.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = SIK
		#NOT = { country_exists = PRC }
		OR = {
			country_exists = CHI
			country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			country_exists = GXC
			#country_exists = SIK
			country_exists = PRC
		}	
		has_global_flag = warlord_mayhem
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.10.a
		ai_chance = { factor = 100 }
		create_faction = SIK_FACTION
		SIK = {
			country_event = { 
				id = altchi.22 
				days = 60
			}
		}
	}

	option = {
		name = altchi.10.b
	}
}

country_event = {
	id = altchi.14
	title = altchi.10.t
	desc = altchi.10.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = SHX
		#NOT = { country_exists = PRC }
		OR = {
			country_exists = CHI
			country_exists = XSM
			#country_exists = SHX
			country_exists = YUN
			country_exists = GXC
			country_exists = SIK
			country_exists = PRC
		}	
		has_global_flag = warlord_mayhem
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.10.a
		ai_chance = { factor = 100 }
		create_faction = SHX_FACTION
		SHX = {
			country_event = { 
				id = altchi.24 
				days = 60
			}
		}
	}

	option = {
		name = altchi.10.b
	}
}

country_event = {
	id = altchi.15
	title = altchi.10.t
	desc = altchi.10.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = XSM
		#NOT = { country_exists = PRC }
		OR = {
			country_exists = CHI
			#country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			country_exists = GXC
			country_exists = SIK
			country_exists = PRC
		}	
		has_global_flag = warlord_mayhem
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.10.a
		ai_chance = { factor = 100 }
		create_faction = XSM_FACTION
		XSM = {
			country_event = { 
				id = altchi.23 
				days = 60
			}
		}
	}

	option = {
		name = altchi.10.b
	}
}

country_event = {
	id = altchi.16
	title = altchi.10.t
	desc = altchi.10.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = CHI
		#NOT = { country_exists = PRC }
		OR = {
			#country_exists = CHI
			country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			country_exists = GXC
			country_exists = SIK
			country_exists = PRC
		}	
		has_global_flag = warlord_mayhem
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.10.a
		ai_chance = { factor = 100 }
		create_faction = CHI_FACTION
		CHI = {
			country_event = { 
				id = altchi.21 
				days = 60
			}
		}
	}

	option = {
		name = altchi.10.b
	}
}

country_event = {
	id = altchi.21
	title = altchi.20.t
	desc = altchi.20.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	is_triggered_only = yes

	option = {
		name = altchi.20.a
		ai_chance = { factor = 100 }
		declare_war_on = {
			target = SIK
			type = annex_everything
		}
		declare_war_on = {
			target = XSM
			type = annex_everything
		}
		declare_war_on = {
			target = YUN
			type = annex_everything
		}
		declare_war_on = {
			target = GXC
			type = annex_everything
		}
		declare_war_on = {
			target = SHX
			type = annex_everything
		}
		declare_war_on = {
			target = PRC
			type = annex_everything
		}
		declare_war_on = {
			target = HBC
			type = annex_everything
		}
		declare_war_on = {
			target = XIC
			type = annex_everything
		}
		declare_war_on = {
			target = SIC
			type = annex_everything
		}
		declare_war_on = {
			target = SND
			type = annex_everything
		}
		declare_war_on = {
			target = NXM
			type = annex_everything
		}
		declare_war_on = {
			target = KHM
			type = annex_everything
		}
		declare_war_on = {
			target = GDC
			type = annex_everything
		}
		declare_war_on = {
			target = GSM
			type = annex_everything
		}
		declare_war_on = {
			target = KUM
			type = annex_everything
		}
	}

	option = {
		name = altchi.20.b
	}
}

country_event = {
	id = altchi.22
	title = altchi.20.t
	desc = altchi.20.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	is_triggered_only = yes

	option = {
		name = altchi.20.a
		ai_chance = { factor = 100 }
		declare_war_on = {
			target = CHI
			type = annex_everything
		}
		declare_war_on = {
			target = XSM
			type = annex_everything
		}
		declare_war_on = {
			target = YUN
			type = annex_everything
		}
		declare_war_on = {
			target = GXC
			type = annex_everything
		}
		declare_war_on = {
			target = SHX
			type = annex_everything
		}
		declare_war_on = {
			target = PRC
			type = annex_everything
		}
		declare_war_on = {
			target = HBC
			type = annex_everything
		}
		declare_war_on = {
			target = XIC
			type = annex_everything
		}
		declare_war_on = {
			target = SIC
			type = annex_everything
		}
		declare_war_on = {
			target = SND
			type = annex_everything
		}
		declare_war_on = {
			target = NXM
			type = annex_everything
		}
		declare_war_on = {
			target = KHM
			type = annex_everything
		}
		declare_war_on = {
			target = GDC
			type = annex_everything
		}
		declare_war_on = {
			target = GSM
			type = annex_everything
		}
		declare_war_on = {
			target = KUM
			type = annex_everything
		}
	}

	option = {
		name = altchi.20.b
	}
}

country_event = {
	id = altchi.23
	title = altchi.20.t
	desc = altchi.20.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	is_triggered_only = yes

	option = {
		name = altchi.20.a
		ai_chance = { factor = 100 }
		declare_war_on = {
			target = CHI
			type = annex_everything
		}
		declare_war_on = {
			target = SIK
			type = annex_everything
		}
		declare_war_on = {
			target = YUN
			type = annex_everything
		}
		declare_war_on = {
			target = GXC
			type = annex_everything
		}
		declare_war_on = {
			target = SHX
			type = annex_everything
		}
		declare_war_on = {
			target = PRC
			type = annex_everything
		}
		declare_war_on = {
			target = HBC
			type = annex_everything
		}
		declare_war_on = {
			target = XIC
			type = annex_everything
		}
		declare_war_on = {
			target = SIC
			type = annex_everything
		}
		declare_war_on = {
			target = SND
			type = annex_everything
		}
		declare_war_on = {
			target = NXM
			type = annex_everything
		}
		declare_war_on = {
			target = KHM
			type = annex_everything
		}
		declare_war_on = {
			target = GDC
			type = annex_everything
		}
		declare_war_on = {
			target = GSM
			type = annex_everything
		}
		declare_war_on = {
			target = KUM
			type = annex_everything
		}
	}

	option = {
		name = altchi.20.b
	}
}

country_event = {
	id = altchi.24
	title = altchi.20.t
	desc = altchi.20.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	is_triggered_only = yes

	option = {
		name = altchi.20.a
		ai_chance = { factor = 100 }
		declare_war_on = {
			target = CHI
			type = annex_everything
		}
		declare_war_on = {
			target = SIK
			type = annex_everything
		}
		declare_war_on = {
			target = YUN
			type = annex_everything
		}
		declare_war_on = {
			target = GXC
			type = annex_everything
		}
		declare_war_on = {
			target = XSM
			type = annex_everything
		}
		declare_war_on = {
			target = PRC
			type = annex_everything
		}
		declare_war_on = {
			target = HBC
			type = annex_everything
		}
		declare_war_on = {
			target = XIC
			type = annex_everything
		}
		declare_war_on = {
			target = SIC
			type = annex_everything
		}
		declare_war_on = {
			target = SND
			type = annex_everything
		}
		declare_war_on = {
			target = NXM
			type = annex_everything
		}
		declare_war_on = {
			target = KHM
			type = annex_everything
		}
		declare_war_on = {
			target = GDC
			type = annex_everything
		}
		declare_war_on = {
			target = GSM
			type = annex_everything
		}
		declare_war_on = {
			target = KUM
			type = annex_everything
		}
	}

	option = {
		name = altchi.20.b
	}
}

country_event = {
	id = altchi.25
	title = altchi.20.t
	desc = altchi.20.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	is_triggered_only = yes

	option = {
		name = altchi.20.a
		ai_chance = { factor = 100 }
		declare_war_on = {
			target = CHI
			type = annex_everything
		}
		declare_war_on = {
			target = SIK
			type = annex_everything
		}
		declare_war_on = {
			target = SHX
			type = annex_everything
		}
		declare_war_on = {
			target = GXC
			type = annex_everything
		}
		declare_war_on = {
			target = XSM
			type = annex_everything
		}
		declare_war_on = {
			target = PRC
			type = annex_everything
		}
		declare_war_on = {
			target = HBC
			type = annex_everything
		}
		declare_war_on = {
			target = XIC
			type = annex_everything
		}
		declare_war_on = {
			target = SIC
			type = annex_everything
		}
		declare_war_on = {
			target = SND
			type = annex_everything
		}
		declare_war_on = {
			target = NXM
			type = annex_everything
		}
		declare_war_on = {
			target = KHM
			type = annex_everything
		}
		declare_war_on = {
			target = GDC
			type = annex_everything
		}
		declare_war_on = {
			target = GSM
			type = annex_everything
		}
		declare_war_on = {
			target = KUM
			type = annex_everything
		}
	}

	option = {
		name = altchi.20.b
	}
}

country_event = {
	id = altchi.26
	title = altchi.20.t
	desc = altchi.20.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	is_triggered_only = yes

	option = {
		name = altchi.20.a
		ai_chance = { factor = 100 }
		declare_war_on = {
			target = CHI
			type = annex_everything
		}
		declare_war_on = {
			target = SIK
			type = annex_everything
		}
		declare_war_on = {
			target = SHX
			type = annex_everything
		}
		declare_war_on = {
			target = YUN
			type = annex_everything
		}
		declare_war_on = {
			target = XSM
			type = annex_everything
		}
		declare_war_on = {
			target = PRC
			type = annex_everything
		}
		declare_war_on = {
			target = HBC
			type = annex_everything
		}
		declare_war_on = {
			target = XIC
			type = annex_everything
		}
		declare_war_on = {
			target = SIC
			type = annex_everything
		}
		declare_war_on = {
			target = SND
			type = annex_everything
		}
		declare_war_on = {
			target = NXM
			type = annex_everything
		}
		declare_war_on = {
			target = KHM
			type = annex_everything
		}
		declare_war_on = {
			target = GDC
			type = annex_everything
		}
		declare_war_on = {
			target = GSM
			type = annex_everything
		}
		declare_war_on = {
			target = KUM
			type = annex_everything
		}
	}

	option = {
		name = altchi.20.b
	}
}

country_event = {
	id = altchi.31
	title = altchi.20.t
	desc = altchi.20.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	is_triggered_only = yes

	option = {
		name = altchi.20.a
		ai_chance = { factor = 100 }
		declare_war_on = {
			target = CHI
			type = annex_everything
		}
		declare_war_on = {
			target = SIK
			type = annex_everything
		}
		declare_war_on = {
			target = SHX
			type = annex_everything
		}
		declare_war_on = {
			target = YUN
			type = annex_everything
		}
		declare_war_on = {
			target = XSM
			type = annex_everything
		}
		declare_war_on = {
			target = GXC
			type = annex_everything
		}
		declare_war_on = {
			target = HBC
			type = annex_everything
		}
		declare_war_on = {
			target = XIC
			type = annex_everything
		}
		declare_war_on = {
			target = SIC
			type = annex_everything
		}
		declare_war_on = {
			target = SND
			type = annex_everything
		}
		declare_war_on = {
			target = NXM
			type = annex_everything
		}
		declare_war_on = {
			target = KHM
			type = annex_everything
		}
		declare_war_on = {
			target = GDC
			type = annex_everything
		}
		declare_war_on = {
			target = GSM
			type = annex_everything
		}
		declare_war_on = {
			target = KUM
			type = annex_everything
		}
	}

	option = {
		name = altchi.20.b
	}
}

#AI is stupid and won't move it's capital to Beijing
country_event = {
	id = altchi.88

	trigger = {
		OR = { 
			tag = XSM
			tag = SIK
			#tag = YUN
			#tag = GXC
			tag = SHX
		}
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		owns_state = 608
		is_ai = yes
	}

	mean_time_to_happen = {
		days = 2
	}

	hidden = yes

	immediate = {
		ROOT = { set_capital = { state = 608 } }
	}
}

#AI is stupid and won't move it's capital to Nanjing
country_event = {
	id = altchi.89

	trigger = {
		OR = { 
			#tag = XSM
			#tag = SIK
			tag = YUN
			tag = GXC
			#tag = SHX
		}
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		owns_state = 1035
		is_ai = yes
	}

	mean_time_to_happen = {
		days = 2
	}

	hidden = yes

	immediate = {
		ROOT = { set_capital = { state = 1035 } }
	}
}

#AI is stupid and won't move it's capital
country_event = {
	id = altchi.90

	trigger = {
		tag = PRC
		controls_state = 608
		is_ai = yes
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}

	mean_time_to_happen = {
		days = 2
	}

	hidden = yes

	immediate = {
		PRC = { set_capital = { state = 608 } }
	}
}

#AI is stupid and won't move it's capital to Nanjing
country_event = {
	id = altchi.91

	trigger = {
		OR = { 
			tag = RNG
		}
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		controls_state = 1035
		is_ai = yes
	}

	mean_time_to_happen = {
		days = 2
	}

	hidden = yes

	immediate = {
		ROOT = { 
			add_state_core = 1034
			add_state_core = 1035
			set_capital = { state = 1035 } 
		}
	}
}

#AI is stupid and won't annex Tibet after the invasion
country_event = {
	id = altchi.91

	trigger = {
		OR = { 
			tag = PRC
			tag = CHI
			tag = XSM
			tag = SIK
			tag = YUN
			tag = GXC
			tag = SHX
		}
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		is_ai = yes
		TIB = { is_subject_of = ROOT }
	}

	mean_time_to_happen = {
		days = 2
	}

	hidden = yes

	immediate = {
		ROOT = { 
			annex_country = { 
				target = TIB
				transfer_troops = no
			} 
		}
	}
}

###
#  invasion of Tibet events for every major warlord
###


country_event = {
	id = altchi.101
	title = altchi.100.t
	desc = altchi.100.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = PRC
		NOT = {
			country_exists = CHI
			country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			country_exists = GXC
			country_exists = SIK
		}
		country_exists = TIB
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.100.a
		ai_chance = { factor = 100 }
		add_state_core = 322
		add_state_core = 758
		add_state_core = 757
		declare_war_on = {
			target = TIB
			type = annex_everything
		}
	}

	option = {
		name = altchi.100.b
	}
}

country_event = {
	id = altchi.102
	title = altchi.100.t
	desc = altchi.100.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = CHI
		NOT = {
			country_exists = PRC
			country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			country_exists = GXC
			country_exists = SIK
		}
		country_exists = TIB
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.100.a
		ai_chance = { factor = 100 }
		add_state_core = 322
		add_state_core = 758
		add_state_core = 757
		declare_war_on = {
			target = TIB
			type = annex_everything
		}
	}

	option = {
		name = altchi.100.b
	}
}

country_event = {
	id = altchi.103
	title = altchi.100.t
	desc = altchi.100.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = XSM
		NOT = {
			country_exists = CHI
			country_exists = PRC
			country_exists = SHX
			country_exists = YUN
			country_exists = GXC
			country_exists = SIK
		}
		country_exists = TIB
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.100.a
		ai_chance = { factor = 100 }
		add_state_core = 322
		add_state_core = 758
		add_state_core = 757
		declare_war_on = {
			target = TIB
			type = annex_everything
		}
	}

	option = {
		name = altchi.100.b
	}
}

country_event = {
	id = altchi.104
	title = altchi.100.t
	desc = altchi.100.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = SHX
		NOT = {
			country_exists = CHI
			country_exists = PRC
			country_exists = XSM
			country_exists = YUN
			country_exists = GXC
			country_exists = SIK
		}
		country_exists = TIB
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.100.a
		ai_chance = { factor = 100 }
		add_state_core = 322
		add_state_core = 758
		add_state_core = 757
		declare_war_on = {
			target = TIB
			type = annex_everything
		}
	}

	option = {
		name = altchi.100.b
	}
}

country_event = {
	id = altchi.105
	title = altchi.100.t
	desc = altchi.100.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = YUN
		NOT = {
			country_exists = CHI
			country_exists = PRC
			country_exists = XSM
			country_exists = SHX
			country_exists = GXC
			country_exists = SIK
		}
		country_exists = TIB
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.100.a
		ai_chance = { factor = 100 }
		add_state_core = 322
		add_state_core = 758
		add_state_core = 757
		declare_war_on = {
			target = TIB
			type = annex_everything
		}
	}

	option = {
		name = altchi.100.b
	}
}

country_event = {
	id = altchi.106
	title = altchi.100.t
	desc = altchi.100.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = GXC
		NOT = {
			country_exists = CHI
			country_exists = PRC
			country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			country_exists = SIK
		}
		country_exists = TIB
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.100.a
		ai_chance = { factor = 100 }
		add_state_core = 322
		add_state_core = 758
		add_state_core = 757
		declare_war_on = {
			target = TIB
			type = annex_everything
		}
	}

	option = {
		name = altchi.100.b
	}
}

country_event = {
	id = altchi.107
	title = altchi.100.t
	desc = altchi.100.d
	picture = GFX_report_event_chinese_soldiers_01

	fire_only_once = yes
	
	trigger = {
		tag = SIK
		NOT = {
			country_exists = CHI
			country_exists = PRC
			country_exists = XSM
			country_exists = SHX
			country_exists = YUN
			country_exists = GXC
		}
		country_exists = TIB
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = altchi.100.a
		ai_chance = { factor = 100 }
		add_state_core = 322
		add_state_core = 758
		add_state_core = 757
		declare_war_on = {
			target = TIB
			type = annex_everything
		}
	}

	option = {
		name = altchi.100.b
	}
}