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.");
}
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;
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<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[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<PPos> 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<HelicopterInfo>().CruiseAltitude),
new AltitudeInit(Rules.Info["hind.autotarget"].Traits.Get<HelicopterInfo>().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<Cargo>().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<Cargo>().Load(lst, allies2Spy);
}
lst.QueueActivity(new Move.Move(lstUnloadPoint.Location));
@@ -460,4 +462,8 @@ namespace OpenRA.Mods.RA.Missions
a(spy);
}
}
class Allies04TrivialBuildingInfo : TraitInfo<Allies04TrivialBuilding> { }
class Allies04TrivialBuilding { }
}

View File

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

View File

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

View File

@@ -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