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

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

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

origin: magefree/mage

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

  @Override
  public boolean apply(Game game, Ability source) {
    Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
    if (permanent != null) {
      Player player = game.getPlayer(permanent.getControllerId());
      if (player != null) {
        int creaturePower = permanent.getPower().getValue();
        permanent.moveToExile(null, null, source.getSourceId(), game);
        game.applyEffects();
        player.gainLife(creaturePower, game, source);
      }
      return true;
    }
    return false;
  }
}
origin: magefree/mage

public SwordsToPlowshares(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
  // Exile target creature. Its controller gains life equal to its power.
  this.getSpellAbility().addTarget(new TargetCreaturePermanent());
  this.getSpellAbility().addEffect(new ExileAndGainLifeEqualPowerTargetEffect());
}
origin: magefree/mage

public AjaniUnyielding(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{G}{W}");
  this.addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.AJANI);
  this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
  // +2: Reveal the top three cards of your library. Put all nonland permanent cards revealed this way into your hand and the rest on the bottom of your library in any order.
  this.addAbility(new LoyaltyAbility(new RevealLibraryPutIntoHandEffect(3, nonlandPermanentFilter, Zone.LIBRARY), 2));
  // -2: Exile target creature. Its controller gains life equal to its power.
  LoyaltyAbility ajaniAbility2 = new LoyaltyAbility(new ExileAndGainLifeEqualPowerTargetEffect(), -2);
  ajaniAbility2.addTarget(new TargetCreaturePermanent());
  this.addAbility(ajaniAbility2);
  // -9: Put five +1/+1 counters on each creature you control and five loyalty counters on each other planeswalker you control.
  LoyaltyAbility ajaniAbility3 = new LoyaltyAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(5), new FilterControlledCreaturePermanent()), -9);
  ajaniAbility3.addEffect(new AddCountersAllEffect(CounterType.LOYALTY.createInstance(5), planeswalkerFilter));
  this.addAbility(ajaniAbility3);
}
mage.abilities.effects.commonExileAndGainLifeEqualPowerTargetEffect

Most used methods

  • <init>
  • getTargetPointer

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JOptionPane (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 12 Jupyter Notebook extensions
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