# China

#########################################################################
#  The Opium Trade
#########################################################################
event = {
	id = 12500
	random = no
	persistent = yes
	country = CHI

	picture	= opiumwar

	trigger = {
		random = 2
		NOT = { flag = { name = flg_Opium_Stop value = 1 } }
	}

	name = "EVT_6938_NAME"
	desc = "EVT_12500_DESC"
	style = 0

	date = { day = 2 month = january year = 1836 }
	offset = 31
	deathdate = { day = 30 month = december year = 1910 }

	action_a = {
		name = "ACTIONNAME12500A" # The British are at Fault here
		command = { type = gain_building which = -1 value = immoral_business }
		command = { type = treasury value = -500 }
		command = { type = relation which = ENG value = -50 }
		command = { type = trigger which = 6938 } # ENG
	}
}

#########################################################################
#  Lin Zexu
#########################################################################
event = {
	id = 12501
	random = no
	country = CHI

	name = "EVT_12501_NAME"
	desc = "EVT_12501_DESC"
	style = 0

	date = { day = 10 month = december year = 1838 }

	action_a = {
		name = "ACTIONNAME12501A" # Order him to Eliminate the Trade
		command = { type = setflag which = flg_Lin value = 1 }
	}
	action_b = {
		name = "ACTIONNAME12501B" # Appoint the Manchu Qishan instead
		command = { type = setflag which = flg_Qishan value = 1 }
	}
	action_c = {
		name = "ACTIONNAME12501C" # Appoint the Manchu Qiying instead
		command = { type = setflag which = flg_Qiying value = 1 }
	}
}

#########################################################################
#  High Commissioner Corrupted!
#########################################################################
event = {
	id = 12502
	random = no
	persistent = no
	country = CHI

	trigger = {
		OR = {
			flag = { name = flg_Qishan value = 1 }
			flag = { name = flg_Qiying value = 1 }
		}
	}

	name = "EVT_12502_NAME"
	desc = "EVT_12502_DESC"
	style = 0

	date = { day = 2 month = january year = 1839 }

	action_a = {
		name = "ACTIONNAME12502A" # Curses!
		command = { type = gain_building which = -1 value = immoral_business }
		command = { type = treasury value = -500 }
		command = { type = relation which = ENG value = -50 }
		command = { type = trigger which = 6938 } # ENG
	}
}

#########################################################################
#  Commissioner Lin begins his work
#########################################################################
event = {
	id = 12503
	random = no
	persistent = no
	country = CHI

	trigger = {
		flag = { name = flg_Lin value = 1 }
	}

	name = "EVT_12503_NAME"
	desc = "EVT_12503_DESC"
	style = 0

	date = { day = 3 month = june year = 1839 }

	action_a = {
		name = "ACTIONNAME12503A" # Send a Letter of Congratulations to Commissioner Lin
		command = { type = remove_corruption which = -1 }
		command = { type = trigger which = 6939 } # ENG
	}
}

#########################################################################
#  The Opium Trade has been Eliminated
#########################################################################
event = {
	id = 12504
	random = no
	persistent = no
	country = CHI

	# Triggered by ENG 6939 b

	name = "EVT_12504_NAME"
	desc = "EVT_12504_DESC"
	style = 0

	action_a = {
		name = "GREAT"
		command = { type = setflag which = flg_Opium_Stop value = 1 }
	}
}

#########################################################################
#  Murder at Guangzhou
#########################################################################
event = {
	id = 12505
	random = no
	persistent = no
	country = CHI

	# Triggered by ENG 6940

	name = "EVT_6940_NAME"
	desc = "EVT_12505_DESC"
	style = 0

	action_a = {
		name = "ACTIONNAME12505A" # We are at war with Britain
		command = { }
	}
}

#########################################################################
#  The Convention of Chuanbi
#########################################################################
event = {
	id = 12506
	random = no
	persistent = no
	country = CHI

	trigger = {
		event = 12505
		war = { country = ENG country = CHI }
		control = { province = 2019 data = ENG }
		control = { province = 2017 data = ENG }
		owned = { province = 2019 data = CHI }
		owned = { province = 2017 data = CHI }
	}

	name = "EVT_6941_NAME"
	desc = "EVT_12506_DESC"
	style = 0

	date = { day = 7 month = july year = 1839 }
	offset = 7
	deathdate = { day = 30 month = december year = 1863 }

	action_a = {
		name = "ACTIONNAME12506A" # Sentence Qishan to death! The war is still on!
		command = { type = secedeprovince which = ENG value = 2017 } # Hong Kong
		command = { type = trigger which = 6941 } # ENG
	}
}

#########################################################################
#  The Treaty of Nanjing (rework by OHgamer Nov 2005)
#########################################################################
event = {
	id = 12507
	random = no
	persistent = no
	country = CHI

	trigger = {
		event = 12506 #British must secure Hong Kong
		war = { country = ENG country = CHI }
		occupied = { country = CHI data = 12 } #approx 18 provinces
	}

	name = "EVT_12507_NAME"
	desc = "EVT_12507_DESC"
	style = 0

	date = { day = 8 month = july year = 1839 }
	offset = 15
	deathdate = { day = 30 month = december year = 1850 }

	action_a = {
		name = "ACTIONNAME7223A" #Make Offer
		command = { type = setflag which = flg_Opium_War_Lost value = 1 }
		command = { type = prestige value = -100 }
		command = { type = treasury value = -1000 }
		command = { type = trigger which = 6949 } # ENG
	}
	action_b = {
		name = "ACTIONNAME12703B" #Reject
		command = { type = setflag which = flg_Opium_War_Lost value = 1 }
		command = { type = prestige value = 20 }
	}
}


#########################################################################
#  The Treaty of Wanghia
#########################################################################
event = {
	id = 12508
	random = no
	persistent = no
	country = CHI

	trigger = {
		event = 12507
	}

	name = "EVT_12508_NAME"
	desc = "EVT_12508_DESC"
	style = 0

	date = { day = 14 month = july year = 1839 }
	offset = 7
	deathdate = { day = 30 month = january year = 1851 }

	action_a = {
		name = "ARGH"
		command = { type = prestige value = -50 }
	}
}

#########################################################################
#  The Treaty of Huangpu
#########################################################################
event = {
	id = 12509
	random = no
	persistent = no
	country = CHI

	trigger = {
		event = 12508
	}

	name = "EVT_12509_NAME"
	desc = "EVT_12509_DESC"
	style = 0

	date = { day = 14 month = july year = 1840 }
	offset = 31
	deathdate = { day = 30 month = december year = 1851 }

	action_a = {
		name = "ACTIONNAME12509A" # Grumble...
		command = { type = prestige value = -50 }
		command = { type = treasury value = -500 }
	}
	action_b = {
		name = "ACTIONNAME12509B" # Refuse to sign the treaty! We are fed up!
		command = { type = setflag which = flg_Huangpu_Refused value = 1 }
		command = { type = prestige value = 30 }
		command = { type = relation which = FRA value = -100 }
	}
}


#########################################################################
#  Further Treaties of Humiliation
#########################################################################
event = {
	id = 12510
	random = no
	persistent = no
	country = CHI

	trigger = {
		event = 12509
		NOT = { flag = { name = flg_Huangpu_Refused value = 1 } }
	}

	name = "EVT_12510_NAME"
	desc = "EVT_12510_DESC"
	style = 0

	date = { day = 1 month = july year = 1846 }
	offset = 60
	deathdate = { day = 30 month = december year = 1860 }

	action_a = {
		name = "ARGH"
		command = { type = prestige value = -50 }
		command = { type = treasury value = -500 }
	}
}
#########################################################################
#  The Yellow River Floods
#########################################################################
event = {
	id = 12511
	random = no
	persistent = no
	country = CHI

	trigger = {
		random = 15
	}

	name = "EVT_12511_NAME"
	desc = "EVT_12511_DESC"
	style = 0

	date = { day = 1 month = january year = 1851 }
	offset = 30
	deathdate = { day = 30 month = december year = 1851 }

	action_a = {
		name = "ACTIONNAME12511A" # We are losing the Mandate!
		command = { type = treasury value = -500 }
		command = { type = revolt where = 1554 }
		command = { type = revolt where = 1559 }
		command = { type = revolt where = 1571 }
		command = { type = pop_militancy which = 100 value = 2 where = 1571 }
		command = {	type = add_pop which = beifaren value = -2 where = 1554 }
		command = {	type = add_pop which = beifaren value = -2 where = 1559 }
		command = {	type = add_pop which = beifaren value = -2 where = 1571 }
	}
}
#########################################################################
#  Mandate of Heaven Lost!
#########################################################################
event = {
	id = 12512
	random = no
	persistent = no
	country = CHI

	trigger	= {
		event = 12511
		flag = { name = flg_Opium_War_Lost value = 1 }
		NOT = {
			prestige = 300
		}
	}

	name = "EVT_12512_NAME"
	desc = "EVT_12512_DESC"
	style = 0

	date = { day = 2 month = january year = 1851 }
	offset = 60
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12512A" # Crush the Rebellion!
		command = { type = pop_militancy which = capitalists value = 1 }
		command = { type = pop_militancy which = clerks value = 1 }
		command = { type = pop_militancy which = craftsmen value = 1 }
		command = { type = pop_militancy which = soldiers value = 1 }
		command = { type = pop_militancy which = farmers value = 1 }
		command = { type = pop_militancy which = labourers value = 1 }
		command = { type = trigger which = 12514 }
	}
}
#########################################################################
#  Hong Xiuquan Inaugurates the Taiping Kingdom
#########################################################################
event = {
	id = 12513
	random = no
	persistent = no
	country = CHI

	trigger	= {
		event = 12509
		event = 12512
		NOT = { flag = { name = flg_Huangpu_Refused value = 1 } }
	}

	name = "EVT_12513_NAME"
	desc = "EVT_12513_DESC"
	style = 0

	date = { day = 21 month = february year = 1851 }
	offset = 60
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12512A" # Crush the rebellion!
		command = { type = prestige value = -50 }
		command = { type = revolt where = 1996 }
		command = { type = revolt where = 1996 }
		command = { type = revolt where = 2013 }
		command = { type = revolt where = 2013 }
		command = { type = revolt where = 2014 }
		command = { type = revolt where = 2014 }
		command = { type = revolt where = 2015 }
		command = { type = revolt where = 2015 }
		command = { type = revolt where = 2028 }
		command = { type = revolt where = 2028 }
		command = { type = pop_militancy which = capitalists value = 8 where = 2013 }
		command = { type = pop_militancy which = clerks value = 8 where = 2013 }
		command = { type = pop_militancy which = craftsmen value = 8 where = 2013 }
		command = { type = pop_militancy which = soldiers value = 8 where = 2013 }
		command = { type = pop_militancy which = farmers value = 8 where = 2013 }
		command = { type = pop_militancy which = labourers value = 8 where = 2013 }
		command = { type = pop_militancy which = capitalists value = 8 where = 1996 }
		command = { type = pop_militancy which = clerks value = 8 where = 1996 }
		command = { type = pop_militancy which = craftsmen value = 8 where = 1996 }
		command = { type = pop_militancy which = soldiers value = 8 where = 1996 }
		command = { type = pop_militancy which = farmers value = 8 where = 1996 }
		command = { type = pop_militancy which = labourers value = 8 where = 1996 }
	}
}
#########################################################################
#  The Uighur Revolts
#########################################################################
event = {
	id = 12514
	random = no
	persistent = no
	country = CHI

	name = "EVT_12514_NAME"
	desc = "EVT_12514_DESC"
	style = 0

	action_a = {
		name = "ACTIONNAME12514A" # We are busy - ask the Russians for help
		command = { type = access which = RUS }
		command = { type = trigger which = 2514 } # RUS
		command = { type = revolt where = 1492 }
		command = { type = revolt where = 1094 }
		command = { type = revolt where = 1507 }
		command = { type = revolt where = 1087 }
		command = { type = pop_militancy which = sunni value = 4 where = 1089 }
		command = { type = pop_militancy which = shiite value = 4 where = 1089 }
	}
	action_b = {
		name = "ACTIONNAME12512A" # Crush the rebellion!
		command = { type = revolt where = 1491 }
		command = { type = revolt where = 1492 }
		command = { type = revolt where = 1089 }
		command = { type = revolt where = 1094 }
		command = { type = revolt where = 1096 }
		command = { type = revolt where = 1507 }
		command = { type = revolt where = 1087 }
		command = { type = pop_militancy which = sunni value = 8 where = 1089 }
		command = { type = pop_militancy which = shiite value = 8 where = 1089 }
	}
}
#########################################################################
#  The Arrow Incident
#########################################################################
event = {
	id = 12515
	random = no
	persistent = no
	country = CHI

	# Triggered by ENG 6943

	name = "EVT_12515_NAME"
	desc = "EVT_6943_DESC"
	style = 0

	action_a = {
		name = "ARGH"
		command = { }
	}
}
#########################################################################
#  The Treaties of Beijing
#########################################################################
event = {
	id = 12516
	random = no
	country = CHI

	trigger = {
		OR = {
			AND = {
				event = 12515
				NOT = {
					war = { country = ENG country = CHI }
				}
				won_war = { country = ENG country = CHI }
			}
			AND = {
				flag = { name = flg_French_Arrow value = 1 }
				NOT = {
					war = { country = FRA country = CHI }
				}
				won_war = { country = FRA country = CHI }
			}
		}
	}

	name = "EVT_12516_NAME"
	desc = "EVT_12516_DESC"
	style = 0

	date = { day = 1 month = january year = 1856 }
	offset = 31
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12516A" # Blast!
		command = { type = setflag which = flg_Arrow_War_Lost value = 1 }
		command = { type = prestige value = -100 }
		command = { type = trigger which = 12500 }
	}
}
#########################################################################
#  The Treaty of Aigun
#########################################################################
event = {
	id = 12517
	random = no
	country = CHI

	trigger = {
		OR = {
		event = 12516 #Treaty of Beijing after 2nd Opium war
		event = 12561 #Treaty of Beijing after 2nd Opium war
		won_war = { country = RUS country = CHI }
		}
		OR = {
		owned = { province = 495 data = CHI }
		owned = { province = 1107 data = CHI }
		owned = { province = 1116 data = CHI }
		owned = { province = 1117 data = CHI }
		owned = { province = 1118 data = CHI }
		}
		NOT = {
			war = { country = RUS country = CHI }
		}
	}

	name = "EVT_12517_NAME"
	desc = "EVT_12517_DESC"
	style = 0

	date = { day = 2 month = january year = 1836 }
	offset = 31
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ARGH"
		command = { type = secedestate which = RUS value = 491 when = 0 } # Sakhalin
		command = { type = secedeprovince  which = RUS  value = 495 } #Amur-ussuri basin
		command = { type = secedeprovince  which = RUS  value = 1107 }
		command = { type = secedeprovince  which = RUS  value = 1116 }
		command = { type = secedeprovince  which = RUS  value = 1117 }
		command = { type = secedeprovince  which = RUS  value = 1118 }
		command = { type = secedestate which = RUS value = 1088 when = 0 } #ili
	}
}
#########################################################################
#  The Self-Strengthening Movement
#########################################################################
event = {
	id = 12518
	random = no
	country = CHI

	trigger = {
		flag = { name = flg_Arrow_War_Lost value = 1 }
	}

	name = "EVT_12518_NAME"
	desc = "EVT_12518_DESC"
	style = 0

	date = { day = 25 month = january year = 1856 }
	offset = 31
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12518A" # Graft Chinese ways onto the Western system
		ai_chance = 50
		command = { type = pop_militancy which = 100 value = 1 }
		command = { type = setflag which = flg_Self_Strength value = 1 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = prestige value = 50 }
	}
	action_b = {
		name = "ACTIONNAME12518B" # Learn all we can from the Round-eyed Devils!
		ai_chance = 25
		command = { type = setflag which = flg_Self_Strength value = 1 }
		command = { type = pop_militancy which = 100 value = 2 }
		command = { type = pop_militancy which = aristocrats value = 2 }
		command = { type = pop_militancy which = officers value = 2 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = prestige value = 100 }
	}
	action_c = {
		name = "ACTIONNAME12518C" # The Round-eyed Devils are not to be Trusted
		ai_chance = 25
		command = { type = pop_dominant_issue which = 10 value = jingoism }
	}
}

#########################################################################
#  China Merchants' Steam Navigation Shipping Company
#########################################################################
event = {
	id = 12519
	random = no
	country = CHI

	trigger = {
		flag = { name = flg_Self_Strength value = 1 }
		random = 5
	}

	name = "EVT_12519_NAME"
	desc = "EVT_12519_DESC"
	style = 0

	date = { day = 2 month = january year = 1870 }
	offset = 31
	deathdate = { day = 30 month = december year = 1880 }

	action_a = {
		name = "ACTIONNAME12519A" # Continue the Modernization!
		command = { type = prestige value = 20 }
		command = { type = gain_tech which = 5301 }
		command = { type = gain_tech which = 5302 }
		command = { type = gain_building which = 1600 value = steamer_shipyard } # Shanghai
		command = { type = railroad which = 1600 value = 1 }
		command = { type = railroad which = 1552 value = 1 }
		command = { type = railroad which = 1554 value = 1 }
		command = { type = railroad which = 1555 value = 1 }
		command = { type = railroad which = 1597 value = 1 }
		command = { type = railroad which = 1526 value = 1 }
		command = { type = railroad which = 1598 value = 1 }
		command = { type = railroad which = 1599 value = 1 }
		command = { type = railroad which = 1601 value = 1 }
	}
}

#########################################################################
#  Beginning of the Reform Edicts
#########################################################################
event = {
	id = 12520
	random = no
	country = CHI

	trigger = {
		flag = { name = flg_Self_Strength value = 1 }
	}

	name = "EVT_12520_NAME"
	desc = "EVT_12520_DESC"
	style = 0

	date = { day = 29 month = june year = 1898 }

	action_a = {
		name = "ACTIONNAME12520A" # Carry out the Reforms
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
		command = { type = gain_tech which = -1 }
	}
	action_b = {
		name = "ACTIONNAME12520B" # Imprison Kang Youwei
		command = { type = pop_militancy which = aristocrats value = -2 }
		command = { type = pop_militancy which = officers value = -2 }
		command = { type = setflag which = flg_Self_Strength value = 0 }
		command = { type = civilized value = no }
	}
}

#########################################################################
#  Empress Dowager Cixi's Rise to Power
#########################################################################
event = {
	id = 12521
	random = no
	country = CHI

	trigger = {
		flag = { name = flg_Self_Strength value = 1 }
		constitution = { country = CHI type = monarchy }
	}

	name = "EVT_12521_NAME"
	desc = "EVT_12521_DESC"
	style = 0

	date = { day = 23 month = august year = 1861 }
	offset = 31
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12521A" # That's nice
		command = { type = pop_militancy which = aristocrats value = -2 }
		command = { type = pop_militancy which = officers value = -2 }
		command = { type = pop_militancy which = clergymen value = -2 }
		command = { type = setflag which = flg_Cixi_Rise value = 1 }
	}
	action_b = {
		name = "ACTIONNAME12521B" # No wait! Make Prince Gong Regent!
		command = { type = pop_militancy which = aristocrats value = 1 }
		command = { type = pop_militancy which = officers value = 1 }
		command = { type = pop_militancy which = clergymen value = 1 }
	}
}
#########################################################################
#  The Sino-American Treaty
#########################################################################
event = {
	id = 12522
	random = no
	country = CHI

	trigger = {
		won_war = { country = USA country = CHI }
		NOT = {
			war = { country = USA country = CHI }
		}
		flag = { name = flg_Arrow_War_Lost value = 1 }
	}

	name = "EVT_12522_NAME"
	desc = "EVT_12522_DESC"
	style = 0

	date = { day = 2 month = january year = 1844 }
	offset = 31
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12522A" #  Massive Emigration
		command = { type = trigger which = 14194 } # USA
		command = { type = relation which = USA value = 50 } # USA
		command = {	type = add_pop which = farmers value = -1 where = -1 }
		command = {	type = add_pop which = farmers value = -1 where = -1 }
		command = {	type = add_pop which = farmers value = -1 where = -1 }
		command = {	type = add_pop which = farmers value = -1 where = -1 }
		command = {	type = add_pop which = farmers value = -1 where = -1 }
		command = {	type = add_pop which = farmers value = -1 where = -1 }
		command = {	type = add_pop which = farmers value = -1 where = -1 }
		command = {	type = add_pop which = farmers value = -1 where = -1 }
	}
}

#########################################################################
#  The Hundred Days' Reform
#########################################################################
event = {
	id = 12523
	random = no
	country = CHI

	trigger = {
		event = 12520
		flag = { name = flg_Cixi_Rise value = 1 }
		constitution = { country = CHI type = monarchy }
	}

	name = "EVT_12523_NAME"
	desc = "EVT_12523_DESC"
	style = 0

	date = { day = 1 month = september year = 1898 }

	action_a = {
		name = "ACTIONNAME12523A" # The Emperor has Spoken
		command = { type = maximum_workhours which = 14 }
		command = { type = minimum_wages which = low }
		command = { type = safety_regulations which = low }
		command = { type = health_care which = low }
		command = { type = unemployment_subsidies which = trinkets }
		command = { type = pension_funds which = trinkets }
	}
}

#########################################################################
#  Cixi Seizes Guang Xu in Coup d'Etat! (Uncivilized China)
#########################################################################
event = {
	id = 12524
	random = no
	country = CHI

	trigger = {
		civilized = no
		event = 12523
		flag = { name = flg_Opium_War_Lost value = 1 }
	}

	name = "EVT_12524_NAME"
	desc = "EVT_12524_DESC"
	style = 0

	date = { day = 10 month = january year = 1899 }

	action_a = {
		name = "ACTIONNAME12524A" # This Party is Over
		command = { type = setflag which = flg_Self_Strength value = 0 }
		command = { type = prestige value = -25 }
		command = { type = pop_militancy which = liberal value = 3 }
		command = { type = pop_militancy which = socialist value = 3 }
		command = { type = relation which = ENG value = -25 }  
		command = { type = relation which = USA value = -25 }  
		command = { type = relation which = FRA value = -25 }  
		command = { type = sleepevent which = 12562 } #Civilized version   
	}
	action_b = {
		name = "ACTIONNAME12524B" # Unacceptable!
		command = { type = prestige value = 10 }
		command = { type = army_revolt which = 1104 value = 40 }	
		command = { type = army_revolt which = 1603 value = 40 }	
		command = { type = army_revolt which = 1607 value = 40 }	
		command = { type = army_revolt which = 1570 value = 40 }	
		command = { type = army_revolt which = 1564 value = 40 }	
		command = { type = army_revolt which = 1578 value = 40 }	
		command = { type = army_revolt which = 1544 value = 40 }	
		command = { type = army_revolt which = 1563 value = 40 }	
		command = { type = army_revolt which = 1598 value = 40 }	
		command = { type = army_revolt which = 2015 value = 40 }	
		command = { type = army_revolt which = 2016 value = 40 }	
		command = { type = army_revolt which = 1531 value = 40 }	
		command = { type = army_revolt which = 1561 value = 40 }	
		command = { type = army_revolt which = 1594 value = 40 }	
		command = { type = army_revolt which = 1575 value = 40 }	
		command = { type = army_revolt which = 1545 value = 40 }	
		command = { type = army_revolt which = 1114 value = 40 }	
		command = { type = army_revolt which = 1537 value = 40 }	
		command = { type = army_revolt which = 1955 value = 40 }	
		command = { type = pop_militancy which = conservative value = 2 }
		command = { type = pop_militancy which = reactionary value = 2 }
		command = { type = relation which = RUS value = -25 }  
		command = { type = sleepevent which = 12562 } #Civilized version   
		}
}

#########################################################################
#  The Boxer Rebellion
#########################################################################
event = {
	id = 12525
	random = no
	country = CHI

	trigger = {
		OR = {
			event = 12524
			AND = {
				flag = { name = flg_Opium_War_Lost value = 1 }
				NOT = {
					prestige = 300
				}
			}
		}
	}

	name = "EVT_1527_NAME"
	desc = "EVT_12525_DESC"
	style = 0

	date = { day = 1 month = january year = 1900 }

	action_a = {
		name = "ACTIONNAME12525A" # Issue an ambiguous edict
		command = { type = trigger which = 1527 } # AUS
		command = { type = trigger which = 4638 } # PRU
		command = { type = trigger which = 7239 } # FRA
		command = { type = trigger which = 2511 } # RUS
		command = { type = trigger which = 3007 } # GER
		command = { type = trigger which = 12612 } # NIP
		command = { type = trigger which = 14195 } # USA
		command = { type = trigger which = 14246 } # CSA
		command = { type = trigger which = 6932 } # ENG
		command = { type = revolt where = 1552 }
		command = { type = revolt where = 1553 }
		command = { type = revolt where = 1574 }
		command = { type = pop_militancy which = 100 value = 2 where = 1596 }
		command = { type = pop_militancy which = 100 value = 2 where = 1552 }
	}
	action_b = {
		name = "ACTIONNAME12525B" # Issue a Pro-Boxer edict
		command = { type = trigger which = 1528 } # AUS
		command = { type = trigger which = 4639 } # PRU
		command = { type = trigger which = 7248 } # FRA
		command = { type = trigger which = 2515 } # RUS
		command = { type = trigger which = 3008 } # GER
		command = { type = trigger which = 12613 } # NIP
		command = { type = trigger which = 14196 } # USA
		command = { type = trigger which = 14247 } # CSA
		command = { type = trigger which = 6944 } # ENG
	}
	action_c = {
		name = "ACTIONNAME12525C" # Issue an Anti-Boxer edict
		command = { type = revolt where = 1552 }
		command = { type = revolt where = 1553 }
		command = { type = revolt where = 1574 }
		command = { type = revolt where = 1554 }
		command = { type = revolt where = 1555 }
		command = { type = revolt where = 1556 }
		command = { type = revolt where = 1594 }
		command = { type = revolt where = 1595 }
		command = { type = revolt where = 1596 }
		command = { type = revolt where = 1597 }
		command = { type = pop_militancy which = 100 value = 1 }
		command = { type = pop_militancy which = 100 value = 5 where = 1596 }
		command = { type = pop_militancy which = 100 value = 5 where = 1552 }
	}
}

#########################################################################
#  Self-Strengthening Modernizations
#########################################################################
event = {
	id = 12526
	random = no
	persistent = yes
	country = CHI

	trigger = {
		civilized = no
		random = 1
		flag = { name = flg_Self_Strength value = 1 }
	}

	name = "EVT_12526_NAME"
	desc = "EVT_12526_DESC"
	style = 0

	date = { day = 1 month = january year = 1851 }
	offset = 30
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "GREAT" #
		command = { type = gain_building which = -1 value = -2 } # A random factory
		command = { type = railroad which = -1 value = 1 } # Some railroads
		command = { type = railroad which = -1 value = 1 }
		command = { type = gain_tech which = -1 } # A random tech
	}
}

#########################################################################
#  The Chinese Revolution
#########################################################################
event = {
	id = 12527
	random = no
	country = CHI

	trigger = {
		random = 2
		NOT = {
			prestige = 300
			flag = { name = flg_Yuan_Shikai value = 1 } #To prevent event firing in '14
		}
		constitution = { type = monarchy }
	}

	name = "EVT_12527_NAME"
	desc = "EVT_12527_DESC"
	style = 0

	date = { day = 2 month = january year = 1905 }
	offset = 31
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12527A" # Bye-bye Mandate!
		command = { type = army_revolt which = 1569 value = 100 }
		command = { type = army_revolt which = 1566 value = 50 }
		command = { type = army_revolt which = 1565 value = 50 }
		command = { type = revolt where = 1565 }
		command = { type = revolt where = 1566 }
		command = { type = revolt where = 1569 }
		command = { type = revolt where = 1578 }
		command = { type = revolt where = 1568 }
		command = { type = revolt where = -1 }
		command = { type = revolt where = -1 }
	}
}

#########################################################################
#  The Son of Heaven Abdicates!
#########################################################################
event = {
	id = 12528
	random = no
	country = CHI
	picture = republic

	trigger = {
		event = 12527
		control = { province = 1554 data = REB }
	}

	name = "EVT_12528_NAME"
	desc = "EVT_12528_DESC"
	style = 0

	date = { day = 4 month = january year = 1905 }
	offset = 31
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ARGH" # Mandate passes to the Republic
		command = { type = flagname which = "1914" }
		command = { type = constitution which = democracy }
		command = { type = executive_designation which = parliamentarism }
		command = { type = party_system which = multi_party }
		command = { type = national_value which = liberty }
		command = { type = force_ruling_party which = liberal }
		command = { type = add_countryculture  which = nanfaren } #adds the cultures china has in '14 scenario
		command = { type = add_countryculture  which = hakka }
		command = { type = add_countryculture  which = buyi }
		command = { type = add_countryculture  which = yi }
		command = { type = add_countryculture  which = asian_minor }
		command = { type = add_countryculture  which = min }
		command = { type = add_countryculture  which = huizhou }
		command = { type = add_countryculture  which = tungus }
	}
}

#########################################################################
#  Sun Yixian Abdicates to Yuan Shikai
#########################################################################
event = {
	id = 12529
	random = no
	country = CHI

	trigger = {
		OR = {
			constitution = { type = constitutional_monarchy }
			constitution = { type = democracy }
		}
	}

	name = "EVT_12529_NAME"
	desc = "EVT_12529_DESC"
	style = 0

	date = { day = 20 month = january year = 1905 }
	offset = 31
	deathdate = { day = 30 month = december year = 1914 }

	action_a = {
		name = "ACTIONNAME12529A" # Long Live the Republic!
		command = { type = pop_militancy which = 100 value = -1 }
		command = { type = setflag which = flg_Yuan_Shikai value = 1 }
	}
	action_b = {
		name = "ACTIONNAME12529B" # Sun shall stay president!
		command = { type = pop_militancy which = 100 value = -2 } # In the South
		command = { type = pop_militancy which = 100 value = 2 } # In the North
	}
}

#########################################################################
#  The KMT and Yuan Shikai
#########################################################################
event = {
	id = 12530
	random = no
	country = CHI

	trigger = {
		flag = { name = flg_Yuan_Shikai value = 1 }
		random = 5
	}

	name = "EVT_12530_NAME"
	desc = "EVT_12530_DESC"
	style = 0

	date = { day = 1 month = january year = 1908 }
	offset = 5
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12530A" # Inaugurate the Hongxian era
		command = { type = flagname which = "3" }
		command = { type = constitution which = monarchy }
		command = { type = executive_designation which = laws_by_decree }
		command = { type = party_system which = two_party }
		command = { type = national_value which = order }
		command = { type = force_ruling_party which = reactionary }
	}
}

#########################################################################
#  Japan Claims Liu Chiu
#########################################################################
event = {
	id = 12531
	random = no
	country = CHI

	# Triggered by NIP 12623

	name = "EVT_12531_NAME"
	desc = "EVT_12531_DESC"
	style = 0

	action_a = {
		name = "ACTIONNAME12531A" # Ignore the Japanese Claim
		command = { type = relation  which = NIP  value = -20 } 
		command = { type = trigger which = 12625 } # NIP
	}
	action_b = {
		name = "ACTIONNAME12531B" # Accept the Japanese Claim
		command = { type = secedestate which = NIP value = 2043 when = 0 }
		command = { type = prestige value = 10 }
		command = { type = relation  which = NIP  value = 100 } 
		command = { type = trigger which = 12624 } # NIP
	}
	action_c = {
		name = "ACTIONNAME12531C" # Bind the Liu Chiu islands to China
		#command = { type = construct which = trade_post where = 1631 }
		command = { type = prestige value = 20 }
		command = { type = relation  which = NIP  value = -100 } 
		command = { type = trigger which = 12625 } # NIP
	}
}

#########################################################################
#  Japanese Demand Compensation
#########################################################################
event = {
	id = 12532
	random = no
	country = CHI

	# Triggered by NIP 12626

	name = "EVT_12532_NAME"
	desc = "EVT_12532_DESC"
	style = 0

	action_a = {
		name = "ACTIONNAME12532A" # Japan may Punish those Responsible
		command = { type = prestige value = 5 }
		command = { type = secedestate which = NIP value = 2043 when = 0 }
		command = { type = relation  which = NIP  value = 20 } 
		command = { type = trigger which = 12627 }
	}
	action_b = {
		name = "ACTIONNAME12532B" # Compensate the Families and Recognise the Japanese Claims
		command = { type = secedestate which = NIP value = 2043 when = 0 }
		command = { type = treasury value = -1000 }
		command = { type = prestige value = -10 }
		command = { type = relation  which = NIP  value = 100 } 
		command = { type = trigger which = 12629 }
	}
	action_c = {
		name = "ACTIONNAME12532C" # Refuse to Recognise Japanese Claims over Liu Chiu
		command = { type = prestige value = 10 }
		command = { type = relation  which = NIP  value = -100 } 
		command = { type = trigger which = 12630 }
	}
}

#########################################################################
#  Korea asks for help
#########################################################################
event = {
	id = 12533
	random = no
	country = CHI

	# Triggered by KOR 12709

	name = "EVT_12533_NAME"
	desc = "EVT_12533_DESC"
	style = 0

	action_a = {
		name = "ACTIONNAME12533A" # Very well
		command = { type = alliance which = KOR }
		command = { type = war which = NIP }
		command = { type = prestige value = 10 }
	}
	action_b = {
		name = "REFUSE" # Refuse
		command = { type = trigger which = 12710 }
	}
}

##event 12559 removed - reduced tariffs no longer there

#########################################################################
#  AI-AI Treaty Of Nanjing (by OHGamer 10/05)
#########################################################################
event = {
	id = 12560
	random = no
	country = CHI

	trigger = {
		ai = yes
		exists = ENG
		ai = ENG
		event = 12506 #British AI must secure Hong Kong
		war = { country = ENG country = CHI }
		occupied = { country = CHI data = 5 } #approx 8 provinces
	}

	name = "EVT_12507_NAME"
	desc = "EVT_12507_DESC"
	style = 0

	date = { day = 7 month = july year = 1839 }
	offset = 7
	deathdate = { day = 30 month = december year = 1850 }

	action_a = {
		name = "OK" 
		command = { type = peace  which = ENG value = 0 } 
		command = { type = setflag which = flg_Opium_War_Lost value = 1 }
		command = { type = prestige value = -100 }
		command = { type = sleepevent which = 12507 } #the other Treaty of Nanjing event   
	}
}

#########################################################################
#  The Treaties of Beijing - AI version (by OHGamer 12/05)
#########################################################################
event = {
	id = 12561
	random = no
	country = CHI

	trigger = {
		ai = yes
		exists = ENG
		exists = FRA
		ai = ENG
		ai = FRA
		occupied = { country = CHI data = 8 } #approx 12 provinces
		OR = {
			AND = {
				event = 12515
				war = { country = ENG country = CHI }
			}
			AND = {
				flag = { name = flg_French_Arrow value = 1 }
				war = { country = FRA country = CHI }
			}
		}
	}

	name = "EVT_12516_NAME"
	desc = "EVT_12516_DESC"
	style = 0

	date = { day = 1 month = january year = 1856 }
	offset = 31
	deathdate = { day = 30 month = december year = 1920 }

	action_a = {
		name = "ACTIONNAME12516A" # Blast!
		command = { type = setflag which = flg_Arrow_War_Lost value = 1 }
		command = { type = peace  which = ENG value = 0 } 
		command = { type = peace  which = FRA value = 0 } 
		command = { type = prestige value = -100 }
		command = { type = trigger which = 12500 }
		command = { type = sleepevent which = 12516 } #the other Treaty of Beijing event   
	}
}

#########################################################################
#  Cixi Seizes Guang Xu in Coup d'Etat! (civilized China)
#########################################################################
event = {
	id = 12562
	random = no
	country = CHI

	trigger = {
		civilized = yes
		event = 12523
		flag = { name = flg_Opium_War_Lost value = 1 }
	}

	name = "EVT_12524_NAME"
	desc = "EVT_12524_DESC"
	style = 0

	date = { day = 10 month = january year = 1899 }

	action_a = {
		name = "ACTIONNAME12524A" # This Party is Over
		command = { type = civilized value = no }
		command = { type = setflag which = flg_Self_Strength value = 0 }
		command = { type = sleepevent which = 12524 } #uncivilized version   
	}
	action_b = {
		name = "ACTIONNAME12524B" # Unacceptable!
		command = { type = prestige value = 10 }
		command = { type = army_revolt which = 1104 value = 40 }	
		command = { type = army_revolt which = 1603 value = 40 }	
		command = { type = army_revolt which = 1607 value = 40 }	
		command = { type = army_revolt which = 1570 value = 40 }	
		command = { type = army_revolt which = 1564 value = 40 }	
		command = { type = army_revolt which = 1578 value = 40 }	
		command = { type = army_revolt which = 1544 value = 40 }	
		command = { type = army_revolt which = 1563 value = 40 }	
		command = { type = army_revolt which = 1598 value = 40 }	
		command = { type = army_revolt which = 2015 value = 40 }	
		command = { type = army_revolt which = 2016 value = 40 }	
		command = { type = army_revolt which = 1531 value = 40 }	
		command = { type = army_revolt which = 1561 value = 40 }	
		command = { type = army_revolt which = 1594 value = 40 }	
		command = { type = army_revolt which = 1575 value = 40 }	
		command = { type = army_revolt which = 1545 value = 40 }	
		command = { type = army_revolt which = 1114 value = 40 }	
		command = { type = army_revolt which = 1537 value = 40 }	
		command = { type = army_revolt which = 1955 value = 40 }	
		command = { type = pop_militancy which = conservative value = 2 }
		command = { type = pop_militancy which = reactionary value = 2 }
		command = { type = relation which = RUS value = -25 }  
		command = { type = sleepevent which = 12524 } #uncivilized version   
		}
}
 