mirror of
https://github.com/correl/mage.git
synced 2025-04-07 17:00:08 -09:00
- See b9bee56
This commit is contained in:
parent
f9f6b9a29e
commit
35b23d9fab
4 changed files with 86 additions and 35 deletions
Mage.Sets/src/mage/cards
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -34,10 +33,15 @@ public final class AetherworksMarvel extends CardImpl {
|
|||
addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// Whenever a permanent you control is put into a graveyard, you get {E}.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new GetEnergyCountersControllerEffect(1), false, new FilterControlledPermanent("a permanent you control"), false));
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(
|
||||
new GetEnergyCountersControllerEffect(1), false,
|
||||
new FilterControlledPermanent("a permanent you control"), false));
|
||||
|
||||
// {T}, Pay {E}{E}{E}{E}{E}{E}: Look at the top six cards of your library. You may cast a card from among them without paying its mana cost. Put the rest on the bottom of your library in a random order.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AetherworksMarvelEffect(), new TapSourceCost());
|
||||
// {T}, Pay {E}{E}{E}{E}{E}{E}: Look at the top six cards of your library.
|
||||
// You may cast a card from among them without paying its mana cost.
|
||||
// Put the rest on the bottom of your library in a random order.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new AetherworksMarvelEffect(), new TapSourceCost());
|
||||
ability.addCost(new PayEnergyCost(6));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -56,7 +60,10 @@ class AetherworksMarvelEffect extends OneShotEffect {
|
|||
|
||||
AetherworksMarvelEffect() {
|
||||
super(Outcome.PlayForFree);
|
||||
this.staticText = "Look at the top six cards of your library. You may cast a card from among them without paying its mana cost. Put the rest on the bottom of your library in a random order";
|
||||
this.staticText = "Look at the top six cards of your library. "
|
||||
+ "You may cast a card from among them without paying "
|
||||
+ "its mana cost. Put the rest on the bottom of your "
|
||||
+ "library in a random order";
|
||||
}
|
||||
|
||||
AetherworksMarvelEffect(final AetherworksMarvelEffect effect) {
|
||||
|
@ -74,11 +81,18 @@ class AetherworksMarvelEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
Set<Card> cardsSet = controller.getLibrary().getTopCards(game, 6);
|
||||
Cards cards = new CardsImpl(cardsSet);
|
||||
TargetCard target = new TargetCardInLibrary(0, 1, new FilterNonlandCard("card to cast without paying its mana cost"));
|
||||
TargetCard target = new TargetCardInLibrary(0, 1,
|
||||
new FilterNonlandCard("card to cast without paying its mana cost"));
|
||||
if (controller.choose(Outcome.PlayForFree, cards, target, game)) {
|
||||
Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);
|
||||
if (card != null && controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game))) {
|
||||
cards.remove(card);
|
||||
if (card != null) {
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);
|
||||
Boolean cardWasCast = controller.cast(controller.chooseAbilityForCast(card, game, true),
|
||||
game, true, new MageObjectReference(source.getSourceObject(game), game));
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);
|
||||
if (cardWasCast) {
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
@ -20,7 +19,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterNonlandCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -41,7 +40,9 @@ public final class HellcarverDemon extends CardImpl {
|
|||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Hellcarver Demon deals combat damage to a player, sacrifice all other permanents you control and discard your hand. Exile the top six cards of your library. You may cast any number of nonland cards exiled this way without paying their mana costs.
|
||||
// Whenever Hellcarver Demon deals combat damage to a player, sacrifice all other permanents you
|
||||
// control and discard your hand. Exile the top six cards of your library. You may cast any number
|
||||
// of nonland cards exiled this way without paying their mana costs.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new HellcarverDemonEffect(), false));
|
||||
}
|
||||
|
||||
|
@ -59,7 +60,9 @@ class HellcarverDemonEffect extends OneShotEffect {
|
|||
|
||||
public HellcarverDemonEffect() {
|
||||
super(Outcome.PlayForFree);
|
||||
staticText = "sacrifice all other permanents you control and discard your hand. Exile the top six cards of your library. You may cast any number of nonland cards exiled this way without paying their mana costs.";
|
||||
staticText = "sacrifice all other permanents you control and discard your hand. "
|
||||
+ "Exile the top six cards of your library. You may cast any number of "
|
||||
+ "nonland cards exiled this way without paying their mana costs.";
|
||||
}
|
||||
|
||||
public HellcarverDemonEffect(final HellcarverDemonEffect effect) {
|
||||
|
@ -83,7 +86,8 @@ class HellcarverDemonEffect extends OneShotEffect {
|
|||
// move cards from library to exile
|
||||
Set<Card> currentExiledCards = new HashSet<>();
|
||||
currentExiledCards.addAll(controller.getLibrary().getTopCards(game, 6));
|
||||
controller.moveCardsToExile(currentExiledCards, source, game, true, source.getSourceId(), sourceObject.getIdName());
|
||||
controller.moveCardsToExile(currentExiledCards, source, game, true,
|
||||
source.getSourceId(), sourceObject.getIdName());
|
||||
|
||||
// cast the possible cards without paying the mana
|
||||
Cards cardsToCast = new CardsImpl();
|
||||
|
@ -91,18 +95,26 @@ class HellcarverDemonEffect extends OneShotEffect {
|
|||
boolean alreadyCast = false;
|
||||
while (!cardsToCast.isEmpty()
|
||||
&& controller.canRespond()) {
|
||||
if (!controller.chooseUse(outcome, "Cast a" + (alreadyCast ? "nother" : "") + " card exiled with " + sourceObject.getLogName() + " without paying its mana cost?", source, game)) {
|
||||
if (!controller.chooseUse(outcome, "Cast a" + (alreadyCast ? "another" : "")
|
||||
+ " card exiled with " + sourceObject.getLogName()
|
||||
+ " without paying its mana cost?", source, game)) {
|
||||
break;
|
||||
}
|
||||
TargetCard targetCard = new TargetCard(1, Zone.EXILED, new FilterCard("nonland card to cast for free"));
|
||||
TargetCard targetCard = new TargetCard(1, Zone.EXILED,
|
||||
new FilterNonlandCard("nonland card to cast for free"));
|
||||
if (controller.choose(Outcome.PlayForFree, cardsToCast, targetCard, game)) {
|
||||
alreadyCast = true;
|
||||
Card card = game.getCard(targetCard.getFirstTarget());
|
||||
if (card != null) {
|
||||
if (controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game))) {
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);
|
||||
Boolean cardWasCast = controller.cast(controller.chooseAbilityForCast(card, game, true),
|
||||
game, true, new MageObjectReference(source.getSourceObject(game), game));
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);
|
||||
if (cardWasCast) {
|
||||
cardsToCast.remove(card);
|
||||
} else {
|
||||
game.informPlayer(controller, "You're not able to cast " + card.getIdName() + " or you canceled the casting.");
|
||||
game.informPlayer(controller, "You're not able to cast "
|
||||
+ card.getIdName() + " or you canceled the casting.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -31,7 +30,9 @@ public final class KnowledgeExploitation extends CardImpl {
|
|||
// Prowl {3}{U}
|
||||
this.addAbility(new ProwlAbility(this, "{3}{U}"));
|
||||
|
||||
// Search target opponent's library for an instant or sorcery card. You may cast that card without paying its mana cost. Then that player shuffles their library.
|
||||
// Search target opponent's library for an instant or sorcery card.
|
||||
// You may cast that card without paying its mana cost.
|
||||
// Then that player shuffles their library.
|
||||
this.getSpellAbility().addEffect(new KnowledgeExploitationEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
@ -49,8 +50,11 @@ public final class KnowledgeExploitation extends CardImpl {
|
|||
class KnowledgeExploitationEffect extends OneShotEffect {
|
||||
|
||||
KnowledgeExploitationEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Search target opponent's library for an instant or sorcery card. You may cast that card without paying its mana cost. Then that player shuffles their library";
|
||||
super(Outcome.PlayForFree);
|
||||
this.staticText = "Search target opponent's library for an "
|
||||
+ "instant or sorcery card. You may cast that card "
|
||||
+ "without paying its mana cost. Then that "
|
||||
+ "player shuffles their library";
|
||||
}
|
||||
|
||||
KnowledgeExploitationEffect(final KnowledgeExploitationEffect effect) {
|
||||
|
@ -71,7 +75,10 @@ class KnowledgeExploitationEffect extends OneShotEffect {
|
|||
if (controller.searchLibrary(target, source, game, opponent.getId())) {
|
||||
Card card = opponent.getLibrary().remove(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game));
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);
|
||||
controller.cast(controller.chooseAbilityForCast(card, game, true),
|
||||
game, true, new MageObjectReference(source.getSourceObject(game), game));
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);
|
||||
}
|
||||
}
|
||||
opponent.shuffleLibrary(source, game);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -38,11 +37,13 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public final class ShellOfTheLastKappa extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell that targets you");
|
||||
private static final FilterSpell filter
|
||||
= new FilterSpell("instant or sorcery spell that targets you");
|
||||
|
||||
static {
|
||||
filter.add(new TargetYouPredicate());
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY)));
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT),
|
||||
new CardTypePredicate(CardType.SORCERY)));
|
||||
}
|
||||
|
||||
public ShellOfTheLastKappa(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -50,13 +51,16 @@ public final class ShellOfTheLastKappa extends CardImpl {
|
|||
addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// {3}, {tap}: Exile target instant or sorcery spell that targets you.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShellOfTheLastKappaEffect(), new ManaCostsImpl("{3}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ShellOfTheLastKappaEffect(), new ManaCostsImpl("{3}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
Target target = new TargetSpell(filter);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
// {3}, {tap}, Sacrifice Shell of the Last Kappa: You may cast a card exiled with Shell of the Last Kappa without paying its mana cost.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShellOfTheLastKappaCastEffect(), new ManaCostsImpl("{3}"));
|
||||
// {3}, {tap}, Sacrifice Shell of the Last Kappa: You may cast a card
|
||||
// exiled with Shell of the Last Kappa without paying its mana cost.
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ShellOfTheLastKappaCastEffect(), new ManaCostsImpl("{3}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
@ -100,7 +104,11 @@ class ShellOfTheLastKappaEffect extends OneShotEffect {
|
|||
if (sourcePermanent != null) {
|
||||
game.getStack().counter(spell.getId(), source.getSourceId(), game);
|
||||
Card card = spell.getCard();
|
||||
card.moveToExile(CardUtil.getCardExileZoneId(game, source), sourcePermanent.getName(), source.getSourceId(), game);
|
||||
if (card != null) {
|
||||
return card.moveToExile(CardUtil.getExileZoneId(game, source.getSourceId(),
|
||||
sourcePermanent.getZoneChangeCounter(game)),
|
||||
sourcePermanent.getName(), source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -126,13 +134,23 @@ class ShellOfTheLastKappaCastEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
TargetCardInExile target = new TargetCardInExile(new FilterCard(), CardUtil.getCardExileZoneId(game, source));
|
||||
if (controller.choose(Outcome.PlayForFree, game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)), target, game)) {
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (controller != null
|
||||
&& sourcePermanent != null) {
|
||||
TargetCardInExile target = new TargetCardInExile(new FilterCard(),
|
||||
CardUtil.getExileZoneId(game, source.getSourceId(), sourcePermanent.getZoneChangeCounter(game)));
|
||||
if (controller.choose(Outcome.PlayForFree, game.getExile()
|
||||
.getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(),
|
||||
sourcePermanent.getZoneChangeCounter(game))), target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
game.getExile().removeCard(card, game);
|
||||
return controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game));
|
||||
if (card != null
|
||||
&& controller.chooseUse(outcome, "Do you wish to cast card exiled with "
|
||||
+ sourcePermanent.getLogName() + "?", source, game)) {
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);
|
||||
Boolean cardWasCast = controller.cast(controller.chooseAbilityForCast(card, game, true),
|
||||
game, true, new MageObjectReference(source.getSourceObject(game), game));
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);
|
||||
return cardWasCast;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue