mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
[UNF] Implemented Clowning Around
This commit is contained in:
parent
dbf3adebc1
commit
8142c4b2ec
2 changed files with 74 additions and 0 deletions
73
Mage.Sets/src/mage/cards/c/ClowningAround.java
Normal file
73
Mage.Sets/src/mage/cards/c/ClowningAround.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.ClownRobotToken;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ClowningAround extends CardImpl {
|
||||
|
||||
public ClowningAround(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}");
|
||||
|
||||
// Create two 1/1 white Clown Robot artifact creature tokens, then roll a six-sided die. If the result is equal to or less than the number of Robots you control, create a 1/1 white Clown Robot artifact creature token.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ClownRobotToken(), 2));
|
||||
this.getSpellAbility().addEffect(new ClowningAroundEffect());
|
||||
}
|
||||
|
||||
private ClowningAround(final ClowningAround card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClowningAround copy() {
|
||||
return new ClowningAround(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ClowningAroundEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.ROBOT);
|
||||
|
||||
ClowningAroundEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = ", then roll a six-sided die. If the result is equal to or less " +
|
||||
"than the number of Robots you control, create a 1/1 white Clown Robot artifact creature token";
|
||||
}
|
||||
|
||||
private ClowningAroundEffect(final ClowningAroundEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClowningAroundEffect copy() {
|
||||
return new ClowningAroundEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int roll = player.rollDice(outcome, source, game, 6);
|
||||
if (roll <= game.getBattlefield().count(filter, source.getControllerId(), source, game)) {
|
||||
new ClownRobotToken().putOntoBattlefield(1, game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -26,6 +26,7 @@ public final class Unfinity extends ExpansionSet {
|
|||
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("Clowning Around", 6, Rarity.COMMON, mage.cards.c.ClowningAround.class));
|
||||
cards.add(new SetCardInfo("Dissatisfied Customer", 72, Rarity.COMMON, mage.cards.d.DissatisfiedCustomer.class));
|
||||
cards.add(new SetCardInfo("Embiggen", 137, Rarity.COMMON, mage.cards.e.Embiggen.class));
|
||||
cards.add(new SetCardInfo("Forest", 239, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
Loading…
Reference in a new issue