TNO_timeskip_Africa = {
	set_global_flag = africa_timeskipped
	country_event = {
		id = HAU.1
		hours = 5
	}
	country_event = {
		id = HAU.2
		hours = 12
	}

	country_event = {
		id = W_AFRICA.1
	}
	country_event = {
		id = W_AFRICA.2
	}
	country_event = {
		id = W_AFRICA.3
	}
	country_event = {
		id = W_AFRICA.4
	}
	country_event = {
		id = W_AFRICA.5
	}
	country_event = {
		id = W_AFRICA.6
	}
	country_event = {
		id = W_AFRICA.7
	}

	###
	BKF = {
		add_state_core = 834
		add_state_core = 1217
		transfer_state = 834
		transfer_state = 1217
	}

	HAU = {
		add_state_core = 831
		add_state_core = 832
		add_state_core = 1220
		add_state_core = 1219
		add_state_core = 1218
		add_state_core = 1226
		add_state_core = 1216
		add_state_core = 835
		add_state_core = 1221
		transfer_state = 831
		transfer_state = 832
		transfer_state = 1220
		transfer_state = 1219
		transfer_state = 1218
		transfer_state = 1226
		transfer_state = 1216
		transfer_state = 835
		transfer_state = 1221
	}

	MLI = {
		add_state_core = 836
		add_state_core = 837
		add_state_core = 1227
		add_state_core = 1231
		add_state_core = 1230
		add_state_core = 1225
		transfer_state = 836
		transfer_state = 837
		transfer_state = 1227
		transfer_state = 1231
		transfer_state = 1230
		transfer_state = 1225
	}

	TRZ = {
		add_state_core = 839
		add_state_core = 1159
		transfer_state = 839
		transfer_state = 1159
	}

	AZW = {
		add_state_core = 557
		add_state_core = 1228
		add_state_core = 1229
		add_state_core = 1235
		add_state_core = 1232
		add_state_core = 1233
		transfer_state = 557
		transfer_state = 1228
		transfer_state = 1229
		transfer_state = 1235
		transfer_state = 1232
		transfer_state = 1233
	}

	AYR = {
		add_state_core = 1222
		add_state_core = 1190
		add_state_core = 1191
		add_state_core = 515
		add_state_core = 1193
		add_state_core = 1192
		transfer_state = 1222
		transfer_state = 1190
		transfer_state = 1191
		transfer_state = 515
		transfer_state = 1193
		transfer_state = 1192
	}

	KNM = {
		add_state_core = 1195
		add_state_core = 660
		add_state_core = 1194
		transfer_state = 1195
		transfer_state = 660
		transfer_state = 1194
	}

	###

	FFR = {
		add_state_core = 780
		add_state_core = 1208
		add_state_core = 1209
		transfer_state = 780
		transfer_state = 1208
		transfer_state = 1209
	}

	SUS = {# WHEN THE IMPOSTOR ANNEX STATES
		add_state_core = 556
		add_state_core = 1224
		add_state_core = 838
		transfer_state = 556
		transfer_state = 1224
		transfer_state = 838
	}

	EWE = { #Oveja...
		add_state_core = 274
		add_state_core = 833
		transfer_state = 274
		transfer_state = 833
	}

	GBE = {
		add_state_core = 882
		add_state_core = 941
		transfer_state = 882
		transfer_state = 941
	}

	YOR = {
		add_state_core = 1188
		transfer_state = 1188
	}

	WOL = {
		add_state_core = 272
		add_state_core = 1223
		transfer_state = 272
		transfer_state = 1223
	}

	CAO = {
		add_state_core = 826
		add_state_core = 1197
		add_state_core = 1196
		add_state_core = 1198
		add_state_core = 558
		add_state_core = 1189
		add_state_core = 1199
		add_state_core = 1200
		add_state_core = 1206
		add_state_core = 1205
		add_state_core = 1204
		add_state_core = 1203
		add_state_core = 1202
		add_state_core = 1201
		add_state_core = 1207
		transfer_state = 826
		transfer_state = 1197
		transfer_state = 1196
		transfer_state = 1198
		transfer_state = 558
		transfer_state = 1189
		transfer_state = 1199
		transfer_state = 1200
		transfer_state = 1206
		transfer_state = 1205
		transfer_state = 1204
		transfer_state = 1203
		transfer_state = 1202
		transfer_state = 1201
		transfer_state = 1207
	}

	country_event = {
		id = W_AFRICA.0
	}
}

TNO_WAC_start = { # Just gonna fire everything through this scripted effect for simplicity lol
	ZZZ = {
		random_list = {
			57 = { # pro-FFR GBE
				modifier = {
					factor = 0
					has_game_rule = {
						rule = west_african_crisis_scenario
						option = WEST_AFRICAN_CRISIS_SCENARIO_FMA_VS_PALF
					}
				}

				random_list = { # FFR War Roll
					50 = { # diplo
						modifier = {
							factor = 0
							has_game_rule = {
								rule = west_african_crisis_scenario
								option = WEST_AFRICAN_CRISIS_SCENARIO_WAA_VS_FMA_VS_PALF
							}
						}
						set_global_flag = WAC_scenario_1
						country_event = { # annex
							id = west_african_crisis.0
							days = 761
						}
					}
					50 = { # war
						modifier = {
							factor = 0
							has_game_rule = {
								rule = west_african_crisis_scenario
								option = WEST_AFRICAN_CRISIS_SCENARIO_WAA_VS_PALF
							}
						}
						set_global_flag = WAC_scenario_2
						country_event = { # invade mossiland
							id = west_african_crisis.1
							days = 882
						}
					}
				}
			}

			43 = { # pro-cameroon GBE
				modifier = {
					factor = 0
					has_game_rule = {
						rule = west_african_crisis_scenario
						option = WEST_AFRICAN_CRISIS_SCENARIO_WAA_VS_PALF
					}
				}
				modifier = {
					factor = 0
					has_game_rule = {
						rule = west_african_crisis_scenario
						option = WEST_AFRICAN_CRISIS_SCENARIO_WAA_VS_FMA_VS_PALF
					}
				}
				set_global_flag = WAC_scenario_3
				country_event = { # FFR annexes BKF
					id = west_african_crisis.0
					days = 761
				}
			}
		}
		### SCENARIO 1 ###
		if = {
			limit = { has_global_flag = WAC_scenario_1 }
			country_event = { # FFR puppeting GBE
				id = west_african_crisis.2
				days = 59
			}
			country_event = { # WAA Formation
				id = west_african_crisis.3
				days = 1300
			}
			country_event = { # Sokoto Civil War and Guinea in the PALF
				id = west_african_crisis.4
				days = 1665
				random_days = 59
			}
			country_event = { # Socialist Takeover in Ghana
				id = west_african_crisis.5
				days = 1845
				random_days = 37
			}
			country_event = { # West African War Begins
				id = west_african_crisis.6
				days = 2025
				random_days = 70
			}
		}

		### SCENARIO 2 ### #
		if = {
			limit = { has_global_flag = WAC_scenario_2 }
			country_event = { # FFR puppeting GBE
				id = west_african_crisis.2
				days = 59
			}
			country_event = { # WAA Formation
				id = west_african_crisis.7
				days = 1300
			}
			country_event = { # FFR invades WAA
				id = west_african_crisis.8
				days = 1541
			}
			country_event = { # PALF invades West Africa
				id = west_african_crisis.9
				days = 1544
			}
		}

		### SCENARIO 3 ###
		if = {
			limit = { has_global_flag = WAC_scenario_3 }
			country_event = { # CAO puppeting GBE
				id = west_african_crisis.10
				days = 59
			}
			country_event = { # PALF invades Yorubaland // PALF Formation // Free French Alliance
				id = west_african_crisis.11
				days = 731
			}
			country_event = { # Ghana Civil War a
				id = west_african_crisis.12
				days = 781
			}
			country_event = { # Ghana Civil War b
				id = west_african_crisis.14
				days = 790
			}
			country_event = { # War Begins
				id = west_african_crisis.13
				days = 800
				random_days = 14
			}
		}
	}
}

TNO_Mano_Set_Majors = {
	set_global_flag = mano_campaign_is_proxy
	USA = {
		TNO_fopo_add_mano_campaign_tab = yes
		activate_mission = USA_mano_timer
		activate_mission = USA_mano_deploy_taskforce
	}
	JAP = {
		TNO_fopo_add_mano_campaign_tab = yes
	}
	# Add Ongoing to Global Conflicts
	JAP = {
		set_temp_variable = { Victory_ID = 36 }
		Cold_War_GUI_AddVictory = yes
	}
	USA = {
		set_temp_variable = { Victory_ID = 36 }
		Cold_War_GUI_AddVictory = yes
	}
}

TNO_Mano_clear_decision_categories = {
	clear_array = global.mano_campaign_contender
	USA = {
		TNO_fopo_remove_mano_campaign_tab = yes
		set_temp_variable = { target = LIB }
		TNO_clear_and_recall_volunteers = yes
		set_temp_variable = { target = MDI }
		TNO_clear_and_recall_volunteers = yes
	}
	JAP = {
		TNO_fopo_remove_mano_campaign_tab = yes
	}
	clr_global_flag = mano_campaign_ongoing
	set_global_flag = mano_campaign_over

	# OOB unload
	LIB = {
		if = {
			limit = { has_template = "West African Expeditionary Force" }
			delete_unit_template_and_units = {
				division_template = "West African Expeditionary Force"
				disband = no
			}
		}
	}
}

TNO_WAC_clear_decision_categories_scenario2japan = {
	JAP = {
		clr_country_flag = JAP_In_The_WAC_WAR
		TNO_fopo_remove_wac_tab = yes
		set_temp_variable = { target = CAO }
		TNO_clear_and_recall_volunteers = yes
		set_temp_variable = { target = SUS }
		TNO_clear_and_recall_volunteers = yes

		remove_mission = JAP_WAC_prepare_offensive_campaign_mission
	}
}

TNO_WAC_clear_decision_categories_scenario2usa = {
	USA = {
		clr_country_flag = USA_In_The_WAC_WAR
		TNO_fopo_remove_wac_tab = yes
		set_temp_variable = { target = FFR }
		TNO_clear_and_recall_volunteers = yes
		set_temp_variable = { target = WOL }
		TNO_clear_and_recall_volunteers = yes
		clear_variable = USA_manpower_depletion_WAC

		remove_dynamic_modifier = { modifier = WEST_AFRICA_USA_troop_restraint }

		if = {
			limit = { check_variable = { USA_WAC_WAR_Discontent > 0 } }
			activate_mission = USA_WAC_discontent_declines
		}
	}
	SAF = {
		TNO_fopo_remove_wac_tab = yes
		set_temp_variable = { target = FFR }
		TNO_clear_and_recall_volunteers = yes
		set_temp_variable = { target = WOL }
		TNO_clear_and_recall_volunteers = yes
	}
}

TNO_WAC_clear_decision_categories = {
	clr_global_flag = west_african_war_ongoing
	set_global_flag = WAC_over
	if = {
		limit = { NOT = { has_global_flag = WAC_scen2_FMA_fell } }
		TNO_WAC_clear_decision_categories_scenario2usa = yes
	}
	if = {
		limit = { NOT = { has_global_flag = WAC_scen2_PALF_fell } }
		TNO_WAC_clear_decision_categories_scenario2japan = yes
	}

	# OOB unload
	WOL = {
		if = {
			limit = { has_template = "West African Expeditionary Force" }
			delete_unit_template_and_units = {
				division_template = "West African Expeditionary Force"
				disband = no
			}
		}
	}
	FFR = {
		if = {
			limit = { has_template = "West African Expeditionary Force" }
			delete_unit_template_and_units = {
				division_template = "West African Expeditionary Force"
				disband = no
			}
		}
	}
	CAO = {
		if = {
			limit = { has_template = "Kamerūn Ensei-gun" }
			delete_unit_template_and_units = {
				division_template = "Kamerūn Ensei-gun"
				disband = no
			}
		}
	}
	SUS = {
		if = {
			limit = { has_template = "Guinea Ensei-gun" }
			delete_unit_template_and_units = {
				division_template = "Guinea Ensei-gun"
				disband = no
			}
		}
	}
}

TNO_TT_WAC_debug_1 = {
	if = {
		limit = { NOT = { has_global_flag = africa_timeskipped } }
		TNO_timeskip_Africa = yes
	}
	country_event = {
		id = MLI.1
		hours = 14
	}
	set_global_flag = WAC_scenario_1
	clr_global_flag = WAC_scenario_2
	clr_global_flag = WAC_scenario_3
	ROOT = {
		country_event = { # annex mossiland
			id = west_african_crisis.0
			days = 1
		}
		country_event = { # FFR puppeting GBE
			id = west_african_crisis.2
			days = 5
		}
		country_event = { # WAA Formation
			id = west_african_crisis.3
			days = 9
		}
		country_event = { # Sokoto Civil War
			id = west_african_crisis.4
			days = 13
		}
		country_event = { # Socialist Takeover in Ghana
			id = west_african_crisis.5
			days = 17
		}
		country_event = { # West African War Begins
			id = west_african_crisis.6
			days = 21
		}
	}
}

TNO_TT_WAC_debug_2 = {
	if = {
		limit = { NOT = { has_global_flag = africa_timeskipped } }
		TNO_timeskip_Africa = yes
	}
	country_event = {
		id = MLI.1
		hours = 14
	}
	clr_global_flag = WAC_scenario_1
	set_global_flag = WAC_scenario_2
	clr_global_flag = WAC_scenario_3
	ROOT = {
		FFR = {
			annex_country = {
				target = BKF
				transfer_troops = no
			}
		}
		country_event = { # FFR puppeting GBE
			id = west_african_crisis.2
			days = 5
		}
		country_event = { # WAA Formation
			id = west_african_crisis.7
			days = 9
		}
		country_event = { # FFR invades WAA
			id = west_african_crisis.8
			days = 13
		}
		country_event = { # PALF invades West Africa
			id = west_african_crisis.9
			days = 17
		}
	}
}

TNO_TT_WAC_debug_3 = {
	if = {
		limit = { NOT = { has_global_flag = africa_timeskipped } }
		TNO_timeskip_Africa = yes
	}
	clr_global_flag = WAC_scenario_1
	clr_global_flag = WAC_scenario_2
	set_global_flag = WAC_scenario_3
	ROOT = {
		country_event = { # annex
			id = west_african_crisis.0
			days = 1
		}
		country_event = { # CAO puppeting GBE
			id = west_african_crisis.10
			days = 5
		}
		country_event = { # PALF invades Yorubaland // PALF Formation // Free French Alliance
			id = west_african_crisis.11
			days = 9
		}
		country_event = { # Ghana Civil War 1
			id = west_african_crisis.12
			days = 13
		}
		country_event = { # Ghana Civil War 2
			id = west_african_crisis.14
			days = 20
		}
		country_event = { # War Begins
			id = west_african_crisis.13
			days = 27
		}
	}
}

## Congolese Civil War
TNO_CCW_USA_Faction_Gone = {
	USA = {
		TNO_fopo_remove_congo_civil_war_tab = yes
		set_temp_variable = { target = CFS }
		TNO_clear_and_recall_volunteers = yes
		set_temp_variable = { target = COG }
		TNO_clear_and_recall_volunteers = yes
	}
}

TNO_CCW_JAP_Faction_Gone = {
	JAP = {
		TNO_fopo_remove_congo_civil_war_tab = yes
		set_temp_variable = { target = AZD }
		TNO_clear_and_recall_volunteers = yes
	}
}

TNO_CCW_GER_Faction_Gone = {
	GER = {
		TNO_fopo_remove_congo_civil_war_tab = yes
		set_temp_variable = { target = GRO }
		TNO_clear_and_recall_volunteers = yes
	}
}

TNO_CCW_Set_Majors = {
	USA = {
		if = {
			limit = {
				country_exists = COG
				has_global_flag = congo_mandate_collapsed
			}
			set_country_flag = US_aid_COG
			set_temp_variable = { target = COG }
			TNO_increase_volunteer_cap_1 = yes
		}
		else = {
			set_country_flag = US_aid_CFS
			set_temp_variable = { target = CFS }
			TNO_increase_volunteer_cap_1 = yes
		}
		JAP = {
			set_country_flag = JAP_aid_AZD
			set_temp_variable = { target = AZD }
			TNO_increase_volunteer_cap_1 = yes
		}
		GER = {
			set_country_flag = GER_aid_GRO
		}
	}
}



TNO_COG_Crisis_Map_Setup = {
	GER = {
		end_puppet = GRO
	}
	
	GRO = {
		leave_faction = yes
		annex_country = { target = COG transfer_troops = no }
		annex_country = { target = ANG transfer_troops = no }

		country_event = {
			id = GRO_REICHSSTAAT.808
		}
		country_event = {
			id = GRO_REICHSSTAAT.809
			hours = 1
		}
	}

	country_event = {
		id = A_SPRING.4
		hours = 2
	}

	country_event = {
		id = COG_PW.1
		hours = 3
	}

	country_event = {
		id = COG_PW.2
		hours = 4
	}
}

TNO_COG_Crisis_Map_Setup_Normal = {
	country_event = {
		id = COG_PW.1
		days = 7
	}
}

## Peace Deals ##
WAC_clear_war_spirits = {
	every_country = {
		limit = { is_west_african_nation = yes }
		remove_ideas = {
			WEST_AFRICA_idea_offensive
			WEST_AFRICA_idea_stable_front
			WEST_AFRICA_idea_chaotic_front
			WEST_AFRICA_idea_resistance
			WEST_AFRICA_idea_guerrilla
			WEST_AFRICA_idea_guerrilla_2
			USA_Plane_Bombing
			JAP_Plane_Bombing
		}
		if = {
			limit = { has_dynamic_modifier = { modifier = WEST_AFRICA_modifier_rubber_band } }
			remove_dynamic_modifier = { modifier = WEST_AFRICA_modifier_rubber_band }
		}
	}
	if = {
		limit = {
			has_game_rule = {
				rule = WEST_AFRICAN_WAR
				option = WEST_AFRICAN_WAR_PALF
			}
		}
		CAO = { remove_war_buff = yes }
	}
	else_if = {
		limit = {
			has_game_rule = {
				rule = WEST_AFRICAN_WAR
				option = WEST_AFRICAN_WAR_WAA
			}
		}
		WOL = { remove_war_buff = yes }
	}
	else_if = {
		limit = {
			has_game_rule = {
				rule = WEST_AFRICAN_WAR
				option = WEST_AFRICAN_WAR_FMA
			}
		}
		FFR = { remove_war_buff = yes }
	}
}

WAC_1_WAA_VICTORY = {
	log = "[GetDateText]: FROM: [From.GetName] ROOT: [Root.GetName] effect WAC_SCENARIO_1_WAA_VICTORY"
	if = {
		limit = { USA = { has_active_mission = USA_WAC_cameroon_capitulates } }
		USA = { remove_mission = USA_WAC_cameroon_capitulates }
	}
	TNO_WAC_clear_decision_categories = yes

	if = {
		limit = {
			NOT = {
				any_country = {
					is_west_african_nation = yes
					has_war_with = GER
				}
			}
		}

	set_global_flag = WAC_SCENARIO_1_WAA_VICTORY

	every_country = {
		limit = {
			OR = {
				has_idea = WAA_Faction
				has_idea = WAA_Protectorate
			}
		}
		every_enemy_country = {
			white_peace = PREV
			leave_faction = yes
		}
	}
	if = {
		limit = {
			NOT = {
				country_exists = YOR
			}
		}
		YOR = {
			transfer_state = 1188
			transfer_state = 825
			set_capital = {
				state = 825
				remember_old_capital = no
			}
			TNO_startup_nation = yes
		}
	}

	EWE = {
		if = {
			limit = { exists = no }
			transfer_state = 827
			transfer_state = 274
			transfer_state = 833
			TNO_startup_nation = yes
		}

		set_politics = { ruling_party = anocracy }
		EWE_Nicolas_Grunitzky = {
			promote_character = { ideology = anocracy_controlled_democracy_subtype }
		}
		set_popularities = {
			socialist = 25
			progressivism = 20
			liberalism = 5
			conservatism = 10
			anocracy = 40
		}
		clr_country_flag = PALF_MEMBER
		set_country_flag = WAA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = WAA_Protectorate
		}
		WOL = { add_to_faction = EWE }
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	SUS = {
		if = {
			limit = { exists = no }
			transfer_state = 828
			transfer_state = 556
			transfer_state = 1224
			transfer_state = 838
			TNO_startup_nation = yes
		}

		remove_state_claim = 1604

		remove_ideas = SUS_idea_guinean_democracy
		promote_character = {
			character = SUS_Louis_Lansana_Beavogui
			ideology = anocracy_controlled_democracy_subtype
		}
		set_politics = { ruling_party = anocracy }
		clr_country_flag = PALF_MEMBER
		set_country_flag = WAA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = WAA_Protectorate
			remove_ideas = SUS_idea_home_exiled_paigc
		}
		WOL = { add_to_faction = SUS }
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	NGR = {
		add_state_core = 832
		add_state_core = 1219
		add_state_core = 1218
		add_state_core = 831
		add_state_core = 1542
		add_state_core = 835
		add_state_core = 1221
		add_state_core = 1220
		add_state_core = 1226
		transfer_state = 832
		transfer_state = 1219
		transfer_state = 1218
		transfer_state = 831
		transfer_state = 1542
		transfer_state = 835
		transfer_state = 1221
		transfer_state = 1220
		transfer_state = 1226

		TNO_startup_nation = yes

		set_politics = { ruling_party = despotism }

		add_popularity = {
			ideology = despotism
			popularity = 0.1
		}

		WOL = { add_to_faction = NGR }
		clr_country_flag = PALF_MEMBER
		set_country_flag = WAA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = WAA_Protectorate
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	GBE = {
		if = {
			limit = { NOT = { country_exists = YOR } }
			add_state_core = 1188
			add_state_core = 825
			transfer_state = 1188
			transfer_state = 825
		}
	}

	WOL = {
		country_event = { # Mali annexes Kayes
			id = west_african_crisis.103
			days = 20
			random_days = 14
		}
		# Post-WAC
		if = {
			limit = { country_exists = ZAR }
			country_event = { # invasion of zarmaland
				id = west_african_crisis.109
				days = 90
			}
		}
		add_to_faction = EWE
		add_to_faction = SUS
	}

	FFR = {
		if = {
			limit = { has_idea = FFR_military_administration }
			swap_ideas = {
				remove_idea = FFR_military_administration
				add_idea = FFR_military_administration_3
			}
		}
		else_if = {
			limit = { has_idea = FFR_military_administration_2 }
			swap_ideas = {
				remove_idea = FFR_military_administration_2
				add_idea = FFR_military_administration_3
			}
		}
		add_popularity = {
			ideology = anocracy
			popularity = 0.1
		}
		if = {
			limit = { has_country_leader = { character = FFR_Philippe_Leclerc ruling_only = yes } }
			set_country_leader_description = {
				desc = "POLITICS_PHILIPPE_LECLERC_1"
			}
		}
	}

	if = {
		limit = { country_exists = YOR }
		YOR = {
			leave_faction = yes
			clr_country_flag = WAA_MEMBER
			hidden_effect = {
				remove_faction_status = yes
			}
		}
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.6
		}
	}

	CAO = {
		if = {
			limit = { exists = no }
			transfer_state = 793
			transfer_state = 1187
			transfer_state = 826
			transfer_state = 1197
			transfer_state = 1189
			transfer_state = 558
			transfer_state = 1198
			transfer_state = 1196
			transfer_state = 1199
			transfer_state = 1200
			transfer_state = 1206
			transfer_state = 1201
			transfer_state = 1202
			transfer_state = 1207
			transfer_state = 1205
			transfer_state = 1204
			transfer_state = 1203
			TNO_startup_nation = yes
		}

		dismantle_faction = yes

		country_event = {
			id = CAO.100
			days = 90
		}

		clr_country_flag = PALF_MEMBER
		remove_faction_status = yes

		every_owned_state = { set_state_controller_to = CAO }

		remove_ideas = {
			CAO_idea_pan_african_vanguard
			CAO_ACA
			CAO_ACA_2
			CAO_ACA_3
		}
	}

	USA = {
		country_event = {
			id = west_african_crisis.212
			days = 2
		}
		if = {
			limit = { date > 1968.06.02 }
			country_event = {
				id = free_france_reconstruction.3
				days = 30
			}
		}
	}
	JAP = {
		country_event = {
			id = west_african_crisis.215
			days = 2
		}
	}

	every_country = {
		limit = { is_west_african_nation = yes }
		remove_ideas = WEST_AFRICA_idea_obliterated_infrastructures
	}

	USA = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 4 }
		set_temp_variable = { Victory_Points = 200 }
		Cold_War_GUI_ManipulateVictory = yes
	}
	JAP = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 2 }
		set_temp_variable = { Victory_Points = -200 }
		Cold_War_GUI_ManipulateVictory = yes
	}

	WAC_clear_war_spirits = yes
	}

	clear_array = global.WAC_contender
}

WAC_1_PALF_VICTORY = {
	log = "[GetDateText]: FROM: [From.GetName] ROOT: [Root.GetName] effect WAC_1_PALF_VICTORY"
	if = {
		limit = { USA = { has_active_mission = USA_WAC_cameroon_capitulates } }
		USA = { remove_mission = USA_WAC_cameroon_capitulates }
	}
	TNO_WAC_clear_decision_categories = yes

	if = {
		limit = {
			NOT = {
				any_country = {
					is_west_african_nation = yes
					has_war_with = GER
				}
			}
		}
	if = {
		limit = {
			has_global_flag = TNO_HAI_civil_war_communist_victory
			NOT = { HAI = { has_country_flag = HAI_amazonism_entrenched } }
		}
		HAI = {
			HAI_Jacques_Stephen_Alexis = {
				add_country_leader_role = {
					country_leader = {
						desc = "POLITICS_HAI_JACQUES_STEPHEN_DESC"
						expire = "1990.1.1"
						ideology = socialist_panafricanism_subtype
						traits = {}
					}
					promote_leader = yes
				}
			}
			set_politics = { ruling_party = socialist }
			set_popularities = {
				despotism = 6
				communist = 23
				socialist = 32
				liberalism = 11
				liberal_conservatism = 8
				anocracy = 20
			}
			set_country_flag = HAI_panafricanism_entrenched
		}
	}
	set_global_flag = WAC_SCENARIO_1_PALF_VICTORY

	if = { # Invade Sokoto
		limit = {
			NOT = {
				OR = {
					SWB = { owns_state = 835 }
					SWB = { owns_state = 1221 }
					SWB = { owns_state = 1220 }
				}
			}
		}
		SWB = {
			country_event = { # invasion of sokoto
				id = west_african_crisis.110
				days = 141
			}
		}
	}
	if = { # Invade Zarmaland
		limit = {
			NOT = { SWB = { owns_state = 1226 } }
		}
		SWB = {
			country_event = { # invasion of zarmaland
				id = west_african_crisis.109
				days = 91
			}
		}
	}

	CAO = {
		set_cosmetic_tag = CAO_win
		add_state_core = 1188
		add_state_core = 825
		transfer_state = 1188
		transfer_state = 825
		remove_ideas = CAO_idea_tense_borders

		country_event = { # Peace
			id = west_african_crisis.104
			days = 60
			random_days = 20
		}
		country_event = { # Invasion of Kayes
			id = west_african_crisis.17
			days = 20
		}
		if = {
			limit = { has_idea = CAO_ACA }
			swap_ideas = {
				remove_idea = CAO_ACA
				add_idea = CAO_ACA_3
			}
		}
		if = {
			limit = { has_idea = CAO_ACA_2 }
			swap_ideas = {
				remove_idea = CAO_ACA_2
				add_idea = CAO_ACA_3
			}
		}
	}

	SWB = {
		set_cosmetic_tag = SWB_unified
	}

	GBE = {
		if = {
			limit = { exists = no }
			transfer_state = 883
			transfer_state = 882
			transfer_state = 941
			TNO_startup_nation = yes
		}
		drop_cosmetic_tag = yes
		CAO = {
			add_to_faction = GBE
			puppet = GBE
		}
		set_politics = {
			ruling_party = socialist
			last_election = "1966.6.23"
			election_frequency = 48
			elections_allowed = no
		}
		set_popularities = {
			communist = 20
			ultranationalism = 0
			socialist = 45
			progressivism = 25
			liberalism = 0
			conservatism = 5
			anocracy = 5
			despotism = 0
			fascism = 0
		}
		set_cosmetic_tag = GBE_CAOPuppet
		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}
	BKF = {
		if = {
			limit = { exists = no }
			transfer_state = 834
			transfer_state = 1217
			transfer_state = 1541
			TNO_startup_nation = yes
		}

		remove_ideas = {
			BKF_idea_remnant_francophilia
			BKF_idea_relative_democracy
		}
		set_cosmetic_tag = BKF_CAOPuppet
		CAO = {
			add_to_faction = BKF
			puppet = BKF
		}
		promote_character = BKF_Joseph_Ki_Zerbo
		set_politics = { ruling_party = socialist }
		set_popularities = {
			communist = 10
			ultranationalism = 0
			socialist = 50
			progressivism = 0
			liberalism = 0
			conservatism = 10
			anocracy = 30
			despotism = 0
			fascism = 0
		}
		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}
	IVO = {
		add_state_core = 779
		add_state_core = 1210
		add_state_core = 780
		add_state_core = 1209
		add_state_core = 1208
		transfer_state = 779
		transfer_state = 1210
		transfer_state = 780
		transfer_state = 1209
		transfer_state = 1208
		TNO_startup_nation = yes

		CAO = {
			add_to_faction = IVO
			puppet = IVO
		}
		set_cosmetic_tag = IVO_CAOPuppet

		set_politics = { ruling_party = socialist }
		set_popularities = {
			communist = 10
			ultranationalism = 0
			socialist = 47
			progressivism = 10
			liberalism = 0

			conservatism = 8
			anocracy = 25
			despotism = 0
			fascism = 0

		}

		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}
	WOL = {
		remove_state_claim = 1604
		if = {
			limit = { exists = no }
			transfer_state = 830
			transfer_state = 272
			transfer_state = 1223
			TNO_startup_nation = yes
		}

		add_state_core = 701
		add_state_core = 829
		transfer_state = 701
		transfer_state = 829

		remove_ideas = {
			WOL_idea_wolofian_stiffness
			WOL_idea_haven_africa
		}
		CAO = {
			add_to_faction = WOL
			puppet = WOL
		}
		promote_character = WOL_Cheikh_Anta_Diop
		set_politics = { ruling_party = socialist }
		set_popularities = {
			communist = 0
			ultranationalism = 0
			socialist = 40
			progressivism = 30
			liberalism = 0
			conservatism = 0
			anocracy = 30
			despotism = 0
			fascism = 0
		}
		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		set_cosmetic_tag = WOL_CAOPuppet
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		annex_country = {
			target = JOL
			transfer_troops = no
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}
	MLI = {
		remove_state_core = 1604
		if = {
			limit = { exists = no }
			add_state_core = 1216
			transfer_state = 1216
			transfer_state = 1225
			transfer_state = 837
			transfer_state = 1230
			transfer_state = 1540
			TNO_startup_nation = yes
		}

		add_state_core = 836
		add_state_core = 1227
		add_state_core = 1231
		transfer_state = 836
		transfer_state = 1227
		transfer_state = 1231

		remove_ideas = {
			MLI_idea_keitas_leadership
			MLI_idea_traore_problem
		}
		CAO = {
			add_to_faction = MLI
			puppet = MLI
		}
		add_country_leader_role = {
			character = MLI_Aoua_Keita
			promote_leader = yes
			country_leader = {
				expire = "1999.1.1"
				ideology = socialist_panafricanism_subtype
				traits = { }
				id = -1
			}
		}
		promote_character = MLI_Aoua_Keita
		set_cosmetic_tag = MLI_CAOPuppet
		set_politics = { ruling_party = socialist }
		set_popularities = {
			communist = 10
			ultranationalism = 0
			socialist = 45
			progressivism = 0
			liberalism = 0

			conservatism = 10
			anocracy = 35
			despotism = 0
			fascism = 0

		}

		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}

	FFR = {
		remove_state_core = 779
		remove_state_core = 1210
		remove_state_core = 780
		remove_state_core = 1209
		remove_state_core = 1208
		remove_state_core = 834
		remove_state_core = 1217
		remove_state_core = 1541

		set_politics = {
			ruling_party = anocracy
			last_election = "1932.5.1"
			election_frequency = 48
			elections_allowed = no
		}

		set_popularities = {
			communist = 0
			socialist = 3
			progressivism = 24
			liberalism = 31
			liberal_conservatism = 0
			conservatism = 17
			anocracy = 23
			despotism = 2
			ultranationalism = 0
			fascism = 0
			national_socialism = 0
		}

		if = {
			limit = { FFR = { exists = no } }
			transfer_state = 713
			transfer_state = 635
			transfer_state = 734
			transfer_state = 641
			TNO_startup_nation = yes
		}

		dismantle_faction = yes

		# KERGUELEN EVENT CHAIN

		if = {
			limit = { has_idea = FFR_military_administration }
			remove_ideas = FFR_military_administration
		}
		else_if = {
			limit = { has_idea = FFR_military_administration_2 }
			remove_ideas = FFR_military_administration_2
		}
		else = {
			remove_ideas = FFR_military_administration_3
		}
		remove_ideas = {
			FFR_precious_metal
			FFR_spirit_french
		}
		set_capital = { state = 635 }
		if = {
			limit = { has_country_leader = { character = FFR_Philippe_Leclerc ruling_only = yes } }
			set_country_leader_description = {
				desc = "POLITICS_PHILIPPE_LECLERC_2"
			}
		}
		every_country = {
			limit = {
				has_war_with = FFR
			}
			white_peace = FFR
		}
	}

	SUS = {
		add_state_core = 1604
		transfer_state = 1604
		set_cosmetic_tag = SUS_CAO
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.7
		}
	}

	USA = {
		country_event = {
			id = west_african_crisis.213
			days = 2
		}
	}
	JAP = {
		country_event = {
			id = west_african_crisis.214
			days = 2
		}
	}

	USA = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 2 }
		set_temp_variable = { Victory_Points = -200 }
		Cold_War_GUI_ManipulateVictory = yes
	}
	JAP = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 4 }
		set_temp_variable = { Victory_Points = 200 }
		Cold_War_GUI_ManipulateVictory = yes
	}

	every_country = {
		limit = { is_west_african_nation = yes }
		remove_ideas = WEST_AFRICA_idea_obliterated_infrastructures
	}

	WAC_clear_war_spirits = yes
	}

	clear_array = global.WAC_contender
}

WAC_2_PALF_BEATEN = {
	log = "[GetDateText]: FROM: [From.GetName] ROOT: [Root.GetName] effect WAC_2_PALF_BEATEN"
	if = {
		limit = { USA = { has_active_mission = USA_WAC_cameroon_capitulates } }
		USA = { remove_mission = USA_WAC_cameroon_capitulates }
	}
	TNO_WAC_clear_decision_categories_scenario2japan = yes

	if = {
		limit = {
			NOT = {
				any_country = {
					is_west_african_nation = yes
					has_war_with = GER
				}
			}
		}
	set_global_flag = WAC_scen2_PALF_fell
	every_country = {
		limit = { is_in_faction_with = CAO }
		every_enemy_country = { white_peace = PREV }
	}
	every_country = {
		limit = { is_in_array = { global.WAC_PALF_faction = THIS } }
		remove_from_array = { global.WAC_contender = THIS }
	}

	clear_array = global.WAC_PALF_faction

	if = {
		limit = { NOT = { country_exists = YOR } }
		YOR = {
			transfer_state = 1188
			transfer_state = 825
			set_capital = {
				state = 825
				remember_old_capital = no
			}
			TNO_startup_nation = yes
		}
	}

	CAO = {
		if = {
			limit = { exists = no }
			transfer_state = 793
			transfer_state = 1187
			transfer_state = 826
			transfer_state = 1197
			transfer_state = 1189
			transfer_state = 558
			transfer_state = 1198
			transfer_state = 1196
			transfer_state = 1199
			transfer_state = 1200
			transfer_state = 1206
			transfer_state = 1201
			transfer_state = 1202
			transfer_state = 1207
			transfer_state = 1205
			transfer_state = 1204
			transfer_state = 1203
			TNO_startup_nation = yes
		}

		dismantle_faction = yes

		country_event = {
			id = CAO.100
			days = 90
		}

		clr_country_flag = PALF_MEMBER
		remove_faction_status = yes

		every_owned_state = { set_state_controller_to = CAO }

		remove_ideas = {
			CAO_idea_pan_african_vanguard
			CAO_ACA
			CAO_ACA_2
			CAO_ACA_3
		}
	}

	JAP = {
		country_event = {
			id = west_african_crisis.219
			days = 2
		}
	}

	#if = { # FMA victory
	#	limit = { has_global_flag = WAC_scen2_WAA_fell }
	#	ZZZ = { WAC_2_FFR_VICTORY = yes }
	#}
	#else_if = { # WAA victory
	#	limit = { has_global_flag = WAC_scen2_FMA_fell }
	#	ZZZ = { WAC_2_WAA_VICTORY = yes }
	#}
	}
}

WAC_2_FFR_VICTORY = {
	log = "[GetDateText]: FROM: [From.GetName] ROOT: [Root.GetName] effect WAC_2_FFR_VICTORY"
	if = {
		limit = { USA = { has_active_mission = USA_WAC_cameroon_capitulates } }
		USA = { remove_mission = USA_WAC_cameroon_capitulates }
	}
	TNO_WAC_clear_decision_categories = yes


	if = {
		limit = {
			NOT = {
				any_country = {
					is_west_african_nation = yes
					has_war_with = GER
				}
			}
		}

	set_global_flag = WAC_SCENARIO_2_FMA_VICTORY
	
	MLI = {
		remove_state_core = 1225
		remove_state_core = 837
		remove_state_core = 1230
		remove_state_core = 1540
		remove_state_core = 836
		remove_state_core = 1227
		remove_state_core = 1231
		remove_state_core = 1604
	}
	KAY = {
		add_state_core = 1216
		add_state_core = 1225
		add_state_core = 837
		add_state_core = 1230
		add_state_core = 1540
		transfer_state = 1216
		transfer_state = 1225
		transfer_state = 837
		transfer_state = 1230
		transfer_state = 1540
		transfer_state = 1604
		set_cosmetic_tag = MLI_FFRPuppet
		set_capital = { state = 1540 }
	}

	FFR = {
		add_popularity = {
			ideology = anocracy
			popularity = 0.1
		}
		add_state_core = 834
		add_state_core = 1217
		add_state_core = 1541

		if = {
			limit = { country_exists = ZAR }
			country_event = { # invasion of zarmaland
				id = west_african_crisis.109
				days = 81
			}
		}

		if = {
			limit = { has_idea = FFR_military_administration }
			swap_ideas = {
				remove_idea = FFR_military_administration
				add_idea = FFR_military_administration_3
			}
		}
		else_if = {
			limit = { has_idea = FFR_military_administration_2 }
			swap_ideas = {
				remove_idea = FFR_military_administration_2
				add_idea = FFR_military_administration_3
			}
		}
		if = {
			limit = { has_country_leader = { character = FFR_Philippe_Leclerc ruling_only = yes } }
			set_country_leader_description = {
				desc = "POLITICS_PHILIPPE_LECLERC_1"
			}
		}
	}

	if = {
		limit = { NOT = { country_exists = YOR } }
		YOR = {
			transfer_state = 1188
			transfer_state = 825
			set_capital = {
				state = 825
				remember_old_capital = no
			}
			TNO_startup_nation = yes
		}
	}

	EWE = {
		if = {
			limit = { exists = no }
			transfer_state = 827
			transfer_state = 274
			transfer_state = 833
			TNO_startup_nation = yes
		}
		FFR = {
			add_to_faction = EWE
			puppet = EWE
		}
		set_cosmetic_tag = EWE_FFRPuppet
		EWE_Nicolas_Grunitzky = {
			promote_character = { ideology = anocracy_controlled_democracy_subtype }
		}
		set_politics = { ruling_party = anocracy }
		set_popularities = {
			socialist = 20
			conservatism = 20
			anocracy = 50
			despotism = 10
		}
		set_party_name = {
			ideology = anocracy
			name = EWE_anocracy_party_grunitzky
			long_name = EWE_anocracy_party_grunitzky_long
		}

		clr_country_flag = WAA_MEMBER
		set_country_flag = FMA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = FMA_Puppet
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	SUS = { # sus amogus
		remove_state_claim = 1604
		if = {
			limit = { exists = no }
			transfer_state = 828
			transfer_state = 556
			transfer_state = 1224
			transfer_state = 838
			TNO_startup_nation = yes
		}

		remove_ideas = SUS_idea_guinean_democracy
		FFR = {
			puppet = SUS
			add_to_faction = SUS
		}
		set_cosmetic_tag = SUS_FFRPuppet
		set_politics = { ruling_party = despotism }
		promote_character = {
			character = SUS_Noumandian_Keita
			ideology = despotism_military_junta_subtype
		}
		set_party_name = {
			ideology = despotism
			long_name = SUS_anocracy_party_long
			name = SUS_anocracy_party
		}
		set_popularities = {
			socialist = 30
			progressivism = 0
			liberalism = 0
			conservatism = 10
			despotism = 60
			anocracy = 0
		}
		clr_country_flag = WAA_MEMBER
		set_country_flag = FMA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = FMA_Puppet
			remove_ideas = SUS_idea_home_exiled_paigc
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	NGR = {
		add_state_core = 832
		add_state_core = 1219
		add_state_core = 1218
		add_state_core = 831
		add_state_core = 1542
		add_state_core = 835
		add_state_core = 1221
		add_state_core = 1220
		add_state_core = 1226
		transfer_state = 832
		transfer_state = 1219
		transfer_state = 1218
		transfer_state = 831
		transfer_state = 1542
		transfer_state = 835
		transfer_state = 1221
		transfer_state = 1220
		transfer_state = 1226

		TNO_startup_nation = yes

		FFR = {
			puppet = NGR
			add_to_faction = NGR
		}
		set_cosmetic_tag = NGR_FFRPuppet
		set_politics = { ruling_party = despotism }
		set_popularities = {
			socialist = 10
			progressivism = 0
			liberalism = 0
			conservatism = 10
			anocracy = 20
			despotism = 60
		}

		clr_country_flag = PALF_MEMBER
		set_country_flag = FMA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = FMA_Puppet
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	WOL = {
		remove_state_claim = 1604
		if = {
			limit = { exists = no }
			transfer_state = 830
			transfer_state = 272
			transfer_state = 1223
			TNO_startup_nation = yes
		}

		add_state_core = 701
		add_state_core = 829
		transfer_state = 701
		transfer_state = 829

		remove_ideas = {
			WOL_idea_wolofian_stiffness
			WOL_idea_haven_africa
		}
		FFR = {
			puppet = WOL
			add_to_faction = WOL
		}
		set_cosmetic_tag = WOL_FFRPuppet
		kill_country_leader = yes
		promote_character = WOL_Cheikh_Tidiane_Sy
		set_politics = { ruling_party = progressivism }
		set_popularities = {
			socialist = 20
			progressivism = 50
			liberalism = 0
			conservatism = 0
			anocracy = 20
			despotism = 10
		}
		clr_country_flag = WAA_MEMBER
		set_country_flag = FMA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = FMA_Puppet
		}
		annex_country = {
			target = JOL
			transfer_troops = no
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.9
		}
	}

	USA = {
		country_event = {
			id = west_african_crisis.216
			days = 2
		}
		if = {
			limit = { date > 1968.06.02 }
			country_event = {
				id = free_france_reconstruction.3
				days = 30
			}
		}
	}

	every_country = {
		limit = { is_west_african_nation = yes }
		remove_ideas = WEST_AFRICA_idea_obliterated_infrastructures
	}

	USA = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 5 }
		set_temp_variable = { Victory_Points = 200 }
		Cold_War_GUI_ManipulateVictory = yes
	}
	JAP = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 1 }
		set_temp_variable = { Victory_Points = -200 }
		Cold_War_GUI_ManipulateVictory = yes
	}

	WAC_clear_war_spirits = yes
	}

	clear_array = global.WAC_contender
}

WAC_2_WAA_VICTORY = {
	log = "[GetDateText]: FROM: [From.GetName] ROOT: [Root.GetName] effect WAC_2_WAA_VICTORY"
	if = {
		limit = { USA = { has_active_mission = USA_WAC_cameroon_capitulates } }
		USA = { remove_mission = USA_WAC_cameroon_capitulates }
	}
	TNO_WAC_clear_decision_categories = yes


	if = {
		limit = {
			NOT = {
				any_country = {
					is_west_african_nation = yes
					has_war_with = GER
				}
			}
		}
	set_global_flag = WAC_SCENARIO_2_WAA_VICTORY

	if = {
		limit = { NOT = { country_exists = YOR } }
		YOR = {
			transfer_state = 1188
			transfer_state = 825
			set_capital = {
				state = 825
				remember_old_capital = no
			}
			TNO_startup_nation = yes
		}
	}
	GBE = { leave_faction = yes }

	KAY = {
		remove_state_core = 836
		remove_state_core = 1227
		remove_state_core = 1231
		remove_state_core = 1225
		remove_state_core = 837
		remove_state_core = 1230
		remove_state_core = 1540
		remove_state_core = 1604
	}

	MLI = {
		add_state_core = 1604
		add_state_core = 836
		add_state_core = 1227
		add_state_core = 1231
		transfer_state = 836
		transfer_state = 1227
		transfer_state = 1231
	}

	SUS = { remove_state_claim = 1604 }

	BKF = {
		if = {
			limit = { exists = no }
			transfer_state = 834
			transfer_state = 1217
			transfer_state = 1541
			TNO_startup_nation = yes
		}

		remove_ideas = {
			BKF_idea_remnant_francophilia
			BKF_idea_relative_democracy
		}
		promote_character = BKF_Daniel_Ouezzin_Coulibaly
		set_politics = { ruling_party = conservatism }
		set_popularities = {
			liberalism = 30
			conservatism = 50
			anocracy = 20
		}
		WOL = { add_to_faction = BKF }
		set_country_flag = WAA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = WAA_Protectorate
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	IVO = {
		add_state_core = 779
		add_state_core = 1210
		add_state_core = 780
		add_state_core = 1209
		add_state_core = 1208
		transfer_state = 779
		transfer_state = 1210
		transfer_state = 780
		transfer_state = 1209
		transfer_state = 1208
		TNO_startup_nation = yes

		set_politics = { ruling_party = anocracy }
		set_popularities = {
			socialist = 10
			conservatism = 20
			anocracy = 50
			fascism = 20
		}

		WOL = { add_to_faction = IVO }
		set_country_flag = WAA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = WAA_Protectorate
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	NGR = {
		add_state_core = 832
		add_state_core = 1219
		add_state_core = 1218
		add_state_core = 831
		add_state_core = 1542
		add_state_core = 835
		add_state_core = 1221
		add_state_core = 1220
		add_state_core = 1226
		transfer_state = 832
		transfer_state = 1219
		transfer_state = 1218
		transfer_state = 831
		transfer_state = 1542
		transfer_state = 835
		transfer_state = 1221
		transfer_state = 1220
		transfer_state = 1226

		TNO_startup_nation = yes

		set_politics = { ruling_party = despotism }
		set_popularities = {
			socialist = 30
			despotism = 46
			liberalism = 24
		}

		WOL = { add_to_faction = NGR }
		set_country_flag = WAA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = WAA_Protectorate
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	FFR = {
		remove_state_core = 779
		remove_state_core = 1210
		remove_state_core = 780
		remove_state_core = 1209
		remove_state_core = 1208
		remove_state_core = 834
		remove_state_core = 1217
		remove_state_core = 1541

		set_politics = {
			ruling_party = anocracy
			last_election = "1932.5.1"
			election_frequency = 48
			elections_allowed = no
		}

		set_popularities = {
			communist = 0
			socialist = 3
			progressivism = 24
			liberalism = 31
			liberal_conservatism = 0
			conservatism = 17
			anocracy = 23
			despotism = 2
			ultranationalism = 0
			fascism = 0
			national_socialism = 0
		}

		if = {
			limit = { FFR = { exists = no } }
			transfer_state = 713
			transfer_state = 635
			transfer_state = 734
			transfer_state = 641
			TNO_startup_nation = yes
		}

		dismantle_faction = yes

		# KERGUELEN EVENT CHAIN

		end_puppet = GBE

		if = {
			limit = { has_idea = FFR_military_administration }
			remove_ideas = FFR_military_administration
		}
		else_if = {
			limit = { has_idea = FFR_military_administration_2 }
			remove_ideas = FFR_military_administration_2
		}
		else = {
			remove_ideas = FFR_military_administration_3
		}
		remove_ideas = {
			FFR_precious_metal
			FFR_spirit_french
		}
		set_capital = { state = 635 }
		if = {
			limit = { has_country_leader = { character = FFR_Philippe_Leclerc ruling_only = yes } }
			set_country_leader_description = {
				desc = "POLITICS_PHILIPPE_LECLERC_2"
			}
		}
		every_country = {
			limit = {
				has_war_with = FFR
			}
			white_peace = FFR
		}
	}

	GBE = {
		if = {
			limit = { exists = no }
			transfer_state = 883
			transfer_state = 882
			transfer_state = 941
			TNO_startup_nation = yes
		}
		set_cosmetic_tag = GBE_WOLPuppet
		promote_character = GBE_Christophe_Soglo
		set_politics = { ruling_party = anocracy }
		set_popularities = {
			socialist = 10
			conservatism = 40
			anocracy = 50
		}
		clr_country_flag = FMA_MEMBER
		set_country_flag = WAA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = WAA_Protectorate
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	WOL = {
		transfer_state = 1604
		# Post-WAC
		add_to_faction = GBE
		country_event = { # Federation
			id = west_african_crisis.106
			days = 60
			random_days = 20
		}
		if = {
			limit = { country_exists = ZAR }
			country_event = { # invasion of zarmaland
				id = west_african_crisis.109
				days = 90
			}
		}
	}

	if = {
		limit = { country_exists = YOR }
		YOR = {
			leave_faction = yes
			clr_country_flag = FMA_MEMBER
			hidden_effect = {
				remove_faction_status = yes
			}
		}
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.8
		}
	}

	USA = {
		country_event = {
			id = west_african_crisis.217
			days = 2
		}
	}
	every_country = {
		limit = { is_west_african_nation = yes }
		remove_ideas = WEST_AFRICA_idea_obliterated_infrastructures
	}

	remove_ideas = {
		CAO_idea_pan_african_vanguard
		CAO_ACA
		CAO_ACA_2
		CAO_ACA_3
	}

	USA = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 2 }
		set_temp_variable = { Victory_Points = -200 }
		Cold_War_GUI_ManipulateVictory = yes
	}
	JAP = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 2 }
		set_temp_variable = { Victory_Points = -200 }
		Cold_War_GUI_ManipulateVictory = yes
	}

	WAC_clear_war_spirits = yes
	}

	clear_array = global.WAC_contender
}

WAC_2_PALF_VICTORY = {
	log = "[GetDateText]: FROM: [From.GetName] ROOT: [Root.GetName] effect WAC_2_PALF_VICTORY"
	if = {
		limit = { USA = { has_active_mission = USA_WAC_cameroon_capitulates } }
		USA = { remove_mission = USA_WAC_cameroon_capitulates }
	}
	TNO_WAC_clear_decision_categories = yes


	if = {
		limit = {
			NOT = {
				any_country = {
					is_west_african_nation = yes
					has_war_with = GER
				}
			}
		}
	if = {
		limit = {
			has_global_flag = TNO_HAI_civil_war_communist_victory
			NOT = { HAI = { has_country_flag = HAI_amazonism_entrenched } }
		}
		HAI = {
			HAI_Jacques_Stephen_Alexis = {
				add_country_leader_role = {
					country_leader = {
						desc = "POLITICS_HAI_JACQUES_STEPHEN_DESC"
						expire = "1990.1.1"
						ideology = socialist_panafricanism_subtype
						traits = {}
					}
					promote_leader = yes
				}
			}
			set_politics = { ruling_party = socialist }
			set_popularities = {
				despotism = 6
				communist = 23
				socialist = 32
				liberalism = 11
				liberal_conservatism = 8
				anocracy = 20
			}
			set_country_flag = HAI_panafricanism_entrenched
		}
	}
	set_global_flag = WAC_SCENARIO_2_PALF_VICTORY

	if = { # Invasion of Sokoto
		limit = {
			NOT = {
				OR = {
					SWB = { owns_state = 835 }
					SWB = { owns_state = 1221 }
					SWB = { owns_state = 1220 }
				}
			}
		}
		SWB = {
			country_event = { # invasion of sokoto
				id = west_african_crisis.110
				days = 131
			}
		}
	}
	if = { # Invasion of Zarmaland
		limit = {
			NOT = { SWB = { owns_state = 1226 } }
		}
		SWB = {
			country_event = { # invasion of zarmaland
				id = west_african_crisis.109
				days = 81
			}
		}
	}

	CAO = { # Post-WAC
		set_cosmetic_tag = CAO_win
		country_event = { # Peace
			id = west_african_crisis.104
			days = 60
			random_days = 20
		}
		if = {
			limit = { has_idea = CAO_ACA }
			swap_ideas = {
				remove_idea = CAO_ACA
				add_idea = CAO_ACA_3
			}
		}
		if = {
			limit = { has_idea = CAO_ACA_2 }
			swap_ideas = {
				remove_idea = CAO_ACA_2
				add_idea = CAO_ACA_3
			}
		}
		add_state_core = 1188
		add_state_core = 825
		transfer_state = 1188
		transfer_state = 825
		remove_ideas = CAO_idea_tense_borders
	}

	BKF = {
		if = {
			limit = { exists = no }
			transfer_state = 834
			transfer_state = 1217
			transfer_state = 1541
			TNO_startup_nation = yes
		}

		remove_ideas = {
			BKF_idea_remnant_francophilia
			BKF_idea_relative_democracy
		}
		set_cosmetic_tag = BKF_CAOPuppet
		CAO = {
			add_to_faction = BKF
			puppet = BKF
		}
		promote_character = BKF_Joseph_Ki_Zerbo
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 40
			conservatism = 20
			anocracy = 20
			despotism = 20
		}
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}

	IVO = {
		add_state_core = 779
		add_state_core = 1210
		add_state_core = 780
		add_state_core = 1209
		add_state_core = 1208
		transfer_state = 779
		transfer_state = 1210
		transfer_state = 780
		transfer_state = 1209
		transfer_state = 1208
		TNO_startup_nation = yes

		CAO = {
			add_to_faction = IVO
			puppet = IVO
		}
		set_cosmetic_tag = IVO_CAOPuppet

		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 60
			conservatism = 10
			anocracy = 10
			despotism = 10
			fascism = 10
		}

		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}

	WOL = {
		remove_state_claim = 1604
		if = {
			limit = { exists = no }
			transfer_state = 830
			transfer_state = 272
			transfer_state = 1223
			TNO_startup_nation = yes
		}

		add_state_core = 701
		add_state_core = 829
		transfer_state = 701
		transfer_state = 829

		remove_ideas = {
			WOL_idea_wolofian_stiffness
			WOL_idea_haven_africa
		}
		CAO = { puppet = WOL }
		promote_character = WOL_Cheikh_Anta_Diop
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 50
			progressivism = 0
			liberalism = 0
			conservatism = 30
			anocracy = 0
			despotism = 20
		}
		CAO = { add_to_faction = WOL }
		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		set_cosmetic_tag = WOL_CAOPuppet
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
		annex_country = {
			target = JOL
			transfer_troops = no
		}
	}

	MLI = {
		if = {
			limit = { exists = no }
			transfer_state = 1225
			transfer_state = 837
			transfer_state = 1230
			transfer_state = 1540

			TNO_startup_nation = yes
		}
		add_state_core = 836
		add_state_core = 1227
		add_state_core = 1231
		add_state_core = 1604
		add_state_core = 1216
		transfer_state = 1604
		transfer_state = 1216
		transfer_state = 836
		transfer_state = 1227
		transfer_state = 1231

		KAY = {
			remove_state_core = 836
			remove_state_core = 1227
			remove_state_core = 1231
			remove_state_core = 1225
			remove_state_core = 837
			remove_state_core = 1230
			remove_state_core = 1540
			remove_state_core = 1604
		}

		remove_ideas = {
			MLI_idea_keitas_leadership
			MLI_idea_traore_problem
		}
		CAO = {
			add_to_faction = MLI
			puppet = MLI
		}
		add_country_leader_role = {
			character = MLI_Aoua_Keita
			promote_leader = yes
			country_leader = {
				expire = "1999.1.1"
				ideology = socialist_panafricanism_subtype
				traits = { }
				id = -1
			}
		}
		promote_character = MLI_Aoua_Keita
		set_cosmetic_tag = MLI_CAOPuppet
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 50
			progressivism = 0
			liberalism = 0
			conservatism = 30
			anocracy = 0
			despotism = 20
		}

		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
		KAY = {
			remove_state_core = 836
			remove_state_core = 1227
			remove_state_core = 1231
		}
	}

	SUS = {
		remove_state_claim = 1604
		if = {
			limit = { exists = no }
			transfer_state = 828
			transfer_state = 556
			transfer_state = 1224
			transfer_state = 838
			TNO_startup_nation = yes
		}

		if = {
			limit = { NOT = { owns_state = 828 } }
			transfer_state = 828
		}
		if = {
			limit = { NOT = { owns_state = 556 } }
			transfer_state = 556
		}
		if = {
			limit = { NOT = { owns_state = 1224 } }
			transfer_state = 1224
		}
		if = {
			limit = { NOT = { owns_state = 838 } }
			transfer_state = 838
		}




		remove_ideas = SUS_idea_guinean_democracy
		CAO = { puppet = SUS }
		promote_character = SUS_Koumandian_Keita
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 46
			progressivism = 4
			liberalism = 0
			conservatism = 20
			anocracy = 30
			despotism = 0
		}

		set_cosmetic_tag = SUS_CAO
		CAO = { add_to_faction = SUS } # sussus amogus
		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}

	EWE = {
		if = {
			limit = { exists = no }
			transfer_state = 827
			transfer_state = 274
			transfer_state = 833
			TNO_startup_nation = yes
		}
		CAO = { puppet = EWE }
		EWE_Ebenezer_Ako_Adjei = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					#desc = "POLITICS_HAI_JACQUES_STEPHEN_DESC"
					expire = "1990.1.1"
					ideology = socialist_panafricanism_subtype
					traits = {}
				}
			}
			promote_character = EWE_Ebenezer_Ako_Adjei
		}
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 55
			progressivism = 0
			liberalism = 0
			conservatism = 15
			anocracy = 20
			despotism = 10
		}

		CAO = { add_to_faction = EWE }
		clr_country_flag = WAA_MEMBER
		set_country_flag = PALF_MEMBER
		set_cosmetic_tag = EWE_CAOPuppet
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}

	GBE = {
		if = {
			limit = { exists = no }
			transfer_state = 941
			transfer_state = 882
			transfer_state = 883
			TNO_startup_nation = yes
		}
		drop_cosmetic_tag = yes
		CAO = {
			add_to_faction = GBE
			puppet = GBE
		}

		set_politics = {
			ruling_party = socialist
			last_election = "1966.6.23"
			election_frequency = 48
			elections_allowed = no
		}
		set_popularities = {
			communist = 20
			ultranationalism = 0
			socialist = 45
			progressivism = 25
			liberalism = 0
			conservatism = 5
			anocracy = 5
			despotism = 0
			fascism = 0
		}
		set_cosmetic_tag = GBE_CAOPuppet
		clr_country_flag = FMA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}

	SWB = { set_cosmetic_tag = SWB_unified }

	FFR = {
		remove_state_core = 779
		remove_state_core = 1210
		remove_state_core = 780
		remove_state_core = 1209
		remove_state_core = 1208
		remove_state_core = 834
		remove_state_core = 1217
		remove_state_core = 1541

		set_politics = {
			ruling_party = anocracy
			last_election = "1932.5.1"
			election_frequency = 48
			elections_allowed = no
		}

		set_popularities = {
			communist = 0
			socialist = 3
			progressivism = 24
			liberalism = 31
			liberal_conservatism = 0
			conservatism = 17
			anocracy = 23
			despotism = 2
			ultranationalism = 0
			fascism = 0
			national_socialism = 0
		}

		if = {
			limit = { FFR = { exists = no } }
			transfer_state = 713
			transfer_state = 635
			transfer_state = 734
			transfer_state = 641
			TNO_startup_nation = yes
		}

		dismantle_faction = yes

		# KERGUELEN EVENT CHAIN

		if = {
			limit = { has_idea = FFR_military_administration }
			remove_ideas = FFR_military_administration
		}
		else_if = {
			limit = { has_idea = FFR_military_administration_2 }
			remove_ideas = FFR_military_administration_2
		}
		else = {
			remove_ideas = FFR_military_administration_3
		}
		remove_ideas = {
			FFR_precious_metal
			FFR_spirit_french
		}
		set_capital = { state = 635 }
		if = {
			limit = { has_country_leader = { character = FFR_Philippe_Leclerc ruling_only = yes } }
			set_country_leader_description = {
				desc = "POLITICS_PHILIPPE_LECLERC_2"
			}
		}
		every_country = {
			limit = {
				has_war_with = FFR
			}
			white_peace = FFR
		}
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.10
		}
	}

	USA = {
		country_event = {
			id = west_african_crisis.217
			days = 2
		}
	}
	JAP = {
		country_event = {
			id = west_african_crisis.218
			days = 2
		}
	}
	every_country = {
		limit = { is_west_african_nation = yes }
		remove_ideas = WEST_AFRICA_idea_obliterated_infrastructures
	}

	USA = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 1 }
		set_temp_variable = { Victory_Points = -200 }
		Cold_War_GUI_ManipulateVictory = yes
	}
	JAP = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 5 }
		set_temp_variable = { Victory_Points = 200 }
		Cold_War_GUI_ManipulateVictory = yes
	}

	WAC_clear_war_spirits = yes
	}

	clear_array = global.WAC_contender
}

WAC_3_FMA_VICTORY = {
	log = "[GetDateText]: FROM: [From.GetName] ROOT: [Root.GetName] effect WAC_3_FMA_VICTORY"
	if = {
		limit = { USA = { has_active_mission = USA_WAC_cameroon_capitulates } }
		USA = { remove_mission = USA_WAC_cameroon_capitulates }
	}
	TNO_WAC_clear_decision_categories = yes

	if = {
		limit = {
			NOT = {
				any_country = {
					is_west_african_nation = yes
					has_war_with = GER
				}
			}
		}
	set_global_flag = WAC_SCENARIO_3_FMA_VICTORY

	every_state = {
		limit = { has_state_flag = WAC_solid_frontline_flag }
		remove_dynamic_modifier = {
			modifier = solid_frontline
		}
		clr_state_flag = WAC_solid_frontline_flag
	}
	if = {
		limit = { NOT = { country_exists = YOR } }
		YOR = {
			add_state_core = 1188
			add_state_core = 825
			transfer_state = 1188
			transfer_state = 825
			set_capital = {
				state = 825
				remember_old_capital = no
			}
			TNO_startup_nation = yes
		}
	}
	MLI = {
		remove_state_core = 1225
		remove_state_core = 837
		remove_state_core = 1230
		remove_state_core = 1540
		remove_state_core = 836
		remove_state_core = 1227
		remove_state_core = 1231
		remove_state_core = 1604
	}
	KAY = {
		if = {
			limit = { exists = no }
			add_state_core = 1540
			transfer_state = 1540
			TNO_startup_nation = yes
		}
		add_state_core = 1540
		add_state_core = 1604
		add_state_core = 1225
		add_state_core = 837
		add_state_core = 1230
		add_state_core = 836
		add_state_core = 1227
		add_state_core = 1231
		transfer_state = 1225
		transfer_state = 837
		transfer_state = 1230
		transfer_state = 1540
		transfer_state = 1604
		transfer_state = 836
		transfer_state = 1227
		transfer_state = 1231
		set_cosmetic_tag = KAY_unified
		set_capital = { state = 1540 }
		FFR = { add_to_faction = KAY }
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = FMA_Faction
		}
	}

	FFR = { # Post-WAC
		add_popularity = {
			ideology = anocracy
			popularity = 0.1
		}

		if = {
			limit = { country_exists = ZAR }
			country_event = { # invasion of zarmaland
				id = west_african_crisis.109
				days = 81
			}
		}

		if = {
			limit = { has_idea = FFR_military_administration }
			swap_ideas = {
				remove_idea = FFR_military_administration
				add_idea = FFR_military_administration_3
			}
		}
		else_if = {
			limit = { has_idea = FFR_military_administration_2 }
			swap_ideas = {
				remove_idea = FFR_military_administration_2
				add_idea = FFR_military_administration_3
			}
		}
		if = {
			limit = { has_country_leader = { character = FFR_Philippe_Leclerc ruling_only = yes } }
			set_country_leader_description = {
				desc = "POLITICS_PHILIPPE_LECLERC_1"
			}
		}
	}

	EWE = {
		if = {
			limit = { exists = no }
			transfer_state = 827
			transfer_state = 274
			TNO_startup_nation = yes
		}
		transfer_state = 833
		EWE_Nicolas_Grunitzky = {
			promote_character = { ideology = anocracy_controlled_democracy_subtype }
		}
	}

	GBE = {
		if = {
			limit = { exists = no }
			transfer_state = 941
			transfer_state = 882
			transfer_state = 883
			TNO_startup_nation = yes
		}
		drop_cosmetic_tag = yes
		FFR = { puppet = GBE }
		set_cosmetic_tag = GBE_FFRPuppet
		promote_character = GBE_Christophe_Soglo
		set_politics = { ruling_party = anocracy }
		set_popularities = {
			socialist = 30
			progressivism = 0
			liberalism = 0
			conservatism = 10
			anocracy = 40
			despotism = 20
		}

		FFR = { add_to_faction = GBE }
		clr_country_flag = PALF_MEMBER
		set_country_flag = FMA_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = FMA_Puppet
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
	}

	if = {
		limit = { country_exists = YOR }
		YOR = {
			leave_faction = yes
			clr_country_flag = FMA_MEMBER
			hidden_effect = {
				remove_faction_status = yes
			}
		}
	}

	SUS = { remove_state_claim = 1604 }
	WOL = { remove_state_claim = 1604 }

	CAO = {
		if = {
			limit = { exists = no }
			transfer_state = 793
			transfer_state = 1187
			transfer_state = 826
			transfer_state = 1197
			transfer_state = 1189
			transfer_state = 558
			transfer_state = 1198
			transfer_state = 1196
			transfer_state = 1199
			transfer_state = 1200
			transfer_state = 1206
			transfer_state = 1201
			transfer_state = 1202
			transfer_state = 1207
			transfer_state = 1205
			transfer_state = 1204
			transfer_state = 1203
			TNO_startup_nation = yes
		}

		dismantle_faction = yes

		country_event = {
			id = CAO.100
			days = 90
		}

		clr_country_flag = PALF_MEMBER
		remove_faction_status = yes

		every_owned_state = { set_state_controller_to = CAO }

		remove_ideas = {
			CAO_idea_pan_african_vanguard
			CAO_ACA
			CAO_ACA_2
			CAO_ACA_3
		}
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.11
		}
	}

	USA = {
		country_event = {
			id = west_african_crisis.220
			days = 2
		}
		if = {
			limit = { date > 1968.06.02 }
			country_event = {
				id = free_france_reconstruction.3
				days = 30
			}
		}
	}
	JAP = {
		country_event = {
			id = west_african_crisis.223
			days = 2
		}
	}
	every_country = {
		limit = { is_west_african_nation = yes }
		remove_ideas = WEST_AFRICA_idea_obliterated_infrastructures
	}
	USA = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 5 }
		set_temp_variable = { Victory_Points = 200 }
		Cold_War_GUI_ManipulateVictory = yes
	}
	JAP = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 1 }
		set_temp_variable = { Victory_Points = -200 }
		Cold_War_GUI_ManipulateVictory = yes
	}

	WAC_clear_war_spirits = yes
	}

	clear_array = global.WAC_contender
}

WAC_3_PALF_VICTORY = {
	log = "[GetDateText]: FROM: [From.GetName] ROOT: [Root.GetName] effect WAC_3_PALF_VICTORY"
	if = {
		limit = { USA = { has_active_mission = USA_WAC_cameroon_capitulates } }
		USA = { remove_mission = USA_WAC_cameroon_capitulates }
	}
	TNO_WAC_clear_decision_categories = yes

	if = {
		limit = {
			NOT = {
				any_country = {
					is_west_african_nation = yes
					has_war_with = GER
				}
			}
		}
	if = {
		limit = {
			has_global_flag = TNO_HAI_civil_war_communist_victory
			NOT = { HAI = { has_country_flag = HAI_amazonism_entrenched } }
		}
		HAI = {
			HAI_Jacques_Stephen_Alexis = {
				add_country_leader_role = {
					country_leader = {
						desc = "POLITICS_HAI_JACQUES_STEPHEN_DESC"
						expire = "1990.1.1"
						ideology = socialist_panafricanism_subtype
						traits = {}
					}
					promote_leader = yes
				}
			}
			set_politics = { ruling_party = socialist }
			set_popularities = {
				despotism = 6
				communist = 23
				socialist = 32
				liberalism = 11
				liberal_conservatism = 8
				anocracy = 20
			}
			set_country_flag = HAI_panafricanism_entrenched
		}
	}
	set_global_flag = WAC_SCENARIO_3_PALF_VICTORY

	every_state = {
		limit = { has_state_flag = WAC_solid_frontline_flag }
		remove_dynamic_modifier = {
			modifier = solid_frontline
		}
		clr_state_flag = WAC_solid_frontline_flag
	}
	KAY = {
		remove_state_core = 836
		remove_state_core = 1227
		remove_state_core = 1231
		remove_state_core = 1225
		remove_state_core = 837
		remove_state_core = 1230
		remove_state_core = 1540
		remove_state_core = 1604
	}
	MLI = {
		if = {
			limit = { exists = no }
			transfer_state = 1225
			transfer_state = 837
			transfer_state = 1230
			transfer_state = 1540

			TNO_startup_nation = yes
		}

		add_state_core = 836
		add_state_core = 1227
		add_state_core = 1231
		add_state_core = 1604
		add_state_core = 1216
		transfer_state = 1604
		transfer_state = 1216
		transfer_state = 836
		transfer_state = 1227
		transfer_state = 1231
		remove_ideas = {
			MLI_idea_keitas_leadership
			MLI_idea_traore_problem
		}
	}

	CAO = { # Post-WAC
		set_cosmetic_tag = CAO_win
		if = {
			limit = { NOT = { country_exists = YOR } }
			add_state_core = 1188
			add_state_core = 825
			transfer_state = 1188
			transfer_state = 825
		}
		country_event = { # Peace
			id = west_african_crisis.104
			days = 60
			random_days = 20
		}
		country_event = { # invasion of zarmaland
			id = west_african_crisis.109
			days = 81
		}
		if = {
			limit = { has_idea = CAO_ACA }
			swap_ideas = {
				remove_idea = CAO_ACA
				add_idea = CAO_ACA_3
			}
		}
		if = {
			limit = { has_idea = CAO_ACA_2 }
			swap_ideas = {
				remove_idea = CAO_ACA_2
				add_idea = CAO_ACA_3
			}
		}
		remove_ideas = CAO_idea_tense_borders
	}

	BKF = {
		add_state_core = 834
		add_state_core = 1217
		add_state_core = 1541
		transfer_state = 834
		transfer_state = 1217
		transfer_state = 1541
		TNO_startup_nation = yes

		remove_ideas = {
			BKF_idea_remnant_francophilia
			BKF_idea_relative_democracy
		}
		set_cosmetic_tag = BKF_CAOPuppet
		CAO = {
			add_to_faction = BKF
			puppet = BKF
		}
		promote_character = BKF_Joseph_Ki_Zerbo
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 40
			conservatism = 20
			anocracy = 20
			despotism = 20
		}

		clr_country_flag = FMA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}

	IVO = {
		add_state_core = 779
		add_state_core = 1210
		add_state_core = 780
		add_state_core = 1209
		add_state_core = 1208
		transfer_state = 779
		transfer_state = 1210
		transfer_state = 780
		transfer_state = 1209
		transfer_state = 1208
		TNO_startup_nation = yes

		CAO = {
			add_to_faction = IVO
			puppet = IVO
		}
		set_cosmetic_tag = IVO_CAOPuppet
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 40
			progressivism = 5
			liberalism = 5
			conservatism = 10
			anocracy = 30
			despotism = 10
		}

		clr_country_flag = FMA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}
	CPP = {
		if = {
			limit = { exists = no }
			add_state_core = 833
			transfer_state = 833

			TNO_startup_nation = yes
		}
		add_state_core = 827
		add_state_core = 274
		transfer_state = 827
		transfer_state = 274
		CPP = { set_cosmetic_tag = CPP_unified }
	}
	SUS = {
		remove_state_claim = 1604
		if = {
			limit = { exists = no }
			transfer_state = 828
			transfer_state = 556
			transfer_state = 838
			transfer_state = 1224

			TNO_startup_nation = yes
		}

		remove_ideas = SUS_idea_guinean_democracy
		CAO = { puppet = SUS }
		promote_character = SUS_Koumandian_Keita
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 40
			progressivism = 10
			anocracy = 30
			despotism = 20
		}

		set_cosmetic_tag = SUS_CAO
		CAO = { add_to_faction = SUS } # among sus
		clr_country_flag = FMA_MEMBER
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
	}
	WOL = {
		remove_state_claim = 1604
		if = {
			limit = { exists = no }
			transfer_state = 830
			transfer_state = 272
			transfer_state = 1223
			TNO_startup_nation = yes
		}

		add_state_core = 701
		add_state_core = 829
		transfer_state = 701
		transfer_state = 829

		remove_ideas = {
			WOL_idea_wolofian_stiffness
			WOL_idea_haven_africa
		}
		CAO = { puppet = WOL }
		promote_character = WOL_Cheikh_Anta_Diop
		set_politics = { ruling_party = socialist }
		set_popularities = {
			socialist = 30
			progressivism = 20
			anocracy = 30
			despotism = 20
		}

		CAO = { add_to_faction = WOL }
		clr_country_flag = FMA_MEMBER
		set_country_flag = PALF_MEMBER
		set_cosmetic_tag = WOL_CAOPuppet
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Satellite
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
		annex_country = {
			target = JOL
			transfer_troops = no
		}
	}

	FFR = {
		remove_state_core = 779
		remove_state_core = 1210
		remove_state_core = 780
		remove_state_core = 1209
		remove_state_core = 1208
		remove_state_core = 834
		remove_state_core = 1217
		remove_state_core = 1541

		set_politics = {
			ruling_party = anocracy
			last_election = "1932.5.1"
			election_frequency = 48
			elections_allowed = no
		}

		set_popularities = {
			communist = 0
			socialist = 3
			progressivism = 24
			liberalism = 31
			liberal_conservatism = 0
			conservatism = 17
			anocracy = 23
			despotism = 2
			ultranationalism = 0
			fascism = 0
			national_socialism = 0
		}

		if = {
			limit = { FFR = { exists = no } }
			transfer_state = 713
			transfer_state = 635
			transfer_state = 734
			transfer_state = 641
			TNO_startup_nation = yes
		}

		dismantle_faction = yes

		# KERGUELEN EVENT CHAIN

		if = {
			limit = { has_idea = FFR_military_administration }
			remove_ideas = FFR_military_administration
		}
		else_if = {
			limit = { has_idea = FFR_military_administration_2 }
			remove_ideas = FFR_military_administration_2
		}
		else = {
			remove_ideas = FFR_military_administration_3
		}
		remove_ideas = {
			FFR_precious_metal
			FFR_spirit_french
		}
		set_capital = { state = 635 }
		if = {
			limit = { has_country_leader = { character = FFR_Philippe_Leclerc ruling_only = yes } }
			set_country_leader_description = {
				desc = "POLITICS_PHILIPPE_LECLERC_2"
			}
		}
		every_country = {
			limit = {
				has_war_with = FFR
			}
			white_peace = FFR
		}
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.12
		}
	}

	USA = {
		country_event = {
			id = west_african_crisis.221
			days = 2
		}
	}
	JAP = {
		country_event = {
			id = west_african_crisis.222
			days = 2
		}
	}
	every_country = {
		limit = { is_west_african_nation = yes }
		remove_ideas = WEST_AFRICA_idea_obliterated_infrastructures
	}

	USA = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 2 }
		set_temp_variable = { Victory_Points = -200 }
		Cold_War_GUI_ManipulateVictory = yes
	}
	JAP = {
		set_temp_variable = { Victory_ID = 16 }
		set_temp_variable = { Victory_Outcome = 4 }
		set_temp_variable = { Victory_Points = 200 }
		Cold_War_GUI_ManipulateVictory = yes
	}

	WAC_clear_war_spirits = yes
	}

	clear_array = global.WAC_contender
}

WAA_create_federation = {
	WOL = {
		set_temp_variable = { gdp_growth_temp = 0.2 }
		econ_gdp_growth_change = yes
		if = {
			limit = {
				NOT = {
					has_global_flag = FFR_joined_USA_econ_sphere
				}
			}
			set_country_flag = HAS_ECON_SPHERE
			set_variable = { ECON_SPHERE_LEADER = WOL }
		}
		if = {
			limit = { is_faction_leader = yes }
			set_faction_name = West_African_Federation
		}
		clr_country_flag = WAA_MEMBER
		set_country_flag = WAF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = WAF_Faction
		}
	}

	every_country = {
		limit = { is_in_faction_with = WOL }
		set_temp_variable = { gdp_growth_temp = 0.2 }
		econ_gdp_growth_change = yes

		swap_ideas = {
			remove_idea = WEST_AFRICA_idea_obliterated_infrastructures
			add_idea = WEST_AFRICA_idea_economic_reconstruction
		}
		clr_country_flag = WAA_MEMBER
		set_country_flag = WAF_MEMBER
		hidden_effect = {
			if = {
				limit = { has_idea = WAA_Faction }
				remove_faction_status = yes
				add_ideas = WAF_Faction
			}
			else_if = {
				limit = { has_idea = WAA_Protectorate }
				remove_faction_status = yes
				add_ideas = WAF_Supervised
			}
		}
		if = {
			limit = {
				NOT = {
					has_global_flag = FFR_joined_USA_econ_sphere
				}
			}
			econ_join_sphere_WOL = yes
			LIB = { country_event = { id = A_SPRING.21 days = 50 } }
			if = {
				limit = {
					NGA = {
						has_country_flag = NGA_convenient_WAF_check
						NOT = {
							check_variable = { ECON_SPHERE_LEADER = WOL }
						}
					}
				}
				NGA = { country_event = { id = A_SPRING.22 days = 50 } }
			}
		}

	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.13
		}
	}
}

FFR_create_community = {
	FFR = {
		set_temp_variable = { gdp_growth_temp = 0.2 }
		econ_gdp_growth_change = yes
		if = {
			limit = {
				NOT = {
					has_global_flag = FFR_joined_USA_econ_sphere
				}
			}
			set_country_flag = HAS_ECON_SPHERE
			set_variable = { ECON_SPHERE_LEADER = FFR }
		}
		set_faction_name = French_Union
		clr_country_flag = FMA_MEMBER
		set_country_flag = FRU_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = FRU_Faction
		}
	}

	every_country = {
		limit = { is_in_faction_with = FFR }
		set_temp_variable = { gdp_growth_temp = 0.2 }
		econ_gdp_growth_change = yes

		swap_ideas = {
			remove_idea = WEST_AFRICA_idea_obliterated_infrastructures
			add_idea = WEST_AFRICA_idea_economic_reconstruction
		}
		clr_country_flag = FMA_MEMBER
		set_country_flag = FRU_MEMBER
		hidden_effect = {
			if = {
				limit = {
					OR = {
						has_idea = FMA_Faction
						original_tag = GBE
					}
				}
				remove_faction_status = yes
				add_ideas = FRU_Faction
			}
			else_if = {
				limit = { has_idea = FMA_Puppet }
				remove_faction_status = yes
				add_ideas = FRU_Associated
			}
		}
		if = {
			limit = {
				NOT = {
					has_global_flag = FFR_joined_USA_econ_sphere
				}
			}
			econ_join_sphere_FFR = yes
		}
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.14
		}
	}
}

CAO_create_community = {
	set_global_flag = PACMEA_created
	CAO = {
		set_temp_variable = { gdp_growth_temp = 0.2 }
		econ_gdp_growth_change = yes

		set_country_flag = HAS_ECON_SPHERE
		set_variable = { ECON_SPHERE_LEADER = CAO }
		hidden_effect = {
			remove_faction_status = yes
			add_ideas = PALF_Faction_peace
		}
	}

	every_country = {
		limit = { is_in_faction_with = CAO }
		set_temp_variable = { gdp_growth_temp = 0.2 }
		econ_gdp_growth_change = yes

		swap_ideas = {
			remove_idea = WEST_AFRICA_idea_obliterated_infrastructures
			add_idea = WEST_AFRICA_idea_economic_reconstruction
		}
		hidden_effect = {
			if = {
				limit = { has_idea = PALF_Faction }
				remove_faction_status = yes
				add_ideas = PALF_Faction_peace
			}
			else_if = {
				limit = { has_idea = PALF_Satellite }
				remove_faction_status = yes
				add_ideas = PALF_Satellite_peace
			}
		}
		econ_join_sphere_CAO = yes
		if = {
			limit = {
				has_global_flag = SOCINTERN_FOUNDED
			}
			TNO_run_socintern_script = yes
		}
	}

	if = {
		limit = {
			country_exists = CPR
			CPR = { #checks if they won and not in PACMEA already
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
					has_war = yes
				}
			}
		}
		CPR = {
			country_event = {
				id = COG_PW.30
				days = 50
			}
		}
	}
	if = {
		limit = {
			country_exists = ANL
			ANL = {
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
					has_war = yes
				}
			}
		}
		ANL = {
			country_event = {
				id = ANG_PW.5
				days = 50
			}
		}
	}
	if = {
		limit = {
			country_exists = BZZ
			BZZ = {
				has_country_leader = {
					character = BZZ_Marien_Ngouabi
					ruling_only = yes
				}
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
				}
			}
		}
		BZZ = {
			country_event = {
				id = A_SPRING.17
				days = 50
			}
		}
	}
	if = {
		limit = {
			country_exists = OVB
			OVB = {
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
					has_war = yes
				}
			}
		}
		OVB = {
			country_event = {
				id = A_SPRING.19
				days = 50
			}
		}
	}

	if = {
		limit = {
			has_global_flag = HIS_HAI_civil_war_finished
			has_global_flag = TNO_HAI_civil_war_communist_victory
			HAI = { has_country_flag = HAI_panafricanism_entrenched }
		}
		HAI = {
			set_temp_variable = { gdp_growth_temp = 0.2 }
			econ_gdp_growth_change = yes
			econ_join_sphere_CAO = yes
		}
	}

	if = {
		limit = {
			MAD = {
				has_country_leader = {
					character = MAD_Charles_Ravoajanahary
					ruling_only = yes
				}
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
				}
			}
		}
		MAD = {
			econ_join_sphere_CAO = yes
		}
	}
	if = {
		limit = {
			country_exists = ZIM
			ZIM = {
				has_country_leader = {
					character = ZIM_Joshua_Nkomo
					ruling_only = yes
				}
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
				}
			}
		}
		ZIM = {
			country_event = {
				id = A_SPRING.24
				days = 50
			}
		}
	}
	if = {
		limit = {
			country_exists = ZAM
			ZAM = {
				has_country_leader = {
					character = ZAM_Kenneth_Kaunda
					ruling_only = yes
				}
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
					has_idea = OFN_Observer
				}
			}
		}
		ZAM = {
			country_event = {
				id = A_SPRING.27
				days = 50
			}
		}
	}
	if = {
		limit = {
			country_exists = TNZ
			TNZ = {
				OR = {
					has_country_leader = {
						character = TNZ_Julius_Nyerere
						ruling_only = yes
					}
					has_country_leader = {
						character = TNZ_Edward_Sokoine
						ruling_only = yes
					}
				}
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
					has_idea = OFN_Observer
				}
			}
		}
		TNZ = {
			country_event = {
				id = A_SPRING.25
				days = 50
			}
		}
	}
	if = {
		limit = {
			country_exists = GAZ
			GAZ = {
				has_country_leader = {
					character = GAZ_Eduardo_Mondlane
					ruling_only = yes
				}
				NOT = {
					check_variable = { ECON_SPHERE_LEADER = CAO }
					has_idea = OFN_Observer
				}
			}
		}
		GAZ = {
			country_event = {
				id = A_SPRING.26
				days = 50
			}
		}
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.15
		}
	}
}
MANO_PALF_VICTORY = {
	set_global_flag = mano_campaign_PALF_victory
	MDI = {
		set_major = no
		transfer_state = 700
		transfer_state = 1212

		remove_ideas = {
			MDI_idea_disloyal_army
			MDI_idea_disorganized_political_spheres
		}
		proxy_war_clear_dynamic_bombing = yes

		CAO = {
			puppet = MDI
			add_to_faction = MDI
		}
		promote_character = MDI_ITA_Wallace_Johnson
		set_politics = {
			ruling_party = socialist
			last_election = "1966.6.23"
			election_frequency = 48
			elections_allowed = no
		}
		set_popularities = {
			communist = 10
			socialist = 40
			liberalism = 5
			anocracy = 20
			despotism = 25
		}
		add_ideas = WEST_AFRICA_idea_economic_reconstruction
		set_country_flag = PALF_MEMBER
		set_cosmetic_tag = MDI_CAOPuppet
		hidden_effect = {
			remove_faction_status = yes
			remove_ideas = LIB_idea_usa_resource
			add_ideas = PALF_Satellite_peace
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes

		econ_join_sphere_CAO = yes

		every_owned_state = {
			remove_dynamic_modifier = {
				modifier = Mano_state_scorched_earth_modifier
			}
		}
	}

	LIB = {
		set_major = no
		transfer_state = 298
		transfer_state = 1211

		remove_ideas = {
			LIB_idea_gridlocked_politics
			LIB_idea_ofn_support
			LIB_idea_widespread_corruption
		}
		proxy_war_clear_dynamic_bombing = yes

		CAO = {
			puppet = LIB
			add_to_faction = LIB
		}
		promote_character = LIB_Hans_Jurgen_Massaquoi
		set_politics = {
			ruling_party = socialist
			last_election = "1966.6.23"
			election_frequency = 48
			elections_allowed = no
		}
		add_ideas = WEST_AFRICA_idea_economic_reconstruction
		set_popularities = {
			communist = 6
			socialist = 30
			conservatism = 20
			anocracy = 44
		}
		set_country_flag = PALF_MEMBER
		hidden_effect = {
			remove_faction_status = yes
			remove_ideas = LIB_idea_usa_resource
			add_ideas = PALF_Satellite_peace
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
		set_cosmetic_tag = LIB_CAOPuppet

		econ_join_sphere_CAO = yes

		every_owned_state = {
			remove_dynamic_modifier = {
				modifier = Mano_state_scorched_earth_modifier
			}
		}
	}

	every_country = { # Victory News Event
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.18
		}
	}

	if = {
		limit = {
			country_exists = GNB
		}
		GNB = {
			CAO = {
				add_to_faction = GNB
			}
			set_country_flag = PALF_MEMBER
			econ_join_sphere_CAO = yes
			add_ideas = PALF_Faction
			add_ideas = WEST_AFRICA_idea_economic_reconstruction
		}
	}

	if = {
		limit = {
			country_exists = GAB
			BZZ = {
				is_in_faction_with = CAO
			}
			CPR = {
				is_in_faction_with = CAO
			}
		}
		CAO = {
			country_event = {
				id = A_SPRING.23
				days = 75
			}
		}
	}

	TNO_Mano_clear_decision_categories = yes

	if = {
		limit = { has_global_flag = mano_campaign_is_proxy }
		USA = {
			set_temp_variable = { Victory_ID = 36 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		JAP = {
			set_temp_variable = { Victory_ID = 36 }
			set_temp_variable = { Victory_Outcome = 4 }
			set_temp_variable = { Victory_Points = 50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		clr_global_flag = mano_campaign_is_proxy
	}
}

MANO_MRP_VICTORY = {
	set_global_flag = mano_campaign_MRP_victory

	every_country = {
		limit = { has_war_with = MDI }
		white_peace = MDI
	}
	every_country = {
		limit = { has_war_with = LIB }
		white_peace = LIB
	}

	every_country = {
		limit = { is_ai = no }
		news_event = {
			id = west_african_crisis_news.19
		}
	}
	every_country = {
		limit = { is_in_faction_with = LIB }
		proxy_war_clear_dynamic_bombing = yes
	}
	LIB = {
		set_major = no
		dismantle_faction = yes
		remove_faction_status = yes
		add_ideas = OFN_Independent_Member
		remove_ideas = LIB_idea_usa_resource

		every_owned_state = {
			remove_dynamic_modifier = {
				modifier = Mano_state_scorched_earth_modifier
			}
		}
	}
	MDI = {
		set_major = no
		remove_faction_status = yes
		add_ideas = OFN_Independent_Member
		econ_join_sphere_USA = yes
		remove_ideas = LIB_idea_usa_resource

		every_owned_state = {
			remove_dynamic_modifier = {
				modifier = Mano_state_scorched_earth_modifier
			}
		}
	}
	USA = {
		if = {
			limit = {
				is_faction_leader = yes
			}
			add_to_faction = LIB
			add_to_array = { OFN_members = LIB }
			add_to_faction = MDI
			add_to_array = { OFN_members = MDI }
		}
	}

	TNO_Mano_clear_decision_categories = yes

	if = {
		limit = { has_global_flag = mano_campaign_is_proxy }
		USA = {
			set_temp_variable = { Victory_ID = 36 }
			set_temp_variable = { Victory_Outcome = 4 }
			set_temp_variable = { Victory_Points = 50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		JAP = {
			set_temp_variable = { Victory_ID = 36 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		clr_global_flag = mano_campaign_is_proxy
	}
}

WAC_escalation_effect = {
	if = { # Intervention
		limit = {
			NOT = { has_global_flag = WAC_escalated_into_intervention USA = { has_active_mission = USA_WAC_secure_gulf_of_guinea } }
			check_variable = { global.WAC_escalation > 14 }
		}
		USA = {
			country_event = {
				id = west_african_crisis.35
			}
		}
		set_global_flag = WAC_escalated_into_intervention
	}
	if = {
		limit = {
			check_variable = { global.WAC_escalation > 19 }
			has_global_flag = WAC_scenario_2
			NOT = { has_global_flag = WAC_fronts_stabilized }
		}
		set_global_flag = WAC_fronts_stabilized
		every_country = {
			limit = {
				is_in_array = { global.west_african_nations = THIS }
				has_war = yes
			}
			swap_ideas = {
				remove_idea = WEST_AFRICA_idea_chaotic_front
				add_idea = WEST_AFRICA_idea_stable_front
			}
		}
	}
	if = {
		limit = {
			check_variable = { global.WAC_escalation > 34 }
			NOT = { has_global_flag = WAC_fronts_changed }
		}
		set_global_flag = WAC_fronts_changed
		every_country = {
			limit = {
				is_in_array = { global.west_african_nations = THIS }
				has_war = yes
				has_idea = WEST_AFRICA_idea_stable_front
			}
			remove_ideas = WEST_AFRICA_idea_stable_front
		}
		every_country = {
			limit = {
				is_in_faction_with = CAO
				NOT = { has_idea = WEST_AFRICA_idea_guerrilla }
			}
			add_ideas = WEST_AFRICA_idea_guerrilla
		}
	}
	if = {
		limit = { check_variable = { global.WAC_escalation > 39 } }
		add_to_variable = { USA_WAC_WAR_Discontent = 2 }
		every_country = {
			limit = {
				is_in_faction_with = CAO
				has_idea = WEST_AFRICA_idea_guerrilla
				NOT = { has_idea = WEST_AFRICA_idea_guerrilla_2 }
			}
			remove_ideas = WEST_AFRICA_idea_guerrilla
			add_ideas = WEST_AFRICA_idea_guerrilla_2
		}
	}
	if = {
		limit = {
			check_variable = { global.WAC_escalation > 49 }
			NOT = { has_global_flag = WAC_escalated_a_lot }
		}
		set_global_flag = WAC_escalated_a_lot
	}
}

WAC_escalate = {
	add_to_variable = { global.WAC_escalation = 1 }
	custom_effect_tooltip = WAC_escalation_tt
	hidden_effect = { WAC_escalation_effect = yes }
}
WAC_escalate_large = {
	add_to_variable = { global.WAC_escalation = 3 }
	custom_effect_tooltip = WAC_escalation_large_tt
	hidden_effect = { WAC_escalation_effect = yes }
}
WAC_deescalate = {
	subtract_from_variable = { global.WAC_escalation = 1 }
	custom_effect_tooltip = WAC_deescalation_tt
}
WAC_deescalate_large = {
	subtract_from_variable = { global.WAC_escalation = 3 }
	custom_effect_tooltip = WAC_deescalation_large_tt
}

WAC_Gulf_finish_campaign = {
	set_temp_variable = { WAC_OFN_gulf_advantage_temp = USA.WAC_OFN_gulf_advantage }
	set_temp_variable = { WAC_Sphere_gulf_advantage_temp = JAP.WAC_Sphere_gulf_advantage }
	if = {
		limit = {
			has_game_rule = {
				rule = GULF_OF_GUINEA
				option = DEFAULT
			}
			check_variable = { WAC_OFN_gulf_advantage_temp > WAC_Sphere_gulf_advantage_temp }
		}
		subtract_from_temp_variable = { WAC_OFN_gulf_advantage_temp = WAC_Sphere_gulf_advantage_temp }
		set_temp_variable = { WAC_gulf_advantage_difference = WAC_OFN_gulf_advantage_temp }
	}
	else_if = {
		limit = {
			has_game_rule = {
				rule = GULF_OF_GUINEA
				option = DEFAULT
			}
			check_variable = { WAC_Sphere_gulf_advantage_temp > WAC_OFN_gulf_advantage_temp }
		}
		subtract_from_temp_variable = { WAC_Sphere_gulf_advantage_temp = WAC_OFN_gulf_advantage_temp }
		set_temp_variable = { WAC_gulf_advantage_difference = WAC_Sphere_gulf_advantage_temp }
	}
	else_if = {
		limit = {
			OR = {
				has_game_rule = {
					rule = GULF_OF_GUINEA
					option = GULF_OF_GUINEA_AMERICA
				}
				has_game_rule = {
					rule = GULF_OF_GUINEA
					option = GULF_OF_GUINEA_JAPAN
				}
			}
			set_temp_variable = { WAC_gulf_advantage_difference = 4 }
		}
	}
	else = { set_temp_variable = { WAC_gulf_advantage_difference = 0 } }

	if = {
		limit = { check_variable = { WAC_gulf_advantage_difference > 3 } }
		if = { # OFN Victory
			limit = {
				OR = {
					AND = {
						has_game_rule = {
							rule = GULF_OF_GUINEA
							option = DEFAULT
						}
						check_variable = { USA.WAC_OFN_gulf_advantage > JAP.WAC_Sphere_gulf_advantage }
					}
					has_game_rule = {
						rule = GULF_OF_GUINEA
						option = GULF_OF_GUINEA_AMERICA
					}
				}
			}
			USA = {
				set_country_flag = USA_WAC_control_over_gulf_of_guinea
				country_event = {
					id = west_african_crisis.37
				}
			}
			JAP = {
				country_event = {
					id = west_african_crisis.40
				}
			}
		}
		else_if = { # Sphere Victory
			limit = {
				OR = {
					AND = {
						has_game_rule = {
							rule = GULF_OF_GUINEA
							option = DEFAULT
						}
						check_variable = { JAP.WAC_Sphere_gulf_advantage > USA.WAC_OFN_gulf_advantage }
					}
					has_game_rule = {
						rule = GULF_OF_GUINEA
						option = GULF_OF_GUINEA_JAPAN
					}
				}
			}
			USA = {
				country_event = {
					id = west_african_crisis.38
				}
			}
			JAP = {
				set_country_flag = WAC_JAP_defended_gulf_of_guinea
				country_event = {
					id = west_african_crisis.39
				}
			}
		}
	}
}

WAC_Gulf_Escalations_Effects = {
	if = { # Gulf of Guinea Incident
		limit = {
			has_active_mission = USA_WAC_secure_gulf_of_guinea
			NOT = { has_global_flag = WAC_gulf_incident_happened }
			check_variable = { global.WAC_gulf_escalation > 14 }
		}
		add_to_variable = { global.WAC_escalation = 5 }
		set_global_flag = WAC_escalated_into_intervention
		set_global_flag = WAC_gulf_incident_happened
		USA = {
			country_event = {
				id = west_african_crisis.32
				days = 14
			}
		}
		every_country = {
			limit = { is_ai = no }
			news_event = {
				id = west_african_crisis_news.20
				days = 16
			}
		}
	}
	set_temp_variable = { WAC_OFN_gulf_advantage_temp = USA.WAC_OFN_gulf_advantage }
	set_temp_variable = { WAC_Sphere_gulf_advantage_temp = JAP.WAC_Sphere_gulf_advantage }
	if = {
		limit = {
			NOT = {
				has_game_rule = {
					rule = GULF_OF_GUINEA
					option = GULF_OF_GUINEA_NO_INCIDENT
				}
			}
			check_variable = { WAC_OFN_gulf_advantage_temp > WAC_Sphere_gulf_advantage_temp }
		}
		subtract_from_temp_variable = { WAC_OFN_gulf_advantage_temp = WAC_Sphere_gulf_advantage_temp }
		set_temp_variable = { WAC_gulf_advantage_difference = WAC_OFN_gulf_advantage_temp }
	}
	else_if = {
		limit = {
			NOT = {
				has_game_rule = {
					rule = GULF_OF_GUINEA
					option = GULF_OF_GUINEA_NO_INCIDENT
				}
			}
			check_variable = { WAC_Sphere_gulf_advantage_temp > WAC_OFN_gulf_advantage_temp }
		}
		subtract_from_temp_variable = { WAC_Sphere_gulf_advantage_temp = WAC_OFN_gulf_advantage_temp }
		set_temp_variable = { WAC_gulf_advantage_difference = WAC_Sphere_gulf_advantage_temp }
	}
	else = { set_temp_variable = { WAC_gulf_advantage_difference = 0 } }

	if = {
		limit = { check_variable = { WAC_gulf_advantage_difference > 9 } }
		if = { # OFN Victory
			limit = {
				OR = {
					AND = {
						has_game_rule = {
							rule = GULF_OF_GUINEA
							option = DEFAULT
						}
						check_variable = { USA.WAC_OFN_gulf_advantage > JAP.WAC_Sphere_gulf_advantage }
					}
					has_game_rule = {
						rule = GULF_OF_GUINEA
						option = GULF_OF_GUINEA_AMERICA
					}
				}
			}
			USA = {
				set_country_flag = USA_WAC_control_over_gulf_of_guinea
				country_event = {
					id = west_african_crisis.37
				}
			}
			JAP = {
				country_event = {
					id = west_african_crisis.40
				}
			}
		}
		else_if = { # Sphere Victory
			limit = {
				OR = {
					AND = {
						has_game_rule = {
							rule = GULF_OF_GUINEA
							option = DEFAULT
						}
						check_variable = { JAP.WAC_Sphere_gulf_advantage > USA.WAC_OFN_gulf_advantage }
					}
					has_game_rule = {
						rule = GULF_OF_GUINEA
						option = GULF_OF_GUINEA_JAPAN
					}
				}
			}
			USA = {
				country_event = {
					id = west_african_crisis.38
				}
			}
			JAP = {
				set_country_flag = WAC_JAP_defended_gulf_of_guinea
				country_event = {
					id = west_african_crisis.39
				}
			}
		}
	}
}

WAC_OFN_increase_gulf_advantage = {
	add_to_variable = { USA.WAC_OFN_gulf_advantage = 1 }
	custom_effect_tooltip = WAC_OFN_increase_gulf_advantage_tt
	add_to_variable = { global.WAC_gulf_escalation = 1 }
	hidden_effect = {
		WAC_Gulf_Escalations_Effects = yes
	}
}
WAC_OFN_increase_gulf_advantage_large = {
	add_to_variable = { USA.WAC_OFN_gulf_advantage = 3 }
	custom_effect_tooltip = WAC_OFN_increase_gulf_advantage_large_tt
	add_to_variable = { global.WAC_gulf_escalation = 1 }
	hidden_effect = {
		WAC_Gulf_Escalations_Effects = yes
	}
}
WAC_OFN_decrease_gulf_advantage = {
	subtract_from_variable = { USA.WAC_OFN_gulf_advantage = 1 }
	custom_effect_tooltip = WAC_OFN_decrease_gulf_advantage_tt
	add_to_variable = { global.WAC_gulf_escalation = 1 }
	hidden_effect = {
		WAC_Gulf_Escalations_Effects = yes
	}
}
WAC_OFN_decrease_gulf_advantage_large = {
	subtract_from_variable = { USA.WAC_OFN_gulf_advantage = 3 }
	custom_effect_tooltip = WAC_OFN_decrease_gulf_advantage_large_tt
	add_to_variable = { global.WAC_gulf_escalation = 1 }
	hidden_effect = {
		WAC_Gulf_Escalations_Effects = yes
	}
}

WAC_Sphere_increase_gulf_advantage = {
	add_to_variable = { JAP.WAC_Sphere_gulf_advantage = 1 }
	custom_effect_tooltip = WAC_Sphere_increase_gulf_advantage_tt
	add_to_variable = { global.WAC_gulf_escalation = 1 }
	hidden_effect = {
		WAC_Gulf_Escalations_Effects = yes
	}
}
WAC_Sphere_increase_gulf_advantage_large = {
	add_to_variable = { JAP.WAC_Sphere_gulf_advantage = 3 }
	custom_effect_tooltip = WAC_Sphere_increase_gulf_advantage_large_tt
	add_to_variable = { global.WAC_gulf_escalation = 1 }
	hidden_effect = {
		WAC_Gulf_Escalations_Effects = yes
	}
}
WAC_Sphere_decrease_gulf_advantage = {
	subtract_from_variable = { JAP.WAC_Sphere_gulf_advantage = 1 }
	custom_effect_tooltip = WAC_Sphere_decrease_gulf_advantage_tt
	add_to_variable = { global.WAC_gulf_escalation = 1 }
	hidden_effect = {
		WAC_Gulf_Escalations_Effects = yes
	}
}
WAC_Sphere_decrease_gulf_advantage_large = {
	subtract_from_variable = { JAP.WAC_Sphere_gulf_advantage = 3 }
	custom_effect_tooltip = WAC_Sphere_decrease_gulf_advantage_large_tt
	add_to_variable = { global.WAC_gulf_escalation = 1 }
	hidden_effect = {
		WAC_Gulf_Escalations_Effects = yes
	}
}

### West Africa Reconstruction ###
WAF_reconstruction_complete = {
	hidden_effect = { country_event = free_france_reconstruction.5 }
	set_global_flag = FFR_reconstruction_successful
	TNO_fopo_remove_wafr_reconstruction_tab = yes
}

WAF_reconstruct_test = {
	set_variable = { WAF_mil_reconstruct_prog = 100 }
	set_variable = { WAF_eco_reconstruct_prog = 100 }
}

WAF_reconstruction_update = {
	set_temp_variable = { temp_eco_reconstruction = WAF_eco_reconstruct_prog }
	set_temp_variable = { temp_mil_reconstruction = WAF_mil_reconstruct_prog }

	set_variable = { WAF_average_reconstruction = temp_eco_reconstruction }
	add_to_variable = { WAF_average_reconstruction = temp_mil_reconstruction }
	divide_variable = { WAF_average_reconstruction = 2 }
}

WAF_increase_reconstruction_eco_low = {
	custom_effect_tooltip = WAF_increase_reconstruction_eco_low_tt
	add_to_variable = { WAF_eco_reconstruct_prog = 7.5 }
	clamp_variable = { var = WAF_eco_reconstruct_prog max = 100 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_increase_reconstruction_eco_med = {
	custom_effect_tooltip = WAF_increase_reconstruction_eco_med_tt
	add_to_variable = { WAF_eco_reconstruct_prog = 15 }
	clamp_variable = { var = WAF_eco_reconstruct_prog max = 100 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_increase_reconstruction_eco_high = {
	custom_effect_tooltip = WAF_increase_reconstruction_eco_high_tt
	add_to_variable = { WAF_eco_reconstruct_prog = 30 }
	clamp_variable = { var = WAF_eco_reconstruct_prog max = 100 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_decrease_reconstruction_eco_low = {
	custom_effect_tooltip = WAF_decrease_reconstruction_eco_low_tt
	subtract_from_variable = { WAF_eco_reconstruct_prog = 7.5 }
	clamp_variable = { var = WAF_eco_reconstruct_prog min = 0 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_decrease_reconstruction_eco_med = {
	custom_effect_tooltip = WAF_decrease_reconstruction_eco_med_tt
	subtract_from_variable = { WAF_eco_reconstruct_prog = 15 }
	clamp_variable = { var = WAF_eco_reconstruct_prog min = 0 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_decrease_reconstruction_eco_high = {
	custom_effect_tooltip = WAF_decrease_reconstruction_eco_high_tt
	subtract_from_variable = { WAF_eco_reconstruct_prog = 30 }
	clamp_variable = { var = WAF_eco_reconstruct_prog min = 0 }

	hidden_effect = { WAF_reconstruction_update = yes }
}

WAF_increase_reconstruction_mil_low = {
	custom_effect_tooltip = WAF_increase_reconstruction_mil_low_tt
	add_to_variable = { WAF_mil_reconstruct_prog = 7.5 }
	clamp_variable = { var = WAF_mil_reconstruct_prog max = 100 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_increase_reconstruction_mil_med = {
	custom_effect_tooltip = WAF_increase_reconstruction_mil_med_tt
	add_to_variable = { WAF_mil_reconstruct_prog = 15 }
	clamp_variable = { var = WAF_mil_reconstruct_prog max = 100 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_increase_reconstruction_mil_high = {
	custom_effect_tooltip = WAF_increase_reconstruction_mil_high_tt
	add_to_variable = { WAF_mil_reconstruct_prog = 30 }
	clamp_variable = { var = WAF_mil_reconstruct_prog max = 100 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_decrease_reconstruction_mil_low = {
	custom_effect_tooltip = WAF_decrease_reconstruction_mil_low_tt
	subtract_from_variable = { WAF_mil_reconstruct_prog = 7.5 }
	clamp_variable = { var = WAF_mil_reconstruct_prog min = 0 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_decrease_reconstruction_mil_med = {
	custom_effect_tooltip = WAF_decrease_reconstruction_mil_med_tt
	subtract_from_variable = { WAF_mil_reconstruct_prog = 15 }
	clamp_variable = { var = WAF_mil_reconstruct_prog min = 0 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
WAF_decrease_reconstruction_mil_high = {
	custom_effect_tooltip = WAF_decrease_reconstruction_mil_high_tt
	subtract_from_variable = { WAF_mil_reconstruct_prog = 30 }
	clamp_variable = { var = WAF_mil_reconstruct_prog min = 0 }

	hidden_effect = { WAF_reconstruction_update = yes }
}
USA_WAFR_urban_developer = {
	random_state = {
		limit = {
			if = {
				limit = {
					check_variable = { USA.USA_WAFR_urban_development_state = 0 }
				}
				state = 779 #Abidjan
			}
			else_if = {
				limit = {
					check_variable = { USA.USA_WAFR_urban_development_state = 1 }
				}
				state = 1210 #San-Pédro
			}
			else_if = {
				limit = {
					check_variable = { USA.USA_WAFR_urban_development_state = 2 }
				}
				state = 830 #Dakar
			}
			else_if = {
				limit = {
					check_variable = { USA.USA_WAFR_urban_development_state = 3 }
				}
				state = 827 #Nkran
			}
			else_if = {
				limit = {
					check_variable = { USA.USA_WAFR_urban_development_state = 4 }
				}
				state = 828 #Konaakiri
			}
		}
		set_temp_variable = { state_value_multiplier_temp = 1.025 }
		econ_state_value_change_multiply = yes
	}
}
USA_WAFR_naval_base_builder = {
	random_state = {
		limit = {
			if = {
				limit = {
					check_variable = { USA.USA_WAFR_naval_base_state = 0 }
				}
				state = 779 #Abidjan
			}
			else_if = {
				limit = {
					check_variable = { USA.USA_WAFR_naval_base_state = 1 }
				}
				state = 830 #Dakar
			}
			else_if = {
				limit = {
					check_variable = { USA.USA_WAFR_naval_base_state = 2 }
				}
				state = 828 #Konaakiri
			}
			else_if = {
				limit = {
					check_variable = { USA.USA_WAFR_naval_base_state = 3 }
				}
				state = 827 #Nkran
			}
			else_if = {
				limit = {
					check_variable = { USA.USA_WAFR_naval_base_state = 4 }
				}
				state = 883 #Mono
			}
		}
		add_building_construction = {
			type = naval_base
			level = 2
			province = {
				all_provinces = yes
				limit_to_naval_base = yes
			}
			instant_build = yes
		}
	}
}

TNO_WAC_Setup_Ruber_Band_Modifier = {
	#setup faction arrays used to calculate how well each faction is doing
	#Should not be called more than once to avoid removing capitulated countries from the arrays
	clear_array = WOL.WAC_faction_members
	clear_array = FFR.WAC_faction_members
	clear_array = CAO.WAC_faction_members
	every_country = {
		limit = {
			has_country_flag = WAA_MEMBER
		}
		add_to_array = { WOL.WAC_faction_members = THIS.id }
	}
	every_country = {
		limit = {
			has_country_flag = FMA_MEMBER
		}
		add_to_array = { FFR.WAC_faction_members = THIS.id }
	}
	every_country = {
		limit = {
			has_country_flag = PALF_MEMBER
		}
		add_to_array = { CAO.WAC_faction_members = THIS.id }
	}

	#this can be changed as needed, maybe based on scenario?
	set_variable = { global.WAC_RUBBER_BAND_FACTOR = 0.2 }
}

TNO_WAC_Weekly_Update_Ruber_Band_Modifiers = {
	#update the variables for the WEST_AFRICA_modifier_rubber_band dynamic modifier
	clear_array = super_scopes
	add_to_array = { super_scopes = WOL }
	add_to_array = { super_scopes = FFR }
	add_to_array = { super_scopes = CAO }

	#caluclate the average surrender progress for all three factions,
	#set the TNO_WAC_rubber_band_modifier variable to a factor times that surrender progress,
	#for every nation in that faction
	for_each_scope_loop = {
		array = super_scopes

		set_temp_variable = { total_surrender_progress = 0 }

		for_each_scope_loop = {
			array = WAC_faction_members

			#if the country does not exist (has capitulated) surrender progress is 1, so this works correctly
			add_to_temp_variable = { PREV.total_surrender_progress = surrender_progress }
		}

		divide_temp_variable = { total_surrender_progress = WAC_faction_members^num }

		#at 100% surrender progress for every nation in the aliance they will get a WAC_RUBBER_BAND_FACTOR bonus
		multiply_temp_variable = { total_surrender_progress = global.WAC_RUBBER_BAND_FACTOR }
		set_variable = { modifier_to_set = total_surrender_progress }

		every_country = {
			limit = {
				is_in_array = {
					PREV.WAC_faction_members = THIS
				}
			}
			set_variable = { TNO_WAC_rubber_band_modifier = PREV.modifier_to_set }
		}
	}
}

JAP_WAC_campaign_boost_morale_effect = {
	subtract_from_variable = { WAC_camapaign_morale = 0.05 }
	custom_effect_tooltip = JAP_WAC_campaign_boost_morale_effect_tt
}

JAP_WAC_campaign_boost_org_effect = {
	subtract_from_variable = { WAC_camapaign_org = 0.05 }
	custom_effect_tooltip = JAP_WAC_campaign_boost_org_effect_tt
}

JAP_WAC_campaign_boost_org_regain_effect = {
	subtract_from_variable = { WAC_camapaign_org_regain = 0.05 }
	custom_effect_tooltip = JAP_WAC_campaign_boost_org_regain_effect_tt
}

JAP_WAC_campaign_boost_stab_effect = {
	subtract_from_variable = { WAC_camapaign_stab = 0.05 }
	custom_effect_tooltip = JAP_WAC_campaign_boost_stab_effect_tt
}

JAP_WAC_campaign_boost_duration_effect = {
	add_to_variable = { WAC_camapaign_duration = 5 }
	custom_effect_tooltip = JAP_WAC_campaign_boost_duration_effect_tt
}

USA_WAC_troop_restraint_initial = {
	set_variable = { USA_WAC_troop_restraint = 50 }

	set_variable = { USA_troop_restraint_army_attack_factor = -0.10 }
	set_variable = { USA_troop_restraint_army_defence_factor = 0.05 }
	set_variable = { USA_troop_restraint_org_loss_when_moving = 0.075 }
	set_variable = { USA_troop_restraint_initiative_factor = -0.05 }
	set_variable = { USA_troop_restraint_combat_width_factor = 0.025 }

	add_dynamic_modifier = { modifier = WEST_AFRICA_USA_troop_restraint }
}

USA_WAC_troop_restraint_change = {
	custom_effect_tooltip = USA_WAC_troop_restraint_change_tt

	add_to_variable = { USA_WAC_troop_restraint = temp_value }

	clamp_variable = { var = USA_WAC_troop_restraint min = 0 max = 100 }

	set_variable = { USA_troop_restraint_army_attack_factor = -0.20 }
	set_variable = { USA_troop_restraint_army_defence_factor = 0.10 }
	set_variable = { USA_troop_restraint_org_loss_when_moving = 0.15 }
	set_variable = { USA_troop_restraint_initiative_factor = -0.10 }
	set_variable = { USA_troop_restraint_combat_width_factor = 0.05 }

	set_temp_variable = { temp_factor = USA_WAC_troop_restraint }
	divide_temp_variable = { temp_factor = 100 }

	multiply_variable = { USA_troop_restraint_army_attack_factor = temp_factor }
	multiply_variable = { USA_troop_restraint_army_defence_factor = temp_factor }
	multiply_variable = { USA_troop_restraint_org_loss_when_moving = temp_factor }
	multiply_variable = { USA_troop_restraint_initiative_factor = temp_factor }
	multiply_variable = { USA_troop_restraint_combat_width_factor = temp_factor }

	force_update_dynamic_modifier = yes
}
