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.

This commit is contained in:
Scott_NZ
2012-12-17 01:25:55 +13:00
parent 3ab04e4c30
commit 2ea3b77b7a
4 changed files with 121 additions and 18 deletions

View File

@@ -150,13 +150,15 @@ namespace OpenRA.Mods.RA.Missions
{ {
MissionFailed("The research laboratory was destroyed."); MissionFailed("The research laboratory was destroyed.");
} }
else if (!world.Actors.Any(a => (a.Owner == allies1 || a.Owner == allies2) && !a.IsDead() && (a.HasTrait<Building>() && !a.HasTrait<Wall>()) || a.HasTrait<BaseBuilding>())) else if (!world.Actors.Any(a => (a.Owner == allies1 || a.Owner == allies2) && !a.IsDead()
&& (a.HasTrait<Building>() && !a.HasTrait<Wall>()) || a.HasTrait<BaseBuilding>()))
{ {
objectives[DestroyID].Status = ObjectiveStatus.Failed; objectives[DestroyID].Status = ObjectiveStatus.Failed;
OnObjectivesUpdated(true); OnObjectivesUpdated(true);
MissionFailed("The remaining Allied forces in the area have been wiped out."); 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<Building>() && !a.HasTrait<Wall>() && a != lab) else if (!world.Actors.Any(a => a.Owner == soviets && a.IsInWorld && !a.IsDead()
&& a.HasTrait<Building>() && !a.HasTrait<Wall>() && !a.HasTrait<Allies04TrivialBuilding>() && a != lab)
&& objectives[InfiltrateID].Status == ObjectiveStatus.Completed) && objectives[InfiltrateID].Status == ObjectiveStatus.Completed)
{ {
objectives[DestroyID].Status = ObjectiveStatus.Completed; objectives[DestroyID].Status = ObjectiveStatus.Completed;
@@ -206,7 +208,7 @@ namespace OpenRA.Mods.RA.Missions
void SendReinforcements() void SendReinforcements()
{ {
var lst = world.CreateActor("lst", new TypeDictionary var lst = world.CreateActor("lst.unselectable", new TypeDictionary
{ {
new OwnerInit(allies1), new OwnerInit(allies1),
new LocationInit(reinforcementsEntryPoint.Location) new LocationInit(reinforcementsEntryPoint.Location)
@@ -247,12 +249,12 @@ namespace OpenRA.Mods.RA.Missions
void SendHind(CPos start, IEnumerable<PPos> points, CPos exit) void SendHind(CPos start, IEnumerable<PPos> points, CPos exit)
{ {
var hind = world.CreateActor("hind", new TypeDictionary var hind = world.CreateActor("hind.autotarget", new TypeDictionary
{ {
new OwnerInit(soviets), new OwnerInit(soviets),
new LocationInit(start), new LocationInit(start),
new FacingInit(Util.GetFacing(points.First().ToCPos() - start, 0)), new FacingInit(Util.GetFacing(points.First().ToCPos() - start, 0)),
new AltitudeInit(Rules.Info["hind"].Traits.Get<HelicopterInfo>().CruiseAltitude), new AltitudeInit(Rules.Info["hind.autotarget"].Traits.Get<HelicopterInfo>().CruiseAltitude),
}); });
foreach (var point in points.Concat(new[] { Util.CenterOfCell(exit) })) foreach (var point in points.Concat(new[] { Util.CenterOfCell(exit) }))
{ {
@@ -263,16 +265,16 @@ namespace OpenRA.Mods.RA.Missions
void InsertSpies() void InsertSpies()
{ {
var lst = world.CreateActor("lst", new TypeDictionary var lst = world.CreateActor("lst.unselectable", new TypeDictionary
{ {
new OwnerInit(allies1), new OwnerInit(allies1),
new LocationInit(lstEntryPoint.Location) 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<Cargo>().Load(lst, allies1Spy); lst.Trait<Cargo>().Load(lst, allies1Spy);
if (allies1 != allies2) 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<Cargo>().Load(lst, allies2Spy); lst.Trait<Cargo>().Load(lst, allies2Spy);
} }
lst.QueueActivity(new Move.Move(lstUnloadPoint.Location)); lst.QueueActivity(new Move.Move(lstUnloadPoint.Location));
@@ -460,4 +462,8 @@ namespace OpenRA.Mods.RA.Missions
a(spy); a(spy);
} }
} }
class Allies04TrivialBuildingInfo : TraitInfo<Allies04TrivialBuilding> { }
class Allies04TrivialBuilding { }
} }

View File

@@ -367,6 +367,8 @@ Rules:
Cargo: Cargo:
MaxWeight: 0 MaxWeight: 0
PipCount: 0 PipCount: 0
STEK:
AutoTargetIgnore:
Sequences: Sequences:

View File

@@ -1434,6 +1434,9 @@ Rules:
Allies03Script: Allies03Script:
MissionObjectivesPanel: MissionObjectivesPanel:
ObjectivesPanel: MISSION_OBJECTIVES ObjectivesPanel: MISSION_OBJECTIVES
YAK:
Buildable:
Owner: soviet, allies
E7: E7:
Buildable: Buildable:
Owner: None Owner: None

View File

@@ -1621,16 +1621,67 @@ Rules:
Allies04Script: Allies04Script:
MissionObjectivesPanel: MissionObjectivesPanel:
ObjectivesPanel: MISSION_OBJECTIVES ObjectivesPanel: MISSION_OBJECTIVES
LST: MISS:
-Selectable: AutoTargetIgnore:
SPY: LST.Unselectable:
Inherits: ^Ship
Valued:
Cost: 700
Tooltip:
Name: Transport
Health:
HP: 350
Armor:
Type: Heavy
Mobile:
ROT: 10
Speed: 8
RevealsShroud: 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: Health:
HP: 100 HP: 100
DontDestroyWhenInfiltrating: 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: DOG.Patrol:
Inherits: ^Infantry Inherits: ^Infantry
Mobile:
Speed: 4
Valued: Valued:
Cost: 200 Cost: 200
Tooltip: Tooltip:
@@ -1640,8 +1691,6 @@ Rules:
Bounds: 12,17,-1,-4 Bounds: 12,17,-1,-4
Health: Health:
HP: 12 HP: 12
Mobile:
Speed: 4
RevealsShroud: RevealsShroud:
Range: 5 Range: 5
AutoTarget: AutoTarget:
@@ -1649,7 +1698,7 @@ Rules:
PrimaryWeapon: DogJaw PrimaryWeapon: DogJaw
CanAttackGround: no CanAttackGround: no
RenderInfantry: RenderInfantry:
Image: dog Image: DOG
IdleAnimations: idle1,idle2 IdleAnimations: idle1,idle2
IgnoresDisguise: IgnoresDisguise:
TRUK.Hijackable: TRUK.Hijackable:
@@ -1664,6 +1713,8 @@ Rules:
Image: TRUK Image: TRUK
Selectable: Selectable:
Voice: SpyVoice Voice: SpyVoice
RevealsShroud:
Range: 5
Valued: Valued:
Cost: 500 Cost: 500
Tooltip: Tooltip:
@@ -1674,12 +1725,53 @@ Rules:
Type: Light Type: Light
Mobile: Mobile:
Speed: 9 Speed: 9
RevealsShroud:
Range: 8
AttackMove: AttackMove:
JustMove: yes JustMove: yes
HIND: HIND.AutoTarget
Inherits: ^Helicopter
AutoTarget: 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: E7:
Buildable: Buildable:
Owner: None Owner: None