Tabnine Logo
CounterTargetEffect.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
mage.abilities.effects.common.CounterTargetEffect
constructor

Best Java code snippets using mage.abilities.effects.common.CounterTargetEffect.<init> (Showing top 20 results out of 315)

origin: magefree/mage

public Douse(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
  
  // {1}{U}: Counter target red spell.
  SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{1}{U}"));
  ability.addTarget(new TargetSpell(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public Nix(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
  // Counter target spell if no mana was spent to cast it.
  Effect effect = new ConditionalOneShotEffect(new CounterTargetEffect(), NoManaSpentToCastTargetCondition.instance);
  effect.setText("Counter target spell if no mana was spent to cast it");
  this.getSpellAbility().addEffect(effect);
  this.getSpellAbility().addTarget(new TargetSpell());
}
origin: magefree/mage

public GutturalResponse(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R/G}");
  // Counter target blue instant spell.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetSpell(filter));
}
origin: magefree/mage

public RemoveSoul(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
  this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE));
  this.getSpellAbility().addEffect(new CounterTargetEffect());
}
origin: magefree/mage

public Envelop(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
  // Counter target sorcery spell.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetSpell(filter));
}
origin: magefree/mage

public AvoidFate(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
  // Counter target instant or Aura spell that targets a permanent you control.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetSpell(filter));
}
origin: magefree/mage

public RebuffTheWicked(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
  // Counter target spell that targets a permanent you control.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetSpell(filter));
}
origin: magefree/mage

public SpellSnare(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
  // Counter target spell with converted mana cost 2.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetSpell(filter));
}
origin: magefree/mage

public Rust(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
  // Counter target activated ability from an artifact source.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetActivatedAbility(filter));
}
origin: magefree/mage

public BrownOuphe(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
  this.subtype.add(SubType.OUPHE);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // {1}{G}, {tap}: Counter target activated ability from an artifact source.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl<>("{1}{G}"));
  ability.addCost(new TapSourceCost());
  ability.addTarget(new TargetActivatedAbility(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public DaringApprentice(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // {tap}, Sacrifice Daring Apprentice: Counter target spell.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new TapSourceCost());
  ability.addCost(new SacrificeSourceCost());
  ability.addTarget(new TargetSpell());
  this.addAbility(ability);
}
origin: magefree/mage

public MuddleTheMixture(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{U}");
  // Counter target instant or sorcery spell.
  this.getSpellAbility().addTarget(new TargetSpell(filter));
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  // Transmute {1}{U}{U}
  this.addAbility(new TransmuteAbility("{1}{U}{U}"));
}
origin: magefree/mage

public BoneToAsh(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{U}");
  // Counter target creature spell.
  this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE));
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  // Draw a card.
  this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
origin: magefree/mage

public Rewind(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{U}");
  // Counter target spell. Untap up to four lands.
  this.getSpellAbility().addTarget(new TargetSpell());
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addEffect(new UntapLandsEffect(4));
}
origin: magefree/mage

public Contradict(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}{U}");
  // Counter target spell.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetSpell());
  
  // Draw a card.        
  this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
origin: magefree/mage

public ArensonsAura(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
  // {W}, Sacrifice an enchantment: Destroy target enchantment.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{W}"));
  ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true)));
  ability.addTarget(new TargetEnchantmentPermanent());
  this.addAbility(ability);
  // {3}{U}{U}: Counter target enchantment spell.
  ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{3}{U}{U}"));
  ability.addTarget(new TargetSpell(filter2));
  this.addAbility(ability);
}
origin: magefree/mage

public Deprive(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{U}");
  // As an additional cost to cast Deprive, return a land you control to its owner's hand.
  this.getSpellAbility().addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
  // Counter target spell.
  this.getSpellAbility().addTarget(new TargetSpell());
  this.getSpellAbility().addEffect(new CounterTargetEffect());
}
origin: magefree/mage

public SuffocatingBlast(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{U}{R}");
  // Counter target spell and Suffocating Blast deals 3 damage to target creature.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetSpell());
  Effect effect = new DamageTargetEffect(3);
  effect.setText("and {this} deals 3 damage to target creature");
  this.getSpellAbility().addEffect(effect);
  this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
origin: magefree/mage

public PactOfNegation(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{0}");
  this.color.setBlue(true);
  
  // Counter target spell.
  this.getSpellAbility().addTarget(new TargetSpell());
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  // At the beginning of your next upkeep, pay {3}{U}{U}. If you don't, you lose the game.
  this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new PactDelayedTriggeredAbility(new ManaCostsImpl("{3}{U}{U}")), false));
}
origin: magefree/mage

public Foil(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{U}");
  // You may discard an Island card and another card rather than pay Foil's mana cost.
  Ability ability = new AlternativeCostSourceAbility(new DiscardTargetCost(new TargetCardInHand(filter)));
  ability.addCost(new DiscardTargetCost(new TargetCardInHand(new FilterCard("another card"))));
  this.addAbility(ability);
  // Counter target spell.
  this.getSpellAbility().addEffect(new CounterTargetEffect());
  this.getSpellAbility().addTarget(new TargetSpell());
}
mage.abilities.effects.commonCounterTargetEffect<init>

Popular methods of CounterTargetEffect

  • apply
  • getTargetPointer
  • setText

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Permission (java.security)
    Legacy security code; do not use.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Top Sublime Text 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