add_namespace = JAP_tokugawa_shogunate

###### Victorian Tokugawa

# 1857 Japan Start Event
	country_event = {
		id = JAP_tokugawa_shogunate.1
		title = JAP_tokugawa_shogunate.1.t
		desc = { 
			trigger = { tag = TSH }
			text = JAP_tokugawa_shogunate.1.d_shogunate
		}
		desc = {
			trigger = { NOT = { tag = TSH } }
			text = JAP_tokugawa_shogunate.1.d_han
		}
		picture = GFX_report_event_jap_japan_map_1

		is_triggered_only = yes

		immediate = {
			hidden_effect = {
				if = {
					limit = { tag = TSH }
					add_ideas = TSH_spirit_vic_external_amity_treaty_negotiations
				}
				else_if = {
					limit = { is_subject_of = TSH }
					add_timed_idea = { idea = TSH_spirit_vic_external_amity_treaty_negotiations days = 555 }
				}
			} 
		}

		option = {
			name = JAP_tokugawa_shogunate.1.a
			trigger = { tag = TSH }
			add_political_power = -25

			activate_mission = TSH_decision_kanrin_mahru

			set_temp_variable = { eoanb_prestige_change = 1 }
			eoanb_change_prestige_score = yes
			hidden_effect = {
				news_event = { id = JAP_tokugawa_shogunate.2 days = 10 } # Cholera Outbreak Introduction
				news_event = { id = JAP_tokugawa_shogunate.50 days = 3 } # Bakumatsu Introduction
				country_event = { id = JAP_tokugawa_shogunate.26 days = 14 } # Sickness of Iesada
				country_event = { id = japan_daimyo_generic.5 days = 20 } # Han System Introduction
				# news_event = { id = JAP_tokugawa_shogunate.4 days = 17 } # Han System Introduction
			}
		}

		option = {
			name = JAP_tokugawa_shogunate.1.a
			trigger = { is_subject_of = TSH }
			add_political_power = -5
			hidden_effect = {
				news_event = { id = JAP_tokugawa_shogunate.2 days = 10 } # Cholera Outbreak Introduction
				news_event = { id = JAP_tokugawa_shogunate.50 days = 3 } # Bakumatsu Introduction
				country_event = { id = japan_daimyo_generic.5 days = 5 } # Han System Introduction
				# news_event = { id = JAP_tokugawa_shogunate.4 days = 17 } # Han System Introduction
			}
		}

		option = {
			name = JAP_tokugawa_shogunate.1.a
			trigger = { NOT = { tag = TSH is_subject_of = TSH } }
			add_political_power = -1
		}
	}
# Kokera
	# Cholera Outbreak of Japan 1857
		news_event = {
			id = JAP_tokugawa_shogunate.2
			title = JAP_tokugawa_shogunate.2.t
			desc = JAP_tokugawa_shogunate.2.d

			is_triggered_only = yes

			picture = GFX_news_event_generic_plague_victorian

			option = {
				name = JAP_tokugawa_shogunate.2.a
				trigger = { NOT = { OR = { tag = SAG tag = SAT } } }
				ai_chance = { base = 1 }
				set_country_flag = EOANBSYS_pandemics_cholera_flag
				EOANBSYS_pandemics_country_setup = yes
				hidden_effect = {
					if = {
						limit = { tag = TSH }
						country_event = { id = JAP_tokugawa_shogunate.3 days = 35 random_days = 20 }
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.2.b
				trigger = { OR = { tag = SAG tag = SAT } }
				ai_chance = { base = 1 }
				set_country_flag = EOANBSYS_pandemics_cholera_flag
				EOANBSYS_pandemics_country_setup = yes
				capital_scope = {
					add_manpower = -200
				}
			}
		}

	# Nagasaki Outbreak
		country_event = {
			id = JAP_tokugawa_shogunate.3
			title = JAP_tokugawa_shogunate.3.t
			desc = JAP_tokugawa_shogunate.3.d
			picture = GFX_report_event_generic_plague_victorian

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			immediate = {
				hidden_effect = {
					if = {
						limit = { tag = TSH }
						SAG = { country_event = JAP_tokugawa_shogunate.3 }
						SAT = { country_event = JAP_tokugawa_shogunate.3 }
					}
				}
			}

			# Quarantine the Port!
			option = {
				name = JAP_tokugawa_shogunate.3.a
				trigger = { tag = TSH }
				ai_chance = { base = 0 }
				1260 = { add_manpower = -380 }
				EOANBSYS_pandemics_progress_add_two = yes
				add_political_power = -10
				USA = { country_event = { id = JAP_tokugawa_shogunate.4 days = 7 } }
			}
			# Keep the Port Open
			option = {
				name = JAP_tokugawa_shogunate.3.b
				trigger = { tag = TSH }
				ai_chance = { base = 1 }
				1260 = { add_manpower = -380 }
				EOANBSYS_pandemics_progress_add_two = yes
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.6 days = 50 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.3.c
				trigger = { OR = { tag = SAG tag = SAT } }
				EOANBSYS_pandemics_progress_add_two = yes
			}
		}

	# USA Reaction to Quarantining of Port Nagasaki
		country_event = {
			id = JAP_tokugawa_shogunate.4
			title = JAP_tokugawa_shogunate.4.t
			desc = JAP_tokugawa_shogunate.4.d
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			# Demand they open the port
			option = {
				name = JAP_tokugawa_shogunate.4.a
				TSH = { country_event = { id = JAP_tokugawa_shogunate.5 days = 7 } }
			}
			# Let them quarantine the port
			option = {
				name = JAP_tokugawa_shogunate.4.b
			}
		}

	# United States Asks to Reopen Nagasaki
		country_event = {
			id = JAP_tokugawa_shogunate.5
			title = JAP_tokugawa_shogunate.5.t
			desc = JAP_tokugawa_shogunate.5.d
			picture = GFX_report_event_jap_japan_map_1

			is_triggered_only = yes

			# Open the Port
			option = {
				name = JAP_tokugawa_shogunate.5.a
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.6 days = 50 }
					EOANBSYS_pandemics_progress_minus_one = yes
				}
			}
			# Keep it Closed
			option = {
				name = JAP_tokugawa_shogunate.5.b
				EOANBSYS_pandemics_progress_add_one = yes
				reverse_add_opinion_modifier = { target = USA modifier = eoanb_minor_opinion_drop }
				# SEPARATECHAINHERE?
			}
		}

	# Nagasaki Worsens
		country_event = {
			id = JAP_tokugawa_shogunate.6
			title = JAP_tokugawa_shogunate.6.t
			desc = JAP_tokugawa_shogunate.6.d

			picture = GFX_report_event_jap_kokera_crematoriums

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			option = {
				name = JAP_tokugawa_shogunate.6.a
				trigger = { tag = TSH }
				1260 = { add_manpower = -1500 }
				EOANBSYS_pandemics_progress_add_one = yes
				hidden_effect = {
					every_other_country = {
						limit = { is_japanese_country = yes }
						country_event = JAP_tokugawa_shogunate.6
					}
					SAT = { country_event = { id = JAP_tokugawa_shogunate.7 days = 20 } }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.6.a
				trigger = { NOT = { tag = TSH } }
				if = {
					limit = { OR = { tag = SAG tag = SAT } }
					EOANBSYS_pandemics_progress_add_one = yes
				}
			}
		}
	# Spreads to Satsuma Domain
		country_event = {
			id = JAP_tokugawa_shogunate.7
			title = JAP_tokugawa_shogunate.7.t
			desc = {
				trigger = { tag = SAT }
				text = JAP_tokugawa_shogunate.7.d_satsuma
			}
			desc = {
				trigger = { NOT = { tag = TSH } }
				text = JAP_tokugawa_shogunate.7.d_other
			}
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			# Warn the Rest of Japan
			option = {
				name = JAP_tokugawa_shogunate.7.a
				trigger = { tag = SAT }
				1054 = { add_manpower = -100 }
				1257 = { add_manpower = -70 }
				EOANBSYS_pandemics_progress_add_two = yes
				hidden_effect = {
					every_other_country = {
						limit = { is_japanese_country = yes }
						country_event = JAP_tokugawa_shogunate.7
					}
				}
			}
			# Hide the Outbreak from Bakufu Officals
			option = {
				name = JAP_tokugawa_shogunate.7.b
				trigger = { tag = SAT }
				1054 = { add_manpower = -100 }
				1257 = { add_manpower = -70 }
				EOANBSYS_pandemics_progress_add_two = yes
				hidden_effect = {
					every_other_country = {
						limit = { is_japanese_country = yes }
						country_event = JAP_tokugawa_shogunate.9
					}
				}
			}
			# Send Aid
			option = {
				name = JAP_tokugawa_shogunate.7.c
				trigger = { tag = TSH }
				random_list = {
					10 = { EOANBSYS_pandemics_progress_add_two = yes }
					10 = { EOANBSYS_pandemics_progress_add_one = yes }
					1 = { EOANBSYS_pandemics_progress_add_five = yes }
					1 = { EOANBSYS_pandemics_progress_add_half = yes }
				}
				add_political_power = -10
				SAT = {
					add_opinion_modifier = { target = SAT modifier = eoanb_minor_opinion_boost }
					add_popularity = {
						ideology = radical_democracy
						popularity = 0.03
					}
				}
				if = {
					limit = { tag = TSH }
					country_event = { id = JAP_tokugawa_shogunate.9 days = 10 random_days = 10 }
				}
			}
			# They can handle it
			option = {
				name = JAP_tokugawa_shogunate.7.e
				trigger = { tag = TSH }
				EOANBSYS_pandemics_progress_add_one = yes
				if = {
					limit = { tag = TSH }
					country_event = { id = JAP_tokugawa_shogunate.9 days = 10 random_days = 10 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.6.a
				trigger = { NOT = { OR = { tag = TSH tag = SAT } } }

			}
		}
	# Bakufu Sends Help
		country_event = {
			id = JAP_tokugawa_shogunate.8
			title = JAP_tokugawa_shogunate.8.t
			desc = JAP_tokugawa_shogunate.8.d
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			option = {
				name = JAP_tokugawa_shogunate.8.a
				EOANBSYS_pandemics_progress_add_one = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.8.b
				EOANBSYS_pandemics_progress_add_one = yes
			}
		}
	# Kokera along Kaidos
		country_event = {
			id = JAP_tokugawa_shogunate.9
			title = JAP_tokugawa_shogunate.9.t
			desc = JAP_tokugawa_shogunate.9.d
			picture = GFX_report_event_jap_bakumatsu_town

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			option = {
				name = JAP_tokugawa_shogunate.9.a
				ai_chance = { base = 1 }
				set_temp_variable = { eoanb_prestige_change = 1 }
				add_political_power = -30
				eoanb_change_prestige_score = yes
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.10 days = 30 random_days = 45 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.9.b
				ai_chance = { base = 1 }
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.10 days = 30 random_days = 45 }
				}
			}
		}
	# Plague in Capital
			country_event = {
				id = JAP_tokugawa_shogunate.10
				title = JAP_tokugawa_shogunate.10.t
				desc = JAP_tokugawa_shogunate.10.d
				picture = GFX_report_event_jap_kokera_crematoriums

				is_triggered_only = yes

				trigger = { has_pandemic = yes }

				option = {
					name = JAP_tokugawa_shogunate.10.a
					ai_chance = { base = 1 }
					hidden_effect = {
						country_event = { id = JAP_tokugawa_shogunate.11 days = 20 random_days = 45 }
					}
				}
				option = {
					name = JAP_tokugawa_shogunate.10.b
					ai_chance = { base = 1 }
					hidden_effect = {
						country_event = { id = JAP_tokugawa_shogunate.11 days = 20 random_days = 45 }
					}
				}
			}
	# Random State Hurt by Kokera
		country_event = {
			id = JAP_tokugawa_shogunate.11
			hidden = yes

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { has_pandemic = yes }
					random_owned_state = {
						limit = { state_population_k > 700 }
						state_event = JAP_tokugawa_shogunate.12
					}
					random_other_country = {
						limit = { is_subject_of = ROOT }
						capital_scope = {
							state_event = JAP_tokugawa_shogunate.12
						}
					}
					country_event = { id = JAP_tokugawa_shogunate.11 days = 20 random_days = 45 }
				}
			}
		}
		state_event = {
			id = JAP_tokugawa_shogunate.12
			hidden = yes

			is_triggered_only = yes

			immediate = {
				FROM = { country_event = JAP_tokugawa_shogunate.13 }
			}
		}
		country_event = {
			id = JAP_tokugawa_shogunate.13
			title = JAP_tokugawa_shogunate.13.t
			desc = JAP_tokugawa_shogunate.13.d
			picture = GFX_report_event_jap_kokera_crematoriums

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.13.a
				trigger = { tag = TSH }
				FROM = {
					randomize_temp_variable = {
						var = earthquake_deaths
						distribution = uniform
						min = -5000
						max = -35
					}
					add_manpower = earthquake_deaths
				}
				capital_scope = {
					randomize_temp_variable = {
						var = earthquake_deaths
						distribution = uniform
						min = -1000
						max = -105
					}
					add_manpower = earthquake_deaths
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.13.a
				trigger = { NOT = { tag = TSH } }
				capital_scope = {
					randomize_temp_variable = {
						var = earthquake_deaths
						distribution = uniform
						min = -222
						max = -41
					}
					add_manpower = earthquake_deaths
				}
			}
		}
	# Edo Festival
		country_event = {
			id = JAP_tokugawa_shogunate.14
			title = JAP_tokugawa_shogunate.14.t
			desc = JAP_tokugawa_shogunate.14.d
			picture = GFX_report_event_jap_kokera_festival

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			option = {
				name = JAP_tokugawa_shogunate.14.a
				set_temp_variable = { eoanb_prestige_change = 3 }
				eoanb_change_prestige_score = yes
				hidden_effect = {
					random_list = {
						1 = {
							modifier = {
								is_historical_focus_on = yes
								factor = 0
							}
							country_event = { id = JAP_tokugawa_shogunate.15 days = 20 }
						}
						10 = {
							country_event = { id = JAP_tokugawa_shogunate.16 days = 20 }
						}
					}
					country_event = { id = JAP_tokugawa_shogunate.17 days = 120 }
				}
			}
		}
	# Things get Better
		country_event = {
			id = JAP_tokugawa_shogunate.15
			title = JAP_tokugawa_shogunate.15.t
			desc = JAP_tokugawa_shogunate.15.d
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			option = {
				name = JAP_tokugawa_shogunate.15.a
				if = {
					limit = { tag = TSH }
					increase_ps_by_one = yes
					for_each_scope_loop = {
						array = subjects
						country_event = JAP_tokugawa_shogunate.15
					}
				}
				EOANBSYS_pandemics_progress_add_two = yes
			}
		}
	# Things get Worse
		country_event = {
			id = JAP_tokugawa_shogunate.16
			title = JAP_tokugawa_shogunate.16.t
			desc = JAP_tokugawa_shogunate.16.d
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			option = {
				name = JAP_tokugawa_shogunate.15.a
				if = {
					limit = { tag = TSH }
					for_each_scope_loop = {
						array = subjects
						country_event = JAP_tokugawa_shogunate.16
					}
				}
				EOANBSYS_pandemics_progress_minus_five = yes
			}
		}
	# Distrust with Bakufu Authority
		country_event = {
			id = JAP_tokugawa_shogunate.17
			title = JAP_tokugawa_shogunate.17.t
			desc = JAP_tokugawa_shogunate.17.d
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			immediate = {
				if = {
					limit = { tag = TSH }
					for_each_scope_loop = {
						array = subjects
						country_event = feudal_tokugawa_shogunate.17
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.17.a
				trigger = { tag = TSH }
			}
			option = {
				name = JAP_tokugawa_shogunate.17.b
				trigger = { is_tozama_daimyo = yes }
			}
			option = {
				name = JAP_tokugawa_shogunate.17.c
				trigger = { is_fudai_daimyo = yes }
			}
		}
	# Byogaku Tsuron
		country_event = {
			id = JAP_tokugawa_shogunate.18
			title = JAP_tokugawa_shogunate.18.t
			desc = JAP_tokugawa_shogunate.18.d
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			option = {
				name = JAP_tokugawa_shogunate.18.a
				add_ideas = TSH_spirit_vic_byogaku_tsuron
			}
		}
	# Shows of Kokera Decline
		country_event = {
			id = JAP_tokugawa_shogunate.19
			title = JAP_tokugawa_shogunate.19.t
			desc = JAP_tokugawa_shogunate.19.d
			picture = GFX_report_event_jap_kokera_spirit

			is_triggered_only = yes

			trigger = { has_pandemic = yes }

			immediate = {
				if = {
					limit = { tag = TSH }
					for_each_scope_loop = {
						array = subjects
						country_event = JAP_tokugawa_shogunate.19
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.19.a
				EOANBSYS_pandemics_progress_add_ten = yes
			}
		}
# Research
	# Arrival of the Kanrin Mahru
		country_event = {
			id = JAP_tokugawa_shogunate.20
			title = JAP_tokugawa_shogunate.20.t
			desc = JAP_tokugawa_shogunate.20.d
			picture = GFX_report_event_generic_sailship

			is_triggered_only = yes

			option = {
				name = feudal_tokugawa_shogunate.20.a
				hidden_effect = { load_oob = JAP_NAVAL_1858 }
				custom_effect_tooltip = JAP_tokugawa_shogunate.20.a_tt
				set_country_flag = TSH_van_meerdervoort_arrive_flag
				EOANBSYS_institutions_humanitive_add_five = yes
				hidden_effect = { country_event = { id = JAP_tokugawa_shogunate.21 days = 700 random_days = 100 } }
			}
		}
		# Pompe Suggests to Open Hospital
		country_event = {
			id = JAP_tokugawa_shogunate.21
			title = JAP_tokugawa_shogunate.21.t
			desc = JAP_tokugawa_shogunate.21.d
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			# Let him do it
			option = {
				name = JAP_tokugawa_shogunate.21.a
				ai_chance = { base = 1 }
				trigger = { NOT = { has_completed_focus = JAP_vic_beyond_byogaku_tsuron } }
				add_political_power = -20
				EOANBSYS_institutions_innovative_add_one = yes
				add_popularity = {
					ideology = autocracy
					popularity = 0.06
				}
				for_each_scope_loop = {
					array = subjects
					if = {
						limit = { is_tozama_daimyo = yes }
						add_opinion_modifier = { target = TSH modifier = small_decrease }
					}
				}
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.22 days = 35 }
				}
			}
			# No
			option = {
				name = JAP_tokugawa_shogunate.21.b
				ai_chance = { base = 0 }
				for_each_scope_loop = {
					array = subjects
					add_opinion_modifier = { target = TSH modifier = small_decrease }
				}
				EOANBSYS_national_crisis_progress_minus_three = yes
			}
		}
	# Great Progress in Nagasaki Hospital
		country_event = {
			id = JAP_tokugawa_shogunate.22
			title = JAP_tokugawa_shogunate.22.t
			desc = JAP_tokugawa_shogunate.22.d
			picture = GFX_report_event_jap_plague_report

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.22.a
				EOANBSYS_national_crisis_progress_minus_one = yes
				EOANBSYS_pandemics_progress_add_ten = yes
				EOANBSYS_institutions_humanitive_add_two = yes
				add_popularity = {
					ideology = traditional_conservatism
					popularity = 0.04
				}
			}
		}
	# Hietsu Quake 1858
		# Event Distributor
			country_event = {
				id = JAP_tokugawa_shogunate.23
				hidden = yes

				is_triggered_only = yes

				immediate = {
					every_country = {
						limit = { any_owned_state = { is_in_japan = yes } }
						country_event = JAP_tokugawa_shogunate.24
					}
				}
			}
		# Hietsu Earthquake of 1858
			country_event = {
				id = JAP_tokugawa_shogunate.24
				title = JAP_tokugawa_shogunate.24.t
				desc = JAP_tokugawa_shogunate.24.d
				picture = GFX_report_event_generic_tsunami

				is_triggered_only = yes

				immediate = {
					every_owned_state = {
						limit = { is_in_japan = yes }
						random_list = {
							1 = {
								damage_building = {
									type = infrastructure
									damage = 1
								}
							}
							1 = {
							}
						}
					}
				}

				option = {
					name = JAP_tokugawa_shogunate.24.a
					ai_chance = { base = 1 }
					if = {
						limit = { owns_state = 535 }
						add_timed_idea = {
							idea = Generic_Idea_Earthquake_Damage_3
							days = 100
						}
						535 = {
							randomize_temp_variable = {
								var = earthquake_deaths
								distribution = uniform
								min = -95
								max = -35
							}
							add_manpower = earthquake_deaths
						}
					}
					if = {
						limit = { owns_state = 531 }
						add_timed_idea = {
							idea = Generic_Idea_Earthquake_Damage_3
							days = 100
						}
						531 = {
							randomize_temp_variable = {
								var = earthquake_deaths
								distribution = uniform
								min = -95
								max = -35
							}
							add_manpower = earthquake_deaths
						}
					}
				}
			}
	# Purchase Rangaku Books
		country_event = {
			id = JAP_tokugawa_shogunate.25
			title = JAP_tokugawa_shogunate.25.t
			desc = JAP_tokugawa_shogunate.25.d
			picture = GFX_report_event_jap_rangaku_studies

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.25.a
				EOANBSYS_institutions_innovative_add_five = yes
				EOANBSYS_institutions_humanitive_add_ten = yes
				EOANBSYS_national_crisis_progress_add_one = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.25.b
				EOANBSYS_institutions_innovative_add_three = yes
				EOANBSYS_institutions_humanitive_add_five = yes
				EOANBSYS_national_crisis_progress_minus_one = yes
			}
		}

# Sickness of Iesada
		country_event = {
			id = JAP_tokugawa_shogunate.26
			title = JAP_tokugawa_shogunate.26.t
			desc = {
				text = JAP_tokugawa_shogunate.26.d
				trigger = { tag = TSH }
			}
			desc = {
				text = JAP_tokugawa_shogunate.26.d_han
				trigger = { NOT = { tag = TSH } }
			}
			picture = GFX_report_event_jap_shogun
			
			is_triggered_only = yes
			
			immediate = {
				if = {
					limit = { tag = TSH }
					hidden_effect = {
						set_variable = { hitosubashi_faction = 0.538 }
						set_variable = { kii_faction = 0.462 }
						every_other_country = {
							limit = { 
								OR = { 
									is_tozama_daimyo = yes 
									is_fudai_daimyo = yes 
								} 
							}
							country_event = { id = JAP_tokugawa_shogunate.26 }
						}
					}
				}
			}
			
			# The Council will advise
			option = {
				name = JAP_tokugawa_shogunate.26.a
				trigger = { tag = TSH }
				ai_chance = { base = 0 }
				activate_mission = TSH_mission_pick_heir
				complete_national_focus = JAP_vic_illness_of_shogun_iesada
				EOANBSYS_national_crisis_progress_minus_two = yes
				hidden_effect = {
					set_country_flag = TSH_IESADA_SUCESSION_PLAYER_CHOICE
					country_event = { id = JAP_tokugawa_shogunate.27 days = 30 random_days = 15 }
					country_event = { id = JAP_tokugawa_shogunate.28 days = 270 random_days = 50 }
				}
			}
			
			# Tokugawa Iesada will choose
			option = {
				name = JAP_tokugawa_shogunate.26.b
				trigger = { tag = TSH }
				ai_chance = { base = 1 }
				activate_mission = TSH_mission_pick_heir
				complete_national_focus = JAP_vic_illness_of_shogun_iesada
				EOANBSYS_national_crisis_progress_minus_two = yes
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.27 days = 30 random_days = 15 }
					country_event = { id = JAP_tokugawa_shogunate.28 days = 270 random_days = 50 }
				}
			}
			
			option = {
				name = JAP_tokugawa_shogunate.26.c
				trigger = { NOT = { tag = TSH } }
				ai_chance = { base = 1 }
			}
		}
	# Shinpan Feud
		country_event = {
			id = JAP_tokugawa_shogunate.27
			title = JAP_tokugawa_shogunate.27.t
			desc = {
				text = JAP_tokugawa_shogunate.27.d_player
				trigger = { has_country_flag = TSH_IESADA_SUCESSION_PLAYER_CHOICE }
			}
			desc = {
				text = JAP_tokugawa_shogunate.27.d_historical
			}
			picture = GFX_report_event_jap_bakufu_council_1

			is_triggered_only = yes

			immediate = {
				randomize_variable = {
					var = faction_change_percentage
					distribution = uniform
					min = 0.036
					max = 0.100
				}
			}
			# Hitosubashi
			option = {
				name = JAP_tokugawa_shogunate.27.a
				trigger = { tag = TSH has_country_flag = TSH_IESADA_SUCESSION_PLAYER_CHOICE }
				ai_chance = { base = 1 modifier = { factor = 0 is_historical_focus_on = yes } }
				complete_national_focus = JAP_vic_feud_of_the_shinpan
				EOANBSYS_national_crisis_progress_minus_two = yes
				add_to_variable = { 
					hitosubashi_faction = faction_change_percentage
					tooltip = TSH_decision_tokugawa_iesada_succession_crisis_hitosubashi_tt
				}
				subtract_from_variable = { 
					kii_faction = faction_change_percentage
					#tooltip = TSH_decision_tokugawa_iesada_succession_crisis_kii_tt
				}
				#custom_effect_tooltip = JAP_tokugawa_shogunate.27.a_tt
				set_country_flag = TSH_IESADA_SUCESSION_HITO
				clear_variable = faction_change_percentage
			}
			# Kii
			option = {
				name = JAP_tokugawa_shogunate.27.b
				trigger = { tag = TSH has_country_flag = TSH_IESADA_SUCESSION_PLAYER_CHOICE }
				ai_chance = { base = 1 }
				complete_national_focus = JAP_vic_feud_of_the_shinpan
				EOANBSYS_national_crisis_progress_minus_two = yes
				subtract_from_variable = { 
					hitosubashi_faction = faction_change_percentage
					#tooltip = TSH_decision_tokugawa_iesada_succession_crisis_hitosubashi_tt
				}
				add_to_variable = {
					kii_faction = faction_change_percentage
					tooltip = TSH_decision_tokugawa_iesada_succession_crisis_kii_tt
				}
				#custom_effect_tooltip = JAP_tokugawa_shogunate.27.b_tt
				set_country_flag = TSH_IESADA_SUCESSION_KII
				clear_variable = faction_change_percentage
			}
			# Stay Neutral
			option = {
				name = JAP_tokugawa_shogunate.27.c
				trigger = { tag = TSH NOT = { has_country_flag = TSH_IESADA_SUCESSION_PLAYER_CHOICE } }
				ai_chance = { base = 1 }
				add_stability = 0.15
				complete_national_focus = JAP_vic_feud_of_the_shinpan
				EOANBSYS_national_crisis_progress_minus_three = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.27.e
				trigger = { is_fudai_daimyo = yes }
				add_war_support = -0.05
				add_popularity = {
					ideology = autocracy
					popularity = 0.01
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.27.f
				trigger = { is_tozama_daimyo = yes }
				add_war_support = 0.05
				add_political_power = 15
				add_popularity = {
					ideology = autocracy
					popularity = 0.03
				}
			}
		}
	# Iesada chooses Heir
		country_event = {
			id = JAP_tokugawa_shogunate.28
			title = JAP_tokugawa_shogunate.28.t
			desc = {
				text = JAP_tokugawa_shogunate.28.d_kii
				trigger = { TSH = { has_country_flag = TSH_IESADA_SUCESSION_KII } }
			}
			desc = {
				text = JAP_tokugawa_shogunate.28.d_hitosubashi
				trigger = { TSH = { has_country_flag = TSH_IESADA_SUCESSION_HITO } }
			}
			desc = {
				text = JAP_tokugawa_shogunate.28.d_kii
				trigger = { check_variable = { TSH.kii_faction > TSH.hitosubashi_faction } }
			}
			desc = {
				text = JAP_tokugawa_shogunate.28.d_hitosubashi
			}
			picture = GFX_report_event_jap_shogun
			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.28.a
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_minus_five = yes
				#swap_ideas = {
				#	remove_idea = no_heir
				#	add_idea = weak_heir
				#}
				if = {
					limit = {
						has_country_flag = TSH_IESADA_SUCESSION_KII
					}
					custom_effect_tooltip = TSH_IESADA_SUCESSION_KII
					complete_national_focus = JAP_vic_kii_shogun
				}
				else_if = {
					limit = {
						has_country_flag = TSH_IESADA_SUCESSION_HITO
					}
					custom_effect_tooltip = TSH_IESADA_SUCESSION_HITO
					complete_national_focus = JAP_vic_hitosubashi_shogun
				}
				else_if = {
					limit = {
						check_variable = { TSH.kii_faction > TSH.hitosubashi_faction }
					}
					set_country_flag = TSH_IESADA_SUCESSION_KII
					custom_effect_tooltip = TSH_IESADA_SUCESSION_KII
					complete_national_focus = JAP_vic_kii_shogun
				}
				else = {
					set_country_flag = TSH_IESADA_SUCESSION_HITO
					custom_effect_tooltip = TSH_IESADA_SUCESSION_HITO
					complete_national_focus = JAP_vic_hitosubashi_shogun
				}
				every_other_country = {
					limit = {
						OR = {
							is_fudai_daimyo = yes
							is_tozama_daimyo = yes
						}
					}
					country_event = JAP_tokugawa_shogunate.28
				}
				clr_country_flag = TSH_IESADA_SUCESSION_PLAYER_CHOICE
			}
			option = {
				name = JAP_tokugawa_shogunate.28.b
				trigger = { is_fudai_daimyo = yes }
			}
			option = {
				name = JAP_tokugawa_shogunate.28.c
				trigger = { is_tozama_daimyo = yes }
			}
		}
	# Ensei Kiki Jutsu
		country_event = {
			id = JAP_tokugawa_shogunate.29
			title = JAP_tokugawa_shogunate.29.t
			desc = JAP_tokugawa_shogunate.29.d
			picture = GFX_report_event_jap_rangaku_studies

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.29.a
				add_tech_bonus = { category = farming_tech uses = 1 bonus = 0.3 }
			}
			option = {
				name = JAP_tokugawa_shogunate.29.b
				add_tech_bonus = { category = engine_tech uses = 1 bonus = 0.3 }
			}
		}
	# Nagasaki Technical School
		country_event = {
			id = JAP_tokugawa_shogunate.30
			title = JAP_tokugawa_shogunate.30.t
			desc = JAP_tokugawa_shogunate.30.d
			picture = GFX_news_event_jap_naval_academy

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.30.a
				add_war_support = 0.1
				add_tech_bonus = { category = naval_equipment uses = 2 bonus = 0.175 }
			}
		}
	# Erekiteru
		country_event = {
			id = JAP_tokugawa_shogunate.31
			title = JAP_tokugawa_shogunate.31.t
			desc = JAP_tokugawa_shogunate.31.d
			picture = GFX_report_event_jap_rangaku_studies

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.31.a
				add_tech_bonus = { category = resource_extraction_tech uses = 1 bonus = 0.3 }
			}
			option = {
				name = JAP_tokugawa_shogunate.31.b
				add_tech_bonus = { category = electronics_devices_tech uses = 1 bonus = 0.3 }
			}
		}
	# Nagasaki Coal Mines
		country_event = {
			id = JAP_tokugawa_shogunate.32
			title = JAP_tokugawa_shogunate.32.t
			desc = JAP_tokugawa_shogunate.32.d
			picture = GFX_report_event_generic_mine_mining

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.32.a
				EOANBSYS_institutions_innovative_add_one = yes
				if = {
					limit = { owns_state = 1260 }
					1260 = {
						add_extra_state_shared_building_slots = 1
						add_resource = {
							type = coal
							amount = 2
						}
					}
				}
				else = {
					random_owned_state = {
						add_extra_state_shared_building_slots = 1
						add_resource = {
							type = coal
							amount = 2
						}
					}
				}
				if = {
					limit = { SAG = { is_subject_of = ROOT } }
					SAG = {
						EOANBSYS_institutions_innovative_add_two = yes
						random_owned_state = {
							add_extra_state_shared_building_slots = 1
							add_resource = {
								type = coal
								amount = 2
							}
						}
						add_opinion_modifier = { target = ROOT modifier = TSH_assisting_daimyo }
					}
				}
			}
		}
	# Ou Coal Mines
		country_event = {
			id = JAP_tokugawa_shogunate.33
			title = JAP_tokugawa_shogunate.33.t
			desc = JAP_tokugawa_shogunate.33.d
			picture = GFX_report_event_generic_mine_mining

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.33.a
				EOANBSYS_institutions_innovative_add_one = yes
				if = {
					limit = { owns_state = 534 }
					534 = {
						add_extra_state_shared_building_slots = 1
						add_resource = {
							type = coal
							amount = 2
						}
					}
				}
				else = {
					random_owned_state = {
						add_extra_state_shared_building_slots = 1
						add_resource = {
							type = coal
							amount = 4
						}
					}
				}
				if = {
					limit = { DTE = { is_subject_of = ROOT } }
					DTE = {
						EOANBSYS_institutions_innovative_add_two = yes
						random_owned_state = {
							add_extra_state_shared_building_slots = 1
							add_resource = {
								type = coal
								amount = 2
							}
						}
						add_opinion_modifier = { target = ROOT modifier = TSH_assisting_daimyo }
					}
				}
			}
		}
	# Request Bakuhan Intiatives
		# Tokugawa Think
		country_event = {
			id = JAP_tokugawa_shogunate.34
			title = JAP_tokugawa_shogunate.34.t
			desc = JAP_tokugawa_shogunate.34.d
			picture = GFX_report_event_jap_industrialization

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.34.a
				ai_chance = { base = 10 modifier = { add = 10 FROM = { is_fudai_daimyo = yes } } }
				add_political_power = -35
				add_command_power = -20
				EOANBSYS_national_crisis_progress_minus_one = yes
				FROM = {
					country_event = { id = JAP_tokugawa_shogunate.36 days = 14 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.34.bs
				ai_chance = { base = 2 }
				FROM = {
					country_event = { id = JAP_tokugawa_shogunate.35 days = 14 }
					add_popularity = {
						ideology = autocracy
						popularity = 0.05
					}
					add_opinion_modifier = { target = ROOT modifier = medium_decrease }
				}
			}
		}
		# No
			country_event = {
				id = JAP_tokugawa_shogunate.35
				title = JAP_tokugawa_shogunate.35.t
				desc = JAP_tokugawa_shogunate.35.d

				is_triggered_only = yes

				option = {
					name = JAP_tokugawa_shogunate.35.a
					add_political_power = 40
					add_war_support = 0.10
				}
			}
		# Yes!
			country_event = {
				id = JAP_tokugawa_shogunate.36
				title = JAP_tokugawa_shogunate.36.t
				desc = JAP_tokugawa_shogunate.36.d

				is_triggered_only = yes

				option = {
					name = JAP_tokugawa_shogunate.36.a
					activate_mission = TSH_decision_bakuhan_intiatives_kaido_projects
				}
			}
	# Tokugawa Seeks Naval Assistance
		country_event = {
			id = JAP_tokugawa_shogunate.37
			title = JAP_tokugawa_shogunate.37.t
			desc = JAP_tokugawa_shogunate.37.d
			picture = GFX_report_event_generic_sailship

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.37.a
				navy_experience = -5
				destroy_ships = {
					type = lineship
					count = 2
				}
				set_temp_variable = { eoanb_prestige_change = 1 }
				eoanb_change_prestige_score = yes
				reverse_add_opinion_modifier = { target = FROM modifier = large_increase }
				FROM = { country_event = JAP_tokugawa_shogunate.39 }
			}
			option = {
				name = JAP_tokugawa_shogunate.37.b
				country_event = JAP_tokugawa_shogunate.38
				reverse_add_opinion_modifier = { target = FROM modifier = small_decrease }
			}
		}
		# No
		country_event = {
			id = JAP_tokugawa_shogunate.38
			title = JAP_tokugawa_shogunate.38.t
			desc = JAP_tokugawa_shogunate.38.d

			is_triggered_only = yes

			option = { name = JAP_tokugawa_shogunate.38.a }
		}
		# Yes
		country_event = {
			id = JAP_tokugawa_shogunate.39
			title = JAP_tokugawa_shogunate.39.t
			desc = JAP_tokugawa_shogunate.39.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.39.a
				add_political_power = -10
				navy_experience = 20
				hidden_effect = { load_oob = JAP_NAVAL_1859 }
			}
		}
	# Tokugawa Requests Army Assistance
		country_event = {
			id = JAP_tokugawa_shogunate.40
			title = JAP_tokugawa_shogunate.40.t
			desc = JAP_tokugawa_shogunate.40.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.37.a
				ai_chance = { base = 0 modifier = { add = 100 tag = FRA } }
				army_experience = -5
				add_manpower = -500
				add_equipment_to_stockpile = {
					type = infantry_equipment_rifle_1
					amount = -700
				}
				set_temp_variable = { eoanb_prestige_change = 1 }
				eoanb_change_prestige_score = yes
				reverse_add_opinion_modifier = { target = FROM modifier = large_increase }
				FROM = { country_event = JAP_tokugawa_shogunate.43 }
			}
			option = {
				name = JAP_tokugawa_shogunate.40.a
				ai_chance = { base = 0 modifier = { add = 100 tag = PRS } }
				navy_experience = -5
				add_equipment_to_stockpile = {
					type = infantry_equipment_rifle_1
					amount = -1000
				}
				set_temp_variable = { eoanb_prestige_change = 1 }
				eoanb_change_prestige_score = yes
				reverse_add_opinion_modifier = { target = FROM modifier = medium_increase }
				FROM = { country_event = JAP_tokugawa_shogunate.42 }
			}
			option = {
				name = JAP_tokugawa_shogunate.37.b
				ai_chance = { base = 0 }
				FROM = { country_event = JAP_tokugawa_shogunate.41 }
				reverse_add_opinion_modifier = { target = FROM modifier = small_decrease }
			}
		}
		# No
		country_event = {
			id = JAP_tokugawa_shogunate.41
			title = JAP_tokugawa_shogunate.41.t
			desc = JAP_tokugawa_shogunate.41.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.38.a
				add_opinion_modifier = { target = FROM modifier = small_decrease }
			}
		}
		# Arms only
		country_event = {
			id = JAP_tokugawa_shogunate.42
			title = JAP_tokugawa_shogunate.42.t
			desc = JAP_tokugawa_shogunate.42.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.42.a
				add_political_power = -10
				army_experience = 5
				add_equipment_to_stockpile = {
					type = infantry_equipment_rifle_1
					amount = 1000
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.42.b
				add_political_power = -10
				army_experience = 5
				add_equipment_to_stockpile = {
					type = infantry_equipment_rifle_1
					amount = 1000
				}
			}
		}
		# Full Assistance
		country_event = {
			id = JAP_tokugawa_shogunate.43
			title = JAP_tokugawa_shogunate.43.t
			desc = JAP_tokugawa_shogunate.43.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.43.a
				ai_chance = { base = 1 }
				army_experience = 5
				add_equipment_to_stockpile = {
					type = infantry_equipment_rifle_1
					amount = 700
				}
				set_country_flag = TSH_army_west_full_assistance_flag
			}
		}
	# Cadets Foreign Investment
		country_event = {
			id = JAP_tokugawa_shogunate.44
			title = JAP_tokugawa_shogunate.44.t
			desc = JAP_tokugawa_shogunate.44.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.44.a
				add_political_power = -15
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.45 days = 1400 }
				}
			}
		}
	# Return of Students
		country_event = {
			id = JAP_tokugawa_shogunate.45
			title = JAP_tokugawa_shogunate.45.t
			desc = JAP_tokugawa_shogunate.45.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.45.a
				add_doctrine_cost_reduction = { category = land_doctrine uses = 3 cost_reduction = 0.15 }
				set_temp_variable = { eoanb_prestige_change = 5 }
				eoanb_change_prestige_score = yes
			}
		} 
	# Abroad Study
		country_event = {
			id = JAP_tokugawa_shogunate.46
			title = JAP_tokugawa_shogunate.46.t
			desc = JAP_tokugawa_shogunate.46.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.46.a
				add_political_power = -35
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.47 days = 350 random_days = 100 }
				}
				add_popularity = {
					ideology = autocracy
					popularity = 0.075
				}
				for_each_scope_loop = {
						array = subjects
					add_popularity = {
						ideology = autocracy
						popularity = 0.10
					}
				}
			}
		}
	# Abroad Return
		country_event = {
			id = JAP_tokugawa_shogunate.47
			title = JAP_tokugawa_shogunate.47.t
			desc = JAP_tokugawa_shogunate.47.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.47.a
				EOANBSYS_institutions_humanitive_add_ten = yes
				EOANBSYS_institutions_innovative_add_five = yes
				army_experience = 15
				add_popularity = {
					ideology = autocracy
					popularity = 0.075
				}
				for_each_scope_loop = {
					array = subjects
					add_popularity = {
						ideology = autocracy
						popularity = 0.10
					}
				}
				complete_national_focus = JAP_vic_return_of_study_programs
			}
		}
	# Fleet of Rising Sun
		country_event = {
			id = JAP_tokugawa_shogunate.48
			title = JAP_tokugawa_shogunate.48.t
			desc = JAP_tokugawa_shogunate.48.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.48.a
				navy_experience = 50
				EOANBSYS_institutions_innovative_add_five = yes
				EOANBSYS_institutions_humanitive_add_five = yes
				random_owned_controlled_state = {
					limit = { is_in_home_area = yes }
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
				random_owned_controlled_state = {
					limit = { is_in_home_area = yes }
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
				add_tech_bonus = {
					category = naval_mtg_gunboat_tech
					bonus = 0.5
					uses = 3
				}
				add_tech_bonus = {
					category = naval_mtg_gunboat_hulls_tech
					bonus = 0.5
					uses = 3
				}
				add_tech_bonus = {
					category = naval_mtg_monitor_tech
					bonus = 0.5
					uses = 1
				}
				add_tech_bonus = {
					category = naval_mtg_monitor_hulls_tech
					bonus = 0.5
					uses = 1
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.48.b
				navy_experience = 50
				EOANBSYS_institutions_innovative_add_five = yes
				EOANBSYS_institutions_humanitive_add_five = yes
				random_owned_controlled_state = {
					limit = { is_in_home_area = yes }
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
				random_owned_controlled_state = {
					limit = { is_in_home_area = yes }
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
				add_tech_bonus = {
					category = naval_mtg_corvette_tech
					bonus = 0.4
					uses = 3
				}
				add_tech_bonus = {
					category = naval_mtg_corvette_hulls_tech
					bonus = 0.4
					uses = 3
				}
				add_tech_bonus = {
					category = naval_mtg_frigate_tech
					bonus = 0.35
					uses = 1
				}
				add_tech_bonus = {
					category = naval_mtg_frigate_hulls_tech
					bonus = 0.35
					uses = 1
				}
			}
		}
	# Sword of Rising Sun
		country_event = {
			id = JAP_tokugawa_shogunate.49
			title = JAP_tokugawa_shogunate.49.t
			desc = JAP_tokugawa_shogunate.49.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.49.a
				army_experience = 50
				EOANBSYS_institutions_innovative_add_five = yes
				EOANBSYS_institutions_humanitive_add_five = yes
				random_owned_controlled_state = {
					limit = { is_in_home_area = yes }
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
				random_owned_controlled_state = {
					limit = { is_in_home_area = yes }
					add_building_construction = {
						type = armys_factory
						level = 1
						instant_build = yes
					}
				}
				add_tech_bonus = {
					category = infantry_weapons
					bonus = 0.5
					uses = 3
				}
				add_tech_bonus = {
					category = support_tech
					bonus = 0.5
					uses = 3
				}
				add_tech_bonus = {
					category = trains_tech
					bonus = 0.35
					uses = 1
				}
				add_tech_bonus = {
					category = motorized_equipment
					bonus = 0.35
					uses = 1
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.49.b
				army_experience = 50
				EOANBSYS_institutions_innovative_add_five = yes
				EOANBSYS_institutions_humanitive_add_five = yes
				random_owned_controlled_state = {
					limit = { is_in_home_area = yes }
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
				random_owned_controlled_state = {
					limit = { is_in_home_area = yes }
					add_building_construction = {
						type = armys_factory
						level = 1
						instant_build = yes
					}
				}
				add_tech_bonus = {
					category = infantry_weapons
					bonus = 0.5
					uses = 3
				}
				add_tech_bonus = {
					category = support_tech
					bonus = 0.5
					uses = 3
				}
				add_tech_bonus = {
					category = artillery
					bonus = 0.35
					uses = 1
				}
				add_tech_bonus = {
					category = explosives_tech
					bonus = 0.35
					uses = 1
				}
			}
		}
# Western Treaties
	# Introduction to Amity Treaties and Bakumatsu Crisis
		news_event = {
			id = JAP_tokugawa_shogunate.50
			title = JAP_tokugawa_shogunate.50.t
			desc = {
				trigger = { tag = TSH }
				text = JAP_tokugawa_shogunate.50.d_shogunate
			}
			desc = {
				trigger = { NOT = { tag = TSH } }
				text = JAP_tokugawa_shogunate.50.d_han
			}

			picture = GFX_news_event_shogunate_1

			is_triggered_only = yes

			option = {
				trigger = { tag = TSH }
				ai_chance = { base = 1 }
				name = JAP_tokugawa_shogunate.50.a
				set_country_flag = EOANBSYS_national_crisis_bakumatsu_crisis_flag
				EOANBSYS_national_crisis_setup = yes
				1260 = { set_demilitarized_zone = yes }
				1266 = { set_demilitarized_zone = yes }
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.51 days = 20 }
					country_event = { id = JAP_tokugawa_shogunate.71 days = 100 }
					activate_mission = TSH_mission_pick_heir
				}
			}
			option = {
				trigger = { NOT = { tag = TSH } }
				ai_chance = { base = 1 }
				name = JAP_tokugawa_shogunate.50.b
				add_popularity = {
					ideology = autocracy
					popularity = 0.02
				}
			}
		}
	# Bakufu Council Looks to Imperial Ruling
		country_event = {
			id = JAP_tokugawa_shogunate.51
			title = JAP_tokugawa_shogunate.51.t
			desc = JAP_tokugawa_shogunate.51.d
			picture = GFX_report_event_jap_shogun

			is_triggered_only = yes

			# Send an Envoy to Emperor
			option = {
				name = JAP_tokugawa_shogunate.51.a
				ai_chance = { base = 1 }
				custom_effect_tooltip = JAP_tokugawa_shogunate.51.a_tt
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.52 days = 10 random_days = 5 }
				}
			}
			# We'll sign it without him
			option = {
				name = JAP_tokugawa_shogunate.51.b
				ai_chance = { base = 0 }
				add_political_power = 15
				for_each_scope_loop = {
					array = subjects
					add_opinion_modifier = { target = ROOT modifier = large_decrease }
					add_popularity = {
						ideology = autocracy
						popularity = 0.05
					}
				}
				hidden_effect = {
					news_event = { id = JAP_tokugawa_shogunate.57 days = 10 }
				}
				add_popularity = {
					ideology = autocracy
					popularity = 0.06
				}
			}
		}
	# Hotta Masayoshi in Kyoto
		country_event = {
			id = JAP_tokugawa_shogunate.52
			title = JAP_tokugawa_shogunate.52.t
			desc = JAP_tokugawa_shogunate.52.d
			picture = GFX_report_event_jap_bakufu_council_1

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.52.a
				ai_chance = { base = 1 modifier = { is_historical_focus_on = yes add = -1 } }
				hidden_effect = {
					country_event = JAP_tokugawa_shogunate.53
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.52.b
				ai_chance = { base = 1 }
				hidden_effect = {
					country_event = JAP_tokugawa_shogunate.56
				}
			}
		}
	# Emperor Komei Denounces Harris' Demands
		country_event = {
			id = JAP_tokugawa_shogunate.53
			title = JAP_tokugawa_shogunate.53.t
			desc = JAP_tokugawa_shogunate.53.d
			picture = GFX_report_event_jap_bakufu_council_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.53.a
				trigger = { tag = TSH }
				hidden_effect = {
					for_each_scope_loop = {
						array = subjects
						country_event = JAP_tokugawa_shogunate.53
					}
					country_event = { id = JAP_tokugawa_shogunate.54 days = 5 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.53.b
				trigger = { is_subject_of = TSH }
			}
		}
	# Hotta Masayoshi returns with Komei's Disapproval
		country_event = {
			id = JAP_tokugawa_shogunate.54
			title = JAP_tokugawa_shogunate.54.t
			desc = JAP_tokugawa_shogunate.54.d
			picture = GFX_report_event_jap_bakufu_council_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.54.a
				trigger = { tag = TSH }
				news_event = JAP_tokugawa_shogunate.57
				hidden_effect = {
					for_each_scope_loop = {
						array = subjects
						country_event = JAP_tokugawa_shogunate.55
					}
				}
			}
		}
	# (Daimyos) Bakufu Ignore Imperial Ruling
		country_event = {
			id = JAP_tokugawa_shogunate.55
			title = JAP_tokugawa_shogunate.55.t
			desc = JAP_tokugawa_shogunate.55.d
			picture = GFX_report_event_jap_bakufu_council_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.55.a
				ai_chance = { base = 0 modifier = { is_tozama_daimyo = yes add = 1 } }
				EOANBSYS_national_crisis_progress_add_two = yes
				add_popularity = {
					ideology = autocracy
					popularity = 0.04
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.55.b
				ai_chance = { base = 0 modifier = { is_fudai_daimyo = yes add = 1 } }
				add_popularity = {
					ideology = autocracy
					popularity = 0.02
				}
			}
		}
	# Hotta Masayoshi returns empty handed
		country_event = {
			id = JAP_tokugawa_shogunate.56
			title = JAP_tokugawa_shogunate.56.t
			desc = JAP_tokugawa_shogunate.56.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.56.a
				news_event = JAP_tokugawa_shogunate.57
			}
		}
	# Harris Treaty Signing
		news_event = {
			id = JAP_tokugawa_shogunate.57
			title = JAP_tokugawa_shogunate.57.t
			desc = JAP_tokugawa_shogunate.57.d
			picture = GFX_news_event_jap_bakufu_council_2

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					1266 = { set_demilitarized_zone = yes } # Yokohama and Edo
					1260 = { set_demilitarized_zone = yes } # Nagasaki
					531 = { set_demilitarized_zone = yes } # Hyogo
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.57.a
				trigger = { tag = TSH }
				complete_national_focus = JAP_vic_submission_to_the_harris_treaty
				remove_ideas = TSH_spirit_vic_external_amity_treaty_negotiations
				TSH_effect_amity_treaty_signed_japan = yes
				USA = {
					news_event = { id = JAP_tokugawa_shogunate.57 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.57.b
				trigger = { tag = USA }
				add_opinion_modifier = { target = TSH modifier = small_increase }
				reverse_add_opinion_modifier = { target = TSH modifier = small_decrease }
				add_political_power = 15
				TSH_effect_amity_treaty_signed_west = yes
				complete_national_focus = USA_harris_treaty_focus
				hidden_effect = {
					every_other_country = {
						limit = {
							OR = { tag = RUS tag = PRS tag = ENG tag = FRA tag = HOL tag = SPR tag = QNG tag = KOR is_subject_of = TSH }
						}
						news_event = { id = JAP_tokugawa_shogunate.57 days = 20 random_days = 15 }
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.57.c
				trigger = { is_subject_of = TSH }
				add_war_support = 0.05
				add_political_power = 20
			}
			option = {
				name = JAP_tokugawa_shogunate.57.e
				trigger = { OR = { tag = QNG tag = KOR } }
				add_political_power = 5
				add_war_support = 0.15
			}
			option = {
				name = JAP_tokugawa_shogunate.57.f
				trigger = { NOT = { OR = { tag = TSH tag = USA tag = QNG tag = KOR is_subject_of = TSH } } }
				# unlock_decision_tooltip = TSH_decision_european_amity_treaty
				activate_targeted_decision = {
					target = TSH
					decision = TSH_decision_european_amity_treaty
				}
			}
		}
	# Generic Amity Treaty Event (West)
		news_event = {
			id = JAP_tokugawa_shogunate.58
			title = JAP_tokugawa_shogunate.58.t
			desc = JAP_tokugawa_shogunate.58.d
			picture = GFX_report_event_jap_black_ships

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.58.a
				TSH_effect_amity_treaty_signed_west = yes
				
			}
		}
	# Generic Amity Treaty Event (Japan)
		country_event = {
			id = JAP_tokugawa_shogunate.59
			title = JAP_tokugawa_shogunate.59.t
			desc = JAP_tokugawa_shogunate.59.d
			picture = GFX_report_event_jap_black_ships

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.59.a
				trigger = { tag = TSH }
				TSH_effect_amity_treaty_signed_japan = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.59.b
				trigger = { NOT = { tag = TSH } }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = 0.075
				}
			}
		}
	# Remove Amity Treaty (Over time)
		country_event = {
			id = JAP_tokugawa_shogunate.60
			hidden = yes

			is_triggered_only = yes

			immediate = {
				TSH_effect_amity_treaty_remove_japan = yes
			}
		}
# Sucession Crisis 1858
	# Il Naosuke Becomes Tairo
		country_event = {
			id = JAP_tokugawa_shogunate.61
			title = JAP_tokugawa_shogunate.61.t
			desc = JAP_tokugawa_shogunate.61.d
			picture = GFX_report_event_jap_bakufu_council_1

			is_triggered_only = yes

			immediate = {
				hidden_effect = {
					if = {
						limit = { tag =TSH }
						news_event = { id = JAP_tokugawa_shogunate.62 days = 40 random_days = 15 }
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.61.a
				ai_chance = { base = 1 }
				trigger = { tag = TSH }
				decrease_ps_by_one = yes
				EOANBSYS_national_crisis_progress_add_two = yes
				TSH_character_ii_naosuke = {
					add_country_leader_role = {
						country_leader = {
							desc = "TSH_character_ii_naosuke_desc"
							expire = "1900.1.1"
							ideology = shogunate
							traits = { controversial_figure }
						}
						promote_leader = yes
					}
				}
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.61
				}
				hidden_effect = {
					retire_character = TSH_character_tokugawa_iesada
					country_event = { id = JAP_tokugawa_shogunate.93 days = 20 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.61.b
				trigger = { NOT = { tag = TSH } }
				ai_chance = { base = 0 modifier = { add = 1 is_fudai_daimyo = yes } }
				add_political_power = -5
			}
			option = {
				name = JAP_tokugawa_shogunate.61.c
				trigger = { NOT = { tag = TSH } }
				ai_chance = { base = 0 modifier = { add = 1 is_tozama_daimyo = yes } }
				add_political_power = -5
			}
		}
	# Iesada Dies
		news_event = {
			id = JAP_tokugawa_shogunate.62
			title = JAP_tokugawa_shogunate.62.t
			desc = JAP_tokugawa_shogunate.62.d
			picture = GFX_news_event_generic_funeral

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					set_temp_variable = { political_legitimacy_change = -0.50 }
					eoanb_political_legitimacy_change = yes
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.62.a
				ai_chance = { base = 1 }
				trigger = { tag = TSH }
				add_political_power = -100
				#swap_ideas = {
				#	remove_idea = weak_heir
				#	add_idea = no_heir
				#}
				remove_ideas = TSH_spirit_vic_bakufu_shogunate_unconfidence
				clear_variable = hitosubashi_faction
				clear_variable = kii_faction
				if = {
					limit = { has_country_flag = TSH_IESADA_SUCESSION_HITO }
					TSH_character_tokugawa_yoshinobu = {
						add_country_leader_role = {
							country_leader = {
								desc = "TSH_character_tokugawa_yoshinobu_desc"
								expire = "1900.1.1"
								ideology = shogunate
							}
							promote_leader = yes
						}
					}
				}
				else = {
					TSH_character_tokugawa_iemochi = {
						add_country_leader_role = {
							country_leader = {
								desc = "TSH_character_tokugawa_iemochi_desc"
								expire = "1900.1.1"
								ideology = shogunate
							}
							promote_leader = yes
						}
					}
				}
				EOANBSYS_national_crisis_progress_minus_five = yes
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.62
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.62.b
				ai_chance = { base = 1 }
				trigger = { NOT = { tag = TSH } }
				add_popularity = {
					ideology = radical_democracy
					popularity = -0.075
				}
				add_popularity = {
					ideology = traditional_conservatism
					popularity = 0.03
				}
				add_manpower = 500
			}
		}
	# Reconcillate Sonno Joi
		country_event = {
			id = JAP_tokugawa_shogunate.63
			title = JAP_tokugawa_shogunate.63.t
			desc = JAP_tokugawa_shogunate.63.d
			picture = GFX_report_event_jap_bakufu_council_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.63.a
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_minus_five = yes
				add_popularity = {
					ideology = autocracy
					popularity = -0.05
				}
				add_stability = -0.05

				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.63
				}
				hidden_effect = {
					country_event =  { id = JAP_tokugawa_shogunate.64 days = 40 }
					if = {
						limit = { is_ai = no }
						country_event = {
							id = JAP_tokugawa_shogunate.78
							days = 50
						}
					}
					else = {
						random_list = {
							3 = {
								country_event = {
									id = JAP_tokugawa_shogunate.78
									days = 50
								}
							}
							1 = {
								country_event = {
									id = JAP_tokugawa_shogunate.79
									days = 50
								}
							}
						}
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.63.b
				trigger = { NOT = { tag = TSH } }
				add_war_support = 0.05
				random_list = {
					2 = {
						add_popularity = {
							ideology = autocracy
							popularity = 0.10
						}
					}
					2 = {
						add_popularity = {
							ideology = radical_democracy
							popularity = 0.075
						}
					}
					1 = {
						add_popularity = {
							ideology = traditional_conservatism
							popularity = 0.05
						}
					}
				}
			}
			option = {
				name = feudal_tokugawa_shogunate.63.c
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_minus_two = yes
			}
		}
	
	# Marriage Proposal with Princess Kazunomiya
		country_event = {
			id = JAP_tokugawa_shogunate.64
			title = JAP_tokugawa_shogunate.64.t
			desc = JAP_tokugawa_shogunate.64.d
			picture = GFX_report_event_jap_japan_map_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.64.a
				ai_chance = { base = 1 }
			}
			option = {
				name = JAP_tokugawa_shogunate.64.b
				ai_chance = { base = 2 }
				news_event = { id = JAP_tokugawa_shogunate.91 days = 20 }
			}
		}
	
	# Embassy to America
		country_event = {
			id = JAP_tokugawa_shogunate.65
			title = JAP_tokugawa_shogunate.65.t
			desc = JAP_tokugawa_shogunate.65.d
			picture = GFX_report_event_jap_embassy_to_south_europe

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.65.a
				trigger = { tag = TSH }
				add_command_power = -5
				USA = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 } }
			}
		}
	
	# Embassy to Europe I
		country_event = {
			id = JAP_tokugawa_shogunate.66
			title = JAP_tokugawa_shogunate.66.t
			desc = JAP_tokugawa_shogunate.66.d
			picture = GFX_report_event_jap_embassy_to_south_europe

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.66.a
				add_command_power = -5
				ENG = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
				FRA = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
				PRS = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
				DEN = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
				HOL = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
			}
		}
	
	# Embassy to Europe II
		country_event = {
			id = JAP_tokugawa_shogunate.67
			title = JAP_tokugawa_shogunate.67.t
			desc = JAP_tokugawa_shogunate.67.d
			picture = GFX_report_event_jap_embassy_to_south_europe

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.65.a
				add_command_power = -5
				AUS = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
				PIE = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
				OTO = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
				SPR = { country_event = { id = JAP_tokugawa_shogunate.68 days = 50 random_days = 45 } }
			}
		}
	
	# Embassy from Japan
		country_event = {
			id = JAP_tokugawa_shogunate.68
			title = JAP_tokugawa_shogunate.68.t
			desc = JAP_tokugawa_shogunate.68.d
			picture = GFX_report_event_jap_embassy_to_south_europe

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.68.a
				ai_chance = { base = 1 }
				if = {
					limit = { tag = USA }
					TSH = { set_country_flag = TSH_America_Embassy_Response }
				}
				TSH = { news_event = JAP_tokugawa_shogunate.69 }
			}
			option = {
				name = JAP_tokugawa_shogunate.68.b
				ai_chance = { base = 0 }
				if = {
					limit = { tag = USA }
					TSH = { set_country_flag = TSH_America_Embassy_Response }
				}
				TSH = { country_event = JAP_tokugawa_shogunate.70 }
			}
		}
	# Embassy Accepted
		news_event = {
			id = JAP_tokugawa_shogunate.69
			title = JAP_tokugawa_shogunate.69.t
			desc = JAP_tokugawa_shogunate.69.d
			picture = GFX_news_event_jap_bakumatsu_embassy_to_europe

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.69.a
				reverse_add_opinion_modifier = { target = FROM modifier = embassy_accepted }
				random_list = {
					2 = {
						EOANBSYS_institutions_innovative_add_one = yes
					}
					2 = {
						EOANBSYS_institutions_humanitive_add_one = yes
					}
					1 = {
						EOANBSYS_institutions_innovative_add_two = yes
					}
					1 = {
						EOANBSYS_institutions_humanitive_add_two = yes
					}
				}
				EOANBSYS_national_crisis_progress_minus_one = yes
			}
		}
	
	# Embassy Rejected
		country_event = {
			id = JAP_tokugawa_shogunate.70
			title = JAP_tokugawa_shogunate.70.t
			desc = JAP_tokugawa_shogunate.70.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.70.a
				ai_chance = { base = 1 }
				reverse_add_opinion_modifier = { target = FROM modifier = small_decrease }
			}
		}
# Gold Exodus Crisis
		news_event = {
			id = JAP_tokugawa_shogunate.71
			title = JAP_tokugawa_shogunate.71.t
			desc = JAP_tokugawa_shogunate.71.d
			picture = GFX_news_event_jap_bakumatsu_town

			is_triggered_only = yes
			major = yes

			option = {
				name = JAP_tokugawa_shogunate.71.a
				trigger = { tag = TSH }
				ai_chance = { base = 1 }
				complete_national_focus = JAP_vic_great_gold_exodus
				add_political_power = -100
				add_command_power = -50
				EOANBSYS_national_crisis_progress_add_five = yes
				decrease_ps_by_one = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.71.a
				trigger = { is_subject_of = TSH }
				decrease_ps_by_two = yes
				add_political_power = -50
				add_stability = -0.20
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.71.b
				trigger = {
					OR = {
						tag = USA
						tag = ENG
						tag = FRA
						tag = HOL
						tag = SPR
						tag = POL
						tag = PRS
						tag = DEN
						tag = SWE
						tag = AUS
						tag = PIE
						tag = RUS
						tag = OTO
					}
				}
				add_political_power = 25
			}
			option = {
				name = JAP_tokugawa_shogunate.71.c
				trigger = {
					NOT = {
						OR = {
							tag = USA
							tag = ENG
							tag = FRA
							tag = HOL
							tag = SPR
							tag = POL
							tag = PRS
							tag = DEN
							tag = SWE
							tag = AUS
							tag = PIE
							tag = RUS
							tag = OTO
							tag = TSH
							is_subject_of = TSH
						}
					}
				}
			}
		}
	# Crack Down on Exchange Rates
		country_event = {
			id = JAP_tokugawa_shogunate.72
			title = JAP_tokugawa_shogunate.72.t
			desc = JAP_tokugawa_shogunate.72.d
			picture = GFX_report_event_jap_bakufu_council_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.72.a
				ai_chance = { base = 1 }
				add_political_power = -100
				add_stability = -0.05
				add_war_support = 0.05
				add_manpower = -100
				EOANBSYS_national_crisis_progress_minus_three = yes
			}
		}
	# Issue Unbacked Notes
		country_event = {
			id = JAP_tokugawa_shogunate.73
			title = JAP_tokugawa_shogunate.73.t
			desc = JAP_tokugawa_shogunate.73.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.73.a
				trigger = { tag = TSH }
				ai_chance = { base = 1 }
				# Country Event
				set_temp_variable = { political_legitimacy_change = -0.10 }
				eoanb_political_legitimacy_change = yes
				EOANBSYS_national_crisis_progress_add_two = yes
				remove_ideas = TSH_spirit_vic_han_currencies
				add_timed_idea = {
					idea = TSH_spirit_vic_han_currencies_1
					days = 1400
				}
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.73
				}
			}
			option = {
				name = feudal_tokugawa_shoguante.73.b
				trigger = { NOT = { tag = TSH } }
				add_stability = -0.10
				add_political_power  = -25
				add_popularity = {
					ideology = autocracy
					popularity = 0.10
				}
			}
		}
	# Stabilized the Gold Crisis
		country_event = {
			id = JAP_tokugawa_shogunate.74
			title = JAP_tokugawa_shogunate.74.t
			desc = JAP_tokugawa_shogunate.74.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.74.a
				trigger = { tag = TSH }
				ai_chance = { base = 1 }
				add_political_power = 50
				EOANBSYS_national_crisis_progress_minus_twenty = yes
				increase_ps_by_one = yes
				remove_ideas = TSH_spirit_vic_fiscal_crisis_3
				add_timed_idea = { idea = TSH_spirit_vic_fiscal_crisis_4 days = 500 }
				EOANBSYS_institutions_humanitive_add_five = yes
				every_other_country = {
					limit = { has_idea = TSH_spirit_vic_external_amity_treaty_west }
					add_opinion_modifier = {
						target = TSH
						modifier = minor_sanctions
					}
				}
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.74
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.74.b
				trigger = { is_subject_of = TSH }
				ai_chance = { base = 1 }
				add_political_power = 5
				add_popularity = {
					ideology = radical_democracy
					popularity = 0.05
				}
			}
		}
# Bakumatsu Crisis
	# Stagnation of the Tokugawa Shogunate
		country_event = {
			id = JAP_tokugawa_shogunate.75
			title = JAP_tokugawa_shogunate.75.t
			desc = JAP_tokugawa_shogunate.75.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.75.a
				decrease_ps_by_one = yes
				add_political_power = 200
			}
		}
	# Bunkyuu Reforms
		country_event = {
			id = JAP_tokugawa_shogunate.76
			title = JAP_tokugawa_shogunate.76.t
			desc = JAP_tokugawa_shogunate.76.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.76.a
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_minus_ten = yes
				decrease_ps_by_one = yes
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.76
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.76.b
				trigger = { NOT = { tag = TSH } }
				add_stability = 0.20
				add_manpower = 1500
				add_popularity = {
					ideology = traditional_conservatism
					popularity = 0.035
				}
			}
		}
	# Relax Sankin Kotai
		country_event = {
			id = JAP_tokugawa_shogunate.77
			title = JAP_tokugawa_shogunate.77.t
			desc = JAP_tokugawa_shogunate.77.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.77.a
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_minus_ten = yes
				decrease_ps_by_one = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.77.b
				trigger = { NOT = { tag = TSH } }
				add_political_power = 20
			}
		}
	# Reconcillation with Sonnoi Joi (good)
		country_event = {
			id = JAP_tokugawa_shogunate.78
			title = JAP_tokugawa_shogunate.78.t
			desc = JAP_tokugawa_shogunate.78.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.78.a
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_minus_five = yes
				hidden_effect = {
					for_each_scope_loop = {
						array = subjects
						country_event = JAP_tokugawa_shogunate.78
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.78.b
				trigger = { NOT = { tag = TSH } }
				add_political_power = 20
			}
		}
	# Reconcillation with Sonno Joi (bad)
		country_event = {
			id = JAP_tokugawa_shogunate.79
			title = JAP_tokugawa_shogunate.79.t
			desc = JAP_tokugawa_shogunate.79.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.79.a
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_add_five = yes
				hidden_effect = {
					if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 35
							}
						}
						EOANBSYS_national_crisis_progress_add_five = yes
					}
					if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 50
							}
						}
						EOANBSYS_national_crisis_progress_add_two = yes
					}
					for_each_scope_loop = {
						array = subjects
						country_event = JAP_tokugawa_shogunate.79
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.79.b
				trigger = { NOT = { tag = TSH } }
				add_political_power = 20
			}
		}
	# Harrassment from Europeans Start (Opium)
		country_event = {
			id = JAP_tokugawa_shogunate.80
			title = JAP_tokugawa_shogunate.80.t
			desc = JAP_tokugawa_shogunate.80.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			immediate = {
				hidden_effect = {
					for_each_scope_loop = {
						array = subjects
						country_event = JAP_tokugawa_shogunate.80
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.80.a
				trigger = { tag = TSH }
				hidden_effect = {
					country_event = JAP_tokugawa_shogunate.81
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.80.b
				trigger = { NOT = { tag = TSH } }
			}
		}
	# Harassment Randomizer pt 1
		country_event = {
			id = JAP_tokugawa_shogunate.81
			hidden = yes

			is_triggered_only = yes

			trigger = {
				has_idea = EOANBSYS_spirit_national_crisis
				NOT = { has_completed_focus = JAP_vic_revitalize_national_protections }
			}

			immediate = {
				random_owned_state = {
					state_event = JAP_tokugawa_shogunate.82
				}
				if = {
					limit = { has_completed_focus = JAP_vic_bare_westerner_abuse }
					country_event = { id = JAP_tokugawa_shogunate.81 days = 55 random_days = 35 }
				}
				else = {
					country_event = { id = JAP_tokugawa_shogunate.81 days = 45 random_days = 30 }
				}
			}
		}
	# Harassment Randomizer pt 2
		state_event = {
			id = JAP_tokugawa_shogunate.82
			hidden = yes

			is_triggered_only = yes

			immediate = {
				random_country = {
					limit = { has_idea = TSH_spirit_vic_external_amity_treaty_west }
					set_variable = {
						var = PREV.bullying_country
						value = THIS.id
					}
				}
				random_list = {
					2 = {
						modifier = {
							add = -2
							TSH = { has_completed_focus = JAP_vic_security_against_opium }
						}
						OWNER = {
							country_event = JAP_tokugawa_shogunate.83
							for_each_scope_loop = {
								array = subjects
								country_event = JAP_tokugawa_shogunate.83
							}
						}
					}
					1 = {
						OWNER = {
							country_event = JAP_tokugawa_shogunate.84
							for_each_scope_loop = {
								array = subjects
								country_event = JAP_tokugawa_shogunate.84
							}	
						}
					}
					1 = {
						OWNER = {
							country_event = JAP_tokugawa_shogunate.85
							for_each_scope_loop = {
								array = subjects
								country_event = JAP_tokugawa_shogunate.85
							}
						}
					}
					1 = {
						OWNER = {
							country_event = JAP_tokugawa_shogunate.86
							for_each_scope_loop = {
								array = subjects
								country_event = JAP_tokugawa_shogunate.86
							}
						}
					}
					1 = {
						modifier = {
							has_resources_amount = {
								resource = fabric
								amount > 0
							}
							add = 2
						}
						OWNER ={
							country_event = JAP_tokugawa_shogunate.87
							for_each_scope_loop = {
								array = subjects
								country_event = JAP_tokugawa_shogunate.87
							}
						}
					}
				}
			}
		}
	# Opium 2
		country_event = {
			id = JAP_tokugawa_shogunate.83
			title = JAP_tokugawa_shogunate.83.t
			desc = JAP_tokugawa_shogunate.83.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.83.a
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_add_two = yes
				add_political_power = -5
				add_popularity = {
					ideology = autocracy
					popularity = 0.03
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.83.b
				trigger = { NOT = { tag = TSH } }

			}
		}
	# Harrassment 1
		country_event = {
			id = JAP_tokugawa_shogunate.84
			title = JAP_tokugawa_shogunate.84.t
			desc = JAP_tokugawa_shogunate.84.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.84.a
				trigger = { tag = TSH }
				FROM = {
					add_manpower = -3
				}
				add_popularity = {
					ideology = autocracy
					popularity = 0.03
				}
				add_stability = -0.01
				add_political_power = -5
				EOANBSYS_national_crisis_progress_add_two = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.84.b
				trigger = { tag = TSH has_completed_focus = JAP_vic_security_against_harassment }
				add_popularity = {
					ideology = autocracy
					popularity = 0.02
				}
				add_political_power = -7
				EOANBSYS_national_crisis_progress_add_one = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.80.c
				trigger = { NOT = { tag = TSH } }
				add_popularity = {
					ideology = autocracy
					popularity = 0.02
				}
			}
		}
	# Harrassment 2
		country_event = {
			id = JAP_tokugawa_shogunate.85
			title = JAP_tokugawa_shogunate.85.t
			desc = JAP_tokugawa_shogunate.85.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.84.a
				trigger = { tag = TSH }
				FROM = {
					add_manpower = -15
				}
				add_popularity = {
					ideology = autocracy
					popularity = 0.08
				}
				add_stability = -0.02
				add_political_power = -5
				EOANBSYS_national_crisis_progress_add_two = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.84.b
				trigger = { tag = TSH has_completed_focus = JAP_vic_security_against_harassment }
				add_popularity = {
					ideology = autocracy
					popularity = 0.04
				}
				add_political_power = -7
				EOANBSYS_national_crisis_progress_add_one = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.84.c
				trigger = { NOT = { tag = TSH } }
				add_popularity = {
					ideology = autocracy
					popularity = 0.02
				}
			}
		}
	# Harrassment 3
		country_event = {
			id = JAP_tokugawa_shogunate.86
			title = JAP_tokugawa_shogunate.86.t
			desc = JAP_tokugawa_shogunate.86.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.84.a
				trigger = { tag = TSH }
				FROM = {
					add_manpower = -1
				}
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
				add_political_power = -15
				add_command_power = -2
				EOANBSYS_national_crisis_progress_add_two = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.84.b
				trigger = { tag = TSH has_completed_focus = JAP_vic_security_against_harassment }
				add_command_power = -2
				EOANBSYS_national_crisis_progress_add_one = yes
				add_popularity = {
					ideology = radical_democracy
					popularity = 0.05
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.84.c
				trigger = { NOT = { tag = TSH } }
				add_popularity = {
					ideology = autocracy
					popularity = 0.02
				}
			}
		}
	# Harrassment 4
		country_event = {
			id = JAP_tokugawa_shogunate.87
			title = JAP_tokugawa_shogunate.87.t
			desc = JAP_tokugawa_shogunate.87.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.87.a
				trigger = { tag = TSH }
				add_resource = {
					type = fabric
					amount = -1
					state = FROM.id
				}
				add_popularity = {
					ideology = autocracy
					popularity = 0.02
				}
				EOANBSYS_national_crisis_progress_add_two = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.87.b
				trigger = { tag = TSH has_completed_focus = JAP_vic_security_against_harassment }
				EOANBSYS_national_crisis_progress_add_one = yes
				add_political_power = -10
			}
			option = {
				name = JAP_tokugawa_shogunate.84.c
				trigger = { NOT = { tag = TSH } }
				add_popularity = {
					ideology = autocracy
					popularity = 0.02
				}
			}
		}
	# # European Response v1
	# 	country_event = {
	# 		id = JAP_tokugawa_shogunate.88
	# 		title = JAP_tokugawa_shogunate.88.t
	# 		desc = JAP_tokugawa_shogunate.88.d
	# 		picture = GFX_report_event_jap_bakumatsu_europeans

	# 		is_triggered_only = yes

	# 		option = {
	# 			name = JAP_tokugawa_shogunate.88.a
	# 			TSH = { country_event = JAP_tokugawa_shogunate.90 }
	# 		}
	# 		option = {
	# 			name = JAP_tokugawa_shogunate.88.b
	# 			add_political_power = -5
	# 		}
	# 	}
	# # European Response v2
	# 	country_event = {
	# 		id = JAP_tokugawa_shogunate.89
	# 		title = JAP_tokugawa_shogunate.89.t
	# 		desc = JAP_tokugawa_shogunate.89.d
	# 		picture = GFX_report_event_jap_bakumatsu_europeans

	# 		is_triggered_only = yes

	# 		option = {
	# 			name = JAP_tokugawa_shogunate.89.a
	# 			TSH = { country_event = JAP_tokugawa_shogunate.90 }
	# 		}
	# 	}
	# # (TSH) European Denouncement!?
	# 	country_event = {
	# 		id = JAP_tokugawa_shogunate.90
	# 		title = JAP_tokugawa_shogunate.90.t
	# 		desc = JAP_tokugawa_shogunate.90.d
	# 		picture = GFX_report_event_jap_black_ships

	# 		is_triggered_only = yes

	# 		option = {
	# 			name = JAP_tokugawa_shogunate.90.a
	# 			add_political_power = -5
	# 			add_popularity = {
	# 				ideology = autocracy
	# 				popularity = 0.02
	# 			}
	# 			random_list = {
	# 				2 = {
	# 					EOANBSYS_national_crisis_progress_add_one = yes
	# 				}
	# 				1 = {
	# 					EOANBSYS_national_crisis_progress_minus_one = yes
	# 				}
	# 			}
	# 		}
	# 	}
	# Marriage Alliance
		news_event = {
			id = JAP_tokugawa_shogunate.91
			title = JAP_tokugawa_shogunate.91.t
			desc = JAP_tokugawa_shogunate.91.d
			picture = GFX_news_event_jap_bakumatsu_wedding

			is_triggered_only = yes
			major = yes

			option = {
				name = JAP_tokugawa_shogunate.91.a
				trigger = { tag = TSH }
				add_stability = 0.05
				add_political_power = 50
				add_war_support = -0.10
				add_manpower = -2000
				EOANBSYS_national_crisis_progress_minus_ten = yes
				add_advisor_role = {
					character = TSH_character_princess_kazunomiya
					advisor = {
						slot = political_advisor
						cost = 25
						idea_token = TSH_character_princess_kazunomiya

						ai_will_do = { base = 10 }

						#available = {
						#	has_government = radical_democracy
						#}

						modifier = {
							stability_weekly = 0.05
							political_power_gain = 0.15
							traditional_conservatism_drift = -0.10
						}
					}
				}
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.109 days = 20 }
				}	
			}
			option = {
				name = JAP_tokugawa_shogunate.91.b
				trigger = { is_subject_of = TSH }
			}
			option = {
				name=  JAP_tokugawa_shogunate.91.c
				trigger = { NOT = { OR = { tag = TSH is_subject_of = TSH } } }
			}
		}
	# USA-TSH Economic Cooperation
		country_event = {
			id = JAP_tokugawa_shogunate.92
			title = JAP_tokugawa_shogunate.92.t
			desc = JAP_tokugawa_shogunate.92.d
			#picture = 

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.92.a
				ai_chance = { base = 1 }
				trigger = { tag = USA }
				add_political_power = -50
				EOANBSYS_national_crisis_progress_add_one = yes
				activate_mission = TSH_decision_usa_tsh_partnership
				TSH = { country_event = JAP_tokugawa_shogunate.92 }
			}
			option = {
				name = JAP_tokugawa_shogunate.92.b
				ai_chance = { base = 0 }
				trigger = { tag = USA }
				add_political_power = 5
			}
			option = {
				name = JAP_tokugawa_shogunate.92.c
				trigger = { tag = TSH }
				EOANBSYS_national_crisis_progress_add_two = yes
				activate_mission = TSH_decision_usa_tsh_partnership
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.92
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.92.e
				trigger = { is_subject_of = TSH }
				add_command_power = 20
				add_war_support = 0.035
				increase_ps_by_one = yes
				add_manpower = 50
			}
		}
	# Kishu and Hitotsubashi
		country_event = {
			id = JAP_tokugawa_shogunate.93
			title = JAP_tokugawa_shogunate.93.t
			desc = JAP_tokugawa_shogunate.93.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.93.a
				remove_ideas = TSH_spirit_vic_bakufu_shogunate_unconfidence
				add_timed_idea = {
					idea = TSH_spirit_vic_bakufu_shogunate_divided
					days = 700
				}
			}
		}
	# Attacks in Edo Port at US
		country_event = {
			id = JAP_tokugawa_shogunate.94
			title = JAP_tokugawa_shogunate.94.t
			desc = JAP_tokugawa_shogunate.94.d
			picture = GFX_report_event_jap_ansei_purge_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.94.a
				trigger = { tag = TSH }
				add_opinion_modifier = { target = USA modifier = small_decrease }
				reverse_add_opinion_modifier = { target = USA modifier = small_decrease }
				USA = { country_event = JAP_tokugawa_shogunate.94 }
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.94
				}

				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.94.b
				trigger = { tag = USA }
				add_political_power = 30
				reverse_add_opinion_modifier = { target = TSH modifier = small_decrease }
			}
			option = {
				name = JAP_tokugawa_shogunate.94.c
				trigger = { is_subject_of = TSH }
				if = {
					limit = { tag = MIT }
					add_war_support = 0.10
					add_political_power = -10
				}
			}
		}
	# Russian Soldier hacked to pieces in Yokohama
		country_event = {
			id = JAP_tokugawa_shogunate.95
			title = JAP_tokugawa_shogunate.95.t
			desc = JAP_tokugawa_shogunate.95.d
			picture = report_event_jap_ansei_purge

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.94.a
				trigger = { tag = TSH }
				add_political_power = -35
				add_opinion_modifier = { target = RUS modifier = small_decrease }
				reverse_add_opinion_modifier = { target = RUS modifier = small_decrease }
				RUS = { country_event = JAP_tokugawa_shogunate.95 }
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.95
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.94.b
				trigger = { tag = RUS }
				add_political_power = 30
			}
			option = {
				name = JAP_tokugawa_shogunate.94.c
				trigger = { is_subject_of = TSH }
				add_political_power = 5
			}
		}
	# Dutch Captains in Yokosuka
		country_event = {
			id = JAP_tokugawa_shogunate.96
			title = JAP_tokugawa_shogunate.96.t
			desc = JAP_tokugawa_shogunate.96.d
			picture = report_event_jap_ansei_purge_1

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.94.a
				trigger = { tag = TSH }
				
				add_political_power = -35
				add_opinion_modifier = { target = HOL modifier = small_decrease }
				reverse_add_opinion_modifier = { target = HOL modifier = small_decrease }
				HOL = { country_event = JAP_tokugawa_shogunate.96 }
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.96
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.94.b
				trigger = { tag = HOL }
				add_political_power = 30
			}
			option = {
				name = JAP_tokugawa_shogunate.94.c
				trigger = { is_subject_of = TSH }
				add_political_power = 5
			}
		}
	# Prussian Shipwreck in Yokohoma
		country_event = {
			id = JAP_tokugawa_shogunate.97
			title = JAP_tokugawa_shogunate.97.t
			desc = JAP_tokugawa_shogunate.97.d
			picture = GFX_report_event_jap_rangaku_studies

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.94.a
				trigger = { tag = TSH }
				
				add_political_power = -35
				add_opinion_modifier = { target = PRS modifier = small_decrease }
				reverse_add_opinion_modifier = { target = PRS modifier = small_decrease }
				PRS = { country_event = JAP_tokugawa_shogunate.97 }
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.97
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.94.b
				trigger = { tag = PRS }
				add_political_power = 30
			}
			option = {
				name = JAP_tokugawa_shogunate.94.c
				trigger = { is_subject_of = TSH }
				add_political_power = 5
			}
		}
	# French Minister Servant Attacked
		country_event = {
			id = JAP_tokugawa_shogunate.98
			title = JAP_tokugawa_shogunate.98.t
			desc = JAP_tokugawa_shogunate.98.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.94.a
				trigger = { tag = TSH }
				add_political_power = -35
				add_opinion_modifier = { target = FRA modifier = small_decrease }
				reverse_add_opinion_modifier = { target = FRA modifier = small_decrease }
				FRA = { country_event = JAP_tokugawa_shogunate.98 }
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.98
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.94.b
				trigger = { tag = FRA }
				add_political_power = 30
			}
			option = {
				name = JAP_tokugawa_shogunate.94.c
				trigger = { is_subject_of = TSH }
				add_political_power = 5
			}
		}
	# Assassination of Henry Heuksen
		country_event = {
			id = JAP_tokugawa_shogunate.99
			title = JAP_tokugawa_shogunate.99.t
			desc = JAP_tokugawa_shogunate.99.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.94.a
				trigger = { tag = TSH }
				add_political_power = -35
				add_opinion_modifier = { target = USA modifier = small_decrease }
				reverse_add_opinion_modifier = { target = USA modifier = small_decrease }
				add_opinion_modifier = { target = HOL modifier = small_decrease }
				reverse_add_opinion_modifier = { target = HOL modifier = small_decrease }
				USA = { country_event = JAP_tokugawa_shogunate.99 }
				HOL = { country_event = JAP_tokugawa_shogunate.99 }
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.95
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.94.b
				trigger = { tag = USA }
				add_political_power = 30
			}
			option = {
				name = JAP_tokugawa_shogunate.94.b
				trigger = { tag = HOL }
				add_political_power = 30
			}
			option = {
				name = JAP_tokugawa_shogunate.94.c
				trigger = { is_subject_of = TSH }
				add_political_power = 5
			}
		}
# Ansei Purge
	# Ansei Purge Start
		news_event = {
			id = JAP_tokugawa_shogunate.100
			title = JAP_tokugawa_shogunate.100.t
			desc = JAP_tokugawa_shogunate.100.d
			picture = GFX_news_event_jap_ansei_purge

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.100.a
				trigger = { tag = TSH }
				add_stability = -0.20
				set_country_flag = TSH_Bakumatsu_Debate_Ansei_Purge_Ongoing
				add_ideas = TSH_spirit_vic_han_ansei_purge
				activate_mission = TSH_Mission_Bakumatsu_Modernization_Ansei_Purge

				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.100
				}
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.101 days = 20 random_days = 900 }
					country_event = { id = JAP_tokugawa_shogunate.102 days = 20 random_days = 900 }
					country_event = { id = JAP_tokugawa_shogunate.103 days = 20 random_days = 900 }
					country_event = { id = JAP_tokugawa_shogunate.104 days = 20 random_days = 900 }
					country_event = { id = JAP_tokugawa_shogunate.105 days = 20 random_days = 900 }
					country_event = { id = JAP_tokugawa_shogunate.106 days = 20 random_days = 900 }
					country_event = { id =  japan_daimyo_characters.4 days = 20 random_days = 900 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.100
				trigger = { NOT = { tag = TSH } }
				add_stability = -0.075
				add_popularity = {
					ideology = radical_democracy
					popularity = -0.075
				}
				set_country_flag = TSH_Bakumatsu_Debate_Ansei_Purge_Ongoing
				add_ideas = TSH_spirit_vic_han_ansei_purge
				activate_mission = TSH_Mission_Bakumatsu_Modernization_Ansei_Purge
			}
		}
	# Yoshida Shoin
		country_event = {
			id = JAP_tokugawa_shogunate.101
			title = JAP_tokugawa_shogunate.101.t
			desc = JAP_tokugawa_shogunate.101.d
			picture = GFX_report_event_jap_ansei_purge_1

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					hidden_effect = {
						CHO = { country_event = JAP_tokugawa_shogunate.101 }
					}
				}
				else_if = {
					limit = { tag = CHO }
					retire_character = CHO_character_yoshida_shoin
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.101.a
				trigger = { tag = TSH }
				add_political_power = 35
				add_stability = 0.02
				EOANBSYS_national_crisis_progress_minus_five = yes
				set_temp_variable = { political_legitimacy_change = 0.02 }
				eoanb_political_legitimacy_change = yes
				for_each_scope_loop = {
					array = subjects
					if= {
						limit = { NOT = { tag = CHO } }
						country_event = JAP_tokugawa_shogunate.101
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.b
				trigger = { tag = CHO }
				add_stability = -0.15
				add_popularity = {
					ideology = autocracy
					popularity = 0.075
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.c
				trigger = { NOT = { OR = { tag = TSH tag = CHO } } }
				if = {
					limit = { is_tozama_daimyo = yes }
					add_popularity = {
						ideology = autocracy
						popularity = 0.075
					}
				}
				else = {
					add_popularity = {
						ideology = radical_democracy
						popularity = 0.025
					}
				}
			}
		}
	# Hashimoto Kanai
		country_event = {
			id = JAP_tokugawa_shogunate.102
			title = JAP_tokugawa_shogunate.102.t
			desc = JAP_tokugawa_shogunate.102.d
			picture = GFX_report_event_jap_ansei_purge_1

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					hidden_effect = {
						SAT = { country_event = JAP_tokugawa_shogunate.102 }
					}
				}
				else_if = {
					limit = { tag = SAT }
					retire_character = SAT_character_hashimoto_kanai
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.101.a
				trigger = { tag = TSH }
				add_political_power = 35
				add_stability = 0.02
				EOANBSYS_national_crisis_progress_minus_five = yes
				set_temp_variable = { political_legitimacy_change = 0.02 }
				eoanb_political_legitimacy_change = yes
				for_each_scope_loop = {
					array = subjects
					if= {
						limit = { NOT = { tag = SAT } }
						country_event = JAP_tokugawa_shogunate.102
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.b
				trigger = { tag = SAT }
				add_stability = -0.15
				add_popularity = {
					ideology = autocracy
					popularity = 0.075
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.c
				trigger = { NOT = { OR = {  tag = TSH tag = SAT } } }
				if = {
					limit = { is_tozama_daimyo = yes }
					add_popularity = {
						ideology = autocracy
						popularity = 0.075
					}
				}
				else = {
					add_popularity = {
						ideology = radical_democracy
						popularity = 0.025
					}
				}
			}
		}
	# Nagai Naoyuki
		country_event = {
			id = JAP_tokugawa_shogunate.103
			title = JAP_tokugawa_shogunate.103.t
			desc = JAP_tokugawa_shogunate.103.d
			picture = GFX_report_event_jap_ansei_purge_2

			is_triggered_only = yes

			immediate = {
				retire_character = EZO_character_nagai_naoyuki
			}

			option = {
				name = JAP_tokugawa_shogunate.101.a
				trigger = { tag = TSH }
				add_political_power = 35
				add_stability = 0.02
				EOANBSYS_national_crisis_progress_minus_five = yes
				set_temp_variable = { political_legitimacy_change = 0.02 }
				eoanb_political_legitimacy_change = yes
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.103
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.c
				trigger = { is_subject_of = TSH }
				if = {
					limit = { is_tozama_daimyo = yes }
					add_popularity = {
						ideology = autocracy
						popularity = 0.075
					}
				}
				else = {
					add_popularity = {
						ideology = radical_democracy
						popularity = 0.025
					}
				}
			}
		}
	# Hotta Masayoshi
		country_event = {
			id = JAP_tokugawa_shogunate.104
			title = JAP_tokugawa_shogunate.104.t
			desc = JAP_tokugawa_shogunate.104.d
			picture = GFX_report_event_jap_ansei_purge_1

			is_triggered_only = yes

			immediate = {
				retire_character = TSH_character_hotta_masayoshi
			}

			option = {
				name = JAP_tokugawa_shogunate.101.a
				trigger = { tag = TSH }
				add_political_power = 35
				add_stability = 0.02
				EOANBSYS_national_crisis_progress_minus_five = yes
				set_temp_variable = { political_legitimacy_change = 0.02 }
				eoanb_political_legitimacy_change = yes
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.104
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.c
				trigger = { is_subject_of = TSH }
				if = {
					limit = { is_tozama_daimyo = yes }
					add_popularity = {
						ideology = autocracy
						popularity = 0.075
					}
				}
				else = {
					add_popularity = {
						ideology = radical_democracy
						popularity = 0.025
					}
				}
			}
		}
	# Date Muneari
		country_event = {
			id = JAP_tokugawa_shogunate.105
			title = JAP_tokugawa_shogunate.105.t
			desc = JAP_tokugawa_shogunate.105.d
			picture = GFX_report_event_jap_ansei_purge_2

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					hidden_effect = {
						DTE = { country_event = JAP_tokugawa_shogunate.105 }
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.101.a
				trigger = { tag = TSH }
				add_political_power = 35
				add_stability = 0.02
				EOANBSYS_national_crisis_progress_minus_five = yes
				set_temp_variable = { political_legitimacy_change = 0.02 }
				eoanb_political_legitimacy_change = yes
				for_each_scope_loop = {
					array = subjects
					if= {
						limit = { NOT = { tag = DTE } }
						country_event = JAP_tokugawa_shogunate.105
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.b
				trigger = { tag = DTE }
				add_stability = -0.15
				add_popularity = {
					ideology = autocracy
					popularity = 0.075
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.c
				trigger = { NOT = { OR = { tag = TSH tag = DTE } } }
				if = {
					limit = { is_tozama_daimyo = yes }
					add_popularity = {
						ideology = autocracy
						popularity = 0.075
					}
				}
				else = {
					add_popularity = {
						ideology = radical_democracy
						popularity = 0.025
					}
				}
			}
		}
	# Yamauchi Toyoshige
		country_event = {
			id = JAP_tokugawa_shogunate.106
			title = JAP_tokugawa_shogunate.106.t
			desc = JAP_tokugawa_shogunate.106.d
			picture = GFX_report_event_jap_ansei_purge_1

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					hidden_effect = {
						TOS = { country_event = JAP_tokugawa_shogunate.106 }
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.101.a
				trigger = { tag = TSH }
				add_political_power = 35
				add_stability = 0.02
				EOANBSYS_national_crisis_progress_minus_five = yes
				set_temp_variable = { political_legitimacy_change = 0.02 }
				eoanb_political_legitimacy_change = yes
				for_each_scope_loop = {
					array = subjects
					if= {
						limit = { NOT = { tag = TOS } }
						country_event = JAP_tokugawa_shogunate.106
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.b
				trigger = { tag = TOS }
				add_stability = -0.15
				add_popularity = {
					ideology = autocracy
					popularity = 0.075
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.101.c
				trigger = { NOT = { OR = { tag = TSH tag = TOS } } }
				if = {
					limit = { is_tozama_daimyo = yes }
					add_popularity = {
						ideology = autocracy
						popularity = 0.075
					}
				}
				else = {
					add_popularity = {
						ideology = radical_democracy
						popularity = 0.025
					}
				}
			}
		}
	# Sakuradamon Incident
		news_event = {
			id = JAP_tokugawa_shogunate.107
			title = JAP_tokugawa_shogunate.107.t
			desc = JAP_tokugawa_shogunate.107.d
			picture = GFX_news_event_jap_ansei_purge

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = MIT }
					store_current_ideologies = yes
					declare_war_on = {
						target = TSH
						type = civil_war
					}
					hidden_effect = {
						country_event = { id = JAP_tokugawa_shogunate.108 days = 3 }
						TSH = {
							country_event = JAP_tokugawa_shogunate.107
						}
					}
				}
				if = {
					limit = { tag = TSH }
					retire_character = TSH_character_ii_naosuke
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.107.a
				trigger = { tag = TSH }
				add_stability = -0.10
				set_temp_variable = { political_legitimacy_change = -0.1 }
				eoanb_political_legitimacy_change = yes
				EOANBSYS_national_crisis_progress_add_five = yes
			}
			option = {
				name = JAP_tokugawa_shogunate.107.b
				trigger = { tag = MIT }
				set_temp_variable = { political_legitimacy_change = 0.10 }
				eoanb_political_legitimacy_change = yes
				add_political_power = 20
			}
		}
		country_event = {
			id = JAP_tokugawa_shogunate.108
			hidden = yes

			is_triggered_only = yes

			immediate = {
				white_peace = TSH
				TSH = {
					set_autonomy = {
						target = MIT
						autonomy_state = autonomy_daimyo
					}
				}
				load_prevous_ideologies = yes
			}
		}
# Ansei Crises
	# Procession of Wedding
		country_event = {
			id = JAP_tokugawa_shogunate.109
			title = JAP_tokugawa_shogunate.109.t
			desc = JAP_tokugawa_shogunate.109.d
			picture = GFX_news_event_jap_tokaido_completion

			is_triggered_only = yes

			option = {
				name = feudal_tokugawa_shogunate.109.a
				trigger = { tag = TSH }
				increase_ps_by_one = yes
				add_manpower = -2000
				EOANBSYS_pandemics_progress_minus_five = yes
				add_popularity = {
					ideology = radical_democracy
					popularity = 0.065
				}
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.109
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.109.a
				trigger = { is_subject_of = TSH }
				add_popularity = {
					ideology = radical_democracy
					popularity = 0.065
				}
			}
		}
	# Expel the Barbarians!
		news_event = {
			id = JAP_tokugawa_shogunate.110
			title = JAP_tokugawa_shogunate.110.t
			desc = JAP_tokugawa_shogunate.110.d
			picture = GFX_news_event_jap_bakufu_council_1

			is_triggered_only = yes
			major = yes

			option = {
				name = JAP_tokugawa_shogunate.110.a
				trigger = { tag = TSH }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.05
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.110.b
				trigger = { is_subject_of = TSH }
				add_political_power = 30
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
				if = {
					limit = { tag = CHO }
					hidden_effect = {
						country_event = { id = JAP_tokugawa_shogunate.113 days = 20 random_days = 50 }
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.110.c
				trigger = { has_idea = TSH_spirit_vic_external_amity_treaty_west }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = 0.02
				}
				add_opinion_modifier = { target = TSH modifier = small_decrease }
			}
			option = {
				name = JAP_tokugawa_shogunate.110.e
				trigger = { NOT = { OR = { has_idea = TSH_spirit_vic_external_amity_treaty_west tag = TSH is_subject_of = TSH } } }
			}
		}
	# Assassination Attempt of Ando Naomasa
		country_event = {
			id = JAP_tokugawa_shogunate.111
			title = JAP_tokugawa_shogunate.111.t
			desc = JAP_tokugawa_shogunate.111.d
			picture = GFX_news_event_jap_bakufu_council_1

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.111.a
				trigger = { tag = TSH }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.05
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.111
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.111.b
				trigger = { is_subject_of = TSH }
				add_political_power = 30
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
		}
	# Namamugi Incident
		country_event = {
			id = JAP_tokugawa_shogunate.112
			title = JAP_tokugawa_shogunate.112.t
			desc = JAP_tokugawa_shogunate.112.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.111.a
				trigger = { tag = TSH }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.05
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
				ENG = { country_event = JAP_tokugawa_shogunate.150 }
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.112
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.111.b
				trigger = { is_subject_of = TSH }
				add_political_power = 30
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
		}
		# American Ships Passing By
		country_event = {
			id = JAP_tokugawa_shogunate.113
			title = JAP_tokugawa_shogunate.113.t
			desc = JAP_tokugawa_shogunate.113.d
			picture = GFX_report_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.113.a
				add_political_power = -5
				TSH = { country_event = JAP_tokugawa_shogunate.114 }
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.115 days = 5 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.113.b
				trigger = { is_ai = no }
				add_war_support = -0.10
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.115 days = 5 }
				}
			}
		}

	# Pembroke Incident
		news_event = {
			id = JAP_tokugawa_shogunate.114
			title = JAP_tokugawa_shogunate.114.t
			desc = JAP_tokugawa_shogunate.114.d
			picture = GFX_news_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.114.a
				trigger = { tag = TSH }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.05
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
				for_each_scope_loop = {
					array = subjects
					news_event = JAP_tokugawa_shogunate.114
				}
				USA = {
					news_event = JAP_tokugawa_shogunate.114
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.114.b
				trigger = { is_subject_of = TSH }
				add_political_power = 30
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.114.c
				trigger = { NOT = { OR = { tag = TSH is_subject_of = TSH } } }
				if = {
					limit = { tag = USA }
					every_other_country = {
						limit = { has_idea = TSH_spirit_vic_external_amity_treaty_west }
						news_event = { id = JAP_tokugawa_shogunate.114 days = 7 }
					}
				}
			}
		}
	# French Ships Passing By
		country_event = {
			id = JAP_tokugawa_shogunate.115
			title = JAP_tokugawa_shogunate.115.t
			desc = JAP_tokugawa_shogunate.113.d
			picture = GFX_report_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.113.a
				add_political_power = -5
				TSH = { news_event = JAP_tokugawa_shogunate.116 }
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.117 days = 5 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.113.b
				trigger = { is_ai = no }
				add_war_support = -0.10
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.117 days = 5 }
				}
			}
		}

	# Kien Chen Incident
		news_event = {
			id = JAP_tokugawa_shogunate.116
			title = JAP_tokugawa_shogunate.116.t
			desc = JAP_tokugawa_shogunate.116.d
			picture = GFX_news_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.114.a
				trigger = { tag = TSH }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.05
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
				for_each_scope_loop = {
					array = subjects
					news_event = JAP_tokugawa_shogunate.116
				}
				FRA = {
					news_event = JAP_tokugawa_shogunate.116
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.114.b
				trigger = { is_subject_of = TSH }
				add_political_power = 30
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.114.c
				trigger = { NOT = { OR = { tag = TSH is_subject_of = TSH } } }
				if = {
					limit = { tag = FRA }
					add_manpower = -1
					every_other_country = {
						limit = { has_idea = TSH_spirit_vic_external_amity_treaty_west }
						news_event = { id = JAP_tokugawa_shogunate.116 days = 7 }
					}
				}
			}
		}
	# Dutch Ships Passing By
		country_event = {
			id = JAP_tokugawa_shogunate.117
			title = JAP_tokugawa_shogunate.117.t
			desc = JAP_tokugawa_shogunate.113.d
			picture = GFX_report_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.113.a
				add_political_power = -5
				TSH = { news_event = JAP_tokugawa_shogunate.118 }
			}
			option = {
				name = JAP_tokugawa_shogunate.113.b
				trigger = { is_ai = no }
				add_war_support = -0.10
			}
		}

	# Medusa Incident
		news_event = {
			id = JAP_tokugawa_shogunate.118
			title = JAP_tokugawa_shogunate.118.t
			desc = JAP_tokugawa_shogunate.118.d
			picture = GFX_news_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.114.a
				trigger = { tag = TSH }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.05
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
				for_each_scope_loop = {
					array = subjects
					news_event = JAP_tokugawa_shogunate.118
				}
				HOL = {
					news_event = JAP_tokugawa_shogunate.118
				}
				hidden_effect = {
					FRA = { country_event = JAP_tokugawa_shogunate.119 }
					USA = { country_event = JAP_tokugawa_shogunate.119 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.114.b
				trigger = { is_subject_of = TSH }
				add_political_power = 30
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.114.c
				trigger = { NOT = { OR = { tag = TSH is_subject_of = TSH } } }
				if = {
					limit = { tag = HOL}
					add_manpower = -9
					every_other_country = {
						limit = { has_idea = TSH_spirit_vic_external_amity_treaty_west }
						news_event = { id = JAP_tokugawa_shogunate.118 days = 7 }
					}
				}
			}
		}
	# Intervention in Choshu?
		country_event = {
			id = JAP_tokugawa_shogunate.119
			title = JAP_tokugawa_shogunate.119.t
			desc = JAP_tokugawa_shogunate.119.d
			picture = GFX_report_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.119.a
				add_political_power = -5
				if = {
					limit = { tag = USA }
					set_global_flag = TSH_shimonoseki_usa_intervenes_flag
				}
				else_if = {
					limit = { tag = FRA }
					set_global_flag = TSH_shimonoseki_fra_intervenes_flag
				}
				CHO = { country_event = { id = JAP_tokugawa_shogunate.120 days = 40 }}
			}
			option = {
				name = JAP_tokugawa_shogunate.119.b
				trigger = { is_ai = no }
				add_war_support = -0.10
			}
		}
	# French and Americas attack back!
		country_event = {
			id = JAP_tokugawa_shogunate.120
			title = JAP_tokugawa_shogunate.120.t
			desc = {
				text = JAP_tokugawa_shogunate.120.d_both
				trigger = {
					has_global_flag = TSH_shimonoseki_usa_intervenes_flag
					has_global_flag = TSH_shimonoseki_fra_intervenes_flag
				}
			}
			desc = {
				text = JAP_tokugawa_shogunate.120.d_usa
				trigger = {
					has_global_flag = TSH_shimonoseki_usa_intervenes_flag
				}
			}
			desc = {
				text = JAP_tokugawa_shogunate.120.d_fra
				trigger = {
					has_global_flag = TSH_shimonoseki_fra_intervenes_flag
				}
			}
			picture = GFX_report_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes
			fire_only_once = yes

			option = {
				name = JAP_tokugawa_shogunate.120.a
				capital_scope = {
					damage_building = {
						type = infrastructure
						damage = 1
					}
					add_manpower = -23
				}
				every_other_country = {
					limit = {
						OR = {
							tag = TSH
							is_subject_of = TSH
							has_idea = TSH_spirit_vic_external_amity_treaty_west
						}
					}
					news_event = JAP_tokugawa_shogunate.121
				}
			}
		}
	# Battle of Shimonoseki Straits
		news_event = {
			id = JAP_tokugawa_shogunate.121
			title = JAP_tokugawa_shogunate.121.t
			desc = {
				text = JAP_tokugawa_shogunate.121.d_both
				trigger = {
					has_global_flag = TSH_shimonoseki_usa_intervenes_flag
					has_global_flag = TSH_shimonoseki_fra_intervenes_flag
				}
			}
			desc = {
				text = JAP_tokugawa_shogunate.121.d_usa
				trigger = {
					has_global_flag = TSH_shimonoseki_usa_intervenes_flag
				}
			}
			desc = {
				text = JAP_tokugawa_shogunate.121.d_fra
				trigger = {
					has_global_flag = TSH_shimonoseki_fra_intervenes_flag
				}
			}
			picture = GFX_news_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.121.a
				trigger = { tag = TSH }
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.121.b
				trigger = { is_subject_of = TSH }
				add_popularity = {
					ideology = autocracy
					popularity = 0.10
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.121.c
				trigger = { has_idea = TSH_spirit_vic_external_amity_treaty_west }
				add_opinion_modifier = { target = TSH modifier = large_decrease }
			}
		}
	# Mito Rebellion
		news_event = {
			id = JAP_tokugawa_shogunate.122
			title = JAP_tokugawa_shogunate.122.t
			desc = JAP_tokugawa_shogunate.122.d
			picture = news_event_jap_ansei_purge

			is_triggered_only = yes

			trigger  ={
				TSH = { has_national_crisis = yes }
			}

			immediate = {
				if = {
					limit = { tag = MIT }
					capital_scope = {
						set_demilitarized_zone = yes
					}
					every_other_country = {
						limit = { is_japanese_country = yes }
						news_event = JAP_tokugawa_shogunate.122
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.122.a
				trigger = { tag = MIT }
				add_political_power = 200
				add_manpower = -245
			}
			option = {
				name = JAP_tokugawa_shogunate.122.b
				trigger = { tag = TSH }
				add_war_support = -0.10
				add_manpower = -350
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
				decrease_ps_by_two = yes
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.123 days = 200 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.122.c
				trigger = { NOT = { OR = { tag = TSH tag = MIT } } }
				add_political_power = 50
				increase_ps_by_one = yes
			}
		}
	# End of Mito Rebellion
		country_event = {
			id = JAP_tokugawa_shogunate.123
			title = JAP_tokugawa_shogunate.123.t
			desc = JAP_tokugawa_shogunate.123.d
			picture = GFX_report_event_jap_imperial_troops

			is_triggered_only = yes

			trigger = {
				has_war = no
			}

			immediate = {
				if = {
					limit = { tag = TSH }
					1267 = { set_demilitarized_zone = no }
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.123.a
				trigger = { tag = MIT }
				add_manpower = 2500
			}
			option = {
				name = JAP_tokugawa_shogunate.123.b
				trigger = { tag = TSH }
				increase_ps_by_one = yes
				add_manpower = -4500
				add_equipment_to_stockpile = {
					type = infantry_equipment_rifle_0
					amount = -8000
					producer = TSH
				}
			}
		}
	# Death of Iemochi Trigger
		country_event = {
			id = JAP_tokugawa_shogunate.124
			hidden = yes

			is_triggered_only = yes

			trigger = {
				has_country_leader = {
					character = TSH_character_tokugawa_iemochi
					ruling_only = yes
				}
			}

			immediate = {
				news_event = JAP_tokugawa_shogunate.125
			}
		}
	# Death of Iemochi
		news_event = {
			id = JAP_tokugawa_shogunate.125
			title = JAP_tokugawa_shogunate.125.t
			desc = JAP_tokugawa_shogunate.125.d

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					for_each_scope_loop = {
						array = subjects
						news_event = JAP_tokugawa_shogunate.125
					}
					hidden_effect = {
						if = {
							limit = {
								check_variable = {
									var = EOANBSYS_national_crisis_progress_var
									value < 50
								}
							}
							EOANBSYS_national_crisis_progress_add_five = yes
						}
						if = {
							limit = {
								check_variable = {
									var = EOANBSYS_national_crisis_progress_var
									value < 50
								}
							}
							EOANBSYS_national_crisis_progress_add_three = yes
						}
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.125.a
				trigger = { tag = TSH }
				TSH_character_tokugawa_yoshinobu = {
					add_country_leader_role = {
						country_leader = {
							desc = "TSH_character_tokugawa_yoshinobu_desc"
							expire = "1900.1.1"
							ideology = shogunate
						}
						promote_leader = yes
					}
				}
				retire_character = TSH_character_tokugawa_iemochi

				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 85
						}
					} 
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 75
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 65
						}
					}
					EOANBSYS_national_crisis_progress_add_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 45
						}
					}
					EOANBSYS_national_crisis_progress_add_twenty = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.125.b
			} 
		}
	# Ikedaya Incident
		country_event = {
			id = JAP_tokugawa_shogunate.126
			title = JAP_tokugawa_shogunate.126.t
			desc = JAP_tokugawa_shogunate.126.d
			picture = GFX_report_event_jap_imperial_troops

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.111.a
				trigger = { tag = TSH }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.05
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 20
						}
					}
					EOANBSYS_national_crisis_progress_add_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.126
				}
				add_manpower = -80
				1106 = {
					damage_building = {
						type = infrastructure
						damage = 4
					}
					add_manpower = -550
				}
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.127 days = 30 random_days = 15 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.111.b
				trigger = { is_subject_of = TSH }
				add_political_power = 30
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
		}
	# Kinmon Incident
		country_event = {
			id = JAP_tokugawa_shogunate.127
			title = JAP_tokugawa_shogunate.127.t
			desc = JAP_tokugawa_shogunate.127.d
			picture = GFX_report_event_jap_imperial_troops

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.111.a
				trigger = { tag = TSH }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = -0.05
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 20
						}
					}
					EOANBSYS_national_crisis_progress_add_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.127
				}
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.128 days = 50 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.111.b
				trigger = { is_subject_of = TSH }
				add_political_power = 30
				add_popularity = {
					ideology = autocracy
					popularity = 0.05
				}
			}
		}
	# First Choshu Expedition (TSH)
		country_event = {
			id = JAP_tokugawa_shogunate.128
			title = JAP_tokugawa_shogunate.128.t
			desc = JAP_tokugawa_shogunate.128.d
			picture = GFX_report_event_jap_imperial_troops

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.128.a
				add_political_power = -20
				CHO = { country_event = JAP_tokugawa_shogunate.129 }
			}
			option = {
				name = JAP_tokugawa_shogunate.128.b
				trigger = { is_ai = no }
				decrease_ps_by_one = yes
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 65
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_minus_one = yes
				}
				add_equipment_to_stockpile = {
					type = infantry_equipment_rifle_0
					amount = -1000
					producer = TSH
				}
			}
		}
	# First Choshu Expedition (CHO)
		country_event = {
			id = JAP_tokugawa_shogunate.129
			title = JAP_tokugawa_shogunate.129.t
			desc = JAP_tokugawa_shogunate.129.d
			picture = GFX_report_event_jap_imperial_troops

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.129.a
				trigger = { is_ai = no }
				TSH = { country_event = JAP_tokugawa_shogunate.130 }
			}
			option = {
				name = JAP_tokugawa_shogunate.129.b
				TSH = { news_event = JAP_tokugawa_shogunate.132 }
			}
		}
	# Choshu Rejects
		country_event = {
			id = JAP_tokugawa_shogunate.130
			title = JAP_tokugawa_shogunate.130.t
			desc = JAP_tokugawa_shogunate.130.d
			picture = GFX_report_event_jap_imperial_troops

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.130.a
				CHO = {
					every_owned_state = {
						add_core_of = TSH
					}
				}
				declare_war_on = {
					target = CHO
					type = annex_everything
				}
				every_country = {
					limit = { is_japanese_country = yes }
					news_event = JAP_tokugawa_shogunate.131
				}
			}
		}
	# Choshu Rejects News
		news_event = {
			id = JAP_tokugawa_shogunate.131
			title = JAP_tokugawa_shogunate.131.t
			desc = JAP_tokugawa_shogunate.131.d
			picture = GFX_news_event_jap_iwakura_mission

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.131.a
				add_political_power = 20
			}
		}
	# Choshu Gives Up Rebels
		news_event = {
			id = JAP_tokugawa_shogunate.132
			title = JAP_tokugawa_shogunate.132.t
			desc = JAP_tokugawa_shogunate.132.d
			picture = GFX_news_event_jap_iwakura_mission

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.132.a
				trigger = { tag = TSH }
				add_political_power = 100
				add_stability = 0.05
				set_temp_variable = { eoanb_prestige_change = 0.10 }
				eoanb_change_prestige_score = yes
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 65
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_minus_one = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.132.b
				trigger = { NOT = { OR = { tag = TSH tag = CHO } } }
			}
			option = {
				name = JAP_tokugawa_shogunate.132.c
				trigger = { tag = CHO }
				
			}
		}
	# Death of Emperor Komei
		country_event = {
			id = JAP_tokugawa_shogunate.133
			hidden = yes

			trigger = {
				TSH = {
					has_national_crisis = yes
					has_character = JAP_character_emperor_komei
				}
			}

			is_triggered_only = yes

			immediate = {
				news_event = JAP_tokugawa_shogunate.134
				hidden_effect = {
					if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 50
							}
						}
						EOANBSYS_national_crisis_progress_add_five = yes
					}
					if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 50
							}
						}
						EOANBSYS_national_crisis_progress_add_three = yes
					}
				}
			}
		}
		news_event = {
			id = JAP_tokugawa_shogunate.134
			title = JAP_tokugawa_shogunate.134.t
			desc = JAP_tokugawa_shogunate.134.d
			picture = GFX_news_event_generic_funeral

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					retire_character = JAP_character_emperor_komei
					hidden_effect = {
						every_other_country = {
							limit = {
								OR = {
									has_idea = TSH_spirit_vic_external_amity_treaty_west
									is_japanese_country = yes
								}
							}
							news_event = JAP_tokugawa_shogunate.134
						}
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.134.a
				trigger = { is_japanese_country = yes }
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 60
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 70
							}
						}
						EOANBSYS_national_crisis_progress_add_three = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 80
							}
						}
						EOANBSYS_national_crisis_progress_minus_one = yes
					}
					else = {
						EOANBSYS_national_crisis_progress_minus_three = yes
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.134.b
				trigger = { is_japanese_country = no }
			}
		}
	# Icarus Affair
		country_event = {
			id = JAP_tokugawa_shogunate.135
			hidden = yes

			trigger = {
				TSH = {
					has_national_crisis = yes
				}
			}

			is_triggered_only = yes

			immediate = {
				news_event = JAP_tokugawa_shogunate.136
				hidden_effect = {
					if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 50
							}
						}
						EOANBSYS_national_crisis_progress_add_five = yes
					}
					if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 50
							}
						}
						EOANBSYS_national_crisis_progress_add_three = yes
					}
				}
			}
		}
		news_event = {
			id = JAP_tokugawa_shogunate.136
			title = JAP_tokugawa_shogunate.136.t
			desc = JAP_tokugawa_shogunate.136.d
			picture = GFX_news_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					hidden_effect = {
						every_other_country = {
							limit = {
								OR = {
									has_idea = TSH_spirit_vic_external_amity_treaty_west
									is_japanese_country = yes
								}
							}
							news_event = JAP_tokugawa_shogunate.136
						}
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.136.a
				trigger = { is_japanese_country = yes }
				if = {
					limit = { tag = TSH }
					if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 80
							}
						}
						EOANBSYS_national_crisis_progress_minus_five = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 65
							}
						}
						EOANBSYS_national_crisis_progress_minus_three = yes
					}
					else = {
						EOANBSYS_national_crisis_progress_minus_one = yes
					}
					ENG = { country_event = { id = JAP_tokugawa_shogunate.137 days = 10 } }
				}
				else = {
					add_popularity = {
						ideology = autocracy
						popularity = 0.2
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.136.b
				trigger = { is_japanese_country = no }
			}
		}
	# (ENG) What should we do?
		country_event = {
			id = JAP_tokugawa_shogunate.137
			title = JAP_tokugawa_shogunate.137.t
			desc = JAP_tokugawa_shogunate.137.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.137.a
				add_manpower = -2
				add_political_power = -25
				TSH = { country_event = JAP_tokugawa_shogunate.138 }
			}
			option = {
				name = JAP_tokugawa_shogunate.137.b
				trigger = { is_ai = no }
				add_political_power = 5
			}
		}
	# (TSH) Britain Demands Investigation
		country_event = {
			id = JAP_tokugawa_shogunate.138
			title = JAP_tokugawa_shogunate.138.t
			desc = JAP_tokugawa_shogunate.138.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.138.a
				EOANBSYS_national_crisis_progress_minus_five = yes
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.139 days = 40 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.138.b
				trigger = { is_ai = no }
				EOANBSYS_national_crisis_progress_minus_ten = yes
			}
		}
	# Found Murderer in Fukoka
		country_event = {
			id = JAP_tokugawa_shogunate.139
			title = JAP_tokugawa_shogunate.139.t
			desc = JAP_tokugawa_shogunate.139.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes
			
			option = {
				name = JAP_tokugawa_shogunate.139.a
				EOANBSYS_national_crisis_progress_add_ten = yes
				ENG = {
					country_event = { id = JAP_tokugawa_shogunate.140 }
				}
				decrease_ps_by_one = yes
				add_popularity = {
					ideology = autocracy
					popularity = 0.2		
				}
			}
		}
	# (ENG)
		country_event = {
			id = JAP_tokugawa_shogunate.140
			title = JAP_tokugawa_shogunate.140.t
			desc = JAP_tokugawa_shogunate.140.d
			
			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.140.a
				add_political_power = 25
				increase_ps_by_one = yes
				TSH = {
					increase_ps_by_one = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.140.b
				add_political_power = 25
				increase_ps_by_one = yes
				TSH = {
					increase_ps_by_one = yes
				}
			}
		}
	# (EURO) Japan purchases ship
		country_event = {
			id = JAP_tokugawa_shogunate.141
			title = JAP_tokugawa_shogunate.141.t
			desc = JAP_tokugawa_shogunate.141.d
			picture = GFX_report_event_jap_rangaku_studies

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.141.a
				add_political_power = 50
				add_manpower = -20
				hidden_effect = {
					TSH = {
						country_event = { id = JAP_tokugawa_shogunate.142 days = 40 }
					}
				}
			}
		}
	# Ship arrives
		country_event = {
			id = JAP_tokugawa_shogunate.142
			title = JAP_tokugawa_shogunate.142.t
			desc = JAP_tokugawa_shogunate.142.d
			picture = GFX_report_event_jap_rangaku_studies

			is_triggered_only = yes

			trigger = { NOT = { has_war_with = FROM } }

			option = {
				name = feudal_tokugawa_shogunate.142.a
				hidden_effect = {
					if = {
						limit = { FROM = { tag = USA } }
						load_oob = JAP_NAVAL_1860_USA
					}
					else_if = {
						limit = { FROM = { tag = HOL } }
						load_oob = JAP_NAVAL_1860_HOL
					}
					else_if = {
						limit = { FROM = { tag = ENG } }
						load_oob = JAP_NAVAL_1860_ENG
					}
				}
			}
		}
		

# Anglo-Satsuma War (150)
	# Namamugi Incident (ENG)
		country_event = {
			id = JAP_tokugawa_shogunate.150
			title = JAP_tokugawa_shogunate.150.t
			desc = JAP_tokugawa_shogunate.150.d
			picture = GFX_report_event_jap_bakumatsu_europeans

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.150.a
				ai_chance = { base = 1}
				add_manpower = -6
				add_opinion_modifier = { target = SAT modifier = medium_decrease }
				TSH = { country_event = JAP_tokugawa_shogunate.151 }
			}
			option = {
				name = JAP_tokugawa_shogunate.150.b
				ai_chance = { base = 0 }
				add_manpower = -6
				add_opinion_modifier = { target = SAT modifier = medium_decrease }
				set_temp_variable = { eoanb_prestige_change = -2 }
				eoanb_change_prestige_score = yes
			}
		}
	# ENG demands reperations (TSH)
		country_event = {
			id = JAP_tokugawa_shogunate.151
			title = JAP_tokugawa_shogunate.151.t
			desc = JAP_tokugawa_shogunate.151.d
			picture = GFX_report_event_jap_disembarking_troops

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.151.a
				ai_chance = { base = 1}
				reverse_add_opinion_modifier = { target = SAT modifier = medium_decrease }
				SAT = { 
					country_event = { id =  JAP_tokugawa_shogunate.152 days = 5 }
					add_popularity = {
						ideology = autocracy
						popularity = 0.2
					}
				}
				if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 80
							}
						}
						EOANBSYS_national_crisis_progress_minus_five = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 65
							}
						}
						EOANBSYS_national_crisis_progress_minus_three = yes
					}
					else = {
						EOANBSYS_national_crisis_progress_minus_one = yes
					}
			}
			option = {
				name = JAP_tokugawa_shogunate.151.b
				ai_chance = { base = 0 }
				add_political_power = -50
				add_command_power = -150
				set_temp_variable = { political_legitimacy_change = -0.05 }
				eoanb_political_legitimacy_change = yes
				ENG = {
					country_event = { id =  JAP_tokugawa_shogunate.154 days = 50 }
				}
			}
		}
	# ENG demands reperations (SAT)
		country_event = {
			id = JAP_tokugawa_shogunate.152
			title = JAP_tokugawa_shogunate.152.t
			desc = JAP_tokugawa_shogunate.152.d
			picture = GFX_report_event_jap_disembarking_troops

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.152.a
				ai_chance = { base = 1}
				TSH = {
					country_event = { id =  JAP_tokugawa_shogunate.153 days = 30 }
				}
				ENG = {
					country_event = { id =  JAP_tokugawa_shogunate.153 days = 30 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.152.b
				ai_chance = { base = 0 }
				add_political_power = -150
				add_command_power = -50
				set_temp_variable = { political_legitimacy_change = -0.05 }
				eoanb_political_legitimacy_change = yes
				ENG = {
					country_event = { id =  JAP_tokugawa_shogunate.154 days = 50 }
				}
			}
		}
	# Satsuma Refuses
		country_event = {
			id = JAP_tokugawa_shogunate.153
			title = JAP_tokugawa_shogunate.153.t
			desc = JAP_tokugawa_shogunate.153.d
			picture = GFX_report_event_jap_japan_map_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.153.a
				trigger = { tag = TSH }
				add_political_power = -5
				if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 80
							}
						}
						EOANBSYS_national_crisis_progress_minus_five = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 65
							}
						}
						EOANBSYS_national_crisis_progress_minus_three = yes
					}
					else = {
						EOANBSYS_national_crisis_progress_minus_one = yes
					}
			}
			option = {
				name = JAP_tokugawa_shogunate.153.b
				trigger = { tag = ENG }
				add_war_support = 0.05
				TSH = { country_event = { id = JAP_tokugawa_shogunate.155 days = 200 } }
			}
		}
	# Satsuma Pays
		country_event = {
			id = JAP_tokugawa_shogunate.154
			title = JAP_tokugawa_shogunate.154.t
			desc = JAP_tokugawa_shogunate.154.d
			picture = GFX_report_event_jap_japan_map_2

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.154.a
				trigger = { tag = TSH }
				reverse_add_opinion_modifier = { target = ENG modifier = medium_increase }
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 65
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_minus_one = yes
				}
				for_each_scope_loop = {
					array = subjects
					country_event = JAP_tokugawa_shogunate.154
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.154.a
				trigger = { tag = ENG }
				add_political_power = 25
				add_popularity = {
					ideology = centrism
					popularity = 0.02
				}
				TSH = { country_event = JAP_tokugawa_shogunate.154 }
			}
		}
	# ENG Demands Reperations 2
		country_event = {
			id = JAP_tokugawa_shogunate.155
			title = JAP_tokugawa_shogunate.155.t
			desc = JAP_tokugawa_shogunate.155.d
			picture = GFX_report_event_jap_black_ships

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.155.a
				trigger = { tag = TSH }
				add_political_power = -100
				add_command_power = -50
				set_temp_variable = { political_legitimacy_change = -0.05 }
				eoanb_political_legitimacy_change = yes
				SAT = {
					country_event = { id =  JAP_tokugawa_shogunate.155 days = 5 }
				}
				if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 80
						}
					}
					EOANBSYS_national_crisis_progress_minus_ten = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 70
						}
					}
					EOANBSYS_national_crisis_progress_minus_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 60
						}
					}
					EOANBSYS_national_crisis_progress_minus_three = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value > 50
						}
					}
					EOANBSYS_national_crisis_progress_minus_two = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 30
						}
					}
					EOANBSYS_national_crisis_progress_add_five = yes
				}
				else_if = {
					limit = {
						check_variable = {
							var = EOANBSYS_national_crisis_progress_var
							value < 40
						}
					}
					EOANBSYS_national_crisis_progress_add_three = yes
				}
				else = {
					EOANBSYS_national_crisis_progress_add_two = yes
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.155.b
				trigger = { tag = SAT }
				add_war_support = 0.10
				add_stability = 0.05
				add_popularity = {
					ideology = autocracy
					popularity = 0.10
				}
				hidden_effect = {
					ENG = {
						country_event = { id = JAP_tokugawa_shogunate.156 days = 30 }
					}
				}
			}
		}
	# Anglo-Satsuma War
		country_event = {
			id = JAP_tokugawa_shogunate.156
			title = JAP_tokugawa_shogunate.156.t
			desc = JAP_tokugawa_shogunate.156.d
			picture = GFX_report_event_jap_black_ships

			is_triggered_only = yes
			immediate = {
				hidden_effect = {
					SAT = { set_country_flag = eoanb_diplomaticaly_neutral_vassal }
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.156.a
				# declare_war_on = {
				# 	target = SAT
				# 	type = wargoal_diplomatic_humiliation
				# }
				SAT = {
					capital_scope = {
						set_demilitarized_zone = yes
					}
				}
				news_event = JAP_tokugawa_shogunate.157
			}
		}
		news_event = {
			id = JAP_tokugawa_shogunate.157
			title = JAP_tokugawa_shogunate.157.t
			desc = JAP_tokugawa_shogunate.157.d
			picture = GFX_news_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes
			major = yes

			immediate = {
				hidden_effect = {
					if = {
						limit = { tag = ENG }
						country_event = { id = JAP_tokugawa_shogunate.158 days = 10 }
					}
					if = {
						limit = { tag = SAT }
						country_event = { id = JAP_tokugawa_shogunate.158 days = 10 }
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.157.a
				if = {
					limit = { is_japanese_country = yes }
					add_popularity = {
						ideology = fundamentalism
						popularity = 0.05
					}
					add_war_support = 0.10
				}
				if = {
					limit = { tag = SAT }
					add_stability = 0.10
				}
				if = {
					limit = { tag = TSH }
					if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 80
							}
						}
						EOANBSYS_national_crisis_progress_minus_ten = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 70
							}
						}
						EOANBSYS_national_crisis_progress_minus_five = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 60
							}
						}
						EOANBSYS_national_crisis_progress_minus_three = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value > 50
							}
						}
						EOANBSYS_national_crisis_progress_minus_two = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 30
							}
						}
						EOANBSYS_national_crisis_progress_add_five = yes
					}
					else_if = {
						limit = {
							check_variable = {
								var = EOANBSYS_national_crisis_progress_var
								value < 40
							}
						}
						EOANBSYS_national_crisis_progress_add_three = yes
					}
					else = {
						EOANBSYS_national_crisis_progress_add_two = yes
					}
				}
				if = {
					limit = { tag = ENG }
					add_war_support = 0.02
					add_timed_idea = {
						idea = TSH_spirit_eng_win_anglo_satsuma_war
						days = 360
					}
				}
			}
		}
		country_event = {
			id = JAP_tokugawa_shogunate.158
			title = JAP_tokugawa_shogunate.158.t
			desc = JAP_tokugawa_shogunate.158.d
			picture = GFX_report_event_jap_battle_of_shimonoseki_straits

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = ENG }
					white_peace = SAT
				}
				else_if = {
					limit = { tag = SAT }
					every_country = {
						limit = { is_japanese_country = yes }
						country_event = { id = JAP_tokugawa_shogunate.158 days = 2 }
					}
					capital_scope = {
						set_demilitarized_zone = no
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.158.a
				trigger = { tag = SAT }
				add_political_power = -50
				capital_scope = {
					add_manpower = -223
					damage_building = {
						type = infrastructure
						damage = 2
					}
				}
				clr_country_flag = eoanb_diplomaticaly_neutral_vassal
			}
			option = {
				name = JAP_tokugawa_shogunate.158.b
				trigger = { tag = ENG }
				add_political_power = 20
				add_manpower = -15
				set_temp_variable = { eoanb_prestige_change = 2 }
				eoanb_change_prestige_score = yes
				add_war_support = -0.03
			}
			option = {
				name = JAP_tokugawa_shogunate.158.c
				trigger = { NOT = { tag = SAT tag = ENG } }
			}
		}
	# Hard Balances 
		country_event = {
			id = JAP_tokugawa_shogunate.196
			title = JAP_tokugawa_shogunate.200.t
			hidden = yes

			is_triggered_only = yes

			immediate = {
				EOANBSYS_national_crisis_progress_add_ten = yes
			}
		}

		country_event = {
			id = JAP_tokugawa_shogunate.197
			hidden = yes

			is_triggered_only  = yes
			immediate = {
				EOANBSYS_national_crisis_progress_minus_three = yes
			}
		}
# Flavor Events
	# Lift of Philip Franz von Siebold's banishment
		country_event = {
			id = JAP_tokugawa_shogunate.160
			title = JAP_tokugawa_shogunate.160.t
			desc = JAP_tokugawa_shogunate.160.d
			picture = GFX_report_event_jap_japan_map_1

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.160.a
				ai_chance = { base = 0 }
			}
			option = {
				name = JAP_tokugawa_shogunate.160.b
				ai_chance = { base = 100 }

				add_advisor_role = {
					character = TSH_character_philip_franz_von_siebold
					advisor = {
						slot = political_advisor
						cost = 25
						idea_token = TSH_character_philip_franz_von_siebold

						ai_will_do = { base = 10 }

						cost = 75
						removal_cost = -10

						research_bonus = {
							humanities_tech = 0.15
						}

						modifier = {
							political_power_cost = -0.05
						}
					}
					reverse_add_opinion_modifier = {
						target = HOL
						modifier = large_decrease
					}
				}

				hidden_effect = {
					country_event = {
						id = JAP_tokugawa_shogunate.161
						days = 1900
					}
				}
			}
		}
	# Death of Siebold
		country_event = {
			id = JAP_tokugawa_shogunate.161
			title = JAP_tokugawa_shogunate.161.d
			desc = JAP_tokugawa_shogunate.161.t

			picture = GFX_report_event_flavor_funeral

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.161.a
				retire_character = TSH_character_philip_franz_von_siebold
			}
		}
	# Saionji Inmochi
		country_event = {
			id = JAP_tokugawa_shogunate.162
			title = JAP_tokugawa_shogunate.162.t
			desc = JAP_tokugawa_shogunate.162.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.162.a
				trigger = { tag = JAP }
				JAP_character_saionji_inmochi = {
					add_corps_commander_role = {
						# name = "Saionji Kinmochi"
						# picture = "Portrait_JAP_Saionji_Kinmochi.dds"
						traits = { aggressive_assaulter }
						skill = 3
						attack_skill = 4
						defense_skill = 2
						planning_skill = 1
						logistics_skill = 1
					}
				}
				TSH = {
					country_event = {
						id = JAP_tokugawa_shogunate.162
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.162.b
				trigger = { tag = TSH }
				add_manpower = -360
			}
		}
		country_event = {
			id = JAP_tokugawa_shogunate.163
			title = JAP_tokugawa_shogunate.163.t
			desc  = JAP_tokugawa_shogunate.163.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.163.a
				trigger = { tag = JAP }
				add_advisor_role = {
					character = JAP_character_saionji_inmochi
					advisor = {
						slot = political_advisor
						cost = 25
						idea_token = JAP_character_saionji_inmochi

						ai_will_do = { base = 10 }

						modifier = {
							stability_weekly = 0.05
							political_power_gain = 0.15
							traditional_conservatism_drift = -0.02
						}
					}
				}
			}
		}
# Tsushima Crisis
	# Russia breaches Japanese Isolation Policy
		country_event = {
			id = JAP_tokugawa_shogunate.171
			title = JAP_tokugawa_shogunate.171.t
			desc = JAP_tokugawa_shogunate.171.d
			picture = GFX_report_event_generic_sailship
			
			is_triggered_only = yes
			
			#Call Britain for Help
			option = {
				name = JAP_tokugawa_shogunate.171.a
				ai_chance = { factor = 95 }
				ENG = { country_event = { id = JAP_tokugawa_shogunate.173 days = 1 } }
			}
			
			#Back down and give Russia Tsushima
			option = {
				name = JAP_tokugawa_shogunate.171.b
				ai_chance = { 
					factor = 5 
					modifier = {
						factor = 0
						is_historical_focus_on = yes
					}
				}
				RUS = { country_event = { id = JAP_tokugawa_shogunate.172 days = 1 } }
			}
			
		}

	# Japan gives Tsushima to Russia
		country_event = {
			id = JAP_tokugawa_shogunate.172
			title = JAP_tokugawa_shogunate.172.t
			desc = JAP_tokugawa_shogunate.172.d
			picture = GFX_report_event_generic_sign_treaty2
			
			is_triggered_only = yes
			
			#How nice of them
			option = {
				name = JAP_tokugawa_shogunate.172.a
				ai_chance = { factor = 100 }
				RUS = { transfer_state = 1231 }
				TSH = {
					remove_state_core = 1231
					add_state_claim = 1231
				}
				hidden_effect = {
					news_event = news.18
				}	
			}
			
		}

	# Japan calls Britain for Help
		country_event = {
			id = JAP_tokugawa_shogunate.173
			title = JAP_tokugawa_shogunate.173.t
			desc = JAP_tokugawa_shogunate.173.d
			picture = GFX_report_event_generic_sign_treaty2
			
			is_triggered_only = yes
			
			#Britain will help
			option = {
				name = JAP_tokugawa_shogunate.173.a
				ai_chance = {
					factor = 85
					modifier = {
						factor = 0.5
						has_opinion = { target = TSH value < 0 }
					}
				}
				reverse_add_opinion_modifier = { target = TSH modifier = eoanb_om_tsushima_ENG_did_help }
				hidden_effect = {
					set_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
				}
			}
			
			#They are on their own
			option = {
				name = JAP_tokugawa_shogunate.173.b
				ai_chance = {
					factor = 15
					modifier = {
						factor = 0
						is_historical_focus_on = yes
					}
					modifier = {
						factor = 4
						has_opinion = { target = TSH value > 25 }
					}
				}
				reverse_add_opinion_modifier = { target = TSH modifier = eoanb_om_tsushima_ENG_didnt_help }
				hidden_effect = {
					set_global_flag = eoanb_flag_tsushima_ENG_denied_TSH
				}
			}
			
		}

	# The Tsushima Clashes
		country_event = {
			id = JAP_tokugawa_shogunate.174
			title = JAP_tokugawa_shogunate.174.t
			desc = JAP_tokugawa_shogunate.174.d
			picture = GFX_report_event_dead_soldiers
			
			fire_only_once = yes
			is_triggered_only = yes
			
			trigger = {
				TAG = TSH
				OR = {
					has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					has_global_flag = eoanb_flag_tsushima_ENG_denied_TSH
				}
				#date > 1861.4.11
			}
			
			#Horrible
			option = {
				name = JAP_tokugawa_shogunate.174.a
				ai_chance = { factor = 100 }
				add_opinion_modifier = { target = RUS modifier = eoanb_om_tsushima_clashes }
				reverse_add_opinion_modifier = { target = RUS modifier = eoanb_om_tsushima_clashes }
				hidden_effect = {
					set_global_flag = eoanb_flag_tsushima_incident_1
				}
			}
			
		}

	#The Tsushima Incident
		country_event = {
			id = JAP_tokugawa_shogunate.175
			title = JAP_tokugawa_shogunate.175.t
			desc = JAP_tokugawa_shogunate.175.d
			picture = GFX_report_event_chinese_soldiers_city_ruin
			
			is_triggered_only = yes
			
			#What else must this island endure
			option = {
				name = JAP_tokugawa_shogunate.175.a
				ai_chance = { factor = 100 }
				add_opinion_modifier = { target = RUS modifier = eoanb_om_tsushima_incident }
				reverse_add_opinion_modifier = { target = RUS modifier = eoanb_om_tsushima_incident }
				hidden_effect = {
					set_global_flag = eoanb_flag_tsushima_incident_2
				}
			}
			
		}

	# The Coastline Charter
		country_event = {
			id = JAP_tokugawa_shogunate.176
			title = JAP_tokugawa_shogunate.176.t
			desc = JAP_tokugawa_shogunate.176.d
			picture = GFX_report_event_generic_read_write
			
			is_triggered_only = yes
			
			#Tsushima Authorities say Yes
			option = {
				name = JAP_tokugawa_shogunate.176.a
				ai_chance = { 
					factor = 5
					modifier = {
						factor = 0
						is_historical_focus_on = yes
					}
				}
				RUS = { country_event = { id = JAP_tokugawa_shogunate.172 days = 1 } }
				hidden_effect = {
					clr_global_flag = eoanb_flag_tsushima_incident_1
					clr_global_flag = eoanb_flag_tsushima_incident_2
				}
			}
			
			#Tsushima Authorities say No
			option = {
				name = JAP_tokugawa_shogunate.176.b
				ai_chance = { factor = 95 }
				RUS = { country_event = { id = JAP_tokugawa_shogunate.178 days = 2 } }
				if = {
					limit = {
						has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					RUS = { country_event = { id = JAP_tokugawa_shogunate.177 days = 1 } }
				}
				hidden_effect = {
					clr_global_flag = eoanb_flag_tsushima_incident_1
					clr_global_flag = eoanb_flag_tsushima_incident_2
				}
			}
			
		}

	# Russia gets message Britain backs up Japan
		country_event = {
			id = JAP_tokugawa_shogunate.177
			title = JAP_tokugawa_shogunate.177.t
			desc = JAP_tokugawa_shogunate.177.d
			picture = GFX_report_event_canada_treaty
			
			is_triggered_only = yes
			
			#This is bad for us
			option = {
				name = JAP_tokugawa_shogunate.177.a
				ai_chance = { factor = 100 }
				add_opinion_modifier = { target = ENG modifier = eoanb_om_ENG_supports_against_RUS }
			}
			
		}

	# Russia gets message Tsushima Authorities said No
		country_event = {
			id = JAP_tokugawa_shogunate.178
			title = JAP_tokugawa_shogunate.178.t
			desc = JAP_tokugawa_shogunate.178.d
			picture = GFX_report_event_generic_sign_treaty1
			
			is_triggered_only = yes
			
			#We will have to back down
			option = {
				name = JAP_tokugawa_shogunate.178.a
				ai_chance = { factor = 75 }
				TSH = { country_event = { id = JAP_tokugawa_shogunate.179 days = 1 } }
				if = {
					limit = {
						has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					ENG = { country_event = { id = JAP_tokugawa_shogunate.179 days = 1 } }
				}
			}
			
			#We refuse to back down
			option = {
				name = JAP_tokugawa_shogunate.178.b
				ai_chance = {
					factor = 25
					modifier = {
						factor = 0
						is_historical_focus_on = yes
					}
				}
				TSH = { country_event = { id = JAP_tokugawa_shogunate.180 days = 1 } }
				if = {
					limit = {
						has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					ENG = { country_event = { id = JAP_tokugawa_shogunate.180 days = 1 } }
				}
			}
			
		}

	# Russia backs down
		country_event = {
			id = JAP_tokugawa_shogunate.179
			title = JAP_tokugawa_shogunate.179.t
			desc = JAP_tokugawa_shogunate.179.d
			picture = GFX_report_event_usa_election_generic
			
			is_triggered_only = yes
			
			#Good
			option = {
				name = JAP_tokugawa_shogunate.179.a
				ai_chance = { factor = 100 }
				hidden_effect = {
					if = {
						limit = {
							TAG = TSH
						}
						news_event = news.19
					}
				}
			}
			
		}

	# Refusal to back down - threaten Russia with war
		country_event = {
			id = JAP_tokugawa_shogunate.180
			title = JAP_tokugawa_shogunate.180.t
			desc = JAP_tokugawa_shogunate.180.d
			picture = GFX_report_event_soldiers_marching
			
			is_triggered_only = yes
			
			#We will threaten war
			option = {
				name = JAP_tokugawa_shogunate.180.a
				ai_chance = { factor = 95 }
				RUS = { country_event = { id = JAP_tokugawa_shogunate.181 days = 1 } }
				trigger = {
					TAG = TSH
				}
			}
			
			#We will back down if they want it so much - war is not worth it
			option = {
				name = JAP_tokugawa_shogunate.180.b
				ai_chance = { factor = 5 }
				RUS = { country_event = { id = JAP_tokugawa_shogunate.172 days = 1 } }
				trigger = {
					TAG = TSH
				}
			}
			
			#We will back up Japan in case of war
			option = {
				name = JAP_tokugawa_shogunate.180.c
				ai_chance = { factor = 100 }
				trigger = {
					TAG = ENG
				}
			}
			
		}

	# Japan threatens War
		country_event = {
			id = JAP_tokugawa_shogunate.181
			title = JAP_tokugawa_shogunate.181.t
			desc = JAP_tokugawa_shogunate.181.d
			picture = GFX_report_event_king_speech
			
			is_triggered_only = yes
			
			#We will back down then
			option = {
				name = JAP_tokugawa_shogunate.181.a
				ai_chance = { factor = 80 }
				TSH = { country_event = { id = JAP_tokugawa_shogunate.179 days = 1 } }
				if = {
					limit = {
						has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					ENG = { country_event = { id = JAP_tokugawa_shogunate.179 days = 1 } }
				}
			}
			
			#They can have a war
			option = {
				name = JAP_tokugawa_shogunate.181.b
				ai_chance = { factor = 20 }
				declare_war_on = { target = TSH type = annex_everything }
				custom_effect_tooltip = eoanb_tt_event_tsushima_11_b
				hidden_effect = {
					TSH = { country_event = { id = JAP_tokugawa_shogunate.182 days = 1 } }
					if = {
						limit = {
							has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
						}
						ENG = { country_event = { id = JAP_tokugawa_shogunate.182 days = 1 } }
					}
					news_event = news.20
				}
			}
			
		}

	# Russia declared war on Japan
		country_event = {
			id = JAP_tokugawa_shogunate.182
			title = JAP_tokugawa_shogunate.182.t
			desc = JAP_tokugawa_shogunate.182.d
			picture = GFX_report_event_nationalist_china_machinegun_firing
			
			is_triggered_only = yes
			
			#We will fight them off
			option = {
				name = JAP_tokugawa_shogunate.182.a
				ai_chance = { factor = 100 }
				trigger = {
					TAG = TSH
				}
				hidden_effect = {
					set_global_flag = eoanb_flag_tsushima_war_ongoing
				}
			}
			
			#We will come to Japans Defense
			option = {
				name = JAP_tokugawa_shogunate.182.b
				ai_chance = { factor = 100 }
				add_to_war = { 
					targeted_alliance = TSH 
					enemy = RUS
				}
				custom_effect_tooltip = eoanb_tt_event_tsushima_12_b
				trigger = {
					TAG = ENG
				}
			}
			
		}

	# Russia loses the War
		country_event = {
			id = JAP_tokugawa_shogunate.183
			title = JAP_tokugawa_shogunate.183.t
			desc = JAP_tokugawa_shogunate.183.d
			picture = GFX_report_event_generic_sign_treaty1
			
			fire_only_once = yes
			is_triggered_only = yes
			
			trigger = {
				TAG = RUS
				has_global_flag = eoanb_flag_tsushima_war_ongoing
				OR = {
					RUS = { surrender_progress > 0.35 }
					RUS = { has_army_manpower = { size < 25000 } }
					RUS = { NOT = { controls_state = 195 } }
					AND = {
						RUS = { NOT = { controls_state = 1231 } }
						date > 1865.6.1
					}
					AND = {
						RUS = { NOT = { controls_state = 655 } }
						RUS = { NOT = { controls_state = 555 } }
						RUS = { NOT = { controls_state = 562 } }
						RUS = { NOT = { controls_state = 637 } }
						RUS = { NOT = { controls_state = 644 } }
						RUS = { NOT = { controls_state = 574 } }
						RUS = { NOT = { controls_state = 563 } }
						RUS = { NOT = { controls_state = 565 } }
						RUS = { NOT = { controls_state = 564 } }
					}
				}
			}
			
			#We have lost
			option = {
				name = JAP_tokugawa_shogunate.183.a
				ai_chance = { factor = 100 }
				TSH = { 
					transfer_state = 655
					add_state_core = 655
					transfer_state = 537
					remove_state_claim = 537
					transfer_state = 555
					remove_state_claim = 535
				}
				RUS = {
					remove_state_core = 655
					add_state_claim = 655
				}
				if = {
					limit = {
						has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					TSH = { country_event = { id = JAP_tokugawa_shogunate.184 days = 1 } }
				}
				RUS = { add_timed_idea = { idea = eoanb_idea_tsushima_paying_reparations days = 365 } }
				TSH = { add_timed_idea = { idea = eoanb_idea_tsushima_receiving_reparations days = 365 } }
				if = {
					limit = {
						has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					ENG = { add_timed_idea = { idea = eoanb_idea_tsushima_receiving_reparations days = 365 } }
				}
				hidden_effect = {
					white_peace = TSH
					white_peace = RYU
					if = {
						limit = {
							has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
						}
						white_peace = ENG
						white_peace = BCO
					}
					clr_global_flag = eoanb_flag_tsushima_war_ongoing
					if = {
						limit = {
							has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
						}
						clr_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					if = {
						limit = {
							has_global_flag = eoanb_flag_tsushima_ENG_denied_TSH
						}
						clr_global_flag = eoanb_flag_tsushima_ENG_denied_TSH
					}
				}
			}
		}

	# Japan gets asked to open ports
		country_event = {
			id = JAP_tokugawa_shogunate.184
			title = JAP_tokugawa_shogunate.184.t
			desc = JAP_tokugawa_shogunate.184.d
			picture = GFX_report_event_generic_read_write
			
			is_triggered_only = yes
			
			#The British deserve it
			option = {
				name = JAP_tokugawa_shogunate.184.a
				ai_chance = { factor = 98 }
				ENG = { give_military_access = TSH }
			}
			
			#No, that is not okay
			option = {
				name = JAP_tokugawa_shogunate.184.b
				ai_chance = { factor = 2 }
				ENG = { country_event = { id = JAP_tokugawa_shogunate.185 days = 1 } }
			}
			
		}

	# Japan refuses to open ports
		country_event = {
			id = JAP_tokugawa_shogunate.185
			title = JAP_tokugawa_shogunate.185.t
			desc = JAP_tokugawa_shogunate.185.d
			picture = GFX_report_event_generic_read_write
			
			is_triggered_only = yes
			
			#We have to accept that
			option = {
				name = JAP_tokugawa_shogunate.185.a
				ai_chance = { factor = 98 }
				add_opinion_modifier = { target = TSH modifier = eoanb_om_tsushima_TSH_broke_treaty }
			}
			
			#If they want another war, they can have it
			option = {
				name = JAP_tokugawa_shogunate.185.b
				ai_chance = { factor = 2 }
				declare_war_on = { target = TSH type = puppet_wargoal_focus }
			}
			
		}

	# Russia wins the War
		country_event = {
			id = JAP_tokugawa_shogunate.186
			title = JAP_tokugawa_shogunate.186.t
			desc = JAP_tokugawa_shogunate.186.d
			picture = GFX_report_event_generic_sign_treaty1
			
			fire_only_once = yes
			is_triggered_only = yes
			
			trigger = {
				TAG = RUS
				has_global_flag = eoanb_flag_tsushima_war_ongoing
				TSH = { surrender_progress > 0.5 }
				OR = {
					TSH = { surrender_progress > 0.6 }
					ENG = { surrender_progress > 0.4 }
					TSH = { has_army_manpower = { size < 10000 } }
					ENG = { NOT = { controls_state = 952 } }
				}
			}
			
			#We have won
			option = {
				name = JAP_tokugawa_shogunate.186.a
				ai_chance = { factor = 100 }
				RUS = { 
					transfer_state = 1231
					add_state_core = 1231
				}
				TSH = {
					remove_state_core = 1231
					add_state_claim = 1231
				}
				RUS = { 
					transfer_state = 750
					add_state_core = 750
				}
				TSH = {
					remove_state_core = 750
					add_state_claim = 750
				}
				RUS = { 
					transfer_state = 537
					remove_state_claim = 537
				}
				RUS = { 
                    transfer_state = 655 # North Sakhalin
                    remove_state_claim = 655
                }
				RUS = { 
                    transfer_state = 555 # Kuril Islands
                    add_state_core = 555
                }
				if = {
					limit = {
						has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					ENG = { add_timed_idea = { idea = eoanb_idea_tsushima_paying_reparations days = 365 } }
				}
				TSH = { add_timed_idea = { idea = eoanb_idea_tsushima_paying_reparations days = 365 } }
				RUS = { add_timed_idea = { idea = eoanb_idea_tsushima_receiving_reparations days = 365 } }
				if = {
					limit = {
						has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					ENG = { add_timed_idea = { idea = eoanb_idea_tsushima_receiving_reparations days = 365 } }
				}
				hidden_effect = {
					white_peace = TSH
					white_peace = RYU
					if = {
						limit = {
							has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
						}
						white_peace = ENG
						white_peace = BCO
					}
					clr_global_flag = eoanb_flag_tsushima_war_ongoing
					if = {
						limit = {
							has_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
						}
						clr_global_flag = eoanb_flag_tsushima_ENG_allied_TSH
					}
					if = {
						limit = {
							has_global_flag = eoanb_flag_tsushima_ENG_denied_TSH
						}
						clr_global_flag = eoanb_flag_tsushima_ENG_denied_TSH
					}
				}
			}
			
		}

# Boshin War
	# Debug 1
	country_event = {
		id = JAP_tokugawa_shogunate.198
		title = JAP_tokugawa_shogunate.198.t
		desc = JAP_tokugawa_shogunate.198.d

		is_triggered_only = yes

		option = {
			name = JAP_tokugawa_shogunate.198.a
			1261 = { state_event = JAP_tokugawa_shogunate.202 }
		}
	}
	# Debug 2
		country_event = {
			id = JAP_tokugawa_shogunate.199
			hidden = yes

			is_triggered_only = yes

			immediate = {
				eoanb_score_system_calc = yes
			}
		}
	# The Boshin War Trigger
		country_event = {
			id = JAP_tokugawa_shogunate.200
			title = JAP_tokugawa_shogunate.200.t
			desc = JAP_tokugawa_shogunate.200.d

			is_triggered_only = yes

			immediate = {
				hidden_effect = {
					every_owned_state = {
						set_demilitarized_zone = no
					}
					clear_array = TSH_boshin_war_han_ranks_tag
					clear_array = boshin_war_meiji_states
					for_each_loop = {
						array =	global.score_array
						value = v
						index = i
						if = {
							limit = { var:global.score_tag_array^i = { is_subject_of = TSH } }
							add_to_array = { TSH_boshin_war_han_ranks_tag = global.score_tag_array^i }
							# log = "Adding Tag: [?global.score_tag_array^i.GetName]"
						}
					}

					set_variable = { boshin_war_han_switch_tag = 0 }
					var:TSH_boshin_war_han_ranks_tag^boshin_war_han_switch_tag = { country_event = JAP_tokugawa_shogunate.209 }

					JAP = {
						# Setup
							transfer_state = 1106
							1106 = {
								remove_core_of = TSH
								add_core_of = JAP
							}
							every_country = {
								limit = { is_japanese_country = yes }
								division_template = {
									name = "Boshin Garrison"
									is_locked = yes
									division_names_group = JAP_GAR_01
									priority = 0
									template_counter = 1
									regiments = {
										light_infantry = { x = 0 y = 0 }
									}
								}
							}
							inherit_technology = TSH
							set_variable = { innovation_progress = TSH.innovation_progress }
							set_variable = { humanities_progress = TSH.humanities_progress }
							SAT = {
								transfer_navy = {
									target = JAP
								}
							}
							SAG = {
								transfer_navy = {
									target = JAP
								}
							}
							CHO = {
								transfer_navy = {
									target = JAP
								}
							}
							TOS = {
								transfer_navy = {
									target = JAP
								}
							}
							TSU = {
								transfer_navy = {
									target = JAP
								}
							}
							MIT = {
								transfer_navy = {
									target = JAP
								}
							}
							DTE = {
								transfer_navy = {
									target = JAP
								}
							}
							SHI = {
								transfer_navy = {
									target = JAP
								}
							}

							if = {
								limit = {
									TSH = {
										has_idea = victorian_era
									}
								}
								add_ideas = victorian_era
							}

							set_cosmetic_tag = JAP_meiji_rebellion_cosmetic

							# Kemi
								if = {
									limit = { TSH = { has_idea = TSH_spirit_vic_sakoku_kemi } }
									add_ideas = TSH_spirit_vic_sakoku_kemi
								}
								else_if = {
									limit = { TSH = { has_idea = TSH_spirit_vic_sakoku_kemi_1 } }
									add_ideas = TSH_spirit_vic_sakoku_kemi_1
								}
								else_if = {
									limit = { TSH = { has_idea = TSH_spirit_vic_sakoku_kemi_2 } }
									add_ideas = TSH_spirit_vic_sakoku_kemi_2
								}
							# Han System
								if = {
									limit = { TSH = { has_idea = TSH_spirit_vic_han_system } }
									add_ideas = TSH_spirit_vic_han_system
								}
								else_if = {
									limit = { TSH = { has_idea = TSH_spirit_vic_han_system_1 } }
									add_ideas = TSH_spirit_vic_han_system_1
								}

							set_popularities = {
								autocracy = 82
								radical_democracy = 3
								fundamentalism = 9
								traditional_conservatism = 6
							}

							set_party_name = {
								ideology = radical_democracy
								name = TSH_tokugawa_shogunate_absolute_party
								long_name = TSH_tokugawa_shogunate_absolute_party_long
							}
							set_party_name = {
								ideology = traditional_conservatism
								name = TSH_westerning_party
								long_name = TSH_westerning_party_long
							}
							set_party_name = {
								ideology = autocracy
								name = TSH_imperial_house_party
								long_name = TSH_imperial_house_party_long
							}
							set_party_name = {
								ideology = centrism
								name = TSH_freedom_party
								long_name = TSH_freedom_party_long
							}
							set_party_name = {
								ideology = fundamentalism
								name = TSH_shinto_party
								long_name = TSH_shinto_party
							}
						# Transfers
						add_to_array = { TSH.boshin_war_meiji_states = 1231 }
						add_to_array = { TSH.boshin_war_meiji_states = 1258 }
						add_to_array = { TSH.boshin_war_meiji_states = 528 }
						add_to_array = { TSH.boshin_war_meiji_states = 1261 }
						add_to_array = { TSH.boshin_war_meiji_states = 529 }
						add_to_array = { TSH.boshin_war_meiji_states = 1263 }
						if = {
							limit = { TSH = { autocracy > 0.40 } }
							add_to_array = { TSH.boshin_war_meiji_states = 531 }
						}
						if = {
							limit = { TSH = { autocracy > 0.57 } }
							add_to_array = { TSH.boshin_war_meiji_states = 1269 }
						}
						if = {
							limit = { TSH = { autocracy > 0.64 } }
							add_to_array = { TSH.boshin_war_meiji_states = 1277 }
						}
						for_each_scope_loop = {
							array = TSH.boshin_war_meiji_states
							set_demilitarized_zone = yes
							state_event = { id = JAP_tokugawa_shogunate.202 days = 2 random_days = 19 trigger_for = controller }
						}
					}
					set_variable = {
						var = transfer_temp
						value = party_popularity@autocracy
					}
					clamp_variable = {
						var = transfer_temp
						min = 0.2
						max = 0.7
					}
					transfer_units_fraction = {
						target = JAP
						size = 0.5
						army_ratio = var:transfer_temp
						navy_ratio = 0.0
						air_ratio = 0.0
						keep_unit_leaders_trigger = { always = yes }
					}
					send_equipment_fraction = {
						target = JAP
						value = var:transfer_temp
					}
					clear_variable = transfer_temp
					news_event = { id = JAP_tokugawa_shogunate.205 days = 30 }
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.200.a
				complete_national_focus = JAP_vic_the_boshin_war
				remove_ideas = {
					TSH_spirit_vic_bakufu_shogunate_divided
					TSH_spirit_vic_bakufu_emperor_reserved
					TSH_spirit_vic_bakufu_emperor_emboldened
					# TSH_spirit_vic_han_sankin_kotai
				}
				hidden_effect = {
					country_lock_all_division_template = yes
				}
			}
		}
	# States Join Meiji Rebellion
		state_event = {
			id = JAP_tokugawa_shogunate.202
			hidden = yes
			is_triggered_only = yes

			immediate = {
				# log = "[GetDateText]: [?THIS.id]: event JAP_tokugawa_shogunate.202"
				randomize_temp_variable = {
					var = delayy
					distribution = uniform
					min = 4
					max = 20
				}
				round_temp_variable = delayy
				state_event = { id = JAP_tokugawa_shogunate.203 }
			}
		}
		state_event = {
			id = JAP_tokugawa_shogunate.203
			hidden = yes
			is_triggered_only = yes

			trigger = {
				is_owned_by = TSH
			}

			immediate = {
				# log = "[GetDateText]: [?THIS.id]: event JAP_tokugawa_shogunate.203"
				set_demilitarized_zone = no
				remove_core_of = TSH
				add_core_of = JAP
				JAP = { transfer_state = PREV }
				create_unit = {
					division = "division_template = \"Boshin Garrison\" start_experience_factor = 0.03 start_equipment_factor = 0.5"
					owner = OWNER
				}
				every_country = {
					limit = { is_japanese_country = yes }
					country_event = { id = JAP_tokugawa_shogunate.204 }
				}
			}
		}
		country_event = {
			id = JAP_tokugawa_shogunate.204
			title = JAP_tokugawa_shogunate.204.t
			desc = {
				trigger = { OR = { tag = TSH is_subject_of = TSH } }
				text = JAP_tokugawa_shogunate.204.d_shogunate
			}
			desc = {
				trigger = { NOT = { OR = { tag = TSH is_subject_of = TSH } } }
				text = JAP_tokugawa_shogunate.204.d_imperial
			}

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.204.a
				trigger = { tag = JAP }
				if = {
					limit = { is_in_faction = no }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.204.b
				trigger = { tag = TSH }
				add_popularity = {
					ideology = radical_democracy
					popularity = 0.015
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.204.a
				trigger = { is_subject_of = JAP }
			}
			option = {
				name = JAP_tokugawa_shogunate.204.b
				trigger = { is_subject_of = TSH }
			}
			option = {
				name = JAP_tokugawa_shogunate.204.c
				trigger = { NOT = { OR = { tag = TSH tag = JAP is_subject_of = TSH is_subject_of = JAP } } }
			}
		}
	# Boshin War Start
		news_event = {
			id = JAP_tokugawa_shogunate.205
			title = JAP_tokugawa_shogunate.205.t
			desc = {
				trigger = { is_japanese_country = yes }
				text = JAP_tokugawa_shogunate.205.d_japan
			}
			desc = {
				trigger = { is_japanese_country = no }
				text = JAP_tokugawa_shogunate.205.d_world
			}
			picture = GFX_news_event_boshin_war

			is_triggered_only = yes

			immediate = {
				hidden_effect = {
					if = {
						limit = { tag = TSH }
						add_popularity = {
							ideology = autocracy
							popularity = -0.50
						}
						country_event = { id = JAP_tokugawa_shogunate.260 days = 10 random_days = 100 }
						UCT = { activate_mission = JAP_decision_boshin_war_tokugawan_navy_defect }
						every_other_country = {
							country_event = JAP_tokugawa_shogunate.205
						}
					}
					if = {
						limit = { tag = JAP }
						declare_war_on = {
							target = TSH
							type = jap_boshin_war_wargoal
						}
						add_named_threat = {
							threat = 5
							name = "The Boshin War"
						}
						add_ideas = TSH_spirit_boshin_buff
					}
					if = {
						limit = {
							OR = {
								tag = TSH
								tag = JAP
								is_subject_of = TSH
								is_subject_of = JAP
							}
						}
						activate_mission = JAP_decision_boshin_war_imperial_surrender_tokugawa
						activate_mission = JAP_decision_boshin_war_shogunate_surrender_japan
						if = {
							limit = { is_subject = no }
							hidden_effect = {
								add_ideas = EOANBSYS_spirit_war_total_war
							}
						}
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.205.a
				trigger = { is_japanese_country = yes }
				if = {
					limit = { tag = TSH }
					country_event = { id = JAP_tokugawa_shogunate.206 days = 2 }
				}
				if = {
					limit = { is_subject_of = TSH }
					add_to_war = {
						targeted_alliance = TSH
						enemy = JAP
						hostility_reason = asked_to_join
					}
				}
				else_if = {
					if = {
						limit = { is_subject_of = JAP }
						add_to_war = {
							targeted_alliance = JAP
							enemy = TSH
							hostility_reason = asked_to_join
						}
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.205.b
				trigger = { is_japanese_country = no }
			}
		}
	# Tag switch
		country_event = {
			id = JAP_tokugawa_shogunate.206
			title = JAP_tokugawa_shogunate.206.t
			desc = JAP_tokugawa_shogunate.206.d
			picture = GFX_report_event_jap_imperial_troops

			is_triggered_only = yes

			immediate = {
				add_manpower = -5000
				random_character = {
					limit = { is_character = JAP_character_kirino_toshiaki }
					set_nationality = JAP
				}
				random_character = {
					limit = { is_character = JAP_character_omura_masujiro }
					set_nationality = JAP
				}
				random_character = {
					limit = { is_character = JAP_character_kuroda_kiyotaka }
					set_nationality = JAP
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.206.a
				add_command_power = 25
				country_lock_all_division_template = no
			}
			option = {
				name = JAP_tokugawa_shogunate.206.b
				trigger = { is_ai = no }
				country_lock_all_division_template = no
				JAP = { change_tag_from = TSH }
			}
		}

	# Daimyos take Sides
		country_event = {
			id = JAP_tokugawa_shogunate.209
			title = JAP_tokugawa_shogunate.209.t
			desc = JAP_tokugawa_shogunate.209.d

			is_triggered_only = yes

			trigger = { is_japanese_country = yes is_subject_of = TSH }

			immediate = {
				# log = "[GetDateText]: [Root.GetName]: event JAP_tokugawa_shogunate.209 #[?TSH.boshin_war_han_switch_tag]"
			}

			# Player Joins Meiji Rebellion
			option = {
				name = JAP_tokugawa_shogunate.209.a
				trigger = { is_ai = no JAP = { is_ai = yes } }

				# Switch Tag
				hidden_effect = {
					JAP = { inherit_technology = ROOT } # seperated ahead so player doesnt get spammed with tech messages
				}
				transfer_units_fraction = {
					target = JAP
					size = 1.0
					army_ratio = 0.85
					navy_ratio = 1.0
					air_ratio = 0.0
					keep_unit_leaders_trigger = { always = no }
				}

				hidden_effect = {
					TSH = {
						add_to_variable = { boshin_war_han_switch_tag = 1 }
						if = {
							limit = { check_variable = { TSH.TSH_boshin_war_han_ranks_tag^num > TSH.boshin_war_han_switch_tag } }
							var:TSH_boshin_war_han_ranks_tag^boshin_war_han_switch_tag = { country_event = JAP_tokugawa_shogunate.209 }
						}
					}
					country_event = { id = JAP_tokugawa_shogunate.210 days = 7 }
				}
				JAP = { change_tag_from = ROOT }
			}
			# Side the Meiji Rebellion
			option = {
				name = JAP_tokugawa_shogunate.209.b
				trigger = { autocracy > 0.4 }
				ai_chance = { base = 0 modifier = { add = 1 autocracy > 0.5 } }
				add_war_support = 0.05
				store_current_ideologies = yes
				JAP = {
					set_autonomy = {
						target = PREV
						autonomy_state = autonomy_daimyo
					}
				}
				load_prevous_ideologies = yes
				hidden_effect = {
					TSH = {
						add_to_variable = { boshin_war_han_switch_tag = 1 }
						if = {
							limit = { check_variable = { TSH.TSH_boshin_war_han_ranks_tag^num > TSH.boshin_war_han_switch_tag } }
							var:TSH_boshin_war_han_ranks_tag^boshin_war_han_switch_tag = { country_event = JAP_tokugawa_shogunate.209 }
						}
						country_event = JAP_tokugawa_shogunate.204
					}
				}
			}
			# Side with Tokugawa Shogunate
			option = {
				name = JAP_tokugawa_shogunate.209.c
				ai_chance = { base = 1 modifier = { add = -1 autocracy > 0.5 } }
				add_war_support = 0.05
				hidden_effect = {
					TSH = {
						add_to_variable = { boshin_war_han_switch_tag = 1 }
						if = {
							limit = { check_variable = { TSH.TSH_boshin_war_han_ranks_tag^num > TSH.boshin_war_han_switch_tag } }
							var:TSH_boshin_war_han_ranks_tag^boshin_war_han_switch_tag = { country_event = JAP_tokugawa_shogunate.209 }
						}
					}
				}
			}
		}
		country_event = {
			id = JAP_tokugawa_shogunate.210
			hidden = yes

			is_triggered_only = yes
			immediate = {
				every_owned_state = {
					add_core_of = JAP
				}
				JAP = {
					annex_country = {
						target = PREV
						transfer_troops = yes
					}
				}
			}
		}

	# Tokugawan Navy Defects
		country_event = {
			id = JAP_tokugawa_shogunate.240
			title = JAP_tokugawa_shogunate.240.t
			desc = JAP_tokugawa_shogunate.240.d

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					hidden_effect = {
						EZO = {
							if = {
								limit = { TSH = { OR = { owns_state = 536 owns_state = 750 } } }
								if = {
									limit = { TSH = { owns_state = 536 } }
									transfer_state = 536
									536 = {
										add_core_of = EZO
										add_core_of = JAP
									}
								}
								if = {
									limit = { TSH = { owns_state = 750 } }
									transfer_state = 750
									750 = {
										add_core_of = EZO
										add_core_of = JAP
									}
								}

								inherit_technology = TSH
								set_cosmetic_tag = EZO_provisional_cosmetic
							}
						}
					}
					transfer_units_fraction = {
						target = EZO
						size = 0.1
						army_ratio = 0.1
						navy_ratio = 0.9
						air_ratio = 0.0
						keep_unit_leaders_trigger = { always = yes }
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.240.a
				trigger = { has_war_with = JAP }
				if = {
					limit = { tag = TSH }
					random_character = {
						limit = { is_character = EZO_character_matsudaira_taro }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_enomoto_takeaki }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_matsudaira_sadaaki }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_otori_keisuke }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_kawai_tsugunosuke }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_hijikata_toshizo }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_arai_ikunosuke }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_banikichi_matsuoka }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_matsudaira_taro }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_matsudaira_taro }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_matsudaira_taro }
						set_nationality = EZO
					}
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.240.b
				trigger = { has_war_with = TSH }
			}
			option = {
				name = JAP_tokugawa_shogunate.240.c
				trigger = { tag = TSH is_ai = no }
				change_tag_from = TSH
				random_character = {
						limit = { is_character = EZO_character_matsudaira_taro }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_enomoto_takeaki }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_matsudaira_sadaaki }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_otori_keisuke }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_kawai_tsugunosuke }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_hijikata_toshizo }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_arai_ikunosuke }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_banikichi_matsuoka }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_matsudaira_taro }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_matsudaira_taro }
						set_nationality = EZO
					}
					random_character = {
						limit = { is_character = EZO_character_matsudaira_taro }
						set_nationality = EZO
					}
			}
		}
	# Should we declare war on Ezo?
		country_event = {
			id = JAP_tokugawa_shogunate.247
			title = JAP_tokugawa_shogunate.247.t
			desc = JAP_tokugawa_shogunate.247.d

			is_triggered_only = yes

			trigger = { EZO = { exists = yes NOT = { is_subject_of = ROOT } } }

			immediate = {
				hidden_effect = {
					if = {
						limit = { tag = TSH }
						EZO = {
							every_owned_state = {
								remove_core_of = JAP
							}
						}
					}
					else_if = {
						limit = { tag = JAP }
						EZO = {
							every_owned_state = {
								remove_core_of = TSH
							}
						}
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.247.a
				ai_chance = { base = 1 }
				declare_war_on = {
					target = EZO
					type = annex_everything
				}
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.251 days = 100 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.247.b
				ai_chance = { base = 1 }
				EZO = {
					store_current_ideologies = yes
					JAP = {
						set_autonomy = {
							target = PREV
							autonomy_state = autonomy_puppet
						}
					}
					load_prevous_ideologies = yes
				}
			}
		}
	# Imperial Loss
		news_event = {
			id = JAP_tokugawa_shogunate.248
			title = JAP_tokugawa_shogunate.248.t
			desc = JAP_tokugawa_shogunate.248.d

			picture = GFX_news_event_sankin_kotai

			is_triggered_only = yes

			immediate = {
				hidden_effect = {
					if = {
						limit = { tag = TSH }
						every_other_country = { news_event = JAP_tokugawa_shogunate.248 }
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.248.a
				trigger = { tag = TSH }
				set_temp_variable = { eoanb_prestige_change = 10 }
				eoanb_change_prestige_score = yes
				for_each_scope_loop = {
					array = JAP.subjects
					TSH = {
						dismantle_faction = yes
						white_peace = PREV
						set_autonomy = {
							target = PREV
							autonomy_state = autonomy_daimyo
						}
					}
					hidden_effect = {
						set_popularities = {
							autocracy = 4
							radical_democracy = 85
							traditional_conservatism = 10
							fundamentalism = 1
						}
					}
				}
				JAP = {
					dismantle_faction = yes
					every_owned_state = {
						remove_core_of = JAP
						add_core_of = TSH
						TSH = { transfer_state = PREV }
					}
				}
				if = {
					limit = { is_ai = no }
					set_variable = { super_event_displayed = 13 }
				}
				hidden_effect = {
					country_event = { id = JAP_tokugawa_shogunate.247 days = 7 }
					set_country_flag = is_literally_japan
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.248.a
				trigger = { is_subject_of = TSH }
				if = {
					limit = { is_ai = no }
					set_variable = { super_event_displayed = 13 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.248.b
				trigger = { NOT = { OR = { tag = TSH is_subject_of = TSH } } }
				if = {
					limit = { is_ai = no }
					set_variable = { super_event_displayed = 13 }
				}
			}
		}
	# Shogunate Loss
		news_event = {
			id = JAP_tokugawa_shogunate.249
			title = JAP_tokugawa_shogunate.249.t
			desc = JAP_tokugawa_shogunate.249.d

			picture = GFX_news_event_sankin_kotai

			is_triggered_only = yes

			immediate = {
				hidden_effect = {
					if = {
						limit = { tag = JAP }
						every_other_country = { news_event = JAP_tokugawa_shogunate.249 }
						country_event = { id = JAP_tokugawa_shogunate.247 days = 7 }
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.249.a
				trigger = { tag = JAP }
				drop_cosmetic_tag = yes
				set_temp_variable = { eoanb_prestige_change = 10 }
				eoanb_change_prestige_score = yes
				for_each_scope_loop = {
					array = TSH.subjects
					JAP = {
						dismantle_faction = yes
						white_peace = PREV
						set_autonomy = {
							target = PREV
							autonomy_state = autonomy_daimyo
						}
					}
					hidden_effect = {
						set_popularities = {
							autocracy = 85
							radical_democracy = 4
							traditional_conservatism = 10
							fundamentalism = 1
						}
					}
				}
				TSH = {
					dismantle_faction = yes
					every_owned_state = {
						remove_core_of = TSH
						add_core_of = JAP
						JAP = { transfer_state = PREV }
					}
				}
				if = {
					limit = { is_ai = no }
					set_variable = { super_event_displayed = 12 }
				}
				delete_unit_template_and_units = {
					division_template = "Boshin Garrison"
					disband = no
				}
				hidden_effect = {
					set_country_flag = is_literally_japan
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.249.a
				trigger = { is_subject_of = JAP }
				if = {
					limit = { is_ai = no }
					set_variable = { super_event_displayed = 12 }
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.248.b
				trigger = { NOT = { OR = { tag = JAP is_subject_of = JAP } } }
				if = {
					limit = { is_ai = no }
					set_variable = { super_event_displayed = 12 }
				}
			}
		}
		country_event = {
			id = JAP_tokugawa_shogunate.251
			hidden = yes

			is_triggered_only = yes

			trigger = { EZO = { is_ai = yes } }

			immediate = {
				EZO = {
					every_owned_state = {
						add_core_of = ROOT
					}
				}
				annex_country = {
					target = EZO
					transfer_troops = no
				}
			}
		}
	# Propose Karafuto Agreement
		country_event = {
			id = JAP_tokugawa_shogunate.252
			title = JAP_tokugawa_shogunate.252.t
			desc = JAP_tokugawa_shogunate.252.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.252.a
				ai_chance = { base = 1 }
				RUS = {
					country_event = JAP_tokugawa_shogunate.253
				}
			}
		}
	# Proposed Karafuto Agreement (RUS)
		country_event = {
			id = JAP_tokugawa_shogunate.253
			title = JAP_tokugawa_shogunate.253.t
			desc = JAP_tokugawa_shogunate.253.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.253.a
				ai_chance = { base = 1 }
				transfer_state = 537
				give_guarantee = TSH
				set_variable = {
					var = most_favoured_country
					value = TSH.id
					tooltip = DIPLOMACY_SET_MOST_FAVOURABLE_tt
				}
				TSH = {
					diplomatic_relation = {
						country = RUS
						relation = docking_rights
						active = yes
					}
					country_event = JAP_tokugawa_shogunate.254
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.253.b
				ai_chance = { base = 0 }
				TSH = {
					country_event = JAP_tokugawa_shogunate.255
				}
			}
		}
	# Accepted Karafuto Agreement (TSH)
		country_event = {
			id = JAP_tokugawa_shogunate.254
			title = JAP_tokugawa_shogunate.254.t
			desc = JAP_tokugawa_shogunate.254.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.254.a
				ai_chance = { base = 1 }
				remove_state_claim = 537
				set_variable = {
					var = most_favoured_country
					value = RUS.id
					tooltip = DIPLOMACY_SET_MOST_FAVOURABLE_tt
				}
				diplomatic_relation = {
					country = RUS
					relation = docking_rights
					active = yes
				}
				RUS = {
					give_guarantee = TSH
				}
				complete_national_focus = JAP_vic_sponsorship_of_moscow
			}
		}
	# Rejected Karafuto Agreement (TSH)
		country_event = {
			id = JAP_tokugawa_shogunate.255
			title = JAP_tokugawa_shogunate.255.t
			desc = JAP_tokugawa_shogunate.255.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.255.a
				ai_chance = { base = 1 }
			}
		}
	# Propose Ezo Accords
		country_event = {
			id = JAP_tokugawa_shogunate.256
			title = JAP_tokugawa_shogunate.256.t
			desc = JAP_tokugawa_shogunate.256.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.252.a
				ai_chance = { base = 1 }
				RUS = {
					country_event = JAP_tokugawa_shogunate.257
				}
			}
		}
	# Proposed Ezo Agreement (USA)
		country_event = {
			id = JAP_tokugawa_shogunate.257
			title = JAP_tokugawa_shogunate.253.t
			desc = JAP_tokugawa_shogunate.257.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.253.a
				ai_chance = { base = 1 }
				give_guarantee = TSH
				set_variable = {
					var = most_favoured_country
					value = TSH.id
					tooltip = DIPLOMACY_SET_MOST_FAVOURABLE_tt
				}
				TSH = {
					country_event = JAP_tokugawa_shogunate.258
				}
			}
			option = {
				name = JAP_tokugawa_shogunate.257.b
				ai_chance = { base = 0 }
				TSH = {
					country_event = JAP_tokugawa_shogunate.259
				}
			}
		}
	# Accepted Ezo Accords (TSH)
		country_event = {
			id = JAP_tokugawa_shogunate.258
			title = JAP_tokugawa_shogunate.258.t
			desc = JAP_tokugawa_shogunate.258.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.254.a
				ai_chance = { base = 1 }
				add_popularity = {
					ideology = traditional_conservatism
					popularity = 20
				}
				set_variable = {
					var = most_favoured_country
					value = USA.id
					tooltip = DIPLOMACY_SET_MOST_FAVOURABLE_tt
				}
				USA = {
					give_guarantee = TSH
				}
				complete_national_focus = JAP_vic_sponsorship_of_washington
			}
		}
	# Rejected Karafuto Agreement (TSH)
		country_event = {
			id = JAP_tokugawa_shogunate.259
			title = JAP_tokugawa_shogunate.255.t
			desc = JAP_tokugawa_shogunate.255.d

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.255.a
				ai_chance = { base = 1 }
			}
		}

	# Stepping Down of Shogun
		country_event = {
			id = JAP_tokugawa_shogunate.260
			title = JAP_tokugawa_shogunate.260.t
			desc = {
				trigger = {
					TSH = { has_country_flag = TSH_character_tokugawa_iemochi_flag }
				}
				text = JAP_tokugawa_shogunate.260.t_iemochi
			}
			desc = {
				text = JAP_tokugawa_shogunate.260.t_yoshinobu
			}
			desc = {
				trigger = {
					TSH = { has_country_flag = TSH_character_tokugawa_iemochi_flag }
				}
				text = JAP_tokugawa_shogunate.260.d_iemochi
			}
			desc = {
				text = JAP_tokugawa_shogunate.260.d_yoshinobu
			}
			picture = GFX_report_event_jap_meiji_speech

			trigger = {
				has_war_with = JAP
			}

			is_triggered_only = yes

			immediate = {
				if = {
					limit = { tag = TSH }
					TSH_character_kitashirakawa_yoshihisa = {
						add_country_leader_role = {
							country_leader = {
								desc = "TSH_character_kitashirakawa_yoshihisa_desc"
								ideology = shogunate
								expire = "1920.1.1"
							}
							promote_leader = yes
						}
					}
					if = {
						limit = { has_character = TSH_character_tokugawa_yoshinobu }
						retire_character = TSH_character_tokugawa_yoshinobu
					}
					if = {
						limit = { has_character = TSH_character_tokugawa_yoshinobu }
						retire_character = TSH_character_tokugawa_iemochi
						set_country_flag = TSH_character_tokugawa_iemochi_flag
					}
				}
				hidden_effect = {
					remove_ideas = TSH_spirit_vic_bakufu_shogunate_unconfidence
					remove_ideas = TSH_spirit_vic_bakufu_shogunate_divided
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.260.a
				trigger = { tag = TSH }
				set_cosmetic_tag = TSH_Ouetsu_Alliance_Cosmetic
				add_popularity = {
					ideology = traditional_conservatism
					popularity = 0.35
				}
				add_war_support = -0.15
				complete_national_focus = JAP_vic_retain_consultive_stance

				set_party_name = {
					ideology = radical_democracy
					long_name = "Bakufu Council"
					name = "Bakufu"
				}
				set_party_name = {
					ideology = traditional_conservatism
					long_name = "Liberal Party of Japan"
					name = "Liberals"
				}
				set_party_name = {
					ideology = autocracy
					long_name = "Imperial Party"
					name = "Imperial Party"
				}
			}
		}

		country_event = {
			id = JAP_tokugawa_shogunate.300
			title = JAP_tokugawa_shogunate.300.t
			desc = JAP_tokugawa_shogunate.300.d
			picture = GFX_report_event_jap_meiji_speech

			is_triggered_only = yes

			immediate = {
				TSH_character_tokugawa_iesato = {
					add_country_leader_role = {
						country_leader = {
							desc = "TSH_character_tokugawa_iesato_desc"
							ideology = shogunate
							expire = "1920.1.1"
						}
						promote_leader = yes
					}
				}
			}

			option = {
				name = JAP_tokugawa_shogunate.300.a
				set_cosmetic_tag = TSH_Daimyo_Republic_Cosmetic
				for_each_scope_loop = {
					array = subjects
					OVERLORD = {
						annex_country = {
							target = PREV
							transfer_troops = yes
						}
					}
				}
				hidden_effect = {
					every_owned_state = {
						limit = { is_in_japan = yes NOT = { is_core_of = PREV } }
						add_core_of = PREV
					}
				}
				complete_national_focus = JAP_vic_resurgance_of_the_han
				set_party_name = {
					ideology = radical_democracy
					long_name = "Daimyo Council"
					name = "Daimyo Council"
				}
				set_party_name = {
					ideology = autocracy
					long_name = "Imperial Party"
					name = "Imperial Party"
				}
				set_variable = { super_event_displayed = 13 }
				every_other_country = {
					news_event = JAP_tokugawa_shogunate.301
				}
			}
		}
	# News Event
		news_event = {
			id = JAP_tokugawa_shogunate.301
			title = JAP_tokugawa_shogunate.301.t
			desc = JAP_tokugawa_shogunate.301.d
			picture = GFX_

			is_triggered_only = yes

			option = {
				name = JAP_tokugawa_shogunate.301.a
				if = {
					limit = { is_ai = no }
					set_variable = { super_event_displayed = 13 }
				}
			}
		}
