########################################
# Flavor Events for Japan and Daimyos
#
# written by Sara Wendel-Örtqvist
########################################

namespace = flavor_jap
normal_or_historical_nations = yes

# Onin War
country_event = {
	id = flavor_jap.1
	title = "flavor_jap.EVTNAME1"
	desc = "flavor_jap.EVTDESC1"
	picture = BATTLE_eventPicture
	
	trigger = {
		OR = {
			AND = {
				tag = JAP
				any_known_country = {
					primary_culture = japanese
					war_with = JAP
				}
			}
			AND = {
				NOT = {
					tag = JAP
				}
				primary_culture = japanese
				government = daimyo
				any_known_country = {
					primary_culture = japanese
					government = daimyo
					war_with = ROOT
				}
			}
		}
		is_year = 1467
		NOT = { is_year = 1500 }
		has_regency = no
		NOT = {
			has_ruler_modifier = jap_sengoku_jidai
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA1"
		add_ruler_modifier = {
			name = jap_sengoku_jidai
		}
	}
}

# Ikko-ikkis rising!
country_event = {
	id = flavor_jap.2
	title = "flavor_jap.EVTNAME2"
	desc = "flavor_jap.EVTDESC2"
	picture = ANGRY_MOB_eventPicture
	
	trigger = {
		primary_culture = japanese
		NOT = { stability = 0 }
		NOT = { tag = JAP }
		NOT = {
			has_country_modifier = ikko_ikkis_timer
		}
	}
	
	mean_time_to_happen = {
		months = 100
	}
	
	immediate = {
		hidden_effect = {
			add_country_modifier = {
				name = ikko_ikkis_timer
				duration = 365
				hidden = yes
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA2"
		random_owned_province = {
			limit = {
				culture = japanese
			}
			spawn_rebels = {
				type = ikko_ikki_rebels
				size = 1
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTB2"
		every_owned_province = {
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
		}
		add_prestige = -1
	}
}

# Ikko-ikkis spreading!
country_event = {
	id = flavor_jap.3
	title = "flavor_jap.EVTNAME3"
	desc = "flavor_jap.EVTDESC3"
	picture = ANGRY_MOB_eventPicture
	
	trigger = {
		primary_culture = japanese
		NOT = { stability = 0 }
		any_neighbor_country = {
			has_spawned_rebels = ikko_ikki_rebels
		}
	}
	
	mean_time_to_happen = {
		months = 12
	}
	
	option = {
		name = "flavor_jap.EVTOPTA3"
		random_owned_province = {
			limit = {
				culture = japanese
			}
			spawn_rebels = {
				type = ikko_ikki_rebels
				size = 1
			}
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB2"
		every_owned_province = {
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
		}
		add_prestige = -1
	}
}

# Wokou
country_event = {
	id = flavor_jap.4
	title = "flavor_jap.EVTNAME4"
	desc = "flavor_jap.EVTDESC4"
	picture = NAVAL_MILITARY_eventPicture
	
	trigger = {
		primary_culture = japanese
		is_year = 1523
		NOT = { is_year = 1588 }
		OR = {
			exists = KOR
			exists = MNG
		}
		KOR = {
			NOT = {
				junior_union_with = ROOT
			}
			NOT = {
				senior_union_with = ROOT
			}
			NOT = {
				vassal_of = ROOT
			}
			NOT = {
				overlord_of = ROOT
			}
			NOT = {
				alliance_with = ROOT
			}
		}
		MNG = {
			NOT = {
				junior_union_with = ROOT
			}
			NOT = {
				senior_union_with = ROOT
			}
			NOT = {
				vassal_of = ROOT
			}
			NOT = {
				overlord_of = ROOT
			}
			NOT = {
				alliance_with = ROOT
			}
		}
		num_of_ports = 1
		NOT = {
			has_country_modifier = jap_wokou
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA4" # Fund the pirates
		add_years_of_income = -0.25
		add_prestige = -5
		add_country_modifier = { 
			name = jap_wokou 
			duration = 7300 
		}
		if = {
			limit = {
				exists = KOR
			}
			KOR = {
				add_opinion = {
					who = ROOT
					modifier = opinion_displeased
				}
			}
		}
		if = {
			limit = { exists = MNG }
			MNG = {
				add_opinion = {
					who = ROOT
					modifier = opinion_displeased
				}
			}
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB4" # Tell them to cease and desist
		if = {
			limit = { exists = KOR }
			KOR = {
				add_opinion = {
					who = ROOT
					modifier = opinion_pleased
				}
			}
		}
		if = {
			limit = { exists = MNG }
			MNG = {
				add_opinion = {
					who = ROOT
					modifier = opinion_pleased
				}
			}
		}
	}
}

# Question about Sakoku
country_event = {
	id = flavor_jap.5
	title = "flavor_jap.EVTNAME5"
	desc = "flavor_jap.EVTDESC5"
	picture = MERCHANTS_TALKING_eventPicture
	
	trigger = {
		primary_culture = japanese
		has_country_modifier = sakoku_law
		has_country_flag = sakoku_law
		NOT = {
			has_ruler_modifier = jap_follow_sakoku
		}
		NOT = {
			has_ruler_modifier = jap_question_sakoku
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA5" # Keep following the Sakoku
		add_ruler_modifier = {
			name = jap_follow_sakoku
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB5" # Question the Sakoku law
		add_ruler_modifier = {
			name = jap_question_sakoku
		}
	}
}

# Rangaku
country_event = {
	id = flavor_jap.6
	title = "flavor_jap.EVTNAME6"
	desc = "flavor_jap.EVTDESC6"
	picture = MERCHANTS_TALKING_eventPicture
	
	trigger = {
		primary_culture = japanese
		government = daimyo
		has_country_modifier = sakoku_law
		has_country_flag = sakoku_law
		has_country_flag = ned_dejima_allowed
		NOT = {
			has_ruler_modifier = jap_rangaku
		}
		NOT = {
			has_ruler_modifier = jap_closed
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA6" # Open our provinces to the Dutch
		add_ruler_modifier = { 
			name = jap_rangaku
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB6" # Keep our provinces closed
		add_ruler_modifier = { 
			name = jap_closed
		}
	}
}

# Nanban Boeki
country_event = {
	id = flavor_jap.7
	title = "flavor_jap.EVTNAME7"
	desc = "flavor_jap.EVTDESC7"
	picture = MERCHANTS_TALKING_eventPicture
	
	trigger = {
		primary_culture = japanese
		NOT = { tag = RYU }
		has_global_flag = japan_has_encountered_the_west
		NOT = { technology_group = western }
		NOT = { has_country_modifier = sakoku_law }
		NOT = { has_country_flag = sakoku_law }
		NOT = { has_country_flag = western_trade_flag }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA7" # Welcome the new traders
		add_country_modifier = { 
			name = western_trade 
			duration = -1 
		}
		set_country_flag = western_trade_flag
	}
}

# Western Wrecked Ship (William Adams)
country_event = {
	id = flavor_jap.8
	title = "flavor_jap.EVTNAME8"
	desc = "flavor_jap.EVTDESC8"
	picture = ADVISOR_eventPicture
	
	trigger = {
		primary_culture = japanese
		has_country_modifier = western_trade
		had_country_flag = { flag = western_trade_flag days = 90 }
		has_regency = no
		NOT = { has_country_flag = william_adams }
		num_of_ports = 1
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	immediate = {
		set_country_flag = william_adams
	}
	
	option = {
		name = "flavor_jap.EVTOPTA8" # Help the foreign shipwreckers
		add_stability = -1
		add_ruler_modifier = { 
			name = jap_western_wrecked_ship
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB8" # Do nothing
		add_stability = 1
	}
	option = {
		name = "flavor_jap.EVTOPTC8" # Bring the foreigner to me
		add_stability = -1
		define_advisor = {
			name = "William Adams"
			type = trader
			skill = 2
		}
	}
}

# Kirishitan
country_event = {
	id = flavor_jap.9
	title = "flavor_jap.EVTNAME9"
	desc = "flavor_jap.EVTDESC9"
	picture = RELIGION_eventPicture
	
	trigger = {
		primary_culture = japanese
		NOT = { religion = catholic }
		is_year = 1543
		any_owned_province = {
			culture = japanese
			religion = catholic
			can_spawn_rebels = catholic_rebels
		}
		has_country_flag = western_trade_flag
		NOT = { stability = 1 }
	}
	
	mean_time_to_happen = {
		months = 400
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					culture = japanese
					religion = catholic
					can_spawn_rebels = catholic_rebels
				}
				set_province_flag = jap_kirishitan_flag
			}
			random_owned_province = {
				limit = {
					culture = japanese
					religion = catholic
					can_spawn_rebels = catholic_rebels
					NOT = { has_province_flag = jap_kirishitan_flag }
				}
				set_province_flag = jap_kirishitan_flag
			}
			random_owned_province = {
				limit = {
					culture = japanese
					religion = catholic
					can_spawn_rebels = catholic_rebels
					NOT = { has_province_flag = jap_kirishitan_flag }
				}
				set_province_flag = jap_kirishitan_flag
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA9" # Stop the missionaries!
		every_owned_province = {
			limit = {
				has_province_flag = jap_kirishitan_flag
			}
			spawn_rebels = { 
				type = catholic_rebels 
				size = 2 
			}
			clr_province_flag = jap_kirishitan_flag
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB9" # Let them spread their faith
		add_prestige = -2
		every_owned_province = {
			limit = {
				has_province_flag = jap_kirishitan_flag
			}
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
			clr_province_flag = jap_kirishitan_flag
		}
	}
}

# Incident at Honnoji
country_event = {
	id = flavor_jap.10
	title = "flavor_jap.EVTNAME10"
	desc = "flavor_jap.EVTDESC10"
	picture = ASSASSINATION_eventPicture
	
	trigger = {
		primary_culture = japanese
		OR = {
			AND = {
				tag = JAP
				num_of_cities = 5
				num_of_owned_provinces_with = {
					value = 5
					culture = japanese
				}
			}
			AND = {
				government = daimyo
				NOT = {
					tag = JAP
				}
				num_of_cities = 5
				num_of_owned_provinces_with = {
					value = 5
					culture = japanese
				}
			}
		}
		has_regency = no
	}
	
	mean_time_to_happen = {
		months = 5000
	}
	
	option = {
		name = "flavor_jap.EVTOPTA10"
		kill_ruler = yes
	}
}

# Jokamachi or Castle towns
country_event = {
	id = flavor_jap.11
	title = "flavor_jap.EVTNAME11"
	desc = "flavor_jap.EVTDESC11"
	picture = CITY_DEVELOPMENT_eventPicture
	
	trigger = {
		NOT = { has_country_flag = jap_jokamachi_flag }
		primary_culture = japanese
		MIL = 4
		any_owned_province = {
			fort_level = 1
			NOT = { has_province_modifier = local_fortress }
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	immediate = {
		set_country_flag = jap_jokamachi_flag
	}
	
	option = {
		name = "flavor_jap.EVTOPTA11" # Build a fort
		random_owned_province = {
			limit = {
				fort_level = 1
				NOT = { has_province_modifier = local_fortress }
			}
			add_province_modifier = {
				name = "local_fortress"
				duration = -1
			}
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB11" # Don't build a fort
		add_mil_power = 25
	}
}

# Rise of urban culture
country_event = {
	id = flavor_jap.12
	title = "flavor_jap.EVTNAME12"
	desc = "flavor_jap.EVTDESC12"
	picture = THEATRE_eventPicture
	
	trigger = {
		primary_culture = japanese
		dip = 4
		has_regency = no
		NOT = {
			has_ruler_modifier = jap_culture
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA12"
		add_years_of_income = -0.5
		add_ruler_modifier = { 
			name = jap_culture
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB12"
		add_prestige = -1
	}
}

# Terakoya
country_event = {
	id = flavor_jap.13
	title = "flavor_jap.EVTNAME13"
	desc = "flavor_jap.EVTDESC13"
	picture = UNIVERSITY_eventPicture
	
	trigger = {
		primary_culture = japanese
		is_year = 1600
		has_regency = no
		OR = {
			dip = 4
			adm = 4
		}
		NOT = {
			has_ruler_modifier = jap_terakoya
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					culture = japanese
				}
				set_province_flag = jap_terakoya_flag1
			}
			random_owned_province = {
				limit = {
					NOT = {
						has_province_flag = jap_terakoya_flag1
					}
				}
				set_province_flag = jap_terakoya_flag2
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA13" # Establish Terakoya
		add_years_of_income = -0.5
		add_ruler_modifier = {
			name = jap_terakoya
		}
		hidden_effect = {
			random_owned_province = {
				limit = {
					has_province_flag = jap_terakoya_flag1
				}
				clr_province_flag = jap_terakoya_flag1
			}
			random_owned_province = {
				limit = {
					has_province_flag = jap_terakoya_flag2
				}
				clr_province_flag = jap_terakoya_flag2
			}
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB13"
		random_owned_province = {
			limit = {
				has_province_flag = jap_terakoya_flag1
			}
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
			clr_province_flag = jap_terakoya_flag1
		}
		random_owned_province = {
			limit = {
				has_province_flag = jap_terakoya_flag2
			}
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
			clr_province_flag = jap_terakoya_flag2
		}
	}
}

# Military Developments
country_event = {
	id = flavor_jap.14
	title = "flavor_jap.EVTNAME14"
	desc = "flavor_jap.EVTDESC14"
	picture = LAND_MILITARY_eventPicture
	
	trigger = {
		primary_culture = japanese
		adm = 4
		has_regency = no
		NOT = {
			has_ruler_modifier = jap_military_developments
		}
		has_country_modifier = western_trade
		is_year = 1467
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA14"
		add_years_of_income = -0.5
		add_ruler_modifier = {
			name = jap_military_developments
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB14"
		add_prestige = -1
	}
}

# Allow organisation of Za
country_event = {
	id = flavor_jap.15
	title = "flavor_jap.EVTNAME15"
	desc = "flavor_jap.EVTDESC15"
	picture = MERCHANTS_TALKING_eventPicture
	
	fire_only_once = yes

	
	trigger = {
		primary_culture = japanese
		OR = {
			mercantilism = 0.3
			trade_efficiency = 0.4
		}
		NOT = {
			has_country_modifier = jap_za
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA15" # Allow organization of za
		add_country_modifier = { 
			name = jap_za
			duration = -1
		}
		set_country_flag = jap_za_flag
	}
	option = {
		name = "flavor_jap.EVTOPTB15" # Disallow it
		add_mercantilism = 0.1
	}
}

# Free trade (Rakuichi, elimination of za)
country_event = {
	id = flavor_jap.16
	title = "flavor_jap.EVTNAME16"
	desc = "flavor_jap.EVTDESC16"
	picture = MERCHANTS_TALKING_eventPicture
	
	trigger = {
		primary_culture = japanese
		has_country_modifier = jap_za
		had_country_flag = { flag = jap_za_flag days = 365 }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA16" # Declare Free Trade
		remove_country_modifier = jap_za
		add_mercantilism = 0.05
	}
	option = {
		name = "flavor_jap.EVTOPTB16" # Keep it as it is
	}
}

# Higashiyama culture
country_event = {
	id = flavor_jap.17
	title = "flavor_jap.EVTNAME17"
	desc = "flavor_jap.EVTDESC17"
	picture = THEATRE_eventPicture
	
	trigger = {
		primary_culture = japanese
		OR = {
			adm = 4
			dip = 4
		}
		NOT = { is_year = 1500 }
		NOT = {
			has_ruler_modifier = jap_higashiyama_culture
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA17" # Encourage
		add_years_of_income = -0.5
		add_ruler_modifier = { 
			name = jap_higashiyama_culture
		}
		set_country_flag = jap_higashiyama_culture_flag
		if = {
			limit = {
				adm = 4
				NOT = {
					dip = 4
				}
			}
			add_adm_power = -20
		}
		if = {
			limit = {
				dip = 4
				NOT = {
					adm = 4
				}
			}
			add_dip_power = -20
		}
		if = {
			limit = {
				dip = 4
				adm = 4
			}
			add_mil_power = -20
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB17"
		add_prestige = -1
	}
}

# Build Ginkakuji (Silver Pavillion)
country_event = {
	id = flavor_jap.18
	title = "flavor_jap.EVTNAME18"
	desc = "flavor_jap.EVTDESC18"
	picture = IMPORTANT_STATUE_eventPicture
	
	trigger = {
		primary_culture = japanese
		is_year = 1482
		NOT = { is_year = 1505 }
		any_owned_province = {
			NOT = { has_building = temple }
			num_free_building_slots = 1
		}
		has_country_flag = jap_higashiyama_culture_flag
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA18"
		add_treasury = -30
		random_owned_province = {
			limit = { num_free_building_slots = 1 }
			add_building = temple 
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB18"
		add_prestige = -1
	}
}

# Sekisho
country_event = {
	id = flavor_jap.19
	title = "flavor_jap.EVTNAME19"
	desc = "flavor_jap.EVTDESC19"
	picture = ANGRY_MOB_eventPicture
	
	trigger = {
		primary_culture = japanese
		is_year = 1600
		OR = {
			adm = 4
			mil = 4
		}
		has_regency = no
		NOT = {
			has_ruler_modifier = jap_sekisho
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA19"
		add_years_of_income = -0.5
		add_ruler_modifier = { 
			name = jap_sekisho
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB19"
		add_prestige = -1
	}
}

# Buke Shohatto
country_event = {
	id = flavor_jap.20
	title = "flavor_jap.EVTNAME20"
	desc = "flavor_jap.EVTDESC20"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		primary_culture = japanese
		tag = JAP
		any_known_country = {
			vassal_of = JAP
			primary_culture = japanese
			NOT = {
				has_country_modifier = jap_buke_shohatto
			}
		}
		is_year = 1615
		NOT = { is_year = 1665 }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA20" # Implement Buke Shohatto for the whole of Japan
		add_years_of_income = -0.5
		add_country_modifier = {
			name = jap_buke_shohatto
			duration = 3650
		}
		every_known_country = {
			limit = {
				vassal_of = JAP
				primary_culture = japanese
			}
			country_event = {
				id = flavor_jap.21
			}
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB20"
		add_prestige = -1
	}
}

# Daimyo: Buke Shohatto 
country_event = {
	id = flavor_jap.21
	title = "flavor_jap.EVTNAME20"
	desc = "flavor_jap.EVTDESC21"
	picture = REFORM_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_jap.EVTOPTA21"
		add_country_modifier = {
			name = jap_buke_shohatto
			duration = 3650
		}
		add_opinion = {
			who = JAP
			modifier = opinion_mildly_displeased
		}
		every_owned_province = {
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
		}
	}
}

# Gokaido
country_event = {
	id = flavor_jap.22
	title = "flavor_jap.EVTNAME22"
	desc = "flavor_jap.EVTDESC22"
	picture = REFORM_eventPicture
	
	trigger = {
		primary_culture = japanese
		tag = JAP
		is_year = 1603
		NOT = {
			has_country_modifier = jap_gokaido
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA22" # Establish the Gokaido
		add_years_of_income = -0.5
		add_country_modifier = { 
			name = jap_gokaido 
			duration = 3650 
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB22"
		add_prestige = -1
	}
}

# Kyoho Reforms
country_event = {
	id = flavor_jap.23
	title = "flavor_jap.EVTNAME23"
	desc = "flavor_jap.EVTDESC23"
	picture = REFORM_eventPicture
	
	trigger = {
		primary_culture = japanese
		is_year = 1736
		has_regency = no
		any_province = {
			culture = japanese
			religion = confucianism
			owner = {
				OR = {
					government = daimyo
					vassal_of = JAP
				}
			}
		}
		NOT = {
			has_ruler_modifier = jap_trade_reform
		}
		NOT = {
			has_ruler_modifier = jap_military_reform
		}
		NOT = {
			has_ruler_modifier = jap_economic_reform
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA23" # Reform the Trade
		add_mercantilism = 0.05
		add_ruler_modifier = { 
			name = jap_trade_reform
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB23" # Reform the Military
		add_army_tradition = 5
		add_navy_tradition = 5
		add_ruler_modifier = { 
			name = jap_military_reform
		}
	}
	option = {
		name = "flavor_jap.EVTOPTC23" # Reform the Economy
		random_owned_province = {
			limit = {
				is_capital = yes
			}
			add_base_tax = 1
		}
		add_ruler_modifier = { 
			name = jap_economic_reform
		}
	}
}

# Genroku-era culture
country_event = {
	id = flavor_jap.24
	title = "flavor_jap.EVTNAME24"
	desc = "flavor_jap.EVTDESC24"
	picture = THEATRE_eventPicture
	
	trigger = {
		primary_culture = japanese
		is_year = 1688
		NOT = { is_year = 1708 }
		NOT = {
			has_country_modifier = jap_genroku
		}
		NOT = {
			treasury = 1000
		}
		NOT = {
			num_of_loans = 1
		}
		stability = 3
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA24" # Start the era of Genroku!
		add_country_modifier = { 
			name = jap_genroku
			duration = 3650
		}
	}
}

# Confucianism
country_event = {
	id = flavor_jap.25
	title = "flavor_jap.EVTNAME25"
	desc = "flavor_jap.EVTDESC25"
	picture = RELIGION_eventPicture
	
	trigger = {
		NOT = { is_religion_enabled = confucianism }
		OR = {
			tag = JAP
			vassal_of = JAP
			government = daimyo
		}
		is_year = 1560
		primary_culture = japanese
		NOT = { religion = confucianism }
	}
	
	mean_time_to_happen = {
		months = 2500
	}
	
	option = {
		name = "flavor_jap.EVTOPTA25"
		enable_religion = confucianism
		random_owned_province = {
			limit = {
				culture = japanese
			}
			change_religion = confucianism
		}
	}
}

# Spread of Confucianism
province_event = {
	id = flavor_jap.26
	title = "flavor_jap.EVTNAME26"
	desc = "flavor_jap.EVTDESC26"
	picture = RELIGION_eventPicture

	trigger = {
		culture = japanese
		is_religion_enabled = confucianism
		NOT = {
			religion = confucianism
		}
		is_reformation_center = no
		NOT = { religion_years = { confucianism = 100 } }
	}
	
	mean_time_to_happen = {
		months = 1600
	}

	option = {
		name = "flavor_jap.EVTOPTA25"
		change_religion = confucianism
		add_permanent_province_modifier = {
			name = "religious_zeal_at_conv"
			duration = 9000
		}
	}
}

# Kokugaku
country_event = {
	id = flavor_jap.27
	title = "flavor_jap.EVTNAME27"
	desc = "flavor_jap.EVTDESC27"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	trigger = {
		primary_culture = japanese
		is_year = 1600
		NOT = {
			has_country_modifier = jap_kokugaku
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA27"
		add_country_modifier = { 
			name = jap_kokugaku 
			duration = -1 
		} 
	}
}

# Oie Sodo
country_event = {
	id = flavor_jap.28
	title = "flavor_jap.EVTNAME28"
	desc = "flavor_jap.EVTDESC28"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	trigger = {
		NOT = { tag = JAP }
		primary_culture = japanese
		is_lesser_in_union = no
		OR = {
			vassal_of = JAP
			government = daimyo
		}
		has_heir = yes
		heir_age = 14
		has_regency = no
		NOT = {
			prestige = 40
		}
		NOT = {
			legitimacy = 50
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA28" # Follow the noble's advice
		kill_heir = yes
		add_legitimacy = 20
	}
	option = {
		name = "flavor_jap.EVTOPTB28" # Refuse to comply to their demands
		add_legitimacy = -10
		random_owned_province = {
			limit = {
				culture = japanese
			}
			spawn_rebels = {
				type = noble_rebels
				size = 2
			}
		}
	}
}

# Sankin Kotai
country_event = {
	id = flavor_jap.29
	title = "flavor_jap.EVTNAME29"
	desc = "flavor_jap.EVTDESC29"
	picture = REFORM_eventPicture
	
	trigger = {
		primary_culture = japanese
		tag = JAP
		any_known_country = {
			vassal_of = JAP
			primary_culture = japanese
			NOT = {
				has_country_modifier = jap_sankin_kotai
			}
		}
		is_year = 1635
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_jap.EVTOPTA29"
		every_known_country = {
			limit = {
				vassal_of = JAP
				primary_culture = japanese
			}
			country_event = {
				id = flavor_jap.30
			}
			tooltip = {
				add_opinion = {
					who = ROOT
					modifier = opinion_mildly_displeased
				}
				add_country_modifier = { name = jap_sankin_kotai duration = 3650 }
			}
		}
		random_owned_province = {
			limit = {
				is_capital = yes
			}
			add_base_tax = 2
		}
	}
	option = {
		name = "flavor_jap.EVTOPTB29"
		add_prestige = -5
		every_known_country = {
			limit = {
				vassal_of = JAP
				primary_culture = japanese
			}
			add_opinion = {
				who = ROOT
				modifier = opinion_pleased
			}
		}
	}
}

# Daimyo: Sankin Kotai
country_event = {
	id = flavor_jap.30
	title = "flavor_jap.EVTNAME29"
	desc = "flavor_jap.EVTDESC30"
	picture = REFORM_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_jap.EVTOPTA30"
		add_country_modifier = { 
			name = sankin_kotai
			duration = 3650 
		}
	}
}

### From JapanEvents and ShogunEvents ###

# Unruly Samurai
country_event = {
	id = flavor_jap.31
	title = "flavor_jap.EVTNAME31"
	desc = "flavor_jap.EVTDESC31"
	picture = BATTLE_eventPicture
	
	trigger = {
		OR = {
			government = daimyo
			tag = JAP
		}
		primary_culture = japanese
		OR = {
			legitimacy = 75
			prestige = 75
		}
		war_exhaustion = 0
		is_at_war = no
	}
	
	mean_time_to_happen = {
		months = 500
		modifier = {
			factor = 0.8
			NOT = {
				stability = -1
			}
		}
		modifier = {
			factor = 0.8
			NOT = {
				stability = -2
			}
		}
		modifier = {
			factor = 1.5
			stability = 0
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA31"
		add_adm_power = 60
	}
	
	option = {
		name = "flavor_jap.EVTOPTB31"
		add_prestige = 5
	}
}

# Sword Hunt - episode 1: The Bad Hunt(er)
country_event = {
	id = flavor_jap.32
	title = "flavor_jap.EVTNAME32"
	desc = "flavor_jap.EVTDESC32"
	picture = ANGRY_MOB_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		has_country_modifier = sword_hunter
		NOT = { has_country_flag = sword_hunter_flag }
		OR = {
			legitimacy = 75
			prestige = 75
			stability = 2
		}
	}
	
	mean_time_to_happen = {	
		months = 1
	}
	
	immediate = { set_country_flag = sword_hunter_flag }
	
	option = {
		name = "flavor_jap.EVTOPTA32"
		random_owned_province = {
			limit = {
				culture = japanese
			}
			spawn_rebels = {
				type = anti_tax_rebels
				size = 2
			}
		}
	}
}

#  Sword Hunt - episode 2: Captured Prey
country_event = {
	id = flavor_jap.33
	title = "flavor_jap.EVTNAME33"
	desc = "flavor_jap.EVTDESC33"
	picture = ANGRY_MOB_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		has_country_modifier = sword_hunter
		NOT = { has_country_flag = sword_hunter_flag }
		OR = {
			legitimacy = 75
			prestige = 75
			stability = 2
		}
	}
	mean_time_to_happen = {	
		months = 10
	}
	
	immediate = { set_country_flag = sword_hunter_flag }
	
	option = {
		name = "flavor_jap.EVTOPTA33"
		add_prestige = 25
	}
}

# Sword Hunt - episode 3: Disrupted Hunt
country_event = {
	id = flavor_jap.34
	title = "flavor_jap.EVTNAME34"
	desc = "flavor_jap.EVTDESC34"
	picture = ANGRY_MOB_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		OR = {
			OR = {
				legitimacy = 75
				prestige = 75
				stability = 2
			}
			any_known_country = {
				OR = {
					legitimacy = 75
					prestige = 75
					stability = 2
				}
			}
		}
		has_country_flag = sword_hunter_flag
	}
	
	mean_time_to_happen = {
		months = 10
	}
	
	option = {
		name = "flavor_jap.EVTOPTA34"
		add_stability = -1
		remove_country_modifier = sword_hunter
		clr_country_flag = sword_hunter_flag
	}
}

# Province converts to Catholicism
province_event = {
	id = flavor_jap.35
	title = "flavor_jap.EVTNAME35"
	desc = "flavor_jap.EVTDESC35"
	picture = RELIGION_eventPicture

	trigger = {
		owner = {
			is_religion_enabled = catholic
			primary_culture = japanese
			OR = {
				government = daimyo
				tag = JAP
			}
			has_country_modifier = western_trade
		}
		is_reformation_center = no
		NOT = { religion = catholic }
	}

	mean_time_to_happen = {
		months = 2000
		modifier = {
			factor = 2
			is_capital = yes
		}
		modifier = {
			factor = 0.6
			any_neighbor_province = {
				religion = catholic
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA35"
		change_religion = catholic
	}
}

# Ninja strike
country_event = {
	id = flavor_jap.36
	title = "flavor_jap.EVTNAME36"
	desc = "flavor_jap.EVTDESC36"
	picture = ASSASSINATION_eventPicture
	
	trigger = {
		government = daimyo
		has_country_modifier = ninjas
		primary_culture = japanese
		any_neighbor_country = {
			has_country_modifier = ninjas
		}
	}
	
	mean_time_to_happen = {
		months = 36
	}
	
	option = {
		name = "flavor_jap.EVTOPTA36"
		add_prestige = 5
		every_neighbor_country = {
			limit = { has_country_modifier = ninjas	}
			add_opinion = { who = ROOT modifier = opinion_ninja_attack }
		}
		random_list = {
			50 = { 
				add_prestige = 5
				every_neighbor_country = {
					limit = { has_country_modifier = ninjas	}
					country_event = { id = flavor_jap.37 } 
				}
			}
			50 = { 
				add_prestige = -10
				every_neighbor_country = {
					limit = { has_country_modifier = ninjas	}
					country_event = { id = flavor_jap.38 } 
				} 
			}
		}
		
	}
	option = {
		name = "flavor_jap.EVTOPTB36"
		add_prestige = -5
		every_neighbor_country = {
			limit = { has_country_modifier = ninjas	}
			add_opinion = { who = ROOT modifier = opinion_grateful }
		}
	}
}

# Ninja strike succeeds
country_event = {
	id = flavor_jap.37
	title = "flavor_jap.EVTNAME36"
	desc = "flavor_jap.EVTDESC37"
	picture = ASSASSINATION_eventPicture
	
	is_triggered_only = yes

	option = {
		name = "flavor_jap.EVTOPTA36"
		remove_country_modifier = ninjas
		add_opinion = { who = FROM modifier = opinion_ninja_attack }
		add_casus_belli = {
			target = FROM
			type = cb_spy_discovered
			months = 12
		}
	}
}

# Ninja strike fails
country_event = {
	id = flavor_jap.38
	title = "flavor_jap.EVTNAME36"
	desc = "flavor_jap.EVTDESC38"
	picture = ASSASSINATION_eventPicture
	
	is_triggered_only = yes

	option = {
		name = "flavor_jap.EVTOPTA36"
		add_prestige = 50
		add_opinion = { who = FROM modifier = opinion_irritated }
		add_casus_belli = {
			target = FROM
			type = cb_spy_discovered
			months = 12
		}
	}
}

# Way of the Tea
country_event = {
	id = flavor_jap.39
	title = "flavor_jap.EVTNAME39"
	desc = "flavor_jap.EVTDESC39"
	picture = COURT_eventPicture
	
	trigger = {
		OR = {
			government = daimyo
			tag = JAP
		}
		primary_culture = japanese
		has_country_modifier = "way_of_tea" 
		NOT = { has_country_flag = new_tea_province }
	}

	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = "flavor_jap.EVTOPTA39"
		ai_chance = { factor = 100 }
		random_owned_province = {
			limit = {
				is_core = ROOT
				NOT = { trade_goods = gold }
				NOT = { trade_goods = chinaware }
				NOT = { trade_goods = tea }
			}
			change_trade_goods = tea
		}
		set_country_flag = new_tea_province
	}
	option = {
		name = "flavor_jap.EVTOPTB39"
		ai_chance = { factor = 0 }
	}
}

# Tea with the Emperor
country_event = {
	id = flavor_jap.40
	title = "flavor_jap.EVTNAME40"
	desc = "flavor_jap.EVTDESC40"
	picture = COURT_eventPicture
	
	trigger = {
		has_country_modifier = way_of_tea
		primary_culture = japanese
		government = daimyo
		OR = {
			NOT = {
				legitimacy = 75
			}
			NOT = {
				prestige = 75
			}
			NOT = {
				stability = 2
			}
		}
		prestige = 2
	}
	
	mean_time_to_happen = {
		months = 800
		modifier = {
			factor = 1.2
			prestige = 30
		}
		modifier = {
			factor = 1.3
			prestige = 40
		}
		modifier = {
			factor = 0.8
			NOT = {
				stability = 1
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA40"
		add_prestige = 10
	}
}

# Heirless
country_event = {
	id = flavor_jap.41
	title = "flavor_jap.EVTNAME41"
	desc = "flavor_jap.EVTDESC41"
	picture = NEW_HEIR_eventPicture
	
	trigger = {
		OR = {
			government = daimyo
			AND = {
				tag = JAP
				government = monarchy
			}
		}
		primary_culture = japanese
		has_heir = no
	}
	
	mean_time_to_happen = {
		months = 400
		modifier = {
			factor = 0.9
			NOT = {
				legitimacy = 50
			}
		}
		modifier = {
			factor = 0.9
			NOT = {
				legitimacy = 40
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA41"
		add_prestige = 5
	}
	
	option = {
		name = "flavor_jap.EVTOPTB41"
		define_heir = {
			dynasty = ROOT
			claim = 30
		}
		add_prestige = -25
	}
}

# Losing Face
country_event = {
	id = flavor_jap.42
	title = "flavor_jap.EVTNAME42"
	desc = "flavor_jap.EVTDESC42"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	trigger = {
		OR = {
			government = daimyo
			tag = JAP
		}
		primary_culture = japanese
		adm = 2
		NOT = {
			stability = 1
		}
	}
	
	mean_time_to_happen = {
		months = 600
		modifier = {
			factor = 0.7
			NOT = {
				stability = 0
			}
		}
		modifier = {
			factor = 0.8
			NOT = {
				stability = -1
			}
		}
		modifier = {
			factor = 1.5
			stability = 0
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA42"
		add_stability = -1
	}
	
	option = {
		name = "flavor_jap.EVTOPTB42"
		add_prestige = -5
	}
}

# Levying Additional Taxation
country_event = {
	id = flavor_jap.43
	title = "flavor_jap.EVTNAME43"
	desc = "flavor_jap.EVTDESC43"
	picture = ECONOMY_eventPicture
	
	trigger = {
		OR = {
			government = daimyo
			tag = JAP
		}
		primary_culture = japanese
		stability = 0
		NOT = {
			war_exhaustion = 1
		}
		is_at_war = no
	}
	
	mean_time_to_happen = {
		months = 500
		modifier = {
			factor = 0.8
			stability = 3
		}
		modifier = {
			factor = 0.9
			stability = 1
		}
		modifier = {
			factor = 1.3
			stability = 0
		}
	}

	option = {
		name = "flavor_jap.EVTOPTA43"
		add_years_of_income = 0.5
	}
	
	option = {
		name = "flavor_jap.EVTOPTB43"
		add_yearly_manpower = 1.5
	}
}

# Sword of The Daimyo
country_event = {
	id = flavor_jap.44
	title = "flavor_jap.EVTNAME44"
	desc = "flavor_jap.EVTDESC44"
	picture = COURT_eventPicture
	
	trigger = {
		overextension_percentage = 0.04
		stability = 1
		government = daimyo
		primary_culture = japanese
	}
	
	mean_time_to_happen = {
		months = 800
		modifier = {
			factor = 0.8
			overextension_percentage = 0.06
		}
		modifier = {
			factor = 0.8
			overextension_percentage = 0.08
		}
		modifier = {
			factor = 0.8
			stability = 3
		}
		modifier = {
			factor = 1.5
			NOT = {
				legitimacy = 50
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA44"
		every_country = {
			limit = {
				government = daimyo
				primary_culture = japanese
			}
			add_opinion = { 
				modifier = opinion_angry
				who = ROOT
			}
		}
		add_prestige = 10
	}
	
	option = {
		name = "flavor_jap.EVTOPTB44"
		add_prestige = 5
	}
}

# Lacquerware for the Emperor
country_event = {
	id = flavor_jap.45
	title = "flavor_jap.EVTNAME45"
	desc = "flavor_jap.EVTDESC45"
	picture = COURT_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		stability = 2
		years_of_income = 0.3
		NOT = {
			tag = JAP
		}
		NOT = {
			war_with = JAP
		}
	}
	
	mean_time_to_happen = {
		months = 600
		modifier = {
			factor = 0.8
			NOT = {
				legitimacy = 60
			}
		}
		modifier = {
			factor = 0.9
			NOT = {
				legitimacy = 70
			}
		}
		modifier = {
			factor = 1.5
			legitimacy = 80
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA45"
		add_years_of_income = -0.2
		JAP = {
			add_opinion = {
				who = ROOT
				modifier = opinion_pleased
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTB45"
		add_prestige = -1
	}
}

#  The First Sake
country_event = {
	id = flavor_jap.46
	title = "flavor_jap.EVTNAME46"
	desc = "flavor_jap.EVTDESC46"
	picture = COURT_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		prestige = 20
		NOT = {
			tag = JAP
		}
		NOT = {
			war_with = JAP
		}
		NOT = {
			has_ruler_modifier = jap_first_sake
		}
		has_regency = no
	}
	
	mean_time_to_happen = {
		months = 800
		modifier = {
			factor = 0.9
			stability = 0
		}
		modifier = {
			factor = 0.9
			stability = 1
		}
		modifier = {
			factor = 0.9
			stability = 2
		}
		modifier = {
			factor = 0.9
			stability = 3
		}
		modifier = {
			factor = 1.5
			NOT = {
				stability = 0
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA46"
		add_prestige = 5
		JAP = {
			add_opinion = {
				who = ROOT
				modifier = opinion_pleased
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTB46"
		add_ruler_modifier = {
			name = jap_first_sake 
		}
	}
}

# Calling up Recruits
country_event = {
	id = flavor_jap.47
	title = "flavor_jap.EVTNAME47"
	desc = "flavor_jap.EVTDESC47"
	picture = LAND_MILITARY_eventPicture
	
	trigger = {
		OR = {
			government = daimyo
			tag = JAP
		}
		primary_culture = japanese
		OR = {
			legitimacy = 75
			prestige = 75
		}
		is_at_war = yes
		NOT = {
			has_ruler_modifier = jap_recruits
		}
	}
	
	mean_time_to_happen = {
		months = 500
		modifier = {
			factor = 1.2
			war_exhaustion = 4
		}
		modifier = {
			factor = 1.2
			war_exhaustion = 6
		}
		modifier = {
			factor = 1.2
			war_exhaustion = 8
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA47"
		add_years_of_income = -0.25
		add_ruler_modifier = {
			name = jap_recruits
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTB47"
		add_war_exhaustion = -2
		add_prestige = -5
	}
	
	option = {
		name = "flavor_jap.EVTOPTC47"
		add_prestige = 10
	}
}

# A Shade of Jade
country_event = {
	id = flavor_jap.48
	title = "flavor_jap.EVTNAME48"
	desc = "flavor_jap.EVTDESC48"
	picture = COURT_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		stability = 2
		legitimacy = 50
	}
	
	mean_time_to_happen = {
		months = 600
		modifier = {
			factor = 0.9
			stability = 2
		}
		modifier = {
			factor = 0.9
			stability = 3
		}
		modifier = {
			factor = 1.5
			NOT = {
				stability = 0
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA48"
		add_ruler_modifier = {
			name = jap_jade
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTB48"
		add_adm_power = 10
	}
}

# Spreading Rumors
country_event = {
	id = flavor_jap.49
	title = "flavor_jap.EVTNAME49"
	desc = "flavor_jap.EVTDESC49"
	picture = ELECTION_REPUBLICAN_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		stability = 2
		NOT = {
			has_ruler_modifier = jap_gossip
		}
	}
	
	mean_time_to_happen = {
		months = 500
		modifier = {
			factor = 0.9
			innovativeness_ideas = 7
		}
		modifier = {
			factor = 0.9
			innovativeness_ideas = 6
		}
		modifier = {
			factor = 0.9
			innovativeness_ideas = 5
		}
		modifier = {
			factor = 1.5
			NOT = { innovativeness_ideas = 3 }
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA49"
		add_prestige = 10
		every_country = {
			limit = {
				government = daimyo
				primary_culture = japanese
			}
			add_opinion = { 
				modifier = opinion_mildly_displeased
				who = ROOT 
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTB49"
		add_ruler_modifier = {
			name = jap_gossip
		}
	}
}

# A Mon for our Son
country_event = {
	id = flavor_jap.50
	title = "flavor_jap.EVTNAME50"
	desc = "flavor_jap.EVTDESC50"
	picture = NEW_HEIR_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		has_heir = yes
		heir_age = 15
	}
	
	mean_time_to_happen = {
		months = 800
		modifier = {
			factor = 0.9
			prestige = 5
		}
		modifier = {
			factor = 0.9
			prestige = 10
		}
		modifier = {
			factor = 1.5
			NOT = {
				stability = 0
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA50"
		add_dip_power = 50
	}
	
	option = {
		name = "flavor_jap.EVTOPTB50"
		add_adm_power = 25
	}
	option = {
		name = "flavor_jap.EVTOPTC50"
		add_mil_power = 30
		add_army_tradition = 5
	}
}

# Sharpening Swords
country_event = {
	id = flavor_jap.51
	title = "flavor_jap.EVTNAME51"
	desc = "flavor_jap.EVTDESC51"
	picture = MILITARY_CAMP_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		stability = 1
	}
	
	mean_time_to_happen = {
		months = 500
		modifier = {
			factor = 0.9
			army_tradition = 10
		}
		modifier = {
			factor = 0.9
			army_tradition = 15
		}
		modifier = {
			factor = 1.5
			NOT = {
				has_idea = military_drill
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA51"
		add_army_tradition = 5
	}
	
	option = {
		name = "flavor_jap.EVTOPTB51"
		add_prestige = 5
	}
}

# Shogunate Destabilized
country_event = {
	id = flavor_jap.52
	title = "flavor_jap.EVTNAME52"
	desc = "flavor_jap.EVTDESC52"
	picture = ANGRY_MOB_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		OR = {
			legitimacy = 75
			prestige = 75
		}
		NOT = {
			stability = 0
		}
	}
	
	mean_time_to_happen = {
		months = 600
		modifier = {
			factor = 0.9
			NOT = {
				stability = -1
			}
		}
		modifier = {
			factor = 0.9
			NOT = {
				stability = -2
			}
		}
		modifier = {
			factor = 1.5
			prestige = 2
		}
	}
	
	immediate = {
		hidden_effect = {
			random_province = {
				limit = {
					culture = japanese
					is_core = owner
				}
				set_province_flag = shogunate_destabilized_flag1
			}
			random_province = {
				limit = {
					culture = japanese
					is_core = owner
					NOT = {
						has_province_flag = shogunate_destabilized_flag1
					}
				}
				set_province_flag = shogunate_destabilized_flag2
			}
			random_province = {
				limit = {
					culture = japanese
					is_core = owner
					NOT = {
						has_province_flag = shogunate_destabilized_flag1
					}
					NOT = {
						has_province_flag = shogunate_destabilized_flag2
					}
				}
				set_province_flag = shogunate_destabilized_flag3
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA52"
		random_owned_province = {
			limit = {
				has_province_flag = shogunate_destabilized_flag1
			}
			clr_province_flag = shogunate_destabilized_flag1
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
		}
		random_owned_province = {
			limit = {
				has_province_flag = shogunate_destabilized_flag2
			}
			clr_province_flag = shogunate_destabilized_flag2
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
		}
		random_owned_province = {
			limit = {
				has_province_flag = shogunate_destabilized_flag3
			}
			clr_province_flag = shogunate_destabilized_flag3
			add_province_modifier = {
				name = add_unrest_5_modifier
				duration = 1825
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTB52"
		add_prestige = -10
	}
}

# New Generation of Samurai
country_event = {
	id = flavor_jap.53
	title = "flavor_jap.EVTNAME53"
	desc = "flavor_jap.EVTDESC53"
	picture = MILITARY_CAMP_eventPicture
	
	trigger = {
		OR = {
			government = daimyo
			tag = JAP
		}
		primary_culture = japanese
		NOT = {
			war_exhaustion = 1
		}
	}
	
	mean_time_to_happen = {
		months = 500
		
		modifier = {
			factor = 1.5
			NOT = {
				stability =  0
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA53"
		add_adm_power = 30
	}
	
	option = {
		name = "flavor_jap.EVTOPTB53"
		add_army_tradition = 10
	}
}

# Strengthening the Shogunate
country_event = {
	id = flavor_jap.54
	title = "flavor_jap.EVTNAME54"
	desc = "flavor_jap.EVTDESC54"
	picture = LAND_MILITARY_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		OR = {
			legitimacy = 75
			prestige = 75
		}
		army_tradition = 10
	}
	
	mean_time_to_happen = {
		months = 400
		modifier = {
			factor = 0.9
			army_tradition = 25
		}
		modifier = {
			factor = 0.9
			army_tradition = 30
		}
		modifier = {
			factor = 1.5
			NOT = {
				army_tradition = 20
			}
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA54"
		add_adm_power = 50
	}
	
	option = {
		name = "flavor_jap.EVTOPTB54"
		add_army_tradition = 5
	}
}

# Death or Glory?
country_event = {
	id = flavor_jap.55
	title = "flavor_jap.EVTNAME55"
	desc = "flavor_jap.EVTDESC55"
	picture = ANGRY_MOB_eventPicture
	
	trigger = {
		government = daimyo
		primary_culture = japanese
		OR = {
			legitimacy = 75
			prestige = 75
		}
	}
	
	mean_time_to_happen = {
		months = 500
		modifier = {
			factor = 0.9
			NOT = {
				stability = -1
			}
		}
		modifier = {
			factor = 0.9
			NOT = {
				stability = -2
			}
		}
		modifier = {
			factor = 1.5
			stability = 0
		}
	}
	
	option = {
		name = "flavor_jap.EVTOPTA55"
		add_prestige = 10
	}
	
	option = {
		name = "flavor_jap.EVTOPTB55"
		add_prestige = -1
		add_dip_power = 20
	}
}