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 b508806d98..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,19 +79,27 @@ 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 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) + + if not Tanya.IsDead then + Tanya.Demolish(fturA) + Tanya.Demolish(fturB) + end + player.MarkCompletedObjective(sovietObjective4) end end) @@ -162,9 +170,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 +200,7 @@ Trigger.OnAllKilled(PrisonerGuards, function() Utils.Do(Engineers, function(actor) actor.Owner = player end) + Prisoner6.Owner = player player.MarkCompletedObjective(sovietObjective2) end) @@ -199,6 +210,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 +262,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 +284,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 +298,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 +310,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