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

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

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

origin: magefree/mage

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

@Override
public boolean apply(Game game, Ability source) {
  Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source));
  if (targetPermanent == null) {
    return false;
  }
  FilterPermanent filter = new FilterPermanent();
  if (CardUtil.haveEmptyName(targetPermanent)) {
    filter.add(new PermanentIdPredicate(targetPermanent.getId()));  // if no name (face down creature) only the creature itself is selected
  } else {
    filter.add(new NamePredicate(targetPermanent.getName()));
  }
  for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
    perm.destroy(source.getSourceId(), game, false);
  }
  return true;
}
origin: magefree/mage

public MaelstromPulse(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{G}");
  
  // Destroy target nonland permanent and all other permanents with the same name as that permanent.
  this.getSpellAbility().addTarget(new TargetNonlandPermanent());
  this.getSpellAbility().addEffect(new DestroyAllNamedPermanentsEffect());
}
origin: magefree/mage

public WakeOfDestruction(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}{R}");
  // Destroy target land and all other lands with the same name as that land.
  this.getSpellAbility().addTarget(new TargetLandPermanent());
  this.getSpellAbility().addEffect(new DestroyAllNamedPermanentsEffect());
}
mage.abilities.effects.commonDestroyAllNamedPermanentsEffect

Most used methods

  • <init>
  • getTargetPointer

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Path (java.nio.file)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • JLabel (javax.swing)
  • 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