diff --git a/Mage.Sets/src/mage/cards/c/CuriousHerd.java b/Mage.Sets/src/mage/cards/c/CuriousHerd.java new file mode 100644 index 0000000000..10ef9eda52 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CuriousHerd.java @@ -0,0 +1,68 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.target.common.TargetOpponent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CuriousHerd extends CardImpl { + + public CuriousHerd(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}"); + + // Choose target opponent. You create X 3/3 green Beast creature tokens, where X is the number of artifacts that player controls. + this.getSpellAbility().addEffect(new CuriousHerdEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + private CuriousHerd(final CuriousHerd card) { + super(card); + } + + @Override + public CuriousHerd copy() { + return new CuriousHerd(this); + } +} + +class CuriousHerdEffect extends OneShotEffect { + + private static final Token token = new BeastToken(); + + CuriousHerdEffect() { + super(Outcome.Benefit); + staticText = "Choose target opponent. You create X 3/3 green Beast creature tokens, " + + "where X is the number of artifacts that player controls."; + } + + private CuriousHerdEffect(final CuriousHerdEffect effect) { + super(effect); + } + + @Override + public CuriousHerdEffect copy() { + return new CuriousHerdEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int artifactCount = game.getBattlefield().countAll( + StaticFilters.FILTER_PERMANENT_ARTIFACT, source.getFirstTarget(), game + ); + if (artifactCount > 0) { + token.putOntoBattlefield(artifactCount, game, source.getSourceId(), source.getControllerId()); + } + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/Commander2020Edition.java b/Mage.Sets/src/mage/sets/Commander2020Edition.java index 43bbac2c2b..9b36944b50 100644 --- a/Mage.Sets/src/mage/sets/Commander2020Edition.java +++ b/Mage.Sets/src/mage/sets/Commander2020Edition.java @@ -23,6 +23,7 @@ public final class Commander2020Edition extends ExpansionSet { cards.add(new SetCardInfo("Alesha, Who Smiles at Death", 143, Rarity.RARE, mage.cards.a.AleshaWhoSmilesAtDeath.class)); cards.add(new SetCardInfo("Arcane Signet", 237, Rarity.COMMON, mage.cards.a.ArcaneSignet.class)); cards.add(new SetCardInfo("Crop Rotation", 169, Rarity.COMMON, mage.cards.c.CropRotation.class)); + cards.add(new SetCardInfo("Curious Herd", 59, Rarity.RARE, mage.cards.c.CuriousHerd.class)); cards.add(new SetCardInfo("Lifecrafter's Bestiary", 244, Rarity.RARE, mage.cards.l.LifecraftersBestiary.class)); cards.add(new SetCardInfo("Rashmi, Eternities Crafter", 229, Rarity.RARE, mage.cards.r.RashmiEternitiesCrafter.class)); cards.add(new SetCardInfo("Shared Animosity", 158, Rarity.RARE, mage.cards.s.SharedAnimosity.class));