congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SpectacleAbility
Code IndexAdd Tabnine to your IDE (free)

How to use
SpectacleAbility
in
mage.abilities.keyword

Best Java code snippets using mage.abilities.keyword.SpectacleAbility (Showing top 14 results out of 315)

origin: magefree/mage

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

@Override
public String getRule(boolean all) {
  return getRule();
}
origin: magefree/mage

@Override
@SuppressWarnings("unchecked")
public boolean activate(Game game, boolean noMana) {
  if (super.activate(game, noMana)) {
    ArrayList<Integer> spectacleActivations = (ArrayList) game.getState().getValue(SPECTACLE_ACTIVATION_VALUE_KEY + getSourceId());
    if (spectacleActivations == null) {
      spectacleActivations = new ArrayList<>(); // zoneChangeCounter
      game.getState().setValue(SPECTACLE_ACTIVATION_VALUE_KEY + getSourceId(), spectacleActivations);
    }
    spectacleActivations.add(game.getState().getZoneChangeCounter(getSourceId()));
    return true;
  }
  return false;
}
origin: magefree/mage

public SpectacleAbility(Card card, ManaCost spectacleCosts) {
  super(spectacleCosts, card.getName() + " with spectacle", Zone.HAND, SpellAbilityType.BASE_ALTERNATE);
  this.getCosts().addAll(card.getSpellAbility().getCosts().copy());
  this.getEffects().addAll(card.getSpellAbility().getEffects().copy());
  this.getTargets().addAll(card.getSpellAbility().getTargets().copy());
  this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
  this.timing = card.getSpellAbility().getTiming();
  this.setRuleAtTheTop(true);
  this.rule = "Spectacle " + spectacleCosts.getText()
      + " <i>(You may cast this spell for its spectacle cost rather than its mana cost if an opponent lost life this turn.)</i>";
}
origin: magefree/mage

public LightUpTheStage(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}");
  // Exile the top two cards of your library. Until the end of your next turn, you may play those cards.
  this.getSpellAbility().addEffect(new LightUpTheStageEffect());
  // Spectacle {R}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{R}")));
}
origin: magefree/mage

public SpikewheelAcrobat(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.ROGUE);
  this.power = new MageInt(5);
  this.toughness = new MageInt(2);
  // Spectacle {2}{R}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{2}{R}")));
}
origin: magefree/mage

public SkewerTheCritics(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}");
  // Skewer the Critics deals 3 damage to any target.
  this.getSpellAbility().addEffect(new DamageTargetEffect(3));
  this.getSpellAbility().addTarget(new TargetAnyTarget());
  // Spectacle {R}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{R}")));
}
origin: magefree/mage

public DeadRevels(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
  // Return up to two target creature cards from your graveyard to your hand.
  this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
  this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 2, filter));
  // Spectacle {1}{B}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{1}{B}")));
}
origin: magefree/mage

public DrillBit(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
  // Target player reveals their hand. You choose a nonland card from it. That player discards that card.
  this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(
      StaticFilters.FILTER_CARD_NON_LAND, TargetController.ANY
  ));
  this.getSpellAbility().addTarget(new TargetPlayer());
  // Spectacle {B}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{B}")));
}
origin: magefree/mage

public RixMaadiReveler(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.SHAMAN);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Spectacle {2}{B}{R}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{2}{B}{R}")));
  // When Rix Maadi Reveler enters the battlefield, discard a card, then draw a card. If Rix Maadi Reveler's spectacle cost was paid, instead discard your hand, then draw three cards.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new RixMaadiRevelerEffect(), false));
}
origin: magefree/mage

public BladeJuggler(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.ROGUE);
  this.power = new MageInt(3);
  this.toughness = new MageInt(2);
  // Spectacle {2}{B}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{2}{B}")));
  // When Blade Juggler enters the battlefield, it deals 1 damage to you and you draw a card.
  Ability ability = new EntersBattlefieldTriggeredAbility(
      new DamageControllerEffect(1, "it")
  );
  ability.addEffect(new DrawCardSourceControllerEffect(1).setText("and you draw a card"));
  this.addAbility(ability);
}
origin: magefree/mage

public SpawnOfMayhem(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
  this.subtype.add(SubType.DEMON);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  // Spectacle {1}{B}{B}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{1}{B}{B}")));
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // Trample
  this.addAbility(TrampleAbility.getInstance());
  // At the beginning of your upkeep, Spawn of Mayhem deals 1 damage to each player. Then if you have 10 or less life, put a +1/+1 counter on Spawn of Mayhem.
  Ability ability = new BeginningOfUpkeepTriggeredAbility(
      new DamagePlayersEffect(1, TargetController.ANY),
      TargetController.YOU, false
  );
  ability.addEffect(new SpawnOfMayhemEffect());
  this.addAbility(ability);
}
origin: magefree/mage

public RafterDemon(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}");
  this.subtype.add(SubType.DEMON);
  this.power = new MageInt(4);
  this.toughness = new MageInt(2);
  // Spectacle {3}{B}{R}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{3}{B}{R}")));
  // When Rafter Demon enters the battlefield, if its spectacle cost was paid, each opponent discards a card.
  this.addAbility(new ConditionalInterveningIfTriggeredAbility(
      new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(
          new StaticValue(1), false, TargetController.OPPONENT
      )), SpectacleCondition.instance,
      "When {this} enters the battlefield, " +
          "if its spectacle cost was paid, " +
          "each opponent discards a card."
  ));
}
origin: magefree/mage

public Hackrobat(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.ROGUE);
  this.power = new MageInt(2);
  this.toughness = new MageInt(3);
  // Spectacle {B}{R}
  this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{B}{R}")));
  // {B}: Hackrobat gains deathtouch until end of turn.
  this.addAbility(new SimpleActivatedAbility(
      Zone.BATTLEFIELD,
      new GainAbilitySourceEffect(
          DeathtouchAbility.getInstance(),
          Duration.EndOfTurn
      ), new ColoredManaCost(ColoredManaSymbol.B)
  ));
  // {R}: Hackrobat gets +2/-2 until end of turn.
  this.addAbility(new SimpleActivatedAbility(
      Zone.BATTLEFIELD,
      new BoostSourceEffect(2, -2, Duration.EndOfTurn),
      new ColoredManaCost(ColoredManaSymbol.R)
  ));
}
mage.abilities.keywordSpectacleAbility

Most used methods

  • <init>
  • getCosts
  • getEffects
  • getRule
  • getSourceId
  • getTargets
  • setRuleAtTheTop

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JComboBox (javax.swing)
  • Top Sublime Text plugins
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