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

How to use
SagaAbility
in
mage.abilities.common

Best Java code snippets using mage.abilities.common.SagaAbility (Showing top 20 results out of 315)

origin: magefree/mage

public TheMendingOfDominaria(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{G}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I, II — Put the top two cards of your library into your graveyard, then you may return a creature card from your graveyard to your hand.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II, new TheMendingOfDominariaFirstEffect());
  // III — Return all land cards from your graveyard to the battlefield, then shuffle your graveyard into your library.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new TheMendingOfDominariaSecondEffect());
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public void addChapterEffect(Card card, SagaChapter chapter, Effect effect) {
  addChapterEffect(card, chapter, chapter, effect);
}
origin: magefree/mage

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

for (Ability sagaAbility : perm.getAbilities()) {
  if (sagaAbility instanceof SagaAbility) {
    int maxChapter = ((SagaAbility) sagaAbility).getMaxChapter().getNumber();
    if (maxChapter <= perm.getCounters(this).getCount(CounterType.LORE)) {
      boolean noChapterAbilityTriggeredOrOnStack = true;
        if (stackObject.getSourceId().equals(perm.getId()) && SagaAbility.isChapterAbility(stackObject)) {
          noChapterAbilityTriggeredOrOnStack = false;
          break;
          if (SagaAbility.isChapterAbility(trigger) && trigger.getSourceId().equals(perm.getId())) {
            noChapterAbilityTriggeredOrOnStack = false;
            break;
origin: magefree/mage

public SagaAbility(Card card, SagaChapter maxChapter) {
  super(Zone.ALL, new AddCountersSourceEffect(CounterType.LORE.createInstance()));
  this.maxChapter = maxChapter;
  this.setRuleVisible(false);
  Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LORE.createInstance()));
  ability.setRuleVisible(false);
  card.addAbility(ability);
}
origin: magefree/mage

public void addChapterEffect(Card card, SagaChapter fromChapter, SagaChapter toChapter, Effects effects) {
  addChapterEffect(card, fromChapter, toChapter, effects, (Target) null);
}
origin: magefree/mage

public FallOfTheThran(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{W}");
  this.subtype.add(SubType.SAGA);
  // (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I — Destroy all lands.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new DestroyAllEffect(StaticFilters.FILTER_LANDS));
  // II, III — Each player returns two land cards from their graveyard to the battlefield.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_III, new FallOfTheThranReturnEffect());
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public void addChapterEffect(Card card, SagaChapter fromChapter, SagaChapter toChapter, Effects effects, Target target) {
  addChapterEffect(card, fromChapter, toChapter, effects, new Targets(target));
}
origin: magefree/mage

public TheFlameOfKeld(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I — Discard your hand.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new DiscardHandControllerEffect());
  // II — Draw two cards.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new DrawCardSourceControllerEffect(2));
  // III — If a red source you control would deal damage to a permanent or player this turn, it deals that much damage plus 2 to that permanent or player instead.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new TheFlameOfKeldDamageEffect());
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public void addChapterEffect(Card card, SagaChapter fromChapter, SagaChapter toChapter, Effect effect) {
  addChapterEffect(card, fromChapter, toChapter, new Effects(effect), (Target) null);
}
origin: magefree/mage

public TheFirstEruption(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I — The First Eruption deals 1 damage to each creature without flying.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new DamageAllEffect(1, filter));
  // II — Add {R}{R}.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new BasicManaEffect(Mana.RedMana(2)));
  // III — Sacrifice a Mountain. If you do, The First Eruption deals 3 damage to each creature.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new TheFirstEruptionEffect());
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public void addChapterEffect(Card card, SagaChapter fromChapter, SagaChapter toChapter, Effect effect, Target target) {
  addChapterEffect(card, fromChapter, toChapter, new Effects(effect), new Targets(target));
}
origin: magefree/mage

public TheEldestReborn(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I — Each opponent sacrifices a creature or planeswalker.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I,
      new SacrificeOpponentsEffect(filterSacrifice)
  );
  // II — Each opponent discards a card.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II,
      new DiscardEachPlayerEffect(TargetController.OPPONENT)
  );
  // III — Put target creature or planeswalker card from a graveyard onto the battlefield under your control.
  sagaAbility.addChapterEffect(
      this, SagaChapter.CHAPTER_III, SagaChapter.CHAPTER_III,
      new ReturnFromGraveyardToBattlefieldTargetEffect()
          .setText("Put target creature or planeswalker card from a graveyard onto the battlefield under your control"),
      new TargetCardInGraveyard(filter)
  );
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public HistoryOfBenalia(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I, II — Create a 2/2 white Knight creature token with vigilance.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II, new CreateTokenEffect(new KnightToken()));
  // III — Knights you control get +2/+1 until end of turn.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III,
      new BoostControlledEffect(2, 1, Duration.EndOfTurn, new FilterCreaturePermanent(SubType.KNIGHT, "Knights")));
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public RiteOfBelzenlok(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I, II — Create two 0/1 black Cleric creature tokens.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II, new CreateTokenEffect(new BelzenlokClericToken(), 2));
  // III — Create a 6/6 black Demon creature token with flying, trample, and "At the beginning of your upkeep, sacrifice another creature.  If you can't, this creature deals 6 damage to you."
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new CreateTokenEffect(new BelzenlokDemonToken()));
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public TheAntiquitiesWar(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I, II — Look at the top five cards of your library. You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II,
      new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1),
          StaticFilters.FILTER_CARD_ARTIFACT_AN, Zone.LIBRARY, false, true, false, Zone.HAND, true, true, false).setBackInRandomOrder(true));
  // III — Artifacts you control become artifact creatures with base power and toughness 5/5 until end of turn.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new TheAntiquitiesWarEffect());
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public TheMirariConjecture(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I — Return target instant card from your graveyard to your hand.                
  sagaAbility.addChapterEffect(
      this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_I,
      new ReturnFromGraveyardToHandTargetEffect(),
      new TargetCardInYourGraveyard(filterInstantCard)
  );
  // II — Return target sorcery card from your graveyard to your hand.               
  sagaAbility.addChapterEffect(
      this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_II,
      new ReturnFromGraveyardToHandTargetEffect(),
      new TargetCardInYourGraveyard(filterSorceryCard)
  );
  // III — Until end of turn, whenever you cast an instant or sorcery spell, copy it. You may choose new targets for the copy.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new CreateDelayedTriggeredAbilityEffect(new TheMirariConjectureDelayedTriggeredAbility()));
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public ChainersTorment(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I, II — Chainer's Torment deals 2 damage to each opponent and you gain 2 life.
  Effects effects = new Effects();
  effects.add(new DamagePlayersEffect(2, TargetController.OPPONENT));
  effects.add(new GainLifeEffect(2).setText("and you gain 2 life"));
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II, effects);
  // III — Create an X/X black Nightmare Horror creature token, where X is half your life total, rounded up. It deals X damage to you.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new ChainersTormentEffect());
  this.addAbility(sagaAbility);
}
origin: magefree/mage

public TimeOfIce(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I, II — Tap target creature an opponent controls. It doesn't untap during its controller's untap step for as long as you control Time of Ice.
  Effects effects = new Effects();
  effects.add(new TapTargetEffect());
  effects.add(new TimeOfIceEffect());
  sagaAbility.addChapterEffect(
      this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_II, effects,
      new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE)
  );
  // III — Return all tapped creatures to their owners' hands.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new ReturnToHandFromBattlefieldAllEffect(filter));
  this.addAbility(sagaAbility, new TimeOfIceWatcher());
}
origin: magefree/mage

public PhyrexianScriptures(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
  this.subtype.add(SubType.SAGA);
  // <i>(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)</i>
  SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III);
  // I — Put a +1/+1 counter on up to one target creature. That creature becomes an artifact in addition to its other types.
  Effects effects = new Effects();
  effects.add(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
  effects.add(new AddCardTypeTargetEffect(Duration.WhileOnBattlefield, CardType.ARTIFACT)
      .setText("That creature becomes an artifact in addition to its other types")
  );
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_I, effects, new TargetCreaturePermanent(0, 1));
  // II — Destroy all nonartifact creatures.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new DestroyAllEffect(filter));
  // III — Exile all cards from all opponents' graveyards.
  sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III,
      new ExileGraveyardAllPlayersEffect(StaticFilters.FILTER_CARD_CARDS, TargetController.OPPONENT)
  );
  this.addAbility(sagaAbility);
}
mage.abilities.commonSagaAbility

Most used methods

  • <init>
  • addChapterEffect
  • getMaxChapter
  • isChapterAbility
  • setRuleVisible

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • Permission (java.security)
    Legacy security code; do not use.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JFrame (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Table (org.hibernate.mapping)
    A relational table
  • Github Copilot 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