###########################
# Japanese Events
###########################

add_namespace = russia2_japan

# Check if File is Loaded
country_event = {
	id = russia2_japan.2092066524

	hidden = yes

	is_triggered_only = yes

	immediate = {
		set_global_flag = russia_reworked_events_loaded_japans
	}
}

# Russia Asks for South Sakhalin
country_event = {
	id = russia2_japan.1
	title = russia2_japan.1.t
	desc = russia2_japan.1.d
	picture = GFX_report_event_soviet_soldiers

	is_triggered_only = yes

	option = {
		ai_chance = {
			base = 20
			modifier = {
				add = 30
				has_war = yes
			}
		}
		name = russia2_japan.1.a
		SOV = {
			country_event = { days = 1 id = russia2_russia.31 }
			effect_tooltip = {
				transfer_state = 537
			}
		}
	}

	option = {
		ai_chance = {
			base = 80
			modifier = {
				add = -30
				has_war = yes
			}
		}
		name = russia2_japan.1.b
		SOV = {
			country_event = { days = 1 id = russia2_russia.32 }
		}
	}
}

# Russia Gives up North Sakhalin
country_event = {
	id = russia2_japan.2
	title = russia2_japan.2.t
	desc = russia2_japan.2.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		ai_chance = {
			base = 90
			modifier = {
				add = -40
				has_completed_focus = JAP_support_the_kodoha_faction
			}
		}
		name = russia2_japan.2.a
		SOV = {
			country_event = { days = 1 id = russia2_russia.33 }
		}
		effect_tooltip = {
			transfer_state = 655
			diplomatic_relation = {
    		country = SOV
    		relation = non_aggression_pact
    		active = yes
			}
		}
		JAP = {
			add_ai_strategy = {
				type = befriend
				id = SOV
				value = 200
			}
		}
	}

	option = {
		ai_chance = {
			base = 10
			modifier = {
				add = 40
				has_completed_focus = JAP_support_the_kodoha_faction
			}
		}
		name = russia2_japan.2.b
		SOV = {
			country_event = { days = 1 id = russia2_russia.34 }
		}
	}
}

# Russia Attacks South Sakhalin!
country_event = {
	id = russia2_japan.3
	title = russia2_japan.3.t
	desc = russia2_japan.3.d
	picture = GFX_report_event_czech_soldiers_02

	is_triggered_only = yes

	option = {
		name = russia2_japan.3.a
	}
}

# Won Border War Against Soviets
country_event = {
	id = russia2_japan.4
	title = russia2_japan.4.t
	desc = russia2_japan.4.d
	picture = GFX_report_event_japanese_soldiers_03

	is_triggered_only = yes

	option = {
		name = russia2_japan.4.a
		add_political_power = 150
		add_war_support = 0.05
		army_experience = 30
	}
}

# Lost Border War Against Soviets
country_event = {
	id = russia2_japan.5
	title = russia2_japan.5.t
	desc = russia2_japan.5.d
	picture = GFX_report_event_dead_soldiers

	is_triggered_only = yes

	option = {
		name = russia2_japan.5.a
		army_experience = 30
	}
}

# Seize Russian Land
country_event = {
	id = russia2_japan.6
	title = russia2_japan.6.t
	desc = russia2_japan.6.d
	picture = GFX_report_event_china_infiltration

	is_triggered_only = yes

	option = { # Yes!!
		name = russia2_japan.6.a
		ai_chance = { base = 80 }
		add_state_claim = 655
		transfer_state = 655
		SOV = {
			country_event = { id = russia2_japan.7 days = 2 }
		}
	}

	option = { # Don't do it...
		name = russia2_japan.6.b
		ai_chance = { base = 20 }
	}
}

# Japan Seizes Land
country_event = {
	id = russia2_japan.7
	title = russia2_japan.7.t
	desc = russia2_japan.7.d
	picture = GFX_report_event_japanese_soldiers_03

	is_triggered_only = yes

	option = { # Damn You...
		name = russia2_japan.7.a
		ai_chance = { base = 100 }
	}
}

#Japan Receive Russian Proposition for Non-Aggression Pact
country_event = {
	id = russia2_japan.8
	title = russia2_japan.8.t
	desc = russia2_japan.8.d
	picture = GFX_report_event_japan_europe_pact

	is_triggered_only = yes

	option = { #Accept
		name = russia2_japan.8.a
		ai_chance = {
			base = 90
		}
		if = {
			limit = {
				JAP = {
					is_ai = yes
				}
			}
			JAP = {
				add_ideas = SOV_Japan_non_agression_pact_sakhalin
			}
		}
		JAP = {
			transfer_state = 655
		}
		SOV = {
			country_event = { id = russia2_japan.9 hours = 3 }
		}
	}

	option = { #Refuse
		name = russia2_japan.8.b
		ai_chance = {
			base = 10
		}
		SOV = {
			country_event = { id = russia2_japan.10 hours = 3 }
		}
	}
}

# Japan Accepts
country_event = {
	id = russia2_japan.9
	title = russia2_japan.9.t
	desc = russia2_japan.9.d
	picture = GFX_report_event_soviet_finnish_pact

	is_triggered_only = yes

	option = { #Nice
		name = russia2_japan.9.a
		ai_chance = { base = 100 }
		diplomatic_relation = {
    		country = JAP
    		relation = non_aggression_pact
    		active = yes
		}
	}
}

# Japan Refuse
country_event = {
	id = russia2_japan.10
	title = russia2_japan.10.t
	desc = russia2_japan.10.d
	picture = GFX_report_event_chinese_soldiers_01

	is_triggered_only = yes

	option = { #Damn
		name = russia2_japan.10.a
		ai_chance = { base = 100 }
	}
}

#Japan Receive Russian Proposition to Form an Alliance
country_event = {
	id = russia2_japan.11
	title = russia2_japan.11.t
	desc = russia2_japan.11.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = { #We Will Only Accept if they are ready to make some conscession
		name = russia2_japan.11.a
		trigger = {
			SOV = {
				has_completed_focus = SOV_firm_hand
				has_government = neutrality
			}
		}
		ai_chance = { base = 100 }
		SOV = {
			country_event = { id = russia2_japan.12 days = 1 }
		}
	}

	option = { #We Will Accept
		name = russia2_japan.11.b
		trigger = {
			SOV = {
				has_completed_focus = SOV_new_way_life
				has_government = fascism
			}
		}
		ai_chance = { base = 100 }
		SOV = {
			country_event = { id = russia2_japan.16 days = 1 }
		}
		if = {
			limit = {
				SOV = {
					is_in_faction = no
				}
				JAP = {
					is_faction_leader = yes
				}
			}
			SOV = {
				create_faction = russo_japanese_alliance
				add_to_faction = JAP
			}
		}
		else_if = {
			limit = {
				SOV = {
					is_faction_leader = yes
				}
				JAP = {
					is_in_faction = no
				}
			}
			SOV = {
				add_to_faction = JAP
			}
		}
		else = {
			SOV = {
				create_faction = russo_japanese_alliance
				add_to_faction = JAP
			}
		}
		JAP = {
			add_ai_strategy = {
				type = befriend
				id = SOV
				value = 200
			}
		}
		JAP = {
			add_ai_strategy = {
				type = alliance
				id = SOV
				value = 500
			}
		}
		SOV = {
			add_ai_strategy = {
				type = befriend
				id = JAP
				value = 200
			}
		}
		SOV = {
			add_ai_strategy = {
				type = befriend
				id = JAP
				value = 500
			}
		}
		if = {
			limit = {
				has_government = neutrality
				has_completed_focus = JAP_support_the_kodoha_faction
				is_ai = yes
			}
			unlock_national_focus = JAP_technological_exchange
		}
	}

	option = { #We Won't Join These Rats
		name = russia2_japan.11.c
		ai_chance = {
			base = 0
		}
		SOV = {
			country_event = { id = russia2_japan.17 days = 1 }
		}
	}
}

#Japan Wants Concession From Us
country_event = {
	id = russia2_japan.12
	title = russia2_japan.12.t
	desc = russia2_japan.12.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	option = { #Accept
		name = russia2_japan.12.a
		ai_chance = {
			base = 80
		}
		SOV = {
			show_ideas_tooltip = SOV_Japanese_concession
		}
		if = {
			limit = {
				SOV = {
					owns_state = 655
				}
			}
			JAP = {
				transfer_state = 655
			}
		}
		JAP = {
			country_event = { id = russia2_japan.13 days = 1 }
		}
	}

	option = { #Refuse
		name = russia2_japan.12.b
		ai_chance = {
			base = 20
		}
		JAP = {
			country_event = { id = russia2_japan.14 days = 1 }
		}
	}
}

#Russia Accepts the Concession
country_event = {
	id = russia2_japan.13
	title = russia2_japan.13.t
	desc = russia2_japan.13.d
	picture = GFX_report_event_japan_europe_pact

	is_triggered_only = yes

	option = { #They Are Worthy of Our Trust
		name = russia2_japan.13.a
		ai_chance = {
			base = 100
		}
		hidden_effect = {
			SOV = {
				add_ideas = SOV_Japanese_concession
			}
		}
		add_ideas = SOV_Russian_concession_jap
		if = {
			limit = {
				SOV = {
					is_in_faction = no
				}
				JAP = {
					is_faction_leader = yes
				}
			}
			SOV = {
				create_faction = russo_japanese_alliance
				add_to_faction = JAP
			}
		}
		else_if = {
			limit = {
				SOV = {
					is_faction_leader = yes
				}
				JAP = {
					is_in_faction = no
				}
			}
			SOV = {
				create_faction = russo_japanese_alliance
				add_to_faction = JAP
			}
		}
		else = {
			SOV = {
				create_faction = russo_japanese_alliance
				add_to_faction = JAP
			}
		}
		SOV = {
			country_event = { id = russia2_japan.15 days = 1 }
		}
		JAP = {
			add_ai_strategy = {
				type = befriend
				id = SOV
				value = 200
			}
		}
		JAP = {
			add_ai_strategy = {
				type = alliance
				id = SOV
				value = 500
			}
		}
		SOV = {
			add_ai_strategy = {
				type = alliance
				id = JAP
				value = 200
			}
		}
		SOV = {
			add_ai_strategy = {
				type = befriend
				id = JAP
				value = 500
			}
		}
		hidden_effect = {
			news_event = { id = newsrussia2.138 days = 1 }
		}
	}
}

#Russia Refuse the Concession
country_event = {
	id = russia2_japan.14
	title = russia2_japan.14.t
	desc = russia2_japan.14.d
	picture = GFX_report_event_japanese_siam_politicians

	is_triggered_only = yes

	option = { #We Knew they would Refuse
		name = russia2_japan.14.a
		ai_chance = {
			base = 100
		}
	}
}

#Japans Accepts the Concession
country_event = {
	id = russia2_japan.15
	title = russia2_japan.15.t
	desc = russia2_japan.15.d
	picture = GFX_report_event_japanese_reply

	is_triggered_only = yes

	option = { #May Our Alliance and Friendship Last Long Enough
		name = russia2_japan.15.a
		ai_chance = {
			base = 100
		}
	}
}

#Japans Accepts Our Alliance Proposition
country_event = {
	id = russia2_japan.16
	title = russia2_japan.16.t
	desc = russia2_japan.16.d
	picture = GFX_report_event_japanese_parade

	is_triggered_only = yes

	option = { #May Our Alliance and Friendship Last Long Enough
		name = russia2_japan.16.a
		ai_chance = {
			base = 100
		}
		hidden_effect = {
			news_event = { id = newsrussia2.138 hours = 12 }
		}
	}
}

#Japans Refused Our Alliance Proposition
country_event = {
	id = russia2_japan.17
	title = russia2_japan.17.t
	desc = russia2_japan.17.d
	picture = GFX_report_event_japanese_transport_soldiers

	is_triggered_only = yes

	option = { #Those Damn Rats !
		name = russia2_japan.17.a
		ai_chance = {
			base = 100
		}
	}
}

#Japan Receive Event to Invade China With Russia
country_event = {
	id = russia2_japan.18
	title = russia2_japan.18.t
	desc = russia2_japan.18.d
	picture = GFX_report_event_chinese_officers

	is_triggered_only = yes

	option = { #Accpets
		name = russia2_japan.18.a
		ai_chance = {
			base = 95
			modifier = {
				factor = 0
				any_country = {
					NOT = {
						tag = event_target:WTT_current_china_leader
					}
					is_major = yes
					has_war_with = JAP
				}
			}
		}
		SOV = {
			country_event = { id = russia2_china.2 hours = 12 }
		}
	}

	option = { #Refuse
		name = russia2_japan.18.b
		ai_chance = {
			base = 5
			modifier = {
				add = 95
				any_country = {
					NOT = {
						tag = event_target:WTT_current_china_leader
					}
					is_major = yes
					has_war_with = JAP
				}
			}
		}
		SOV = {
			country_event = { id = russia2_china.3 hours = 12 }
		}
    }
}

#Japan Receive Event to let Russia Join the War
country_event = {
	id = russia2_japan.19
	title = russia2_japan.19.t
	desc = russia2_japan.19.d
	picture = GFX_report_event_soviet_tanks

	is_triggered_only = yes

	option = { #Accpets
		name = russia2_japan.19.a
		ai_chance = {
			base = 90
			modifier = {
				factor = 0
				event_target:WTT_current_china_leader = {
					surrender_progress > 0.75
				}
			}
		}
		SOV = {
			country_event = { id = russia2_china.4 hours = 12 }
		}
	}

	option = { #Refuse
		name = russia2_japan.19.b
		ai_chance = {
			base = 10
			modifier = {
				add = 90
				event_target:WTT_current_china_leader = {
					surrender_progress > 0.75
				}
			}
		}
		SOV = {
			country_event = { id = russia2_china.5 hours = 12 }
		}
    }
}

#Japan Receive Event to Negotiate with CHI
country_event = {
	id = russia2_japan.20
	title = russia2_japan.20.t
	desc = russia2_japan.20.d
	picture = GFX_report_event_china_infiltration

	is_triggered_only = yes

	option = { #Accpets
		name = russia2_japan.20.a
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				event_target:WTT_current_china_leader = {
					surrender_progress > 0.75
				}
			}
		}
		SOV = {
			country_event = { id = russia2_china.9 hours = 12 }
		}
		custom_effect_tooltip = if_we_join_we_wont_leave_japan
		add_war_support = -0.1
	}

	option = { #Refuse
		name = russia2_japan.20.b
		ai_chance = {
			base = 0
			modifier = {
				add = 100
				event_target:WTT_current_china_leader = {
					surrender_progress > 0.75
				}
			}
		}
		SOV = {
			country_event = { id = russia2_china.10 hours = 12 }
		}
		hidden_effect = {
			event_target:WTT_current_china_leader = {
				country_event = { id = russia2_china.10 hours = 12 }
			}
		}
    }
}

#Japan Receive Event that the treaty was unfair
country_event = {
	id = russia2_japan.21
	title = russia2_japan.21.t
	desc = russia2_japan.21.d
	picture = GFX_report_event_chinese_soldiers_city_ruin

	is_triggered_only = yes

	option = { #Leave the Faction in Protest
		name = russia2_japan.21.a
		ai_chance = {
			base = 100
		}
		leave_faction = yes
		SOV = {
			country_event = { id = russia2_japan.22 }
		}
		JAP = {
			add_ai_strategy = {
				type = antagonize
				id = SOV
				value = 600
			}
			add_ai_strategy = {
				type = antagonize
				id = event_target:WTT_current_china_leader
				value = 200
			}
			add_ai_strategy = {
				type = alliance
				id = SOV
				value = -1000
			}
		}
	}

	option = { #We Just Have to Trust Them
		name = russia2_japan.21.b
		ai_chance = {
			base = 0
		}
		add_war_support = -0.40
		add_stability = -0.50
    }
}

#Japans Leave our Faction to Protests the Sino-Japanese treaty
country_event = {
	id = russia2_japan.22
	title = russia2_japan.22.t
	desc = russia2_japan.22.d
	picture = GFX_report_event_japanese_transport_soldiers

	is_triggered_only = yes

	option = { #Those Damn idiots !
		name = russia2_japan.22.a
		ai_chance = {
			base = 100
		}
	}
}

#Russia propose North Sakhalin
country_event = {
	id = russia2_japan.23
	title = russia2_japan.23.t
	desc = russia2_japan.23.d
	picture = GFX_report_event_chinese_soldiers_running

	is_triggered_only = yes

	option = { #We accept
		name = russia2_japan.23.a
		ai_chance = {
			base = 60
		}
		custom_effect_tooltip = we_will_receive_north_sakhalin_from_russia_japan_tt
		custom_effect_tooltip = if_we_accept_and_send_volunteers_gain_good_tt
		custom_effect_tooltip = upon_start_civil_war_idea_tt
		show_ideas_tooltip = SOV_Participation_russian_civil_war_foreign
		SOV = {
			country_event = { id = russia2_japan.24 days = 1 }
			set_country_flag = japan_accept_to_help_give_north_sakhalin
		}
	}

	option = { #We Refuse
		name = russia2_japan.23.b
		ai_chance = {
			base = 40
		}
		SOV = {
			country_event = { id = russia2_japan.25 days = 1 }
		}
		set_country_flag = has_refused_sak_localisation_event
	}
}

#Japans Accept Sakhalin Offer
country_event = {
	id = russia2_japan.24
	title = russia2_japan.24.t
	desc = russia2_japan.24.d
	picture = GFX_handshake_russia2

	is_triggered_only = yes

	option = { #A needed Sacrifice
		name = russia2_japan.24.a
		ai_chance = {
			base = 100
		}
		set_country_flag = can_recruit_japanese_volunteer
		unlock_decision_tooltip = SOV_recruit_japanese_elite_unit
		custom_effect_tooltip = gains_token_to_buy_weapons
		add_to_variable = {
			var = token_buy_weapons
			value = 1
		}
		JAP = {
			set_country_flag = help_whiteguard_during_russian_civil_war
		}
	}
}

#Japans Refuse Sakhalin Offer
country_event = {
	id = russia2_japan.25
	title = russia2_japan.25.t
	desc = russia2_japan.25.d
	picture = GFX_report_event_german_detained_china

	is_triggered_only = yes

	option = { #We could maybe Offer them the Russia Far East ...
		name = russia2_japan.25.a
		ai_chance = {
			base = 0
		}
		custom_effect_tooltip = if_japan_accept_we_will_have_manchu
		custom_effect_tooltip = future_ocasion_to_cancel_deal_japan_manchu
		JAP = {
			country_event = { id = russia2_japan.26 days = 1 }
		}
	}

	option = { #Then we will leave them alone
		name = russia2_japan.25.b
		ai_chance = {
			base = 100
		}
	}
}

#Russia Wants to offer the Far East
country_event = {
	id = russia2_japan.26
	title = russia2_japan.26.t
	desc = {
		text = russia2_japan.26.d
		trigger = {
			NOT = {
				has_country_flag = japan_accept_to_help_give_north_sakhalin
			}
		}
	}
	desc = {
		text = russia2_japan.26.d_2
		trigger = {
			has_country_flag = has_refused_sak_localisation_event
		}
	}
	picture = GFX_russian_civil_war_russia2

	is_triggered_only = yes

	option = { #Accept Offer
		name = russia2_japan.26.a
		ai_chance = {
			base = 90
		}
		custom_effect_tooltip = we_will_receive_far_east_from_russia_japan_tt
		custom_effect_tooltip = if_we_accept_and_send_volunteers_gain_good_tt
		custom_effect_tooltip = upon_start_civil_war_idea_tt
		show_ideas_tooltip = SOV_Participation_russian_civil_war_foreign
		SOV = {
			country_event = { id = russia2_japan.27 days = 1 }
			set_country_flag = japan_accept_to_help_give_russian_far_east
		}
	}

	option = { #Refuse Offer
		name = russia2_japan.26.b
		ai_chance = {
			base = 10
		}
		SOV = {
			country_event = { id = russia2_japan.28 days = 1 }
		}
	}
}

#Japans Accept Far East Offer
country_event = {
	id = russia2_japan.27
	title = russia2_japan.27.t
	desc = russia2_japan.27.d
	picture = GFX_soldiers_handshaking_kolchak_russia2

	is_triggered_only = yes

	option = { #Help but at What Cost ?
		name = russia2_japan.27.a
		ai_chance = {
			base = 100
		}
		set_country_flag = can_recruit_japanese_volunteer
		set_country_flag = can_buy_japanese_ships
		unlock_decision_tooltip = SOV_recruit_japanese_elite_unit
		unlock_decision_tooltip = SOV_buy_japanese_ships_cw
		custom_effect_tooltip = gains_token_to_buy_weapons
		add_to_variable = {
			var = token_buy_weapons
			value = 1
		}
		JAP = {
			set_country_flag = help_whiteguard_during_russian_civil_war
		}
	}
}

#Japans Refuse Far East Offer
country_event = {
	id = russia2_japan.28
	title = russia2_japan.28.t
	desc = russia2_japan.28.d
	picture = GFX_report_event_germany_politician_handshake

	is_triggered_only = yes

	option = { #But Why ?
		name = russia2_japan.28.a
		ai_chance = {
			base = 100
		}
	}
}

#The Russian Far East
country_event = {
	id = russia2_japan.29
	title = russia2_japan.29.t
	desc = russia2_japan.29.d
	picture = GFX_soldiers_handshaking_kolchak_russia2

	is_triggered_only = yes

	option = { #Good
		name = russia2_japan.29.a
		ai_chance = {
			base = 90
		}
		MAN = {
			transfer_state = 408
			transfer_state = 409
			transfer_state = 560
			transfer_state = 657
			transfer_state = 561
			add_state_core = 408
			add_state_core = 409
			add_state_core = 560
			add_state_core = 657
			add_state_core = 561
		}
		hidden_effect = {
			if = {
				limit = {
					SOV = {
						NOT = {
							has_country_flag = america_receive_siberia_generic
						}
					}
				}
				563 = {
					set_demilitarized_zone = yes
				}
				574 = {
					set_demilitarized_zone = yes
				}
				562 = {
					set_demilitarized_zone = yes
				}
			}
			else_if = {
				limit = {
					SOV = {
						has_country_flag = america_receive_siberia_generic
					}
				}
				563 = {
					set_demilitarized_zone = yes
				}
			}
		}
	}

	option = { #We Will Keep It
		name = russia2_japan.29.b
		ai_chance = {
			base = 10
		}
		JAP = {
			transfer_state = 408
			transfer_state = 409
			transfer_state = 560
			transfer_state = 657
			transfer_state = 561
		}
		hidden_effect = {
			if = {
				limit = {
					SOV = {
						NOT = {
							has_country_flag = america_receive_siberia_generic
						}
					}
				}
				563 = {
					set_demilitarized_zone = yes
				}
				574 = {
					set_demilitarized_zone = yes
				}
				562 = {
					set_demilitarized_zone = yes
				}
			}
			else_if = {
				limit = {
					SOV = {
						has_country_flag = america_receive_siberia_generic
					}
				}
				563 = {
					set_demilitarized_zone = yes
				}
			}
		}
	}
}

#Russia Wants the Far East Back
country_event = {
	id = russia2_japan.30
	title = russia2_japan.30.t
	desc = russia2_japan.30.d
	picture = GFX_report_event_soviet_finnish_pact

	is_triggered_only = yes

	option = { #Let's give it Back
		name = russia2_japan.30.a
		ai_chance = {
			base = 30
			modifier = {
				add = 60
				SOV = {
					OR = {
						has_completed_focus = SOV_unthinkable_alliance
						is_in_faction_with = JAP
					}
					NOT = {
						has_country_flag = SOV_fascist_focus_on_asia
						has_idea = SOV_Anti_japanese_sentiment
					}
				}
			}
		}
		SOV = {
			country_event = { id = russia2_japan.31 days = 1 }
		}
	}

	option = { #Do not Give it back
		name = russia2_japan.30.b
		ai_chance = {
			base = 70
			modifier = {
				add = -60
				SOV = {
					OR = {
						has_country_flag = SOV_fascist_focus_on_asia
						has_idea = SOV_Anti_japanese_sentiment
					}
					NOT = {
						has_completed_focus = SOV_unthinkable_alliance
						is_in_faction_with = JAP
					}
				}
			}
		}
		SOV = {
			country_event = { id = russia2_japan.32 days = 1 }
		}
	}
}

#japan Accept to Return the Far East
country_event = {
	id = russia2_japan.31
	title = russia2_japan.31.t
	desc = russia2_japan.31.d
	picture = GFX_soldiers_handshaking_kolchak_russia2

	is_triggered_only = yes

	option = { #Good
		name = russia2_japan.31.a
		ai_chance = {
			base = 100
		}
		SOV = {
			clr_country_flag = japan_receive_far_east_generic
			transfer_state = 408
			transfer_state = 409
			transfer_state = 560
			transfer_state = 657
			transfer_state = 561
			add_state_core = 408
			add_state_core = 409
			add_state_core = 560
			add_state_core = 657
			add_state_core = 561
		}
		hidden_effect = {
			MAN = {
				remove_state_core = 408
				remove_state_core = 409
				remove_state_core = 560
				remove_state_core = 657
				remove_state_core = 561
			}
			if = {
				limit = {
					SOV = {
						NOT = {
							has_country_flag = america_receive_siberia_generic
						}
					}
				}
				563 = {
					set_demilitarized_zone = no
				}
				574 = {
					set_demilitarized_zone = no
				}
				562 = {
					set_demilitarized_zone = no
				}
			}
			else_if = {
				limit = {
					SOV = {
						has_country_flag = america_receive_siberia_generic
					}
				}
				563 = {
					set_demilitarized_zone = no
				}
			}
		}
	}
}

#japan Refuse to Return the Far East
country_event = {
	id = russia2_japan.32
	title = russia2_japan.32.t
	desc = russia2_japan.32.d
	picture = GFX_report_event_soviet_in_riga

	is_triggered_only = yes

	option = { #Damn
		name = russia2_japan.32.a
		ai_chance = {
			base = 100
		}
		SOV = {
			add_state_claim = 408
			add_state_claim = 409
			add_state_claim = 560
			add_state_claim = 657
			add_state_claim = 561
		}
		if = {
			limit = {
				NOT = {
					is_in_faction_with = JAP
				}
			}
			create_wargoal = {
				target = MAN
				type = take_claimed_state
			}
		}
		else_if = {
			limit = {
				is_in_faction_with = JAP
			}
			custom_effect_tooltip = nothing_because_faction_with_jap
		}
	}
}

#Russia Ultimatum to Return the Far East
country_event = {
	id = russia2_japan.33
	title = russia2_japan.33.t
	desc = russia2_japan.33.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Let's give it Back
		name = russia2_japan.33.a
		ai_chance = {
			base = 30
			modifier = {
				add = 50
				SOV = {
					num_of_factories > 150
					num_divisions > 200
				}
			}
		}
		SOV = {
			country_event = { id = russia2_japan.34 days = 1 }
		}
	}

	option = { #Do not Give it back
		name = russia2_japan.33.b
		ai_chance = {
			base = 70
			modifier = {
				add = -60
				SOV = {
					num_of_factories > 150
					num_divisions > 200
				}
			}
		}
		SOV = {
			country_event = { id = russia2_japan.35 days = 1 }
		}
	}
}

#Japan Accepts to return
country_event = {
	id = russia2_japan.34
	title = russia2_japan.34.t
	desc = russia2_japan.34.d
	picture = GFX_cavalry_parade_russia2

	is_triggered_only = yes

	option = { #Good
		name = russia2_japan.34.a
		ai_chance = {
			base = 100
		}
		SOV = {
			clr_country_flag = japan_receive_far_east_generic
			transfer_state = 408
			transfer_state = 409
			transfer_state = 560
			transfer_state = 657
			transfer_state = 561
			add_state_core = 408
			add_state_core = 409
			add_state_core = 560
			add_state_core = 657
			add_state_core = 561
		}
		hidden_effect = {
			MAN = {
				remove_state_core = 408
				remove_state_core = 409
				remove_state_core = 560
				remove_state_core = 657
				remove_state_core = 561
			}
			if = {
				limit = {
					SOV = {
						NOT = {
							has_country_flag = america_receive_siberia_generic
						}
					}
				}
				563 = {
					set_demilitarized_zone = no
				}
				574 = {
					set_demilitarized_zone = no
				}
				562 = {
					set_demilitarized_zone = no
				}
			}
			else_if = {
				limit = {
					SOV = {
						has_country_flag = america_receive_siberia_generic
					}
				}
				563 = {
					set_demilitarized_zone = no
				}
			}
		}
	}
}

#Japan Refuses to return
country_event = {
	id = russia2_japan.35
	title = russia2_japan.35.t
	desc = russia2_japan.35.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Damn
		name = russia2_japan.35.a
		ai_chance = {
			base = 100
		}
		SOV = {
			add_state_claim = 408
			add_state_claim = 409
			add_state_claim = 560
			add_state_claim = 657
			add_state_claim = 561
			create_wargoal = {
				target = JAP
				type = take_claimed_state
			}
		}
	}
}

#Fate of Japan
country_event = {
	id = russia2_japan.36
	title = russia2_japan.36.t
	desc = russia2_japan.36.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Send Delegation
		name = russia2_japan.36.a
		ai_chance = {
			base = 20
		}
		add_political_power = 25
		JAP = {
			country_event = russia2_japan.37
		}
	}

	option = { #Demand Manchuria
		name = russia2_japan.36.b
		ai_chance = {
			base = 20
		}
		trigger = {
			any_state = {
				OR = {
					state = 714
					state = 761
					state = 610
					state = 328
					state = 715
					state = 716
					state = 717
					state = 745
				}
				OR = {
					is_owned_by = JAP
					any_country = {
						is_subject_of = JAP
						owns_state = PREV
					}
				}
			}
		}
		JAP = {
			country_event = russia2_japan.39
		}
	}

	option = { #Alliance
		name = russia2_japan.36.c
		ai_chance = {
			base = 20
		}
		trigger = {
			JAP = {
				has_government = democratic
			}
			OR = {
				is_faction_leader = yes
				JAP = {
					is_faction_leader = yes
				}
			}
		}
		JAP = {
			country_event = russia2_japan.42
		}
	}

	option = { #Non-Aggression Pact
		name = russia2_japan.36.e
		ai_chance = {
			base = 20
		}
		trigger = {
			JAP = {
				NOT = {
					has_government = democratic
				}
			}
		}
		JAP = {
			country_event = russia2_japan.45
		}
	}
}

#Japan Receives Delegation
country_event = {
	id = russia2_japan.37
	title = russia2_japan.37.t
	desc = russia2_japan.37.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Okay send back
		name = russia2_japan.37.a
		ai_chance = {
			base = 100
		}
		add_political_power = 25
		add_opinion_modifier = {
			target = FROM
			modifier = russian_sent_delegation
		}
		FROM = {
			country_event = russia2_japan.38
		}
	}
}

#Japan Sends Back
country_event = {
	id = russia2_japan.38
	title = russia2_japan.38.t
	desc = russia2_japan.38.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yay
		name = russia2_japan.38.a
		ai_chance = {
			base = 100
		}
		add_opinion_modifier = {
			target = FROM
			modifier = russian_sent_delegation
		}
	}

	option = { #Okay, ask for Sakhalin and the Islands
		name = russia2_japan.38.b
		trigger = {
			any_state = {
				OR = {
					state = 537
					state = 655
					state = 555
				}
				OR = {
					is_owned_by = JAP
					any_country = {
						is_subject_of = JAP
						owns_state = PREV
					}
				}
			}
		}
		ai_chance = {
			base = 100
		}
		add_opinion_modifier = {
			target = FROM
			modifier = russian_sent_delegation
		}
		JAP = {
			country_event = russia2_japan.49
		}
	}
}

#Russia Demands Manchuria
country_event = {
	id = russia2_japan.39
	title = russia2_japan.39.t
	desc = russia2_japan.39.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yes
		name = russia2_japan.39.a
		ai_chance = {
			base = 40
			modifier = {
				add = 40
				strength_ratio = {
					tag = SOV
					ratio < 0.8
				}
				NOT = {
					has_war_with = event_target:WTT_current_china_leader
				}
			}
			modifier = {
				add = -30
				has_war_with = event_target:WTT_current_china_leader
			}
		}
		every_state = {
			limit = {
				OR = {
					state = 714
					state = 761
					state = 610
					state = 328
					state = 715
					state = 716
					state = 717
					state = 745
				}
				OR = {
					is_owned_by = ROOT
					any_country = {
						owns_state = PREV
						is_subject_of = ROOT
					}
				}
			}
			FROM = {
				transfer_state = PREV
			}
			hidden_effect = {
				if = {
					limit = {
						has_resistance = no
						NOT = {
							is_core_of = SOV
						}
					}
					start_resistance = yes
				}
			}
		}
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		FROM = {
			country_event = russia2_japan.40
		}
	}

	option = { #No
		name = russia2_japan.39.b
		ai_chance = {
			base = 60
			modifier = {
				add = -40
				strength_ratio = {
					tag = SOV
					ratio < 0.8
				}
				NOT = {
					has_war_with = event_target:WTT_current_china_leader
				}
			}
			modifier = {
				add = 30
				has_war_with = event_target:WTT_current_china_leader
			}
		}
		FROM = {
			country_event = russia2_japan.41
		}
	}
}

#Japan Accepts
country_event = {
	id = russia2_japan.40
	title = russia2_japan.40.t
	desc = russia2_japan.40.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yay
		name = russia2_japan.40.a
		ai_chance = {
			base = 100
		}
		hidden_effect = {
			if = {
				limit = {
					any_state = {
						OR = {
							state = 714
							state = 761
							state = 610
							state = 328
							state = 715
							state = 716
							state = 717
							state = 745
						}
						is_owned_by = ROOT
					}
				}
				country_event = russia2_japan.48
			}
		}
	}
}

#Japan Refuses
country_event = {
	id = russia2_japan.41
	title = russia2_japan.41.t
	desc = russia2_japan.41.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #War
		name = russia2_japan.41.a
		ai_chance = {
			base = 100
		}
		create_wargoal = {
			type = take_state_focus
			target = JAP
			expire = 0
			generator = { 714 761 610 328 715 716 717 }
		}
	}
}

#Russia Demands Alliance
country_event = {
	id = russia2_japan.42
	title = russia2_japan.42.t
	desc = russia2_japan.42.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yes
		name = russia2_japan.42.a
		ai_chance = {
			base = 75
			modifier = {
				add = 25
				OR = {
					has_war = no
					AND = {
						has_war = yes
						is_in_faction = no
					}
				}
				OR = {
					AND = {
						is_faction_leader = yes
						SOV = {
							NOT = {
								is_faction_leader = yes
							}
						}
					}
					AND = {
						is_faction_leader = no
						SOV = {
							is_faction_leader = yes
						}
					}
				}
			}
			modifier = {
				factor = 0
				is_faction_leader = yes
				SOV = {
					is_faction_leader = yes
				}
			}
		}
		if = {
			limit = {
				FROM = {
					is_faction_leader = yes
				}
			}
			if = {
				limit = {
					is_faction_leader = yes
				}
				every_other_country = {
					limit = {
						NOT = {
							is_subject_of = ROOT
						}
						is_in_faction_with = ROOT
					}
					FROM = {
						add_to_faction = PREV
					}
				}
			}
			FROM = {
				add_to_faction = ROOT
			}
		}
		else_if = {
			limit = {
				is_faction_leader = yes
			}
			add_to_faction = FROM
		}
		FROM = {
			country_event = russia2_japan.43
		}
		add_ai_strategy = {
			type = alliance
			id = SOV
			value = 500
		}
	}

	option = { #No
		name = russia2_japan.42.b
		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				OR = {
					has_war = no
					AND = {
						has_war = yes
						is_in_faction = no
					}
				}
				OR = {
					AND = {
						is_faction_leader = yes
						SOV = {
							NOT = {
								is_faction_leader = yes
							}
						}
					}
					AND = {
						is_faction_leader = no
						SOV = {
							is_faction_leader = yes
						}
					}
				}
			}
			modifier = {
				add = 75
				is_faction_leader = yes
				SOV = {
					is_faction_leader = yes
				}
			}
		}
		FROM = {
			country_event = russia2_japan.44
		}
	}
}

#Japan Accepts Alliance
country_event = {
	id = russia2_japan.43
	title = russia2_japan.43.t
	desc = russia2_japan.43.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yay
		name = russia2_japan.43.a
		ai_chance = {
			base = 100
		}
		add_ai_strategy = {
			type = alliance
			id = JAP
			value = 500
		}
	}
}

#Japan Refuses Alliance
country_event = {
	id = russia2_japan.44
	title = russia2_japan.44.t
	desc = russia2_japan.44.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Damn
		name = russia2_japan.44.a
		ai_chance = {
			base = 100
		}
	}
}

#Russia Demands Non-Aggression Pact
country_event = {
	id = russia2_japan.45
	title = russia2_japan.45.t
	desc = russia2_japan.45.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yes
		name = russia2_japan.45.a
		ai_chance = {
			base = 80
			modifier = {
				add = -70
				OR = {
					has_wargoal_against = SOV
					is_justifying_wargoal_against = SOV
				}
			}
		}
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		FROM = {
			country_event = russia2_japan.46
		}
	}

	option = { #No
		name = russia2_japan.45.b
		ai_chance = {
			base = 20
			modifier = {
				add = 70
				OR = {
					has_wargoal_against = SOV
					is_justifying_wargoal_against = SOV
				}
			}
		}
		FROM = {
			country_event = russia2_japan.47
		}
	}
}

#Japan Accepts Non-Aggression Pact
country_event = {
	id = russia2_japan.46
	title = russia2_japan.46.t
	desc = russia2_japan.46.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yay
		name = russia2_japan.46.a
		ai_chance = {
			base = 100
		}
	}
}

#Japan Refuses Non-Aggression Pact
country_event = {
	id = russia2_japan.47
	title = russia2_japan.47.t
	desc = russia2_japan.47.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Damn
		name = russia2_japan.47.a
		ai_chance = {
			base = 100
		}
	}
}

#Fate of Manchuria
country_event = {
	id = russia2_japan.48
	title = russia2_japan.48.t
	desc = russia2_japan.48.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Annex it
		name = russia2_japan.48.a
		ai_chance = {
			base = 0
		}
		every_state = {
			limit = {
				OR = {
					state = 714
					state = 761
					state = 610
					state = 328
					state = 715
					state = 716
					state = 717
					state = 745
				}
				is_owned_by = ROOT
			}
			add_compliance = 10
		}
	}

	option = { #Puppet it
		name = russia2_japan.48.b
		ai_chance = {
			base = 100
		}
		trigger = {
			MAN = {
				exists = no
			}
			any_state = {
				OR = {
					state = 714
					state = 761
					state = 610
					state = 328
					state = 715
					state = 716
					state = 717
					state = 745
				}
				is_core_of = MAN
			}			
		}
		MAN = {
			if = {
				limit = {
					SOV = {
						owns_state = 714
					}
				}
				transfer_state = 714
			}
			if = {
				limit = {
					SOV = {
						owns_state = 761
					}
				}
				transfer_state = 761
			}
			if = {
				limit = {
					SOV = {
						owns_state = 610
					}
				}
				transfer_state = 610
			}
			if = {
				limit = {
					SOV = {
						owns_state = 328
					}
				}
				transfer_state = 328
			}
			if = {
				limit = {
					ROOT = {
						owns_state = 715
					}
				}
				transfer_state = 715
			}
			if = {
				limit = {
					SOV = {
						owns_state = 716
					}
				}
				transfer_state = 716
			}
			if = {
				limit = {
					SOV = {
						owns_state = 717
					}
				}
				transfer_state = 717
			}
			if = {
				limit = {
					SOV = {
						owns_state = 745
					}
				}
				transfer_state = 745
			}					
		}
		set_autonomy = {
			target = MAN
			autonomy_state = autonomy_imperial_governorates
		}			
	}

	option = { #Give to ally
		name = russia2_japan.48.c
		ai_chance = {
			base = 100
		}
		trigger = {
			any_country = {
				OR = {
					is_in_faction_with = ROOT
					is_subject_of = ROOT
				}
				any_state = {
					is_core_of = PREV
					is_owned_by = ROOT
					OR = {
						state = 714
						state = 761
						state = 610
						state = 328
						state = 715
						state = 716
						state = 717
						state = 745
					}
				}
			}
		}
		every_owned_state = {
			limit = {
				OR = {
					state = 714
					state = 761
					state = 610
					state = 328
					state = 715
					state = 716
					state = 717
					state = 745
				}
			}

			if = {
				limit = {
					any_country = {
						OR = {
							is_in_faction_with = ROOT
							is_subject_of = ROOT
						}
						PREV = {
							is_core_of = PREV
							is_owned_by = ROOT
						}
					}
				}
				random_country = {
					limit = {
						OR = {
							is_in_faction_with = ROOT
							is_subject_of = ROOT
						}
						PREV = {
							is_core_of = PREV
						}
					}
					transfer_state = PREV
				}
			}
			else = {
				add_compliance = 10
			}
		}
	}
}

#Russia Demands Sakhalin and the Islands
country_event = {
	id = russia2_japan.49
	title = russia2_japan.49.t
	desc = russia2_japan.49.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yes okay
		name = russia2_japan.49.a
		ai_chance = {
			base = 60
			modifier = {
				add = 40
				strength_ratio = {
					tag = SOV
					ratio < 0.8
				}
				NOT = {
					has_war_with = event_target:WTT_current_china_leader
				}
			}
			modifier = {
				add = -30
				has_war_with = event_target:WTT_current_china_leader
			}
		}
		every_state = {
			limit = {
				OR = {
					state = 537
					state = 655
					state = 555
				}
				OR = {
					is_owned_by = ROOT
					any_country = {
						owns_state = PREV
						is_subject_of = ROOT
					}
				}
			}
			FROM = {
				transfer_state = PREV
			}
			hidden_effect = {
				if = {
					limit = {
						has_resistance = no
						NOT = {
							is_core_of = SOV
						}
					}
					start_resistance = yes
				}
			}
		}
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		FROM = {
			country_event = russia2_japan.50
		}
	}

	option = { #No
		name = russia2_japan.49.b
		ai_chance = {
			base = 40
			modifier = {
				add = -40
				strength_ratio = {
					tag = SOV
					ratio < 0.8
				}
				NOT = {
					has_war_with = event_target:WTT_current_china_leader
				}
			}
			modifier = {
				add = 30
				has_war_with = event_target:WTT_current_china_leader
			}
		}
		custom_effect_tooltip = jap_might_lead_to_war_with_sov
		FROM = {
			country_event = russia2_japan.51
		}
	}
}

#Japan Accepts
country_event = {
	id = russia2_japan.50
	title = russia2_japan.50.t
	desc = russia2_japan.50.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #Yay
		name = russia2_japan.50.a
		ai_chance = {
			base = 100
		}
	}
}

#Japan Refuses
country_event = {
	id = russia2_japan.51
	title = russia2_japan.51.t
	desc = russia2_japan.51.d
	picture = GFX_menacing_tanks_russia2

	is_triggered_only = yes

	option = { #War It Is
		name = russia2_japan.51.a
		ai_chance = {
			base = 40
		}
		FROM = {
			remove_opinion_modifier = {
				target = ROOT
				modifier = russian_sent_delegation
			}
		}
		remove_opinion_modifier = {
			target = FROM
			modifier = russian_sent_delegation
		}
		create_wargoal = {
			type = take_state_focus
			target = JAP
			expire = 0
			generator = { 537 655 555 }
		}
	}

	option = { #We already fucked up our relations, let's not go to war
		name = russia2_japan.51.b
		ai_chance = {
			base = 60
		}
		add_political_power = -10
	}
}