on_actions = {

	on_startup = {
		effect = {
			GER = {
				country_event = {
					id = goering.18000
					days = 11
				}
			}
			ZZZ = {
				country_event = { id = goering_expanded.3 days = 1 } # remove russian ai unblocker
				country_event = { id = goering_expanded.1 days = 2556 } # 2nd of January 1969 for wars and shit
				country_event = { id = goering_expanded.1 days = 3286 } # 2nd of January 1971 for wars and shit
			}
		}
	}

	on_government_change = {
		effect = {
			if = {
				limit = {
					ROOT = { tag = TNS }
				}
				if = {
					limit = {
						TNS = {
							has_government = national_socialism
							#has_idea = TNS_unwanted_land
						}
						GER = {
							has_country_leader = {
								character = GER_hermann_goring
								ruling_only = yes
							}
							is_in_faction_with = UKR
						}
					}
					#GER = { country_event = { id = goeirng.tepes.5 days = 1 } }
					UKR = {
						annex_country = {
							target = TNS
							transfer_troops = no
						}
						add_core_effect = yes
					}
				}
			}
		}
	}

	on_annex = {
		effect = {
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
					FROM = {
						tag = NOR
					}
				}
				2097 = {
					transfer_state_to = GER
					set_compliance = 75
				}
			}
		}
	}

	on_join_faction = {
		effect = {
			GER = {
				if = {
					limit = {
						FROM = { tag = GER }
						ROOT = {
							OR = {
								tag = OST
								tag = BLR
								tag = DST
							}
						}
						NOT = { has_variable = GGR_ostland_loot }
					}
					set_variable = { GGR_ostland_loot = 4 }
				}
			}
		}
	}

	on_declare_war = {
		effect = {
			if = {
				limit = {
					ROOT = {
						is_russian_nation = yes
					}
					FROM = {
						tag = FIN
						is_in_faction_with = GER
					}
				}
				ROOT = {
					white_peace = FROM
					white_peace = GER
				}
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
					ROOT = { is_russian_nation = yes has_war_with = GER }
					FROM = { is_russian_nation = yes has_war_with = GER }
				}
				FROM = { white_peace = ROOT }
			}
			if = {
				limit = {
					ROOT = {
						OR = {
							tag = IRB
							tag = IRC
							tag = IRL
							tag = IRA
							tag = IRI
						}
					}
					FROM = {
						tag = PER
					}
				}
				PER = {
					leave_faction = yes
					econ_leave_sphere = yes
					remove_faction_status = yes
				}
			}
		}
	}
	
	on_weekly = {
		effect = {
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				GER = {
					if = { # I swear to God Iberian Wars is a fucking mess
						limit = {
							has_country_flag = GGR_helping_spain
						}
						every_country = {
							limit = {
								is_iberian_nation = yes
								has_war_with = FZL
								exists = yes
								has_capitulated = yes
							}
							FZL = {
								annex_country = {
									target = PREV
									transfer_troops = no
								}
								add_core_effect = yes
							}
							IBRWarsResign = yes
						}
					}
				}
				every_country = {
					limit = {
						has_variable = var_state
						exists = yes
					}
					GGR_set_RK_capital = yes
				}
				GGR_update_garrison_mech = yes
				if = {
					limit = {
						has_global_flag = GGR_west_africa_conquered
						any_country = {
							is_west_african_nation = yes
							exists = yes
						}
					}
					every_country = {
						limit = {
							is_west_african_nation = yes
							exists = yes
						}
						WAF = {
							annex_country = {
								target = PREV
								transfer_troops = no
							}
						}
					}
				}
				if = {
					limit = {
						has_global_flag = GGR_central_africa_conquered
						any_country = {
							is_central_african_nation = yes
							exists = yes
						}
					}
					every_country = {
						limit = {
							is_central_african_nation = yes
							exists = yes
						}
						if = {
							limit = {
								country_exists = GRO
								GRO = { is_in_faction_with = GER }
							}
							GRO = { save_global_event_target_as = zentralafrika }
						}
						else = {
							RCA = { save_global_event_target_as = zentralafrika }
						}
						event_target:zentralafrika = {
							if = {
								limit = {
									tag = RCA
									exists = no
								}
								GGR_set_up_RK_ROOT = yes
							}
							annex_country = {
								target = PREV
								transfer_troops = no
							}
							add_core_effect = yes
						}
					}
				}
				if = {
					limit = {
						has_global_flag = GGR_east_africa_conquered
						any_country = {
							is_east_african_nation = yes
							exists = yes
						}
					}
					every_country = {
						limit = {
							is_east_african_nation = yes
							exists = yes
						}
						ROA = {
							annex_country = {
								target = PREV
								transfer_troops = no
							}
						}
					}
				}
				if = {
					limit = {
						has_global_flag = GGR_southwest_africa_conquered
						any_country = {
							is_southwest_african_nation = yes
							exists = yes
						}
					}
					every_country = {
						limit = {
							is_southwest_african_nation = yes
							exists = yes
							NOT = { is_in_faction_with = GER }
						}
						GWA = {
							annex_country = {
								target = PREV
								transfer_troops = no
							}
						}
					}
					USA = {
						TNO_fopo_remove_angola_civil_war_tab = yes
					}
					JAP = {
						TNO_fopo_remove_angola_civil_war_tab = yes
					}
				}
				if = {
					limit = {
						has_global_flag = GGR_south_africa_conquered
						any_country = {
							is_south_african_nation = yes
							exists = yes
						}
					}
					every_country = {
						limit = {
							is_south_african_nation = yes
							exists = yes
						}
						RSA = {
							annex_country = {
								target = PREV
								transfer_troops = no
							}
						}
					}
				}
			}
		}
	}

	on_daily = {
		effect = {
			if = {
				limit = {
					country_exists = WAF
					has_variable = global.west_african_nations_to_annex^0
				}
				every_country = {
					limit = {
						exists = yes
						is_in_array = {
							array = global.west_african_nations_to_annex
							value = THIS
						}
					}
					WAF = {
						annex_country = {
							target = PREV
							transfer_troops = no
						}
						add_core_effect = yes
					}
				}
			}
		}
	}

	on_daily_GER = {
		effect = {
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				if = {
					limit = {
						has_war = yes
					}
					GGR_update_anarchy = yes
				}
				if = {
					limit = {
						has_country_flag = GGR_kriegsmarine_development
					}
					set_variable = {
						var = GGR_ship_count
						value = num_ships
					}
					set_variable = {
						var = GGR_USA_ship_count
						value = USA.num_ships
					}
					set_variable = {
						var = GGR_JAP_ship_count
						value = JAP.num_ships
					}
				}
				if = {
					limit = {
						has_completed_focus = GGR_match_them
					}
					set_temp_variable = {
						var = GGR_USA_ship_temp
						value = USA.num_ships
					}
					multiply_temp_variable = {
						var = GGR_USA_ship_temp
						value = 0.75
					}
					set_temp_variable = {
						var = GGR_JAP_ship_temp
						value = JAP.num_ships
					}
					multiply_temp_variable = {
						var = GGR_JAP_ship_temp
						value = 0.75
					}
					set_variable = {
						var = GGR_USA_ship_target
						value = GGR_USA_ship_temp
					}
					set_variable = {
						var = GGR_JAP_ship_target
						value = GGR_JAP_ship_temp
					}
				}
				if = {
					limit = {
						has_completed_focus = GGR_the_ringhorn_doctrine
					}
					set_variable = {
						var = GGR_USA_ship_count_cruiser
						value = USA.num_ships_with_type@cruiser
					}
					set_variable = {
						var = GGR_JAP_ship_count_cruiser
						value = JAP.num_ships_with_type@cruiser
					}
					set_temp_variable = {
						var = GGR_USA_ship_cruiser_temp
						value = USA.num_ships_with_type@cruiser
					}
					multiply_temp_variable = {
						var = GGR_USA_ship_cruiser_temp
						value = 0.70
					}
					set_temp_variable = {
						var = GGR_JAP_ship_cruiser_temp
						value = JAP.num_ships_with_type@cruiser
					}
					multiply_temp_variable = {
						var = GGR_JAP_ship_cruiser_temp
						value = 0.70
					}
					set_variable = {
						var = GGR_USA_cruiser_target
						value = GGR_USA_ship_cruiser_temp
					}
					set_variable = {
						var = GGR_JAP_cruiser_target
						value = GGR_JAP_ship_cruiser_temp
					}
					if = {
						limit = {
							check_variable = {
								var = GGR_USA_cruiser_target
								value = GGR_JAP_cruiser_target
								compare = greater_than_or_equals
							}
						}
						set_variable = {
							var = GGR_cruiser_target
							value = GGR_JAP_cruiser_target
						}
					}
					if = {
						limit = {
							check_variable = {
								var = GGR_USA_cruiser_target
								value = GGR_JAP_cruiser_target
								compare = less_than
							}
						}
						set_variable = {
							var = GGR_cruiser_target
							value = GGR_USA_cruiser_target
						}
					}
				}
				if = {
					limit = {
						has_dynamic_modifier = { modifier = GGR_economy }
					}
					set_variable = { GGR_poverty_rate = gdp_effect_on_poverty }
					multiply_variable = { GGR_poverty_rate = -1 }
				}
				if = {
					limit = {
						is_ai = yes
					}
					every_controlled_state = {
						limit = {
							NOT = { is_core_of = GER }
							has_resistance = yes
						}
						set_occupation_law_where_available = martial_law_occupation
					}
				}
				if = {
					limit = {
						has_country_flag = GGR_dealing_with_russian_partisans
					}
					clamp_variable = {
						var = GER.GGR_russian_population_anger
						min = 0
						max = 1
					} 
					set_variable = { GER.GGR_russian_population_anger_effect = GER.GGR_russian_population_anger }
					divide_variable = { GER.GGR_russian_population_anger_effect = 2 }
					set_variable = { GER.GGR_russian_population_anger_negative = GER.GGR_russian_population_anger_effect }
					multiply_variable = { GER.GGR_russian_population_anger_negative = -1 }
				}
			}
		}
	}

	on_monthly = {
		effect = {
			every_country = {
				limit = {
					is_in_faction_with = GER
					has_idea = GGR_garrisons_from_germany_dummy
				}
				subtract_from_variable = { garrison_draining_factor = 0.025 }
				clamp_variable = {
					var = garrison_draining_factor
					min = 0.75
				}
			}
		}
	}

	#pulse effects
	on_monthly_GER = {
		effect = {
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				every_country = {
					limit = {
						OR = {
							has_idea = Pakt_Autonomous_Reichskommissariat
							has_idea = Pakt_Integrated_Reichskommissariat
							has_idea = Pakt_Protektorat
							has_idea = Pakt_Reichsland
						}
						is_in_faction_with = GER
						num_divisions > 0
						NOT = {
							tag = GRO
							tag = COG
							tag = ANG
							tag = BOR
						}
						is_ai = yes
					}
					every_state = {
						limit = {
							PREV = {
								divisions_in_state = {
									size > 0
									state = PREV
								}
							}
						}
						PREV = {
							country_lock_all_division_template = yes
							delete_unit = {
								state = PREV
								disband = yes
							}
						}
					}
				}
				GGR_Reload_main = yes
				# ARC stuff
				set_temp_variable = { random_chance_var = random }
				if = {
					limit = {
						check_variable = { global.ARC_unity < -6 }
						NOT = {
							has_global_flag = ARC_post_war_conference
						}
					}
					every_country = {
						limit = { has_country_flag = joined_ARC }
						country_event = { id = ARC.34 days = 0 }
					}
				}
				if = {
					limit = { check_variable = { random_chance_var > 0.3 } }
					if = {
						limit = { check_variable = { random_chance_var < 0.34 } }
						random_country = {
							limit = { has_country_flag = joined_ARC }
							country_event = { id = ARC.31 days = 0 }
						}
					}
					else_if = {
						limit = { check_variable = { random_chance_var < 0.67 } }
						random_country = {
							limit = { has_country_flag = joined_ARC }
							country_event = { id = ARC.32 days = 0 }
						}
					}
					else = {
						random_country = {
							limit = {
								has_country_flag = joined_ARC
							}
							country_event = { id = ARC.33 days = 0 }
						}
					}
				}
				# Goerings wonderful economic adventures & other monthly things
				GER = {
					if = {
						limit = {
							has_variable =  GGRCSI_corruption
						}
						if = {
							limit = {
								check_variable = { GGR_GGRCSI_military_concern > 0.49 }
							}
							set_temp_variable = { GGR_GGRCSI_military_concern_100 = GGR_GGRCSI_military_concern }
							multiply_temp_variable = { GGR_GGRCSI_military_concern_100 = 100 }
							random = {
								chance = GGR_GGRCSI_military_concern_100
								country_event = goering.science.24
							}
						}
						else_if = {
							limit = {
								check_variable = { GGR_GGRCSI_public_concern > 0.49 }
							}
							set_temp_variable = { GGR_GGRCSI_public_concern_100 = GGR_GGRCSI_public_concern }
							multiply_temp_variable = { GGR_GGRCSI_public_concern_100 = 100 }
							random = {
								chance = GGR_GGRCSI_public_concern_100
								country_event = goering.science.23
							}
						}
					}
				}
				#Nothing criminal just reloading resources
				country_event = {
					id = goering_expanded.99
					days = 1
				}
				if = {
					limit = {
						has_completed_focus = GER_GOR_lets_get_down_to_work
					}
					GGRCSI_calculate_total_nuclear_reactors = yes
					GGRCSI_update_spending = yes
				}
			}
		}
	}

	on_capitulation_immediate = {
		effect = {
			if = {
				limit = {
					ROOT = {
						tag = CLC
						has_government = national_socialism
					}
					FROM = {
						is_and_nation = yes
					}
				}
				GER = {
					country_event = goering.rockwell.17
					set_temp_variable = { target = CLC }
					TNO_clear_num_volunteers = yes
				}
			}
			else_if = {
				limit = {
					FROM = {
						tag = CLC
						has_government = national_socialism
						NOT = { country_exists = CLD country_exists = CLL }
					}
				}
				GER = {
					set_temp_variable = { target = CLC }
					TNO_clear_num_volunteers = yes
				}
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
					FROM = {
						is_in_faction_with = GER
					}
				}
				USA = {
					set_temp_variable = { target = ROOT }
					TNO_clear_num_volunteers = yes
				}
				JAP = {
					set_temp_variable = { target = ROOT }
					TNO_clear_num_volunteers = yes
				}
			}
			FROM = {
				if = {
					limit = {
						is_subject_of = GER
						has_global_flag = german_civil_war_goeringvic
					}
					country_event = { id = goering_expanded.102 days = 3 }
				}
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
					ROOT = {
						has_war_with = GER
					}
				}
				ROOT = {
					if = {
						limit = {
							is_in_faction = yes
							NOT = { is_in_faction_with = GER }
							is_west_african_nation = no
							NOT = {
								tag = USA
								tag = JAP
							}
							NOT = {
								has_country_flag = joined_ARC
							}
						}
						leave_faction = yes
					}
				}
			}
		}
	}

	on_capitulation = {
		effect = {
			if = {
				limit = {
					ROOT = {
						original_tag = FZL
					}
					GER = { has_country_flag = GGR_helping_spain }
				}
				GER = {
					country_event = goering.blau.iberian_wars.14
					set_temp_variable = { target = FZL }
					TNO_clear_num_volunteers = yes
				}
			}
		}
	}
	#The Plunder of the Levenant
	on_capitulation_immediate = {
		effect = {
			if = {
				limit = {
					GER = {
						has_global_flag = GGR_ignored_riches
						has_war_with = ITA
					}
					ROOT = {
						OR = {
							original_tag = ISR
							original_tag = PAL
						}
					}
					FROM = {
						is_in_faction_with = GER
					}
				}
				GER = {
					country_event = {
						id = goering.gaiseric.26
					}
				}
			}
		}
	}

	#The plunder of the Persian Gulf
	on_capitulation_immediate = {
		effect = {
			if = {
				limit = {
					GER = {
						has_global_flag = GGR_ignored_riches
						has_war_with = ITA
					}
					ROOT = {
						original_tag = GUL
					}
					FROM = {
						is_in_faction_with = GER
					}
				}
				GER = {
					country_event = {
						id = goering.gaiseric.27
					}
				}
			}
		}
	}

	#The plunder of Yemen
	on_capitulation_immediate = {
		effect = {
			if = {
				limit = {
					GER = {
						has_global_flag = GGR_ignored_riches
						has_war_with = ITA
					}
					ROOT = {
						original_tag = YEM
					}
					FROM = {
						is_in_faction_with = GER
					}
				}
				GER = {
					country_event = {
						id = goering.gaiseric.28
					}
				}
			}
		}
	}

	#The plunder of Egypt
	on_capitulation_immediate = {
		effect = {
			if = {
				limit = {
					GER = {
						has_global_flag = GGR_ignored_riches
						has_war_with = ITA
					}
					ROOT = {
						original_tag = EGY
					}
					FROM = {
						is_in_faction_with = GER
					}
				}
				GER = {
					country_event = {
						id = goering.gaiseric.29
					}
				}
			}
		}
	}

	on_declare_war = {
		effect = {
			if = {
				limit = {
					ROOT = {
						is_ai = yes
						NOT = {
							OR = {
								is_russian_nation = yes
								is_after_midninght_russian_nation = yes
								is_west_african_nation = yes
								tag = GER
							}
						}
					}
					FROM = {
						is_ai = yes
						NOT = {
							OR = {
								is_russian_nation = yes
								is_after_midninght_russian_nation = yes
								is_west_african_nation = yes
								tag = GER
							}
						}
					}
				}
				if = {
					limit = {
						ROOT = {
							tag = YUN
						}
						FROM = {
							tag = CHI
						}
					}
					ZZZ = { set_variable = { war_timer = 180 } }
				}
				if = {
					limit = {
						FROM = {
							tag = DOM
						}
					}
					ZZZ = { set_variable = { war_timer = 1 } }
				}
				if = {
					limit = {
						FROM = {
							tag = SAF
						}
					}
					ZZZ = { set_variable = { war_timer = 365 } }
				}
				else = {
					ZZZ = { set_variable = { war_timer = 60 } }
				}
				ROOT = {
					if = {
						limit = {
							NOT = {
								OR = {
									has_idea = ZZZ_war_stage_0
									has_idea = ZZZ_war_stage_1
									has_idea = ZZZ_war_stage_2
									has_idea = ZZZ_war_stage_3
								}
							}
						}
						add_timed_idea = {
							idea = ZZZ_war_stage_0
							days = ZZZ.war_timer
						}
					}
				}
				FROM = {
					if = {
						limit = {
							NOT = {
								OR = {
									has_idea = ZZZ_war_stage_0
									has_idea = ZZZ_war_stage_1
									has_idea = ZZZ_war_stage_2
									has_idea = ZZZ_war_stage_3
								}
							}
						}
						add_timed_idea = {
							idea = ZZZ_war_stage_0
							days = ZZZ.war_timer
						}
					}
				}
				ZZZ = { clear_variable = war_timer }
			}
			if = {
				limit = {
					NOT = { has_global_flag = TNO_BRITAIN_CONTENT_OLD_ENABLED }
					ROOT = { tag = FEN }
					FROM = { tag = ENG }
				}
				CAN = {
					set_temp_variable = { target = FEN }
					TNO_increase_volunteer_cap_2 = yes
				}
				AST = {
					set_temp_variable = { target = FEN }
					TNO_increase_volunteer_cap_1 = yes
				}
				NZL = {
					set_temp_variable = { target = FEN }
					TNO_increase_volunteer_cap_1 = yes
				}
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				if = {
					limit = {
						ROOT = { tag = GER }
					}
					if = {
						limit = {
							GER = {
								NOT = {
									has_country_flag = GGR_ignore_anti_goering_system
								}
							}
						}
						FROM = { country_event = goering_anti.0 }
					}
					else = {
						GER = {
							clr_country_flag = GGR_ignore_anti_goering_system
						}
					}
				}
				if = {
					limit = {
						ROOT = { tag = FZL }
						GER = { 
							OR = {
								has_country_flag = GGR_collapse_spain
								has_country_flag = GGR_helping_spain
							} 
						}
					}
					GER = { country_event = goering.blau.iberian_wars.15 }
				}
			}
		}
	}
	
	#Göring's plunder of the Italian peninsula
	on_state_control_changed = {
		effect = {
			if = {
				limit = {
					GER = {
						has_country_flag = GGR_burn_the_peninsula
					}
					ROOT = {
						is_in_faction_with = GER
						has_war_with = ITA
					}
					FROM = {
						original_tag = ITA
					}
				}
				if = {
					limit = {
						FROM.FROM = {
							state = 2
						}
					}
					country_event = {
						id = goering.gaiseric.4
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 117
						}
					}
					country_event = {
						id = goering.gaiseric.5
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 162
						}
					}
					country_event = {
						id = goering.gaiseric.6
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 1323
						}
					}
					country_event = {
						id = goering.gaiseric.7
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 735
						}
					}
					country_event = {
						id = goering.gaiseric.8
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 158
						}
					}
					country_event = {
						id = goering.gaiseric.9
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 159
						}
					}
					country_event = {
						id = goering.gaiseric.10
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 160
						}
					}
					country_event = {
						id = goering.gaiseric.11
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 163
						}
					}
					country_event = {
						id = goering.gaiseric.12
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 161
						}
					}
					country_event = {
						id = goering.gaiseric.13
					}
				}
				#else_if = {
				#	limit = {
				#		FROM.FROM = {
				#			state = 1324
				#		}
				#	}
				#	country_event = {
				#		id = goering.gaiseric.14
				#	}
				#}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 157
						}
					}
					country_event = {
						id = goering.gaiseric.14
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 1325
						}
					}
					country_event = {
						id = goering.gaiseric.15
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 156
						}
					}
					country_event = {
						id = goering.gaiseric.16
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 115
						}
					}
					country_event = {
						id = goering.gaiseric.17
					}
				}
				else_if = {
					limit = {
						FROM.FROM = {
							state = 1327
						}
					}
					country_event = {
						id = goering.gaiseric.18
					}
				}

			}
		}
	}

	#Göring capturs italian naval bases to either use them or sabatoge italian ships
	on_state_control_changed = {
		effect = {
			if = {
				limit = {
					ROOT = {
						original_tag = GER
						has_war_with = ITA
					}
					FROM = {
						original_tag = ITA
					}
					FROM.FROM = {
						OR = {
							state = 182
							state = 183
							state = 114
						}
					}
				}
				if = {
					limit = {
						GER = {
							has_country_flag = GGR_tempting_lure
							any_country = { # doesn't work with any_allied_country
								is_in_faction_with = GER
								controls_state = 182
							}
							any_country = {
								is_in_faction_with = GER
								controls_state = 183
							}
							any_country = {
								is_in_faction_with = GER
								controls_state = 114
							}
						}	
					}
					country_event = {
						id = goering.gaiseric.2
					}
					ITA = {
						country_event = {
							id = goering.gaiseric.24
						}
					}

				}
				else_if = {
					limit = {
						GER = {
							has_country_flag = GGR_perfect_staging_grounds
							any_country = {
								is_in_faction_with = GER
								controls_state = 182
							}
							any_country = {
								is_in_faction_with = GER
								controls_state = 183
							}
							any_country = {
								is_in_faction_with = GER
								controls_state = 114
							}
						}
					}
					country_event = {
						id = goering.gaiseric.3
					}
				}
			}
		}
	}

	#Göring either destroys italian industry of agriculture
	on_state_control_changed = {
		effect = {
			if = {
				limit = {
					ROOT = {
						original_tag = GER
						has_war_with = ITA
					}
					FROM = {
						original_tag = ITA
					}
				}
				if = {
					limit = {
						AND = {
							GER = { has_country_flag = GGR_smolder_the_factories }
							any_country = {
								is_in_faction_with = GER
								controls_state = 117
							}
							FROM.FROM = {
								state = 2
							}
						}
					}
					GER = {
						country_event = {
							id = goering.gaiseric.20
						}
					}
					ITA = {
						country_event = {
							id = goering.gaiseric.21
						}
					}
				}

				else_if = {
					limit = {
						AND = {
							GER = { has_country_flag = GGR_torch_the_crops }
							any_country = {
								is_in_faction_with = GER
								controls_state = 156
							}
							FROM.FROM = {
								state = 115
							}
						}
					}
					GER = {
						country_event = { id = goering.gaiseric.22 }
					}
					ITA = {
						country_event = { id = goering.gaiseric.23 }
					}
				}
			}
		}
	}

	#The plunder of Libya
	on_state_control_changed = {
		effect = {
			if = {
				limit = {
					GER = {
						has_global_flag = GGR_ignored_riches
					}
					ROOT = {
						is_in_faction_with = GER
					}
					FROM = {
						OR = {
							original_tag = ITA
							original_tag = LBA
						}
					}

					FROM.FROM = {
						is_core_of = LBA
						any_country = {
							is_in_faction_with = GER
							PREV = { is_fully_controlled_by = PREV }
						}
					}
				}
				GER = {
					country_event = {
						id = goering.gaiseric.30
					}
				}
			}
		}
	}

	#The plunder of Tunisia
	on_capitulation = {
		effect = {
			if = {
				limit = {
					GER = {
						has_global_flag = GGR_ignored_riches
					}
					FROM = {
						is_in_faction_with = GER
					}
					ROOT = {
						tag = TUN
					}
				}

				GER = {
					country_event = {
						id = goering.gaiseric.31
					}
				}
			}
		}
	}
	#The plunder of Egypt
	on_capitulation_immediate = {
		effect = {
			if = {
				limit = {
					GER = {
						has_global_flag = GGR_ignored_riches
						has_war_with = ITA
					}
					ROOT = {
						original_tag = ILG
					}
					FROM = {
						is_in_faction_with = GER
					}
				}
				GER = {
					country_event = {
						id = goering.gaiseric.32
					}
				}
			}
		}
	}

	on_capitulation = {
		effect = {
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
					ROOT = {
						has_idea = GGR_garrisons_from_germany_dummy
					}
				}
				GER = {
					if = {
						limit = {
							ROOT = { has_idea = Pakt_Reichkolonie }
						}
						set_autonomy = {
							target = ROOT
							autonomous_state = autonomy_reichskolonie
						}
					}
					else_if = {
						limit = {
							ROOT = { has_idea = Pakt_Military_Authority }
						}
						set_autonomy = {
							target = ROOT
							autonomous_state = autonomy_military_government
						}
					}
					else_if = {
						limit = {
							ROOT = { has_idea = Pakt_Integrated_Reichskommissariat }
						}
						set_autonomy = {
							target = ROOT
							autonomous_state = autonomy_integrated_reichskommissariat
						}
					}
					else = {
						set_autonomy = {
							target = ROOT
							autonomous_state = autonomy_autonomous_reichskommissariat
						}
					}
					ROOT = {
						set_popularities = {
							national_socialism = 60
							national_socialism_2 = 40
						}
					}
				}
			}
		}
	}

	on_capitulation = {
		effect = {
			if = {
				limit = {
					FROM = {
						OR = {
							original_tag = GER
							is_in_faction_with = GER
						}
					}
					ROOT = {
						OR = {
							tag = BRA
							tag = VEN
							
							tag = COL
							tag = CLL
							tag = CLC
							tag = CLD

							tag = EDU
							tag = PRU
							tag = BOL
							tag = PAR
							tag = CHL
							tag = ARG
							tag = URG
						}
					}
					has_global_flag = german_civil_war_goeringvic
				}
				if = {
					limit = {
						ROOT = {
							OR = {
								tag = COL
								tag = CLL
								tag = CLC
								tag = CLD
							}
						}
					}
					if = {
						limit = {
							NOT = {
								country_exists = COL
								country_exists = CLL
								country_exists = CLC
								country_exists = CLD
							}
						}
						GER = {
							add_to_variable = { GGR_conquistador_supply = -0.05 }
							add_to_variable = { GGR_conquistador_consump = -0.05 }
							add_to_variable = { GGR_conquistador_heat_attrition = -0.05 }
							add_to_variable = { GGR_conquistador_no_supply = -0.05 }
							add_to_variable = { GGR_conquistador_hot_acclimation = 0.05 }
							add_to_variable = { GGR_conquistador_reinforce = 0.05 }
							add_to_variable = { GGR_conquistador_speed = 0.05 }
							add_to_variable = { GGR_conquistador_spotting = 0.05 }
							add_to_variable = { GGR_conquistador_hit = 0.05 }
						}
					}
				}
				else = {
					GER = {
						add_to_variable = { GGR_conquistador_supply = -0.05 }
						add_to_variable = { GGR_conquistador_consump = -0.05 }
						add_to_variable = { GGR_conquistador_heat_attrition = -0.05 }
						add_to_variable = { GGR_conquistador_no_supply = -0.05 }
						add_to_variable = { GGR_conquistador_hot_acclimation = 0.05 }
						add_to_variable = { GGR_conquistador_reinforce = 0.05 }
						add_to_variable = { GGR_conquistador_speed = 0.05 }
						add_to_variable = { GGR_conquistador_spotting = 0.05 }
						add_to_variable = { GGR_conquistador_hit = 0.05 }
					}
				}
			}
		}
	}
}