#####################
# German Events
###########################

add_namespace = germany
add_namespace = AAT_germany

# Austrian Anschluss Completed
country_event = {
	id = germany.4
	title = germany.4.t
	desc = germany.4.d
	picture = GFX_report_event_german_speech

	is_triggered_only = yes

 	immediate = {
 		hidden_effect = {
 			add_named_threat = { threat = 12 name = germany.4.t }
 		}
 	}

	option = {
		name = germany.4.a
		4 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		152 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		153 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		848 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		975 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		976 = {
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		add_political_power = 75
		add_war_support = 0.1
		add_stability = 0.05
		army_experience = 10

		custom_effect_tooltip = generic_skip_one_line_tt

		set_country_flag = AUS_annexed #if this is changed, notify Malin or change reqs for Bohme and Beyer in AUS character file

		AUS = {
			AUS_franz_bohme = {
				demote_leader = yes
				set_nationality = GER
			}
			AUS_eugen_beyer = {
				demote_leader = yes
				set_nationality = GER
			}
			AUS_lothar_rendulic = {
				set_nationality = GER
			}
			AUS_karl_eglseer = {
				set_nationality = GER
			}
		}
		annex_country = { target = AUS transfer_troops = yes }
		
		custom_effect_tooltip = generic_skip_one_line_tt
		#GER_anschluss_modify_mefo_bills_or_economy_of_conquest = yes
		#GER_seize_gold_reserves_in_europe_peacefully = yes
		#add_to_variable = { var = GER_mefo_bill_counter value = -10 }

		custom_effect_tooltip = anschluss_mefo_bills_tt					#ct30 ct_30 1930 change 
		hidden_effect = { # Having it appear twice might be confusing	#
			GER_mefo_bills_level_down = yes								#
			GER_mefo_bills_level_down = yes								#
		}																#
		custom_effect_tooltip = anschluss_mefo_bills_double_reduction	#
		add_to_variable = { var = GER_mefo_bill_counter value = -10 }	#

		custom_effect_tooltip = generic_skip_one_line_tt
		USA = {	set_country_flag = { flag = USA_anschluss_window days = 60 value = 1 }	}
		if = {
			limit = {
				has_dlc = "Death or Dishonor"
				country_exists = YUG
				YUG = { has_war = no }
			}
			country_event = {
				id = DOD_yugoslavia.30
				days = 4
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.36 }

			BEL = {
				country_event = {
					id = AUS_political_events.63
					hours = 12
				}
			}
		}
	}
}

#anti_comintern_pact
# nations are asked to join pact, agreeing = relations with GER and hit with SOV

country_event = {
	id = germany.5
	title = germany.5.t
	desc = germany.5.d
	picture = GFX_report_event_japan_europe_pact

	is_triggered_only = yes

	option = {
		name = germany.5.a		#join
		ai_chance = {
			base = 75
			modifier = {
				factor = 4
				has_opinion = {
					target = SOV
					value < -10
				}
			}
			modifier = {
				factor = 0.5
				has_opinion = {
					target = GER
					value < -10
				}
			}
			modifier = {
				factor = 0
				has_war = yes
				NOT = {
					AND = {
						tag = ITA
						has_war_with = ETH #It doesn't really need to be more complicated than this
					}
				}
			}
			modifier = {
				factor = 0
				tag = JAP
				OR = {
					has_completed_focus = JAP_the_unthinkable_option
					has_completed_focus = JAP_return_of_the_manchukuo_exiles
				}
			}
			modifier = {
				factor = 0
				is_literally_china = yes
				JAP = { has_completed_focus = JAP_sea_purge_the_kodoha_faction }
			}
			modifier = {
				factor = 0
				tag = JAP
				has_completed_focus = JAP_sea_purge_the_kodoha_faction
				date > 1938.1.1
			}
		}
		set_country_flag = anti_comintern_member
		GER = { add_opinion_modifier = { target = ROOT modifier = anti_comintern_pact_opinion } }
		add_opinion_modifier = { target = GER modifier = anti_comintern_pact_opinion }
		SOV  = { add_opinion_modifier = { target = ROOT modifier = pact_against_us } }
	}

	option = {
		name = germany.5.b		#refuse
		trigger = { NOT = { is_subject_of = GER } }
		ai_chance = {
			base = 25
		}
		GER =  { add_opinion_modifier = { target = ROOT modifier = refused_anti_comintern_pact_opinion } }
	}

}

# tripartite_pact
# anti_comintern_pact nations are asked to join pact, agreeing = relations with GER and hit with SOV

country_event = {
	id = germany.6
	title = germany.6.t
	desc = germany.6.d
	picture = [GetHitlerCroatianHandshakeEventPicture]


	is_triggered_only = yes

	option = {
		name = germany.6.a		#join
		remove_opinion_modifier = { target = GER modifier = anti_comintern_pact_opinion }
		add_opinion_modifier = { target = GER modifier = tripartite_pact_opinion }
		remove_opinion_modifier = { target = SOV modifier = pact_against_us }
		add_opinion_modifier = { target = SOV modifier = worse_pact_against_us }
	}

	option = {
		name = germany.6.b		#refuse
		trigger = { NOT = { is_subject_of = GER } }
		add_opinion_modifier = { target = GER modifier = refused_tripartite_pact_opinion }
	}

}

#molotov_ribbentrop_pact
# fire event to SOV to accept or not. adds claims
# SOV events sends reply to GER, adds claims if they said yes, hurts relations if they say no

# Molotov-Ribbentrop Pact (Soviets)
country_event = {
	id = germany.11
	title = germany.11.t
	desc = germany.11.d
	picture = GFX_report_event_molotov_ribentrop_handshake

	is_triggered_only = yes

	option = {
		name = germany.11.a	#sounds good
		ai_chance = {
			base = 90
			modifier = {
				factor = 0
				GER = {
					OR = {
						has_wargoal_against = SOV
						is_justifying_wargoal_against = SOV
					}
					NOT = {
						is_in_faction_with = SOV
					}
				}
			}
		}
		add_opinion_modifier = { target = GER modifier = MR_pact }# pact
		custom_effect_tooltip = germany.11.a.tt
		if = {
			limit = {
				NOT = { owns_state = 146 }
			}
			add_state_claim = 146 #KARELIA (FIN)
		}
		#if = { #Removed with AAT (Makes no sense really)
		#	limit = {
		#		NOT = { owns_state = 147 }
		#	}
		#	add_state_claim = 147 #SALLA (FIN)
		#}
		#if = {
		#	limit = {
		#		NOT = { owns_state = 722 }
		#	}
		#	add_state_claim = 722 #PETSAMO (FIN)
		#}
		if = {
			limit = {
				NOT = { owns_state = 13 }
			}
			add_state_claim = 13 #PÄRNU (EST)
		}
		if = {
			limit = {
				NOT = { owns_state = 191 }
			}
			add_state_claim = 191 #TARTU (EST)
		}
		if = {
			limit = {
				NOT = { owns_state = 811 }
			}
			add_state_claim = 811 #SAAREMAA (EST)
		}
		if = {
			limit = {
				NOT = { owns_state = 813 }
			}
			add_state_claim = 813 #VIRUMAA (EST)
		}
		if = {
			limit = {
				NOT = { owns_state = 812 }
			}
			add_state_claim = 812 #TALLIN (EST)
		}
		if = {
			limit = {
				NOT = { owns_state = 12 }
			}
			add_state_claim = 12 #VIDZEME (LAT)
		}
		if = {
			limit = {
				NOT = { owns_state = 190 }
			}
			add_state_claim = 190 #KURZEME (LAT)
		}
		if = {
			limit = {
				NOT = { owns_state = 808 }
			}
			add_state_claim = 808 #RIGA (LAT)
		}
		if = {
			limit = {
				NOT = { owns_state = 809 }
			}
			add_state_claim = 809 #ZEMGALE (LAT)
		}
		if = {
			limit = {
				NOT = { owns_state = 810 }
			}
			add_state_claim = 810 #LATGALE (LAT)
		}
		if = {
			limit = {
				NOT = { owns_state = 11 }
			}
			add_state_claim = 11 #KAUNAS (LIT)
		}
		if = {
			limit = {
				NOT = { owns_state = 784 }
			}
			add_state_claim = 784 #WILNO (LIT)
		}
		if = {
			limit = {
				NOT = { owns_state = 189 }
			}
			add_state_claim = 189 #ZEMAITIJA (LIT)
		}
		if = {
			limit = {
				NOT = { owns_state = 814 }
			}
			add_state_claim = 814 #SUDUVA (LIT)
		}
		if = {
			limit = {
				NOT = { owns_state = 815 }
			}
			add_state_claim = 815 #AUKSTAITIJA (LIT)
		}
		if = {
			limit = {
				NOT = { owns_state = 89 }
			}
			add_state_claim = 89 #STANISLAWOW (POL)
		}
		if = {
			limit = {
				NOT = { owns_state = 91 }
			}
			add_state_claim = 91 #LWOW (POL)
		}
		if = {
			limit = {
				NOT = { owns_state = 93 }
			}
			add_state_claim = 93 #WOLYN (POL)
		}
		if = {
			limit = {
				NOT = { owns_state = 94 }
			}
			add_state_claim = 94 #POLESIE (POL)
		}
		if = {
			limit = {
				NOT = { owns_state = 95 }
			}
			add_state_claim = 95 #NOWOGRODEK (POL)
		}
		if = {
			limit = {
				NOT = { owns_state = 96 }
			}
			add_state_claim = 96 #WILEJKA (POL)
		}
		if = {
			limit = {
				NOT = { owns_state = 97 }
			}
			add_state_claim = 97 #BIALYSTOK (POL)
		}
		if = {
			limit = {
				NOT = { owns_state = 78 }
			}
			add_state_claim = 78 #BESSARABIA (ROM)
		}
		if = {
			limit = {
				NOT = { owns_state = 80 }
			}
			add_state_claim = 80 #BUCOVINA (ROM)
		}
		if = {
			limit = {
				NOT = { owns_state = 766 }
			}
			add_state_claim = 766 #SOUTHERN BESSARABIA (ROM)
		}

		hidden_effect =  { add_timed_idea = { idea = SOV_molotov_ribbentrop_pact days = 730 } }
		GER = {
			country_event = { days = 1 id = germany.12 }
			effect_tooltip = {
				add_opinion_modifier = { target = SOV modifier = MR_pact }# pact
			}
		}
		set_global_flag = sov_yes_pact
	}

	option = {
		name = germany.11.b	#no way
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				GER = {
					NOT = { has_wargoal_against = SOV }
					NOT = { is_justifying_wargoal_against = SOV }
				}
			}
			modifier = {
				factor = 0
				is_in_faction_with = GER
			}
		}
		add_political_power = -50
		add_opinion_modifier = { target = GER modifier = refused_MR_pact }# no pact
		GER = {
			country_event = { days = 1 id = germany.13 }
		}
		set_global_flag = sov_no_pact
	}
}

# Soviets Sign MR Pact
country_event = {
	id = germany.12
	title = germany.12.t
	desc = germany.12.d
	picture = GFX_report_event_molotov_signing_pact

	is_triggered_only = yes

	option = {
		name = germany.12.a	#neat
		every_other_country = {
			limit = {
				NOT = { tag = GER }
				has_government = fascism
			}
			add_opinion_modifier = { target = GER modifier = MR_pact_fascists }
		}
		diplomatic_relation = { country = SOV relation = non_aggression_pact }
		add_opinion_modifier = { target = SOV modifier = MR_pact }# pact
		USA = {
			set_country_flag = { flag = USA_MR_window days = 60 value = 1 }
		}
		hidden_effect = {
			country_event = { hours = 6 id = news.32 }
		}
	}
}

# Soviets Reject MR Pact
country_event = {
	id = germany.13
	title = germany.13.t
	desc = germany.13.d
	picture = GFX_report_event_stalin_01

	is_triggered_only = yes

	option = {
		name = germany.13.a	#bah
		add_opinion_modifier = { target = SOV modifier = refused_MR_pact }# no pact
	}
}

# Poland conquered... honor MR Pact?
country_event = {
	id = germany.14
	title = germany.14.t
	desc = germany.14.d
	picture = GFX_report_event_german_troops

	fire_only_once = yes

	trigger = {
		OR = {
			tag = GER
			AND = {
				tag = LIT
				is_ai = no
				has_global_flag = LIT_occupies_POL
			}
		}
		has_global_flag = sov_yes_pact
		SOU = { exists = yes }
		NOT =  { has_war_with = SOU }
		OR = {
			AND = {
				OR = {
					owns_state = 96
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						owns_state = 96
					}
				}
				OR = {
					owns_state = 95
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						owns_state = 95
					}
				}
				OR = {
					owns_state = 94
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						owns_state = 94
					}
				}
				OR = {
					owns_state = 93
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						owns_state = 93
					}
				}
				OR = {
					owns_state = 91
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						owns_state = 91
					}
				}
				OR = {
					owns_state = 97
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						owns_state = 97
					}
				}
				OR = {
					owns_state = 89
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						owns_state = 89
					}
				}
				OR = {
					owns_state = 784
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						owns_state = 784
					}
				}
			}
			AND = {
				POL = { has_capitulated = yes }
				AND = {
					OR = {
						controls_state = 96
						any_other_country = {
							is_in_faction_with = GER
							GER = {
								is_faction_leader = yes
							}
							controls_state = 96
						}
					}
					OR = {
						controls_state = 95
						any_other_country = {
							is_in_faction_with = GER
							GER = {
								is_faction_leader = yes
							}
							controls_state = 95
						}
					}
					OR = {
						controls_state = 94
						any_other_country = {
							is_in_faction_with = GER
							GER = {
								is_faction_leader = yes
							}
							controls_state = 94
						}
					}
					OR = {
						controls_state = 93
						any_other_country = {
							is_in_faction_with = GER
							GER = {
								is_faction_leader = yes
							}
							controls_state = 93
						}
					}
					OR = {
						controls_state = 91
						any_other_country = {
							is_in_faction_with = GER
							GER = {
								is_faction_leader = yes
							}
							controls_state = 91
						}
					}
					OR = {
						controls_state = 97
						any_other_country = {
							is_in_faction_with = GER
							GER = {
								is_faction_leader = yes
							}
							controls_state = 97
						}
					}
					OR = {
						controls_state = 89
						any_other_country = {
							is_in_faction_with = GER
							GER = {
								is_faction_leader = yes
							}
							controls_state = 89
						}
					}
					OR = {
						controls_state = 784
						any_other_country = {
							is_in_faction_with = GER
							GER = {
								is_faction_leader = yes
							}
							controls_state = 784
						}
					}
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				AND = {
					POL = {
						is_ai = no
						has_civil_war = no
					}
					is_in_faction_with = POL
				}
			}
		}
		name = germany.14.a
		if = { #MR Pact if ally has taken some of Poland
			limit = {
				GER = { is_faction_leader = yes }
				any_allied_country = {
					NOT = { is_subject_of = GER }
					NOT = { tag = SOU }
					OR = {
						controls_state = 96
						controls_state = 95
						controls_state = 94
						controls_state = 93
						controls_state = 91
						controls_state = 97
						controls_state = 89
						controls_state = 784
					}
				}
			}
			random_country = {
				limit = {
					is_in_faction_with = ROOT
					NOT = { is_subject_of = GER }
					NOT = { tag = SOU }
					OR = {
						controls_state = 96
						controls_state = 95
						controls_state = 94
						controls_state = 93
						controls_state = 91
						controls_state = 97
						controls_state = 89
						controls_state = 784
					}
				}
				if = {
					limit = {
						is_subject = yes
					}
					OVERLORD = { country_event = germany.1002 }
				}
				else = {
					country_event = { id = germany.1002 hours = 3 }
				}
			}
		}
		else = { #MR Pact as normal
			MR_pact_transfer_state_effect = yes
			SOU = { country_event = { id = germany.15 hours = 3 } }
		}
	}
	option = {
		name = germany.14.b
		ai_chance = {
			base = 1
			modifier = {
				add = -1
				is_historical_focus_on = yes
				NOT = {
					AND = {
						POL = {
							is_ai = no
							has_civil_war = no
						}
						is_in_faction_with = POL
					}
				}
			}
		}
		SOU = { country_event = germany.16 }
		clr_global_flag = sov_yes_pact
		diplomatic_relation = {
			country = SOV
			relation = non_aggression_pact
			active = no
		}
		SOU = {
			if = {
				limit = {
					NOT = { owns_state = 146 }
				}
				add_state_claim = 146 #KARELIA (FIN)
			}
			#if = { #Removed with AAT (Makes no sense really)
			#	limit = {
			#		NOT = { owns_state = 147 }
			#	}
			#	add_state_claim = 147 #SALLA (FIN)
			#}
			#if = {
			#	limit = {
			#		NOT = { owns_state = 722 }
			#	}
			#	add_state_claim = 722 #PETSAMO (FIN)
			#}
			if = {
				limit = {
					NOT = { owns_state = 13 }
				}
				add_state_claim = 13 #PÄRNU (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 191 }
				}
				add_state_claim = 191 #TARTU (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 811 }
				}
				add_state_claim = 811 #SAAREMAA (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 813 }
				}
				add_state_claim = 813 #VIRUMAA (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 812 }
				}
				add_state_claim = 812 #TALLIN (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 12 }
				}
				add_state_claim = 12 #VIDZEME (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 190 }
				}
				add_state_claim = 190 #KURZEME (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 808 }
				}
				add_state_claim = 808 #RIGA (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 809 }
				}
				add_state_claim = 809 #ZEMGALE (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 810 }
				}
				add_state_claim = 810 #LATGALE (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 11 }
				}
				add_state_claim = 11 #KAUNAS (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 784 }
				}
				add_state_claim = 784 #WILNO (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 189 }
				}
				add_state_claim = 189 #ZEMAITIJA (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 814 }
				}
				add_state_claim = 814 #SUDUVA (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 815 }
				}
				add_state_claim = 815 #AUKSTAITIJA (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 89 }
				}
				add_state_claim = 89 #STANISLAWOW (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 91 }
				}
				add_state_claim = 91 #LWOW (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 93 }
				}
				add_state_claim = 93 #WOLYN (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 94 }
				}
				add_state_claim = 94 #POLESIE (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 95 }
				}
				add_state_claim = 95 #NOWOGRODEK (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 96 }
				}
				add_state_claim = 96 #WILEJKA (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 97 }
				}
				add_state_claim = 97 #BIALYSTOK (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 78 }
				}
				add_state_claim = 78 #BESSARABIA (ROM)
			}
			if = {
				limit = {
					NOT = { owns_state = 80 }
				}
				add_state_claim = 80 #BUCOVINA (ROM)
			}
			if = {
				limit = {
					NOT = { owns_state = 766 }
				}
				add_state_claim = 766 #SOUTHERN BESSARABIA (ROM)
			}
			effect_tooltip = {
				create_wargoal = {
					type = annex_everything
					target = GER
				}
			}
		}
	}
}

#Event for allies signing MR pact
country_event = {
	id = germany.1002
	title = germany.1002.t
	desc = germany.1002.desc
	picture = GFX_report_event_molotov_signing_pact

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			set_country_flag = responded_to_MR_allied_pact
			every_other_country = {
				limit = {
					is_subject_of = ROOT
				}
				set_country_flag = responded_to_MR_allied_pact
			}
		}
	}

	option = { #Agree to honor the pact
		name = germany.14.a
		ai_chance = {
			base = 100 #ai should always say yes if Germany said yes
		}
		effect_tooltip = {
			MR_pact_transfer_state_effect = yes
		}
		hidden_effect = { #Keep going around all of Germany's allies who own parts of Poland until they have all made a decision
			if = {
				limit = {
					any_allied_country = {
						NOT = { is_subject_of = ROOT }
						NOT = { has_country_flag = responded_to_MR_allied_pact }
						OR = {
							controls_state = 96
							controls_state = 95
							controls_state = 94
							controls_state = 93
							controls_state = 91
							controls_state = 97
							controls_state = 89
							controls_state = 784
						}
					}
				}
				random_country = {
					limit = {
						is_in_faction_with = ROOT
						NOT = { is_subject_of = ROOT }
						NOT = { has_country_flag = responded_to_MR_allied_pact }
						OR = {
							controls_state = 96
							controls_state = 95
							controls_state = 94
							controls_state = 93
							controls_state = 91
							controls_state = 97
							controls_state = 89
							controls_state = 784
						}
					}
					if = {
						limit = {
							is_subject = yes
						}
						OVERLORD = { country_event = germany.1002 }
					}
					else = {
						country_event = germany.1002
					}
				}
			}
			else = { #No more allies left to ask, actually do the MR pact
				MR_pact_transfer_faction_state_effect = yes
				SOU = { country_event = germany.15 }
			}
		}
	}
	option = {
		name = germany.1002.b
		ai_chance = {
			base = 0 #AI should never refuse
		}
		every_country = {
			limit = {
				NOT = { tag = ROOT }
				is_in_faction_with = ROOT
			}
			country_event = germany.1003
		}
		SOU = { country_event = germany.16 }
		clr_global_flag = sov_yes_pact
		GER = {
			diplomatic_relation = {
				country = SOV
				relation = non_aggression_pact
				active = no
			}
		}
		SOU = {
			if = {
				limit = {
					NOT = { owns_state = 146 }
				}
				add_state_claim = 146 #KARELIA (FIN)
			}
			#if = { #Removed with AAT (Makes no sense really)
			#	limit = {
			#		NOT = { owns_state = 147 }
			#	}
			#	add_state_claim = 147 #SALLA (FIN)
			#}
			#if = {
			#	limit = {
			#		NOT = { owns_state = 722 }
			#	}
			#	add_state_claim = 722 #PETSAMO (FIN)
			#}
			if = {
				limit = {
					NOT = { owns_state = 13 }
				}
				add_state_claim = 13 #PÄRNU (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 191 }
				}
				add_state_claim = 191 #TARTU (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 811 }
				}
				add_state_claim = 811 #SAAREMAA (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 813 }
				}
				add_state_claim = 813 #VIRUMAA (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 812 }
				}
				add_state_claim = 812 #TALLIN (EST)
			}
			if = {
				limit = {
					NOT = { owns_state = 12 }
				}
				add_state_claim = 12 #VIDZEME (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 190 }
				}
				add_state_claim = 190 #KURZEME (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 808 }
				}
				add_state_claim = 808 #RIGA (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 809 }
				}
				add_state_claim = 809 #ZEMGALE (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 810 }
				}
				add_state_claim = 810 #LATGALE (LAT)
			}
			if = {
				limit = {
					NOT = { owns_state = 11 }
				}
				add_state_claim = 11 #KAUNAS (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 784 }
				}
				add_state_claim = 784 #WILNO (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 189 }
				}
				add_state_claim = 189 #ZEMAITIJA (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 814 }
				}
				add_state_claim = 814 #SUDUVA (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 815 }
				}
				add_state_claim = 815 #AUKSTAITIJA (LIT)
			}
			if = {
				limit = {
					NOT = { owns_state = 89 }
				}
				add_state_claim = 89 #STANISLAWOW (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 91 }
				}
				add_state_claim = 91 #LWOW (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 93 }
				}
				add_state_claim = 93 #WOLYN (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 94 }
				}
				add_state_claim = 94 #POLESIE (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 95 }
				}
				add_state_claim = 95 #NOWOGRODEK (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 96 }
				}
				add_state_claim = 96 #WILEJKA (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 97 }
				}
				add_state_claim = 97 #BIALYSTOK (POL)
			}
			if = {
				limit = {
					NOT = { owns_state = 78 }
				}
				add_state_claim = 78 #BESSARABIA (ROM)
			}
			if = {
				limit = {
					NOT = { owns_state = 80 }
				}
				add_state_claim = 80 #BUCOVINA (ROM)
			}
			if = {
				limit = {
					NOT = { owns_state = 766 }
				}
				add_state_claim = 766 #SOUTHERN BESSARABIA (ROM)
			}
			effect_tooltip = {
				create_wargoal = {
					type = annex_everything
					target = GER
				}
			}
		}
	}
}

#Event telling Germany their ally broke the pact
country_event = {
	id = germany.1003
	title = germany.1003.t
	desc = germany.1003.desc
	picture = GFX_report_event_molotov_signing_pact

	is_triggered_only = yes

	option = {
		name = germany.1003.a
		ai_chance = {
			base = 1
		}
		effect_tooltip = {
			GER = {
				diplomatic_relation = {
					country = SOV
					relation = non_aggression_pact
					active = no
				}
			}
			SOU = {
				if = {
					limit = {
						NOT = { owns_state = 146 }
					}
					add_state_claim = 146 #KARELIA (FIN)
				}
				#if = { #Removed with AAT (Makes no sense really)
				#	limit = {
				#		NOT = { owns_state = 147 }
				#	}
				#	add_state_claim = 147 #SALLA (FIN)
				#}
				#if = {
				#	limit = {
				#		NOT = { owns_state = 722 }
				#	}
				#	add_state_claim = 722 #PETSAMO (FIN)
				#}
				if = {
					limit = {
						NOT = { owns_state = 13 }
					}
					add_state_claim = 13 #PÄRNU (EST)
				}
				if = {
					limit = {
						NOT = { owns_state = 191 }
					}
					add_state_claim = 191 #TARTU (EST)
				}
				if = {
					limit = {
						NOT = { owns_state = 811 }
					}
					add_state_claim = 811 #SAAREMAA (EST)
				}
				if = {
					limit = {
						NOT = { owns_state = 813 }
					}
					add_state_claim = 813 #VIRUMAA (EST)
				}
				if = {
					limit = {
						NOT = { owns_state = 812 }
					}
					add_state_claim = 812 #TALLIN (EST)
				}
				if = {
					limit = {
						NOT = { owns_state = 12 }
					}
					add_state_claim = 12 #VIDZEME (LAT)
				}
				if = {
					limit = {
						NOT = { owns_state = 190 }
					}
					add_state_claim = 190 #KURZEME (LAT)
				}
				if = {
					limit = {
						NOT = { owns_state = 808 }
					}
					add_state_claim = 808 #RIGA (LAT)
				}
				if = {
					limit = {
						NOT = { owns_state = 809 }
					}
					add_state_claim = 809 #ZEMGALE (LAT)
				}
				if = {
					limit = {
						NOT = { owns_state = 810 }
					}
					add_state_claim = 810 #LATGALE (LAT)
				}
				if = {
					limit = {
						NOT = { owns_state = 11 }
					}
					add_state_claim = 11 #KAUNAS (LIT)
				}
				if = {
					limit = {
						NOT = { owns_state = 784 }
					}
					add_state_claim = 784 #WILNO (LIT)
				}
				if = {
					limit = {
						NOT = { owns_state = 189 }
					}
					add_state_claim = 189 #ZEMAITIJA (LIT)
				}
				if = {
					limit = {
						NOT = { owns_state = 814 }
					}
					add_state_claim = 814 #SUDUVA (LIT)
				}
				if = {
					limit = {
						NOT = { owns_state = 815 }
					}
					add_state_claim = 815 #AUKSTAITIJA (LIT)
				}
				if = {
					limit = {
						NOT = { owns_state = 89 }
					}
					add_state_claim = 89 #STANISLAWOW (POL)
				}
				if = {
					limit = {
						NOT = { owns_state = 91 }
					}
					add_state_claim = 91 #LWOW (POL)
				}
				if = {
					limit = {
						NOT = { owns_state = 93 }
					}
					add_state_claim = 93 #WOLYN (POL)
				}
				if = {
					limit = {
						NOT = { owns_state = 94 }
					}
					add_state_claim = 94 #POLESIE (POL)
				}
				if = {
					limit = {
						NOT = { owns_state = 95 }
					}
					add_state_claim = 95 #NOWOGRODEK (POL)
				}
				if = {
					limit = {
						NOT = { owns_state = 96 }
					}
					add_state_claim = 96 #WILEJKA (POL)
				}
				if = {
					limit = {
						NOT = { owns_state = 97 }
					}
					add_state_claim = 97 #BIALYSTOK (POL)
				}
				if = {
					limit = {
						NOT = { owns_state = 78 }
					}
					add_state_claim = 78 #BESSARABIA (ROM)
				}
				if = {
					limit = {
						NOT = { owns_state = 80 }
					}
					add_state_claim = 80 #BUCOVINA (ROM)
				}
				if = {
					limit = {
						NOT = { owns_state = 766 }
					}
					add_state_claim = 766 #SOUTHERN BESSARABIA (ROM)
				}
				effect_tooltip = {
					create_wargoal = {
						type = annex_everything
						target = GER
					}
				}
			}
		}
	}
}

# Germany honors MR Pact (Soviets)
country_event = {
	id = germany.15
	title = germany.15.t
	desc = germany.15.d
	picture = GFX_report_event_soviet_german_soldier_handshake

	is_triggered_only = yes

	option = {
		name = germany.12.a
		if = {
			limit = {
				SOU = {
					controls_state = 93
					controls_state = 94
				}
			}
			hidden_effect = {
				news_event = { hours = 6 id = news.33 }
			}
		}
	}
}

# Germany betrays MR Pact (Soviets)
country_event = {
	id = germany.16
	title = germany.16.t
	desc = germany.16.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = germany.16.a
		hidden_effect = {
			news_event = news.153
		}
		create_wargoal = {
			type = annex_everything
			target = FROM
		}
	}
}

# Second Vienna Award
country_event = {
	id = germany.20
	title = germany.20.t
	desc = germany.20.d
	picture = GFX_report_event_vienna_award_hungary

	fire_only_once = yes

	#is_triggered_only = yes

	immediate = { 
		set_country_flag = GER_second_vienna_award_flag
	}

	trigger = {
		date > 1940.7.15
		#date < 1941.7.15
		original_tag = GER
		GER = {
			has_government = fascism
			has_war_with_major = yes
			is_subject = no
			has_capitulated = no
			#OR = {
			#	AND = { #Either Germany is allied with both countries
			#		is_in_faction_with = ROM
			#		is_in_faction_with = HUN
			#	}
			#	AND = { #Or Germany is allied with Hungary and is more than willing to hand some Romainian territory to its ally
			#		NOT = { is_in_faction_with = ROM }
			#		is_in_faction_with = HUN
			#	}
			#}
		}
		HUN = {
			exists = yes
			is_subject = no
			has_capitulated = no
			is_friend_or_potential_friend_of_GER = yes
			OR = {
				has_government = neutrality
				has_government = fascism
			}
		}
		ROM = {
			exists = yes
			is_subject = no
			has_capitulated = no
			NOT = {
				has_war_with = GER
				has_war_with = HUN
			}
			controls_state = 76
			controls_state = 77
			controls_state = 83
			controls_state = 84
		}
		#BUL = { is_friend_or_potential_friend_of_GER = yes }
	}

	mean_time_to_happen = {
		days = 30
		modifier = {
			factor = 0.1
			GER = {
				is_in_faction_with = ROM
				is_in_faction_with = HUN
			}
		}
	}

	option = { # Give Hungary Northern Transylvania
		name = germany.20.a
		ai_chance = {
			base = 80
		}
		add_named_threat = { threat = 2 name = GER_second_vienna_award_HUN_north }
		HUN = {
			set_country_flag = GER_second_vienna_award_HUN_north
			add_opinion_modifier = { target = GER modifier = GER_second_vienna_award_HUN_north }
		}
		ROM = {
			add_opinion_modifier = { target = GER modifier = GER_second_vienna_award_ROM_north }
			country_event = { 
				id = romania.2 
				hours = 6
			}
		}
	}
	option = { # Give Hungary all of Transylvania
		trigger = {
			ROM = {
				controls_state = 77
				controls_state = 83
				controls_state = 84
			}
		}
		name = germany.20.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_named_threat = { threat = 3 name = GER_second_vienna_award_HUN_all }
		HUN = {
			set_country_flag = GER_second_vienna_award_HUN_all
			add_opinion_modifier = { target = GER modifier = GER_second_vienna_award_HUN_all }
		}
		ROM = {
			add_opinion_modifier = { target = GER modifier = GER_second_vienna_award_ROM_all }
			country_event = { 
				id = romania.3 
				hours = 6
			}
		}
	}
	option = { # Give Hungary nothing
		name = germany.20.c
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		ROM = {
			country_event = { 
				id = romania.4 
				hours = 6
			}
		}
		HUN = {
			set_country_flag = GER_second_vienna_award_noland
			add_opinion_modifier = { target = GER modifier = GER_second_vienna_award_noland }
			country_event = { 
				id = hungary.1 
				hours = 6
			}
		}
	}
}

# Romania Rejects Decision!
country_event = {
	id = germany.21
	title = germany.21.t
	desc = germany.21.d
	picture = GFX_report_event_vienna_award_hungary

	is_triggered_only = yes

	option = {
		name = germany.21.a

		create_wargoal = {
			type = take_state_focus
			target = ROM
			generator = { 76 }
		}

	}
}

# Claim Memel - Lithuania Folds
country_event = {
	id = germany.22
	title = germany.22.t
	desc = germany.22.d
	picture = GFX_report_event_vienna_award_hungary

	is_triggered_only = yes

	option = {
		name = germany.22.a

		GER = {
			transfer_state = 188
			add_state_core = 188
		}

		#hidden_effect = {
		#	every_country = {
		#		limit = {
		#			capital_scope = {
		#				is_on_continent = europe
		#			}
		#		}
		#		news_event = { 
		#			id = news.19 
		#			days = 1 
		#		}	
		#	}
		#}
		
	}
}

# Claim Memel - Lithuania Rejects Demand
country_event = {
	id = germany.23
	title = germany.23.t
	desc = germany.23.d
	picture = GFX_report_event_lithuania_army

	is_triggered_only = yes

	option = {
		name = germany.23.a

		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 188 }
		}

		hidden_effect = {
			# Hitler has faced resistance and showed weakness once now
			add_to_variable = { 
				GER_hitlers_blunders_variable = 1
			}
		}
		
	}
}

# Japan Demands Withdrawal of Falkenhausen
country_event = {
	id = germany.24
	title = germany.24.t
	desc = germany.24.d
	picture = [GetHitlerChinaEventPicture]

	is_triggered_only = yes

	option = { # Agree
		name = germany.24.a
		trigger = {
			NOT = { has_country_flag = GER_von_falkenhausen_promise_to_china }
		}
		JAP = {
			country_event = { days = 1 id = japan.8 }
		}
		CHI = {
			country_event = { days = 1 id = china.2 }
			effect_tooltip = {
				remove_ideas = german_advisors
				show_ideas_tooltip = german_advisors
			}
		}
	}
	option = { # Refuse
		name = germany.24.b
		trigger = {
			NOT = { has_country_flag = GER_von_falkenhausen_promise_to_china }
		}
		JAP = {
			country_event = { days = 1 id = japan.9 }
		}
	}

	option = { # Refuse, promised the Chinese in return for Tsingtao
		name = germany.24.c
		trigger = {
			has_country_flag = GER_von_falkenhausen_promise_to_china
		}
		JAP = {
			country_event = { days = 1 id = japan.9 }
		}
	}
}

# German - Chinese Relations Poor, Mission Recalled
country_event = {
	id = germany.25
	title = germany.25.t
	desc = germany.25.d
	picture = GFX_report_event_chinese_army_training

	fire_only_once = yes

	trigger = {
		tag = GER
		CHI = { has_idea = german_advisors }
		has_opinion = { target = CHI value < -20 }
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		CHI = { remove_ideas = german_advisors }
	}

	option = {
		name = germany.25.a
		CHI = {
			country_event = { id = china.3 }
		}
	}
}

# Germany at war with China, Advisors Detained
country_event = {
	id = germany.26
	title = germany.26.t
	desc = germany.26.d
	picture = GFX_report_event_german_detained_china

	fire_only_once = yes

	trigger = {
		tag = GER
		CHI = { has_idea = german_advisors }
		has_war_with = CHI
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		CHI = { remove_ideas = german_advisors }
	}

	option = {
		name = germany.26.a
		CHI = {
			country_event = { id = china.4 }
		}
	}
}

#MM: UNUSED AFTER WW
# Fortifying the Westwall
country_event = {
	id = germany.27
	title = germany.27.t
	desc = germany.27.d
	picture = GFX_report_event_bunker_01

	is_triggered_only = yes

	option = {
		name = germany.27.a
		978 = {
			add_building_construction = {
				type = bunker
				province = 11640
				level = 5
			}
			add_building_construction = {
				type = bunker
				province = 6712
				level = 5
			}
			add_building_construction = {
				type = bunker
				province = 6542
				level = 5
			}
			add_building_construction = {
				type = bunker
				province = 3530
				level = 5
			}
		}
		42 = {
			add_building_construction = {
				type = bunker
				province = 3558
				level = 5
			}
			add_building_construction = {
				type = bunker
				province = 563
				level = 5
			}
			add_building_construction = {
				type = bunker
				province = 11531
				level = 5
			}
			add_building_construction = {
				type = bunker
				province = 9575
				level = 5
			}
		}
	}
}

# Austria asked about Anschluss
country_event = {
	id = germany.28
	title = germany.28.t
	desc = germany.28.d
	picture = GFX_report_event_soldiers_parade

	is_triggered_only = yes

	option = { # Accept
		name = germany.28.a
		ai_chance = {
			base = 30
			modifier = {
				add = -25
				GER = { has_army_size = { size < 40 } }
			}
			modifier = {
				add = 100
				GER = { has_army_size = { size > 39 } }
			}
			modifier = {
				add = 20
				is_in_faction_with = GER
			}
			modifier = {
				factor = 0.5
				FROM = {
					has_war = yes
					surrender_progress > 0.1
				}
			}
			modifier = { 
				factor = 0
				fighting_army_strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}

			modifier = {
				factor = 0.5
				OR = {
					has_country_flag = AUS_AI_RANDOM_ANTI_ANSCLUSS_STRESS
					has_game_rule = {
						rule = AUS_AI_BEHAVIOR
						option = AUS_ANTI_ANSCLUSS_STRESS
					}
				}
			}
		}

		GER = {
			country_event = { 
				hours = 2 
				id = germany.4 
			}
		}

		custom_effect_tooltip = GAME_OVER_TT

		AUS = {
			clr_country_flag = AUS_antischluss_active_flag
		}

		hidden_effect = {
			IF = {
				limit = {
					ITA = {
						OR = {
							has_completed_focus = ITA_guarantee_austrian_independence
							has_guaranteed = AUS
						}
					}
				}

				ITA = {
					country_event = {
						id = AUS_political_events.107
						hours = 12
					}
				}
			}
		}
	}

	option = { # Refuse
		name = germany.28.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				NOT = { HUN = { has_completed_focus = HUN_protect_austria } }
				NOT = { ITA = { has_completed_focus = ITA_guarantee_austrian_independence } }
				NOT = {
					strength_ratio = {
						tag = GER
						ratio > 10
					}
				}
				NOT = {
					has_country_flag = AUS_AI_RANDOM_ANTI_ANSCLUSS_STRESS
					has_game_rule = {
						rule = AUS_AI_BEHAVIOR
						option = AUS_ANTI_ANSCLUSS_STRESS
					}
				}
			}
			modifier = {
				GER = { has_army_size = { size > 39 } }
				factor = 0.5
			}
			modifier = {
				add = 20
				GER = { has_army_size = { size < 30 } }
			}
			modifier = {
				add = 100
				HUN = {
					OR = {
						has_completed_focus = HUN_protect_austria
						is_in_faction_with = AUS
					}
				}
			}
			modifier = {
				add = 100
				ITA = {
					OR = {
						has_completed_focus = ITA_guarantee_austrian_independence
						is_in_faction_with = AUS
					}
				}
			}
			modifier = {
				factor = 2
				is_in_faction = yes
				NOT = { is_in_faction_with = GER }
			}
			modifier = {
				any_other_country = {
					has_guaranteed = AUS
				}
				factor = 5 #i've got friends
			}
			modifier = {
				any_other_country = {
					is_major = yes
					has_guaranteed = AUS
				}
				factor = 5 #i've got big friends
			}
			modifier = {
				strength_ratio = {
					tag = GER
					ratio > 3
				}
				factor = 10 # I am much stronger than them
			}

			modifier = {
				factor = 2
				OR = {
					has_country_flag = AUS_AI_RANDOM_ANTI_ANSCLUSS_STRESS
					has_game_rule = {
						rule = AUS_AI_BEHAVIOR
						option = AUS_ANTI_ANSCLUSS_STRESS
					}
				}
			}
		}

		AUS_arthur_seyss-inquart = {
			remove_advisor_role = {
				slot = political_advisor 
			}
		}

		AUS = {
			clr_country_flag = AUS_antischluss_active_flag
		}

		IF = {
			limit = {
				ITA = {
					OR = {
						has_completed_focus = ITA_guarantee_austrian_independence
						has_guaranteed = AUS
					}
					
				}
			}
			ITA = { #Italy gets an event to ask the UK and France to guarantee Austria too
				country_event = { id = BBA_italy_interaction_events.24 hours = 1 }
			}
		}
		ELSE = {
			GER = {
				add_opinion_modifier = { target = ROOT modifier = GER_anschluss_rejected }
				country_event = { days = 1 id = germany.29 }
				if = { limit = { is_in_faction_with = AUS }
					remove_from_faction = AUS
				}
			}
		}
	}
}

# Austria refuses Anschluss
country_event = {
	id = germany.29
	title = germany.29.t
	desc = germany.29.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = germany.29.a

		add_war_support = 0.05

		custom_effect_tooltip = generic_skip_one_line_tt

		add_state_claim = 4
		add_state_claim = 152
		add_state_claim = 153
		add_state_claim = 848
		add_state_claim = 975
		add_state_claim = 976
		
		custom_effect_tooltip = generic_skip_one_line_tt

		create_wargoal = {
			type = take_state_focus
			target = AUS
			generator = { 4 152 153 848 975 976 }
		}

		hidden_effect = {
			# Hitler has faced resistance once now
			add_to_variable = { 
				GER_hitlers_blunders_variable = 1
			}

			set_country_flag = GER_anscluss_rejected
		}

	}
}

### Munich Conference

# Britain / HOL - Germany demands sudetenland (Munich Conference) - Event for ENG (historical) or HOL (if they form EU and CZE is part of it)
country_event = {
	id = germany.40
	title = germany.40.t
	desc = {
		text = germany.40.d
		trigger = { NOT = { has_war_with = GER } }
	}
	desc = {
		text = germany.40.d_2
		trigger = { has_war_with = GER }
	}
	desc = {
		text = germany.40.d_3
		trigger = {
			NOT = { has_war_with = GER }
			tag = HOL
		}
	}
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	option = { # Abandon the Czechs
		name = germany.40.a

		trigger = {
			NOT = { has_war_with = GER }
			is_subject = no # can't do anything if puppet
		}
		
		ai_chance = {
			base = 90
			modifier = {
				factor = 0.3
				has_government = communism
				CZE = { has_government = communism }
			}
			modifier = { #ROOT is less willing to accept the deal if Germany has raised world tension
				factor = 0.9
				FROM = {
					has_added_tension_amount > 0.09
				}
			}
			modifier = { #ROOT is less willing to accept the deal if Germany has raised world tension
				factor = 0.8
				FROM = {
					has_added_tension_amount > 0.14
				}
			}
			modifier = { #ROOT is less willing to accept the deal if Germany has raised world tension
				factor = 0.7
				FROM = {
					has_added_tension_amount > 0.19
				}
			}
			modifier = { #ROOT is less willing to accept the deal if Germany has gone to war already
				factor = 0.5
				has_global_flag = GER_has_started_war
			}
			modifier = { #ROOT is less willing to accept the deal if Germany is losing a war
				factor = 0.5
				FROM = {
					has_war = yes
					surrender_progress > 0.1
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = {
						rule = ENG_ai_behavior
						option = DEMOCRATIC_HISTORICAL
					}
					has_game_rule = {
						rule = ENG_ai_behavior
						option = DEMOCRATIC_ALTERNATE
					}
					has_game_rule = {
						rule = ENG_ai_behavior
						option = FASCIST
					}
					AND = {
						has_global_flag = GER_has_started_war
						NOT = { is_in_faction_with = GER }
					}
					has_war_with = GER # Should be impossible due to option trigger, but just in case
					is_in_faction_with = CZE
					CZE = { is_subject_of = ROOT }
				}
			}
		}

		#Send follow-up event to next country
		if = {
			limit = {
				tag = ENG
			}
			FRA = { 
				country_event = {
					id = germany.41 
					hours = 2
				}
			}
			if = {
				limit = {
					has_completed_focus = ENG_no_further_appeasement
				}
				add_political_power = -200
			}
		}
		else_if = {
			limit = {
				tag = HOL
			}
			ENG = { 
				country_event = {
					id = germany.40
					hours = 2
				}
			}
		}

		#Edit diplomatic relations and opinions
		if = {
			limit = {
				CZE = { is_guaranteed_by = ROOT }
			}
			diplomatic_relation = {
					country = CZE
					relation = guarantee
					active = no
				}
				add_ai_strategy = {
				type = protect
				id = CZE
				value = -100
			}
		}

		if = {
			limit = {
				CZE = { is_in_faction_with = ROOT }
				is_faction_leader = yes
			}
			remove_from_faction = CZE
		}

		CZE = {
			add_opinion_modifier = { target = ROOT modifier = western_betrayal }
		}
	}

	option = { # Support the Czechs
		name = germany.40.b
		
		ai_chance = {
			base = 10
			modifier = {
				factor = 3
				has_government = communism
				CZE = { has_government = communism }
			}
			modifier = {
				factor = 0
				OR = {
					is_in_faction_with = GER
					AND = {
						tag = ENG
						OR = {
							ENG_is_on_historical_plan_trigger = yes
							has_game_rule = {
								rule = ENG_ai_behavior
								option = NEUTRALITY
							}
							has_game_rule = {
								rule = ENG_ai_behavior
								option = COMMUNIST
							}
						}
						NOT = {
							is_in_faction_with = CZE
							has_war_with = GER
						}
					}
				}
			}
		}

		#Handle factions
		if = {
			limit = {
				is_in_faction_with = GER
			}
			if = {
				limit = {
					is_faction_leader = yes
				}
				remove_from_faction = GER
			}
			else_if = {
				limit = {
					GER = { is_faction_leader = yes }
				}
				GER = { remove_from_faction = ROOT }
			}
			else = { #Someone else is the leader - If ROOT is not fascist and faction leader is, expell ROOT. Otherwise expell GER
				if = {
					limit = {
						NOT = { has_government = fascism }
						any_allied_country = {
							is_faction_leader = yes
							has_government = fascism
						}
					}
					random_other_country = {
						limit = {
							is_in_faction_with = ROOT
							is_faction_leader = yes
						}
						remove_from_faction = ROOT
					}
				}
				else = {
					random_other_country = {
						limit = {
							is_in_faction_with = ROOT
							is_faction_leader = yes
						}
						remove_from_faction = GER
					}
				}
			}
		}

		if = {
			limit = {
				is_in_faction = yes
				CZE = {
					is_in_faction = no
					is_subject = no
				}
			}
			random_country = {
				limit = {
					is_faction_leader = yes
					is_in_faction_with = ROOT #this may in fact be ROOT, since countries are in a faction with themselves!
				}
				add_to_faction = CZE
			}
		}

		#Opinions and relations
		add_opinion_modifier = { target = GER modifier = condemn_aggression }

		CZE = {
			add_opinion_modifier = { target = ROOT modifier = offered_support }

			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
		}

		effect_tooltip = {
			GER = {
				create_wargoal = {
					type = take_state_focus
					target = CZE
					generator = { 69 } #Doesn't matter the exact state, CZE is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
				}
			}
		}

		if = {
			limit = {
				tag = ENG
			}
			if = {
				limit = {
					NOT = { has_completed_focus = ENG_no_further_appeasement }
				}
				add_political_power = -200
			}
			if = {
				limit = {
					FRA = {
						NOT = { has_war_with = CZE }
					}
				}
				FRA = { 
					country_event = {
						id = germany.42
						hours = 2
					}
				}
			}
		}
	}
}

# France (Britain Backs Down) - Event for FRA (always From ENG)
country_event = {
	id = germany.41
	title = germany.40.t
	desc = germany.41.d
	picture = GFX_report_event_chamberlain_announce

	is_triggered_only = yes

	option = { # Follow Britain's lead
		name = germany.41.a
		
		ai_chance = {
			base = 90
			modifier = {
				factor = 0.3
				has_government = communism
				CZE = { has_government = communism }
			}
			modifier = {
				factor = 0
				OR = {
					is_in_faction_with = CZE
					has_global_flag = GER_has_started_war
				}
			}
			modifier = { #ROOT is less willing to accept the deal if Germany has raised world tension
				factor = 0.9
				FROM = {
					has_added_tension_amount > 0.09
				}
			}
			modifier = { #ROOT is less willing to accept the deal if Germany has raised world tension
				factor = 0.8
				FROM = {
					has_added_tension_amount > 0.14
				}
			}
			modifier = { #ROOT is less willing to accept the deal if Germany has raised world tension
				factor = 0.7
				FROM = {
					has_added_tension_amount > 0.19
				}
			}
			modifier = { #ROOT is less willing to accept the deal if Germany has gone to war already
				factor = 0.5
				has_global_flag = GER_has_started_war
			}
			modifier = { #ROOT is less willing to accept the deal if Germany is losing a war
				factor = 0.5
				FROM = {
					has_war = yes
					surrender_progress > 0.1
				}
			}
		}

		# Notify CZE and they hate us (with good reason)
		CZE = {
			country_event = {
				id = germany.46
				hours = 2
			} 
			add_opinion_modifier = { target = ROOT modifier = western_betrayal }
		}

		# Deal with factions
		if = {
			limit = {
				is_in_faction_with = CZE
			}
			if = {
				limit = {
					is_faction_leader = no
				}
				random_other_country = {
					limit = {
						is_in_faction_with = ROOT
						is_faction_leader = yes
					}
					remove_from_faction = ROOT
				}
			}
			else_if = {
				limit = {
					NOT = {
						any_other_country = { #check if CZE and FRA are the only countries in this faction
							NOT = { original_tag = CZE }
							is_in_faction_with = ROOT
						}
					}
				}
				dismantle_faction = yes
			}
		}
		
		#Deal with relations
		if = {
			limit = {
				CZE = { is_guaranteed_by = ROOT }
			}
			diplomatic_relation = {
				country = CZE
				relation = guarantee
				active = no
			}
			add_ai_strategy = {
				type = protect
				id = CZE
				value = -100
			}
		}
		#Some fallout to YUG
		if = {
			limit = {
				YUG = { is_guaranteed_by = ROOT }
			}
			diplomatic_relation = {
				country = YUG
				relation = guarantee
				active = no
			}
			add_ai_strategy = {
				type = protect
				id = YUG
				value = -100
			}
			YUG = {
				add_opinion_modifier = { target = FRA modifier = western_betrayal }
			}
		}
	}

	option = { # Support the Czechs alone
		name = germany.41.b

		trigger = {
			is_subject = no
		}

		ai_chance = {
			base = 5
			modifier = {
				factor = 6
				has_government = communism
				CZE = { has_government = communism }
			}
			modifier = {
				factor = 0
				OR = {
					is_in_faction_with = GER
					AND = {
						is_historical_focus_on = yes
						NOT = {	is_in_faction_with = CZE }
					}
				}
			}
		}

		#PP and notify CZE (they are happy with us)
		if = {
			limit = {
				is_in_faction_with = CZE
				has_completed_focus = FRA_strengthen_the_little_entente
			}
			add_political_power = -100
		}
		else = {
			add_political_power = -200
		}

		CZE = {
			country_event = {
				id = germany.45
				hours = 2
			}
			add_opinion_modifier = { target = ROOT modifier = offered_support }
		}

		add_opinion_modifier = { target = GER modifier = condemn_aggression }
		
		GER = {
			country_event = {
				id = germany.48
				hours = 2
			}
			effect_tooltip = {
				create_wargoal = {
					type = take_state_focus
					target = CZE
					generator = { 69 } #Doesn't matter the exact state, CZE is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
				}
			}
		}

		#Deal with faction relations FRA-ENG / FRA-GER / FRA-CZE
		if = {
			limit = {
				is_in_faction_with = ENG
			}
			ENG = {
				country_event = {
					id = germany.43
					hours = 2
				}
				if = {
					limit = {
						is_faction_leader = yes
					}
					remove_from_faction = ROOT
					else_if = {
						limit = {
							ROOT = { is_faction_leader = yes }
						}
						ROOT = { remove_from_faction = ENG }
					}
					else = { #Another country is faction leader -> Kick FRA tack
						random_other_country = {
							limit = {
								is_in_faction_with = ROOT
								is_faction_leader = yes
							}
							remove_from_faction = ROOT
						}
					}
				}
			}
		}
		else_if = {
			limit = {
				is_in_faction_with = GER
			}
			if = {
				limit = { GER = { is_faction_leader = yes } }
				GER = {
					if = {
						limit = {
							is_faction_leader = yes
						}
						remove_from_faction = ROOT
						else_if = {
							limit = {
								ROOT = { is_faction_leader = yes }
							}
							ROOT = { remove_from_faction = GER }
						}
						else = { #Another country is faction leader -> Kick FRA tack
							random_other_country = {
								limit = {
									is_in_faction_with = ROOT
									is_faction_leader = yes
								}
								remove_from_faction = ROOT
							}
						}
					}
				}
			}
		}
		
		if = {
			limit = {
				is_in_faction = yes
				is_faction_leader = yes
				CZE = { is_in_faction = no }
			}
			add_to_faction = CZE
			CZE = {
				add_ai_strategy = {
					type = alliance
					id = ROOT
					value = 200
				}
			}
		}
		else_if = {
			limit = {
				is_in_faction = no
			}
			if = {
				limit = {
					CZE = { is_in_faction = no }
				}
				create_faction_from_template = {
					template = faction_template_the_little_entente
					name = french_alliance
				}
				set_rule = { can_create_factions = yes }
				add_to_faction = CZE
				CZE = {
					add_ai_strategy = {
						type = alliance
						id = ROOT
						value = 200
					}
				}
			}
			else_if = {
				limit = {
					CZE = {
						is_faction_leader = yes
						has_completed_focus = CZE_an_entente_of_our_own
					}
				}
				CZE = { add_to_faction = ROOT }
				add_ai_strategy = {
					type = alliance
					id = CZE
					value = 200
				}
			}
		}
		
		if = {
			limit = { NOT = { has_completed_focus = FRA_strengthen_the_little_entente } }
			add_stability = 0.05
		}
	}
}

# France (Britain Supports the Czechs) - Event for FRA (always from ENG)
country_event = {
	id = germany.42
	title = germany.40.t
	desc = germany.42.d
	picture = GFX_report_event_czech_soldiers_01

	is_triggered_only = yes

	#Support
	option = {
		name = germany.42.a

		trigger = {
			is_subject = no
		}

		ai_chance = {
			base = 90
			modifier = {
				factor = 0
				is_in_faction_with = GER
			}
		}

		if = { # If on an independent faction, give guarantees
			limit = {
				is_in_faction = yes
				NOT = { is_in_faction_with = ENG }
				NOT = { is_in_faction_with = CZE }
				NOT = { has_guaranteed = CZE }
			}
			give_guarantee = CZE
		}
		else_if = { #If no faction, join some friends
			limit = {
				is_in_faction = no
				ENG = { is_faction_leader = yes }
			}
			ENG = { add_to_faction = ROOT }
			add_ai_strategy = {
				type = alliance
				id = ENG
				value = 200
			}
		}
		else_if = { #If Little Entente already formed, just pull ENG and puppets to it, no questions asked (so rude)
			limit = {
				is_in_faction_with = CZE
				is_faction_leader = yes
				has_completed_focus = FRA_strengthen_the_little_entente
				NOT = { is_in_faction_with = ENG }
			}
			add_to_faction = ENG #Britain joins the little entente
			every_other_country = {
				limit = { is_subject_of = ENG }
				ROOT = { add_to_faction = PREV }
			}
		}

		add_opinion_modifier = { target = GER modifier = condemn_aggression }
		CZE = {
			country_event = {
				id = germany.44
				hours = 2
			}
			add_opinion_modifier = { target = ROOT modifier = offered_support }
		}

		GER = {
			country_event = {
				id = germany.47
				hours = 2
			}
			effect_tooltip = {
				create_wargoal = {
					type = take_state_focus
					target = CZE
					generator = { 69 } #Doesn't matter the exact state, CZE is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
				}
			}
		}
	}

	#Abandon
	option = {
		name = germany.42.b

		trigger = {
			NOT = { is_in_faction_with = ENG }
			NOT = { is_in_faction_with = CZE }
		}

		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_global_flag = GER_has_started_war
				NOT = { is_in_faction_with = GER } #FRA doesn't care if in faction
			}
		}

		#Relations CZE-FRA
		if = {
			limit = {
				CZE = { is_guaranteed_by = ROOT }
			}
			diplomatic_relation = {
				country = CZE
				relation = guarantee
				active = no
			}
			add_ai_strategy = {
				type = protect
				id = CZE
				value = -100
			}
		}

		# Fallout YUG-FRA
		if = {
			limit = {
				YUG = { is_guaranteed_by = ROOT }
			}
			diplomatic_relation = {
				country = YUG
				relation = guarantee
				active = no
			}
			add_ai_strategy = {
				type = protect
				id = YUG
				value = -100
			}

			YUG = {
				add_opinion_modifier = { target = ROOT modifier = western_betrayal }
			}
		}

		CZE = {
			country_event = {
				id = germany.44
				hours = 2
			}
			add_opinion_modifier = { target = ROOT modifier = western_betrayal }
		}

		GER = {
			country_event = {
				id = germany.47
				hours = 2
			}
			effect_tooltip = {
				create_wargoal = {
					type = take_state_focus
					target = CZE
					generator = { 69 } #Doesn't matter the exact state, CZE is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
				}
			}
		}
	}
}

# France leaves the Allies - Event for ENG (from FRA)
country_event = {
	id = germany.43
	title = germany.43.t
	desc = germany.43.d
	picture = GFX_report_event_french_british_officers

	is_triggered_only = yes

	option = {
		name = germany.43.a

		FROM = {
			add_opinion_modifier = { target = ROOT modifier = abandoned_czechs }
		}

	}
}

# Czechoslovakia (British and (possibly) French Support) - Event for CZE (always from FRA)
country_event = {
	id = germany.44
	title = germany.40.t
	desc = germany.44.d
	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.44.a

		effect_tooltip = {
			GER = {
				create_wargoal = {
					type = take_state_focus
					target = ROOT
					generator = { 69 } #Doesn't matter the exact state, CZE is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
				}
			}
		}

	}
}

# Czechoslovakia (French Support only) - Event for CZE (from FRA)
country_event = {
	id = germany.45
	title = germany.40.t
	desc = germany.45.d
	picture = GFX_report_event_chamberlain_announce

	is_triggered_only = yes

	option = {
		name = germany.45.a

		effect_tooltip = {
			GER = {
				create_wargoal = {
					type = take_state_focus
					target = ROOT
					generator = { 69 } #Doesn't matter the exact state, CZE is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
				}
			}
		}

	}
}

# Czechoslovakia (Abandoned) - Event for CZE (from FRA)
country_event = {
	id = germany.46
	title = germany.46.t
	desc = germany.46.d
	picture = GFX_report_event_czech_soldiers_01

	is_triggered_only = yes

	option = { # Surrender the Sudetenland
		name = germany.46.a
		ai_chance = {
			base = 90
			modifier = { # Decrease chance CZE submits if AUS isn't taken first
				factor = 0.5
				AUS = {
					exists = yes
					NOT = { is_subject_of = GER }
				}
			}
			modifier = { # Increase chances if other bordering nations are in Axis
				factor = 2
				any_neighbor_country = {
					NOT = { tag = GER }
					is_in_faction_with = GER
				}
			}
			modifier = {
				factor = 0.3 #if you are in a faction, maybe fight
				is_faction_leader = no
				is_in_faction = yes
			}
			modifier = { # If they stand a chance they will fight
				factor = 0
				strength_ratio = {
					tag = GER
					ratio > 0.75
				}
				NOT = {
					any_neighbor_country = {
						NOT = { tag = GER }
						is_in_faction_with = GER
					}
				}
			}
			modifier = {
				factor = 0 #if you lead a faction, fight
				is_faction_leader = yes
			}
			modifier = {
				factor = 0
				is_subject = yes
				NOT = { is_subject_of = GER } #puppeted CZE wouldn't surrender Sudetenland otherwise
			}
		}

		GER = { 
			country_event = {
				id = germany.50 
				hours = 2
			}
		}
	}

	option = { # Refuse anyway
		name = germany.46.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 50 #a faction of minors that banded together against Germany will fight to the bitter end. High because this can occur on historical with a player in Austria, weight of this will be pick this 2/3 times
				OR = {
					AND = {
						is_in_faction_with = AUS
						AUS = {
							has_completed_focus = AUS_the_danubian_federation
						}
					}
					AND = {
						is_in_faction_with = HUN
						HUN = {
							has_completed_focus = wuw_HUN_a_danubian_federation
						}
					}
				}	
			}
			modifier = {
				factor = 2
				is_in_faction = yes
				num_faction_members > 2
			}
			modifier = {
				factor = 0.5
				strength_ratio = {
					tag = GER
					ratio < 0.5
				}
			}
			modifier = {
				factor = 0.1 #was 0, increased to 0.1 to not completely nullify boost from being in danubian federation
				is_historical_focus_on = yes
			}
		}

		GER = {
			add_opinion_modifier = { target = ROOT modifier = GER_demand_sudetenland_rejected }
			set_global_flag = CZE_refused_sudetenland
			country_event = {
				id = germany.49
				hours = 2
			}
			effect_tooltip = {
				if = {
					limit = {
						ROOT = {
							is_in_faction_with = GER
						}
					}
					GER = { remove_from_faction = ROOT }
				}
				create_wargoal = {
					type = take_state_focus
					target = CZE
					generator = { 69 } #Doesn't matter the exact state, CZE is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
				}
			}
		}
	}
}

# Germany (British and (possibly) French Support for Czechoslovakia) - Event for GER (from FRA)
country_event = {
	id = germany.47
	title = germany.40.t
	desc = germany.47.d
	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			CZE = {
				GER_set_array_of_sudetenland_targeted_states = yes
			}
		}
	}

	option = {
		name = germany.47.a

		create_wargoal = {
			type = take_state_focus
			target = CZE
			generator = CZE.sudetenland_states_for_wargoal
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.57 }
			# Hitler has faced resistance and showed now
			add_to_variable = { 
				GER_hitlers_blunders_variable = 1
			}
		}
		set_country_flag = allies_support_czechs
	}
}

# Germany (French Support for Czechoslovakia) - Event for GER (from FRA)
country_event = {
	id = germany.48
	title = germany.40.t
	desc = germany.48.d
	picture = GFX_report_event_chamberlain_announce

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			CZE = {
				GER_set_array_of_sudetenland_targeted_states = yes
			}
		}
	}

	option = {
		name = germany.48.a

		create_wargoal = {
			type = take_state_focus
			target = CZE
			generator = CZE.sudetenland_states_for_wargoal
		}

		hidden_effect = {
			country_event = { hours = 6 id = news.58 }
			# Hitler has faced resistance and showed now
			add_to_variable = { 
				GER_hitlers_blunders_variable = 1
			}
		}
	}
}

# Germany (Czechoslovakia Refuses Demands)
country_event = {
	id = germany.49
	title = germany.40.t
	desc = germany.49.d
	picture = GFX_report_event_czech_soldiers_02

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			CZE = {
				GER_set_array_of_sudetenland_targeted_states = yes
			}
		}
	}

	option = {
		name = germany.49.a
		
		create_wargoal = {
			type = take_state_focus
			target = CZE
			generator = CZE.sudetenland_states_for_wargoal
		}

		if = { #This should never happen (the focus won't trigger this event chain if CZE is in faction with GER) - Left here for now
			limit = {
				CZE = {
					is_in_faction_with = GER
				}
			}
			GER = { remove_from_faction = CZE }
		}

		hidden_effect = {
			country_event = { hours = 6 id = news.59 }
			# Hitler has faced resistance and showed now
			add_to_variable = { 
				GER_hitlers_blunders_variable = 1
			}
		}

	}
}

# Germany (Czechoslovakia Surrenders Sudetenland) - Event for GER (from CZE)
country_event = {
	id = germany.50
	title = germany.40.t
	desc = germany.50.d
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	option = {
		name = germany.50.a


		if = {
			limit = {
				FROM = { controls_state = 69 }
			}
			add_state_core = 69
			transfer_state = 69
		}
		if = {
			limit = {
				FROM = { controls_state = 972 }
			}
			add_state_core = 972
			transfer_state = 972
		}
		if = {
			limit = {
				FROM = { controls_state = 74 }
			}
			add_state_core = 74
			transfer_state = 74
		}

		set_country_flag = sudetenland_acquired #Unused flag for now
		add_political_power = 25
		add_stability = 0.05
		add_war_support = 0.1
		play_peace_in_our_time_effect = yes

		USA = {
			set_country_flag = { flag = USA_munich_window days = 60 value = 1 }
		}

		if = {
			limit = {
				88 = {
					is_owned_by = POL
					is_fully_controlled_by = POL
				}
				72 = { is_controlled_by = CZE }
			}
			POL = {
				country_event = { hours = 6 id = germany.52 }
			}
		}

		GER_czechoslovakia_modify_mefo_bills_or_economy_of_conquest = yes
		GER_seize_gold_reserves_in_europe_peacefully = yes

		hidden_effect = {
			country_event = { hours = 6 id = news.56 }
			if = {
				limit = {
					has_dlc = "Death or Dishonor"
					country_exists = YUG
					YUG = { has_war = no }
					ENG = { NOT = { has_war_with = YUG } }
					ENG = { has_government = democratic }
				}
				ENG = {
					country_event = {
						id = DOD_yugoslavia.42
						days = 3
					}
				}
			}
		}
	}
}

# Hungary (First Vienna Award) - Event for HUN (from GER) -> FROM FIRST VIENNA AWARD FOCUS
country_event = {
	id = germany.51
	title = germany.51.t
	desc = germany.51.d
	picture = GFX_report_event_vienna_award_negotiations

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					CZE = { controls_state = 664 }
				}
				CZE = {
					country_event = germany.59
				}
			}
		}
	}

	option = {
		name = germany.51.a
			
		transfer_state = 664
		add_opinion_modifier = { target = GER modifier = GER_first_vienna_award_GER }
		set_country_flag = GER_first_vienna_award_flag
	}
}

# Poland (Zaolzie) - Event for POL (from GER) -> FROM DEMAND SUDETENLAND FOCUS
country_event = {
	id = germany.52
	title = germany.52.t
	desc = germany.52.d
	picture = GFX_report_event_polish_tanks_01

	is_triggered_only = yes

	option = {
		name = germany.52.a

		IF = {
			limit = {
				72 = {
					NOT = {
						is_owned_by = ROOT
					}
				}
			}
			transfer_state = 72
		}
		IF = {
			limit = {
				72 = {
					NOT = {
						is_core_of = ROOT
					}
				}
			}
			add_state_core = 72
		}
		
	}
}

# Czechoslovakia (The Fate of Czechoslovakia) - Event for CZE (From GER)
country_event = {
	id = germany.53
	title = germany.53.t
	desc = germany.53.d
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	option = { # Agree
		name = germany.53.a
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					is_in_faction_with = ENG
					is_in_faction_with = FRA
					is_subject = yes
					GER = {
						AND = {
							has_war_with = ENG
							has_war_with = FRA
						}
					}
					GER = {
						AND = {
							has_war_with = SOV
							OR = {
								has_war_with = ENG
								has_war_with = FRA
							}
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				AUS = { exists = yes }
			}
			modifier = {
				factor = 0.5
				GER = {
					OR = {
						AND = {
							has_war_with = ENG
							NOT = {
								has_war_with = FRA
							}
						}
						AND = {
							has_war_with = FRA
							NOT = {
								has_war_with = ENG
							}
						}
					}
				}
			}
			modifier = { #minors banding together to resist German Annexation should likely resist German annexation
				factor = 0.5
				OR = {
					POL = { #Germany's neighbors are banding together and feeling mighty strong
						has_completed_focus = POL_coerce_czechoslovakia
							OR = {
								is_in_faction_with = CZE
								has_guaranteed = CZE
							}
					}
					AND = {
						is_in_faction_with = AUS
						AUS = {
							has_completed_focus = AUS_the_danubian_federation
						}
					}
					AND = {
						is_in_faction_with = HUN
						HUN = {
							has_completed_focus = wuw_HUN_a_danubian_federation
						}
					}
				}
				
			}
		}
		GER = { country_event = germany.55 }
		if = {
			limit = {
				ENG = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			ENG = {
				add_war_support = 0.1
			}
		}
		if = {
			limit = {
				FRA = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			FRA = {
				add_war_support = 0.1
			}
		}
		if = {
			limit = {
				has_DLC = "Death or Dishonor"
				country_exists = YUG
				YUG = { has_war = no }
			}
			GER = {
				country_event = {
					id = DOD_yugoslavia.32
					hours = 6
				}
			}
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
	option = { # Refuse
		name = germany.53.b
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					AND = {
						NOT = { is_in_faction_with = ENG }
						NOT = { is_in_faction_with = FRA }
						is_subject = no
						NOT = {
							GER = {
								has_war_with = ENG
								has_war_with = FRA
							}
						}
						NOT = {
							GER = {
								has_war_with = SOV
								OR = {
									has_war_with = ENG
									has_war_with = FRA
								}
							}
						}
					}
				}
			}
			modifier = {
				add = 25
				GER = {
					OR = {
						AND = {
							has_war_with = ENG
							NOT = {
								has_war_with = FRA
							}
						}
						AND = {
							has_war_with = FRA
							NOT = {
								has_war_with = ENG
							}
						}
						has_war_with = SOV
					}
				}
			}
			modifier = {
				add = 150 #Germany's neighbors are banding together and feeling mighty strong. This will increase the chance for players to have an impact on the outcome
				OR = {
					POL = { 
						has_completed_focus = POL_coerce_czechoslovakia
						OR = {
							is_in_faction_with = CZE
							has_guaranteed = CZE
						}
					}
					AND = {
						AUS = {
							has_completed_focus = AUS_the_danubian_federation
						}
						is_in_faction_with = AUS
					}
					AND = {
						HUN = {
							has_completed_focus = wuw_HUN_a_danubian_federation
						}
						is_in_faction_with = HUN
					}
				}
			}
		}
		GER = {
			country_event = { id = germany.54 days = 1 }
		}
		if = {
			limit = {
				ENG = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			ENG = {
				add_war_support = 0.1
			}
		}
		if = {
			limit = {
				FRA = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			FRA = {
				add_war_support = 0.1
			}
		}
		every_other_country = {
			limit = {
				is_in_faction_with = CZE
				NOT = {
					original_tag = FRA
					original_tag = ENG
				}
			}
			add_war_support = 0.05
		}
	}
}

# The Czechs Resist
country_event = {
	id = germany.54
	title = germany.54.t
	desc = germany.54.d
	picture = GFX_report_event_czech_soldiers_01

	is_triggered_only = yes

	option = {
		name = germany.54.a
		if = {
			limit = {
				75 = {
					is_owned_and_controlled_by = CZE
				}
			}
			add_state_claim = 75
		}
		if = {
			limit = {
				9 = {
					is_owned_and_controlled_by = CZE
				}
			}
			add_state_claim = 9
		}
		create_wargoal = {
			type = annex_everything
			target = CZE
		}
	}
}

# The Fate of Czechoslovakia
country_event = {
	id = germany.55
	title = germany.53.t
	desc = {
		text = germany.55.d
		trigger = { has_global_flag = end_of_czechoslovakia }
	}
	desc = {
		text = germany.55.d_2
		trigger = { NOT = { has_global_flag = end_of_czechoslovakia } }
	}
	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.55.a
		trigger = {
			any_state = {
				or = {
					state = 70
					state = 71
					state = 73
					state = 664
				}
				is_controlled_by = CZE
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		if = {
			limit = {
				SLO = {
					exists = no
				}
			}
			set_country_flag = GER_slovakia_doesn_not_exist
		}
		if = {
			limit = {
				70 = {
					OR = { #check controller instead
						is_controlled_by = CZE
						is_controlled_by = GER
					}
				}
			}
			SLO = { transfer_state = 70 }
		}
		else_if = { #Don't transfer ownership of the state if it's controlled by an ally
			limit = {
				70 = {
					is_controlled_by_ROOT_or_ally = no
				}
			}
			#This is purely here to inform the player that SLO will have claims on this state, since it's already a core
			effect_tooltip = {
				SLO = { add_state_claim = 70 }
			}
		}

		if = {
			limit = {
				71 = {
					OR = {
						is_controlled_by = CZE
						is_controlled_by = GER
					}
				}
			}
			SLO = { transfer_state = 71 }
		}
		else_if = { #Don't transfer ownership of the state if it's controlled by an ally
			limit = {
				71 = {
					is_controlled_by_ROOT_or_ally = no
				}
			}
			#This is purely here to inform the player that SLO will have claims on this state, since it's already a core
			effect_tooltip = {
				SLO = { add_state_claim = 71 }
			}
		}

		if = {
			limit = {
				664 = {
					OR = {
						is_controlled_by = CZE
						is_controlled_by = GER
					}
				}
			}
			SLO = { transfer_state = 664 }
		}
		else_if = { #Don't transfer ownership of the state if it's controlled by an ally
			limit = {
				NOT = { has_country_flag = GER_first_vienna_award_flag }
				664 = {
					OR = {
						is_owned_by = CZE
						is_owned_by = GER
					}
				}
				664 = {
					is_controlled_by_ROOT_or_ally = no
				}
			}
			#This is purely here to inform the player that SLO will have claims on this state, since it's already a core
			effect_tooltip = {
				SLO = { add_state_claim = 664 }
			}
		}

		if = {
			limit = {
				country_exists = HUN
				154 = { is_controlled_by = HUN }
				HUN = {
					is_friend_or_potential_friend_of_GER = yes
				}
				73 = {
					NOT = { is_controlled_by = HUN }
					OR = {
						is_controlled_by = CZE
						is_controlled_by = GER
					}
				}
			}
			HUN = { transfer_state = 73 }
		}
		else_if = { #Don't transfer ownership of the state if it's controlled by an ally
			limit = {
				country_exists = HUN
				154 = { is_controlled_by = HUN }
				HUN = {
					is_friend_or_potential_friend_of_GER = yes
				}
				73 = {
					NOT = { is_controlled_by = HUN }
					is_controlled_by_ROOT_or_ally = no
				}
			}
			HUN = { add_state_claim = 73 }
		}
		else_if = {
			limit = {
				OR = {
					NOT = { 154 = { is_controlled_by = HUN } }
					HUN = { is_friend_or_potential_friend_of_GER = no }
				}
				73 = {
					OR = {
						is_controlled_by = CZE
						is_controlled_by = GER
					}
				}
			}
			SLO = { transfer_state = 73 }
		}
		else_if = { #Don't transfer ownership of the state if it's controlled by an ally
			limit = {
				73 = {
					is_controlled_by_ROOT_or_ally = no
				}
			}
			#This is purely here to inform the player that SLO will have claims on this state, since it's already a core
			effect_tooltip = {
				SLO = { add_state_claim = 73 }
			}
		}


		if = {
			limit = { country_exists = CZE }
			SLO = {
				inherit_technology = CZE
			}
			annex_country = { target = CZE }
			add_war_support = 0.1
		}

		if = { #Only puppet Slovakia if they hold land
			limit = {
				has_country_flag = GER_slovakia_doesn_not_exist
				any_state = {
					or = {
						state = 70
						state = 71
						state = 73
						state = 664
					}
					is_controlled_by = SLO
				}
			}
			puppet = SLO
		}

		if = {
			limit = {
				country_exists = POL
				OR = {
					NOT = {	has_wargoal_against = POL }
					NOT = { POL = { has_wargoal_against = ROOT }}
					NOT = { has_war_with = POL }
				}
				72 = {
					OR = {
						is_controlled_by = CZE
						is_controlled_by = GER
					}
				}
			}
			POL = { transfer_state = 72 } # Give Poland Zaolzie
		}
		else_if = { #Don't transfer ownership of the state if it's controlled by an ally
			limit = {
				OR = {
					NOT = {	has_wargoal_against = POL }
					NOT = { POL = { has_wargoal_against = ROOT }}
					NOT = { has_war_with = POL }
				}
				72 = {
					is_controlled_by_ROOT_or_ally = no
				}
			}
			POL = { add_state_claim = 72 }
		}

		CZE = {
			every_core_state = {
				limit = {
					NOT = { is_core_of = SLO }
					is_controlled_by = ROOT
				}
				add_claim_by = GER
				set_compliance = 50
			}
		}

		if = {
			limit = { has_global_flag = GER_HUN_CZE_split }
			HUN = { country_event = DOD_hungary.106 }
		}

		custom_effect_tooltip = end_of_czechoslovakia_mefo_bills_tt		#ct30 1930
		add_to_variable = { var = GER_mefo_bill_counter value = -5 }	#
		GER_mefo_bills_level_down = yes									# using 1.14 

		hidden_effect = {
			country_event = { hours = 6 id = news.60 }
			every_state = {
				limit = {
					is_controlled_by = SLO
				}
				add_core_of = SLO
			}
			SLO = {
				add_manpower = 9876
				if = {
					limit = {
						has_dlc = "No Step Back"
					}
					load_oob = "SLO_1939_nsb"
				}
				else = {
					load_oob = "SLO_1939"
				}
			}
		}
	}
	option = {
		name = germany.55.b
		add_political_power = -20
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		trigger = {
			664 = { is_controlled_by = HUN }
			HUN = {
				is_friend_or_potential_friend_of_GER = yes
			}
			NOT = { has_global_flag = GER_HUN_CZE_split }
			any_state = {
				or = {
					state = 70
					state = 71
					state = 73
				}
				NOT = {
					is_controlled_by = HUN
				}
			}
		}
		HUN = { country_event = germany.56 }
		add_war_support = 0.1
		if = {
			limit = {
				country_exists = POL
			}
			if = {
				limit = {
					OR = {
						NOT = {	has_wargoal_against = POL }
						NOT = { POL = { has_wargoal_against = ROOT }}
						NOT = { has_war_with = POL }
					}
					72 = {
						OR = {
							is_controlled_by = CZE
							is_controlled_by = GER
						}
					}
				}
				POL = { transfer_state = 72 } # Give Poland Zaolzie
			}
			else = {
				POL = { add_state_claim = 72 } 
			}
		}
		custom_effect_tooltip = end_of_czechoslovakia_mefo_bills_tt	# ct30 1930
		add_to_variable = { var = GER_mefo_bill_counter value = -5 }#	
		GER_mefo_bills_level_down = yes								#
	}
	option = {
		name = germany.55.c
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_political_power = -50
		if = {
			limit = { country_exists = CZE }
			annex_country = { target = CZE }
			add_war_support = 0.1
		}
		else_if = { #This is a backup and should never be possible
			limit = {
				any_state = {
					is_core_of = CZE
					NOT = {
						controller = {
							is_ally_with = ROOT
						}
					}
				}
			}
			every_other_country = {
				limit = {
					any_controlled_state = {
						is_core_of = CZE
					}
					NOT = {
						is_ally_with = ROOT
					}
				}
				display_individual_scopes = yes
				every_controlled_state = {
					limit = {
						is_core_of = CZE
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_core_of = ROOT
								is_owned_by = ROOT
							}
						}
					}
					add_to_array = {
						array = PREV.GER_czech_target_states_array
						value = THIS
					}
				}
				ROOT = {
					create_wargoal = {
						type = take_state_focus
						target = PREV
						generator = PREV.GER_czech_target_states_array
					}
				}
			}
		}
		else = { #This is a backup and should never be possible
			every_state = {
				limit = {
					is_core_of = CZE
					NOT = {
						OR = {
							is_claimed_by = ROOT
							is_core_of = ROOT
							is_owned_by = ROOT
						}
					}
				}
				ROOT = {
					add_state_claim = PREV
				}
			}
		}

		CZE = {
			every_core_state = {
				limit = {
					is_controlled_by = ROOT
				}
				add_claim_by = GER
				set_compliance = 50
			}
		}

		if = {
			limit = { has_global_flag = GER_HUN_CZE_split }
			HUN = { country_event = DOD_hungary.106 }
		}
		hidden_effect = {
			country_event = { hours = 6 id = news.62 }
		}

		if = {
			limit = {
				any_state = {
					is_core_of = CZE
					is_fully_controlled_by = ROOT
				}
			}
		custom_effect_tooltip = end_of_czechoslovakia_mefo_bills_tt #ct30 1930
		add_to_variable = { var = GER_mefo_bill_counter value = -5 }#
		GER_mefo_bills_level_down = yes								#
		}
	}

	option = {
		name = germany.55.do
		trigger = {
			has_global_flag = GER_HUN_CZE_split #promised Hungary Slovakia in earlier event
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 10
				is_in_faction_with = HUN
			}
		}
		HUN = { country_event = DOD_hungary.101 }
		add_war_support = 0.1

		custom_effect_tooltip = end_of_czechoslovakia_mefo_bills_tt #ct30 1930
		add_to_variable = { var = GER_mefo_bill_counter value = -5 }#
		GER_mefo_bills_level_down = yes								#
	}
}

# Hungary asked to partition Czechoslovakia
country_event = {
	id = germany.56
	title = germany.56.t
	desc = {
		text = germany.56.d
		trigger = { has_global_flag = end_of_czechoslovakia }
	}
	desc = {
		text = germany.56.d_2
		trigger = { NOT = { has_global_flag = end_of_czechoslovakia } }
	}
	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.56.a
		ai_chance = { factor = 100 }
		every_state = {
			limit = {
				OR = {
					state = 70
					state = 71
					state = 73
				}
				OR = {
					is_fully_controlled_by = FROM
					is_fully_controlled_by = CZE
				}
			}
			transfer_state_to = ROOT
		}
		hidden_effect = {
			GER = {
				annex_country = { target = CZE }
				add_to_faction = HUN
			}
			HUN = {
				add_ai_strategy = {
					type = alliance
					id = "GER"
					value = 200
				}
			}
		}
		hidden_effect = {
			country_event = { hours = 6 id = news.61 }
		}
	}
	option = {
		name = germany.56.b
		ai_chance = { factor = 0 }
		trigger = {
			NOT = { is_subject_of = GER }
		}
		GER = {
			country_event = { hours = 6 id = germany.57 }
		}
	}
}

# Hungary refuses partition!
country_event = {
	id = germany.57
	title = germany.57.t
	desc = germany.57.d
	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.57.a
		add_political_power = -20
		ai_chance = { factor = 60 }
		if = {
			limit = {
				70 = {
					OR = {
						is_owned_by = CZE
						is_owned_by = GER
					}
				}
			}
			SLO = { transfer_state = 70 }
		}
		if = {
			limit = {
				71 = {
					OR = {
						is_owned_by = CZE
						is_owned_by = GER
					}
				}
			}
			SLO = { transfer_state = 71 }
		}
		if = {
			limit = {
				154 = { is_owned_by = HUN }
				73 = {
					OR = {
						is_owned_by = CZE
						is_owned_by = GER
					}
				}
			}
			HUN = { transfer_state = 73 }
		}
		if = {
			limit = {
				NOT = { 154 = { is_owned_by = HUN } }
				73 = {
					OR = {
						is_owned_by = CZE
						is_owned_by = GER
					}
				}
			}
			SLO = { transfer_state = 73 }
		}
		if = {
			limit = {
				664 = {
					OR = {
						is_owned_by = CZE
						is_owned_by = GER
					}
				}
			}
			SLO = { transfer_state = 664 }
		}
		if = {
			limit = { country_exists = CZE }
			annex_country = { target = CZE }
		}
		add_to_faction = SLO
		SLO = {
			add_ai_strategy = {
				type = alliance
				id = "GER"
				value = 200
			}
		}
		if = {
			limit = {
				72 = {
					OR = {
						is_owned_by = CZE
						is_owned_by = GER
					}
				}
			}
			POL = { transfer_state = 72 } # Give Poland Zaolzie
		}
		hidden_effect = {
			country_event = { hours = 6 id = news.60 }
		}
	}
	option = {
		name = germany.57.b
		add_political_power = -40
		ai_chance = { factor = 40 }
		if = {
			limit = { country_exists = CZE }
			annex_country = { target = CZE }
		}
		hidden_effect = {
			country_event = { hours = 6 id = news.62 }
		}
	}
}

# Polish Question Completed
country_event = {
	id = germany.58
	title = germany.58.t
	desc = germany.58.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = germany.58.a
		add_political_power = 150
	}
}


# First Vienna Award - Hungary takes Southern Slovakia from us - Event for CZE (from GER)
country_event = {
	id = germany.59
	title = germany.51.t
	desc = germany.59.desc
	picture = GFX_report_event_vienna_award_negotiations

	is_triggered_only = yes

	option = {
		name = germany.59.a
		
		effect_tooltip = {
			FROM = {
				event_option_tooltip = germany.51.a
			}
		}
	}
}


### Remilitarization of the Rhineland

# French Response
country_event = {
	id = germany.60
	title = germany.60.t
	desc = germany.60.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { # This means war!
		name = germany.60.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 20
				strength_ratio = {
					tag = GER
					ratio > 0.7
				}
				NOT = { has_idea = FRA_disjointed_government }
			}
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				NOT = {
					strength_ratio = { tag = GER ratio > 10 }
				}
			}
			modifier = {
				factor = 10
				strength_ratio = { 
					tag = GER 
					ratio > 10 
				}
			}
		}

		add_political_power = -150
		add_stability = -0.1

		if = {
			limit = {
				ENG = {
					is_subject = no
					NOT = { has_war_with = FRA }
				}
			}
			ENG = {
				country_event = {
					id = germany.61 
					hours = 2
				}
				custom_effect_tooltip = needs_approval
				effect_tooltip = { add_to_faction = FRA }
			}
		}
		if = {
			limit = {
				has_idea = FRA_disjointed_government
				NOT = { has_government = communism }
			}
			custom_effect_tooltip = germany.60.a.tt
			effect_tooltip = {
				start_civil_war = {
					ideology = communism
					size = 0.2
				}
			}
		}
		if = { #you're not getting around that, comrade
			limit = {
				has_idea = FRA_disjointed_government
				has_government = communism
			}
			custom_effect_tooltip = germany.60.a.tt
			effect_tooltip = {
				start_civil_war = {
					ideology = democratic
					size = 0.3
				}
			}
		}
	}

	option = { # Diplomatic response
		name = germany.60.b
		ai_chance = {
			base = 99
			modifier = {
				has_global_flag = GER_has_started_war
				factor = 0
			}
			modifier = {
				factor = 0.5
				strength_ratio = { 
					tag = GER 
					ratio > 10 
				}
			}
		}

		ENG = { 
			country_event = {
				id = germany.62 
				hours = 2
			}	
		}
		add_opinion_modifier = { target = GER modifier = protest_action }

	}
}

# British Response (French Press for War)
country_event = {
	id = germany.61
	title = germany.60.t
	desc = germany.61.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { # War out of the question
		name = germany.61.a
		ai_chance = {
			base = 90
			modifier = {
				has_global_flag = GER_has_started_war
				factor = 0
			}
			modifier = {
				factor = 0
				OR = {
					has_game_rule = {
						rule = ENG_ai_behavior
						option = DEMOCRATIC_ALTERNATE
					}
					has_game_rule = {
						rule = ENG_ai_behavior
						option = FASCIST
					}
				}
			}
		}

		FRA = {
			country_event = { 
				id = germany.63 
				hours = 6 
			}
		}

	}

	option = { # Support France
		name = germany.61.b
		trigger = {
			NOT = { has_completed_focus = ENG_a_change_in_course }
		}
		ai_chance = {
			base = 10
			modifier = {
				factor = 10
				strength_ratio = {
					tag = GER
					ratio > 0.7
				}
			}
			modifier = {
				factor = 0
				has_game_rule = {
					rule = ENG_ai_behavior
					option = NEUTRALITY
				}
			}
		}

		add_political_power = -150
		add_stability = -0.2

		add_popularity = {
			ideology = communism
			popularity = 0.25
		}

		if = {
			limit = {
				FRA = { is_faction_leader = yes }
			}
			every_other_country = {
				limit = { is_in_faction_with = FRA NOT = { has_war_with = ENG } }
				ENG = { add_to_faction = PREV }
				add_ai_strategy = {
					type = alliance
					id = ENG
					value = 200
				}
			}
		}

		if = {
			limit = { FRA = { is_in_faction = no } }
			add_to_faction = FRA
			FRA = {
				add_ai_strategy = {
					type = alliance
					id = ENG
					value = 200
				}
			}
		}

		FRA = {
			country_event = { hours = 6 id = germany.64 }
		}

	}
}

# British Response (French Want Peace)
country_event = {
	id = germany.62
	title = germany.60.t
	desc = germany.62.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = germany.62.a
		trigger = {
			NOT = { has_completed_focus = ENG_a_change_in_course }
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.25 }
		}
		add_opinion_modifier = { target = GER modifier = protest_action }
		GER = {
			add_war_support = 0.1
		}

	}

	option = {
		name = germany.62.b
		trigger = {
			has_completed_focus = ENG_a_change_in_course
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.25 }
		}
	}

}

# France (Britain Refuses Support)
country_event = {
	id = germany.63
	title = germany.63.t
	desc = germany.63.d
	picture = GFX_report_event_chamberlain_announce

	is_triggered_only = yes

	option = { # Push Ahead
		name = germany.63.a
		ai_chance = {
			base = 60
			modifier = {
				factor = 3
				strength_ratio = {
					tag = GER
					ratio > 1.0
				}
				NOT = { has_idea = FRA_disjointed_government }
			}
			modifier = {
				factor = 0.5
				has_idea = FRA_disjointed_government
			}
			modifier = {
				factor = 5
				strength_ratio = {
					tag = GER
					ratio > 10
				}
				NOT = { has_idea = FRA_disjointed_government }
			}
		}

		GER = { 
			country_event = {
				id = germany.66 
				hours = 2
			}
		}

		if = {
			limit = {
				has_idea = FRA_disjointed_government
				NOT = { has_government = communism }
			}
			custom_effect_tooltip = germany.60.a.tt
			effect_tooltip = {
				start_civil_war = {
					ideology = communism
					size = 0.2
				}
			}
		}
		if = {
			limit = {
				has_idea = FRA_disjointed_government
				has_government = communism
			}
			custom_effect_tooltip = germany.60.a.tt
			effect_tooltip = {
				start_civil_war = {
					ideology = democratic
					size = 0.3
				}
			}
		}

	}

	option = { # Back Down
		name = germany.63.b
		ai_chance = { factor = 40 }

		ENG = { 
			country_event = {
				id = germany.67 
				hours = 2
			}	
		}

		add_opinion_modifier = { target = GER modifier = protest_action }

	}

}

# France (Britain Gives Support)
country_event = {
	id = germany.64
	title = germany.64.t
	desc = germany.64.d
	picture = GFX_report_event_british_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.64.a

		GER = { 
			country_event = {
				id = germany.65  
				hours = 2
			}	
		}

		if = {
			limit = {
				has_idea = FRA_disjointed_government
				NOT = { has_government = communism }
			}
			custom_effect_tooltip = germany.60.a.tt
			effect_tooltip = {
				start_civil_war = {
					ideology = communism
					size = 0.2
				}
			}
		}
		if = {
			limit = {
				has_idea = FRA_disjointed_government
				has_government = communism
			}
			custom_effect_tooltip = germany.60.a.tt
			effect_tooltip = {
				start_civil_war = {
					ideology = democratic
					size = 0.3
				}
			}
		}
	}
}

# Germany (France and Britain go to war)
country_event = {
	id = germany.65
	title = germany.65.t
	desc = germany.65.d
	picture = GFX_report_event_british_artillery

	is_triggered_only = yes

	option = {
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				strength_ratio = {
					tag = FRA
					ratio < 1
				}
				strength_ratio = {
					tag = ENG
					ratio < 1
				}
			}
		}

		name = germany.65.a

		FRA = {
			declare_war_on = {
				target = GER
				type = take_state_focus
				generator = { 42 51 978 }
			}
			country_event = {
				id = germany.92
				hours = 2
			}	
			if = {
				limit = {
					has_idea = FRA_disjointed_government
					NOT = { has_government = communism }
				}
				start_civil_war = {
					ideology = communism
					size = 0.2
				}
			}
			if = {
				limit = {
					has_idea = FRA_disjointed_government
					has_government = communism
				}
				start_civil_war = {
					ideology = democratic
					size = 0.3
				}
			}
		}

		hidden_effect = {
			news_event = { 
				hours = 6 
				id = news.26 
			}
		}

	}

	option = {
		name = germany.65.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				strength_ratio = {
					tag = FRA
					ratio > 1
				}
				strength_ratio = {
					tag = ENG
					ratio > 1
				}
			}
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.151 }
		}

		set_country_flag = GER_rhineland_backed_down

		42 = { set_demilitarized_zone = yes }
		51 = { set_demilitarized_zone = yes }
		978 = { set_demilitarized_zone = yes }

		add_timed_idea = {
			idea = rhineland_challenge_met
			days = 183
		}

		hidden_effect = {
			# Hitler has faced resistance and showed weakness once now
			add_to_variable = { 
				GER_hitlers_blunders_variable = 1
			}
		}

	}
}

# Germany (France goes to war)
country_event = {
	id = germany.66
	title = germany.66.t
	desc = germany.66.d
	picture = GFX_report_event_degaulle_inspect_troops

	is_triggered_only = yes

	option = {
		# To war! 
		name = germany.65.a

		add_war_support = 0.1 #original German clay

		ENG = {
			country_event = {
				id = germany.68
				hours = 2
			}	
			if = {
				limit = {
					ENG = {
						is_in_faction_with = FRA
						is_faction_leader = yes
					}
				}
				remove_from_faction = FRA
			}
		}
		FRA = {
			declare_war_on = {
				target = GER
				type = take_state_focus
				generator = { 42 51 }
			}
			country_event = {
				id = germany.92
				hours = 2
			}	
			if = {
				limit = {
					has_idea = FRA_disjointed_government
					NOT = { has_government = communism }
				}
				start_civil_war = {
					ideology = communism
					size = 0.2
				}
			}
			if = {
				limit = {
					has_idea = FRA_disjointed_government
					has_government = communism
				}
				start_civil_war = {
					ideology = democratic
					size = 0.3
				}
			}
		}
		hidden_effect = {
			news_event = { 
				id = news.27 
				hours = 6 
			}
		}
	}

	option = {
		# We must back down!
		name = germany.65.b

		hidden_effect = {
			news_event = { 
				id = news.152 
				hours = 6 
			}
		}

		set_country_flag = GER_rhineland_backed_down

		add_war_support = -0.2 #That was scary for a moment there!

		42 = { set_demilitarized_zone = yes }
		51 = { set_demilitarized_zone = yes }
		978 = { set_demilitarized_zone = yes }

		add_timed_idea = {
			idea = rhineland_challenge_met
			days = 183
		}

		hidden_effect = {
			# Hitler has faced resistance and showed weakness once now
			add_to_variable = { 
				GER_hitlers_blunders_variable = 1
			}
		}

	}
}

# Britain (France Backs Down)
country_event = {
	id = germany.67
	title = germany.67.t
	desc = germany.67.d
	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.67.a

		hidden_effect = {
			news_event = { 
				id = news.25
				hours = 6
			}
		}

		add_opinion_modifier = { target = GER modifier = protest_action }

		GER = {
			add_war_support = 0.1
		}

	}
}

# Britain (France Goes Ahead Anyway)
country_event = {
	id = germany.68
	title = germany.68.t
	desc = germany.68.d
	picture = GFX_report_event_french_liberation

	is_triggered_only = yes

	option = {
		name = germany.68.a
	}
}

### Oster Conspiracy

# Conspiracy Begins!
country_event = {
	id = germany.70
	title = germany.70.t
	desc = germany.70.d
	picture = GFX_report_event_german_reichstag_gathering

	fire_only_once = yes

	trigger = {

		# NEW TRIGGERS 
		check_variable = {
		    var = GER_hitlers_blunders_variable
		    value = 2 # Or should this maybe be three? 
		    compare = greater_than_or_equals
		}

		has_country_leader = { 
			character = GER_adolf_hitler 
			ruling_only = yes 
		}

		original_tag = GER

		# OLD NOW UNUSED TRIGGERS
		#AND = {
		#	CZE = { has_capitulated = no }
		#	country_exists = CZE # Should only trigger if CZE hasn't fallen
		#}
		#has_war_with = CZE
		#has_war_with = FRA
		#has_war_with = ENG
		#has_country_flag = allies_support_czechs
	}

	mean_time_to_happen = {
		days = 150
	}

	option = {
		name = germany.70.a
		ai_chance = {
			base = 100
		}

		add_stability = -0.2

		hidden_effect = {
			if = {
				limit = { NOT = { any_war_score < 39 } }
				random_list = {
					15 = { country_event = { hours = 6 id = germany.71 } } # Conspiracy defeated, but Hitler dead
					80 = { country_event = { hours = 6 id = germany.72 } } # Conspiracy defeated, Hitler survives
					5 = { country_event = { hours = 6 id = germany.73 } } # Conspiracy successful, Civil War
				}
			}
			if = {
				limit = { any_war_score < 39 }
				random_list = {
					33 = { country_event = { hours = 6 id = germany.71 } } # Conspiracy defeated, but Hitler dead
					33 = { country_event = { hours = 6 id = germany.72 } } # Conspiracy defeated, Hitler survives
					33 = { country_event = { hours = 6 id = germany.73 } } # Conspiracy successful, Civil War
				}
			}
		}
	}

	option = {
		name = germany.70.b
		ai_chance = {
			base = 0
		}

		add_stability = -0.3
		add_popularity = {
			ideology = fascism
			popularity = -0.05
		}		

		hidden_effect = {
			random_list = {
				10 = { country_event = { hours = 6 id = germany.71 } } # Conspiracy defeated, but Hitler dead
				90 = { country_event = { hours = 6 id = germany.73 } } # Conspiracy successful, Civil War
			}
		}
	}
}

# Conspiracy defeated, but Hitler is dead
country_event = {
	id = germany.71
	title = germany.71.t
	desc = germany.71.d
	picture = GFX_report_event_europe_funeral

	is_triggered_only = yes

	option = { # Himmler
		name = germany.71.a

		# Himmler becomes the new Fascist leader of Germany
		kill_country_leader = yes

		add_stability = 0.05

		GER_heinrich_himmler = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = nazism
					expire = "1965.1.1.1"
					traits = {}
				}
			}
		}

		#Manage Inner Circle
		hidden_effect = {
			GER_remove_himmler_effects = yes
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.28 }
		}

	}

	option = { # Göring
		name = germany.71.b
		# Göring becomes the new Fascist leader of Germany
		kill_country_leader = yes

		add_stability = 0.1

		GER_hermann_goring = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = nazism
					expire = "1965.1.1.1"
					traits = {}
				}
			}
		}

		#Manage Inner Circle
		hidden_effect = {
			GER_remove_goring_effects = yes
			GER_replace_goring_as_prevailing_industrialist = yes
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.29 }
		}

	}

	option = { # Braun
		name = germany.71.c
		# Braun becomes the new Fascist leader of Germany
		kill_country_leader = yes

		add_stability = 0.1

		GER_eva_braun = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = nazism
					expire = "1965.1.1.1"
					traits = { GER_iron_maiden }
				}
			}
		}

	}

}

# Conspiracy defeated, Hitler survives
country_event = {
	id = germany.72
	title = germany.72.t
	desc = germany.72.d
	picture = GFX_report_event_soldiers_parade

	is_triggered_only = yes

	option = {
		name = germany.72.a

		add_stability = 0.25

		hidden_effect = {
			news_event = { hours = 6 id = news.30 }
		}

	}
}

# Conspiracy successful, Civil War begins
country_event = {
	id = germany.73
	title = germany.73.t
	desc = germany.73.d
	picture = GFX_report_event_german_reichstag_bombed

	is_triggered_only = yes

	option = { # Side with the Rebels
		name = germany.73.a
		trigger = { is_ai = no }

		set_country_flag = german_rebels

		kill_country_leader = yes

		GER_wilhelm_iv = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = despotism
					expire = "1965.1.1.1"
					traits = { }
				}
			}
		}

		if = {
			limit =  {
				OR = {
					any_war_score < 39
					has_stability < 60
				}
			}
			start_civil_war = {
				ruling_party = neutrality
				ideology = fascism
				size = 0.5
				keep_all_characters = yes
				PREV = {	# Original country
					GER_heinrich_himmler = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walter_model = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_hermann_hoth = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walter_kruger = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_paul_hausser = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_sepp_dietrich = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_felix_steiner = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
				}

				PREV.PREV = {
					set_variable = { GER_military_army_org_factor = 0.05 }
					set_variable = { GER_military_planning_speed = 0.25 }
					set_variable = { GER_military_supply_consumption_factor = 0.15 }
					set_variable = { GER_military_equipment_capture = 0 }
					set_variable = { GER_military_initiative_factor = 0 }
					set_variable = { GER_military_army_fuel_consumption_factor = 0 }
					set_variable = { GER_military_coordination_bonus = 0 }
					set_variable = { GER_military_air_superiority_bonus_in_combat = 0 }
					set_variable = { GER_military_max_dig_in_factor = 0 }
					set_variable = { GER_military_army_artillery_defence_factor = 0 }
					set_variable = { GER_military_special_forces_cap = 0 }
					set_variable = { GER_military_acclimatization_hot_climate_gain_factor = 0 }
					set_variable = { GER_military_acclimatization_cold_climate_gain_factor = 0 }
					set_variable = { GER_military_land_doctrine_cost_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_attack_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_defence_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_max_org_factor = 0 }
					set_variable = { GER_military_experience_gain_army_factor = 0 }
					set_variable = { GER_military_army_morale_factor = 0 }
					set_variable = { GER_military_mobilization_speed = 0 }
					set_variable = { GER_military_minimum_training_level = 0 }
					set_variable = { GER_military_unit_leader_as_advisor_cp_cost_factor = 0 }
					set_variable = { GER_military_command_power_gain_mult = 0 }
					add_dynamic_modifier = { modifier = GER_army_modifier }

					set_variable = { GER_military_naval_heavy_gun_hit_chance_factor = 0 }
					set_variable = { GER_military_screening_efficiency = 0 }
					set_variable = { GER_military_screening_without_screens = 0 }
					set_variable = { GER_military_navy_max_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_navy_fascist_modifier }

					set_variable = { GER_military_air_accidents_factor = 0.10 }
					set_variable = { GER_military_air_manpower_requirement_factor = 0.10 }
					set_variable = { GER_military_air_agility_factor = 0 }
					set_variable = { GER_military_air_ace_generation_chance_factor = 0 }
					set_variable = { GER_military_air_nav_efficiency = 0 }
					set_variable = { GER_military_air_cas_efficiency = 0 }
					set_variable = { GER_military_air_strategic_bomber_bombing_factor = 0 }
					set_variable = { GER_military_air_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_airforce_modifier }
				}

				IF = {
					limit = {
						PREV.PREV = {
							NOT = {
								has_country_leader = {
									ruling_only = yes
									character = GER_heinrich_himmler
								}
							}
							has_civil_war = yes
						}
					}
					PREV.PREV = {
						GER_heinrich_himmler = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = nazism
									expire = "1965.1.1.1"
									traits = {}
								}
							}
						}
					}
				}
			}
		}
		else_if = {
			limit =  {
				NOT = {
					any_war_score < 39
					has_stability < 60
				}
			}
			start_civil_war = {
				ruling_party = neutrality
				ideology = fascism
				size = 0.7
				keep_all_characters = yes
				PREV = {	# Original country
					GER_heinrich_himmler = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walter_model = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_hermann_hoth = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walter_kruger = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_paul_hausser = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_sepp_dietrich = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_felix_steiner = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
				}

				PREV.PREV = {
					set_variable = { GER_military_army_org_factor = 0.05 }
					set_variable = { GER_military_planning_speed = 0.25 }
					set_variable = { GER_military_supply_consumption_factor = 0.15 }
					set_variable = { GER_military_equipment_capture = 0 }
					set_variable = { GER_military_initiative_factor = 0 }
					set_variable = { GER_military_army_fuel_consumption_factor = 0 }
					set_variable = { GER_military_coordination_bonus = 0 }
					set_variable = { GER_military_air_superiority_bonus_in_combat = 0 }
					set_variable = { GER_military_max_dig_in_factor = 0 }
					set_variable = { GER_military_army_artillery_defence_factor = 0 }
					set_variable = { GER_military_special_forces_cap = 0 }
					set_variable = { GER_military_acclimatization_hot_climate_gain_factor = 0 }
					set_variable = { GER_military_acclimatization_cold_climate_gain_factor = 0 }
					set_variable = { GER_military_land_doctrine_cost_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_attack_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_defence_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_max_org_factor = 0 }
					set_variable = { GER_military_experience_gain_army_factor = 0 }
					set_variable = { GER_military_army_morale_factor = 0 }
					set_variable = { GER_military_mobilization_speed = 0 }
					set_variable = { GER_military_minimum_training_level = 0 }
					set_variable = { GER_military_unit_leader_as_advisor_cp_cost_factor = 0 }
					set_variable = { GER_military_command_power_gain_mult = 0 }
					add_dynamic_modifier = { modifier = GER_army_modifier }

					set_variable = { GER_military_naval_heavy_gun_hit_chance_factor = 0 }
					set_variable = { GER_military_screening_efficiency = 0 }
					set_variable = { GER_military_screening_without_screens = 0 }
					set_variable = { GER_military_navy_max_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_navy_fascist_modifier }

					set_variable = { GER_military_air_accidents_factor = 0.10 }
					set_variable = { GER_military_air_manpower_requirement_factor = 0.10 }
					set_variable = { GER_military_air_agility_factor = 0 }
					set_variable = { GER_military_air_ace_generation_chance_factor = 0 }
					set_variable = { GER_military_air_nav_efficiency = 0 }
					set_variable = { GER_military_air_cas_efficiency = 0 }
					set_variable = { GER_military_air_strategic_bomber_bombing_factor = 0 }
					set_variable = { GER_military_air_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_airforce_modifier }
				}

				IF = {
					limit = {
						PREV.PREV = {
							NOT = {
								has_country_leader = {
									ruling_only = yes
									character = GER_heinrich_himmler
								}
							}
							has_civil_war = yes
						}
					}
					PREV.PREV = {
						GER_heinrich_himmler = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = nazism
									expire = "1965.1.1.1"
									traits = {}
								}
							}
						}
					}
				}
			}
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.31 }
		}

	}

	option = { # Side with Himmler
		name = germany.73.b
		# Himmler becomes the new Fascist leader of Germany
		kill_country_leader = yes

		GER_heinrich_himmler = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = nazism
					expire = "1965.1.1.1"
					traits = {}
				}
			}
		}

		#Manage Inner Circle
		hidden_effect = {
			GER_remove_himmler_effects = yes
		}

		if = {
			limit =  {
				OR = {
					any_war_score < 39
					has_stability < 60
				}
			}
			start_civil_war = {
				ideology = neutrality
				size = 0.5
				keep_all_characters = yes

				PREV = {	# Original country
					GER_wilhelm_iv = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_wilhelm_canaris = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_hans_oster = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_ludwig_beck = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_franz_halder = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walther_von_brauchitsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_werner_von_fritsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
				}

				IF = {
					limit = {
						PREV.PREV = {
							NOT = {
								has_country_leader = {
									ruling_only = yes
									character = GER_wilhelm_iv
								}
							}
							has_civil_war = yes
						}
					}
					PREV.PREV = {
						GER_wilhelm_iv = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = despotism
									expire = "1965.1.1.1"
									traits = {}
								}
							}
						}
					}
				}

				PREV.PREV = {
					set_variable = { GER_military_army_org_factor = 0.05 }
					set_variable = { GER_military_planning_speed = 0.25 }
					set_variable = { GER_military_supply_consumption_factor = 0.15 }
					set_variable = { GER_military_equipment_capture = 0 }
					set_variable = { GER_military_initiative_factor = 0 }
					set_variable = { GER_military_army_fuel_consumption_factor = 0 }
					set_variable = { GER_military_coordination_bonus = 0 }
					set_variable = { GER_military_air_superiority_bonus_in_combat = 0 }
					set_variable = { GER_military_max_dig_in_factor = 0 }
					set_variable = { GER_military_army_artillery_defence_factor = 0 }
					set_variable = { GER_military_special_forces_cap = 0 }
					set_variable = { GER_military_acclimatization_hot_climate_gain_factor = 0 }
					set_variable = { GER_military_acclimatization_cold_climate_gain_factor = 0 }
					set_variable = { GER_military_land_doctrine_cost_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_attack_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_defence_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_max_org_factor = 0 }
					set_variable = { GER_military_experience_gain_army_factor = 0 }
					set_variable = { GER_military_army_morale_factor = 0 }
					set_variable = { GER_military_mobilization_speed = 0 }
					set_variable = { GER_military_minimum_training_level = 0 }
					set_variable = { GER_military_unit_leader_as_advisor_cp_cost_factor = 0 }
					set_variable = { GER_military_command_power_gain_mult = 0 }
					add_dynamic_modifier = { modifier = GER_army_modifier }

					set_variable = { GER_military_naval_heavy_gun_hit_chance_factor = 0 }
					set_variable = { GER_military_screening_efficiency = 0 }
					set_variable = { GER_military_screening_without_screens = 0 }
					set_variable = { GER_military_navy_max_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_navy_fascist_modifier }

					set_variable = { GER_military_air_accidents_factor = 0.10 }
					set_variable = { GER_military_air_manpower_requirement_factor = 0.10 }
					set_variable = { GER_military_air_agility_factor = 0 }
					set_variable = { GER_military_air_ace_generation_chance_factor = 0 }
					set_variable = { GER_military_air_nav_efficiency = 0 }
					set_variable = { GER_military_air_cas_efficiency = 0 }
					set_variable = { GER_military_air_strategic_bomber_bombing_factor = 0 }
					set_variable = { GER_military_air_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_airforce_modifier }
				}
			}
		}
		if = {
			limit =  {
				NOT = {
					any_war_score < 39
					has_stability < 60
				}
			}
			start_civil_war = {
				ideology = neutrality
				size = 0.3
				keep_all_characters = yes

				PREV = {	# Original country
					GER_wilhelm_iv = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_wilhelm_canaris = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_hans_oster = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_ludwig_beck = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_franz_halder = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walther_von_brauchitsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_werner_von_fritsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
				}

				IF = {
					limit = {
						PREV.PREV = {
							NOT = {
								has_country_leader = {
									ruling_only = yes
									character = GER_wilhelm_iv
								}
							}
							has_civil_war = yes
						}
					}
					PREV.PREV = {
						GER_wilhelm_iv = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = despotism
									expire = "1965.1.1.1"
									traits = {}
								}
							}
						}
					}
				}

				PREV.PREV = {
					set_variable = { GER_military_army_org_factor = 0.05 }
					set_variable = { GER_military_planning_speed = 0.25 }
					set_variable = { GER_military_supply_consumption_factor = 0.15 }
					set_variable = { GER_military_equipment_capture = 0 }
					set_variable = { GER_military_initiative_factor = 0 }
					set_variable = { GER_military_army_fuel_consumption_factor = 0 }
					set_variable = { GER_military_coordination_bonus = 0 }
					set_variable = { GER_military_air_superiority_bonus_in_combat = 0 }
					set_variable = { GER_military_max_dig_in_factor = 0 }
					set_variable = { GER_military_army_artillery_defence_factor = 0 }
					set_variable = { GER_military_special_forces_cap = 0 }
					set_variable = { GER_military_acclimatization_hot_climate_gain_factor = 0 }
					set_variable = { GER_military_acclimatization_cold_climate_gain_factor = 0 }
					set_variable = { GER_military_land_doctrine_cost_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_attack_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_defence_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_max_org_factor = 0 }
					set_variable = { GER_military_experience_gain_army_factor = 0 }
					set_variable = { GER_military_army_morale_factor = 0 }
					set_variable = { GER_military_mobilization_speed = 0 }
					set_variable = { GER_military_minimum_training_level = 0 }
					set_variable = { GER_military_unit_leader_as_advisor_cp_cost_factor = 0 }
					set_variable = { GER_military_command_power_gain_mult = 0 }
					add_dynamic_modifier = { modifier = GER_army_modifier }

					set_variable = { GER_military_naval_heavy_gun_hit_chance_factor = 0 }
					set_variable = { GER_military_screening_efficiency = 0 }
					set_variable = { GER_military_screening_without_screens = 0 }
					set_variable = { GER_military_navy_max_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_navy_fascist_modifier }

					set_variable = { GER_military_air_accidents_factor = 0.10 }
					set_variable = { GER_military_air_manpower_requirement_factor = 0.10 }
					set_variable = { GER_military_air_agility_factor = 0 }
					set_variable = { GER_military_air_ace_generation_chance_factor = 0 }
					set_variable = { GER_military_air_nav_efficiency = 0 }
					set_variable = { GER_military_air_cas_efficiency = 0 }
					set_variable = { GER_military_air_strategic_bomber_bombing_factor = 0 }
					set_variable = { GER_military_air_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_airforce_modifier }
				}
			}
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.31 }
		}

	}

	option = { # Side with Göring
		name = germany.73.c

		# Göring becomes the new Fascist leader of Germany
		kill_country_leader = yes

		GER_hermann_goring = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = nazism
					expire = "1965.1.1.1"
					traits = {}
				}
			}
		}

		#Manage Inner Circle
		hidden_effect = {
			GER_remove_goring_effects = yes
			GER_replace_goring_as_prevailing_industrialist = yes
		}

		if = {
			limit =  {
				OR = {
					any_war_score < 39
					has_stability < 60
				}
			}
			start_civil_war = {
				ideology = neutrality
				size = 0.5
				keep_all_characters = yes

				PREV = {	# Original country
					GER_wilhelm_iv = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_wilhelm_canaris = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_hans_oster = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_ludwig_beck = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_franz_halder = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walther_von_brauchitsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_werner_von_fritsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
				}

				IF = {
					limit = {
						PREV.PREV = {
							NOT = {
								has_country_leader = {
									ruling_only = yes
									character = GER_wilhelm_iv
								}
							}
							has_civil_war = yes
						}
					}
					PREV.PREV = {
						GER_wilhelm_iv = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = despotism
									expire = "1965.1.1.1"
									traits = {}
								}
							}
						}
					}
				}

				PREV.PREV = {
					set_variable = { GER_military_army_org_factor = 0.05 }
					set_variable = { GER_military_planning_speed = 0.25 }
					set_variable = { GER_military_supply_consumption_factor = 0.15 }
					set_variable = { GER_military_equipment_capture = 0 }
					set_variable = { GER_military_initiative_factor = 0 }
					set_variable = { GER_military_army_fuel_consumption_factor = 0 }
					set_variable = { GER_military_coordination_bonus = 0 }
					set_variable = { GER_military_air_superiority_bonus_in_combat = 0 }
					set_variable = { GER_military_max_dig_in_factor = 0 }
					set_variable = { GER_military_army_artillery_defence_factor = 0 }
					set_variable = { GER_military_special_forces_cap = 0 }
					set_variable = { GER_military_acclimatization_hot_climate_gain_factor = 0 }
					set_variable = { GER_military_acclimatization_cold_climate_gain_factor = 0 }
					set_variable = { GER_military_land_doctrine_cost_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_attack_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_defence_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_max_org_factor = 0 }
					set_variable = { GER_military_experience_gain_army_factor = 0 }
					set_variable = { GER_military_army_morale_factor = 0 }
					set_variable = { GER_military_mobilization_speed = 0 }
					set_variable = { GER_military_minimum_training_level = 0 }
					set_variable = { GER_military_unit_leader_as_advisor_cp_cost_factor = 0 }
					set_variable = { GER_military_command_power_gain_mult = 0 }
					add_dynamic_modifier = { modifier = GER_army_modifier }

					set_variable = { GER_military_naval_heavy_gun_hit_chance_factor = 0 }
					set_variable = { GER_military_screening_efficiency = 0 }
					set_variable = { GER_military_screening_without_screens = 0 }
					set_variable = { GER_military_navy_max_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_navy_fascist_modifier }

					set_variable = { GER_military_air_accidents_factor = 0.10 }
					set_variable = { GER_military_air_manpower_requirement_factor = 0.10 }
					set_variable = { GER_military_air_agility_factor = 0 }
					set_variable = { GER_military_air_ace_generation_chance_factor = 0 }
					set_variable = { GER_military_air_nav_efficiency = 0 }
					set_variable = { GER_military_air_cas_efficiency = 0 }
					set_variable = { GER_military_air_strategic_bomber_bombing_factor = 0 }
					set_variable = { GER_military_air_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_airforce_modifier }
				}
			}
		}
		if = {
			limit =  {
				NOT = {
					any_war_score < 39
					has_stability < 60
				}
			}
			start_civil_war = {
				ideology = neutrality
				size = 0.3
				keep_all_characters = yes

				PREV = {	# Original country
					GER_wilhelm_iv = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_wilhelm_canaris = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_hans_oster = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_ludwig_beck = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_franz_halder = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walther_von_brauchitsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_werner_von_fritsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
				}

				IF = {
					limit = {
						PREV.PREV = {
							NOT = {
								has_country_leader = {
									ruling_only = yes
									character = GER_wilhelm_iv
								}
							}
							has_civil_war = yes
						}
					}
					PREV.PREV = {
						GER_wilhelm_iv = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = despotism
									expire = "1965.1.1.1"
									traits = {}
								}
							}
						}
					}
				}

				PREV.PREV = {
					set_variable = { GER_military_army_org_factor = 0.05 }
					set_variable = { GER_military_planning_speed = 0.25 }
					set_variable = { GER_military_supply_consumption_factor = 0.15 }
					set_variable = { GER_military_equipment_capture = 0 }
					set_variable = { GER_military_initiative_factor = 0 }
					set_variable = { GER_military_army_fuel_consumption_factor = 0 }
					set_variable = { GER_military_coordination_bonus = 0 }
					set_variable = { GER_military_air_superiority_bonus_in_combat = 0 }
					set_variable = { GER_military_max_dig_in_factor = 0 }
					set_variable = { GER_military_army_artillery_defence_factor = 0 }
					set_variable = { GER_military_special_forces_cap = 0 }
					set_variable = { GER_military_acclimatization_hot_climate_gain_factor = 0 }
					set_variable = { GER_military_acclimatization_cold_climate_gain_factor = 0 }
					set_variable = { GER_military_land_doctrine_cost_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_attack_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_defence_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_max_org_factor = 0 }
					set_variable = { GER_military_experience_gain_army_factor = 0 }
					set_variable = { GER_military_army_morale_factor = 0 }
					set_variable = { GER_military_mobilization_speed = 0 }
					set_variable = { GER_military_minimum_training_level = 0 }
					set_variable = { GER_military_unit_leader_as_advisor_cp_cost_factor = 0 }
					set_variable = { GER_military_command_power_gain_mult = 0 }
					add_dynamic_modifier = { modifier = GER_army_modifier }

					set_variable = { GER_military_naval_heavy_gun_hit_chance_factor = 0 }
					set_variable = { GER_military_screening_efficiency = 0 }
					set_variable = { GER_military_screening_without_screens = 0 }
					set_variable = { GER_military_navy_max_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_navy_fascist_modifier }

					set_variable = { GER_military_air_accidents_factor = 0.10 }
					set_variable = { GER_military_air_manpower_requirement_factor = 0.10 }
					set_variable = { GER_military_air_agility_factor = 0 }
					set_variable = { GER_military_air_ace_generation_chance_factor = 0 }
					set_variable = { GER_military_air_nav_efficiency = 0 }
					set_variable = { GER_military_air_cas_efficiency = 0 }
					set_variable = { GER_military_air_strategic_bomber_bombing_factor = 0 }
					set_variable = { GER_military_air_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_airforce_modifier }
				}
			}
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.31 }
		}

	}

	option = { # Side with Braun
		name = germany.73.e

		# Braun becomes the new Fascist leader of Germany
		kill_country_leader = yes

		GER_eva_braun = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = nazism
					expire = "1965.1.1.1"
					traits = { GER_iron_maiden }
				}
			}
		}

		if = {
			limit =  {
				OR = {
					any_war_score < 39
					has_stability < 60
				}
			}
			start_civil_war = {
				ideology = neutrality
				size = 0.5
				keep_all_characters = yes

				PREV = {	# Original country
					GER_wilhelm_iv = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_wilhelm_canaris = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_hans_oster = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_ludwig_beck = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_franz_halder = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walther_von_brauchitsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_werner_von_fritsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
				}

				IF = {
					limit = {
						PREV.PREV = {
							NOT = {
								has_country_leader = {
									ruling_only = yes
									character = GER_wilhelm_iv
								}
							}
							has_civil_war = yes
						}
					}
					PREV.PREV = {
						GER_wilhelm_iv = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = despotism
									expire = "1965.1.1.1"
									traits = {}
								}
							}
						}
					}
				}

				PREV.PREV = {
					set_variable = { GER_military_army_org_factor = 0.05 }
					set_variable = { GER_military_planning_speed = 0.25 }
					set_variable = { GER_military_supply_consumption_factor = 0.15 }
					set_variable = { GER_military_equipment_capture = 0 }
					set_variable = { GER_military_initiative_factor = 0 }
					set_variable = { GER_military_army_fuel_consumption_factor = 0 }
					set_variable = { GER_military_coordination_bonus = 0 }
					set_variable = { GER_military_air_superiority_bonus_in_combat = 0 }
					set_variable = { GER_military_max_dig_in_factor = 0 }
					set_variable = { GER_military_army_artillery_defence_factor = 0 }
					set_variable = { GER_military_special_forces_cap = 0 }
					set_variable = { GER_military_acclimatization_hot_climate_gain_factor = 0 }
					set_variable = { GER_military_acclimatization_cold_climate_gain_factor = 0 }
					set_variable = { GER_military_land_doctrine_cost_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_attack_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_defence_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_max_org_factor = 0 }
					set_variable = { GER_military_experience_gain_army_factor = 0 }
					set_variable = { GER_military_army_morale_factor = 0 }
					set_variable = { GER_military_mobilization_speed = 0 }
					set_variable = { GER_military_minimum_training_level = 0 }
					set_variable = { GER_military_unit_leader_as_advisor_cp_cost_factor = 0 }
					set_variable = { GER_military_command_power_gain_mult = 0 }
					add_dynamic_modifier = { modifier = GER_army_modifier }

					set_variable = { GER_military_naval_heavy_gun_hit_chance_factor = 0 }
					set_variable = { GER_military_screening_efficiency = 0 }
					set_variable = { GER_military_screening_without_screens = 0 }
					set_variable = { GER_military_navy_max_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_navy_fascist_modifier }

					set_variable = { GER_military_air_accidents_factor = 0.10 }
					set_variable = { GER_military_air_manpower_requirement_factor = 0.10 }
					set_variable = { GER_military_air_agility_factor = 0 }
					set_variable = { GER_military_air_ace_generation_chance_factor = 0 }
					set_variable = { GER_military_air_nav_efficiency = 0 }
					set_variable = { GER_military_air_cas_efficiency = 0 }
					set_variable = { GER_military_air_strategic_bomber_bombing_factor = 0 }
					set_variable = { GER_military_air_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_airforce_modifier }
				}
			}
		}
		if = {
			limit =  {
				NOT = {
					any_war_score < 39
					has_stability < 60
				}
			}
			start_civil_war = {
				ideology = neutrality
				size = 0.3
				keep_all_characters = yes

				PREV = {	# Original country
					GER_wilhelm_iv = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_wilhelm_canaris = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_hans_oster = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_ludwig_beck = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_franz_halder = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_walther_von_brauchitsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
					GER_werner_von_fritsch = { # Character
					    set_nationality = PREV.PREV
					    # Transfers to breakaway
					}
				}

				IF = {
					limit = {
						PREV.PREV = {
							NOT = {
								has_country_leader = {
									ruling_only = yes
									character = GER_wilhelm_iv
								}
							}
							has_civil_war = yes
						}
					}
					PREV.PREV = {
						GER_wilhelm_iv = {
							add_country_leader_role = {
								promote_leader = yes
								country_leader = {
									ideology = despotism
									expire = "1965.1.1.1"
									traits = {}
								}
							}
						}
					}
				}

				PREV.PREV = {
					set_variable = { GER_military_army_org_factor = 0.05 }
					set_variable = { GER_military_planning_speed = 0.25 }
					set_variable = { GER_military_supply_consumption_factor = 0.15 }
					set_variable = { GER_military_equipment_capture = 0 }
					set_variable = { GER_military_initiative_factor = 0 }
					set_variable = { GER_military_army_fuel_consumption_factor = 0 }
					set_variable = { GER_military_coordination_bonus = 0 }
					set_variable = { GER_military_air_superiority_bonus_in_combat = 0 }
					set_variable = { GER_military_max_dig_in_factor = 0 }
					set_variable = { GER_military_army_artillery_defence_factor = 0 }
					set_variable = { GER_military_special_forces_cap = 0 }
					set_variable = { GER_military_acclimatization_hot_climate_gain_factor = 0 }
					set_variable = { GER_military_acclimatization_cold_climate_gain_factor = 0 }
					set_variable = { GER_military_land_doctrine_cost_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_attack_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_defence_factor = 0 }
					set_variable = { GER_military_modifier_army_sub_unit_militia_max_org_factor = 0 }
					set_variable = { GER_military_experience_gain_army_factor = 0 }
					set_variable = { GER_military_army_morale_factor = 0 }
					set_variable = { GER_military_mobilization_speed = 0 }
					set_variable = { GER_military_minimum_training_level = 0 }
					set_variable = { GER_military_unit_leader_as_advisor_cp_cost_factor = 0 }
					set_variable = { GER_military_command_power_gain_mult = 0 }
					add_dynamic_modifier = { modifier = GER_army_modifier }

					set_variable = { GER_military_naval_heavy_gun_hit_chance_factor = 0 }
					set_variable = { GER_military_screening_efficiency = 0 }
					set_variable = { GER_military_screening_without_screens = 0 }
					set_variable = { GER_military_navy_max_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_navy_fascist_modifier }

					set_variable = { GER_military_air_accidents_factor = 0.10 }
					set_variable = { GER_military_air_manpower_requirement_factor = 0.10 }
					set_variable = { GER_military_air_agility_factor = 0 }
					set_variable = { GER_military_air_ace_generation_chance_factor = 0 }
					set_variable = { GER_military_air_nav_efficiency = 0 }
					set_variable = { GER_military_air_cas_efficiency = 0 }
					set_variable = { GER_military_air_strategic_bomber_bombing_factor = 0 }
					set_variable = { GER_military_air_range_factor = 0 }
					add_dynamic_modifier = { modifier = GER_airforce_modifier }
				}
			}
		}

		hidden_effect = {
			news_event = { hours = 6 id = news.31 }
		}

	}

}

# Anschluss Preparations
country_event = {
	id = germany.74
	title = germany.74.t
	desc = germany.74.d
	picture = GFX_report_event_fascist_speech

	is_triggered_only = yes

	option = {
		name = germany.74.a
		#add_ideas = elyesa_bazna
	}
}

# German-Soviet Treaty (Soviets)
country_event = {
	id = germany.75
	title = germany.75.t
	desc = germany.75.d
	picture = GFX_report_event_physics_lab_01

	is_triggered_only = yes

	option = {
		name = germany.75.a	#sounds good
		GER = {
			country_event = { days = 1 id = germany.76 }
			add_opinion_modifier = {
				target = ROOT
				modifier = sov_ger_treaty
			}
			add_opinion_modifier = {
				target = ROOT
				modifier = sov_ger_treaty_trade
			}
			effect_tooltip = {
				add_breakthrough_progress = {
					specialization = specialization_land
					value = 1
				}
			}
		}
		# REVISIT Balance research bonus
		give_SOV_armor_research_bonuses = yes
		custom_effect_tooltip = generic_skip_one_line_tt
		add_breakthrough_progress = {
			specialization = specialization_land
			value = 1
		}
	}

	option = {
		name = germany.75.b	#no way
		add_timed_idea = { idea = SOV_scientist_defect days = 365 }
		ai_chance = { factor = 0 }
		add_political_power = -10
		add_opinion_modifier = { target = GER modifier = refused_MR_pact } # no pact
		GER = {
			country_event = { days = 1 id = germany.77 }
		}
	}
}

# Soviets Accept German-Soviet Treaty
country_event = {
	id = germany.76
	title = germany.76.t
	desc = germany.76.d
	picture = GFX_report_event_physics_lab_02

	is_triggered_only = yes

	option = {
		name = germany.76.a	#bah
		# REVISIT Balance research bonus
		if = {
			limit = {
				NOT = {
					has_dlc = "No Step Back"
				}
			}
			add_tech_bonus = {
				name = med_armor_bonus
				ahead_reduction = 1
				category = cat_medium_armor
			}
			add_tech_bonus = {
				name = armor_bonus
				bonus = 1.0
				uses = 2
				category = armor
			}
		}
		else = { #NO STEP BACK EFFECTS
			add_tech_bonus = {
				name = armor_bonus
				bonus = 2.0
				uses = 1
				category = armor
			}
			create_equipment_variant = {
				name = "Panzer VII Löwe"
				type = heavy_tank_chassis_2
				design_team = mio:GER_daimler_benz_organization #We feed on your tears
				parent_version = 0
				modules = {
					main_armament_slot = tank_heavy_cannon_2
					turret_type_slot = tank_heavy_two_man_tank_turret
					suspension_type_slot = tank_torsion_bar_suspension
					armor_type_slot = tank_welded_armor
					engine_type_slot = tank_gasoline_engine
					special_type_slot_1 = tank_radio_1
					special_type_slot_2 = additional_machine_guns
					special_type_slot_3 = sloped_armor
				}
				upgrades = {
					tank_nsb_engine_upgrade = 6
					tank_nsb_armor_upgrade = 6
				}
				icon = "GFX_GER_improved_heavy_tank_medium"
			}
			create_equipment_variant = {
				name = "Panzerjäger Elefant"
				type = heavy_tank_destroyer_chassis_2
				design_team = mio:GER_porsche_organization #We feed on your tears
				parent_version = 0
				modules = {
					main_armament_slot = tank_heavy_cannon_2
					turret_type_slot = tank_heavy_fixed_superstructure_turret
					suspension_type_slot = tank_torsion_bar_suspension
					armor_type_slot = tank_welded_armor
					engine_type_slot = tank_gasoline_engine
					special_type_slot_1 = tank_radio_1
					special_type_slot_2 = additional_machine_guns
					special_type_slot_3 = squeezebore_adaptor
					special_type_slot_4 = sloped_armor
				}
				upgrades = {
					tank_nsb_engine_upgrade = 6
					tank_nsb_armor_upgrade = 6
				}
				icon = "GFX_GER_improved_heavy_tank_medium"
			}
		}
		add_breakthrough_progress = {
			specialization = specialization_land
			value = 1
		}
		SOV = {
			add_opinion_modifier = { target = GER modifier = sov_ger_treaty }
			add_opinion_modifier = { target = GER modifier = sov_ger_treaty_trade }
		}
	}
}

# Soviets Reject German-Soviet Treaty
country_event = {
	id = germany.77
	title = germany.77.t
	desc = germany.77.d
	picture = GFX_report_event_physics_lab_02

	is_triggered_only = yes

	option = {
		name = germany.77.a
		#add_opinion_modifier = { target = SOV modifier = refused_MR_pact }# no pact
	}
}

#MM: UNUSED AFTER WW (FOR NOW unless we send this to SOV after completing Treaty with USSR and Jets and Rocketry focus, similar to how it worked with the old focus Air Innovations II)
# German Joint Air Research
country_event = {
	id = germany.78
	title = germany.78.t
	desc = germany.78.d
	picture = GFX_report_event_radar_01

	is_triggered_only = yes

	option = {
		name = germany.78.a
		add_ideas = GER_air_innovations_2_idea
		add_tech_bonus = {
				name = radar_tech_bonus
				bonus = 1.0
				uses = 1
				category = radar_tech
			}
	}
}

# Ultimatum from Germany (Turkey)
country_event = {
	id = germany.79
	title = germany.79.t
	desc = germany.79.d
	picture = GFX_report_event_german_turkish_pact

	is_triggered_only = yes

	option = {
		name = germany.79.a
		ai_chance = {
			base = 70
			modifier = {
				NOT = { BUL = { is_in_faction_with = GER } }
				factor = 0.5
			}
		}
		GER = { puppet = TUR }
		SOV = {
			#TRABZON
			if = {
				limit = {
					354 = {
						is_controlled_by = TUR
					}
				}
				transfer_state = 354
			}
			#HAKKARI
			if = {
				limit = {
					353 = {
						is_controlled_by = TUR
					}
				}
				transfer_state = 353
			}
			#TUNCELI
			if = {
				limit = {
					352 = {
						is_controlled_by = TUR
					}
				}
				transfer_state = 352
			}
			#VAN
			if = {
				limit = {
					800 = {
						is_controlled_by = TUR
					}
				}
				transfer_state = 800
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.201 }
		}
	}

	option = {
		name = germany.79.b
		ai_chance = {
			base = 10
			modifier = {
				GER = { surrender_progress > 0.25 }
				factor = 5 #seems safe
			}
			modifier = {
				has_government = democratic
				factor = 5
			}
		}
		trigger = {
			TUR = {
				is_subject = no
			}
			NOT = {
				has_war_with = ENG
			}
			NOT = {
				any_other_country = {
					is_in_faction_with = ENG
					has_war_with = TUR
				}
			}
			ENG = {
				is_faction_leader = yes
			}
		}
		if = {
			limit = {
				is_guaranteed_by = ENG
			}
			ENG = {
				add_to_faction = TUR
				add_ai_strategy = {
					type = alliance
					id = ROOT
					value = 100
				}
			}
		}
		else = {
			ENG = {
				country_event = generic.5
			}
		}
		TUR = {
			add_ai_strategy = {
				type = alliance
				id = ENG
				value = 200
			}
		}
		GER = {
			create_wargoal = {
				target = TUR
				type = puppet_wargoal_focus
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.217 }
		}
	}

	option = {
		name = germany.79.c
		ai_chance = {
			base = 20
			modifier = {
				NOT = {
					has_government = fascism
				}
				factor = 5
			}
			modifier = {

				AND = {
					ENG = {
						has_capitulated = no
						has_war_with = GER
					}
					SOV = {
						has_capitulated = no
						has_war_with = GER
					}
					USA = {
						has_capitulated = no
						has_war_with = GER
					}
				}

				factor = 5 #lol come at me bro
			}
		}
		GER = {
			create_wargoal = {
				target = TUR
				type = puppet_wargoal_focus
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.216 }
		}
	}
}

# Danzig for Slovakia (Poland)
country_event = {
	id = germany.80
	title = germany.80.t
	desc = germany.80.d
	picture = GFX_report_event_german_polish_border

	is_triggered_only = yes

	option = {
		name = germany.80.a

		ai_chance = {
			base = 10
		}

		GER = { country_event = { id = germany.81 days = 1 } }
		effect_tooltip = {
			if = {
				limit = { SLO = { exists = yes } }
				annex_country = { target = SLO }
			}
			if = {
				limit = { GER = { owns_state = 70 } }
				transfer_state = 70
			}
			if = {
				limit = { GER = { owns_state = 71 } }
				transfer_state = 71
			}
			if = {
				limit = { GER = { owns_state = 73 } }
				transfer_state = 73
			}
			if = {
				limit = { GER = { owns_state = 664 } }
				transfer_state = 664
			}
			if = {
				limit = { GER = { owns_state = 72 } }
				transfer_state = 72
			}
			GER = { transfer_state = 85 }
			GER = { transfer_state = 807 }
			807 = { add_core_of = GER }
			85 = { add_core_of = GER }
		}
	}

	option = {
		name = germany.80.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_in_faction_with = GER
			}
		}
		GER = {
			country_event = { id = germany.82 days = 1 }
			if = {
				limit = {
					is_in_faction_with = POL
					is_faction_leader = yes
				}
				remove_from_faction = POL
			}
			if = {
				limit = {
					is_in_faction_with = POL
					is_faction_leader = no
				}
				random_other_country = {
					limit = {
						is_in_faction_with = GER
						is_faction_leader = yes
					}
					remove_from_faction = GER
				}
			}
			effect_tooltip = {
				create_wargoal = {
					type = take_state_focus
					target = POL
					generator = { 85 }
				}
			}
		}
	}
}

# Poland Accepts, Cedes Danzig
country_event = {
	id = germany.81
	title = germany.81.t
	desc = germany.81.d
	picture = GFX_report_event_german_polish_border

	is_triggered_only = yes

	option = {
		name = germany.81.a
		if = {
			limit = { SLO = { exists = yes } }
			POL = { annex_country = { target = SLO } }
		}
		if = {
			limit = { owns_state = 70 }
			POL = { transfer_state = 70 }
		}
		if = {
			limit = { owns_state = 71 }
			POL = { transfer_state = 71 }
		}
		if = {
			limit = { owns_state = 73 }
			POL = { transfer_state = 73 }
		}
		if = {
			limit = { owns_state = 664 }
			POL = { transfer_state = 664 }
		}
		if = {
			limit = { owns_state = 72 }
			POL = { transfer_state = 72 }
		}
		transfer_state = 85
		transfer_state = 807
		807 = { add_core_of = GER }
		85 = { add_core_of = GER }
		if = {
			limit = {
				ENG = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			ENG = {
				add_war_support = -0.1 #dodged a bullet there
			}
		}
		if = {
			limit = {
				FRA = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			FRA = {
				add_war_support = -0.1 #dodged a bullet there
			}
		}

		hidden_effect = {
			news_event = { hours= 6 id = news.202 }
			set_global_flag = poland_swap_danzig
		}
	}
}

# Poland Refuses to give up Danzig
country_event = {
	id = germany.82
	title = germany.82.t
	desc = germany.82.d
	picture = GFX_report_event_polish_army

	is_triggered_only = yes

	option = {
		name = germany.82.a
		create_wargoal = {
			type = take_state_focus
			target = POL
			generator = { 85 }
		}
	}
}

# Anti-Soviet Pact
country_event = {
	id = germany.83
	title = germany.83.t
	desc = germany.83.d
	picture = GFX_report_event_japan_europe_pact

	is_triggered_only = yes

	option = {
		ai_chance = {
			base = 10
		}
		name = germany.83.a		#join
		add_ideas = anti_soviet_pact
		SOV = {
			remove_opinion_modifier = { target = ROOT modifier = pact_against_us }
			add_opinion_modifier = { target = ROOT modifier = worse_pact_against_us }
		}
	}

	option = {
		name = germany.83.b		#refuse
		trigger = { NOT = { is_subject_of = GER } }
		ai_chance = {
			base = 2
		}
	}
}

# Call Pact Members to War (Instigator)
country_event = {
	id = germany.84
	title = germany.84.t
	desc = germany.84.d
	picture = GFX_report_event_soviet_tanks

	is_triggered_only = yes

	#immediate = {
	#	remove_ideas = anti_soviet_pact
	#}

	option = {
		name = germany.84.a
		every_other_country = {
			limit = {
				has_idea = anti_soviet_pact
				NOT = { has_war_with = SOV }
				is_subject = no
				any_other_country = {
					has_idea = anti_soviet_pact
					has_war_with = SOV
				}
			}
			country_event = { id = germany.85 days = 1 }
		}
		hidden_effect = {
			if = {
				limit = {
					original_tag = GER
					has_government = neutrality
				}
				country_event = { id = germany.127 days = 7 random_days = 7 }
			}
		}
	}
}

# [From.GetName] Calls Pact Members to War
country_event = {
	id = germany.85
	title = germany.85.t
	title = {
		text = germany.85.t.a
		trigger = {
			OR = {
				NOT = { FROM = { original_tag = POL } }
				NOT = { original_tag = GER }
				NOT = { has_completed_focus = GER_danzig_for_guarantees }
			}
		}
	}
	title = {
		text = germany.85.t.b
		trigger = {
			FROM = { original_tag = POL }
			original_tag = GER
			has_completed_focus = GER_danzig_for_guarantees
		}
	}
	desc = {
		text = germany.85.desc.a
		trigger = {
			OR = {
				NOT = { FROM = { original_tag = POL } }
				NOT = { original_tag = GER }
				NOT = { has_completed_focus = GER_danzig_for_guarantees }
			}
		}
	}
	desc = {
		text = germany.85.desc.b
		trigger = {
			FROM = { original_tag = POL }
			original_tag = GER
			has_completed_focus = GER_danzig_for_guarantees
		}
	}
	picture = GFX_report_event_soviet_tanks

	is_triggered_only = yes

	#immediate = {
	#	remove_ideas = anti_soviet_pact
	#}

	option = {
		name = germany.85.a
		ai_chance = {
			base = 10
		}
		add_to_war = {
			targeted_alliance = FROM
			enemy = SOV
			hostility_reason = ally
		}
		hidden_effect = {
			if = {
				limit = {
					original_tag = GER
				}
				country_event = { id = germany.127 days = 7 random_days = 7 }
			}
		}
	}

	option = {
		name = germany.85.b
		trigger = {
			NOT = { FROM = { original_tag = POL } }
			NOT = { original_tag = GER }
			NOT = { has_completed_focus = GER_danzig_for_guarantees }
		}
		ai_chance = {
			base = 0
		}
		remove_ideas = anti_soviet_pact
		FROM = { add_opinion_modifier = { target = ROOT modifier = anti_soviet_pact_call_refused } }
		SOV = { remove_opinion_modifier = { target = SOV modifier = worse_pact_against_us } }
		add_timed_idea = {
			idea = anti_soviet_pact_refused_call
			days = 365
		}
		custom_effect_tooltip = germany.85.b_tt
		hidden_effect = {
			country_event = { id = germany.112 days = 3 }
		}
	}
}

# Danzig or War (Poland)
country_event = {
	id = germany.86
	title = germany.86.t
	desc = germany.86.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = GER }
	}

	option = {
		name = germany.86.a
		ai_chance = {
			base = 20
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		GER = { country_event = { id = germany.87 days = 1 } }
		effect_tooltip = {
			GER = {
				transfer_state = 85
				add_state_core = 85
				transfer_state = 807
				add_state_core = 807
				remove_state_claim = 86
				remove_state_claim = 762
			}
		}
		country_event = { id = poland.1 days = 7 }
		hidden_effect = {
			news_event = { id = news.203 hours = 6 }
		}
	}

	option = {
		name = germany.86.b
		ai_chance = {
			base = 80
			modifier = {
				factor = 3
				strength_ratio = {
					tag = GER
					ratio > 0.7
				}
			}
			modifier = {
				factor = 10
				any_other_country = {
					is_major = yes
					is_in_faction_with = POL
				}
			}
		}
		GER = {
			country_event = { id = germany.88 days = 1 }
			if = {
				limit = {
					is_in_faction_with = POL
					is_faction_leader = yes
				}
				remove_from_faction = POL
			}
			if = {
				limit = {
					is_in_faction_with = POL
					is_faction_leader = no
				}
				random_other_country = {
					limit = {
						is_in_faction_with = GER
						is_faction_leader = yes
					}
					remove_from_faction = GER
				}
			}
		}

		if = {
			limit = {
				has_guaranteed = LIT
				is_guaranteed_by = LIT
			}
			diplomatic_relation = {
				country = LIT
				relation = guarantee
				active = no
			}
			LIT = {
				diplomatic_relation = {
					country = POL
					relation = guarantee
					active = no
				}
			}
		}

		hidden_effect = {
			news_event = { hours = 1 id = news.204 }
		}
		effect_tooltip = {
			GER = {
				declare_war_on = {
					target = POL
					type = take_state
					generator = { 85 }
				}
			}
		}
	}
}

# Poland Cedes Danzig (Danzig or War)
country_event = {
	id = germany.87
	title = germany.87.t
	desc = germany.87.d
	picture = GFX_report_event_german_polish_border

	is_triggered_only = yes

	option = {
		name = germany.87.a
		transfer_state = 85
		add_state_core = 85
		transfer_state = 807
		add_state_core = 807
		remove_state_claim = 86
		remove_state_claim = 762
		if = {
			limit = {
				ENG = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			ENG = {
				add_war_support = -0.1 #dodged a bullet there
			}
		}
		if = {
			limit = {
				FRA = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			FRA = {
				add_war_support = -0.1 #dodged a bullet there
			}
		}
	}
}

# Poland Refuses to Cede Danzig (Danzig or War)
country_event = {
	id = germany.88
	title = germany.88.t
	desc = germany.88.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes

	option = {
		name = germany.88.a
		if = {
			limit = {
				POL = {
					is_subject = yes
					OVERLORD = {
						has_non_aggression_pact_with = GER
					}
				}
			}
			POL = {
				OVERLORD = {
					diplomatic_relation = {
						country = GER
						relation = non_aggression_pact
						active = no
					}
				}
			}
		}
		if = {
			limit = {
				POL = {
					has_non_aggression_pact_with = GER
				}
			}
			POL = {
				diplomatic_relation = {
					country = GER
					relation = non_aggression_pact
					active = no
				}
			}
			every_other_country = {
				limit = {
					has_non_aggression_pact_with = GER
				}
				add_opinion_modifier = {
					target = GER
   					modifier = protest_action_strong
				}
			}
		}
		create_wargoal = {
			type = take_state
			generator = { 85 807 }
			target = POL
		}
		add_state_core = 85
		add_state_core = 807
		if = {
			limit = {
				ENG = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			ENG = {
				add_war_support = 0.1 #just not cricket
			}
		}
		if = {
			limit = {
				FRA = {
					NOT = {
						is_in_faction_with = GER
					}
				}
			}
			FRA = {
				add_war_support = 0.1
			}
		}
		if = {
			limit = {
				CZE = {
					exists = yes
					is_subject = no
					has_government = democratic
					NOT = { is_in_faction_with = GER }
				}
			}
			CZE = {
				add_ai_strategy = {
					type = conquer
					id = "GER"
					value = 200
				}
				add_ai_strategy = {
					type = alliance
					id = "POL"
					value = 200
				}
			}
		}
	}
}

#sov-ger unholy alliance
country_event = {
	id = germany.89
	title = germany.89.t
	desc = germany.89.d
	picture = GFX_report_event_molotov_ribbentrop_stalin_pact

	is_triggered_only = yes

	option = {
		name = germany.89.a
		dismantle_faction = yes
		add_stability = -0.1
		add_timed_idea = {
			idea = soviet_german_friendship
			days = 730
		}
		every_other_country = {
			limit = {
				OR = {
					AND = {
						NOT = { tag = GER }
						has_government = fascism
					}
					has_government = democratic
				}
			}
			add_opinion_modifier = { target = SOV modifier = unholy_alliance }
		}
		GER = {
			add_timed_idea = {
				idea = soviet_german_friendship
				days = 730
			}
			if = {
				limit = {
					is_faction_leader = yes
				}
				dismantle_faction = yes
			}
			if = {
				limit = {
					is_in_faction  = yes
				}
				remove_from_faction = GER
			}
			add_stability = -0.2
			create_faction_from_template = {
				template = faction_template_regional_anti_democratic
				name = the_berlin_moscow_axis
			}
			add_to_faction = SOV
			add_named_threat = { threat = 10 name = germany.89.t }
			every_other_country = {
				limit = {
					has_government = fascism
				}
				add_opinion_modifier = { target = GER modifier = communist_collaborators }
			}
			every_other_country = {
				limit = {
					has_government = democratic
				}
				add_opinion_modifier = { target = GER modifier = unholy_alliance }
			}
		}
		hidden_effect = {
			# Britain can rally democracies
			ENG = {
				country_event = { days = 3 id = britain.11 }
			}
			# US drops communism/fascism
			USA = {
				country_event = { id = usa.14 }
				country_event = { id = usa.24 }
			}
		}
	}

	option = {
		name = germany.89.b
		ai_chance = { factor = 0 }
		GER = {
			country_event = germany.90
			effect_tooltip = {
				create_wargoal = {
					type = take_state_focus
					target = SOV
					generator = { 219 217 } # Moscow and Stalingrad
				}
			}
		}
		remove_opinion_modifier = { target = GER modifier = ger_sov_alliance_focus }
	}
}

country_event = {
	id = germany.90
	title = germany.90.t
	desc = germany.90.d
	picture = GFX_report_event_stalin_02

	is_triggered_only = yes

	option = {
		name = germany.90.a
		create_wargoal = {
			type = take_state_focus
			target = SOV
			generator = { 219 217 } # Moscow and Stalingrad
		}
	}
}

# France national focus -  requests to join germany
country_event = {
	id = germany.91
	title = germany.91.t
	desc = germany.91.d
	picture = GFX_report_event_fascist_gathering

	is_triggered_only = yes

	option = {
		name = germany.91.a
		GER = { add_to_faction = FRA }
		FRA = {
			add_ai_strategy = {
				type = alliance
				id = "GER"
				value = 200
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.182 }
		}
	}
	option = {
		name = germany.91.b
		ai_chance = { factor = 0 }
		FRA = {
			add_opinion_modifier = {
				target = GER
				modifier = GER_FRA_join_germany_reject
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.183 }
		}
	}
}

# France/England (Germany Refuses Ultimatum)
country_event = {
	id = germany.92
	title = germany.92.t
	desc = germany.92.d
	picture = GFX_report_event_worried_french

	is_triggered_only = yes

	option = {
		name = germany.92.a
	}
}

# Germany (British and (possibly) French Support for Yugoslavia)
country_event = {
	id = germany.93
	title = germany.93.t
	desc = {
		text = germany.93.d
		trigger = { NOT = { has_global_flag = FRA_abandoned_yugoslavia } }
	}
	desc = {
		text = germany.93.d_FRA_abandoned_yugoslavia
		trigger = { has_global_flag = FRA_abandoned_yugoslavia }
	}
	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.93.a

		create_wargoal = { #Don't add Ljubljana to the equation, that goes to Italy
			type = take_state_focus
			target = YUG
			generator = { 102 853 }
		}
		hidden_effect = {
			news_event = { id = news.164 hours = 6 }
		}
		set_country_flag = allies_support_yugoslavia

		# Claiming German Slovenia
		102 = {
			add_claim_by = ROOT
		}

		custom_effect_tooltip = generic_skip_one_line_tt

		# Claiming Serbia proper for Protection under the Reich 
		107 = {
			add_claim_by = ROOT
		}
		108 = {
			add_claim_by = ROOT
		}

		hidden_effect = {
			# Hitler has faced resistance and showed weakness once now
			add_to_variable = { 
				GER_hitlers_blunders_variable = 1
			}
		}
	}
}

# Germany (Yugoslavia Surrenders Slovenia)
country_event = {
	id = germany.94
	title = germany.94.t
	desc = germany.94.d
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	option = {
		name = germany.94.a
		GER = {
			transfer_state = 102
			transfer_state = 853
		}
		set_country_flag = slovenia_acquired
		hidden_effect = {
			news_event = { id = news.163 hours = 6 }
		}
	}
}

# Germany (Yugoslavia Refuses)
country_event = {
	id = germany.95
	title = germany.95.t
	desc = germany.95.d
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	option = {
		name = germany.95.a
		if = {
			limit = {
				YUG = { owns_state = 102 }
			}
			if = {
				limit = {
					YUG = { owns_state = 853 }
				}
				create_wargoal = {
					type = take_state_focus
					target = YUG
					generator = { 102 853 }
				}
			}
			else = {
				create_wargoal = {
					type = take_state_focus
					target = YUG
					generator = { 102 }
				}
			}
		}
		else = {
			create_wargoal = {
				type = take_state_focus
				target = SLV
				generator = { 102 853 }
			}
		}

		# Claiming German Slovenia
		102 = {
			add_claim_by = ROOT
		}

		custom_effect_tooltip = generic_skip_one_line_tt

		# Claiming Serbia proper for Protection under the Reich 
		107 = {
			add_claim_by = ROOT
		}
		108 = {
			add_claim_by = ROOT
		}
		
		hidden_effect = {
			news_event = { id = news.166 hours = 6 }
		}
	}
}

# Germany (Italy protects Yugoslavia)
country_event = {
	id = germany.96
	title = germany.96.t
	desc = germany.96.d
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	option = {
		name = germany.96.a
		create_wargoal = {
			type = take_state_focus
			target = YUG
			generator = { 102 853 }
		}
		hidden_effect = {
			news_event = { id = news.167 hours = 6 }
		}
	}
}

# Germany (France protects Yugoslavia)
country_event = {
	id = germany.97
	title = germany.97.t
	desc = germany.97.d
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	option = {
		name = germany.97.a
		create_wargoal = {
			type = take_state_focus
			target = YUG
			generator = { 102 853 }
		}
		hidden_effect = {
			news_event = { id = news.165 hours = 6 }
		}
	}
}

# Fate of Yugoslavia
country_event = {
	id = germany.98
	title = germany.98.t
	desc = {
		text = germany.98.d
	}
	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.98.a
		ai_chance = { factor = 20 }

		YUG = { country_event = yugoslavia.7 }
		custom_effect_tooltip = germany.98_tt
		effect_tooltip = {
			add_political_power = -75
			add_named_threat = { threat = 5 name = GER_fate_of_yugoslavia }
			annex_country = { target = YUG transfer_troops = no }
		}
		custom_effect_tooltip = yugoslavia_mefo_bills_tt
		add_to_variable = { var = GER_mefo_bill_counter value = -5 }
		GER_mefo_bills_level_down = yes		
	}

	option = {
		name = germany.98.b
		ai_chance = { factor = 75 }

		trigger = {
			YUG = {
				OR = {
					owns_state = 103
					owns_state = 104
					owns_state = 109
					owns_state = 804
				}
			}
		}

		YUG = { country_event = yugoslavia.8 }
		custom_effect_tooltip = germany.98_tt
		effect_tooltip = {
			add_political_power = -25
			add_named_threat = { threat = 3 name = GER_fate_of_yugoslavia }
			CRO = {
				if = {
					limit = { YUG = { owns_state = 103 } }
					transfer_state = 103
				}
				if = {
					limit = { YUG = { owns_state = 104 } }
					transfer_state = 104
				}
				if = {
					limit = { YUG = { owns_state = 109 } }
					transfer_state = 109
				}
				if = {
					limit = { YUG = { owns_state = 804 } }
					transfer_state = 804
				}
			}
			puppet = CRO
			annex_country = { target = YUG transfer_troops = no }
			custom_effect_tooltip = yugoslavia_mefo_bills_tt
			add_to_variable = { var = GER_mefo_bill_counter value = -5 }
			GER_mefo_bills_level_down = yes
		}
	}

	option = {
		name = germany.98.c
		ai_chance = { factor = 5 }
		YUG = { country_event = yugoslavia.9 }
		custom_effect_tooltip = germany.98_tt
		effect_tooltip = {
			add_named_threat = { threat = 2 name = GER_fate_of_yugoslavia }
			CRO = {
				if = {
					limit = { YUG = { owns_state = 103 } }
					transfer_state = 103
				}
				if = {
					limit = { YUG = { owns_state = 104 } }
					transfer_state = 104
				}
				if = {
					limit = { YUG = { owns_state = 109 } }
					transfer_state = 109
				}
				if = {
					limit = { YUG = { owns_state = 804 } }
					transfer_state = 804
				}
			}
			puppet = CRO
			puppet = YUG
			hidden_effect = {
				set_global_flag = GER_fate_of_yugoslavia_puppet_CRO_YUG
				news_event = { hours = 6 id = news.169 }
			}
			#custom_effect_tooltip = yugoslavia_mefo_bills_tt
			#add_to_variable = { var = GER_mefo_bill_counter value = -10 }
		}
		custom_effect_tooltip = yugoslavia_mefo_bills_tt
		add_to_variable = { var = GER_mefo_bill_counter value = -5 }
		GER_mefo_bills_level_down = yes
	}
}

# Germany: Carve up Greece - Give land to Italy?
country_event = {
	id = germany.99
	title = germany.99.t
	desc = germany.99.d

	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		ai_chance = { base = 5 }
		name = germany.99.a

		ITA = { add_opinion_modifier = { target = GER modifier = GER_second_ljubljana_award_GER } }

		if = { #Give Epirus to Italy
			limit = {
				GRE = { controls_state = 185 }
			}
			set_global_flag = GER_second_ljubljana_award_ITA_185
		}
		if = { #Give Thrace to Italy
			limit = {
				GRE = { controls_state = 731 }
				NOT = { has_global_flag = GER_second_ljubljana_award_BUL_event } #Bulgaria isn't getting anything
			}
			set_global_flag = GER_second_ljubljana_award_ITA_731
		}

		ITA = {
			add_state_claim = 185
		}
		if = {
			limit = {
				NOT = { has_global_flag = GER_second_ljubljana_award_BUL_event } #Bulgaria isn't getting anything
			}
			ITA = {
				add_state_claim = 731
			}
		}

		if = {
			limit = {
				OR = {
					has_global_flag = GER_second_ljubljana_award_BUL_done
					NOT = { has_global_flag = GER_second_ljubljana_award_BUL_event }
				}
			}
			GRE = { country_event = { id = greece.2 hours = 12 } }
		}
		set_global_flag = GER_second_ljubljana_award_ITA_done
	}
	#Don't give them anything
	option = {
		ai_chance = { base = 0 }
		name = germany.99.b
		ITA = { add_opinion_modifier = { target = GER modifier = GER_second_ljubljana_award_noland } }
		set_global_flag = GER_second_ljubljana_award_ITA_done
	}
}

# Germany: Carve up Greece - Give land to Bulgaria?
country_event = {
	id = germany.100
	title = germany.100.t
	desc = germany.100.d

	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		ai_chance = { base = 5 }
		name = germany.100.a

		if = { #Give Central Macedonia to Bulgaria
			limit = {
				GRE = { controls_state = 731 }
			}
			set_global_flag = GER_second_ljubljana_award_BUL_731
		}
		if = { #Give Thrace to Bulgaria
			limit = {
				GRE = { controls_state = 184 }
			}
			set_global_flag = GER_second_ljubljana_award_BUL_184
		}
		BUL = {
			add_state_claim = 731
			add_state_claim = 184
		}

		BUL = { add_opinion_modifier = { target = GER modifier = GER_second_ljubljana_award_GER } }

		if = {
			limit = {
				OR = {
					has_global_flag = GER_second_ljubljana_award_ITA_done
					NOT = { has_global_flag = GER_second_ljubljana_award_ITA_event }
				}
			}
			GRE = { country_event = { id = greece.2 hours = 12 } }
		}
		set_global_flag = GER_second_ljubljana_award_BUL_done
	}

		#Don't give them anything
	option = {
		name = germany.100.b
		ai_chance = { base = 0 }
		BUL = { add_opinion_modifier = { target = GER modifier = GER_second_ljubljana_award_noland } }
		set_global_flag = GER_second_ljubljana_award_BUL_done
	}
}

# Germany: Carve up Greece - Take land for Germany?
country_event = {
	id = germany.101
	title = germany.101.t
	desc = germany.101.d

	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	immediate = {
		if = {
			limit = {
				185 = { #Epirus
					any_neighbor_state = { 
						state_is_fully_controlled_by_ROOT_or_subject = yes

					}
					is_owned_and_controlled_by = GRE
				}
			}
			set_global_flag = GER_second_ljubljana_award_GER_185
		}
		if = {
			limit = {
				731 = { #Central Macedonia
					any_neighbor_state = { 
						state_is_fully_controlled_by_ROOT_or_subject = yes

					}
					is_owned_and_controlled_by = GRE
				}
			}
			set_global_flag = GER_second_ljubljana_award_GER_731
		}
		if = {
			limit = {
				184 = { #Thrace
					any_neighbor_state = { 
						state_is_fully_controlled_by_ROOT_or_subject = yes

					}
					is_owned_and_controlled_by = GRE
				}
			}
			set_global_flag = GER_second_ljubljana_award_GER_184
		}
	}

	option = {
		name = germany.101.a
		GRE = { country_event = { id = greece.2 hours = 2 } }
		custom_effect_tooltip = germany.101_tt
		effect_tooltip = {
			if = { #Epirus
				limit = {
					has_global_flag = GER_second_ljubljana_award_GER_185
				}
				GER = { transfer_state = 185 }
			}
			if = { #Central Macedonia
				limit = {
					has_global_flag = GER_second_ljubljana_award_GER_731
				}
				GER = { transfer_state = 731 }
			}
			if = { #Thrace
				limit = {
					has_global_flag = GER_second_ljubljana_award_GER_184
				}
				GER = { transfer_state = 184 }
			}
		}
	}

	# There's no point of taking a Focus and then not getting anything out of it
	#option = {
	#	name = germany.101.b
	#}
}

# Germany: Greece refuses - Generate wargoal
country_event = {
	id = germany.102
	title = germany.102.t
	desc = germany.102.d

	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.102.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = GRE
		}
		hidden_effect = {
			news_event = { id = news.229 hours = 6 }
		}
	}
}

# Germany: Greece refuses puppet request - Generate wargoal
country_event = {
	id = germany.103
	title = germany.103.t
	desc = germany.103.d

	picture = GFX_report_event_german_inspect_troops

	is_triggered_only = yes

	option = {
		name = germany.103.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = GRE
		}
	}
}

# Germany: Italy demands lands in Vichy France
country_event = {
	id = germany.104
	title = germany.104.t
	desc = { text = germany.104.d_Savoy 					trigger = { has_global_flag = ITA_claims_on_france_735 } }
	desc = { text = germany.104.d_Corsica 				trigger = { has_global_flag = ITA_claims_on_france_1 } }
	desc = { text = germany.104.d_Savoy_Corsica 	trigger = { has_global_flag = ITA_claims_on_france_735 has_global_flag = ITA_claims_on_france_1 } }


	picture = GFX_report_event_german_italian_pact

	is_triggered_only = yes

	# Italy gets 1 state Savoy
	option = {
		ai_chance = { base = 70 }
		name = germany.104.a
		trigger = {
			has_global_flag = ITA_claims_on_france_735
			has_global_flag = ITA_claims_on_france_1
		}
		clr_global_flag = ITA_claims_on_france_1
		random_other_country = {
			limit = {
				original_tag = FRA
				has_government = fascism
			}
			country_event = france.27
		}
		ITA = { country_event = { id = italy.16 hours = 2 } }
	}

	# Italy gets 1 state Corsica
	option = {
		ai_chance = { base = 70 }
		name = germany.104.b
		trigger = {
			NOT = { has_global_flag = ITA_claims_on_france_735 }
			has_global_flag = ITA_claims_on_france_1
		}
		random_other_country = {
			limit = {
				original_tag = FRA
				has_government = fascism
			}
			country_event = france.27
		}
		ITA = { country_event = { id = italy.15 hours = 2 } }
	}

	# Italy gets Savoy
	option = {
		ai_chance = { base = 70 }
		name = germany.104.c
		trigger = {
			has_global_flag = ITA_claims_on_france_735
			NOT = { has_global_flag = ITA_claims_on_france_1 }
		}
		random_other_country = {
			limit = {
				original_tag = FRA
				has_government = fascism
			}
			country_event = france.27
		}
		ITA = { country_event = { id = italy.15 hours = 2 } }
	}

	# Italy gets Savoy and Corsica
	option = {
		ai_chance = { base = 20 }
		name = germany.104.e
		trigger = {
			has_global_flag = ITA_claims_on_france_735
			has_global_flag = ITA_claims_on_france_1
		}
		random_other_country = {
			limit = {
				original_tag = FRA
				has_government = fascism
			}
			country_event = france.27
		}
		ITA = { country_event = { id = italy.15 hours = 2 } }
	}

	# Italy gets nothing
	option = {
		ai_chance = { base = 10 }
		name = germany.104.f
		ITA = { country_event = { id = italy.14 hours = 2 } }
	}
}


# Germany: Italy leaves faction
country_event = {
	id = germany.105
	title = germany.105.t
	desc = germany.105.d
	picture = GFX_report_event_german_italian_pact

	is_triggered_only = yes

	option = {
		name = germany.105.a
	}
}

# Germany: Treaty Of Craiova
country_event = {
	id = germany.106
	title = germany.106.t
	desc = { text = germany.106.d_second_vienna_accepted_all trigger = { ROM = { has_country_flag = second_vienna_accepted_all } } }
	desc = { text = germany.106.d_second_vienna_accepted_north trigger = { ROM = { has_country_flag = second_vienna_accepted_north } } }
	desc = {
		text = germany.106.d_no_vienna
		trigger = {
			ROM = {
				NOT = { has_country_flag = second_vienna_accepted_all }
				NOT = { has_country_flag = second_vienna_accepted_north }
			}
		}
	}
	picture = GFX_report_event_vienna_award_hungary

	is_triggered_only = yes

	option = { # Give Bulgaria state 77
		name = germany.106.a
		ai_chance = { base = 95
			modifier = {
				factor = 0
				BUL = {
					is_in_faction = yes
					NOT = { is_in_faction_with = GER }
				}
			}
		}
		add_named_threat = { threat = 2 name = germany.106_threat }
		BUL = {
			add_opinion_modifier = { target = GER modifier = GER_treaty_of_craiova_GER }

			every_other_country = {
				limit = {
					is_faction_leader = yes
					NOT = { tag = GER }
				}
				reverse_add_opinion_modifier = { target = BUL modifier = GER_treaty_of_craiova_other }
			}
		}
		ROM = {
			country_event = { id = romania.5 hours = 3 }
		}
	}
	option = { # Give Bulgaria nothing
		name = germany.106.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				NOT = {
					BUL = {
						is_in_faction = yes
						NOT = { is_in_faction_with = GER }
					}
				}
			}
		}
		BUL = {
			add_opinion_modifier = { target = GER modifier = GER_treaty_of_craiova_noland }
			country_event = { id = bulgaria.5 hours = 4 }
		}
	}
}

# Flight of Rudolf No Hindenburg
country_event = {
	id = germany.107
	title = germany.107.t
	desc = germany.107.d
	picture = GFX_report_event_airplane_crash

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = { # WW (GOT) content - inner circle - If Hess started ascending, remove him (leaving Bormann available)
				limit = {
					OR = {
						has_completed_focus = GER_party_chancellor_hess
						focus_progress = {
							focus = GER_party_chancellor_hess
							progress > 0
						}
					}
					NOT = { has_completed_focus = GER_rally_the_industrialists } #Just extra safety meassure, this should never happen (events news.52 and news.53 should not be triggered if this is true)
				}
				set_country_flag = GER_bye_bye_hess_flag #Just for tooltip purposes in the event option

				if = { #If the focus in ongoing, it needs to be bypassed so it can actually be uncompleted (this doesn't trigger any pop-up)
					limit = {
						NOT = { has_completed_focus = GER_party_chancellor_hess }
					}
					unlock_national_focus = GER_party_chancellor_hess
				}
				uncomplete_national_focus = {
					focus = GER_party_chancellor_hess
					uncomplete_children = no
					refund_political_power = no
				}
				GER_remove_hess_effects = yes
			}
			set_country_flag = flight_of_hess
		}
	}

	option = {
		name = germany.107.a

		if = {
			limit = {
				has_country_flag = GER_bye_bye_hess_flag
			}
			effect_tooltip = {
				uncomplete_national_focus = {
					focus = GER_party_chancellor_hess
					uncomplete_children = no
					refund_political_power = no
				}
				custom_effect_tooltip = {
					localization_key = replace_ascended_advisor_tt
					CHARACTER = GER_rudolf_hess
					TRAIT = [GetHessTraitForFlight]
				}
				GER_remove_hess_effects = yes
			}
			clr_country_flag = GER_bye_bye_hess_flag
		}
	}
}

# Rudolf Hess killed No Hindenburg
country_event = {
	id = germany.108
	title = germany.108.t
	desc = germany.108.d
	picture = GFX_report_event_airplane_crash

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = { # WW (GOT) content - inner circle - If Hess started ascending, remove him (leaving Bormann available)
				limit = {
					OR = {
						has_completed_focus = GER_party_chancellor_hess
						focus_progress = {
							focus = GER_party_chancellor_hess
							progress > 0
						}
					}
					NOT = { has_completed_focus = GER_rally_the_industrialists } #Just extra safety meassure, this should never happen (events news.52 and news.53 should not be triggered if this is true)
				}
				set_country_flag = GER_bye_bye_hess_flag #Just for tooltip purposes in the event option

				if = { #If the focus in ongoing, it needs to be bypassed so it can actually be uncompleted (this doesn't trigger any pop-up)
					limit = {
						NOT = { has_completed_focus = GER_party_chancellor_hess }
					}
					unlock_national_focus = GER_party_chancellor_hess
				}
				uncomplete_national_focus = {
					focus = GER_party_chancellor_hess
					uncomplete_children = no
					refund_political_power = no
				}
				GER_remove_hess_effects = yes
			}
			set_country_flag = flight_of_hess
		}
	}

	option = {
		name = germany.108.a

		if = {
			limit = {
				has_country_flag = GER_bye_bye_hess_flag
			}
			effect_tooltip = {
				uncomplete_national_focus = {
					focus = GER_party_chancellor_hess
					uncomplete_children = no
					refund_political_power = no
				}
				custom_effect_tooltip = {
					localization_key = replace_ascended_advisor_tt
					CHARACTER = GER_rudolf_hess
					TRAIT = [GetHessTraitForFlight]
				}
				GER_remove_hess_effects = yes
			}
			clr_country_flag = GER_bye_bye_hess_flag
		}
	}
}

# Flight of Rudolf Hess (Hindenburg)
country_event = {
	id = germany.109
	title = germany.107.t
	desc = germany.109.d
	picture = GFX_report_event_hindenburg_flames

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = { # WW (GOT) content - inner circle - If Hess started ascending, remove him (leaving Bormann available)
				limit = {
					OR = {
						has_completed_focus = GER_party_chancellor_hess
						focus_progress = {
							focus = GER_party_chancellor_hess
							progress > 0
						}
					}
					NOT = { has_completed_focus = GER_rally_the_industrialists } #Just extra safety meassure, this should never happen (events news.52 and news.53 should not be triggered if this is true)
				}
				set_country_flag = GER_bye_bye_hess_flag #Just for tooltip purposes in the event option

				if = { #If the focus in ongoing, it needs to be bypassed so it can actually be uncompleted (this doesn't trigger any pop-up)
					limit = {
						NOT = { has_completed_focus = GER_party_chancellor_hess }
					}
					unlock_national_focus = GER_party_chancellor_hess
				}
				uncomplete_national_focus = {
					focus = GER_party_chancellor_hess
					uncomplete_children = no
					refund_political_power = no
				}
				GER_remove_hess_effects = yes
			}
			set_country_flag = flight_of_hess
		}
	}

	option = {
		name = germany.108.a

		if = {
			limit = {
				has_country_flag = GER_bye_bye_hess_flag
			}
			effect_tooltip = {
				uncomplete_national_focus = {
					focus = GER_party_chancellor_hess
					uncomplete_children = no
					refund_political_power = no
				}
				custom_effect_tooltip = {
					localization_key = replace_ascended_advisor_tt
					CHARACTER = GER_rudolf_hess
					TRAIT = [GetHessTraitForFlight]
				}
				GER_remove_hess_effects = yes
			}
			clr_country_flag = GER_bye_bye_hess_flag
		}
	}
}

# Rudolf Hess Killed (Hindenburg)
country_event = {
	id = germany.110
	title = germany.108.t
	desc = germany.110.d
	picture = GFX_report_event_hindenburg_flames

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = { # WW (GOT) content - inner circle - If Hess started ascending, remove him (leaving Bormann available)
				limit = {
					OR = {
						has_completed_focus = GER_party_chancellor_hess
						focus_progress = {
							focus = GER_party_chancellor_hess
							progress > 0
						}
					}
					NOT = { has_completed_focus = GER_rally_the_industrialists } #Just extra safety meassure, this should never happen (events news.52 and news.53 should not be triggered if this is true)
				}
				set_country_flag = GER_bye_bye_hess_flag #Just for tooltip purposes in the event option

				if = { #If the focus in ongoing, it needs to be bypassed so it can actually be uncompleted (this doesn't trigger any pop-up)
					limit = {
						NOT = { has_completed_focus = GER_party_chancellor_hess }
					}
					unlock_national_focus = GER_party_chancellor_hess
				}
				uncomplete_national_focus = {
					focus = GER_party_chancellor_hess
					uncomplete_children = no
					refund_political_power = no
				}
				GER_remove_hess_effects = yes
			}
			set_country_flag = flight_of_hess
		}
	}

	option = {
		name = germany.110.a

		if = {
			limit = {
				has_country_flag = GER_bye_bye_hess_flag
			}
			effect_tooltip = {
				uncomplete_national_focus = {
					focus = GER_party_chancellor_hess
					uncomplete_children = no
					refund_political_power = no
				}
				custom_effect_tooltip = {
					localization_key = replace_ascended_advisor_tt
					CHARACTER = GER_rudolf_hess
					TRAIT = [GetHessTraitForFlight]
				}
				GER_remove_hess_effects = yes
			}
			clr_country_flag = GER_bye_bye_hess_flag
		}
	}
}

# Yugoslavia refuses
country_event = {
	id = germany.111
	title = germany.111.t
	desc = germany.111.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = germany.111.a
		create_wargoal = {
			type = annex_everything
			target = YUG
		}
	}
}

# (Hidden)
country_event = {
	id = germany.112

	is_triggered_only = yes

	hidden = yes

	immediate = {
		every_other_country = {
			limit = { has_idea = anti_soviet_pact }
			add_opinion_modifier = { target = FROM modifier = anti_soviet_pact_call_refused }
		}
	}
}


# Danzig or War (Polish Civil War)
country_event = {
	id = germany.113
	title = germany.113.t
	desc = germany.113.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	#Demand Danzig for aid
	option = {
		name = germany.113.a
		set_country_flag = GER_POL_danzig_promised
		GER = {
			country_event = { id = germany.117 days = 1 }
		}
	}
}

#Germany expects Danzig after war
country_event = {
	id = germany.114
	title = germany.114.t
	desc = germany.114.d
	picture = GFX_report_event_polish_tanks_01

	trigger = {
		has_country_flag = GER_POL_danzig_promised
		has_civil_war = no
		owns_state = 85
		controls_state = 85
	}

	fire_only_once = yes

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			clr_country_flag = GER_POL_danzig_promised
		}
	}

	option = {
		name = germany.114.a
		ai_chance = {
			base = 1
		}
		GER = {
			country_event = { id = germany.115 days = 1 }
		}
	}

	option = {
		name = germany.114.b
		trigger = {
			NOT = {
				is_in_faction_with = GER
			}
		}
		ai_chance = {
			base = 0
		}
		GER = {
			country_event = { id = germany.116 days = 1 }
			effect_tooltip = {
				declare_war_on = {
					target = POL
					type = take_state
					generator = { 85 }
				}
			}
		}
	}
}

#Poland cedes Danzig as repayment
country_event = {
	id = germany.115
	title = germany.115.t
	desc = germany.115.d
	picture = GFX_report_event_polish_tanks_01

	is_triggered_only = yes

	option = {
		name = germany.115.a
		transfer_state = 85
		remove_state_claim = 86
	}
}


# Poland Refuses to Cede Danzig (Polish Civil War)
country_event = {
	id = germany.116
	title = germany.116.t
	desc = germany.116.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes

	option = {
		name = germany.116.a
		ai_chance = {
			base = 1
		}
		declare_war_on = {
			target = POL
			type = take_state
			generator = { 85 }
		}
	}

	option = {
		name = germany.116.b
		ai_chance = {
			base = 0
		}
	}
}


# The Promise of Danzig (Polish Civil War)
country_event = {
	id = germany.117
	title = germany.117.t
	desc = germany.117.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	# This is a German struggle
	option = {
		name = germany.117.a
	}
}


#The Yalta Conference
country_event = {
	id = germany.118
	title = germany.118.t
	desc = germany.118.d
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = yes

	trigger = {
		#A democratic faction leader whose faction holds at least one German core state while SOV holds another can get this.
		has_war_with = GER
		GER = {
			surrender_progress > 0.4
			has_government = fascism
		}
		is_faction_leader = yes
		any_state = {
			is_core_of = GER
			controller = {
				is_in_faction_with = ROOT
			}
		}
		has_government = democratic
		NOT = {
			tag = SOV
		}
		NOT = {
			has_war_with = SOV
		}
		SOV = {
			is_faction_leader = yes
			has_war_with = GER
		}
		NOT = {
			has_global_flag = had_yalta_conference
		}
		NOT = {
			any_state = {
				is_core_of = GER
				controller = {
					NOT = {
						tag = GER
					}
					is_in_faction = yes
					NOT = {
						OR = {
							is_in_faction_with = ROOT
							is_in_faction_with = SOV
						}
					}
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 8
	}

	immediate = {
		set_global_flag = had_yalta_conference
		SOU = {
			save_event_target_as = yalta_partner
		}
		ROOT = {
			save_event_target_as = yalta_origin
			set_country_flag = yalta_signatory_faction_leader
		}
	}

	option = {
		name = germany.118.a
		ai_chance = {
			base = 10
		}
		hidden_effect = {
			event_target:yalta_partner = {
				country_event = { days = 1 id = germany.119 }
			}
		}
		custom_effect_tooltip = yalta_division_tt
		#effect_tooltip = {
		#	WGR = {
		#		add_state_core = 42
		#		add_state_core = 50
		#		add_state_core = 51
		#		add_state_core = 52
		#		add_state_core = 53
		#		add_state_core = 54
		#		add_state_core = 55
		#		add_state_core = 56
		#		add_state_core = 57
		#		add_state_core = 58
		#		add_state_core = 59
		#	}
		#	DDR = {
		#		add_state_core = 60
		#		add_state_core = 61
		#		add_state_core = 62
		#		add_state_core = 64
		#		add_state_core = 65
		#		add_state_core = 66
		#		add_state_core = 67
		#	}
		#	POL = {
		#		add_state_core = 66
		#		add_state_core = 67
		#		add_state_core = 68
		#		add_state_core = 63
		#		add_state_core = 5
		#	}
		#}
		event_target:yalta_partner = {
			custom_effect_tooltip = needs_approval
		}
	}

#	# Morgenthau - to be continued
#	option = {
#		name = germany.118.c
#		ai_chance = {
#			factor = 0
#		}
#		trigger = {
#			OR = {
#				tag = USA
#				is_in_faction_with = USA
#			}
#		}
#		hidden_effect = {
#			event_target:yalta_partner = {
#				country_event = { days = 1 id = germany.1190 }
#			}
#		}
#		custom_effect_tooltip = morgenthau_division_tt
#		event_target:yalta_partner = {
#			custom_effect_tooltip = needs_approval
#		}
#	}
#
#	# Churchill - leaving this out for now
#	option = {
#		name = germany.118.e
#		ai_chance = {
#			factor = 0
#		}
#		trigger = {
#			tag = ENG 
#			has_country_leader = {
#				character = ENG_winston_churchill
#				ruling_only = yes
#			}
#			is_ai = no 
#		}
#		hidden_effect = {
#			event_target:yalta_partner = {
#				country_event = { days = 1 id = germany.1191 }
#			}
#		}
#		custom_effect_tooltip = churchill_plan_germany_tt
#	}

	option = {
		name = germany.118.b
		ai_chance = {
			base = 0
		}
	}
	
	
}


#Yalta Conference Follow-up
country_event = {
	id = germany.119
	title = germany.119.t
	desc = germany.119.d
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = germany.119.a
		custom_effect_tooltip = yalta_division_tt
		#WGR = {
			42 = { set_state_flag = yalta_wgr }
			50 = { set_state_flag = yalta_wgr }
			978 = { set_state_flag = yalta_wgr }
			51 = { set_state_flag = yalta_wgr }
			52 = { set_state_flag = yalta_wgr }
			53 = { set_state_flag = yalta_wgr }
			54 = { set_state_flag = yalta_wgr }
			55 = { set_state_flag = yalta_wgr }
			56 = { set_state_flag = yalta_wgr }
			57 = { set_state_flag = yalta_wgr }
			58 = { set_state_flag = yalta_wgr }
			909 = { set_state_flag = yalta_wgr }
			59 = { set_state_flag = yalta_wgr }
		#	add_state_core = 42
		#	add_state_core = 50
		#	add_state_core = 51
		#	add_state_core = 52
		#	add_state_core = 53
		#	add_state_core = 54
		#	add_state_core = 55
		#	add_state_core = 56
		#	add_state_core = 57
		#	add_state_core = 58
		#	add_state_core = 59
		#}
		#DDR = {
			60 = { set_state_flag = yalta_ddr }
			61 = { set_state_flag = yalta_ddr }
			62 = { set_state_flag = yalta_ddr }
			64 = { set_state_flag = yalta_ddr }
			65 = { set_state_flag = yalta_ddr }
			66 = { set_state_flag = yalta_ddr }
			67 = { set_state_flag = yalta_ddr }
		#	add_state_core = 60
		#	add_state_core = 61
		#	add_state_core = 62
		#	add_state_core = 64
		#	add_state_core = 65
		#	add_state_core = 66
		#	add_state_core = 67
		#}
		POL = {
			66 = { set_state_flag = yalta_pol }
			67 = { set_state_flag = yalta_pol }
			68 = { set_state_flag = yalta_pol }
			63 = { set_state_flag = yalta_pol }
			5 = { set_state_flag = yalta_pol }
			add_state_core = 66
			add_state_core = 67
			add_state_core = 68
			add_state_core = 63
			add_state_core = 5
		}
		# Ensure that Liberated Austria is democratic

		IF = {
			limit = {
				AUS = {
					exists = no
				}
			}

			AUS = {
				set_politics = {
					ruling_party = democratic
					elections_allowed = yes 
				}
			}
		}

		ELSE = {
			AUS = {
				848 = { set_state_flag = yalta_aus }
				153 = { set_state_flag = yalta_aus }
				976 = { set_state_flag = yalta_aus }
				152 = { set_state_flag = yalta_aus }
				4 = { set_state_flag = yalta_aus }
				975 = { set_state_flag = yalta_aus }
				add_state_core = 848
				add_state_core = 153
				add_state_core = 152
				add_state_core = 976
				add_state_core = 4
				add_state_core = 975
			}
		}

		

		
		hidden_effect = {
			news_event = { days = 1 id = news.236 }
		}
		set_global_flag = yalta_agreed_flag 
	}

	option = {
		name = germany.119.b
		ai_chance = {
			base = 0
		}
		hidden_effect = {
			create_wargoal = {
				type = liberate_wargoal
				target = DDR
			}
		}
		event_target:yalta_origin = {
			country_event = {
				id = germany.120
			}
			hidden_effect = {
				create_wargoal = {
					type = liberate_wargoal
					target = WGR
				}
			}
		}
	}
}

#Yalta Conference Follow-up - Morgenthau
country_event = {
	id = germany.1190
	title = germany.1190.t
	desc = germany.1190.desc
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = germany.119.a
		ai_chance = {
			base = 2
		}
		custom_effect_tooltip = morgenthau_division_tt
		FRA = {
			42 = { set_state_flag = morgenthau_france }
			add_state_core = 42
		}
		POL = {
			67 = { set_state_flag = morgenthau_pol }
			add_state_core = 67
		}
		SOV = {
			763 = { set_state_flag = morgenthau_france }
			add_state_core = 763
		}

		#INTZ
			51 = { set_state_flag = morgenthau_international }
			52 = { set_state_flag = morgenthau_international }
			56 = { set_state_flag = morgenthau_international }
		
		#NGS
			58 = { set_state_flag = morgenthau_north_german } 	
			59 = { set_state_flag = morgenthau_north_german } 	
			51 = { set_state_flag = morgenthau_north_german } 	
			61 = { set_state_flag = morgenthau_north_german } 	
			62 = { set_state_flag = morgenthau_north_german } 	
			63 = { set_state_flag = morgenthau_north_german } 	
			68 = { set_state_flag = morgenthau_north_german } 	
			66 = { set_state_flag = morgenthau_north_german } 	
			65 = { set_state_flag = morgenthau_north_german } 	
			64 = { set_state_flag = morgenthau_north_german } 	
			60 = { set_state_flag = morgenthau_north_german } 	

		#SGS
			54 = { set_state_flag = morgenthau_south_german } 
			50 = { set_state_flag = morgenthau_south_german }
			978 = { set_state_flag = morgenthau_south_german }
			52 = { set_state_flag = morgenthau_south_german } 
			53 = { set_state_flag = morgenthau_south_german } 		
		
		hidden_effect = {
			news_event = { days = 1 id = news.236 }
		}
		set_global_flag = morgenthau_agreed_flag 
	}

	option = {
		name = germany.119.b
		ai_chance = {
			base = 1
		}
		
		event_target:yalta_origin = {
			country_event = {
				id = germany.120
			}
		}
	}
}

#MM: Never used. Unlocalized
#Yalta Conference Follow-up - Churchill
country_event = {
	id = germany.1191
	title = germany.1191.t
	desc = germany.1191.desc
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = germany.119.a
		ai_chance = {
			base = 1
		}
		custom_effect_tooltip = morgenthau_division_tt
		FRA = {
			42 = { set_state_flag = morgenthau_france }
			add_state_core = 42
		}
		POL = {
			67 = { set_state_flag = morgenthau_pol }
			add_state_core = 67
		}
		SOV = {
			763 = { set_state_flag = morgenthau_france }
			add_state_core = 763
		}

			
		
		hidden_effect = {
			news_event = { days = 1 id = news.236 }
		}
		set_global_flag = morgenthau_agreed_flag 
	}

	option = {
		name = germany.119.b
		ai_chance = {
			base = 1
		}
		
		event_target:yalta_origin = {
			country_event = {
				id = germany.120
			}
		}
	}
}


country_event = {
	id = germany.120
	title = germany.120.t
	desc = germany.120.d
	picture = GFX_report_event_generic_sign_treaty1

	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = germany.120.a
	}
}

#country_event = {
#	id = germany.121
#	title = germany.121.t
#	desc = germany.121.d
#	picture = GFX_report_event_generic_sign_treaty2
#
#	fire_only_once = yes
#
#	trigger = {
#		#Fires for one of the new German states to transfer old German territory.
#		country_exists = GER
#		OR = {
#			country_exists = WGR
#			country_exists = DDR
#		}
#		OR = {
#			tag = WGR
#			tag = DDR
#		}
#	}
#
#	mean_time_to_happen = {
#		days = 0
#	}
#
#	immediate = {
#		log = "Division of Germany triggered for [ROOT.GetName]"
#	}
#
#	option ={
#		name = germany.121.a
#		if = {
#			limit = {
#				country_exists = POL
#			}
#			#Return Polish territory + new cores if they exist
#			every_state = {
#				limit = {
#					is_core_of = POL
#					is_owned_and_controlled_by = GER
#				}
#				POL = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				NOT = {
#					country_exists = POL
#				}
#			}
#			#Otherwise give SOV Polish cores
#			every_state = {
#				limit = {
#					is_core_of = POL
#					is_owned_and_controlled_by = GER
#				}
#				SOV = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				country_exists = WGR
#			}
#			#Give WGR their cores
#			every_state = {
#				limit = {
#					is_owned_and_controlled_by = GER
#					is_core_of = WGR
#				}
#				WGR = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				country_exists = DDR
#			}
#			#Give East Germany their cores
#			every_state = {
#				limit = {
#					is_owned_and_controlled_by = GER
#					is_core_of = DDR
#				}
#				DDR = {
#					transfer_state = PREV
#				}
#			}
#			if = {
#				limit = {
#					GER = {
#						is_subject_of = SOV
#					}
#				}
#				#If SOV decided to puppet GER in peace, they now get DDR instead.
#				SOV = {
#					puppet = DDR
#				}
#			}
#		}
#		if = {
#			limit = {
#				any_state = {
#					is_core_of = CZE
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#			}
#			#Give CZE any territory that might have been taken in a war or focus ending before the one that ended with the Yalta conference.
#			every_state = {
#				limit = {
#					is_core_of = CZE
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#				CZE = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				any_state = {
#					is_core_of = YUG
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#			}
#			#Give YUG any territory that might have been taken in a war or focus ending before the one that ended with the Yalta conference.
#			every_state = {
#				limit = {
#					is_core_of = YUG
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#				YUG = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				country_exists = LIT
#				any_state = {
#					is_core_of = LIT
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#			}
#			#Give LIT any territory that might have been taken in a war or focus ending before the one that ended with the Yalta conference.
#			every_state = {
#				limit = {
#					is_core_of = LIT
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#				LIT = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				NOT = {
#					country_exists = LIT
#				}
#				any_state = {
#					is_core_of = LIT
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#			}
#			#Give any LIT cores to SOV if they have been taken in a previous war/focus
#			every_state = {
#				limit = {
#					is_core_of = LIT
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#				SOV = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				DDR = {
#					GER = {
#						has_government = PREV
#					}
#				}
#			}
#			#If GER has changed government, remaining territory is passed to the corresponding new state (WGR or DDR)
#			every_state = {
#				limit = {
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#				DDR = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				WGR = {
#					GER = {
#						has_government = PREV
#					}
#				}
#			}
#			#See above
#			every_state = {
#				limit = {
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = DDR
#							is_core_of = WGR
#							is_core_of = POL
#						}
#					}
#				}
#				WGR = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				any_state = {
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = WGR
#							is_core_of = DDR
#						}
#					}
#				}
#			}
#			#Any remaining cores go to WGR, because democracy is fun
#			every_state = {
#				limit = {
#					is_owned_and_controlled_by = GER
#					NOT = {
#						OR = {
#							is_core_of = WGR
#							is_core_of = DDR
#						}
#					}
#				}
#				WGR = {
#					transfer_state = PREV
#				}
#			}
#		}
#		if = {
#			limit = {
#				country_exists = WGR
#				country_exists = DDR
#			}
#			#Remove GER cores
#			hidden_effect = {
#				every_state = {
#					limit = {
#						is_core_of = GER
#					}
#					remove_core_of = GER
#				}
#			}
#		}
#	}
#}

#Events in case of weirdness with German Czechoslovakia focus - Event to CZE (or CZE's overlord), from GER
country_event = {
	id = germany.122
	title = germany.122.t

	desc = {
		text = germany.122.desc_cze_subject_of_ger
		trigger = {
			tag = CZE
			is_subject_of = FROM
		}
	}

	desc = { #DEFAULT DESC
		text = germany.122.d
	}

	picture = GFX_report_event_german_speech

	is_triggered_only = yes

	#Refuse
	option = {
		name = germany.122.a

		trigger = {
			NOT = {
				AND = {
					tag = CZE
					is_subject_of = GER
				}
			}
		}

		ai_chance = {
			base = 50
			modifier = {
				factor = 0.8
				strength_ratio = { tag = FROM ratio < 0.5 }
			}
			modifier = {
				factor = 0.8
				has_opinion = { target = FROM value > 99 }
			}
			modifier = {
				factor = 0.8
				strength_ratio = { tag = FROM ratio < 0.3 }
			}
			modifier = {
				factor = 0.8
				strength_ratio = { tag = FROM ratio < 0.2 }
			}
			modifier = {
				factor = 0.5
				strength_ratio = { tag = FROM ratio < 0.1 }
			}
		}

		if = {
			limit = {
				is_in_faction_with = FROM
			}
			if = {
				limit = {
					is_faction_leader = yes
				}
				remove_from_faction = FROM #Kick GER from faction
				if = { #Make sure puppets go with GER too
					limit = {
						any_allied_country = {
							is_subject_of = FROM
						}
					}
					every_other_country = {
						limit = {
							is_in_faction_with = ROOT
							is_subject_of = FROM
						}
						ROOT = { remove_from_faction = PREV } 
					}
				}
			}
			else = {
				random_other_country = {
					limit = {
						is_in_faction_with = ROOT
						is_faction_leader = yes
					}
					remove_from_faction = ROOT #Kick ROOT from faction (Potentially GER as leader but could be someone else)
					if = { #Make sure puppets go with ROOT too
						limit = {
							any_allied_country = {
								is_subject_of = ROOT
							}
						}
						every_other_country = {
							limit = {
								is_in_faction_with = PREV
								is_subject_of = ROOT
							}
							PREV = { remove_from_faction = PREV } 
						}
					}
				}
			}
		}

		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = CZE #Regardless of event triggered to CZE or overlord, the wargoal will always target CZE
					generator = { 69 } #Doesn't matter the exact state, CZE is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
				}
			}
		}
		hidden_effect = {
			FROM = {
				country_event = { id = germany.123 days = 1 }
			}
		}
	}

	#Accept
	option = {
		name = germany.122.b

		trigger = {
			NOT = {
				AND = {
					tag = CZE
					is_subject_of = GER
				}
			}
		}

		ai_chance = {
			base = 50
			modifier = {
				factor = 0.8
				any_other_country = {
					is_major = no
					has_guaranteed = CZE
				}
			}
			modifier = {
				factor = 0.8
				is_in_faction = yes
			}
			modifier = {
				factor = 0
				FRA = { has_completed_focus = FRA_strengthen_the_little_entente }
			}
			modifier = {
				factor = 0
				POL = {
					OR = {
						has_completed_focus = POL_protect_czechozlovakia
						has_completed_focus = POL_coerce_czechoslovakia
					}
				}
				OR = {
					is_guaranteed_by = POL
					is_in_faction_with = POL
				}
			}
			modifier = {
				factor = 0
				any_other_country = {
					is_major = yes
					OR = {
						has_guaranteed = CZE
						is_in_faction_with = CZE
					}
				}
			}
		}

		effect_tooltip = {
			if = {
				limit = {
					CZE = { controls_state = 69 }
				}
				FROM = {
					add_state_core = 69
					transfer_state = 69
				}
			}
			if = {
				limit = {
					CZE = { controls_state = 972 }
				}
				FROM = {
					add_state_core = 972
					transfer_state = 972
				}
			}
			if = {
				limit = {
					CZE = { controls_state = 74 }
				}
				FROM = {
					add_state_core = 74
					transfer_state = 74
				}
			}
		}

		hidden_effect = {
			FROM = {
				country_event = {
					id = germany.124 days = 1
				}
			}
			IF = {
				limit = {
					has_subject = CZE
				}
				CZE = {
					country_event = {
						id = germany.125
						hours = 3
					}
				}
			}
		}
	}

	option = { #OPTION FOR WHEN CZE IS ALREADY GERMAN PUPPET
		name = germany.122.c

		trigger = {
			tag = CZE
			is_subject_of = FROM
		}

		effect_tooltip = {
			if = {
				limit = {
					controls_state = 69
				}
				FROM = {
					add_state_core = 69
					transfer_state = 69
				}
			}
			if = {
				limit = {
					controls_state = 972
				}
				FROM = {
					add_state_core = 972
					transfer_state = 972
				}
			}
			if = {
				limit = {
					controls_state = 74
				}
				FROM = {
					add_state_core = 74
					transfer_state = 74
				}
			}
		}

		hidden_effect = {
			FROM = {
				country_event = {
					id = germany.124 days = 1
				}
			}
		}
	}
}


#Events in case of weirdness with German Czechoslovakia focus - Event for GER (They refused to hand over Sudetenland)
country_event = {
	id = germany.123
	title = germany.123.t
	desc = germany.123.d
	picture = GFX_report_event_czech_soldiers_02

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			CZE = {
				GER_set_array_of_sudetenland_targeted_states = yes
			}
		}
	}

	option = {
		name = germany.123.a

		create_wargoal = {
			type = take_state_focus
			target = CZE
			generator = CZE.sudetenland_states_for_wargoal
		}
	}
}


#Events in case of weirdness with German Czechoslovakia focus - Event for GER (They surrender Sudetenland)
country_event = {
	id = germany.124
	title = germany.124.t

	desc = {
		text = germany.124.desc_cze_subject_of_ger
		trigger = {
			tag = CZE
			is_subject_of = FROM
		}
	}

	desc = { #DEFAULT DESC
		text = germany.124.d
	}

	picture = GFX_report_event_german_reichstag_gathering

	is_triggered_only = yes

	option = {
		name = germany.124.a
		
		if = {
			limit = {
				CZE = { controls_state = 69 }
			}
			ROOT = {
				add_state_core = 69
				transfer_state = 69
			}
		}
		if = {
			limit = {
				CZE = { controls_state = 972 }
			}
			ROOT = {
				add_state_core = 972
				transfer_state = 972
			}
		}
		if = {
			limit = {
				CZE = { controls_state = 74 }
			}
			ROOT = {
				add_state_core = 74
				transfer_state = 74
			}
		}

		GER_czechoslovakia_modify_mefo_bills_or_economy_of_conquest = yes
		GER_seize_gold_reserves_in_europe_peacefully = yes

		set_country_flag = sudetenland_acquired #Unused flag for now
	}
}

country_event = { #Overlod of CZE hads away states without consulting CZE
	id = germany.125
	title = germany.125.t
	desc = germany.125.d
	picture = GFX_report_event_crowd_in_prague

	is_triggered_only = yes

	fire_only_once = yes

	option = { #well shit :(
		name = germany.125.a
		ai_chance = {
			base = 10 
		}

		effect_tooltip = {
			
			IF = {
				limit = {
					controls_state = 69
				}
				GER = {
					add_state_core = 69
					transfer_state = 69
				}
			}
				
			IF = {
				limit = {
					controls_state = 972
				}	
				GER = {
					add_state_core = 972
					transfer_state = 972
				}
			}
				
			IF = {
				limit = {
					controls_state = 74
				}
				GER = {
					add_state_core = 74
					transfer_state = 74
				}
			}
		}
	}
}

#Event if Austria has a civil war
country_event = {
	id = germany.126
	title = germany.126.t
	desc = germany.126.d
	picture = GFX_report_event_german_reichstag_gathering

	is_triggered_only = yes

	option = {
		name = germany.126.a
		ai_chance = {
			base = 0
			modifier = {
				add = 1
				OR = {
					has_government = neutrality
					has_government = fascism
				}
			}
		}
		random_other_country = {
			limit = {
				original_tag = AUS
				NOT = { tag = ROOT }
			}
			FROM = {
				add_to_war = {
					targeted_alliance = ROOT
					enemy = PREV
					hostility_reason = war
				}
				annex_country = { target = ROOT transfer_troops = yes }
				hidden_effect = { news_event = { id = news.237 } }
			}
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
	option = {
		name = germany.126.b
		ai_chance = {
			base = 0
			modifier = {
				add = 1
				OR = {
					has_government = communism
					has_government = democratic
				}
			}
		}
		every_country = {
			limit = {
				OR = {
					tag = AUS
					original_tag = AUS
				}
			}
			FROM = {
				create_wargoal = {
					target = PREV
					type = annex_everything
				}
			}
		}
	}
}

# Anti-Soviet Pact, ask Germany to create faction or invite to faction
country_event = {
	id = germany.127
	title = germany.127.t
	desc = germany.127.d
	picture = GFX_report_event_soviet_tanks

	is_triggered_only = yes

	# Create faction (if none) and send requests to join faction (members leave other faction)
	option = {
		name = germany.127.a
		every_other_country = {
			limit = {
				has_idea = anti_soviet_pact
				has_war_with = SOV
			}
			country_event = { id = germany.128 days = 1 }
		}
		if = {
			limit = {
				is_in_faction = no
			}
			create_faction_from_template = {
				template = faction_template_anti_communist
				name = anti_soviet_pact_faction
			}
		}
	}

	# No ty
	option = {
		name = germany.127.b
		ai_chance = {
			base = 0
		}
	}
}

# Anti-Soviet Pact, Germany asks country to join faction
country_event = {
	id = germany.128
	title = germany.128.t
	desc = germany.128.d
	picture = GFX_report_event_soviet_tanks

	is_triggered_only = yes

	# Join faction (if none) and send requests to join faction (members leave other faction)
	option = {
		name = germany.128.a
		trigger = {
			is_in_faction = no
		}
		ai_chance = {
			base = 10
		}
		GER = { add_to_faction = ROOT }
	}

	# No ty
	option = {
		name = germany.128.b
		ai_chance = {
			base = 0
		}
	}
}

# Forming West Germany
country_event = {
	id = germany.200
	title = germany.200.t
	desc = germany.200.desc
	picture = GFX_report_event_german_reichstag_gathering

	fire_only_once = yes


	mean_time_to_happen = {
		days = 10
	}

	trigger = {
		has_global_flag = yalta_agreed_flag
		has_government = democratic
		has_war = no # Don't do this while we are still at war
		SOV = {
			has_government = communism
		}
		IF = {
			# If the GER tag is democratic, use this, otherwise go random
			limit = {
				GER = {
					is_subject = yes 
					has_government = democratic
				}
			}
			any_subject_country = {
				tag = GER
				has_government = democratic 
			}
		}
		ELSE = {
			any_subject_country = {
				original_tag = GER
				has_government = democratic 
			}
		}
			
	}

	option = { #Let's do it
		name = germany.200.a
		ai_chance = {
			base = 100
		}
		add_stability = 0.1
		add_political_power = 100
		add_ideas = GER_western_trade_cooperation

		random_subject_country = {
			limit = {
				original_tag = GER
				has_government = democratic 
			}
			ROOT = {
				set_autonomy = {
					target = PREV
					autonomy_state = autonomy_free
				}
			}
			add_ideas = GER_western_trade_cooperation
			IF = {
				limit = {
					ROOT = { is_faction_leader = yes }
				}
				ROOT = { add_to_faction = PREV }
			}
			set_cosmetic_tag = WGR
			every_other_country = {
				limit = {
					any_subject_country = {
						original_tag = GER
						has_government = democratic 
					}
					NOT = { tag = ROOT }
				}
				country_event = {
					id = germany.201
					hours = 4
					random_hours = 12
				}

			}
			
		}
		# Check if last german democratic puppet
		IF = {
			limit = {
				NOT = {
					any_country = {
						original_tag = GER 
						has_government = democratic
						is_subject = yes 
						exists = yes 
					}
				}
				SOV = {
					any_subject_country = {
						original_tag = GER 
					}
				}
			}
			SOV = {
				country_event = {
					id = germany.202
					days = 14 # Yeah, I know it was way longer in real life, but it makes more sense this way from a game p.o.v
					random_days = 20
				}
			}
		}
			
		
	}

	option = { #Nah, let's not 
		name = germany.200.b
		ai_chance = {
			base = 0
		}
		
	}

}

# This is happening
country_event = {
	id = germany.201
	title = germany.201.t
	desc = germany.201.desc
	picture = GFX_report_event_german_reichstag_gathering
	is_triggered_only = yes 

	trigger = {
		has_global_flag = yalta_agreed_flag
		has_government = democratic
		any_subject_country = {
			original_tag = GER
			has_government = democratic 
		}
	}

	option = { #Let's do it
		name = germany.201.a
		ai_chance = {
			base = 100
		}
		add_stability = 0.1
		add_political_power = 100
		add_ideas = GER_western_trade_cooperation
		random_subject_country= {
			limit = {
				original_tag = GER
				has_government = democratic 
			}
			random_country = {
				limit = {
					original_tag = GER
					has_government = democratic
					is_subject = no 
					has_cosmetic_tag = WGR
				}
				annex_country = {
					target = PREV
					transfer_troops = yes
				}
			}
		}
		IF = {
			limit = {
				NOT = {
					any_country = {
						original_tag = GER 
						has_government = democratic
						is_subject = yes 
						exists = yes 
					}
				}
				SOV = {
					any_subject_country = {
						original_tag = GER 
					}
				}
			}
			SOV = {
				country_event = {
					id = germany.202
					days = 14 # Yeah, I know it was way longer in real life, but it makes more sense this way from a game p.o.v
					random_days = 20
				}
			}
			log = "triggered event to SOV"
		}
		
	}

	option = { #Nah, let's not 
		name = germany.201.b
		ai_chance = {
			base = 0
		}
		add_political_power = -150
		
	}

}

# German Reunification - for Soviet
country_event = {
	id = germany.202
	title = germany.202.t
	desc = germany.202.desc
	picture = GFX_report_event_german_reichstag_gathering
	is_triggered_only = yes 

	trigger = {
		has_global_flag = yalta_agreed_flag
		any_subject_country = {
			original_tag = GER
		}
	}

	option = { #Let's create our own Germany
		name = germany.202.a
		ai_chance = {
			base = 100
		}
		random_subject_country = {
			limit = {
				original_tag = GER
			}
			ROOT = {
				set_autonomy = {
					target = PREV
					autonomy_state = autonomy_free
				}
			}
			IF = {
				limit = { has_government = communism }
				set_cosmetic_tag = DDR
			}
		}
		
	}

	option = { #We don't care 
		name = germany.202.b
		ai_chance = {
			base = 10
		}
		random_subject_country= {
			limit = {
				original_tag = GER
			}
			random_country = {
				limit = {
					original_tag = GER
					has_government = democratic
					is_subject = no 
					has_cosmetic_tag = WGR
				}
				annex_country = {
					target = PREV
					transfer_troops = yes
				}
			}
		}
		
	}

}

#rename city
country_event = {
	id = germany.999
	title = germany.999.t
	desc = germany.999.desc
	picture = GFX_report_event_german_reichstag_gathering

	fire_only_once = yes

	trigger = {
		tag = GER
		GER = {
			has_government = fascism
			owns_state = 217
			owns_state = 195
		}
	}

	option = { #a great idea!
		name = germany.999.a
		ai_chance = {
			base = 100
		}
		set_province_name = { id = 3529 name = "Hindenburg"}
		set_province_name = { id = 3151 name = "Ludendorff"}
		set_global_flag = GER_cities_renamed
	}

	option = { #rather not
		name = germany.999.b
		ai_chance = {
			base = 0
		}
		add_stability = -0.05 #because fuck you
							  #language
	}

}

#reset city name if retaken
country_event = {
	id = germany.1000
	title = germany.1000.t
	desc = germany.1000.desc
	picture = GFX_report_event_german_reichstag_gathering

	hidden = yes

	trigger = {
		SOV = {
			has_government = communism
			owns_state = 217
			owns_state = 195
		}
		OR = {
			has_global_flag = GER_cities_renamed
			has_global_flag = ROM_king_is_silly
		}
	}

	mean_time_to_happen = { days = 2 }

	option = { #a great idea!
		name = germany.1000.a
		ai_chance = {
			base = 100
		}
		reset_province_name = 3529
		reset_province_name = 3151
		clr_global_flag = GER_cities_renamed
		clr_global_flag = ROM_king_is_silly
	}
}

#remove MEFO bills
country_event = {
	id = germany.1001
	title = germany.1001.t
	desc = germany.1001.desc
	picture = GFX_report_event_german_reichstag_gathering

	hidden = yes

	trigger = {
		original_tag = GER
		GER_has_mefo_bills = yes
		any_other_country = {
			has_war_with = GER
			NOT = { original_tag = GER }
		}
	}

	mean_time_to_happen = { days = 2 }

	option = { #remove MEFO
		name = germany.1001.a
		ai_chance = {
			base = 100
		}
		ROOT = {
			GER_remove_mefo_bills = yes
			set_country_flag = mefo_bills_removed_through_war
		}
	}
}

country_event = { #Hand over sudetenland even if we're not czech - Event for controllers of Sudetenland states (or their overlords) that are not CZE (or CZE's overlord) - From GER
	id = germany.1041
	title = germany.1041.t

	desc = { #ALLY / SUBJECT OF GER
		text = germany.1041.desc_ally_or_subject
		trigger = {
			OR = {
				is_in_faction_with = FROM
				is_subject_of = FROM
			}
		}
	}
	desc = { #DEFAULT - NEUTRAL
		text = germany.1041.desc
	}

	picture = GFX_report_event_german_reichstag_gathering

	is_triggered_only = yes

	option = { #SURE
		name = germany.1041.a

		ai_chance = {
			base = 50
		}
		
		effect_tooltip = {
			if = {
				limit = {
					69 = {
						OR = {
							is_controlled_by = ROOT
							controller = {
								is_subject_of = ROOT
							}
						}
					}
				}
				FROM = {
					add_state_core = 69
					transfer_state = 69
				}
			}
			if = {
				limit = {
					972 = {
						OR = {
							is_controlled_by = ROOT
							controller = {
								is_subject_of = ROOT
							}
						}
					}
				}
				FROM = {
					add_state_core = 972
					transfer_state = 972
				}
			}
			if = {
				limit = {
					74 = {
						OR = {
							is_controlled_by = ROOT
							controller = {
								is_subject_of = ROOT
							}
						}
					}
				}
				FROM = {
					add_state_core = 74
					transfer_state = 74
				}
			}
		}

		hidden_effect = {
			FROM = {
				country_event = { id = germany.1042 }
			}
		}
	}

	option = { #NO THX - Subjects of GER can't say no
		name = germany.1041.b

		trigger = {
			NOT = { is_subject_of = FROM }
		}

		ai_chance = {
			base = 5 #No need for long and complicated factors here - it's an edge case
			modifier = {
				factor = 10
				is_historical_focus_on = no
			}
			modifier = {
				factor = 0
				is_in_faction_with = FROM
			}
		}

		effect_tooltip = {
			#WARGOAL ONLY FOR NON-ALLIES
			if = {
				limit = {
					NOT = { is_in_faction_with = FROM }
				}
				if = { # STATES CONTROLLED BY ROOT
					limit = {
						OR = {
							controls_state = 69
							controls_state = 972
							controls_state = 74
						}
					}
					FROM = {
						create_wargoal = {
							type = take_state_focus
							target = ROOT
							expire = 0
							generator = { 69 } #Doesn't matter the exact state, country is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
						}
					}
				}
				if = { # STATES CONTROLLED BY SUBJECT OF ROOT
					limit = {
						any_subject_country = {
							OR = {	
								controls_state = 69	
								controls_state = 972
								controls_state = 74	
							}
						}	
					}
					every_subject_country = {
						limit = {
							OR = {	
								controls_state = 69	
								controls_state = 972
								controls_state = 74	
							}
						}
						FROM = {
							create_wargoal = {
								type = take_state_focus
								target = PREV
								expire = 0
								generator = { 69 } #Doesn't matter the exact state, country is guaranteed to control at least 1 Sudetenland state, and the generators don't show up in tooltips.
							}
						}
					}
				}
			}
		}

		hidden_effect = {
			FROM = {
				country_event = { id = germany.1043 }
			}
		}

	}
}

country_event = { #Handed Over - Event for GER
	id = germany.1042
	title = germany.1042.t
	
	desc = { #SUBJECT OF GER
		text = germany.1042.desc_subject
		trigger = {
			is_subject_of = FROM
		}
	}
	desc = { #ALLY OF GER
		text = germany.1042.desc_ally
		trigger = {
			is_in_faction_with = FROM
		}
	}
	desc = { #DEFAULT - NEUTRAL
		text = germany.1042.desc_default
	}
	
	picture = GFX_report_event_german_reichstag_gathering

	is_triggered_only = yes

	option = { #SURE
		name = germany.1042.a
		
		if = {
			limit = {
				69 = {
					is_controlled_by = FROM
				}
			}
			add_state_core = 69
			transfer_state = 69
		}
		if = {
			limit = {
				972 = {
					is_controlled_by = FROM
				}
			}
			add_state_core = 972
			transfer_state = 972
		}
		if = {
			limit = {
				74 = {
					is_controlled_by = FROM
				}
			}
			add_state_core = 74
			transfer_state = 74
		}

		set_country_flag = sudetenland_acquired #Unused flag for now
	}
}

country_event = { #Handed Over.. NOT - Event for GER
	id = germany.1043
	title = germany.1043.t
	
	desc = { #ALLY / SUBJECT OF GER
		text = germany.1043.desc_ally
		trigger = {
			OR = {
				is_in_faction_with = FROM
				is_subject_of = FROM
			}
		}
	}
	desc = { #DEFAULT - NEUTRAL
		text = germany.1043.desc
	}

	picture = GFX_report_event_german_reichstag_gathering

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			FROM = {
				# Check for Sudetenland states controlled by FROM
				if = {
					limit = {
						OR = {	
							controls_state = 69	
							controls_state = 972
							controls_state = 74	
						}
					}
					GER_set_array_of_sudetenland_targeted_states = yes
				}
				# Check for Sudetenland states controlled by any FROM's subject
				if = {
					limit = {
						any_subject_country = {
							OR = {	
								controls_state = 69	
								controls_state = 972
								controls_state = 74	
							}
						}
					}
					every_subject_country = {
						limit = {
							OR = {	
								controls_state = 69	
								controls_state = 972
								controls_state = 74	
							}
						}
						GER_set_array_of_sudetenland_targeted_states = yes
					}
				}
			}
		}
	}

	option = { #NOPE
		name = germany.1043.a

		if = {
			limit = {
				NOT = { is_in_faction_with = FROM }
			}
			FROM = {
				if = {
					limit = {
						OR = {	
							controls_state = 69	
							controls_state = 972
							controls_state = 74	
						}
					}
					ROOT = {
						create_wargoal = {
							type = take_state_focus
							target = FROM
							generator = FROM.sudetenland_states_for_wargoal
						}
					}
				}
				if = {
					limit = {
						any_subject_country = {
							OR = {	
								controls_state = 69	
								controls_state = 972
								controls_state = 74	
							}
						}
					}
					every_subject_country = {
						limit = {
							OR = {	
								controls_state = 69	
								controls_state = 972
								controls_state = 74	
							}
						}
						ROOT = {
							create_wargoal = {
								type = take_state_focus
								target = PREV
								generator = PREV.sudetenland_states_for_wargoal
							}
						}
					}
				}
			}
		}
	}
}


#country_event = {
#	id = germany.1050
#	title = germany.1050.t
#	desc = germany.1050.desc
#	picture = GFX_report_event_german_reichstag_gathering
#
#	is_triggered_only = yes
#	option = { #Admiral Dönitz
#		name = germany.1050.a
#		retire_country_leader = yes
#		news_event = {
#			id = bba_news.200
#			hours = 1
#		}		
#	}
#	option = { #Albert Speer
#		name = germany.1050.b
#		retire_country_leader = yes
#		news_event = {
#			id = bba_news.200
#			hours = 1
#		}
#	}
#	option = { #Heinz Guderian
#		name = germany.1050.c
#		retire_country_leader = yes
#		news_event = {
#			id = bba_news.200
#			hours = 1
#		}
#	}
#}

country_event = { #Germany wants resource rights for Sweden
	id = AAT_germany.1
	title = AAT_germany.1.t
	desc = AAT_germany.10.desc #Intentional
	picture = GFX_report_event_german_speech
	is_triggered_only = yes
	option = { #No
		name = AAT_germany.1.a
		ai_chance = {
			base = 1
			modifier = {
				date > 1942.12.1
				OR = {
					is_historical_focus_on = yes
					has_government = democratic
				}
				factor = 3
			} 

			modifier = {
				FROM = {
					surrender_progress > 0.1
				}
				factor = 2
			}
			modifier = {
				FROM = {
					surrender_progress > 0.25
				}
				factor = 10
			}

			modifier = {
				FROM = {
					is_ai = no
					surrender_progress < 0.03
				}
				factor = 0
			}
		}

		add_political_power = -25

		FROM = {
			effect_tooltip = {
				create_wargoal = {
					type = take_state_focus
					target = ROOT
					expire = 0
					generator = { 918 666 }
				}
			}
			country_event = { id = AAT_germany.2 hours = 2 }
		}
	}

	option = { #Yes
		ai_chance = {
			base = 30
		}
		name = AAT_germany.1.b

		add_offsite_building = {
			type = industrial_complex
			level = 2
		}

		add_offsite_building = {
			type = arms_factory
			level = 1
		}

		add_timed_idea = {
			idea = GER_german_swedish_trade_agreement
			days = 480
		}

		give_resource_rights = {
			receiver = FROM 
			state = 918 #Västerbotten 
		}

		add_opinion_modifier = {
			target = FROM # target of the relation
			modifier = GER_SWE_historic_trade_Partners
		}

		FROM = {
			add_opinion_modifier = {
				target = PREV # target of the relation
				modifier = GER_SWE_historic_trade_Partners
			}
			country_event = { id = AAT_germany.3 hours = 2 }
		}
	}
}

country_event = { #Rejects deal
	id = AAT_germany.2
	title = AAT_germany.2.t
	desc = AAT_germany.2.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	option = { #NOPE
		name = AAT_germany.2.a
		create_wargoal = {
			type = take_state_focus
			target = FROM
			expire = 0
			generator = { 918 666 }
		}
	}
}


country_event = { #Accepts deal
	id = AAT_germany.3
	title = AAT_germany.3.t
	desc = AAT_germany.3.desc
	picture = [GetHitlerCroatianHandshakeEventPicture]

	is_triggered_only = yes

	option = { #NOPE
		name = AAT_germany.3.a

		effect_tooltip = {
			FROM = {

				add_offsite_building = {
					type = industrial_complex
					level = 2
				}

				add_offsite_building = {
					type = arms_factory
					level = 1
				}

				add_timed_idea = {
					idea = GER_german_swedish_trade_agreement
					days = 480
				}

				give_resource_rights = {
					receiver = PREV 
					state = 918 #Västerbotten 
				}
				add_opinion_modifier = {
					target = PREV # target of the relation
					modifier = GER_SWE_historic_trade_Partners
				}
			}
		}
	}
}

