From c2c56c637430bdb9f0f047c653914d3030971caa Mon Sep 17 00:00:00 2001 From: JovialFeline Date: Sun, 13 Jul 2025 04:57:08 -0400 Subject: [PATCH] allies-08ab: Remove tech center as bomber target --- mods/ra/maps/allies-08a/allies08a-AI.lua | 25 ++++++++++++++++-------- mods/ra/maps/allies-08b/allies08b-AI.lua | 25 ++++++++++++++++-------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/mods/ra/maps/allies-08a/allies08a-AI.lua b/mods/ra/maps/allies-08a/allies08a-AI.lua index e5bb5a0bfe..8b9b4f6119 100644 --- a/mods/ra/maps/allies-08a/allies08a-AI.lua +++ b/mods/ra/maps/allies-08a/allies08a-AI.lua @@ -167,6 +167,22 @@ Paradrop = function() Trigger.AfterDelay(DateTime.Minutes(ParadropDelays), Paradrop) end +GetBomberTargets = function() + if Difficulty ~= "hard" then + return Greece.GetActorsByTypes({ "apwr", "powr" }) + end + + local targets = Utils.Where(Greece.GetActors(), function(actor) + return + actor.HasProperty("Sell") and + actor.Type ~= "brik" and + actor.Type ~= "sbag" or + actor.Type == "pdox" + end) + + return targets +end + SendParabombs = function() local airfield = Airfield1 if Airfield1.IsDead or Airfield1.Owner ~= USSR then @@ -177,14 +193,7 @@ SendParabombs = function() airfield = Airfield2 end - local targets = Utils.Where(Greece.GetActors(), function(actor) - return - actor.HasProperty("Sell") and - actor.Type ~= "brik" and - actor.Type ~= "sbag" or - actor.Type == "pdox" or - actor.Type == "atek" - end) + local targets = GetBomberTargets() if #targets > 0 then airfield.TargetAirstrike(Utils.Random(targets).CenterPosition) diff --git a/mods/ra/maps/allies-08b/allies08b-AI.lua b/mods/ra/maps/allies-08b/allies08b-AI.lua index a809821782..d0821d75d5 100644 --- a/mods/ra/maps/allies-08b/allies08b-AI.lua +++ b/mods/ra/maps/allies-08b/allies08b-AI.lua @@ -167,6 +167,22 @@ Paradrop = function() Trigger.AfterDelay(DateTime.Minutes(ParadropDelays), Paradrop) end +GetBomberTargets = function() + if Difficulty ~= "hard" then + return Greece.GetActorsByTypes({ "apwr", "powr" }) + end + + local targets = Utils.Where(Greece.GetActors(), function(actor) + return + actor.HasProperty("Sell") and + actor.Type ~= "brik" and + actor.Type ~= "sbag" or + actor.Type == "pdox" + end) + + return targets +end + SendParabombs = function() local airfield = Airfield1 if Airfield1.IsDead or Airfield1.Owner ~= USSR then @@ -177,14 +193,7 @@ SendParabombs = function() airfield = Airfield2 end - local targets = Utils.Where(Greece.GetActors(), function(actor) - return - actor.HasProperty("Sell") and - actor.Type ~= "brik" and - actor.Type ~= "sbag" or - actor.Type == "pdox" or - actor.Type == "atek" - end) + local targets = GetBomberTargets() if #targets > 0 then airfield.TargetAirstrike(Utils.Random(targets).CenterPosition)