﻿
# Events related to internal politics and assassinations in Russia

add_namespace = russia_domestic

# Rasputin's influence has been defeated, but the senior officers he favoured are now rebellious
# Player can either tolerate the incompetent leaders and retain a small penalty to Stavka
# or purge them, risk a civil war, and get a small bonus to Stavka

country_event = {
	id = russia_domestic.1
	title = russia_domestic1title
	desc = russia_domestic1desc
	
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	immediate = {
		set_global_flag = flag_russia_resolved_incompetent_military
	}
	
	option = {
		name = russia_domestic1opta
		
		if = {
			limit = {
				has_idea = deluge_russia_incompetent_military
			}
			swap_ideas = {
				remove_idea = deluge_russia_incompetent_military
				add_idea = deluge_russia_inefficient_military
			}
		}
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 2
				has_war = yes
			}
		}
	}
	
	option = {
		name = russia_domestic1optb
		
		if = {
			limit = {
				has_idea = deluge_russia_inefficient_military
			}
			swap_ideas = {
				remove_idea = deluge_russia_inefficient_military
				add_idea = deluge_russia_effective_military
			}
		}

		
		if = {
			limit = {
				has_idea = deluge_russia_incompetent_military
			}
			swap_ideas = {
				remove_idea = deluge_russia_incompetent_military
				add_idea = deluge_russia_effective_military
			}
		}
		
		custom_effect_tooltip = tooltip_russia_old_guard_will_rebel
		
		hidden_effect = {
			if = {
				limit = {
					has_government = communism
				}
				start_civil_war = {
					ruling_party = communism
					ideology = fascism
					size = 0.25
				}
				
				random_other_country = {
					limit = {
						original_tag = SOV
						has_government = fascism
					}
					
					set_party_name = { ideology = fascism name = deluge_russia_officers_movement_short long_name = deluge_russia_officers_movement_long }
					
					create_country_leader = {
						name = "Lavr Kornilov"
						desc = ""
						picture = "gfx/leaders/deluge/russians/lavr_kornilov.dds"
						expire = "1953.3.1"
						ideology = corporatist_ideology
						traits = {
							
						}
					}
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				start_civil_war = {
					ruling_party = democratic
					ideology = fascism
					size = 0.25
				}
				
				random_other_country = {
					limit = {
						original_tag = SOV
						has_government = fascism
					}
					
					set_party_name = { ideology = fascism name = deluge_russia_officers_movement_short long_name = deluge_russia_officers_movement_long }
					
					create_country_leader = {
						name = "Lavr Kornilov"
						desc = ""
						picture = "gfx/leaders/deluge/russians/lavr_kornilov.dds"
						expire = "1953.3.1"
						ideology = corporatist_ideology
						traits = {
							
						}
					}
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				start_civil_war = {
					ruling_party = neutrality
					ideology = fascism
					size = 0.25
				}
				
				random_other_country = {
					limit = {
						original_tag = SOV
						has_government = fascism
					}
					
					set_party_name = { ideology = fascism name = deluge_russia_officers_movement_short long_name = deluge_russia_officers_movement_long }
					
					create_country_leader = {
						name = "Lavr Kornilov"
						desc = ""
						picture = "gfx/leaders/deluge/russians/lavr_kornilov.dds"
						expire = "1953.3.1"
						ideology = corporatist_ideology
						traits = {
							
						}
					}
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				start_civil_war = {
					ruling_party = fascism
					ideology = neutrality
					size = 0.25
				}
				
				create_country_leader = {
					name = "Alexander IV"
					desc = "emperor_russia_desc"
					picture = "gfx/leaders/deluge/russians/russian_duke.dds"
					expire = "1953.3.1"
					ideology = reactionary_ideology
					traits = {
						
					}
				}
				
				random_other_country = {
					limit = {
						original_tag = SOV
						has_government = neutrality
					}		
					set_party_name = { ideology = neutrality name = deluge_russia_officers_movement_short long_name = deluge_russia_officers_movement_long }
					
					create_country_leader = {
						name = "Lavr Kornilov"
						desc = ""
						picture = "gfx/leaders/deluge/russians/lavr_kornilov.dds"
						expire = "1953.3.1"
						ideology = reactionary_ideology
						traits = {
							
						}
					}
				}
			}
			
			create_country_leader = {
				name = "Konstantin Rodzaevsky"
				desc = ""
				picture = "Portrait_Soviet_Konstantin_Rodzaevsky.dds"
				expire = "1953.3.1"
				ideology = corporatist_ideology
				traits = {
					
				}
			}
			
			remove_unit_leader = 90
			remove_unit_leader = 91
			remove_unit_leader = 92
			remove_unit_leader = 93
			remove_unit_leader = 94
			remove_unit_leader = 95
			remove_unit_leader = 96
			remove_unit_leader = 97
			remove_unit_leader = 98
			remove_unit_leader = 99
			remove_unit_leader = 100
			remove_unit_leader = 101
			remove_unit_leader = 102
			remove_unit_leader = 103
			remove_unit_leader = 104
			remove_unit_leader = 105
		}
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}

		}
	}
}

# Russia has changed ideology to radical or democratic and has manually removed Rasputin using political power
# The officers resign but have already lost too much power to launch a coup attempt

country_event = {
	id = russia_domestic.2
	title = russia_domestic2title
	desc = russia_domestic2desc
	
	picture = GFX_report_event_generic_read_write
	
	fire_only_once = yes
	
	trigger = {
		tag = SOV
		OR = {
			has_government = communism
			has_government = democratic
		}
		has_idea = deluge_russia_incompetent_military
		NOT = {
			has_idea = rasputin
			has_global_flag = flag_russia_resolved_incompetent_military
		}
	}
	
	immediate = {
		set_global_flag = flag_russia_resolved_incompetent_military
	}
	
	mean_time_to_happen = {
		months = 3
	}
	
	option = {
		name = russia_domestic2opta
		
		swap_ideas = {
			remove_idea = deluge_russia_incompetent_military
			add_idea = deluge_russia_inefficient_military
		}
		
		remove_unit_leader = 90
		remove_unit_leader = 91
		remove_unit_leader = 92
		remove_unit_leader = 103
		
		ai_chance = {
			factor = 1
		}
	}
	
	option = {
		name = russia_domestic2optb
		
		swap_ideas = {
			remove_idea = deluge_russia_incompetent_military
			add_idea = deluge_russia_effective_military
		}
		
		remove_unit_leader = 90
		remove_unit_leader = 91
		remove_unit_leader = 92
		remove_unit_leader = 93
		remove_unit_leader = 94
		remove_unit_leader = 95
		remove_unit_leader = 96
		remove_unit_leader = 97
		remove_unit_leader = 98
		remove_unit_leader = 99
		remove_unit_leader = 100
		remove_unit_leader = 101
		remove_unit_leader = 102
		remove_unit_leader = 103
		remove_unit_leader = 104
		remove_unit_leader = 105
		
		ai_chance = {
			factor = 0
		}
	}
}

# Soviet Union has been formed, if the Old Guard still exist they launch a coup attempt

country_event = {
	id = russia_domestic.3
	title = russia_domestic3title
	desc = russia_domestic3desc
	
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			set_global_flag = flag_russia_resolved_incompetent_military
		
			if = {
				limit = {
					has_idea = deluge_russia_incompetent_military
				}
				start_civil_war = {
					ruling_party = communism
					ideology = fascism
					size = 0.3
				}
				
				random_other_country = {
					limit = {
						original_tag = SOV
						has_government = fascism
					}
					
					set_party_name = { ideology = fascism name = deluge_russia_officers_movement_short long_name = deluge_russia_officers_movement_long }
					
					create_country_leader = {
						name = "Lavr Kornilov"
						desc = ""
						picture = "gfx/leaders/deluge/russians/lavr_kornilov.dds"
						expire = "1953.3.1"
						ideology = corporatist_ideology
						traits = {
							
						}
					}
				}
			}
			
			if = {
				limit = {
					has_idea = deluge_russia_inefficient_military
				}
				start_civil_war = {
					ruling_party = communism
					ideology = fascism
					size = 0.2
				}
				
				random_other_country = {
					limit = {
						original_tag = SOV
						has_government = fascism
					}
					
					set_party_name = { ideology = fascism name = deluge_russia_officers_movement_short long_name = deluge_russia_officers_movement_long }
					
					create_country_leader = {
						name = "Alexander Kolchak"
						desc = ""
						picture = "gfx/leaders/deluge/russians/aleksandr_kolchak.dds"
						expire = "1953.3.1"
						ideology = corporatist_ideology
						traits = {
							
						}
					}
				}
			}
			
			create_country_leader = {
				name = "Konstantin Rodzaevsky"
				desc = ""
				picture = "Portrait_Soviet_Konstantin_Rodzaevsky.dds"
				expire = "1953.3.1"
				ideology = corporatist_ideology
				traits = {
					
				}
			}
			
			remove_unit_leader = 90
			remove_unit_leader = 91
			remove_unit_leader = 92
			remove_unit_leader = 93
			remove_unit_leader = 94
			remove_unit_leader = 95
			remove_unit_leader = 96
			remove_unit_leader = 97
			remove_unit_leader = 98
			remove_unit_leader = 99
			remove_unit_leader = 100
			remove_unit_leader = 101
			remove_unit_leader = 102
			remove_unit_leader = 103
			remove_unit_leader = 104
			remove_unit_leader = 105
		}
	}
	
	option = {
		name = russia_domestic3opt
		
		if = {
			limit = {
				has_idea = deluge_russia_inefficient_military
			}
			swap_ideas = {
				remove_idea = deluge_russia_inefficient_military
				add_idea = deluge_russia_effective_military
			}
		}

		
		if = {
			limit = {
				has_idea = deluge_russia_incompetent_military
			}
			swap_ideas = {
				remove_idea = deluge_russia_incompetent_military
				add_idea = deluge_russia_effective_military
			}
		}
	}
}

# Black Hundredist is in the government and ousts Rasputin

country_event = {
	id = russia_domestic.4
	title = russia_domestic4title
	desc = russia_domestic4desc
	
	picture = GFX_report_event_generic_read_write
	
	fire_only_once = yes
	
	trigger = {
		tag = SOV
		has_idea = rasputin
		has_idea = vostorgov
	}
		
	mean_time_to_happen = {
		months = 3
	}
	
	option = {
		name = russia_domestic4opta
		
		set_global_flag = flag_rasputins_influence_defeated
		
		remove_ideas = rasputin
		
		ai_chance = {
			factor = 1
		}
	}
	
	option = {
		name = russia_domestic4optb
		
		add_political_power = 50
		
		ai_chance = {
			factor = 0
		}
	}
}

# A Jacobin assassin attempts to murder the Emperor and Grand Duke
# Russian player gets to decide who dies

country_event = {
	id = russia_domestic.5
	title = russia_domestic5title
	desc = russia_domestic5desc
	
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes	
	
	option = {
		name = russia_domestic4opta
		
		
	}
	
	
}

# News event for death of the Tsar

# News event for death of the Grand Duke

# News event for entire royal family dying

# Finland informed that the Tsar is dead and the Grand Duke has ascended to the throne
# Gets to lobby for independence or accept a replacement

# Finland informed that the Grand Duke is dead and a replacement is being appointed
# Gets to lobby for independence or accept a replacement

# Finland informed that the whole royal family is dead and the imperial government in chaos
# Gets to lobby for independence or accept a replacement

# AI Russia will deal with loosening Finland's status depending on ideology

# AI Finland will tend not to push the issue if rejected

# AI Finland informed they have been given more privileges



