diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java index 8062da4e57..54418703dc 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java @@ -447,7 +447,7 @@ public class ScryfallImageSupportCards { add("PELD"); // Throne of Eldraine Promos add("ELD"); // Throne of Eldraine //add("PTG"); // Ponies: The Galloping - //add("CMB1"); // Mystery Booster Playtest Cards + add("CMB1"); // Mystery Booster Playtest Cards add("MB1"); // Mystery Booster add("GN2"); // Game Night 2019 add("HA1"); // Historic Anthology 1 diff --git a/Mage.Sets/src/mage/cards/s/SlivdraziMonstrosity.java b/Mage.Sets/src/mage/cards/s/SlivdraziMonstrosity.java new file mode 100644 index 0000000000..5af85e8ea5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlivdraziMonstrosity.java @@ -0,0 +1,109 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BecomesSubtypeAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.AnnihilatorAbility; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.EldraziSliverToken; + +import java.util.Arrays; +import java.util.UUID; + +/** + * @author Grath + */ +public final class SlivdraziMonstrosity extends CardImpl { + + private static final FilterCreaturePermanent eldrazi_you_control = new FilterCreaturePermanent("Eldrazi you control"); + + static { + eldrazi_you_control.add(SubType.ELDRAZI.getPredicate()); + } + + public SlivdraziMonstrosity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{C}{W}{U}{B}{R}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.SLIVER); + this.subtype.add(SubType.ELDRAZI); + this.power = new MageInt(8); + this.toughness = new MageInt(8); + + // Eldrazi you control are Slivers in addition to their other types. + this.addAbility(new SimpleStaticAbility(new BecomesSubtypeAllEffect( + Duration.WhileOnBattlefield, Arrays.asList(SubType.SLIVER), eldrazi_you_control, false + ).setText("Eldrazi you control are Slivers in addition to their other types."))); + + // Slivers you control have devoid and annihilator 1. + Ability ability = new SimpleStaticAbility(new SlivdraziMonstrosityEffect()); + ability.addEffect( + new GainAbilityControlledEffect( + new AnnihilatorAbility(1), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_SLIVERS + ).setText("and annihilator 1")); + this.addAbility(ability); + + // {3}: Create a 1/1 colorless Eldrazi Sliver creature token. It has “Sacrifice this creature: Add {C}.” + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new EldraziSliverToken()), new ManaCostsImpl<>("{3}"))); + } + + private SlivdraziMonstrosity(final SlivdraziMonstrosity card) { + super(card); + } + + @Override + public SlivdraziMonstrosity copy() { + return new SlivdraziMonstrosity(this); + } +} + +class SlivdraziMonstrosityEffect extends ContinuousEffectImpl { + + private static final FilterPermanent filter = new FilterPermanent(SubType.SLIVER, "Slivers"); + + public SlivdraziMonstrosityEffect() { + super(Duration.WhileOnBattlefield, Layer.ColorChangingEffects_5, SubLayer.NA, Outcome.Benefit); + staticText = "Slivers you control have devoid"; + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source, game)) { + if (perm.isControlledBy(source.getControllerId())) { + // Due to the carefully calibrated system of layers that Magic uses to determine the interaction of continuous + // effects, gaining an ability that changes the color of an object has no effect on the color of that object. + // Despite this, Slivdrazi Monstrosity causes Slivers to become colorless as they gain devoid. Rather than try + // to figure out how this could work, this card should just be played as though it read “Slivers you control + // have devoid and annihilator 1 and are colorless.” + // (2019-11-12) + // This ruling implemented here by adding this ability in the color-changing effect layer. + perm.addAbility(new DevoidAbility(perm.getColor(game)), source.getSourceId(), game); + } + } + return true; + } + + @Override + public SlivdraziMonstrosityEffect copy() { + return new SlivdraziMonstrosityEffect(this); + } + + private SlivdraziMonstrosityEffect(final SlivdraziMonstrosityEffect effect) { + super(effect); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/MysteryBoosterPlaytest.java b/Mage.Sets/src/mage/sets/MysteryBoosterPlaytest.java new file mode 100644 index 0000000000..7242f375f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/MysteryBoosterPlaytest.java @@ -0,0 +1,29 @@ +package mage.sets; + +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * https://mtg.fandom.com/wiki/Mystery_Booster/Test_cards + * https://magic.wizards.com/en/articles/archive/feature/unraveling-mystery-booster-2019-11-14 + * https://scryfall.com/sets/cmb1 + * + */ +public class MysteryBoosterPlaytest extends ExpansionSet { + + private static final MysteryBoosterPlaytest instance = new MysteryBoosterPlaytest(); + + public static MysteryBoosterPlaytest getInstance() { + return instance; + } + + private MysteryBoosterPlaytest() { + super("Mystery Booster Playtest", "CMB1", ExpansionSet.buildDate(2019, 11, 7), SetType.JOKESET); + this.hasBoosters = false; + this.hasBasicLands = false; + + cards.add(new SetCardInfo("Slivdrazi Monstrosity", 102, Rarity.RARE, mage.cards.s.SlivdraziMonstrosity.class)); + } + +} diff --git a/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java index 5726410b9c..b018ea7757 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java @@ -33,7 +33,7 @@ public final class EldraziScionToken extends TokenImpl { subtype.add(SubType.SCION); power = new MageInt(1); toughness = new MageInt(1); - addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GenericMana(1), new SacrificeSourceCost())); + addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new SacrificeSourceCost())); availableImageSetCodes = tokenImageSets; } diff --git a/Mage/src/main/java/mage/game/permanent/token/EldraziSliverToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziSliverToken.java new file mode 100644 index 0000000000..f4a5bff005 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziSliverToken.java @@ -0,0 +1,32 @@ + +package mage.game.permanent.token; + +import mage.MageInt; +import mage.Mana; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.mana.SimpleManaAbility; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +public final class EldraziSliverToken extends TokenImpl { + + public EldraziSliverToken() { + super("Eldrazi Sliver Token", "1/1 colorless Eldrazi Sliver creature token with \"Sacrifice this creature: Add {C}.\""); + cardType.add(CardType.CREATURE); + subtype.add(SubType.ELDRAZI); + subtype.add(SubType.SLIVER); + power = new MageInt(1); + toughness = new MageInt(1); + addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new SacrificeSourceCost())); + } + + public EldraziSliverToken(final EldraziSliverToken token) { + super(token); + } + + @Override + public EldraziSliverToken copy() { + return new EldraziSliverToken(this); //To change body of generated methods, choose Tools | Templates. + } +}