@Override public SpectacleAbility copy() { return new SpectacleAbility(this); }
@Override public String getRule(boolean all) { return getRule(); }
@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; }
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>"; }
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}"))); }
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}"))); }
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}"))); }
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}"))); }
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}"))); }
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)); }
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); }
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); }
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." )); }
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) )); }