
#################################################
# Revolution & Napoleon                         #
# Heavily amended for 1.30 by Pierre du Plessis #
#################################################

namespace = french_revolution

# The General Estates
country_event = {
	id = french_revolution.1
	title = "flavor_fra.EVTNAME3144"
	desc = "flavor_fra.EVTDESC3144"
	picture = LIBERUM_VETO_eventPicture

	is_triggered_only = yes
	fire_only_once = yes
	
	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = { log = "[Root.GetName] has the French Revolution Disaster." }
		if = {
			limit = {
				any_owned_province = {
					development = 20
					highest_supply_limit_in_area = yes
					is_in_capital_area = yes
					fort_level = 1
					is_capital = no
				}
			}
			random_owned_province = { 
				limit = {
					development = 20
					highest_supply_limit_in_area = yes
					is_in_capital_area = yes
					fort_level = 1
					is_capital = no
				}
				if = {
					limit = {
						NOT = { has_dlc = "Emperor" }
					}
					spawn_rebels = {
						type = revolutionary_rebels
						size = 3		
						win = yes
						unrest = 10
					}
				}
				else = {
					set_province_flag = revolution_spawn_rebels_here
				}
			}
		}
		else = {
			random_owned_province = { 
				limit = {
					highest_supply_limit_in_area = yes
					is_capital = no
				}
				if = {
					limit = {
						NOT = { has_dlc = "Emperor" }
					}
					spawn_rebels = {
						type = revolutionary_rebels
						size = 3		
						win = yes
						unrest = 10
					}
				}
				else = {
					set_province_flag = revolution_spawn_rebels_here
				}
			}
		}
		if = {
			limit = {
				NOT = { has_dlc = "Emperor" }
			}
			random_owned_province = {
				limit = {
					is_capital = yes
				}
				spawn_rebels = {
					type = revolutionary_rebels
					size = 2
				}
			}
		}
		add_stability = -3
		set_country_flag = had_revolution
		if = {
			limit = {
				is_bankrupt = yes
			}
			set_country_flag = no_revolution_bankruptcy_event
		}
	}

	option = {		# Dire times are ahead of us
		name = "EVTOPTA3011"
		trigger = { NOT = { has_dlc = "Emperor" } }
		add_prestige = -10
	}
	option = {
		name = revolution.1.A			# Crush them
		trigger = { has_dlc = "Emperor" }
		set_country_flag = revolution_disaster_reactionary
		random_owned_province = {
			limit = {
				has_province_flag = revolution_spawn_rebels_here
			}
			clr_province_flag = revolution_spawn_rebels_here
			spawn_rebels = {
				type = revolutionary_rebels
				size = 3		
				win = yes
				unrest = 10
			}
		}
		random_owned_province = {
			limit = {
				is_capital = yes
			}
			spawn_rebels = {
				type = revolutionary_rebels
				size = 2
			}
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = revolution.1.B			# Vive la Revolution!
		trigger = { has_dlc = "Emperor" }
		set_country_flag = revolution_disaster_revolutionary
		set_country_flag = revolution_disaster_immediate_revolution
		custom_tooltip = revolution_disaster_go_for_it_tooltip
		random_owned_province = {
			limit = {
				has_province_flag = revolution_spawn_rebels_here
			}
			clr_province_flag = revolution_spawn_rebels_here
			spawn_rebels = {
				type = pretender_rebels
				size = 3		
				win = yes
				unrest = 10
			}
			if = {
				limit = {
					any_neighbor_province = {
						owned_by = root
					}
				}
				random_neighbor_province = {
					limit = { owned_by = root }
					spawn_rebels = {
						type = pretender_rebels
						size = 2
						win = yes
						unrest = 10
					}
				}
			}
		}
		hidden_effect = {
			country_event = { id = french_revolution.2 }
		}
		ai_chance = {
			factor = 2
			modifier = {
				factor = 2
				revolution_target_exists = no
			}
			modifier = {
				factor = 0
				is_emperor = yes
			}
		}
	}
}

# The French Revolution
country_event = {
	id = french_revolution.2
	title = "flavor_fra.EVTNAME3779"
	desc = "flavor_fra.EVTDESC3779"
	picture = REVOLUTION_eventPicture
	
	fire_only_once = yes
	major = yes
	is_triggered_only = yes
	
	trigger = {
		revolution_event_can_happen_trigger = yes
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {		# A Revolution has struck us!
		name = "flavor_fra.EVTOPTA3779"
		if = {
			limit = {
				OR = {
					is_female = yes
					AND = {
						has_regency = yes
						has_female_heir = yes
					}
				}
			}
			set_country_flag = french_revolution_female_ruler
		}
		else = {
			set_country_flag = french_revolution_male_ruler
		}
		enact_revolution_effect = yes
		if = {
			limit = {
				tag = FRA 
				OR = {
					is_revolution_target = yes 
					is_revolutionary = yes
				}
				has_dlc = "Domination"
			}
			country_event = { id = ideagroups.1 }
		}
	}
}

# The Reign of Terror
country_event = {
	id = french_revolution.3
	title = "flavor_fra.EVTNAME3145"
	desc = "flavor_fra.EVTDESC3145"
	picture = {
		trigger = {
			has_dlc = "Emperor"
		}
		picture = GUILLOTINE_eventPicture
	}
	picture = {
		trigger = {
			NOT = { has_dlc = "Emperor" }
		}
		picture = REVOLUTION_eventPicture
	}
	
	fire_only_once = yes
	is_triggered_only = yes

	trigger = {
		is_revolutionary_republic_trigger = yes
		NOT = { has_ruler_flag = bonaparte_flag }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {		# Execute the enemies of the Revolution!
		name = "flavor_fra.EVTOPTA3145"
		add_army_tradition = -20
		add_navy_tradition = -20
		add_yearly_manpower = -0.5
		add_sailors = -0.15
		add_country_modifier = {
			name = the_reign_of_terror
			duration = 3650
		}

		define_ruler = {
			name = "Maximilien de Robespierre"
			adm = 3
			dip = 0
			mil = 4
			min_age = 30
			max_age = 40
		}
		set_ruler_flag = robespierre_flag

		if = {
			limit = {
				has_dlc = "Rights of Man" 
			}
			hidden_effect = { add_ruler_personality = malevolent_personality }
		}

		hidden_effect = {
			country_event = { id = french_revolution.4 days = 270 random = 180 }
		}
		ai_chance = {
			factor = 10
		}
	}
	option = {		# Show leniency
		name = "flavor_fra.EVTOPTB3145"
		add_stability = -3
		ai_chance = {
			factor = 0
		}
	}
}

# The Reign of Terror targets an advisor (disaster version)
country_event = {
	id = french_revolution.301
	title = french_revolution.301.name
	desc = {
		trigger = { has_country_flag = french_revolution_301_1 }
		desc = french_revolution.301.desc1
	}
	desc = {
		trigger = { has_country_flag = french_revolution_301_2 }
		desc = french_revolution.301.desc2
	}
	desc = {
		trigger = { has_country_flag = french_revolution_301_3 }
		desc = french_revolution.301.desc3
	}
	picture = {
		trigger = {
			has_dlc = "Emperor"
		}
		picture = GUILLOTINE_eventPicture
	}
	picture = {
		trigger = {
			NOT = { has_dlc = "Emperor" }
		}
		picture = REVOLUTION_eventPicture
	}
	
	is_triggered_only = yes

	trigger = {
		is_revolutionary_republic_trigger = yes
		has_country_modifier = the_reign_of_terror
		NOT = {
			has_country_flag = advisor_events_adm
			has_country_flag = advisor_events_dip
			has_country_flag = advisor_events_mil
		}
		OR = {
			has_adm_advisor = yes
			has_dip_advisor = yes
			has_mil_advisor = yes
		}
		NOT = { has_country_modifier = recent_reign_of_terror_event_timer }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			random_list = {
				1 = { set_country_flag = french_revolution_301_1 }
				1 = { set_country_flag = french_revolution_301_2 }
				1 = { set_country_flag = french_revolution_301_3 }
			}
			random_list = {
				1 = {
					trigger = { has_adm_advisor = yes }
					set_country_flag = advisor_events_adm
				}
				1 = {
					trigger = { has_dip_advisor = yes }
					set_country_flag = advisor_events_dip
				}
				1 = {
					trigger = { has_mil_advisor = yes }
					set_country_flag = advisor_events_mil
				}
			}
			add_country_modifier = {
				name = recent_reign_of_terror_event_timer
				duration = 365
				hidden = yes
			}
		}
	}
	
	option = {		# Execute the enemy of the Revolution!
		name = french_revolution.301.A
		trigger_switch = {
			on_trigger = has_country_flag
			advisor_events_adm = {
				remove_advisor_by_category = ADM
			}
			advisor_events_dip = {
				remove_advisor_by_category = DIP
			}
			advisor_events_mil = {
				remove_advisor_by_category = MIL
			}
		}
	}
	option = {		# Show leniency
		name = french_revolution.301.B
		add_revolutionary_zeal_or_absolutism = { amount = -10 }
	}

	after = {
		hidden_effect = {
			trigger_switch = {
				on_trigger = has_country_flag
				advisor_events_adm = { clr_country_flag = advisor_events_adm }
				advisor_events_dip = { clr_country_flag = advisor_events_dip }
				advisor_events_mil = { clr_country_flag = advisor_events_mil }
			}
			clr_country_flag = french_revolution_301_1
			clr_country_flag = french_revolution_301_2
			clr_country_flag = french_revolution_301_3
		}
	}
}

# The Reign of Terror targets an advisor (non-disaster version)
country_event = {
	id = french_revolution.302
	title = french_revolution.301.name
	desc = {
		trigger = { has_country_flag = french_revolution_301_1 }
		desc = french_revolution.301.desc1
	}
	desc = {
		trigger = { has_country_flag = french_revolution_301_2 }
		desc = french_revolution.301.desc2
	}
	desc = {
		trigger = { has_country_flag = french_revolution_301_3 }
		desc = french_revolution.301.desc3
	}
	picture = {
		trigger = {
			has_dlc = "Emperor"
		}
		picture = GUILLOTINE_eventPicture
	}
	picture = {
		trigger = {
			NOT = { has_dlc = "Emperor" }
		}
		picture = REVOLUTION_eventPicture
	}

	trigger = {
		is_revolutionary_republic_trigger = yes
		has_country_modifier = the_reign_of_terror
		NOT = {
			has_country_flag = advisor_events_adm
			has_country_flag = advisor_events_dip
			has_country_flag = advisor_events_mil
		}
		OR = {
			has_adm_advisor = yes
			has_dip_advisor = yes
			has_mil_advisor = yes
		}
		NOT = { has_disaster = french_revolution }
		NOT = { has_country_modifier = recent_reign_of_terror_event_timer }
	}
	
	is_triggered_only = yes
	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			random_list = {
				1 = { set_country_flag = french_revolution_301_1 }
				1 = { set_country_flag = french_revolution_301_2 }
				1 = { set_country_flag = french_revolution_301_3 }
			}
			random_list = {
				1 = {
					trigger = { has_adm_advisor = yes }
					set_country_flag = advisor_events_adm
				}
				1 = {
					trigger = { has_dip_advisor = yes }
					set_country_flag = advisor_events_dip
				}
				1 = {
					trigger = { has_mil_advisor = yes }
					set_country_flag = advisor_events_mil
				}
			}
			add_country_modifier = {
				name = recent_reign_of_terror_event_timer
				duration = 1825
				hidden = yes
			}
		}
	}
	
	option = {		# Execute the enemy of the Revolution!
		name = french_revolution.301.A
		trigger_switch = {
			on_trigger = has_country_flag
			advisor_events_adm = {
				remove_advisor_by_category = ADM
			}
			advisor_events_dip = {
				remove_advisor_by_category = DIP
			}
			advisor_events_mil = {
				remove_advisor_by_category = MIL
			}
		}
	}
	option = {		# Show leniency
		name = french_revolution.301.B
		add_revolutionary_zeal_or_absolutism = { amount = -5 }
	}

	after = {
		hidden_effect = {
			trigger_switch = {
				on_trigger = has_country_flag
				advisor_events_adm = { clr_country_flag = advisor_events_adm }
				advisor_events_dip = { clr_country_flag = advisor_events_dip }
				advisor_events_mil = { clr_country_flag = advisor_events_mil }
			}
			clr_country_flag = french_revolution_301_1
			clr_country_flag = french_revolution_301_2
			clr_country_flag = french_revolution_301_3
		}
	}
}

# The Reign of Terror gives bonus (non-disaster version)
country_event = {
	id = french_revolution.303
	title = french_revolution.303.name
	desc = french_revolution.303.desc
	picture = {
		trigger = {
			has_dlc = "Emperor"
		}
		picture = GUILLOTINE_eventPicture
	}
	picture = {
		trigger = {
			NOT = { has_dlc = "Emperor" }
		}
		picture = REVOLUTION_eventPicture
	}

	trigger = {
		is_revolutionary_republic_trigger = yes
		has_country_modifier = the_reign_of_terror
		NOT = { has_disaster = french_revolution }
		NOT = { has_country_modifier = recent_reign_of_terror_event_timer }
	}
	
	is_triggered_only = yes
	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			add_country_modifier = {
				name = recent_reign_of_terror_event_timer
				duration = 1825
				hidden = yes
			}
		}
	}
	
	option = {		# Yay
		name = french_revolution.303.A
		add_revolutionary_zeal_or_absolutism = { amount = 10 }
	}
}

# The Reign of Terror gives bonus (disaster version)
country_event = {
	id = french_revolution.304
	title = french_revolution.303.name
	desc = french_revolution.303.desc
	picture = {
		trigger = {
			has_dlc = "Emperor"
		}
		picture = GUILLOTINE_eventPicture
	}
	picture = {
		trigger = {
			NOT = { has_dlc = "Emperor" }
		}
		picture = REVOLUTION_eventPicture
	}

	trigger = {
		is_revolutionary_republic_trigger = yes
		has_country_modifier = the_reign_of_terror
		NOT = { has_country_modifier = recent_reign_of_terror_event_timer }
	}
	
	is_triggered_only = yes
	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			add_country_modifier = {
				name = recent_reign_of_terror_event_timer
				duration = 365
				hidden = yes
			}
		}
	}
	
	option = {		# Yay
		name = french_revolution.303.A
		add_revolutionary_zeal_or_absolutism = { amount = 10 }
	}
}

# The End of Terror
country_event = {
	id = french_revolution.4
	title = "flavor_fra.EVTNAME3781"
	desc = {
		trigger = { NOT = { has_ruler_flag = robespierre_flag } }
		desc = "flavor_fra.EVTDESC3781"
	}
	desc = {
		trigger = { has_ruler_flag = robespierre_flag }
		desc = french_revolution.4.robespierre
	}
	picture = REVOLUTION_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_country_modifier = the_reign_of_terror
		is_revolutionary_republic_trigger = yes
	}
	
	immediate = {
		set_country_flag = the_directory_flag
	}
	
	option = {		# A Coup-de-Etat has brought Order
		name = "flavor_fra.EVTOPTA3781"
		trigger = {
			NOT = { has_ruler_flag = robespierre_flag }
		}
		kill_ruler = yes
		add_stability = 1
		remove_country_modifier = the_reign_of_terror
	}
	option = {		# Depose him
		name = french_revolution.4.robespierre.A
		trigger = {
			has_ruler_flag = robespierre_flag
		}
		kill_ruler = yes
		add_stability = 1
		remove_country_modifier = the_reign_of_terror
	}
	option = {		# Keep him
		name = french_revolution.4.robespierre.B
		trigger = {
			has_ruler_flag = robespierre_flag
		}
		add_stability = -1
		hidden_effect = {
			remove_country_modifier = the_reign_of_terror
		}
		add_country_modifier = {
			name = the_reign_of_terror
			duration = -1
		}
	}
}

# The Execution of King Louis
country_event = {
	id = french_revolution.5
	title = "flavor_fra.EVTNAME3146"
	desc = {
		trigger = { has_country_flag = french_revolution_female_ruler }
		desc = french_revolution.5.female
	}
	desc = {
		trigger = { has_country_flag = french_revolution_male_ruler }
		desc = french_revolution.5.male
	}
	picture = {
		trigger = {
			has_dlc = "Emperor"
		}
		picture = GUILLOTINE_eventPicture
	}
	picture = {
		trigger = {
			NOT = { has_dlc = "Emperor" }
		}
		picture = REVOLUTION_eventPicture
	}
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		NOT = { has_country_flag = had_execution_of_king_louis_event_flag }
		OR = {
			has_country_modifier = the_reign_of_terror
			has_country_flag = the_directory_flag
		}
		is_revolutionary_republic_trigger = yes
		any_country = {
			capital_scope = {
				continent = root
			}
			NOT = { is_subject_of = root }
			NOT = { alliance_with = root }
			is_revolutionary = no
		}
	}

	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		hidden_effect = {
			set_country_flag = had_execution_of_king_louis_event_flag
			clr_country_flag = ruler_of_france_exiled
			clr_country_flag = heir_of_france_exiled
			if = {
				limit = {
					any_rival_country = {
						is_neighbor_of = root
						is_revolutionary = no
					}
				}
				random_rival_country = {
					limit = {
						is_neighbor_of = root
						is_revolutionary = no
					}
					save_event_target_as = flee_to_country
				}
			}
			else_if = {
				limit = {
					any_rival_country = {
						government = monarchy
						is_revolutionary = no
					}
				}
				random_rival_country = {
					limit = {
						government = monarchy
						is_revolutionary = no
					}
					save_event_target_as = flee_to_country
				}
			}
			else_if = {
				limit = {
					any_rival_country = {
						exists = yes
						is_revolutionary = no
					}
				}
				random_rival_country = {
					limit = {
						exists = yes
						is_revolutionary = no
					}
					save_event_target_as = flee_to_country
				}
			}
			else = {
				random_country = {
					limit = {
						NOT = { is_subject_of = root }
						NOT = { alliance_with = root }
						is_revolutionary = no
						capital_scope = {
							continent = root
						}
						OR = {
							is_neighbor_of = root
							NOT = {
								ROOT = {
									any_neighbor_country = {
										NOT = { is_subject_of = root }
										capital_scope = {
											continent = root
										}
									}
								}
							}
						}
					}
					save_event_target_as = flee_to_country
				}
			}
		}
	}
	
	option = {		# 361 votes for and 360 against execution
		name = "flavor_fra.EVTOPTA3146"
		add_stability_or_adm_power = yes
		set_country_flag = fra_monarch_executed
		every_country = {
			limit = {
				government = monarchy
				capital_scope = {
					continent = root
				}
				NOT = {
					border_distance = {
						who = root
						distance = 150
					}
				}
			}
			add_opinion = {
				who = ROOT
				modifier = executed_monarch
			}
		}
		hidden_effect = {
			if = {
				limit = {
					any_owned_province = {
						continent = root
						is_core = ROOT
						has_port = yes
						is_capital = no
						controlled_by = root
					}
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						religion = root
						controlled_by = root
					}
				}
				random = {
					chance = 90
					country_event = { id = french_revolution.6 days = 20 random = 20 }
				}
			}
		}
		add_revolutionary_zeal_or_absolutism = { amount = 10 }
	}
	option = {		# 361 votes against and 360 for execution
		name = "flavor_fra.EVTOPTB3146"
		add_stability = -1
	}
}

# The Chouan Revolt
country_event = {
	id = french_revolution.6
	title = "flavor_fra.EVTNAME3147"
	desc = "flavor_fra.EVTDESC3147"
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			set_country_flag = the_chouan_revolt
			random_owned_province = {
				limit = {
					continent = root
					is_core = ROOT
					has_port = yes
					is_capital = no
					controlled_by = root
					OR = {
						highest_supply_limit_in_area = yes
						NOT = {
							root = {
								any_owned_province = {
									continent = root
									is_core = ROOT
									has_port = yes
									is_capital = no
									highest_supply_limit_in_area = yes
								}
							}
						}
					}
				}
				set_province_flag = choun_revolt_pretender
				save_event_target_as = first_province
			}
			random_owned_province = {
				limit = {
					continent = root
					is_core = ROOT
					is_capital = no
					religion = root
					controlled_by = root
					OR = {
						highest_supply_limit_in_area = yes
						NOT = {
							root = {
								any_owned_province = {
									continent = root
									is_core = ROOT
									is_capital = no
									highest_supply_limit_in_area = yes
									NOT = { has_province_flag = choun_revolt_pretender }
								}
							}
						}
					}
					NOT = { has_province_flag = choun_revolt_pretender }
				}
				set_province_flag = choun_revolt_religious
				save_event_target_as = second_province
			}
		}
	}
	
	option = {		# Royalists and Religious Rebels are on the move
		name = "flavor_fra.EVTOPTA3147"
		add_republican_tradition = -10
		random_owned_province = {
			limit = {
				has_province_flag = choun_revolt_pretender
			}
			spawn_rebels = {
				type = pretender_rebels
				size = 3
			}
			clr_province_flag = choun_revolt_pretender
		}
		random_owned_province = {
			limit = {
				has_province_flag = choun_revolt_religious
			}
			spawn_rebels = {
				type = religious_rebels
				size = 2
			}
			clr_province_flag = choun_revolt_religious
		}
	}
}


# Napolon Bonaparte
country_event = {
	id = french_revolution.7
	title = "flavor_fra.EVTNAME3148"
	desc = "flavor_fra.EVTDESC3148"
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { has_global_flag = napoleon_happened_flag }
		OR = {
			is_year = 1799
			has_country_flag = fra_monarch_executed
			has_country_flag = the_directory_flag
		}
		NOT = { dynasty = "00000" }
		is_revolution_target = yes
	}

	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		set_global_flag = napoleon_happened_flag
	}
	
	option = {		# We need Brilliant Leadership!
		name = "flavor_fra.EVTOPTA3148"
		add_stability = -1
		if = {
			limit = {
				has_heir = yes
			}
			hidden_effect = {
				kill_heir = { allow_new_heir = no }
			}
		}
		define_ruler = {
			name = "00000 I"
			dynasty = "00000"
			adm = 6
			dip = 6
			mil = 6
		}
		if = {
			limit = {
				has_dlc = "Rights of Man" 
			}
			hidden_effect = { add_ruler_personality_ancestor = { key = inspiring_leader } }
		}
		if = {
			limit = {
				has_country_modifier = the_reign_of_terror
			}
			remove_country_modifier = the_reign_of_terror
		}
		set_ruler_flag = bonaparte_flag

		hidden_effect = {
			country_event = { id = french_revolution.8 days = 1460 random = 2190 }
			define_ruler_to_general = {
				fire = 6
				shock = 6
				manuever = 6
				siege = 2
				trait = goal_oriented_personality
			}
		}
	}
	option = {		# We don't want a new Ceasar
		name = "flavor_fra.EVTOPTB3148"
		add_stability = 1

		if = {
			limit = {
				any_owned_province = {
					area = provence_area
					is_core = root
				}
			}
			if = {
				limit = {
					any_owned_province = {
						area = provence_area
						is_core = root
						fort_level = 2
					}
				}
				random_owned_province = {
					limit = {
						area = provence_area
						is_core = root
						fort_level = 2
					}
					spawn_rebels = {
						size = 3
						type = pretender_rebels
						leader = "Napolon"
						leader_dynasty = "Bonaparte"
						win = yes
					}
				}
			}
			else = {
				random_owned_province = {
					limit = {
						area = provence_area
						highest_supply_limit_in_area = yes
					}
					spawn_rebels = {
						size = 3
						type = pretender_rebels
						leader = "Napolon"
						leader_dynasty = "Bonaparte"
						win = yes
					}
				}
			}
		}
		else = {
			random_owned_province = {
				limit = {
					continent = root
					is_capital = no
					highest_supply_limit_in_area = yes
				}
				spawn_rebels = {
					size = 3
					type = pretender_rebels
					leader = "Napolon"
					leader_dynasty = "Bonaparte"
					win = yes
				}
			}
		}
	}
}

# The Infernal Machine
country_event = {
	id = french_revolution.8
	title = "flavor_fra.EVTNAME100"
	desc = {
		trigger = { NOT = { has_country_flag = napoleon_dies } }
		desc = flavor_fra.EVTDESC100
	}
	desc = {
		trigger = { has_country_flag = napoleon_dies }
		desc = french_revolution.8.desc
	}
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { has_country_flag = infernal_machine_flag }
		has_ruler_flag = bonaparte_flag
		OR = {
			has_reform = revolutionary_republic_reform
			has_reform = revolutionary_empire_reform
		}
	}
	
	immediate = {
		set_country_flag = infernal_machine_flag
		hidden_effect = {
			random_list = {
				1 = { set_country_flag = napoleon_dies }
				3 = { }
			}
		}
	}
	
	option = {		# Tragedy
		name = french_revolution.8.B
		trigger = { has_country_flag = napoleon_dies }
		add_republican_tradition = -10
		kill_ruler = yes
	}
	option = {		# A lucky escape
		name = "flavor_fra.EVTOPTA100"
		trigger = { NOT = { has_country_flag = napoleon_dies } }
		add_republican_tradition = -5
	}
	after = {
		clr_country_flag = napoleon_dies
	}
}

# Aspirations of an Empire
country_event = {
	id = french_revolution.9
	title = "flavor_fra.EVTNAME101"
	desc = "flavor_fra.EVTDESC101"
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes

	trigger = {
		has_reform = revolutionary_republic_reform
		has_ruler_flag = bonaparte_flag
	}

	option = {		# France will be an empire!
		name = "flavor_fra.EVTOPTA101"
		add_stability = -2
		if = {
			limit = { NOT = { government = monarchy } }
			change_government_to_monarchy = yes
		}
		add_government_reform = revolutionary_empire_reform
		random_owned_province = {
			limit = {
				continent = root
				is_core = ROOT
				is_capital = no
				highest_supply_limit_in_area = yes
			}
			spawn_rebels = {
				type = revolutionary_rebels
				size = 3
			}
		}
	}
	option = {		# The revolution must continue!
		name = "flavor_fra.EVTOPTB101"
		add_republican_tradition = 10
	}
}


###These events are now also used as reactionary events for the normal revolution if you chose to embrace

# The Revolutionary Republic
country_event = {
	id = french_revolution.10
	title = french_revolution.10.name
	desc = "flavor_fra.EVTDESC110"
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		is_revolutionary_republic_trigger = yes
		OR = {
			AND = {
				NOT = { has_dlc = "Emperor" }
				has_disaster = french_revolution
				OR = {
					NOT = { has_country_flag = revolutionary_republic_trouble }
					had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
				}
			}
			has_country_flag = revolution_disaster_revolutionary
		}
		NOT = { manpower_percentage = 0.25 }
		OR = {
			NOT = { has_country_flag = revolutionary_republic_trouble }
			had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
		}
	}
	
	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 0.75
			NOT = { has_dlc = "Emperor" }
		}
	}
	
	immediate = {
		set_country_flag = revolutionary_republic_trouble
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = revolution_disaster_revolutionary
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				set_country_flag = noble_rebels_rise
			}
			if = {
				limit = {
					NOT = { republican_tradition = 50 }
					republican_tradition = 25
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 50
					set_country_flag = noble_rebels_rise
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = noble_rebels_rise }
					NOT = { republican_tradition = 25 }
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 75
					set_country_flag = noble_rebels_rise
				}
			}
			if = {
				limit = {
					has_country_flag = noble_rebels_rise
				}
				random_owned_province = {
					limit = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
					save_event_target_as = rebel_spawn_province
				}
			}
		}
	}
	
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		trigger = {
			has_country_flag = noble_rebels_rise
		}
		goto = rebel_spawn_province
		add_republican_tradition = -10
		event_target:rebel_spawn_province = {
			spawn_rebels = {
				type = pretender_rebels
				size = 2
			}
		}
		clr_country_flag = noble_rebels_rise
	}
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		add_republican_tradition = -10
		trigger = {
			NOT = { has_country_flag = noble_rebels_rise }
		}
	}
}

# The Revolutionary Republic
country_event = {
	id = french_revolution.11
	title = french_revolution.11.name
	desc = "flavor_fra.EVTDESC111"
	picture = {
		trigger = {
			has_dlc = "Emperor"
		}
		picture = CONSPIRACY_eventPicture
	}
	picture = {
		trigger = {
			NOT = { has_dlc = "Emperor" }
		}
		picture = IMPORTANT_STATUE_eventPicture
	}
	
	is_triggered_only = yes
	
	trigger = {
		is_revolutionary_republic_trigger = yes
		OR = {
			AND = {
				NOT = { has_dlc = "Emperor" }
				has_disaster = french_revolution
				OR = {
					NOT = { has_country_flag = revolutionary_republic_trouble }
					had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
				}
			}
			has_country_flag = revolution_disaster_revolutionary
		}
		war_exhaustion = 10
		OR = {
			NOT = { has_country_flag = revolutionary_republic_trouble }
			had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
		}
	}

	
	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 0.75
			NOT = { has_dlc = "Emperor" }
		}
	}
	
	immediate = {
		set_country_flag = revolutionary_republic_trouble
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = revolution_disaster_revolutionary
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				set_country_flag = noble_rebels_rise
			}
			if = {
				limit = {
					NOT = { republican_tradition = 50 }
					republican_tradition = 25
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 50
					set_country_flag = noble_rebels_rise
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = noble_rebels_rise }
					NOT = { republican_tradition = 25 }
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 75
					set_country_flag = noble_rebels_rise
				}
			}
			if = {
				limit = {
					has_country_flag = noble_rebels_rise
				}
				random_owned_province = {
					limit = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
					save_event_target_as = rebel_spawn_province
				}
			}
		}
	}
	
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		trigger = { has_country_flag = noble_rebels_rise }
		goto = rebel_spawn_province
		add_republican_tradition = -10
		event_target:rebel_spawn_province = {
			spawn_rebels = {
				type = pretender_rebels
				size = 2
			}
		}
		clr_country_flag = noble_rebels_rise
	}
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		trigger = { NOT = { has_country_flag = noble_rebels_rise } }
		add_republican_tradition = -10
	}
}

# The Revolutionary Republic
country_event = {
	id = french_revolution.12
	title = french_revolution.12.name
	desc = "flavor_fra.EVTDESC112"
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		is_revolutionary_republic_trigger = yes
		OR = {
			AND = {
				NOT = { has_dlc = "Emperor" }
				has_disaster = french_revolution
				OR = {
					NOT = { has_country_flag = revolutionary_republic_trouble }
					had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
				}
			}
			has_country_flag = revolution_disaster_revolutionary
		}
		is_bankrupt = yes
		NOT = { has_country_flag = no_revolution_bankruptcy_event }
		OR = {
			NOT = { has_country_flag = revolutionary_republic_trouble }
			had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
		}
	}

	
	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 0.75
			NOT = { has_dlc = "Emperor" }
		}
	}
	
	immediate = {
		set_country_flag = revolutionary_republic_trouble
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = revolution_disaster_revolutionary
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				set_country_flag = noble_rebels_rise
			}
			if = {
				limit = {
					NOT = { republican_tradition = 50 }
					republican_tradition = 25
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 50
					set_country_flag = noble_rebels_rise
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = noble_rebels_rise }
					NOT = { republican_tradition = 25 }
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 75
					set_country_flag = noble_rebels_rise
				}
			}
			if = {
				limit = { has_country_flag = noble_rebels_rise }
				random_owned_province = {
					limit = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
					save_event_target_as = rebel_spawn_province
				}
			}
		}
	}
	
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		trigger = {
			has_country_flag = noble_rebels_rise
		}
		goto = rebel_spawn_province
		add_republican_tradition = -10
		event_target:rebel_spawn_province = {
			spawn_rebels = {
				type = pretender_rebels
				size = 2
			}
		}
		clr_country_flag = noble_rebels_rise
	}
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		trigger = {
			NOT = { has_country_flag = noble_rebels_rise }
		}
		add_republican_tradition = -10
	}
}

# The Revolutionary Republic
country_event = {
	id = french_revolution.13
	title = french_revolution.13.name
	desc = "flavor_fra.EVTDESC113"
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		is_revolutionary_republic_trigger = yes
		OR = {
			AND = {
				NOT = { has_dlc = "Emperor" }
				has_disaster = french_revolution
				OR = {
					NOT = { has_country_flag = revolutionary_republic_trouble }
					had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
				}
			}
			has_country_flag = revolution_disaster_revolutionary
		}
		num_of_loans = 20
	}

	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 0.75
			NOT = { has_dlc = "Emperor" }
		}
	}
	
	immediate = {
		set_country_flag = revolutionary_republic_trouble
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = revolution_disaster_revolutionary
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				set_country_flag = noble_rebels_rise
			}
			if = {
				limit = {
					NOT = { republican_tradition = 50 }
					republican_tradition = 25
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 50
					set_country_flag = noble_rebels_rise
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = noble_rebels_rise }
					NOT = { republican_tradition = 25 }
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 75
					set_country_flag = noble_rebels_rise
				}
			}
		}
	}
	
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		add_republican_tradition = -10
		if = {
			limit = {
				has_country_flag = noble_rebels_rise
			}
			random_owned_province = {
				limit = {
					continent = root
					is_core = ROOT
					is_capital = no
					NOT = { controlled_by = REB }
					has_siege = no
				}
				spawn_rebels = {
					type = noble_rebels
					size = 2
				}
			}
			clr_country_flag = noble_rebels_rise
		}
	}
}

# The Revolutionary Republic
country_event = {
	id = french_revolution.14
	title = french_revolution.14.name
	desc = "flavor_fra.EVTDESC114"
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		is_revolutionary_republic_trigger = yes
		OR = {
			AND = {
				NOT = { has_dlc = "Emperor" }
				has_disaster = french_revolution
				OR = {
					NOT = { has_country_flag = revolutionary_republic_trouble }
					had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
				}
			}
			has_country_flag = revolution_disaster_revolutionary
		}
		revolt_percentage = 0.25
		OR = {
			NOT = { has_country_flag = revolutionary_republic_trouble }
			had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
		}
	}

	
	
	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 0.75
			NOT = { has_dlc = "Emperor" }
		}
	}
	
	immediate = {
		set_country_flag = revolutionary_republic_trouble
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = revolution_disaster_revolutionary
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				set_country_flag = noble_rebels_rise
			}
			if = {
				limit = {
					NOT = { republican_tradition = 50 }
					republican_tradition = 25
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 50
					set_country_flag = noble_rebels_rise
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = noble_rebels_rise }
					NOT = { republican_tradition = 25 }
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 75
					set_country_flag = noble_rebels_rise
				}
			}
		}
	}
	
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		add_republican_tradition = -10
		if = {
			limit = {
				has_country_flag = noble_rebels_rise
			}
			random_owned_province = {
				limit = {
					continent = root
					is_core = ROOT
					is_capital = no
					NOT = { controlled_by = REB }
					has_siege = no
				}
				spawn_rebels = {
					type = pretender_rebels
					size = 2
				}
			}
			clr_country_flag = noble_rebels_rise
		}
	}
}

# The Revolutionary Republic
country_event = {
	id = french_revolution.15
	title = french_revolution.15.name
	desc = "flavor_fra.EVTDESC115"
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		is_revolutionary_republic_trigger = yes
		OR = {
			AND = {
				NOT = { has_dlc = "Emperor" }
				has_disaster = french_revolution
				OR = {
					NOT = { has_country_flag = revolutionary_republic_trouble }
					had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
				}
			}
			has_country_flag = revolution_disaster_revolutionary
		}
		NOT = { stability = 0 }
		OR = {
			NOT = { has_country_flag = revolutionary_republic_trouble }
			had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
		}
	}

	
	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 0.75
			NOT = { has_dlc = "Emperor" }
		}
	}
	
	immediate = {
		set_country_flag = revolutionary_republic_trouble
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = revolution_disaster_revolutionary
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				set_country_flag = noble_rebels_rise
			}
			if = {
				limit = {
					NOT = { republican_tradition = 10 }
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 50
					set_country_flag = noble_rebels_rise
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = noble_rebels_rise }
					NOT = { republican_tradition = 25 }
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 75
					set_country_flag = noble_rebels_rise
				}
			}
		}
	}
	
	option = {		# The republic will survive!
		name = "flavor_fra.EVTOPTA110"
		add_republican_tradition = -10
		if = {
			limit = {
				has_country_flag = noble_rebels_rise
			}
			random_owned_province = {
				limit = {
					continent = root
					is_core = ROOT
					is_capital = no
					NOT = { controlled_by = REB }
					has_siege = no
				}
				spawn_rebels = {
					type = pretender_rebels
					size = 2
				}
			}
			clr_country_flag = noble_rebels_rise
		}
		if = { 
			limit = { tag = FRA has_dlc = "Domination" } 
			swap_non_generic_missions = yes
			country_event = { id = ideagroups.1 }
		}
	}
}

# The Revolutionary Republic
country_event = {
	id = french_revolution.16
	title = french_revolution.16.name
	desc = "flavor_fra.EVTDESC116"
	picture = {
		trigger = {
			has_dlc = "Emperor"
		}
		picture = CONSPIRACY_eventPicture
	}
	picture = {
		trigger = {
			NOT = { has_dlc = "Emperor" }
		}
		picture = IMPORTANT_STATUE_eventPicture
	}
	
	is_triggered_only = yes
	
	trigger = {
		is_revolutionary_republic_trigger = yes
		OR = {
			AND = {
				NOT = { has_dlc = "Emperor" }
				has_disaster = french_revolution
				OR = {
					NOT = { has_country_flag = revolutionary_republic_trouble }
					had_country_flag = { flag = revolutionary_republic_trouble days = 365 }
				}
			}
			has_country_flag = revolution_disaster_revolutionary
		}
		OR = {
			NOT = { has_country_flag = revolutionary_republic_trouble }
			had_country_flag = { flag = revolutionary_republic_trouble days = 730 }
		}
	}

	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 0.75
			NOT = { has_dlc = "Emperor" }
		}
	}
	
	immediate = {
		set_country_flag = revolutionary_republic_trouble
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = revolution_disaster_revolutionary
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				set_country_flag = noble_rebels_rise
			}
			if = {
				limit = {
					NOT = { republican_tradition = 50 }
					republican_tradition = 25
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 50
					set_country_flag = noble_rebels_rise
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_country_flag = noble_rebels_rise }
					NOT = { republican_tradition = 25 }
					any_owned_province = {
						continent = root
						is_core = ROOT
						is_capital = no
						NOT = { controlled_by = REB }
						has_siege = no
					}
				}
				random = {
					chance = 75
					set_country_flag = noble_rebels_rise
				}
			}
		}
	}
	
	option = {		# Who dares question the republic!
		name = "flavor_fra.EVTOPTA116"
		add_republican_tradition = -10
		if = {
			limit = {
				has_country_flag = noble_rebels_rise
			}
			random_owned_province = {
				limit = {
					continent = root
					is_core = ROOT
					is_capital = no
					NOT = { controlled_by = REB }
					has_siege = no
				}
				spawn_rebels = {
					type = pretender_rebels
					size = 2
				}
			}
			clr_country_flag = noble_rebels_rise
		}
	}
	option = {		# Increase public relief program
		name = "flavor_fra.EVTOPTB116"
		add_adm_power = -50
	}
	option = {		# Cut back on diplomatic spending
		name = "flavor_fra.EVTOPTC116"
		add_dip_power = -50
	}
	option = {		# Cut back on military spending
		name = "flavor_fra.EVTOPTD116"
		add_mil_power = -50
	}
}

# The French Gamble for Supremacy
country_event = {
	id = french_revolution.17
	title = "flavor_fra.EVTNAME3790"
	desc = "flavor_fra.EVTDESC3790"
	picture = BATTLE_eventPicture
	
	trigger = {
		NOT = { has_country_flag = french_gamble_for_supremacy_flag }
		tag = FRA
		is_revolution_target = yes
		SPA = { vassal_of = ROOT }
		HAB = { vassal_of = ROOT }
		PRU = { vassal_of = ROOT }
		RUS = { vassal_of = ROOT }
	}

	mean_time_to_happen = {
		months = 100
	}
	
	immediate = {
		set_country_flag = french_gamble_for_supremacy_flag
	}

	option = {		# We are the Master of Europe
		name = "flavor_fra.EVTOPTA3790"
		add_prestige = 100
	}
}

country_event = {
	id = french_revolution.18
	title = "french_revolution.18.t"
	desc = {
		trigger = {
			is_revolutionary = yes
		}
		desc = "french_revolution.18.d"
	}
	desc = {
		trigger = {
			is_revolutionary = no
		}
		desc = "french_revolution.18.d.reactionary"
	}
	picture = {
		trigger = {
			has_dlc = "Emperor"
			is_revolutionary = no
		}
		picture = FAILED_REVOLUTION_eventPicture
	}
	picture = {
		trigger = {
			NOT = { government = republic }
			OR = {
				is_revolutionary = yes
				NOT = { has_dlc = "Emperor" }
			}
		}
		picture = GOOD_WITH_MONARCH_eventPicture
	}
	picture = {
		trigger = {
			government = republic
		}
		picture = ELECTION_REPUBLICAN_eventPicture
	}
	
	is_triggered_only = yes

	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		on_non_estate_disaster_end = yes
		end_disaster = french_revolution

		hidden_effect = {
			if = {
				limit = {
					is_revolutionary_republic_trigger = yes
					has_ruler_flag = bonaparte_flag
				}
				country_event = { id = french_revolution.9 days = 365 random = 730 }
			}
		}
	}

	option = {		# Long Live the King!
		name = "french_revolution.18.a"
		trigger = {
			NOT = { is_revolutionary_republic_trigger = yes }
			NOT = { has_dlc = "Emperor" }
		}
		add_stability_or_adm_power = yes
		increase_legitimacy_large_effect = yes
		clear_standard_revolution_elements_effect = yes
	}
	option = {		# Long Live the Republic!
		name = "french_revolution.18.b"
		trigger = {
			is_revolutionary_republic_trigger = yes
			NOT = { has_dlc = "Emperor" }
		}
		add_stability_or_adm_power = yes
		increase_legitimacy_large_effect = yes
		clear_standard_revolution_elements_effect = yes
	}
	option = {
		name = french_revolution.18.e			# We lost
		trigger = {
			has_dlc = "Emperor"
			OR = {
				AND = {
					is_revolutionary = no
					has_country_flag = revolution_disaster_revolutionary
				}
				AND = {
					is_revolutionary = yes
					has_country_flag = revolution_disaster_reactionary
				}
			}
		}
		add_stability_or_adm_power = yes
		if = {
			limit = {
				is_revolutionary = no
			}
			capital_scope = {
				region = {
					limit = {
						has_revolution_in_province = yes
						owned_by = root
						is_center_of_revolution = no
					}
					remove_revolution_from_province_effect = yes
				}
			}
			hidden_effect = { log = "[Root.GetName] lost the Revolution as the Revolutionaries." }
		}
		else = {
			hidden_effect = { log = "[Root.GetName] lost the Revolution as the Reactionaries." }
		}
		clear_standard_revolution_elements_effect = yes
	}
	option = {
		name = french_revolution.18.f			# We won
		trigger = {
			has_dlc = "Emperor"
			OR = {
				AND = {
					is_revolutionary = yes
					has_country_flag = revolution_disaster_revolutionary
				}
				AND = {
					is_revolutionary = no
					has_country_flag = revolution_disaster_reactionary
				}
			}
		}
		add_stability_or_adm_power = yes
		
		if = {
			limit = {
				is_revolutionary = no
			}
			add_country_modifier = {
				name = no_revolution_here_country_dummy
				duration = -1
				hidden = yes
			}
			if = {
				limit = {
					any_owned_province = {
						is_center_of_revolution = yes
					}
				}
				remove_center_of_revolution = yes
			}
			custom_tooltip = remove_revolution_from_all_provinces
			hidden_effect = {
				every_owned_province = {
					limit = { has_revolution_in_province = yes }
					remove_revolution_from_province_effect = yes
				}
			}
			increase_legitimacy_large_effect = yes
			hidden_effect = { log = "[Root.GetName] won the Revolution as the Revolutionaries." }
		}
		else = {
			custom_tooltip = add_as_much_revolutionary_zeal_as_you_can_take
			hidden_effect = {
				add_revolutionary_zeal_or_absolutism = { amount = 1000 }
			}
			hidden_effect = { log = "[Root.GetName] won the Revolution as the Revolutionaries." }
		}
		clear_standard_revolution_elements_effect = yes
	}
}