Implemented Frantic Inventory

This commit is contained in:
Evan Kranzler 2020-06-14 10:32:59 -04:00
parent 65983623b4
commit 2c6859c60a
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,44 @@
package mage.cards.f;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.NamePredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FranticInventory extends CardImpl {
private static final FilterCard filter = new FilterCard();
static {
filter.add(new NamePredicate("Frantic Inventory"));
}
private static final DynamicValue xValue = new CardsInControllerGraveyardCount(filter);
public FranticInventory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Draw a card, then draw cards equal to the number of cards named Frantic Inventory in your graveyard.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(xValue)
.setText(", then draw cards equal to the number of cards named Frantic Inventory in your graveyard"));
}
private FranticInventory(final FranticInventory card) {
super(card);
}
@Override
public FranticInventory copy() {
return new FranticInventory(this);
}
}

View file

@ -74,6 +74,7 @@ public final class CoreSet2021 extends ExpansionSet {
cards.add(new SetCardInfo("Fierce Empath", 181, Rarity.UNCOMMON, mage.cards.f.FierceEmpath.class));
cards.add(new SetCardInfo("Fiery Emancipation", 143, Rarity.MYTHIC, mage.cards.f.FieryEmancipation.class));
cards.add(new SetCardInfo("Finishing Blow", 99, Rarity.COMMON, mage.cards.f.FinishingBlow.class));
cards.add(new SetCardInfo("Frantic Inventory", 50, Rarity.COMMON, mage.cards.f.FranticInventory.class));
cards.add(new SetCardInfo("Fungal Rebirth", 182, Rarity.UNCOMMON, mage.cards.f.FungalRebirth.class));
cards.add(new SetCardInfo("Furious Rise", 144, Rarity.UNCOMMON, mage.cards.f.FuriousRise.class));
cards.add(new SetCardInfo("Gadrak, the Crown-Scourge", 146, Rarity.RARE, mage.cards.g.GadrakTheCrownScourge.class));