congrats Icon
New! Announcing our next generation AI code completions
Read here
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 post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • onRequestPermissionsResult (Fragment)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JTextField (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Table (org.hibernate.mapping)
    A relational table
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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