diff --git a/Mage.Sets/src/mage/cards/c/CircuitsAct.java b/Mage.Sets/src/mage/cards/c/CircuitsAct.java new file mode 100644 index 0000000000..a032c39aa1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CircuitsAct.java @@ -0,0 +1,71 @@ +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.game.Game; +import mage.game.permanent.token.ClownRobotToken; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CircuitsAct extends CardImpl { + + public CircuitsAct(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); + + // Roll three six-sided dice. For each different result, create a 1/1 white Clown Robot artifact creature token. + this.getSpellAbility().addEffect(new CircuitsActEffect()); + } + + private CircuitsAct(final CircuitsAct card) { + super(card); + } + + @Override + public CircuitsAct copy() { + return new CircuitsAct(this); + } +} + +class CircuitsActEffect extends OneShotEffect { + + CircuitsActEffect() { + super(Outcome.Benefit); + staticText = "roll three six-sided dice. For each different result, " + + "create a 1/1 white Clown Robot artifact creature token"; + } + + private CircuitsActEffect(final CircuitsActEffect effect) { + super(effect); + } + + @Override + public CircuitsActEffect copy() { + return new CircuitsActEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + int count = player + .rollDice(outcome, source, game, 6, 3, 0) + .stream() + .distinct() + .mapToInt(x -> 1) + .sum(); + if (count > 0) { + new ClownRobotToken().putOntoBattlefield(count, game, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/Unfinity.java b/Mage.Sets/src/mage/sets/Unfinity.java index 40ca04ccb1..43cb7022ab 100644 --- a/Mage.Sets/src/mage/sets/Unfinity.java +++ b/Mage.Sets/src/mage/sets/Unfinity.java @@ -24,6 +24,7 @@ public final class Unfinity extends ExpansionSet { cards.add(new SetCardInfo("Blood Crypt", 279, Rarity.RARE, mage.cards.b.BloodCrypt.class)); cards.add(new SetCardInfo("Boing!", 40, Rarity.COMMON, mage.cards.b.Boing.class)); cards.add(new SetCardInfo("Breeding Pool", 286, Rarity.RARE, mage.cards.b.BreedingPool.class)); + cards.add(new SetCardInfo("Circuits Act", 103, Rarity.COMMON, mage.cards.c.CircuitsAct.class)); cards.add(new SetCardInfo("Clown Car", 186, Rarity.RARE, mage.cards.c.ClownCar.class)); cards.add(new SetCardInfo("Forest", 239, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Godless Shrine", 282, Rarity.RARE, mage.cards.g.GodlessShrine.class));