﻿add_namespace = bavariaevent
add_namespace = bavariafocus
#Maximilian II Tries to Push for Reforms
country_event = {
	id = bavariaevent.0
	title = bavariaevent.0.t
	desc = bavariaevent.0.d
	picture = GFX_report_event_wittelsbach_family

	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		TAG = BAV
		#date > 1857.06.01
	}
	
	option = {
		ai_chance = { factor = 100 }
		name = bavariaevent.0.a
	}
}

#Frankfurter Fuerstentag
country_event = {
	id = bavariaevent.1
	title = bavariaevent.1.t
	desc = bavariaevent.1.d
	picture = GFX_report_event_frankfurt_fuerstentag
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		TAG = BAV
		NOT = { has_war = yes }
		#date > 1863.08.16
	}
	
	option = {
		name = bavariaevent.1.a
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		add_opinion_modifier = { target = AUS modifier = BAV_frankfurt_fuerstentag_good }
		AUS = {
			add_opinion_modifier = { target = BAV modifier = BAV_frankfurt_fuerstentag_good }
		}
		PRS = {
			add_opinion_modifier = { target = BAV modifier = BAV_frankfurt_fuerstentag_bad }
		}
	}
	
	option = {
		name = bavariaevent.1.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
	option = {
		name = bavariaevent.1.c
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_opinion_modifier = { target = PRS modifier = BAV_frankfurt_fuerstentag_good }
		PRS = {
			add_opinion_modifier = { target = BAV modifier = BAV_frankfurt_fuerstentag_good }
		}
		AUS = {
			add_opinion_modifier = { target = BAV modifier = BAV_frankfurt_fuerstentag_bad }
		}
	}
}

#King Max's Hike
country_event = {
	id = bavariaevent.2
	title = bavariaevent.2.t
	desc = bavariaevent.2.d
	picture = GFX_report_event_king_max_hunt
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		TAG = BAV
		#date > 1858.07.07
	}
	
	option = {
		ai_chance = { factor = 100 }
		name = bavariaevent.2.a
	}
}

#Common Policy (good)
country_event = {
	id = bavariaevent.3
	title = bavariaevent.3.t
	desc = bavariaevent.3.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { factor = 100 }
		name = bavariaevent.3.a
	}
}

#Common Policy (semi-good)
country_event = {
	id = bavariaevent.4
	title = bavariaevent.4.t
	desc = bavariaevent.4.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { factor = 100 }
		name = bavariaevent.4.a
	}
}

#Common Policy (proxy 1)
country_event = {
	id = bavariaevent.5
	title = bavariaevent.5.t
	desc = bavariaevent.5.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0.5
				is_historical_focus_on = yes
			}
		}
		name = bavariaevent.5.a
		
		custom_effect_tooltip = BAV_customeffect_proxy_common_policy_good
		
		hidden_effect = {
			add_opinion_modifier = {
				target = BAV
				modifier = bav_common_policy
			}
			BAV = {
				add_opinion_modifier = {
					target = ROOT
					modifier = bav_common_policy
				}
				
				country_event = { id = bavariaevent.3 days = 1 }
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 1.5
				is_historical_focus_on = yes
			}
		}
		name = bavariaevent.5.b
		
		custom_effect_tooltip = BAV_customeffect_proxy_common_policy_semi_good
		
		hidden_effect = {
			add_opinion_modifier = {
				target = BAV
				modifier = bav_tried_common_policy
			}
			
			BAV = {
				add_opinion_modifier = {
					target = ROOT
					modifier = bav_tried_common_policy
				}
				
				country_event = { id = bavariaevent.4 days = 1 }
			}
		}
	}
}

#Common Policy (proxy 2)
country_event = {
	id = bavariaevent.6
	title = bavariaevent.5.t
	desc = bavariaevent.5.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0.2
				is_historical_focus_on = yes
			}
		}
		name = bavariaevent.5.a
		
		custom_effect_tooltip = BAV_customeffect_proxy_common_policy_good
		
		hidden_effect = {
			add_opinion_modifier = {
				target = BAV
				modifier = bav_common_policy
			}
			BAV = {
				add_opinion_modifier = {
					target = ROOT
					modifier = bav_common_policy
				}
				
				country_event = { id = bavariaevent.3 days = 1 }
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 1.5
				is_historical_focus_on = yes
			}
		}
		name = bavariaevent.5.b
		
		custom_effect_tooltip = BAV_customeffect_proxy_common_policy_semi_good
		
		hidden_effect = {
			add_opinion_modifier = {
				target = BAV
				modifier = bav_tried_common_policy
			}
			
			BAV = {
				add_opinion_modifier = {
					target = ROOT
					modifier = bav_tried_common_policy
				}
				
				country_event = { id = bavariaevent.4 days = 1 }
			}
		}
	}
}

#German Question
country_event = {
	id = bavariaevent.7
	title = bavariaevent.7.t
	desc = bavariaevent.7.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 80
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
				}
			}
		}
		name = bavariaevent.7.a
		
		custom_effect_tooltip = BAV_customeffect_have_a_say
		
		hidden_effect = {
			country_event = { id = bavariaevent.8 days = 3 }
		}
	}
	
	option = {
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 20
				has_country_flag = eoanb_flag_AUS_allied_BAV_sww
			}
		}
		name = bavariaevent.7.b
		
		custom_effect_tooltip = BAV_customeffect_leave_up_AUS
		
		hidden_effect = {
			set_country_flag = eoanb_flag_BAV_leave_up_AUS_sww
			#change this
			#Großösterreich
		}
	}
}

#Unify Germany
country_event = {
	id = bavariaevent.8
	title = bavariaevent.8.t
	desc = bavariaevent.8.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 40
			modifier = {
				factor = 5
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					OR = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
			modifier = {
				factor = 0
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					NOT = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
		}
		name = bavariaevent.8.a
		
		custom_effect_tooltip = BAV_customeffect_send_demands
		
		hidden_effect = {
			AUS = {
				country_event = { id = bavariaevent.9 days = 3 }
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 40
			modifier = {
				factor = 0
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					OR = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
			modifier = {
				factor = 5
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					NOT = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
		}
		name = bavariaevent.8.b
		
		custom_effect_tooltip = BAV_customeffect_agree_proposals
		
		hidden_effect = {
			AUS = {
				country_event = { id = bavariaevent.10 days = 3 }
				add_opinion_modifier = {
					target = BAV
					modifier = bav_agreed_proposal
				}
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 40
			modifier = {
				factor = 2
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					OR = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
			modifier = {
				factor = 2
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					NOT = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
		}
		name = bavariaevent.8.c
		
		custom_effect_tooltip = BAV_customeffect_send_proposals
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariaevent.13 days = 3 }
			}
		}
	}
}

#Bavaria demands Ruhr
country_event = {
	id = bavariaevent.9
	title = bavariaevent.9.t
	desc = bavariaevent.9.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 70
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					OR = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
			modifier = {
				factor = 20
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					NOT = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
		}
		
		custom_effect_tooltip = BAV_customeffect_annex_ruhr_accept
	
		name = bavariaevent.9.a
		
		hidden_effect = {
			BAV = {
				transfer_state = 984
				transfer_state = 51
				transfer_state = 1009
				transfer_state = 978
				
				984 = {
					remove_core_of = PRS
					add_core_of = BAV
				}
				51 = {
					remove_core_of = PRS
					add_core_of = BAV
				}
				1009 = {
					remove_core_of = PRS
					add_core_of = BAV
				}
				978 = {
					remove_core_of = PRS
					add_core_of = BAV
				}
			}
			AUS = {
				country_event = { id = bavariaevent.10 days = 3 }
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 30
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
				}
				OR = {
					has_completed_focus = BAV_focusoncivilianindustry
					has_completed_focus = BAV_focusonmilitaryindustry
					has_idea = industrializing
				}
			}
			modifier = {
				factor = 80
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
					NOT = {
						has_completed_focus = BAV_focusoncivilianindustry
						has_completed_focus = BAV_focusonmilitaryindustry
						has_idea = industrializing
					}
				}
			}
		}
	
		custom_effect_tooltip = BAV_customeffect_annex_ruhr_deny
	
		name = bavariaevent.9.b
		
		hidden_effect = {
			AUS = {
				country_event = { id = bavariaevent.10 days = 3 }
			}
			BAV = {
				add_opinion_modifier = {
					target = AUS
					modifier = bav_denied_proposal
				}
			}
		}
	}
}

#Deutscher Staatenbund
country_event = {
	id = bavariaevent.10
	title = bavariaevent.10.t
	desc = bavariaevent.10.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 50
		}
	
		name = bavariaevent.10.a
		
		custom_effect_tooltip = BAV_customeffect_staatenbund_puppet
		
		hidden_effect = {
			create_faction_from_template = faction_template_schutzbund
			
			#PRS allies
			every_country = {
				limit = {	
					has_country_flag = eoanb_flag_PRS_ally_sww
				}
				AUS = {
					add_to_faction = PREV
					puppet = PREV
				}
			}
			
			#AUS allies
			every_country = {
				limit = {	
					has_country_flag = eoanb_flag_AUS_ally_sww
				}
				AUS = {
					add_to_faction = PREV
					puppet = PREV
				}
			}
			
			#Neutral Thuringia and Hessen + Prussia
			AUS = {
				add_to_faction = THU
				puppet = THU
				add_to_faction = HES
				puppet = HES
				add_to_faction = PRS
				puppet = PRS
			}
			
			#change this; consequences
		}
	}
	
	option = {
		ai_chance = { 
			factor = 50
		}
		
		name = bavariaevent.10.b
		
		custom_effect_tooltip = BAV_customeffect_staatenbund_faction
		
		hidden_effect = {
			create_faction_from_template = faction_template_schutzbund
			
			#PRS allies
			every_country = {
				limit = {	
					has_country_flag = eoanb_flag_PRS_ally_sww
				}
				AUS = {
					add_to_faction = PREV
				}
			}
			
			#AUS allies
			every_country = {
				limit = {	
					has_country_flag = eoanb_flag_AUS_ally_sww
				}
				AUS = {
					add_to_faction = PREV
				}
			}
			
			#Neutral Thuringia and Hessen + Prussia
			AUS = {
				add_to_faction = THU
				add_to_faction = HES
				add_to_faction = PRS
			}
		}
	}
}

#Way of unification
country_event = {
	id = bavariaevent.13
	title = bavariaevent.13.t
	desc = bavariaevent.13.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 50
		}
		
		custom_effect_tooltip = BAV_customeffect_unify_force
		
		name = bavariaevent.13.a
		
		hidden_effect = {
			AUS = {
				country_event = { id = bavariaevent.11 days = 3 }
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 50
		}
		
		custom_effect_tooltip = BAV_customeffect_unify_fluid
	
		name = bavariaevent.13.b
		
		hidden_effect = {
			AUS = {
				country_event = { id = bavariaevent.12 days = 3 }
			}
		}
	}
}

#Unify under Bavaria (forced)
country_event = {
	id = bavariaevent.11
	title = bavariaevent.11.t
	desc = bavariaevent.11.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 30
			modifier = {
				factor = 70
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
				}
				has_completed_focus = BAV_concertofeurope
			}
		}
		
		custom_effect_tooltip = BAV_customeffect_unify_germany_under_BAV_accept
		
		name = bavariaevent.11.a
		
		hidden_effect = {
			GEC = {
				BAV={
					42 ={
						add_core_of = GEC
					}
					54 ={
						add_core_of = GEC
					}
					53 ={
						add_core_of = GEC
					}
					52 ={
						add_core_of = GEC
					}
				}
				annex_country = {
					target = BAV
					transfer_troops = yes
				}
				change_tag_from = BAV
				inherit_technology = BAV
			}
			
			puppet = GEC
		
			#PRS allies
			every_country = {
				limit = {	
					has_country_flag = eoanb_flag_PRS_ally_sww
				}
				GEC = { annex_country = { target = PREV transfer_troops = no } }
			}
			
			#AUS allies
			every_country = {
				limit = {	
					has_country_flag = eoanb_flag_AUS_ally_sww
					NOT = {
						tag = BAV
					}
				}
				GEC = { annex_country = { target = PREV transfer_troops = no } }
			}
			
			#Neutral Thuringia and Hessen + Prussia
			GEC = {
				annex_country = { 
					target = THU
					transfer_troops = no 
				}
				annex_country = { 
					target = HES
					transfer_troops = no 
				}
				annex_country = { 
					target = PRS
					transfer_troops = no 
				}
				country_event = { id = bavariaevent.18 }
				country_event = { id = bavariaevent.21 days = 10}
				
				set_politics = {
					ruling_party = autocracy
            }

                set_popularities = {
                    anarchism = 0
                    ideology_social_liberalism = 0
                    ideology_radical_socialism = 0
                    social_egalitarianism = 5
                    centrism = 0
                    traditional_conservatism = 40
                    radical_democracy = 5
                    chauvinist_populism = 5
                    autocracy = 45
                    fundamentalism = 0
                }
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 70
			modifier = {
				factor = 30
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
				}
				has_completed_focus = BAV_concertofeurope
			}
		}
	
		custom_effect_tooltip = BAV_customeffect_unify_germany_under_BAV_deny
	
		name = bavariaevent.11.b
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariaevent.19 }
			}
			AUS = {
				country_event = { id = bavariaevent.10 days = 3 }
			}
		}
	}
}

#Unify under Bavaria (fluid)
country_event = {
	id = bavariaevent.12
	title = bavariaevent.12.t
	desc = bavariaevent.12.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 30
			modifier = {
				factor = 70
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
				}
				has_completed_focus = BAV_concertofeurope
			}
		}
		
		custom_effect_tooltip = BAV_customeffect_unify_germany_under_BAV_accept_fluid
		
		name = bavariaevent.12.a
		
		hidden_effect = {
			GEC = {
				BAV={
					42 ={
						add_core_of = GEC
					}
					54 ={
						add_core_of = GEC
					}
					53 ={
						add_core_of = GEC
					}
					52 ={
						add_core_of = GEC
					}
				}
				annex_country = {
					target = BAV
					transfer_troops = yes
				}
				change_tag_from = BAV
				inherit_technology = BAV
			}
		
			puppet = GEC
		
			#PRS allies
			every_country = {
				limit = {	
					has_country_flag = eoanb_flag_PRS_ally_sww
				}
				GEC = { annex_country = { target = PREV transfer_troops = no } }
			}
			
			#AUS allies
			every_country = {
				limit = {	
					has_country_flag = eoanb_flag_AUS_ally_sww
					NOT = {
						tag = BAV
					}
				}
				country_event = { id = bavariaevent.14 days = 1 }
			}
			
			PRS={
				transfer_navy = {
					target = GEC
				}
			}
			#Neutral Thuringia and Hessen + Prussia
			GEC = {
				annex_country = { 
					target = THU
					transfer_troops = no 
				}
				annex_country = { 
					target = HES
					transfer_troops = no 
				}
				
				annex_country = { 
					target = PRS
					transfer_troops = no 
				}
				country_event = { id = bavariaevent.18 }
				country_event = { id = bavariaevent.21 days = 10}
				
				set_politics = {
					ruling_party = autocracy
				}

                set_popularities = {
                    anarchism = 0
                    ideology_social_liberalism = 0
                    ideology_radical_socialism = 0
                    social_egalitarianism = 5
                    centrism = 0
                    traditional_conservatism = 40
                    radical_democracy = 5
                    chauvinist_populism = 5
                    autocracy = 45
                    fundamentalism = 0
                }
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 70
			modifier = {
				factor = 30
				BAV = {
					has_country_flag = eoanb_flag_AUS_ally_sww
				}
				has_completed_focus = BAV_concertofeurope
			}
		}
		
		custom_effect_tooltip = BAV_customeffect_unify_germany_under_BAV_deny
	
		name = bavariaevent.12.b
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariaevent.19 }
			}
			AUS = {
				country_event = { id = bavariaevent.10 days = 3 }
			}
		}
	}
}

#Fluid join
country_event = {
	id = bavariaevent.14
	title = bavariaevent.14.t
	desc = bavariaevent.14.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 50
		}
		
		custom_effect_tooltip = BAV_customeffect_unify_germany_fluid_ask_accept
		
		name = bavariaevent.14.a
		
		hidden_effect = {
			GEC = { 
				annex_country = {
					target = ROOT
					transfer_troops = no
				}
				country_event = { id = bavariaevent.15 days = 3 }
			}
			AUS = {
				country_event = { id = bavariaevent.15 days = 3 }
			}
		}
	}
	
	option = {
		ai_chance = { 
			factor = 50
		}
		
		custom_effect_tooltip = BAV_customeffect_unify_germany_fluid_ask_deny
		
		name = bavariaevent.14.b
		
		hidden_effect = {
			GEC = {
				puppet = ROOT
				country_event = { id = bavariaevent.16 days = 3 }
			}
			AUS = {
				country_event = { id = bavariaevent.16 days = 3 }
			}
		}
	}
}

#Fluid join accept
country_event = {
	id = bavariaevent.15
	title = bavariaevent.15.t
	desc = bavariaevent.15.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 100
		}
		
		name = bavariaevent.15.a
	}
}

#Fluid join deny
country_event = {
	id = bavariaevent.16
	title = bavariaevent.16.t
	desc = bavariaevent.16.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 100
		}
		
		name = bavariaevent.16.a
	}
}

#German unification news
news_event = {
	id = bavariaevent.17
	title = bavariaevent.17.t
	desc = bavariaevent.17.d
	picture = GFX_news_event_generic_rally2
	
	is_triggered_only = yes
	major = yes
	
	option = {
		trigger = { 
			OR = {
				tag = GEC
				tag = AUS
			}
		}
		name = bavariaevent.17.a
		if={
			limit={is_ai =no}
			set_variable = {super_event_displayed = 17}
		}
	}
	
	option = {
		trigger = { 
			NOT = {
				OR = {
					tag = GEC
					tag = AUS
				}
			}
		}
		name = bavariaevent.17.b
		if={
			limit={is_ai =no}
			set_variable = {super_event_displayed = 17}
		}
	}
}

#Austria agrees
country_event = {
	id = bavariaevent.18
	title = bavariaevent.18.t
	desc = bavariaevent.18.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 100
		}
		
		name = bavariaevent.18.a
		
		hidden_effect = {
			country_event = { id = bavariaevent.17 days = 4 }
		}
	}
}

#Austria denies
country_event = {
	id = bavariaevent.19
	title = bavariaevent.19.t
	desc = bavariaevent.19.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 100
		}
		
		name = bavariaevent.19.a
	}
}

#Freiwilligenkorps
country_event = {
	id = bavariaevent.20
	title = bavariaevent.20.t
	desc = bavariaevent.20.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 100
		}
		
		add_ideas = BAV_defenders_of_god_and_king
		
		custom_effect_tooltip = BAV_customeffect_rise_divs_against_soc_prussia
		
		hidden_effect = {
			52 = {
				create_unit = {
					division = "name = \"1. Bayrischer Freiwilligenkorps\" division_template = \"Infanterie Division\" start_experience_factor = 0.07 start_equipment_factor = 0.2"
					owner = BAV
				}
				
				create_unit = {
					division = "name = \"2. Bayrischer Freiwilligenkorps\" division_template = \"Infanterie Division\" start_experience_factor = 0.07 start_equipment_factor = 0.2"
					owner = BAV
				}
				
				create_unit = {
					division = "name = \"3. Bayrischer Freiwilligenkorps\" division_template = \"Infanterie Division\" start_experience_factor = 0.07 start_equipment_factor = 0.2"
					owner = BAV
				}
			}
			
			53 = {
				create_unit = {
					division = "name = \"4. Bayrischer Freiwilligenkorps\" division_template = \"Infanterie Division\" start_experience_factor = 0.07 start_equipment_factor = 0.2"
					owner = BAV
				}
				
				create_unit = {
					division = "name = \"5. Bayrischer Freiwilligenkorps\" division_template = \"Infanterie Division\" start_experience_factor = 0.07 start_equipment_factor = 0.2"
					owner = BAV
				}
			}
		}
		
		name = bavariaevent.20.a
	}
}

#gib GEC cores
country_event = {
	id = bavariaevent.21
	title = bavariaevent.21.t
	desc = bavariaevent.21.d
	picture = GFX_report_event_wittelsbach_family
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { 
			factor = 100
		}
		
		name = bavariaevent.21.a
		every_owned_state={
			add_core_of = GEC
		}
	}
}

#Railway Line from Munich to Vienna - Planning Complete
country_event = {
	id = bavariaevent.22
	title = bavariaevent.22.t
	desc = bavariaevent.22.d
	picture = GFX_report_event_generic_railway_opening
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_idea = BAV_idea_railway_concessions
	}
	
	option = {
		name = bavariaevent.22.a
		ai_chance = { base = 100 }
	}
	
	option = {
		name = bavariaevent.22.b
		ai_chance = { base = 0 }
		remove_ideas = BAV_idea_railway_concessions
	}
}

#Segment from Rosenheim to Traunstein in Service #1860.5.7
country_event = {
	id = bavariaevent.23
	title = bavariaevent.23.t
	desc = bavariaevent.23.d
	picture = GFX_report_event_generic_railway_opening
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_idea = BAV_idea_railway_concessions
	}
	
	option = {
		name = bavariaevent.23.a
		ai_chance = { base = 100 }
		build_railway = {
			level = 1
			path = {
				9652
				707
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
	}
	
	option = {
		name = bavariaevent.23.b
		ai_chance = { base = 0 }
		build_railway = {
			level = 1
			path = {
				9652
				707
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
		remove_ideas = BAV_idea_railway_concessions
	}
}

#Segment from Traunstein to Salzburg in Service #1860.8.1
country_event = {
	id = bavariaevent.24
	title = bavariaevent.24.t
	desc = bavariaevent.24.d
	picture = GFX_report_event_generic_railway_opening
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_idea = BAV_idea_railway_concessions
	}
	
	option = {
		name = bavariaevent.24.a
		ai_chance = { base = 100 }
		build_railway = {
			level = 1
			path = {
				707
				688
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
	}
	
	option = {
		name = bavariaevent.24.b
		ai_chance = { base = 0 }
		build_railway = {
			level = 1
			path = {
				707
				688
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
		remove_ideas = BAV_idea_railway_concessions
	}
}

#Rosenheim-Kufstein Line in Service #1858.8.5
country_event = {
	id = bavariaevent.25
	title = bavariaevent.25.t
	desc = bavariaevent.25.d
	picture = GFX_report_event_generic_railway_opening
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_idea = BAV_idea_railway_concessions
	}
	
	option = {
		name = bavariaevent.25.a
		ai_chance = { base = 100 }
		build_railway = {
			level = 1
			path = {
				9652
				11634
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
	}
	
	option = {
		name = bavariaevent.25.b
		ai_chance = { base = 0 }
		build_railway = {
			level = 1
			path = {
				9652
				11634
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
		remove_ideas = BAV_idea_railway_concessions
	}
}

#Ostbahn - Segment Munich-Landshut in Service #1858.11.15
country_event = {
	id = bavariaevent.26
	title = bavariaevent.26.t
	desc = bavariaevent.26.d
	picture = GFX_report_event_generic_railway_opening
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_idea = BAV_idea_railway_concessions
	}
	
	option = {
		name = bavariaevent.26.a
		ai_chance = { base = 100 }
		build_railway = {
			level = 1
			path = {
				692
				11653
				9515
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
	}
	
	option = {
		name = bavariaevent.26.b
		ai_chance = { base = 0 }
		build_railway = {
			level = 1
			path = {
				692
				11653
				9515
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
		remove_ideas = BAV_idea_railway_concessions
	}
}

#Ostbahn - Segment Landshut-Regensburg-Nürnberg in Service #1859.12.12
country_event = {
	id = bavariaevent.27
	title = bavariaevent.27.t
	desc = bavariaevent.27.d
	picture = GFX_report_event_generic_railway_opening
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_idea = BAV_idea_railway_concessions
	}
	
	option = {
		name = bavariaevent.27.a
		ai_chance = { base = 100 }
		build_railway = {
			level = 1
			path = {
				9515
				3541
				3299
				571
				11544
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
	}
	
	option = {
		name = bavariaevent.27.b
		ai_chance = { base = 0 }
		build_railway = {
			level = 1
			path = {
				9515
				3541
				3299
				571
				11544
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
		remove_ideas = BAV_idea_railway_concessions
	}
}

#Ostbahn - Segment Regensburg-Straubing-Passau in Service #1860.9.20
country_event = {
	id = bavariaevent.28
	title = bavariaevent.28.t
	desc = bavariaevent.28.d
	picture = GFX_report_event_generic_railway_opening
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_idea = BAV_idea_railway_concessions
	}
	
	option = {
		name = bavariaevent.28.a
		ai_chance = { base = 100 }
		build_railway = {
			level = 1
			path = {
				3541
				532
			}
		}
		53 = {
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
	}
	
	option = {
		name = bavariaevent.28.b
		ai_chance = { base = 0 }
		build_railway = {
			level = 1
			path = {
				3541
				532
			}
		}
		53 = {
			add_building_construction = {
				type = infrastructure
				level = 1
				instant_build = yes
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
		remove_ideas = BAV_idea_railway_concessions
	}
}

#Ostbahn - Segment Schwandorf-Cham-Bohemian Border in Service #1861.10.15
country_event = {
	id = bavariaevent.29
	title = bavariaevent.29.t
	desc = bavariaevent.29.d
	picture = GFX_report_event_generic_railway_opening
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_idea = BAV_idea_railway_concessions
	}
	
	option = {
		name = bavariaevent.29.a
		ai_chance = { base = 100 }
		build_railway = {
			level = 1
			path = {
				571
				3571
			}
		}
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
		remove_ideas = BAV_idea_railway_concessions
	}
}

######## BAVARIA FOCUS EVENTS BELOW HERE

#Max dies
country_event = {
	id = bavariafocus.0
	title = bavariafocus.0.t
	desc = bavariafocus.0.d
	picture = GFX_report_event_wittelsbach_family
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		TAG = BAV
		#date > 1864.3.09
	}
	
	immediate = {
		hidden_effect = {
			remove_ideas = BAV_maximilian
			remove_ideas = BAV_maximilian2
			remove_ideas = BAV_maximilian3
			BAV_wittelsbach_regency = {
				add_country_leader_role = {
					promote_leader = yes
					country_leader = {
						desc = "POLITICS_GENERIC_EOANB_DESC"
						ideology = despotism
						expire = "1900.1.1.1"
					}
				}
			}
			retire_character = BAV_maximilian_ii
			add_ideas = BAV_noleader
			set_country_flag = bavaria_maximilian_ii_is_dead
		}
	}
	
	option = {
		ai_chance = { factor = 100 }
		name = bavariafocus.0.a
		decrease_ps_by_one = yes
	}
}

#Ludwig II takes over
country_event = {
	id = bavariafocus.1
	title = bavariafocus.1.t
	desc = bavariafocus.1.d
	picture = GFX_report_ludwig_ii
	
	fire_only_once = yes
	
	is_triggered_only = yes
	
	option = {
		name = bavariafocus.1.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		custom_effect_tooltip = BAV_customeffect_persuade
		
		hidden_effect = {
			set_country_flag = bavaria_legacy_of_maximilian_ii
		}
	}
	
	option = {
		name = bavariafocus.1.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		custom_effect_tooltip = BAV_customeffect_letbe
		
		hidden_effect = {
			set_country_flag = bavaria_new_king
		}
	}
}

#Bavaria picks its side
country_event = {
	id = bavariafocus.2
	title = bavariafocus.2.t
	desc = bavariafocus.2.d
	picture = GFX_report_event_generic_parliament_2
	
	fire_only_once = yes
	
	is_triggered_only = yes
	
	option = {
		name = bavariafocus.2.a
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 2
				has_completed_focus = BAV_supportbismarcksparliament
			}
		}
		custom_effect_tooltip = BAV_customeffect_sideprussia
		
		hidden_effect = {
			set_country_flag = bavaria_sides_with_prussia
		}
	}
	
	option = {
		name = bavariafocus.2.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				has_completed_focus = BAV_ludwigvonderpfordten
			}
		}
		custom_effect_tooltip = BAV_customeffect_sideaustria
		
		hidden_effect = {
			set_country_flag = bavaria_sides_with_austria
		}
	}
}

#Kill Ludwig II
country_event = {
	id = bavariafocus.3
	title = bavariafocus.3.t
	desc = bavariafocus.3.d
	picture = GFX_report_event_generic_death_monarch_crypt
	
	fire_only_once = yes
	
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			add_ideas = BAV_noleader
			add_stability = -0.3
			country_event = { id = bavariafocus.4 days = 2 }
		}
	}
	
	option = {
		name = bavariafocus.3.a
		ai_chance = { factor = 100 }
	}
}

#Luitpold after Ludwig II
country_event = {
	id = bavariafocus.4
	title = bavariafocus.4.t
	desc = bavariafocus.4.d
	picture = GFX_report_event_prinzregent_luitpold
	
	fire_only_once = yes
	
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			add_stability = 0.05
			remove_ideas = BAV_noleader
			BAV_luitpold = {
				add_country_leader_role = {
					promote_leader = yes
					country_leader = {
						desc = "POLITICS_GENERIC_EOANB_DESC"
						ideology = despotism
						expire = "1913.1.1.1"
					}
				}
			}
			retire_character = BAV_ludwig_ii
		}
	}
	
	option = {
		name = bavariafocus.4.a
		ai_chance = { factor = 100 }
	}
}

#Trias
country_event = {
	id = bavariafocus.5
	title = bavariafocus.5.t
	desc = bavariafocus.5.d
	picture = GFX_report_event_bavarian_crown

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.5.a
		ai_chance = { factor = 100 }
	}
}

#Convince
country_event = {
	id = bavariafocus.6
	title = bavariafocus.6.t
	desc = bavariafocus.6.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.6.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 10
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 10
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 3
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 5
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 1.5
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 2
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sway_convince_accept
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.30 days = 3 }
			}
			add_ideas = BAV_foreign_accepted_trias
		}
	}
	
	option = {
		name = bavariafocus.6.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 0
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 0.1
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 0.1
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 0.5
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 0.5
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sway_convince_deny
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.31 days = 3 }
			}
		}
	}
}

#Sway
country_event = {
	id = bavariafocus.7
	title = bavariafocus.7.t
	desc = bavariafocus.7.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.7.a
		ai_chance = { 
			factor = 40
			modifier = {
				factor = 5
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 5
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 1.5
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 2
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sway_convince_accept
		
		hidden_effect = {
			add_ideas = BAV_foreign_accepted_trias
			BAV = {
				country_event = { id = bavariafocus.30 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.7.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 0
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 1
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 1
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sway_convince_deny
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.31 days = 3 }
			}
		}
	}
}

#Süddeutscher Zollverein
country_event = {
	id = bavariafocus.8
	title = bavariafocus.8.t
	desc = bavariafocus.8.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.8.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 10
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 10
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 10
				has_idea = BAV_member_trias
			}
			modifier = {
				factor = 5
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 80
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 70
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 90
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_accept
		
		hidden_effect = {
			remove_ideas = {
				GEC_idea_zollverein_1
				GEC_idea_zollverein_2
				GEC_idea_zollverein_3
			}
			add_ideas = BAV_sueddeutscher_zollverein
			
			BAV = {
				country_event = { id = bavariafocus.41 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.8.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 0
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 0
				has_idea = BAV_member_trias
			}
			modifier = {
				factor = 30
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 20
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 30
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 10
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_deny
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.42 days = 3 }
			}
		}
	}
}

#A Third Deutschland
country_event = {
	id = bavariafocus.9
	title = bavariafocus.9.t
	desc = bavariafocus.9.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.9.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 100
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 100
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 100
				has_idea = BAV_member_trias
			}
			modifier = {
				factor = 70
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 80
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 70
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 90
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_accept
		
		BAV = {
			add_to_faction = ROOT
			
			country_event = { id = bavariafocus.43 days = 3 }
		}
	}
	
	option = {
		name = bavariafocus.9.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 0
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 0
				has_idea = BAV_member_trias
			}
			modifier = {
				factor = 30
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 20
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 30
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 10
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_deny
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.44 days = 3 }
			}
		}
	}
}

#Catholic Church
country_event = {
	id = bavariafocus.10
	title = bavariafocus.10.t
	desc = bavariafocus.10.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.10.a
		ai_chance = { factor = 100 }
		add_ideas = BAV_catholicchurch
	}
}

#Accept Protestantism
country_event = {
	id = bavariafocus.11
	title = bavariafocus.11.t
	desc = bavariafocus.11.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			#swap_ideas = {
			#	remove_idea = religion_catholic
			#	add_idea = religion_protestant
			#}
		}
	}
	
	option = {
		name = bavariafocus.11.a
		ai_chance = { factor = 100 }
		hidden_effect = {
			country_event = { id = bavariafocus.12 days = 10 }
		}
	}
}

#Accept Protestantism 2
country_event = {
	id = bavariafocus.12
	title = bavariafocus.12.t
	desc = bavariafocus.12.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.12.a
		ai_chance = { factor = 50 }
		random_list = {
			30 = {
				add_political_power = -25
				add_stability = 0.05
				hidden_effect = {
					country_event = { id = bavariafocus.14 days = 3 }
				}
			}
			70 = {
				add_political_power = -100
				add_stability = -0.1
				hidden_effect = {
					country_event = { id = bavariafocus.13 days = 3 }
				}
			}
		}
	}
	
	option = {
		name = bavariafocus.12.b
		ai_chance = { factor = 50 }
		random_list = {
			50 = {
				add_political_power = -25
				add_stability = 0.05
				hidden_effect = {
					country_event = { id = bavariafocus.14 days = 3 }
				}
			}
			
			50 = {
				add_political_power = -100
				add_stability = -0.1
				hidden_effect = {
					country_event = { id = bavariafocus.13 days = 3 }
				}
			}
		}
	}
}

#Accept Protestantism 3 (bad)
country_event = {
	id = bavariafocus.13
	title = bavariafocus.13.t
	desc = bavariafocus.13.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			add_political_power = -100
			add_stability = -0.1
			add_manpower = -25000
		}
	}
	
	option = {
		name = bavariafocus.13.a
		ai_chance = { factor = 100 }
	}
}

#Accept Protestantism 4 (good)
country_event = {
	id = bavariafocus.14
	title = bavariafocus.14.t
	desc = bavariafocus.14.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			add_political_power = 25
			add_stability = 0.1
			PRS = {
				add_opinion_modifier = { target = BAV modifier = bav_adopted_protestantism }
			}
		}
	}
	
	option = {
		name = bavariafocus.14.a
		ai_chance = { factor = 100 }
	}
}

#Common Contempt
country_event = {
	id = bavariafocus.15
	title = bavariafocus.15.t
	desc = bavariafocus.15.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.15.a
		ai_chance = { 
			factor = 50
			modifier = {
                factor = 100
                is_historical_focus_on = yes
            }
			modifier = {
				factor = 70
				has_opinion = {
					target = BAV
					value = 20
				}
			}
		}
		BAV = {
			set_country_flag = bavaria_AUS_sees_possibly_ally
		}
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.17 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.15.b
		ai_chance = { 
			factor = 50
			modifier = {
                factor = 0
                is_historical_focus_on = yes
            }
			modifier = {
				factor = 30
				has_opinion = {
					target = BAV
					value = 20
				}
			}
		}
	}
}

#My Enemy's Enemy
country_event = {
	id = bavariafocus.16
	title = bavariafocus.16.t
	desc = bavariafocus.16.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.16.a
		ai_chance = { 
			factor = 50 
			modifier = {
                factor = 100
                is_historical_focus_on = yes
            }
			modifier = {
				factor = 70
				BAV = {
					has_country_flag = bavaria_AUS_sees_possibly_ally
				}
			}
		}
		BAV = {
			set_country_flag = bavaria_AUS_sees_ally
		}
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.18 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.16.b
		ai_chance = { 
			factor = 50 
			modifier = {
                factor = 0
                is_historical_focus_on = yes
            }
			modifier = {
				factor = 30
				BAV = {
					has_country_flag = bavaria_AUS_sees_possibly_ally
				}
			}
		}
	}
}

#Common Contempt (good)
country_event = {
	id = bavariafocus.17
	title = bavariafocus.17.t
	desc = bavariafocus.17.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.17.a
		ai_chance = { factor = 50 }
	}
}

#My Enemy's Enemy (good)
country_event = {
	id = bavariafocus.18
	title = bavariafocus.18.t
	desc = bavariafocus.18.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.18.a
		ai_chance = { factor = 50 }
	}
}

#Support Bismarck's Parliament
country_event = {
	id = bavariafocus.19
	title = bavariafocus.19.t
	desc = bavariafocus.19.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.19.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 70
				has_opinion = {
					target = BAV
					value = 20
				}
			}
		}
		BAV = {
			set_country_flag = bavaria_PRS_accepts_support
		}
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.20 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.19.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 30
				has_opinion = {
					target = BAV
					value = 20
				}
			}
		}
	}
}

#Support Bismarck's Parliament (good)
country_event = {
	id = bavariafocus.20
	title = bavariafocus.20.t
	desc = bavariafocus.20.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.20.a
		ai_chance = { factor = 100 }
	}
}

#Another Way to Unity
country_event = {
	id = bavariafocus.21
	title = bavariafocus.21.t
	desc = bavariafocus.21.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.21.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 70
				BAV = {
					has_country_flag = bavaria_PRS_accepts_support
				}
			}
		}
		
		BAV = {
			set_country_flag = bavaria_PRS_accepts_wish_for_unity
		}
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.22 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.21.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 30
				BAV = {
					has_country_flag = bavaria_PRS_accepts_support
				}
			}
		}
	}
}

#Another Way to Unity (good)
country_event = {
	id = bavariafocus.22
	title = bavariafocus.22.t
	desc = bavariafocus.22.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.22.a
		ai_chance = { factor = 100 }
	}
}

#Military Consultative Commission (Austria)
country_event = {
	id = bavariafocus.23
	title = bavariafocus.23.t
	desc = bavariafocus.23.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.23.a
		ai_chance = { factor = 100 }
		set_country_flag = bavaria_military_commission_over
	}
}

#Military Consultative Commission (lean Austria)
country_event = {
	id = bavariafocus.24
	title = bavariafocus.23.t
	desc = bavariafocus.24.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.23.a
		ai_chance = { factor = 100 }
		set_country_flag = bavaria_military_commission_over
	}
}

#Military Consultative Commission (Prussia)
country_event = {
	id = bavariafocus.25
	title = bavariafocus.23.t
	desc = bavariafocus.25.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.23.a
		ai_chance = { factor = 100 }
		set_country_flag = bavaria_military_commission_over
	}
}

#Military Consultative Commission (lean Prussia)
country_event = {
	id = bavariafocus.26
	title = bavariafocus.23.t
	desc = bavariafocus.26.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.23.a
		ai_chance = { factor = 100 }
		set_country_flag = bavaria_military_commission_over
	}
}

#Military Consultative Commission (neutral)
country_event = {
	id = bavariafocus.27
	title = bavariafocus.23.t
	desc = bavariafocus.27.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.23.a
		ai_chance = { factor = 100 }
		set_country_flag = bavaria_military_commission_over
	}
}

#Customs
country_event = {
	id = bavariafocus.28
	title = bavariafocus.28.t
	desc = bavariafocus.28.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.28.a
		ai_chance = { factor = 50 }
	}
	
	option = {
		name = bavariafocus.28.b
		ai_chance = { factor = 50 }
		swap_ideas = {
			remove_idea = state_religion
			add_idea = secular_state
		}
	}
}

#Redpick
country_event = {
	id = bavariafocus.29
	title = bavariafocus.29.t
	desc = bavariafocus.29.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.29.a
		ai_chance = { factor = 50 }
		set_country_flag = bavaria_take_over_government
	}
	
	option = {
		name = bavariafocus.29.b
		ai_chance = { factor = 50 }
		set_country_flag = bavaria_the_only_way_is_revolution
	}
}

#Deny Sway or Convince
country_event = {
	id = bavariafocus.30
	title = bavariafocus.30.t
	desc = bavariafocus.30.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.30.a
	}
}

#Accept Sway or Convince
country_event = {
	id = bavariafocus.31
	title = bavariafocus.31.t
	desc = bavariafocus.31.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.31.a
	}
}

#Nuremberg Verein
country_event = {
	id = bavariafocus.32
	title = bavariafocus.32.t
	desc = bavariafocus.32.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.32.a
	}
}

#Bezirksamt Erlangen
country_event = {
	id = bavariafocus.33
	title = bavariafocus.33.t
	desc = bavariafocus.33.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.33.a
	}
}

#Muenchner Culture
country_event = {
	id = bavariafocus.34
	title = bavariafocus.34.t
	desc = bavariafocus.34.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.34.a
	}
}

#Pride
country_event = {
	id = bavariafocus.35
	title = bavariafocus.35.t
	desc = bavariafocus.35.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.35.a
	}
}

#Concert of Europe
news_event = {
	id = bavariafocus.36
	title = bavariafocus.36.t
	desc = bavariafocus.36.d
	picture = GFX_news_event_generic_rally2

	is_triggered_only = yes
	
	option = {
		trigger = { 
			tag = BAV 
		}
		name = bavariafocus.36.a
	}
	
	option = {
		trigger = { 
			NOT = {
				tag = BAV
			}
		}
		name = bavariafocus.36.b
	}
}

#Middle Power
news_event = {
	id = bavariafocus.37
	title = bavariafocus.37.t
	desc = bavariafocus.37.d
	picture = GFX_news_event_generic_rally2

	is_triggered_only = yes
	
	option = {
		trigger = { 
			tag = BAV 
		}
		name = bavariafocus.37.a
	}
	
	option = {
		trigger = { 
			NOT = {
				tag = BAV
			}
		}
		name = bavariafocus.37.b
	}
}

#Donau-Main-Kanal
country_event = {
	id = bavariafocus.38
	title = bavariafocus.38.t
	desc = bavariafocus.38.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.38.a
	}
}

#Sued-Nord-Bahn
country_event = {
	id = bavariafocus.39
	title = bavariafocus.39.t
	desc = bavariafocus.39.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.39.a
	}
}

#SGC
news_event = {
	id = bavariafocus.40
	title = bavariafocus.40.t
	desc = bavariafocus.40.d
	picture = GFX_news_event_generic_rally2

	is_triggered_only = yes
	
	option = {
		trigger = { 
			tag = BAV 
		}
		name = bavariafocus.40.a
	}
	
	option = {
		trigger = { 
			NOT = {
				tag = BAV
			}
		}
		name = bavariafocus.40.b
	}
}

#SG Zoll (good)
country_event = {
	id = bavariafocus.41
	title = bavariafocus.41.t
	desc = bavariafocus.41.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.41.a
	}
}

#SG Zoll (bad)
country_event = {
	id = bavariafocus.42
	title = bavariafocus.42.t
	desc = bavariafocus.42.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.42.a
	}
}

#Third Deutschland (good)
country_event = {
	id = bavariafocus.43
	title = bavariafocus.43.t
	desc = bavariafocus.43.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.43.a
	}
}

#Third Deutschland (bad)
country_event = {
	id = bavariafocus.44
	title = bavariafocus.44.t
	desc = bavariafocus.44.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.44.a
	}
}

#Invite to Trias - WUR
country_event = {
	id = bavariafocus.45
	title = bavariafocus.45.t
	desc = bavariafocus.45.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.45.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 100
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 100
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 60
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 70
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 60
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 80
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_accept
		
		hidden_effect = {
			BAD = {
				country_event = { id = bavariafocus.48 days = 3 }
			}
			BAV = {
				country_event = { id = bavariafocus.49 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.45.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 0
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 0
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 40
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 30
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 40
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 20
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_deny
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.47 days = 3 }
			}
		}
	}
}

#Invite to Trias - BAD
country_event = {
	id = bavariafocus.48
	title = bavariafocus.45.t
	desc = bavariafocus.48.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.45.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 100
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 100
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 60
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 70
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 60
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 80
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_accept
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.46 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.45.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 0
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 40
				has_country_flag = WUR_stance_middle_bav_accepted
			}
			modifier = {
				factor = 30
				has_country_flag = WUR_stance_middle_both_accepted
			}
			modifier = {
				factor = 40
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 20
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_deny
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.47 days = 3 }
			}
		}
	}
}

#Invite Trias (good)
country_event = {
	id = bavariafocus.46
	title = bavariafocus.46.t
	desc = bavariafocus.46.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			WUR = {
				add_ideas = BAV_member_trias
			}
			BAD = {
				add_ideas = BAV_member_trias
			}
			BAV = {
				add_ideas = BAV_member_trias
			}
			every_country = {
				news_event = { id = bavariafocus.53 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.46.a
	}
}

#Invite Trias - WUR (good)
country_event = {
	id = bavariafocus.49
	title = bavariafocus.49.t
	desc = bavariafocus.49.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.49.a
	}
}

#Invite Trias (bad)
country_event = {
	id = bavariafocus.47
	title = bavariafocus.47.t
	desc = bavariafocus.47.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.47.a
	}
}

#Invite to Trias - Middle
country_event = {
	id = bavariafocus.50
	title = bavariafocus.50.t
	desc = bavariafocus.50.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.50.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 100
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 100
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 60
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 80
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_accept
		
		hidden_effect = {
			add_ideas = BAV_member_trias
			BAV = {
				country_event = { id = bavariafocus.51 days = 3 }
			}
		}
	}
	
	option = {
		name = bavariafocus.50.b
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 0
				has_country_flag = eoanb_flag_sww_side_mid
			}
			modifier = {
				factor = 0
				has_country_flag = WUR_push_neutral_approach
			}
			modifier = {
				factor = 40
				has_opinion_modifier = bav_tried_common_policy
			}
			modifier = {
				factor = 20
				has_opinion_modifier = bav_common_policy
			}
		}
		custom_effect_tooltip = BAV_customeffect_sueddeutscherzollverein_deny
		
		hidden_effect = {
			BAV = {
				country_event = { id = bavariafocus.52 days = 3 }
			}
		}
	}
}

#Invite Trias - Middle (good)
country_event = {
	id = bavariafocus.51
	title = bavariafocus.51.t
	desc = bavariafocus.51.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.51.a
	}
}

#Invite Trias - Middle (bad)
country_event = {
	id = bavariafocus.52
	title = bavariafocus.52.t
	desc = bavariafocus.52.d
	picture = GFX_report_event_wittelsbach_family

	is_triggered_only = yes
	
	option = {
		name = bavariafocus.52.a
	}
}

#Trias established news
news_event = {
	id = bavariafocus.53
	title = bavariafocus.53.t
	desc = bavariafocus.53.d
	picture = GFX_news_event_generic_rally2

	is_triggered_only = yes
	
	option = {
		trigger = { 
			has_idea = BAV_member_trias
		}
		name = bavariafocus.53.a
	}
	
	option = {
		trigger = { 
			NOT = {
				has_idea = BAV_member_trias
			}
		}
		name = bavariafocus.53.b
	}
}