ability2.addCost(new PayLifeCost(1));
this.addAbility(ability2);
// {1}, {tap}, Sacrifice a creature: Return target artifact card from your graveyard to your hand.
Ability ability3 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new GenericManaCost(1));
ability3.addTarget(new TargetCardInGraveyard(new FilterArtifactCard("artifact card in your graveyard")));
ability3.addCost(new TapSourceCost());
ability3.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
this.addAbility(ability3);
// {1}, {tap}, Sacrifice an artifact: Draw a card.