add_namespace = SAFWAR
add_namespace = SAFWAR.SAFFlavour
add_namespace = SAF_USA
add_namespace = SAF_news
##Currently Reserved For Debug
country_event = {
	id = SAFWAR.11111
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.11111" }
	title = SAFWAR.11111.t
	desc = SAFWAR.11111.d
	picture = GFX_report_event_BOR_saw_soldier
	hidden = yes
	is_triggered_only = yes
	fire_only_once = yes

	immediate = {
		USA = {
			set_country_flag = USA_can_pull_out_mandates
		}
	}
}
country_event = {
	id = SAFWAR.11110
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.11110" }
	title = SAFWAR.11111.t
	desc = SAFWAR.11111.d
	picture = GFX_report_event_BOR_saw_soldier
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = "total pakt win"
		hidden_effect = {
			set_global_flag = SAF_Schild_Victory
			conclude_south_african_war = yes
			USA = {
				set_temp_variable = { Victory_ID = 4 }
				set_temp_variable = { Victory_Outcome = 1 }
				set_temp_variable = { Victory_Points = -300 }
				Cold_War_GUI_ManipulateVictory = yes
			}
			GER = {
				set_temp_variable = { Victory_ID = 4 }
				set_temp_variable = { Victory_Outcome = 5 }
				set_temp_variable = { Victory_Points = 300 }
				Cold_War_GUI_ManipulateVictory = yes
			}
			every_country = {
				limit = {
					OR = {
						tag = USA
						is_in_faction_with = USA
					}
				}
				white_peace = ANG
				white_peace = GRO
				white_peace = COG
				white_peace = NAM
				white_peace = BOR
			}
			if = {
				limit = {
					OR = {
						tag = SAF
						tag = GRO
						tag = COG
						tag = ANG
					}
				}
				country_event = {
					id = fixfixfix.2
					days = 8
				}
			}

			USA = {
				clr_country_flag = USA_show_south_africa_tree
				USA_reload_presidential_tree = yes
			}
			CAN = {
				remove_ideas = TNO_division_limit_exemption
			}
			GRO = {
				transfer_state = 1049
				transfer_state = 1048
				transfer_state = 1050
			}

			if = {
				limit = {
					country_exists = ANG
				}

				ANG = {
					transfer_state = 942
					transfer_state = 1045
					transfer_state = 1047
					transfer_state = 1046
					transfer_state = 1044
				}
			}
			else = {
				GRO = {
					transfer_state = 942
					transfer_state = 1045
					transfer_state = 1047
					transfer_state = 1046
					transfer_state = 1044
				}
			}

			if = {
				limit = {
					has_global_flag = ANG_Free
				}
				NAM = {
					annex_country = {
						target = ANG
						transfer_troops = no
					}
				}
			}
			BOR = {
				annex_country = {
					target = SAF
					transfer_troops = no
				}
				annex_country = {
					target = ANC
					transfer_troops = no
				}
				transfer_state = 936
				transfer_state = 719
				transfer_state = 935
				transfer_state = 934
				transfer_state = 681
				transfer_state = 1312
				transfer_state = 933
				transfer_state = 2087

				transfer_state = 275
				transfer_state = 939
				transfer_state = 940
				transfer_state = 937
				transfer_state = 938

				add_state_core = 936
				add_state_core = 719
				add_state_core = 935
				add_state_core = 934
				add_state_core = 681
				add_state_core = 1312
				add_state_core = 933
				add_state_core = 2087

				add_state_core = 275
				add_state_core = 939
				add_state_core = 940
				add_state_core = 937
				add_state_core = 938
				save_party_popularities = yes
				get_current_government_type = yes
			}
			GRO = {
				set_autonomy = {
					target = BOR
					autonomy_state = autonomy_collaborator_puppet_state
					end_wars = no
					end_civil_wars = no
				}
				every_owned_state = {
					add_core_of = GRO
					remove_core_of = BOR
					remove_core_of = ANC
					remove_core_of = SAF
				}
			}
			BOR = {
				apply_party_popularities = yes
				restore_previous_government_type = yes
			}
		}
	}
	option = {
		name = "total OFN win"
		hidden_effect = {
			set_global_flag = SAF_OFN_Victory
			conclude_south_african_war = yes
			USA = {
				set_temp_variable = { Victory_ID = 4 }
				set_temp_variable = { Victory_Outcome = 5 }
				set_temp_variable = { Victory_Points = 300 }
				Cold_War_GUI_ManipulateVictory = yes
			}
			GER = {
				set_temp_variable = { Victory_ID = 4 }
				set_temp_variable = { Victory_Outcome = 1 }
				set_temp_variable = { Victory_Points = -300 }
				Cold_War_GUI_ManipulateVictory = yes
			}
			every_country = {
				limit = {
					OR = {
						tag = USA
						is_in_faction_with = USA
					}
				}
				white_peace = ANG
				white_peace = GRO
				white_peace = COG
				white_peace = NAM
				white_peace = BOR
			}
			SAF = {
				remove_ideas = SAF_Boer_Viet_Cong
			}
			SAF = {
				if = {
					limit = { has_global_flag = SAF_monarchy_won }
					country_event = { id = SAF.143 days = 1 }
				}
				else_if = {
					limit = { has_global_flag = SAF_republic_won }
					country_event = { id = SAF.157 days = 1 }
				}
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				GER = {
					set_country_flag = GGR_total_loss_SAW
				}
			}
			clr_global_flag = SAF_WAR_Leopoldville_Captured
			CAN = {
				#remove_ideas = tno_CAN_quebecois_conscription
				remove_ideas = TNO_division_limit_exemption
				#remove_ideas = tno_CAN_supporting_USA
			}
			SAF = {
				annex_country = {
					target = BOR
					transfer_troops = no
				}
				annex_country = {
					target = NAM
					transfer_troops = no
				}
				annex_country = {
					target = ANC
					transfer_troops = no
				}
				load_focus_tree = ZZZ_blank_focus

				#SOUTH AFRICAN STATES
				transfer_state = 275
				transfer_state = 681
				transfer_state = 719
				transfer_state = 884
				transfer_state = 933
				transfer_state = 934
				transfer_state = 935
				transfer_state = 936
				transfer_state = 937
				transfer_state = 938
				transfer_state = 939
				transfer_state = 940
				transfer_state = 942
				transfer_state = 1044
				transfer_state = 1045
				transfer_state = 1046
				transfer_state = 1047
				transfer_state = 1048
				transfer_state = 1049
				transfer_state = 1050
				transfer_state = 1312
				transfer_state = 545
				transfer_state = 1063

				#OSTAFRIKAN STATES
				transfer_state = 880
				transfer_state = 881
				transfer_state = 1058
				transfer_state = 1059
				transfer_state = 1060
				transfer_state = 1061
				transfer_state = 1062
				transfer_state = 1064
				transfer_state = 1065
				transfer_state = 1076
				transfer_state = 1750
				transfer_state = 1751
				transfer_state = 1752

				#SUDWESTAFRIKAN STATES
				transfer_state = 541
				transfer_state = 778
				transfer_state = 1027
				transfer_state = 1028
				transfer_state = 1029
				transfer_state = 1031
				transfer_state = 1213
				transfer_state = 1214
			}
			ANG = {
				remove_state_core = 1027
				remove_state_core = 1028
				remove_state_core = 1029
				remove_state_core = 778
				remove_state_core = 1214
				remove_state_core = 541
				remove_state_core = 1213
				remove_state_core = 1031
				remove_state_core = 884
			}
			GRO = {
				remove_state_core = 880
				remove_state_core = 881
				remove_state_core = 1058
				remove_state_core = 1059
				remove_state_core = 1060
				remove_state_core = 1061
				remove_state_core = 1062
				remove_state_core = 1064
				remove_state_core = 1065
				remove_state_core = 1076
				remove_state_core = 1750
				remove_state_core = 1751
				remove_state_core = 1752
			}
			GER = {
				end_puppet = GRO
			}
			USA_OFN_mandates_formed = yes
			USA_AFRICA_set_start_stability = yes
		}
	}
	option = {
		name = "pakt ceasefire"
	}
	option = {
		name = "ofn ceasefire"
	}
}
country_event = {
	id = SAFWAR.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.1" }
	title = SAFWAR.1.t
	desc = SAFWAR.1.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.1.a
		hidden_effect = {
			SCO = {
				country_event = {
					id = SCO.107
					days = 2
				}
			}
			clr_country_flag = SAF_referendum_decisions
		}
		ai_chance = { factor = 80 }
		GER = {
			every_country = {
				limit = {
					is_puppet_of = GER
				}
				GER = { end_puppet = PREV }
			}
		}
		BOR = {
			transfer_state = 275
			transfer_state = 939
			transfer_state = 940
			transfer_state = 938
			transfer_state = 937
			transfer_state = 936
			inherit_technology = PREV
			load_oob = BOR
			set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Corporatism }
			econ_type_change = yes
		}
		275 = {
			add_core_of = BOR
			set_demilitarized_zone = no
		}
		939 = {
			add_core_of = BOR
			set_demilitarized_zone = no
		}
		940 = {
			add_core_of = BOR
			set_demilitarized_zone = no
		}
		938 = {
			add_core_of = BOR
			set_demilitarized_zone = no
		}
		937 = {
			add_core_of = BOR
			set_demilitarized_zone = no
		}
		936 = {
			add_core_of = BOR
			set_demilitarized_zone = no
		}
		GRO = {
			create_faction = afrika_schild
			add_to_faction = COG
			add_to_faction = ANG
			add_to_faction = BOR
		}
		BOR = {
			declare_war_on = {
				target = SAF
				type = annex_everything
			}
		}
		set_variable = { SAF_free_prod_units = 7 }
		SAF = {
			#add_timed_idea = {
			#	idea = SAF_SAW_hidden_buff
			#	days = 400
			#}
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 3500
				producer = USA
			}
			add_equipment_to_stockpile = {
				type = artillery_equipment
				amount = 250
				producer = USA
			}
			add_manpower = 50000
		}
		if = {
			limit = {
				SAF = {
					NOT = { has_country_flag = SAF_anti_anc }
				}
			}
			ANG = {
				add_to_war = {
					targeted_alliance = BOR
					enemy = SAF
				}
				set_state_controller = 1046
				set_state_controller = 1044
				set_state_controller = 1050
				set_state_controller = 545
				set_state_controller = 1063
				set_state_controller = 1047
				set_state_controller = 1048
				set_state_controller = 1045
				set_state_controller = 1049
				#set_state_controller = 942
			}
		}

	}
}

##South African Last Stand - Our Darkest Hour
country_event = {
	id = SAFWAR.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.2" }
	title = SAFWAR.2.t
	desc = SAFWAR.2.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.2.a
		ai_chance = { factor = 80 }
		add_timed_idea = {
			idea = SAF_our_darkest_hour
			days = 90
		}
		hidden_effect = {
			GRO = {
				country_event = {
					id = saw_collapse.1
					days = 91
				}
			}
		}
	}
}

##Zentralafrika Last Stand
country_event = {
	id = SAFWAR.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.3" }
	title = SAFWAR.3.t
	desc = SAFWAR.3.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.3.a
		ai_chance = { factor = 80 }
		add_timed_idea = {
			idea = RK_Wervolf
			days = 90
		}
	}
}

##Ostafrika Last Stand
country_event = {
	id = SAFWAR.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.4" }
	title = SAFWAR.4.t
	desc = SAFWAR.4.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.4.a
		ai_chance = { factor = 80 }
		add_timed_idea = {
			idea = RK_Wervolf
			days = 90
		}
	}
}

##Sudwestafrika Last Stand
country_event = {
	id = SAFWAR.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.5" }
	title = SAFWAR.5.t
	desc = SAFWAR.5.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.5.a
		ai_chance = { factor = 80 }
		add_timed_idea = {
			idea = RK_Wervolf
			days = 90
		}
	}
}

##Schild Joins The War
country_event = {
	id = SAFWAR.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.6" }
	title = SAFWAR.6.t
	desc = SAFWAR.6.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.6.a
		ai_chance = { factor = 80 }
		#add_timed_idea = {
		#	idea = RK_Wervolf
		#	days = 90
		#}

		####################
		# BUFF TO THE AI
		####################

		if = {
			limit = {
				SAF = { is_ai = yes }
			}
			SAF = {
				add_ideas = RK_SAF_war_AI_bonus
			}
		}

		if = {
			limit = {
				AND = {
					COG = { is_ai = yes }
					ANG = { is_ai = yes }
					GRO = { is_ai = yes }
				}
			}
			COG = {
				add_ideas = RK_SAF_war_AI_bonus
			}
			ANG = {
				add_ideas = RK_SAF_war_AI_bonus
			}
			GRO = {
				add_ideas = RK_SAF_war_AI_bonus
			}
		}
	}
}

##Americans Join The War
country_event = {
	id = SAFWAR.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.7" }
	title = SAFWAR.7.t
	desc = SAFWAR.7.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.7.a
		add_ideas = OFN_Observer
		hidden_effect = {
			SAF = {
				add_timed_idea = {
					idea = SAF_Uncle_Sam_Arrives
					days = 90
				}
				set_country_flag = SAF_Uncle_Sam
			}

			SAF = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] SAF.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			USA = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] SAF.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			GRO = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] GRO.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			ANG = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] ANG.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			COG = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] COG.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}

			####################
			# BUFF TO THE AI
			####################

			if = {
				limit = {
					AND = {
						USA = { is_ai = yes }
						SAF = { is_ai = yes }
					}
				}
				USA = {
					add_ideas = RK_SAF_war_AI_bonus
				}
			}
			SAF = {
				country_event = { id = SAFWAR.SAFFlavour.1 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.2 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.3 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.4 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.5 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.6 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.7 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.8 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.9 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.10 days = 10 random_hours = 1300 }
			}
			USA = {
				country_event = { id = SAFWAR.SAFFlavour.1 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.2 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.3 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.7 days = 10 random_hours = 1300 }
				country_event = { id = SAFWAR.SAFFlavour.8 days = 10 random_hours = 1300 }

				set_temp_variable = { Victory_ID = 4 }
				Cold_War_GUI_AddVictory = yes
			}
			AST = {
				country_event = { id = SAFWAR.SAFFlavour.10 days = 10 random_hours = 1300 }
			}
		}
	}
}

##Germany Joins The War
country_event = {
	id = SAFWAR.8
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.8" }
	title = SAFWAR.8.t
	desc = SAFWAR.8.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.8.a
		ai_chance = { factor = 80 }
		if = {
			limit = {
				tag = GRO
			}
			GRO = {
				add_timed_idea = {
					idea = GRO_The_Fatherland_Arrives
					days = 90
				}
			}
		}
		if = {
			limit = {
				tag = ANG
			}
			ANG = {
				add_timed_idea = {
					idea = ANG_The_Fatherland_Arrives
					days = 90
				}
			}
		}
		if = {
			limit = {
				tag = COG
			}
			COG = {
				add_timed_idea = {
					idea = COG_The_Fatherland_Arrives
					days = 90
				}
			}
		}
		GER = {
			set_temp_variable = { Victory_ID = 4 }
			Cold_War_GUI_AddVictory = yes
		}
	}
}

##Total Schild Victory - Ostafrika
country_event = {
	id = SAFWAR.9
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.9" }
	title = SAFWAR.9.t
	desc = SAFWAR.9.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	immediate = {
		hidden_effect = {
			set_global_flag = SAF_Schild_Victory
			conclude_south_african_war = yes
			USA = {
				set_temp_variable = { Victory_ID = 4 }
				set_temp_variable = { Victory_Outcome = 1 }
				set_temp_variable = { Victory_Points = -300 }
				Cold_War_GUI_ManipulateVictory = yes
			}
			AAO = {
				country_event = {
					id = antarctica_aao_cia.710
					days = 2
				}
				country_event = {
					id = antarctica_aao_radio.630
					days = 14
				}
			}
			NZL = {
				if = { limit = { NOT = { has_country_flag = NZL_second_election } }
					add_to_variable = { NZ_Election_var = -4 }
				}
				add_to_variable = { NZL_World_Stage_var = -2 }
				add_to_variable = { NZL_Social_Fabric_var = -2 }
				add_to_variable = { NZ_lost_proxies = 1 }
				NZ_Skeleton_Effect = yes
			}
			GER = {
				if = {
					limit = { NOT = { has_global_flag = german_civil_war_end } }
					set_country_flag = SAW_early_end
				}
				else = {
					set_temp_variable = { Victory_ID = 4 }
					set_temp_variable = { Victory_Outcome = 5 }
					set_temp_variable = { Victory_Points = 300 }
					Cold_War_GUI_ManipulateVictory = yes
				}
			}
			every_country = {
				limit = {
					OR = {
						tag = USA
						is_in_faction_with = USA
					}
				}
				white_peace = ANG
				white_peace = GRO
				white_peace = COG
				white_peace = NAM
				white_peace = BOR
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				GER = {
					set_country_flag = GGR_total_SAW
				}
			}

			USA = {
				clr_country_flag = USA_show_south_africa_tree
				USA_reload_presidential_tree = yes
				country_event = {
					id = USA.saf.effects.19
					days = 2
				}
			}
			CAN = {
				remove_ideas = TNO_division_limit_exemption
			}

			if = {
				limit = {
					country_exists = ANG
				}

				ANG = {
					transfer_state = 942
					transfer_state = 1045
					transfer_state = 1047
					transfer_state = 1046
					transfer_state = 1044
					transfer_state = 884
					transfer_state = 1049
					transfer_state = 1048
					transfer_state = 1050
					transfer_state = 545
					transfer_state = 1063
				}
			}
			else = {
				GRO = {
					transfer_state = 942
					transfer_state = 1045
					transfer_state = 1047
					transfer_state = 1046
					transfer_state = 1044
					transfer_state = 884
					transfer_state = 1049
					transfer_state = 1048
					transfer_state = 1050
					transfer_state = 545
					transfer_state = 1063
					every_owned_state = {
						add_core_of = BOR
						remove_core_of = ANC
						remove_core_of = SAF
					}
				}
			}
			ANG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			GRO = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			COG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			if = {
				limit = {
					has_global_flag = ANG_Free
				}
				NAM = {
					annex_country = {
						target = ANG
						transfer_troops = no
					}
				}
			}
			BOR = {
				annex_country = {
					target = SAF
					transfer_troops = no
				}
				annex_country = {
					target = ANC
					transfer_troops = no
				}
				transfer_state = 936
				transfer_state = 719
				transfer_state = 935
				transfer_state = 934
				transfer_state = 681
				transfer_state = 1312
				transfer_state = 933
				transfer_state = 2087

				transfer_state = 275
				transfer_state = 939
				transfer_state = 940
				transfer_state = 937
				transfer_state = 938

				add_state_core = 936
				add_state_core = 719
				add_state_core = 935
				add_state_core = 934
				add_state_core = 681
				add_state_core = 1312
				add_state_core = 933
				add_state_core = 2087

				add_state_core = 275
				add_state_core = 939
				add_state_core = 940
				add_state_core = 937
				add_state_core = 938
				every_owned_state = {
					add_core_of = BOR
					remove_core_of = SAF
					remove_core_of = ANC
				}
				save_party_popularities = yes
				get_current_government_type = yes
			}
			GRO = {
				set_autonomy = {
					target = BOR
					autonomy_state = autonomy_collaborator_puppet_state
					end_wars = no
					end_civil_wars = no
				}
				every_owned_state = { remove_core_of = SAF } #Failsafe
			}
			BOR = {
				apply_party_popularities = yes
				restore_previous_government_type = yes
			}
			GRO = {
				country_event = {
					id = SAFWAR.23
					days = 46
				}
			}
			BRA = {
				if = {
					limit = {
						AND = {
							has_country_leader = {
								character = BRA_Henrique_Teixeira_Lott
								ruling_only = yes
							}
							has_completed_focus = BRA_brazil_to_the_rescue
						}
					}
					add_to_variable = { BRA_denys_coup_trigger = 2 }
				}
			}
		}
	}

	option = {
		name = SAFWAR.9.a
		ai_chance = { factor = 80 }
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = WORLD.593
					days = 1
				}
			}
		}
	}
}

##Total Schild Victory - Zentralafrika
country_event = {
	id = SAFWAR.10
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.10" }
	title = SAFWAR.10.t
	desc = SAFWAR.10.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.10.a
		ai_chance = { factor = 80 }
	}
}

##Total Schild Victory - Sudwestafrika
country_event = {
	id = SAFWAR.11
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.11" }
	title = SAFWAR.11.t
	desc = SAFWAR.11.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.11.a
		ai_chance = { factor = 80 }
	}
}

##Total Schild Victory - The Afrikaner Volkstaat
country_event = {
	id = SAFWAR.12
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.12" }
	title = SAFWAR.12.t
	desc = SAFWAR.12.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.12.a
		ai_chance = { factor = 80 }
	}
}

##Total OFN Victory
country_event = { #
	id = SAFWAR.13
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.13" }
	title = SAFWAR.13.t
	desc = SAFWAR.13.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	immediate = {
		hidden_effect = {
			set_global_flag = SAF_OFN_Victory
			conclude_south_african_war = yes
			USA = {
				set_temp_variable = { Victory_ID = 4 }
				set_temp_variable = { Victory_Outcome = 5 }
				set_temp_variable = { Victory_Points = 300 }
				Cold_War_GUI_ManipulateVictory = yes
				country_event = {
					id = USA.saf.effects.18
					days = 2
				}
			}
			AAO = {
				country_event = {
					id = antarctica_aao_cia.720
					days = 2
				}
				country_event = {
					id = antarctica_aao_radio.620
					days = 14
				}
				set_temp_variable = { target = SAF }
				TNO_clear_num_volunteers = yes
				set_country_flag = AAO_win_saf
			}

			NZL = {
				set_temp_variable = { target = SAF }
				TNO_clear_num_volunteers = yes
				add_to_variable = { NZL_World_Stage_var = 2 }
				add_to_variable = { NZL_Social_Fabric_var = 2 }
				if = { limit = { NOT = { has_country_flag = NZL_second_election } }
					add_to_variable = { NZ_Election_var = 4 }
				}
				NZ_Skeleton_Effect = yes
			}
			GER = {
				if = {
					limit = { NOT = { has_global_flag = german_civil_war_end } }
					set_country_flag = SAW_early_end
				}
				else = {
					set_temp_variable = { Victory_ID = 4 }
					set_temp_variable = { Victory_Outcome = 1 }
					set_temp_variable = { Victory_Points = -300 }
					Cold_War_GUI_ManipulateVictory = yes
				}
			}
			every_country = {
				limit = {
					OR = {
						tag = USA
						tag = SAF
						is_in_faction_with = USA
					}
				}
				white_peace = ANG
				white_peace = GRO
				white_peace = COG
				white_peace = NAM
				white_peace = BOR
			}
			SAF = {
				if = {
					limit = { has_global_flag = SAF_monarchy_won }
					country_event = { id = SAF.143 days = 1 }
				}
				else_if = {
					limit = { has_global_flag = SAF_republic_won }
					country_event = { id = SAF.157 days = 1 }
				}
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				GER = {
					set_country_flag = GGR_total_loss_SAW
				}
			}
			clr_global_flag = SAF_WAR_Leopoldville_Captured
			CAN = {
				remove_ideas = TNO_division_limit_exemption
			}
			ANG = {
				remove_state_core = 1027
				remove_state_core = 1028
				remove_state_core = 1029
				remove_state_core = 778
				remove_state_core = 1214
				remove_state_core = 541
				remove_state_core = 1213
				remove_state_core = 1031
				remove_state_core = 884
			}
			GRO = {
				remove_state_core = 880
				remove_state_core = 881
				remove_state_core = 1058
				remove_state_core = 1059
				remove_state_core = 1060
				remove_state_core = 1061
				remove_state_core = 1062
				remove_state_core = 1063
				remove_state_core = 1064
				remove_state_core = 1065
				remove_state_core = 1076
				remove_state_core = 1750
				remove_state_core = 1751
				remove_state_core = 1752
			}
			SAF = {
				annex_country = {
					target = BOR
					transfer_troops = no
				}
				annex_country = {
					target = NAM
					transfer_troops = no
				}
				annex_country = {
					target = ANC
					transfer_troops = no
				}
				load_focus_tree = ZZZ_blank_focus

				#SOUTH AFRICAN STATES
				transfer_state = 275
				transfer_state = 681
				transfer_state = 719
				transfer_state = 933
				transfer_state = 934
				transfer_state = 935
				transfer_state = 936
				transfer_state = 937
				transfer_state = 938
				transfer_state = 939
				transfer_state = 940
				transfer_state = 942
				transfer_state = 1044
				transfer_state = 1045
				transfer_state = 1046
				transfer_state = 1047
				transfer_state = 1048
				transfer_state = 1049
				transfer_state = 1050
				transfer_state = 1312
				transfer_state = 1063
				transfer_state = 545

				#OSTAFRIKAN STATES
				transfer_state = 880
				transfer_state = 881
				transfer_state = 1058
				transfer_state = 1059
				transfer_state = 1060
				transfer_state = 1061
				transfer_state = 1062
				transfer_state = 1064
				transfer_state = 1065
				transfer_state = 1076
				transfer_state = 1750
				transfer_state = 1751
				transfer_state = 1752

				#SUDWESTAFRIKAN STATES
				transfer_state = 541
				transfer_state = 778
				transfer_state = 1027
				transfer_state = 1028
				transfer_state = 1029
				transfer_state = 1031
				transfer_state = 1213
				transfer_state = 1214
				transfer_state = 884
			}
			GER = {
				end_puppet = GRO
			}
			if = {
				limit = {
					GRO = {
						OR = {
							has_cosmetic_tag = GRO_REICHSSTAAT
							has_cosmetic_tag = GRO_REICHSSTAAT_2
							has_cosmetic_tag = GRO_REICHSSTAAT_3
						}
					}
				}
				GRO = {
					every_owned_state = {
						limit = {
							OR = {
								state = 295
								state = 297
								state = 538
								state = 539
								state = 718
								state = 1055
								state = 1056
								state = 1057
								state = 1162
								state = 1163
								state = 1164
								state = 1165
								state = 1166
								state = 1167
								state = 1168
								state = 1169
								state = 1170
								state = 1171
								state = 1172
								state = 1173
								state = 1174
								state = 1175
								state = 1176
								state = 1177
								state = 1178
								state = 1180
								state = 1181
								state = 1182
								state = 1183
								state = 1184
								state = 1185
								state = 1186
							}
						}
						COG = {
							add_state_core = PREV
							transfer_state = PREV
						}
					}
					every_owned_state = {
						limit = {
							OR = {
								state = 540
								state = 1030
								state = 1032
								state = 1033
								state = 1034
								state = 1035
								state = 1036
								state = 1037
								state = 1038
								state = 1039
								state = 1040
								state = 1051
								state = 1735
								state = 1736
							}
						}
						ANG = {
							transfer_state = PREV
							add_state_core = PREV
						}
					}
				}
			}
			USA_OFN_mandates_formed = yes
			SAF = { # Needs to be after USA_OFN_mandates_formed or else it breaks the restoration effect if peace deal annexation
				every_owned_state = {
					remove_core_of = ANG
					remove_core_of = BOR
					remove_core_of = ANC
					remove_core_of = GRO
				}
			}
			USA_AFRICA_set_start_stability = yes
			ANG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
				every_owned_state = {
					set_state_controller_to = ANG
				}
			}
			GRO = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			COG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
				every_owned_state = {
					set_state_controller_to = COG
				}
				remove_opinion_modifier = {
					target = BRA
					modifier = TNOCS_lobster_war
				}
			}
			BRA = {
				remove_opinion_modifier = {
					target = COG
					modifier = TNOCS_lobster_war
				}
			}
			# Remove German sea zones, haha get fucked
			GER = {
				set_temp_variable = { SeaZone_ID = 2 } # 2; South Atlantic
				Cold_War_GUI_PowerProjection_RemoveSeaZone = yes
				if = {
					limit = {
						NOT = {
							is_in_faction_with = MDG
							owns_state = 706
							owns_state = 707
						}
					}
					set_temp_variable = { SeaZone_ID = 6 } # 6; Indian Ocean
					Cold_War_GUI_PowerProjection_RemoveSeaZone = yes
				}
			}
		}
	}

	option = {
		name = SAFWAR.13.a
		ai_chance = { factor = 80 }
		USA = {
			country_event = { #event for forming CAR
				id = USA.51
				days = 1
			}
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = WORLD.594
					days = 1
				}
			}
		}
	}

	option = { #play angola
		name = SAFWAR.13.b
		ai_chance = { factor = 0 }
		USA = {
			country_event = {
				id = USA.51
				days = 1
			}
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = WORLD.594
					days = 1
				}
			}
		}
		ANG = {
			set_variable = { national_debt = 0 }
			TNO_fopo_add_saf_reconstruction_conflict_tab = yes
			set_political_power = 150
			change_tag_from = SAF
		}
	}

	option = { #play congo
		name = SAFWAR.13.c
		ai_chance = { factor = 0 }
		USA = {
			country_event = {
				id = USA.51
				days = 1
			}
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = WORLD.594
					days = 1
				}
			}
		}
		COG = {
			set_variable = { national_debt = 0 }
			TNO_fopo_add_saf_reconstruction_conflict_tab = yes
			set_political_power = 150
			change_tag_from = SAF
		}
	}

	option = { #play east africa
		name = SAFWAR.13.e
		ai_chance = { factor = 0 }
		USA = {
			country_event = {
				id = USA.51
				days = 1
			}
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = WORLD.594
					days = 1
				}
			}
		}
		MZB = {
			set_variable = { national_debt = 0 }
			TNO_fopo_add_saf_reconstruction_conflict_tab = yes
			set_political_power = 150
			change_tag_from = SAF
		}
	}

}

##OFN Offers Us A Ceasefire - OFN Leaning
country_event = {
	id = SAFWAR.14
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.14" }
	title = SAFWAR.14.t
	desc = SAFWAR.14.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes

	option = { #Agree
		name = SAFWAR.14.a
		ai_chance = { factor = 80 }

		clr_global_flag = south_african_war_ceasefires_enabled
		if = {
			limit = {
				has_global_flag = SAFWAR_USA_proposes_ceasefire
			}
			USA = {
				country_event = { id = SAFWAR.24 days = 1 }
				clr_global_flag = SAFWAR_USA_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
			SAF = {
				country_event = { id = SAFWAR.24 days = 1 }
				clr_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
		}
	}
	option = { #Reject
		name = SAFWAR.14.b
		ai_chance = { factor = 40 }
		if = {
			limit = {
				has_global_flag = SAFWAR_USA_proposes_ceasefire
			}
			USA = {
				country_event = { id = SAFWAR.27 days = 1 }
				clr_global_flag = SAFWAR_USA_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
			SAF = {
				country_event = { id = SAFWAR.27 days = 1 }
				clr_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
		}
	}
}

##OFN Offers Us A Ceasefire - Stalemate
country_event = {
	id = SAFWAR.15
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.15" }
	title = SAFWAR.15.t
	desc = SAFWAR.15.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes

	option = {
		name = SAFWAR.15.a
		ai_chance = { factor = 40 }
		clr_global_flag = south_african_war_ceasefires_enabled
		if = {
			limit = {
				has_global_flag = SAFWAR_USA_proposes_ceasefire
			}
			USA = {
				country_event = { id = SAFWAR.25 days = 1 }
				clr_global_flag = SAFWAR_USA_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
			SAF = {
				country_event = { id = SAFWAR.25 days = 1 }
				clr_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
		}
	}
	option = {
		name = SAFWAR.15.b
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = SAFWAR_USA_proposes_ceasefire
			}
			USA = {
				country_event = { id = SAFWAR.27 days = 1 }
				clr_global_flag = SAFWAR_USA_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
			SAF = {
				country_event = { id = SAFWAR.27 days = 1 }
				clr_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
		}
	}
}

##OFN Offers Us A Ceasefire - Schild Leaning
country_event = {
	id = SAFWAR.16
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.16" }
	title = SAFWAR.16.t
	desc = SAFWAR.16.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes

	option = {
		name = SAFWAR.16.a
		ai_chance = { factor = 80 }
		clr_global_flag = south_african_war_ceasefires_enabled
		if = {
			limit = {
				has_global_flag = SAFWAR_USA_proposes_ceasefire
			}
			USA = {
				country_event = { id = SAFWAR.26 days = 1 }
				clr_global_flag = SAFWAR_USA_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
			SAF = {
				country_event = { id = SAFWAR.26 days = 1 }
				clr_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
		}
	}
	option = {
		name = SAFWAR.16.b
		ai_chance = { factor = 40 }
		if = {
			limit = {
				has_global_flag = SAFWAR_USA_proposes_ceasefire
			}
			USA = {
				country_event = { id = SAFWAR.27 days = 1 }
				clr_global_flag = SAFWAR_USA_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
			SAF = {
				country_event = { id = SAFWAR.27 days = 1 }
				clr_global_flag = SAFWAR_SAF_proposes_ceasefire
			}
		}
	}
}

##Schild Offers Us A Ceasefire - Schild Leaning
country_event = {
	id = SAFWAR.17
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.17" }
	title = SAFWAR.17.t
	desc = SAFWAR.17.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes

	option = {
		name = SAFWAR.17.a
		clr_global_flag = south_african_war_ceasefires_enabled
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
			GRO = {
				country_event = { id = SAFWAR.26 days = 1 }
				clr_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
			ANG = {
				country_event = { id = SAFWAR.26 days = 1 }
				clr_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_COG_proposes_ceasefire
			}
			COG = {
				country_event = { id = SAFWAR.26 days = 1 }
				clr_global_flag = SAFWAR_COG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_GER_proposes_ceasefire
			}
			GER = {
				country_event = { id = SAFWAR.26 days = 1 }
				clr_global_flag = SAFWAR_GER_proposes_ceasefire
			}
		}
	}
	option = {
		name = SAFWAR.17.b
		ai_chance = { factor = 40 }

		if = {
			limit = {
				has_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
			GRO = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
			ANG = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_COG_proposes_ceasefire
			}
			COG = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_COG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_GER_proposes_ceasefire
			}
			GER = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_GER_proposes_ceasefire
			}
		}
	}
}

##Schild Offers Us A Ceasefire - Stalemate
country_event = {
	id = SAFWAR.18
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.18" }
	title = SAFWAR.18.t
	desc = SAFWAR.18.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes

	option = {
		name = SAFWAR.18.a
		ai_chance = { factor = 40 }
		set_global_flag = SAF_ended_in_neutral
		clr_global_flag = south_african_war_ceasefires_enabled
		if = {
			limit = {
				has_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
			GRO = {
				country_event = { id = SAFWAR.25 days = 1 }
				clr_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
			ANG = {
				country_event = { id = SAFWAR.25 days = 1 }
				clr_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_COG_proposes_ceasefire
			}
			COG = {
				country_event = { id = SAFWAR.25 days = 1 }
				clr_global_flag = SAFWAR_COG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_GER_proposes_ceasefire
			}
			GER = {
				country_event = { id = SAFWAR.25 days = 1 }
				clr_global_flag = SAFWAR_GER_proposes_ceasefire
			}
		}
	}
	option = {
		name = SAFWAR.18.b
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
			GRO = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
			ANG = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_COG_proposes_ceasefire
			}
			COG = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_COG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_GER_proposes_ceasefire
			}
			GER = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_GER_proposes_ceasefire
			}
		}
	}
}

##Schild Offers Us A Ceasefire - OFN Leaning
country_event = {
	id = SAFWAR.19
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.19" }
	title = SAFWAR.19.t
	desc = SAFWAR.19.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes

	option = {
		name = SAFWAR.19.a
		ai_chance = { factor = 80 }
		clr_global_flag = south_african_war_ceasefires_enabled
		if = {
			limit = {
				has_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
			GRO = {
				country_event = { id = SAFWAR.24 days = 1 }
				clr_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
			ANG = {
				country_event = { id = SAFWAR.24 days = 1 }
				clr_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_COG_proposes_ceasefire
			}
			COG = {
				country_event = { id = SAFWAR.24 days = 1 }
				clr_global_flag = SAFWAR_COG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_GER_proposes_ceasefire
			}
			GER = {
				country_event = { id = SAFWAR.24 days = 1 }
				clr_global_flag = SAFWAR_GER_proposes_ceasefire
			}
		}
	}
	option = {
		name = SAFWAR.19.b
		ai_chance = { factor = 20 }
		if = {
			limit = {
				has_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
			GRO = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_GRO_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
			ANG = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_ANG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_COG_proposes_ceasefire
			}
			COG = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_COG_proposes_ceasefire
			}
		}
		if = {
			limit = {
				has_global_flag = SAFWAR_GER_proposes_ceasefire
			}
			GER = {
				country_event = { id = SAFWAR.28 days = 1 }
				clr_global_flag = SAFWAR_GER_proposes_ceasefire
			}
		}
	}
}

##Ceasefire Event - Schild Leaning Ceasefire
country_event = {
	id = SAFWAR.20
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.20" }
	title = SAFWAR.20.t
	desc = SAFWAR.20.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	hidden = yes

	immediate = {
		hidden_effect = {
			set_global_flag = SAF_Schild_Ceasefire
			set_global_flag = SAF_ceasefire
			conclude_south_african_war = yes
			USA = {
				set_temp_variable = { Victory_ID = 4 }
				set_temp_variable = { Victory_Outcome = 2 }
				set_temp_variable = { Victory_Points = -150 }
				Cold_War_GUI_ManipulateVictory = yes
				country_event = {
					id = USA.saf.effects.20
					days = 2
				}
			}
			NZL = {
				if = { limit = { NOT = { has_country_flag = NZL_second_election } }
					add_to_variable = { NZ_Election_var = 2 }
				}
				add_to_variable = { NZL_World_Stage_var = -1 }
				add_to_variable = { NZ_lost_proxies = 1 }
				NZ_Skeleton_Effect = yes
			}
			GER = {
				if = {
					limit = { NOT = { has_global_flag = german_civil_war_end } }
					set_country_flag = SAW_early_end
				}
				else = {
					set_temp_variable = { Victory_ID = 4 }
					set_temp_variable = { Victory_Outcome = 4 }
					set_temp_variable = { Victory_Points = 150 }
					Cold_War_GUI_ManipulateVictory = yes
				}
			}
			AAO = {
				country_event = {
					id = antarctica_aao_cia.730
					days = 2
				}
			}
			every_country = {
				limit = {
					OR = {
						tag = USA
						is_in_faction_with = USA
					}
				}
				white_peace = ANG
				white_peace = GRO
				white_peace = COG
				white_peace = NAM
				white_peace = BOR
			}
			SAF = {
				white_peace = COG
				white_peace = GRO
				white_peace = ANG
				white_peace = BOR
				white_peace = ANC
				load_focus_tree = ZZZ_blank_focus
			}
			SAF = {
				annex_country = {
					target = ANC
					transfer_troops = yes
				}
			}
			SAF = {
				if = {
					limit = { has_global_flag = SAF_monarchy_won }
					country_event = { id = SAF.143 days = 1 }
				}
				else_if = {
					limit = { has_global_flag = SAF_republic_won }
					country_event = { id = SAF.157 days = 1 }
				}
			}
			SAF = {
				transfer_state = 936
				transfer_state = 719
				transfer_state = 935
				transfer_state = 934
				transfer_state = 681
				transfer_state = 1312
				transfer_state = 933
				transfer_state = 942
				every_owned_state = { remove_core_of = ANC }
			}
			BOR = {
				transfer_state = 275
				transfer_state = 937
				transfer_state = 940
				transfer_state = 939
				transfer_state = 938
				transfer_state = 936
				transfer_state = 719
				transfer_state = 935
				every_owned_state = {
					add_core_of = BOR
					remove_core_of = SAF
					remove_core_of = ANC
				}
			}
			GRO = {
				transfer_state = 1049
				transfer_state = 1048
				transfer_state = 1050
				transfer_state = 545
				transfer_state = 1063
				transfer_state = 1046
				every_owned_state = {
					add_core_of = GRO
					remove_core_of = BOR
					remove_core_of = SAF
					remove_core_of = ANC
				}
			}
			if = {
				limit = {
					GRO = {
						NOT = { has_cosmetic_tag = GRO_REICHSSTAAT }
					}
				}
				ANG = {
					transfer_state = 1045
					transfer_state = 1047
					transfer_state = 1044
					transfer_state = 1049
					transfer_state = 1048
					transfer_state = 1050
					transfer_state = 545
					transfer_state = 1063
					transfer_state = 1046
				}
			}
			else = {
				GRO = {
					transfer_state = 1045
					transfer_state = 1047
					transfer_state = 1044
					transfer_state = 1049
					transfer_state = 1048
					transfer_state = 1050
					transfer_state = 545
					transfer_state = 1063
					transfer_state = 1046
					every_owned_state = {
						add_core_of = GRO
						remove_core_of = BOR
						remove_core_of = SAF
						remove_core_of = ANC
					}
				}
			}
			BOR = {
				save_party_popularities = yes
				get_current_government_type = yes
			}
			GRO = {
				set_autonomy = {
					target = BOR
					autonomy_state = autonomy_collaborator_puppet_state
					end_wars = no
					end_civil_wars = no
				}
			}
			BOR = {
				apply_party_popularities = yes
				restore_previous_government_type = yes
			}
			USA = {
				add_to_faction = SAF
				SAF = { add_ideas = OFN_Independent_Member }
			}
			if = {
				limit = {
					has_global_flag = ANG_Free
				}
				NAM = {
					annex_country = {
						target = ANG
						transfer_troops = no
					}
				}
			}
			hidden_effect = {
				every_country = {
					limit = { is_ai = no }
					news_event = {
						id = WORLD.592
						days = 1
					}
				}
			}
			GRO = {
				country_event = {
					id = SAFWAR.23
					days = 46
				}
			}
			ANG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			GRO = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			COG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				GER = {
					set_country_flag = GGR_stalemate_SAW
				}
			}
			BRA = {
				if = {
					limit = {
						AND = {
							has_country_leader = {
								character = BRA_Henrique_Teixeira_Lott
								ruling_only = yes
							}
							has_completed_focus = BRA_brazil_to_the_rescue
						}
					}
					add_to_variable = { BRA_denys_coup_trigger = 1 }
				}
			}
		}
	}

	option = {
		name = SAFWAR.20.a
		ai_chance = { factor = 80 }
	}
}

##Ceasefire Event - Stalemate
country_event = {
	id = SAFWAR.21
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.21" }
	title = SAFWAR.21.t
	desc = SAFWAR.21.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	hidden = yes

	immediate = {
		hidden_effect = {
			set_global_flag = SAF_Stalemate
			set_global_flag = SAF_ceasefire
			conclude_south_african_war = yes
			USA = {
				set_temp_variable = { Victory_ID = 4 }
				set_temp_variable = { Victory_Outcome = 3 }
				Cold_War_GUI_ManipulateVictory = yes
				country_event = {
					id = USA.saf.effects.21
					days = 2
				}
			}
			AAO = {
				country_event = {
					id = antarctica_aao_cia.730
					days = 2
				}
			}
			GER = {
				if = {
					limit = { NOT = { has_global_flag = german_civil_war_end } }
					set_country_flag = SAW_early_end
				}
				else = {
					set_temp_variable = { Victory_ID = 4 }
					set_temp_variable = { Victory_Outcome = 3 }
					Cold_War_GUI_ManipulateVictory = yes
				}
			}
			every_country = {
				limit = {
					OR = {
						tag = USA
						is_in_faction_with = USA
					}
				}
				white_peace = ANG
				white_peace = GRO
				white_peace = COG
				white_peace = NAM
				white_peace = BOR
			}
			SAF = {
				white_peace = COG
				white_peace = GRO
				if = {
					limit = {
						ANG = {
							OR = {
								has_country_flag = ANG_USA_guarantee
								NOT = { has_global_flag = ANG_Free }
							}
						}
					}
					white_peace = ANG
				}
				white_peace = BOR
				white_peace = ANC
				white_peace = NAM
			}
			SAF = {
				annex_country = {
					target = BOR
					transfer_troops = no
				}
				load_focus_tree = ZZZ_blank_focus
			}
			SAF = {
				if = {
					limit = { has_global_flag = SAF_monarchy_won }
					country_event = { id = SAF.143 days = 1 }
				}
				else_if = {
					limit = { has_global_flag = SAF_republic_won }
					country_event = { id = SAF.157 days = 1 }
				}
			}
			SAF = {
				annex_country = {
					target = ANC
					transfer_troops = no
				}

				transfer_state = 936
				transfer_state = 719
				transfer_state = 935
				transfer_state = 934
				transfer_state = 681
				transfer_state = 1312
				transfer_state = 933
				transfer_state = 942

				transfer_state = 275
				transfer_state = 939
				transfer_state = 940
				transfer_state = 937
				transfer_state = 938

				transfer_state = 1044
				transfer_state = 1050
				transfer_state = 1046
				transfer_state = 1048
				transfer_state = 1047
				transfer_state = 1049
				transfer_state = 1045
				transfer_state = 545
				transfer_state = 1063
				every_owned_state = {
					add_core_of = SAF
					remove_core_of = BOR
					remove_core_of = ANC
				}
			}
			BOR = {
				every_owned_state = {
					remove_core_of = ANC
					remove_core_of = SAF
				}
			}
			USA = {
				add_to_faction = SAF
				SAF = { add_ideas = OFN_Independent_Member }
			}
			hidden_effect = {
				every_country = {
					limit = { is_ai = no }
					news_event = {
						id = WORLD.591
						days = 1
					}
				}
			}
			GRO = {
				country_event = {
					id = SAFWAR.23
					days = 46
				}
			}
			ANG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			GRO = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			COG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
				every_owned_state = {
					add_core_of = GRO
					remove_core_of = BOR
					remove_core_of = SAF
					remove_core_of = ANC
				}
			}
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				GER = {
					set_country_flag = GGR_stalemate_SAW
				}
			}
		}
	}

	option = {
		name = SAFWAR.21.a
		ai_chance = { factor = 80 }
	}
}

##Ceasefire Event - OFN Leaning Ceasefire
country_event = {
	id = SAFWAR.22
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.22" }
	title = SAFWAR.22.t
	desc = SAFWAR.22.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	hidden = yes

	immediate = {
		hidden_effect = {
			set_global_flag = SAF_OFN_Ceasefire
			set_global_flag = SAF_ceasefire
			conclude_south_african_war = yes
			every_country = {
				limit = {
					OR = {
						tag = USA
						is_in_faction_with = USA
					}
				}
				white_peace = ANG
				white_peace = GRO
				white_peace = COG
				white_peace = NAM
				white_peace = BOR
			}
			hidden_effect = {
				USA = {
					set_temp_variable = { Victory_ID = 4 }
					set_temp_variable = { Victory_Outcome = 4 }
					set_temp_variable = { Victory_Points = 150 }
					Cold_War_GUI_ManipulateVictory = yes
					country_event = {
						id = USA.saf.effects.22
						days = 2
					}
				}
				AAO = {
					country_event = {
						id = antarctica_aao_cia.730
						days = 2
					}
				}
				NZL = {
					if = { limit = { NOT = { has_country_flag = NZL_second_election } }
					add_to_variable = { NZ_Election_var = -2 }
				}
					add_to_variable = { NZL_World_Stage_var = 1 }
					NZ_Skeleton_Effect = yes
				}
				GER = {
					if = {
						limit = { NOT = { has_global_flag = german_civil_war_end } }
						set_country_flag = SAW_early_end
					}
					else = {
						set_temp_variable = { Victory_ID = 4 }
						set_temp_variable = { Victory_Outcome = 2 }
						set_temp_variable = { Victory_Points = -150 }
						Cold_War_GUI_ManipulateVictory = yes
					}
				}
				SAF = {
					if = {
						limit = { has_global_flag = SAF_monarchy_won }
						country_event = { id = SAF.143 days = 1 }
					}
					else_if = {
						limit = { has_global_flag = SAF_republic_won }
						country_event = { id = SAF.157 days = 1 }
					}
				}
			}
			SAF = {
				white_peace = COG
				white_peace = GRO
				white_peace = ANG
				white_peace = BOR
				white_peace = ANC
			}
			SAF = {
				annex_country = {
					target = BOR
					transfer_troops = no
				}
				load_focus_tree = ZZZ_blank_focus

				annex_country = {
					target = ANC
					transfer_troops = no
				}

				every_owned_state = {
					add_core_of = SAF
					remove_core_of = BOR
					remove_core_of = ANC
				}
			}
			GER = {
				set_country_flag = GGR_stalemate_SAW
			}
			ANG = {
				set_capital = { state = 1035 }
			}
			ANG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			GRO = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			COG = {
				remove_ideas = ANG_Joint_Offensive_Shit
				remove_ideas = GER_SGR_german_advisors_SAW
				remove_ideas = GER_SGR_drugs_SAW
			}
			if = {
				limit = {
					ANG = { has_country_flag = ANG_USA_guarantee }
				}
				white_peace = COG
				white_peace = GRO
				white_peace = BOR
				white_peace = NAM
			}
			else_if = {
				limit = {
					has_global_flag = ANG_Free
					ANG = {
						NOT = { has_country_flag = ANG_USA_guarantee }
					}
				}
				ANG = {
					white_peace = GRO
					white_peace = COG
					white_peace = USA
				}
				USA = {
					puppet = ANG
				}
				ANG = {
					retire_country_leader = yes
					set_capital = { state = 1035 }
					set_politics = {
						ruling_party = paternalism
						last_election = "1933.3.5"
						election_frequency = 48
						elections_allowed = no
					}
					set_popularities = {
						liberalism = 10
						conservatism = 20
						paternalism = 40
						despotism = 10
						fascism = 10
						national_socialism = 10
					}
					OFN_MANDATE_set_starting_laws = yes
					remove_ideas = {
						ANG_Afrikaner_Airstrip
						ANG_Incoherent_Bookkeeping
						ANG_Incoherent_Bookkeeping_2
						ANG_Incoherent_Bookkeeping_3
						ANG_Incoherent_Bookkeeping_4
						ANG_Away_In_The_Clouds
						ANG_The_Fatherland_Arrives
						ANG_Disrupted_Comms
						ANG_Slipping_The_Plans
						ANG_Constant_Partisans
						ANG_Broken_Fuel_Lines
						ANG_Token_Troops
						ANG_Muller_Airlift
						ANG_No_One_In_No_One_Out
						ANG_USA_Infiltrated_RK_Armies
						ANG_SKL_Air_Exercises
						ANG_SKL_RD_Expanded
						ANG_Secure_The_Homefront
						ANG_In_The_Nuts
						ANG_In_The_Nuts_2
						ANG_In_The_Nuts_3
						ANG_In_The_Nuts_4
						ANG_Reprisal_Attacks
						ANG_SS_Anti_Terror
						ANG_SS_Anti_Terror_2
						ANG_Using_Our_People
						ANG_Using_Our_People_Paid_Well
						ANG_Using_Our_People_Paid_Well_2
						ANG_Using_Our_People_Paid_Enough
						ANG_Using_Our_People_Paid_Enough_2
						ANG_Roll_Them_Off_The_Line
						GRO_Financed_Shit
						ANG_Mutual_Assistence_Pact_1
						ANG_Mutual_Assistence_Pact
						ANG_Mutual_Assistence_Pact_COG
						ANG_Mutual_Assistence_Pact_GRO
						ANG_Road_Of_Life
						ANG_Natives_In_The_Air_2
						ANG_Natives_In_The_Air_1
						ANG_RANDR
						ANG_RANDR_2
						ANG_Joint_Offensive_Shit
						ANG_Lords_Of_The_Air
						ANG_Lords_Of_The_Air_2
						ANG_PlanesInOurHand_1
						ANG_PlanesInOurHand_2
						ANG_PlanesInOurHand_3
						ANG_bomber_production
						ANG_fighter_production
						ANG_transport_production
						ANG_Bomber_Plans
						ANG_Bomber_Plans_And_Fighter_Plans
						ANG_Fighter_Plans
						ANG_Air_Assault_And_Fighter
						ANG_Trifecta
						ANG_Air_Assault
						ANG_Air_Assault_And_Bomber
						ANG_Safetey_is_paramount_idea
						ANG_pit_stop_model_idea
						ANG_pit_stop_modeland_saftey_idea
						ANG_build_quickly_idea
						ANG_German_Sus_idea_1
						ANG_German_Sus_idea_2
						ANG_German_Sus_idea_3
						ANG_German_Sus_idea_4
						ANG_German_Sus_idea_5
						ANG_Huttig_sus_idea_1
						ANG_Huttig_sus_idea_2
						ANG_Huttig_sus_idea_3
						ANG_Huttig_sus_idea_4
						ANG_Muller_sus_idea_1
						ANG_Muller_sus_idea_2
						ANG_Muller_sus_idea_3
						ANG_Muller_sus_idea_4
						ANG_Native_Militancy_1
						ANG_Native_Militancy_2
						ANG_Native_Militancy_3
						ANG_Native_Militancy_4
						ANG_Native_Militancy_5
						ANG_Sudwest_Training_Shit
						ANG_Sudwest_Training_med
						ANG_Sudwest_Training_high
						ANG_constitution
						ANG_Guerrillas_Rescued
						ANG_few_prisoners_freed
						ANG_med_prisoners_freed
						ANG_high_prisoners_freed
						ANG_German_Resistance
						ANG_Improved_Internal_Structure
						ANG_City_Terror_Attack
						ANG_Terror_Troop_Angst
						ANG_American_Advisors
						Pakt_Autonomous_Reichskommissariat
					}
					drop_cosmetic_tag = yes
					set_cosmetic_tag = ANG_USA
					load_focus_tree = ofn_angola
					remove_unit_leader_role = ANG_Hellmut_von_Leipzig
					remove_unit_leader_role = ANG_Hans_Ulrich_Rudel
					remove_unit_leader_role = ANG_Walter_Nowotny
					remove_unit_leader_role = ANG_Adolf_Galland
					remove_unit_leader_role = ANG_Gordon_Gollob
					remove_unit_leader_role = ANG_Victor_Oehrn
					remove_unit_leader_role = ANG_Wilhelm_Rollman
					remove_unit_leader_role = ANG_Jurgen_Oesten
				}
			}

			USA = {
				add_to_faction = SAF
				SAF = { add_ideas = OFN_Independent_Member }
			}
			hidden_effect = {
				every_country = {
					limit = { is_ai = no }
					news_event = {
						id = WORLD.590
						days = 1
					}
				}
			}
			GRO = {
				country_event = {
					id = SAFWAR.23
					days = 46
				}
				country_event = {
					id = GRO_REICHSSTAAT.50
					days = 450
				}
				every_owned_state = {
					add_core_of = GRO
					remove_core_of = BOR
					remove_core_of = SAF
					remove_core_of = ANC
				}
			}
			SAF = {
				#SOUTH AFRICAN STATES
				transfer_state = 275
				transfer_state = 681
				transfer_state = 719
				transfer_state = 884
				transfer_state = 933
				transfer_state = 934
				transfer_state = 935
				transfer_state = 936
				transfer_state = 937
				transfer_state = 938
				transfer_state = 939
				transfer_state = 940
				transfer_state = 942
				transfer_state = 1044
				transfer_state = 1045
				transfer_state = 1046
				transfer_state = 1047
				transfer_state = 1048
				transfer_state = 1049
				transfer_state = 1050
				transfer_state = 1312
				transfer_state = 545
				transfer_state = 1063

				#OSTAFRIKAN STATES
				transfer_state = 880
				transfer_state = 881
				transfer_state = 1058
				transfer_state = 1059
				transfer_state = 1060
				transfer_state = 1061
				transfer_state = 1062
				transfer_state = 1064
				transfer_state = 1065
				transfer_state = 1076
				transfer_state = 1750
				transfer_state = 1751
				transfer_state = 1752

				#SUDWESTAFRIKAN STATES
				transfer_state = 541
				transfer_state = 778
				transfer_state = 884
				transfer_state = 1027
				transfer_state = 1028
				transfer_state = 1029
				transfer_state = 1031
				transfer_state = 1213
				transfer_state = 1214

				every_owned_state = {
					remove_core_of = GRO
					remove_core_of = ANG
				}
			}
		}
	}

	option = {
		name = SAFWAR.22.a
		ai_chance = { factor = 80 }
	}
}

##Hüttig takes over Sudwestafrika and Zentralafrika
country_event = {
	id = SAFWAR.23
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.23" }
	title = SAFWAR.23.t
	desc = SAFWAR.23.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	trigger = {
		has_country_leader = {
			character = GRO_Hans_Huttig
			ruling_only = yes
		}
	}

	option = {
		name = SAFWAR.23.a
		trigger = {
			original_tag = GRO
		}
		hidden_effect = {
			GRO_huttig_paranoia_idea_leveler = yes
			GRO = {
				GER = {
					set_autonomy = {
						target = GRO
						autonomous_state = autonomy_free
					}
				}
				econ_leave_sphere = yes
				leave_faction = yes
				drop_cosmetic_tag = yes
				add_ideas = tno_admin_efficiency_illegitimate_administration
				set_party_name = {
					ideology = national_socialism
					long_name = GRO_reichsstaat_party_long
					name = GRO_reichsstaat_party
				}
				set_party_name = {
					ideology = fascism
					long_name = GRO_reichsstaat_cabal_long
					name = GRO_reichsstaat_cabal
				}
				set_cosmetic_tag = GRO_REICHSSTAAT
				set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Burgsys }
				econ_subtype_change = yes
				remove_dynamic_modifier = {
					modifier = GRO_the_drums_of_war
				}

				hidden_effect = {
					if = {
						limit = {
							has_war = no
						}
						dismantle_faction = yes
						GRO = { remove_ideas = AS_Member }
						COG = { remove_ideas = AS_Member }
						ANG = { remove_ideas = AS_Member }
						BOR = { remove_ideas = AS_Member }
					}
					every_country = {
						limit = { is_ai = no }
						news_event = { id = SAFWAR.42 days = 2 }
					}
					BOR = {
						save_party_popularities = yes
						get_current_government_type = yes
						econ_leave_sphere = yes
					}
					GRO = {
						country_event = { id = GRO_REICHSSTAAT.1 days = 2 }
						country_event = { id = GRO_REICHSSTAAT.47 days = 10 }
						set_autonomy = {
							target = BOR
							autonomy_state = autonomy_collaborator_puppet_state
							end_wars = no
							end_civil_wars = no
						}
						remove_ideas = {
							GRO_Kindersoldaten_Idea
							GRO_Simplified_Arms_Production_Idea
							GRO_idea_a_hundred_for_one
							GRO_Tribal_Recruitment
							GRO_surrounded_by_degeneracy_1
							GRO_surrounded_by_degeneracy_2
							GRO_surrounded_by_degeneracy_3
							ANG_Joint_Offensive_Shit
							GER_SGR_german_advisors_SAW
							GER_SGR_drugs_SAW
						}
					}
					ANG = {
						remove_ideas = {
							ANG_Joint_Offensive_Shit
							GER_SGR_german_advisors_SAW
							GER_SGR_drugs_SAW
						}
					}
					COG = {
						remove_ideas = {
							ANG_Joint_Offensive_Shit
							GER_SGR_german_advisors_SAW
							GER_SGR_drugs_SAW
						}
					}
					BOR = {
						apply_party_popularities = yes
						restore_previous_government_type = yes
					}
				}

				if = {
					limit = {
						country_exists = BOR
					}
					load_focus_tree = GRO_grossafrikanischer_reichsstaat
				}

				else = {
					load_focus_tree = GRO_grossafrikanischer_reichsstaat_no_boers
				}

				#Cabal power calcuallted at the conclusion of the SAW
				if = {
					limit = { NOT = { has_global_flag = SAF_WAR_OVER } }
					GRO_REICHSSTAAT_calculate_cabal_power = yes
				}
				if = {
					limit = { has_country_flag = GRO_cabal_active }
					GER = { country_event = { id = SAFWAR.41 days = 2 } }
				}

				# Remove German sea zones, haha get fucked
				hidden_effect = {
					GER = {
						set_country_flag = GGR_huttigs_betrayal
						set_temp_variable = { SeaZone_ID = 2 } # 2; South Atlantic
						Cold_War_GUI_PowerProjection_RemoveSeaZone = yes
						if = {
							limit = {
								NOT = {
									is_in_faction_with = MAD
									owns_state = 706
									owns_state = 707
								}
							}
							set_temp_variable = { SeaZone_ID = 6 } # 6; Indian Ocean
							Cold_War_GUI_PowerProjection_RemoveSeaZone = yes
						}
					}
				}
			}
			COG = {
				every_owned_state = {
					add_core_of = GRO
					remove_core_of = BOR
					remove_core_of = SAF
					remove_core_of = ANC
				}
			}

			every_state = {
				limit = {
					OR = {
						is_core_of = GRO
						is_core_of = SAF
					}
				}
				remove_core_of = COG
				remove_core_of = ANG
			}
		}
		COG = {
			country_event = {
				id = SAFWAR.38
				days = 1
			}
		}
		if = {
			limit = {
				ANG = {
					has_country_leader = {
						character = ANG_Wolfgang_Schenck
						ruling_only = yes
					}
				}
			}
			ANG = {
				country_event = {
					id = SAFWAR.39
					days = 2
				}
			}
		}
		if = {
			limit = {
				ANG = {
					has_country_leader = {
						character = ANG_Adolf_Galland
						ruling_only = yes
					}
				}
			}
			ANG = {
				country_event = {
					id = SAFWAR.40
					days = 2
				}
			}
		}
	}
	option = {
		name = SAFWAR.23.b
		trigger = {
			NOT = {
				original_tag = GRO
			}
		}
	}
}

##The Ceasefire is accepted - OFN Leaning
country_event = {
	id = SAFWAR.24
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.24" }
	title = SAFWAR.24.t
	desc = SAFWAR.24.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.24.a
		ai_chance = { factor = 80 }
		SAF = { remove_ideas = SAF_Boer_Viet_Cong }
		hidden_effect = {
			USA = {
				clr_country_flag = USA_show_south_africa_tree
				USA_reload_presidential_tree = yes
				country_event = { id = SAFWAR.22 days = 1 }
			}
		}
	}
}

##The Ceasefire is accepted - Stalemate
country_event = { #
	id = SAFWAR.25
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.25" }
	title = SAFWAR.25.t
	desc = SAFWAR.25.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.25.a
		ai_chance = { factor = 80 }
		SAF = { remove_ideas = SAF_Boer_Viet_Cong }
		hidden_effect = {
			USA = {
				clr_country_flag = USA_show_south_africa_tree
				USA_reload_presidential_tree = yes
			}
			CAN = {
				remove_ideas = TNO_division_limit_exemption
			}
			country_event = { id = SAFWAR.21 days = 1 }
		}
	}
}

##The Ceasefire is accepted - Schild Leaning
country_event = {
	id = SAFWAR.26
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.26" }
	title = SAFWAR.26.t
	desc = SAFWAR.26.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.26.a
		ai_chance = { factor = 80 }
		hidden_effect = {
			SAF = { remove_ideas = SAF_Boer_Viet_Cong }
			USA = {
				clr_country_flag = USA_show_south_africa_tree
				USA_reload_presidential_tree = yes
			}
			CAN = {
				remove_ideas = TNO_division_limit_exemption
			}
			country_event = { id = SAFWAR.20 days = 1 }
		}
	}
}

##The Ceasefire is rejected by the Germans
country_event = {
	id = SAFWAR.27
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.27" }
	title = SAFWAR.27.t
	desc = SAFWAR.27.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes

	option = {
		name = SAFWAR.27.a
		ai_chance = { factor = 80 }
	}
}

##The Ceasefire is rejected by the OFN
country_event = {
	id = SAFWAR.28
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.28" }
	title = SAFWAR.28.t
	desc = SAFWAR.28.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes

	option = {
		name = SAFWAR.28.a
		ai_chance = { factor = 80 }
	}
}

##Hidden event which enables ceasefires
country_event = {
	id = SAFWAR.29
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.29" }
	title = SAFWAR.29.t
	desc = SAFWAR.29.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	hidden = yes

	option = {
		name = SAFWAR.29.a
		ai_chance = { factor = 80 }
		set_global_flag = south_african_war_ceasefires_enabled
	}
}

##Booby traps in Choma (to redo)
country_event = {
	id = SAFWAR.30
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.30" }
	title = SAFWAR.30.t
	desc = SAFWAR.30.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.30.a
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_choma_level_one_traps
				}
			}
			1054 = {
				damage_building = { type = infrastructure damage = 0.8 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_choma_level_two_traps
				}
			}
			1054 = {
				damage_building = { type = infrastructure damage = 1.2 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_choma_level_three_traps
				}
			}
			1054 = {
				damage_building = { type = infrastructure damage = 1.8 }
			}
		}
	}
}

##Booby traps in Lupane
country_event = {
	id = SAFWAR.31
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.31" }
	title = SAFWAR.31.t
	desc = SAFWAR.31.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.31.a
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_lupane_level_one_traps
				}
			}
			881 = {
				damage_building = { type = infrastructure damage = 0.8 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_lupane_level_two_traps
				}
			}
			881 = {
				damage_building = { type = infrastructure damage = 1.2 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_lupane_level_three_traps
				}
			}
			881 = {
				damage_building = { type = infrastructure damage = 1.8 }
			}
		}
	}
}

##Booby traps in Francistown
country_event = {
	id = SAFWAR.32
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.32" }
	title = SAFWAR.32.t
	desc = SAFWAR.32.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.32.a
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_francistown_level_one_traps
				}
			}
			1063 = {
				damage_building = { type = infrastructure damage = 0.8 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_francistown_level_two_traps
				}
			}
			1063 = {
				damage_building = { type = infrastructure damage = 1.2 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_francistown_level_three_traps
				}
			}
			1063 = {
				damage_building = { type = infrastructure damage = 1.8 }
			}
		}
	}
}

##Booby traps in Rommelstadt
country_event = {
	id = SAFWAR.33
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.33" }
	title = SAFWAR.33.t
	desc = SAFWAR.33.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.33.a
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_rommelstadt_level_one_traps
				}
			}
			545 = {
				damage_building = { type = infrastructure damage = 0.8 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_rommelstadt_level_two_traps
				}
			}
			545 = {
				damage_building = { type = infrastructure damage = 1.2 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_rommelstadt_level_three_traps
				}
			}
			545 = {
				damage_building = { type = infrastructure damage = 1.8 }
			}
		}
	}
}

##Booby traps in Masvingo
country_event = {
	id = SAFWAR.34
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.34" }
	title = SAFWAR.34.t
	desc = SAFWAR.34.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.34.a
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_masvingo_level_one_traps
				}
			}
			1065 = {
				damage_building = { type = infrastructure damage = 0.8 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_masvingo_level_two_traps
				}
			}
			1065 = {
				damage_building = { type = infrastructure damage = 1.2 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_masvingo_level_three_traps
				}
			}
			1065 = {
				damage_building = { type = infrastructure damage = 1.8 }
			}
		}
	}
}

##Booby traps in Gaza
country_event = {
	id = SAFWAR.35
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.35" }
	title = SAFWAR.35.t
	desc = SAFWAR.35.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.35.a
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_gaza_level_one_traps
				}
			}
			1058 = {
				damage_building = { type = infrastructure damage = 0.8 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_gaza_level_two_traps
				}
			}
			1058 = {
				damage_building = { type = infrastructure damage = 1.2 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_gaza_level_three_traps
				}
			}
			1058 = {
				damage_building = { type = infrastructure damage = 1.8 }
			}
		}
	}
}

##Booby traps in Maputo
country_event = {
	id = SAFWAR.36
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.36" }
	title = SAFWAR.36.t
	desc = SAFWAR.36.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.36.a
		ai_chance = { factor = 80 }
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_maputo_level_one_traps
				}
			}
			880 = {
				damage_building = { type = infrastructure damage = 0.8 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_maputo_level_two_traps
				}
			}
			880 = {
				damage_building = { type = infrastructure damage = 1.2 }
			}
		}
		if = {
			limit = {
				has_global_flag = south_african_war_happening
				GRO = {
					has_country_flag = GRO_maputo_level_three_traps
				}
			}
			880 = {
				damage_building = { type = infrastructure damage = 1.8 }
			}
		}
	}
}

##Hüttig drops chem weapons on the Americans
country_event = {
	id = SAFWAR.37
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.37" }
	title = SAFWAR.37.t
	desc = SAFWAR.37.d
	picture = GFX_report_event_generic_chemical_warfare

	is_triggered_only = yes
	fire_only_once = yes

	option = { #Dont intervene
		name = SAFWAR.37.a
		ai_chance = { factor = 40 }
		if = {
			limit = {
				USA_RD_ruling_party = yes
			}
			custom_effect_tooltip = USA_all_voters_header_tt
			set_temp_variable = { USA_week_change_union_pro = 8 }
			add_to_variable = { Demographic_Shift_union_pro_Weeks = USA_week_change_union_pro }
			custom_effect_tooltip = USA_union_pro_shift
			set_temp_variable = { USA_week_change_union_nat = 8 }
			add_to_variable = { Demographic_Shift_union_nat_Weeks = USA_week_change_union_nat }
			custom_effect_tooltip = USA_union_nat_shift

			add_to_variable = { Demographic_Shift_urban_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_urban_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_rural_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_rural_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_nativists_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_nativists_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_black_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_black_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_minority_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_minority_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_hispanic_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_hispanic_nat_Weeks = USA_week_change_union_nat }
		}
		else = {
			custom_effect_tooltip = USA_all_voters_header_tt
			set_temp_variable = { USA_week_change_union_dem = 8 }
			add_to_variable = { Demographic_Shift_union_dem_Weeks = USA_week_change_union_dem }
			custom_effect_tooltip = USA_union_dem_shift
			set_temp_variable = { USA_week_change_union_rep = 8 }
			add_to_variable = { Demographic_Shift_union_rep_Weeks = USA_week_change_union_rep }
			custom_effect_tooltip = USA_union_rep_shift

			add_to_variable = { Demographic_Shift_urban_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_urban_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_rural_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_rural_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_nativists_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_nativists_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_black_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_black_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_minority_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_minority_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_hispanic_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_hispanic_rep_Weeks = USA_week_change_union_rep }
		}
		add_timed_idea = { idea = SAFWAR_37_misc_costs days = 90 }

		set_temp_variable = { USA_week_change_urban_foreign_policy_lib = 12 }
		add_to_variable = { Policy_Shift_urban_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		custom_effect_tooltip = USA_urban_foreign_policy_lib

		add_to_variable = { Policy_Shift_rural_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_union_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_black_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_nativists_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_hispanic_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_minority_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
	}

	option = { #Intervene
		name = SAFWAR.37.b
		ai_chance = { factor = 60 }

		set_temp_variable = { tension_WT = 12.5 }
		set_temp_variable = { tension_superpower_1 = USA }
		set_temp_variable = { tension_superpower_2 = GER }
		set_temp_variable = { tension_ID = 57 }
		TNO_change_tension = yes

		USA = {
			add_command_power = 100
			set_temp_variable = { target = SAF }
			TNO_increase_volunteer_cap_10 = yes

			set_temp_variable = { proxy = SAW }
			USA_increase_service_manpower_depletion_rate_large = yes

			#declare_war_on = {
			#	target = GRO
			#	type = annex_everything
			#}
			#add_to_faction = SAF
			#SAF = {
			#	add_ideas = {
			#		OFN_Independent_Member
			#	}
			#}
		}
		GRO = {
			activate_mission = GRO_hold_against_amerika
			set_country_flag = hold_against_amerika
		}
		if = {
			limit = {
				USA_RD_ruling_party = yes
			}
			custom_effect_tooltip = USA_all_voters_header_tt
			set_temp_variable = { USA_week_change_union_dem = 8 }
			add_to_variable = { Demographic_Shift_union_dem_Weeks = USA_week_change_union_dem }
			custom_effect_tooltip = USA_union_dem_shift
			set_temp_variable = { USA_week_change_union_rep = 8 }
			add_to_variable = { Demographic_Shift_union_rep_Weeks = USA_week_change_union_rep }
			custom_effect_tooltip = USA_union_rep_shift

			add_to_variable = { Demographic_Shift_urban_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_urban_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_rural_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_rural_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_nativists_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_nativists_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_black_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_black_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_minority_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_minority_rep_Weeks = USA_week_change_union_rep }
			add_to_variable = { Demographic_Shift_hispanic_dem_Weeks = USA_week_change_union_dem }
			add_to_variable = { Demographic_Shift_hispanic_rep_Weeks = USA_week_change_union_rep }
		}
		else = {
			custom_effect_tooltip = USA_all_voters_header_tt
			set_temp_variable = { USA_week_change_union_pro = 8 }
			add_to_variable = { Demographic_Shift_union_pro_Weeks = USA_week_change_union_pro }
			custom_effect_tooltip = USA_union_pro_shift
			set_temp_variable = { USA_week_change_union_nat = 8 }
			add_to_variable = { Demographic_Shift_union_nat_Weeks = USA_week_change_union_nat }
			custom_effect_tooltip = USA_union_nat_shift

			add_to_variable = { Demographic_Shift_urban_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_urban_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_rural_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_rural_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_nativists_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_nativists_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_black_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_black_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_minority_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_minority_nat_Weeks = USA_week_change_union_nat }
			add_to_variable = { Demographic_Shift_hispanic_pro_Weeks = USA_week_change_union_pro }
			add_to_variable = { Demographic_Shift_hispanic_nat_Weeks = USA_week_change_union_nat }
		}
		set_temp_variable = { USA_week_change_urban_foreign_policy_lib = 12 }
		add_to_variable = { Policy_Shift_urban_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		custom_effect_tooltip = USA_urban_foreign_policy_lib

		add_to_variable = { Policy_Shift_rural_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_union_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_black_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_nativists_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_hispanic_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		add_to_variable = { Policy_Shift_minority_foreign_policy_lib_Weeks = USA_week_change_urban_foreign_policy_lib }
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = WORLD.595 hours = 1 }
			}
		}
	}
}

##Zentralafrika event for Hüttig oofing Muller
country_event = {
	id = SAFWAR.38
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event SAFWAR.38"
	}
	title = SAFWAR.38.t
	desc = SAFWAR.38.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.38.a
		ai_chance = { factor = 80 }
		hidden_effect = {
			load_focus_tree = ZZZ_blank_focus
			COG_Friedrich_von_Mellenthin = { set_nationality = GRO }
			COG_Gerd_von_Blottnitz = { set_nationality = GRO }
			transfer_units_fraction = {
				target = ZZZ
				size = 0
				army_ratio = 0.56
			}
			ZZZ = {
				delete_unit = {
					state = 1297
					disband = no
				}
			}
		}
		GRO = {
			annex_country = {
				target = COG
				transfer_troops = yes
			}
			change_tag_from = COG
		}
		every_state = { remove_core_of = COG }
	}

	option = {
		name = SAFWAR.38.b
		ai_chance = { factor = 0 }
		hidden_effect = {
			GRO = { #Change tag to get Closing Screen
				change_tag_from = COG
				TNO_Country_Closing_Screen_Show = yes
			}
			COG_Friedrich_von_Mellenthin = { set_nationality = GRO }
			COG_Gerd_von_Blottnitz = { set_nationality = GRO }
			transfer_units_fraction = {
				target = ZZZ
				size = 0
				army_ratio = 0.56
			}
			ZZZ = {
				delete_unit = {
					state = 1297
					disband = no
				}
			}
		}
		GRO = {
			annex_country = {
				target = COG
				transfer_troops = yes
			}
		}
		every_state = { remove_core_of = COG }
	}
}
##Sudwestafrika event for Hüttig oofing Schenck
country_event = {
	id = SAFWAR.39
	immediate = {
		log = "[GetDateText]: [Root.GetName]: event SAFWAR.39"
	}
	title = SAFWAR.39.t
	desc = SAFWAR.39.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.39.a
		ai_chance = { factor = 80 }
		hidden_effect = {
			ANG_Hans_Ulrich_Rudel = { set_nationality = GRO }
			transfer_units_fraction = {
				target = ZZZ
				size = 0
				army_ratio = 0.47
			}
			ZZZ = {
				delete_unit = {
					state = 1297
					disband = no
				}
			}
		}
		GRO = {
			annex_country = {
				target = ANG
				transfer_troops = yes
			}
			change_tag_from = ANG
		}
		every_state = { remove_core_of = ANG }
	}

	option = {
		name = SAFWAR.39.b
		ai_chance = { factor = 0 }
		hidden_effect = {
			GRO = { #Change tag to get Closing Screen
				change_tag_from = ANG
				TNO_Country_Closing_Screen_Show = yes
			}
			ANG_Hans_Ulrich_Rudel = { set_nationality = GRO }
			transfer_units_fraction = {
				target = ZZZ
				size = 0
				army_ratio = 0.47
			}
			ZZZ = {
				delete_unit = {
					state = 1297
					disband = no
				}
			}
		}
		GRO = {
			annex_country = {
				target = ANG
				transfer_troops = yes
			}
		}
		every_state = { remove_core_of = ANG }
	}
}
##Sudwestafrika event for Hüttig oofing Galland
country_event = {
	id = SAFWAR.40
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.40" }
	title = SAFWAR.40.t
	desc = SAFWAR.40.d
	picture = GFX_report_event_BOR_saw_soldier

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAFWAR.40.b
		ai_chance = { factor = 80 }
		hidden_effect = {
			ANG = { ANG_Hans_Ulrich_Rudel = { set_nationality = GRO } }
			transfer_units_fraction = {
				target = ZZZ
				size = 0
				army_ratio = 0.47
			}
			ZZZ = {
				delete_unit = {
					state = 1297
					disband = no
				}
			}
		}
		GRO = {
			annex_country = {
				target = NAM
				transfer_troops = yes
			}
		}
	}
}

##Inform Germany about the cabal
country_event = {
	id = SAFWAR.41
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.41" }
	title = SAFWAR.41.t
	desc = SAFWAR.41.d
	picture = GFX_report_event_GRO_african_cabal

	is_triggered_only = yes
	fire_only_once = yes

	trigger = {
		NOT = {
			has_global_flag = german_civil_war_goeringvic
		}
	}

	option = {
		name = SAFWAR.41.a
		ai_chance = { factor = 1 }
		TNO_fopo_add_reichsstaat_african_cabal_tab = yes
	}
}

news_event = { # Hüttig kills the other Reichskommissars
	id = SAFWAR.42
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.42" }
	title = SAFWAR.42.t
	desc = SAFWAR.42.d
	is_triggered_only = yes

	picture = GFX_news_event_GRO_brudermord

	option = { # Generic
		name = SAFWAR.42.a
		trigger = {
			NOT = {
				original_tag = COG
				original_tag = ANG
				original_tag = GRO
				original_tag = SAF
				original_tag = USA
			}
		}
	}
	option = { # Schild
	name = SAFWAR.42.b
		trigger = {
			OR = {
				original_tag = COG
				original_tag = ANG
				original_tag = GRO
			}
		}
	}
	option = { # SAF/USA
		name = SAFWAR.42.c
		trigger = {
			OR = {
				original_tag = SAF
				original_tag = USA
			}
		}
	}
}

country_event = { # Hard Decisions
	id = SAFWAR.SAFFlavour.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.1" }
	title = SAFWAR.SAFFlavour.1.t
	desc = SAFWAR.SAFFlavour.1.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}

	option = { #
		name = SAFWAR.SAFFlavour.1.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # A Little Spray
	id = SAFWAR.SAFFlavour.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.2" }
	title = SAFWAR.SAFFlavour.2.t
	desc = SAFWAR.SAFFlavour.2.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}

	option = { #
		name = SAFWAR.SAFFlavour.2.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # The Bob Hope USO Christmas Show
	id = SAFWAR.SAFFlavour.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.3" }
	title = SAFWAR.SAFFlavour.3.t
	desc = SAFWAR.SAFFlavour.3.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}

	option = { #
		name = SAFWAR.SAFFlavour.3.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # Life in Lephale
	id = SAFWAR.SAFFlavour.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.4" }
	title = SAFWAR.SAFFlavour.4.t
	desc = SAFWAR.SAFFlavour.4.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}

	option = { #
		name = SAFWAR.SAFFlavour.4.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # Silence in the Sky
	id = SAFWAR.SAFFlavour.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.5" }
	title = SAFWAR.SAFFlavour.5.t
	desc = SAFWAR.SAFFlavour.5.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}

	option = { #
		name = SAFWAR.SAFFlavour.5.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # One Man Down
	id = SAFWAR.SAFFlavour.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.6" }
	title = SAFWAR.SAFFlavour.6.t
	desc = SAFWAR.SAFFlavour.6.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}


	option = { #
		name = SAFWAR.SAFFlavour.6.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # Flight of the FAC
	id = SAFWAR.SAFFlavour.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.7" }
	title = SAFWAR.SAFFlavour.7.t
	desc = SAFWAR.SAFFlavour.7.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}


	option = { #
		name = SAFWAR.SAFFlavour.7.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # BLH Interview
	id = SAFWAR.SAFFlavour.8
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.8" }
	title = SAFWAR.SAFFlavour.8.t
	desc = SAFWAR.SAFFlavour.8.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}

	option = { #
		name = SAFWAR.SAFFlavour.8.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # My Vacation
	id = SAFWAR.SAFFlavour.9
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.9" }
	title = SAFWAR.SAFFlavour.9.t
	desc = SAFWAR.SAFFlavour.9.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}

	option = { #
		name = SAFWAR.SAFFlavour.9.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # Ghosts of the Jungle
	id = SAFWAR.SAFFlavour.10
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.10" }
	title = SAFWAR.SAFFlavour.10.t
	desc = SAFWAR.SAFFlavour.10.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
	}


	option = { #
		name = SAFWAR.SAFFlavour.10.a
		ai_chance = { factor = 1 }

	}
}

country_event = { # A Return Home - Chin Peng
	id = SAFWAR.SAFFlavour.11
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.11" }
	title = SAFWAR.SAFFlavour.11.t
	desc = SAFWAR.SAFFlavour.11.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
		MLY = {
			has_country_leader = {
				character = MLY_Chin_Peng
				ruling_only = yes
			}
		}
	}

	option = { #
		name = SAFWAR.SAFFlavour.11.a
		ai_chance = { factor = 1 }
		every_owned_state = {
			limit = {
				can_have_elections_in_state = yes
			}
			add_to_variable = { NPP_L_bonus_popularity = 0.01 }
			add_to_variable = { NPP_popularity = 0.01 }
			custom_effect_tooltip = USA_NPP_L_popularity_grows_low
		}
	}
}

country_event = { # A Return Home - Yeop Mahidin
	id = SAFWAR.SAFFlavour.12
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAFWAR.SAFFlavour.12" }
	title = SAFWAR.SAFFlavour.12.t
	desc = SAFWAR.SAFFlavour.12.desc
	picture = GFX_report_event_USA_saw_soldier

	is_triggered_only = yes
	trigger = {
		has_global_flag = south_african_war_happening
		MLY = {
			has_country_leader = {
				character = MLY_Yeop_Mahidin
				ruling_only = yes
			}
		}
	}

	option = {
		name = SAFWAR.SAFFlavour.12.a
		ai_chance = { factor = 1 }
		every_owned_state = {
			limit = {
				can_have_elections_in_state = yes
			}
			add_to_variable = { NPP_Y_bonus_popularity = 0.01 }
			add_to_variable = { NPP_popularity = 0.01 }
			custom_effect_tooltip = USA_NPP_Y_popularity_grows_low
		}
	}
}


add_namespace = saw_collapse

country_event = { #South African collapse check, Cape Town battle set up
	id = saw_collapse.1
	is_triggered_only = yes
	trigger = { has_global_flag = south_african_war_happening }
	hidden = yes
	immediate = {
		if = {
			limit = {
				SAF = {
					NOT = {
						controls_province = 13495
						AND = {
							controls_province = 13489
							controls_province = 13497
						}
					}
					check_variable = { surrender_progress > 0.7 }
					controls_province = 13488
					NOT = { has_idea = SAF_our_darkest_hour }
				}
			}
			set_global_flag = SAF_collapse_war
		}
	}

	option = {
		trigger = { not = { has_global_flag = SAF_collapse_war } }
		country_event = {
			days = 3
			id = saw_collapse.1
		}
	}
	option = {
		trigger = { has_global_flag = SAF_collapse_war }
		SAW_start_SAF_collapse_vs_Schild = yes
	}
}

country_event = { #US sees SAF collapsing
	id = saw_collapse.2
	title = saw_collapse.2.t
	desc = saw_collapse.2.d
	is_triggered_only = yes
	picture = GFX_report_event_USA_saw_soldier6
	immediate = {
		activate_mission = USA_Capetown_evacuation
	}

	option = {
		name = saw_collapse.2.a
		add_timed_idea = {
			idea = USA_Capetown_battle
			days = 21
		}
	}
}

country_event = { #SAF GG
	id = saw_collapse.3
	title = saw_collapse.3.t
	desc = saw_collapse.3.d
	picture = GFX_report_event_USA_saw_soldier11
	is_triggered_only = yes

	option = {
		name = saw_collapse.3.a
		add_ideas = SAF_the_great_flight
	}
}

country_event = { #RK push to Kapstadt
	id = saw_collapse.4
	title = saw_collapse.4.t
	desc = saw_collapse.4.d
	picture = GFX_report_event_GER_march
	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			activate_mission = ARK_rush_to_Kapstadt
		}
	}

	option = {
		name = saw_collapse.4.a
		add_timed_idea = {
			idea = ARK_Kapstadt_Angriff
			days = 21

		}
	}
}


country_event = { #US holds Cape Town-US
	id = saw_collapse.10
	title = saw_collapse.10.t
	desc = saw_collapse.10.d
	is_triggered_only = yes
	picture = GFX_report_event_USA_saw_soldier

	option = {
		name = saw_collapse.10.a
		add_manpower = 2500
		add_political_power = 5
		set_temp_variable = { target = SAF }
		TNO_clear_and_recall_volunteers = yes
	}
}

country_event = { #US holds Cape Town-RK
	id = saw_collapse.11
	title = saw_collapse.11.t
	desc = saw_collapse.11.d
	is_triggered_only = yes
	picture = GFX_report_event_GRO_saw_soldier5

	option = {
		name = saw_collapse.11.a
		add_equipment_to_stockpile = {
			type = infantry_equipment
			amount = 500
			producer = USA
		}
		add_political_power = 50
	}
}

country_event = { #US holds Cape Town-SAF
	id = saw_collapse.12
	title = saw_collapse.12.t
	desc = saw_collapse.12.d
	is_triggered_only = yes
	picture = GFX_report_event_SAF_saw_soldier4

	option = {
		name = saw_collapse.12.a
		swap_ideas = {
			remove_idea = SAF_the_great_flight
			add_idea = SAF_collapsed_will
		}
	}
}

country_event = { #US loses Cape Town-US
	id = saw_collapse.20
	title = saw_collapse.20.t
	desc = saw_collapse.20.d
	is_triggered_only = yes
	picture = GFX_report_event_SAF_saw_tank_destroyed3

	option = {
		add_political_power = -50
		add_manpower = -2500
		name = saw_collapse.10.a
		set_temp_variable = { target = SAF }
		TNO_clear_and_recall_volunteers = yes
	}
}

country_event = { #US loses Cape Town-RK
	id = saw_collapse.21
	title = saw_collapse.21.t
	desc = saw_collapse.21.d
	is_triggered_only = yes
	picture = GFX_report_event_GRO_saw_tank3

	option = {
		name = saw_collapse.11.a
		add_equipment_to_stockpile = {
			type = infantry_equipment
			amount = 2500
			producer = USA
		}
		add_equipment_to_stockpile = {
			type = support_equipment
			amount = 1000
			producer = USA
		}
		add_equipment_to_stockpile = {
			type = motorized_equipment
			amount = 500
			producer = USA
		}
		add_political_power = 100
	}
}

country_event = { #US loses Cape Town-SAF
	id = saw_collapse.22
	title = saw_collapse.22.t
	desc = saw_collapse.22.d
	is_triggered_only = yes
	picture = GFX_report_event_SAF_saw_tank_destroyed3

	option = {
		name = saw_collapse.22.a
		swap_ideas = {
			remove_idea = SAF_the_great_flight
			add_idea = SAF_collapsed_will
		}
	}
}

add_namespace = saw_report
country_event = { # Nixon - Total Pakt Victory
	id = saw_report.1
	title = saw_report.1.t
	desc = saw_report.1.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.1.a

		set_temp_variable = { conclusion_weeks = 14 }
		set_temp_variable = { conclusion_bonus = 0.06 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Nixon - Total OFN Victory
	id = saw_report.2
	title = saw_report.2.t
	desc = saw_report.2.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_congress_1

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.2.a

		set_temp_variable = { conclusion_weeks = 12 }
		set_temp_variable = { conclusion_bonus = 0.04 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # JFK - Total OFN Victory
	id = saw_report.3
	title = saw_report.3.t
	desc = saw_report.3.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_congress_1

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.3.a

		set_temp_variable = { conclusion_weeks = 10 }
		set_temp_variable = { conclusion_bonus = 0.04 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # JFK - Total Pakt Victory
	id = saw_report.4
	title = saw_report.4.t
	desc = saw_report.4.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.4.a

		set_temp_variable = { conclusion_weeks = 12 }
		set_temp_variable = { conclusion_bonus = 0.06 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # McCormack - White Peace
	id = saw_report.5
	title = saw_report.5.t
	desc = saw_report.5.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_busy_street

	option = {
		name = saw_report.5.a

		set_temp_variable = { conclusion_weeks = 4 }
		set_temp_variable = { conclusion_bonus = 0.01 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # McCormack - Pro-OFN Ceasefire
	id = saw_report.6
	title = saw_report.6.t
	desc = saw_report.6.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_white_house_color

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.6.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.03 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # McCormack - Pro-Pakt Ceasefire
	id = saw_report.7
	title = saw_report.7.t
	desc = saw_report.7.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.7.a

		set_temp_variable = { conclusion_weeks = 10 }
		set_temp_variable = { conclusion_bonus = 0.02 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # McCormack - Total Pakt Victory
	id = saw_report.8
	title = saw_report.8.t
	desc = saw_report.8.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.8.a

		set_temp_variable = { conclusion_weeks = 12 }
		set_temp_variable = { conclusion_bonus = 0.06 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # McCormack - Total OFN Victory
	id = saw_report.9
	title = saw_report.9.t
	desc = saw_report.9.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_congress_1

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.9.a

		set_temp_variable = { conclusion_weeks = 10 }
		set_temp_variable = { conclusion_bonus = 0.04 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # LBJ - White Peace
	id = saw_report.10
	title = saw_report.10.t
	desc = saw_report.10.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_busy_street

	option = {
		name = saw_report.10.a

		set_temp_variable = { conclusion_weeks = 4 }
		set_temp_variable = { conclusion_bonus = 0.005 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # LBJ - Pro-OFN Ceasefire
	id = saw_report.11
	title = saw_report.11.t
	desc = saw_report.11.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_white_house_color

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.11.a

		set_temp_variable = { conclusion_weeks = 6 }
		set_temp_variable = { conclusion_bonus = 0.01 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # LBJ - Pro-Pakt Ceasefire
	id = saw_report.12
	title = saw_report.12.t
	desc = saw_report.12.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.12.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.02 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # LBJ - Total OFN Victory
	id = saw_report.13
	title = saw_report.13.t
	desc = saw_report.13.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_congress_1

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.13.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.03 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # LBJ - Total Pakt Victory
	id = saw_report.14
	title = saw_report.14.t
	desc = saw_report.14.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.14.a

		set_temp_variable = { conclusion_weeks = 10 }
		set_temp_variable = { conclusion_bonus = 0.06 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Bennett - White Peace
	id = saw_report.15
	title = saw_report.15.t
	desc = saw_report.15.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_busy_street

	option = {
		name = saw_report.15.a

		set_temp_variable = { conclusion_weeks = 4 }
		set_temp_variable = { conclusion_bonus = 0.005 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Bennett - Pro-OFN Ceasefire
	id = saw_report.16
	title = saw_report.16.t
	desc = saw_report.16.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_white_house_color

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.16.a

		set_temp_variable = { conclusion_weeks = 6 }
		set_temp_variable = { conclusion_bonus = 0.02 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Bennett - Pro-Pakt Ceasefire
	id = saw_report.17
	title = saw_report.17.t
	desc = saw_report.17.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.17.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.01 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Bennett - Total OFN Victory
	id = saw_report.18
	title = saw_report.18.t
	desc = saw_report.18.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_congress_1

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.18.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.04 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Bennett - Total Pakt Victory
	id = saw_report.19
	title = saw_report.19.t
	desc = saw_report.19.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.19.a

		set_temp_variable = { conclusion_weeks = 10 }
		set_temp_variable = { conclusion_bonus = 0.06 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Wallace - White Peace
	id = saw_report.20
	title = saw_report.20.t
	desc = saw_report.20.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_busy_street

	option = {
		name = saw_report.20.a

		set_temp_variable = { conclusion_weeks = 4 }
		set_temp_variable = { conclusion_bonus = 0.005 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Wallace - Pro-OFN Ceasefire
	id = saw_report.21
	title = saw_report.21.t
	desc = saw_report.21.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_white_house_color

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.21.a

		set_temp_variable = { conclusion_weeks = 6 }
		set_temp_variable = { conclusion_bonus = 0.01 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Wallace - Pro-Pakt Ceasefire
	id = saw_report.22
	title = saw_report.22.t
	desc = saw_report.22.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.22.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.03 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Wallace - Total OFN Victory
	id = saw_report.23
	title = saw_report.23.t
	desc = saw_report.23.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_congress_1

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.23.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.03 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # Wallace - Total Pakt Victory
	id = saw_report.24
	title = saw_report.24.t
	desc = saw_report.24.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.24.a

		set_temp_variable = { conclusion_weeks = 10 }
		set_temp_variable = { conclusion_bonus = 0.06 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # RFK - White Peace
	id = saw_report.25
	title = saw_report.25.t
	desc = saw_report.25.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_busy_street

	option = {
		name = saw_report.25.a

		set_temp_variable = { conclusion_weeks = 4 }
		set_temp_variable = { conclusion_bonus = 0.01 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # RFK - Pro-OFN Ceasefire
	id = saw_report.26
	title = saw_report.26.t
	desc = saw_report.26.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_white_house_color

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.26.a

		set_temp_variable = { conclusion_weeks = 6 }
		set_temp_variable = { conclusion_bonus = 0.02 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # RFK - Pro-Pakt Ceasefire
	id = saw_report.27
	title = saw_report.27.t
	desc = saw_report.27.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.27.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.01 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -1 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # RFK - Total OFN Victory
	id = saw_report.28
	title = saw_report.28.t
	desc = saw_report.28.desc
	is_triggered_only = yes
	picture = GFX_report_event_USA_congress_1

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = saw_report.28.a

		set_temp_variable = { conclusion_weeks = 8 }
		set_temp_variable = { conclusion_bonus = 0.03 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = 2 }
		US_elections_calculate_country_vars = yes
	}
}

country_event = { # RFK - Total Pakt Victory
	id = saw_report.29
	title = saw_report.29.t
	desc = saw_report.29.desc
	is_triggered_only = yes
	picture = GFX_report_event_IBR_meeting_table

	option = {
		name = saw_report.29.a

		set_temp_variable = { conclusion_weeks = 10 }
		set_temp_variable = { conclusion_bonus = 0.06 }
		USA_proxy_conclusion_effect = yes
		add_to_variable = { USA_unity = -2 }
		US_elections_calculate_country_vars = yes
	}
}

# USA events
country_event = { # They've invaded South Africa, chaos
	id = SAF_USA.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_USA.1" }
	title = SAF_USA.1.t
	desc = SAF_USA.1.desc
	picture = GFX_report_event_USA_nixon_phone

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAF_USA.1.a

		hidden_effect = {
			country_event = {
				id = SAF_USA.2
				hours = 12
			}
		}
	}
}

country_event = { # OFN Resolution
	id = SAF_USA.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_USA.2" }
	title = SAF_USA.2.t
	desc = SAF_USA.2.desc
	picture = GFX_report_event_USA_OFN_meeting

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAF_USA.2.a

		set_global_flag = south_african_war_happening

		set_country_flag = USA_sa_ofn
		add_to_variable = { USA_crisis_counter = 1 }
		set_country_flag = USA_In_The_SAF_WAR
		set_country_flag = USA_Has_Been_In_the_SAF_WAR
		set_country_flag = will_send_troops

		USA_reload_nixon_tree = yes
		TNO_fopo_add_saw_tab = yes
		# homefront mechanic shows up

		add_timed_idea = {
			idea = USA_african_adventure
			days = 150
		}

		set_temp_variable = { target = SAF }
		TNO_increase_volunteer_cap_1 = yes

		custom_effect_tooltip = USA_add_OFN_unity
		add_to_variable = { OFN_unity = 3 }

		hidden_effect = {
			country_event = { id = SAFWAR.29 days = 364 } # Ceasefires enabled
			set_variable = { USA_manpower_depletion_SAW = 1.5 }
			USA_homefront_calculate_manpower_depletion = yes

			SAF = {
				set_country_flag = USA_entered_war
				country_event = {
					id = SAFWAR.7
					days = 4
				}
			}

			SAF = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] SAF.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			USA = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] SAF.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			GRO = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] GRO.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			ANG = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] ANG.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			COG = {
				SAW_rubberband_effect = yes
				SAW_update_rubberband = yes
				log = "[?GetName] COG.SAW_surrender = [?THIS.SAW_surrender] - LAZER"
			}
			country_event = { id = USA.209 days = 28 }

			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = SAF_news.1
					days = 1
				}
			}

			BRG = { TNO_BRG_main_tree_swap = yes } #Globalplan Stuff
			BRA = { country_event = { id = brazil.585 days = 2 } }
		}
	}
}

country_event = { # Unified Allied Command
	id = SAF_USA.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_USA.3" }
	title = SAF_USA.3.t
	desc = SAF_USA.3.desc
	picture = GFX_report_event_MZB_westmoreland_4

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAF_USA.3.a

		set_temp_variable = { target = SAF }
		TNO_increase_volunteer_cap_1 = yes

		set_temp_variable = { proxy = SAW }
		USA_increase_service_manpower_depletion_rate_medium = yes

		hidden_effect = {
			set_technology = {
				gunship_1966 = 1
			}

			CAN = {
				add_war_support = 0.05
				country_event = {
					id = OFN.2
					days = 10
				}
			}
			AST = {
				add_war_support = 0.05
				country_event = {
					id = OFN.2
					days = 20
				}
			}
			NZL = {
				add_war_support = 0.05
				country_event = {
					id = OFN.2
					days = 30
				}
			}
		}
	}
}

country_event = { # Civilian Relief
	id = SAF_USA.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_USA.4" }
	title = SAF_USA.4.t
	desc = SAF_USA.4.desc
	picture = GFX_report_event_USA_rfk_food_bank

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAF_USA.4.a

		SAF = {
			add_stability = 0.05
			add_timed_idea = {
				idea = USA_SAW_humanitarian_support
				days = 60
			}
		}
	}
}

country_event = { # Pro-War protests
	id = SAF_USA.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_USA.5" }
	title = SAF_USA.5.t
	desc = SAF_USA.5.desc
	picture = GFX_report_event_USA_white_house_bnw

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAF_USA.5.a

		add_stability = -0.04
		USA_increase_hawkishness_medium = yes

		custom_effect_tooltip = USA_all_voters_header_tt
		set_temp_variable = { USA_week_change_black_foreign_policy_lib = 2 }
		add_to_variable = { Policy_Shift_black_foreign_policy_lib_Weeks = 2 }
		add_to_variable = { Policy_Shift_hispanic_foreign_policy_lib_Weeks = 2 }
		add_to_variable = { Policy_Shift_minority_foreign_policy_lib_Weeks = 2 }
		add_to_variable = { Policy_Shift_nativists_foreign_policy_lib_Weeks = 2 }
		add_to_variable = { Policy_Shift_urban_foreign_policy_lib_Weeks = 2 }
		add_to_variable = { Policy_Shift_rural_foreign_policy_lib_Weeks = 2 }
		add_to_variable = { Policy_Shift_union_foreign_policy_lib_Weeks = 2 }
		custom_effect_tooltip = USA_black_foreign_policy_lib
	}
}

country_event = { # Nixon declares national emergency
	id = SAF_USA.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_USA.6" }
	title = SAF_USA.6.t
	desc = SAF_USA.6.desc
	picture = GFX_report_event_USA_nixon_speech

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAF_USA.6.a

		hidden_effect = {
			set_country_flag = USA_SAW_mobilized
			set_temp_variable = { target = SAF }
			TNO_increase_volunteer_cap_3 = yes
			set_country_flag = SAW_declared_emergency
		}

		set_temp_variable = { proxy = SAW }
		USA_increase_trust_in_government_medium = yes
		USA_increase_service_manpower_depletion_rate_2 = yes

		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = SAF_news.2
					days = 1
				}
			}
		}
	}
}

country_event = { # Interview event
	id = SAF_USA.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_USA.7" }
	title = SAF_USA.7.t
	desc = SAF_USA.7.desc
	picture = GFX_report_event_USA_bob_ross

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = SAF_USA.7.a

		add_political_power = 25
		USA_increase_optics_medium = yes
		USA_increase_hawkishness_medium = yes
	}
}

# News
news_event = { # OFN Resolution 13
	id = SAF_news.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_news.1" }
	title = SAF_news.1.t
	desc = SAF_news.1.desc
	is_triggered_only = yes

	picture = GFX_news_event_USA_OFN_Resolution_13

	option = { # Generic
		name = SAF_news.1.a
		trigger = {
			NOT = {
				tag = COG
				tag = ANG
				tag = GRO
				tag = GER
				tag = SGR
				tag = HGR
				tag = GGR
				tag = BGR

				tag = SAF
				tag = BRA
				is_in_faction_with = USA
				has_idea = OFN_Observer

				is_in_faction_with = JAP
				has_idea = Sphere_Observer
			}
		}
	}
	option = { # Schild/Pakt
	name = SAF_news.1.b
		trigger = {
			OR = {
				tag = COG
				tag = ANG
				tag = GRO
				tag = GER
				tag = SGR
				tag = HGR
				tag = GGR
				tag = BGR
			}
		}
	}
	option = { # SAF/OFN
		name = SAF_news.1.c
		trigger = {
			OR = {
				tag = SAF
				AND = {
					is_in_faction_with = USA
					NOT = { tag = BRA }
				}
				AND = {
					has_idea = OFN_Observer
					NOT = { tag = BRA }
				}
			}
		}
	}
	option = { # Brazil
		name = SAF_news.1.d
		trigger = {
			tag = BRA
		}
	}
	option = { # Sphere
		name = SAF_news.1.e
		trigger = {
			OR = {
				is_in_faction_with = JAP
				has_idea = Sphere_Observer
			}
		}
	}
}

news_event = { # Nixon declares war (kinda)
	id = SAF_news.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event SAF_news.2" }
	title = SAF_news.2.t
	desc = SAF_news.2.desc
	is_triggered_only = yes

	picture = GFX_news_event_USA_NixonDeclaresWar

	option = { # Generic
		name = SAF_news.2.a
		trigger = {
			NOT = {
				tag = COG
				tag = ANG
				tag = GRO
				tag = GER
				tag = SGR
				tag = HGR
				tag = GGR
				tag = BGR

				tag = SAF
				tag = BRA
				is_in_faction_with = USA
				has_idea = OFN_Observer

				is_in_faction_with = JAP
				has_idea = Sphere_Observer
			}
		}
	}
	option = { # Schild/Pakt
	name = SAF_news.2.b
		trigger = {
			OR = {
				tag = COG
				tag = ANG
				tag = GRO
				tag = GER
				tag = SGR
				tag = HGR
				tag = GGR
				tag = BGR
			}
		}
	}
	option = { # SAF/OFN
		name = SAF_news.2.c
		trigger = {
			OR = {
				tag = SAF
				is_in_faction_with = USA
				has_idea = OFN_Observer
			}
		}
	}
	option = { # Sphere
		name = SAF_news.2.d
		trigger = {
			OR = {
				is_in_faction_with = JAP
				has_idea = Sphere_Observer
			}
		}
	}
}