diff --git a/mods/ra/maps/fort-lonestar/fort-lonestar.lua b/mods/ra/maps/fort-lonestar/fort-lonestar.lua index a6f22481cb..ff91aac9ce 100644 --- a/mods/ra/maps/fort-lonestar/fort-lonestar.lua +++ b/mods/ra/maps/fort-lonestar/fort-lonestar.lua @@ -99,9 +99,7 @@ Waves = } SendUnits = function(entryCell, unitTypes, interval, targetCell) - local i = 0 - Utils.Do(unitTypes, function(type) - local a = Actor.Create(type, false, { Owner = soviets, Location = entryCell }) + Reinforcements.Reinforce(soviets, unitTypes, { entryCell }, interval, function(a) Trigger.OnIdle(a, function(a) if a.Location ~= targetCell then a.AttackMove(targetCell) @@ -109,15 +107,13 @@ SendUnits = function(entryCell, unitTypes, interval, targetCell) a.Hunt() end end) - Trigger.AfterDelay(i * interval, function() a.IsInWorld = true end) - i = i + 1 end) if (Wave < #Waves) then SendWave() else - Trigger.AfterDelay(3000, SovietsRetreating) - Media.DisplayMessage("You survived the onslaught!") + Trigger.AfterDelay(DateTime.Minutes(2), SovietsRetreating) + Media.DisplayMessage("You survived the onslaught! No more waves incoming.") end end @@ -130,8 +126,17 @@ SendWave = function() local units = wave[3] local target = Utils.Random(wave[4]).Location - print(string.format("Sending wave %i in %i.", Wave, delay)) - Trigger.AfterDelay(delay, function() SendUnits(entry, units, 40, target) end) + Trigger.AfterDelay(delay, function() + SendUnits(entry, units, 40, target) + + if not played then + played = true + Utils.Do(players, function(player) + Media.PlaySpeechNotification(player, "EnemyUnitsApproaching") + end) + Trigger.AfterDelay(DateTime.Seconds(1), function() played = false end) + end + end) end SovietsRetreating = function() @@ -144,6 +149,11 @@ end WorldLoaded = function() soviets = Player.GetPlayer("Soviets") + players = { } + for i = 0, 4, 1 do + local player = Player.GetPlayer("Multi" ..i) + players[i] = player + end Utils.Do(Snipers, function(a) if a.Owner == soviets then diff --git a/mods/ra/maps/fort-lonestar/map.yaml b/mods/ra/maps/fort-lonestar/map.yaml index 0fea14e5c3..f4e00de4ce 100644 --- a/mods/ra/maps/fort-lonestar/map.yaml +++ b/mods/ra/maps/fort-lonestar/map.yaml @@ -292,9 +292,6 @@ Actors: Actor199: brik Location: 27,39 Owner: Neutral - Spawn1: mpspawn - Location: 36,28 - Owner: Neutral Actor28: tc01 Location: 24,54 Owner: Neutral @@ -337,9 +334,6 @@ Actors: Actor90: brik Location: 36,39 Owner: Neutral - OilDerrick1: oilb - Location: 32,30 - Owner: Multi0 Actor237: brik Location: 25,35 Owner: Neutral @@ -364,6 +358,75 @@ Actors: Actor88: brik Location: 25,29 Owner: Neutral + Actor100: barr + Location: 27,26 + Owner: Multi3 + Actor99: barr + Location: 27,36 + Owner: Multi2 + Actor31: barr + Location: 36,36 + Owner: Multi1 + Sniper1: sniper.soviets + Location: 9,26 + Owner: Soviets + Sniper2: sniper.soviets + Location: 10,21 + Owner: Soviets + Sniper3: sniper.soviets + Location: 26,9 + Owner: Soviets + Sniper4: sniper.soviets + Location: 40,10 + Owner: Soviets + Sniper5: sniper.soviets + Location: 53,21 + Owner: Soviets + Sniper6: sniper.soviets + Location: 54,25 + Owner: Soviets + Sniper7: sniper.soviets + Location: 53,40 + Owner: Soviets + Sniper8: sniper.soviets + Location: 54,43 + Owner: Soviets + Sniper9: sniper.soviets + Location: 54,46 + Owner: Soviets + Sniper10: sniper.soviets + Location: 43,53 + Owner: Soviets + Sniper11: sniper.soviets + Location: 8,36 + Owner: Soviets + Sniper12: sniper.soviets + Location: 28,55 + Owner: Soviets + OilDerrick1: oilb + Location: 32,30 + Owner: Multi0 + OilDerrick2: oilb + Location: 32,32 + Owner: Multi1 + OilDerrick3: oilb + Location: 30,32 + Owner: Multi2 + OilDerrick4: oilb + Location: 30,30 + Owner: Multi3 + Spawn1: mpspawn + Location: 36,28 + Owner: Neutral + Spawn2: mpspawn + Location: 27,28 + Owner: Neutral + Spawn3: mpspawn + Location: 27,38 + Owner: Neutral + Spawn4: mpspawn + Location: 36,38 + Owner: Neutral Entry1: waypoint Location: 8,8 Owner: Neutral @@ -400,81 +463,18 @@ Actors: Paradrop4: waypoint Location: 36,32 Owner: Neutral + Patrol1: waypoint + Location: 32,18 + Owner: Neutral + Patrol2: waypoint + Location: 17,32 + Owner: Neutral Patrol3: waypoint Location: 32,46 Owner: Neutral Patrol4: waypoint Location: 46,32 Owner: Neutral - Patrol2: waypoint - Location: 17,32 - Owner: Neutral - Patrol1: waypoint - Location: 32,18 - Owner: Neutral - Sniper1: sniper - Location: 9,26 - Owner: Soviets - Sniper2: sniper - Location: 10,21 - Owner: Soviets - Sniper3: sniper - Location: 26,9 - Owner: Soviets - Sniper4: sniper - Location: 40,10 - Owner: Soviets - Sniper5: sniper - Location: 53,21 - Owner: Soviets - Sniper6: sniper - Location: 54,25 - Owner: Soviets - Sniper7: sniper - Location: 53,40 - Owner: Soviets - Sniper8: sniper - Location: 54,43 - Owner: Soviets - Sniper9: sniper - Location: 54,46 - Owner: Soviets - Sniper10: sniper - Location: 43,53 - Owner: Soviets - Sniper11: sniper - Location: 8,36 - Owner: Soviets - Sniper12: sniper - Location: 28,55 - Owner: Soviets - Actor100: barr - Location: 27,26 - Owner: Multi3 - Actor99: barr - Location: 27,36 - Owner: Multi2 - Actor31: barr - Location: 36,36 - Owner: Multi1 - OilDerrick2: oilb - Location: 32,32 - Owner: Multi1 - OilDerrick3: oilb - Location: 30,32 - Owner: Multi2 - OilDerrick4: oilb - Location: 30,30 - Owner: Multi3 - Spawn2: mpspawn - Location: 27,28 - Owner: Neutral - Spawn3: mpspawn - Location: 27,38 - Owner: Neutral - Spawn4: mpspawn - Location: 36,38 - Owner: Neutral Smudges: @@ -510,12 +510,6 @@ Rules: InitialCash: 50 ClassicProductionQueue@Infantry: BuildSpeed: 1 - ^Infantry: - MustBeDestroyed: - ^Vehicle: - MustBeDestroyed: - ^Tank: - MustBeDestroyed: OILB: Health: HP: 3000 @@ -555,39 +549,6 @@ Rules: Type: Heavy Power: Amount: 0 - HBOX: - Buildable: - Prerequisites: ~disabled - GUN: - Buildable: - Prerequisites: ~disabled - SAM: - Buildable: - Prerequisites: ~disabled - SBAG: - Buildable: - Prerequisites: ~disabled - FENC: - Buildable: - Prerequisites: ~disabled - MSLO: - Buildable: - Prerequisites: ~disabled - GAP: - Buildable: - Prerequisites: ~disabled - IRON: - Buildable: - Prerequisites: ~disabled - PDOX: - Buildable: - Prerequisites: ~disabled - AGUN: - Buildable: - Prerequisites: ~disabled - TSLA: - Buildable: - Prerequisites: ~disabled DOG: Buildable: Prerequisites: barracks @@ -633,12 +594,6 @@ Rules: Recoil: 200 RecoilRecovery: 38 LocalOffset: 0,85,0, 0,-85,0 - MECH: - Buildable: - Prerequisites: ~disabled - HIJACKER: - Buildable: - Prerequisites: ~disabled MEDI: Buildable: Prerequisites: barracks @@ -658,6 +613,13 @@ Rules: HP: 200 AutoTarget: InitialStance: Defend + SNIPER.soviets: + Inherits: SNIPER + Buildable: + Prerequisites: ~disabled + RenderInfantry: + Image: SNIPER + MustBeDestroyed: InvulnerabilityUpgrade@UNKILLABLE: UpgradeTypes: unkillable UpgradeMinEnabledLevel: 1 @@ -707,9 +669,6 @@ Rules: Ticks: 1 HealIfBelow: 40% DamageCooldown: 150 - BRIK: - Buildable: - Prerequisites: ~disabled BADR.Bomber: Inherits: ^Plane AttackBomber: @@ -732,6 +691,48 @@ Rules: Tooltip: Name: Mig Bomber -EjectOnDeath: + BRIK: + Buildable: + Prerequisites: ~disabled + HBOX: + Buildable: + Prerequisites: ~disabled + GUN: + Buildable: + Prerequisites: ~disabled + SAM: + Buildable: + Prerequisites: ~disabled + SBAG: + Buildable: + Prerequisites: ~disabled + FENC: + Buildable: + Prerequisites: ~disabled + MSLO: + Buildable: + Prerequisites: ~disabled + GAP: + Buildable: + Prerequisites: ~disabled + IRON: + Buildable: + Prerequisites: ~disabled + PDOX: + Buildable: + Prerequisites: ~disabled + AGUN: + Buildable: + Prerequisites: ~disabled + TSLA: + Buildable: + Prerequisites: ~disabled + MECH: + Buildable: + Prerequisites: ~disabled + HIJACKER: + Buildable: + Prerequisites: ~disabled Sequences: diff --git a/mods/ra/notifications.yaml b/mods/ra/notifications.yaml index b96f0f2863..f0bf6af55d 100644 --- a/mods/ra/notifications.yaml +++ b/mods/ra/notifications.yaml @@ -48,6 +48,7 @@ Speech: ControlCenterDeactivated: cntlded1 OperationControlTerminated: opterm1 MissionTimerInitialised: mtimein1 + EnemyUnitsApproaching: enmyapp1 Sounds: Notifications: