Fail Allies01/Allies02 if the extraction helicopter is destroyed
This commit is contained in:
@@ -156,19 +156,26 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
FlyEinsteinFromExtractionLZ();
|
FlyEinsteinFromExtractionLZ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (einsteinChinook != null && !einsteinChinook.IsDead() && !world.Map.IsInMap(einsteinChinook.Location) && einsteinChinook.Trait<Cargo>().Passengers.Contains(einstein))
|
if (einsteinChinook != null)
|
||||||
{
|
{
|
||||||
MissionAccomplished("Einstein was rescued.");
|
if (einsteinChinook.Destroyed)
|
||||||
}
|
{
|
||||||
if (einstein.Destroyed)
|
MissionFailed("The extraction helicopter was destroyed.");
|
||||||
{
|
}
|
||||||
MissionFailed("Einstein was killed.");
|
else if (!world.Map.IsInMap(einsteinChinook.Location) && einsteinChinook.Trait<Cargo>().Passengers.Contains(einstein))
|
||||||
|
{
|
||||||
|
MissionAccomplished("Einstein was rescued.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tanya.Destroyed)
|
if (tanya.Destroyed)
|
||||||
{
|
{
|
||||||
MissionFailed("Tanya was killed.");
|
MissionFailed("Tanya was killed.");
|
||||||
}
|
}
|
||||||
|
else if (einstein != null && einstein.Destroyed)
|
||||||
|
{
|
||||||
|
MissionFailed("Einstein was killed.");
|
||||||
|
}
|
||||||
ManageSovietOre();
|
ManageSovietOre();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,10 +133,6 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
{
|
{
|
||||||
BuildSovietUnits();
|
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())
|
if (!engineerMiss.Destroyed && engineer == null && AlliesControlMiss())
|
||||||
{
|
{
|
||||||
SpawnEngineerAtMiss();
|
SpawnEngineerAtMiss();
|
||||||
@@ -153,9 +149,13 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
SendChinook();
|
SendChinook();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (currentObjective == 1)
|
else if (currentObjective == 1 && einsteinChinook != null)
|
||||||
{
|
{
|
||||||
if (einsteinChinook != null && !einsteinChinook.IsDead() && !world.Map.IsInMap(einsteinChinook.Location) && einsteinChinook.Trait<Cargo>().Passengers.Contains(einstein))
|
if (einsteinChinook.Destroyed)
|
||||||
|
{
|
||||||
|
MissionFailed("The extraction helicopter was destroyed.");
|
||||||
|
}
|
||||||
|
else if (!world.Map.IsInMap(einsteinChinook.Location) && einsteinChinook.Trait<Cargo>().Passengers.Contains(einstein))
|
||||||
{
|
{
|
||||||
MissionAccomplished("Einstein was rescued.");
|
MissionAccomplished("Einstein was rescued.");
|
||||||
}
|
}
|
||||||
@@ -164,10 +164,14 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
{
|
{
|
||||||
MissionFailed("Tanya was killed.");
|
MissionFailed("Tanya was killed.");
|
||||||
}
|
}
|
||||||
if (einstein.Destroyed)
|
else if (einstein.Destroyed)
|
||||||
{
|
{
|
||||||
MissionFailed("Einstein was killed.");
|
MissionFailed("Einstein was killed.");
|
||||||
}
|
}
|
||||||
|
else if (!world.Actors.Any(a => a.IsInWorld && a.HasTrait<Building>() && a.Owner == allies2))
|
||||||
|
{
|
||||||
|
MissionFailed("The Allied reinforcements have been defeated.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildSovietUnits()
|
void BuildSovietUnits()
|
||||||
|
|||||||
Reference in New Issue
Block a user