[BLC] Implement Swarmyard Massacre (#12778)

* [BLC] Implement Swarmyard Massacre

* Fix rules text.
This commit is contained in:
Grath 2024-09-01 21:47:52 -04:00 committed by GitHub
parent 87173837ec
commit ab5460bdc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,62 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.game.permanent.token.SquirrelToken;
/**
*
* @author Grath
*/
public final class SwarmyardMassacre extends CardImpl {
static final FilterCreaturePermanent notSwarmyardFilter = new FilterCreaturePermanent("each creature that isn't an Insect, Rat, Spider, or Squirrel");
static final FilterCreaturePermanent swarmyardFilter = new FilterCreaturePermanent("creature you control that's an Insect, Rat, Spider, or Squirrel");
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(swarmyardFilter, -1);
static {
notSwarmyardFilter.add(Predicates.not(Predicates.or(
SubType.INSECT.getPredicate(),
SubType.RAT.getPredicate(),
SubType.SPIDER.getPredicate(),
SubType.SQUIRREL.getPredicate()
)));
swarmyardFilter.add(Predicates.or(
SubType.INSECT.getPredicate(),
SubType.RAT.getPredicate(),
SubType.SPIDER.getPredicate(),
SubType.SQUIRREL.getPredicate()
));
}
public SwarmyardMassacre(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}{B}");
// Create two 1/1 green Squirrel creature tokens. Then each creature that isn't an Insect, Rat, Spider, or Squirrel gets -1/-1 until end of turn for each creature you control that's an Insect, Rat, Spider, or Squirrel.
this.getSpellAbility().addEffect(new CreateTokenEffect(new SquirrelToken(), 2));
this.getSpellAbility().addEffect(new BoostAllEffect(
xValue, xValue, Duration.EndOfTurn, notSwarmyardFilter, false)
.concatBy("Then"));
}
private SwarmyardMassacre(final SwarmyardMassacre card) {
super(card);
}
@Override
public SwarmyardMassacre copy() {
return new SwarmyardMassacre(this);
}
}

View file

@ -273,6 +273,7 @@ public final class BloomburrowCommander extends ExpansionSet {
cards.add(new SetCardInfo("Sunscorch Regent", 158, Rarity.RARE, mage.cards.s.SunscorchRegent.class));
cards.add(new SetCardInfo("Sunscorched Divide", 336, Rarity.RARE, mage.cards.s.SunscorchedDivide.class));
cards.add(new SetCardInfo("Swarmyard", 133, Rarity.RARE, mage.cards.s.Swarmyard.class));
cards.add(new SetCardInfo("Swarmyard Massacre", 20, Rarity.RARE, mage.cards.s.SwarmyardMassacre.class));
cards.add(new SetCardInfo("Swiftfoot Boots", 286, Rarity.UNCOMMON, mage.cards.s.SwiftfootBoots.class));
cards.add(new SetCardInfo("Swords to Plowshares", 109, Rarity.UNCOMMON, mage.cards.s.SwordsToPlowshares.class));
cards.add(new SetCardInfo("Tainted Wood", 337, Rarity.UNCOMMON, mage.cards.t.TaintedWood.class));