#Asking to join province
country_event = {
	id = 9493
	title = "EVTNAME9493"
	desc = "EVTDESC9493"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTA9493"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				relation = { who = FROM value = 150 }
			}
			modifier = {
				factor = 0
				from = {
					owner = {
						badboy = 8
					}
				}
			}
			modifier = {
				factor = 0
				NOT = {
					num_of_cities = FROM
				}
			}
				
		}
		add_imperial_influence = 1
		from = {
			hre = yes
			province_event = 9494
		}
	}
	option = {
		name = "EVTOPTB9493"
		ai_chance = { 
			factor = 10
		}
		from = {
			hre = no
			province_event = 9495
		}
	}
}

province_event = {
	id = 9494
	title = "EVTNAME9494"
	desc = "EVTDESC9494"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTA9494"
		prestige = 0.01
	}
}

province_event = {
	id = 9495
	title = "EVTNAME9495"
	desc = "EVTDESC9495"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTA9495"
		prestige = -0.01
	}
}

# Become an elector
country_event = {

	id = 1054
	
	trigger = {
		NOT = { num_of_electors = 8 }
		elector = no
		is_emperor = no
		capital_scope = { hre = yes }
		NOT = { has_global_flag = elector_offered }
		NOT = { has_global_flag = Erbkaisertum }
	}

	mean_time_to_happen = {
	
		months = 60

		modifier = {
			factor = 100
			num_of_electors = 7
		}
		modifier = {
			factor = 0.6
			NOT = { num_of_electors = 6 }
		}
		modifier = {
			factor = 0.4
			NOT = { num_of_electors = 4 }
		}
		modifier = {
			factor = 0.2
			NOT = { num_of_electors = 2 }
		}
		modifier = {
			factor = 0.9
			emperor = { relation = { who = THIS value = 50 } }
		}
		modifier = {
			factor = 0.9
			emperor = { relation = { who = THIS value = 100 } }
		}
		modifier = {
			factor = 0.9
			emperor = { relation = { who = THIS value = 150 } }
		}
		modifier = {
			factor = 0.9
			any_neighbor_country = {
				is_emperor = yes
			}
		}
		modifier = {
			factor = 0.9
			religion = catholic
		}
		modifier = {
			factor = 1.1
			NOT = { religion = catholic }
		}
		modifier = {
			factor = 0.9
			stability = 1
		}
		modifier = {
			factor = 1.1
			NOT = { stability = 0 }
		}
	}

	title = "EVTNAME1054"
	desc = "EVTDESC1054"
	
	immediate = {
		set_global_flag = elector_offered
	}

	option = {
		name = "EVTOPTA1054"		# An offer too good to pass
		ai_chance = { factor = 90 }
		elector = yes
		prestige = 0.05
		clr_global_flag = elector_offered
		emperor = { relation = { who = THIS value = 100 } }
	}
	option = {
		name = "EVTOPTB1054"		# Unfortunately we have to decline
		ai_chance = { factor = 10 }
		prestige = -0.03
		clr_global_flag = elector_offered
		emperor = { relation = { who = THIS value = -100 } }

	}
}

# Remove elector
country_event = {

	id = 1055
	
	trigger = {
		elector = yes
		is_emperor = no
		num_of_electors = 7
		emperor = { 
			NOT = { relation = { who = THIS value = 0 } }
		}
		any_neighbor_country = {
			elector = yes
			NOT = { relation = { who = THIS value = 0 } }			
		}
	}

	mean_time_to_happen = {
	
		months = 300
		
		modifier = {
			factor = 0.9
			emperor = { 
				NOT = { relation = { who = THIS value = -50 } }
			}
		}
		modifier = {
			factor = 0.9
			emperor = {
				NOT = { relation = { who = THIS value = -100 } }
			}
		}
		modifier = {
			factor = 0.9
			emperor = {
				NOT = { relation = { who = THIS value = -150 } }
			}
		}
		modifier = {
			factor = 0.9
			emperor = { 
				NOT = { religion = THIS }
			}
		}
		modifier = {
			factor = 1.1
			emperor = { 
				religion = THIS
			}
		}
		modifier = {
			factor = 0.8
			badboy = 0.30
		}
		modifier = {
			factor = 0.9
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 1.1
			stability = 0
		}
	}

	title = "EVTNAME1055"
	desc = "EVTDESC1055"

	option = {
		name = "EVTOPTA1055"		# Try to mend the situation
		ai_chance = { factor = 80 }
		elector = no
		prestige = -0.02
		emperor = { relation = { who = THIS value = -50 } }
	}
	option = {
		name = "EVTOPTB1055"		# We won't forget this!
		ai_chance = { factor = 20 }
		elector = no
		prestige = -0.01
		emperor = { relation = { who = THIS value = -100 } }
	}
}


# Remove elector
country_event = {

	id = 1056
	
	trigger = {
		elector = yes
		is_emperor = no
		num_of_electors = 7
		emperor = {
			NOT = { relation = { who = THIS value = 0 } }
		}
		badboy = 0.30
	}

	mean_time_to_happen = {
	
		months = 300
		
		modifier = {
			factor = 0.9
			emperor = { 
				NOT = { relation = { who = THIS value = -50 } }
			}
		}
		modifier = {
			factor = 0.9
			emperor = {
				NOT = { relation = { who = THIS value = -100 } }
			}
		}
		modifier = {
			factor = 0.9
			emperor = { 
				NOT = { relation = { who = THIS value = -150 } }
			}
		}
		modifier = {
			factor = 0.9
			badboy = 0.45
		}
		modifier = {
			factor = 0.9
			badboy = 0.60
		}
		modifier = {
			factor = 0.9
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 1.1
			stability = 0
		}
	}

	title = "EVTNAME1056"
	desc = "EVTDESC1056"

	option = {
		name = "EVTOPTA1056"		# Try to mend the situation
		ai_chance = { factor = 80 }
		elector = no
		prestige = -0.02
		emperor = { relation = { who = THIS value = -50 } }
	}
	option = {
		name = "EVTOPTB1056"		# We won't forget this!
		ai_chance = { factor = 20 }
		elector = no
		prestige = -0.01
		emperor = { relation = { who = THIS value = -100 } }
	}
}

# Vote on Reichsreform
country_event = {

	id = 9057
	
	is_triggered_only = yes

	title = "EVTNAME9057"
	desc = "EVTDESC9057"
	
	option = {
		name = "EVTOPTA9057"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				emperor = {
					dynasty = THIS
				}
			}
			modifier = {
				factor = 2
				emperor = {
					relation = { who = THIS value = 150 }
				}
			}
			modifier = {
				factor = 2
				government = monarchy
			}
			modifier = {
				factor = 2.5
				AND = {
					government = theocracy
					emperor = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						badboy = 1
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					relation = { who = THIS value = 100}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					religion = THIS
				}
			}
		}
		set_country_flag = "reichsreform_yes"

	}
	
	option = {
		name = "EVTOPTB9057"
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						relation = { who = THIS value = 0}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						relation = { who = THIS value = 100}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					badboy = 10
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					badboy = 5
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					war = yes
				}
			}
			modifier = {
				factor = 10
				num_of_cities = 6
			}
		}
		clr_country_flag = "reichsreform_yes"
	
	}
}

# Trigger Reichsreform
province_event = {
	id = 9058
	title = "EVTNAME9058"
	desc = "EVTDESC9058"
	
	major = yes
	exclusive = yes
	
	trigger = {
		hre = yes
		has_global_flag = Voting
		NOT = { has_global_flag = Reichsreform }
		hre_majority = {
			has_country_flag = reichsreform_yes
		}
	}
	
	mean_time_to_happen = {
		days = 50
	}
	
	option = {
		name = "EVTOPTA9058"
		set_global_flag = Reichsreform
		add_hre_member_modifier = {
			name = "reichsreform_member"
			duration = -1
		}
		add_hre_emperor_modifier = {
			name = "reichsreform_emperor"
			duration = -1
		}
		clr_global_flag = Voting
	}

}

# Vote on Reichsregiment
country_event = {

	id = 9059
	
	is_triggered_only = yes

	title = "EVTNAME9059"
	desc = "EVTDESC9059"
	
	option = {
		name = "EVTOPTA9059"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				emperor = {
					dynasty = THIS
				}
			}
			modifier = {
				factor = 2
				emperor = {
					relation = { who = THIS value = 150 }
				}
			}
			modifier = {
				factor = 2
				government = monarchy
			}
			modifier = {
				factor = 2.5
				AND = {
					government = theocracy
					emperor = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						badboy = 1
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					relation = { who = THIS value = 100}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					religion = THIS
				}
			}
		}		
		set_country_flag = "reichsregiment_yes"

	}
	
	option = {
		name = "EVTOPTB9059"
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						relation = { who = THIS value = 0}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						relation = { who = THIS value = 100}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					badboy = 10
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					badboy = 5
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					war = yes
				}
			}
			modifier = {
				factor = 10
				num_of_cities = 6
			}			
		}
		clr_country_flag = "reichsregiment_yes"

	}
}

# Trigger Reichsregiment
province_event = {
	id = 9060
	title = "EVTNAME9060"
	desc = "EVTDESC9060"
	
	major = yes
	exclusive = yes
	
	trigger = {
		hre = yes
		has_global_flag = Voting
		NOT = { has_global_flag = Reichsregiment }
		hre_majority = {
			has_country_flag = reichsregiment_yes
		}
	}
	
	mean_time_to_happen = {
		days = 100
	}
	
	option = {
		name = "EVTOPTA9060"
		set_global_flag = Reichsregiment
		add_hre_member_modifier = {
			name = "reichsregiment_member"
			duration = -1
		}
		add_hre_emperor_modifier = {
			name = "reichsregiment_emperor"
			duration = -1
		}
		clr_global_flag = Voting
	}

}

# Vote on Hofgericht
country_event = {

	id = 9061
	
	is_triggered_only = yes

	title = "EVTNAME9061"
	desc = "EVTDESC9061"
	
	option = {
		name = "EVTOPTA9061"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				emperor = {
					dynasty = THIS
				}
			}
			modifier = {
				factor = 2
				emperor = {
					relation = { who = THIS value = 150 }
				}
			}
			modifier = {
				factor = 2
				government = monarchy
			}
			modifier = {
				factor = 2.5
				AND = {
					government = theocracy
					emperor = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						badboy = 1
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					relation = { who = THIS value = 100}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					religion = THIS
				}
			}
		}
		set_country_flag = "hofgericht_yes"

	}
	
	option = {
		name = "EVTOPTB9061"
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						relation = { who = THIS value = 0}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						relation = { who = THIS value = 100}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					badboy = 10
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					badboy = 5
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					war = yes
				}
			}
			modifier = {
				factor = 10
				num_of_cities = 6
			}
		}
		clr_country_flag = "hofgericht_yes"

	}
}

# Trigger Hofgericht
province_event = {
	id = 9062
	title = "EVTNAME9062"
	desc = "EVTDESC9062"
	
	major = yes
	exclusive = yes
	
	trigger = {
		hre = yes
		has_global_flag = Voting
		NOT = { has_global_flag = Hofgericht }
		hre_majority = {
			has_country_flag = hofgericht_yes
		}
	}
	
	mean_time_to_happen = {
		days = 100
	}
	
	option = {
		name = "EVTOPTA9062"
		set_global_flag = Hofgericht
		add_hre_member_modifier = {
			name = "hofgericht_member"
			duration = -1
		}
		add_hre_emperor_modifier = {
			name = "hofgericht_emperor"
			duration = -1
		}
		clr_global_flag = Voting
	}

}

# Vote on Gemeiner Pfennig
country_event = {

	id = 9063
	
	is_triggered_only = yes

	title = "EVTNAME9063"
	desc = "EVTDESC9063"
	
	option = {
		name = "EVTOPTA9063"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				emperor = {
					dynasty = THIS
				}
			}
			modifier = {
				factor = 2
				emperor = {
					relation = { who = THIS value = 150 }
				}
			}
			modifier = {
				factor = 2
				government = monarchy
			}
			modifier = {
				factor = 2.5
				AND = {
					government = theocracy
					emperor = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						badboy = 1
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					relation = { who = THIS value = 100}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					religion = THIS
				}
			}
		}
		set_country_flag = "gemeinerpfennig_yes"

	}
	
	option = {
		name = "EVTOPTB9063"
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						relation = { who = THIS value = 0}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						relation = { who = THIS value = 100}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					badboy = 10
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					badboy = 5
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					war = yes
				}
			}
			modifier = {
				factor = 10
				num_of_cities = 6
			}			
		}
		clr_country_flag = "gemeinerpfennig_yes"

	}
}

# Trigger Gemeiner Pfennig
province_event = {
	id = 9064
	title = "EVTNAME9064"
	desc = "EVTDESC9064"
	
	major = yes
	exclusive = yes
	
	trigger = {
		hre = yes
		has_global_flag = Voting
		NOT = { has_global_flag = Gemeinerpfennig }
		hre_majority = {
			has_country_flag = gemeinerpfennig_yes
		}
	}
	
	mean_time_to_happen = {
		days = 100
	}
	
	option = {
		name = "EVTOPTA9064"
		set_global_flag = Gemeinerpfennig
		add_hre_member_modifier = {
			name = "gemeinerpfennig_member"
			duration = -1
		}
		add_hre_emperor_modifier = {
			name = "gemeinerpfennig_emperor"
			duration = -1
		}
		clr_global_flag = Voting
	}

}

# Vote on Ewiger Landfriede
country_event = {

	id = 9065
	
	is_triggered_only = yes

	title = "EVTNAME9065"
	desc = "EVTDESC9065"
	
	option = {
		name = "EVTOPTA9065"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				emperor = {
					dynasty = THIS
				}
			}
			modifier = {
				factor = 2
				emperor = {
					relation = { who = THIS value = 150 }
				}
			}
			modifier = {
				factor = 2
				government = monarchy
			}
			modifier = {
				factor = 2.5
				AND = {
					government = theocracy
					emperor = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						badboy = 1
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					relation = { who = THIS value = 100}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					religion = THIS
				}
			}
		}
		set_country_flag = "landfriede_yes"

	}
	
	option = {
		name = "EVTOPTB9065"
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						relation = { who = THIS value = 0}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						relation = { who = THIS value = 100}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					badboy = 10
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					badboy = 5
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					war = yes
				}
			}
			modifier = {
				factor = 10
				num_of_cities = 6
			}			
		}
		clr_country_flag = "landfriede_yes"

	}
}

# Trigger Ewiger Landfriede
province_event = {
	id = 9066
	title = "EVTNAME9066"
	desc = "EVTDESC9066"
	
	major = yes
	exclusive = yes
	
	trigger = {
		hre = yes
		has_global_flag = Voting
		NOT = { has_global_flag = Landfriede }
		hre_majority = {
			has_country_flag = landfriede_yes
		}
	}
	
	mean_time_to_happen = {
		days = 100
	}
	
	option = {
		name = "EVTOPTA9066"
		set_global_flag = Landfriede
		add_hre_member_modifier = {
			name = "landfriede_member"
			duration = -1
		}
		add_hre_emperor_modifier = {
			name = "landfriede_emperor"
			duration = -1
		}
		internal_hre_cb = no
		clr_global_flag = Voting
	}

}

# Vote on Revoking the Privilegia de non appelando
country_event = {

	id = 9067
	
	is_triggered_only = yes

	title = "EVTNAME9067"
	desc = "EVTDESC9067"
	
	option = {
		name = "EVTOPTA9067"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				emperor = {
					dynasty = THIS
				}
			}
			modifier = {
				factor = 2
				emperor = {
					relation = { who = THIS value = 150 }
				}
			}
			modifier = {
				factor = 2
				government = monarchy
			}
			modifier = {
				factor = 2.5
				AND = {
					government = theocracy
					emperor = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						badboy = 1
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					relation = { who = THIS value = 100}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					religion = THIS
				}
			}
		}
		set_country_flag = "privilegia_de_non_appelando_yes"

	}
	
	option = {
		name = "EVTOPTB9067"
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						relation = { who = THIS value = 0}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						relation = { who = THIS value = 100}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					badboy = 10
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					badboy = 5
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					war = yes
				}
			}
			modifier = {
				factor = 10
				num_of_cities = 6
			}			
		}
		clr_country_flag = "privilegia_de_non_appelando_yes"

	}
}

# Check votes on Revoking the Privilegia de non appelando
province_event = {
	id = 9068
	title = "EVTNAME9068"
	desc = "EVTDESC9068"
	
	major = yes
	exclusive = yes
	
	trigger = {
		hre = yes
		has_global_flag = Voting
		NOT = { has_global_flag = Privileges_Revoked }
		hre_majority = {
			has_country_flag = "privilegia_de_non_appelando_yes"
		}
	}
	
	mean_time_to_happen = {
		days = 100
	}
	
	option = {
		name = "EVTOPTA9066"
		set_global_flag = Privileges_Revoked
		add_hre_member_modifier = {
			name = "privilegia_de_non_appelando_member"
			duration = -1
		}
		add_hre_emperor_modifier = {
			name = "privilegia_de_non_appelando_emperor"
			duration = -1
		}
		emperor = {
			country_event = 9075
		}
		clr_global_flag = Voting
	}

}


# Vote on Erbkaisertum
country_event = {

	id = 9069
	
	is_triggered_only = yes

	title = "EVTNAME9069"
	desc = "EVTDESC9069"
	
	option = {
		name = "EVTOPTA9069"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				emperor = {
					dynasty = THIS
				}
			}
			modifier = {
				factor = 2
				emperor = {
					relation = { who = THIS value = 150 }
				}
			}
			modifier = {
				factor = 2
				government = monarchy
			}
			modifier = {
				factor = 2.5
				AND = {
					government = theocracy
					emperor = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						badboy = 1
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					relation = { who = THIS value = 100}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					religion = THIS
				}
			}
		}
		set_country_flag = "erbkaisertum_yes"

	}
	
	option = {
		name = "EVTOPTB9069"
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						relation = { who = THIS value = 0}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						relation = { who = THIS value = 100}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					badboy = 10
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					badboy = 5
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					war = yes
				}
			}
			modifier = {
				factor = 100
				num_of_cities = 6
			}			
		}
		clr_country_flag = "erbkaisertum_yes"

	}
}

# Trigger Erbkaisertum
province_event = {
	id = 9070
	title = "EVTNAME9070"
	desc = "EVTDESC9070"
	
	major = yes
	exclusive = yes
	
	trigger = {
		hre = yes
		has_global_flag = Voting
		NOT = { has_global_flag = Erbkaisertum }
		hre_majority = {
			has_country_flag = "erbkaisertum_yes"
		}
	}
	
	mean_time_to_happen = {
		days = 100
	}
	
	option = {
		name = "EVTOPTA9070"
		set_global_flag = Erbkaisertum
		any_country = {
			limit = {
				elector = yes
			}
			elector = no
		}
		add_hre_member_modifier = {
			name = "erbkaisertum_member"
			duration = -1
		}
		add_hre_emperor_modifier = {
			name = "erbkaisertum_emperor"
			duration = -1
		}
		clr_global_flag = Voting
	}

}

# Vote on Renovatio
country_event = {

	id = 9071
	
	is_triggered_only = yes

	title = "EVTNAME9071"
	desc = "EVTDESC9071"
	
	option = {
		name = "EVTOPTA9071"
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 2
				emperor = {
					dynasty = THIS
				}
			}
			modifier = {
				factor = 2
				emperor = {
					relation = { who = THIS value = 150 }
				}
			}
			modifier = {
				factor = 2
				government = monarchy
			}
			modifier = {
				factor = 2.5
				AND = {
					government = theocracy
					emperor = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						badboy = 1
					}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					relation = { who = THIS value = 100}
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					religion = THIS
				}
			}
		}
		set_country_flag = "renovatio_yes"

	}
	
	option = {
		name = "EVTOPTB9071"
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 1.5
				emperor = {
					NOT = {
						relation = { who = THIS value = 0}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						relation = { who = THIS value = 100}
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					badboy = 10
				}
			}
			modifier = {
				factor = 1.5
				emperor = {
					badboy = 5
				}
			}
			modifier = {
				factor = 2
				emperor = {
					NOT = {
						religion = THIS
					}
				}
			}
			modifier = {
				factor = 2
				emperor = {
					war = yes
				}
			}
			modifier = {
				factor = 10
				num_of_cities = 6
			}			
		}
		clr_country_flag = "renovatio_yes"

	}
}

# Check Renovatio Votes
province_event = {
	id = 9072
	title = "EVTNAME9072"
	desc = "EVTDESC9072"
	
	major = yes
	exclusive = yes
	
	trigger = {
		hre = yes
		has_global_flag = Voting
		NOT = { has_global_flag = Renovatio }
		hre_majority = {
			has_country_flag = "renovatio_yes"
		}
	}
	
	mean_time_to_happen = {
		days = 100
	}
	option = {
		name = "EVTOPTA9072"
		set_global_flag = Renovatio
		emperor = {
			country_event = 9073
		}
		clr_global_flag = Voting
	}

}

# Renovatio triggers for Emperor...
country_event = {
	id = 9073
	title = "EVTNAME9073"
	desc = "EVTDESC9073"
	major = yes
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTA9073"
		change_tag = HRE
		add_country_modifier = {
			name = "rome_reborn"
			duration = -1
		}
		any_province = {
			limit = {
				hre = yes
			}
			add_core = emperor
		}
		any_country = {
			limit = {
				hre = yes
				is_emperor = no
				num_of_cities = 1
			}
			country_event = 9074
		}
		dismantle_hre = yes
	}
}

#... and for member states
country_event = {
	id = 9074
	title = "EVTNAME9074"
	desc = "EVTDESC9074"
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTA9074"
		from = {
			inherit = this
		}
	}
}

# Privilegia triggers for Emperor...
country_event = {
	id = 9075
	title = "EVTNAME9075"
	desc = "EVTDESC9075"
	major = yes
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTA9075"
		any_country = {
			limit = {
				hre = yes
				is_emperor = no
				num_of_cities = 1
			}
			country_event = 9076
		}
		
	}
}

#... and for member states
country_event = {
	id = 9076
	title = "EVTNAME9076"
	desc = "EVTDESC9076"
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTA9076"
		emperor = {
			vassalize = this
		}
		ai_chance = {
			factor = 85
			modifier = {
				factor = 0
				emperor = {
					badboy = 0.3
				}
			}
		}
	}
	option = {
		name = "EVTOPTB9076"
		any_owned = {
			hre = no
		}
		emperor = {
			war = this
		}
		ai_chance = {
			factor = 15
		}
	}
}