mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[UNF] Implemented Circuits Act
This commit is contained in:
parent
81c70d25a8
commit
faccf12035
2 changed files with 72 additions and 0 deletions
71
Mage.Sets/src/mage/cards/c/CircuitsAct.java
Normal file
71
Mage.Sets/src/mage/cards/c/CircuitsAct.java
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue