private void addMadnessToCard(Game game, Card card, Map<UUID, MadnessAbility> usedMadnessAbilities) { MadnessAbility ability = madnessAbilities.get(card.getId()); if (ability == null) { ability = new MadnessAbility(card, card.getSpellAbility().getManaCosts()); } game.getState().addOtherAbility(card, ability, false); usedMadnessAbilities.put(card.getId(), ability); } }
public PsychoticHaze(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}{B}"); // Psychotic Haze deals 1 damage to each creature and each player. this.getSpellAbility().addEffect(new DamageEverythingEffect(1)); // Madness {1}{B} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{B}"))); }
public TwinsOfMaurerEstate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}"); this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(3); this.toughness = new MageInt(5); // Madness {2}{B} <i>(If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)</i> this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{B}"))); }
public GisasBidding(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}"); // Create two 2/2 black Zombie creature tokens. this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 2)); // Madness {2}{B} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{B}"))); }
public IncorrigibleYouths(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(4); this.toughness = new MageInt(3); // Haste this.addAbility(HasteAbility.getInstance()); // Madness {2}{R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{R}"))); }
public ArrogantWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); this.subtype.add(SubType.WURM); this.power = new MageInt(4); this.toughness = new MageInt(4); // Trample this.addAbility(TrampleAbility.getInstance()); // Madness {2}{G} this.addAbility(new MadnessAbility(this, new ManaCostsImpl<>("{2}{G}"))); }
public InsatiableGorgers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); this.subtype.add(SubType.VAMPIRE); this.subtype.add(SubType.BERSERKER); this.power = new MageInt(5); this.toughness = new MageInt(3); // Insatiable Gorgers attacks each combat if able. this.addAbility(new AttacksEachCombatStaticAbility()); // Madness {3}{R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{3}{R}"))); }
public CallToTheNetherworld(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}"); // Return target black creature card from your graveyard to your hand. this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); // Madness {0} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{0}"))); }
public AlchemistsGreeting(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}"); // Alchemist's Greeting deals 4 damage to target creature. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // Madness {1}{R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}"))); }
public PsychoticEpisode(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{B}"); // Target player reveals their hand and the top card of their library. You choose a card revealed this way. That player puts the chosen card on the bottom of their library. this.getSpellAbility().addEffect(new PsychoticEpisodeEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); // Madness {1}{B} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{B}"))); }
public FieryTemper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); // Fiery Temper deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addTarget(new TargetAnyTarget()); // Madness {R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{R}"))); }
public JustTheWind(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Return target creature to its owner's hand. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // Madness {U} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{U}"))); }
public FranticPurification(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); // Destroy target enchantment. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetEnchantmentPermanent()); // Madness {W} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{W}"))); }
public ViolentEruption(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}{R}"); // Violent Eruption deals 4 damage divided as you choose among any number of target creatures and/or players. this.getSpellAbility().addEffect(new DamageMultiEffect(4)); this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4)); // Madness {1}{R}{R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}{R}"))); }
public BrainGorgers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(4); this.toughness = new MageInt(2); // When you cast Brain Gorgers, any player may sacrifice a creature. If a player does, counter Brain Gorgers. this.addAbility(new CastSourceTriggeredAbility(new BrainGorgersCounterSourceEffect())); // Madness {1}{B} this.addAbility(new MadnessAbility(this, new ManaCostsImpl<>("{1}{B}"))); }
public BaskingRootwalla(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); this.subtype.add(SubType.LIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {1}{G}: Basking Rootwalla gets +2/+2 until end of turn. Activate this ability only once each turn. this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{1}{G}"))); // Madness {0} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{0}"))); }
public AvacynsJudgment(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); // Madness {X}{R} Ability ability = new MadnessAbility(this, new ManaCostsImpl("{X}{R}")); ability.setRuleAtTheTop(true); this.addAbility(ability); // Avacyn's Judgment deals 2 damage divided as you choose among any number of target creatures and/or players. If Avacyn's Judgment's madness cost was paid, it deals X damage divided as you choose among those creatures and/or players instead. DynamicValue xValue = new AvacynsJudgmentManacostVariableValue(); Effect effect = new DamageMultiEffect(xValue); effect.setText("{this} deals 2 damage divided as you choose among any number of target creatures and/or players. If {this}'s madness cost was paid, it deals X damage divided as you choose among those creatures and/or players instead."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue)); }
public BigGameHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); this.subtype.add(SubType.HUMAN, SubType.REBEL, SubType.ASSASSIN); this.power = new MageInt(1); this.toughness = new MageInt(1); // When Big Game Hunter enters the battlefield, destroy target creature with power 4 or greater. It can't be regenerated. Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(true)); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); // Madness {B} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{B}"))); }
public AbandonReason(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); // Up to two target creatures each get +1/+0 and gain first strike until end of turn. Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn); effect.setText("Up to two target creatures each get +1/+0"); this.getSpellAbility().addEffect(effect); effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, "and gain first strike until end of turn"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); // Madness {1}{R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}"))); }
public GorgonRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.subtype.add(SubType.GORGON); this.power = new MageInt(2); this.toughness = new MageInt(4); // Whenever Gorgon Recluse blocks or becomes blocked by a nonblack creature, destroy that creature at end of combat. Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); effect.setText("destroy that creature at end of combat"); this.addAbility(new BlocksOrBecomesBlockedTriggeredAbility(effect, filter, false)); // Madness {B}{B} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{B}{B}"))); }