congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ManifestEffect
Code IndexAdd Tabnine to your IDE (free)

How to use
ManifestEffect
in
mage.abilities.effects.keyword

Best Java code snippets using mage.abilities.effects.keyword.ManifestEffect (Showing top 16 results out of 315)

origin: magefree/mage

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

public ManifestEffect(int amount) {
  super(Outcome.PutCreatureInPlay);
  this.amount = amount;
  this.staticText = setText();
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      Card card = controller.getLibrary().getFromTop(game);
      if (card != null) {
        new ManifestEffect(1).apply(game, source);
        Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
        effect.setTargetPointer(new FixedTarget(card.getId()));
        return effect.apply(game, source);
      }
      return true;
    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      Card card = controller.getLibrary().getFromTop(game);
      if (card != null) {
        new ManifestEffect(1).apply(game, source);
        Permanent permanent = game.getPermanent(card.getId());
        if (permanent != null) {
          Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(2));
          effect.setTargetPointer(new FixedTarget(permanent.getId()));
          return effect.apply(game, source);
        }
      }
      return true;
    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      Card card = controller.getLibrary().getFromTop(game);
      if (card != null) {
        new ManifestEffect(1).apply(game, source);
        int xValue = source.getManaCostsToPay().getX();
        if (xValue > 0) {
          Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(xValue));
          effect.setTargetPointer(new FixedTarget(card.getId()));
          return effect.apply(game, source);
        }
      }
      return true;
    }
    return false;
  }
}
origin: magefree/mage

public SoulSummons(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{W}");
  // Manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up at any time for its mana cost if it's a creature card.)
  this.getSpellAbility().addEffect(new ManifestEffect(1));
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Permanent enchantment = game.getPermanent(source.getSourceId());
    if (controller != null && enchantment != null) {
      // manifest top card
      Card card = controller.getLibrary().getFromTop(game);
      if (card != null) {
        new ManifestEffect(1).apply(game, source);
        Permanent enchantedCreature = game.getPermanent(card.getId());
        if (enchantedCreature != null) {
          enchantedCreature.addAttachment(enchantment.getId(), game);
          FilterCreaturePermanent filter = new FilterCreaturePermanent();
          Target target = new TargetCreaturePermanent(filter);
          target.addTarget(enchantedCreature.getId(), source, game);
          game.addEffect(new BecomesAuraSourceEffect(target), source);
        }
      }
      return true;
    }
    return false;
  }
}
origin: magefree/mage

public EtherealAmbush(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}{U}");
  // Manifest the top two cards of your library.
  this.getSpellAbility().addEffect(new ManifestEffect(2));
}
origin: magefree/mage

  controller.getLibrary().putOnTop(cardToManifest, game);
new ManifestEffect(1).apply(game, source);
if (controller.getLibrary().hasCards()) {
  Card cardToPutBack = controller.getLibrary().getFromTop(game);
origin: magefree/mage

public ArashinWarBeast(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}");
  this.subtype.add(SubType.BEAST);
  this.power = new MageInt(6);
  this.toughness = new MageInt(6);
  // Whenever Arashin War Beast deals combat damage to one or more blockers, manifest the top card of your library.
  this.addAbility(new ArashinWarBeastTriggeredAbility(new ManifestEffect(1), false));
}
origin: magefree/mage

public SultaiEmissary(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.subtype.add(SubType.WARRIOR);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // When Sultai Emissary dies, manifest the top card of your library.
  this.addAbility(new DiesTriggeredAbility(new ManifestEffect(1)));
}
origin: magefree/mage

public WhisperwoodElemental(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}");
  this.subtype.add(SubType.ELEMENTAL);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  // At the beginning of your end step, manifest the top card of your library.
  this.addAbility(new BeginningOfEndStepTriggeredAbility(new ManifestEffect(1), TargetController.YOU, false));
  
  // Sacrifice Whisperwood Elemental: Until end of turn, face-up, nontoken creatures you control gain "When this creature dies, manifest the top card of your library."
  Ability abilityToGain = new DiesTriggeredAbility(new ManifestEffect(1));
  Effect effect = new GainAbilityControlledEffect(abilityToGain, Duration.EndOfTurn, filter);
  effect.setText("Until end of turn, face-up, nontoken creatures you control gain \"When this creature dies, manifest the top card of your library.\"");
  this.addAbility(new SimpleActivatedAbility(
      Zone.ALL, effect, new SacrificeSourceCost()));
}
origin: magefree/mage

public PrimordialMist(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
  // At the beginning of your end step, you may manifest the top card of your library.
  this.addAbility(new BeginningOfEndStepTriggeredAbility(new ManifestEffect(1), TargetController.YOU, true));
  // Exile a face-down permanent you control face-up: You may play that card this turn
  TargetPermanent target = new TargetPermanent(filter);
  target.setNotTarget(true);
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new PrimordialMistCastFromExileEffect(),
      new PrimordialMistCost(target));
  this.addAbility(ability);
}
origin: magefree/mage

public TemurWarShaman(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.SHAMAN);
  this.power = new MageInt(4);
  this.toughness = new MageInt(5);
  // When Temur War Shaman enters the battlefield, manifest the top card of your library.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new ManifestEffect(1), false));
  // Whenever a permanent you control is turned face up, if it is a creature, you may have it fight target creature you don't control.
  Ability ability = new TemurWarShamanTriggeredAbility();
  ability.addTarget(new TargetCreaturePermanent(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public QarsiHighPriest(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.CLERIC);
  this.power = new MageInt(0);
  this.toughness = new MageInt(2);
  // {1}{B}, {t}, Sacrifice another creature: Manifest the top card of your library.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManifestEffect(1), new ManaCostsImpl("{1}{B}"));
  ability.addCost(new TapSourceCost());
  ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
  this.addAbility(ability);
}
origin: magefree/mage

public MasteryOfTheUnseen(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}");
  // Whenever a permanent you control is turned face up, you gain 1 life for each creature you control.
  this.addAbility(new TurnedFaceUpAllTriggeredAbility(
      new GainLifeEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())), 
      new FilterControlledPermanent("a permanent you control")));
  
  // {3}{W}: Manifest the top card of your library.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManifestEffect(1), new ManaCostsImpl("{3}{W}")));
}
mage.abilities.effects.keywordManifestEffect

Most used methods

  • <init>
  • apply
  • setText

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • 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