From a9ae36b691fd91dea7a1caab132fa01a4e9854e3 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 8 Oct 2016 21:07:26 +0200 Subject: [PATCH 1/3] Make HIJACKER unbuildable in the Evacuation mission We don't allow building Mechanics as well --- mods/ra/maps/evacuation/rules.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ra/maps/evacuation/rules.yaml b/mods/ra/maps/evacuation/rules.yaml index 1d0482a8fc..0734818db8 100644 --- a/mods/ra/maps/evacuation/rules.yaml +++ b/mods/ra/maps/evacuation/rules.yaml @@ -72,6 +72,10 @@ MECH: Buildable: Prerequisites: ~disabled +HIJACKER: + Buildable: + Prerequisites: ~disabled + SPEN: Buildable: Prerequisites: ~disabled From 648f06af0f53ebc7a4035efd6c6513ba9ae5ac83 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 8 Oct 2016 21:11:24 +0200 Subject: [PATCH 2/3] Fix soviet units not stopping to hunt after being captured in Exodus --- mods/ra/maps/exodus/exodus.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ra/maps/exodus/exodus.lua b/mods/ra/maps/exodus/exodus.lua index cd7c038002..e8bb61bd86 100644 --- a/mods/ra/maps/exodus/exodus.lua +++ b/mods/ra/maps/exodus/exodus.lua @@ -184,6 +184,9 @@ end IdleHunt = function(unit) Trigger.OnIdle(unit, unit.Hunt) + Trigger.OnCapture(unit, function() + Trigger.ClearAll(unit) + end) end ManageSovietUnits = function() From d828e709d6efafdbed831307ca8542461e27e7f8 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sun, 9 Oct 2016 22:05:41 +0200 Subject: [PATCH 3/3] Fix soviet units not attack moving to their rally points and remove unnecessary (duplicated) code from the tick function (the call to IdleHunt inside SpawnSovietUnits is enough) --- mods/ra/maps/exodus/exodus.lua | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/mods/ra/maps/exodus/exodus.lua b/mods/ra/maps/exodus/exodus.lua index e8bb61bd86..61fe13522d 100644 --- a/mods/ra/maps/exodus/exodus.lua +++ b/mods/ra/maps/exodus/exodus.lua @@ -139,17 +139,18 @@ end SovietGroupSize = 5 SpawnSovietUnits = function() - local spawnPoint = Utils.Random(SovietEntryPoints) - local rallyPoint = Utils.Random(SovietRallyPoints) - local route = { spawnPoint.Location, rallyPoint.Location } local units = SovietUnits1 if DateTime.GameTime >= SovietUnits2Ticks[Difficulty] then units = SovietUnits2 end - local unit = { Utils.Random(units) } - Reinforcements.Reinforce(soviets, unit, route) + local unitType = Utils.Random(units) + local spawnPoint = Utils.Random(SovietEntryPoints) + local rallyPoint = Utils.Random(SovietRallyPoints) + local actor = Actor.Create(unitType, true, { Owner = soviets, Location = spawnPoint.Location }) + actor.AttackMove(rallyPoint.Location) + IdleHunt(actor) local delay = math.max(attackAtFrame - 5, minAttackAtFrame) Trigger.AfterDelay(delay, SpawnSovietUnits) @@ -189,24 +190,6 @@ IdleHunt = function(unit) end) end -ManageSovietUnits = function() - Utils.Do(SovietRallyPoints, function(rallyPoint) - local radius = WDist.FromCells(8) - local units = Map.ActorsInCircle(rallyPoint.CenterPosition, radius, function(actor) - return actor.Owner == soviets and actor.HasProperty("Hunt") - end) - - if #units > SovietGroupSize then - Utils.Do(units, IdleHunt) - end - end) - - local scatteredUnits = Utils.Where(soviets.GetGroundAttackers(), function(unit) - return not Map.IsNamedActor(unit) and unit.IsIdle and unit.HasProperty("Hunt") - end) - Utils.Do(scatteredUnits, IdleHunt) -end - AircraftTargets = function() local targets = Utils.Where(Map.ActorsInWorld, function(a) return (a.Owner == allies1 or a.Owner == allies2) and a.HasProperty("Health") @@ -297,7 +280,6 @@ end Tick = function() if DateTime.GameTime % 100 == 0 then - ManageSovietUnits() ManageSovietAircraft() Utils.Do(humans, function(player)