je_id_military_china = {
	icon = "gfx/interface/icons/event_icons/event_military.dds"

	is_shown_when_inactive = {
	overlord = {
	exists = c:MCH
	this = c:MCH
	}
						OR = {
				has_diplomatic_pact = { who = c:MCH type = id_buzhengshi }
				has_diplomatic_pact = { who = c:MCH type = id_zongdu } 
				has_diplomatic_pact = { who = c:MCH type = id_dujun }
				}
				
	}

	possible = {
	
			custom_tooltip = {
			text = je_id_military_china_tooltip
			hidden_trigger = {
			exists = c:MCH
	has_diplomatic_pact = { who = c:MCH type = id_buzhengshi }
			}
		}
			

	}

	complete = {
		NOT = { has_modifier = id_military_decrease}
		has_technology_researched = power_of_the_purse
	}

	fail = {
			OR = {
			custom_tooltip = {
			text = je_id_education_china_tooltip
			hidden_trigger = {
			exists = c:MCH
	has_diplomatic_pact = { who = c:MCH type = id_zongdu }
			}
		}
		
		is_subject = no
		AND = {
		exists = overlord
		overlord = {
		exists = c:MCH
	NOT = {this = c:MCH }
	}
	}
	
	
	}
	}

	on_complete = {
			custom_tooltip = je_id_military_china_tooltip_tt
		hidden_effect = {
		c:MCH = {
				create_diplomatic_pact = {
			country = ROOT
			type = id_zongdu
		}	
		}
		}
	}

	weight = 10000
	should_be_pinned_by_default = yes
}

je_id_education_china = {
	icon = "gfx/interface/icons/event_icons/event_trade.dds"

	is_shown_when_inactive = {
	exists = overlord
		overlord = {
		exists = c:MCH
	this = c:MCH
	}
						OR = {
				has_diplomatic_pact = { who = c:MCH type = id_buzhengshi }
				has_diplomatic_pact = { who = c:MCH type = id_zongdu } 
				has_diplomatic_pact = { who = c:MCH type = id_dujun }
				}
				
	}

	possible = {
				custom_tooltip = {
			text = je_id_education_china_tooltip
			hidden_trigger = {
			exists = c:MCH 
				has_diplomatic_pact = { who = c:MCH type = id_zongdu }
				
				}
				}
			

	}

	complete = {
		NOT = { has_modifier = id_linguistic_keju}
		OR = {
		has_technology_researched =realism
		has_modifier = id_nation_zhengyi
		}
	}

	fail = {
	OR = {
		is_subject = no
		AND = {
		exists = overlord
		overlord = {
		
	NOT = {this = c:MCH }
	}
	}
	
	
	}
	}

	on_complete = {
			custom_tooltip = je_id_education_china_tooltip_tt

		hidden_effect = {
		c:MCH = {
				create_diplomatic_pact = {
			country = ROOT
			type = id_dujun
		}	
		}
		}
	}

	weight = 10000
	should_be_pinned_by_default = yes
}

je_id_unify_china = {
	icon = "gfx/interface/icons/event_icons/event_protest.dds"

	is_shown_when_inactive = {
	country_has_primary_culture = cu:han
					NOT = {	any_country = {
		has_modifier = id_nation_shouyi
		
		}
		}
		overlord = {
		exists = c:MCH
	this = c:MCH
	}
						OR = {
						AND = {
						exists = c:LAN
						this = c:LAN
						}
				has_diplomatic_pact = { who = c:MCH type = id_buzhengshi }
				has_diplomatic_pact = { who = c:MCH type = id_zongdu } 
				has_diplomatic_pact = { who = c:MCH type = id_dujun }
				}
				
	}

	possible = {
				NOT = {	any_country = {
		has_modifier = id_nation_shouyi
		
		}
		}
								OR = {
								
											AND = {
						exists = c:LAN
						this = c:LAN
						c:LAN = {
						any_scope_state = { region = sr:region_indochina}
						}
						
						}
						custom_tooltip = {
			text = je_id_education_china_tooltip
			hidden_trigger = {
			exists = c:MCH
				has_diplomatic_pact = { who = c:MCH type = id_zongdu }
				
				}
				}
										custom_tooltip = {
			text = je_id_education_china_tooltip_tt
			hidden_trigger = {
			exists = c:MCH
				has_diplomatic_pact = { who = c:MCH type = id_dujun }
				
				}
				}
				}
		
	}

	complete = {

	OR = {
		has_technology_researched =	central_banking
		has_modifier = id_nation_zhengyi
		}
		has_technology_researched =	central_archives
		
		has_technology_researched = nationalism

			
			
NOT = {has_modifier = id_military_decrease}
NOT = {has_modifier = id_linguistic_keju}
OR = {
is_subject = no
				custom_tooltip = {
			text = je_id_unify_china_tooltip
			hidden_trigger = {
				has_diplomatic_pact = { who = c:MCH type = id_dujun }
				
				}
				}
				}
				

	}

	fail = {

				any_country = {
		has_modifier = id_nation_shouyi
		
		}

	}

	on_complete = {
			add_modifier = id_nation_shouyi	
			custom_tooltip = je_id_unify_china_tooltip_tt
			hidden_effect = {
			sr:region_manchuria = {
				every_scope_state = {
				
														this.state_region = {
														add_homeland = han
				add_claim = ROOT
			}
				
				}
			
			}		
			sr:region_south_china = {
						every_scope_state = {
				
														this.state_region = {
														add_homeland = han
				add_claim = ROOT
			}
				
				}
			
			}
						sr:region_north_china = {
						every_scope_state = {
			
														this.state_region = {
															add_homeland = han
				add_claim = ROOT
			}
				
				}
			
			}
									sr:region_himalayas = {
						every_scope_state = {
			
														this.state_region = {
															add_homeland = han
				add_claim = ROOT
			}
				
				}
			
			}	
				
		c:MCH = {
		every_subject_or_below = {
		limit = {
						OR = {
				has_diplomatic_pact = { who = c:MCH type = vassal }
				has_diplomatic_pact = { who = c:MCH type = id_buzhengshi }
				has_diplomatic_pact = { who = c:MCH type = id_zongdu } 
				has_diplomatic_pact = { who = c:MCH type = id_dujun }
				}
		}
		ROOT = {
				create_diplomatic_pact = {
			country = PREV
			type = vassal
		}	
		}
		}
		
		}
		}
					if = {
			limit = { has_law = law_type:law_theocracy
			year > 1911
			}
			activate_law = law_type:law_presidential_republic
			}
								if = {
			limit = { has_law = law_type:law_theocracy
			year < 1911
			}
			activate_law = law_type:law_monarchy
			}
	}

	weight = 10000
	should_be_pinned_by_default = yes
}
