Have the mggs come offmap, we don't want the player building too many.

This commit is contained in:
Scott_NZ
2012-11-12 17:23:58 +13:00
parent 4373831317
commit 608bf9ada1
2 changed files with 43 additions and 23 deletions

View File

@@ -83,6 +83,9 @@ namespace OpenRA.Mods.RA.Missions
const int SovietAttackGroupSize = 3;
const int MaxNumberYaks = 4;
const int ReinforcementsTicks = 1500 * 4;
static readonly string[] Reinforcements = { MggName, MggName, "2tnk", "2tnk", "2tnk", "2tnk", "1tnk", "1tnk", "jeep", "jeep", "e1", "e1", "e1", "e1", "e3", "e3" };
int attackAtFrame;
int attackAtFrameIncrement;
@@ -94,6 +97,7 @@ namespace OpenRA.Mods.RA.Missions
const string McvName = "mcv";
const string YakName = "yak";
const string MggName = "mgg";
void MissionFailed(string text)
{
@@ -129,7 +133,7 @@ namespace OpenRA.Mods.RA.Missions
}
if (world.FrameNumber == 1)
{
SpawnAlliedMcvs();
SpawnAlliedUnitForPlayers(McvName);
evacuateWidget = new InfoWidget("", new float2(Game.viewport.Width * 0.35f, Game.viewport.Height * 0.9f));
Ui.Root.AddChild(evacuateWidget);
UpdateUnitsEvacuated();
@@ -140,9 +144,17 @@ namespace OpenRA.Mods.RA.Missions
attackAtFrame += attackAtFrameIncrement;
attackAtFrameIncrement = Math.Max(attackAtFrameIncrement - 5, 250);
}
if (world.FrameNumber == ReinforcementsTicks)
{
Sound.Play("reinfor1.aud");
SpawnReinforcements();
}
if (objectives[AirbaseID].Status != ObjectiveStatus.Completed)
{
BuildSovietAircraft();
if (world.FrameNumber % 25 == 0)
{
BuildSovietAircraft();
}
ManageSovietAircraft();
}
ManageSovietUnits();
@@ -190,7 +202,7 @@ namespace OpenRA.Mods.RA.Missions
bool LandIsQueued(Actor actor)
{
var a = actor.GetCurrentActivity();
for (;;)
for (; ; )
{
if (a == null) { return false; }
if (a.GetType() == typeof(ReturnToBase) || a.GetType() == typeof(Land)) { return true; }
@@ -273,9 +285,17 @@ namespace OpenRA.Mods.RA.Missions
}
}
void SpawnAlliedMcvs()
void SpawnReinforcements()
{
var unit = world.CreateActor(McvName, new TypeDictionary
foreach (var unit in Reinforcements)
{
SpawnAlliedUnitForPlayers(unit);
}
}
void SpawnAlliedUnitForPlayers(string actor)
{
var unit = world.CreateActor(actor, new TypeDictionary
{
new LocationInit(allies1EntryPoint.Location),
new OwnerInit(allies1),
@@ -284,7 +304,7 @@ namespace OpenRA.Mods.RA.Missions
unit.QueueActivity(new Move.Move(allies1MovePoint.Location));
if (allies2 != allies1)
{
unit = world.CreateActor(McvName, new TypeDictionary
unit = world.CreateActor(actor, new TypeDictionary
{
new LocationInit(allies2EntryPoint.Location),
new OwnerInit(allies2),

View File

@@ -381,9 +381,6 @@ Actors:
Actor149: t17
Location: 134,47
Owner: Neutral
Actor240: tc03
Location: 157,78
Owner: Neutral
Actor156: t05
Location: 139,44
Owner: Neutral
@@ -399,9 +396,9 @@ Actors:
Actor370: tc02
Location: 25,65
Owner: Neutral
Actor165: apwr
Location: 154,76
Owner: Soviets
Actor165: tc03
Location: 157,77
Owner: Neutral
Actor181: t13
Location: 137,71
Owner: Neutral
@@ -655,7 +652,7 @@ Actors:
Location: 30,62
Owner: Neutral
Actor161: apwr
Location: 150,76
Location: 154,75
Owner: Soviets
Actor54: t01
Location: 56,76
@@ -1029,8 +1026,8 @@ Actors:
Actor183: powr
Location: 3,34
Owner: Allies
Actor185: e1
Location: 150,72
Actor185: apwr
Location: 154,72
Owner: Soviets
Actor190: ftur
Location: 160,53
@@ -1092,8 +1089,8 @@ Actors:
Actor242: barr
Location: 159,61
Owner: Soviets
Actor18: apwr
Location: 154,73
Actor229: apwr
Location: 150,75
Owner: Soviets
Actor237: dog
Location: 151,62
@@ -1110,8 +1107,8 @@ Actors:
Actor206: fenc
Location: 158,53
Owner: Soviets
Actor229: apwr
Location: 150,73
Actor18: apwr
Location: 150,72
Owner: Soviets
Actor230: 3tnk
Location: 157,60
@@ -1381,6 +1378,9 @@ Rules:
AFLD:
Buildable:
Owner: None
ATEK:
Buildable:
Owner: None
STEK:
Buildable:
Owner: None
@@ -1413,12 +1413,12 @@ Rules:
Owner: None
MGG:
Buildable:
Queue: Vehicle
BuildPaletteOrder: 150
Prerequisites: atek
Owner: allies
Owner: None
CreatesShroud:
Range: 6
GAP:
Buildable:
Owner: None
Sequences: