congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AtTheBeginOfNextCleanupDelayedTriggeredAbility
Code IndexAdd Tabnine to your IDE (free)

How to use
AtTheBeginOfNextCleanupDelayedTriggeredAbility
in
mage.abilities.common.delayed

Best Java code snippets using mage.abilities.common.delayed.AtTheBeginOfNextCleanupDelayedTriggeredAbility (Showing top 6 results out of 315)

origin: magefree/mage

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

public SacrificeIfCastAtInstantTimeTriggeredAbility() {
  super(Zone.STACK, new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(new SacrificeSourceEffect())));
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Permanent cunning = game.getPermanent(source.getSourceId());
    if (cunning != null) {
      DelayedTriggeredAbility delayedAbility
          = new AtTheBeginOfNextCleanupDelayedTriggeredAbility(
              new SacrificeSourceEffect());
      game.addDelayedTriggeredAbility(delayedAbility, source);
      return true;
    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Token token = new WaylayToken();
    token.putOntoBattlefield(3, game, source.getSourceId(), source.getControllerId());
    List<Permanent> toExile = new ArrayList<>();
    for (UUID tokenId : token.getLastAddedTokenIds()) {
      Permanent tokenPermanent = game.getPermanent(tokenId);
      if (tokenPermanent != null) {
        toExile.add(tokenPermanent);
      }
    }
    Effect effect = new ExileTargetEffect();
    effect.setTargetPointer(new FixedTargets(toExile, game));
    game.addDelayedTriggeredAbility(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(effect), source);
    return true;
  }
}
origin: magefree/mage

public ThawingGlaciers(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
  // Thawing Glaciers enters the battlefield tapped.
  this.addAbility(new EntersBattlefieldTappedAbility());
  // {1}, {tap}: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. Return Thawing Glaciers to its owner's hand at the beginning of the next cleanup step.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, Outcome.PutLandInPlay), new GenericManaCost(1));
  ability.addCost(new TapSourceCost());
  ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(new ReturnToHandSourceEffect(true))));
  this.addAbility(ability);
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  if (!source.getTargets().isEmpty()) {
    Target multiTarget = source.getTargets().get(0);
    for (UUID target : multiTarget.getTargets()) {
      Permanent permanent = game.getPermanent(target);
      if (permanent != null) {
        permanent.addCounters(counterType.createInstance(multiTarget.getTargetAmount(target)), source, game);
      }
    }
    if (removeAtEndOfTurn) {
      DelayedTriggeredAbility ability = new AtTheBeginOfNextCleanupDelayedTriggeredAbility(
          new RemoveCountersAtEndOfTurn(counterType));
      ability.getTargets().addAll(source.getTargets());
      game.addDelayedTriggeredAbility(ability, source);
    }
    return true;
  }
  return false;
}
mage.abilities.common.delayedAtTheBeginOfNextCleanupDelayedTriggeredAbility

Most used methods

  • <init>

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • startActivity (Activity)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Socket (java.net)
    Provides a client-side TCP socket.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 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