removed unnecessary morbid watchers

This commit is contained in:
Evan Kranzler 2021-07-17 09:03:57 -04:00
parent 167b488bf8
commit 58dac0a890
15 changed files with 27 additions and 79 deletions

View file

@ -20,7 +20,6 @@ import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.util.CardUtil; import mage.util.CardUtil;
import mage.watchers.common.MorbidWatcher;
/** /**
* *
@ -36,7 +35,7 @@ public final class BonePicker extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Bone Picker costs {3} less to cast if a creature died this turn. // Bone Picker costs {3} less to cast if a creature died this turn.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new BonePickerAdjustingCostsEffect()).addHint(MorbidHint.instance), new MorbidWatcher()); this.addAbility(new SimpleStaticAbility(Zone.ALL, new BonePickerAdjustingCostsEffect()).addHint(MorbidHint.instance));
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());

View file

@ -8,7 +8,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
/** /**
@ -28,7 +27,6 @@ public final class BrimstoneVolley extends CardImpl {
)); ));
this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addTarget(new TargetAnyTarget());
this.getSpellAbility().addHint(MorbidHint.instance); this.getSpellAbility().addHint(MorbidHint.instance);
this.getSpellAbility().addWatcher(new MorbidWatcher());
} }
private BrimstoneVolley(final BrimstoneVolley card) { private BrimstoneVolley(final BrimstoneVolley card) {

View file

@ -13,7 +13,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -35,7 +34,7 @@ public final class CagedZombie extends CardImpl {
new ManaCostsImpl("{1}{B}"), MorbidCondition.instance new ManaCostsImpl("{1}{B}"), MorbidCondition.instance
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability.addHint(MorbidHint.instance), new MorbidWatcher()); this.addAbility(ability.addHint(MorbidHint.instance));
} }
private CagedZombie(final CagedZombie card) { private CagedZombie(final CagedZombie card) {

View file

@ -15,7 +15,6 @@ import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.game.permanent.token.SkeletonToken; import mage.game.permanent.token.SkeletonToken;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -53,7 +52,7 @@ public final class DeathPriestOfMyrkul extends CardImpl {
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new DoIfCostPaid(new CreateTokenEffect(new SkeletonToken()), new GenericManaCost(1)), new DoIfCostPaid(new CreateTokenEffect(new SkeletonToken()), new GenericManaCost(1)),
TargetController.YOU, MorbidCondition.instance, false TargetController.YOU, MorbidCondition.instance, false
).addHint(MorbidHint.instance), new MorbidWatcher()); ).addHint(MorbidHint.instance));
} }
private DeathPriestOfMyrkul(final DeathPriestOfMyrkul card) { private DeathPriestOfMyrkul(final DeathPriestOfMyrkul card) {

View file

@ -11,7 +11,6 @@ import mage.constants.CardType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.permanent.token.SaprolingToken; import mage.game.permanent.token.SaprolingToken;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -28,7 +27,6 @@ public final class FungalRebirth extends CardImpl {
getSpellAbility().addEffect( getSpellAbility().addEffect(
new ReturnFromGraveyardToHandTargetEffect().setText("Return target permanent card from your graveyard to your hand") new ReturnFromGraveyardToHandTargetEffect().setText("Return target permanent card from your graveyard to your hand")
); );
getSpellAbility().addWatcher(new MorbidWatcher());
getSpellAbility().addEffect(new ConditionalOneShotEffect( getSpellAbility().addEffect(new ConditionalOneShotEffect(
new CreateTokenEffect(new SaprolingToken(), 2), new CreateTokenEffect(new SaprolingToken(), 2),
MorbidCondition.instance, MorbidCondition.instance,

View file

@ -9,7 +9,6 @@ import mage.abilities.hint.common.MorbidHint;
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.watchers.common.MorbidWatcher;
/** /**
* *
@ -22,7 +21,6 @@ public final class LifeGoesOn extends CardImpl {
// You gain 4 life. If a creature died this turn, you gain 8 life instead. // You gain 4 life. If a creature died this turn, you gain 8 life instead.
getSpellAbility().addWatcher(new MorbidWatcher());
getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(8), new GainLifeEffect(4), MorbidCondition.instance, "You gain 4 life. If a creature died this turn, you gain 8 life instead")); getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(8), new GainLifeEffect(4), MorbidCondition.instance, "You gain 4 life. If a creature died this turn, you gain 8 life instead"));
this.getSpellAbility().addHint(MorbidHint.instance); this.getSpellAbility().addHint(MorbidHint.instance);
} }

View file

@ -18,7 +18,6 @@ import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.ZombieToken; import mage.game.permanent.token.ZombieToken;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -49,7 +48,7 @@ public final class LilianasDevotee extends CardImpl {
), TargetController.YOU, false), MorbidCondition.instance, ), TargetController.YOU, false), MorbidCondition.instance,
"At the beginning of your end step, if a creature died this turn, " + "At the beginning of your end step, if a creature died this turn, " +
"you may pay {1}{B}. If you do, create a 2/2 black Zombie creature token." "you may pay {1}{B}. If you do, create a 2/2 black Zombie creature token."
).addHint(MorbidHint.instance), new MorbidWatcher()); ).addHint(MorbidHint.instance));
} }
private LilianasDevotee(final LilianasDevotee card) { private LilianasDevotee(final LilianasDevotee card) {

View file

@ -20,7 +20,6 @@ import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -42,7 +41,7 @@ public final class LilianasScrounger extends CardImpl {
new LilianasScroungerEffect(), TargetController.ANY, false new LilianasScroungerEffect(), TargetController.ANY, false
), MorbidCondition.instance, "At the beginning of each end step, " + ), MorbidCondition.instance, "At the beginning of each end step, " +
"if a creature died this turn, you may put a loyalty counter on a Liliana planeswalker you control." "if a creature died this turn, you may put a loyalty counter on a Liliana planeswalker you control."
).addHint(MorbidHint.instance), new MorbidWatcher()); ).addHint(MorbidHint.instance));
} }
private LilianasScrounger(final LilianasScrounger card) { private LilianasScrounger(final LilianasScrounger card) {

View file

@ -13,7 +13,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -34,7 +33,7 @@ public final class PurpleWorm extends CardImpl {
Zone.ALL, new SpellCostReductionSourceEffect(2, MorbidCondition.instance) Zone.ALL, new SpellCostReductionSourceEffect(2, MorbidCondition.instance)
); );
ability.setRuleAtTheTop(true); ability.setRuleAtTheTop(true);
this.addAbility(ability.addHint(MorbidHint.instance), new MorbidWatcher()); this.addAbility(ability.addHint(MorbidHint.instance));
// Ward {2} // Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}"))); this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));

View file

@ -1,50 +1,47 @@
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.condition.common.MorbidCondition;
import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.hint.common.MorbidHint;
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.SubType; import mage.filter.FilterPermanent;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.game.Game; import mage.target.TargetPermanent;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import java.util.UUID;
import mage.target.common.TargetCreaturePermanent;
import mage.watchers.Watcher;
import mage.watchers.common.MorbidWatcher;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public final class ReaperFromTheAbyss extends CardImpl { public final class ReaperFromTheAbyss extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Demon creature"); private static final FilterPermanent filter = new FilterCreaturePermanent("non-Demon creature");
static { static {
filter.add(Predicates.not(SubType.DEMON.getPredicate())); filter.add(Predicates.not(SubType.DEMON.getPredicate()));
} }
public ReaperFromTheAbyss(UUID ownerId, CardSetInfo setInfo) { public ReaperFromTheAbyss(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}");
this.subtype.add(SubType.DEMON); this.subtype.add(SubType.DEMON);
this.power = new MageInt(6); this.power = new MageInt(6);
this.toughness = new MageInt(6); this.toughness = new MageInt(6);
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
Ability ability = new ReaperFromTheAbyssAbility(); Ability ability = new BeginningOfEndStepTriggeredAbility(
ability.addTarget(new TargetCreaturePermanent(filter)); Zone.BATTLEFIELD, new DestroyTargetEffect(),
this.addAbility(ability); TargetController.ANY, MorbidCondition.instance, false
);
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability.setAbilityWord(AbilityWord.MORBID).addHint(MorbidHint.instance));
} }
private ReaperFromTheAbyss(final ReaperFromTheAbyss card) { private ReaperFromTheAbyss(final ReaperFromTheAbyss card) {
@ -57,35 +54,3 @@ public final class ReaperFromTheAbyss extends CardImpl {
} }
} }
class ReaperFromTheAbyssAbility extends TriggeredAbilityImpl {
public ReaperFromTheAbyssAbility() {
super(Zone.BATTLEFIELD, new DestroyTargetEffect(), false);
}
public ReaperFromTheAbyssAbility(final ReaperFromTheAbyssAbility ability) {
super(ability);
}
@Override
public ReaperFromTheAbyssAbility copy() {
return new ReaperFromTheAbyssAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.END_TURN_STEP_PRE;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Watcher watcher = game.getState().getWatcher(MorbidWatcher.class);
return watcher != null && watcher.conditionMet();
}
@Override
public String getRule() {
return "<i>Morbid</i> &mdash; At the beginning of each end step, if a creature died this turn, destroy target non-demon creature.";
}
}

View file

@ -14,7 +14,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -42,7 +41,7 @@ public final class ShessraDeathsWhisper extends CardImpl {
this.addAbility(new BeginningOfEndStepTriggeredAbility( this.addAbility(new BeginningOfEndStepTriggeredAbility(
Zone.BATTLEFIELD, new DoIfCostPaid(new DrawCardSourceControllerEffect(1), Zone.BATTLEFIELD, new DoIfCostPaid(new DrawCardSourceControllerEffect(1),
new PayLifeCost(2)), TargetController.YOU, MorbidCondition.instance, false new PayLifeCost(2)), TargetController.YOU, MorbidCondition.instance, false
).addHint(MorbidHint.instance).withFlavorWord("Whispers of the Grave"), new MorbidWatcher()); ).addHint(MorbidHint.instance).withFlavorWord("Whispers of the Grave"));
} }
private ShessraDeathsWhisper(final ShessraDeathsWhisper card) { private ShessraDeathsWhisper(final ShessraDeathsWhisper card) {

View file

@ -25,7 +25,6 @@ import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.SkeletonToken; import mage.game.permanent.token.SkeletonToken;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -59,7 +58,7 @@ public final class SkeletalSwarming extends CardImpl {
MorbidCondition.instance, "create a tapped 1/1 black Skeleton creature token. " + MorbidCondition.instance, "create a tapped 1/1 black Skeleton creature token. " +
"If a creature died this turn, create two of those tokens instead" "If a creature died this turn, create two of those tokens instead"
), TargetController.YOU, false ), TargetController.YOU, false
).addHint(MorbidHint.instance), new MorbidWatcher()); ).addHint(MorbidHint.instance));
} }
private SkeletalSwarming(final SkeletalSwarming card) { private SkeletalSwarming(final SkeletalSwarming card) {

View file

@ -11,7 +11,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -34,7 +33,7 @@ public final class TwinbladeAssassins extends CardImpl {
new DrawCardSourceControllerEffect(1), TargetController.YOU, false new DrawCardSourceControllerEffect(1), TargetController.YOU, false
), MorbidCondition.instance, "At the beginning of your end step, " + ), MorbidCondition.instance, "At the beginning of your end step, " +
"if a creature died this turn, draw a card." "if a creature died this turn, draw a card."
).addHint(MorbidHint.instance), new MorbidWatcher()); ).addHint(MorbidHint.instance));
} }
private TwinbladeAssassins(final TwinbladeAssassins card) { private TwinbladeAssassins(final TwinbladeAssassins card) {

View file

@ -20,7 +20,6 @@ import mage.constants.*;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.watchers.common.MorbidWatcher;
import mage.watchers.common.PlayerLostLifeWatcher; import mage.watchers.common.PlayerLostLifeWatcher;
import java.util.UUID; import java.util.UUID;
@ -44,7 +43,7 @@ public final class WarlockClass extends CardImpl {
new LoseLifeOpponentsEffect(1), TargetController.YOU, false new LoseLifeOpponentsEffect(1), TargetController.YOU, false
), MorbidCondition.instance, "At the beginning of your end step, " + ), MorbidCondition.instance, "At the beginning of your end step, " +
"if a creature died this turn, each opponent loses 1 life." "if a creature died this turn, each opponent loses 1 life."
).addHint(MorbidHint.instance), new MorbidWatcher()); ).addHint(MorbidHint.instance));
// {1}{B}: Level 2 // {1}{B}: Level 2
this.addAbility(new ClassLevelAbility(2, "{1}{B}")); this.addAbility(new ClassLevelAbility(2, "{1}{B}"));

View file

@ -11,7 +11,6 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID; import java.util.UUID;
@ -32,7 +31,7 @@ public final class ZombieOgre extends CardImpl {
this.addAbility(new BeginningOfEndStepTriggeredAbility( this.addAbility(new BeginningOfEndStepTriggeredAbility(
Zone.BATTLEFIELD, new VentureIntoTheDungeonEffect(), Zone.BATTLEFIELD, new VentureIntoTheDungeonEffect(),
TargetController.YOU, MorbidCondition.instance, false TargetController.YOU, MorbidCondition.instance, false
).addHint(MorbidHint.instance), new MorbidWatcher()); ).addHint(MorbidHint.instance));
} }
private ZombieOgre(final ZombieOgre card) { private ZombieOgre(final ZombieOgre card) {