~ruther/NosSmooth

a11dd1eab546c7c5c4689c2cb5959bb3070fdc2d — Rutherther 2 years ago f35677e
fix(combat): look at correct entity on map when determining whether attack technique should continue
1 files changed, 6 insertions(+), 2 deletions(-)

M Extensions/NosSmooth.Extensions.Combat/Techniques/SimpleAttackTechnique.cs
M Extensions/NosSmooth.Extensions.Combat/Techniques/SimpleAttackTechnique.cs => Extensions/NosSmooth.Extensions.Combat/Techniques/SimpleAttackTechnique.cs +6 -2
@@ 74,8 74,12 @@ public class SimpleAttackTechnique : ICombatTechnique
            return false;
        }

        var entity = map.Entities.GetEntity<ILivingEntity>(_targetId);
        return !(entity is null || (entity.Hp is not null && (entity.Hp.Amount <= 0 || entity.Hp.Percentage <= 0)));
        if (_target is null)
        {
            _target = map.Entities.GetEntity<ILivingEntity>(_targetId);
        }

        return !(_target is null || (_target.Hp is not null && (_target.Hp.Amount <= 0 || _target.Hp.Percentage <= 0)));
    }

    /// <inheritdoc />

Do not follow this link