diff --git a/Mage.Sets/src/mage/cards/s/SamwiseGamgee.java b/Mage.Sets/src/mage/cards/s/SamwiseGamgee.java new file mode 100644 index 0000000000..fd246e581f --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SamwiseGamgee.java @@ -0,0 +1,69 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterHistoricCard; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.FoodToken; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SamwiseGamgee extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another nontoken creature"); + private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(SubType.FOOD, "Foods"); + private static final FilterCard filter3 = new FilterHistoricCard("historic card from your graveyard"); + + static { + filter.add(TokenPredicate.FALSE); + } + + public SamwiseGamgee(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HALFLING); + this.subtype.add(SubType.PEASANT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever another nontoken creature enters the battlefield under your control, create a Food token. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new CreateTokenEffect(new FoodToken()), filter)); + + // Sacrifice three Foods: Return target historic card from your graveyard to your hand. + Ability ability = new SimpleActivatedAbility( + new ReturnFromGraveyardToHandTargetEffect(), + new SacrificeTargetCost(new TargetControlledPermanent(3, filter2)) + ); + ability.addTarget(new TargetCardInYourGraveyard(filter3)); + this.addAbility(ability); + } + + private SamwiseGamgee(final SamwiseGamgee card) { + super(card); + } + + @Override + public SamwiseGamgee copy() { + return new SamwiseGamgee(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index 7df6edbfcd..1e1d7f7483 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -56,6 +56,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Quickbeam, Upstart Ent", 183, Rarity.UNCOMMON, mage.cards.q.QuickbeamUpstartEnt.class)); cards.add(new SetCardInfo("Reprieve", 26, Rarity.UNCOMMON, mage.cards.r.Reprieve.class)); cards.add(new SetCardInfo("Rising of the Day", 145, Rarity.UNCOMMON, mage.cards.r.RisingOfTheDay.class)); + cards.add(new SetCardInfo("Samwise Gamgee", 222, Rarity.RARE, mage.cards.s.SamwiseGamgee.class)); cards.add(new SetCardInfo("Samwise the Stouthearted", 28, Rarity.UNCOMMON, mage.cards.s.SamwiseTheStouthearted.class)); cards.add(new SetCardInfo("Saruman's Trickery", 68, Rarity.UNCOMMON, mage.cards.s.SarumansTrickery.class)); cards.add(new SetCardInfo("Sauron, the Lidless Eye", 288, Rarity.MYTHIC, mage.cards.s.SauronTheLidlessEye.class));