add_namespace = goering_expanded
add_namespace = goering_debug_wild_ride

country_event = { # trigger event for if Goering dies during conquests, Oil Crisis should still erupt
	id = goering_expanded.0
	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_expanded.0"}
	title = "oil crisis erupt"
	desc = "FUCK"
	picture = GFX_report_event_GER_army_1

	trigger = {
		GER = {
			NOT = {
				has_global_flag = german_civil_war_goeringvic
			}
		}
	}

	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = "k bro"
		
		#Yemeni Civil War- 3 October 1970
		YEM = { country_event = { id = YEM.1 } }

		#Oman Civil War - 1 November 1970
		#Initiated by coup plot, 12 days before
		OMA = { country_event = { id = OMA.1 days = 43 } }

		#Egyptian Civil War- 4 November 1970
		EGY = { country_event = { id = egy.3 days = 58 } }

		#Iraq Civil War- 9 November 1970
		#Initiated by Qasim's death, 51 days before
		IRQ = { country_event = { id = IraqCW.1 days = 12 } }

		###OIL CRISIS SUPEREVENT ITSELF 13 Novemeber 1970
		#Initiated by Syrian uprising, 2 days before
		TUR = { country_event = { id = turkey.26 days = 55 } }
	}
}

country_event = {
	id = goering_expanded.1
	title = "how russian warlords are this dumb"
	desc = ""
	hidden = yes
	
	trigger = {
		NOT = {
			any_country = {
				is_russian_nation = yes
				is_ai = no
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = "dunno bro"
		every_country = {
			limit = {
				is_russian_nation = yes
				is_ai = yes
				OR = {
					has_country_flag = RUS_regional_stage
					has_country_flag = RUS_superregional_stage
				}
			}
			add_timed_idea = {
				idea = GGR_increased_command_power_limit
				days = 90
			}
		}
	}
}

country_event = {
	id = goering_expanded.2
	title = goering_expanded.2.t
	desc = goering_expanded.2.desc

	is_triggered_only = yes
	
	hidden = yes

	trigger = {
		is_ai = no
		NOT = {
			has_completed_focus = GER_GOR_war_plan_C_new
		}
	}

	option = {
		name = goering_expanded.2.a
		set_variable_to_random = {
			var = militarist_moves_good_change
			min = 1
			max = 5
			integer = yes
		}
		set_variable_to_random = {
			var = militarist_moves_bad_change
			min = 5
			max = 15
			integer = yes
		}
		
		activate_mission = GGR_militarist_moves
		country_event = { id = goering_expanded.2 days = 61 }
	}
}

country_event = {
	id = goering_expanded.3
	title = goering_expanded.3.t
	desc = goering_expanded.3.desc

	is_triggered_only = yes
	
	hidden = yes

	trigger = {
		NOT = {
			any_country = {
				is_russian_nation = yes
				is_ai = no
			}
		}
	}

	option = {
		name = goering_expanded.3.a
		every_country = {
			limit = {
				has_dynamic_modifier = { modifier = RUS_war_weariness }
				NOT = {
					OR = {
						tag = OMO
						tag = DRL
						tag = MGN
					}
				}
			}
			remove_dynamic_modifier = { modifier = RUS_war_weariness }
		}
	}
}

country_event = {
	id = goering_expanded.4
	title = ""
	desc = ""

	is_triggered_only = yes
	
	hidden = yes

	trigger = {
		exists = yes
		has_war = yes
	}

	option = {
		name = ""
		add_timed_idea = {
			idea = ZZZ_war_stage_3
			days = 60
		}
		country_event = {
			id = goering_expanded.4
			days = 62
		}
	}
}



country_event = { #Goering spares some of Bormanns generals
	id = goering_expanded.34
	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_expanded.34"}
	title = goering_expanded.34.t
	desc = goering_expanded.34.desc
	picture = GFX_report_event_GER_army_1

	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = goering_expanded.34.a
		GGR_decrease_militarist_loyalty = yes
		GGR_decrease_militarist_power_large = yes
		BGR = {
			GER_walther_wenck = {
				set_nationality = GER
			}
			GER_albert_schnez = {
				set_nationality = GER
			}
			GER_heinrich_trettner = {
				set_nationality = GER
			}
			GER_karladolf_hollidt = {
				set_nationality = GER
			}
			GER_hans_krebs = {
				set_nationality = GER
			}
			GER_joachim_sadrozinski = {
				set_nationality = GER
			}
			GER_georg_von_boeslager = {
				set_nationality = GER
			}
		}

	}
}

country_event = { # War plans leak uh oh
	id = goering_expanded.36
	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_expanded.36"}
	title = goering_expanded.36.t
	desc = goering_expanded.36.d
	picture = GFX_report_event_GER_army_1

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Fuck
		name = goering_expanded.36.a
		hidden_effect = {
			country_event = { id = goering_expanded.37 days = 2 }
		}
		ai_chance = {
            factor = 75
        }
	}
}

country_event = { # Embargo fuck fuck fuck
	id = goering_expanded.37
	immediate = {log = "[GetDateText]: [Root.GetName]: event goering_expanded.37"}
	title = goering_expanded.37.t
	desc = goering_expanded.37.d
	picture = GFX_report_event_GER_army_1

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Fuck
		name = goering_expanded.37.a
		custom_effect_tooltip = GGR_massive_embargo_tt
		hidden_effect = {
			every_country = {
				limit = {
					NOT = {
						is_subject_of = GER
						is_in_faction_with = GER
						tag = PER
					}
				}
				every_country = {
					limit = {
						is_in_faction_with = GER
					}
					set_embargo_PREV = yes
				}
				set_embargo_PREV = yes
			}
		}
		set_temp_variable = { gdp_growth_temp = -2 }
		econ_gdp_growth_change = yes
		ai_chance = {
            factor = 75
        }
	}
}


# Some shit - 70 and further
country_event = { #no RESOURCESSSSSSSSSSS
	id = goering_expanded.99
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_expanded.99"
		hidden_effect = {
			every_country = {
				limit = { is_subject_of = GER }	
				every_owned_state = {
                	GER = {
                    	remove_resource_rights = PREV
                	}
				}
			}
			every_country = {
				limit = { is_subject_of = GER }	
				every_owned_state = {
                	GER = {
                    	remove_resource_rights = PREV
                	}
				}
			}
			every_country = {
				limit = { is_subject_of = GER }	
				every_owned_state = {
                	GER = {
                    	remove_resource_rights = PREV
                	}
				}
			}
			every_country = {
				limit = { is_subject_of = GER }	
				every_owned_state = {
                	GER = {
                    	remove_resource_rights = PREV
                	}
				}
			}
			every_country = {
				limit = {
					is_subject_of = GER
				}
				every_owned_state = {
					limit = {
						has_resources_amount = {
							resource = oil
							amount > 0
							delivered = yes
						}
					}
					owner = {
						give_resource_rights = {
							receiver = GER
							state = PREV
							resources = { oil }
						}
					}
				}
			}
			country_event = {
				id = goering_expanded.100
				days = 1
			}
		}
	}
	title = "Resource reloading event"
	desc = "If you see that it means that you loaded from autosave xd"

	is_triggered_only = yes

	hidden = yes
	option = {
		name = "bro noooo"
	}
}

country_event = { #RESOURCESSSSSSSSSSS
	id = goering_expanded.100
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_expanded.100"
		hidden_effect = {
			every_country = {
				limit = { 
					is_subject_of = GER
					OR = {
						has_idea = Pakt_Integrated_Reichskommissariat
						has_idea = Pakt_Autonomous_Reichskommissariat
					}
				}
				every_owned_state = {
					limit = {
						OR = {
							has_resources_amount = {
								resource = aluminium
								amount > 0
								delivered = yes
							}
							has_resources_amount = {
								resource = rubber
								amount > 0
								delivered = yes
							}
							has_resources_amount = {
								resource = tungsten
								amount > 0
								delivered = yes
							}
							has_resources_amount = {
								resource = steel
								amount > 0
								delivered = yes
							}
							has_resources_amount = {
								resource = chromium
								amount > 0
								delivered = yes
							}
							has_resources_amount = {
								resource = uranium
								amount > 0
								delivered = yes
							}
						}
					}
					random_list = {
						1 = {
							owner = {
								give_resource_rights = {
									receiver = GER
									state = PREV
									resources = { aluminium rubber tungsten steel chromium uranium }
								}
							}
						}
						2 = {}
					}
				}
			}
			GER = {
				country_event = { id = goering_expanded.102 days = 1 }
			}
			ZZZ = {
				update_market = yes
			}
		}
	}
	title = "RESOURCESSSSSSSSSSS"
	desc = "RESOURCESSSSSSSSSSS"

	is_triggered_only = yes

	hidden = yes
	option = {
		name = "RESOURCESSSSSSSSSSS"
	}
}

country_event = { 
	id = goering_expanded.101
	trigger = {
		NOT = {
			has_country_flag = GGR_huttigs_betrayal
		}
	}
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_expanded.101"
		GGR_conclude_SAW = yes
		if = {
			limit = { 
				AND = {
					COG = { 
						is_subject_of = USA 
					}
					country_exists = SAF
				}
			}
			country_event = { id = goering.saw.3 days = 6 }
			country_event = { id = goering.saw.6 days = 12 }
		}
		else_if = {
			limit = { country_exists = SAF }
			country_event = { id = goering.saw.4 days = 6 }
			country_event = { id = goering.saw.7 days = 12 }
		}
		else = {
			country_event = { id = goering.saw.5 days = 6 }
			country_event = { id = goering.saw.8 days = 12 }
		}
		GGR_Reload_main = yes
	}

	title = "checking event for SAW"
	desc = "I doubt that this is our problem but goddam"

	is_triggered_only = yes

	hidden = yes
	option = {
		name = "bruh"
	}
}

country_event = { 
	id = goering_expanded.102
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event goering_expanded.102"
		recalculate_GDP_and_PUs_on_demand = yes
	}

	title = "help reload eco"
	desc = ""

	is_triggered_only = yes

	hidden = yes
	option = {
		name = "bruh"
	}
}

# WPC econ unfucker
country_event = {
	id = goering_expanded.9999
	immediate = { log = "[GetDateText]: [Root.GetName]: event goering_expanded.9999" }
	title = "Post-72 econ unfucker"
	desc = "Goering ate all the money god damn"
	picture = GFX_report_event_GER_speech

	is_triggered_only = yes
	trigger = { is_ai = yes }
	fire_only_once = yes
	hidden = yes

	option = {
		name = "holla holla get dolla"
		# Cut debt
		divide_variable = { national_debt = 2 }

		# Add income
		add_ideas = GGR_econ_unfucker

		update_economy_tab = yes
		add_manpower = 1000000
	}
}