diff --git a/res/cards.txt b/res/cards.txt index 34bc5fb2969..a3e993bd3a6 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -246,7 +246,7 @@ CARDNAME can't be countered. Flying Protection from colored spells Annihilator 6 -When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and shuffle it into its owner's library instead. +When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library. Great Sable Stag 1 G G @@ -320,7 +320,7 @@ Legendary Creature Eldrazi When you cast Kozilek, Butcher of Truth, draw four cards. 12/12 Annihilator 4 -When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and shuffle it into its owner's library instead. +When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library. Legacy Weapon 7 @@ -350,7 +350,7 @@ When you cast Ulamog, the Infinite Gyre, destroy target permanent. 10/10 Indestructible Annihilator 4 -When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and shuffle it into its owner's library instead. +When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library. Mnemonic Wall 4 U diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 71523856828..d72bd38c81f 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -4048,26 +4048,28 @@ public class CardFactory implements NewConstants { color = "B"; } else if(player.equals(Constant.Player.Human)) { Object q = AllZone.Display.getChoiceOptional("Select type of creature", choices); - if(q.equals("Citizen")) { - type = "Citizen"; - imageName = "W 1 1 Citizen"; - color = "W"; - } else if(q.equals("Camarid")) { - type = "Camarid"; - imageName = "U 1 1 Camarid"; - color = "U"; - } else if(q.equals("Thrull")) { - type = "Thrull"; - imageName = "B 1 1 Thrull"; - color = "B"; - } else if(q.equals("Goblin")) { - type = "Goblin"; - imageName = "R 1 1 Goblin"; - color = "R"; - } else if(q.equals("Saproling")) { - type = "Saproling"; - imageName = "G 1 1 Saproling"; - color = "G"; + if(q != null){ + if(q.equals("Citizen")) { + type = "Citizen"; + imageName = "W 1 1 Citizen"; + color = "W"; + } else if(q.equals("Camarid")) { + type = "Camarid"; + imageName = "U 1 1 Camarid"; + color = "U"; + } else if(q.equals("Thrull")) { + type = "Thrull"; + imageName = "B 1 1 Thrull"; + color = "B"; + } else if(q.equals("Goblin")) { + type = "Goblin"; + imageName = "R 1 1 Goblin"; + color = "R"; + } else if(q.equals("Saproling")) { + type = "Saproling"; + imageName = "G 1 1 Saproling"; + color = "G"; + } } } card.setChosenType(type); @@ -21002,6 +21004,7 @@ public class CardFactory implements NewConstants { }//*************** END ************ END ************************** + // Cards with Cycling abilities // -1 means keyword "Cycling" not found diff --git a/src/forge/DefaultPlayerZone.java b/src/forge/DefaultPlayerZone.java index 6bd597667a9..01b30e0d4b4 100644 --- a/src/forge/DefaultPlayerZone.java +++ b/src/forge/DefaultPlayerZone.java @@ -34,6 +34,18 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl return; } + if (is("Graveyard") + && c.getKeyword().contains("When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and its owner shuffles his or her graveyard into his or her library.")) + { + PlayerZone lib = AllZone.getZone(Constant.Zone.Library, c.getOwner()); + PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, c.getOwner()); + lib.add(c); + lib.add(grave); + grave.reset(); + AllZone.GameAction.shuffle(c.getOwner()); + return; + } + if (c.isUnearthed() && (is("Graveyard") || is("Hand"))) { PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, c.getOwner()); diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 598bbbbddae..46a16a2d120 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -2789,7 +2789,7 @@ public class GameActionUtil { String[] choices = {"Yes", "No, target a creature instead"}; Object q = AllZone.Display.getChoiceOptional("Select computer as target?", choices); - if(q.equals("Yes")) AllZone.GameAction.getPlayerLife(Constant.Player.Computer).subtractLife( + if(q != null && q.equals("Yes")) AllZone.GameAction.getPlayerLife(Constant.Player.Computer).subtractLife( 1); else { CardList cards = new CardList(oppPlay.getCards()); @@ -6656,7 +6656,7 @@ public class GameActionUtil { String[] choices = {"Yes", "No"}; Object q = AllZone.Display.getChoiceOptional("Return Nether Spirit to play?", choices); - if(q.equals("Yes")) returnNether = true; + if(q != null && q.equals("Yes")) returnNether = true; } if(player.equals(Constant.Player.Computer) || returnNether) { @@ -8388,7 +8388,7 @@ public class GameActionUtil { String[] choices = {"Yes", "No, target a creature instead"}; Object q = AllZone.Display.getChoiceOptional("Select computer as target?", choices); - if(q.equals("Yes")) AllZone.GameAction.getPlayerLife(Constant.Player.Computer).subtractLife( + if(q != null && q.equals("Yes")) AllZone.GameAction.getPlayerLife(Constant.Player.Computer).subtractLife( hondlist.size()); else { CardList cards = new CardList(oppPlay.getCards()); diff --git a/src/forge/Phase.java b/src/forge/Phase.java index 42454c92d1c..bb5c0a13418 100644 --- a/src/forge/Phase.java +++ b/src/forge/Phase.java @@ -161,7 +161,7 @@ public class Phase extends MyObservable String[] choices = {"Yes", "No"}; Object q = null; q = AllZone.Display.getChoiceOptional("Untap " + crd + "?", choices); - if(q.equals("Yes")) { + if("Yes".equals(q)) { //AllZone.Stack.add(ability); humanExtraTurns--; crd.untap(); diff --git a/src/forge/gui/ListChooser.java b/src/forge/gui/ListChooser.java index 90284b4573d..88a36fe7074 100644 --- a/src/forge/gui/ListChooser.java +++ b/src/forge/gui/ListChooser.java @@ -158,7 +158,7 @@ public class ListChooser { d.setVisible(true); d.dispose(); value = (Integer) p.getValue(); - if(value != OK_OPTION) jList.clearSelection(); + if(value == null || value != OK_OPTION) jList.clearSelection(); //can't stop closing by ESC, so repeat if cancelled } while(minChoices != 0 && value != OK_OPTION); //this assert checks if we really don't return on a cancel if input is mandatory