diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java index f53f63eea97..1f2c58b9dc4 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java @@ -2558,6 +2558,7 @@ public class ScryfallImageSupportTokens { put("DSK/Spider", "https://api.scryfall.com/cards/tdsk/12?format=image"); put("DSK/Spirit/1", "https://api.scryfall.com/cards/tdsk/6?format=image"); put("DSK/Spirit/2", "https://api.scryfall.com/cards/tdsk/8?format=image"); + put("DSK/Toy", "https://api.scryfall.com/cards/tdsk/7?format=image"); put("DSK/Treasure", "https://api.scryfall.com/cards/tdsk/15?format=image"); // DSC diff --git a/Mage.Sets/src/mage/cards/d/DollmakersShopPorcelainGallery.java b/Mage.Sets/src/mage/cards/d/DollmakersShopPorcelainGallery.java new file mode 100644 index 00000000000..2ca7b73a5cc --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DollmakersShopPorcelainGallery.java @@ -0,0 +1,54 @@ +package mage.cards.d; + +import mage.abilities.Ability; +import mage.abilities.common.AttacksPlayerWithCreaturesTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.CreaturesYouControlCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessAllEffect; +import mage.abilities.hint.ValueHint; +import mage.cards.CardSetInfo; +import mage.cards.RoomCard; +import mage.constants.*; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.game.permanent.token.ToyToken; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class DollmakersShopPorcelainGallery extends RoomCard { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Toy creatures you control"); + + static { + filter.add(Predicates.not(SubType.TOY.getPredicate())); + } + + public DollmakersShopPorcelainGallery(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}", "{4}{W}{W}", SpellAbilityType.SPLIT); + this.subtype.add(SubType.ROOM); + + // Dollmaker's Shop: Whenever one or more non-Toy creatures you control attack a player, create a 1/1 white Toy artifact creature token. + Ability left = new AttacksPlayerWithCreaturesTriggeredAbility(new CreateTokenEffect(new ToyToken()), filter, SetTargetPointer.NONE); + + // Porcelain Gallery: Creatures you control have base power and toughness each equal to the number of creatures you control. + Ability right = new SimpleStaticAbility(new SetBasePowerToughnessAllEffect( + CreaturesYouControlCount.PLURAL, Duration.WhileOnBattlefield, StaticFilters.FILTER_CONTROLLED_CREATURES + ).setText("Creatures you control have base power and toughness each equal to the number of creatures you control")); + + this.addRoomAbilities(left, right.addHint(new ValueHint("Creatures you control", CreaturesYouControlCount.PLURAL))); + } + + private DollmakersShopPorcelainGallery (final DollmakersShopPorcelainGallery card) { + super(card); + } + + @Override + public DollmakersShopPorcelainGallery copy() { + return new DollmakersShopPorcelainGallery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java b/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java index 7d6cdc80132..ce42e8e947c 100644 --- a/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java +++ b/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java @@ -79,6 +79,8 @@ public final class DuskmournHouseOfHorror extends ExpansionSet { cards.add(new SetCardInfo("Dissection Tools", 385, Rarity.RARE, mage.cards.d.DissectionTools.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Disturbing Mirth", 212, Rarity.UNCOMMON, mage.cards.d.DisturbingMirth.class)); cards.add(new SetCardInfo("Diversion Specialist", 132, Rarity.UNCOMMON, mage.cards.d.DiversionSpecialist.class)); + cards.add(new SetCardInfo("Dollmaker's Shop // Porcelain Gallery", 4, Rarity.MYTHIC, mage.cards.d.DollmakersShopPorcelainGallery.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Dollmaker's Shop // Porcelain Gallery", 335, Rarity.MYTHIC, mage.cards.d.DollmakersShopPorcelainGallery.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Don't Make a Sound", 49, Rarity.COMMON, mage.cards.d.DontMakeASound.class)); cards.add(new SetCardInfo("Doomsday Excruciator", 346, Rarity.RARE, mage.cards.d.DoomsdayExcruciator.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Doomsday Excruciator", 94, Rarity.RARE, mage.cards.d.DoomsdayExcruciator.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessAllEffect.java index 5b852371644..ebb364b2a70 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessAllEffect.java @@ -34,6 +34,10 @@ public class SetBasePowerToughnessAllEffect extends ContinuousEffectImpl { this(StaticValue.get(power), StaticValue.get(toughness), duration, filter); } + public SetBasePowerToughnessAllEffect(DynamicValue stats, Duration duration, FilterPermanent filter) { + this(stats, stats, duration, filter); + } + public SetBasePowerToughnessAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterPermanent filter) { super(duration, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); this.power = power; diff --git a/Mage/src/main/java/mage/game/permanent/token/ToyToken.java b/Mage/src/main/java/mage/game/permanent/token/ToyToken.java new file mode 100644 index 00000000000..53c32ed2ebd --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/ToyToken.java @@ -0,0 +1,30 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author PurpleCrowbar + */ +public final class ToyToken extends TokenImpl { + + public ToyToken() { + super("Toy Token", "1/1 white Toy artifact creature token"); + cardType.add(CardType.ARTIFACT); + cardType.add(CardType.CREATURE); + subtype.add(SubType.TOY); + color.setWhite(true); + power = new MageInt(1); + toughness = new MageInt(1); + } + + private ToyToken(final ToyToken token) { + super(token); + } + + @Override + public ToyToken copy() { + return new ToyToken(this); + } +} diff --git a/Mage/src/main/resources/tokens-database.txt b/Mage/src/main/resources/tokens-database.txt index 9875e23e7fc..2587441c6b1 100644 --- a/Mage/src/main/resources/tokens-database.txt +++ b/Mage/src/main/resources/tokens-database.txt @@ -2793,6 +2793,7 @@ |Generate|TOK:DSK|Spider|||Spider22Token| |Generate|TOK:DSK|Spirit|1||Spirit31Token| |Generate|TOK:DSK|Spirit|2||SpiritBlueToken| +|Generate|TOK:DSK|Toy|||ToyToken| |Generate|TOK:DSK|Treasure|||TreasureToken| # FIN