﻿add_namespace = wtt_germany

# Event starting neutral civil war
country_event = {
	id = wtt_germany.1
	title = wtt_germany.1.t
	desc = wtt_germany.1.d
	picture = GFX_report_event_ger_civil_war

	is_triggered_only = yes
	
	#civil war starts
	option = {
		name = wtt_germany.1.a
		hidden_effect = {

			set_capital = { state = 55 }
			start_civil_war = {
				ruling_party = neutrality
				ideology = fascism
				size = 0.5
				capital = 64
				states = { 64 61 52 53 54 60 65 66 67 68 62 63 5 }
			}
			set_party_name = { ideology = neutrality long_name = GER_neutrality_party_civil_war name = GER_neutrality_party_civil_war }
			load_oob = "GER_German_Civil_War_neutrality"
			random_other_country = {
				limit = {
					original_tag = GER
					has_government = fascism
				}
				set_stability = 0.9
				set_war_support = 0.8
				load_oob = "GER_German_Civil_War_fascist"
			}
			hidden_effect = { news_event = { id = wtt_news.1 hours = 6 } }
			
			add_popularity = {
				ideology = communism
				popularity = 0.2
			}
			add_popularity = {
				ideology = democratic
				popularity = 0.30
			}
			add_popularity = {
				ideology = neutrality
				popularity = 0.35
			}
			add_popularity = {
				ideology = fascism
				popularity = 0.1
			}	
			set_stability = 0.9
			set_war_support = 0.8
		}
		custom_effect_tooltip = GER_fascism_civil_war_tt
		add_stability = -0.25
		hidden_effect = { set_cosmetic_tag = GER_provisional_gvt }
		random_other_country = {
			limit = {
				original_tag = GER
				has_government = fascism
			}
			set_cosmetic_tag = GER_civil_war
			hidden_effect = { activate_mission = GER_mefo_bills_mission }
		}
		GER_august_von_mackensen = {
			add_country_leader_role = {
				country_leader = {
					expire = "1965.1.1"
					ideology = despotism
					traits = {
						great_war_hero
					}
				}
				promote_leader = yes
			}
		}
		hidden_effect = {
			random_other_country = {
				limit = {
					original_tag = GER
					has_government = fascism
				}
				save_event_target_as = fascist_germany_civil_war
				every_unit_leader = {
					set_nationality = GER
				}
			}
			GER = {
				every_unit_leader = {
					limit = {
						OR = {
							has_id = 10
							has_id = 15
							has_id = 20
							has_id = 24
						}
					}
					set_nationality = event_target:fascist_germany_civil_war
				}
			}
			if = {
				limit = {
					is_ai = yes
				}
				add_political_power = 150
				add_equipment_to_stockpile = {
				    type = infantry_equipment
				    amount = 20000
				    producer = GER
				}
				add_equipment_to_stockpile = {
				    type = support_equipment
				    amount = 500
				    producer = GER
				}
				add_equipment_to_stockpile = {
				    type = artillery_equipment
				    amount = 1200
				    producer = GER
				}
			}
		}
	}
}

#Notification event for Spain for getting troops from German Expatriate Communists focus
country_event = {
	id = wtt_germany.2
	title = wtt_germany.2.t
	desc = wtt_germany.2.d
	picture = GFX_report_event_spain_civil_war_volunteers_02

	is_triggered_only = yes
	
	#accept
	option = {
		name = excellent
		add_manpower = 40000
		if = {
			limit = {
				controls_state = 165
			}
			load_oob = "SPR_German_Expatriates_Barcelona" #spawn units in Barcelona
		}
		if = {
			limit = {
				controls_state = 41
				NOT = { controls_state = 165 }
			}
			load_oob = "SPR_German_Expatriates_Madrid" #spawn units in Madrid
		}
	}
}

#Event for Netherlands demanding return of Kaiser
country_event = {
	id = wtt_germany.3
	title = wtt_germany.3.t
	desc = wtt_germany.3.d
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes
	
	#accept
	option = {
		name = wtt_germany.3.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				strength_ratio = { tag = GER ratio > 1.5 }
				OR = {
					GER = { is_ai = no }
					ENG_is_monarchist = no
				}
			}
			modifier = {
				factor = 0.2
				strength_ratio = { tag = GER ratio > 3 }
				OR = {
					GER = { is_ai = no }
					ENG_is_monarchist = no
				}
			}
			modifier = {
				factor = 0
				strength_ratio = { tag = GER ratio > 5 }
				OR = {
					GER = { is_ai = no }
					ENG_is_monarchist = no
				}
			}
			modifier = {
				factor = 0
				ENG_is_monarchist = yes
				GER = { is_ai = yes }
			}
		}
		GER = {
			add_opinion_modifier = {
				target = ROOT
				modifier = GER_netherlands_kaiser_accept_opinion
			}
			country_event = { id = wtt_germany.4 days = 1 }
		}
		FRA = { country_event = { id = wtt_germany.28 } }
	}

	#refuse
	option = {
		name = wtt_germany.3.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				strength_ratio = { tag = GER ratio < 1 }
				OR = {
					GER = { is_ai = no }
					ENG_is_monarchist = no
				}
			}
			modifier = {
				factor = 0.2
				strength_ratio = { tag = GER ratio < 0.5 }
				OR = {
					GER = { is_ai = no }
					ENG_is_monarchist = no
				}
			}
			modifier = {
				factor = 0
				strength_ratio = { tag = GER ratio < 0.2 }
				OR = {
					GER = { is_ai = no }
					ENG_is_monarchist = no
				}
			}
			modifier = {
				factor = 50
				GER = { is_ai = yes }
				ENG_is_monarchist = yes
			}
		}
		set_country_flag = netherlands_refused_return_kaiser
		GER = {
			add_opinion_modifier = {
				target = ROOT
				modifier = GER_netherlands_kaiser_decline_opinion
			}
			country_event = { id = wtt_germany.5 days = 1 }
			hidden_effect = { news_event = { id = wtt_news.2 hours = 30 } }
		}
	}
}

#Notification event for Germany that the Kaiser is returned
country_event = {
	id = wtt_germany.4
	title = wtt_germany.4.t
	desc = wtt_germany.4.d
	picture = GFX_report_event_royal_parade

	is_triggered_only = yes
	
	#accept
	option = {
		name = wtt_germany.4.a
		set_country_flag = kaiser_wilhelm_ii
		GER_wilhelm_ii = {
			add_country_leader_role = {
			country_leader = {
				expire = "1965.1.1"
				ideology = despotism
				traits = {
					anti_democrat
					imperial_connections				}
			}
			promote_leader = yes
			}
		}
		hidden_effect = { 
			news_event = { id = wtt_news.3 hours = 6 } 
			set_cosmetic_tag = GER_neutrality
		}
	}
}

#Netherlands refuses to return the Kaiser!
country_event = {
	id = wtt_germany.5
	title = wtt_germany.5.t
	desc = wtt_germany.5.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes
	
	#War!
	option = {
		ai_chance = {
			factor = 20
			modifier = {
				factor = 0
				ENG_is_monarchist = yes
			}
		}
		name = wtt_germany.5.a
		set_country_flag = germany_war_return_kaiser
		declare_war_on = { target = HOL type = puppet_wargoal_focus }
		FRA = { country_event = { id = wtt_germany.28 } }
	}

	#Back down.
	option = {
		ai_chance = {
			factor = 80
			modifier = {
				factor = 2
				ENG_is_monarchist = yes
			}
		}
		name = wtt_germany.5.b
		hidden_effect = {
			set_country_flag = backed_down_netherlands_kaiser
		}
		GER_wilhelm_iii = {
			add_country_leader_role = {
			country_leader = {
				expire = "1965.1.1"
				ideology = despotism
				traits = {
					popular_figurehead2
				}
			}
			promote_leader = yes
			}
		}
		custom_effect_tooltip = wtt_germany.5_tt
	}
}

#Kaiser returned through war
country_event = {
	id = wtt_germany.6
	title = wtt_germany.6.t
	desc = wtt_germany.6.d
	picture = GFX_report_event_royal_parade

	is_triggered_only = yes

	option = {
		name = wtt_germany.6.a
		clr_country_flag = germany_war_return_kaiser
		HOL = { clr_country_flag = netherlands_refused_return_kaiser }
		set_country_flag = kaiser_wilhelm_ii
		GER_wilhelm_iii = {
			add_country_leader_role = {
			country_leader = {
				expire = "1965.1.1"
				ideology = despotism
				traits = {
					popular_figurehead2
				}
			}
			promote_leader = yes
			}
		}
		hidden_effect = { 
			news_event = { id = wtt_news.4 hours = 6 } 
			set_cosmetic_tag = GER_neutrality
		}
	}
}

#Notification event for Hungary and Romania for Integrate War Economies
country_event = {
	id = wtt_germany.7
	title = wtt_germany.7.t
	desc = wtt_germany.7.d
	picture = GFX_report_event_tank_factory

	is_triggered_only = yes

	option = {
		name = wtt_germany.7.a
		effect_tooltip = {
			if = {
				limit = { 
					tag = HUN
				}
				GER = { puppet = HUN }
			}
			if = {
				limit = { 
					tag = ROM
				}
				GER = { puppet = ROM }
			}
			every_state = {
				limit = { has_state_flag = GER_integrate_war_economies }
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
		}
	}
}

# Event for Italy Offering Support for Coup
country_event = {
	id = wtt_germany.8
	title = wtt_germany.8.t
	desc = wtt_germany.8.d
	picture = GFX_report_event_french_resistance_02

	is_triggered_only = yes

	# Accept
	option = {
		name = wtt_germany.8.a
		ai_chance = {
			factor = 100
		}
		add_timed_idea = { idea = GER_preparing_ITA_coup days = 1095 }
		GER = {
			country_event = { id = wtt_germany.9 days = 1 random_days = 2 }
		}
	}

	# Decline
	option = {
		name = wtt_germany.8.b
		ai_chance = {
			factor = 0
		}
		GER = {
			country_event = { id = wtt_germany.10 days = 1 random_days = 2 }
		}
		hidden_effect = {
			GER = {	
				set_country_flag = GER_italy_declined_assassination_of_mussolini_flag
			}
		}
	}
}

# German Notification Event for Italy Accepting Offer of Support for Coup
country_event = {
	id = wtt_germany.9
	title = wtt_germany.9.t
	desc = wtt_germany.9.d
	picture = GFX_report_event_french_resistance_02

	is_triggered_only = yes

	# Great
	option = {
		name = wtt_germany.9.a
	}
}

# German Notification Event for Italy Rejecting Offer of Support for Coup
country_event = {
	id = wtt_germany.10
	title = wtt_germany.10.t
	desc = wtt_germany.10.d
	picture = GFX_report_event_french_resistance_02

	is_triggered_only = yes

	# Drat
	option = {
		name = wtt_germany.10.a
	}
}

# Event for Italy Launching Coup
country_event = {
	id = wtt_germany.11
	title = wtt_germany.11.t
	desc = wtt_germany.11.d
	picture = GFX_report_event_french_resistance_02

	is_triggered_only = yes

	# It is done (no choice needed because decision was taken in previous focus's events)
	option = {
		name = wtt_germany.11.a
		set_politics = { ruling_party = neutrality elections_allowed = no }
		add_popularity = { ideology = neutrality popularity = 0.1 }
		swap_ideas = {
			remove_idea = GER_preparing_ITA_coup
			add_idea = GER_preparing_ITA_coup2
		}
		remove_ideas = vittorio_emanuele
		ITA_vittorio_emanuele_iii = {
			promote_character = { ideology = despotism }
		}
		
		hidden_effect = {
			retire_character = ITA_benito_mussolini
			if = {
				limit = {
					has_any_power_balance = yes
				}
				set_power_balance = {
					id = ITA_power_balance
					right_side = ITA_king_side
					set_value = 0.1
				}
			}
		}
		add_ai_strategy = {
			type = alliance
			id = "GER"			
			value = 200
		}	
		GER = {
			add_to_faction = ITA
			country_event = { id = wtt_germany.12 }
		}
	}
}

# Notification event for Germany upon successful coup
country_event = {
	id = wtt_germany.12
	title = wtt_germany.12.t
	desc = wtt_germany.12.d
	picture = GFX_report_event_french_resistance_02

	is_triggered_only = yes

	# Great
	option = {
		name = wtt_germany.12.a
		hidden_effect = { news_event = { id = wtt_news.5 hours = 6 } }
	}
}

# Notification event for Germany upon formation of Austria-Hungary
country_event = {
	id = wtt_germany.13
	title = wtt_germany.13.t
	desc = wtt_germany.13.d
	picture = GFX_report_event_generic_parliament

	is_triggered_only = yes

	# Great
	option = {
		name = wtt_germany.13.a
		hidden_effect = { news_event = { id = wtt_news.6 hours = 6 } }
	}
}

# Danzig for Guarantees event for Poland
country_event = {
	id = wtt_germany.14
	title = wtt_germany.14.t
	desc = wtt_germany.14.d
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes

	# Accept
	option = {
		name = wtt_germany.14.a
		ai_chance = {
			factor = 50
		}
		effect_tooltip = {
			GER = { transfer_state = 85 }
			GER = { transfer_state = 807 }
			GER = { transfer_state = 86 }
			GER = { transfer_state = 762 }
			GER = { transfer_state = 807 }
			GER = { add_ideas = anti_soviet_pact }
			add_ideas = anti_soviet_pact
			add_opinion_modifier = { target = GER modifier = danzig_for_guarantees }
		}
		GER = {
			country_event = { id = wtt_germany.15 days = 1 }
		}
	}

	# Decline
	option = {
		name = wtt_germany.14.b
		ai_chance = {
			#factor = 50
			modifier = {
				factor = 0.5
				strength_ratio = { tag = GER ratio < 1 }
			}
			modifier = {
				factor = 0.2
				strength_ratio = { tag = GER ratio < 0.5 }
			}
			modifier = {
				factor = 0.5
				GER = { strength_ratio = { tag = SOV ratio > 0.8 } }
			}
			modifier = {
				factor = 0
				GER = { strength_ratio = { tag = SOV ratio > 0.8 } }
				strength_ratio = { tag = GER ratio < 0.5 }
			}
		}
		GER = {
			country_event = { id = wtt_germany.16 days = 1 }
		}
	}
}

# Danzig for Guarantees acceptance event for Germany
country_event = {
	id = wtt_germany.15
	title = wtt_germany.15.t
	desc = wtt_germany.15.d
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes

	# Great
	option = {
		name = wtt_germany.15.a
		transfer_state = 85
		transfer_state = 807
		transfer_state = 86
		transfer_state = 762
		transfer_state = 807
		add_state_core = 85
		add_state_core = 86
		add_state_core = 762
		add_state_core = 807
		86 = { set_state_name = "Posen" }
		set_province_name = { id = 6558 name = "Posen" }
		762 = { set_state_name = "Kattowitz" }
		add_ideas = anti_soviet_pact
		POL = { 
			add_ideas = anti_soviet_pact
			add_opinion_modifier = { target = GER modifier = danzig_for_guarantees }
		}
		hidden_effect = {
			news_event = { id = wtt_news.7 hours = 6 }
			set_country_flag = poland_traded_danzig
			POL = {
				add_ai_strategy = {
					type = befriend
					id = ROOT
					value = 200
				}
				add_ai_strategy = {
					type = alliance
					id = ROOT
					value = 200
				}
				add_ai_strategy = {
					type = befriend
					id = ENG
					value = -200
				}
				add_ai_strategy = {
					type = alliance
					id = ENG
					value = -200
				}
			}
		}
	}
}

# Danzig for Guarantees rejection event for Germany
country_event = {
	id = wtt_germany.16
	title = wtt_germany.16.t
	desc = wtt_germany.16.d
	picture = GFX_report_event_poland_rejects

	is_triggered_only = yes

	# We will never let go of our claims!
	option = {
		name = wtt_germany.16.a
		add_state_claim = 85
		add_state_claim = 86
		add_state_claim = 762
	}

	# Give it up
	option = {
		name = wtt_germany.16.b
	}
}

# Notification event for France on German expatriation of Communists
country_event = {
	id = wtt_germany.17
	title = wtt_germany.17.t
	desc = wtt_germany.17.d
	picture = GFX_report_event_gathering_protest

	is_triggered_only = yes

	# Oh dear
	option = {
		name = wtt_germany.17.a
		effect_tooltip = {
			if = {
				limit = {
					FRA = { 
						NOT = { has_completed_focus = FRA_ban_communism }
					}
				}
				FRA = {
					add_timed_idea = {
						idea = GER_communist_refugees_3
						days = 720
					}
				}
			}
			if = {
				limit = {
					FRA = { 
						has_completed_focus = FRA_ban_communism
					}
				}
				FRA = {
					add_timed_idea = {
						idea = GER_communist_refugees_2
						days = 1095
					}
				}
			}
		}
	}
}

# Event for end of civil war
country_event = {
	id = wtt_germany.18
	title = wtt_germany.18.t
	desc = wtt_germany.18.d
	picture = GFX_report_event_fascists_posing

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			news_event = { id = wtt_news.8 hours = 6 }
			set_global_flag = GER_civil_war_end
		}
	}

	# Execute head nazis Publically
	option = {
		name = wtt_germany.18.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				OR = {
					has_country_flag = GER_AI_RANDOM_DEMOCRATIC
					has_game_rule = {
						rule = GER_ai_behavior
						option = DEMOCRATIC
					}
				}
			}
		}
		add_stability = 0.05
		add_popularity = { ideology = neutrality popularity = 0.05 }
		add_popularity = { ideology = democratic popularity = 0.05 }
		delete_unit_template_and_units = { division_template = "Landsturmregiment" }
		if = { 
			limit = { is_faction_leader = yes } 
			leave_faction = yes
		}
	}

	# Imprison head nazis for life
	option = {
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				OR = {
					has_country_flag = GER_AI_RANDOM_KAISER
					has_game_rule = {
						rule = GER_ai_behavior
						option = KAISER
					}
				}
			}
		}
		name = wtt_germany.18.b
		add_political_power = 150
		add_popularity = { ideology = fascism popularity = 0.05 }
		set_country_flag = GER_imprisoned_fascist_leadership
		delete_unit_template_and_units = { division_template = "Landsturmregiment" }
		if = { 
			limit = { is_faction_leader = yes } 
			leave_faction = yes
		}
	}
}

# Event for Soviet Union on Great Red Menace
country_event = {
	id = wtt_germany.19
	title = wtt_germany.19.t
	desc = wtt_germany.19.d
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	# Hold massive military exercises to intimidate the Germans into shutting up
	option = {
		name = wtt_germany.19.a
		ai_chance = {
			factor = 90
		}
		add_named_threat = { threat = 10 name = GER_soviet_military_exercises }
		add_timed_idea = { idea = GER_soviet_military_exercises days = 365 }
		army_experience = 50
		add_political_power = 100
		hidden_effect = { news_event = { id = wtt_news.9 hours = 6 } }
	}

	# Reduce tensions
	option = {
		name = wtt_germany.19.b
		ai_chance = {
			factor = 5
		}
		add_named_threat = { threat = -5 name = GER_soviet_smoothes_relationships }
		add_political_power = -50
		every_country = {
			limit = {
				has_idea = GER_the_great_red_menace
			}
			country_event = { id = wtt_germany.25 days = 1 random_days = 2 }
			random_list = {
				80 = {
					# No effect
				}
				20 = {
					remove_ideas = GER_the_great_red_menace
				}
			}
		}
		GER = { country_event = { id = wtt_germany.25 days = 1 random_days = 2 } }
	}

	# Do nothing
	option = {
		name = wtt_germany.19.c
		ai_chance = {
			factor = 5
		}
	}
}

# Event for Soviet Union on Central European Alliance
country_event = {
	id = wtt_germany.20
	title = wtt_germany.20.t
	desc = wtt_germany.20.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	# Public statement re-iterating Baltics, Poland, Finland, and Romania as part of Soviet sphere
	option = {
		name = wtt_germany.20.a
		ai_chance = {
			factor = 90
		}
		add_named_threat = { threat = 5 name = GER_soviet_reiterated_claims }
		add_timed_idea = { idea = GER_soviet_protect_our_sphere days = 365 }
		add_political_power = 100
		every_state = {
			limit = {
				OR = {
					is_in_array = { LIT.game_start_core_states = THIS }
					is_in_array = { LAT.game_start_core_states = THIS }
					is_in_array = { EST.game_start_core_states = THIS }
					AND = {
						is_in_array = { POL.game_start_core_states = THIS }	
						any_neighbor_state = { is_core_of = SOV }
					}
					AND = {
						is_in_array = { ROM.game_start_core_states = THIS }	
						any_neighbor_state = { is_core_of = SOV }
					}					
				}
			}
		}
		hidden_effect = { news_event = { id = wtt_news.10 hours = 6 } }
	}

	# We must hold back
	option = {
		name = wtt_germany.20.b
		ai_chance = {
			factor = 10
		}
	}
}

# Event for Soviet Union upon membership of Baltics
country_event = {
	id = wtt_germany.21
	title = wtt_germany.21.t
	desc = wtt_germany.21.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	# Public statement on threat against Soviet sphere - Union will take action
	option = {
		name = wtt_germany.21.a
		ai_chance = {
			factor = 90
		}
		add_named_threat = { threat = 10 name = GER_soviet_securing_sphere }
		add_political_power = 100
		create_wargoal = {
			type = annex_everything
			target = FIN
		}
		create_wargoal = {
			type = annex_everything
			target = POL
		}
		hidden_effect = { news_event = { id = wtt_news.11 hours = 6 } }
	}

	# We must hold back
	option = {
		name = wtt_germany.21.b
		ai_chance = {
			factor = 10
			modifier = {
				has_war = no
				factor = 0
			}
		}
	}
}

# Event for Soviet Union upon membership of Poland
country_event = {
	id = wtt_germany.22
	title = wtt_germany.22.t
	desc = wtt_germany.21.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	# Public statement on threat against Soviet sphere - Union will take action
	option = {
		name = wtt_germany.21.a
		ai_chance = {
			factor = 90
		}
		add_named_threat = { threat = 10 name = GER_soviet_securing_sphere }
		add_political_power = 100
		create_wargoal = {
			type = annex_everything
			target = FIN
		}
		create_wargoal = {
			type = annex_everything
			target = EST
		}
		create_wargoal = {
			type = annex_everything
			target = LAT
		}
		create_wargoal = {
			type = annex_everything
			target = LIT
		}
		hidden_effect = { news_event = { id = wtt_news.11 hours = 6 } }
	}

	# We must hold back
	option = {
		name = wtt_germany.21.b
		ai_chance = {
			factor = 10
			modifier = {
				has_war = no
				factor = 0
			}
		}
	}
}

# Event for Soviet Union upon membership of Finland
country_event = {
	id = wtt_germany.23
	title = wtt_germany.23.t
	desc = wtt_germany.21.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	# Public statement on threat against Soviet sphere - Union will take action
	option = {
		name = wtt_germany.21.a
		ai_chance = {
			factor = 90
		}
		add_named_threat = { threat = 10 name = GER_soviet_securing_sphere }
		add_political_power = 100
		create_wargoal = {
			type = annex_everything
			target = EST
		}
		create_wargoal = {
			type = annex_everything
			target = LAT
		}
		create_wargoal = {
			type = annex_everything
			target = LIT
		}
		create_wargoal = {
			type = annex_everything
			target = POL
		}
		hidden_effect = { news_event = { id = wtt_news.11 hours = 6 } }
	}

	# We must hold back
	option = {
		name = wtt_germany.21.b
		ai_chance = {
			factor = 10
			modifier = {
				has_war = no
				factor = 0
			}
		}
	}
}

# Event for all nations receiving the Great Red Menace
country_event = {
	id = wtt_germany.24
	title = wtt_germany.24.t
	desc = wtt_germany.24.d
	picture = GFX_report_event_german_politician_speech

	is_triggered_only = yes

	# Oh dear
	option = {
		name = wtt_germany.24.a
		effect_tooltip = { add_ideas = GER_the_great_red_menace }
	}
}

# Event for all nations with Great Red Menace if Soviet smoothes relations
country_event = {
	id = wtt_germany.25
	title = wtt_germany.25.t
	desc = wtt_germany.25.d
	picture = GFX_report_event_communist_leader

	is_triggered_only = yes

	# Oh dear
	option = {
		name = wtt_germany.25.a
	}
}

# Wilhelm II dies
country_event = {
	id = wtt_germany.26
	title = wtt_germany.26.t
	desc = wtt_germany.26.d
	picture = GFX_report_event_generic_funeral

	fire_only_once = yes
	
	trigger = {
		original_tag = GER
		has_government = neutrality
		date > 1939.1.1
		has_country_leader = { ruling_only = yes character = GER_wilhelm_ii }
	}

	mean_time_to_happen = {
		days = 1460	# Died in 1941
	}
	
	#ok I guess
	option = {
		name = wtt_germany.26.a
		kill_country_leader = yes
		GER_wilhelm_iii = {
			add_country_leader_role = {
			country_leader = {
				expire = "1965.1.1"
				ideology = despotism
				traits = {
					popular_figurehead2
				}
			}
			promote_leader = yes
			}
		}
	}
}

# Von Mackensen dies
country_event = {
	id = wtt_germany.27
	title = wtt_germany.27.t
	desc = wtt_germany.27.d
	picture = GFX_report_event_generic_funeral

	fire_only_once = yes
	
	trigger = {
		tag = GER
		has_government = neutrality
		date > 1940.1.1
		has_country_leader = { ruling_only = yes character = GER_august_von_mackensen }
	}

	mean_time_to_happen = {
		days = 1825	# Died in 1945
	}
	
	#nooooo sadface :(
	option = {
		name = wtt_germany.26.a
		kill_country_leader = yes
		set_country_flag = GER_mackensen_dead
		GER_wilhelm_iii = {
			add_country_leader_role = {
			country_leader = {
				expire = "1965.1.1"
				ideology = despotism
				traits = {
					popular_figurehead2
				}
			}
			promote_leader = yes
			}
		}
	}
}

### Allied response to inviting the kaiser

# French Response
country_event = {
	id = wtt_germany.28
	title = wtt_germany.28.t
	desc = {
		text = wtt_germany.28.d
		trigger = {
			NOT = { GER = { has_country_flag = germany_war_return_kaiser } }
		}
	}
	desc = {
		text = wtt_germany.28.d.2
		trigger = {
			GER = { has_country_flag = germany_war_return_kaiser }
		}
	}
	picture = GFX_report_event_german_troops
	
	is_triggered_only = yes
	
	option = { # This means war!
		name = germany.60.a
		trigger = {
			NOT = { GER = { has_country_flag = germany_war_return_kaiser } }
		}
		ai_chance = { 
			factor = 1 
			modifier = {
				factor = 10
				strength_ratio = {
					tag = GER
					ratio > 0.7
				}
				NOT = { has_idea = FRA_disjointed_government }
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = GER
					ratio > 1
				}
				NOT = { has_idea = FRA_disjointed_government }
			}
		}
		add_political_power = -150
		add_stability = -0.1
		if = {
			limit = {
				ENG = {
					is_puppet = no
					NOT = { has_war_with = FRA }
				}
			}
			ENG = {
				country_event = wtt_germany.29
				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 = { # This means war! (in case of German war on HOL)
		name = germany.60.c
		trigger = {
			GER = { has_country_flag = germany_war_return_kaiser }
		}
		ai_chance = { 
			factor = 1 
			modifier = {
				factor = 10
				strength_ratio = {
					tag = GER
					ratio > 0.7
				}
				NOT = { has_idea = FRA_disjointed_government }
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = GER
					ratio > 1
				}
				NOT = { has_idea = FRA_disjointed_government }
			}
			modifier = {
				factor = 20
				GER = { has_country_flag = germany_war_return_kaiser }
			}
		}
		add_political_power = -150
		add_stability = -0.1
		if = {
			limit = {
				ENG = {
					is_puppet = no
					NOT = { has_war_with = FRA }
				}
			}
			ENG = {
				country_event = wtt_germany.29
				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 = { 
			factor = 99 
			modifier = {
				has_global_flag = GER_has_started_war
				factor = 0
			}
		}
		ENG = { country_event = wtt_germany.30 }
		add_opinion_modifier = { target = GER modifier = protest_action }
	}
}

# British Response (French Press for War)
country_event = {
	id = wtt_germany.29
	title = wtt_germany.28.t
	desc = {
		text = wtt_germany.29.d
		trigger = {
			NOT = { GER = { has_country_flag = germany_war_return_kaiser } }
		}
	}
	desc = {
		text = wtt_germany.29.d.2
		trigger = {
			GER = { has_country_flag = germany_war_return_kaiser }
		}
	}
	picture = GFX_report_event_german_troops
	
	is_triggered_only = yes
	
	option = { # War out of the question
		name = germany.61.a
		ai_chance = { 
			factor = 90 
			modifier = {
				has_global_flag = GER_has_started_war
				factor = 0
			}
		}
		FRA = { 
			country_event = { hours = 6 id = wtt_germany.31 }
		}
	}
	option = { # Support France
		name = germany.61.b
		trigger = {
			NOT = { GER = { has_country_flag = germany_war_return_kaiser } }
			NOT = { has_completed_focus = ENG_a_change_in_course }
		}
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 10
				strength_ratio = {
					tag = GER
					ratio > 0.7
				}
			} 
			modifier = {
				factor = 4
				GER = { has_country_flag = germany_war_return_kaiser }
			}
		}
		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 = wtt_germany.32 }
		}
	}
	option = { # Support France (war with HOL)
		name = germany.61.c
		trigger = {
			GER = { has_country_flag = germany_war_return_kaiser }
			NOT = { has_completed_focus = ENG_a_change_in_course }
		}
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 10
				strength_ratio = {
					tag = GER
					ratio > 0.7
				}
			} 
			modifier = {
				factor = 20
				GER = { has_country_flag = germany_war_return_kaiser }
			}
		}
		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 = wtt_germany.32 }
		}
	}
}

# British Response (French Want Peace)
country_event = {
	id = wtt_germany.30
	title = wtt_germany.28.t
	desc = wtt_germany.30.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 } }
		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 }
	}
}

# France (Britain Refuses Support)
country_event = {
	id = wtt_germany.31
	title = germany.63.t
	desc = wtt_germany.31.d
	picture = GFX_report_event_chamberlain_announce
	
	
	is_triggered_only = yes
	
	option = { # Push Ahead
		name = germany.63.a
		ai_chance = { 
			factor = 60
			modifier = {
				factor = 3
				strength_ratio = {
					tag = GER
					ratio > 1.0
				}
				NOT = { has_idea = FRA_disjointed_government }
			}
			modifier = {
				factor = 0
				has_idea = FRA_disjointed_government
			}			
		}		
		GER = { country_event = wtt_germany.34 }
		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 = wtt_germany.35 }
		add_opinion_modifier = { target = GER modifier = protest_action }
	}
}

# France (Britain Gives Support)
country_event = {
	id = wtt_germany.32
	title = germany.64.t
	desc = wtt_germany.32.d
	picture = GFX_report_event_british_inspect_troops
	
	is_triggered_only = yes
	
	option = {
		name = germany.64.a
		GER = { country_event = wtt_germany.33 }
		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 = wtt_germany.33
	title = germany.65.t
	desc = wtt_germany.33.d
	picture = GFX_report_event_british_artillery
	
	is_triggered_only = yes
	
	option = {
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				strength_ratio = {
					tag = FRA
					ratio < 1
				}
				strength_ratio = {
					tag = ENG
					ratio < 1
				}
			}
		}
		name = wtt_germany.33.a
		FRA = {
			declare_war_on = {
				target = GER
				type = take_state_focus
				generator = { 42 51 } 
			}
			country_event = wtt_germany.37
			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 = wtt_news.12 hours = 6 }
		}
	}
	option = {
		name = germany.65.b
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				strength_ratio = {
					tag = FRA
					ratio > 1
				}
				strength_ratio = {
					tag = ENG
					ratio > 1
				}
			}
		}
		hidden_effect = {
			news_event = { id = wtt_news.13 hours = 6 }
		}
		set_country_flag = GER_rhineland_backed_down
		if = {
			limit = {
				has_country_flag = kaiser_wilhelm_ii
			}
			GER_wilhelm_iii = {
				add_country_leader_role = {
				country_leader = {
					expire = "1965.1.1"
					ideology = despotism
					traits = {}
				}
				promote_leader = yes
				}
			}
		}
		white_peace = HOL
		add_timed_idea = {
			idea = kaiser_challenge_met
			days = 183
		}
	}
}

# Germany (France goes to war)
country_event = {
	id = wtt_germany.34
	title = germany.66.t
	desc = wtt_germany.34.d
	picture = GFX_report_event_degaulle_inspect_troops
	
	is_triggered_only = yes
	
	option = {
		name = wtt_germany.33.a
		add_war_support = 0.1 #original German clay
		ENG = { 
			country_event = wtt_germany.36 
			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 = wtt_germany.37
			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 = wtt_news.14 hours = 6 }
		}
	}

	option = {
		name = germany.65.b
		hidden_effect = {
			news_event = { id = wtt_news.15 hours = 6 }
		}
		set_country_flag = GER_rhineland_backed_down
		add_war_support = -0.2 #That was scary for a moment there!
		if = {
			limit = {
				has_country_flag = kaiser_wilhelm_ii
			}
			GER_wilhelm_iii = {
				add_country_leader_role = {
				country_leader = {
					expire = "1965.1.1"
					ideology = despotism
					traits = {}
				}
				promote_leader = yes
				}
			}
		}
		add_timed_idea = {
			idea = rhineland_challenge_met
			days = 183
		}
	}
}

# Britain (France Backs Down)
country_event = {
	id = wtt_germany.35
	title = germany.67.t
	desc = germany.67.d
	picture = GFX_report_event_german_inspect_troops
	
	is_triggered_only = yes
	
	option = {
		name = germany.67.a
		add_opinion_modifier = { target = GER modifier = protest_action }
		GER = {
			add_war_support = 0.1
		}
	}
}

# Britain (France Goes Ahead Anyway)
country_event = {
	id = wtt_germany.36
	title = germany.68.t
	desc = germany.68.d
	picture = GFX_report_event_french_liberation
	
	is_triggered_only = yes
	
	option = {
		name = germany.68.a
	}
}

# France/England (Germany Refuses Ultimatum)
country_event = {
	id = wtt_germany.37
	title = germany.92.t
	desc = wtt_germany.35.d
	picture = GFX_report_event_worried_french
	
	is_triggered_only = yes
	
	option = {
		name = germany.92.a
	}
}

### Tsingtao return

#China

# Germans demand return of Tsingtao
country_event = {
	id = wtt_germany.38
	title = wtt_germany.38.t
	desc = wtt_germany.38.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Demand continued support of Von Falkenhausen in return
	option = {
		name = wtt_germany.38.a
		ai_chance = {
			factor = 80
		}
		trigger = {
			event_target:WTT_current_china_leader = {
				OR = {
					has_idea = german_advisors 
					has_completed_focus = CHI_give_falkenhausen_citizenship
				}
			}
		}
		GER = { country_event = { id = wtt_germany.39 days = 1 } }
	}

	# Accept
	option = {
		name = wtt_germany.38.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_war_with = JAP
			}
		}
		effect_tooltip = {
			GER = { transfer_state = 743 }
			743 = { set_state_name = "Tsingtao" }
			set_province_name = { id = 10000 name = "Tsingtao" }
		}
		GER = { country_event = { id = wtt_germany.48 days = 1 } }
		hidden_effect = { news_event = { id = wtt_news.16 hours = 30 } }
	}

	# No!
	option = {
		name = wtt_germany.38.c
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_war_with = JAP
			}
		}
		GER = { country_event = { id = wtt_germany.40 days = 1 } }
	}
}

# China demands continued support of Von Falkenhausen in return
country_event = {
	id = wtt_germany.39
	title = wtt_germany.39.t
	desc = wtt_germany.39.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Accept
	option = {
		name = wtt_germany.39.a
		set_country_flag = GER_von_falkenhausen_promise_to_china
		transfer_state = 743
		743 = { set_state_name = "Tsingtao" }
		set_province_name = { id = 10000 name = "Tsingtao" }
		FROM = { country_event = { id = wtt_germany.41 } }
	}

	# No!
	option = {
		name = wtt_germany.39.b
		FROM = { country_event = { id = wtt_germany.42 } }
	}
}

# German notification event that China rejected request
country_event = {
	id = wtt_germany.40
	title = wtt_germany.40.t
	desc = wtt_germany.40.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Too bad
	option = {
		name = wtt_germany.40.a
		add_state_claim = 743
	}
}

# Chinese notification event that Germany accepted offer
country_event = {
	id = wtt_germany.41
	title = wtt_germany.41.t
	desc = wtt_germany.41.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# excellent
	option = {
		name = excellent
		hidden_effect = { news_event = { id = wtt_news.16 hours = 6 } }
	}
}

# Chinese notification event that Germany rejected offer
country_event = {
	id = wtt_germany.42
	title = wtt_germany.42.t
	desc = wtt_germany.42.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Too bad
	option = {
		name = unfortunate
	}
}

# Japan 

# Germans demand return of Tsingtao
country_event = {
	id = wtt_germany.43
	title = wtt_germany.43.t
	desc = wtt_germany.43.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Demand Germans withdraw support of Von Falkenhausen to China in return
	option = {
		name = wtt_germany.43.a
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0
				NOT = { has_war_with = CHI }
			}
		}
		trigger = {
			CHI = { has_idea = german_advisors }
		}
		GER = { country_event = { id = wtt_germany.44 days = 1 } }
	}

	# Accept
	option = {
		name = wtt_germany.38.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_war_with = CHI
			}
		}
		effect_tooltip = {
			GER = { transfer_state = 743 }
			743 = { set_state_name = "Tsingtao" }
			set_province_name = { id = 10000 name = "Tsingtao" }
		}
		GER = { country_event = { id = wtt_germany.48 days = 1 } }
		hidden_effect = { news_event = { id = wtt_news.17 hours = 30 } }
	}

	# No!
	option = {
		name = wtt_germany.43.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				has_war_with = CHI
			}
		}
		GER = { country_event = { id = wtt_germany.45 days = 1 } }
	}
}

# Japan demands withdraw support of Von Falkenhausen in return
country_event = {
	id = wtt_germany.44
	title = wtt_germany.44.t
	desc = wtt_germany.44.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Accept
	option = {
		name = wtt_germany.39.a
		transfer_state = 743
		743 = { set_state_name = "Tsingtao" }
		set_province_name = { id = 10000 name = "Tsingtao" }
		JAP = { country_event = { id = wtt_germany.46 } }
		CHI = {
			country_event = { days = 1 id = china.2 }
			effect_tooltip = {
				remove_ideas = german_advisors
				show_ideas_tooltip = german_advisors
			}
		}
		hidden_effect = { 
			every_other_country = {
				limit = {
					has_character = CHI_alexander_von_falkenhausen
				}
				retire_character = CHI_alexander_von_falkenhausen
			}
		}
		set_global_flag = falkenhausen_recalled
	}

	# No!
	option = {
		name = wtt_germany.39.b
		JAP = { country_event = { id = wtt_germany.47 } }
	}
}

# German notification event that Japan rejected request
country_event = {
	id = wtt_germany.45
	title = wtt_germany.40.t
	desc = wtt_germany.40.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Too bad
	option = {
		name = wtt_germany.40.a
		add_state_claim = 743
	}
}

# Japanese notification event that Germany accepted offer
country_event = {
	id = wtt_germany.46
	title = wtt_germany.41.t
	desc = wtt_germany.46.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# excellent
	option = {
		name = excellent
		hidden_effect = { news_event = { id = wtt_news.17 hours = 6 } }
	}
}

# Japanese notification event that Germany rejected offer
country_event = {
	id = wtt_germany.47
	title = wtt_germany.42.t
	desc = wtt_germany.42.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Too bad
	option = {
		name = unfortunate
	}
}

# German notification event that China/Japan acceded to demands
country_event = {
	id = wtt_germany.48
	title = wtt_germany.48.t
	desc = wtt_germany.48.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	# Too bad
	option = {
		name = excellent
		transfer_state = 743
		743 = { set_state_name = "Tsingtao" }
		set_province_name = { id = 10000 name = "Tsingtao" }
	}
}

### Germany Civil War Events

# Nazis fall back from state, heavy fighting/scorched earth destroys infrastructure and industry
state_event = {
	id = wtt_germany.49
	title = wtt_germany.49.t
	desc = wtt_germany.49.desc
	picture = GFX_report_event_ger_civil_war
	
	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			random_state = {
				limit = {
					OR = {
						has_state_flag = nazi_state_withdrawn
					}
				}
				clr_state_flag = nazi_state_withdrawn
				save_event_target_as = nazi_state_withdrawn
			}
			event_target:nazi_state_withdrawn = {
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn1
					}
					damage_building = { type = industrial_complex damage = 0.5 }
					damage_building = { type = arms_factory damage = 0.5 }
					damage_building = { type = infrastructure damage = 0.5 }
				}
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn2
					}
					damage_building = { type = industrial_complex damage = 0.8 }
					damage_building = { type = arms_factory damage = 0.8 }
					damage_building = { type = infrastructure damage = 0.8 }
				}
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn3
					}
					damage_building = { type = industrial_complex damage = 1.2 }
					damage_building = { type = arms_factory damage = 1.2 }
					damage_building = { type = infrastructure damage = 1.2 }
				}
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn4
					}
					damage_building = { type = industrial_complex damage = 1.8 }
					damage_building = { type = arms_factory damage = 1.8 }
					damage_building = { type = infrastructure damage = 1.8 }
				}
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn5
					}
					damage_building = { type = industrial_complex damage = 2.5 }
					damage_building = { type = arms_factory damage = 2.5 }
					damage_building = { type = infrastructure damage = 2.5 }
				}
			}
		}
	}
	
	# Hey! That's a Russian tactic, you bastards!
	option = {
		name = wtt_germany.49.a
		effect_tooltip = {
			event_target:nazi_state_withdrawn = {
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn1
					}
					damage_building = { type = industrial_complex damage = 0.5 }
					damage_building = { type = arms_factory damage = 0.5 }
					damage_building = { type = infrastructure damage = 0.5 }
				}
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn2
					}
					damage_building = { type = industrial_complex damage = 0.8 }
					damage_building = { type = arms_factory damage = 0.8 }
					damage_building = { type = infrastructure damage = 0.8 }
				}
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn3
					}
					damage_building = { type = industrial_complex damage = 1.2 }
					damage_building = { type = arms_factory damage = 1.2 }
					damage_building = { type = infrastructure damage = 1.2 }
				}
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn4
					}
					damage_building = { type = industrial_complex damage = 1.8 }
					damage_building = { type = arms_factory damage = 1.8 }
					damage_building = { type = infrastructure damage = 1.8 }
				}
				if = {
					limit = {
						has_state_flag = nazi_state_withdrawn5
					}
					damage_building = { type = industrial_complex damage = 2.5 }
					damage_building = { type = arms_factory damage = 2.5 }
					damage_building = { type = infrastructure damage = 2.5 }
				}
			}
		}
		event_target:nazi_state_withdrawn = {
			if = {
				limit = {
					has_state_flag = nazi_state_withdrawn1
				}
				hidden_effect = { clr_state_flag = nazi_state_withdrawn1 }
			}
			if = {
				limit = {
					has_state_flag = nazi_state_withdrawn2
				}
				hidden_effect = { clr_state_flag = nazi_state_withdrawn2 }
			}
			if = {
				limit = {
					has_state_flag = nazi_state_withdrawn3
				}
				hidden_effect = { clr_state_flag = nazi_state_withdrawn3 }
			}
			if = {
				limit = {
					has_state_flag = nazi_state_withdrawn4
				}
				hidden_effect = { clr_state_flag = nazi_state_withdrawn4 }
			}
			if = {
				limit = {
					has_state_flag = nazi_state_withdrawn5
				}
				hidden_effect = { clr_state_flag = nazi_state_withdrawn5 }
			}
		}
	}
}

# Hitler suicide upon fall of Berlin in civil war
country_event = {
	id = wtt_germany.50
	title = wtt_germany.50.t
	desc = wtt_germany.50.desc
	picture = GFX_report_event_german_reichstag_bombed

	is_triggered_only = yes
	
	option = {
		name = wtt_germany.50.a
		random_other_country = {
			limit = {
				original_tag = GER
				has_government = fascism
			}
			kill_country_leader = yes
			GER_heinrich_himmler = {
				add_country_leader_role = {
					promote_leader = yes
					country_leader = {
						ideology = nazism
						expire = "1965.1.1.1"
						traits = {}
					}
				}		
			}
		}
		hidden_effect = {
			random_list = {
				1 = {
					modifier = {
						factor = 20
						has_dlc = "Trial of Allegiance"
					}
					modifier = {
						factor = 100
						has_dlc = "Trial of Allegiance"
						ARG = {
							has_completed_focus = ARG_work_with_the_nationalists
						}
					}

					if = {
						limit = {
							NOT = {
								has_dlc = "Trial of Allegiance"
							}
							ARG = {
								is_ai = yes
							}
						}
						ARG = {
							add_timed_idea = { idea = fascism_drift_ARG days = 1460 }
							country_event = { id = wtt_germany.1004 days = 1095 random_days = 365 }
						}
					}
					
					IF = {
						limit = {
							has_dlc = "Trial of Allegiance"
							ARG = {
								exists = yes
							}
						}
						ARG = {
							country_event = {
								id = ARG_political_events.120
								days = 30
							}
						}
					}
				}
				1 = {
					set_global_flag = MTG_flag_955
					modifier = { 
						has_dlc = "Trial of Allegiance"
						tag = ARG
						has_completed_focus = ARG_guardia_nacional
						factor = 0
					}
				}
				1 = { 
					modifier = { 
						has_dlc = "Trial of Allegiance"
						tag = ARG
						has_completed_focus = ARG_guardia_nacional
						factor = 0
					}
					if = { 
						limit = { has_dlc = "La Resistance" }
						country_event = { id = wtt_germany.1005 days = 1095 random_days = 365 } 
					} 
				}
				297 = {}
			}
		}
	}
}

# Reinstate Nazi advisors and generals?
country_event = {
	id = wtt_germany.51
	title = wtt_germany.51.t
	desc = wtt_germany.51.desc
	picture = GFX_report_event_fascists_posing

	trigger = {
		tag = GER
		NOT = { has_government = communism }
		NOT = { has_government = fascism }
		has_war = yes
		has_country_flag = GER_imprisoned_fascist_leadership
		has_idea = all_adults_serve
	}

	mean_time_to_happen = { days = 30 }

	fire_only_once = yes

	immediate = {
		hidden_effect = {
			random_list = {
				80 = {
					set_country_flag = model_survived
				}
				20 = { } # No effect
			}
			random_list = {
				60 = {
					set_country_flag = kruger_survived
				}
				40 = { } # No effect
			}
			random_list = {
				90 = {
					set_country_flag = hausser_survived
				}
				10 = { } # No effect
			}
			random_list = {
				75 = {
					set_country_flag = dietrich_survived
				}
				25 = { } # No effect
			}
		}
	}
	
	# Yes, reinstate them.
	option = {
		name = wtt_germany.51.a
		ai_chance = {
			factor = 10
		}
		add_political_power = 75
		add_popularity = { ideology = fascism popularity = 0.05 }
		custom_effect_tooltip = reinstate_nazi_leadership_TT
		set_country_flag = GER_reinstated_nazi_leadership
		if = {  #I'm leaving these guys in the old system for now because it would be a lot of trouble to make them work properly and need not sure if it's worth it right now.
			limit = {
				has_country_flag = model_survived
			}
			create_field_marshal = {
				name = GER_walter_model
				picture = GFX_portrait_GER_walter_model
				traits = { defensive_doctrine brilliant_strategist trait_cautious }
				skill = 3
				id = 10
				attack_skill = 2
				defense_skill = 4
				planning_skill = 2
				logistics_skill = 2
			}
			clr_country_flag = model_survived
		}
		if = {
			limit = {
				has_country_flag = kruger_survived
			}
			create_corps_commander = {
				name = "Walter Krüger"
				picture = GFX_portrait_Walter_Kruger
				traits = { panzer_leader trait_reckless }
				skill = 3
				id = 15
				attack_skill = 3
				defense_skill = 3
				planning_skill = 1
				logistics_skill = 3
			}
			clr_country_flag = kruger_survived
		}
		if = {
			limit = {
				has_country_flag = hausser_survived
			}
			create_corps_commander = {
				name = "Paul Hausser"
				picture = GFX_portrait_Paul_Hausser
				traits = {  armor_officer }
				skill = 4
				id = 20
				attack_skill = 3
				defense_skill = 3
				planning_skill = 4
				logistics_skill = 3
			}
			clr_country_flag = hausser_survived
		}
		if = {
			limit = {
				has_country_flag = dietrich_survived
			}
			create_corps_commander = {
				name = "Sepp Dietrich"
				picture = GFX_portrait_Sepp_Dietrich
				traits = { armor_officer brilliant_strategist trait_reckless }
				skill = 4
				id = 24
				attack_skill = 3
				defense_skill = 3
				planning_skill = 5
				logistics_skill = 4
			}
			clr_country_flag = dietrich_survived
		}
	}

	# No.
	option = {
		name = wtt_germany.51.b
	}

	# On second thought, hang them anyway.
	option = {
		name = wtt_germany.51.c
		add_stability = 0.05
		add_popularity = { ideology = fascism popularity = -0.05 }
		clr_country_flag = model_survived
		clr_country_flag = kruger_survived
		clr_country_flag = hausser_survived
		clr_country_flag = dietrich_survived
	}
}

# Undemocratic faction member civil war aid event for Germany
country_event = {
	id = wtt_germany.52
	title = wtt_germany.52.t
	desc = wtt_germany.52.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes
	
	# Help them
	option = {
		name = wtt_germany.52.a
		GER = { add_to_war = { targeted_alliance = FROM enemy = FROM.FROM hostility_reason = asked_to_join } }
	}

	#They're on their own
	option = {
		name = wtt_germany.52.b
		ai_chance = {
			factor = 0
		}
		
	}
}

# German event for Austrian referendum to join Democratic Germany
country_event = {
	id = wtt_germany.53
	title = wtt_germany.53.t
	desc = wtt_germany.53.desc
	picture = GFX_report_event_generic_parliament

	trigger = {
		original_tag = GER
		OR = {
			has_government = democratic
			has_government = neutrality
		}
		is_in_faction_with = AUS
		AUS = {
			is_major = no
		}
		OR = {
			AUS = { has_government = democratic }
			AUS = { has_government = neutrality }
		}
		OR = {
			has_global_flag = GER_HRE_is_inevitable
			NOT = { has_global_flag = GER_reformed_austro_hungarian_empire }
		}
	}

	mean_time_to_happen = { days = 60 }

	fire_only_once = yes
	
	# Yes
	option = {
		name = wtt_germany.53.a
		ai_chance = {
			factor = 90
		}
		AUS = { country_event = { id = wtt_germany.54 days = 1 random_days = 6 } }
	}

	# No
	option = {
		name = wtt_germany.53.b
		ai_chance = {
			factor = 10
		}
		
	}
}

# Austrian event for Austrian referendum to join Democratic Germany
country_event = {
	id = wtt_germany.54
	title = wtt_germany.54.t
	desc = wtt_germany.54.desc
	picture = GFX_report_event_generic_parliament

	is_triggered_only = yes
	
	# Yes we will join them
	option = {
		name = wtt_germany.54.a
		ai_chance = {
			factor = 100
		}
		custom_effect_tooltip = GAME_OVER_TT
		GER = { country_event = { id = wtt_germany.55 days = 1 random_days = 6 } }
		set_global_flag = GER_democratic_referendum_austria_flag
	}

	# No we will remain independent
	option = {
		name = wtt_germany.54.b	
	}
}

# German confirmation event for Austrian referendum to join Democratic Germany
country_event = {
	id = wtt_germany.55
	title = wtt_germany.55.t
	desc = wtt_germany.55.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	# Excellent
	option = {
		name = wtt_germany.55.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 = { #Vorarlberg
			if = {
				limit = { is_owned_by = AUS }
				add_core_of = GER
			}
		}
		every_state = {
			limit = {
				is_core_of = AUS
				NOT = { is_core_of = GER }
			}
			add_claim_by = GER
		}
		AUS = {
			every_unit_leader = {
				set_nationality = GER
			}
		}
		annex_country = { target = AUS transfer_troops = yes }
		hidden_effect = { news_event = { id = wtt_news.18 hours = 6 } }
	}
}

# Polish event when attacked by SOV and not in faction with democratic Germany
country_event = {
	id = wtt_germany.56
	title = wtt_germany.56.t
	desc = wtt_germany.56.desc
	picture = GFX_report_event_generic_parliament

	trigger = {
		tag = POL
		has_full_control_of_state = 85
		has_full_control_of_state = 86
		has_full_control_of_state = 807
		owns_state = 85
		owns_state = 86
		owns_state = 807
		has_idea = GER_the_great_red_menace
		surrender_progress > 0.3
		has_defensive_war_with = SOV
		NOT = { has_government = communism }
		NOT = { has_government = fascism }
		GER = { has_government = democratic }
		NOT = { GER = { has_war_together_with = POL } }
		NOT = { is_in_faction_with = GER }	
	}

	mean_time_to_happen = { days = 2 }

	fire_only_once = yes
	
	# Yes
	option = {
		name = wtt_germany.56.a
		ai_chance = {
			factor = 90
		}
		GER = { country_event = { id = wtt_germany.57 hours = 2 random_hours = 4 } }
	}

	# No
	option = {
		name = wtt_germany.56.b
		ai_chance = {
			factor = 10
		}
		
	}
}

# German event giving back Danzig and Poznan if POL almost losing to SOV
country_event = {
	id = wtt_germany.57
	title = wtt_germany.57.t
	desc = wtt_germany.57.desc
	picture = GFX_report_event_generic_parliament

	is_triggered_only = yes
	
	# Yes we will accept that
	option = {
		name = wtt_germany.57.a
		ai_chance = {
			factor = 90
		}
		transfer_state = 85
		transfer_state = 86
		transfer_state = 807
		add_state_core = 85
		add_state_core = 86
		add_state_core = 807
		85 = { add_claim_by = SOV }
		86 = { add_claim_by = SOV }
		807 = { add_claim_by = SOV }
		POL = { country_event = { id = wtt_germany.59 } }
	}

	# No we don't want the risk
	option = {
		name = wtt_germany.57.b
		ai_chance = {
			factor = 10
		}
		POL = { country_event = { id = wtt_germany.60 } }
	}
}

# German notification event for Austrian rejection of referendum to join Democratic Germany
country_event = {
	id = wtt_germany.58
	title = wtt_germany.58.t
	desc = wtt_germany.58.desc
	picture = GFX_report_event_gathering_protest

	is_triggered_only = yes
	
	# Damn!
	option = {
		name = wtt_germany.58.a
	}
}

# Polish confirmation event for Germany accepting Danzig and Poznan
country_event = {
	id = wtt_germany.59
	title = wtt_germany.59.t
	desc = wtt_germany.59.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	# Excellent
	option = {
		name = wtt_germany.59.a
		hidden_effect = { news_event = { id = wtt_news.19 hours = 6 } }
	}
}

# Polish notification event for Germany rejecting Danzig and Poznan
country_event = {
	id = wtt_germany.60
	title = wtt_germany.60.t
	desc = wtt_germany.60.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes
	
	# When the Soviets have eaten all their friends and come for the Germans, who will be left to help them?
	option = {
		name = wtt_germany.60.a
	}
}

#Removed event ID 61

#Anti-smartass event to give penalty of mefo_bills_ended effect if MEFO bills have been removed through a (potentially insignificant) war.
country_event = {
	id = wtt_germany.62
	title = wtt_germany.62.t
	desc = wtt_germany.62.desc
	picture = GFX_report_event_tank_factory

	trigger = {
		original_tag = GER
		has_government = fascism
		has_country_flag = mefo_bills_removed_through_war
		has_war = no
	}
	
	mean_time_to_happen = {
		days = 2
	}
	
	option = {
		name = wtt_germany.62.a
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 15 compare = less_than }
			}
			add_political_power = -20
			add_timed_idea = { idea = GER_mefo_bills_ended days = 60 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 15 compare = equals }
			}
			add_political_power = -30
			add_timed_idea = { idea = GER_mefo_bills_ended days = 70 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 20 compare = equals }
			}
			add_political_power = -40
			add_timed_idea = { idea = GER_mefo_bills_ended days = 80 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 25 compare = equals }
			}
			add_political_power = -50
			add_timed_idea = { idea = GER_mefo_bills_ended days = 90 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 30 compare = equals }
			}
			add_political_power = -60
			add_timed_idea = { idea = GER_mefo_bills_ended days = 100 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 35 compare = equals }
			}
			add_political_power = -70
			add_timed_idea = { idea = GER_mefo_bills_ended days = 110 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 40 compare = equals }
			}
			add_political_power = -80
			add_timed_idea = { idea = GER_mefo_bills_ended days = 120 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 45 compare = equals }
			}
			add_political_power = -90
			add_timed_idea = { idea = GER_mefo_bills_ended days = 130 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 50 compare = equals }
			}
			add_political_power = -100
			add_timed_idea = { idea = GER_mefo_bills_ended days = 140 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 55 compare = equals }
			}
			add_political_power = -110
			add_timed_idea = { idea = GER_mefo_bills_ended days = 150 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 60 compare = equals }
			}
			add_political_power = -120
			add_timed_idea = { idea = GER_mefo_bills_ended days = 160 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 65 compare = equals }
			}
			add_political_power = -130
			add_timed_idea = { idea = GER_mefo_bills_ended days = 170 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 70 compare = equals }
			}
			add_political_power = -140
			add_timed_idea = { idea = GER_mefo_bills_ended days = 180 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 75 compare = equals }
			}
			add_political_power = -150
			add_timed_idea = { idea = GER_mefo_bills_ended days = 190 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 80 compare = equals }
			}
			add_political_power = -160
			add_timed_idea = { idea = GER_mefo_bills_ended days = 200 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 85 compare = equals }
			}
			add_political_power = -170
			add_timed_idea = { idea = GER_mefo_bills_ended days = 210 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 90 compare = equals }
			}
			add_political_power = -180
			add_timed_idea = { idea = GER_mefo_bills_ended days = 220 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 95 compare = equals }
			}
			add_political_power = -190
			add_timed_idea = { idea = GER_mefo_bills_ended days = 230 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 100 compare = equals }
			}
			add_political_power = -200
			add_timed_idea = { idea = GER_mefo_bills_ended days = 240 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 105 compare = equals }
			}
			add_political_power = -210
			add_timed_idea = { idea = GER_mefo_bills_ended days = 250 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 110 compare = equals }
			}
			add_political_power = -220
			add_timed_idea = { idea = GER_mefo_bills_ended days = 260 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 115 compare = equals }
			}
			add_political_power = -230
			add_timed_idea = { idea = GER_mefo_bills_ended days = 270 }
		}
		if = {
			limit = {
				check_variable = { var = GER_mefo_bill_counter value = 115 compare = greater_than }
			}
			add_political_power = -240
			add_timed_idea = { idea = GER_mefo_bills_ended days = 280 }
		}
		clr_country_flag = mefo_bills_removed_through_war
	}
}

# Reintegration remove cores for Alsace and notification for France
country_event = {
	id = wtt_germany.63
	title = wtt_germany.63.t
	desc = wtt_germany.63.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	option = {
		name = wtt_germany.63.a
		effect_tooltip = {
			GER = {
				add_state_core = 8
				add_state_core = 28
			}
		}
	}
}

# Reintegration notification for Luxemburg
country_event = {
	id = wtt_germany.64
	title = wtt_germany.64.t
	desc = wtt_germany.63.desc
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	option = {
		name = wtt_germany.64.a
		effect_tooltip = {
			GER = {
				add_state_core = 8
				add_state_core = 28
			}
		}
	}
}

# Event for POL - GER Pressures POL to Join War against SOV
country_event = {
	id = wtt_germany.65
	title = wtt_germany.65.t
	desc = wtt_germany.65.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes
	
	# Accept
	option = {
		name = wtt_germany.65.a
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0.5
				has_opinion = { target = GER value < 0 }
			}
			modifier = {
				factor = 0.2
				has_opinion = { target = GER value < -50 }
			}
			modifier = {
				factor = 0.5
				GER = { strength_ratio = { tag = SOV ratio < 1 } }
			}
			modifier = {
				factor = 0.2
				GER = { strength_ratio = { tag = SOV ratio < 0.8 } }
			}
		}
		if = {
			limit = {
				is_in_faction = yes
				has_war = no
				is_faction_leader = no
			}
			random_other_country = {
				limit = {
					is_in_faction_with = POL
					is_faction_leader = yes
				}
				remove_from_faction = POL
			}
			GER = { add_to_faction = POL }
			add_to_war = { targeted_alliance = GER enemy = SOV hostility_reason = ally }
		}
		if = {
			limit = {
				is_in_faction = yes
				has_war = no
				is_faction_leader = yes
			}
			dismantle_faction = yes
			GER = { add_to_faction = POL }
			add_to_war = { targeted_alliance = GER enemy = SOV hostility_reason = ally }
		}
		if = {
			limit = {
				is_in_faction = no
			}
			GER = { add_to_faction = POL }
			add_to_war = { targeted_alliance = GER enemy = SOV hostility_reason = ally }
		}
		GER = { country_event = { id = wtt_germany.66 } }
	}

	# Reject
	option = {
		name = wtt_germany.65.b
		ai_chance = {
			factor = 0
			modifier = {
				factor = 0.5
				has_opinion = { target = GER value > 50 }
			}
			modifier = {
				factor = 0.5
				GER = { strength_ratio = { tag = SOV ratio > 1 } }
			}
			modifier = {
				factor = 0.2
				GER = { strength_ratio = { tag = SOV ratio > 1.5 } }
			}
		}
		GER = {
			create_wargoal = {
				type = annex_everything
				target = POL
			}
			country_event = { id = wtt_germany.67 }
		}
	}
}

# Event for GER - POL Joins Faction and War against SOV
country_event = {
	id = wtt_germany.66
	title = wtt_germany.66.t
	desc = wtt_germany.66.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes
	
	option = {
		name = excellent
		effect_tooltip = {
			add_to_faction = POL
			POL = { add_to_war = { targeted_alliance = GER enemy = SOV hostility_reason = ally } }
		}
	}
}

# Event for GER - POL Rejects Demands
country_event = {
	id = wtt_germany.67
	title = wtt_germany.67.t
	desc = wtt_germany.67.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes
	
	option = {
		name = wtt_germany.67.a
		effect_tooltip = {
			create_wargoal = {
				type = annex_everything
				target = POL
			}
		}
	}
}

# Event for other nations (HUN/AUS/CZE) to accept becoming annex by new Austria-Hungary
country_event = {
	id = wtt_germany.68
	title = wtt_germany.68.t
	desc = wtt_germany.68.desc
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes
	
	# Accept
	option = {
		name = wtt_germany.68.a
		custom_effect_tooltip = GAME_OVER_TT
		FROM = { country_event = { id = wtt_germany.69 hours = 6 } }
	}

	# Decline
	option = {
		name = wtt_germany.68.b
		ai_chance = {
			factor = 0
		}
		FROM = { country_event = { id = wtt_germany.70 hours = 6 } }
	}
}

# Event for original nation (HUN/AUS/CZE) notifying another nation accepted
country_event = {
	id = wtt_germany.69
	title = wtt_germany.69.t
	desc = wtt_germany.69.desc
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes
	
	option = {
		name = excellent
		if = {
			limit = {
				has_country_flag = GER_austria_hungary_accepted_integration
			}
			country_event = { id = wtt_germany.71 days = 1 }
		}
		if = {
			limit = {
				NOT = { has_country_flag = GER_austria_hungary_accepted_integration }
			}
			hidden_effect = { set_country_flag = GER_austria_hungary_accepted_integration }
		}
	}
}

# Event for original nation (HUN/AUS/CZE) notifying another nation rejected
country_event = {
	id = wtt_germany.70
	title = wtt_germany.70.t
	desc = wtt_germany.70.desc
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes
	
	option = {
		name = unfortunate
		hidden_effect = { clr_global_flag = GER_reformed_austro_hungarian_empire }
	}
}

# Event for original nation (HUN/AUS/CZE) notifying of integration and formation of Austria-Hungary
country_event = {
	id = wtt_germany.71
	title = wtt_germany.71.t
	desc = wtt_germany.71.desc
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes
	
	option = {
		name = wtt_germany.71.a
		if = {
			limit = {
				NOT = { has_government = neutrality }
			}
			set_politics = { ruling_party = neutrality elections_allowed = no }
		}
		
		promote_character = HUN_otto_von_habsburg #Already a country leader (Non-Aligned -> Despotism)

		if = {
			limit = {
				tag = AUS
			}
			HUN = { ROOT_inherit_current_scope_wars_effect = yes }
			CZE = { ROOT_inherit_current_scope_wars_effect = yes }
			annex_country = { target = HUN transfer_troops = yes }
			annex_country = { target = CZE transfer_troops = yes }
			154 = { add_core_of = ROOT }
			155 = { add_core_of = ROOT }
			43 = { add_core_of = ROOT }
			69 = { add_core_of = ROOT }
			9 = { add_core_of = ROOT }
			75 = { add_core_of = ROOT }
			74 = { add_core_of = ROOT }
			72 = { add_core_of = ROOT }
			70 = { add_core_of = ROOT }
			664 = { add_core_of = ROOT }
			71 = { add_core_of = ROOT }
			73 = { add_core_of = ROOT }
			GER = { add_to_faction = AUS }
		}
		if = {
			limit = {
				tag = HUN
			}
			AUS = { ROOT_inherit_current_scope_wars_effect = yes }
			CZE = { ROOT_inherit_current_scope_wars_effect = yes }
			annex_country = { target = AUS transfer_troops = yes }
			annex_country = { target = CZE transfer_troops = yes }
			152 = { add_core_of = ROOT }
			153 = { add_core_of = ROOT }
			848 = { add_core_of = ROOT } #Vorarlberg 
			4 = { add_core_of = ROOT }
			69 = { add_core_of = ROOT }
			9 = { add_core_of = ROOT }
			75 = { add_core_of = ROOT }
			74 = { add_core_of = ROOT }
			72 = { add_core_of = ROOT }
			70 = { add_core_of = ROOT }
			664 = { add_core_of = ROOT }
			71 = { add_core_of = ROOT }
			73 = { add_core_of = ROOT }
			GER = { add_to_faction = HUN }
		}
		if = {
			limit = {
				tag = CZE
			}
			HUN = { ROOT_inherit_current_scope_wars_effect = yes }
			AUS = { ROOT_inherit_current_scope_wars_effect = yes }
			annex_country = { target = HUN transfer_troops = yes }
			annex_country = { target = AUS transfer_troops = yes }
			152 = { add_core_of = ROOT }
			153 = { add_core_of = ROOT }
			848 = { add_core_of = ROOT } #Vorarlberg 
			4 = { add_core_of = ROOT }
			154 = { add_core_of = ROOT }
			155 = { add_core_of = ROOT }
			43 = { add_core_of = ROOT }
			GER = { add_to_faction = CZE }
		}
		set_cosmetic_tag = HUN_EMPIRE
		GER = {
			country_event = { id = wtt_germany.13 }
		}
		if = {
			limit = {
				NOT = { has_government = neutrality }
			}
			set_politics = { ruling_party = neutrality elections_allowed = no }
		}
		add_ai_strategy = {
			type = alliance
			id = "GER"			
			value = 200
		}
	}
}

# Event asking whether HUN/ROM want to become puppet in return for factories.
country_event = {
	id = wtt_germany.72
	title = wtt_germany.72.t
	desc = wtt_germany.72.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes
	
	option = { # Yaplx
		name = wtt_germany.72.a
		effect_tooltip = {
			GER = {
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = arms_factory
							size > 1
							include_locked = yes
						}
						NOT = { has_state_flag = GER_integrate_war_economies }
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = arms_factory
						level = 2
						instant_build = yes
					}
					set_state_flag = GER_integrate_war_economies
				}
				random_owned_controlled_state = {
					limit = {
						free_building_slots = {
							building = arms_factory
							size > 1
							include_locked = yes
						}
						NOT = { has_state_flag = GER_integrate_war_economies }
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = arms_factory
						level = 2
						instant_build = yes
					}
					set_state_flag = GER_integrate_war_economies
				}
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				set_state_flag = GER_integrate_war_economies_1
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				set_state_flag = GER_integrate_war_economies_2
			}
			if = {
				limit = {
					has_dlc = "Death or Dishonor" 
					is_in_faction_with = FROM
					FROM = { is_subject = no }
				}
				FROM = {
					set_autonomy = { target = ROOT autonomy_state = autonomy_satellite }
				}
			}
			if = {
				limit = { 
					has_dlc = "Together for Victory"
					NOT = { has_dlc = "Death or Dishonor" } 
					is_in_faction_with = FROM
					FROM = { is_subject = no }
				}
				FROM = {
					set_autonomy = { target = ROOT autonomy_state = autonomy_dominion }
				}
			}
			if = {
				limit = { 
					NOT = { has_dlc = "Together for Victory" }
					NOT = { has_dlc = "Death or Dishonor" }
					is_in_faction_with = FROM
					FROM = { is_subject = no }
				}
				FROM = { puppet = ROOT }
			}
		}
		custom_effect_tooltip = wtt_germany.72_tt
		FROM = {
			country_event = { id = wtt_germany.73 days = 1 }
		}
	}
	option = { # Hell naw
		name = wtt_germany.72.b
		ai_chance = {
			factor = 0
		}
		FROM = {
			country_event = { id = wtt_germany.74 days = 1 }
		}
	}
}

# Event for GER saying HUN/ROM accepted
country_event = {
	id = wtt_germany.73
	title = wtt_germany.73.t
	desc = wtt_germany.73.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes
	
	option = {
		name = wtt_germany.73.a
		random_owned_controlled_state = {
			limit = {
				free_building_slots = {
					building = arms_factory
					size > 1
					include_locked = yes
				}
				NOT = { has_state_flag = GER_integrate_war_economies }
			}
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = arms_factory
				level = 2
				instant_build = yes
			}
			set_state_flag = GER_integrate_war_economies
		}
		random_owned_controlled_state = {
			limit = {
				free_building_slots = {
					building = arms_factory
					size > 1
					include_locked = yes
				}
				NOT = { has_state_flag = GER_integrate_war_economies }
			}
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = arms_factory
				level = 2
				instant_build = yes
			}
			set_state_flag = GER_integrate_war_economies
		}
		FROM = {
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				set_state_flag = GER_integrate_war_economies_1
			}
			random_owned_controlled_state = {
				limit = {
					free_building_slots = {
						building = arms_factory
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
				set_state_flag = GER_integrate_war_economies_2
			}
		}
		if = {
			limit = {
				has_dlc = "Death or Dishonor" 
				is_subject = no
			}
			every_country = {
				limit = {
					is_subject_of = FROM
				}
				ROOT = { set_autonomy = { target = PREV autonomy_state = autonomy_satellite end_wars = no end_civil_wars = no} }
			}
			set_autonomy = { target = FROM autonomy_state = autonomy_satellite end_wars = no end_civil_wars = no}
		}
		if = {
			limit = { 
				has_dlc = "Together for Victory"
				NOT = { has_dlc = "Death or Dishonor" } 
				is_subject = no
			}
			every_country = {
				limit = {
					is_subject_of = FROM
				}
				ROOT = { set_autonomy = { target = PREV autonomy_state = autonomy_dominion end_wars = no end_civil_wars = no} }
			}
			set_autonomy = { target = FROM autonomy_state = autonomy_dominion end_wars = no end_civil_wars = no}
		}
		if = {
			limit = { 
				NOT = { has_dlc = "Together for Victory" }
				NOT = { has_dlc = "Death or Dishonor" }
				is_subject = no
			}
			every_country = {
				limit = {
					is_subject_of = FROM
				}
				ROOT = { puppet = PREV }
			}
			puppet = FROM
		}
	}
}

# Event for GER saying HUN/ROM rejected
country_event = {
	id = wtt_germany.74
	title = wtt_germany.74.t
	desc = wtt_germany.74.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes
	
	option = {
		name = wtt_germany.74.a
	}
}

#################

country_event = {
	id = wtt_germany.999
	title = wtt_germany.999.t
	desc = wtt_germany.999.desc
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	option = {
		name = wtt_germany.999.a
		ai_chance = {
			factor = 100
		}
		FROM = { country_event = { id = wtt_germany.1000 days = 1 } }
	}
	option = {
		name = wtt_germany.999.b
		ai_chance = {
			factor = 0
		}
		FROM = { country_event = { id = wtt_germany.1003 days = 1 } }
	}
}


country_event = {
	id = wtt_germany.1000
	title = wtt_germany.1000.t
	desc = wtt_germany.1000.desc
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	option = {
		name = wtt_germany.1000.a
		ai_chance = {
			factor = 100
		}
		custom_effect_tooltip = wtt_germany.1000.a_tt
		add_political_power = -50
		ENG = { add_opinion_modifier = { target = GER modifier = GER_aided_in_ceremony_preparations } }
		hidden_effect = {
			country_event = { id = wtt_germany.1001 days = 3 random_days = 4 }
		}
	}
	option = {
		ai_chance = {
			factor = 0
		}
		name = wtt_germany.1000.b
		custom_effect_tooltip = wtt_germany.1000.b_tt
		add_political_power = 50
		hidden_effect = {
			country_event = { id = wtt_germany.1002 days = 3 random_days = 4 }
		}
	}
}

country_event = {
	id = wtt_germany.1001
	title = wtt_germany.1001.t
	desc = wtt_germany.1001.desc
	picture = GFX_report_event_hindenburg_flames

	is_triggered_only = yes

	option = {
		name = wtt_germany.1001.a
		add_stability = -0.1
		kill_country_leader = yes
		GER_victoria = {
			add_country_leader_role = {
				country_leader = {
					expire = "1965.1.1"
					ideology = despotism
					traits = {
						kaiserin_of_the_people
						victoria_iii # Third Victoria counting from Queen Victoria hurr durr
					}
				}
				promote_leader = yes
			}
		}
		hidden_effect = {
			GER = {
				division_template = {
					name = "Kaiserin Loyalist"			
					division_names_group = GER_INF_01
					is_locked = no
					priority = 1

					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
					}
					support = {		
						artillery = { x = 0 y = 0 }
						anti_air = { x = 0 y = 1 }
						engineer = { x = 0 y = 2 }
					}
				}
				capital_scope = {
					create_unit = {
						division = "division_template = \"Kaiserin Loyalist\" start_experience_factor = 0.3"  
						owner = ROOT 
						count = 8
					}
				}
			}
		}
		hidden_effect = {
			add_timed_idea = { idea = GER_HRE_reformation_frenzy days = 730 }
			set_global_flag = GER_HRE_is_inevitable
			912 = { add_claim_by = ROOT }
			8 = { add_claim_by = ROOT }
			28 = { add_claim_by = ROOT }
			735 = { add_claim_by = ROOT }
			69 = { add_claim_by = ROOT }
			9 = { add_claim_by = ROOT }
			75 = { add_claim_by = ROOT }
			74 = { add_claim_by = ROOT }
			158 = { add_claim_by = ROOT }
			159 = { add_claim_by = ROOT }
			39 = { add_claim_by = ROOT }
			160 = { add_claim_by = ROOT }
			161 = { add_claim_by = ROOT }
			162 = { add_claim_by = ROOT }
			736 = { add_claim_by = ROOT }
			850 = { add_claim_by = ROOT }
			102 = { add_claim_by = ROOT }
			853 = { add_claim_by = ROOT }
			852 = { add_claim_by = ROOT }
			custom_effect_tooltip = form_country_switzerland_coring_states_tt
			hidden_effect = {
				3 = { add_claim_by = ROOT }
				151 = { add_claim_by = ROOT }
				845 = { add_claim_by = ROOT }
				847 = { add_claim_by = ROOT }
				846 = { add_claim_by = ROOT }
			}
			# Austria
			custom_effect_tooltip = form_country_austria_coring_states_tt
			hidden_effect = {
				848 = { add_claim_by = ROOT }
				153 = { add_claim_by = ROOT }
				152 = { add_claim_by = ROOT }
				4 = { add_claim_by = ROOT }
				848 = { add_claim_by = ROOT }
			}
			# Netherlands
			custom_effect_tooltip = form_eu_netherlands_coring_states_tt
			hidden_effect = {
				7 = { add_claim_by = ROOT }
				35 = { add_claim_by = ROOT }
				36 = { add_claim_by = ROOT }
			}
			# Belgium
			custom_effect_tooltip = form_eu_belgium_coring_states_tt
			hidden_effect = {
				6 = { add_claim_by = ROOT }
				34 = { add_claim_by = ROOT }
			}
			if = {
				limit = {
					AUS = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				AUS = {
					every_unit_leader = {
						set_nationality = GER
					}
				}
				GER = { annex_country = { target = AUS transfer_troops = yes } }
			}
			if = {
				limit = {
					HOL = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				HOL = {
					every_unit_leader = {
						set_nationality = GER
					}
				}
				GER = { annex_country = { target = HOL transfer_troops = yes } }
			}
			if = {
				limit = {
					BEL = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				BEL = {
					every_unit_leader = {
						set_nationality = GER
					}
				}
				GER = { annex_country = { target = BEL transfer_troops = yes } }
			}
			if = {
				limit = {
					LUX = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				LUX = {
					every_unit_leader = {
						set_nationality = GER
					}
				}
				GER = { annex_country = { target = LUX transfer_troops = yes } }
			}
			if = {
				limit = {
					SWI = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				SWI = {
					every_unit_leader = {
						set_nationality = GER
					}
				}
				GER = { annex_country = { target = SWI transfer_troops = yes } }
			}
			if = {
				limit = {
					ITA = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				every_state = {
					limit = {
						is_claimed_by = GER
						is_owned_by = ITA
					}
					GER = { transfer_state = PREV }
				}
			}
			if = {
				limit = {
					CZE = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				every_state = {
					limit = {
						is_claimed_by = GER
						is_owned_by = CZE
					}
					GER = { transfer_state = PREV }
				}
			}
			if = {
				limit = {
					POL = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				every_state = {
					limit = {
						is_claimed_by = GER
						is_owned_by = POL
					}
					GER = { transfer_state = PREV }
				}
			}
			if = {
				limit = {
					FRA = { 
						is_in_faction_with = GER
						is_ai = yes
						is_subject_of = GER
					}
				}
				every_state = {
					limit = {
						is_claimed_by = GER
						is_owned_by = FRA
					}
					GER = { transfer_state = PREV }
				}
			}
			if = {
				limit = {
					ENG = { 
						is_in_faction_with = GER
						is_ai = yes
					}
				}
				every_state = {
					limit = {
						is_claimed_by = GER
						is_owned_by = ENG
						NOT = { is_core_of = ENG }
						NOT = { is_claimed_by = ENG }
						is_on_continent = europe
					}
					GER = { transfer_state = PREV }
				}
			}
			if = {
				limit = {
					ENG = { 
						is_in_faction_with = GER
						is_faction_leader = yes 
					}
				}
				every_other_country = {
					limit = {
						ENG = { is_faction_leader = yes }
						is_in_faction_with = ENG
						is_subject = no
						NOT = {
							OR = {
								original_tag = ENG
								original_tag = GER
							}
						}
						any_owned_state = {
							is_on_continent = europe
							OR = {
								is_claimed_by = GER
								is_owned_by = GER
							}
						}
					}
					ENG = { 
						remove_from_faction = PREV 
					}
				}
			}
			every_country = {
				limit = {
					NOT = {
						OR = {
							original_tag = ENG
							original_tag = GER
						}
					}
					any_owned_state = {
						is_on_continent = europe
						OR = {
							is_claimed_by = GER
							is_owned_by = GER
						}
					}
				}
				ENG = {
					add_ai_strategy = {
						type = alliance
						id = PREV
						value = -1000
					}
					add_ai_strategy = {
						type = befriend
						id = PREV
						value = -1000
					}
				}
				GER = {
					add_ai_strategy = {
						type = alliance
						id = PREV
						value = -1000
					}
					add_ai_strategy = {
						type = befriend
						id = PREV
						value = -1000
					}
				}
			}
			if = {
				limit = {
					GER = { 
						is_in_faction_with = ENG
						is_faction_leader = yes 
					}
				}
				every_other_country = {
					limit = {
						is_in_faction_with = GER
						is_subject = no
						NOT = {
							OR = {
								original_tag = ENG
								original_tag = GER
							}
						}
						any_owned_state = {
							is_on_continent = europe
							OR = {
								is_claimed_by = GER
								is_owned_by = GER
							}
						}
					}
					GER = { remove_from_faction = PREV }
				}
			}
		}
		hidden_effect = { set_global_flag = hindenburg_destroyed }
	}
}

country_event = {
	id = wtt_germany.1002
	title = wtt_germany.1001.t
	desc = wtt_germany.1002.desc
	picture = GFX_report_event_hindenburg_flames

	is_triggered_only = yes

	option = {
		name = wtt_germany.1002.a
		add_stability = -0.2
		kill_country_leader = yes
		hidden_effect = { set_global_flag = hindenburg_destroyed }
	}
}

country_event = {
	id = wtt_germany.1003
	title = wtt_germany.1003.t
	desc = wtt_germany.1003.desc
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	option = {
		name = wtt_germany.1003.a
		hidden_effect = {
			country_event = { id = wtt_germany.1000 days = 1 }
		}
	}
}

country_event = {
	id = wtt_germany.1004

	hidden = yes

	is_triggered_only = yes

	immediate = {
		set_politics = { 
			ruling_party = fascism 
			elections_allowed = no 
		}
		add_country_leader_role = {
			character = ARG_senor_hitler
			country_leader={
				expire = "1965.1.1"
				ideology = nazism
				traits = {
					dictator
					incognito
				}
			}
			promote_leader = yes
		}
	}
}

country_event = {
	id = wtt_germany.1005

	hidden = yes

	is_triggered_only = yes

	immediate = {
		random_list = {
			50 = {
				create_operative_leader = {
					name = "Achim Hund"
					GFX = GFX_portrait_germany_agent_h_m
					traits = { operative_natural_orator }
					bypass_recruitment = no
					available_to_spy_master = yes
				}
			}
			50 = {
				create_operative_leader = {
					name = "Andrea Hund"
					GFX = GFX_portrait_germany_agent_h_f
					traits = { operative_seducer operative_natural_orator }
					bypass_recruitment = no
					available_to_spy_master = yes
					female = yes
				}
			}
		}
	}
}

country_event = {
	id = wtt_germany.1006
	title = wtt_germany.1006.t
	desc = wtt_germany.1006.desc 
	picture = GFX_report_event_german_volunteers

	is_triggered_only = yes

	fire_only_once = yes
	
	option = {
		name = wtt_germany.1006.a
	}
}