mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Merge origin/master
This commit is contained in:
commit
aa35462a6f
258 changed files with 1320 additions and 1225 deletions
|
@ -572,7 +572,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
formatFilterList.add(RowFilter.regexFilter("^Limited", TableTableModel.COLUMN_DECK_TYPE));
|
formatFilterList.add(RowFilter.regexFilter("^Limited", TableTableModel.COLUMN_DECK_TYPE));
|
||||||
}
|
}
|
||||||
if (btnFormatOther.isSelected()) {
|
if (btnFormatOther.isSelected()) {
|
||||||
formatFilterList.add(RowFilter.regexFilter("^Momir Basic|^Constructed - Pauper|^Constructed - Frontier|^Constructed - Extended|^Constructed - Eternal|^Constructed - Historical|^Constructed - Super|^Constructed - Freeform|^Australian Highlander|^Canadian Highlander", TableTableModel.COLUMN_DECK_TYPE));
|
formatFilterList.add(RowFilter.regexFilter("^Momir Basic|^Constructed - Pauper|^Constructed - Frontier|^Constructed - Extended|^Constructed - Eternal|^Constructed - Historical|^Constructed - Super|^Constructed - Freeform|^Australian Highlander|^Canadian Highlander|^Constructed - Old", TableTableModel.COLUMN_DECK_TYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<RowFilter<Object, Object>> skillFilterList = new ArrayList<>();
|
List<RowFilter<Object, Object>> skillFilterList = new ArrayList<>();
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.deck;
|
||||||
|
|
||||||
|
import mage.cards.ExpansionSet;
|
||||||
|
import mage.cards.Sets;
|
||||||
|
import mage.cards.decks.Constructed;
|
||||||
|
import mage.constants.SetType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class validates a deck for the Old School 93/94 format.
|
||||||
|
*
|
||||||
|
* This was originally made to follow the deck construction rules found at the
|
||||||
|
* Old School Mtg blog found at:
|
||||||
|
* http://oldschool-mtg.blogspot.com/p/banrestriction.html
|
||||||
|
*
|
||||||
|
* There is no mana burn in this version of old school.
|
||||||
|
*
|
||||||
|
* If there are any questions or corrections, feel free to contact me.
|
||||||
|
*
|
||||||
|
* @author Marthinwurer (at gmail.com)
|
||||||
|
*/
|
||||||
|
public class OldSchool9394 extends Constructed {
|
||||||
|
|
||||||
|
public OldSchool9394() {
|
||||||
|
super("Constructed - Old School 93/94");
|
||||||
|
|
||||||
|
// use the set instances to make sure that we get the correct set codes
|
||||||
|
setCodes.add(mage.sets.LimitedEditionAlpha.getInstance().getCode());
|
||||||
|
setCodes.add(mage.sets.LimitedEditionBeta.getInstance().getCode());
|
||||||
|
setCodes.add(mage.sets.UnlimitedEdition.getInstance().getCode());
|
||||||
|
setCodes.add(mage.sets.ArabianNights.getInstance().getCode());
|
||||||
|
setCodes.add(mage.sets.Antiquities.getInstance().getCode());
|
||||||
|
setCodes.add(mage.sets.Legends.getInstance().getCode());
|
||||||
|
setCodes.add(mage.sets.TheDark.getInstance().getCode());
|
||||||
|
|
||||||
|
// ante cards and conspiracies banned, with specifically mentioned ones called out.
|
||||||
|
banned.add("Advantageous Proclamation");
|
||||||
|
banned.add("Amulet of Quoz");
|
||||||
|
banned.add("Backup Plan");
|
||||||
|
banned.add("Brago's Favor");
|
||||||
|
banned.add("Bronze Tablet"); ///
|
||||||
|
banned.add("Contract from Below"); ///
|
||||||
|
banned.add("Darkpact"); ///
|
||||||
|
banned.add("Demonic Attorney"); ///
|
||||||
|
banned.add("Double Stroke");
|
||||||
|
banned.add("Immediate Action");
|
||||||
|
banned.add("Iterative Analysis");
|
||||||
|
banned.add("Jeweled Bird"); ///
|
||||||
|
banned.add("Muzzio's Preparations");
|
||||||
|
banned.add("Power Play");
|
||||||
|
banned.add("Rebirth"); ///
|
||||||
|
banned.add("Secret Summoning");
|
||||||
|
banned.add("Secrets of Paradise");
|
||||||
|
banned.add("Sentinel Dispatch");
|
||||||
|
banned.add("Shahrazad");
|
||||||
|
banned.add("Tempest Efreet"); ///
|
||||||
|
banned.add("Timmerian Fiends");
|
||||||
|
banned.add("Unexpected Potential");
|
||||||
|
banned.add("Worldknit");
|
||||||
|
|
||||||
|
restricted.add("Ancestral Recall");
|
||||||
|
restricted.add("Balance");
|
||||||
|
restricted.add("Black Lotus");
|
||||||
|
restricted.add("Braingeyser");
|
||||||
|
restricted.add("Channel");
|
||||||
|
restricted.add("Chaos Orb");
|
||||||
|
restricted.add("Demonic Tutor");
|
||||||
|
restricted.add("Library of Alexandria");
|
||||||
|
restricted.add("Mana Drain");
|
||||||
|
restricted.add("Mind Twist");
|
||||||
|
restricted.add("Mishra's Workshop");
|
||||||
|
restricted.add("Mox Emerald");
|
||||||
|
restricted.add("Mox Jet");
|
||||||
|
restricted.add("Mox Pearl");
|
||||||
|
restricted.add("Mox Ruby");
|
||||||
|
restricted.add("Mox Sapphire");
|
||||||
|
restricted.add("Regrowth");
|
||||||
|
restricted.add("Shahrazad");
|
||||||
|
restricted.add("Sol Ring");
|
||||||
|
restricted.add("Strip Mine");
|
||||||
|
restricted.add("Time Vault");
|
||||||
|
restricted.add("Time Walk");
|
||||||
|
restricted.add("Timetwister");
|
||||||
|
restricted.add("Wheel of Fortune");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -138,6 +138,8 @@
|
||||||
<deckType name="Constructed - Pauper" jar="mage-deck-constructed.jar" className="mage.deck.Pauper"/>
|
<deckType name="Constructed - Pauper" jar="mage-deck-constructed.jar" className="mage.deck.Pauper"/>
|
||||||
<deckType name="Constructed - Historical Type 2" jar="mage-deck-constructed.jar" className="mage.deck.HistoricalType2"/>
|
<deckType name="Constructed - Historical Type 2" jar="mage-deck-constructed.jar" className="mage.deck.HistoricalType2"/>
|
||||||
<deckType name="Constructed - Super Type 2" jar="mage-deck-constructed.jar" className="mage.deck.SuperType2"/>
|
<deckType name="Constructed - Super Type 2" jar="mage-deck-constructed.jar" className="mage.deck.SuperType2"/>
|
||||||
|
<deckType name="Constructed - Freeform" jar="mage-deck-constructed.jar" className="mage.deck.Freeform"/>
|
||||||
|
<deckType name="Constructed - Old School 93/94" jar="mage-deck-constructed.jar" className="mage.deck.OldSchool9394"/>
|
||||||
<deckType name="Constructed - Australian Highlander" jar="mage-deck-constructed.jar" className="mage.deck.AusHighlander"/>
|
<deckType name="Constructed - Australian Highlander" jar="mage-deck-constructed.jar" className="mage.deck.AusHighlander"/>
|
||||||
<deckType name="Constructed - Canadian Highlander" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.CanadianHighlander"/>
|
<deckType name="Constructed - Canadian Highlander" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.CanadianHighlander"/>
|
||||||
<deckType name="Constructed - Freeform" jar="mage-deck-constructed.jar" className="mage.deck.Freeform"/>
|
<deckType name="Constructed - Freeform" jar="mage-deck-constructed.jar" className="mage.deck.Freeform"/>
|
||||||
|
|
|
@ -135,6 +135,8 @@
|
||||||
<deckType name="Constructed - Pauper" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Pauper"/>
|
<deckType name="Constructed - Pauper" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Pauper"/>
|
||||||
<deckType name="Constructed - Historical Type 2" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.HistoricalType2"/>
|
<deckType name="Constructed - Historical Type 2" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.HistoricalType2"/>
|
||||||
<deckType name="Constructed - Super Type 2" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.SuperType2"/>
|
<deckType name="Constructed - Super Type 2" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.SuperType2"/>
|
||||||
|
<deckType name="Constructed - Freeform" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Freeform"/>
|
||||||
|
<deckType name="Constructed - Old School 93/94" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.OldSchool9394"/>
|
||||||
<deckType name="Constructed - Australian Highlander" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.AusHighlander"/>
|
<deckType name="Constructed - Australian Highlander" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.AusHighlander"/>
|
||||||
<deckType name="Constructed - Canadian Highlander" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.CanadianHighlander"/>
|
<deckType name="Constructed - Canadian Highlander" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.CanadianHighlander"/>
|
||||||
<deckType name="Constructed - Freeform" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Freeform"/>
|
<deckType name="Constructed - Freeform" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Freeform"/>
|
||||||
|
|
|
@ -174,12 +174,14 @@ class AbandonedSarcophagusReplacementEffect extends ReplacementEffectImpl {
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
cardWasCycledThisTurn = false;
|
cardWasCycledThisTurn = false;
|
||||||
cardHasCycling = false;
|
cardHasCycling = false;
|
||||||
if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD) {
|
if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD
|
||||||
|
&& !game.isSimulation()) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
AbandonedSarcophagusWatcher watcher = (AbandonedSarcophagusWatcher) game.getState().getWatchers().get(AbandonedSarcophagusWatcher.class.getSimpleName());
|
AbandonedSarcophagusWatcher watcher = (AbandonedSarcophagusWatcher) game.getState().getWatchers().get(AbandonedSarcophagusWatcher.class.getSimpleName());
|
||||||
Card card = game.getCard(event.getTargetId());
|
Card card = game.getCard(event.getTargetId());
|
||||||
if (card != null
|
if (card != null
|
||||||
&& watcher != null) {
|
&& watcher != null
|
||||||
|
&& card.getOwnerId() == controller.getId()) {
|
||||||
for (Ability ability : card.getAbilities()) {
|
for (Ability ability : card.getAbilities()) {
|
||||||
if (ability instanceof CyclingAbility) {
|
if (ability instanceof CyclingAbility) {
|
||||||
cardHasCycling = true;
|
cardHasCycling = true;
|
||||||
|
@ -217,9 +219,13 @@ class AbandonedSarcophagusWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void watch(GameEvent event, Game game) {
|
public void watch(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.CYCLE_CARD) {
|
if (event.getType() == GameEvent.EventType.CYCLE_CARD
|
||||||
|
&& !game.isSimulation()) {
|
||||||
Card card = game.getCard(event.getSourceId());
|
Card card = game.getCard(event.getSourceId());
|
||||||
if (card != null) {
|
Player controller = game.getPlayer(event.getPlayerId());
|
||||||
|
if (card != null
|
||||||
|
&& controller != null
|
||||||
|
&& card.getOwnerId() == controller.getId()) {
|
||||||
Cards c = getCardsCycledThisTurn(event.getPlayerId());
|
Cards c = getCardsCycledThisTurn(event.getPlayerId());
|
||||||
c.add(card);
|
c.add(card);
|
||||||
cycledCardsThisTurn.put(event.getPlayerId(), c);
|
cycledCardsThisTurn.put(event.getPlayerId(), c);
|
||||||
|
|
|
@ -33,7 +33,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -78,7 +78,7 @@ class AcidicSoilEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), source.getSourceId(), game);
|
List<Permanent> permanents = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_LAND, source.getControllerId(), source.getSourceId(), game);
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.counters.Counter;
|
import mage.counters.Counter;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ public class AlteredEgo extends CardImpl {
|
||||||
this.addAbility(new CantBeCounteredAbility());
|
this.addAbility(new CantBeCounteredAbility());
|
||||||
|
|
||||||
// You may have Altered Ego enter the battlefield as a copy of any creature on the battlefield, except it enters with an additional X +1/+1 counters on it.
|
// You may have Altered Ego enter the battlefield as a copy of any creature on the battlefield, except it enters with an additional X +1/+1 counters on it.
|
||||||
Effect effect = new CopyPermanentEffect(new FilterCreaturePermanent(), null);
|
Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, null);
|
||||||
effect.setText("a copy of any creature on the battlefield");
|
effect.setText("a copy of any creature on the battlefield");
|
||||||
EntersBattlefieldAbility ability = new EntersBattlefieldAbility(effect, true);
|
EntersBattlefieldAbility ability = new EntersBattlefieldAbility(effect, true);
|
||||||
effect = new AlteredEgoAddCountersEffect(CounterType.P1P1.createInstance());
|
effect = new AlteredEgoAddCountersEffect(CounterType.P1P1.createInstance());
|
||||||
|
|
|
@ -39,7 +39,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ public class AnkleShanker extends CardImpl {
|
||||||
// Haste
|
// Haste
|
||||||
this.addAbility(HasteAbility.getInstance());
|
this.addAbility(HasteAbility.getInstance());
|
||||||
// Whenever Ankle Shanker attacks, creatures you control gain first strike and deathtouch until end of turn.
|
// Whenever Ankle Shanker attacks, creatures you control gain first strike and deathtouch until end of turn.
|
||||||
Effect effect = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("Creatures"));
|
Effect effect = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
|
||||||
effect.setText("creatures you control gain first strike");
|
effect.setText("creatures you control gain first strike");
|
||||||
Ability ability = new AttacksTriggeredAbility(effect, false);
|
Ability ability = new AttacksTriggeredAbility(effect, false);
|
||||||
effect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn);
|
effect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn);
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@ public class ArchetypeOfAggression extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Creatures you control have trample.
|
// Creatures you control have trample.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"))));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
// Creatures your opponents control lose trample and can't have or gain trample.
|
// Creatures your opponents control lose trample and can't have or gain trample.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ public class ArchetypeOfCourage extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Creatures you control have first strike.
|
// Creatures you control have first strike.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"))));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
// Creatures your opponents control lose first strike and can't have or gain first strike.
|
// Creatures your opponents control lose first strike and can't have or gain first strike.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ public class ArchetypeOfEndurance extends CardImpl {
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
// Creatures you control have hexproof.
|
// Creatures you control have hexproof.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"))));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
|
|
||||||
// Creatures your opponents control lose hexproof and can't have or gain hexproof.
|
// Creatures your opponents control lose hexproof and can't have or gain hexproof.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ public class ArchetypeOfFinality extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Creatures you control have deathtouch.
|
// Creatures you control have deathtouch.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"))));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
// Creatures your opponents control lose deathtouch and can't have or gain deathtouch.
|
// Creatures your opponents control lose deathtouch and can't have or gain deathtouch.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ public class ArchetypeOfImagination extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Creatures you control have flying.
|
// Creatures you control have flying.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"))));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
// Creatures your opponents control lose flying and can't have or gain flying.
|
// Creatures your opponents control lose flying and can't have or gain flying.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesCantGetOrHaveAbilityEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public class Armageddon extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// Destroy all lands.
|
// Destroy all lands.
|
||||||
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterLandPermanent("lands")));
|
this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_LANDS));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Armageddon(final Armageddon card) {
|
public Armageddon(final Armageddon card) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.permanent.token.SpiritToken;
|
import mage.game.permanent.token.SpiritToken;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -51,12 +51,10 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class BakuAltar extends CardImpl {
|
public class BakuAltar extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public BakuAltar(UUID ownerId, CardSetInfo setInfo) {
|
public BakuAltar(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Baku Altar.
|
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Baku Altar.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance(1)), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance(1)), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
// {2}, {tap}, Remove a ki counter from Baku Altar: Create a 1/1 colorless Spirit creature token.
|
// {2}, {tap}, Remove a ki counter from Baku Altar: Create a 1/1 colorless Spirit creature token.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SpiritToken(), 1), new GenericManaCost(2));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SpiritToken(), 1), new GenericManaCost(2));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
|
|
|
@ -38,9 +38,7 @@ import mage.abilities.keyword.HexproofAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
@ -83,11 +81,6 @@ public class BattlefieldThaumaturge extends CardImpl {
|
||||||
|
|
||||||
class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEffectImpl {
|
class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEffectImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant and sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public BattlefieldThaumaturgeSpellsCostReductionEffect() {
|
public BattlefieldThaumaturgeSpellsCostReductionEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||||
|
@ -118,7 +111,7 @@ class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEf
|
||||||
if ((abilityToModify instanceof SpellAbility)
|
if ((abilityToModify instanceof SpellAbility)
|
||||||
&& abilityToModify.getControllerId().equals(source.getControllerId())) {
|
&& abilityToModify.getControllerId().equals(source.getControllerId())) {
|
||||||
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
|
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
|
||||||
return spell != null && BattlefieldThaumaturgeSpellsCostReductionEffect.filter.match(spell, game);
|
return spell != null && StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL.match(spell, game);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,34 +29,32 @@
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.costs.Cost;
|
import mage.abilities.costs.Cost;
|
||||||
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class BlademaneBaku extends CardImpl {
|
public class BlademaneBaku extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public BlademaneBaku(UUID ownerId, CardSetInfo setInfo) {
|
public BlademaneBaku(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
||||||
this.subtype.add("Spirit");
|
this.subtype.add("Spirit");
|
||||||
|
@ -65,7 +63,7 @@ public class BlademaneBaku extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Skullmane Baku.
|
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Skullmane Baku.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
|
|
||||||
// {1}, Remove X ki counters from Blademane Baku: For each counter removed, Blademane Baku gets +2/+0 until end of turn.
|
// {1}, Remove X ki counters from Blademane Baku: For each counter removed, Blademane Baku gets +2/+0 until end of turn.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BlademaneBakuBoostEffect(), new GenericManaCost(1));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BlademaneBakuBoostEffect(), new GenericManaCost(1));
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.DependencyType;
|
import mage.constants.DependencyType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -55,7 +56,7 @@ public class BlanketOfNight extends CardImpl {
|
||||||
// Each land is a Swamp in addition to its other land types.
|
// Each land is a Swamp in addition to its other land types.
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new BlackManaAbility(), Duration.WhileOnBattlefield, new FilterLandPermanent(),
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new BlackManaAbility(), Duration.WhileOnBattlefield, new FilterLandPermanent(),
|
||||||
"Each land is a Swamp in addition to its other land types"));
|
"Each land is a Swamp in addition to its other land types"));
|
||||||
ability.addEffect(new AddCardSubtypeAllEffect(new FilterLandPermanent(), "Swamp", DependencyType.BecomeSwamp));
|
ability.addEffect(new AddCardSubtypeAllEffect(StaticFilters.FILTER_LAND, "Swamp", DependencyType.BecomeSwamp));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -47,14 +45,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class BlistercoilWeird extends CardImpl {
|
public class BlistercoilWeird extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(
|
|
||||||
new CardTypePredicate(CardType.INSTANT),
|
|
||||||
new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlistercoilWeird(UUID ownerId, CardSetInfo setInfo) {
|
public BlistercoilWeird(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}");
|
||||||
this.subtype.add("Weird");
|
this.subtype.add("Weird");
|
||||||
|
@ -65,7 +55,7 @@ public class BlistercoilWeird extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever you cast an instant or sorcery spell, Blistercoil Weird gets +1/+1 until end of turn. Untap it.
|
// Whenever you cast an instant or sorcery spell, Blistercoil Weird gets +1/+1 until end of turn. Untap it.
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), filter, false);
|
Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL, false);
|
||||||
ability.addEffect(new UntapSourceEffect());
|
ability.addEffect(new UntapSourceEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.DestroyAllEffect;
|
import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
|
@ -36,10 +35,13 @@ import mage.cards.SplitCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SpellAbilityType;
|
import mage.constants.SpellAbilityType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class BoomBust extends SplitCard {
|
public class BoomBust extends SplitCard {
|
||||||
|
|
||||||
private static final FilterLandPermanent filter1 = new FilterLandPermanent("land you control");
|
private static final FilterLandPermanent filter1 = new FilterLandPermanent("land you control");
|
||||||
|
@ -63,7 +65,7 @@ public class BoomBust extends SplitCard {
|
||||||
|
|
||||||
// Bust
|
// Bust
|
||||||
// Destroy all lands.
|
// Destroy all lands.
|
||||||
getRightHalfCard().getSpellAbility().addEffect(new DestroyAllEffect(new FilterLandPermanent()));
|
getRightHalfCard().getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_LANDS));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -63,7 +63,7 @@ public class BounteousKirin extends CardImpl {
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's converted mana cost.
|
// Whenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's converted mana cost.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new BounteousKirinEffect(), new FilterSpiritOrArcaneCard(), true, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new BounteousKirinEffect(), StaticFilters.SPIRIT_OR_ARCANE_CARD, true, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BounteousKirin(final BounteousKirin card) {
|
public BounteousKirin(final BounteousKirin card) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -46,8 +46,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class BriarknitKami extends CardImpl {
|
public class BriarknitKami extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public BriarknitKami(UUID ownerId, CardSetInfo setInfo) {
|
public BriarknitKami(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}");
|
||||||
this.subtype.add("Spirit");
|
this.subtype.add("Spirit");
|
||||||
|
@ -55,7 +53,7 @@ public class BriarknitKami extends CardImpl {
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
// Whenever you cast a Spirit or Arcane spell, put a +1/+1 counter on target creature.
|
// Whenever you cast a Spirit or Arcane spell, put a +1/+1 counter on target creature.
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), filter, false);
|
Ability ability = new SpellCastControllerTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, false);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ import mage.constants.Duration;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
@ -59,8 +59,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class BudokaPupil extends CardImpl {
|
public class BudokaPupil extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public BudokaPupil(UUID ownerId, CardSetInfo setInfo) {
|
public BudokaPupil(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}");
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
|
@ -72,7 +70,7 @@ public class BudokaPupil extends CardImpl {
|
||||||
this.flipCardName = "Ichiga, Who Topples Oaks";
|
this.flipCardName = "Ichiga, Who Topples Oaks";
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Budoka Pupil.
|
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Budoka Pupil.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
|
|
||||||
// At the beginning of the end step, if there are two or more ki counters on Budoka Pupil, you may flip it.
|
// At the beginning of the end step, if there are two or more ki counters on Budoka Pupil, you may flip it.
|
||||||
this.addAbility(new ConditionalTriggeredAbility(
|
this.addAbility(new ConditionalTriggeredAbility(
|
||||||
|
|
|
@ -34,7 +34,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
@ -48,13 +48,12 @@ import java.util.UUID;
|
||||||
public class BurningSands extends CardImpl {
|
public class BurningSands extends CardImpl {
|
||||||
|
|
||||||
private final UUID originalId;
|
private final UUID originalId;
|
||||||
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
|
||||||
|
|
||||||
public BurningSands(UUID ownerId, CardSetInfo setInfo) {
|
public BurningSands(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}{R}");
|
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}{R}");
|
||||||
|
|
||||||
// Whenever a creature dies, that creature's controller sacrifices a land.
|
// Whenever a creature dies, that creature's controller sacrifices a land.
|
||||||
Ability ability = new DiesCreatureTriggeredAbility(new SacrificeEffect(filter, 1, "that creature's controller"), false, false, true);
|
Ability ability = new DiesCreatureTriggeredAbility(new SacrificeEffect(StaticFilters.FILTER_LAND, 1, "that creature's controller"), false, false, true);
|
||||||
originalId = ability.getOriginalId();
|
originalId = ability.getOriginalId();
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
@ -58,8 +58,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class CallowJushi extends CardImpl {
|
public class CallowJushi extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public CallowJushi(UUID ownerId, CardSetInfo setInfo) {
|
public CallowJushi(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
|
@ -71,7 +69,7 @@ public class CallowJushi extends CardImpl {
|
||||||
this.flipCardName = "Jaraku the Interloper";
|
this.flipCardName = "Jaraku the Interloper";
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Callow Jushi.
|
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Callow Jushi.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
|
|
||||||
// At the beginning of the end step, if there are two or more ki counters on Callow Jushi, you may flip it.
|
// At the beginning of the end step, if there are two or more ki counters on Callow Jushi, you may flip it.
|
||||||
this.addAbility(new ConditionalTriggeredAbility(
|
this.addAbility(new ConditionalTriggeredAbility(
|
||||||
|
|
|
@ -29,19 +29,15 @@ package mage.cards.c;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.constants.ComparisonType;
|
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DestroyAllEffect;
|
import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.*;
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
|
@ -66,7 +62,7 @@ public class CelestialKirin extends CardImpl {
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
// Whenever you cast a Spirit or Arcane spell, destroy all permanents with that spell's converted mana cost.
|
// Whenever you cast a Spirit or Arcane spell, destroy all permanents with that spell's converted mana cost.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CelestialKirinEffect(), new FilterSpiritOrArcaneCard(), false, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CelestialKirinEffect(), StaticFilters.SPIRIT_OR_ARCANE_CARD, false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CelestialKirin(final CelestialKirin card) {
|
public CelestialKirin(final CelestialKirin card) {
|
||||||
|
|
|
@ -34,8 +34,7 @@ import mage.cards.*;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -69,7 +68,6 @@ public class CerebralEruption extends CardImpl {
|
||||||
|
|
||||||
class CerebralEruptionEffect extends OneShotEffect {
|
class CerebralEruptionEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static FilterPermanent filter = new FilterCreaturePermanent();
|
|
||||||
|
|
||||||
CerebralEruptionEffect() {
|
CerebralEruptionEffect() {
|
||||||
super(Outcome.Damage);
|
super(Outcome.Damage);
|
||||||
|
@ -91,7 +89,7 @@ class CerebralEruptionEffect extends OneShotEffect {
|
||||||
game.getState().setValue(source.getSourceId().toString(), card);
|
game.getState().setValue(source.getSourceId().toString(), card);
|
||||||
int damage = card.getConvertedManaCost();
|
int damage = card.getConvertedManaCost();
|
||||||
player.damage(damage, source.getSourceId(), game, false, true);
|
player.damage(damage, source.getSourceId(), game, false, true);
|
||||||
for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
|
for (Permanent perm : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, player.getId(), game)) {
|
||||||
perm.damage(damage, source.getSourceId(), game, false, true);
|
perm.damage(damage, source.getSourceId(), game, false, true);
|
||||||
}
|
}
|
||||||
if (card.isLand()) {
|
if (card.isLand()) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -69,7 +69,7 @@ public class ChancellorOfTheAnnex extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// Whenever an opponent casts a spell, counter it unless that player pays {1}.
|
// Whenever an opponent casts a spell, counter it unless that player pays {1}.
|
||||||
this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(1)), new FilterSpell(), false, SetTargetPointer.SPELL));
|
this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(1)), StaticFilters.FILTER_SPELL, false, SetTargetPointer.SPELL));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChancellorOfTheAnnex(final ChancellorOfTheAnnex card) {
|
public ChancellorOfTheAnnex(final ChancellorOfTheAnnex card) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.ElementalToken;
|
import mage.game.permanent.token.ElementalToken;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -69,7 +69,7 @@ public class ChandraFlamecaller extends CardImpl {
|
||||||
this.addAbility(new LoyaltyAbility(new ChandraDrawEffect(), 0));
|
this.addAbility(new LoyaltyAbility(new ChandraDrawEffect(), 0));
|
||||||
|
|
||||||
// -X: Chandra, Flamecaller deals X damage to each creature.
|
// -X: Chandra, Flamecaller deals X damage to each creature.
|
||||||
this.addAbility(new LoyaltyAbility(new DamageAllEffect(ChandraXValue.getDefault(), new FilterCreaturePermanent("creature"))));
|
this.addAbility(new LoyaltyAbility(new DamageAllEffect(ChandraXValue.getDefault(), StaticFilters.FILTER_PERMANENT_CREATURE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChandraFlamecaller(final ChandraFlamecaller card) {
|
public ChandraFlamecaller(final ChandraFlamecaller card) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class ChromaticLantern extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||||
|
|
||||||
// Lands you control have "{T}: Add one mana of any color to your mana pool."
|
// Lands you control have "{T}: Add one mana of any color to your mana pool."
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new AnyColorManaAbility(), Duration.WhileOnBattlefield, new FilterLandPermanent("Lands"), false)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new AnyColorManaAbility(), Duration.WhileOnBattlefield, StaticFilters.FILTER_LANDS, false)));
|
||||||
|
|
||||||
// {T}: Add one mana of any color to your mana pool.
|
// {T}: Add one mana of any color to your mana pool.
|
||||||
this.addAbility(new AnyColorManaAbility());
|
this.addAbility(new AnyColorManaAbility());
|
||||||
|
|
|
@ -39,7 +39,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -49,13 +49,12 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class ChronomanticEscape extends CardImpl {
|
public class ChronomanticEscape extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures");
|
|
||||||
|
|
||||||
public ChronomanticEscape(UUID ownerId, CardSetInfo setInfo) {
|
public ChronomanticEscape(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{W}");
|
||||||
|
|
||||||
// Until your next turn, creatures can't attack you. Exile Chronomantic Escape with three time counters on it.
|
// Until your next turn, creatures can't attack you. Exile Chronomantic Escape with three time counters on it.
|
||||||
getSpellAbility().addEffect(new CantAttackYouAllEffect(Duration.UntilYourNextTurn, filter));
|
getSpellAbility().addEffect(new CantAttackYouAllEffect(Duration.UntilYourNextTurn, StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||||
getSpellAbility().addEffect(ExileSpellEffect.getInstance());
|
getSpellAbility().addEffect(ExileSpellEffect.getInstance());
|
||||||
Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), true, true);
|
Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), true, true);
|
||||||
effect.setText("with 3 time counters on it");
|
effect.setText("with 3 time counters on it");
|
||||||
|
|
|
@ -38,7 +38,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -65,7 +65,7 @@ public class CloudhoofKirin extends CardImpl {
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may have target player put the top X cards of his or her library into his or her graveyard, where X is that spell's converted mana cost.
|
// Whenever you cast a Spirit or Arcane spell, you may have target player put the top X cards of his or her library into his or her graveyard, where X is that spell's converted mana cost.
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CloudhoofKirinEffect(), new FilterSpiritOrArcaneCard(), true, true);
|
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new CloudhoofKirinEffect(), StaticFilters.SPIRIT_OR_ARCANE_CARD, true, true);
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.keyword.ChangelingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
@ -67,9 +67,7 @@ public class CoatOfArms extends CardImpl {
|
||||||
|
|
||||||
class CoatOfArmsEffect extends ContinuousEffectImpl {
|
class CoatOfArmsEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
public CoatOfArmsEffect() {
|
||||||
|
|
||||||
public CoatOfArmsEffect() {
|
|
||||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||||
this.staticText = "Each creature gets +1/+1 for each other creature on the battlefield that shares at least one creature type with it";
|
this.staticText = "Each creature gets +1/+1 for each other creature on the battlefield that shares at least one creature type with it";
|
||||||
}
|
}
|
||||||
|
@ -85,7 +83,7 @@ class CoatOfArmsEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game);
|
List<Permanent> permanents = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game);
|
||||||
for (Permanent permanent : permanents) {
|
for (Permanent permanent : permanents) {
|
||||||
int amount = getAmount(permanents, permanent, game);
|
int amount = getAmount(permanents, permanent, game);
|
||||||
permanent.addPower(amount);
|
permanent.addPower(amount);
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import mage.constants.ComparisonType;
|
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.InvertCondition;
|
import mage.abilities.condition.InvertCondition;
|
||||||
|
@ -39,7 +38,8 @@ import mage.abilities.mana.WhiteManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public class ConcealedCourtyard extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||||
|
|
||||||
// Concealed Courtyard enters the battlefield tapped unless you control two or fewer other lands.
|
// Concealed Courtyard enters the battlefield tapped unless you control two or fewer other lands.
|
||||||
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.FEWER_THAN, 3));
|
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
|
||||||
String abilityText = "tapped unless you control fewer than 3 lands";
|
String abilityText = "tapped unless you control fewer than 3 lands";
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public class ConcordantCrossroads extends CardImpl {
|
||||||
|
|
||||||
// All creatures have haste.
|
// All creatures have haste.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||||
new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"))));
|
new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConcordantCrossroads(final ConcordantCrossroads card) {
|
public ConcordantCrossroads(final ConcordantCrossroads card) {
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import mage.constants.ComparisonType;
|
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.InvertCondition;
|
import mage.abilities.condition.InvertCondition;
|
||||||
|
@ -39,7 +38,8 @@ import mage.abilities.mana.RedManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -48,14 +48,11 @@ import java.util.UUID;
|
||||||
* @author maurer.it_at_gmail.com
|
* @author maurer.it_at_gmail.com
|
||||||
*/
|
*/
|
||||||
public class CopperlineGorge extends CardImpl {
|
public class CopperlineGorge extends CardImpl {
|
||||||
|
|
||||||
private static FilterLandPermanent filter = new FilterLandPermanent();
|
|
||||||
|
|
||||||
public CopperlineGorge(UUID ownerId, CardSetInfo setInfo) {
|
public CopperlineGorge(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
|
super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
|
||||||
|
|
||||||
// Copperline Gorge enters the battlefield tapped unless you control two or fewer other lands.
|
// Copperline Gorge enters the battlefield tapped unless you control two or fewer other lands.
|
||||||
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3));
|
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
|
||||||
String abilityText = "tapped unless you control two or fewer other lands";
|
String abilityText = "tapped unless you control two or fewer other lands";
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||||
this.addAbility(new RedManaAbility());
|
this.addAbility(new RedManaAbility());
|
||||||
|
|
|
@ -38,12 +38,11 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.util.CardUtil;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -58,7 +57,7 @@ public class Counterbalance extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// Whenever an opponent casts a spell, you may reveal the top card of your library. If you do, counter that spell if it has the same converted mana cost as the revealed card.
|
// Whenever an opponent casts a spell, you may reveal the top card of your library. If you do, counter that spell if it has the same converted mana cost as the revealed card.
|
||||||
this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new CounterbalanceEffect(), new FilterSpell(), true, SetTargetPointer.SPELL));
|
this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new CounterbalanceEffect(), StaticFilters.FILTER_SPELL, true, SetTargetPointer.SPELL));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Counterbalance(final Counterbalance card) {
|
public Counterbalance(final Counterbalance card) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.StackObject;
|
import mage.game.stack.StackObject;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -53,7 +53,7 @@ public class Countermand extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// Counter target spell. Its controller puts the top four cards of his or her library into his or her graveyard.
|
// Counter target spell. Its controller puts the top four cards of his or her library into his or her graveyard.
|
||||||
this.getSpellAbility().addTarget(new TargetSpell(new FilterSpell()));
|
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL));
|
||||||
this.getSpellAbility().addEffect(new CountermandEffect());
|
this.getSpellAbility().addEffect(new CountermandEffect());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -105,9 +105,9 @@ class CrovaxTheCursedEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Permanent sourceObject = (Permanent) source.getSourceObjectIfItStillExists(game);
|
Permanent sourceObject = (Permanent) source.getSourceObjectIfItStillExists(game);
|
||||||
int creatures = game.getBattlefield().countAll(new FilterCreaturePermanent(), source.getControllerId(), game);
|
int creatures = game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURES, source.getControllerId(), game);
|
||||||
if (creatures > 0 && controller.chooseUse(outcome, "Sacrifice a creature?", source, game)) {
|
if (creatures > 0 && controller.chooseUse(outcome, "Sacrifice a creature?", source, game)) {
|
||||||
if (new SacrificeControllerEffect(new FilterCreaturePermanent(), 1, "").apply(game, source)) {
|
if (new SacrificeControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURES, 1, "").apply(game, source)) {
|
||||||
if (sourceObject != null) {
|
if (sourceObject != null) {
|
||||||
sourceObject.getCounters(game).addCounter(CounterType.P1P1.createInstance());
|
sourceObject.getCounters(game).addCounter(CounterType.P1P1.createInstance());
|
||||||
game.informPlayers(controller.getLogName() + " puts a +1/+1 counter on " + sourceObject.getName());
|
game.informPlayers(controller.getLogName() + " puts a +1/+1 counter on " + sourceObject.getName());
|
||||||
|
|
|
@ -35,7 +35,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ public class CryptolithRite extends CardImpl {
|
||||||
public CryptolithRite(UUID ownerId, CardSetInfo setInfo) {
|
public CryptolithRite(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
|
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}");
|
||||||
|
|
||||||
// Creature you control have "{T}: Add one mana of any color to your mana pool."
|
// Creatures you control have "{T}: Add one mana of any color to your mana pool."
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(
|
||||||
new AnyColorManaAbility(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("creature"), false)));
|
new AnyColorManaAbility(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES, false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CryptolithRite(final CryptolithRite card) {
|
public CryptolithRite(final CryptolithRite card) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ import mage.constants.Duration;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
@ -58,8 +58,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class CunningBandit extends CardImpl {
|
public class CunningBandit extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public CunningBandit(UUID ownerId, CardSetInfo setInfo) {
|
public CunningBandit(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
|
@ -71,7 +69,7 @@ public class CunningBandit extends CardImpl {
|
||||||
this.flipCardName = "Azamuki, Treachery Incarnate";
|
this.flipCardName = "Azamuki, Treachery Incarnate";
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Cunning Bandit.
|
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Cunning Bandit.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
|
|
||||||
// At the beginning of the end step, if there are two or more ki counters on Cunning Bandit, you may flip it.
|
// At the beginning of the end step, if there are two or more ki counters on Cunning Bandit, you may flip it.
|
||||||
this.addAbility(new ConditionalTriggeredAbility(
|
this.addAbility(new ConditionalTriggeredAbility(
|
||||||
|
|
|
@ -36,9 +36,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -49,14 +47,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class Cursecatcher extends CardImpl {
|
public class Cursecatcher extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(
|
|
||||||
new CardTypePredicate(CardType.INSTANT),
|
|
||||||
new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Cursecatcher(UUID ownerId, CardSetInfo setInfo) {
|
public Cursecatcher(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}");
|
||||||
this.subtype.add("Merfolk");
|
this.subtype.add("Merfolk");
|
||||||
|
@ -69,7 +59,7 @@ public class Cursecatcher extends CardImpl {
|
||||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||||
new CounterUnlessPaysEffect(new GenericManaCost(1)),
|
new CounterUnlessPaysEffect(new GenericManaCost(1)),
|
||||||
new SacrificeSourceCost());
|
new SacrificeSourceCost());
|
||||||
ability.addTarget(new TargetSpell(filter));
|
ability.addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class CyclopsOfEternalFury extends CardImpl {
|
public class CyclopsOfEternalFury extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures");
|
|
||||||
|
|
||||||
public CyclopsOfEternalFury(UUID ownerId, CardSetInfo setInfo) {
|
public CyclopsOfEternalFury(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{R}{R}");
|
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{4}{R}{R}");
|
||||||
|
@ -56,7 +55,7 @@ public class CyclopsOfEternalFury extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Creatures you control have haste.
|
// Creatures you control have haste.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CyclopsOfEternalFury(final CyclopsOfEternalFury card) {
|
public CyclopsOfEternalFury(final CyclopsOfEternalFury card) {
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
@ -39,11 +38,13 @@ import mage.abilities.keyword.HasteAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.util.functions.ApplyToPermanent;
|
import mage.util.functions.ApplyToPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
@ -58,7 +59,7 @@ public class DacksDuplicate extends CardImpl {
|
||||||
this.toughness = new MageInt(0);
|
this.toughness = new MageInt(0);
|
||||||
|
|
||||||
// You may have Dack's Duplicate enter the battlefield as a copy of any creature on the battlefield except it gains haste and dethrone.
|
// You may have Dack's Duplicate enter the battlefield as a copy of any creature on the battlefield except it gains haste and dethrone.
|
||||||
Effect effect = new CopyPermanentEffect(new FilterCreaturePermanent(), new DacksDuplicateApplyToPermanent());
|
Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new DacksDuplicateApplyToPermanent());
|
||||||
effect.setText("as a copy of any creature on the battlefield except it gains haste and dethrone");
|
effect.setText("as a copy of any creature on the battlefield except it gains haste and dethrone");
|
||||||
this.addAbility(new EntersBattlefieldAbility(effect, true));
|
this.addAbility(new EntersBattlefieldAbility(effect, true));
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ public class DanceOfShadows extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// Creatures you control get +1/+0 and gain fear until end of turn. (They can't be blocked except by artifact creatures and/or black creatures.)
|
// Creatures you control get +1/+0 and gain fear until end of turn. (They can't be blocked except by artifact creatures and/or black creatures.)
|
||||||
Effect effect = new BoostControlledEffect(1, 0, Duration.EndOfTurn, new FilterCreaturePermanent());
|
Effect effect = new BoostControlledEffect(1, 0, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
|
||||||
effect.setText("Creatures you control get +1/+0");
|
effect.setText("Creatures you control get +1/+0");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
effect = new GainAbilityControlledEffect(FearAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent());
|
effect = new GainAbilityControlledEffect(FearAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
|
||||||
effect.setText("and gain fear until end of turn");
|
effect.setText("and gain fear until end of turn");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public class DawnfeatherEagle extends CardImpl {
|
||||||
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn);
|
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn);
|
||||||
effect.setText("creatures you control get +1/+1");
|
effect.setText("creatures you control get +1/+1");
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
|
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
|
||||||
effect = new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent());
|
effect = new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES);
|
||||||
effect.setText("and gain vigilance until end of turn");
|
effect.setText("and gain vigilance until end of turn");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -43,29 +43,28 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class DeadlyWanderings extends CardImpl {
|
public class DeadlyWanderings extends CardImpl {
|
||||||
|
|
||||||
public DeadlyWanderings(UUID ownerId, CardSetInfo setInfo) {
|
public DeadlyWanderings(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}");
|
||||||
|
|
||||||
// As long as you control exactly one creature, that creature gets +2/+0 and has deathtouch and lifelink.
|
// As long as you control exactly one creature, that creature gets +2/+0 and has deathtouch and lifelink.
|
||||||
ContinuousEffect boostEffect = new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield);
|
ContinuousEffect boostEffect = new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield);
|
||||||
Effect effect = new ConditionalContinuousEffect(boostEffect, new CreatureCountCondition(1, TargetController.YOU),
|
Effect effect = new ConditionalContinuousEffect(boostEffect, new CreatureCountCondition(1, TargetController.YOU),
|
||||||
"As long as you control exactly one creature, that creature gets +2/+0");
|
"As long as you control exactly one creature, that creature gets +2/+0");
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||||
ContinuousEffect deathtouchEffect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent());
|
ContinuousEffect deathtouchEffect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||||
effect = new ConditionalContinuousEffect(deathtouchEffect, new CreatureCountCondition(1, TargetController.YOU),
|
effect = new ConditionalContinuousEffect(deathtouchEffect, new CreatureCountCondition(1, TargetController.YOU),
|
||||||
"and has deathtouch");
|
"and has deathtouch");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
ContinuousEffect lifelinkEffect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent());
|
ContinuousEffect lifelinkEffect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||||
effect = new ConditionalContinuousEffect(lifelinkEffect, new CreatureCountCondition(1, TargetController.YOU),
|
effect = new ConditionalContinuousEffect(lifelinkEffect, new CreatureCountCondition(1, TargetController.YOU),
|
||||||
"and lifelink");
|
"and lifelink");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
|
|
|
@ -35,6 +35,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
@ -69,7 +70,6 @@ public class DeathFrenzy extends CardImpl {
|
||||||
|
|
||||||
class DeathFrenzyDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
class DeathFrenzyDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
|
|
||||||
protected FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
|
||||||
|
|
||||||
public DeathFrenzyDelayedTriggeredAbility() {
|
public DeathFrenzyDelayedTriggeredAbility() {
|
||||||
super(new GainLifeEffect(1), Duration.EndOfTurn, false);
|
super(new GainLifeEffect(1), Duration.EndOfTurn, false);
|
||||||
|
@ -87,7 +87,7 @@ class DeathFrenzyDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
if (zEvent.isDiesEvent() && zEvent.getTarget() != null && filter.match(zEvent.getTarget(), sourceId, controllerId, game)) {
|
if (zEvent.isDiesEvent() && zEvent.getTarget() != null && StaticFilters.FILTER_PERMANENT_CREATURES.match(zEvent.getTarget(), sourceId, controllerId, game)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.PermanentToken;
|
import mage.game.permanent.PermanentToken;
|
||||||
|
@ -103,7 +103,7 @@ class DeclarationInStoneEffect extends OneShotEffect {
|
||||||
&& !(targetPermanent instanceof PermanentToken)) {
|
&& !(targetPermanent instanceof PermanentToken)) {
|
||||||
nonTokenCount++;
|
nonTokenCount++;
|
||||||
}
|
}
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), targetPermanent.getControllerId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, targetPermanent.getControllerId(), game)) {
|
||||||
if (!permanent.getId().equals(targetPermanent.getId())
|
if (!permanent.getId().equals(targetPermanent.getId())
|
||||||
&& permanent.getName().equals(targetPermanent.getName())) {
|
&& permanent.getName().equals(targetPermanent.getName())) {
|
||||||
cardsToExile.add(permanent);
|
cardsToExile.add(permanent);
|
||||||
|
|
|
@ -28,25 +28,25 @@
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.CycleTriggeredAbility;
|
import mage.abilities.common.CycleTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DestroyAllEffect;
|
import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
import mage.abilities.keyword.CyclingAbility;
|
import mage.abilities.keyword.CyclingAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -64,7 +64,7 @@ public class DecreeOfAnnihilation extends CardImpl {
|
||||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{5}{R}{R}")));
|
this.addAbility(new CyclingAbility(new ManaCostsImpl("{5}{R}{R}")));
|
||||||
|
|
||||||
// When you cycle Decree of Annihilation, destroy all lands.
|
// When you cycle Decree of Annihilation, destroy all lands.
|
||||||
Ability ability = new CycleTriggeredAbility(new DestroyAllEffect(new FilterLandPermanent("lands")), false);
|
Ability ability = new CycleTriggeredAbility(new DestroyAllEffect(StaticFilters.FILTER_LANDS), false);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -61,7 +61,7 @@ public class DecreeOfSilence extends CardImpl {
|
||||||
// Whenever an opponent casts a spell, counter that spell and put a depletion counter on Decree of Silence. If there are three or more depletion counters on Decree of Silence, sacrifice it.
|
// Whenever an opponent casts a spell, counter that spell and put a depletion counter on Decree of Silence. If there are three or more depletion counters on Decree of Silence, sacrifice it.
|
||||||
Effect effect = new CounterTargetEffect();
|
Effect effect = new CounterTargetEffect();
|
||||||
effect.setText("counter that spell");
|
effect.setText("counter that spell");
|
||||||
Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, effect, new FilterSpell(),
|
Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL,
|
||||||
false, SetTargetPointer.SPELL);
|
false, SetTargetPointer.SPELL);
|
||||||
effect = new AddCountersSourceEffect(CounterType.DEPLETION.createInstance());
|
effect = new AddCountersSourceEffect(CounterType.DEPLETION.createInstance());
|
||||||
effect.setText("and put a depletion counter on {this}.");
|
effect.setText("and put a depletion counter on {this}.");
|
||||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -53,12 +53,12 @@ public class Demoralize extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// All creatures gain menace until end of turn. (They can't be blocked except by two or more creatures.)
|
// All creatures gain menace until end of turn. (They can't be blocked except by two or more creatures.)
|
||||||
this.getSpellAbility().addEffect(new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterCreaturePermanent()));
|
this.getSpellAbility().addEffect(new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||||
|
|
||||||
// Threshold — If seven or more cards are in your graveyard, creatures can't block this turn.
|
// Threshold — If seven or more cards are in your graveyard, creatures can't block this turn.
|
||||||
this.getSpellAbility().addEffect(
|
this.getSpellAbility().addEffect(
|
||||||
new ConditionalOneShotEffect(
|
new ConditionalOneShotEffect(
|
||||||
new AddContinuousEffectToGame(new CantBlockAllEffect(new FilterCreaturePermanent(), Duration.EndOfTurn)),
|
new AddContinuousEffectToGame(new CantBlockAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES, Duration.EndOfTurn)),
|
||||||
new CardsInControllerGraveCondition(7),
|
new CardsInControllerGraveCondition(7),
|
||||||
"<br/><br/><i>Threshold</i> - If seven or more cards are in your graveyard, creatures can't block this turn"
|
"<br/><br/><i>Threshold</i> - If seven or more cards are in your graveyard, creatures can't block this turn"
|
||||||
));
|
));
|
||||||
|
|
|
@ -35,7 +35,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class DenseFoliage extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// Creatures can't be the targets of spells.
|
// Creatures can't be the targets of spells.
|
||||||
CantBeTargetedAllEffect cantTargetEffect = new CantBeTargetedAllEffect(new FilterCreaturePermanent("Creatures"), new FilterSpell("spells"), Duration.WhileOnBattlefield);
|
CantBeTargetedAllEffect cantTargetEffect = new CantBeTargetedAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES, new FilterSpell("spells"), Duration.WhileOnBattlefield);
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, cantTargetEffect));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, cantTargetEffect));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.ExileAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.permanent.token.AngelToken;
|
import mage.game.permanent.token.AngelToken;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -50,7 +50,7 @@ public class DescendUponTheSinful extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}{W}");
|
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}{W}");
|
||||||
|
|
||||||
// Exile all creatures
|
// Exile all creatures
|
||||||
this.getSpellAbility().addEffect(new ExileAllEffect(new FilterCreaturePermanent()));
|
this.getSpellAbility().addEffect(new ExileAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||||
|
|
||||||
// <i>Delirium</i> — Create a 4/4 white Angel creature token with flying if there are four or more card types among cards in your graveyard.
|
// <i>Delirium</i> — Create a 4/4 white Angel creature token with flying if there are four or more card types among cards in your graveyard.
|
||||||
Effect effect = new ConditionalOneShotEffect(new CreateTokenEffect(new AngelToken()), DeliriumCondition.instance);
|
Effect effect = new ConditionalOneShotEffect(new CreateTokenEffect(new AngelToken()), DeliriumCondition.instance);
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
@ -48,7 +49,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class DesolationAngel extends CardImpl {
|
public class DesolationAngel extends CardImpl {
|
||||||
|
|
||||||
private static final FilterLandPermanent filter = new FilterLandPermanent("lands");
|
|
||||||
private static final FilterLandPermanent filter2 = new FilterLandPermanent("lands you control");
|
private static final FilterLandPermanent filter2 = new FilterLandPermanent("lands you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -69,7 +69,7 @@ public class DesolationAngel extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When Desolation Angel enters the battlefield, destroy all lands you control. If it was kicked, destroy all lands instead.
|
// When Desolation Angel enters the battlefield, destroy all lands you control. If it was kicked, destroy all lands instead.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyAllEffect(filter),
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyAllEffect(StaticFilters.FILTER_LANDS),
|
||||||
new DestroyAllEffect(filter2), KickedCondition.instance, "destroy all lands you control. If it was kicked, destroy all lands instead.")));
|
new DestroyAllEffect(filter2), KickedCondition.instance, "destroy all lands you control. If it was kicked, destroy all lands instead.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -47,19 +45,11 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class Disrupt extends CardImpl {
|
public class Disrupt extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(
|
|
||||||
new CardTypePredicate(CardType.INSTANT),
|
|
||||||
new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Disrupt(UUID ownerId, CardSetInfo setInfo) {
|
public Disrupt(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
|
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
|
||||||
|
|
||||||
// Counter target instant or sorcery spell unless its controller pays {1}.
|
// Counter target instant or sorcery spell unless its controller pays {1}.
|
||||||
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(1)));
|
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(1)));
|
||||||
// Draw a card.
|
// Draw a card.
|
||||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||||
|
|
|
@ -37,8 +37,8 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.TimingRule;
|
import mage.constants.TimingRule;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -105,7 +105,7 @@ class DivineReckoningEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
if (!chosen.contains(permanent)) {
|
if (!chosen.contains(permanent)) {
|
||||||
permanent.destroy(source.getSourceId(), game, false);
|
permanent.destroy(source.getSourceId(), game, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -89,7 +90,7 @@ class DoOrDieEffect extends OneShotEffect {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||||
if (player != null && targetPlayer != null) {
|
if (player != null && targetPlayer != null) {
|
||||||
int count = game.getBattlefield().countAll(new FilterCreaturePermanent(), targetPlayer.getId(), game);
|
int count = game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURES, targetPlayer.getId(), game);
|
||||||
TargetCreaturePermanent creatures = new TargetCreaturePermanent(0, count, new FilterCreaturePermanent("creatures to put in the first pile"), true);
|
TargetCreaturePermanent creatures = new TargetCreaturePermanent(0, count, new FilterCreaturePermanent("creatures to put in the first pile"), true);
|
||||||
List<Permanent> pile1 = new ArrayList<>();
|
List<Permanent> pile1 = new ArrayList<>();
|
||||||
creatures.setRequired(false);
|
creatures.setRequired(false);
|
||||||
|
|
|
@ -39,7 +39,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -124,7 +124,6 @@ class AddCounterAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
class BoostCreatureEffectEffect extends ContinuousEffectImpl {
|
class BoostCreatureEffectEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
|
||||||
|
|
||||||
public BoostCreatureEffectEffect() {
|
public BoostCreatureEffectEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||||
|
@ -146,7 +145,7 @@ class BoostCreatureEffectEffect extends ContinuousEffectImpl {
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
String subtype = (String) game.getState().getValue(permanent.getId() + "_type");
|
String subtype = (String) game.getState().getValue(permanent.getId() + "_type");
|
||||||
if (subtype != null) {
|
if (subtype != null) {
|
||||||
for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
for (Permanent perm : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, source.getControllerId(), game)) {
|
||||||
if (perm.hasSubtype(subtype, game)) {
|
if (perm.hasSubtype(subtype, game)) {
|
||||||
int boost = permanent.getCounters(game).getCount(CounterType.CHARGE);
|
int boost = permanent.getCounters(game).getCount(CounterType.CHARGE);
|
||||||
perm.addPower(boost);
|
perm.addPower(boost);
|
||||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -79,7 +79,6 @@ public class DoranTheSiegeTower extends CardImpl {
|
||||||
|
|
||||||
class DoranTheSiegeTowerCombatDamageRuleEffect extends ContinuousEffectImpl {
|
class DoranTheSiegeTowerCombatDamageRuleEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
|
||||||
|
|
||||||
public DoranTheSiegeTowerCombatDamageRuleEffect() {
|
public DoranTheSiegeTowerCombatDamageRuleEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
||||||
|
@ -99,7 +98,7 @@ class DoranTheSiegeTowerCombatDamageRuleEffect extends ContinuousEffectImpl {
|
||||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||||
// Change the rule
|
// Change the rule
|
||||||
game.getCombat().setUseToughnessForDamage(true);
|
game.getCombat().setUseToughnessForDamage(true);
|
||||||
game.getCombat().addUseToughnessForDamageFilter(filter);
|
game.getCombat().addUseToughnessForDamageFilter(StaticFilters.FILTER_PERMANENT_CREATURES);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ import mage.abilities.effects.common.CounterTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -53,7 +53,7 @@ public class DoubleNegative extends CardImpl {
|
||||||
Effect effect = new CounterTargetEffect();
|
Effect effect = new CounterTargetEffect();
|
||||||
effect.setText("Counter up to two target spells");
|
effect.setText("Counter up to two target spells");
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
this.getSpellAbility().addTarget(new TargetSpell(0, 2, new FilterSpell()));
|
this.getSpellAbility().addTarget(new TargetSpell(0, 2, StaticFilters.FILTER_SPELL));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DoubleNegative(final DoubleNegative card) {
|
public DoubleNegative(final DoubleNegative card) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@ public class DragonThroneOfTarkir extends CardImpl {
|
||||||
|
|
||||||
// Equipped creature has defender and "{2}, {T}: Other creatures you control gain trample and get +X/+X until end of turn, where X is this creature's power."
|
// Equipped creature has defender and "{2}, {T}: Other creatures you control gain trample and get +X/+X until end of turn, where X is this creature's power."
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DefenderAbility.getInstance(), AttachmentType.EQUIPMENT));
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DefenderAbility.getInstance(), AttachmentType.EQUIPMENT));
|
||||||
Effect effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent(), true);
|
Effect effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES, true);
|
||||||
effect.setText("Other creatures you control gain trample");
|
effect.setText("Other creatures you control gain trample");
|
||||||
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
|
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
|
||||||
DynamicValue xValue = new SourcePermanentPowerCount();
|
DynamicValue xValue = new SourcePermanentPowerCount();
|
||||||
effect = new BoostControlledEffect(xValue, xValue, Duration.EndOfTurn, new FilterCreaturePermanent(), true, true);
|
effect = new BoostControlledEffect(xValue, xValue, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true, true);
|
||||||
effect.setText("and get +X/+X until end of turn, where X is this creature's power");
|
effect.setText("and get +X/+X until end of turn, where X is this creature's power");
|
||||||
gainedAbility.addEffect(effect);
|
gainedAbility.addEffect(effect);
|
||||||
gainedAbility.addCost(new TapSourceCost());
|
gainedAbility.addCost(new TapSourceCost());
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
|
@ -36,7 +35,9 @@ import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -52,7 +53,7 @@ public class Dreamcatcher extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may sacrifice Dreamcatcher. If you do, draw a card.
|
// Whenever you cast a Spirit or Arcane spell, you may sacrifice Dreamcatcher. If you do, draw a card.
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), new FilterSpiritOrArcaneCard(), true,
|
Ability ability = new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), StaticFilters.SPIRIT_OR_ARCANE_CARD, true,
|
||||||
"Whenever you cast a Spirit or Arcane spell, you may sacrifice {this}. If you do, draw a card.");
|
"Whenever you cast a Spirit or Arcane spell, you may sacrifice {this}. If you do, draw a card.");
|
||||||
ability.addEffect(new DrawCardSourceControllerEffect(1));
|
ability.addEffect(new DrawCardSourceControllerEffect(1));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -39,6 +39,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -56,8 +57,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class DropOfHoney extends CardImpl {
|
public class DropOfHoney extends CardImpl {
|
||||||
|
|
||||||
static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
|
||||||
|
|
||||||
public DropOfHoney(UUID ownerId, CardSetInfo setInfo) {
|
public DropOfHoney(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
|
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
|
||||||
|
|
||||||
|
@ -101,7 +100,7 @@ class DropOfHoneyEffect extends OneShotEffect {
|
||||||
int leastPower = Integer.MAX_VALUE;
|
int leastPower = Integer.MAX_VALUE;
|
||||||
boolean multipleExist = false;
|
boolean multipleExist = false;
|
||||||
Permanent permanentToDestroy = null;
|
Permanent permanentToDestroy = null;
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(DropOfHoney.filter, source.getControllerId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, source.getControllerId(), game)) {
|
||||||
if (permanent.getPower().getValue() < leastPower) {
|
if (permanent.getPower().getValue() < leastPower) {
|
||||||
permanentToDestroy = permanent;
|
permanentToDestroy = permanent;
|
||||||
leastPower = permanent.getPower().getValue();
|
leastPower = permanent.getPower().getValue();
|
||||||
|
@ -151,7 +150,7 @@ class DropOfHoneyStateTriggeredAbility extends StateTriggeredAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
return game.getBattlefield().count(DropOfHoney.filter, this.getSourceId(), this.getControllerId(), game) == 0;
|
return game.getBattlefield().count(StaticFilters.FILTER_PERMANENT_CREATURES, this.getSourceId(), this.getControllerId(), game) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -35,9 +35,7 @@ import mage.abilities.keyword.FlashAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -48,14 +46,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class DualcasterMage extends CardImpl {
|
public class DualcasterMage extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(
|
|
||||||
new CardTypePredicate(CardType.INSTANT),
|
|
||||||
new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public DualcasterMage(UUID ownerId, CardSetInfo setInfo) {
|
public DualcasterMage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}");
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
|
@ -69,7 +59,7 @@ public class DualcasterMage extends CardImpl {
|
||||||
|
|
||||||
// When Dualcaster Mage enters the battlefield, copy target instant or sorcery spell. You may choose new targets for the copy.
|
// When Dualcaster Mage enters the battlefield, copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new CopyTargetSpellEffect(), false);
|
Ability ability = new EntersBattlefieldTriggeredAbility(new CopyTargetSpellEffect(), false);
|
||||||
ability.addTarget(new TargetSpell(filter));
|
ability.addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -94,7 +95,7 @@ class DuneblastEffect extends OneShotEffect {
|
||||||
if (controller.choose(outcome, target, source.getSourceId(), game)) {
|
if (controller.choose(outcome, target, source.getSourceId(), game)) {
|
||||||
creatureToKeep = game.getPermanent(target.getFirstTarget());
|
creatureToKeep = game.getPermanent(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
for(Permanent creature: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
for(Permanent creature: game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
if (!Objects.equals(creature, creatureToKeep)) {
|
if (!Objects.equals(creature, creatureToKeep)) {
|
||||||
creature.destroy(source.getSourceId(), game, false);
|
creature.destroy(source.getSourceId(), game, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
@ -78,7 +79,7 @@ class DwarvenCatapultEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
int howMany = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), source.getFirstTarget(), game).size();
|
int howMany = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, source.getFirstTarget(), game).size();
|
||||||
int amount = source.getManaCostsToPay().getX()/howMany;
|
int amount = source.getManaCostsToPay().getX()/howMany;
|
||||||
|
|
||||||
DamageAllControlledTargetEffect dmgEffect = new DamageAllControlledTargetEffect(amount, new FilterCreaturePermanent());
|
DamageAllControlledTargetEffect dmgEffect = new DamageAllControlledTargetEffect(amount, new FilterCreaturePermanent());
|
||||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
|
|
||||||
|
@ -47,12 +47,10 @@ import java.util.UUID;
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public class Earthshaker extends CardImpl {
|
public class Earthshaker extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
private static final FilterCreaturePermanent creatureFilter = new FilterCreaturePermanent("creature without flying");
|
private static final FilterCreaturePermanent creatureFilter = new FilterCreaturePermanent("creature without flying");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
creatureFilter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Earthshaker(UUID ownerId, CardSetInfo setInfo) {
|
public Earthshaker(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
@ -62,7 +60,7 @@ public class Earthshaker extends CardImpl {
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
// Whenever you cast a Spirit or Arcane spell, Earthshaker deals 2 damage to each creature without flying.
|
// Whenever you cast a Spirit or Arcane spell, Earthshaker deals 2 damage to each creature without flying.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DamageAllEffect(new StaticValue(2) , creatureFilter), filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new DamageAllEffect(new StaticValue(2) , creatureFilter), StaticFilters.SPIRIT_OR_ARCANE_CARD, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Earthshaker(final Earthshaker card) {
|
public Earthshaker(final Earthshaker card) {
|
||||||
|
|
|
@ -43,9 +43,7 @@ import mage.cards.LevelerCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
@ -58,14 +56,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class EchoMage extends LevelerCard {
|
public class EchoMage extends LevelerCard {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(
|
|
||||||
new CardTypePredicate(CardType.INSTANT),
|
|
||||||
new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public EchoMage(UUID ownerId, CardSetInfo setInfo) {
|
public EchoMage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
|
@ -82,7 +72,7 @@ public class EchoMage extends LevelerCard {
|
||||||
// {U}{U}, {tap}: Copy target instant or sorcery spell. You may choose new targets for the copy.
|
// {U}{U}, {tap}: Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||||
Abilities<Ability> abilities1 = new AbilitiesImpl<>();
|
Abilities<Ability> abilities1 = new AbilitiesImpl<>();
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl("{U}{U}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl("{U}{U}"));
|
||||||
ability.addTarget(new TargetSpell(filter));
|
ability.addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
abilities1.add(ability);
|
abilities1.add(ability);
|
||||||
// LEVEL 4+
|
// LEVEL 4+
|
||||||
|
@ -90,7 +80,7 @@ public class EchoMage extends LevelerCard {
|
||||||
// {U}{U}, {tap}: Copy target instant or sorcery spell twice. You may choose new targets for the copies.
|
// {U}{U}, {tap}: Copy target instant or sorcery spell twice. You may choose new targets for the copies.
|
||||||
Abilities<Ability> abilities2 = new AbilitiesImpl<>();
|
Abilities<Ability> abilities2 = new AbilitiesImpl<>();
|
||||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new EchoMageEffect(), new ManaCostsImpl("{U}{U}"));
|
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new EchoMageEffect(), new ManaCostsImpl("{U}{U}"));
|
||||||
ability.addTarget(new TargetSpell(filter));
|
ability.addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
abilities2.add(ability);
|
abilities2.add(ability);
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandCard;
|
import mage.filter.common.FilterLandCard;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public class ElderPineOfJukai extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest on the bottom of your library in any order.
|
// Whenever you cast a Spirit or Arcane spell, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest on the bottom of your library in any order.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new RevealLibraryPutIntoHandEffect(3, new FilterLandCard(), Zone.LIBRARY), new FilterSpiritOrArcaneCard(), false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new RevealLibraryPutIntoHandEffect(3, new FilterLandCard(), Zone.LIBRARY), StaticFilters.SPIRIT_OR_ARCANE_CARD, false));
|
||||||
|
|
||||||
// Soulshift 2
|
// Soulshift 2
|
||||||
this.addAbility(new SoulshiftAbility(2));
|
this.addAbility(new SoulshiftAbility(2));
|
||||||
|
|
|
@ -35,12 +35,12 @@ import mage.abilities.mana.AnyColorManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -50,7 +50,7 @@ public class ElvishHarbinger extends CardImpl {
|
||||||
|
|
||||||
static final FilterCard filter = new FilterCard("Elf card");
|
static final FilterCard filter = new FilterCard("Elf card");
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.ELEMENTAL));
|
filter.add(new SubtypePredicate(SubType.ELF));
|
||||||
}
|
}
|
||||||
public ElvishHarbinger(UUID ownerId, CardSetInfo setInfo) {
|
public ElvishHarbinger(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
|
||||||
|
|
|
@ -48,7 +48,7 @@ import mage.constants.Duration;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
@ -60,8 +60,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class FaithfulSquire extends CardImpl {
|
public class FaithfulSquire extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public FaithfulSquire(UUID ownerId, CardSetInfo setInfo) {
|
public FaithfulSquire(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
|
@ -73,7 +71,7 @@ public class FaithfulSquire extends CardImpl {
|
||||||
this.flipCardName = "Kaiso, Memory of Loyalty";
|
this.flipCardName = "Kaiso, Memory of Loyalty";
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Faithful Squire.
|
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Faithful Squire.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
|
|
||||||
// At the beginning of the end step, if there are two or more ki counters on Faithful Squire, you may flip it
|
// At the beginning of the end step, if there are two or more ki counters on Faithful Squire, you may flip it
|
||||||
this.addAbility(new ConditionalTriggeredAbility(
|
this.addAbility(new ConditionalTriggeredAbility(
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import mage.constants.ComparisonType;
|
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
|
@ -35,10 +34,9 @@ import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterNonlandPermanent;
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
@ -53,11 +51,9 @@ import java.util.UUID;
|
||||||
public class FerocityOfTheUnderworld extends CardImpl {
|
public class FerocityOfTheUnderworld extends CardImpl {
|
||||||
|
|
||||||
private static final FilterNonlandPermanent filterMode1 = new FilterNonlandPermanent("nonland permanent with converted mana cost 3 or less");
|
private static final FilterNonlandPermanent filterMode1 = new FilterNonlandPermanent("nonland permanent with converted mana cost 3 or less");
|
||||||
private static final FilterSpell filterMode2 = new FilterSpell("instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterMode1.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
filterMode1.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 4));
|
||||||
filterMode2.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FerocityOfTheUnderworld(UUID ownerId, CardSetInfo setInfo) {
|
public FerocityOfTheUnderworld(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
@ -70,7 +66,7 @@ public class FerocityOfTheUnderworld extends CardImpl {
|
||||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||||
Mode mode = new Mode();
|
Mode mode = new Mode();
|
||||||
mode.getEffects().add(new CopyTargetSpellEffect());
|
mode.getEffects().add(new CopyTargetSpellEffect());
|
||||||
mode.getTargets().add(new TargetSpell(filterMode2));
|
mode.getTargets().add(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
this.getSpellAbility().addMode(mode);
|
this.getSpellAbility().addMode(mode);
|
||||||
|
|
||||||
// Return target card from your graveyard to your hand.
|
// Return target card from your graveyard to your hand.
|
||||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -43,8 +43,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class FiddleheadKami extends CardImpl {
|
public class FiddleheadKami extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public FiddleheadKami(UUID ownerId, CardSetInfo setInfo) {
|
public FiddleheadKami(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}");
|
||||||
this.subtype.add("Spirit");
|
this.subtype.add("Spirit");
|
||||||
|
@ -53,7 +51,7 @@ public class FiddleheadKami extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, regenerate Fiddlehead Kami.
|
// Whenever you cast a Spirit or Arcane spell, regenerate Fiddlehead Kami.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new RegenerateSourceEffect(), filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new RegenerateSourceEffect(), StaticFilters.SPIRIT_OR_ARCANE_CARD, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public FiddleheadKami(final FiddleheadKami card) {
|
public FiddleheadKami(final FiddleheadKami card) {
|
||||||
|
|
|
@ -33,9 +33,7 @@ import mage.abilities.keyword.StormAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -46,18 +44,12 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class Flusterstorm extends CardImpl {
|
public class Flusterstorm extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Flusterstorm(UUID ownerId, CardSetInfo setInfo) {
|
public Flusterstorm(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
|
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
|
||||||
|
|
||||||
// Counter target instant or sorcery spell unless its controller pays {1}.
|
// Counter target instant or sorcery spell unless its controller pays {1}.
|
||||||
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new ManaCostsImpl("{1}")));
|
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new ManaCostsImpl("{1}")));
|
||||||
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
// Storm
|
// Storm
|
||||||
this.addAbility(new StormAbility());
|
this.addAbility(new StormAbility());
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,9 +35,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -47,13 +45,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class Fluxcharger extends CardImpl {
|
public class Fluxcharger extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(
|
|
||||||
new CardTypePredicate(CardType.INSTANT),
|
|
||||||
new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Fluxcharger(UUID ownerId, CardSetInfo setInfo) {
|
public Fluxcharger(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}");
|
||||||
this.subtype.add("Weird");
|
this.subtype.add("Weird");
|
||||||
|
@ -64,7 +55,7 @@ public class Fluxcharger extends CardImpl {
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
// Whenever you cast an instant or sorcery spell, you may switch Fluxcharger's power and toughness until end of turn.
|
// Whenever you cast an instant or sorcery spell, you may switch Fluxcharger's power and toughness until end of turn.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new SwitchPowerToughnessSourceEffect(Duration.EndOfTurn), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new SwitchPowerToughnessSourceEffect(Duration.EndOfTurn), StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL, true));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class ForcedFruition extends CardImpl {
|
||||||
|
|
||||||
// Whenever an opponent casts a spell, that player draws seven cards.
|
// Whenever an opponent casts a spell, that player draws seven cards.
|
||||||
this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(7),
|
this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(7),
|
||||||
new FilterSpell(), false, SetTargetPointer.PLAYER));
|
StaticFilters.FILTER_SPELL, false, SetTargetPointer.PLAYER));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ForcedFruition(final ForcedFruition card) {
|
public ForcedFruition(final ForcedFruition card) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public class FoulSpirit extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When Foul Spirit enters the battlefield, sacrifice a land.
|
// When Foul Spirit enters the battlefield, sacrifice a land.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterLandPermanent(), 1, ""), false));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_LAND, 1, ""), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public FoulSpirit(final FoulSpirit card) {
|
public FoulSpirit(final FoulSpirit card) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public class GateHound extends CardImpl {
|
||||||
|
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||||
new ConditionalContinuousEffect(
|
new ConditionalContinuousEffect(
|
||||||
new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()),
|
new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES),
|
||||||
new EnchantedSourceCondition(),
|
new EnchantedSourceCondition(),
|
||||||
"Creatures you control have vigilance as long as {this} is enchanted")));
|
"Creatures you control have vigilance as long as {this} is enchanted")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,6 @@ public class GateToTheAfterlife extends CardImpl {
|
||||||
new GateToTheAfterlifeEffect(), new GenericManaCost(2), new CardsInControllerGraveCondition(6, new FilterCreatureCard()));
|
new GateToTheAfterlifeEffect(), new GenericManaCost(2), new CardsInControllerGraveCondition(6, new FilterCreatureCard()));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ public class GiftOfEstates extends CardImpl {
|
||||||
// If an opponent controls more lands than you, search your library for up to three Plains cards, reveal them, and put them into your hand. Then shuffle your library.
|
// If an opponent controls more lands than you, search your library for up to three Plains cards, reveal them, and put them into your hand. Then shuffle your library.
|
||||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 3, filter), true),
|
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 3, filter), true),
|
||||||
new OpponentControlsMoreCondition(new FilterLandPermanent("lands"))));
|
new OpponentControlsMoreCondition(StaticFilters.FILTER_LANDS)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GiftOfEstates(final GiftOfEstates card) {
|
public GiftOfEstates(final GiftOfEstates card) {
|
||||||
|
|
|
@ -39,8 +39,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -108,7 +108,7 @@ class GainControlAllLandsEffect extends ContinuousEffectImpl {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
||||||
if (targetPlayer != null && targetPlayer.isInGame()) {
|
if (targetPlayer != null && targetPlayer.isInGame()) {
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), targetPointer.getFirst(game, source), game)) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_LANDS, targetPointer.getFirst(game, source), game)) {
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
permanent.changeControllerId(source.getControllerId(), game);
|
permanent.changeControllerId(source.getControllerId(), game);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -66,11 +65,6 @@ public class GlimpseOfNature extends CardImpl {
|
||||||
|
|
||||||
class GlimpseOfNatureTriggeredAbility extends DelayedTriggeredAbility {
|
class GlimpseOfNatureTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell();
|
|
||||||
static {
|
|
||||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public GlimpseOfNatureTriggeredAbility() {
|
public GlimpseOfNatureTriggeredAbility() {
|
||||||
super(new DrawCardSourceControllerEffect(1), Duration.EndOfTurn, false);
|
super(new DrawCardSourceControllerEffect(1), Duration.EndOfTurn, false);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +82,7 @@ class GlimpseOfNatureTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getPlayerId().equals(this.getControllerId())) {
|
if (event.getPlayerId().equals(this.getControllerId())) {
|
||||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||||
if (spell != null && filter.match(spell, game)) {
|
if (spell != null && StaticFilters.FILTER_SPELL_A_CREATURE.match(spell, game)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,8 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SubTypeSet;
|
import mage.constants.SubTypeSet;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledLandPermanent;
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -104,7 +104,7 @@ class GlobalRuinDestroyLandEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), game)) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_LAND, game)) {
|
||||||
if (!lands.contains(permanent.getId())) {
|
if (!lands.contains(permanent.getId())) {
|
||||||
permanent.sacrifice(permanent.getId(), game);
|
permanent.sacrifice(permanent.getId(), game);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ import mage.abilities.effects.common.SacrificeControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class GoblinFirebug extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// When Goblin Firebug leaves the battlefield, sacrifice a land.
|
// When Goblin Firebug leaves the battlefield, sacrifice a land.
|
||||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterLandPermanent(), 1, ""), false));
|
this.addAbility(new LeavesBattlefieldTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_LAND, 1, ""), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GoblinFirebug(final GoblinFirebug card) {
|
public GoblinFirebug(final GoblinFirebug card) {
|
||||||
|
|
|
@ -28,21 +28,21 @@
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Loki
|
* @author Loki
|
||||||
|
@ -53,7 +53,7 @@ public class GruulWarPlow extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
|
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
|
||||||
|
|
||||||
// Creatures you control have trample.
|
// Creatures you control have trample.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
|
|
||||||
// {1}{R}{G}: Gruul War Plow becomes a 4/4 Juggernaut artifact creature until end of turn.
|
// {1}{R}{G}: Gruul War Plow becomes a 4/4 Juggernaut artifact creature until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new GruulWarPlowToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{G}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new GruulWarPlowToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{G}")));
|
||||||
|
|
|
@ -37,7 +37,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -47,15 +47,13 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class GuardianOfSolitude extends CardImpl {
|
public class GuardianOfSolitude extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public GuardianOfSolitude(UUID ownerId, CardSetInfo setInfo) {
|
public GuardianOfSolitude(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
||||||
this.subtype.add("Spirit");
|
this.subtype.add("Spirit");
|
||||||
|
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), filter, false);
|
Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), StaticFilters.SPIRIT_OR_ARCANE_CARD, false);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.effects.common.TapAllTargetPlayerControlsEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -53,7 +53,7 @@ public class GulfSquid extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// When Gulf Squid enters the battlefield, tap all lands target player controls.
|
// When Gulf Squid enters the battlefield, tap all lands target player controls.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new TapAllTargetPlayerControlsEffect(new FilterLandPermanent("lands")));
|
Ability ability = new EntersBattlefieldTriggeredAbility(new TapAllTargetPlayerControlsEffect(StaticFilters.FILTER_LANDS));
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
@ -43,11 +42,13 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledLandPermanent;
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.game.permanent.token.HammerOfPurphorosGolemToken;
|
import mage.game.permanent.token.HammerOfPurphorosGolemToken;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
@ -60,7 +61,7 @@ public class HammerOfPurphoros extends CardImpl {
|
||||||
|
|
||||||
// Creatures you control have haste.
|
// Creatures you control have haste.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||||
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures"))));
|
new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES)));
|
||||||
|
|
||||||
// {2}{R}, {tap}, Sacrifice a land: Create a 3/3 colorless Golem enchantment artifact creature token.
|
// {2}{R}, {tap}, Sacrifice a land: Create a 3/3 colorless Golem enchantment artifact creature token.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new HammerOfPurphorosGolemToken()), new ManaCostsImpl("{2}{R}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new HammerOfPurphorosGolemToken()), new ManaCostsImpl("{2}{R}"));
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
|
@ -36,7 +34,10 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.constants.CardType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -44,8 +45,6 @@ import mage.filter.common.FilterSpiritOrArcaneCard;
|
||||||
*/
|
*/
|
||||||
public class HaruOnna extends CardImpl {
|
public class HaruOnna extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public HaruOnna(UUID ownerId, CardSetInfo setInfo) {
|
public HaruOnna(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
|
||||||
this.subtype.add("Spirit");
|
this.subtype.add("Spirit");
|
||||||
|
@ -56,7 +55,7 @@ public class HaruOnna extends CardImpl {
|
||||||
// When Haru-Onna enters the battlefield, draw a card.
|
// When Haru-Onna enters the battlefield, draw a card.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may return Haru-Onna to its owner's hand.
|
// Whenever you cast a Spirit or Arcane spell, you may return Haru-Onna to its owner's hand.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new ReturnToHandSourceEffect(true), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public HaruOnna(final HaruOnna card) {
|
public HaruOnna(final HaruOnna card) {
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
|
@ -42,11 +41,13 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
|
@ -63,7 +64,7 @@ public class HellraiserGoblin extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Creatures you control have haste and attack each combat if able.
|
// Creatures you control have haste and attack each combat if able.
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures")));
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES));
|
||||||
Effect effect = new AttacksIfAbleAllEffect(Duration.WhileOnBattlefield);
|
Effect effect = new AttacksIfAbleAllEffect(Duration.WhileOnBattlefield);
|
||||||
effect.setText("and attack each combat if able");
|
effect.setText("and attack each combat if able");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
|
|
|
@ -36,7 +36,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -46,8 +46,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public class HikariTwilightGuardian extends CardImpl {
|
public class HikariTwilightGuardian extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public HikariTwilightGuardian(UUID ownerId, CardSetInfo setInfo) {
|
public HikariTwilightGuardian(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}");
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
|
@ -61,7 +59,7 @@ public class HikariTwilightGuardian extends CardImpl {
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may exile Hikari, Twilight Guardian. If you do, return it to the battlefield under its owner's control at the beginning of the next end step.
|
// Whenever you cast a Spirit or Arcane spell, you may exile Hikari, Twilight Guardian. If you do, return it to the battlefield under its owner's control at the beginning of the next end step.
|
||||||
Effect effect = new ExileReturnBattlefieldOwnerNextEndStepSourceEffect(true);
|
Effect effect = new ExileReturnBattlefieldOwnerNextEndStepSourceEffect(true);
|
||||||
effect.setText("you may exile {this}. If you do, return it to the battlefield under its owner's control at the beginning of the next end step");
|
effect.setText("you may exile {this}. If you do, return it to the battlefield under its owner's control at the beginning of the next end step");
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(effect, filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(effect, StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public HikariTwilightGuardian(final HikariTwilightGuardian card) {
|
public HikariTwilightGuardian(final HikariTwilightGuardian card) {
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.OnEventTriggeredAbility;
|
import mage.abilities.common.OnEventTriggeredAbility;
|
||||||
|
@ -47,21 +46,21 @@ import mage.constants.Duration;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class HiredMuscle extends CardImpl {
|
public class HiredMuscle extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public HiredMuscle(UUID ownerId, CardSetInfo setInfo) {
|
public HiredMuscle(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
|
||||||
this.subtype.add("Human");
|
this.subtype.add("Human");
|
||||||
this.subtype.add("Warrior");
|
this.subtype.add("Warrior");
|
||||||
|
|
||||||
|
@ -71,7 +70,7 @@ public class HiredMuscle extends CardImpl {
|
||||||
this.flipCardName = "Scarmaker";
|
this.flipCardName = "Scarmaker";
|
||||||
|
|
||||||
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Hired Muscle.
|
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Hired Muscle.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||||
|
|
||||||
// At the beginning of the end step, if there are two or more ki counters on Hired Muscle, you may flip it.
|
// At the beginning of the end step, if there are two or more ki counters on Hired Muscle, you may flip it.
|
||||||
this.addAbility(new ConditionalTriggeredAbility(
|
this.addAbility(new ConditionalTriggeredAbility(
|
||||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -60,7 +61,7 @@ public class HokoriDustDrinker extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Lands don't untap during their controllers' untap steps.
|
// Lands don't untap during their controllers' untap steps.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, new FilterLandPermanent("Lands"))));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, StaticFilters.FILTER_LANDS)));
|
||||||
|
|
||||||
// At the beginning of each player's upkeep, that player untaps a land he or she controls.
|
// At the beginning of each player's upkeep, that player untaps a land he or she controls.
|
||||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new HokoriDustDrinkerUntapEffect(), TargetController.ANY, false));
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new HokoriDustDrinkerUntapEffect(), TargetController.ANY, false));
|
||||||
|
|
|
@ -28,32 +28,30 @@
|
||||||
|
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.effects.common.RegenerateTargetEffect;
|
import mage.abilities.effects.common.RegenerateTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.constants.CardType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public class HorizonSeed extends CardImpl {
|
public class HorizonSeed extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public HorizonSeed(UUID ownerId, CardSetInfo setInfo) {
|
public HorizonSeed(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
|
||||||
this.subtype.add("Spirit");
|
this.subtype.add("Spirit");
|
||||||
|
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(new RegenerateTargetEffect(), filter, false);
|
Ability ability = new SpellCastControllerTriggeredAbility(new RegenerateTargetEffect(), StaticFilters.SPIRIT_OR_ARCANE_CARD, false);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ package mage.cards.i;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
||||||
|
import mage.abilities.costs.Cost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -36,13 +38,11 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SetTargetPointer;
|
import mage.constants.SetTargetPointer;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.abilities.costs.Cost;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public class IceCave extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// Whenever a player casts a spell, any other player may pay that spell's mana cost. If a player does, counter the spell. (Mana cost includes color.)
|
// Whenever a player casts a spell, any other player may pay that spell's mana cost. If a player does, counter the spell. (Mana cost includes color.)
|
||||||
this.addAbility(new SpellCastAllTriggeredAbility(Zone.BATTLEFIELD, new IceCaveEffect(), new FilterSpell(), false, SetTargetPointer.SPELL));
|
this.addAbility(new SpellCastAllTriggeredAbility(Zone.BATTLEFIELD, new IceCaveEffect(), StaticFilters.FILTER_SPELL, false, SetTargetPointer.SPELL));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IceCave(final IceCave card) {
|
public IceCave(final IceCave card) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -66,7 +66,7 @@ public class InfernalKirin extends CardImpl {
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
// Whenever you cast a Spirit or Arcane spell, target player reveals his or her hand and discards all cards with that spell's converted mana cost.
|
// Whenever you cast a Spirit or Arcane spell, target player reveals his or her hand and discards all cards with that spell's converted mana cost.
|
||||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new InfernalKirinEffect(), new FilterSpiritOrArcaneCard(), false, true);
|
Ability ability = new SpellCastControllerTriggeredAbility(Zone.BATTLEFIELD, new InfernalKirinEffect(), StaticFilters.SPIRIT_OR_ARCANE_CARD, false, true);
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
|
|
||||||
package mage.cards.i;
|
package mage.cards.i;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
@ -41,18 +38,19 @@ import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.abilities.effects.common.UntapSourceEffect;
|
import mage.abilities.effects.common.UntapSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
import mage.constants.ColoredManaSymbol;
|
import mage.constants.ColoredManaSymbol;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public class InnocenceKami extends CardImpl {
|
public class InnocenceKami extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
|
|
||||||
|
|
||||||
public InnocenceKami(UUID ownerId, CardSetInfo setInfo) {
|
public InnocenceKami(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}");
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}");
|
||||||
this.subtype.add("Spirit");
|
this.subtype.add("Spirit");
|
||||||
|
@ -63,7 +61,7 @@ public class InnocenceKami extends CardImpl {
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), StaticFilters.SPIRIT_OR_ARCANE_CARD, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public InnocenceKami(final InnocenceKami card) {
|
public InnocenceKami(final InnocenceKami card) {
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.i;
|
package mage.cards.i;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
|
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
|
||||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||||
|
@ -35,25 +34,17 @@ import mage.abilities.effects.common.CounterTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public class InsidiousWill extends CardImpl {
|
public class InsidiousWill extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.or(
|
|
||||||
new CardTypePredicate(CardType.INSTANT),
|
|
||||||
new CardTypePredicate(CardType.SORCERY)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public InsidiousWill(UUID ownerId, CardSetInfo setInfo) {
|
public InsidiousWill(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{U}");
|
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{U}");
|
||||||
|
|
||||||
|
@ -74,7 +65,7 @@ public class InsidiousWill extends CardImpl {
|
||||||
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
// Copy target instant or sorcery spell. You may choose new targets for the copy.
|
||||||
mode = new Mode();
|
mode = new Mode();
|
||||||
mode.getEffects().add(new CopyTargetSpellEffect());
|
mode.getEffects().add(new CopyTargetSpellEffect());
|
||||||
mode.getTargets().add(new TargetSpell(filter));
|
mode.getTargets().add(new TargetSpell(StaticFilters.FILTER_INSTANT_OR_SORCERY_SPELL));
|
||||||
this.getSpellAbility().getModes().addMode(mode);
|
this.getSpellAbility().getModes().addMode(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards.i;
|
package mage.cards.i;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.constants.ComparisonType;
|
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.InvertCondition;
|
import mage.abilities.condition.InvertCondition;
|
||||||
|
@ -41,19 +38,21 @@ import mage.abilities.mana.WhiteManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public class InspiringVantage extends CardImpl {
|
public class InspiringVantage extends CardImpl {
|
||||||
|
|
||||||
public InspiringVantage(UUID ownerId, CardSetInfo setInfo) {
|
public InspiringVantage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||||
|
|
||||||
// Inspiring Vantage enters the battlefield tapped unless you control two or fewer other lands.
|
// Inspiring Vantage enters the battlefield tapped unless you control two or fewer other lands.
|
||||||
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.FEWER_THAN, 3));
|
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
|
||||||
String abilityText = "tapped unless you control fewer than 3 lands";
|
String abilityText = "tapped unless you control fewer than 3 lands";
|
||||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue