mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[JUD] Implemented Grip of Amnesia
This commit is contained in:
parent
2a23e81e9c
commit
99558dfc22
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/g/GripOfAmnesia.java
Normal file
76
Mage.Sets/src/mage/cards/g/GripOfAmnesia.java
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class GripOfAmnesia extends CardImpl {
|
||||
|
||||
public GripOfAmnesia(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Counter target spell unless its controller exiles all cards from their graveyard.
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new GripOfAmnesiaEffect());
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
}
|
||||
|
||||
private GripOfAmnesia(final GripOfAmnesia card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GripOfAmnesia copy() {
|
||||
return new GripOfAmnesia(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GripOfAmnesiaEffect extends OneShotEffect {
|
||||
|
||||
public GripOfAmnesiaEffect() {
|
||||
super(Outcome.Detriment);
|
||||
staticText = "Counter target spell unless its controller exiles all cards from their graveyard";
|
||||
}
|
||||
|
||||
private GripOfAmnesiaEffect(final GripOfAmnesiaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GripOfAmnesiaEffect copy() {
|
||||
return new GripOfAmnesiaEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getStack().getSpell(source.getFirstTarget());
|
||||
if (spell != null) {
|
||||
Player controller = game.getPlayer(spell.getControllerId());
|
||||
if (controller != null && controller.chooseUse(Outcome.Benefit, "Exile all cards from your graveyard? (Otherwise "
|
||||
+ spell.getLogName() + " will be countered)", source, game)) {
|
||||
controller.moveCards(controller.getGraveyard(), Zone.EXILED, source, game);
|
||||
game.informPlayers(controller.getLogName() + " exiles all cards from their graveyard to prevent counter effect");
|
||||
} else {
|
||||
game.getStack().counter(spell.getId(), source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -84,6 +84,7 @@ public final class Judgment extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Glory", 11, Rarity.RARE, mage.cards.g.Glory.class));
|
||||
cards.add(new SetCardInfo("Golden Wish", 12, Rarity.RARE, mage.cards.g.GoldenWish.class));
|
||||
cards.add(new SetCardInfo("Goretusk Firebeast", 91, Rarity.COMMON, mage.cards.g.GoretuskFirebeast.class));
|
||||
cards.add(new SetCardInfo("Grip of Amnesia", 41, Rarity.COMMON, mage.cards.g.GripOfAmnesia.class));
|
||||
cards.add(new SetCardInfo("Grizzly Fate", 119, Rarity.UNCOMMON, mage.cards.g.GrizzlyFate.class));
|
||||
cards.add(new SetCardInfo("Guided Strike", 13, Rarity.COMMON, mage.cards.g.GuidedStrike.class));
|
||||
cards.add(new SetCardInfo("Guiltfeeder", 68, Rarity.RARE, mage.cards.g.Guiltfeeder.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue