Basic Soviet AI. This is flawed right now as it will just charge all of its starting units towards Tanya

This commit is contained in:
Scott_NZ
2012-08-12 03:48:37 +12:00
parent 32a37d8c0f
commit 0d9c78670e
2 changed files with 301 additions and 289 deletions

View File

@@ -131,14 +131,16 @@ namespace OpenRA.Mods.RA.Missions
{ {
MissionFailed("Einstein was killed."); MissionFailed("Einstein was killed.");
} }
ManageSovietOre();
} }
void ManageSovietOre() void InitializeSovietAI()
{ {
var res = soviets.PlayerActor.Trait<PlayerResources>(); if (!Game.IsHost || world.LocalPlayer == null)
res.TakeOre(res.Ore); {
res.TakeCash(res.Cash); return;
}
var logic = world.LocalPlayer.PlayerActor.TraitsImplementing<IBot>().First(b => b.Info.Name == "Soviet AI");
logic.Activate(soviets);
} }
void SpawnSignalFlare() void SpawnSignalFlare()
@@ -228,6 +230,7 @@ namespace OpenRA.Mods.RA.Missions
w.WorldActor.Trait<Shroud>().Explore(w, sam3.Location, 2); w.WorldActor.Trait<Shroud>().Explore(w, sam3.Location, 2);
w.WorldActor.Trait<Shroud>().Explore(w, sam4.Location, 2); w.WorldActor.Trait<Shroud>().Explore(w, sam4.Location, 2);
Game.MoveViewport(((w.LocalPlayer ?? allies1) == allies1 ? chinookHusk.Location : allies2BasePoint.Location).ToFloat2()); Game.MoveViewport(((w.LocalPlayer ?? allies1) == allies1 ? chinookHusk.Location : allies2BasePoint.Location).ToFloat2());
InitializeSovietAI();
} }
} }

View File

@@ -1751,6 +1751,15 @@ Smudges:
Rules: Rules:
Player: Player:
-ConquestVictoryConditions: -ConquestVictoryConditions:
HackyAI@SovietAI:
Name:Soviet AI
BuildingFractions:
UnitsToBuild:
e1: 50%
e2: 20%
e3: 10%
3tnk: 100%
SquadSize: 10
World: World:
-CrateDrop: -CrateDrop:
-SpawnMPUnits: -SpawnMPUnits: