Nuke (cnc and ra). Still needs smoke anim in cnc.

This commit is contained in:
alzeih
2010-03-18 21:41:23 +13:00
parent 8e5a5552c4
commit b7087136cb
7 changed files with 68 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -32,13 +32,13 @@ namespace OpenRA.Traits
class NukePower : SupportPower, IResolveOrder
{
public NukePower(Actor self, NukePowerInfo info) : base(self, info) { }
protected override void OnBeginCharging() { Sound.PlayToPlayer(Owner, "aprep1.aud"); }
protected override void OnFinishCharging() { Sound.PlayToPlayer(Owner, "aready1.aud"); }
protected override void OnBeginCharging() { Sound.PlayToPlayer(Owner, Info.BeginChargeSound); }
protected override void OnFinishCharging() { Sound.PlayToPlayer(Owner, Info.EndChargeSound); }
protected override void OnActivate()
{
Game.controller.orderGenerator = new SelectTarget();
Sound.Play("slcttgt1.aud");
Sound.Play(Info.SelectTargetSound);
}
public void ResolveOrder(Actor self, Order order)
@@ -55,7 +55,7 @@ namespace OpenRA.Traits
{
// Play to everyone but the current player
if (Owner != Owner.World.LocalPlayer)
Sound.Play("alaunch1.aud");
Sound.Play(Info.LaunchSound);
//FIRE ZE MISSILES
w.Add(new NukeLaunch(silo, Info.MissileWeapon, order.TargetLocation));

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -34,6 +34,12 @@ namespace OpenRA.Traits
public readonly int TechLevel = -1;
public readonly bool GivenAuto = true;
public readonly string MissileWeapon = "";
public readonly string BeginChargeSound = null;
public readonly string EndChargeSound = null;
public readonly string SelectTargetSound = null;
public readonly string LaunchSound = null;
public abstract object Create(Actor self);
}

View File

@@ -48,6 +48,12 @@
<unit name="120mm">
<sequence name="idle" start="0" length="1" />
</unit>
<unit name="atomicup">
<sequence name="idle" start="0" length="4" />
</unit>
<unit name="atomicdn">
<sequence name="idle" start="0" length="4" />
</unit>
<unit name="explosion">
<sequence name="1" start="0" length="4" src="piff" />
<sequence name="2" start="0" length="8" src="piffpiff" />

View File

@@ -333,6 +333,7 @@ TMPL:
Armor: light
Crewed: yes
Sight: 4
NukeSilo:
OBLI:
RequiresPower:

View File

@@ -1,6 +1,18 @@
Player:
ProductionQueue:
PlaceBuilding:
NukePower:
Image: atomicnh
ChargeTime: 13
Description: Atom Bomb
LongDesc: Launches a nuclear missile at a target location.
Prerequisites: TMPL
TechLevel: 12
MissileWeapon: atomic
BeginChargeSound:
EndChargeSound: nukavail.aud
SelectTargetSound: select1.aud
LaunchSound: nukemisl.aud
World:
ScreenShaker:

View File

@@ -26,6 +26,7 @@ Napalm
Laser
Nike
HonestJohn
Atomic
[UnitExplode]
Damage=500
@@ -33,6 +34,12 @@ Speed=100
Projectile=Invisible
Warhead=UnitExplodeWarhead
;Nuke (special case for Nuclear missile)
[Atomic]
Damage=1000
Projectile=NukeDown
Warhead=Nuke
; sniper rifle
[Sniper]
Damage=100
@@ -302,6 +309,18 @@ AAMissile
Lobbed
Bomblet
BallisticP
NukeDown
NukeUp
; Nuclear missile, flying down
[NukeDown]
High=yes
Image=ATOMICDN
; Nuclear missile, flying up
[NukeUp]
High=yes
Image=ATOMICUP
; invisible flight to target
[Invisible]
@@ -375,6 +394,19 @@ AP
Fire
HollowPoint
Super
Nuke
; Nuclear warhead (same as fire)
[Nuke]
Spread=6
Wall=yes
Wood=yes
Ore=yes
Verses=90%,100%,60%,25%,50%
Explosion=6
InfDeath=4
SmudgeType=Scorch
SmudgeSize=5,4
[UnitExplodeWarhead]
Spread=10

View File

@@ -50,6 +50,10 @@ Player:
Prerequisites: MSLO
TechLevel: 12
MissileWeapon: atomic
BeginChargeSound: aprep1.aud
EndChargeSound: aready1.aud
SelectTargetSound: slcttgt1.aud
LaunchSound: alaunch1.aud
SonarPulsePower:
Image: sonricon
ChargeTime: 10