fixed up weapon validity stuff
This commit is contained in:
@@ -117,9 +117,8 @@ namespace OpenRA
|
||||
if (weapon.Warheads.All( w => w.EffectivenessAgainst(target.Info.Traits.Get<OwnedActorInfo>().Armor) <= 0))
|
||||
return false;
|
||||
|
||||
/* todo: access to UnderWater is interesting */
|
||||
// if (projectile.UnderWater && !target.Info.Traits.Get<OwnedActorInfo>().WaterBound)
|
||||
// return false;
|
||||
if (weapon.Underwater && !target.Info.Traits.Get<OwnedActorInfo>().WaterBound)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,9 +28,6 @@ namespace OpenRA.Effects
|
||||
public class BulletInfo : IProjectileInfo
|
||||
{
|
||||
public readonly int Speed = 1;
|
||||
public readonly bool AA = false;
|
||||
public readonly bool AG = true;
|
||||
public readonly bool ASW = false;
|
||||
public readonly string Trail = null;
|
||||
public readonly bool Inaccurate = false;
|
||||
public readonly string Image = null;
|
||||
@@ -38,7 +35,6 @@ namespace OpenRA.Effects
|
||||
public readonly bool Arcing = false;
|
||||
public readonly int RangeLimit = 0;
|
||||
public readonly int Arm = 0;
|
||||
public readonly bool UnderWater = false;
|
||||
public readonly bool Shadow = false;
|
||||
public readonly bool Proximity = false;
|
||||
|
||||
@@ -119,7 +115,7 @@ namespace OpenRA.Effects
|
||||
}
|
||||
else
|
||||
yield return new Renderable(anim.Image, pos - .5f * anim.Image.size,
|
||||
Info.UnderWater ? "shadow" : Args.firedBy.Owner.Palette);
|
||||
Args.weapon.Underwater ? "shadow" : Args.firedBy.Owner.Palette);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,9 +35,6 @@ namespace OpenRA.Effects
|
||||
public readonly bool Proximity = false;
|
||||
public readonly string Trail = null;
|
||||
public readonly bool Inaccurate = false;
|
||||
public readonly bool AA = false;
|
||||
public readonly bool AG = true;
|
||||
public readonly bool ASW = false;
|
||||
public readonly string Image = null;
|
||||
public readonly int ROT = 5;
|
||||
public readonly int RangeLimit = 0;
|
||||
|
||||
@@ -81,7 +81,8 @@ namespace OpenRA.GameRules
|
||||
public readonly int ROF = 1;
|
||||
public readonly int Burst = 1;
|
||||
public readonly bool Charges = false;
|
||||
public readonly string[] ValidTargets = { "Vehicle", "Infantry" };
|
||||
public readonly bool Underwater = false;
|
||||
public readonly string[] ValidTargets = { "Vehicle", "Infantry", "Building", "Defense", "Ship" };
|
||||
|
||||
public IProjectileInfo Projectile;
|
||||
public List<WarheadInfo> Warheads = new List<WarheadInfo>();
|
||||
@@ -98,6 +99,8 @@ namespace OpenRA.GameRules
|
||||
case "Report": FieldLoader.LoadField(this, "Report", content.Nodes["Report"].Value); break;
|
||||
case "Burst": FieldLoader.LoadField(this, "Burst", content.Nodes["Burst"].Value); break;
|
||||
case "Charges": FieldLoader.LoadField(this, "Charges", content.Nodes["Charges"].Value); break;
|
||||
case "ValidTargets": FieldLoader.LoadField(this, "ValidTargets", content.Nodes["ValidTargets"].Value); break;
|
||||
case "Underwater": FieldLoader.LoadField(this, "Underwater", content.Nodes["Underwater"].Value); break;
|
||||
|
||||
case "Warhead":
|
||||
{
|
||||
|
||||
@@ -15,9 +15,8 @@ ZSU-23:
|
||||
ROF: 10
|
||||
Range: 6
|
||||
Report: AACANON3
|
||||
ValidTargets: Plane
|
||||
Bullet:
|
||||
AA: true
|
||||
AG: false
|
||||
Speed: 100
|
||||
Warhead:
|
||||
Spread: 3
|
||||
@@ -42,6 +41,7 @@ Maverick:
|
||||
ROF: 3
|
||||
Range: 6
|
||||
Report: MISSILE7
|
||||
ValidTargets: Vehicle, Infantry, Plane, Building, Defense, Ship
|
||||
Missile:
|
||||
Speed: 30
|
||||
Arm: 2
|
||||
@@ -50,7 +50,6 @@ Maverick:
|
||||
Proximity: true
|
||||
Trail: smokey
|
||||
Inaccurate: true
|
||||
AA: true
|
||||
Image: DRAGON
|
||||
ROT: 5
|
||||
RangeLimit: 20
|
||||
@@ -141,6 +140,7 @@ Dragon:
|
||||
ROF: 50
|
||||
Range: 5
|
||||
Report: MISSILE6
|
||||
ValidTargets: Vehicle, Infantry, Plane, Building, Defense, Ship
|
||||
Missile:
|
||||
Speed: 25
|
||||
Arm: 2
|
||||
@@ -149,7 +149,6 @@ Dragon:
|
||||
Proximity: true
|
||||
Trail: smokey
|
||||
Inaccurate: true
|
||||
AA: true
|
||||
Image: DRAGON
|
||||
ROT: 5
|
||||
RangeLimit: 20
|
||||
@@ -167,6 +166,7 @@ Hellfire:
|
||||
ROF: 60
|
||||
Range: 4
|
||||
Report: MISSILE6
|
||||
ValidTargets: Vehicle, Infantry, Plane, Building, Defense, Ship
|
||||
Missile:
|
||||
Speed: 30
|
||||
Arm: 2
|
||||
@@ -175,7 +175,6 @@ Hellfire:
|
||||
Proximity: true
|
||||
Trail: smokey
|
||||
Inaccurate: true
|
||||
AA: true
|
||||
Image: DRAGON
|
||||
ROT: 5
|
||||
RangeLimit: 20
|
||||
@@ -299,6 +298,7 @@ MammothTusk:
|
||||
Range: 5
|
||||
Report: MISSILE6
|
||||
Burst: 2
|
||||
ValidTargets: Vehicle, Infantry, Plane, Building, Defense, Ship
|
||||
Missile:
|
||||
Speed: 30
|
||||
Arm: 2
|
||||
@@ -307,7 +307,6 @@ MammothTusk:
|
||||
Proximity: true
|
||||
Trail: smokey
|
||||
Inaccurate: true
|
||||
AA: true
|
||||
Image: DRAGON
|
||||
ROT: 5
|
||||
RangeLimit: 20
|
||||
@@ -410,14 +409,13 @@ Nike:
|
||||
ROF: 20
|
||||
Range: 7.5
|
||||
Report: MISSILE1
|
||||
ValidTargets: Plane
|
||||
Missile:
|
||||
Arm: 3
|
||||
High: true
|
||||
Shadow: false
|
||||
Proximity: true
|
||||
Trail: smokey
|
||||
AA: true
|
||||
AG: false
|
||||
Image: MISSILE
|
||||
ROT: 20
|
||||
RangeLimit: 30
|
||||
@@ -435,14 +433,13 @@ RedEye:
|
||||
ROF: 50
|
||||
Range: 7.5
|
||||
Report: MISSILE1
|
||||
ValidTargets: Plane
|
||||
Missile:
|
||||
Arm: 3
|
||||
High: true
|
||||
Shadow: false
|
||||
Proximity: true
|
||||
Trail: smokey
|
||||
AA: true
|
||||
AG: false
|
||||
Image: MISSILE
|
||||
ROT: 20
|
||||
RangeLimit: 30
|
||||
@@ -480,13 +477,13 @@ Stinger:
|
||||
ROF: 60
|
||||
Range: 9
|
||||
Report: MISSILE6
|
||||
ValidTargets: Vehicle, Infantry, Plane, Building, Defense, Ship
|
||||
Missile:
|
||||
Arm: 3
|
||||
High: true
|
||||
Shadow: false
|
||||
Proximity: true
|
||||
Trail: smokey
|
||||
AA: true
|
||||
Image: DRAGON
|
||||
ROT: 20
|
||||
RangeLimit: 20
|
||||
@@ -506,10 +503,10 @@ TorpTube:
|
||||
ROF: 60
|
||||
Range: 9
|
||||
Report: TORPEDO1
|
||||
ValidTargets: Ship, Building
|
||||
Underwater: yes
|
||||
Bullet:
|
||||
UnderWater: yes
|
||||
Image: MISSILE
|
||||
ASW: true
|
||||
Speed: 15
|
||||
Warhead:
|
||||
Spread: 3
|
||||
@@ -541,14 +538,13 @@ TorpTube:
|
||||
DepthCharge:
|
||||
ROF: 60
|
||||
Range: 5
|
||||
ValidTargets: Ship
|
||||
Bullet:
|
||||
Speed: 5
|
||||
Image: BOMB
|
||||
Arcing: true
|
||||
High: true
|
||||
Inaccurate: true
|
||||
ASW: true
|
||||
AG: false
|
||||
Warhead:
|
||||
Spread: 3
|
||||
Wall: true
|
||||
|
||||
Reference in New Issue
Block a user