[AFR] Implemented Unexpected Windfall

This commit is contained in:
Daniel Bomar 2021-07-05 10:38:07 -05:00
parent 8dec46a3b9
commit 044ccb4296
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,38 @@
package mage.cards.u;
import java.util.UUID;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.TreasureToken;
/**
*
* @author weirddan455
*/
public final class UnexpectedWindfall extends CardImpl {
public UnexpectedWindfall(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}{R}");
// As an additional cost to cast this spell, discard a card.
this.getSpellAbility().addCost(new DiscardCardCost());
// Draw two cards and create two Treasure tokens.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
this.getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken(), 2).concatBy("and"));
}
private UnexpectedWindfall(final UnexpectedWindfall card) {
super(card);
}
@Override
public UnexpectedWindfall copy() {
return new UnexpectedWindfall(this);
}
}

View file

@ -142,6 +142,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
cards.add(new SetCardInfo("Treasure Vault", 261, Rarity.RARE, mage.cards.t.TreasureVault.class));
cards.add(new SetCardInfo("Trelasarra Moon Dancer", 236, Rarity.UNCOMMON, mage.cards.t.TrelasarraMoonDancer.class));
cards.add(new SetCardInfo("Triumphant Adventurer", 237, Rarity.RARE, mage.cards.t.TriumphantAdventurer.class));
cards.add(new SetCardInfo("Unexpected Windfall", 164, Rarity.COMMON, mage.cards.u.UnexpectedWindfall.class));
cards.add(new SetCardInfo("Varis, Silverymoon Ranger", 209, Rarity.RARE, mage.cards.v.VarisSilverymoonRanger.class));
cards.add(new SetCardInfo("Veteran Dungeoneer", 40, Rarity.COMMON, mage.cards.v.VeteranDungeoneer.class));
cards.add(new SetCardInfo("Vorpal Sword", 124, Rarity.RARE, mage.cards.v.VorpalSword.class));