#65 CNC Ion Cannon - 3 minute cooldown, narrow effect, still PerCell damage for massive building damage

This commit is contained in:
Chris Forbes
2010-04-02 21:57:56 +13:00
parent 93632f6c6c
commit 71340811ef
4 changed files with 33 additions and 5 deletions

View File

@@ -30,13 +30,14 @@ namespace OpenRA.Mods.Cnc.Effects
{
int2 Target;
Animation anim;
Actor firedBy;
public IonCannon(World world, int2 location)
public IonCannon(Actor firedBy, World world, int2 location)
{
this.firedBy = firedBy;
Target = location;
anim = new Animation("ionsfx");
anim.PlayThen("idle",
() => world.AddFrameEndTask(w => w.Remove(this)));
anim.PlayThen("idle", () => Finish(world));
}
public void Tick(World world) { anim.Tick(); }
@@ -47,5 +48,11 @@ namespace OpenRA.Mods.Cnc.Effects
Util.CenterOfCell(Target) - new float2(.5f * anim.Image.size.X, anim.Image.size.Y - Game.CellSize),
"effect");
}
void Finish( World world )
{
world.AddFrameEndTask(w => w.Remove(this));
Combat.DoExplosion(firedBy, "IonCannon", Target, 0);
}
}
}

View File

@@ -71,7 +71,7 @@ namespace OpenRA.Mods.Cnc
Owner.World.AddFrameEndTask(w =>
{
Sound.Play(Info.LaunchSound);
w.Add(new IonCannon(w, order.TargetLocation));
w.Add(new IonCannon(self, w, order.TargetLocation));
});
Game.controller.CancelInputMode();

View File

@@ -17,7 +17,7 @@ Player:
LaunchSound: nukemisl.aud
IonCannonPower:
Image: ionicnh
ChargeTime: 1
ChargeTime: 3
Description: Ion Cannon
LongDesc: Discharges the orbital Ion Cannon at your target.
Prerequisites: EYE

View File

@@ -32,6 +32,27 @@ Atomic:
Delay: 3
InfDeath: 4
IonCannon:
Warhead@impact:
Damage: 500
Spread: 6
Wall: true
Wood: true
Ore: true
Verses: 100%,100%,100%,100%,100%
InfDeath: 4
Warhead@area:
DamageMode: PerCell
Damage: 200
SmudgeType: Scorch
Size: 2,1
Wall: true
Wood: true
Ore: true
Verses: 100%,100%,100%,100%,100%
Delay: 3
InfDeath: 4
Sniper:
Report: RAMGUN2
ROF: 40