diff --git a/mods/ra/maps/soviet-02b/map.yaml b/mods/ra/maps/soviet-02b/map.yaml index cadf3cb907..ae1bb59e8e 100644 --- a/mods/ra/maps/soviet-02b/map.yaml +++ b/mods/ra/maps/soviet-02b/map.yaml @@ -276,7 +276,7 @@ Actors: Actor82: barl Location: 84,69 Owner: Greece - Actor83: tent + Tent: tent Location: 70,57 Owner: Greece Actor84: barl @@ -483,5 +483,11 @@ Actors: TransportWaypoint3: waypoint Location: 67,75 Owner: Neutral + AttackWaypoint1: waypoint + Location: 52,55 + Owner: Neutral + AttackWaypoint2: waypoint + Location: 80,83 + Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml diff --git a/mods/ra/maps/soviet-02b/rules.yaml b/mods/ra/maps/soviet-02b/rules.yaml index acf3e5ddc4..ab0b5c7988 100644 --- a/mods/ra/maps/soviet-02b/rules.yaml +++ b/mods/ra/maps/soviet-02b/rules.yaml @@ -58,7 +58,7 @@ MSLO: E3: Buildable: - Prerequisites: ~disabled + Prerequisites: ~tent E4: Buildable: diff --git a/mods/ra/maps/soviet-02b/soviet02b.lua b/mods/ra/maps/soviet-02b/soviet02b.lua index 3b15cee9d5..d35310d41e 100644 --- a/mods/ra/maps/soviet-02b/soviet02b.lua +++ b/mods/ra/maps/soviet-02b/soviet02b.lua @@ -15,6 +15,39 @@ EnemyBaseShroudTrigger = { CPos.New(64, 52), CPos.New(64, 53), CPos.New(64, 54), ParachuteTrigger = { CPos.New(80, 66), CPos.New(81, 66), CPos.New(82, 66), CPos.New(83, 66), CPos.New(84, 66), CPos.New(85, 66),CPos.New(86, 66), CPos.New(87, 66), CPos.New(88, 66), CPos.New(89, 66) } EnemyBaseEntranceShroudTrigger = { CPos.New(80, 73), CPos.New(81, 73), CPos.New(82, 73), CPos.New(83, 73), CPos.New(84, 73), CPos.New(85, 73),CPos.New(86, 73), CPos.New(87, 73), CPos.New(88, 73), CPos.New(89, 73) } +AttackWaypoints = { AttackWaypoint1, AttackWaypoint2 } +AttackGroup = { } +AttackGroupSize = 3 +AlliedInfantry = { "e1", "e1", "e3" } + +SendAttackGroup = function() + if #AttackGroup < AttackGroupSize then + return + end + + local way = Utils.Random(AttackWaypoints) + Utils.Do(AttackGroup, function(unit) + if not unit.IsDead then + unit.AttackMove(way.Location) + Trigger.OnIdle(unit, unit.Hunt) + end + end) + + AttackGroup = { } +end + +ProduceInfantry = function() + if Tent.IsDead then + return + end + + enemy.Build({ Utils.Random(AlliedInfantry) }, function(units) + table.insert(AttackGroup, units[1]) + SendAttackGroup() + Trigger.AfterDelay(DateTime.Seconds(10), ProduceInfantry) + end) +end + SendUSSRParadrops = function() paraproxy1 = Actor.Create("powerproxy.paratroopers", false, { Owner = player }) paraproxy1.TargetParatroopers(ParachuteBaseEntrance.CenterPosition, Angle.North) @@ -163,6 +196,9 @@ WorldLoaded = function() alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.") sovietObjective1 = player.AddPrimaryObjective("Protect the Command Center.") sovietObjective2 = player.AddPrimaryObjective("Destroy all Allied units and structures.") + + enemy.Resources = 2000 + Trigger.AfterDelay(DateTime.Seconds(30), ProduceInfantry) end Tick = function()