diff --git a/Mage.Sets/src/mage/cards/m/MountVelusManticore.java b/Mage.Sets/src/mage/cards/m/MountVelusManticore.java new file mode 100644 index 00000000000..7e89c53c291 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MountVelusManticore.java @@ -0,0 +1,85 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.delayed.ReflexiveTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetAnyTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MountVelusManticore extends CardImpl { + + public MountVelusManticore(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.MANTICORE); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // At the beginning of combat on your turn, you may discard a card. When you do, Mount Velus Manticore deals X damage to any target, where X is the number of card types the discarded card has. + this.addAbility(new BeginningOfCombatTriggeredAbility( + new MountVelusManticoreEffect(), TargetController.YOU, false + )); + } + + private MountVelusManticore(final MountVelusManticore card) { + super(card); + } + + @Override + public MountVelusManticore copy() { + return new MountVelusManticore(this); + } +} + +class MountVelusManticoreEffect extends OneShotEffect { + + MountVelusManticoreEffect() { + super(Outcome.Benefit); + staticText = "you may discard a card. When you do, {this} deals X damage to any target, " + + "where X is the number of card types the discarded card has"; + } + + private MountVelusManticoreEffect(final MountVelusManticoreEffect effect) { + super(effect); + } + + @Override + public MountVelusManticoreEffect copy() { + return new MountVelusManticoreEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Card card = player.discard(0, 1, false, source, game).getRandom(game); + if (card == null) { + return false; + } + ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility( + new DamageTargetEffect(card.getCardType().size()), false, "{this} deals X damage " + + "to any target, where X is the number of card types the discarded card has" + ); + ability.addTarget(new TargetAnyTarget()); + game.fireReflexiveTriggeredAbility(ability, source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index eca6f2a809e..a2cd7a23696 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -178,6 +178,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Moderation", 206, Rarity.RARE, mage.cards.m.Moderation.class)); cards.add(new SetCardInfo("Mogg Salvage", 282, Rarity.UNCOMMON, mage.cards.m.MoggSalvage.class)); cards.add(new SetCardInfo("Monoskelion", 229, Rarity.UNCOMMON, mage.cards.m.Monoskelion.class)); + cards.add(new SetCardInfo("Mount Velus Manticore", 136, Rarity.COMMON, mage.cards.m.MountVelusManticore.class)); cards.add(new SetCardInfo("Mountain", 487, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Myr Scrapling", 230, Rarity.COMMON, mage.cards.m.MyrScrapling.class)); cards.add(new SetCardInfo("Mystic Redaction", 53, Rarity.UNCOMMON, mage.cards.m.MysticRedaction.class));