InitNationGeneral0 = function()
	NationGeneral0 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return (g.Type == "explosivegeneral" or g.Type == "stealthgeneral" or g.Type == "chronogeneral" or g.Type == "lasergeneral" or g.Type == "flamegeneral" or g.Type == "toxicgeneral" or g.Type == "teslageneral" or g.Type == "nucleargeneral") and g.Owner == multi0 end)
	Utils.Do(NationGeneral0, function(ng0)
		if ng0.Type == "explosivegeneral" and ng0.Owner == multi0 then
			OrderedGeneralRank0 = "Explosive General"
			OrderedGeneralSpeaches0 = ExplosiveGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng0.Type == "stealthgeneral" and ng0.Owner == multi0 then
			OrderedGeneralRank0 = "Stealth General"
			OrderedGeneralSpeaches0 = StealthGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng0.Type == "chronogeneral" and ng0.Owner == multi0 then
			OrderedGeneralRank0 = "Chrono General"
			OrderedGeneralSpeaches0 = ChronoGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng0.Type == "lasergeneral" and ng0.Owner == multi0 then
			OrderedGeneralRank0 = "Laser General"
			OrderedGeneralSpeaches0 = LaserGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng0.Type == "flamegeneral" and ng0.Owner == multi0 then
			OrderedGeneralRank0 = "Flame General"
			OrderedGeneralSpeaches0 = FlameGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng0.Type == "toxicgeneral" and ng0.Owner == multi0 then
			OrderedGeneralRank0 = "Toxic General"
			OrderedGeneralSpeaches0 = ToxicGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng0.Type == "teslageneral" and ng0.Owner == multi0 then
			OrderedGeneralRank0 = "Tesla General"
			OrderedGeneralSpeaches0 = TeslaGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng0.Type == "nucleargeneral" and ng0.Owner == multi0 then
			OrderedGeneralRank0 = "Nuclear General"
			OrderedGeneralSpeaches0 = NuclearGeneralSpeaches
			------------------------------------------------------------------------
		end
		ng0.GrantUpgrade("missionmarker.empty")
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function()
			if multi0.IsBot then
				if not ng0.IsDead and ng0.IsInWorld then
					ng0.GrantUpgrade("nocontrol")
					ng0.GrantUpgrade("autocontrol")
					ng0.GrantUpgrade("wandering")
					ng0.Stance = "AttackAnything"
					ng0.Scatter()
				end
			else
			end
		end)
		Trigger.OnKilled(ng0, function()
			multi0.MarkFailedObjective(SurviveOrderedGeneralObjective0)
			PlayerGeneralArrivedState0 = false
		end)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.6, 0.9)), function()
		Media.DisplayMessage("In the army of the " .. multi0.Name .. ", " .. OrderedGeneralRank0 .. " has arrived...", "[Field-Report]", multi0.Color)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.6, 6.3)), function()
		SurviveOrderedGeneralObjective0 = multi0.AddSecondaryObjective("The " .. OrderedGeneralRank0 .. Utils.Random({ ", must be", ", need to be" }) .. " survive!") 
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.3, 6.6)), function() NationGeneralSpeech0() end)
end
InitNationGeneral1 = function()
	NationGeneral1 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return (g.Type == "explosivegeneral" or g.Type == "stealthgeneral" or g.Type == "chronogeneral" or g.Type == "lasergeneral" or g.Type == "flamegeneral" or g.Type == "toxicgeneral" or g.Type == "teslageneral" or g.Type == "nucleargeneral") and g.Owner == multi1 end)
	Utils.Do(NationGeneral1, function(ng1)
		if ng1.Type == "explosivegeneral" and ng1.Owner == multi1 then
			OrderedGeneralRank1 = "Explosive General"
			OrderedGeneralSpeaches1 = ExplosiveGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng1.Type == "stealthgeneral" and ng1.Owner == multi1 then
			OrderedGeneralRank1 = "Stealth General"
			OrderedGeneralSpeaches1 = StealthGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng1.Type == "chronogeneral" and ng1.Owner == multi1 then
			OrderedGeneralRank1 = "Chrono General"
			OrderedGeneralSpeaches1 = ChronoGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng1.Type == "lasergeneral" and ng1.Owner == multi1 then
			OrderedGeneralRank1 = "Laser General"
			OrderedGeneralSpeaches1 = LaserGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng1.Type == "flamegeneral" and ng1.Owner == multi1 then
			OrderedGeneralRank1 = "Flame General"
			OrderedGeneralSpeaches1 = FlameGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng1.Type == "toxicgeneral" and ng1.Owner == multi1 then
			OrderedGeneralRank1 = "Toxic General"
			OrderedGeneralSpeaches1 = ToxicGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng1.Type == "teslageneral" and ng1.Owner == multi1 then
			OrderedGeneralRank1 = "Tesla General"
			OrderedGeneralSpeaches1 = TeslaGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng1.Type == "nucleargeneral" and ng1.Owner == multi1 then
			OrderedGeneralRank1 = "Nuclear General"
			OrderedGeneralSpeaches1 = NuclearGeneralSpeaches
			------------------------------------------------------------------------
		end
		
		ng1.GrantUpgrade("missionmarker.empty")
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function()
			if multi1.IsBot then
				if not ng1.IsDead and ng1.IsInWorld then
					ng1.GrantUpgrade("nocontrol")
					ng1.GrantUpgrade("autocontrol")
					ng1.GrantUpgrade("wandering")
					ng1.Stance = "AttackAnything"
					ng1.Scatter()
				end
			else
			end
		end)
		Trigger.OnKilled(ng1, function()
			multi1.MarkFailedObjective(SurviveOrderedGeneralObjective1)
			PlayerGeneralArrivedState1 = false
		end)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.6, 0.9)), function()
		Media.DisplayMessage("In the army of the " .. multi1.Name .. ", " .. OrderedGeneralRank1 .. " has arrived...", "[Field-Report]", multi1.Color)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.6, 6.3)), function()
		SurviveOrderedGeneralObjective1 = multi1.AddSecondaryObjective("The " .. OrderedGeneralRank1 .. Utils.Random({ ", must be", ", need to be" }) .. " survive!") 
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.3, 6.6)), function() NationGeneralSpeech1() end)
end
InitNationGeneral2 = function()
	NationGeneral2 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return (g.Type == "explosivegeneral" or g.Type == "stealthgeneral" or g.Type == "chronogeneral" or g.Type == "lasergeneral" or g.Type == "flamegeneral" or g.Type == "toxicgeneral" or g.Type == "teslageneral" or g.Type == "nucleargeneral") and g.Owner == multi2 end)
	Utils.Do(NationGeneral2, function(ng2)
		if ng2.Type == "explosivegeneral" and ng2.Owner == multi2 then
			OrderedGeneralRank2 = "Explosive General"
			OrderedGeneralSpeaches2 = ExplosiveGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng2.Type == "stealthgeneral" and ng2.Owner == multi2 then
			OrderedGeneralRank2 = "Stealth General"
			OrderedGeneralSpeaches2 = StealthGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng2.Type == "chronogeneral" and ng2.Owner == multi2 then
			OrderedGeneralRank2 = "Chrono General"
			OrderedGeneralSpeaches2 = ChronoGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng2.Type == "lasergeneral" and ng2.Owner == multi2 then
			OrderedGeneralRank2 = "Laser General"
			OrderedGeneralSpeaches2 = LaserGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng2.Type == "flamegeneral" and ng2.Owner == multi2 then
			OrderedGeneralRank2 = "Flame General"
			OrderedGeneralSpeaches2 = FlameGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng2.Type == "toxicgeneral" and ng2.Owner == multi2 then
			OrderedGeneralRank2 = "Toxic General"
			OrderedGeneralSpeaches2 = ToxicGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng2.Type == "teslageneral" and ng2.Owner == multi2 then
			OrderedGeneralRank2 = "Tesla General"
			OrderedGeneralSpeaches2 = TeslaGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng2.Type == "nucleargeneral" and ng2.Owner == multi2 then
			OrderedGeneralRank2 = "Nuclear General"
			OrderedGeneralSpeaches2 = NuclearGeneralSpeaches
			------------------------------------------------------------------------
		end
		ng2.GrantUpgrade("missionmarker.empty")
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function()
			if multi2.IsBot then
				if not ng2.IsDead and ng2.IsInWorld then
					ng2.GrantUpgrade("nocontrol")
					ng2.GrantUpgrade("autocontrol")
					ng2.GrantUpgrade("wandering")
					ng2.Stance = "AttackAnything"
					ng2.Scatter()
				end
			else
			end
		end)
		Trigger.OnKilled(ng2, function() 
			multi2.MarkFailedObjective(SurviveOrderedGeneralObjective2)
			PlayerGeneralArrivedState2 = false
		end)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.6, 0.9)), function()
		Media.DisplayMessage("In the army of the " .. multi2.Name .. ", " .. OrderedGeneralRank2 .. " has arrived...", "[Field-Report]", multi2.Color)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.6, 6.3)), function()
		SurviveOrderedGeneralObjective2 = multi2.AddSecondaryObjective("The " .. OrderedGeneralRank2 .. Utils.Random({ ", must be", ", need to be" }) .. " survive!") 
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.3, 6.6)), function() NationGeneralSpeech2() end)
end
InitNationGeneral3 = function()
	NationGeneral3 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return (g.Type == "explosivegeneral" or g.Type == "stealthgeneral" or g.Type == "chronogeneral" or g.Type == "lasergeneral" or g.Type == "flamegeneral" or g.Type == "toxicgeneral" or g.Type == "teslageneral" or g.Type == "nucleargeneral") and g.Owner == multi3 end)
	Utils.Do(NationGeneral3, function(ng3)
		if ng3.Type == "explosivegeneral" and ng3.Owner == multi3 then
			OrderedGeneralRank3 = "Explosive General"
			OrderedGeneralSpeaches3 = ExplosiveGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng3.Type == "stealthgeneral" and ng3.Owner == multi3 then
			OrderedGeneralRank3 = "Stealth General"
			OrderedGeneralSpeaches3 = StealthGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng3.Type == "chronogeneral" and ng3.Owner == multi3 then
			OrderedGeneralRank3 = "Chrono General"
			OrderedGeneralSpeaches3 = ChronoGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng3.Type == "lasergeneral" and ng3.Owner == multi3 then
			OrderedGeneralRank3 = "Laser General"
			OrderedGeneralSpeaches3 = LaserGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng3.Type == "flamegeneral" and ng3.Owner == multi3 then
			OrderedGeneralRank3 = "Flame General"
			OrderedGeneralSpeaches3 = FlameGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng3.Type == "toxicgeneral" and ng3.Owner == multi3 then
			OrderedGeneralRank3 = "Toxic General"
			OrderedGeneralSpeaches3 = ToxicGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng3.Type == "teslageneral" and ng3.Owner == multi3 then
			OrderedGeneralRank3 = "Tesla General"
			OrderedGeneralSpeaches3 = TeslaGeneralSpeaches
			------------------------------------------------------------------------
		elseif ng3.Type == "nucleargeneral" and ng3.Owner == multi3 then
			OrderedGeneralRank3 = "Nuclear General"
			OrderedGeneralSpeaches3 = NuclearGeneralSpeaches
			------------------------------------------------------------------------
		end
		ng3.GrantUpgrade("missionmarker.empty")
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function()
			if multi3.IsBot then
				if not ng3.IsDead and ng3.IsInWorld then
					ng3.GrantUpgrade("nocontrol")
					ng3.GrantUpgrade("autocontrol")
					ng3.GrantUpgrade("wandering")
					ng3.Stance = "AttackAnything"
					ng3.Scatter()
				end
			else
			end
		end)
		Trigger.OnKilled(ng3, function()
			multi3.MarkFailedObjective(SurviveOrderedGeneralObjective3)
			PlayerGeneralArrivedState3 = false
		end)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.6, 0.9)), function()
		Media.DisplayMessage("In the army of the " .. multi3.Name .. ", " .. OrderedGeneralRank3 .. " has arrived...", "[Field-Report]", multi3.Color)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.6, 6.3)), function()
		SurviveOrderedGeneralObjective3 = multi3.AddSecondaryObjective("The " .. OrderedGeneralRank3 .. Utils.Random({ ", must be", ", need to be" }) .. " survive!") 
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.3, 6.6)), function() NationGeneralSpeech3() end)
end
NationGeneralSpeech0 = function()
	if PlayerGeneralArrivedState0 then
		Utils.Do(NationGeneral0, function(ng)
			if not ng.IsDead and ng.IsInWorld then
				ng.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(OrderedGeneralSpeaches0[Utils.RandomInteger(1, 3)], ng.CenterPosition + WVec.New(Utils.Random({ -1, 1 }), Utils.Random({ -1, 1 }), Utils.Random({ -15, 15 })), Utils.RandomInteger(88, 122), multi0.Color)
			end
		end)
	end
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22.2, 44.4)), function() NationGeneralSpeech0() end)
end
NationGeneralSpeech1 = function()
	if PlayerGeneralArrivedState1 then
		Utils.Do(NationGeneral1, function(ng)
			if not ng.IsDead and ng.IsInWorld then
				ng.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(OrderedGeneralSpeaches1[Utils.RandomInteger(1, 3)], ng.CenterPosition + WVec.New(Utils.Random({ -1, 1 }), Utils.Random({ -1, 1 }), Utils.Random({ -15, 15 })), Utils.RandomInteger(88, 122), multi1.Color)
			end
		end)
	end
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22.2, 44.4)), function() NationGeneralSpeech1() end)
end
NationGeneralSpeech2 = function()
	if PlayerGeneralArrivedState2 then
		Utils.Do(NationGeneral2, function(ng)
			if not ng.IsDead and ng.IsInWorld then
				ng.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(OrderedGeneralSpeaches2[Utils.RandomInteger(1, 3)], ng.CenterPosition + WVec.New(Utils.Random({ -1, 1 }), Utils.Random({ -1, 1 }), Utils.Random({ -15, 15 })), Utils.RandomInteger(88, 122), multi2.Color)
			end
		end)
	end
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22.2, 44.4)), function() NationGeneralSpeech2() end)
end
NationGeneralSpeech3 = function()
	if PlayerGeneralArrivedState3 then
		Utils.Do(NationGeneral3, function(ng)
			if not ng.IsDead and ng.IsInWorld then
				ng.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(OrderedGeneralSpeaches3[Utils.RandomInteger(1, 3)], ng.CenterPosition + WVec.New(Utils.Random({ -1, 1 }), Utils.Random({ -1, 1 }), Utils.Random({ -15, 15 })), Utils.RandomInteger(88, 122), multi3.Color)
			end
		end)
	end
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22.2, 44.4)), function() NationGeneralSpeech3() end)
end

