heal sortof works... except it kills the patient.
This commit is contained in:
@@ -32,7 +32,9 @@ namespace OpenRa.Game.Traits
|
||||
{
|
||||
var inRange = Game.FindUnitsInCircle(self.CenterLocation, Game.CellSize * range);
|
||||
|
||||
return inRange.Where(a => a.Owner != null && a.Owner != self.Owner) /* todo: one day deal with friendly players */
|
||||
return inRange
|
||||
.Where(a => a.Owner != null && a.Owner != self.Owner) /* todo: one day deal with friendly players */
|
||||
.Where(a => Combat.HasAnyValidWeapons(self, a))
|
||||
.OrderBy(a => (a.Location - self.Location).LengthSquared)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
@@ -46,6 +48,9 @@ namespace OpenRa.Game.Traits
|
||||
if (e.Attacker.Owner == self.Owner)
|
||||
return; // don't retaliate against own units force-firing on us. it's usually not what the player wanted.
|
||||
|
||||
if (e.Damage < 0)
|
||||
return; // don't retaliate against healers
|
||||
|
||||
var attack = self.traits.WithInterface<AttackBase>().First();
|
||||
if (attack.target != null) return;
|
||||
|
||||
|
||||
@@ -50,7 +50,10 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
var prefix = IsProne(self) ? "prone-shoot-" : "shoot-";
|
||||
|
||||
anim.PlayThen(prefix + dir, () => inAttack = false);
|
||||
if (anim.HasSequence(prefix + dir))
|
||||
anim.PlayThen(prefix + dir, () => inAttack = false);
|
||||
else if (anim.HasSequence("heal"))
|
||||
anim.PlayThen("heal", () => inAttack = false);
|
||||
}
|
||||
|
||||
public override void Tick(Actor self)
|
||||
|
||||
@@ -2134,7 +2134,7 @@ Report=DOGG5P
|
||||
[Heal]
|
||||
Damage=-50
|
||||
ROF=80
|
||||
Range=1.83
|
||||
Range=4 ;; 1.83
|
||||
Projectile=Invisible
|
||||
Speed=100
|
||||
Warhead=Organic
|
||||
|
||||
@@ -498,12 +498,12 @@
|
||||
<sequence name="standup-5" start="124" length="2" />
|
||||
<sequence name="standup-6" start="126" length="2" />
|
||||
<sequence name="standup-7" start="128" length="2" />
|
||||
<sequence name="die1" start="196" length="5" />
|
||||
<sequence name="die1" start="196" length="5" />
|
||||
<sequence name="die2" start="201" length="8" />
|
||||
<sequence name="die3" start="209" length="8" />
|
||||
<sequence name="die4" start="217" length="12" />
|
||||
<sequence name="die5" start="229" length="18" />
|
||||
<sequence name="die6" start="0" length="14" src="electro" />
|
||||
<sequence name="die6" start="0" length="14" src="electro" />
|
||||
<sequence name="crawl-0" start="130" length="4" />
|
||||
<sequence name="crawl-1" start="134" length="4" />
|
||||
<sequence name="crawl-2" start="138" length="4" />
|
||||
|
||||
@@ -7,8 +7,4 @@
|
||||
s0=Multi0,mcv,600,2841,0,Guard,None
|
||||
s1=Multi2,mcv,600,12445,0,Guard,None
|
||||
s2=Multi1,mcv,600,12505,0,Guard,None
|
||||
s3=Multi3,mcv,600,2910,0,Guard,None
|
||||
|
||||
s4=Multi7,3tnk,600,13017,0,Guard,None
|
||||
s5=Multi7,ca,600,13765,0,Guard,None
|
||||
|
||||
s3=Multi3,mcv,600,2910,0,Guard,None
|
||||
Reference in New Issue
Block a user