[NEO] Implemented Farewell

This commit is contained in:
Evan Kranzler 2022-02-04 17:41:45 -05:00
parent cf3838a040
commit 0345580fa7
49 changed files with 107 additions and 54 deletions

View file

@ -21,7 +21,7 @@ public final class AbzanAdvantage extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
// Target player sacrifices an enchantment. Bolster 1.
this.getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, 1, "Target player"));
this.getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, 1, "Target player"));
this.getSpellAbility().addEffect(new BolsterEffect(1));
this.getSpellAbility().addTarget(new TargetPlayer());
}

View file

@ -27,7 +27,7 @@ public final class AssassinsInk extends CardImpl {
// This spell costs {1} less to cast if you control an artifact and {1} less to cast if you control an enchantment.
Condition artifactCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ARTIFACT);
Condition enchantmentCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT);
Condition enchantmentCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT);
Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(1, artifactCondition)
.setText("This spell costs {1} less to cast if you control an artifact"));
ability.addEffect(new SpellCostReductionSourceEffect(1, enchantmentCondition)

View file

@ -71,7 +71,7 @@ class AuraThiefDiesTriggeredEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
boolean ret = false;
for(Permanent enchantment : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getControllerId(), game)) {
for(Permanent enchantment : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, source.getControllerId(), source.getControllerId(), game)) {
ContinuousEffect gainControl = new GainControlTargetEffect(Duration.EndOfGame);
gainControl.setTargetPointer(new FixedTarget(enchantment.getId(), game));
game.addEffect(gainControl, source);

View file

@ -30,7 +30,7 @@ public final class BalefulBeholder extends CardImpl {
// When Baleful Beholder enters the battlefield, choose one
// Antimagic Cone Each opponent sacrifices an enchantment.
Ability ability = new EntersBattlefieldTriggeredAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
Ability ability = new EntersBattlefieldTriggeredAbility(new SacrificeOpponentsEffect(StaticFilters.FILTER_PERMANENT_ENCHANTMENT));
ability.getModes().getMode().withFlavorWord("Antimagic Cone");
// Fear Ray Creatures you control gain menace until end of turn.

View file

@ -32,7 +32,7 @@ public final class BubblingBeebles extends CardImpl {
// Bubbling Beebles can't be blocked as long as defending player controls an enchantment.
Effect effect = new ConditionalRestrictionEffect(
new CantBeBlockedSourceEffect(),
new DefendingPlayerControlsCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
new DefendingPlayerControlsCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT));
effect.setText("{this} can't be blocked as long as defending player controls an enchantment");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}

View file

@ -72,7 +72,7 @@ class CleansingMeditationEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, source.getControllerId(), source.getSourceId(), game)) {
if (permanent != null && permanent.destroy(source, game, false)) {
if (threshold && controller != null && permanent.isOwnedBy(controller.getId())) {
cardsToBattlefield.add(permanent);

View file

@ -20,7 +20,7 @@ public final class CopyEnchantment extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
// You may have Copy Enchantment enter the battlefield as a copy of any enchantment on the battlefield.
this.addAbility(new EntersBattlefieldAbility(new CopyPermanentEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), true));
this.addAbility(new EntersBattlefieldAbility(new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_ENCHANTMENT), true));
}
private CopyEnchantment(final CopyEnchantment card) {

View file

@ -76,7 +76,7 @@ enum DestinySpinnerCount implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, sourceAbility.getControllerId(), game);
return game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, sourceAbility.getControllerId(), game);
}
@Override

View file

@ -64,7 +64,7 @@ class DrakeFamiliarEffect extends OneShotEffect {
if (controller == null) {
return false;
}
TargetPermanent target = new TargetPermanent(StaticFilters.FILTER_ENCHANTMENT_PERMANENT);
TargetPermanent target = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ENCHANTMENT);
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), controller.getId(), game)
&& controller.chooseUse(outcome, "Return an enchantment to its owner's hand?", source, game)) {

View file

@ -0,0 +1,46 @@
package mage.cards.f;
import mage.abilities.Mode;
import mage.abilities.effects.common.ExileAllEffect;
import mage.abilities.effects.common.ExileGraveyardAllPlayersEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class Farewell extends CardImpl {
public Farewell(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{W}");
// Choose one or more
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(4);
// Exile all artifacts.
this.getSpellAbility().addEffect(new ExileAllEffect(StaticFilters.FILTER_PERMANENT_ARTIFACTS));
// Exile all creatures.
this.getSpellAbility().addMode(new Mode(new ExileAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES)));
// Exile all enchantments.
this.getSpellAbility().addMode(new Mode(new ExileAllEffect(StaticFilters.FILTER_PERMANENT_ENCHANTMENTS)));
// Exile all graveyards.
this.getSpellAbility().addMode(new Mode(new ExileGraveyardAllPlayersEffect()));
}
private Farewell(final Farewell card) {
super(card);
}
@Override
public Farewell copy() {
return new Farewell(this);
}
}

View file

@ -29,7 +29,7 @@ public final class FemerefEnchantress extends CardImpl {
// Whenever an enchantment is put into a graveyard from the battlefield, draw a card.
this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_ENCHANTMENT_PERMANENT,
new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_PERMANENT_ENCHANTMENT,
"Whenever an enchantment is put into a graveyard from the battlefield, ", false));
}

View file

@ -28,7 +28,7 @@ public final class GeistlightSnare extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SPIRIT);
private static final Condition condition1 = new PermanentsOnTheBattlefieldCondition(filter);
private static final Condition condition2 = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT);
private static final Condition condition2 = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT);
private static final Hint hint1 = new ConditionHint(condition1, "You control a Spirit");
private static final Hint hint2 = new ConditionHint(condition2, "You control an enchantment");

View file

@ -37,7 +37,7 @@ public final class HiddenAncients extends CardImpl {
// When an opponent casts an enchantment spell, if Hidden Ancients is an enchantment, Hidden Ancients becomes a 5/5 Treefolk creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolkToken(), "", Duration.WhileOnBattlefield, true, false),
filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature."));
}

View file

@ -37,7 +37,7 @@ public final class HiddenGibbons extends CardImpl {
// When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), "", Duration.WhileOnBattlefield, true, false),
filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts an instant spell, if {this} is an enchantment, {this} becomes a 4/4 Ape creature."));
}

View file

@ -32,7 +32,7 @@ public final class HiddenGuerrillas extends CardImpl {
// When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), "", Duration.WhileOnBattlefield, true, false),
new FilterArtifactSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample."));
}

View file

@ -32,7 +32,7 @@ public final class HiddenHerd extends CardImpl {
// When an opponent plays a nonbasic land, if Hidden Herd is an enchantment, Hidden Herd becomes a 3/3 Beast creature.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new HiddenHerdAbility(),
new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent plays a nonbasic land, if {this} is an enchantment, {this} becomes a 3/3 Beast creature."
));
}

View file

@ -40,7 +40,7 @@ public final class HiddenSpider extends CardImpl {
// When an opponent casts a creature spell with flying, if Hidden Spider is an enchantment, Hidden Spider becomes a 3/5 Spider creature with reach.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), "", Duration.WhileOnBattlefield, true, false),
filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell with flying, if {this} is an enchantment, {this} becomes a 3/5 Spider creature with reach."));
}

View file

@ -31,7 +31,7 @@ public final class HiddenStag extends CardImpl {
// Whenever an opponent plays a land, if Hidden Stag is an enchantment, Hidden Stag becomes a 3/2 Elk Beast creature.
Effect effect = new BecomesCreatureSourceEffect(new ElkBeastToken(), "", Duration.WhileOnBattlefield, true, false);
TriggeredAbility ability = new OpponentPlaysLandTriggeredAbility(Zone.BATTLEFIELD, effect, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent plays a land, if Hidden Stag is an enchantment, Hidden Stag becomes a 3/2 Elk Beast creature."));
// Whenever you play a land, if Hidden Stag is a creature, Hidden Stag becomes an enchantment.

View file

@ -24,7 +24,7 @@ public final class KiorasDismissal extends CardImpl {
this.addAbility(new StriveAbility("{U}"));
// Return any number of target enchantments to their owners' hands.
this.getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, StaticFilters.FILTER_ENCHANTMENT_PERMANENT, false));
this.getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, StaticFilters.FILTER_PERMANENT_ENCHANTMENT, false));
Effect effect = new ReturnToHandTargetEffect();
effect.setText("Return any number of target enchantments to their owners' hands");
this.getSpellAbility().addEffect(effect);

View file

@ -31,7 +31,7 @@ public final class LagonnaBandElder extends CardImpl {
// When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life.
Ability ability = new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), false),
new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life");
this.addAbility(ability);
}

View file

@ -35,7 +35,7 @@ public final class LurkingSkirge extends CardImpl {
// When a creature is put into an opponent's graveyard from the battlefield, if Lurking Skirge is an enchantment, Lurking Skirge becomes a 3/2 Imp creature with flying.
TriggeredAbility ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new BecomesCreatureSourceEffect(new LurkingSkirgeToken(), "", Duration.WhileOnBattlefield, true, false), false, filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When a creature is put into an opponent's graveyard from the battlefield, if {this} is an enchantment, {this} becomes a 3/2 Phyrexian Imp creature with flying."));
}

View file

@ -57,7 +57,7 @@ class MultanisDecreeDestroyEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
int enchantmentsDestoyed = 0;
for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) {
for (Permanent permanent: game.getState().getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, source.getControllerId(), source.getSourceId(), game)) {
if (permanent.destroy(source, game, false)) {
enchantmentsDestoyed++;
}

View file

@ -24,7 +24,7 @@ import java.util.UUID;
public final class NezumiBladeblesser extends CardImpl {
private static final Condition artifactCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ARTIFACT);
private static final Condition enchantmentCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT);
private static final Condition enchantmentCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT);
private static final Hint artifactHint = new ConditionHint(artifactCondition, "You control an artifact");
private static final Hint enchantmentHint = new ConditionHint(enchantmentCondition, "You control an enchantment");

View file

@ -23,7 +23,7 @@ public final class OathOfTheAncientWood extends CardImpl {
// Whenever Oath of the Ancient Wood or another enchantment enters the battlefield under your control, you may put a +1/+1 counter on target creature.
Ability ability = new EntersBattlefieldThisOrAnotherTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
StaticFilters.FILTER_ENCHANTMENT_PERMANENT, true, true
StaticFilters.FILTER_PERMANENT_ENCHANTMENT, true, true
);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);

View file

@ -38,7 +38,7 @@ public final class OpalAcrolith extends CardImpl {
// Whenever an opponent casts a creature spell, if Opal Acrolith is an enchantment, Opal Acrolith becomes a 2/4 Soldier creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalAcrolithToken(), "", Duration.WhileOnBattlefield, true, false),
filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a creature spell, if Opal Acrolith is an enchantment, Opal Acrolith becomes a 2/4 Soldier creature."));
// {0}: Opal Acrolith becomes an enchantment.

View file

@ -33,7 +33,7 @@ public final class OpalArchangel extends CardImpl {
// When an opponent casts a creature spell, if Opal Archangel is an enchantment, Opal Archangel becomes a 5/5 Angel creature with flying and vigilance.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 5/5 Angel creature with flying and vigilance."));
}

View file

@ -31,7 +31,7 @@ public final class OpalCaryatid extends CardImpl {
// When an opponent casts a creature spell, if Opal Caryatid is an enchantment, Opal Caryatid becomes a 2/2 Soldier creature.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldierToken(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature."));
}

View file

@ -32,7 +32,7 @@ public final class OpalChampion extends CardImpl {
// When an opponent casts a creature spell, if Opal Champion is an enchantment, Opal Champion becomes a 3/3 Knight creature with first strike.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/3 Knight creature with first strike."));
}

View file

@ -32,7 +32,7 @@ public final class OpalGargoyle extends CardImpl {
// When an opponent casts a creature spell, if Opal Gargoyle is an enchantment, Opal Gargoyle becomes a 2/2 Gargoyle creature with flying.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Gargoyle creature with flying."));
}

View file

@ -34,7 +34,7 @@ public final class OpalGuardian extends CardImpl {
// When an opponent casts a creature spell, if Opal Guardian is an enchantment, Opal Guardian becomes a 3/4 Gargoyle creature with flying and protection from red.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), "", Duration.WhileOnBattlefield, true, false),
new FilterCreatureSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/4 Gargoyle creature with flying and protection from red."));
}

View file

@ -31,7 +31,7 @@ public final class OpalTitan extends CardImpl {
// When an opponent casts a creature spell, if Opal Titan is an enchantment, Opal Titan becomes a 4/4 Giant creature with protection from each of that spell's colors.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new OpalTitanBecomesCreatureEffect(),
StaticFilters.FILTER_SPELL_A_CREATURE, false, SetTargetPointer.SPELL);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"When an opponent casts a creature spell, if Opal Titan is an enchantment, Opal Titan becomes a 4/4 Giant creature with protection from each of that spell's colors."));
}

View file

@ -51,7 +51,7 @@ class ParaseleneEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
int count = 0;
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), source.getSourceId(), game)) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, source.getControllerId(), source.getSourceId(), game)) {
if (permanent.destroy(source, game, false)) {
count++;
}

View file

@ -15,7 +15,6 @@ import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.stack.Spell;
import mage.watchers.Watcher;
@ -34,7 +33,7 @@ public final class PatriciansScorn extends CardImpl {
// If you've cast another white spell this turn, you may cast this spell without paying its mana cost.
this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()), new PatriciansScornWatcher());
// Destroy all enchantments.
this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_ENCHANTMENT));
}
private PatriciansScorn(final PatriciansScorn card) {

View file

@ -22,7 +22,7 @@ public final class PeaceAndQuiet extends CardImpl {
// Destroy two target enchantments.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(2, StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
this.getSpellAbility().addTarget(new TargetPermanent(2, StaticFilters.FILTER_PERMANENT_ENCHANTMENT));
}
private PeaceAndQuiet(final PeaceAndQuiet card) {

View file

@ -27,7 +27,7 @@ public final class PharikasLibation extends CardImpl {
// Target opponent sacrifices an enchantment.
Mode mode = new Mode(new SacrificeEffect(
StaticFilters.FILTER_ENCHANTMENT_PERMANENT, 1, "Target opponent"
StaticFilters.FILTER_PERMANENT_ENCHANTMENT, 1, "Target opponent"
));
mode.addTarget(new TargetOpponent());
this.getSpellAbility().addMode(mode);

View file

@ -26,7 +26,7 @@ import mage.filter.StaticFilters;
public final class RoadsideReliquary extends CardImpl {
private static final Condition artifactCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ARTIFACT);
private static final Condition enchantmentCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT);
private static final Condition enchantmentCondition = new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT);
private static final Hint artifactHint = new ConditionHint(artifactCondition, "You control an artifact");
private static final Hint enchantmentHint = new ConditionHint(enchantmentCondition, "You control an enchantment");

View file

@ -54,7 +54,7 @@ class SphereOfSafetyPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaA
@Override
public ManaCosts getManaCostToPay(GameEvent event, Ability source, Game game) {
int enchantments = game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), game);
int enchantments = game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, source.getControllerId(), game);
if (enchantments > 0) {
return new ManaCostsImpl<>("{" + enchantments + '}');
}

View file

@ -58,7 +58,7 @@ public final class TattooWard extends CardImpl {
// Sacrifice Tattoo Ward: Destroy target enchantment.
Ability ability3 = new SimpleActivatedAbility(new DestroyTargetEffect(), new SacrificeSourceCost());
ability3.addTarget(new TargetPermanent(StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
ability3.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ENCHANTMENT));
this.addAbility(ability3);
}

View file

@ -31,7 +31,7 @@ public final class TetheredGriffin extends CardImpl {
// When you control no enchantments, sacrifice Tethered Griffin.
this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
StaticFilters.FILTER_ENCHANTMENT_PERMANENT, ComparisonType.EQUAL_TO, 0,
StaticFilters.FILTER_PERMANENT_ENCHANTMENT, ComparisonType.EQUAL_TO, 0,
new SacrificeSourceEffect()));
}

View file

@ -31,7 +31,7 @@ public final class VeilOfBirds extends CardImpl {
// When an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeilOfBirdsToken(), "", Duration.WhileOnBattlefield, true, false),
filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying."));
}

View file

@ -37,7 +37,7 @@ public final class VeiledApparition extends CardImpl {
// When an opponent casts a spell, if Veiled Apparition is an enchantment, Veiled Apparition becomes a 3/3 Illusion creature with flying and "At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}."
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeilApparitionToken(), "", Duration.WhileOnBattlefield, true, false),
filter, false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a spell, if Veiled Apparition is an enchantment, Veiled Apparition becomes a 3/3 Illusion creature with flying and \"At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}."));
}

View file

@ -27,7 +27,7 @@ public final class VeiledSentry extends CardImpl {
// When an opponent casts a spell, if Veiled Sentry is an enchantment, Veiled Sentry becomes an Illusion creature with power and toughness each equal to that spell's converted mana cost.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new VeiledSentryEffect(), new FilterSpell(), false, SetTargetPointer.SPELL);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a spell, if Veiled Sentry is an enchantment, Veil Sentry becomes an Illusion creature with power and toughness equal to that spell's mana value."));
}

View file

@ -34,7 +34,7 @@ public final class VeiledSerpent extends CardImpl {
// When an opponent casts a spell, if Veiled Serpent is an enchantment, Veiled Serpent becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island.
TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeiledSerpentToken(), "", Duration.WhileOnBattlefield, true, false),
new FilterSpell(), false);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT),
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_ENCHANTMENT),
"Whenever an opponent casts a spell, if Veiled Serpent is an enchantment, Veiled Serpent becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island."));
// Cycling {2}

View file

@ -31,7 +31,7 @@ public final class VigilantMartyr extends CardImpl {
private static final FilterSpell filter = new FilterSpell("spell that targets an enchantment");
static {
filter.add(new TargetsPermanentPredicate(StaticFilters.FILTER_ENCHANTMENT_PERMANENT));
filter.add(new TargetsPermanentPredicate(StaticFilters.FILTER_PERMANENT_ENCHANTMENT));
}
public VigilantMartyr(UUID ownerId, CardSetInfo setInfo) {

View file

@ -103,8 +103,8 @@ class WardOfBonesEffect extends ContinuousRuleModifyingEffectImpl {
return true;
}
if (card.isEnchantment(game)
&& game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, opponent.getId(), game)
> game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), game)) {
&& game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, opponent.getId(), game)
> game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, source.getControllerId(), game)) {
return true;
}
final int yourLands = game.getBattlefield().countAll(new FilterLandPermanent(), source.getControllerId(), game);

View file

@ -69,7 +69,7 @@ public final class Wirecat extends CardImpl {
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
if (permanent.getId().equals(source.getSourceId())) {
return game.getBattlefield().contains(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source, game, 1);
return game.getBattlefield().contains(StaticFilters.FILTER_PERMANENT_ENCHANTMENT, source, game, 1);
}
return false;
}

View file

@ -68,6 +68,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("Era of Enlightenment", 11, Rarity.COMMON, mage.cards.e.EraOfEnlightenment.class));
cards.add(new SetCardInfo("Essence Capture", 52, Rarity.UNCOMMON, mage.cards.e.EssenceCapture.class));
cards.add(new SetCardInfo("Fang of Shigeki", 183, Rarity.COMMON, mage.cards.f.FangOfShigeki.class));
cards.add(new SetCardInfo("Farewell", 13, Rarity.RARE, mage.cards.f.Farewell.class));
cards.add(new SetCardInfo("Forest", 291, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Fragment of Konda", 12, Rarity.UNCOMMON, mage.cards.f.FragmentOfKonda.class));
cards.add(new SetCardInfo("Futurist Operative", 53, Rarity.UNCOMMON, mage.cards.f.FuturistOperative.class));

View file

@ -33,12 +33,6 @@ public final class StaticFilters {
FILTER_SPIRIT_OR_ARCANE_CARD.setLockedFilter(true);
}
public static final FilterEnchantmentPermanent FILTER_ENCHANTMENT_PERMANENT = new FilterEnchantmentPermanent();
static {
FILTER_ENCHANTMENT_PERMANENT.setLockedFilter(true);
}
public static final FilterCard FILTER_CARD = new FilterCard("card");
static {
@ -238,6 +232,19 @@ public final class StaticFilters {
FILTER_PERMANENTS.setLockedFilter(true);
}
public static final FilterEnchantmentPermanent FILTER_PERMANENT_ENCHANTMENT = new FilterEnchantmentPermanent();
static {
FILTER_PERMANENT_ENCHANTMENT.setLockedFilter(true);
}
public static final FilterEnchantmentPermanent FILTER_PERMANENT_ENCHANTMENTS = new FilterEnchantmentPermanent("enchantments");
static {
FILTER_PERMANENT_ENCHANTMENTS.setLockedFilter(true);
}
public static final FilterArtifactPermanent FILTER_PERMANENT_ARTIFACT = new FilterArtifactPermanent("artifact");
static {

View file

@ -22,7 +22,7 @@ public class TargetEnchantmentPermanent extends TargetPermanent {
}
public TargetEnchantmentPermanent(int minNumTargets, int maxNumTargets) {
this(minNumTargets, maxNumTargets, StaticFilters.FILTER_ENCHANTMENT_PERMANENT, false);
this(minNumTargets, maxNumTargets, StaticFilters.FILTER_PERMANENT_ENCHANTMENT, false);
}
public TargetEnchantmentPermanent(int minNumTargets, int maxNumTargets, FilterEnchantmentPermanent filter, boolean notTarget) {