From 7c84c666d791854926465b5d557275461c303816 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 2 Jan 2016 16:24:25 +0100 Subject: [PATCH 1/2] Add some empty lines to soviet07.lua for better readability --- mods/ra/maps/soviet-07/soviet07.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mods/ra/maps/soviet-07/soviet07.lua b/mods/ra/maps/soviet-07/soviet07.lua index b508806d98..5d8343e2a5 100644 --- a/mods/ra/maps/soviet-07/soviet07.lua +++ b/mods/ra/maps/soviet-07/soviet07.lua @@ -82,16 +82,19 @@ Trigger.OnEnteredFootprint(ControlCenterEngineerTrigger, function(a, id) Actor.Create("ftur", true, { Owner = player, Location = FTur1Goal.Location}) Actor.Create("ftur", true, { Owner = player, Location = FTur2Goal.Location}) Camera.Position = CameraGoalCenter1.CenterPosition + if not cameraGoalRightTrigger then Actor.Create("camera", true, { Owner = player, Location = CameraGoalCenter1.Location }) Actor.Create("camera", true, { Owner = player, Location = CameraGoalCenter2.Location }) Actor.Create("camera", true, { Owner = player, Location = CameraGoalCenter3.Location }) end + Utils.Do(GoalGuards, function(actor) if not actor.IsDead then actor.AttackMove(FTur1Goal.Location) end end) + player.MarkCompletedObjective(sovietObjective4) end end) @@ -162,9 +165,11 @@ Trigger.OnEnteredFootprint(RSoldierTrapTrigger, function(a, id) Actor.Create("camera", true, { Owner = player, Location = CameraRSoldier.Location }) Actor.Create("camera", true, { Owner = player, Location = CameraFTurBottom.Location }) end + if not RSoldier1.IsDead and not RSoldierTrap1.IsDead then RSoldier1.Attack(RSoldierTrap1) end + if not RSoldier2.IsDead and not RSoldierTrap2.IsDead then RSoldier2.Attack(RSoldierTrap2) end @@ -190,6 +195,7 @@ Trigger.OnAllKilled(PrisonerGuards, function() Utils.Do(Engineers, function(actor) actor.Owner = player end) + Prisoner6.Owner = player player.MarkCompletedObjective(sovietObjective2) end) @@ -199,6 +205,7 @@ Trigger.OnKilled(BarlCC, function() Actor.Create("camera", true, { Owner = player, Location = CameraCC.Location }) cameraCCTrigger = true end + Utils.Do(CCGuards, function(actor) if not actor.IsDead then actor.Hunt() @@ -250,10 +257,13 @@ end WorldLoaded = function() player = Player.GetPlayer("USSR") enemy = Player.GetPlayer("Greece") + Camera.Position = SoldierTrap1Waypoint1.CenterPosition Actor.Create("camera", true, { Owner = player, Location = CameraStart1.Location }) Actor.Create("camera", true, { Owner = player, Location = CameraStart2.Location }) + IntroSequence() + Trigger.OnObjectiveAdded(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) @@ -269,6 +279,7 @@ WorldLoaded = function() Trigger.OnPlayerLost(player, function() Media.PlaySpeechNotification(player, "Lose") end) + alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.") sovietObjective1 = player.AddPrimaryObjective("Deactivate the security system.") sovietObjective2 = player.AddPrimaryObjective("Rescue the engineers.") @@ -282,6 +293,7 @@ Tick = function() if player.HasNoRequiredUnits() and timerStarted then enemy.MarkCompletedObjective(alliedObjective) end + if remainingTime == DateTime.Minutes(5) and Map.Difficulty ~= "Hard" then Media.PlaySpeechNotification(player, "WarningFiveMinutesRemaining") elseif remainingTime == DateTime.Minutes(4) then @@ -293,9 +305,11 @@ Tick = function() elseif remainingTime == DateTime.Minutes(1) then Media.PlaySpeechNotification(player, "WarningOneMinuteRemaining") end + if goalLeft1Trigger and goalLeft2Trigger and goalRight1Trigger and goalRight2Trigger then player.MarkCompletedObjective(sovietObjective3) end + if remainingTime > 0 and timerStarted then UserInterface.SetMissionText("Time until Meltdown: " .. Utils.FormatTime(remainingTime), player.Color) remainingTime = remainingTime - 1 From 7934995a8fbbbc5c9c0e913a0c2bd470000d819b Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 2 Jan 2016 16:31:01 +0100 Subject: [PATCH 2/2] Let Tanya try to attack the flame turrets in soviet07 --- mods/ra/maps/soviet-07/map.yaml | 2 +- mods/ra/maps/soviet-07/soviet07.lua | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mods/ra/maps/soviet-07/map.yaml b/mods/ra/maps/soviet-07/map.yaml index ba19361181..d1ab60dbc1 100644 --- a/mods/ra/maps/soviet-07/map.yaml +++ b/mods/ra/maps/soviet-07/map.yaml @@ -668,7 +668,7 @@ Actors: Location: 99,56 Owner: Greece SubCell: 3 - GoalGuard5: e7 + Tanya: e7 Location: 75,54 Owner: Greece Facing: 128 diff --git a/mods/ra/maps/soviet-07/soviet07.lua b/mods/ra/maps/soviet-07/soviet07.lua index 5d8343e2a5..bfab5395ae 100644 --- a/mods/ra/maps/soviet-07/soviet07.lua +++ b/mods/ra/maps/soviet-07/soviet07.lua @@ -10,7 +10,7 @@ Dogs = { Dog1, Dog2, Dog3, Dog4, Dog5, Dog6, Dog7, Dog8, Dog9, Dog10, Dog11, Dog Engineers = { Prisoner1, Prisoner2, Prisoner3, Prisoner4, Prisoner5 } PrisonerGuards = { PrisonerGuard1, PrisonerGuard2, PrisonerGuard3 } EntranceGuards = { EntranceGuard1, EntranceGuard2, EntranceGuard3, EntranceGuard4, EntranceGuard5, EntranceGuard6, EntranceGuard7, EntranceGuard8, EntranceGuard9, EntranceGuard10 } -GoalGuards = { GoalGuard1, GoalGuard2, GoalGuard3, GoalGuard4, GoalGuard5 } +GoalGuards = { GoalGuard1, GoalGuard2, GoalGuard3, GoalGuard4 } CCGuards = { CCGuard1, CCGuard2, CCGuard3, CCGuard4 } StartingUnitsReinforcements = { "e1", "e1", "e1", "e1" } @@ -79,8 +79,8 @@ end) Trigger.OnEnteredFootprint(ControlCenterEngineerTrigger, function(a, id) if not controlCenterEngineerTrigger and a.Owner == player and a.Type == "e6" then controlCenterEngineerTrigger = true - Actor.Create("ftur", true, { Owner = player, Location = FTur1Goal.Location}) - Actor.Create("ftur", true, { Owner = player, Location = FTur2Goal.Location}) + local fturA = Actor.Create("ftur", true, { Owner = player, Location = FTur1Goal.Location}) + local fturB = Actor.Create("ftur", true, { Owner = player, Location = FTur2Goal.Location}) Camera.Position = CameraGoalCenter1.CenterPosition if not cameraGoalRightTrigger then @@ -95,6 +95,11 @@ Trigger.OnEnteredFootprint(ControlCenterEngineerTrigger, function(a, id) end end) + if not Tanya.IsDead then + Tanya.Demolish(fturA) + Tanya.Demolish(fturB) + end + player.MarkCompletedObjective(sovietObjective4) end end)