mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
- See b9bee56
This commit is contained in:
parent
f9f6b9a29e
commit
35b23d9fab
4 changed files with 86 additions and 35 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -34,10 +33,15 @@ public final class AetherworksMarvel extends CardImpl {
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
|
|
||||||
// Whenever a permanent you control is put into a graveyard, you get {E}.
|
// 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.
|
// {T}, Pay {E}{E}{E}{E}{E}{E}: Look at the top six cards of your library.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AetherworksMarvelEffect(), new TapSourceCost());
|
// 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));
|
ability.addCost(new PayEnergyCost(6));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +60,10 @@ class AetherworksMarvelEffect extends OneShotEffect {
|
||||||
|
|
||||||
AetherworksMarvelEffect() {
|
AetherworksMarvelEffect() {
|
||||||
super(Outcome.PlayForFree);
|
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) {
|
AetherworksMarvelEffect(final AetherworksMarvelEffect effect) {
|
||||||
|
|
@ -74,13 +81,20 @@ class AetherworksMarvelEffect extends OneShotEffect {
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Set<Card> cardsSet = controller.getLibrary().getTopCards(game, 6);
|
Set<Card> cardsSet = controller.getLibrary().getTopCards(game, 6);
|
||||||
Cards cards = new CardsImpl(cardsSet);
|
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)) {
|
if (controller.choose(Outcome.PlayForFree, cards, target, game)) {
|
||||||
Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);
|
Card card = controller.getLibrary().getCard(target.getFirstTarget(), game);
|
||||||
if (card != null && controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game))) {
|
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);
|
cards.remove(card);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
@ -20,7 +19,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.common.FilterNonlandCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
@ -41,7 +40,9 @@ public final class HellcarverDemon extends CardImpl {
|
||||||
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
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));
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new HellcarverDemonEffect(), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +60,9 @@ class HellcarverDemonEffect extends OneShotEffect {
|
||||||
|
|
||||||
public HellcarverDemonEffect() {
|
public HellcarverDemonEffect() {
|
||||||
super(Outcome.PlayForFree);
|
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) {
|
public HellcarverDemonEffect(final HellcarverDemonEffect effect) {
|
||||||
|
|
@ -83,7 +86,8 @@ class HellcarverDemonEffect extends OneShotEffect {
|
||||||
// move cards from library to exile
|
// move cards from library to exile
|
||||||
Set<Card> currentExiledCards = new HashSet<>();
|
Set<Card> currentExiledCards = new HashSet<>();
|
||||||
currentExiledCards.addAll(controller.getLibrary().getTopCards(game, 6));
|
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
|
// cast the possible cards without paying the mana
|
||||||
Cards cardsToCast = new CardsImpl();
|
Cards cardsToCast = new CardsImpl();
|
||||||
|
|
@ -91,18 +95,26 @@ class HellcarverDemonEffect extends OneShotEffect {
|
||||||
boolean alreadyCast = false;
|
boolean alreadyCast = false;
|
||||||
while (!cardsToCast.isEmpty()
|
while (!cardsToCast.isEmpty()
|
||||||
&& controller.canRespond()) {
|
&& 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;
|
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)) {
|
if (controller.choose(Outcome.PlayForFree, cardsToCast, targetCard, game)) {
|
||||||
alreadyCast = true;
|
alreadyCast = true;
|
||||||
Card card = game.getCard(targetCard.getFirstTarget());
|
Card card = game.getCard(targetCard.getFirstTarget());
|
||||||
if (card != null) {
|
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);
|
cardsToCast.remove(card);
|
||||||
} else {
|
} 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;
|
package mage.cards.k;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -31,7 +30,9 @@ public final class KnowledgeExploitation extends CardImpl {
|
||||||
// Prowl {3}{U}
|
// Prowl {3}{U}
|
||||||
this.addAbility(new ProwlAbility(this, "{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().addEffect(new KnowledgeExploitationEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||||
}
|
}
|
||||||
|
|
@ -49,8 +50,11 @@ public final class KnowledgeExploitation extends CardImpl {
|
||||||
class KnowledgeExploitationEffect extends OneShotEffect {
|
class KnowledgeExploitationEffect extends OneShotEffect {
|
||||||
|
|
||||||
KnowledgeExploitationEffect() {
|
KnowledgeExploitationEffect() {
|
||||||
super(Outcome.Benefit);
|
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";
|
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) {
|
KnowledgeExploitationEffect(final KnowledgeExploitationEffect effect) {
|
||||||
|
|
@ -71,7 +75,10 @@ class KnowledgeExploitationEffect extends OneShotEffect {
|
||||||
if (controller.searchLibrary(target, source, game, opponent.getId())) {
|
if (controller.searchLibrary(target, source, game, opponent.getId())) {
|
||||||
Card card = opponent.getLibrary().remove(target.getFirstTarget(), game);
|
Card card = opponent.getLibrary().remove(target.getFirstTarget(), game);
|
||||||
if (card != null) {
|
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);
|
opponent.shuffleLibrary(source, game);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -38,11 +37,13 @@ import mage.util.CardUtil;
|
||||||
*/
|
*/
|
||||||
public final class ShellOfTheLastKappa extends CardImpl {
|
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 {
|
static {
|
||||||
filter.add(new TargetYouPredicate());
|
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) {
|
public ShellOfTheLastKappa(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -50,13 +51,16 @@ public final class ShellOfTheLastKappa extends CardImpl {
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
|
|
||||||
// {3}, {tap}: Exile target instant or sorcery spell that targets you.
|
// {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());
|
ability.addCost(new TapSourceCost());
|
||||||
Target target = new TargetSpell(filter);
|
Target target = new TargetSpell(filter);
|
||||||
ability.addTarget(target);
|
ability.addTarget(target);
|
||||||
this.addAbility(ability);
|
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.
|
// {3}, {tap}, Sacrifice Shell of the Last Kappa: You may cast a card
|
||||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShellOfTheLastKappaCastEffect(), new ManaCostsImpl("{3}"));
|
// 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 TapSourceCost());
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
@ -100,7 +104,11 @@ class ShellOfTheLastKappaEffect extends OneShotEffect {
|
||||||
if (sourcePermanent != null) {
|
if (sourcePermanent != null) {
|
||||||
game.getStack().counter(spell.getId(), source.getSourceId(), game);
|
game.getStack().counter(spell.getId(), source.getSourceId(), game);
|
||||||
Card card = spell.getCard();
|
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;
|
return false;
|
||||||
|
|
@ -126,13 +134,23 @@ class ShellOfTheLastKappaCastEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
TargetCardInExile target = new TargetCardInExile(new FilterCard(), CardUtil.getCardExileZoneId(game, source));
|
if (controller != null
|
||||||
if (controller.choose(Outcome.PlayForFree, game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)), target, game)) {
|
&& 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());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
if (card != null) {
|
if (card != null
|
||||||
game.getExile().removeCard(card, game);
|
&& controller.chooseUse(outcome, "Do you wish to cast card exiled with "
|
||||||
return controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game));
|
+ 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
Add a link
Reference in a new issue