diff --git a/Mage.Sets/src/mage/cards/h/HungryForMore.java b/Mage.Sets/src/mage/cards/h/HungryForMore.java new file mode 100644 index 00000000000..3e527743025 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HungryForMore.java @@ -0,0 +1,79 @@ +package mage.cards.h; + +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TimingRule; +import mage.game.Game; +import mage.game.permanent.token.HungryForMoreToken; +import mage.game.permanent.token.Token; +import mage.target.targetpointer.FixedTargets; + +import java.util.UUID; +import java.util.stream.Collectors; + +/** + * @author TheElk801 + */ +public final class HungryForMore extends CardImpl { + + public HungryForMore(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{R}"); + + // Create a 3/1 black and red Vampire creature token with trample, lifelink, and haste. Sacrifice it at the beginning of the next end step. + this.getSpellAbility().addEffect(new HungryForMoreEffect()); + + // Flashback {1}{B}{R} + this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{1}{B}{R}"), TimingRule.SORCERY)); + } + + private HungryForMore(final HungryForMore card) { + super(card); + } + + @Override + public HungryForMore copy() { + return new HungryForMore(this); + } +} + +class HungryForMoreEffect extends OneShotEffect { + + HungryForMoreEffect() { + super(Outcome.Benefit); + staticText = "create a 3/1 black and red Vampire creature token with trample, " + + "lifelink, and haste. Sacrifice it at the beginning of the next end step"; + } + + private HungryForMoreEffect(final HungryForMoreEffect effect) { + super(effect); + } + + @Override + public HungryForMoreEffect copy() { + return new HungryForMoreEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Token token = new HungryForMoreToken(); + token.putOntoBattlefield(1, game, source, source.getControllerId()); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility( + new SacrificeTargetEffect().setTargetPointer(new FixedTargets( + token.getLastAddedTokenIds() + .stream() + .map(game::getPermanent) + .collect(Collectors.toList()), + game + )).setText("sacrifice that token") + ), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 1c44ebf919e..953514047f1 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -77,6 +77,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Haunted Ridge", 263, Rarity.RARE, mage.cards.h.HauntedRidge.class)); cards.add(new SetCardInfo("Hobbling Zombie", 106, Rarity.COMMON, mage.cards.h.HobblingZombie.class)); cards.add(new SetCardInfo("Howl of the Hunt", 188, Rarity.COMMON, mage.cards.h.HowlOfTheHunt.class)); + cards.add(new SetCardInfo("Hungry for More", 228, Rarity.UNCOMMON, mage.cards.h.HungryForMore.class)); cards.add(new SetCardInfo("Immolation", 144, Rarity.COMMON, mage.cards.i.Immolation.class)); cards.add(new SetCardInfo("Infernal Grasp", 107, Rarity.UNCOMMON, mage.cards.i.InfernalGrasp.class)); cards.add(new SetCardInfo("Insectile Aberration", 47, Rarity.UNCOMMON, mage.cards.i.InsectileAberration.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/HungryForMoreToken.java b/Mage/src/main/java/mage/game/permanent/token/HungryForMoreToken.java new file mode 100644 index 00000000000..6f41a946a4d --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/HungryForMoreToken.java @@ -0,0 +1,35 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class HungryForMoreToken extends TokenImpl { + + public HungryForMoreToken() { + super("Vampire", "3/1 black and red Vampire creature token with trample, lifelink, and haste"); + cardType.add(CardType.CREATURE); + color.setRed(true); + color.setBlack(true); + subtype.add(SubType.VAMPIRE); + power = new MageInt(3); + toughness = new MageInt(1); + addAbility(TrampleAbility.getInstance()); + addAbility(LifelinkAbility.getInstance()); + addAbility(HasteAbility.getInstance()); + } + + public HungryForMoreToken(final HungryForMoreToken token) { + super(token); + } + + public HungryForMoreToken copy() { + return new HungryForMoreToken(this); + } +}