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

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

Best Java code snippets using mage.abilities.common.delayed.AtTheBeginOfNextCleanupDelayedTriggeredAbility.<init> (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<init>

Popular methods of AtTheBeginOfNextCleanupDelayedTriggeredAbility

    Popular in Java

    • Reactive rest calls using spring rest template
    • getApplicationContext (Context)
    • setRequestProperty (URLConnection)
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • GridLayout (java.awt)
      The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
    • Runnable (java.lang)
      Represents a command that can be executed. Often used to run code in a different Thread.
    • Locale (java.util)
      Locale represents a language/country/variant combination. Locales are used to alter the presentatio
    • Queue (java.util)
      A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
    • SortedMap (java.util)
      A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
    • Table (org.hibernate.mapping)
      A relational table
    • CodeWhisperer alternatives
    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