[WOE] Implement Feed the Cauldron

This commit is contained in:
theelk801 2023-08-24 20:18:27 -04:00
parent 3de94af596
commit 1eefc9e8f9
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,50 @@
package mage.cards.f;
import mage.abilities.condition.common.MyTurnCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.game.permanent.token.FoodToken;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FeedTheCauldron extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("creature with mana value 3 or less");
static {
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3));
}
public FeedTheCauldron(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
// Destroy target creature with mana value 3 or less. If it's your turn, create a Food token.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(filter));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new CreateTokenEffect(new FoodToken()), MyTurnCondition.instance,
"if it's your turn, create a Food token"
));
}
private FeedTheCauldron(final FeedTheCauldron card) {
super(card);
}
@Override
public FeedTheCauldron copy() {
return new FeedTheCauldron(this);
}
}

View file

@ -84,6 +84,7 @@ public final class WildsOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Faerie Fencing", 90, Rarity.UNCOMMON, mage.cards.f.FaerieFencing.class));
cards.add(new SetCardInfo("Farsight Ritual", 49, Rarity.RARE, mage.cards.f.FarsightRitual.class));
cards.add(new SetCardInfo("Faunsbane Troll", 203, Rarity.RARE, mage.cards.f.FaunsbaneTroll.class));
cards.add(new SetCardInfo("Feed the Cauldron", 91, Rarity.COMMON, mage.cards.f.FeedTheCauldron.class));
cards.add(new SetCardInfo("Ferocious Werefox", 170, Rarity.COMMON, mage.cards.f.FerociousWerefox.class));
cards.add(new SetCardInfo("Flick a Coin", 128, Rarity.COMMON, mage.cards.f.FlickACoin.class));
cards.add(new SetCardInfo("Food Coma", 308, Rarity.UNCOMMON, mage.cards.f.FoodComa.class));