diff --git a/OpenRa.Game/GameRules/Rules.cs b/OpenRa.Game/GameRules/Rules.cs index fbe4c43523..aceda21226 100755 --- a/OpenRa.Game/GameRules/Rules.cs +++ b/OpenRa.Game/GameRules/Rules.cs @@ -17,6 +17,7 @@ namespace OpenRa.Game public static InfoLoader WarheadInfo; public static InfoLoader ProjectileInfo; public static InfoLoader VoiceInfo; + public static InfoLoader SupportPowerInfo; public static GeneralInfo General; public static AftermathInfo Aftermath; public static TechTree TechTree; @@ -72,7 +73,8 @@ namespace OpenRa.Game "Weapon", "Warhead", "Projectile", - "Voice"); + "Voice", + "SupportPower"); WeaponInfo = new InfoLoader( Pair.New>("Weapon", _ => new WeaponInfo())); @@ -82,6 +84,8 @@ namespace OpenRa.Game Pair.New>("Projectile", _ => new ProjectileInfo())); VoiceInfo = new InfoLoader( Pair.New>("Voice", _ => new VoiceInfo())); + SupportPowerInfo = new InfoLoader( + Pair.New>("SupportPower", _ => new SupportPowerInfo())); TechTree = new TechTree(); Map = new Map( AllRules ); diff --git a/OpenRa.Game/GameRules/SupportPowerInfo.cs b/OpenRa.Game/GameRules/SupportPowerInfo.cs new file mode 100644 index 0000000000..3bdf86d920 --- /dev/null +++ b/OpenRa.Game/GameRules/SupportPowerInfo.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace OpenRa.Game.GameRules +{ + public class SupportPowerInfo + { + public readonly bool Powered = true; + public readonly bool OneShot = false; + public readonly int ChargeTime = 0; + public readonly string Image; + public readonly string Description = ""; + public readonly string LongDesc = ""; + public readonly string[] Prerequisite = { }; + public readonly int TechLevel = -1; + } +} diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 6962cd2d7a..89375be11d 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -87,6 +87,7 @@ + diff --git a/units.ini b/units.ini index d7be3988dc..b339f70a5f 100755 --- a/units.ini +++ b/units.ini @@ -746,3 +746,77 @@ Move=girlokay [EinsteinVoice] Select=einah1,einok1,einyes1 Move=einah1,einok1,einyes1 + + +;; todo: where there are different variants of the same power, +;; split them here. SonarPulse is the obvious one. + +[SupportPowerTypes] +ParadropPower +ParabombPower +SonarPulsePower +ChronoshiftPower +SpyPlanePower +NukePower +GpsSatellitePower +InvulnerabilityPower + +[ParadropPower] ; comes free with first AFLD +ChargeTime=7 +Description=Paratroopers +LongDesc=A Badger drops a squad of Riflemen anywhere on the map +Prerequisite=AFLD +TechLevel=5 +Image=pinficon + +[ParabombPower] ; picked up in a crate +ChargeTime=14 +Description=Parabombs +LongDesc=A Badger carpet-bombs an area. +OneShot=yes +Powered=no +Image=pbmbicon + +[SonarPulsePower] ; picked up in a crate, or by spy -> spen/syrd +ChargeTime=10 +Description=Sonar Pulse +LongDesc=Reveals all submarines on the map for a short time. +OneShot=yes +Powered=no +Image=sonricon + +[ChronoshiftPower] ; free with Chronosphere... sortof the point. +ChargeTime=7 +Description=Chronoshift +LongDesc=Temporarily teleports a vehicle across the map. +Prerequisite=PDOX +Image=warpicon + +[SpyPlanePower] ; free with first AFLD +ChargeTime=3 +Description=Spy Plane +LongDesc=Reveals an area of the map. +Prerequisite=AFLD +Image=smigicon + +[NukePower] ; the point of MSLO +ChargeTime=13 +Description=Atom Bomb +LongDesc=Launches a nuclear missile at your target +Prerequisite=MSLO +Image=atomicon + +[GpsSatellitePower] ; free with ATEK +ChargeTime=8 +Description=GPS Satellite +LongDesc=Reveals the entire map +OneShot=yes +Prerequisite=ATEK +Image=gpssicon + +[InvulnerabilityPower] ; the point of IRON +ChargeTime=11 +Description=Invulnerability +LongDesc=Makes a single unit invulnerable for a short time. +Image=infxicon +Prerequisite=IRON \ No newline at end of file