congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JOptionPane (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • 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