public virtual int ToDamage(UnitParameters parameters) { Health -= 1; if (Health <= 0) { IsDead = true; } return(Damage); }
public void Trigger(IStrike strike) { var parameters = new UnitParameters().SetHealth(Health); Health -= strike.ToDamage(parameters); if (Health <= 0) { IsDead = true; } }