Make Allies 02 work in SP mode
This commit is contained in:
@@ -83,10 +83,12 @@ namespace OpenRA.Mods.RA.Missions
|
||||
Actor yakEntryPoint;
|
||||
Actor yakAttackPoint;
|
||||
Actor yak;
|
||||
Actor procPoint;
|
||||
|
||||
Actor einsteinChinook;
|
||||
|
||||
World world;
|
||||
Player allies;
|
||||
Player allies1;
|
||||
Player allies2;
|
||||
Player soviets;
|
||||
@@ -103,7 +105,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
static readonly string[] SovietVehicles1 = { "3tnk" };
|
||||
static readonly string[] SovietVehicles2 = { "3tnk", "v2rl" };
|
||||
const int SovietVehiclesUpgradeTicks = 1500 * 4;
|
||||
const int SovietGroupSize = 8;
|
||||
const int SovietGroupSize = 20;
|
||||
const int SovietHelperCash = 2000;
|
||||
|
||||
const int ReinforcementsTicks = 1500 * 12;
|
||||
@@ -189,6 +191,10 @@ namespace OpenRA.Mods.RA.Missions
|
||||
StartReinforcementsTimer();
|
||||
}
|
||||
reinforcementsTimer.Tick();
|
||||
if (world.FrameNumber == TanksTicks)
|
||||
{
|
||||
RushSovietUnits();
|
||||
}
|
||||
if (world.FrameNumber == ParatroopersTicks)
|
||||
{
|
||||
MissionUtils.Paradrop(world, soviets, Badger1Passengers, badgerEntryPoint1.Location, badgerDropPoint1.Location);
|
||||
@@ -199,10 +205,6 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
RushSovietFlamers();
|
||||
}
|
||||
if (world.FrameNumber == TanksTicks)
|
||||
{
|
||||
RushSovietUnits();
|
||||
}
|
||||
if (world.FrameNumber == ParabombTicks)
|
||||
{
|
||||
MissionUtils.Parabomb(world, soviets, badgerEntryPoint2.Location, parabombPoint1.Location);
|
||||
@@ -530,7 +532,12 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
world = w;
|
||||
allies1 = w.Players.Single(p => p.InternalName == "Allies1");
|
||||
allies2 = w.Players.Single(p => p.InternalName == "Allies2");
|
||||
allies2 = w.Players.SingleOrDefault(p => p.InternalName == "Allies2");
|
||||
if (allies2 == null)
|
||||
{
|
||||
allies2 = allies1;
|
||||
}
|
||||
allies = w.Players.Single(p => p.InternalName == "Allies");
|
||||
soviets = w.Players.Single(p => p.InternalName == "Soviets");
|
||||
var actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
|
||||
sam1 = actors["SAM1"];
|
||||
@@ -562,6 +569,16 @@ namespace OpenRA.Mods.RA.Missions
|
||||
sovietTownAttackPoint2 = actors["SovietTownAttackPoint2"];
|
||||
yakEntryPoint = actors["YakEntryPoint"];
|
||||
yakAttackPoint = actors["YakAttackPoint"];
|
||||
procPoint = actors["ProcPoint"];
|
||||
foreach (var actor in world.Actors.Where(a => a.Owner == allies).OrderBy(a => a.HasTrait<PowerManager>()))
|
||||
{
|
||||
actor.ChangeOwner(allies2);
|
||||
}
|
||||
world.CreateActor(true, "proc", new TypeDictionary
|
||||
{
|
||||
new OwnerInit(allies2),
|
||||
new LocationInit(procPoint.Location)
|
||||
});
|
||||
var shroud = w.WorldActor.Trait<Shroud>();
|
||||
shroud.Explore(w, sam1.Location, 2);
|
||||
shroud.Explore(w, sam2.Location, 2);
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
static readonly string[] SovietVehicles1 = { "3tnk", "3tnk", "3tnk", "3tnk", "3tnk", "3tnk", "v2rl", "v2rl", "ftrk", "ftrk", "apc", "apc", "apc" };
|
||||
static readonly string[] SovietVehicles2 = { "4tnk", "4tnk", "4tnk", "3tnk", "3tnk", "3tnk", "3tnk", "3tnk", "v2rl", "v2rl", "ftrk", "apc" };
|
||||
const int SovietVehicles2Ticks = 1500 * 20;
|
||||
const int SovietAttackGroupSize = 3;
|
||||
const int SovietGroupSize = 3;
|
||||
const int MaxNumberYaks = 4;
|
||||
|
||||
const int ReinforcementsTicks = 1500 * 4;
|
||||
@@ -163,7 +163,8 @@ namespace OpenRA.Mods.RA.Missions
|
||||
EvacuateAlliedUnits(exit1TopLeft.CenterLocation, exit1BottomRight.CenterLocation, exit1ExitPoint.Location);
|
||||
EvacuateAlliedUnits(exit2TopLeft.CenterLocation, exit2BottomRight.CenterLocation, exit2ExitPoint.Location);
|
||||
CheckSovietAirbase();
|
||||
if (!world.Actors.Any(a => (a.Owner == allies1 || a.Owner == allies2) && a.IsInWorld && !a.IsDead() && ((a.HasTrait<Building>() && !a.HasTrait<Wall>()) || a.HasTrait<BaseBuilding>())))
|
||||
if (!world.Actors.Any(a => (a.Owner == allies1 || a.Owner == allies2) && a.IsInWorld && !a.IsDead()
|
||||
&& ((a.HasTrait<Building>() && !a.HasTrait<Wall>()) || a.HasTrait<BaseBuilding>())))
|
||||
{
|
||||
MissionFailed("The remaining Allied forces in the area have been wiped out.");
|
||||
}
|
||||
@@ -284,7 +285,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
var units = world.FindAliveCombatantActorsInCircle(Util.CenterOfCell(rallyPoint), 10)
|
||||
.Where(u => u.IsIdle && u.HasTrait<Mobile>() && u.Owner == soviets);
|
||||
if (units.Count() >= SovietAttackGroupSize)
|
||||
if (units.Count() >= SovietGroupSize)
|
||||
{
|
||||
foreach (var unit in units)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ Players:
|
||||
ColorRamp: 153,240,130,10
|
||||
LockSpawn: True
|
||||
LockTeam: True
|
||||
Allies: Allies2
|
||||
Allies: Allies2,Allies
|
||||
Enemies: Soviets
|
||||
PlayerReference@Allies2:
|
||||
Name: Allies2
|
||||
@@ -48,13 +48,19 @@ Players:
|
||||
ColorRamp: 80,240,130,10
|
||||
LockSpawn: True
|
||||
LockTeam: True
|
||||
Allies: Allies1
|
||||
Allies: Allies1,Allies
|
||||
Enemies: Soviets
|
||||
PlayerReference@Allies:
|
||||
Name: Allies
|
||||
Race: allies
|
||||
ColorRamp: 115,240,130,10
|
||||
Allies: Allies1,Allies2
|
||||
Enemies: Soviets
|
||||
PlayerReference@Soviets:
|
||||
Name: Soviets
|
||||
Race: soviet
|
||||
ColorRamp: 0,255,128,10
|
||||
Enemies: Allies1,Allies2
|
||||
Enemies: Allies1,Allies2,Allies
|
||||
|
||||
Actors:
|
||||
Actor1: v07
|
||||
@@ -1288,19 +1294,19 @@ Actors:
|
||||
Owner: Soviets
|
||||
Actor452: tent
|
||||
Location: 40,95
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor170: weap
|
||||
Location: 23,103
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor460: t08
|
||||
Location: 40,110
|
||||
Owner: Neutral
|
||||
Actor206: dome
|
||||
Location: 38,100
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor204: apwr
|
||||
Location: 37,107
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor169: tsla
|
||||
Location: 17,39
|
||||
Owner: Soviets
|
||||
@@ -1321,7 +1327,7 @@ Actors:
|
||||
Owner: Soviets
|
||||
Actor83: apwr
|
||||
Location: 37,104
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor162: mine
|
||||
Location: 19,95
|
||||
Owner: Neutral
|
||||
@@ -1475,12 +1481,12 @@ Actors:
|
||||
Actor290: apwr
|
||||
Location: 52,42
|
||||
Owner: Soviets
|
||||
Actor54: proc
|
||||
ProcPoint: waypoint
|
||||
Location: 25,95
|
||||
Owner: Allies2
|
||||
Owner: Neutral
|
||||
Actor455: fenc
|
||||
Location: 31,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor446: spen
|
||||
Location: 58,17
|
||||
Owner: Soviets
|
||||
@@ -1492,69 +1498,69 @@ Actors:
|
||||
Owner: Soviets
|
||||
Actor468: fenc
|
||||
Location: 29,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor456: fenc
|
||||
Location: 41,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor531: fenc
|
||||
Location: 45,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor461: fenc
|
||||
Location: 44,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor458: fenc
|
||||
Location: 43,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor453: fenc
|
||||
Location: 27,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor470: fenc
|
||||
Location: 26,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor454: pbox.e1
|
||||
Location: 32,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor465: fenc
|
||||
Location: 30,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor473: pbox.e1
|
||||
Location: 40,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor472: gun
|
||||
Location: 41,92
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor451: fenc
|
||||
Location: 28,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor478: fenc
|
||||
Location: 24,91
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor484: fenc
|
||||
Location: 23,91
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor476: fenc
|
||||
Location: 25,92
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor475: gun
|
||||
Location: 31,92
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor471: fenc
|
||||
Location: 25,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor477: fenc
|
||||
Location: 25,91
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor534: 1tnk
|
||||
Location: 37,90
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Facing: 0
|
||||
Actor398: 1tnk
|
||||
Location: 36,90
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Facing: 0
|
||||
Actor457: fenc
|
||||
Location: 42,93
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
BadgerDropPoint1: waypoint
|
||||
Location: 19,96
|
||||
Owner: Neutral
|
||||
@@ -2127,7 +2133,7 @@ Actors:
|
||||
Owner: Neutral
|
||||
Actor573: 2tnk
|
||||
Location: 34,92
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Facing: 0
|
||||
Actor577: tc02
|
||||
Location: 81,87
|
||||
@@ -2137,14 +2143,14 @@ Actors:
|
||||
Owner: Neutral
|
||||
Actor574: 2tnk
|
||||
Location: 35,92
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Facing: 0
|
||||
Actor578: v11
|
||||
Location: 64,84
|
||||
Owner: Neutral
|
||||
Actor546: 1tnk
|
||||
Location: 38,90
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Facing: 0
|
||||
BadgerDropPoint2: waypoint
|
||||
Location: 34,106
|
||||
@@ -2698,22 +2704,22 @@ Actors:
|
||||
Owner: Soviets
|
||||
Actor253: e1
|
||||
Location: 21,90
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor255: e1
|
||||
Location: 23,89
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor270: e1
|
||||
Location: 27,90
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor268: e1
|
||||
Location: 33,90
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor269: e1
|
||||
Location: 34,90
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Actor267: jeep
|
||||
Location: 25,89
|
||||
Owner: Allies2
|
||||
Owner: Allies
|
||||
Facing: 0
|
||||
Actor882: barl
|
||||
Location: 46,81
|
||||
|
||||
@@ -45,7 +45,7 @@ Players:
|
||||
LockRace: True
|
||||
Race: allies
|
||||
LockColor: True
|
||||
ColorRamp: 115,240,130,10
|
||||
ColorRamp: 80,240,130,10
|
||||
LockSpawn: True
|
||||
LockTeam: True
|
||||
Allies: Allies1,Allies
|
||||
@@ -53,7 +53,7 @@ Players:
|
||||
PlayerReference@Allies:
|
||||
Name: Allies
|
||||
Race: allies
|
||||
ColorRamp: 80,240,130,10
|
||||
ColorRamp: 115,240,130,10
|
||||
Allies: Allies1,Allies2
|
||||
Enemies: Soviets
|
||||
PlayerReference@Soviets:
|
||||
|
||||
Reference in New Issue
Block a user