diff --git a/Mage.Sets/src/mage/cards/p/PublicThoroughfare.java b/Mage.Sets/src/mage/cards/p/PublicThoroughfare.java new file mode 100644 index 00000000000..39f9064f6de --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PublicThoroughfare.java @@ -0,0 +1,58 @@ +package mage.cards.p; + +import mage.abilities.common.EntersBattlefieldTappedAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PublicThoroughfare extends CardImpl { + + private static final FilterControlledPermanent filter + = new FilterControlledPermanent("untapped artifact or land you control"); + + static { + filter.add(TappedPredicate.UNTAPPED); + filter.add(Predicates.or( + CardType.ARTIFACT.getPredicate(), + CardType.LAND.getPredicate() + )); + } + + public PublicThoroughfare(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // Public Thoroughfare enters the battlefield tapped. + this.addAbility(new EntersBattlefieldTappedAbility()); + + // When Public Thoroughfare enters the battlefield, sacrifice it unless you tap an untapped artifact or land you control. + this.addAbility(new EntersBattlefieldTriggeredAbility( + + new SacrificeSourceUnlessPaysEffect(new TapTargetCost(new TargetControlledPermanent(filter))) + )); + + // {T}: Add one mana of any color. + this.addAbility(new AnyColorManaAbility()); + } + + private PublicThoroughfare(final PublicThoroughfare card) { + super(card); + } + + @Override + public PublicThoroughfare copy() { + return new PublicThoroughfare(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java index 1f882933a6a..81f65a4ee75 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java @@ -69,6 +69,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet { cards.add(new SetCardInfo("Novice Inspector", 29, Rarity.COMMON, mage.cards.n.NoviceInspector.class)); cards.add(new SetCardInfo("Out Cold", 66, Rarity.COMMON, mage.cards.o.OutCold.class)); cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Public Thoroughfare", 265, Rarity.COMMON, mage.cards.p.PublicThoroughfare.class)); cards.add(new SetCardInfo("Raucous Theater", 266, Rarity.RARE, mage.cards.r.RaucousTheater.class)); cards.add(new SetCardInfo("Sanitation Automaton", 256, Rarity.COMMON, mage.cards.s.SanitationAutomaton.class)); cards.add(new SetCardInfo("Scene of the Crime", 267, Rarity.UNCOMMON, mage.cards.s.SceneOfTheCrime.class));