Tabnine Logo
CounterTargetWithReplacementEffect
Code IndexAdd Tabnine to your IDE (free)

How to use
CounterTargetWithReplacementEffect
in
mage.abilities.effects.common

Best Java code snippets using mage.abilities.effects.common.CounterTargetWithReplacementEffect (Showing top 14 results out of 315)

origin: magefree/mage

@Override
public CounterTargetWithReplacementEffect copy() {
  return new CounterTargetWithReplacementEffect(this);
}
origin: magefree/mage

public Hinder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{U}");
  // Counter target spell. If that spell is countered this way, put that card on the top or bottom of its owner's library instead of into that player's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, ZoneDetail.CHOOSE));
  this.getSpellAbility().addTarget(new TargetSpell());
}
origin: magefree/mage

public Liquify(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}");
  // Counter target spell with converted mana cost 3 or less. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
  this.getSpellAbility().addTarget(new TargetSpell(filter));
}
origin: magefree/mage

public MemoryLapse(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
  // Counter target spell. If that spell is countered this way, put it on top of its owner's library instead of into that player's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, ZoneDetail.TOP));
  this.getSpellAbility().addTarget(new TargetSpell());
}
origin: magefree/mage

public Dissipate(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{U}");
  // Counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
  this.getSpellAbility().addTarget(new TargetSpell());
}
origin: magefree/mage

public LapseOfCertainty(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}");
  // Counter target spell. If that spell is countered this way, put it on top of its owner's library instead of into that player's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, ZoneDetail.TOP));
  this.getSpellAbility().addTarget(new TargetSpell());
}
origin: magefree/mage

public FaerieTrickery(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{1}{U}{U}");
  this.subtype.add(SubType.FAERIE);
  // Counter target non-Faerie spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
  this.getSpellAbility().addTarget(new TargetSpell(filter));
}
origin: magefree/mage

public HorriblyAwry(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
  // Devoid (This card has no color.)
  this.addAbility(new DevoidAbility(this.color));
  // Counter target creature spell with converted mana cost 4 or less. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
  this.getSpellAbility().addTarget(new TargetSpell(filter));
}
origin: magefree/mage

public DenyExistence(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}");
  // Counter target creature spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
  this.getSpellAbility().addTarget(new TargetSpell(new FilterCreatureSpell()));
}
origin: magefree/mage

public VoidShatter(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{U}");
  // Devoid
  this.addAbility(new DevoidAbility(this.color));
  // Counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
  this.getSpellAbility().addTarget(new TargetSpell());
}
origin: magefree/mage

public AssertAuthority(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{5}{U}{U}");
  // Affinity for artifacts
  this.addAbility(new AffinityForArtifactsAbility());
  // Counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
  this.getSpellAbility().addTarget(new TargetSpell());
}
origin: magefree/mage

public Remand(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
  // Counter target spell. If that spell is countered this way, put it into its owner's hand instead of into that player's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.HAND));
  this.getSpellAbility().addTarget(new TargetSpell());
  // Draw a card.
  this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
origin: magefree/mage

public DeviousCoverUp(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
  // Counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
  this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
  this.getSpellAbility().addTarget(new TargetSpell());
  // You may shuffle up to four target cards from your graveyard into your library.
  this.getSpellAbility().addEffect(new DeviousCoverUpEffect().setTargetPointer(new SecondTargetPointer()));
  this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 4));
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
    if (controller != null && spell != null) {
      Effect effect = new CounterTargetWithReplacementEffect(Zone.EXILED);
      effect.setTargetPointer(targetPointer);
      Card card = game.getCard(spell.getSourceId());
      if (card != null && effect.apply(game, source) && game.getState().getZone(card.getId()) == Zone.EXILED) {
        boolean hasSuspend = card.getAbilities().containsClass(SuspendAbility.class);
        UUID exileId = SuspendAbility.getSuspendExileId(controller.getId(), game);
        if (controller.moveCardToExileWithInfo(card, exileId, "Suspended cards of " + controller.getLogName(), source.getSourceId(), game, Zone.HAND, true)) {
          card.addCounters(CounterType.TIME.createInstance(3), source, game);
          if (!hasSuspend) {
            game.addEffect(new GainSuspendEffect(new MageObjectReference(card, game)), source);
          }
          game.informPlayers(controller.getLogName() + " suspends 3 - " + card.getName());
        }                
      }
      return true;
    }
    return false;
  }
}
mage.abilities.effects.commonCounterTargetWithReplacementEffect

Most used methods

  • <init>

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now