Change EffectivenessAgainst to CanTargetActor.

This commit is contained in:
Paul Chote
2014-08-17 19:41:22 +12:00
parent 227a523878
commit d002a23d67
2 changed files with 12 additions and 10 deletions

View File

@@ -56,13 +56,15 @@ namespace OpenRA.GameRules
return 100;
}
public override int EffectivenessAgainst(ActorInfo ai)
// TODO: This can be removed after the legacy and redundant 0% = not targetable
// assumption has been removed from the yaml definitions
public override bool CanTargetActor(ActorInfo victim, Actor firedBy)
{
var health = ai.Traits.GetOrDefault<HealthInfo>();
var health = victim.Traits.GetOrDefault<HealthInfo>();
if (health == null)
return 0;
return false;
return DamageVersus(ai);
return DamageVersus(victim) > 0;
}
public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers)