Kill the allied players if they fail the mission. Also fail the mission if the Allies2 player loses all of their buildings.
This commit is contained in:
@@ -80,6 +80,10 @@ namespace OpenRA.Mods.RA.Missions
|
||||
return;
|
||||
}
|
||||
allies.WinState = WinState.Lost;
|
||||
foreach (var actor in world.Actors.Where(a => a.IsInWorld && a.Owner == allies && !a.IsDead()))
|
||||
{
|
||||
actor.Kill(actor);
|
||||
}
|
||||
Game.AddChatLine(Color.Red, "Mission failed", text);
|
||||
Sound.Play("misnlst1.aud");
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
static readonly string[] objectives =
|
||||
{
|
||||
"Destroy the SAM sites. Tanya and Einstein must survive.",
|
||||
"Hold off the Soviet forces and destroy the SAM sites. Tanya and Einstein must survive.",
|
||||
"Wait for the helicopter and extract Einstein. Tanya and Einstein must survive."
|
||||
};
|
||||
|
||||
@@ -92,6 +92,10 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
reinforcementsTimer.Visible = false;
|
||||
}
|
||||
foreach (var actor in world.Actors.Where(a => a.IsInWorld && (a.Owner == allies1 || a.Owner == allies2) && !a.IsDead()))
|
||||
{
|
||||
actor.Kill(actor);
|
||||
}
|
||||
Game.AddChatLine(Color.Red, "Mission failed", text);
|
||||
Sound.Play("misnlst1.aud");
|
||||
}
|
||||
@@ -129,6 +133,10 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
BuildSovietUnits();
|
||||
}
|
||||
if (!world.Actors.Any(a => a.IsInWorld && a.HasTrait<Building>() && a.Owner == allies2))
|
||||
{
|
||||
MissionFailed("The Allied reinforcements have been defeated.");
|
||||
}
|
||||
if (!engineerMiss.Destroyed && engineer == null && AlliesControlMiss())
|
||||
{
|
||||
SpawnEngineerAtMiss();
|
||||
|
||||
Reference in New Issue
Block a user