From 3c98258e9754dfc8b4557ec5963fb5076f6f1cc4 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 24 Oct 2013 10:03:18 +0200 Subject: [PATCH] * Ulamog, the Infinite Gyre - done some clean up. --- .../UlamogTheInfiniteGyre.java | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java index 2d40543c159..4ae670ec9aa 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java @@ -28,22 +28,24 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.ZoneChangeTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromAnywhereTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.AnnihilatorAbility; import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; import mage.target.TargetPermanent; @@ -54,8 +56,6 @@ import mage.target.TargetPermanent; */ public class UlamogTheInfiniteGyre extends CardImpl { - private static final String effectText = "When Ulamog is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library"; - public UlamogTheInfiniteGyre(UUID ownerId) { super(ownerId, 12, "Ulamog, the Infinite Gyre", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{11}"); this.expansionSetCode = "ROE"; @@ -64,11 +64,15 @@ public class UlamogTheInfiniteGyre extends CardImpl { this.power = new MageInt(10); this.toughness = new MageInt(10); - + + // When you cast Ulamog, the Infinite Gyre, destroy target permanent. this.addAbility(new UlamogTheInfiniteGyreDestroyOnCastAbility()); + // Annihilator 4 (Whenever this creature attacks, defending player sacrifices four permanents.) this.addAbility(new AnnihilatorAbility(4)); + // Indestructible this.addAbility(IndestructibleAbility.getInstance()); - this.addAbility(new ZoneChangeTriggeredAbility(Zone.GRAVEYARD, new UlamogTheInfiniteGyreEnterGraveyardEffect(), effectText, false)); + // When Ulamog is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library. + this.addAbility(new PutIntoGraveFromAnywhereTriggeredAbility(new UlamogTheInfiniteGyreEnterGraveyardEffect(), false)); } public UlamogTheInfiniteGyre(final UlamogTheInfiniteGyre card) { @@ -83,11 +87,9 @@ public class UlamogTheInfiniteGyre extends CardImpl { class UlamogTheInfiniteGyreDestroyOnCastAbility extends TriggeredAbilityImpl { - private static final String abilityText = "When you cast {this}, destroy target permanent"; - UlamogTheInfiniteGyreDestroyOnCastAbility ( ) { super(Zone.STACK, new DestroyTargetEffect()); - this.addTarget(new TargetPermanent()); + this.addTarget(new TargetPermanent(true)); } UlamogTheInfiniteGyreDestroyOnCastAbility(UlamogTheInfiniteGyreDestroyOnCastAbility ability) { @@ -112,7 +114,7 @@ class UlamogTheInfiniteGyreDestroyOnCastAbility extends TriggeredAbilityImpl