diff --git a/Mage.Sets/src/mage/cards/p/PersistentPetitioners.java b/Mage.Sets/src/mage/cards/p/PersistentPetitioners.java new file mode 100644 index 0000000000..311acf0f7f --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PersistentPetitioners.java @@ -0,0 +1,75 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.TargetPlayer; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PersistentPetitioners extends CardImpl { + + private static final FilterControlledPermanent filter + = new FilterControlledPermanent("untapped Advisors you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate(SubType.ADVISOR)); + } + + public PersistentPetitioners(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {1}, {T}: Target player puts the top card of their library into their graveyard. + Ability ability = new SimpleActivatedAbility( + new PutLibraryIntoGraveTargetEffect(1), new GenericManaCost(1) + ); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + + // Tap four untapped Advisors you control: Target player puts the top twelve cards of their library into their graveyard. + ability = new SimpleActivatedAbility( + new PutLibraryIntoGraveTargetEffect(12), + new TapTargetCost(new TargetControlledPermanent( + 4, 4, filter, true + )) + ); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + + // A deck can have any number of cards named Persistent Petitioners. + this.getSpellAbility().addEffect(new InfoEffect("A deck can have any number of cards named Persistent Petitioners.")); + } + + private PersistentPetitioners(final PersistentPetitioners card) { + super(card); + } + + @Override + public PersistentPetitioners copy() { + return new PersistentPetitioners(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 808a1ea857..e8ebefb305 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -121,6 +121,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Orzhov Guildgate", 253, Rarity.COMMON, mage.cards.o.OrzhovGuildgate.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Orzhov Locket", 236, Rarity.COMMON, mage.cards.o.OrzhovLocket.class)); cards.add(new SetCardInfo("Orzhov Racketeers", 80, Rarity.UNCOMMON, mage.cards.o.OrzhovRacketeers.class)); + cards.add(new SetCardInfo("Persistent Petitioners", 44, Rarity.COMMON, mage.cards.p.PersistentPetitioners.class)); cards.add(new SetCardInfo("Pestilent Spirit", 81, Rarity.RARE, mage.cards.p.PestilentSpirit.class)); cards.add(new SetCardInfo("Pitiless Pontiff", 194, Rarity.UNCOMMON, mage.cards.p.PitilessPontiff.class)); cards.add(new SetCardInfo("Precognitive Perception", 45, Rarity.RARE, mage.cards.p.PrecognitivePerception.class)); diff --git a/Mage/src/main/java/mage/cards/decks/Constructed.java b/Mage/src/main/java/mage/cards/decks/Constructed.java index 23410c32b5..4773b3972f 100644 --- a/Mage/src/main/java/mage/cards/decks/Constructed.java +++ b/Mage/src/main/java/mage/cards/decks/Constructed.java @@ -1,26 +1,29 @@ package mage.cards.decks; -import java.util.*; -import java.util.Map.Entry; import mage.cards.Card; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; import mage.constants.Rarity; import org.apache.log4j.Logger; +import java.util.*; +import java.util.Map.Entry; + /** - * * @author BetaSteward_at_googlemail.com */ public class Constructed extends DeckValidator { private static final Logger logger = Logger.getLogger(DeckValidator.class); - protected static final List anyNumberCardsAllowed = new ArrayList<>(Arrays.asList("Relentless Rats", "Shadowborn Apostle", "Rat Colony")); - protected static final List basicLandNames = new ArrayList<>( - Arrays.asList("Forest", "Island", "Mountain", "Swamp", "Plains", "Wastes", "Snow-Covered Forest", - "Snow-Covered Island", "Snow-Covered Mountain", "Snow-Covered Swamp", "Snow-Covered Plains")); + protected static final List anyNumberCardsAllowed = Arrays.asList( + "Relentless Rats", "Shadowborn Apostle", "Rat Colony", "Persistent Petitioners" + ); + protected static final List basicLandNames = Arrays.asList( + "Forest", "Island", "Mountain", "Swamp", "Plains", "Wastes", "Snow-Covered Forest", + "Snow-Covered Island", "Snow-Covered Mountain", "Snow-Covered Swamp", "Snow-Covered Plains" + ); protected List banned = new ArrayList<>(); protected List restricted = new ArrayList<>(); protected List setCodes = new ArrayList<>();