diff --git a/OpenRA.sln b/OpenRA.sln index 25b080b2bd..15ad78eaef 100644 --- a/OpenRA.sln +++ b/OpenRA.sln @@ -49,6 +49,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tiberian Dawn Lua scripts", mods\cnc\maps\nod07a\nod07a.lua = mods\cnc\maps\nod07a\nod07a.lua mods\cnc\maps\nod07b\nod07b-AI.lua = mods\cnc\maps\nod07b\nod07b-AI.lua mods\cnc\maps\nod07b\nod07b.lua = mods\cnc\maps\nod07b\nod07b.lua + mods\cnc\maps\nod07c\nod07c.lua = mods\cnc\maps\nod07c\nod07c.lua mods\cnc\maps\nod08a\nod08a-AI.lua = mods\cnc\maps\nod08a\nod08a-AI.lua mods\cnc\maps\nod08a\nod08a.lua = mods\cnc\maps\nod08a\nod08a.lua mods\cnc\maps\nod08b\nod08b-AI.lua = mods\cnc\maps\nod08b\nod08b-AI.lua diff --git a/mods/cnc/maps/nod07c/map.bin b/mods/cnc/maps/nod07c/map.bin new file mode 100644 index 0000000000..ee5a4a2e95 Binary files /dev/null and b/mods/cnc/maps/nod07c/map.bin differ diff --git a/mods/cnc/maps/nod07c/map.png b/mods/cnc/maps/nod07c/map.png new file mode 100644 index 0000000000..bff406443f Binary files /dev/null and b/mods/cnc/maps/nod07c/map.png differ diff --git a/mods/cnc/maps/nod07c/map.yaml b/mods/cnc/maps/nod07c/map.yaml new file mode 100644 index 0000000000..b5c8a3c14f --- /dev/null +++ b/mods/cnc/maps/nod07c/map.yaml @@ -0,0 +1,776 @@ +MapFormat: 11 + +RequiresMod: cnc + +Title: 07c: Orca Theft + +Author: Westwood Studios + +Tileset: DESERT + +MapSize: 64,64 + +Bounds: 4,4,55,56 + +Visibility: MissionSelector + +Categories: Campaign + +LockPreview: True + +Players: + PlayerReference@GDI: + Name: GDI + Faction: gdi + Color: F5D378 + Allies: Civilians, Target + Enemies: Nod + PlayerReference@Target: + Name: Target + Faction: gdi + Color: F5D378 + Allies: Civilians, GDI + PlayerReference@Neutral: + Name: Neutral + OwnsWorld: True + NonCombatant: True + Faction: gdi + PlayerReference@Civilians: + Name: Civilians + NonCombatant: True + Faction: gdi + Allies: GDI, Target + Enemies: Nod + PlayerReference@Nod: + Name: Nod + AllowBots: False + Playable: True + Required: True + LockFaction: True + Faction: nod + LockColor: True + Color: FE1100 + LockSpawn: True + LockTeam: True + Enemies: GDI, Civilians + +Actors: + Actor0: cycl + Location: 58,59 + Owner: GDI + Actor1: cycl + Location: 57,59 + Owner: GDI + Actor2: cycl + Location: 56,59 + Owner: GDI + Actor3: cycl + Location: 55,59 + Owner: GDI + Actor4: cycl + Location: 54,59 + Owner: GDI + Actor5: cycl + Location: 53,59 + Owner: GDI + Actor6: cycl + Location: 52,59 + Owner: GDI + Actor7: cycl + Location: 51,59 + Owner: GDI + Actor8: cycl + Location: 50,59 + Owner: GDI + Actor9: cycl + Location: 49,59 + Owner: GDI + Actor10: cycl + Location: 48,59 + Owner: GDI + Actor11: cycl + Location: 47,59 + Owner: GDI + Actor12: cycl + Location: 46,59 + Owner: GDI + Actor13: cycl + Location: 45,59 + Owner: GDI + Actor14: cycl + Location: 44,59 + Owner: GDI + Actor15: cycl + Location: 43,59 + Owner: GDI + Actor16: cycl + Location: 42,59 + Owner: GDI + Actor17: cycl + Location: 41,59 + Owner: GDI + Actor18: cycl + Location: 40,59 + Owner: GDI + Actor19: cycl + Location: 39,59 + Owner: GDI + Actor20: cycl + Location: 38,59 + Owner: GDI + Actor21: cycl + Location: 37,59 + Owner: GDI + Actor22: cycl + Location: 58,58 + Owner: GDI + Actor23: cycl + Location: 37,58 + Owner: GDI + Actor24: cycl + Location: 58,57 + Owner: GDI + Actor25: cycl + Location: 38,57 + Owner: GDI + Actor26: cycl + Location: 37,57 + Owner: GDI + Actor27: cycl + Location: 58,56 + Owner: GDI + Actor28: cycl + Location: 38,56 + Owner: GDI + Actor29: cycl + Location: 37,56 + Owner: GDI + Actor30: cycl + Location: 58,55 + Owner: GDI + Actor31: cycl + Location: 58,54 + Owner: GDI + Actor32: cycl + Location: 58,53 + Owner: GDI + Actor33: cycl + Location: 58,52 + Owner: GDI + Actor34: cycl + Location: 38,52 + Owner: GDI + Actor35: cycl + Location: 37,52 + Owner: GDI + Actor36: cycl + Location: 58,51 + Owner: GDI + Actor37: cycl + Location: 39,51 + Owner: GDI + Actor38: cycl + Location: 38,51 + Owner: GDI + Actor39: cycl + Location: 37,51 + Owner: GDI + Actor40: cycl + Location: 58,50 + Owner: GDI + Actor41: cycl + Location: 57,50 + Owner: GDI + Actor42: cycl + Location: 56,50 + Owner: GDI + Actor43: cycl + Location: 58,49 + Owner: GDI + Actor44: cycl + Location: 57,49 + Owner: GDI + Actor45: cycl + Location: 56,49 + Owner: GDI + Actor46: t08 + Location: 18,55 + Owner: Neutral + Actor47: t08 + Location: 18,53 + Owner: Neutral + Actor48: t08 + Location: 21,55 + Owner: Neutral + Actor49: t08 + Location: 23,51 + Owner: Neutral + Actor50: t08 + Location: 24,48 + Owner: Neutral + Actor51: t08 + Location: 18,35 + Owner: Neutral + Actor52: t08 + Location: 33,36 + Owner: Neutral + Actor53: rock1 + Location: 39,27 + Owner: Neutral + Actor54: rock1 + Location: 19,44 + Owner: Neutral + Actor55: t08 + Location: 53,10 + Owner: Neutral + Actor56: t08 + Location: 30,4 + Owner: Neutral + Actor57: t08 + Location: 15,8 + Owner: Neutral + Actor58: t08 + Location: 23,38 + Owner: Neutral + Actor59: t08 + Location: 40,7 + Owner: Neutral + Actor60: rock1 + Location: 32,6 + Owner: Neutral + Actor61: rock6 + Location: 12,24 + Owner: Neutral + Actor62: rock2 + Location: 35,48 + Owner: Neutral + Actor63: rock1 + Location: 38,38 + Owner: Neutral + Actor64: t08 + Location: 20,46 + Owner: Neutral + Actor65: t08 + Location: 37,34 + Owner: Neutral + Actor66: t08 + Location: 46,19 + Owner: Neutral + Actor67: t08 + Location: 11,25 + Owner: Neutral + Actor68: t18 + Location: 36,49 + Owner: Neutral + Actor69: t18 + Location: 39,42 + Owner: Neutral + Actor70: t08 + Location: 41,44 + Owner: Neutral + Actor71: t08 + Location: 25,41 + Owner: Neutral + Actor76: v21 + Location: 9,8 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor77: v20 + Location: 7,8 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor78: v30 + Location: 17,5 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor79: v28 + Location: 16,5 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor80: v27 + Location: 15,5 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor81: v27 + Location: 14,5 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor82: v26 + Location: 9,5 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor83: v24 + Location: 6,4 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor84: v22 + Location: 4,8 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor86: v25 + Location: 49,4 + Owner: Civilians + Health: 50 + ScriptTags: Village + Actor87: v22 + Location: 46,9 + Owner: Civilians + Health: 22 + ScriptTags: Village + Actor88: v21 + Location: 36,4 + Owner: Civilians + Health: 50 + ScriptTags: Village + Actor89: v20 + Location: 48,6 + Owner: Civilians + Health: 25 + ScriptTags: Village + Actor90: v19 + Location: 48,23 + Owner: Neutral + Actor91: v19 + Location: 47,23 + Owner: Neutral + Actor92: v19 + Location: 49,23 + Owner: Neutral + Actor93: v22 + Location: 45,5 + Owner: Civilians + Health: 43 + ScriptTags: Village + Actor94: v24 + Location: 34,4 + Owner: Civilians + Health: 50 + ScriptTags: Village + Actor95: v27 + Location: 44,8 + Owner: Civilians + Health: 25 + ScriptTags: Village + Actor96: v29 + Location: 54,9 + Owner: Civilians + Health: 43 + ScriptTags: Village + Actor97: v30 + Location: 52,8 + Owner: Civilians + Health: 45 + ScriptTags: Village + Actor104: v20 + Location: 41,7 + Owner: Civilians + Health: 43 + ScriptTags: Village + Actor105: v21 + Location: 50,10 + Owner: Civilians + Health: 25 + ScriptTags: Village + Actor106: v23 + Location: 43,7 + Owner: Civilians + Health: 98 + ScriptTags: Village + Actor107: v24 + Location: 39,7 + Owner: Civilians + Health: 45 + ScriptTags: Village + Actor108: v23 + Location: 38,7 + Owner: Civilians + Health: 51 + ScriptTags: Village + Actor111: jeep + Location: 40,57 + Owner: GDI + Actor112: jeep + Location: 39,57 + Owner: GDI + Actor113: mtnk + Location: 54,52 + Owner: GDI + Actor114: mtnk + Location: 44,45 + Owner: GDI + Facing: 32 + Actor115: mtnk + Location: 34,34 + Owner: GDI + Facing: 224 + Actor117: jeep + Location: 30,41 + Owner: GDI + Facing: 224 + Actor118: harv + Location: 26,43 + Owner: GDI + Facing: 224 + Actor125: e2 + Location: 46,57 + Owner: GDI + SubCell: 3 + Actor126: e2 + Location: 46,58 + Owner: GDI + SubCell: 1 + Actor127: e2 + Location: 45,58 + Owner: GDI + SubCell: 2 + Actor128: e2 + Location: 45,57 + Owner: GDI + SubCell: 4 + Actor129: e1 + Location: 43,58 + Owner: GDI + SubCell: 2 + Actor130: e1 + Location: 44,58 + Owner: GDI + SubCell: 1 + Actor131: e1 + Location: 44,57 + Owner: GDI + SubCell: 4 + Actor132: e1 + Location: 44,58 + Owner: GDI + SubCell: 2 + Actor133: e1 + Location: 44,57 + Owner: GDI + SubCell: 3 + Actor134: e1 + Location: 43,57 + Owner: GDI + SubCell: 4 + Actor135: e2 + Location: 34,57 + Owner: GDI + SubCell: 4 + Actor136: e1 + Location: 34,57 + Owner: GDI + SubCell: 1 + Actor141: e2 + Location: 35,52 + Owner: GDI + Facing: 192 + SubCell: 1 + Actor150: e1 + Location: 25,37 + Owner: GDI + SubCell: 0 + Actor151: e1 + Location: 7,32 + Owner: GDI + SubCell: 0 + Actor152: e1 + Location: 7,31 + Owner: GDI + SubCell: 3 + Actor153: e2 + Location: 18,51 + Owner: GDI + SubCell: 0 + Actor154: e1 + Location: 18,50 + Owner: GDI + SubCell: 0 + Actor155: e1 + Location: 17,50 + Owner: GDI + SubCell: 3 + Actor156: e2 + Location: 21,28 + Owner: GDI + SubCell: 2 + Actor157: c9 + Location: 51,9 + Owner: Civilians + SubCell: 4 + ScriptTags: Village + Actor158: c5 + Location: 46,7 + Owner: Civilians + SubCell: 2 + ScriptTags: Village + Actor159: c2 + Location: 47,7 + Owner: Civilians + SubCell: 2 + ScriptTags: Village + Actor160: c1 + Location: 47,6 + Owner: Civilians + SubCell: 0 + ScriptTags: Village + Actor161: e2 + Location: 17,20 + Owner: GDI + Facing: 64 + SubCell: 1 + Actor162: e2 + Location: 17,19 + Owner: GDI + Facing: 64 + SubCell: 1 + Actor163: e1 + Location: 24,37 + Owner: GDI + SubCell: 2 + Actor164: e1 + Location: 34,51 + Owner: GDI + Facing: 128 + SubCell: 2 + Actor165: e1 + Location: 51,40 + Owner: GDI + SubCell: 1 + Actor166: e1 + Location: 49,38 + Owner: GDI + SubCell: 1 + Actor167: e2 + Location: 49,40 + Owner: GDI + SubCell: 1 + Actor168: e2 + Location: 50,42 + Owner: GDI + SubCell: 0 + Actor169: e2 + Location: 56,44 + Owner: GDI + SubCell: 4 + Actor170: e1 + Location: 22,57 + Owner: GDI + Facing: 160 + SubCell: 2 + Actor171: e2 + Location: 21,58 + Owner: GDI + Facing: 160 + SubCell: 2 + Actor172: e1 + Location: 44,6 + Owner: GDI + SubCell: 1 + Actor177: e1 + Location: 45,6 + Owner: GDI + SubCell: 1 + Actor178: e1 + Location: 45,7 + Owner: GDI + SubCell: 4 + Actor179: e1 + Location: 51,52 + Owner: GDI + SubCell: 2 + Actor180: e1 + Location: 52,52 + Owner: GDI + SubCell: 1 + Actor181: e1 + Location: 52,52 + Owner: GDI + SubCell: 3 + Actor182: e1 + Location: 51,52 + Owner: GDI + SubCell: 4 + Actor183: e2 + Location: 53,52 + Owner: GDI + SubCell: 1 + Actor184: e2 + Location: 53,52 + Owner: GDI + SubCell: 2 + Actor185: e2 + Location: 53,52 + Owner: GDI + SubCell: 4 + Actor186: e2 + Location: 53,52 + Owner: GDI + SubCell: 3 + Actor187: e1 + Location: 48,57 + Owner: GDI + SubCell: 3 + Actor188: e1 + Location: 47,57 + Owner: GDI + SubCell: 4 + waypoint27: waypoint + Location: 37,25 + Owner: Neutral + waypoint26: waypoint + Location: 39,22 + Owner: Neutral + waypoint25: waypoint + Location: 46,6 + Owner: Neutral + waypoint24: waypoint + Location: 43,6 + Owner: Neutral + waypoint18: waypoint + Location: 45,57 + Owner: Neutral + waypoint15: waypoint + Location: 37,55 + Owner: Neutral + waypoint14: waypoint + Location: 54,46 + Owner: Neutral + waypoint13: waypoint + Location: 12,7 + Owner: Neutral + waypoint12: waypoint + Location: 49,58 + Owner: Neutral + waypoint11: waypoint + Location: 52,24 + Owner: Neutral + waypoint10: waypoint + Location: 27,33 + Owner: Neutral + waypoint9: waypoint + Location: 21,37 + Owner: Neutral + waypoint8: waypoint + Location: 27,33 + Owner: Neutral + waypoint7: waypoint + Location: 16,56 + Owner: Neutral + waypoint6: waypoint + Location: 14,48 + Owner: Neutral + waypoint5: waypoint + Location: 18,41 + Owner: Neutral + waypoint4: waypoint + Location: 11,35 + Owner: Neutral + waypoint3: waypoint + Location: 20,31 + Owner: Neutral + waypoint2: waypoint + Location: 24,35 + Owner: Neutral + waypoint1: waypoint + Location: 31,43 + Owner: Neutral + waypoint0: waypoint + Location: 31,54 + Owner: Neutral + ReinforcementsHelicopter1Rally: waypoint + Owner: Neutral + Location: 37,23 + ReinforcementsHelicopter2Rally: waypoint + Owner: Neutral + Location: 40,23 + GDIBuilding1: fact + Location: 43,49 + Owner: GDI + ScriptTags: GDIBuilding + GDIBuilding2: nuke + Location: 47,51 + Owner: GDI + ScriptTags: GDIBuilding + GDIBuilding3: proc + Location: 41,52 + Owner: GDI + FreeActor: False + ScriptTags: GDIBuilding + GDIBuilding4: silo + Location: 49,52 + Owner: GDI + ScriptTags: GDIBuilding + GDIBuilding5: nuke + Location: 56,53 + Owner: GDI + ScriptTags: GDIBuilding + GDIBuilding6: hq + Location: 46,48 + Owner: GDI + ScriptTags: GDIBuilding + GDIBuilding7: pyle + Location: 45,52 + Owner: GDI + ScriptTags: GDIBuilding + GDIBuilding8: weap + Location: 48,53 + Owner: GDI + ScriptTags: GDIBuilding + GDIBuilding9: gtwr + Location: 36,51 + Owner: GDI + GDIBuilding10: gtwr + Location: 36,57 + Owner: GDI + GDIBuilding11: gtwr + Location: 55,48 + Owner: GDI + GDIHpad: hpad.in + Location: 56,56 + Owner: Target + GDIOrca: orca.in + Owner: Target + Location: 56,56 + CenterPosition: 58450,58025,0 + Facing: 230 + GunboatRight: waypoint + Owner: Neutral + Location: 58,16 + GunboatLeft: waypoint + Owner: Neutral + Location: 4,16 + Gunboat: boat + Location: 32,16 + Owner: GDI + Facing: 192 + ReinforcementsTopSpawn: waypoint + Owner: Neutral + Location: 58,24 + ReinforcementsBottomSpawn: waypoint + Owner: Neutral + Location: 58,26 + ReinforcementsTankRally: waypoint + Owner: Neutral + Location: 48,27 + ReinforcementsEngineersRally: waypoint + Owner: Neutral + Location: 49,26 + ReinforcementsGunnersRally: waypoint + Owner: Neutral + Location: 50,26 + ReinforcementsRocketsRally: waypoint + Owner: Neutral + Location: 49,27 + ReinforcementsFlamersRally: waypoint + Owner: Neutral + Location: 50,27 + +Rules: cnc|rules/campaign-maprules.yaml, cnc|rules/campaign-tooltips.yaml, cnc|rules/campaign-palettes.yaml, rules.yaml diff --git a/mods/cnc/maps/nod07c/nod07c.lua b/mods/cnc/maps/nod07c/nod07c.lua new file mode 100644 index 0000000000..0b1d4a2da9 --- /dev/null +++ b/mods/cnc/maps/nod07c/nod07c.lua @@ -0,0 +1,207 @@ +NodUnitsVehicles1 = { 'bggy', 'bggy', 'bike', 'bike' } +NodUnitsVehicles2 = { 'ltnk', 'ltnk' } +NodUnitsEngineers = { 'e6', 'e6', 'e6', 'e6' } +NodUnitsRockets = { 'e3', 'e3', 'e3', 'e3' } +NodUnitsGunners = { 'e1', 'e1', 'e1', 'e1' } +NodUnitsFlamers = { 'e4', 'e4', 'e4', 'e4' } + +GDI1 = { units = { ['e1'] = 2 }, waypoints = { waypoint0.Location, waypoint1.Location, waypoint2.Location, waypoint8.Location, waypoint2.Location, waypoint9.Location, waypoint2.Location } } +GDI2 = { units = { ['e1'] = 10, ['e2'] = 8, ['mtnk'] = 1, ['jeep'] = 1 }, waypoints = { waypoint12.Location, waypoint15.Location, waypoint0.Location } } +GDI3 = { units = { ['jeep'] = 1 }, waypoints = { waypoint0.Location, waypoint1.Location, waypoint3.Location, waypoint4.Location, waypoint3.Location, waypoint2.Location, waypoint5.Location, waypoint6.Location, waypoint2.Location, waypoint7.Location } } +MTANK = { units = { ['mtnk'] = 1 }, waypoints = { waypoint14.Location, waypoint5.Location } } + +GunboatPatrolPath = { GunboatLeft.Location, GunboatRight.Location } + +targetsKilled = 0 + +AutoGuard = function(guards) + Utils.Do(guards, function(guard) + Trigger.OnDamaged(guard, function(guard, attacker) + if not guard.IsDead then + guard.Hunt() + end + end) + end) +end + +InsertNodUnits = function() + Media.PlaySpeechNotification(player, "Reinforce") + Reinforcements.Reinforce(player, { 'ltnk' }, { ReinforcementsTopSpawn.Location, ReinforcementsTankRally.Location }, 1) + local Engineers = Reinforcements.Reinforce(player, NodUnitsEngineers, { ReinforcementsTopSpawn.Location, ReinforcementsEngineersRally.Location }, 10) + Reinforcements.Reinforce(player, NodUnitsRockets, { ReinforcementsBottomSpawn.Location, ReinforcementsRocketsRally.Location }, 10) + Trigger.AfterDelay(DateTime.Seconds(3), function() + Reinforcements.Reinforce(player, NodUnitsGunners, { ReinforcementsBottomSpawn.Location, ReinforcementsGunnersRally.Location }, 10) + Reinforcements.Reinforce(player, NodUnitsFlamers, { ReinforcementsTopSpawn.Location, ReinforcementsFlamersRally.Location }, 10) + end) + Trigger.AfterDelay(DateTime.Seconds(5), function() + local unitsA = Reinforcements.ReinforceWithTransport(player, 'tran.in', NodUnitsVehicles1, { GunboatRight.Location, ReinforcementsHelicopter1Rally.Location }, { GunboatRight.Location })[2] + + Trigger.AfterDelay(DateTime.Seconds(3), function() + local unitsB = Reinforcements.ReinforceWithTransport(player, 'tran.in', NodUnitsVehicles2, { GunboatRight.Location, ReinforcementsHelicopter2Rally.Location }, { GunboatRight.Location })[2] + + Utils.Do(unitsB, function(unit) + unitsA[#unitsA + 1] = unit + end) + + Trigger.OnAllKilled(unitsA, function() + if not defendersActive then + defendersActive = true + player.MarkFailedObjective(NodObjective4) + end + end) + end) + end) + + Trigger.OnAllRemovedFromWorld(Engineers, function() + if not player.IsObjectiveCompleted(NodObjective1) then + player.MarkFailedObjective(NodObjective1) + end + end) +end + +DiscoveredSideEntrance = function(_,discoverer) + if not defendersActive then + defendersActive = true + player.MarkFailedObjective(NodObjective4) + end +end + +DiscoveredMainEntrance = function(_,discoverer) + if not defendersActive then + SendDefenders(GDI2) + end +end + +SendDefenders = function(team) + defendersActive = true + player.MarkCompletedObjective(NodObjective4) + + Trigger.AfterDelay(DateTime.Seconds(3), function() + for type, amount in pairs(team.units) do + local actors = Utils.Take(amount, enemy.GetActorsByType(type)) + Utils.Do(actors, function(actor) + if actor.IsIdle then + actor.AttackMove(waypoint0.Location) + end + end) + end + end) +end + +SendGuards = function(team) + for type, amount in pairs(team.units) do + local actors = Utils.Take(amount, enemy.GetActorsByType(type)) + Utils.Do(actors, function(actor) + if actor.IsIdle then + actor.Patrol(team.waypoints, true, DateTime.Seconds(25)) + end + end) + end +end + +Trigger.OnKilled(Gunboat, function() + GunboatCamera.Destroy() +end) + +Trigger.OnKilled(GDIHpad, function() + if not player.IsObjectiveCompleted(NodObjective1) then + player.MarkFailedObjective(NodObjective1) + end +end) + +Trigger.OnKilled(GDIOrca, function() + if not player.IsObjectiveCompleted(NodObjective3) then + player.MarkFailedObjective(NodObjective3) + end +end) + +Trigger.OnDamaged(GDIBuilding11, function() + SendGuards(MTANK) +end) + +Utils.Do(Map.ActorsWithTag("Village"), function(actor) + Trigger.OnKilled(actor, function() + targetsKilled = targetsKilled + 1 + end) +end) + +Utils.Do(Map.ActorsWithTag("GDIBuilding"), function(actor) + Trigger.OnKilledOrCaptured(actor, function() + player.MarkFailedObjective(NodObjective2) + end) +end) + +Trigger.OnCapture(GDIHpad, function() + hpadCaptured = true + player.MarkCompletedObjective(NodObjective1) + if not GDIOrca.IsDead then + GDIOrca.Owner = player + end + Actor.Create("camera", true, { Owner = player, Location = waypoint25.Location }) + Actor.Create("flare", true, { Owner = player, Location = waypoint25.Location }) +end) + +WorldLoaded = function() + player = Player.GetPlayer("Nod") + enemy = Player.GetPlayer("GDI") + + Camera.Position = waypoint26.CenterPosition + + GunboatCamera = Actor.Create("camera.boat", true, { Owner = player, Location = Gunboat.Location }) + InsertNodUnits() + + SendGuards(GDI1) + SendGuards(GDI3) + AutoGuard(enemy.GetGroundAttackers()) + + Trigger.OnObjectiveAdded(player, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") + end) + + Trigger.OnObjectiveCompleted(player, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") + end) + + Trigger.OnObjectiveFailed(player, function(p, id) + Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") + end) + + Trigger.OnPlayerWon(player, function() + Media.PlaySpeechNotification(player, "Win") + end) + + Trigger.OnPlayerLost(player, function() + Media.PlaySpeechNotification(player, "Lose") + end) + + Trigger.OnIdle(Gunboat, function() Gunboat.Patrol(GunboatPatrolPath) end) + + Trigger.OnDiscovered(GDIBuilding9, DiscoveredMainEntrance) + Trigger.OnDiscovered(GDIBuilding10, DiscoveredMainEntrance) + Trigger.OnDiscovered(GDIBuilding11, DiscoveredSideEntrance) + + NodObjective1 = player.AddPrimaryObjective("Capture the GDI helipad.") + NodObjective2 = player.AddPrimaryObjective("Don't capture or destroy any other\nGDI main building.") + NodObjective3 = player.AddPrimaryObjective("Use the GDI orca to wreak havoc at the village.") + NodObjective4 = player.AddSecondaryObjective("Distract the guards by attacking the\nmain entrance with your vehicles.") + GDIObjective = enemy.AddPrimaryObjective("Kill all enemies.") +end + +Tick = function() + if not Gunboat.IsDead then + GunboatCamera.Teleport(Gunboat.Location) + end + + if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then + enemy.MarkCompletedObjective(GDIObjective) + end + + if targetsKilled >= 15 then + player.MarkCompletedObjective(NodObjective2) + player.MarkCompletedObjective(NodObjective3) + end + + if enemy.Resources >= enemy.ResourceCapacity * 0.75 then + enemy.Resources = enemy.ResourceCapacity * 0.25 + end +end diff --git a/mods/cnc/maps/nod07c/rules.yaml b/mods/cnc/maps/nod07c/rules.yaml new file mode 100644 index 0000000000..6150b167fc --- /dev/null +++ b/mods/cnc/maps/nod07c/rules.yaml @@ -0,0 +1,155 @@ +World: + LuaScript: + Scripts: nod07c.lua + MusicPlaylist: + StartingMusic: justdoit + VictoryMusic: nod_win1 + MissionData: + Briefing: GDI has left themselves open to the deadliest weapon of all, information.\n\nOur spies tell us the GDI base in your area contains an advanced attack helicopter, the Orca.\n\nSteal this weapon, then fly to the nearby village and destroy it.\n\nThe attack will be blamed on GDI. + BriefingVideo: nod7b.vqa + StartVideo: bcanyon.vqa + LossVideo: flag.vqa + SmudgeLayer@CRATER: + InitialSmudges: + cr1 40,22 2 + +Player: + EnemyWatcher: + PlayerResources: + DefaultCash: 0 + +^CivBuilding: + ScriptTags: + +^CivInfantry: + ScriptTags: + +^BaseBuilding: + AnnounceOnSeen: + ScriptTags: + +CYCL: + Buildable: + Prerequisites: ~disabled + +NUK2: + Buildable: + Prerequisites: ~disabled + +BRIK: + Buildable: + Prerequisites: ~disabled + +EYE: + Buildable: + Prerequisites: ~disabled + +GUN: + Buildable: + Prerequisites: ~disabled + +ORCA: + Buildable: + Prerequisites: ~disabled + +OBLI: + Buildable: + Prerequisites: ~disabled + +TMPL: + Buildable: + Prerequisites: ~disabled + +E2: + Buildable: + Prerequisites: ~pyle + +E5: + Buildable: + Prerequisites: ~disabled + +HARV: + Harvester: + SearchFromOrderRadius: 30 + +HTNK: + Buildable: + Prerequisites: ~disabled + +RMBO: + Buildable: + Prerequisites: ~disabled + +MCV: + Buildable: + Prerequisites: ~disabled + +FTNK: + Buildable: + Prerequisites: ~disabled + +MLRS: + Buildable: + Prerequisites: ~disabled + +MSAM: + Buildable: + Prerequisites: ~disabled + +ATWR: + Buildable: + Prerequisites: ~disabled + +HELI: + Buildable: + Prerequisites: ~disabled + +TRAN: + Buildable: + Prerequisites: ~disabled + +HQ: + AirstrikePower: + Prerequisites: gdi + +BOAT: + Health: + HP: 1500 + +TRAN.IN: + Inherits: TRAN + RejectsOrders: + -Selectable: + RenderSprites: + Image: TRAN + Buildable: + Prerequisites: ~disabled + +Camera.Boat: + AlwaysVisible: + Mobile: + TerrainSpeeds: + RevealsShroud: + Range: 4c0 + ScriptTriggers: + +HPAD.IN: + Inherits: HPAD + RenderSprites: + Image: hpad + Buildable: + Prerequisites: ~disabled + ProvidesPrerequisite: + Prerequisite: hpad + Capturable: + CaptureThreshold: 100 + Building: + Footprint: x_ xx + -Sellable: + -Power: + +ORCA.IN: + Inherits: ORCA + RenderSprites: + Image: ORCA + -AutoTarget: diff --git a/mods/cnc/missions.yaml b/mods/cnc/missions.yaml index f76654083d..e5a597d0ef 100644 --- a/mods/cnc/missions.yaml +++ b/mods/cnc/missions.yaml @@ -24,6 +24,7 @@ Nod Campaign: ./mods/cnc/maps/nod06c ./mods/cnc/maps/nod07a ./mods/cnc/maps/nod07b + ./mods/cnc/maps/nod07c ./mods/cnc/maps/nod08a ./mods/cnc/maps/nod08b ./mods/cnc/maps/nod09