mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Refactor LookLibraryAndPickControllerEffect (#8841)
This commit is contained in:
parent
7db8dd11b4
commit
dc7dcec39a
195 changed files with 1463 additions and 3526 deletions
|
@ -1,13 +1,11 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.CasualtyAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -23,10 +21,7 @@ public final class ALittleChat extends CardImpl {
|
|||
this.addAbility(new CasualtyAbility(this, 1));
|
||||
|
||||
// Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(2), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false
|
||||
));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(2, 1, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private ALittleChat(final ALittleChat card) {
|
||||
|
|
|
@ -5,14 +5,13 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
@ -56,9 +55,8 @@ public final class AcclaimedContender extends CardImpl {
|
|||
// When Acclaimed Contender enters the battlefield, if you control another Knight, look at the top five cards of your library. You may reveal a Knight, Aura, Equipment, or legendary artifact card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter2, Zone.LIBRARY, false,
|
||||
true, false, Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true)), condition, "When {this} enters the battlefield, " +
|
||||
5, 1, filter2, PutCards.HAND, PutCards.BOTTOM_RANDOM
|
||||
)), condition, "When {this} enters the battlefield, " +
|
||||
"if you control another Knight, look at the top five cards of your library. " +
|
||||
"You may reveal a Knight, Aura, Equipment, or legendary artifact card from among them " +
|
||||
"and put it into your hand. Put the rest on the bottom of your library in a random order."
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -22,7 +20,8 @@ public final class AdventureAwaits extends CardImpl {
|
|||
public AdventureAwaits(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
|
||||
// Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. If you don't put a card into your hand this way, draw a card.
|
||||
// Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order. If you don't put a card into your hand this way, draw a card.
|
||||
this.getSpellAbility().addEffect(new AdventureAwaitsEffect());
|
||||
}
|
||||
|
||||
|
@ -36,14 +35,10 @@ public final class AdventureAwaits extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class AdventureAwaitsEffect extends OneShotEffect {
|
||||
class AdventureAwaitsEffect extends LookLibraryAndPickControllerEffect {
|
||||
|
||||
AdventureAwaitsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Look at the top five cards of your library. " +
|
||||
"You may reveal a creature card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order. " +
|
||||
"If you didn't put a card into your hand this way, draw a card.";
|
||||
super(5, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_RANDOM);
|
||||
}
|
||||
|
||||
private AdventureAwaitsEffect(final AdventureAwaitsEffect effect) {
|
||||
|
@ -56,25 +51,16 @@ class AdventureAwaitsEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 5));
|
||||
TargetCard target = new TargetCardInLibrary(0, 1, StaticFilters.FILTER_CARD_CREATURE);
|
||||
player.choose(outcome, cards, target, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null && player.chooseUse(outcome, "Put " + card.getName() + " into your hand?",
|
||||
"Otherwise draw a card", "Put into hand", "Draw a card", source, game
|
||||
)) {
|
||||
player.moveCards(card, Zone.HAND, source, game);
|
||||
cards.remove(card);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
} else {
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
public boolean actionWithPickedCards(Game game, Ability source, Player player, Cards pickedCards, Cards otherCards) {
|
||||
super.actionWithPickedCards(game, source, player, pickedCards, otherCards);
|
||||
if (pickedCards.isEmpty()) {
|
||||
player.drawCards(1, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return super.getText(mode).concat(". If you didn't put a card into your hand this way, draw a card");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -16,18 +14,14 @@ import mage.filter.predicate.Predicates;
|
|||
*/
|
||||
public final class AdventurousImpulse extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a creature or land card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.LAND.getPredicate()));
|
||||
}
|
||||
|
||||
public AdventurousImpulse(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}");
|
||||
|
||||
//Look at the top three cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), filter, false));
|
||||
|
||||
// Look at the top three cards of your library.
|
||||
// You may reveal a creature or land card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
3, 1, StaticFilters.FILTER_CARD_CREATURE_OR_LAND, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private AdventurousImpulse(final AdventurousImpulse card) {
|
||||
|
|
|
@ -1,37 +1,36 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.*;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class AdviceFromTheFae extends CardImpl {
|
||||
|
||||
public AdviceFromTheFae(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2/U}{2/U}{2/U}");
|
||||
|
||||
// <i>({2U} can be paid with any two mana or with {U}. This card's converted mana cost is 6.)</i>
|
||||
// Look at the top five cards of your library. If you control more creatures than each other player, put two of those cards into your hand. Otherwise, put one of them into your hand. Then put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new AdviceFromTheFaeEffect());
|
||||
|
||||
// Look at the top five cards of your library. If you control more creatures than each other player,
|
||||
// put two of those cards into your hand. Otherwise, put one of them into your hand.
|
||||
// Then put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new LookLibraryAndPickControllerEffect(5, 2, PutCards.HAND, PutCards.BOTTOM_ANY),
|
||||
new LookLibraryAndPickControllerEffect(5, 1, PutCards.HAND, PutCards.BOTTOM_ANY),
|
||||
AdviceFromTheFaeCondition.instance, "Look at the top five cards of your library. " +
|
||||
"If you control more creatures than each other player, put two of those cards into your hand. " +
|
||||
"Otherwise, put one of them into your hand. Then put the rest on the bottom of your library in any order."
|
||||
));
|
||||
}
|
||||
|
||||
private AdviceFromTheFae(final AdviceFromTheFae card) {
|
||||
|
@ -44,52 +43,23 @@ public final class AdviceFromTheFae extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class AdviceFromTheFaeEffect extends OneShotEffect {
|
||||
|
||||
public AdviceFromTheFaeEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Look at the top five cards of your library. If you control more creatures than each other player, put two of those cards into your hand. Otherwise, put one of them into your hand. Then put the rest on the bottom of your library in any order";
|
||||
}
|
||||
|
||||
public AdviceFromTheFaeEffect(final AdviceFromTheFaeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdviceFromTheFaeEffect copy() {
|
||||
return new AdviceFromTheFaeEffect(this);
|
||||
}
|
||||
enum AdviceFromTheFaeCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject mageObject = game.getObject(source);
|
||||
if (controller != null && mageObject != null) {
|
||||
Set<Card> topCards = controller.getLibrary().getTopCards(game, 5);
|
||||
Cards cardsFromLibrary = new CardsImpl();
|
||||
for (Card card : topCards) {
|
||||
cardsFromLibrary.add(card);
|
||||
int max = 0;
|
||||
UUID controllerId = source.getControllerId();
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controllerId, game)) {
|
||||
if (!playerId.equals(controllerId)) {
|
||||
max = Math.max(max, game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, playerId, game));
|
||||
}
|
||||
controller.lookAtCards(mageObject.getIdName(), cardsFromLibrary, game);
|
||||
int max = 0;
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new ControllerIdPredicate(playerId));
|
||||
if (!Objects.equals(playerId, controller.getId())) {
|
||||
if (max < game.getBattlefield().countAll(filter, playerId, game)) {
|
||||
max = game.getBattlefield().countAll(filter, playerId, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
boolean moreCreatures = game.getBattlefield().countAll(new FilterControlledCreaturePermanent(), controller.getId(), game) > max;
|
||||
TargetCard target = new TargetCard(moreCreatures ? 2 : 1, Zone.LIBRARY, new FilterCard());
|
||||
if (controller.choose(Outcome.DrawCard, cardsFromLibrary, target, game)) {
|
||||
cardsFromLibrary.removeAll(target.getTargets());
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game);
|
||||
}
|
||||
controller.putCardsOnBottomOfLibrary(cardsFromLibrary, game, source, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, controllerId, game) > max;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "you control more creatures than each other player";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.counter.DistributeCountersEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -13,7 +14,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
@ -49,8 +49,9 @@ public final class AjaniMentorOfHeroes extends CardImpl {
|
|||
ability.addTarget(new TargetCreaturePermanentAmount(3, filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// +1: Look at the top four cards of your library. You may reveal an Aura, creature, or planeswalker card from among them and put that card into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(4, 1, filterCard, true, false, Zone.HAND, true), 1));
|
||||
// +1: Look at the top four cards of your library. You may reveal an Aura, creature, or planeswalker card
|
||||
// from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(4, 1, filterCard, PutCards.HAND, PutCards.BOTTOM_ANY), 1));
|
||||
|
||||
// -8: You gain 100 life.
|
||||
this.addAbility(new LoyaltyAbility(new GainLifeEffect(100), -8));
|
||||
|
|
|
@ -2,13 +2,12 @@ package mage.cards.a;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
@ -35,12 +34,7 @@ public final class AjanisInfluence extends CardImpl {
|
|||
|
||||
// Look at the top five cards of your library. You may reveal a white card form among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true).setText("<br>Look at the top five cards of your library. "
|
||||
+ "You may reveal a white card from among them and put it into your hand. "
|
||||
+ "Put the rest on the bottom of your library in a random order.")
|
||||
);
|
||||
5, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM).concatBy("<br>"));
|
||||
}
|
||||
|
||||
private AjanisInfluence(final AjanisInfluence card) {
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -19,8 +17,7 @@ public final class AncestralMemories extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}{U}");
|
||||
|
||||
// Look at the top seven cards of your library. Put two of them into your hand and the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(7), false, StaticValue.get(2),
|
||||
StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(7, 2, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
}
|
||||
|
||||
private AncestralMemories(final AncestralMemories card) {
|
||||
|
@ -31,4 +28,4 @@ public final class AncestralMemories extends CardImpl {
|
|||
public AncestralMemories copy() {
|
||||
return new AncestralMemories(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
|
||||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
|
||||
|
@ -23,15 +20,12 @@ public final class AncientStirrings extends CardImpl {
|
|||
filter.add(ColorlessPredicate.instance);
|
||||
}
|
||||
|
||||
|
||||
public AncientStirrings(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}");
|
||||
|
||||
// Look at the top five cards of your library. You may reveal a colorless card from among them and put it into your hand.
|
||||
// Then put the rest on the bottom of your library in any order. (Cards with no colored mana in their mana costs are colorless. Lands are also colorless.)
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY,
|
||||
false, true, false, Zone.HAND, true));
|
||||
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(5, 1, filter, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private AncientStirrings(final AncientStirrings card) {
|
||||
|
@ -42,5 +36,4 @@ public final class AncientStirrings extends CardImpl {
|
|||
public AncientStirrings copy() {
|
||||
return new AncientStirrings(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -19,11 +17,7 @@ public final class Anticipate extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(3), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false
|
||||
).setText("look at the top three cards of your library. " +
|
||||
"Put one of them into your hand and the rest on the bottom of your library in any order"));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(3, 1, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private Anticipate(final Anticipate card) {
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -23,13 +21,7 @@ public final class ArcaneInfusion extends CardImpl {
|
|||
|
||||
// Look at the top four cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, Zone.LIBRARY,
|
||||
false, true, false, Zone.HAND,
|
||||
true, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top four cards of your library. " +
|
||||
"You may reveal an instant or sorcery card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order."));
|
||||
4, 1, StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, PutCards.HAND, PutCards.BOTTOM_RANDOM));
|
||||
|
||||
// Flashback {3}{U}{R}
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{U}{R}")));
|
||||
|
|
|
@ -3,16 +3,14 @@ package mage.cards.a;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.RollDieWithResultTableEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -39,11 +37,7 @@ public final class ArcaneInvestigator extends CardImpl {
|
|||
effect.addTableEntry(1, 9, new DrawCardSourceControllerEffect(1));
|
||||
|
||||
// 10-20 | Look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
effect.addTableEntry(10, 20, new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(3), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false
|
||||
).setText("look at the top three cards of your library. Put one of them " +
|
||||
"into your hand and the rest on the bottom of your library in any order"));
|
||||
effect.addTableEntry(10, 20, new LookLibraryAndPickControllerEffect(3, 1, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private ArcaneInvestigator(final ArcaneInvestigator card) {
|
||||
|
|
|
@ -2,14 +2,13 @@ package mage.cards.a;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterArtifactOrEnchantmentCard;
|
||||
|
||||
|
@ -32,16 +31,11 @@ public final class ArcanistsOwl extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Arcanist's Owl enters the battlefield, look at the top four cards of your library. You may reveal an artifact or enchantment card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
// When Arcanist's Owl enters the battlefield, look at the top four cards of your library.
|
||||
// You may reveal an artifact or enchantment card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1), filter,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND,
|
||||
true, false, false
|
||||
).setBackInRandomOrder(true).setText("look at the top four cards of your library. " +
|
||||
"You may reveal an artifact or enchantment card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order.")
|
||||
));
|
||||
new LookLibraryAndPickControllerEffect(4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM)));
|
||||
}
|
||||
|
||||
private ArcanistsOwl(final ArcanistsOwl card) {
|
||||
|
|
|
@ -1,36 +1,22 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.*;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jeffwadsworth
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class AugurOfBolas extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("an instant or sorcery card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(CardType.INSTANT.getPredicate(), CardType.SORCERY.getPredicate()));
|
||||
}
|
||||
|
||||
public AugurOfBolas(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.subtype.add(SubType.MERFOLK);
|
||||
|
@ -39,8 +25,11 @@ public final class AugurOfBolas extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Augur of Bolas enters the battlefield, look at the top three cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new AugurOfBolasEffect()));
|
||||
// When Augur of Bolas enters the battlefield, look at the top three cards of your library.
|
||||
// You may reveal an instant or sorcery card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
3, 1, StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
}
|
||||
|
||||
private AugurOfBolas(final AugurOfBolas card) {
|
||||
|
@ -52,57 +41,3 @@ public final class AugurOfBolas extends CardImpl {
|
|||
return new AugurOfBolas(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AugurOfBolasEffect extends OneShotEffect {
|
||||
|
||||
public AugurOfBolasEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "look at the top three cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in any order";
|
||||
}
|
||||
|
||||
public AugurOfBolasEffect(final AugurOfBolasEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AugurOfBolasEffect copy() {
|
||||
return new AugurOfBolasEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source);
|
||||
if (controller != null && sourceObject != null) {
|
||||
Cards topCards = new CardsImpl();
|
||||
topCards.addAll(controller.getLibrary().getTopCards(game, 3));
|
||||
if (!topCards.isEmpty()) {
|
||||
controller.lookAtCards(sourceObject.getIdName(), topCards, game);
|
||||
int number = topCards.count(new FilterInstantOrSorceryCard(), source.getControllerId(), source, game);
|
||||
if (number > 0) {
|
||||
if (controller.chooseUse(outcome, "Reveal an instant or sorcery card from the looked at cards and put it into your hand?", source, game)) {
|
||||
Card card = null;
|
||||
if (number == 1) {
|
||||
Set<Card> cards = topCards.getCards(new FilterInstantOrSorceryCard(), source.getControllerId(), source, game);
|
||||
if (!cards.isEmpty()) {
|
||||
card = cards.iterator().next();
|
||||
}
|
||||
} else {
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterInstantOrSorceryCard());
|
||||
controller.chooseTarget(outcome, topCards, target, source, game);
|
||||
card = topCards.get(target.getFirstTarget(), game);
|
||||
}
|
||||
if (card != null) {
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
controller.revealCards(sourceObject.getIdName(), new CardsImpl(card), game);
|
||||
topCards.remove(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
controller.putCardsOnBottomOfLibrary(topCards, game, source, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -6,14 +5,13 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
|
@ -44,11 +42,8 @@ public final class AzcantaTheSunkenRuin extends CardImpl {
|
|||
|
||||
// {2}{U} , {T} : Look at the top four cards of your library. You may reveal a noncreature, nonland card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1),
|
||||
filter, Zone.LIBRARY, false, true, true
|
||||
), new ManaCostsImpl<>("{2}{U}")
|
||||
new LookLibraryAndPickControllerEffect(4, 1, filter, PutCards.HAND, PutCards.BOTTOM_ANY),
|
||||
new ManaCostsImpl<>("{2}{U}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -2,11 +2,11 @@ package mage.cards.b;
|
|||
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -24,9 +24,7 @@ public final class BasicConjuration extends CardImpl {
|
|||
|
||||
// Look at the top six cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. You gain 3 life.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
6, 1, StaticFilters.FILTER_CARD_CREATURE_A,
|
||||
true, false, Zone.HAND, true
|
||||
).setBackInRandomOrder(true));
|
||||
6, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_RANDOM));
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(3));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.cards.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -20,8 +18,7 @@ public final class BitterRevelation extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||
|
||||
// Look at the top four cards of your library. Put two of them into your hand and the rest into your graveyard. You lose 2 life.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(2),
|
||||
StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(4, 2, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2));
|
||||
}
|
||||
|
||||
|
|
|
@ -6,21 +6,18 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.ModalDoubleFacesCard;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -81,15 +78,11 @@ public final class BlexVexingPest extends ModalDoubleFacesCard {
|
|||
}
|
||||
}
|
||||
|
||||
class SearchForBlexEffect extends LookLibraryControllerEffect {
|
||||
class SearchForBlexEffect extends LookLibraryAndPickControllerEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("cards to put into your hand");
|
||||
|
||||
public SearchForBlexEffect() {
|
||||
super(Outcome.DrawCard, StaticValue.get(5), false, Zone.GRAVEYARD, true);
|
||||
this.staticText = "Look at the top five cards of your library. "
|
||||
+ "You may put any number of them into your hand and the rest into your graveyard. "
|
||||
+ "You lose 3 life for each card you put into your hand this way";
|
||||
SearchForBlexEffect() {
|
||||
super(5, Integer.MAX_VALUE, PutCards.HAND, PutCards.GRAVEYARD);
|
||||
this.optional = true;
|
||||
}
|
||||
|
||||
private SearchForBlexEffect(final SearchForBlexEffect effect) {
|
||||
|
@ -102,21 +95,14 @@ class SearchForBlexEffect extends LookLibraryControllerEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void actionWithSelectedCards(Cards cards, Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
TargetCard target = new TargetCard(0, 5, Zone.LIBRARY, filter);
|
||||
if (player.choose(outcome, cards, target, game)) {
|
||||
Cards pickedCards = new CardsImpl(target.getTargets());
|
||||
cards.removeAll(pickedCards);
|
||||
player.moveCards(pickedCards, Zone.HAND, source, game);
|
||||
player.loseLife(pickedCards.size() * 3, game, source, false);
|
||||
}
|
||||
}
|
||||
protected boolean actionWithPickedCards(Game game, Ability source, Player player, Cards pickedCards, Cards otherCards) {
|
||||
super.actionWithPickedCards(game, source, player, pickedCards, otherCards);
|
||||
player.loseLife(pickedCards.size() * 3, game, source, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
return super.getText(mode).concat(". You lose 3 life for each card you put into your hand this way");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -20,13 +18,7 @@ public final class BloodPrice extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||
|
||||
// Look at the top four cards of your library. Put two of them into your hand and the rest on the bottom of your library in any order. You lose 2 life.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(2),
|
||||
StaticFilters.FILTER_CARD, Zone.LIBRARY, false,
|
||||
false, false, Zone.HAND, false,
|
||||
false, true
|
||||
).setText("Look at the top four cards of your library. " +
|
||||
"Put two of them into your hand and the rest on the bottom of your library in any order"));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(4, 2, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2));
|
||||
}
|
||||
|
||||
|
|
|
@ -2,20 +2,18 @@ package mage.cards.b;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -34,7 +32,10 @@ public final class BlossomPrancer extends CardImpl {
|
|||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// When Blossom Prancer enters the battlefield, look at the top five cards of your library. You may reveal a creature or enchantment card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. If you didn't put a card into your hand this way, you gain 4 life.
|
||||
// When Blossom Prancer enters the battlefield, look at the top five cards of your library.
|
||||
// You may reveal a creature or enchantment card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
// If you didn't put a card into your hand this way, you gain 4 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BlossomPrancerEffect()));
|
||||
}
|
||||
|
||||
|
@ -48,7 +49,7 @@ public final class BlossomPrancer extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class BlossomPrancerEffect extends OneShotEffect {
|
||||
class BlossomPrancerEffect extends LookLibraryAndPickControllerEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("creature or enchantment card");
|
||||
|
||||
|
@ -60,10 +61,7 @@ class BlossomPrancerEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
BlossomPrancerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "look at the top five cards of your library. You may reveal a creature or enchantment card from " +
|
||||
"among them and put it into your hand. Put the rest on the bottom of your library in a random order. " +
|
||||
"If you didn't put a card into your hand this way, you gain 4 life";
|
||||
super(5, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM);
|
||||
}
|
||||
|
||||
private BlossomPrancerEffect(final BlossomPrancerEffect effect) {
|
||||
|
@ -76,24 +74,16 @@ class BlossomPrancerEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 5));
|
||||
TargetCard target = new TargetCardInLibrary(0, 1, filter);
|
||||
player.choose(outcome, cards, target, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
player.revealCards(source, new CardsImpl(card), game);
|
||||
player.moveCards(card, Zone.HAND, source, game);
|
||||
cards.remove(card);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
} else {
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
public boolean actionWithPickedCards(Game game, Ability source, Player player, Cards pickedCards, Cards otherCards) {
|
||||
super.actionWithPickedCards(game, source, player, pickedCards, otherCards);
|
||||
if (pickedCards.isEmpty()) {
|
||||
player.gainLife(4, game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return super.getText(mode).concat(". If you didn't put a card into your hand this way, you gain 4 life");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.HistoricPredicate;
|
||||
|
||||
|
@ -27,10 +26,7 @@ public final class BoardTheWeatherlight extends CardImpl {
|
|||
|
||||
// Look at the top five cards of your library. You may reveal a historic card from among them and put it into your hand. Put the rest on the bottom of your library in random order.
|
||||
this.getSpellAbility().addEffect(
|
||||
new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false)
|
||||
.setBackInRandomOrder(true)
|
||||
new LookLibraryAndPickControllerEffect(5, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM)
|
||||
.setText("Look at the top five cards of your library. You may reveal a historic card from among them"
|
||||
+ " and put it into your hand. Put the rest on the bottom of your library in a random order. "
|
||||
+ "<i>(Artifacts, legendaries, and Sagas are historic.)</i>")
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -22,11 +22,8 @@ public final class BondOfFlourishing extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
|
||||
// Look at the top three card of your library. You may reveal a permanent card from among them and put it into your hand. Put the rest on the bottom of your library in any order. You gain 3 life.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(3), false,
|
||||
StaticValue.get(1), filter, false
|
||||
));
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(3).setText("You gain 3 life."));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(3, 1, filter, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(3));
|
||||
}
|
||||
|
||||
private BondOfFlourishing(final BondOfFlourishing card) {
|
||||
|
|
|
@ -3,12 +3,12 @@ package mage.cards.b;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -31,9 +31,7 @@ public final class BrazenUpstart extends CardImpl {
|
|||
|
||||
// When Brazen Upstart dies, look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new DiesSourceTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
5, 1, StaticFilters.FILTER_CARD_CREATURE_A,
|
||||
true, false, Zone.HAND, true
|
||||
).setBackInRandomOrder(true)));
|
||||
5, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_RANDOM)));
|
||||
}
|
||||
|
||||
private BrazenUpstart(final BrazenUpstart card) {
|
||||
|
|
|
@ -6,11 +6,11 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -28,11 +28,11 @@ public final class BrightwoodTracker extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// {5}{G}, {T}: Look at the top four cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
Ability ability = new SimpleActivatedAbility(new LookLibraryAndPickControllerEffect(
|
||||
4, 1, StaticFilters.FILTER_CARD_CREATURE_A,
|
||||
true, false, Zone.HAND, true
|
||||
).setBackInRandomOrder(true), new ManaCostsImpl("{5}{G}"));
|
||||
// {5}{G}, {T}: Look at the top four cards of your library. You may reveal a creature card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(4, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_RANDOM),
|
||||
new ManaCostsImpl("{5}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.LoyaltyAbility;
|
|||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -56,12 +57,11 @@ public final class CalixDestinysHand extends CardImpl {
|
|||
this.subtype.add(SubType.CALIX);
|
||||
this.setStartingLoyalty(4);
|
||||
|
||||
// +1: Look at the top four cards of your library. You may reveal an enchantment card from among them and put that card into your hand. Put the rest on the bottom of your library in a random order.
|
||||
// +1: Look at the top four cards of your library. You may reveal an enchantment card from among them and put that card into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1), filter,
|
||||
Zone.LIBRARY, false, true, false,
|
||||
Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top four cards of your library. "
|
||||
4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM
|
||||
).setText("Look at the top four cards of your library. "
|
||||
+ "You may reveal an enchantment card from among them and put that card into your hand. "
|
||||
+ "Put the rest on the bottom of your library in a random order."), 1
|
||||
));
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.LoyaltyAbility;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -56,9 +57,7 @@ class CarthTheLionTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
public CarthTheLionTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new LookLibraryAndPickControllerEffect(
|
||||
7, 1, filter, true, false, Zone.HAND, true)
|
||||
.setBackInRandomOrder(true)
|
||||
);
|
||||
7, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM));
|
||||
}
|
||||
|
||||
private CarthTheLionTriggeredAbility(final CarthTheLionTriggeredAbility ability) {
|
||||
|
|
|
@ -2,20 +2,12 @@ package mage.cards.c;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -27,7 +19,8 @@ public final class CartographersSurvey extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}");
|
||||
|
||||
// Look at the top seven cards of your library. Put up to two land cards from among them onto the battlefield tapped. Put the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new CartographersSurveyEffect());
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
7, 2, StaticFilters.FILTER_CARD_LANDS, PutCards.BATTLEFIELD_TAPPED, PutCards.BOTTOM_RANDOM, false));
|
||||
}
|
||||
|
||||
private CartographersSurvey(final CartographersSurvey card) {
|
||||
|
@ -39,35 +32,3 @@ public final class CartographersSurvey extends CardImpl {
|
|||
return new CartographersSurvey(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CartographersSurveyEffect extends LookLibraryControllerEffect {
|
||||
|
||||
public CartographersSurveyEffect() {
|
||||
super(Outcome.PutLandInPlay, StaticValue.get(7), false, Zone.LIBRARY, false);
|
||||
this.setBackInRandomOrder(true);
|
||||
staticText = "Look at the top seven cards of your library. Put up to two land cards from among them onto the battlefield tapped. Put the rest on the bottom of your library in a random order";
|
||||
}
|
||||
|
||||
private CartographersSurveyEffect(final CartographersSurveyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CartographersSurveyEffect copy() {
|
||||
return new CartographersSurveyEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionWithSelectedCards(Cards cards, Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
TargetCard target = new TargetCard(0, 2, Zone.LIBRARY, StaticFilters.FILTER_CARD_LANDS);
|
||||
controller.choose(outcome, cards, target, game);
|
||||
Cards pickedCards = new CardsImpl(target.getTargets());
|
||||
if (!pickedCards.isEmpty()) {
|
||||
cards.removeAll(pickedCards);
|
||||
controller.moveCards(pickedCards.getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,27 +5,24 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.common.ExileSourceFromGraveCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||
import mage.abilities.effects.common.RevealLibraryPickControllerEffect;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class CavalierOfThorns extends CardImpl {
|
||||
|
||||
|
@ -46,8 +43,10 @@ public final class CavalierOfThorns extends CardImpl {
|
|||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// When Cavalier of Thorns enters the battlefield, reveal the top five cards of your library. You may put a land card from among them onto the battlefield. Put the rest into your graveyard.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CavalierOfThornsEffect()));
|
||||
// When Cavalier of Thorns enters the battlefield, reveal the top five cards of your library.
|
||||
// Put a land card from among them onto the battlefield and the rest into your graveyard.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new RevealLibraryPickControllerEffect(
|
||||
5, 1, StaticFilters.FILTER_CARD_LAND_A, PutCards.BATTLEFIELD, PutCards.GRAVEYARD, false)));
|
||||
|
||||
// When Cavalier of Thorns dies, you may exile it. If you do, put another target card from your graveyard on top of your library.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DoIfCostPaid(
|
||||
|
@ -66,47 +65,3 @@ public final class CavalierOfThorns extends CardImpl {
|
|||
return new CavalierOfThorns(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CavalierOfThornsEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterLandCard("land card to put on the battlefield");
|
||||
|
||||
CavalierOfThornsEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "reveal the top five cards of your library. " +
|
||||
"Put a land card from among them onto the battlefield and the rest into your graveyard.";
|
||||
}
|
||||
|
||||
private CavalierOfThornsEffect(final CavalierOfThornsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));
|
||||
if (cards.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
controller.revealCards(source, cards, game);
|
||||
TargetCard target = new TargetCard(1, 1, Zone.LIBRARY, filter);
|
||||
if (cards.getCards(game).stream().anyMatch(card1 -> card1.isLand(game))
|
||||
&& controller.choose(Outcome.PutCardInPlay, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CavalierOfThornsEffect copy() {
|
||||
return new CavalierOfThornsEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,14 +3,12 @@ package mage.cards.c;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.BecomeDayAsEntersAbility;
|
||||
import mage.abilities.common.BecomesDayOrNightTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -31,10 +29,8 @@ public final class CelestusSanctifier extends CardImpl {
|
|||
this.addAbility(new BecomeDayAsEntersAbility());
|
||||
|
||||
// Whenever day becomes night or night becomes day, look at the top two cards of your library. Put one of them into your graveyard.
|
||||
this.addAbility(new BecomesDayOrNightTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(2), false, StaticValue.get(1), StaticFilters.FILTER_CARD,
|
||||
Zone.LIBRARY, true, false, false, Zone.GRAVEYARD, false
|
||||
).setText("look at the top two cards of your library. Put one of them into your graveyard")));
|
||||
this.addAbility(new BecomesDayOrNightTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(2, 1, PutCards.GRAVEYARD, PutCards.TOP_ANY)));
|
||||
}
|
||||
|
||||
private CelestusSanctifier(final CelestusSanctifier card) {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
|
||||
/**
|
||||
|
@ -17,20 +17,18 @@ import mage.filter.predicate.mageobject.ManaValuePredicate;
|
|||
*/
|
||||
public final class CollectedCompany extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("up to two creature cards with mana value 3 or less");
|
||||
private static final FilterCard filter = new FilterCreatureCard("creature cards with mana value 3 or less");
|
||||
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||
}
|
||||
|
||||
public CollectedCompany(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}");
|
||||
|
||||
// Look at the top six cards of your library. Put up to two creature cards with converted mana cost 3 or less from among them onto the battlefield.
|
||||
// Look at the top six cards of your library. Put up to two creature cards with mana value 3 or less from among them onto the battlefield.
|
||||
// Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(6, 2, filter, false, true, Zone.BATTLEFIELD, false));
|
||||
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(6, 2, filter, PutCards.BATTLEFIELD, PutCards.BOTTOM_ANY, false));
|
||||
}
|
||||
|
||||
private CollectedCompany(final CollectedCompany card) {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -30,7 +29,7 @@ public final class CommuneWithDinosaurs extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
|
||||
|
||||
//Look at the top five cards of your library. You may reveal a Dinosaur or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(1), filter, false));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(5, 1, filter, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private CommuneWithDinosaurs(final CommuneWithDinosaurs card) {
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,12 +17,10 @@ public final class CommuneWithNature extends CardImpl {
|
|||
public CommuneWithNature(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
|
||||
|
||||
// Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(
|
||||
new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), new FilterCreatureCard("a creature card"), false
|
||||
)
|
||||
);
|
||||
// Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
5, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private CommuneWithNature(final CommuneWithNature card) {
|
||||
|
@ -34,5 +31,4 @@ public final class CommuneWithNature extends CardImpl {
|
|||
public CommuneWithNature copy() {
|
||||
return new CommuneWithNature(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
|
@ -28,13 +27,9 @@ public final class CommuneWithSpirits extends CardImpl {
|
|||
public CommuneWithSpirits(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
|
||||
|
||||
// Look at the top four cards of your library. You may reveal an enchantment or land card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false,
|
||||
true, false, Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true).setText("look at the top four cards of your library. " +
|
||||
"You may reveal an enchantment or land card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order"));
|
||||
// Look at the top four cards of your library. You may reveal an enchantment or land card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM));
|
||||
}
|
||||
|
||||
private CommuneWithSpirits(final CommuneWithSpirits card) {
|
||||
|
|
|
@ -1,31 +1,35 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.*;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.RevealLibraryPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class CommuneWithTheGods extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a creature or enchantment card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
CardType.ENCHANTMENT.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public CommuneWithTheGods(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
|
||||
// Reveal the top five cards of your library. You may put a creature or enchantment card from among them into your hand. Put the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new CommuneWithTheGodsEffect());
|
||||
|
||||
// Reveal the top five cards of your library. You may put a creature or enchantment card from among them into your hand.
|
||||
// Put the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new RevealLibraryPickControllerEffect(5, 1, filter, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
}
|
||||
|
||||
private CommuneWithTheGods(final CommuneWithTheGods card) {
|
||||
|
@ -37,47 +41,3 @@ public final class CommuneWithTheGods extends CardImpl {
|
|||
return new CommuneWithTheGods(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CommuneWithTheGodsEffect extends OneShotEffect {
|
||||
|
||||
public CommuneWithTheGodsEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Reveal the top five cards of your library. You may put a creature or enchantment card from among them into your hand. Put the rest into your graveyard";
|
||||
}
|
||||
|
||||
public CommuneWithTheGodsEffect(final CommuneWithTheGodsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommuneWithTheGodsEffect copy() {
|
||||
return new CommuneWithTheGodsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));
|
||||
if (!cards.isEmpty()) {
|
||||
FilterCard filterPutInHand = new FilterCard("creature or enchantment card to put in hand");
|
||||
filterPutInHand.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.ENCHANTMENT.getPredicate()));
|
||||
controller.revealCards(source, cards, game);
|
||||
if (cards.count(filterPutInHand, source.getControllerId(), source, game) > 0) {
|
||||
TargetCard target = new TargetCard(0, 1, Zone.LIBRARY, filterPutInHand);
|
||||
if (controller.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -20,9 +17,7 @@ public final class ContingencyPlan extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}");
|
||||
|
||||
// Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(5),
|
||||
new FilterCard("cards"), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false));
|
||||
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(5, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY));
|
||||
}
|
||||
|
||||
private ContingencyPlan(final ContingencyPlan card) {
|
||||
|
|
|
@ -3,15 +3,14 @@ package mage.cards.c;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
@ -45,11 +44,7 @@ public final class CoralhelmChronicler extends CardImpl {
|
|||
|
||||
// When Coralhelm Chronicler enters the battlefield, look at the top five cards of your library. You may reveal a card with a kicker ability from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false,
|
||||
true, false, Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true).setText("look at the top five cards of your library. " +
|
||||
"You may reveal a card with a kicker ability from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order")));
|
||||
5, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM)));
|
||||
}
|
||||
|
||||
private CoralhelmChronicler(final CoralhelmChronicler card) {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -33,7 +32,8 @@ public final class CourageousOutrider extends CardImpl {
|
|||
|
||||
// When Courageous Outrider enters the battlefield, look at the top four cards of your library. You may reveal a Human card from among them
|
||||
// and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), filter, false) , false));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
4, 1, filter, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
}
|
||||
|
||||
private CourageousOutrider(final CourageousOutrider card) {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.ManaWasSpentCondition;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.SacrificeSourceUnlessConditionEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -14,8 +13,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -34,9 +31,7 @@ public final class CourtHussar extends CardImpl {
|
|||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
// When Court Hussar enters the battlefield, look at the top three cards of your library, then put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false),
|
||||
false));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(3, 1, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
// When Court Hussar enters the battlefield, sacrifice it unless {W} was spent to cast it.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessConditionEffect(new ManaWasSpentCondition(ColoredManaSymbol.W)), false));
|
||||
}
|
||||
|
@ -50,4 +45,3 @@ public final class CourtHussar extends CardImpl {
|
|||
return new CourtHussar(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -21,15 +19,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class CourtOfBounty extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a creature or land card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
CardType.LAND.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public CourtOfBounty(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}");
|
||||
|
||||
|
@ -38,7 +27,7 @@ public final class CourtOfBounty extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, you may put a land card from your hand onto the battlefield. If you're the monarch, instead you may put a creature or land card from your hand onto the battlefield.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ConditionalOneShotEffect(
|
||||
new PutCardFromHandOntoBattlefieldEffect(filter),
|
||||
new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_OR_LAND),
|
||||
new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A),
|
||||
MonarchIsSourceControllerCondition.instance, "you may put a land card " +
|
||||
"from your hand onto the battlefield. If you're the monarch, " +
|
||||
|
|
|
@ -4,15 +4,14 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
|
@ -28,11 +27,7 @@ public final class CreativeOutburst extends CardImpl {
|
|||
|
||||
// Creative Outburst deals 5 damage to any target. Look at the top five cards of your library. Put one of them into your hand and the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top five cards of your library. " +
|
||||
"Put one of them into your hand and the rest on the bottom of your library in a random order"));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(5, 1, PutCards.HAND, PutCards.BOTTOM_RANDOM));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
||||
// {U/R}{U/R}, Discard Creative Outburst: Create a Treasure token.
|
||||
|
|
|
@ -40,7 +40,7 @@ public final class CruelFate extends CardImpl {
|
|||
class CruelFateEffect extends OneShotEffect {
|
||||
|
||||
CruelFateEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Look at the top five cards of target opponent's library. " +
|
||||
"Put one of those cards into that player's graveyard and the rest on top of their library in any order";
|
||||
}
|
||||
|
@ -75,6 +75,6 @@ class CruelFateEffect extends OneShotEffect {
|
|||
controller.moveCards(card, Zone.GRAVEYARD, source, game);
|
||||
cards.remove(card);
|
||||
}
|
||||
return controller.putCardsOnTopOfLibrary(card, game, source, true);
|
||||
return controller.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class Curate extends CardImpl {
|
||||
|
||||
|
@ -25,8 +18,10 @@ public final class Curate extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Look at the top two cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(2, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY));
|
||||
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new CurateEffect());
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
|
||||
}
|
||||
|
||||
private Curate(final Curate card) {
|
||||
|
@ -38,40 +33,3 @@ public final class Curate extends CardImpl {
|
|||
return new Curate(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CurateEffect extends OneShotEffect {
|
||||
|
||||
CurateEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "look at the top two cards of your library. Put any number of them into your graveyard " +
|
||||
"and the rest back on top of your library in any order.<br>Draw a card";
|
||||
}
|
||||
|
||||
private CurateEffect(final CurateEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurateEffect copy() {
|
||||
return new CurateEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 2));
|
||||
if (!cards.isEmpty()) {
|
||||
TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY, StaticFilters.FILTER_CARD);
|
||||
target.withChooseHint("to graveyard");
|
||||
player.chooseTarget(Outcome.Benefit, cards, target, source, game);
|
||||
player.moveCards(new CardsImpl(target.getTargets()), Zone.GRAVEYARD, source, game);
|
||||
cards.removeAll(target.getTargets());
|
||||
player.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
}
|
||||
player.drawCards(1, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,32 +1,25 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageControllerEffect;
|
||||
import mage.cards.*;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Quercitron
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class DarkBargain extends CardImpl {
|
||||
|
||||
public DarkBargain(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
|
||||
|
||||
// Look at the top three cards of your library. Put two of them into your hand and the rest into your graveyard.
|
||||
// Look at the top three cards of your library. Put two of them into your hand and the other into your graveyard.
|
||||
// Dark Bargain deals 2 damage to you.
|
||||
this.getSpellAbility().addEffect(new DarkBargainEffect());
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(3, 2, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
this.getSpellAbility().addEffect(new DamageControllerEffect(2));
|
||||
}
|
||||
|
||||
|
@ -39,47 +32,3 @@ public final class DarkBargain extends CardImpl {
|
|||
return new DarkBargain(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DarkBargainEffect extends OneShotEffect {
|
||||
|
||||
public DarkBargainEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Look at the top three cards of your library. Put two of them into your hand and the other into your graveyard";
|
||||
}
|
||||
|
||||
public DarkBargainEffect(final DarkBargainEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DarkBargainEffect copy() {
|
||||
return new DarkBargainEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceOject = source.getSourceObject(game);
|
||||
if (player != null && sourceOject != null) {
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3));
|
||||
if (!cards.isEmpty()) {
|
||||
Cards cardsToHand = new CardsImpl();
|
||||
player.lookAtCards(sourceOject.getIdName(), cards, game);
|
||||
TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.LIBRARY, new FilterCard("two cards to put in your hand"));
|
||||
if (player.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Card card = cards.get(targetId, game);
|
||||
if (card != null) {
|
||||
cardsToHand.add(card);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,29 +2,29 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.*;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.filter.common.FilterPlaneswalkerCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class DeployTheGatewatch extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterPlaneswalkerCard("planeswalker cards");
|
||||
|
||||
public DeployTheGatewatch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{W}");
|
||||
|
||||
// Look at the top seven cards of your library. Put up to two planeswalker cards from among them onto the battlefield.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new DeployTheGatewatchEffect());
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
7, 2, filter, PutCards.BATTLEFIELD, PutCards.BOTTOM_RANDOM, false));
|
||||
}
|
||||
|
||||
private DeployTheGatewatch(final DeployTheGatewatch card) {
|
||||
|
@ -36,50 +36,3 @@ public final class DeployTheGatewatch extends CardImpl {
|
|||
return new DeployTheGatewatch(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DeployTheGatewatchEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("up to two planeswalker cards");
|
||||
|
||||
static {
|
||||
filter.add(CardType.PLANESWALKER.getPredicate());
|
||||
}
|
||||
|
||||
public DeployTheGatewatchEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Look at the top seven cards of your library. Put up to two planeswalker cards from among them onto the battlefield. "
|
||||
+ "Put the rest on the bottom of your library in a random order";
|
||||
}
|
||||
|
||||
public DeployTheGatewatchEffect(final DeployTheGatewatchEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeployTheGatewatchEffect copy() {
|
||||
return new DeployTheGatewatchEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
// Look at the top seven cards of your library.
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 7));
|
||||
controller.lookAtCards(source, null, cards, game);
|
||||
// Put up to two planeswalker cards from among them onto the battlefield.
|
||||
if (cards.count(filter, game) > 0) {
|
||||
TargetCard target = new TargetCard(0, 2, Zone.LIBRARY, filter);
|
||||
if (controller.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
Cards pickedCards = new CardsImpl(target.getTargets());
|
||||
cards.removeAll(pickedCards);
|
||||
controller.moveCards(pickedCards.getCards(game), Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
// Put the rest on the bottom of your library in a random order
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -19,7 +17,7 @@ public final class DiabolicVision extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{B}");
|
||||
|
||||
// Look at the top five cards of your library. Put one of them into your hand and the rest on top of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(5), false, StaticValue.get(1), new FilterCard(), true, false));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(5, 1, PutCards.HAND, PutCards.TOP_ANY));
|
||||
}
|
||||
|
||||
private DiabolicVision(final DiabolicVision card) {
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.DelveAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -23,7 +21,7 @@ public final class DigThroughTime extends CardImpl {
|
|||
this.addAbility(new DelveAbility());
|
||||
|
||||
// Look at the top seven cards of your library. Put two of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(7), false, StaticValue.get(2), new FilterCard(), Zone.LIBRARY, false, false));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(7, 2, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private DigThroughTime(final DigThroughTime card) {
|
||||
|
|
|
@ -4,14 +4,13 @@ import java.util.UUID;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
@ -41,10 +40,8 @@ public final class DiscerningTaste extends CardImpl {
|
|||
|
||||
class DiscerningTasteEffect extends LookLibraryAndPickControllerEffect {
|
||||
|
||||
public DiscerningTasteEffect() {
|
||||
super(StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD,
|
||||
false, false, false, Zone.HAND, false, false, false
|
||||
);
|
||||
DiscerningTasteEffect() {
|
||||
super(4, 1, PutCards.HAND, PutCards.GRAVEYARD);
|
||||
}
|
||||
|
||||
private DiscerningTasteEffect(final DiscerningTasteEffect effect) {
|
||||
|
@ -57,16 +54,17 @@ class DiscerningTasteEffect extends LookLibraryAndPickControllerEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void putCardsBack(Ability source, Player player, Cards cards, Game game) {
|
||||
protected boolean actionWithPickedCards(Game game, Ability source, Player player, Cards pickedCards, Cards otherCards) {
|
||||
super.actionWithPickedCards(game, source, player, pickedCards, otherCards);
|
||||
int life = 0;
|
||||
for (Card card : cards.getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
|
||||
for (Card card : otherCards.getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
|
||||
int power = card.getPower().getValue();
|
||||
if (power > life) {
|
||||
life = power;
|
||||
}
|
||||
}
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
player.gainLife(life, game, source);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,10 +5,10 @@ import mage.Mana;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.GetEmblemEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.mana.ManaEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledSpellsEffect;
|
||||
import mage.abilities.effects.mana.BasicManaEffect;
|
||||
|
@ -46,15 +46,7 @@ public final class DomriChaosBringer extends CardImpl {
|
|||
// creature cards from among them and put them into your hand. Put the rest
|
||||
// on the bottom of your library in a random order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(2),
|
||||
StaticFilters.FILTER_CARD_CREATURE, Zone.LIBRARY, false,
|
||||
true, true, Zone.HAND, false, false, false
|
||||
).setText(
|
||||
"Look at the top four cards of your library. "
|
||||
+ "You may reveal up to two creature cards from among them "
|
||||
+ "and put them into your hand. Put the rest on the bottom of your library "
|
||||
+ "in a random order."
|
||||
), -3));
|
||||
4, 2, StaticFilters.FILTER_CARD_CREATURES, PutCards.HAND, PutCards.BOTTOM_RANDOM), -3));
|
||||
|
||||
// −8: You get an emblem with "At the beginning of each end step, create a 4/4 red
|
||||
// and green Beast creature token with trample."
|
||||
|
|
|
@ -3,17 +3,16 @@ package mage.cards.d;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -41,19 +40,13 @@ public final class DovinGrandArbiter extends CardImpl {
|
|||
|
||||
// -1: Create a 1/1 colorless Thopter artifact creature token with flying. You gain 1 life.
|
||||
Ability ability = new LoyaltyAbility(new CreateTokenEffect(new ThopterColorlessToken()), -1);
|
||||
ability.addEffect(new GainLifeEffect(1).setText("You gain 1 life."));
|
||||
ability.addEffect(new GainLifeEffect(1));
|
||||
this.addAbility(ability);
|
||||
|
||||
// -7: Look at the top ten cards of your library. Put three of them into your hand and the rest on the bottom of your library in a random order.
|
||||
// -7: Look at the top ten cards of your library. Put three of them into your hand
|
||||
// and the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(10), false,
|
||||
StaticValue.get(3), StaticFilters.FILTER_CARD,
|
||||
Zone.LIBRARY, false, false, false,
|
||||
Zone.HAND, false, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top ten cards of your library. " +
|
||||
"Put three of them into your hand and the rest " +
|
||||
"on the bottom of your library in a random order."
|
||||
), -7));
|
||||
10, 3, PutCards.HAND, PutCards.BOTTOM_RANDOM), -7));
|
||||
}
|
||||
|
||||
private DovinGrandArbiter(final DovinGrandArbiter card) {
|
||||
|
|
|
@ -1,26 +1,22 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.SourceTappedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -40,14 +36,15 @@ public final class DragonlordOjutai extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Dragonlord Ojutai has hexproof as long as it's untapped.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
SourceTappedCondition.UNTAPPED,
|
||||
"{this} has hexproof as long as it's untapped")));
|
||||
|
||||
// Whenever Dragonlord Ojutai deals combat damage to a player, look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LookLibraryAndPickControllerEffect
|
||||
(StaticValue.get(3), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false), false));
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(3, 1, PutCards.HAND, PutCards.BOTTOM_ANY),
|
||||
false));
|
||||
}
|
||||
|
||||
private DragonlordOjutai(final DragonlordOjutai card) {
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -19,10 +17,7 @@ public final class DrawnFromDreams extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}");
|
||||
|
||||
// Look at the top seven cards of your library. Put two of them into your hand and the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(7), false, StaticValue.get(2),
|
||||
StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false
|
||||
).setBackInRandomOrder(true));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(7, 2, PutCards.HAND, PutCards.BOTTOM_RANDOM));
|
||||
}
|
||||
|
||||
private DrawnFromDreams(final DrawnFromDreams card) {
|
||||
|
|
|
@ -7,21 +7,19 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class DuskwatchRecruiter extends CardImpl {
|
||||
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("a creature card");
|
||||
|
||||
public DuskwatchRecruiter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
@ -35,8 +33,8 @@ public final class DuskwatchRecruiter extends CardImpl {
|
|||
|
||||
// {2}{G}: Look at the top three cards of your library. You may reveal a creature card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new LookLibraryAndPickControllerEffect(3, 1, filter, true, false, Zone.HAND, true),
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(3, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_ANY),
|
||||
new ManaCostsImpl("{2}{G}")));
|
||||
|
||||
// At the beginning of each upkeep, if no spells were cast last turn, transform Duskwatch Recruiter.
|
||||
|
@ -52,5 +50,4 @@ public final class DuskwatchRecruiter extends CardImpl {
|
|||
public DuskwatchRecruiter copy() {
|
||||
return new DuskwatchRecruiter(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,26 +2,18 @@ package mage.cards.e;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class ElvishRejuvenator extends CardImpl {
|
||||
|
||||
|
@ -33,8 +25,11 @@ public final class ElvishRejuvenator extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever Elvish Rejuvenator enters the battlefield, look at the top five cards of your library. You may put a land card from among them onto the battlefield tapped. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ElvishRejuvenatorEffect(), false));
|
||||
// When Elvish Rejuvenator enters the battlefield, look at the top five cards of your library.
|
||||
// You may put a land card from among them onto the battlefield tapped.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
5, 1, StaticFilters.FILTER_CARD_LAND_A, PutCards.BATTLEFIELD_TAPPED, PutCards.BOTTOM_RANDOM)));
|
||||
}
|
||||
|
||||
private ElvishRejuvenator(final ElvishRejuvenator card) {
|
||||
|
@ -46,49 +41,3 @@ public final class ElvishRejuvenator extends CardImpl {
|
|||
return new ElvishRejuvenator(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ElvishRejuvenatorEffect extends OneShotEffect {
|
||||
|
||||
public ElvishRejuvenatorEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "look at the top five cards of your library. "
|
||||
+ "You may put a land card from among them onto the battlefield tapped. "
|
||||
+ "Put the rest on the bottom of your library in a random order";
|
||||
}
|
||||
|
||||
public ElvishRejuvenatorEffect(final ElvishRejuvenatorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 5));
|
||||
if (!cards.isEmpty()) {
|
||||
TargetCard target = new TargetCard(
|
||||
0, 1, Zone.LIBRARY,
|
||||
new FilterLandCard("land card to put on the battlefield")
|
||||
);
|
||||
if (controller.choose(Outcome.PutCardInPlay, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, true, null);
|
||||
}
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElvishRejuvenatorEffect copy() {
|
||||
return new ElvishRejuvenatorEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
|
||||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -20,11 +18,6 @@ import mage.filter.FilterCard;
|
|||
*/
|
||||
public final class FaerieMechanist extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("an artifact card");
|
||||
static {
|
||||
filter.add(CardType.ARTIFACT.getPredicate());
|
||||
}
|
||||
|
||||
public FaerieMechanist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}");
|
||||
|
||||
|
@ -36,7 +29,8 @@ public final class FaerieMechanist extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Faerie Mechanist enters the battlefield, look at the top three cards of your library.
|
||||
// You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1), filter, false)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
3, 1, StaticFilters.FILTER_CARD_ARTIFACT_AN, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
}
|
||||
|
||||
private FaerieMechanist(final FaerieMechanist card) {
|
||||
|
@ -47,5 +41,4 @@ public final class FaerieMechanist extends CardImpl {
|
|||
public FaerieMechanist copy() {
|
||||
return new FaerieMechanist(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ package mage.cards.f;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.CastSecondSpellTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -11,8 +11,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -36,11 +34,10 @@ public final class FirjaJudgeOfValor extends CardImpl {
|
|||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
||||
// Whenever you cast your second spell each turn, look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard.
|
||||
// Whenever you cast your second spell each turn, look at the top three cards of your library.
|
||||
// Put one of them into your hand and the rest into your graveyard.
|
||||
this.addAbility(new CastSecondSpellTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(3), false, StaticValue.get(1), StaticFilters.FILTER_CARD,
|
||||
Zone.GRAVEYARD, false, false, false, Zone.HAND, false
|
||||
)));
|
||||
3, 1, PutCards.HAND, PutCards.GRAVEYARD)));
|
||||
}
|
||||
|
||||
private FirjaJudgeOfValor(final FirjaJudgeOfValor card) {
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.ExileFromGraveCost;
|
||||
import mage.abilities.costs.common.ExileXFromYourGraveCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class FlashOfInsight extends CardImpl {
|
||||
|
||||
|
@ -36,7 +34,8 @@ public final class FlashOfInsight extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{1}{U}");
|
||||
|
||||
// Look at the top X cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new FlashOfInsightEffect());
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
FlashOfInsightValue.instance, 1, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
|
||||
// Flashback-{1}{U}, Exile X blue cards from your graveyard.
|
||||
Ability ability = new FlashbackAbility(this, new ManaCostsImpl<>("{1}{U}"));
|
||||
|
@ -54,51 +53,32 @@ public final class FlashOfInsight extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class FlashOfInsightEffect extends OneShotEffect {
|
||||
enum FlashOfInsightValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
public FlashOfInsightEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Look at the top X cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order";
|
||||
}
|
||||
|
||||
public FlashOfInsightEffect(final FlashOfInsightEffect effect) {
|
||||
super(effect);
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
int xValue = sourceAbility.getManaCostsToPay().getX();
|
||||
for (Cost cost : sourceAbility.getCosts()) {
|
||||
if (cost instanceof ExileXFromYourGraveCost) {
|
||||
xValue = ((ExileXFromYourGraveCost) cost).getAmount();
|
||||
}
|
||||
}
|
||||
return xValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlashOfInsightEffect copy() {
|
||||
return new FlashOfInsightEffect(this);
|
||||
public FlashOfInsightValue copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source);
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
|
||||
int xValue = source.getManaCostsToPay().getX();
|
||||
|
||||
for (Cost cost : source.getCosts()) {
|
||||
if (cost instanceof ExileFromGraveCost) {
|
||||
xValue = ((ExileFromGraveCost) cost).getExiledCards().size();
|
||||
}
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, xValue));
|
||||
controller.lookAtCards(sourceObject.getIdName(), cards, game);
|
||||
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
|
||||
target.setNotTarget(true);
|
||||
if (controller.chooseTarget(Outcome.DrawCard, cards, target, source, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, true);
|
||||
return true;
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -22,8 +19,7 @@ public final class ForbiddenAlchemy extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
|
||||
|
||||
// Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(4, 1, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
|
||||
// Flashback {6}{B}
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{6}{B}")));
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SacrificeSourceTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.EmergeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.EldraziHorrorToken;
|
||||
|
@ -26,12 +25,6 @@ import mage.game.stack.Spell;
|
|||
*/
|
||||
public final class FoulEmissary extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a creature card");
|
||||
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
}
|
||||
|
||||
public FoulEmissary(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
@ -40,7 +33,8 @@ public final class FoulEmissary extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// When Foul Emissary enters the battlefield, look at the top four cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), filter, false)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
4, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
|
||||
// When you sacrifice Foul Emissary while casting a spell with emerge, create a 3/2 colorless Eldrazi Horror creature token.
|
||||
this.addAbility(new FoulEmissaryTriggeredAbility(new CreateTokenEffect(new EldraziHorrorToken()), false));
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.SavedDamageValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.HexproofFromBlackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -24,9 +21,20 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GarruksHarbinger extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("creature card or Garruk planeswalker card");
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
Predicates.and(
|
||||
CardType.PLANESWALKER.getPredicate(),
|
||||
SubType.GARRUK.getPredicate()
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public GarruksHarbinger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
|
||||
|
||||
|
||||
this.subtype.add(SubType.BEAST);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
@ -34,11 +42,12 @@ public final class GarruksHarbinger extends CardImpl {
|
|||
// Hexproof from Black
|
||||
this.addAbility(HexproofFromBlackAbility.getInstance());
|
||||
|
||||
// Whenever Garruk's Harbinger deals combat damage to a player or planeswalker, look at that many cards from the top of your library. You may reveal a creature card or Garruk planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(
|
||||
new DealsCombatDamageToAPlayerTriggeredAbility(new GarruksHarbingerEffect(), false, true)
|
||||
.setOrPlaneswalker(true)
|
||||
);
|
||||
// Whenever Garruk's Harbinger deals combat damage to a player or planeswalker, look at that many cards from the top of your library.
|
||||
// You may reveal a creature card or Garruk planeswalker card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(SavedDamageValue.MANY, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM),
|
||||
false, true).setOrPlaneswalker(true));
|
||||
}
|
||||
|
||||
private GarruksHarbinger(final GarruksHarbinger card) {
|
||||
|
@ -50,37 +59,3 @@ public final class GarruksHarbinger extends CardImpl {
|
|||
return new GarruksHarbinger(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GarruksHarbingerEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a creature or Garruk planeswalker card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(CardType.CREATURE.getPredicate(), Predicates.and(CardType.PLANESWALKER.getPredicate(), SubType.GARRUK.getPredicate())));
|
||||
}
|
||||
|
||||
GarruksHarbingerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "look at that many cards from the top of your library. You may reveal a creature card or Garruk planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in a random order";
|
||||
}
|
||||
|
||||
private GarruksHarbingerEffect(GarruksHarbingerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GarruksHarbingerEffect copy() {
|
||||
return new GarruksHarbingerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Integer damage = (Integer) getValue("damage");
|
||||
if (damage != null) {
|
||||
LookLibraryAndPickControllerEffect effect = new LookLibraryAndPickControllerEffect(StaticValue.get(damage), false, StaticValue.get(1), filter, false);
|
||||
effect.setBackInRandomOrder(true);
|
||||
return effect.apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,35 +1,37 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.SpellMasteryCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.RevealLibraryPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class GatherThePack extends CardImpl {
|
||||
|
||||
private static final String rule = "Reveal the top five cards of your library. " +
|
||||
"You may put a creature card from among them into your hand. Put the rest into your graveyard.<br>" +
|
||||
AbilityWord.SPELL_MASTERY.formatWord() + "If " + SpellMasteryCondition.instance.toString() +
|
||||
", put up to two creature cards from among the revealed cards into your hand instead of one";
|
||||
|
||||
public GatherThePack(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
|
||||
// Reveal the top five cards of your library. You may put a creature card from among them into your hand. Put the rest into your graveyard.
|
||||
// <i>Spell mastery</i> — If there are two or more instant and/or sorcery cards in your graveyard, put up to two creature cards from among the revealed cards into your hand instead of one.
|
||||
this.getSpellAbility().addEffect(new GatherThePackEffect());
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new RevealLibraryPickControllerEffect(5, 2, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.GRAVEYARD),
|
||||
new RevealLibraryPickControllerEffect(5, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.GRAVEYARD),
|
||||
SpellMasteryCondition.instance, rule
|
||||
));
|
||||
}
|
||||
|
||||
private GatherThePack(final GatherThePack card) {
|
||||
|
@ -41,53 +43,3 @@ public final class GatherThePack extends CardImpl {
|
|||
return new GatherThePack(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GatherThePackEffect extends OneShotEffect {
|
||||
|
||||
public GatherThePackEffect(final GatherThePackEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
public GatherThePackEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Reveal the top five cards of your library. You may put a creature card from among them into your hand. Put the rest into your graveyard."
|
||||
+ "<br><i>Spell mastery</i> — If there are two or more instant and/or sorcery cards in your graveyard, put up to two creature cards from among the revealed cards into your hand instead of one";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));
|
||||
if (!cards.isEmpty()) {
|
||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||
int creatures = cards.count(StaticFilters.FILTER_CARD_CREATURE, source.getControllerId(), source, game);
|
||||
if (creatures > 0) {
|
||||
int max = 1;
|
||||
if (SpellMasteryCondition.instance.apply(game, source) && creatures > 1) {
|
||||
max++;
|
||||
}
|
||||
TargetCard target = new TargetCard(0, max, Zone.LIBRARY, new FilterCreatureCard("creature card" + (max > 1 ? "s" : "") + " to put into your hand"));
|
||||
if (controller.choose(Outcome.PutCreatureInPlay, cards, target, game)) {
|
||||
Cards cardsToHand = new CardsImpl(target.getTargets());
|
||||
if (!cardsToHand.isEmpty()) {
|
||||
cards.removeAll(cardsToHand);
|
||||
controller.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GatherThePackEffect copy() {
|
||||
return new GatherThePackEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,16 +3,15 @@ package mage.cards.g;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.BecomeDayAsEntersAbility;
|
||||
import mage.abilities.common.BecomesDayOrNightTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
|
@ -24,7 +23,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GavonyDawnguard extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCreatureCard("creature card with mana value 3 or less");
|
||||
private static final FilterCard filter = new FilterCreatureCard("a creature card with mana value 3 or less");
|
||||
|
||||
static {
|
||||
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
|
||||
|
@ -39,18 +38,14 @@ public final class GavonyDawnguard extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Ward {1}
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{1}")));
|
||||
this.addAbility(new WardAbility(new GenericManaCost(1)));
|
||||
|
||||
// If it's neither day nor night, it becomes day as Gavony Dawnguard enters the battlefield.
|
||||
this.addAbility(new BecomeDayAsEntersAbility());
|
||||
|
||||
// Whenever day becomes night or night becomes day, look at the top four cards of your library. You may reveal a creature card with mana value 3 or less from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new BecomesDayOrNightTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false,
|
||||
true, false, Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true).setText("look at the top four cards of your library. " +
|
||||
"You may reveal a creature card with mana value 3 or less from among them " +
|
||||
"and put it into your hand. Put the rest on the bottom of your library in any order")));
|
||||
4, 1, filter, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
}
|
||||
|
||||
private GavonyDawnguard(final GavonyDawnguard card) {
|
||||
|
|
|
@ -1,34 +1,32 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.ExileSpellEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class GenesisUltimatum extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterPermanentCard("permanent cards");
|
||||
|
||||
public GenesisUltimatum(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{G}{U}{U}{U}{R}{R}");
|
||||
|
||||
// Look at the top five cards of your library. Put any number of permanent cards from among them onto the battlefield and the rest into your hand. Exile Genesis Ultimatum.
|
||||
this.getSpellAbility().addEffect(new GenesisUltimatumEffect());
|
||||
// Look at the top five cards of your library.
|
||||
// Put any number of permanent cards from among them onto the battlefield and the rest into your hand.
|
||||
// Exile Genesis Ultimatum.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
5, Integer.MAX_VALUE, filter, PutCards.BATTLEFIELD, PutCards.HAND, false
|
||||
).setText("look at the top five cards of your library. Put any number of permanent cards from among them onto the battlefield and the rest into your hand"));
|
||||
this.getSpellAbility().addEffect(new ExileSpellEffect());
|
||||
}
|
||||
|
||||
|
@ -41,45 +39,3 @@ public final class GenesisUltimatum extends CardImpl {
|
|||
return new GenesisUltimatum(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GenesisUltimatumEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterPermanentCard("any number of permanent cards");
|
||||
|
||||
GenesisUltimatumEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
staticText = "Look at the top five cards of your library. Put any number of permanent cards " +
|
||||
"from among them onto the battlefield and the rest into your hand";
|
||||
}
|
||||
|
||||
private GenesisUltimatumEffect(final GenesisUltimatumEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenesisUltimatumEffect copy() {
|
||||
return new GenesisUltimatumEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards toHand = new CardsImpl(player.getLibrary().getTopCards(game, 5));
|
||||
player.lookAtCards(source, null, toHand, game);
|
||||
TargetCard targetCard = new TargetCardInLibrary(0, 5, filter);
|
||||
targetCard.withChooseHint("put to battlefield");
|
||||
player.choose(outcome, toHand, targetCard, game);
|
||||
Cards toBattlefield = new CardsImpl(targetCard.getTargets());
|
||||
if (player.moveCards(toBattlefield, Zone.BATTLEFIELD, source, game)) {
|
||||
toBattlefield
|
||||
.stream()
|
||||
.filter(id -> Zone.BATTLEFIELD.equals(game.getState().getZone(id)))
|
||||
.forEach(toHand::remove);
|
||||
}
|
||||
player.moveCards(toHand, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +1,35 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.RevealLibraryPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class GlacialRevelation extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterPermanentCard("snow permanent cards");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.SNOW.getPredicate());
|
||||
}
|
||||
|
||||
public GlacialRevelation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
|
||||
|
||||
// Reveal the top six cards of your library. You may put any number of snow permanent cards from among them into your hand. Put the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new GlacialRevelationEffect());
|
||||
// Reveal the top six cards of your library.
|
||||
// You may put any number of snow permanent cards from among them into your hand.
|
||||
// Put the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new RevealLibraryPickControllerEffect(
|
||||
6, Integer.MAX_VALUE, filter, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
}
|
||||
|
||||
private GlacialRevelation(final GlacialRevelation card) {
|
||||
|
@ -39,45 +41,3 @@ public final class GlacialRevelation extends CardImpl {
|
|||
return new GlacialRevelation(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GlacialRevelationEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterPermanentCard("snow permanent cards");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.SNOW.getPredicate());
|
||||
}
|
||||
|
||||
GlacialRevelationEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Reveal the top six cards of your library. You may put any number of snow permanent cards " +
|
||||
"from among them into your hand. Put the rest into your graveyard.";
|
||||
}
|
||||
|
||||
private GlacialRevelationEffect(final GlacialRevelationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlacialRevelationEffect copy() {
|
||||
return new GlacialRevelationEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 6));
|
||||
player.revealCards(source, cards, game);
|
||||
TargetCard targetCard = new TargetCard(0, Integer.MAX_VALUE, Zone.LIBRARY, filter);
|
||||
targetCard.setNotTarget(true);
|
||||
if (player.choose(outcome, cards, targetCard, game)) {
|
||||
Cards toHand = new CardsImpl(targetCard.getTargets());
|
||||
cards.removeAll(targetCard.getTargets());
|
||||
player.moveCards(toHand, Zone.HAND, source, game);
|
||||
}
|
||||
return player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
}
|
|
@ -4,14 +4,13 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -35,12 +34,7 @@ public class GlimpseTheCosmos extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}");
|
||||
|
||||
// Look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(3), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD, Zone.LIBRARY, false,
|
||||
false, false, Zone.HAND, false
|
||||
).setText("look at the top three cards of your library. "
|
||||
+ "Put one of them into your hand and the rest on the bottom of your library in any order"));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(3, 1, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
|
||||
//As long as you control a Giant, you may cast Glimpse the Cosmos from your graveyard by paying {U} rather than paying its mana cost. If you cast Glimpse the Cosmos this way and it would be put into your graveyard, exile it instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.GRAVEYARD,
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.*;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -19,9 +17,7 @@ public final class GlimpseTheFuture extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}");
|
||||
|
||||
// Look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(3), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false));
|
||||
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(3, 1, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
}
|
||||
|
||||
private GlimpseTheFuture(final GlimpseTheFuture card) {
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
|
@ -29,11 +27,11 @@ public final class GlintNestCrane extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Glint-Nest Crane enters the battlefield, look at the top four cards of your library. You may reveal an artifact card from among them and
|
||||
// put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD_ARTIFACT_AN, Zone.LIBRARY, false, true, false, Zone.HAND, true)));
|
||||
// When Glint-Nest Crane enters the battlefield, look at the top four cards of your library.
|
||||
// You may reveal an artifact card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
4, 1, StaticFilters.FILTER_CARD_ARTIFACT_AN, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
}
|
||||
|
||||
private GlintNestCrane(final GlintNestCrane card) {
|
||||
|
|
|
@ -7,19 +7,17 @@ import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.DeliriumCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.hint.common.CardTypesInGraveyardHint;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author fireshoes
|
||||
|
@ -36,19 +34,18 @@ public final class GrimFlayer extends CardImpl {
|
|||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Whenever Grim Flayer deals combat damage to a player, look at the top three cards of your library. Put any number of them into your graveyard
|
||||
// and the rest back on top of your library in any order.
|
||||
Effect effect = new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(3), false, StaticValue.get(3), new FilterCard(), Zone.LIBRARY, true, false, true, Zone.GRAVEYARD, false);
|
||||
effect.setText("look at the top three cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order");
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(effect, false));
|
||||
// Whenever Grim Flayer deals combat damage to a player, look at the top three cards of your library.
|
||||
// Put any number of them into your graveyard and the rest back on top of your library in any order.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(3, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY),
|
||||
false));
|
||||
|
||||
// <i>Delirium</i> — Grim Flayer gets +2/+2 as long as there are four or more card types among cards in your graveyard.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
|
||||
DeliriumCondition.instance,
|
||||
"<i>Delirium</i> — {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard"))
|
||||
.addHint(CardTypesInGraveyardHint.YOU));
|
||||
"{this} gets +2/+2 as long as there are four or more card types among cards in your graveyard"))
|
||||
.setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardHint.YOU));
|
||||
}
|
||||
|
||||
private GrimFlayer(final GrimFlayer card) {
|
||||
|
|
|
@ -1,30 +1,28 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.*;
|
||||
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.RevealLibraryPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class GrislySalvage extends CardImpl {
|
||||
|
||||
public GrislySalvage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{G}");
|
||||
|
||||
// Reveal the top five cards of your library. You may put a creature or land card from among them into your hand. Put the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new GrislySalvageEffect());
|
||||
// Reveal the top five cards of your library.
|
||||
// You may put a creature or land card from among them into your hand.
|
||||
// Put the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new RevealLibraryPickControllerEffect(
|
||||
5, 1, StaticFilters.FILTER_CARD_CREATURE_OR_LAND, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
}
|
||||
|
||||
private GrislySalvage(final GrislySalvage card) {
|
||||
|
@ -36,50 +34,3 @@ public final class GrislySalvage extends CardImpl {
|
|||
return new GrislySalvage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GrislySalvageEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filterPutInHand = new FilterCard("creature or land card to put in hand");
|
||||
|
||||
static {
|
||||
filterPutInHand.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.LAND.getPredicate()));
|
||||
}
|
||||
|
||||
public GrislySalvageEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Reveal the top five cards of your library. You may put a creature or land card from among them into your hand. Put the rest into your graveyard";
|
||||
}
|
||||
|
||||
public GrislySalvageEffect(final GrislySalvageEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrislySalvageEffect copy() {
|
||||
return new GrislySalvageEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));
|
||||
boolean properCardFound = cards.count(filterPutInHand, game) > 0;
|
||||
if (!cards.isEmpty()) {
|
||||
controller.revealCards(source, cards, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, filterPutInHand);
|
||||
if (properCardFound && controller.chooseUse(outcome, "Put a creature or land card from the revealed cards into your hand?", source, game)
|
||||
&& controller.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -8,6 +7,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -16,8 +16,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
|
@ -25,12 +23,6 @@ import mage.filter.StaticFilters;
|
|||
*/
|
||||
public final class GrowingRitesOfItlimoc extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a creature card");
|
||||
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
}
|
||||
|
||||
public GrowingRitesOfItlimoc(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
|
||||
|
@ -41,7 +33,8 @@ public final class GrowingRitesOfItlimoc extends CardImpl {
|
|||
// When Growing Rites of Itlimoc enters the battlefield, look at the top four cards of your library.
|
||||
// You may reveal a creature card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(4, 1, filter, true, true, Zone.HAND, false)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
4, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
|
||||
// At the beginning of your end step, if you control four or more creatures, transform Growing Rites of Itlimoc.
|
||||
this.addAbility(new TransformAbility());
|
||||
|
@ -59,4 +52,4 @@ public final class GrowingRitesOfItlimoc extends CardImpl {
|
|||
public GrowingRitesOfItlimoc copy() {
|
||||
return new GrowingRitesOfItlimoc(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.ExploitCreatureTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.ExploitAbility;
|
||||
import mage.cards.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -29,9 +27,10 @@ public final class GurmagDrowner extends CardImpl {
|
|||
// Exploit
|
||||
this.addAbility(new ExploitAbility());
|
||||
|
||||
// When Gurmag Drowner exploits a creature, look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard.
|
||||
this.addAbility(new ExploitCreatureTriggeredAbility(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1),
|
||||
StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false), false));
|
||||
// When Gurmag Drowner exploits a creature, look at the top four cards of your library.
|
||||
// Put one of them into your hand and the rest into your graveyard.
|
||||
this.addAbility(new ExploitCreatureTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(4, 1, PutCards.HAND, PutCards.GRAVEYARD)));
|
||||
}
|
||||
|
||||
private GurmagDrowner(final GurmagDrowner card) {
|
||||
|
|
|
@ -2,15 +2,14 @@ package mage.cards.h;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
|
@ -43,13 +42,11 @@ public final class HaraldKingOfSkemfar extends CardImpl {
|
|||
// Menace
|
||||
this.addAbility(new MenaceAbility());
|
||||
|
||||
// When Harald, King of Skemfar enters the battlefield, look at the top five cards of your library. You may reveal an Elf, Warrior, or Tyvar card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
// When Harald, King of Skemfar enters the battlefield, look at the top five cards of your library.
|
||||
// You may reveal an Elf, Warrior, or Tyvar card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter, Zone.LIBRARY, false,
|
||||
true, false, Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true).setText("look at the top five cards of your library." +
|
||||
" You may reveal an Elf, Warrior, or Tyvar card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order")));
|
||||
5, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM)));
|
||||
}
|
||||
|
||||
private HaraldKingOfSkemfar(final HaraldKingOfSkemfar card) {
|
||||
|
|
|
@ -5,18 +5,18 @@ import mage.ObjectColor;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CastSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.RevealLibraryPickControllerEffect;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -52,7 +52,7 @@ public final class HatcherySpider extends CardImpl {
|
|||
class HatcherySpiderEffect extends OneShotEffect {
|
||||
|
||||
public HatcherySpiderEffect() {
|
||||
super(Outcome.Benefit);
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "reveal the top X cards of your library, "
|
||||
+ "where X is the number of creature cards in your graveyard. "
|
||||
+ "You may put a green permanent card with mana value "
|
||||
|
@ -77,19 +77,9 @@ class HatcherySpiderEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
int xValue = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||
FilterCard filter = new FilterPermanentCard("green permanent card with mana value " + xValue + " or less");
|
||||
FilterPermanentCard filter = new FilterPermanentCard("green permanent card with mana value " + xValue + " or less");
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, xValue + 1));
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, xValue));
|
||||
player.revealCards(source, cards, game);
|
||||
TargetCard target = new TargetCardInLibrary(0, 1, filter);
|
||||
player.choose(outcome, cards, target, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
return true;
|
||||
return new RevealLibraryPickControllerEffect(xValue, 1, filter, PutCards.BATTLEFIELD, PutCards.BOTTOM_RANDOM).apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +1,26 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -27,10 +28,12 @@ import mage.target.TargetCard;
|
|||
*/
|
||||
public final class HeroesPodium extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Each legendary creature you control");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each legendary creature");
|
||||
private static final FilterCreatureCard filter2 = new FilterCreatureCard("a legendary creature card");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.LEGENDARY.getPredicate());
|
||||
filter2.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
||||
public HeroesPodium(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -38,15 +41,16 @@ public final class HeroesPodium extends CardImpl {
|
|||
addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// Each legendary creature you control gets +1/+1 for each other legendary creature you control.
|
||||
DynamicValue xValue = new HeroesPodiumLegendaryCount();
|
||||
Effect effect = new BoostControlledEffect(xValue, xValue, Duration.WhileOnBattlefield, filter, false);
|
||||
effect.setText("Each legendary creature you control gets +1/+1 for each other legendary creature you control");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// {X}, {T}: Look at the top X cards of your library. You may reveal a legendary creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HeroesPodiumEffect(), new ManaCostsImpl("{X}"));
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
new BoostControlledEffect(HeroesPodiumValue.instance, HeroesPodiumValue.instance, Duration.WhileOnBattlefield, filter, false)));
|
||||
// {X}, {T}: Look at the top X cards of your library.
|
||||
// You may reveal a legendary creature card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(ManacostVariableValue.REGULAR, 1, filter2, PutCards.HAND, PutCards.BOTTOM_RANDOM),
|
||||
new ManaCostsImpl("{X}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private HeroesPodium(final HeroesPodium card) {
|
||||
|
@ -59,7 +63,8 @@ public final class HeroesPodium extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class HeroesPodiumLegendaryCount implements DynamicValue {
|
||||
enum HeroesPodiumValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other legendary creature you control");
|
||||
|
||||
|
@ -69,16 +74,12 @@ class HeroesPodiumLegendaryCount implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
int value = game.getBattlefield().count(filter, sourceAbility.getControllerId(), sourceAbility, game);
|
||||
if (value > 0) {
|
||||
value--;
|
||||
}
|
||||
return value;
|
||||
return Math.max(game.getBattlefield().count(filter, sourceAbility.getControllerId(), sourceAbility, game) - 1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,64 +88,7 @@ class HeroesPodiumLegendaryCount implements DynamicValue {
|
|||
}
|
||||
|
||||
@Override
|
||||
public HeroesPodiumLegendaryCount copy() {
|
||||
return new HeroesPodiumLegendaryCount();
|
||||
}
|
||||
}
|
||||
|
||||
class HeroesPodiumEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("a legendary creature card");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
||||
public HeroesPodiumEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Look at the top X cards of your library. You may reveal a legendary creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order";
|
||||
}
|
||||
|
||||
public HeroesPodiumEffect(final HeroesPodiumEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeroesPodiumEffect copy() {
|
||||
return new HeroesPodiumEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, source.getManaCostsToPay().getX()));
|
||||
boolean legendaryIncluded = cards.count(filter, game) > 0;
|
||||
controller.lookAtCards(sourceObject.getIdName(), cards, game);
|
||||
|
||||
// You may reveal a legendary creature card from among them and put it into your hand.
|
||||
if (!cards.isEmpty() && legendaryIncluded && controller.chooseUse(outcome, "Put a legendary creature card into your hand?", source, game)) {
|
||||
if (cards.size() == 1) {
|
||||
controller.moveCards(cards, Zone.HAND, source, game);
|
||||
return true;
|
||||
} else {
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, filter);
|
||||
if (controller.choose(outcome, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Put the rest on the bottom of your library in a random order
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
return true;
|
||||
public HeroesPodiumValue copy() {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,10 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -61,15 +62,10 @@ public final class IconOfAncestry extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class IconOfAncestryEffect extends LookLibraryAndPickControllerEffect {
|
||||
class IconOfAncestryEffect extends OneShotEffect {
|
||||
|
||||
public IconOfAncestryEffect() {
|
||||
super(StaticValue.get(3), false, StaticValue.get(1), new FilterCreatureCard(
|
||||
"creature card that matches the chosen subtype"
|
||||
), Zone.LIBRARY, false, true, false,
|
||||
Zone.HAND, true, false, false);
|
||||
this.setOutcome(Outcome.AIDontUseIt);
|
||||
this.setBackInRandomOrder(true);
|
||||
super(Outcome.AIDontUseIt);
|
||||
staticText = "look at the top three cards of your library. " +
|
||||
"You may reveal a creature card of the chosen type from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order";
|
||||
|
@ -77,13 +73,13 @@ class IconOfAncestryEffect extends LookLibraryAndPickControllerEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
SubType subtype = (SubType) game.getState().getValue(source.getSourceId() + "_type");
|
||||
SubType subtype = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
|
||||
if (subtype == null) {
|
||||
return false;
|
||||
}
|
||||
FilterCreatureCard filter = new FilterCreatureCard(subtype.toString() + " creature card");
|
||||
filter.add(subtype.getPredicate());
|
||||
filter.setMessage(subtype.toString() + " creature card");
|
||||
return super.apply(game, source);
|
||||
return new LookLibraryAndPickControllerEffect(3, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM).apply(game, source);
|
||||
}
|
||||
|
||||
public IconOfAncestryEffect(final IconOfAncestryEffect effect) {
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -20,8 +17,7 @@ public final class Impulse extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
|
||||
|
||||
// Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false));
|
||||
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(4, 1, PutCards.HAND, PutCards.BOTTOM_ANY));
|
||||
}
|
||||
|
||||
private Impulse(final Impulse card) {
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SpellAbilityType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -28,13 +27,10 @@ public final class IncubationIncongruity extends SplitCard {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.INSTANT}, "{G/U}", "{1}{G}{U}", SpellAbilityType.SPLIT);
|
||||
|
||||
// Incubation
|
||||
// Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
// Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.getLeftHalfCard().getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false,
|
||||
StaticValue.get(1), StaticFilters.FILTER_CARD_CREATURE_A,
|
||||
Zone.LIBRARY, false, true, false,
|
||||
Zone.HAND, false, false, false
|
||||
).setBackInRandomOrder(true));
|
||||
5, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_RANDOM));
|
||||
|
||||
// Incongruity
|
||||
// Exile target creature. That creature's controller creates a 3/3 green Frog Lizard creature token.
|
||||
|
|
|
@ -4,14 +4,13 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
|
@ -36,10 +35,7 @@ public final class IngeniousSmith extends CardImpl {
|
|||
// You may reveal an artifact card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD_ARTIFACT_AN,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND,
|
||||
true, false, false).setBackInRandomOrder(true)
|
||||
));
|
||||
4, 1, StaticFilters.FILTER_CARD_ARTIFACT_AN, PutCards.HAND, PutCards.BOTTOM_RANDOM)));
|
||||
|
||||
// Whenever one or more artifacts enter the battlefield under your control, put a +1/+1 counter on Ingenious Smith.
|
||||
// This ability triggers only once each turn.
|
||||
|
|
|
@ -2,10 +2,9 @@ package mage.cards.j;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.common.ShuffleHandGraveyardAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -13,8 +12,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
|
@ -40,10 +37,7 @@ public final class JaceTheLivingGuildpact extends CardImpl {
|
|||
this.setStartingLoyalty(5);
|
||||
|
||||
// +1: Look at the top two cards of your library. Put one of them into your graveyard.
|
||||
Effect effect = new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, true, false, false, Zone.GRAVEYARD, false);
|
||||
effect.setText("Look at the top two cards of your library. Put one of them into your graveyard");
|
||||
this.addAbility(new LoyaltyAbility(effect, 1));
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(2, 1, PutCards.GRAVEYARD, PutCards.TOP_ANY), 1));
|
||||
|
||||
// -3: Return another target nonland permanent to its owner's hand.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new ReturnToHandTargetEffect(), -3);
|
||||
|
@ -52,9 +46,8 @@ public final class JaceTheLivingGuildpact extends CardImpl {
|
|||
|
||||
// -8: Each player shuffles their hand and graveyard into their library. You draw seven cards.
|
||||
ability = new LoyaltyAbility(new ShuffleHandGraveyardAllEffect(), -8);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(7).setText("You draw seven cards"));
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(7, "you"));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private JaceTheLivingGuildpact(final JaceTheLivingGuildpact card) {
|
||||
|
|
|
@ -7,26 +7,22 @@ import mage.abilities.costs.Cost;
|
|||
import mage.abilities.costs.common.RemoveAllCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author North
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class JarOfEyeballs extends CardImpl {
|
||||
|
||||
|
@ -42,7 +38,9 @@ public final class JarOfEyeballs extends CardImpl {
|
|||
// {3}, {tap}, Remove all eyeball counters from Jar of Eyeballs:
|
||||
// Look at the top X cards of your library, where X is the number of eyeball counters removed this way.
|
||||
// Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(new JarOfEyeballsEffect(), new GenericManaCost(3));
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(JarOfEyeballsValue.instance, 1, PutCards.HAND, PutCards.BOTTOM_ANY),
|
||||
new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new RemoveAllCountersSourceCost(CounterType.EYEBALL));
|
||||
this.addAbility(ability);
|
||||
|
@ -58,43 +56,32 @@ public final class JarOfEyeballs extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class JarOfEyeballsEffect extends OneShotEffect {
|
||||
|
||||
public JarOfEyeballsEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Look at the top X cards of your library, where X is the number of eyeball counters removed this way. Put one of them into your hand and the rest on the bottom of your library in any order";
|
||||
}
|
||||
|
||||
public JarOfEyeballsEffect(final JarOfEyeballsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
enum JarOfEyeballsValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public JarOfEyeballsEffect copy() {
|
||||
return new JarOfEyeballsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
int countersRemoved = 0;
|
||||
for (Cost cost : source.getCosts()) {
|
||||
for (Cost cost : sourceAbility.getCosts()) {
|
||||
if (cost instanceof RemoveAllCountersSourceCost) {
|
||||
countersRemoved = ((RemoveAllCountersSourceCost) cost).getRemovedCounters();
|
||||
}
|
||||
}
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, countersRemoved));
|
||||
controller.lookAtCards(source, null, cards, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand"));
|
||||
if (controller.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
Cards targetCards = new CardsImpl(target.getTargets());
|
||||
controller.moveCards(targetCards, Zone.HAND, source, game);
|
||||
cards.removeAll(targetCards);
|
||||
}
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, true);
|
||||
return true;
|
||||
return countersRemoved;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JarOfEyeballsValue copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "the number of eyeball counters removed this way";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,16 +5,14 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.PartnerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
|
@ -48,11 +46,11 @@ public final class KeskitTheFleshSculptor extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}, Sacrifice three other artifacts and/or creatures: Look at the top three cards of your library. Put two of them into your hand and the other into your graveyard.
|
||||
Ability ability = new SimpleActivatedAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(3), false, StaticValue.get(2), StaticFilters.FILTER_CARD,
|
||||
Zone.GRAVEYARD, false, false
|
||||
), new TapSourceCost());
|
||||
// {T}, Sacrifice three other artifacts and/or creatures: Look at the top three cards of your library.
|
||||
// Put two of them into your hand and the other into your graveyard.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(3, 2, PutCards.HAND, PutCards.GRAVEYARD),
|
||||
new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, filter)));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import mage.MageInt;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.mana.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -47,14 +47,12 @@ public final class KinnanBonderProdigy extends CardImpl {
|
|||
effect, filter, SetTargetPointer.PERMANENT
|
||||
));
|
||||
|
||||
// {5}{G}{U}: Look at the top five cards of your library. You may put a non-Human creature card from among them onto the battlefield. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new SimpleActivatedAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter2, Zone.LIBRARY, false,
|
||||
true, false, Zone.BATTLEFIELD, true, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top five cards of your library. " +
|
||||
"You may put a non-Human creature card from among them onto the battlefield. " +
|
||||
"Put the rest on the bottom of your library in a random order."
|
||||
), new ManaCostsImpl("{5}{G}{U}")));
|
||||
// {5}{G}{U}: Look at the top five cards of your library.
|
||||
// You may put a non-Human creature card from among them onto the battlefield.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(5, 1, filter2, PutCards.BATTLEFIELD, PutCards.BOTTOM_RANDOM),
|
||||
new ManaCostsImpl("{5}{G}{U}")));
|
||||
}
|
||||
|
||||
private KinnanBonderProdigy(final KinnanBonderProdigy card) {
|
||||
|
|
|
@ -14,9 +14,9 @@ import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
|
@ -73,11 +73,9 @@ public final class KolvoriGodOfKinship extends ModalDoubleFacesCard {
|
|||
// {1}{G}, {T}: Look at the top six cards of your library.
|
||||
// You may reveal a legendary creature card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
ability = new SimpleActivatedAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(6), false, StaticValue.get(1), filter2,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND,
|
||||
true, false, false).setBackInRandomOrder(true), new ManaCostsImpl("{1}{G}")
|
||||
);
|
||||
ability = new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(6, 1, filter2, PutCards.HAND, PutCards.BOTTOM_RANDOM),
|
||||
new ManaCostsImpl("{1}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.getLeftHalfCard().addAbility(ability);
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.RevealLibraryPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -16,7 +15,7 @@ import mage.filter.FilterCard;
|
|||
*/
|
||||
public final class KruphixsInsight extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("up to three enchantment cards");
|
||||
private static final FilterCard filter = new FilterCard("enchantment cards");
|
||||
|
||||
static {
|
||||
filter.add(CardType.ENCHANTMENT.getPredicate());
|
||||
|
@ -25,9 +24,13 @@ public final class KruphixsInsight extends CardImpl {
|
|||
public KruphixsInsight(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}");
|
||||
|
||||
|
||||
// Reveal the top six cards of your library. Put up to three enchantment cards from among them into your hand and the rest of the revealed cards into your graveyard.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(6), false, StaticValue.get(3), filter, Zone.GRAVEYARD, false, true, true,Zone.HAND, false));
|
||||
// Reveal the top six cards of your library. Put up to three enchantment cards from among them into your hand
|
||||
// and the rest of the revealed cards into your graveyard.
|
||||
Effect effect = new RevealLibraryPickControllerEffect(6, 3, filter, PutCards.HAND, PutCards.GRAVEYARD, false);
|
||||
effect.setText("reveal the top six cards of your library. " +
|
||||
"Put up to three enchantment cards from among them into your hand " +
|
||||
"and the rest of the revealed cards into your graveyard");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
private KruphixsInsight(final KruphixsInsight card) {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -13,22 +15,16 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class LeadTheStampede extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("any number of creature cards");
|
||||
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
}
|
||||
|
||||
public LeadTheStampede(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
|
||||
|
||||
// Look at the top five cards of your library. You may reveal any number of creature cards from among them and put the revealed cards into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
5, 5, filter, true
|
||||
).setText("Look at the top five cards of your library. " +
|
||||
"You may reveal any number of creature cards from among them " +
|
||||
"and put the revealed cards into your hand. " +
|
||||
"Put the rest on the bottom of your library in any order."));
|
||||
Effect effect = new LookLibraryAndPickControllerEffect(
|
||||
5, Integer.MAX_VALUE, StaticFilters.FILTER_CARD_CREATURES, PutCards.HAND, PutCards.BOTTOM_ANY);
|
||||
effect.setText("look at the top five cards of your library. " +
|
||||
"You may reveal any number of creature cards from among them and put the revealed cards into your hand. " +
|
||||
"Put the rest on the bottom of your library in any order");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
private LeadTheStampede(final LeadTheStampede card) {
|
||||
|
|
|
@ -2,13 +2,12 @@ package mage.cards.l;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
@ -34,12 +33,7 @@ public final class LilianasSpoils extends CardImpl {
|
|||
|
||||
// Look at the top five cards of your library. You may reveal a black card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), filter,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false
|
||||
).setBackInRandomOrder(true).setText("<br>Look at the top five cards of your library. "
|
||||
+ "You may reveal a black card from among them and put it into your hand. "
|
||||
+ "Put the rest on the bottom of your library in a random order.")
|
||||
);
|
||||
5, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM).concatBy("<br>"));
|
||||
}
|
||||
|
||||
private LilianasSpoils(final LilianasSpoils card) {
|
||||
|
|
|
@ -8,8 +8,7 @@ import mage.abilities.hint.common.OpenSideboardHint;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -17,19 +16,11 @@ import mage.filter.predicate.Predicates;
|
|||
*/
|
||||
public final class LivingWish extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("creature or land card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
CardType.LAND.getPredicate()));
|
||||
}
|
||||
|
||||
public LivingWish(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
|
||||
// You may reveal a creature or land card you own from outside the game and put it into your hand.
|
||||
this.getSpellAbility().addEffect(new WishEffect(filter));
|
||||
this.getSpellAbility().addEffect(new WishEffect(StaticFilters.FILTER_CARD_CREATURE_OR_LAND));
|
||||
this.getSpellAbility().addHint(OpenSideboardHint.instance);
|
||||
|
||||
// Exile Living Wish.
|
||||
|
|
|
@ -1,31 +1,30 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class LoneRevenant extends CardImpl {
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, ComparisonType.EQUAL_TO, 0);
|
||||
|
||||
public LoneRevenant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
|
@ -35,8 +34,17 @@ public final class LoneRevenant extends CardImpl {
|
|||
|
||||
this.addAbility(HexproofAbility.getInstance());
|
||||
|
||||
// Whenever Lone Revenant deals combat damage to a player, if you control no other creatures, look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.addAbility(new LoneRevenantTriggeredAbility());
|
||||
// Whenever Lone Revenant deals combat damage to a player,
|
||||
// if you control no other creatures, look at the top four cards of your library.
|
||||
// Put one of them into your hand and the rest on the bottom of your library in any order.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(4, 1, PutCards.HAND, PutCards.BOTTOM_ANY),
|
||||
false
|
||||
), condition, "Whenever {this} deals combat damage to a player, " +
|
||||
"if you control no other creatures, look at the top four cards of your library. " +
|
||||
"Put one of them into your hand and the rest on the bottom of your library in any order."
|
||||
));
|
||||
}
|
||||
|
||||
private LoneRevenant(final LoneRevenant card) {
|
||||
|
@ -48,46 +56,3 @@ public final class LoneRevenant extends CardImpl {
|
|||
return new LoneRevenant(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LoneRevenantTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
public LoneRevenantTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new LookLibraryAndPickControllerEffect(StaticValue.get(4), false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false));
|
||||
}
|
||||
|
||||
public LoneRevenantTriggeredAbility(final LoneRevenantTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoneRevenantTriggeredAbility copy() {
|
||||
return new LoneRevenantTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getSourceId().equals(this.sourceId) && ((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
int number = game.getBattlefield().countAll(filter, controllerId, game);
|
||||
|
||||
if (permanent != null && number != 1) {
|
||||
return false;
|
||||
}
|
||||
return permanent != null || number == 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTriggerPhrase() {
|
||||
return "Whenever {this} deals combat damage to a player, if you control no other creatures, " ;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,36 +1,31 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Alexsandr0x
|
||||
*/
|
||||
public final class Machinate extends CardImpl {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifacts you control");
|
||||
|
||||
static {
|
||||
filter.add(CardType.ARTIFACT.getPredicate());
|
||||
}
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACTS, null);
|
||||
|
||||
public Machinate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}");
|
||||
|
||||
// Look at the top X cards of your library, where X is the number of artifacts you control. Put one of those cards into your hand and the rest on the bottom of your library in any order.
|
||||
DynamicValue artifactsOnControl = new PermanentsOnBattlefieldCount(filter);
|
||||
LookLibraryAndPickControllerEffect effect = new LookLibraryAndPickControllerEffect(artifactsOnControl, false, StaticValue.get(1), new FilterCard(), Zone.LIBRARY, false, false);
|
||||
effect.setText("Look at the top X cards of your library, where X is the number of artifacts you control. Put one of those cards into your hand and the rest on the bottom of your library in any order.");
|
||||
Effect effect = new LookLibraryAndPickControllerEffect(xValue, 1, PutCards.HAND, PutCards.BOTTOM_ANY);
|
||||
effect.setText("look at the top X cards of your library, where X is the number of artifacts you control. " +
|
||||
"Put one of those cards into your hand and the rest on the bottom of your library in any order");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -25,10 +23,9 @@ public final class MaestrosCharm extends CardImpl {
|
|||
|
||||
// Choose one —
|
||||
// • Look at the top five cards of your library. Put one of those cards into your hand and the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), StaticFilters.FILTER_CARD,
|
||||
Zone.GRAVEYARD, false, false, false, Zone.HAND, false
|
||||
));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(5, 1, PutCards.HAND, PutCards.GRAVEYARD)
|
||||
.setText("look at the top five cards of your library. " +
|
||||
"Put one of those cards into your hand and the rest into your graveyard"));
|
||||
|
||||
// • Each opponent loses 3 life and you gain 3 life.
|
||||
Mode mode = new Mode(new LoseLifeOpponentsEffect(3));
|
||||
|
|
|
@ -7,13 +7,13 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
|
||||
|
@ -41,8 +41,8 @@ public final class MayaelTheAnima extends CardImpl {
|
|||
// {3}{R}{G}{W}, {tap}: Look at the top five cards of your library.
|
||||
// You may put a creature card with power 5 or greater from among them onto the battlefield.
|
||||
// Put the rest on the bottom of your library in any order.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new LookLibraryAndPickControllerEffect(5,1, filter,false, false, Zone.BATTLEFIELD, true),
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(5, 1, filter, PutCards.BATTLEFIELD, PutCards.BOTTOM_ANY),
|
||||
new ManaCostsImpl("{3}{R}{G}{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.HeroicAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterEnchantmentCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,11 +18,8 @@ import mage.filter.FilterCard;
|
|||
*/
|
||||
public final class MeletisAstronomer extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("an enchantment card");
|
||||
static {
|
||||
filter.add(CardType.ENCHANTMENT.getPredicate());
|
||||
}
|
||||
|
||||
private static final FilterCard filter = new FilterEnchantmentCard("an enchantment card");
|
||||
|
||||
public MeletisAstronomer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
@ -32,7 +29,7 @@ public final class MeletisAstronomer extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// <i>Heroic</i> — Whenever you cast a spell that targets Meletis Astronomer, look at the top three cards of your library. You may reveal an enchantment card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.addAbility(new HeroicAbility(new LookLibraryAndPickControllerEffect(3, 1, filter, true, false, Zone.HAND, true), false));
|
||||
this.addAbility(new HeroicAbility(new LookLibraryAndPickControllerEffect(3, 1, filter, PutCards.HAND, PutCards.BOTTOM_ANY)));
|
||||
}
|
||||
|
||||
private MeletisAstronomer(final MeletisAstronomer card) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
@ -7,15 +6,13 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -27,21 +24,20 @@ public final class MemorialToUnity extends CardImpl {
|
|||
public MemorialToUnity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// Memorial to Uniity enters the battlefield tapped.
|
||||
// Memorial to Unity enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
||||
// {2}{G}, {T}, Sacrifice Memorial to Unity: Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Then put the rest on the bottom of your library in a random order.
|
||||
Effect effect = new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(5), false, StaticValue.get(1), new FilterCreatureCard("a creature card"), false, true
|
||||
).setBackInRandomOrder(true);
|
||||
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{G}"));
|
||||
// {2}{G}, {T}, Sacrifice Memorial to Unity: Look at the top five cards of your library.
|
||||
// You may reveal a creature card from among them and put it into your hand.
|
||||
// Then put the rest on the bottom of your library in a random order.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new LookLibraryAndPickControllerEffect(5, 1, StaticFilters.FILTER_CARD_CREATURE_A, PutCards.HAND, PutCards.BOTTOM_RANDOM),
|
||||
new ManaCostsImpl("{2}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private MemorialToUnity(final MemorialToUnity card) {
|
||||
|
@ -52,5 +48,4 @@ public final class MemorialToUnity extends CardImpl {
|
|||
public MemorialToUnity copy() {
|
||||
return new MemorialToUnity(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,14 +2,12 @@ package mage.cards.m;
|
|||
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.ManaSpentToCastCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -23,9 +21,8 @@ public final class MemoryDeluge extends CardImpl {
|
|||
|
||||
// Look at the top X cards of your library, where X is the amount of mana spent to cast this spell. Put two of them into your hand and the rest on the bottom of your library in a random order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(
|
||||
ManaSpentToCastCount.instance, false, StaticValue.get(2),
|
||||
StaticFilters.FILTER_CARD, Zone.LIBRARY, false, false
|
||||
).setBackInRandomOrder(true).setText("look at the top X cards of your library, where X " +
|
||||
ManaSpentToCastCount.instance, 2, PutCards.HAND, PutCards.BOTTOM_RANDOM
|
||||
).setText("look at the top X cards of your library, where X " +
|
||||
"is the amount of mana spent to cast this spell. Put two of them into your " +
|
||||
"hand and the rest on the bottom of your library in a random order"));
|
||||
|
||||
|
|
|
@ -2,15 +2,14 @@ package mage.cards.m;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
|
||||
|
@ -38,11 +37,11 @@ public final class MilitiaBugler extends CardImpl {
|
|||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// When Militia Bugler enters the battlefield, look at the top four cards of your library. You may reveal a creature card with power 2 or less from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1), filter, Zone.LIBRARY, false,
|
||||
true, true, Zone.HAND, false, true, false
|
||||
), false));
|
||||
// When Militia Bugler enters the battlefield, look at the top four cards of your library.
|
||||
// You may reveal a creature card with power 2 or less from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM)));
|
||||
}
|
||||
|
||||
private MilitiaBugler(final MilitiaBugler card) {
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class MundaAmbushLeader extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Ally cards");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ALLY.getPredicate());
|
||||
}
|
||||
|
||||
public MundaAmbushLeader(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
|
@ -34,9 +36,13 @@ public final class MundaAmbushLeader extends CardImpl {
|
|||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
// <i>Rally</i>-Whenever Munda, Ambush Leader or another Ally enters the battlefield under your control, you may look at the top four cards of your library. If you do, reveal any number of Ally cards from among them, then put those cards on top of your library in any order and the rest on the bottom in any order.
|
||||
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new MundaAmbushLeaderEffect(), true));
|
||||
|
||||
// <i>Rally</i>-Whenever Munda, Ambush Leader or another Ally enters the battlefield under your control,
|
||||
// you may look at the top four cards of your library. If you do, reveal any number of Ally cards from among them,
|
||||
// then put those cards on top of your library in any order and the rest on the bottom in any order.
|
||||
Effect effect = new LookLibraryAndPickControllerEffect(4, Integer.MAX_VALUE, filter, PutCards.TOP_ANY, PutCards.BOTTOM_ANY, false);
|
||||
effect.setText("look at the top four cards of your library. If you do, reveal any number of Ally cards from among them, "
|
||||
+ "then put those cards on top of your library in any order and the rest on the bottom in any order");
|
||||
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(effect, true));
|
||||
}
|
||||
|
||||
private MundaAmbushLeader(final MundaAmbushLeader card) {
|
||||
|
@ -48,53 +54,3 @@ public final class MundaAmbushLeader extends CardImpl {
|
|||
return new MundaAmbushLeader(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MundaAmbushLeaderEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Ally cards to reveal and put on top of your library");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ALLY.getPredicate());
|
||||
}
|
||||
|
||||
public MundaAmbushLeaderEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "you may look at the top four cards of your library. If you do, reveal any number of Ally cards from among them, then put those cards on top of your library in any order and the rest on the bottom in any order";
|
||||
}
|
||||
|
||||
public MundaAmbushLeaderEffect(final MundaAmbushLeaderEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MundaAmbushLeaderEffect copy() {
|
||||
return new MundaAmbushLeaderEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source);
|
||||
if (controller != null && sourceObject != null) {
|
||||
Cards allCards = new CardsImpl();
|
||||
allCards.addAll(controller.getLibrary().getTopCards(game, 4));
|
||||
controller.lookAtCards(sourceObject.getIdName(), allCards, game);
|
||||
if (!allCards.isEmpty()) {
|
||||
Cards cardsToReveal = new CardsImpl();
|
||||
TargetCard target = new TargetCard(0, Integer.MAX_VALUE, Zone.LIBRARY, filter);
|
||||
controller.chooseTarget(outcome, allCards, target, source, game);
|
||||
cardsToReveal.addAll(target.getTargets());
|
||||
if (!cardsToReveal.isEmpty()) {
|
||||
controller.revealCards(sourceObject.getIdName(), cardsToReveal, game, true);
|
||||
allCards.removeAll(cardsToReveal);
|
||||
}
|
||||
controller.putCardsOnTopOfLibrary(cardsToReveal, game, source, true);
|
||||
}
|
||||
if (!allCards.isEmpty()) {
|
||||
controller.putCardsOnBottomOfLibrary(allCards, game, source, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -30,21 +26,8 @@ public final class NagaOracle extends CardImpl {
|
|||
|
||||
// When Naga Oracle enters the battlefield, look at the top three cards of your library. Put any number of them into your graveyard
|
||||
// and the rest back on top of your library in any order.
|
||||
Effect effect = new LookLibraryAndPickControllerEffect(
|
||||
/* oh god, Microsoft looks conservative with their function parameters in comparison */
|
||||
StaticValue.get(3),
|
||||
false,
|
||||
StaticValue.get(3),
|
||||
new FilterCard("cards"),
|
||||
Zone.LIBRARY,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
Zone.GRAVEYARD,
|
||||
false);
|
||||
effect.setText("look at the top three cards of your library. Put any number of them into your graveyard "
|
||||
+ "and the rest back on top of your library in any order");
|
||||
addAbility(new EntersBattlefieldTriggeredAbility(effect));
|
||||
addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(3, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY)));
|
||||
}
|
||||
|
||||
private NagaOracle(final NagaOracle card) {
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.keyword.MadnessAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -22,7 +19,7 @@ public final class NaggingThoughts extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}");
|
||||
|
||||
// Look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(StaticValue.get(2), false, StaticValue.get(1), new FilterCard(), Zone.GRAVEYARD, false, false));
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(2, 1, PutCards.HAND, PutCards.GRAVEYARD));
|
||||
|
||||
// Madness {1}{U}
|
||||
this.addAbility(new MadnessAbility(new ManaCostsImpl("{1}{U}")));
|
||||
|
|
|
@ -5,10 +5,10 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
@ -35,7 +35,7 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
public final class NahiriHeirOfTheAncients extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Warrior or Equipment card");
|
||||
private static final FilterCard filter = new FilterCard("a Warrior or Equipment card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
|
@ -57,15 +57,10 @@ public final class NahiriHeirOfTheAncients extends CardImpl {
|
|||
// +1: Create a 1/1 white Kor Warrior creature token. You may attach an Equipment you control to it.
|
||||
this.addAbility(new LoyaltyAbility(new NahiriHeirOfTheAncientsEffect(), 1));
|
||||
|
||||
// −2: Look at the top six cards of your library. You may reveal a Warrior or Equipment card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(6), false, StaticValue.get(1), filter,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND,
|
||||
true, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top six cards of your library. " +
|
||||
"You may reveal a Warrior or Equipment card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order."
|
||||
), -2));
|
||||
// −2: Look at the top six cards of your library.
|
||||
// You may reveal a Warrior or Equipment card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(6, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM), -2));
|
||||
|
||||
// −3: Nahiri, Heir of the Ancients deals damage to target creature or planeswalker equal to twice the number of Equipment you control.
|
||||
Ability ability = new LoyaltyAbility(new DamageTargetEffect(xValue)
|
||||
|
|
|
@ -3,9 +3,9 @@ package mage.cards.n;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
@ -23,7 +23,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class NarsetParterOfVeils extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("noncreature, nonland card");
|
||||
private static final FilterCard filter = new FilterCard("a noncreature, nonland card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
|
||||
|
@ -40,15 +40,10 @@ public final class NarsetParterOfVeils extends CardImpl {
|
|||
// Each opponent can't draw more than one card each turn.
|
||||
this.addAbility(new SimpleStaticAbility(new NarsetParterOfVeilsEffect()), new CardsAmountDrawnThisTurnWatcher());
|
||||
|
||||
// -2: Look at the top four cards of your library. You may reveal a noncreature, nonland card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(
|
||||
StaticValue.get(4), false, StaticValue.get(1), filter,
|
||||
Zone.LIBRARY, false, true, false, Zone.HAND,
|
||||
true, false, false
|
||||
).setBackInRandomOrder(true).setText("Look at the top four cards of your library. " +
|
||||
"You may reveal a noncreature, nonland card from among them and put it into your hand. " +
|
||||
"Put the rest on the bottom of your library in a random order."
|
||||
), -2));
|
||||
// -2: Look at the top four cards of your library.
|
||||
// You may reveal a noncreature, nonland card from among them and put it into your hand.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM), -2));
|
||||
}
|
||||
|
||||
private NarsetParterOfVeils(final NarsetParterOfVeils card) {
|
||||
|
|
|
@ -5,10 +5,10 @@ import mage.abilities.common.DiesAttachedTriggeredAbility;
|
|||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LookLibraryControllerEffect.PutCards;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
|
@ -16,7 +16,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -47,12 +46,10 @@ public final class Necrosynthesis extends CardImpl {
|
|||
effect.setText("Enchanted creature has \"Whenever another creature dies, put a +1/+1 counter on this creature.\"");
|
||||
this.addAbility(new SimpleStaticAbility(effect));
|
||||
|
||||
// When enchanted creature dies, look at the top X cards of your library, where X is its power. Put one of those cards into your hand and the rest on the bottom of your library in a random order.
|
||||
// When enchanted creature dies, look at the top X cards of your library, where X is its power.
|
||||
// Put one of those cards into your hand and the rest on the bottom of your library in a random order.
|
||||
DynamicValue attachedPower = new NecrosynthesisAttachedPermanentPowerCount();
|
||||
effect = new LookLibraryAndPickControllerEffect(
|
||||
attachedPower, false, StaticValue.get(1), StaticFilters.FILTER_CARD, false,
|
||||
false
|
||||
).setBackInRandomOrder(true);
|
||||
effect = new LookLibraryAndPickControllerEffect(attachedPower, 1, PutCards.HAND, PutCards.BOTTOM_RANDOM);
|
||||
effect.setText("look at the top X cards of your library, where X is its power. " +
|
||||
"Put one of those cards into your hand and the rest on the bottom of your library in a random order");
|
||||
ability = new DiesAttachedTriggeredAbility(effect, "enchanted creature");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue