diff --git a/Mage.Sets/src/mage/cards/w/WidespreadThieving.java b/Mage.Sets/src/mage/cards/w/WidespreadThieving.java new file mode 100644 index 00000000000..ea77d732fa7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WidespreadThieving.java @@ -0,0 +1,54 @@ +package mage.cards.w; + +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.HideawayPlayEffect; +import mage.abilities.keyword.HideawayAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.MulticoloredPredicate; +import mage.game.permanent.token.TreasureToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WidespreadThieving extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a multicolored spell"); + + static { + filter.add(MulticoloredPredicate.instance); + } + + public WidespreadThieving(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + // Hideaway 5 + this.addAbility(new HideawayAbility(5)); + + // Whenever you cast a multicolored spell, create a Treasure token. Then you may pay {W}{U}{B}{R}{G}. If you do, you may play the exiled card without paying its mana cost. + Ability ability = new SpellCastControllerTriggeredAbility( + new CreateTokenEffect(new TreasureToken()), filter, false + ); + ability.addEffect(new DoIfCostPaid( + new HideawayPlayEffect(), new ManaCostsImpl<>("{W}{U}{B}{R}{G}") + ).concatBy("Then")); + this.addAbility(ability); + } + + private WidespreadThieving(final WidespreadThieving card) { + super(card); + } + + @Override + public WidespreadThieving copy() { + return new WidespreadThieving(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java index a9a7ba86da2..8b5c36b2d7d 100644 --- a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java +++ b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java @@ -251,6 +251,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet { cards.add(new SetCardInfo("Warm Welcome", 164, Rarity.COMMON, mage.cards.w.WarmWelcome.class)); cards.add(new SetCardInfo("Waterfront District", 259, Rarity.COMMON, mage.cards.w.WaterfrontDistrict.class)); cards.add(new SetCardInfo("Whack", 99, Rarity.UNCOMMON, mage.cards.w.Whack.class)); + cards.add(new SetCardInfo("Widespread Thieving", 130, Rarity.RARE, mage.cards.w.WidespreadThieving.class)); cards.add(new SetCardInfo("Wingshield Agent", 64, Rarity.UNCOMMON, mage.cards.w.WingshieldAgent.class)); cards.add(new SetCardInfo("Witness Protection", 66, Rarity.COMMON, mage.cards.w.WitnessProtection.class)); cards.add(new SetCardInfo("Witty Roastmaster", 131, Rarity.COMMON, mage.cards.w.WittyRoastmaster.class));