From d81300d786548b5b2a3d59c5f6e448becdbecc69 Mon Sep 17 00:00:00 2001 From: Sloth Date: Wed, 19 Oct 2011 14:43:06 +0000 Subject: [PATCH] - Removed the keyword "When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library." --- res/cardsfolder/p/purity.txt | 3 +- src/main/java/forge/DefaultPlayerZone.java | 41 ---------------------- src/main/java/forge/IPlayerZone.java | 7 ---- 3 files changed, 2 insertions(+), 49 deletions(-) diff --git a/res/cardsfolder/p/purity.txt b/res/cardsfolder/p/purity.txt index 38eb5fabc4a..67de8eafa6b 100644 --- a/res/cardsfolder/p/purity.txt +++ b/res/cardsfolder/p/purity.txt @@ -4,7 +4,8 @@ Types:Creature Elemental Incarnation Text:If noncombat damage would be dealt to you, prevent that damage. You gain life equal to the damage prevented this way. PT:6/6 K:Flying -K:When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library. +T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library. +SVar:TrigShuffle:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Library | Shuffle$ True | Defined$ Self SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/purity.jpg SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/37.jpg diff --git a/src/main/java/forge/DefaultPlayerZone.java b/src/main/java/forge/DefaultPlayerZone.java index 8152527a773..65441b65295 100644 --- a/src/main/java/forge/DefaultPlayerZone.java +++ b/src/main/java/forge/DefaultPlayerZone.java @@ -62,21 +62,6 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl c.getOwner().shuffle(); return; } - //slight difference from above I guess, the card gets put into the grave first, then shuffled into library. - //key is that this would trigger abilities that trigger on cards hitting the graveyard - else if (is(Zone.Graveyard) - && c.hasKeyword("When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library.")) - { - PlayerZone lib = c.getOwner().getZone(Constant.Zone.Library); - PlayerZone grave = c.getOwner().getZone(Constant.Zone.Graveyard); - - grave.addOnce(c); - grave.remove(c); - lib.add(c); - c.getOwner().shuffle(); - return; - } - if (is(Zone.Graveyard) && c.hasKeyword("When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library.")) { @@ -98,7 +83,6 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl return; } - c.addObserver(this); c.setTurnInZone(AllZone.getPhase().getTurn()); @@ -107,31 +91,6 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl update(); } - //hack... use for adding Dread / Serra Avenger to grave - - /** - * - * @param o a {@link java.lang.Object} object. - */ - public final void addOnce(final Object o) { - Card c = (Card) o; - - //Immutable cards are usually emblems,effects and the mana pool and we don't want to log those. - if (!c.isImmutable()) { - cardsAddedThisTurn.add(c); - if (AllZone.getZoneOf(c) != null) { - cardsAddedThisTurnSource.add(AllZone.getZoneOf(c).getZoneType()); - } else { - cardsAddedThisTurnSource.add(null); - } - } - - c.addObserver(this); - - cards.add((Card) c); - update(); - } - /** * * @param ob an Observable diff --git a/src/main/java/forge/IPlayerZone.java b/src/main/java/forge/IPlayerZone.java index ae11057a55c..5b3a6578cfd 100644 --- a/src/main/java/forge/IPlayerZone.java +++ b/src/main/java/forge/IPlayerZone.java @@ -45,13 +45,6 @@ interface IPlayerZone { */ void add(Card c, int index); - /** - *

addOnce.

- * - * @param o a {@link java.lang.Object} object. - */ - void addOnce(Object o); - /** *

get.

*