enhanced smudge support to do rings, etc
This commit is contained in:
@@ -28,6 +28,8 @@ namespace OpenRA.GameRules
|
||||
public readonly bool Wood = false;
|
||||
public readonly bool Ore = false;
|
||||
public readonly int Explosion = 0;
|
||||
public readonly SmudgeType SmudgeType = SmudgeType.None;
|
||||
public readonly int[] SmudgeSize = { 0,0 };
|
||||
public readonly int InfDeath = 0;
|
||||
public readonly string ImpactSound = null;
|
||||
public readonly string WaterImpactSound = null;
|
||||
@@ -43,4 +45,11 @@ namespace OpenRA.GameRules
|
||||
heavy = 3,
|
||||
concrete = 4,
|
||||
}
|
||||
|
||||
public enum SmudgeType
|
||||
{
|
||||
None = 0,
|
||||
Crater = 1,
|
||||
Scorch = 2,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,18 +47,13 @@ namespace OpenRA
|
||||
|
||||
public static void AddSmudge(this Map map, int2 targetTile, WarheadInfo warhead)
|
||||
{
|
||||
switch (warhead.Explosion) /* todo: push the scorch/crater behavior into data */
|
||||
{
|
||||
case 4:
|
||||
case 5:
|
||||
map.AddSmudge(true, targetTile.X, targetTile.Y);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 6:
|
||||
map.AddSmudge(false, targetTile.X, targetTile.Y);
|
||||
break;
|
||||
}
|
||||
if (warhead.SmudgeType == SmudgeType.None) return;
|
||||
if (warhead.SmudgeSize[0] == 0 && warhead.SmudgeSize[1] == 0)
|
||||
map.AddSmudge(warhead.SmudgeType == SmudgeType.Crater, targetTile.X, targetTile.Y);
|
||||
else
|
||||
foreach (var t in Game.world.FindTilesInCircle(targetTile, warhead.SmudgeSize[0]))
|
||||
if ((t - targetTile).LengthSquared >= warhead.SmudgeSize[1] * warhead.SmudgeSize[1])
|
||||
map.AddSmudge(warhead.SmudgeType == SmudgeType.Crater, t.X, t.Y);
|
||||
}
|
||||
|
||||
static int lastSmudge = 0;
|
||||
|
||||
@@ -648,6 +648,7 @@ Wood=yes
|
||||
Verses=90%,75%,60%,25%,100%
|
||||
Explosion=5
|
||||
InfDeath=2
|
||||
SmudgeType=Crater
|
||||
|
||||
; armor piercing (discarding sabot, narrow effect)
|
||||
[AP]
|
||||
@@ -657,6 +658,7 @@ Wood=yes
|
||||
Verses=30%,75%,75%,100%,50%
|
||||
Explosion=4
|
||||
InfDeath=3
|
||||
SmudgeType=Crater
|
||||
|
||||
; napalm and fire in general
|
||||
[Fire]
|
||||
@@ -665,6 +667,7 @@ Wood=yes
|
||||
Verses=90%,100%,60%,25%,50%
|
||||
Explosion=3
|
||||
InfDeath=4
|
||||
SmudgeType=Scorch
|
||||
|
||||
; anti-infantry rifle bullet (single shot -- very effective verses infantry)
|
||||
[HollowPoint]
|
||||
@@ -694,6 +697,8 @@ Ore=yes
|
||||
Verses=90%,100%,60%,25%,50%
|
||||
Explosion=6
|
||||
InfDeath=4
|
||||
SmudgeType=Scorch
|
||||
SmudgeSize=5,4
|
||||
|
||||
|
||||
; ******* Land Characteristics *******
|
||||
|
||||
Reference in New Issue
Block a user