From 77f19c157a0f482fd9ed675ff6cbd10612f8a3a1 Mon Sep 17 00:00:00 2001 From: BetaSteward Date: Fri, 14 Oct 2011 11:34:51 -0400 Subject: [PATCH] refactoring and cleanup --- .../sets/mirrodinbesieged/GlissaTheTraitor.java | 11 ++++------- .../mage/sets/mirrodinbesieged/MassacreWurm.java | 15 ++++++--------- .../mage/sets/mirrodinbesieged/Sangromancer.java | 11 ++++------- .../mage/sets/scarsofmirrodin/ViridianRevel.java | 13 +++++-------- Mage.Sets/src/mage/sets/zendikar/NissaRevane.java | 1 - .../common/CreatureDiesTriggeredAbility.java | 13 +++++-------- ...iesAndDealtDamageThisTurnTriggeredAbility.java | 13 +++++-------- ...AnotherCreatureYouControlTriggeredAbility.java | 3 +-- .../common/DiesAttachedTriggeredAbility.java | 11 ++++------- .../continious/GainAbilityTargetEffect.java | 3 ++- Mage/src/mage/watchers/common/MorbidWatcher.java | 11 ++++------- 11 files changed, 40 insertions(+), 65 deletions(-) diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/GlissaTheTraitor.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/GlissaTheTraitor.java index 1951886cd3..890d12082f 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/GlissaTheTraitor.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/GlissaTheTraitor.java @@ -102,13 +102,10 @@ class GlissaTheTraitorTriggeredAbility extends TriggeredAbilityImpl 0 ? ability.getEffects().get(0).getOutcome() : Outcome.AddAbility); this.ability = ability; } diff --git a/Mage/src/mage/watchers/common/MorbidWatcher.java b/Mage/src/mage/watchers/common/MorbidWatcher.java index fc53c6d84f..dfb2449abd 100644 --- a/Mage/src/mage/watchers/common/MorbidWatcher.java +++ b/Mage/src/mage/watchers/common/MorbidWatcher.java @@ -55,13 +55,10 @@ public class MorbidWatcher extends WatcherImpl { public void watch(GameEvent event, Game game) { if (condition == true) //no need to check - condition has already occured return; - if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { - ZoneChangeEvent zEvent = (ZoneChangeEvent)event; - if (zEvent.getFromZone() == Constants.Zone.BATTLEFIELD && zEvent.getToZone() == Constants.Zone.GRAVEYARD) { - Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Constants.Zone.BATTLEFIELD); - if (p != null && p.getCardType().contains(CardType.CREATURE)) { - condition = true; - } + if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) { + Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Constants.Zone.BATTLEFIELD); + if (p != null && p.getCardType().contains(CardType.CREATURE)) { + condition = true; } } }