mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[NCC] Implemented Mezzio Mugger
This commit is contained in:
parent
9175676145
commit
f8244d059b
2 changed files with 93 additions and 0 deletions
92
Mage.Sets/src/mage/cards/m/MezzioMugger.java
Normal file
92
Mage.Sets/src/mage/cards/m/MezzioMugger.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.BlitzAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MezzioMugger extends CardImpl {
|
||||
|
||||
public MezzioMugger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
|
||||
this.subtype.add(SubType.VIASHINO);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Whenever Mezzio Mugger attacks, exile the top card of each player's library. You may play those cards this turn, and you may spend mana as though it were mana of any color to cast those spells.
|
||||
this.addAbility(new AttacksTriggeredAbility(new MezzioMuggerEffect()));
|
||||
|
||||
// Blitz {2}{R}
|
||||
this.addAbility(new BlitzAbility(this, "{2}{R}"));
|
||||
}
|
||||
|
||||
private MezzioMugger(final MezzioMugger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MezzioMugger copy() {
|
||||
return new MezzioMugger(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MezzioMuggerEffect extends OneShotEffect {
|
||||
|
||||
MezzioMuggerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "exile the top card of each player's library. You may play those cards this turn, " +
|
||||
"and you may spend mana as though it were mana of any color to cast those spells";
|
||||
}
|
||||
|
||||
private MezzioMuggerEffect(final MezzioMuggerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MezzioMuggerEffect copy() {
|
||||
return new MezzioMuggerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Set<Card> cards = game
|
||||
.getOpponents(source.getControllerId())
|
||||
.stream()
|
||||
.map(game::getPlayer)
|
||||
.filter(Objects::nonNull)
|
||||
.map(Player::getLibrary)
|
||||
.map(library -> library.getFromTop(game))
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toSet());
|
||||
if (cards.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
for (Card card : cards) {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -190,6 +190,7 @@ public final class NewCapennaCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Martial Coup", 206, Rarity.RARE, mage.cards.m.MartialCoup.class));
|
||||
cards.add(new SetCardInfo("Mask of Riddles", 347, Rarity.UNCOMMON, mage.cards.m.MaskOfRiddles.class));
|
||||
cards.add(new SetCardInfo("Mask of the Schemer", 28, Rarity.RARE, mage.cards.m.MaskOfTheSchemer.class));
|
||||
cards.add(new SetCardInfo("Mezzio Mugger", 49, Rarity.RARE, mage.cards.m.MezzioMugger.class));
|
||||
cards.add(new SetCardInfo("Midnight Clock", 226, Rarity.RARE, mage.cards.m.MidnightClock.class));
|
||||
cards.add(new SetCardInfo("Migration Path", 301, Rarity.UNCOMMON, mage.cards.m.MigrationPath.class));
|
||||
cards.add(new SetCardInfo("Mimic Vat", 372, Rarity.RARE, mage.cards.m.MimicVat.class));
|
||||
|
|
Loading…
Reference in a new issue