@Override public MadnessAbility copy() { return new MadnessAbility(this); }
@SuppressWarnings("unchecked") public MadnessAbility(Card card, ManaCosts madnessCost) { super(Zone.HAND, new MadnessReplacementEffect((ManaCosts<ManaCost>) madnessCost)); addSubAbility(new MadnessTriggeredAbility((ManaCosts<ManaCost>) madnessCost, getOriginalId())); rule = "Madness " + madnessCost.getText() + " <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>"; }
public GraveScrabbler(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(2); //Madness {1}{B} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{B}"))); //When Grave Scrabbler enters the battlefield, if its madness cost was paid, //you may return target creature card from a graveyard to its owner's hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard"))); this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MadnessAbility.getCondition(), "When {this} enters the battlefield, if its madness cost was paid, you may return target creature card from a graveyard to its owner's hand.")); }
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 ObsessiveSearch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); // Madness {U} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{U}"))); }
public BitingRain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}"); // All creatures get -2/-2 until end of turn. this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Duration.EndOfTurn)); // Madness {2}{B} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{B}"))); }
public WeirdedVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.VAMPIRE); this.subtype.add(SubType.HORROR); this.power = new MageInt(3); this.toughness = new MageInt(3); // Madness {2}{B} 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 RecklessWurm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); this.subtype.add(SubType.WURM); this.power = new MageInt(4); this.toughness = new MageInt(4); // Trample this.addAbility(TrampleAbility.getInstance()); // Madness {2}{R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{2}{R}"))); }
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}"))); }