From 2ea3b77b7ac3a293eb988b9a5957f78696e9eccf Mon Sep 17 00:00:00 2001 From: Scott_NZ Date: Mon, 17 Dec 2012 01:25:55 +1300 Subject: [PATCH] Create new actors so the effects aren't carried over to built units in Allies 04. Make yak buildable by Allies again in Allies 02. Make STEK autotargetignore in Allies 01. Make MISS autotargetignore in Allies 04. --- OpenRA.Mods.RA/Missions/Allies04Script.cs | 22 +++-- mods/ra/maps/allies-01/map.yaml | 2 + mods/ra/maps/allies-03/map.yaml | 3 + mods/ra/maps/allies-04/map.yaml | 112 ++++++++++++++++++++-- 4 files changed, 121 insertions(+), 18 deletions(-) diff --git a/OpenRA.Mods.RA/Missions/Allies04Script.cs b/OpenRA.Mods.RA/Missions/Allies04Script.cs index d2335c04de..921f7b35a7 100644 --- a/OpenRA.Mods.RA/Missions/Allies04Script.cs +++ b/OpenRA.Mods.RA/Missions/Allies04Script.cs @@ -150,13 +150,15 @@ namespace OpenRA.Mods.RA.Missions { MissionFailed("The research laboratory was destroyed."); } - else if (!world.Actors.Any(a => (a.Owner == allies1 || a.Owner == allies2) && !a.IsDead() && (a.HasTrait() && !a.HasTrait()) || a.HasTrait())) + else if (!world.Actors.Any(a => (a.Owner == allies1 || a.Owner == allies2) && !a.IsDead() + && (a.HasTrait() && !a.HasTrait()) || a.HasTrait())) { objectives[DestroyID].Status = ObjectiveStatus.Failed; OnObjectivesUpdated(true); MissionFailed("The remaining Allied forces in the area have been wiped out."); } - else if (!world.Actors.Any(a => a.Owner == soviets && a.IsInWorld && !a.IsDead() && a.HasTrait() && !a.HasTrait() && a != lab) + else if (!world.Actors.Any(a => a.Owner == soviets && a.IsInWorld && !a.IsDead() + && a.HasTrait() && !a.HasTrait() && !a.HasTrait() && a != lab) && objectives[InfiltrateID].Status == ObjectiveStatus.Completed) { objectives[DestroyID].Status = ObjectiveStatus.Completed; @@ -206,7 +208,7 @@ namespace OpenRA.Mods.RA.Missions void SendReinforcements() { - var lst = world.CreateActor("lst", new TypeDictionary + var lst = world.CreateActor("lst.unselectable", new TypeDictionary { new OwnerInit(allies1), new LocationInit(reinforcementsEntryPoint.Location) @@ -247,12 +249,12 @@ namespace OpenRA.Mods.RA.Missions void SendHind(CPos start, IEnumerable points, CPos exit) { - var hind = world.CreateActor("hind", new TypeDictionary + var hind = world.CreateActor("hind.autotarget", new TypeDictionary { new OwnerInit(soviets), new LocationInit(start), new FacingInit(Util.GetFacing(points.First().ToCPos() - start, 0)), - new AltitudeInit(Rules.Info["hind"].Traits.Get().CruiseAltitude), + new AltitudeInit(Rules.Info["hind.autotarget"].Traits.Get().CruiseAltitude), }); foreach (var point in points.Concat(new[] { Util.CenterOfCell(exit) })) { @@ -263,16 +265,16 @@ namespace OpenRA.Mods.RA.Missions void InsertSpies() { - var lst = world.CreateActor("lst", new TypeDictionary + var lst = world.CreateActor("lst.unselectable", new TypeDictionary { new OwnerInit(allies1), new LocationInit(lstEntryPoint.Location) }); - allies1Spy = world.CreateActor(false, "spy", new TypeDictionary { new OwnerInit(allies1) }); + allies1Spy = world.CreateActor(false, "spy.strong", new TypeDictionary { new OwnerInit(allies1) }); lst.Trait().Load(lst, allies1Spy); if (allies1 != allies2) { - allies2Spy = world.CreateActor(false, "spy", new TypeDictionary { new OwnerInit(allies2) }); + allies2Spy = world.CreateActor(false, "spy.strong", new TypeDictionary { new OwnerInit(allies2) }); lst.Trait().Load(lst, allies2Spy); } lst.QueueActivity(new Move.Move(lstUnloadPoint.Location)); @@ -460,4 +462,8 @@ namespace OpenRA.Mods.RA.Missions a(spy); } } + + class Allies04TrivialBuildingInfo : TraitInfo { } + + class Allies04TrivialBuilding { } } diff --git a/mods/ra/maps/allies-01/map.yaml b/mods/ra/maps/allies-01/map.yaml index c16e3b5433..fa5df278e5 100644 --- a/mods/ra/maps/allies-01/map.yaml +++ b/mods/ra/maps/allies-01/map.yaml @@ -367,6 +367,8 @@ Rules: Cargo: MaxWeight: 0 PipCount: 0 + STEK: + AutoTargetIgnore: Sequences: diff --git a/mods/ra/maps/allies-03/map.yaml b/mods/ra/maps/allies-03/map.yaml index 766d6a95a7..8063ac771f 100644 --- a/mods/ra/maps/allies-03/map.yaml +++ b/mods/ra/maps/allies-03/map.yaml @@ -1434,6 +1434,9 @@ Rules: Allies03Script: MissionObjectivesPanel: ObjectivesPanel: MISSION_OBJECTIVES + YAK: + Buildable: + Owner: soviet, allies E7: Buildable: Owner: None diff --git a/mods/ra/maps/allies-04/map.yaml b/mods/ra/maps/allies-04/map.yaml index 25e6d81fe4..dd41107391 100644 --- a/mods/ra/maps/allies-04/map.yaml +++ b/mods/ra/maps/allies-04/map.yaml @@ -1621,16 +1621,67 @@ Rules: Allies04Script: MissionObjectivesPanel: ObjectivesPanel: MISSION_OBJECTIVES - LST: - -Selectable: - SPY: + MISS: + AutoTargetIgnore: + LST.Unselectable: + Inherits: ^Ship + Valued: + Cost: 700 + Tooltip: + Name: Transport + Health: + HP: 350 + Armor: + Type: Heavy + Mobile: + ROT: 10 + Speed: 8 RevealsShroud: - Range: 8 + Range: 6 + RenderUnit: + Image: LST + Cargo: + Types: Infantry, Vehicle + MaxWeight: 5 + PipCount: 5 + IronCurtainable: + RepairableNear: + AttackMove: + JustMove: true + -Selectable: + SPY.Strong: + Inherits: ^Infantry + RevealsShroud: + Range: 5 Health: HP: 100 DontDestroyWhenInfiltrating: + Spy: + RenderSpy: + Image: SPY + IdleAnimations: idle1,idle2 + Valued: + Cost: 500 + Tooltip: + Name: Spy + Selectable: + Voice: SpyVoice + Bounds: 12,17,0,-9 + Mobile: + Speed: 4 + Passenger: + PipType: Yellow + TakeCover: + -AutoTarget: + AttackMove: + JustMove: true + -RenderInfantry: + AttackFrontal: + PrimaryWeapon: SilencedPPK DOG.Patrol: Inherits: ^Infantry + Mobile: + Speed: 4 Valued: Cost: 200 Tooltip: @@ -1640,8 +1691,6 @@ Rules: Bounds: 12,17,-1,-4 Health: HP: 12 - Mobile: - Speed: 4 RevealsShroud: Range: 5 AutoTarget: @@ -1649,7 +1698,7 @@ Rules: PrimaryWeapon: DogJaw CanAttackGround: no RenderInfantry: - Image: dog + Image: DOG IdleAnimations: idle1,idle2 IgnoresDisguise: TRUK.Hijackable: @@ -1664,6 +1713,8 @@ Rules: Image: TRUK Selectable: Voice: SpyVoice + RevealsShroud: + Range: 5 Valued: Cost: 500 Tooltip: @@ -1674,12 +1725,53 @@ Rules: Type: Light Mobile: Speed: 9 - RevealsShroud: - Range: 8 AttackMove: JustMove: yes - HIND: + HIND.AutoTarget + Inherits: ^Helicopter AutoTarget: + Valued: + Cost: 1000 + Tooltip: + Name: Hind + Health: + HP: 150 + Armor: + Type: Light + RevealsShroud: + Range: 10 + AttackHeli: + PrimaryWeapon: ChainGun + SecondaryWeapon: ChainGun + PrimaryOffset: -5,-2,0,2 + SecondaryOffset: 5,-2,0,2 + FacingTolerance: 20 + Helicopter: + RearmBuildings: hpad + LandWhenIdle: false + InitialFacing: 20 + ROT: 4 + Speed: 12 + RenderUnit: + Image: HIND + WithRotor: + WithShadow: + LimitedAmmo: + Ammo: 24 + PipCount: 6 + ReloadTicks: 8 + IronCurtainable: + Selectable: + Bounds: 38,32,0,0 + WithMuzzleFlash: + FallsToEarth: + Explosion: UnitExplode + SmokeTrailWhenDamaged: + Offset: 0,-10 + BARL: + Allies04TrivialBuilding: + BRL3: + Allies04TrivialBuilding E7: Buildable: Owner: None