add_namespace = xinjiang

country_event = { # Uyghurs rise against the Border Adm! part 1
	id = xinjiang.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event xinjiang.1" }
	title = xinjiang.1.t
	desc = xinjiang.1.desc
	picture = GFX_report_event_QIN_steppe
	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = xinjiang.1.a
		add_stability = -0.2
		hidden_effect = {
			618 = { set_demilitarized_zone = yes }
			619 = { set_demilitarized_zone = yes }
			958 = { set_demilitarized_zone = yes }
			1964 = { set_demilitarized_zone = yes }
			2399 = { set_demilitarized_zone = yes }
			2430 = { set_demilitarized_zone = yes }
			ETR = {
				add_state_core = 617
				add_state_core = 618
				add_state_core = 619
				add_state_core = 957
				add_state_core = 958
				add_state_core = 1964
				add_state_core = 2399
				add_state_core = 2428	
				add_state_core = 2430
				add_state_core = 2431
				add_state_core = 2432
				add_state_core = 2433
			}
			ILI = {
				add_state_core = 617
				add_state_core = 618
				add_state_core = 619
				add_state_core = 957
				add_state_core = 958
				add_state_core = 1964
				add_state_core = 2399
				add_state_core = 2428	
				add_state_core = 2430
				add_state_core = 2431
				add_state_core = 2432
				add_state_core = 2433
			}
			1465 = { add_claim_by = ETR }
			2460 = { add_claim_by = ETR }
			2461 = { add_claim_by = ETR }
			1465 = { add_claim_by = ILI }
			2460 = { add_claim_by = ILI }
			2461 = { add_claim_by = ILI }
			XIN = {
				country_event = { 
					id = xinjiang.2
					days = 6
		    	}
				set_variable = { TNO_economy_type = token:Econ_Type_Planned }
				set_variable = { TNO_economy_subtype = token:Econ_Subtype_Military_Directed }
			}
		}	
	}
}

country_event = { # Uyghurs rise against the Border Adm! part 2
	id = xinjiang.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event xinjiang.2" }
	title = xinjiang.2.t
	desc = xinjiang.2.desc
	picture = GFX_report_event_QIN_steppe
	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = xinjiang.2.a
		ETR = {
			transfer_state = 618
			transfer_state = 619
			transfer_state = 958
			transfer_state = 1964
			transfer_state = 2399
			load_oob = ETR_uprising
			declare_war_on = {
				target = XIN
				type = annex_everything
			}
			declare_war_on = {
				target = ILI
				type = annex_everything
			}
		}
		ILI = {
			transfer_state = 2430
			load_oob = ILI_uprising
			declare_war_on = {
				target = XIN
				type = annex_everything
			}
			declare_war_on = {
				target = ETR
				type = annex_everything
			}
		}
		XIN = {
			add_stability = 0.05
		}
	}

	option = {
		name = xinjiang.2.b
		ETR = {
			transfer_state = 618
			transfer_state = 619
			transfer_state = 958
			transfer_state = 1964
			transfer_state = 2399
			load_oob = ETR_uprising
			declare_war_on = {
				target = XIN
				type = annex_everything
			}
			declare_war_on = {
				target = ILI
				type = annex_everything
			}
		}
		ILI = {
			transfer_state = 2430
			load_oob = ILI_uprising
			declare_war_on = {
				target = XIN
				type = annex_everything
			}
			declare_war_on = {
				target = ETR
				type = annex_everything
			}
		}
		XIN = {
			add_stability = 0.05
		}
		ETR = {
			change_tag_from = XIN
		}
	}

	option = {
		name = xinjiang.2.c
		ETR = {
			transfer_state = 618
			transfer_state = 619
			transfer_state = 958
			transfer_state = 1964
			transfer_state = 2399
			load_oob = ETR_uprising
			declare_war_on = {
				target = XIN
				type = annex_everything
			}
			declare_war_on = {
				target = ILI
				type = annex_everything
			}
		}
		ILI = {
			transfer_state = 2430
			load_oob = ILI_uprising
			declare_war_on = {
				target = XIN
				type = annex_everything
			}
			declare_war_on = {
				target = ETR
				type = annex_everything
			}
		}
		XIN = {
			add_stability = 0.05
		}
		ILI = {
			change_tag_from = XIN
		}
	}
}

country_event = { # Uyghurs rise against the Border Adm! part 3
	id = xinjiang.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event xinjiang.3" }
	title = xinjiang.3.t
	desc = xinjiang.3.desc
	picture = GFX_report_event_QIN_steppe
	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = xinjiang.3.a
		ILI = {
			add_popularity = {
				ideology = communist_2
				popularity = -1 
			}
			add_popularity = {
				ideology = communist_3
				popularity = 0.17
			}
			add_stability = -0.05
			add_manpower = -50000
			add_war_support = 0.1
			retire_country_leader = yes
		}
	}

	option = {
		name = xinjiang.3.b
		ILI = {
			add_stability = 0.05
			add_war_support = 0.15
			add_popularity = {
				ideology = communist
				popularity = 0.25
			}
		}
	}

	option = {
		name = xinjiang.3.c
		ILI = {
			add_stability = 0.1
			add_war_support = 0.1
			add_popularity = {
				ideology = socialist
				popularity = 0.25
			}
			set_politics = {
				ruling_party = socialist
			}
			set_cosmetic_tag = ILI_SIX_XINJIANG
		}
	}
}