Revert "add workaround for vanishing issue"

This reverts commit 2f0077e3cf.
This commit is contained in:
theelk801 2023-08-06 19:25:00 -04:00
parent 2f0077e3cf
commit 44a2b06690
19 changed files with 22 additions and 23 deletions

View file

@ -30,7 +30,7 @@ public final class AvenRiftwatcher extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Vanishing 3
this.addAbility(new VanishingAbility(this, 3));
this.addAbility(new VanishingAbility(3));
// When Aven Riftwatcher enters the battlefield or leaves the battlefield, you gain 2 life.
this.addAbility(new EntersBattlefieldOrLeavesSourceTriggeredAbility(new GainLifeEffect(2), false));

View file

@ -26,7 +26,7 @@ public final class Calciderm extends CardImpl {
this.addAbility(ShroudAbility.getInstance());
// Vanishing 4
this.addAbility(new VanishingAbility(this, 4));
this.addAbility(new VanishingAbility(4));
}
private Calciderm(final Calciderm card) {

View file

@ -31,7 +31,7 @@ public final class Chronozoa extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Vanishing 3 (This permanent enters the battlefield with three time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)
this.addAbility(new VanishingAbility(this, 3));
this.addAbility(new VanishingAbility(3));
// When Chronozoa is put into a graveyard from play, if it had no time counters on it, create two tokens that are copies of it.
Effect effect = new CreateTokenCopySourceEffect(2);

View file

@ -26,7 +26,7 @@ public final class DeadlyGrub extends CardImpl {
this.toughness = new MageInt(1);
// Vanishing 3
this.addAbility(new VanishingAbility(this, 3));
this.addAbility(new VanishingAbility(3));
// When Deadly Grub dies, if it had no time counters on it, create a 6/1 green Insect creature token with shroud.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new DeadlyGrubInsectToken(), 1)),

View file

@ -35,7 +35,7 @@ public final class DeadwoodTreefolk extends CardImpl {
this.toughness = new MageInt(6);
// Vanishing 3
this.addAbility(new VanishingAbility(this, 3));
this.addAbility(new VanishingAbility(3));
// When Deadwood Treefolk enters the battlefield or leaves the battlefield, return another target creature card from your graveyard to your hand.
Ability ability = new EntersBattlefieldOrLeavesSourceTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), false);

View file

@ -33,7 +33,7 @@ public final class DeepForestHermit extends CardImpl {
this.toughness = new MageInt(1);
// Vanishing 3
this.addAbility(new VanishingAbility(this, 3));
this.addAbility(new VanishingAbility(3));
// When Deep Forest Hermit enters the battlefield, create four 1/1 green Squirrel creature tokens.
this.addAbility(new EntersBattlefieldTriggeredAbility(

View file

@ -19,7 +19,7 @@ public final class FourKnocks extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
// Vanishing 4
this.addAbility(new VanishingAbility(this, 4));
this.addAbility(new VanishingAbility(4));
// At the beginning of your precombat main phase, draw a card.
this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(

View file

@ -27,7 +27,7 @@ public final class KeldonMarauders extends CardImpl {
this.toughness = new MageInt(3);
// Vanishing 2
this.addAbility(new VanishingAbility(this, 2));
this.addAbility(new VanishingAbility(2));
// When Keldon Marauders enters the battlefield or leaves the battlefield, it deals 1 damage to target player.
Ability ability = new EntersBattlefieldOrLeavesSourceTriggeredAbility(new DamageTargetEffect(1, "it"), false);

View file

@ -27,7 +27,7 @@ public final class LavacoreElemental extends CardImpl {
this.toughness = new MageInt(3);
// Vanishing 1
this.addAbility(new VanishingAbility(this, 1));
this.addAbility(new VanishingAbility(1));
// Whenever a creature you control deals combat damage to a player, put a time counter on Lavacore Elemental.
Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(1));

View file

@ -31,7 +31,7 @@ public final class LostAuramancers extends CardImpl {
this.toughness = new MageInt(3);
// Vanishing 3
this.addAbility(new VanishingAbility(this, 3));
this.addAbility(new VanishingAbility(3));
// When Lost Auramancers dies, if it had no time counters on it, you may search your library
// for an enchantment card and put it onto the battlefield. If you do, shuffle your library.

View file

@ -40,7 +40,7 @@ public final class MaelstromDjinn extends CardImpl {
new AddCountersSourceEffect(CounterType.TIME.createInstance(2))
);
ability.addEffect(new GainAbilitySourceEffect(
new VanishingAbility(this, 0), Duration.WhileOnBattlefield
new VanishingAbility(0), Duration.WhileOnBattlefield
).setText("and it gains vanishing"));
this.addAbility(ability);
}

View file

@ -36,7 +36,7 @@ public final class OutOfTime extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility(new OutOfTimePhaseOutEffect()));
// Vanishing
this.addAbility(new VanishingAbility(this, 0));
this.addAbility(new VanishingAbility(0));
}
private OutOfTime(final OutOfTime card) {

View file

@ -30,7 +30,7 @@ public final class RavagingRiftwurm extends CardImpl {
this.addAbility(new KickerAbility("{4}"));
// Vanishing 2
this.addAbility(new VanishingAbility(this, 2));
this.addAbility(new VanishingAbility(2));
// If Ravaging Riftwurm was kicked, it enters the battlefield with three additional time counters on it.
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(3)),

View file

@ -38,7 +38,7 @@ public final class RealityAcid extends CardImpl {
this.addAbility(ability);
// Vanishing 3
this.addAbility(new VanishingAbility(this, 3));
this.addAbility(new VanishingAbility(3));
// When Reality Acid leaves the battlefield, enchanted permanent's controller sacrifices it.
Effect effect = new SacrificeTargetEffect("enchanted permanent's controller sacrifices it");

View file

@ -35,7 +35,7 @@ public final class SoultetherGolem extends CardImpl {
this.toughness = new MageInt(3);
// Vanishing 1
this.addAbility(new VanishingAbility(this, 1));
this.addAbility(new VanishingAbility(1));
// Whenever another creature enters the battlefield under your control, put a time counter on Soultether Golem.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(

View file

@ -39,7 +39,7 @@ public final class Tidewalker extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(0), new PermanentsOnBattlefieldCount(filter), true), "with a time counter on it for each Island you control"));
// Vanishing
this.addAbility(new VanishingAbility(this, 0));
this.addAbility(new VanishingAbility(0));
// Tidewalker's power and toughness are each equal to the number of time counters on it.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessSourceEffect(new CountersSourceCount(CounterType.TIME))));

View file

@ -22,7 +22,7 @@ public final class WaningWurm extends CardImpl {
this.toughness = new MageInt(6);
// Vanishing 2
this.addAbility(new VanishingAbility(this, 2));
this.addAbility(new VanishingAbility(2));
}
private WaningWurm(final WaningWurm card) {

View file

@ -9,7 +9,6 @@ import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
import mage.cards.Card;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
@ -26,17 +25,17 @@ public class VanishingAbility extends EntersBattlefieldAbility {
private static final Condition condition = new SourceHasCounterCondition(CounterType.TIME);
private final int amount;
public VanishingAbility(Card card, int amount) {
public VanishingAbility(int amount) {
super(new AddCountersSourceEffect(CounterType.TIME.createInstance(amount)));
this.amount = amount;
card.addAbility(new ConditionalInterveningIfTriggeredAbility(
this.addSubAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(
new RemoveCounterSourceEffect(CounterType.TIME.createInstance()),
TargetController.YOU, false
), condition, "At the beginning of your upkeep, if this permanent " +
"has a time counter on it, remove a time counter from it."
).setRuleVisible(false));
card.addAbility(new VanishingTriggeredAbility());
this.addSubAbility(new VanishingTriggeredAbility());
}
private VanishingAbility(final VanishingAbility ability) {
@ -84,7 +83,7 @@ class VanishingTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (!CounterType.TIME.getName().equals(event.getData()) || !event.getSourceId().equals(getSourceId())) {
if (!CounterType.TIME.getName().equals(event.getData())) {
return false;
}
Permanent permanent = getSourcePermanentIfItStillExists(game);

View file

@ -127,7 +127,7 @@ Undaunted|new|
Undying|new|
Unearth|cost|
Unleash|new|
Vanishing|card, number|
Vanishing|number|
Vigilance|instance|
Ward|cost|
Wither|instance|