remove old buff crates
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class ArmorUpgradeCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
public float Multiplier = 2.0f;
|
||||
public override object Create(ActorInitializer init) { return new ArmorUpgradeCrateAction(init.self, this); }
|
||||
}
|
||||
|
||||
class ArmorUpgradeCrateAction : CrateAction
|
||||
{
|
||||
public ArmorUpgradeCrateAction(Actor self, ArmorUpgradeCrateActionInfo info)
|
||||
: base(self, info) {}
|
||||
|
||||
public override void Activate(Actor collector)
|
||||
{
|
||||
collector.World.AddFrameEndTask(w =>
|
||||
{
|
||||
var multiplier = (info as ArmorUpgradeCrateActionInfo).Multiplier;
|
||||
collector.traits.Add(new ArmorUpgrade(multiplier));
|
||||
});
|
||||
|
||||
base.Activate(collector);
|
||||
}
|
||||
}
|
||||
|
||||
class ArmorUpgrade : IDamageModifier
|
||||
{
|
||||
float multiplier;
|
||||
public ArmorUpgrade(float multiplier) { this.multiplier = 1/multiplier; }
|
||||
public float GetDamageModifier( WarheadInfo warhead ) { return multiplier; }
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class FirepowerUpgradeCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
public float Multiplier = 2.0f;
|
||||
public override object Create(ActorInitializer init) { return new FirepowerUpgradeCrateAction(init.self, this); }
|
||||
}
|
||||
|
||||
class FirepowerUpgradeCrateAction : CrateAction
|
||||
{
|
||||
public FirepowerUpgradeCrateAction(Actor self, FirepowerUpgradeCrateActionInfo info)
|
||||
: base(self, info) {}
|
||||
|
||||
public override int GetSelectionShares(Actor collector)
|
||||
{
|
||||
if (collector.GetPrimaryWeapon() == null && collector.GetSecondaryWeapon() == null)
|
||||
return 0;
|
||||
|
||||
return base.GetSelectionShares(collector);
|
||||
}
|
||||
|
||||
public override void Activate(Actor collector)
|
||||
{
|
||||
collector.World.AddFrameEndTask(w =>
|
||||
{
|
||||
var multiplier = (info as FirepowerUpgradeCrateActionInfo).Multiplier;
|
||||
collector.traits.Add(new FirepowerUpgrade(multiplier));
|
||||
});
|
||||
|
||||
base.Activate(collector);
|
||||
}
|
||||
}
|
||||
|
||||
class FirepowerUpgrade : IFirepowerModifier
|
||||
{
|
||||
float multiplier;
|
||||
public FirepowerUpgrade(float multiplier) { this.multiplier = multiplier; }
|
||||
public float GetFirepowerModifier() { return multiplier; }
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class SpeedUpgradeCrateActionInfo : CrateActionInfo
|
||||
{
|
||||
public float Multiplier = 1.7f;
|
||||
public override object Create(ActorInitializer init) { return new SpeedUpgradeCrateAction(init.self, this); }
|
||||
}
|
||||
|
||||
class SpeedUpgradeCrateAction : CrateAction
|
||||
{
|
||||
public SpeedUpgradeCrateAction(Actor self, SpeedUpgradeCrateActionInfo info)
|
||||
: base(self, info) {}
|
||||
|
||||
public override void Activate(Actor collector)
|
||||
{
|
||||
collector.World.AddFrameEndTask(w =>
|
||||
{
|
||||
var multiplier = (info as SpeedUpgradeCrateActionInfo).Multiplier;
|
||||
collector.traits.Add(new SpeedUpgrade(multiplier));
|
||||
});
|
||||
base.Activate(collector);
|
||||
}
|
||||
}
|
||||
|
||||
class SpeedUpgrade : ISpeedModifier
|
||||
{
|
||||
float multiplier;
|
||||
public SpeedUpgrade(float multiplier) { this.multiplier = multiplier; }
|
||||
public float GetSpeedModifier() { return multiplier; }
|
||||
}
|
||||
}
|
||||
@@ -143,9 +143,7 @@
|
||||
<Compile Include="OreRefinery.cs" />
|
||||
<Compile Include="ChronoshiftPaletteEffect.cs" />
|
||||
<Compile Include="SupportPowers\ChronoshiftPower.cs" />
|
||||
<Compile Include="Crates\ArmorUpgradeCrateAction.cs" />
|
||||
<Compile Include="Crates\ExplodeCrateAction.cs" />
|
||||
<Compile Include="Crates\FirepowerUpgradeCrateAction.cs" />
|
||||
<Compile Include="Crates\GiveCashCrateAction.cs" />
|
||||
<Compile Include="Effects\GpsSatellite.cs" />
|
||||
<Compile Include="Effects\InvulnEffect.cs" />
|
||||
@@ -180,7 +178,6 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Render\RenderSpy.cs" />
|
||||
<Compile Include="RepairableNear.cs" />
|
||||
<Compile Include="Crates\SpeedUpgradeCrateAction.cs" />
|
||||
<Compile Include="Reservable.cs" />
|
||||
<Compile Include="ReturnOnIdle.cs" />
|
||||
<Compile Include="SeedsResource.cs" />
|
||||
|
||||
@@ -210,27 +210,12 @@ CRATE:
|
||||
Crate:
|
||||
Lifetime: 120
|
||||
TerrainTypes: Clear, Rough, Road, Water, Ore, Beach
|
||||
# SpeedUpgradeCrateAction:
|
||||
# Multiplier: 1.7
|
||||
# SelectionShares: 10
|
||||
# Notification: unitspd1.aud
|
||||
# Effect: speed
|
||||
GiveCashCrateAction:
|
||||
Amount: 1000
|
||||
SelectionShares: 50
|
||||
Effect: dollar
|
||||
LevelUpCrateAction:
|
||||
SelectionShares: 40
|
||||
# FirepowerUpgradeCrateAction:
|
||||
# Multiplier: 2.0
|
||||
# SelectionShares: 10
|
||||
# Notification: firepo1.aud
|
||||
# Effect: fpower
|
||||
# ArmorUpgradeCrateAction:
|
||||
# Multiplier: 2.0
|
||||
# SelectionShares: 10
|
||||
# Notification: armorup1.aud
|
||||
# Effect: armor
|
||||
ExplodeCrateAction@fire:
|
||||
Weapon: CrateNapalm
|
||||
SelectionShares: 5
|
||||
|
||||
Reference in New Issue
Block a user