diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index 73b3b56760..7825c58eee 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -1031,6 +1031,17 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + // Remove PerCellDamageWarhead + if (engineVersion < 20150213) + { + if (depth == 1 && node.Value.Nodes.Exists(n => n.Key == "PerCellDamage")) + { + node.Value.Nodes.RemoveAll(n => n.Key == "PerCellDamage"); + Console.WriteLine("The 'PerCellDamage' warhead has been removed."); + Console.WriteLine("Please use the 'SpreadDamage' warhead instead."); + } + } + UpgradeWeaponRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } } diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 613f81b744..35b58f7c47 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -143,7 +143,6 @@ - diff --git a/OpenRA.Mods.RA/Warheads/PerCellDamageWarhead.cs b/OpenRA.Mods.RA/Warheads/PerCellDamageWarhead.cs deleted file mode 100644 index e639b0eb66..0000000000 --- a/OpenRA.Mods.RA/Warheads/PerCellDamageWarhead.cs +++ /dev/null @@ -1,37 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2015 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 COPYING. - */ -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using OpenRA.Effects; -using OpenRA.GameRules; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - public class PerCellDamageWarhead : DamageWarhead - { - [Desc("Size of the area. Damage will be applied to this area.")] - public readonly int[] Size = { 0, 0 }; - - public override void DoImpact(WPos pos, Actor firedBy, IEnumerable damageModifiers) - { - var world = firedBy.World; - var targetTile = world.Map.CellContaining(pos); - var minRange = (Size.Length > 1 && Size[1] > 0) ? Size[1] : 0; - var affectedTiles = world.Map.FindTilesInAnnulus(targetTile, minRange, Size[0]); - - foreach (var t in affectedTiles) - foreach (var victim in world.ActorMap.GetUnitsAt(t)) - DoImpact(victim, firedBy, damageModifiers); - } - } -} diff --git a/mods/ra/maps/training-camp/map.yaml b/mods/ra/maps/training-camp/map.yaml index 689e8bca7e..38876b805f 100644 --- a/mods/ra/maps/training-camp/map.yaml +++ b/mods/ra/maps/training-camp/map.yaml @@ -1057,69 +1057,6 @@ Sequences: VoxelSequences: Weapons: - CrateNuke: - Warhead@areanuke2: PerCellDamage - Damage: 250 - Size: 4 - Versus: - None: 90 - Light: 60 - Heavy: 25 - Concrete: 50 - Delay: 12 - DeathType: 4 - Warhead@areanuke2Smu: LeaveSmudge - SmudgeType: Scorch - Size: 4,3 - Delay: 12 - Warhead@areanuke2Res: DestroyResource - DestroyResources: true - Size: 4,3 - Delay: 12 - Warhead@areanuke2Eff: CreateEffect - ImpactSound: kaboom22 - Delay: 12 - Warhead@areanuke3: PerCellDamage - Damage: 250 - Size: 3 - Versus: - None: 90 - Light: 60 - Heavy: 25 - Concrete: 50 - Delay: 24 - DeathType: 4 - Warhead@areanuke3Smu: LeaveSmudge - SmudgeType: Scorch - Size: 3,2 - Delay: 24 - Warhead@areanuke3Res: DestroyResource - DestroyResources: true - Size: 3,2 - Delay: 24 - Warhead@areanuke3Eff: CreateEffect - ImpactSound: kaboom22 - Delay: 24 - Warhead@areanuke4: PerCellDamage - Damage: 250 - Versus: - None: 90 - Light: 60 - Heavy: 25 - Concrete: 50 - Delay: 36 - DeathType: 4 - Warhead@areanuke4Smu: LeaveSmudge - SmudgeType: Scorch - Size: 2,1 - Delay: 36 - Warhead@areanuke4Res: DestroyResource - DestroyResources: true - Size: 2,1 - Delay: 36 - Warhead@areanuke4Eff: CreateEffect - ImpactSound: kaboom22 - Delay: 36 Voices: diff --git a/mods/ra/weapons.yaml b/mods/ra/weapons.yaml index 96b63eaf59..c787f46c2f 100644 --- a/mods/ra/weapons.yaml +++ b/mods/ra/weapons.yaml @@ -776,49 +776,36 @@ CrateExplosion: CrateNuke: Warhead@1Dam_impact: SpreadDamage - Spread: 256 + Spread: 1c0 Damage: 100 Falloff: 1000, 368, 135, 50, 18, 7, 0 DeathType: 5 + ValidTargets: Ground, Water, Air Versus: - None: 90 - Light: 60 - Heavy: 25 - Concrete: 50 + Concrete: 25 AffectsParent: true Warhead@2Res_impact: DestroyResource Warhead@3Eff_impact: CreateEffect Explosion: nuke ImpactSound: kaboom1.aud - Warhead@4Dam_areanuke: PerCellDamage - Size: 5 - Damage: 250 + Warhead@4Dam_areanuke: SpreadDamage + Spread: 1c0 + Damage: 60 + Falloff: 1000, 600, 400, 250, 150, 100, 0 DeathType: 5 Delay: 4 + ValidTargets: Ground, Water, Air Versus: - None: 90 - Light: 60 - Heavy: 25 - Concrete: 50 + Concrete: 25 AffectsParent: true - Warhead@5Dam_areanuke: SpreadDamage - Damage: 250 - DeathType: 5 - Delay: 4 - Versus: - None: 90 - Light: 60 - Heavy: 25 - Concrete: 50 - AffectsParent: true - Warhead@6Res_areanuke: DestroyResource + Warhead@5Res_areanuke: DestroyResource Size: 5,4 Delay: 4 - Warhead@7Smu_areanuke: LeaveSmudge + Warhead@6Smu_areanuke: LeaveSmudge SmudgeType: Scorch Size: 5,4 Delay: 4 - Warhead@8Eff_areanuke: CreateEffect + Warhead@7Eff_areanuke: CreateEffect ImpactSound: kaboom22.aud Delay: 4 diff --git a/mods/ts/weapons.yaml b/mods/ts/weapons.yaml index d32b5d4e2a..00c66931c0 100644 --- a/mods/ts/weapons.yaml +++ b/mods/ts/weapons.yaml @@ -1026,9 +1026,10 @@ IonCannon: Warhead@2Eff_impact: CreateEffect Explosion: ionring ImpactSound: ion1.aud - Warhead@3Dam_area: PerCellDamage - Size: 2 + Warhead@3Dam_area: SpreadDamage + Spread: 1c0 Damage: 250 + Falloff: 100, 50, 25, 0 DeathType: 5 Delay: 3 ValidTargets: Ground, Air