Merge pull request #5024 from ScottNZ/balance

Closes #3272
This commit is contained in:
Matthias Mailänder
2014-04-05 08:09:46 +02:00
10 changed files with 104 additions and 3 deletions

View File

@@ -83,6 +83,7 @@ NEW:
Both Allied and Soviet factions now build general-purpose mines instead of AT and AP mines respectively. Both Allied and Soviet factions now build general-purpose mines instead of AT and AP mines respectively.
Added new attack-move cursor artwork. Added new attack-move cursor artwork.
Added Phase Transport, an Allied high-tech infantry transport which can cloak. Added Phase Transport, an Allied high-tech infantry transport which can cloak.
Added Hijacker, a Soviet infantry unit with a vehicle hijacking ability.
Attack Dogs, Snipers, Mobile Radar Jammers, Camo Pillboxes, Phase Transports, Radar Domes, and Spy Planes can now detect cloaked units. Attack Dogs, Snipers, Mobile Radar Jammers, Camo Pillboxes, Phase Transports, Radar Domes, and Spy Planes can now detect cloaked units.
Removed the submarine detection ability from Cruiser and Transport. Removed the submarine detection ability from Cruiser and Transport.
Added the submarine detection ability to Submarines and Missile Subs. Added the submarine detection ability to Submarines and Missile Subs.

View File

@@ -9,8 +9,9 @@
#endregion #endregion
using System.Linq; using System.Linq;
using OpenRA.Traits;
using OpenRA.FileFormats; using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA
{ {
@@ -24,6 +25,7 @@ namespace OpenRA.Mods.RA
public readonly bool AllowEnemies = true; public readonly bool AllowEnemies = true;
[Desc("Health percentage the target must be at (or below) before it can be captured.")] [Desc("Health percentage the target must be at (or below) before it can be captured.")]
public readonly float CaptureThreshold = 0.5f; public readonly float CaptureThreshold = 0.5f;
public readonly bool CancelActivity = false;
public bool CanBeTargetedBy(Actor captor, Player owner) public bool CanBeTargetedBy(Actor captor, Player owner)
{ {
@@ -48,5 +50,17 @@ namespace OpenRA.Mods.RA
} }
} }
class Capturable { } class Capturable : INotifyCapture
{
public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner)
{
var info = self.Info.Traits.Get<CapturableInfo>();
if (info.CancelActivity)
{
var stop = new Order("Stop", self, false);
foreach (var t in self.TraitsImplementing<IResolveOrder>())
t.ResolveOrder(self, stop);
}
}
}
} }

View File

@@ -166,7 +166,7 @@
<Compile Include="Bridge.cs" /> <Compile Include="Bridge.cs" />
<Compile Include="BridgeLayer.cs" /> <Compile Include="BridgeLayer.cs" />
<Compile Include="Buildable.cs" /> <Compile Include="Buildable.cs" />
<Compile Include="BuildingCaptureNotification.cs" /> <Compile Include="CaptureNotification.cs" />
<Compile Include="Buildings\Building.cs" /> <Compile Include="Buildings\Building.cs" />
<Compile Include="Buildings\BuildingInfluence.cs" /> <Compile Include="Buildings\BuildingInfluence.cs" />
<Compile Include="Buildings\CanPowerDown.cs" /> <Compile Include="Buildings\CanPowerDown.cs" />

Binary file not shown.

BIN
mods/ra/bits/unitsto.aud Normal file

Binary file not shown.

View File

@@ -23,6 +23,7 @@ Speech:
NavalUnitLost: navylst1 NavalUnitLost: navylst1
AirUnitLost: aunitl1 AirUnitLost: aunitl1
BuildingCaptured: strucap1 BuildingCaptured: strucap1
UnitStolen: unitsto
ReinforcementsArrived: reinfor1 ReinforcementsArrived: reinfor1
SignalFlareNorth: flaren1 SignalFlareNorth: flaren1
AlliedReinforcementsArrived: aarrive1 AlliedReinforcementsArrived: aarrive1

View File

@@ -46,6 +46,12 @@
Huntable: Huntable:
LuaScriptEvents: LuaScriptEvents:
Demolishable: Demolishable:
Capturable:
Type: vehicle
CaptureThreshold: 1
CancelActivity: True
CaptureNotification:
Notification: UnitStolen
^Tank: ^Tank:
AppearsOnRadar: AppearsOnRadar:
@@ -95,6 +101,12 @@
Huntable: Huntable:
LuaScriptEvents: LuaScriptEvents:
Demolishable: Demolishable:
Capturable:
Type: vehicle
CaptureThreshold: 1
CancelActivity: True
CaptureNotification:
Notification: UnitStolen
^Infantry: ^Infantry:
AppearsOnRadar: AppearsOnRadar:

View File

@@ -425,6 +425,34 @@ THF:
TakeCover: TakeCover:
-AutoTarget: -AutoTarget:
HIJACKER:
Inherits: ^Infantry
Buildable:
Queue: Infantry
BuildPaletteOrder: 90
Owner: soviet
Prerequisites: fix
Hotkey: j
Valued:
Cost: 500
Tooltip:
Name: Hijacker
Description: Hijacks enemy vehicles. Unarmed\n Strong vs Tanks\n Weak vs Infantry, Aircraft
Selectable:
Voice: ThiefVoice
Bounds: 12,17,0,-9
Health:
HP: 80
Mobile:
Speed: 56
RevealsShroud:
Range: 5c0
Passenger:
PipType: Yellow
Captures:
CaptureTypes: vehicle
-AutoTarget:
SHOK: SHOK:
Inherits: ^Infantry Inherits: ^Infantry
Buildable: Buildable:

View File

@@ -587,6 +587,10 @@ thf:
die6: electro die6: electro
Start: 0 Start: 0
Length: * Length: *
die-crushed: corpse1
Start: 0
Length: 6
Tick: 1600
crawl: crawl:
Start: 72 Start: 72
Length: 4 Length: 4
@@ -594,6 +598,47 @@ thf:
icon: thficon icon: thficon
Start: 0 Start: 0
hijacker:
stand: thf
Start: 0
Facings: 8
stand2: thf
Start: 0
Facings: 8
run: thf
Start: 8
Length: 6
Facings: 8
Tick: 100
die1: thf
Start: 139
Length: 8
die2: thf
Start: 147
Length: 8
die3: thf
Start: 155
Length: 8
die4: thf
Start: 163
Length: 12
die5: thf
Start: 175
Length: 18
die6: electro
Start: 0
Length: *
die-crushed: corpse1
Start: 0
Length: 6
Tick: 1600
crawl: thf
Start: 72
Length: 4
Facings: 8
icon: hijackericon
Start: 0
e7: e7:
stand: stand:
Start: 0 Start: 0