[STX] Implemented Blot Out the Sky

This commit is contained in:
Evan Kranzler 2021-04-02 20:28:42 -04:00
parent 7211153ffd
commit 946232162b
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.token.SilverquillToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BlotOutTheSky extends CardImpl {
private static final FilterPermanent filter = new FilterNonlandPermanent();
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
}
public BlotOutTheSky(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{W}{B}");
// Create X tapped 2/1 white and black Inkling creature tokens with flying. If X is 6 or more, destroy all noncreature, nonland permanents.
this.getSpellAbility().addEffect(new CreateTokenEffect(
new SilverquillToken(), ManacostVariableValue.instance, true, false
));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DestroyAllEffect(filter), BlotOutTheSkyCondition.instance,
"If X is 6 or more, destroy all noncreature, nonland permanents"
));
}
private BlotOutTheSky(final BlotOutTheSky card) {
super(card);
}
@Override
public BlotOutTheSky copy() {
return new BlotOutTheSky(this);
}
}
enum BlotOutTheSkyCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
return source.getManaCostsToPay().getX() >= 6;
}
}

View file

@ -41,6 +41,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
cards.add(new SetCardInfo("Beaming Defiance", 9, Rarity.COMMON, mage.cards.b.BeamingDefiance.class));
cards.add(new SetCardInfo("Biomathematician", 164, Rarity.COMMON, mage.cards.b.Biomathematician.class));
cards.add(new SetCardInfo("Blade Historian", 165, Rarity.RARE, mage.cards.b.BladeHistorian.class));
cards.add(new SetCardInfo("Blot Out the Sky", 167, Rarity.MYTHIC, mage.cards.b.BlotOutTheSky.class));
cards.add(new SetCardInfo("Body of Research", 168, Rarity.MYTHIC, mage.cards.b.BodyOfResearch.class));
cards.add(new SetCardInfo("Bury in Books", 39, Rarity.COMMON, mage.cards.b.BuryInBooks.class));
cards.add(new SetCardInfo("Campus Guide", 252, Rarity.COMMON, mage.cards.c.CampusGuide.class));