diff --git a/Mage.Sets/src/mage/cards/b/BonePicker.java b/Mage.Sets/src/mage/cards/b/BonePicker.java index cd48838663..7101ae17f7 100644 --- a/Mage.Sets/src/mage/cards/b/BonePicker.java +++ b/Mage.Sets/src/mage/cards/b/BonePicker.java @@ -20,7 +20,6 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.util.CardUtil; -import mage.watchers.common.MorbidWatcher; /** * @@ -36,7 +35,7 @@ public final class BonePicker extends CardImpl { this.toughness = new MageInt(2); // 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 this.addAbility(FlyingAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/b/BrimstoneVolley.java b/Mage.Sets/src/mage/cards/b/BrimstoneVolley.java index 4d7e74981a..c67f824590 100644 --- a/Mage.Sets/src/mage/cards/b/BrimstoneVolley.java +++ b/Mage.Sets/src/mage/cards/b/BrimstoneVolley.java @@ -8,7 +8,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.common.TargetAnyTarget; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; /** @@ -28,7 +27,6 @@ public final class BrimstoneVolley extends CardImpl { )); this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addHint(MorbidHint.instance); - this.getSpellAbility().addWatcher(new MorbidWatcher()); } private BrimstoneVolley(final BrimstoneVolley card) { diff --git a/Mage.Sets/src/mage/cards/c/CagedZombie.java b/Mage.Sets/src/mage/cards/c/CagedZombie.java index 9bd5d9875a..675a0a4c19 100644 --- a/Mage.Sets/src/mage/cards/c/CagedZombie.java +++ b/Mage.Sets/src/mage/cards/c/CagedZombie.java @@ -13,7 +13,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -35,7 +34,7 @@ public final class CagedZombie extends CardImpl { new ManaCostsImpl("{1}{B}"), MorbidCondition.instance ); ability.addCost(new TapSourceCost()); - this.addAbility(ability.addHint(MorbidHint.instance), new MorbidWatcher()); + this.addAbility(ability.addHint(MorbidHint.instance)); } private CagedZombie(final CagedZombie card) { diff --git a/Mage.Sets/src/mage/cards/d/DeathPriestOfMyrkul.java b/Mage.Sets/src/mage/cards/d/DeathPriestOfMyrkul.java index fcbdae45f3..51a906c2b8 100644 --- a/Mage.Sets/src/mage/cards/d/DeathPriestOfMyrkul.java +++ b/Mage.Sets/src/mage/cards/d/DeathPriestOfMyrkul.java @@ -15,7 +15,6 @@ import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.game.permanent.token.SkeletonToken; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -53,7 +52,7 @@ public final class DeathPriestOfMyrkul extends CardImpl { Zone.BATTLEFIELD, new DoIfCostPaid(new CreateTokenEffect(new SkeletonToken()), new GenericManaCost(1)), TargetController.YOU, MorbidCondition.instance, false - ).addHint(MorbidHint.instance), new MorbidWatcher()); + ).addHint(MorbidHint.instance)); } private DeathPriestOfMyrkul(final DeathPriestOfMyrkul card) { diff --git a/Mage.Sets/src/mage/cards/f/FungalRebirth.java b/Mage.Sets/src/mage/cards/f/FungalRebirth.java index 4c21ac4fab..3fc2a1b1aa 100644 --- a/Mage.Sets/src/mage/cards/f/FungalRebirth.java +++ b/Mage.Sets/src/mage/cards/f/FungalRebirth.java @@ -11,7 +11,6 @@ import mage.constants.CardType; import mage.filter.StaticFilters; import mage.game.permanent.token.SaprolingToken; import mage.target.common.TargetCardInYourGraveyard; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -28,7 +27,6 @@ public final class FungalRebirth extends CardImpl { getSpellAbility().addEffect( new ReturnFromGraveyardToHandTargetEffect().setText("Return target permanent card from your graveyard to your hand") ); - getSpellAbility().addWatcher(new MorbidWatcher()); getSpellAbility().addEffect(new ConditionalOneShotEffect( new CreateTokenEffect(new SaprolingToken(), 2), MorbidCondition.instance, diff --git a/Mage.Sets/src/mage/cards/l/LifeGoesOn.java b/Mage.Sets/src/mage/cards/l/LifeGoesOn.java index 0d9874f655..316b92ad52 100644 --- a/Mage.Sets/src/mage/cards/l/LifeGoesOn.java +++ b/Mage.Sets/src/mage/cards/l/LifeGoesOn.java @@ -9,7 +9,6 @@ import mage.abilities.hint.common.MorbidHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; 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. - 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")); this.getSpellAbility().addHint(MorbidHint.instance); } diff --git a/Mage.Sets/src/mage/cards/l/LilianasDevotee.java b/Mage.Sets/src/mage/cards/l/LilianasDevotee.java index 7b37c8b744..5ec2241310 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasDevotee.java +++ b/Mage.Sets/src/mage/cards/l/LilianasDevotee.java @@ -18,7 +18,6 @@ import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.game.permanent.token.ZombieToken; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -49,7 +48,7 @@ public final class LilianasDevotee extends CardImpl { ), TargetController.YOU, false), MorbidCondition.instance, "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." - ).addHint(MorbidHint.instance), new MorbidWatcher()); + ).addHint(MorbidHint.instance)); } private LilianasDevotee(final LilianasDevotee card) { diff --git a/Mage.Sets/src/mage/cards/l/LilianasScrounger.java b/Mage.Sets/src/mage/cards/l/LilianasScrounger.java index 7175d79bb6..bea115fe3a 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasScrounger.java +++ b/Mage.Sets/src/mage/cards/l/LilianasScrounger.java @@ -20,7 +20,6 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -42,7 +41,7 @@ public final class LilianasScrounger extends CardImpl { new LilianasScroungerEffect(), TargetController.ANY, false ), 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." - ).addHint(MorbidHint.instance), new MorbidWatcher()); + ).addHint(MorbidHint.instance)); } private LilianasScrounger(final LilianasScrounger card) { diff --git a/Mage.Sets/src/mage/cards/p/PurpleWorm.java b/Mage.Sets/src/mage/cards/p/PurpleWorm.java index 441072a9c9..78e3b026b5 100644 --- a/Mage.Sets/src/mage/cards/p/PurpleWorm.java +++ b/Mage.Sets/src/mage/cards/p/PurpleWorm.java @@ -13,7 +13,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -34,7 +33,7 @@ public final class PurpleWorm extends CardImpl { Zone.ALL, new SpellCostReductionSourceEffect(2, MorbidCondition.instance) ); ability.setRuleAtTheTop(true); - this.addAbility(ability.addHint(MorbidHint.instance), new MorbidWatcher()); + this.addAbility(ability.addHint(MorbidHint.instance)); // Ward {2} this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}"))); diff --git a/Mage.Sets/src/mage/cards/r/ReaperFromTheAbyss.java b/Mage.Sets/src/mage/cards/r/ReaperFromTheAbyss.java index 66c46bee95..adefb7338a 100644 --- a/Mage.Sets/src/mage/cards/r/ReaperFromTheAbyss.java +++ b/Mage.Sets/src/mage/cards/r/ReaperFromTheAbyss.java @@ -1,50 +1,47 @@ - - package mage.cards.r; -import java.util.UUID; import mage.MageInt; 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.hint.common.MorbidHint; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Zone; +import mage.constants.*; +import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreaturePermanent; -import mage.watchers.Watcher; -import mage.watchers.common.MorbidWatcher; +import mage.target.TargetPermanent; + +import java.util.UUID; /** - * * @author BetaSteward_at_googlemail.com */ 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 { filter.add(Predicates.not(SubType.DEMON.getPredicate())); } 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.power = new MageInt(6); this.toughness = new MageInt(6); this.addAbility(FlyingAbility.getInstance()); - Ability ability = new ReaperFromTheAbyssAbility(); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); + Ability ability = new BeginningOfEndStepTriggeredAbility( + Zone.BATTLEFIELD, new DestroyTargetEffect(), + TargetController.ANY, MorbidCondition.instance, false + ); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability.setAbilityWord(AbilityWord.MORBID).addHint(MorbidHint.instance)); } 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 "Morbid — At the beginning of each end step, if a creature died this turn, destroy target non-demon creature."; - } -} diff --git a/Mage.Sets/src/mage/cards/s/ShessraDeathsWhisper.java b/Mage.Sets/src/mage/cards/s/ShessraDeathsWhisper.java index e7d9f9724b..28c22acdaf 100644 --- a/Mage.Sets/src/mage/cards/s/ShessraDeathsWhisper.java +++ b/Mage.Sets/src/mage/cards/s/ShessraDeathsWhisper.java @@ -14,7 +14,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -42,7 +41,7 @@ public final class ShessraDeathsWhisper extends CardImpl { this.addAbility(new BeginningOfEndStepTriggeredAbility( Zone.BATTLEFIELD, new DoIfCostPaid(new DrawCardSourceControllerEffect(1), 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) { diff --git a/Mage.Sets/src/mage/cards/s/SkeletalSwarming.java b/Mage.Sets/src/mage/cards/s/SkeletalSwarming.java index 1a7ff137ac..b091a84e19 100644 --- a/Mage.Sets/src/mage/cards/s/SkeletalSwarming.java +++ b/Mage.Sets/src/mage/cards/s/SkeletalSwarming.java @@ -25,7 +25,6 @@ import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.game.permanent.token.SkeletonToken; -import mage.watchers.common.MorbidWatcher; 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. " + "If a creature died this turn, create two of those tokens instead" ), TargetController.YOU, false - ).addHint(MorbidHint.instance), new MorbidWatcher()); + ).addHint(MorbidHint.instance)); } private SkeletalSwarming(final SkeletalSwarming card) { diff --git a/Mage.Sets/src/mage/cards/t/TwinbladeAssassins.java b/Mage.Sets/src/mage/cards/t/TwinbladeAssassins.java index 6011bd9543..617b8c13c6 100644 --- a/Mage.Sets/src/mage/cards/t/TwinbladeAssassins.java +++ b/Mage.Sets/src/mage/cards/t/TwinbladeAssassins.java @@ -11,7 +11,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.TargetController; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -34,7 +33,7 @@ public final class TwinbladeAssassins extends CardImpl { new DrawCardSourceControllerEffect(1), TargetController.YOU, false ), MorbidCondition.instance, "At the beginning of your end step, " + "if a creature died this turn, draw a card." - ).addHint(MorbidHint.instance), new MorbidWatcher()); + ).addHint(MorbidHint.instance)); } private TwinbladeAssassins(final TwinbladeAssassins card) { diff --git a/Mage.Sets/src/mage/cards/w/WarlockClass.java b/Mage.Sets/src/mage/cards/w/WarlockClass.java index d094f88a3a..8b325b0cf8 100644 --- a/Mage.Sets/src/mage/cards/w/WarlockClass.java +++ b/Mage.Sets/src/mage/cards/w/WarlockClass.java @@ -20,7 +20,6 @@ import mage.constants.*; import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; -import mage.watchers.common.MorbidWatcher; import mage.watchers.common.PlayerLostLifeWatcher; import java.util.UUID; @@ -44,7 +43,7 @@ public final class WarlockClass extends CardImpl { new LoseLifeOpponentsEffect(1), TargetController.YOU, false ), MorbidCondition.instance, "At the beginning of your end step, " + "if a creature died this turn, each opponent loses 1 life." - ).addHint(MorbidHint.instance), new MorbidWatcher()); + ).addHint(MorbidHint.instance)); // {1}{B}: Level 2 this.addAbility(new ClassLevelAbility(2, "{1}{B}")); diff --git a/Mage.Sets/src/mage/cards/z/ZombieOgre.java b/Mage.Sets/src/mage/cards/z/ZombieOgre.java index 47d2efc414..43f04c185f 100644 --- a/Mage.Sets/src/mage/cards/z/ZombieOgre.java +++ b/Mage.Sets/src/mage/cards/z/ZombieOgre.java @@ -11,7 +11,6 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.watchers.common.MorbidWatcher; import java.util.UUID; @@ -32,7 +31,7 @@ public final class ZombieOgre extends CardImpl { this.addAbility(new BeginningOfEndStepTriggeredAbility( Zone.BATTLEFIELD, new VentureIntoTheDungeonEffect(), TargetController.YOU, MorbidCondition.instance, false - ).addHint(MorbidHint.instance), new MorbidWatcher()); + ).addHint(MorbidHint.instance)); } private ZombieOgre(final ZombieOgre card) {