From 7a6475b6b18d8161bad746fa0646402034cdff9c Mon Sep 17 00:00:00 2001 From: Sloth Date: Thu, 1 Sep 2011 13:42:21 +0000 Subject: [PATCH] - Added Treasure Hunt. --- .gitattributes | 1 + res/cardsfolder/treasure_hunt.txt | 9 +++++++++ .../abilityFactory/AbilityFactory_Reveal.java | 20 ++++++++++++------- 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 res/cardsfolder/treasure_hunt.txt diff --git a/.gitattributes b/.gitattributes index 081436a8a4b..e2a7eaaea7f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8112,6 +8112,7 @@ res/cardsfolder/t/twisted_image.txt svneol=native#text/plain res/cardsfolder/t/twitch.txt svneol=native#text/plain res/cardsfolder/t/typhoon.txt svneol=native#text/plain res/cardsfolder/t/tyrranax.txt svneol=native#text/plain +res/cardsfolder/treasure_hunt.txt -text res/cardsfolder/u/uktabi_drake.txt svneol=native#text/plain res/cardsfolder/u/uktabi_efreet.txt svneol=native#text/plain res/cardsfolder/u/uktabi_faerie.txt svneol=native#text/plain diff --git a/res/cardsfolder/treasure_hunt.txt b/res/cardsfolder/treasure_hunt.txt new file mode 100644 index 00000000000..727b5dba9dc --- /dev/null +++ b/res/cardsfolder/treasure_hunt.txt @@ -0,0 +1,9 @@ +Name:Treasure Hunt +ManaCost:1 U +Types:Sorcery +Text:no text +A:SP$ DigUntil | Cost$ 1 U | Valid$ Card.nonLand | ValidDescription$ nonland | RevealedDestination$ Hand | SpellDescription$ Reveal cards from the top of your library until you reveal a nonland card, then put all cards revealed this way into your hand. +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/treasure_hunt.jpg +SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/42.jpg +End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityFactory/AbilityFactory_Reveal.java b/src/main/java/forge/card/abilityFactory/AbilityFactory_Reveal.java index 3cc7bbdea7e..17a0f01415c 100644 --- a/src/main/java/forge/card/abilityFactory/AbilityFactory_Reveal.java +++ b/src/main/java/forge/card/abilityFactory/AbilityFactory_Reveal.java @@ -653,6 +653,7 @@ public final class AbilityFactory_Reveal { sb.append(". Put "); String found = params.get("FoundDestination"); + String revealed = params.get("RevealedDestination"); if (found != null) { sb.append(untilAmount > 1 ? "those cards" : "that card"); @@ -662,15 +663,20 @@ public final class AbilityFactory_Reveal { if (found.equals(Constant.Zone.Hand)) { sb.append("into his or her hand "); } + + if (revealed.equals(Constant.Zone.Graveyard)) { + sb.append("and all other cards into his or her graveyard."); + } + if (revealed.equals(Constant.Zone.Exile)) { + sb.append("and exile all other cards revealed this way."); + } + } else { + if (revealed.equals(Constant.Zone.Hand)) { + sb.append("all cards revealed this way into his or her hand"); + } } - String revealed = params.get("RevealedDestination"); - if (revealed.equals(Constant.Zone.Graveyard)) { - sb.append("and all other cards into his or her graveyard."); - } - if (revealed.equals(Constant.Zone.Exile)) { - sb.append("and exile all other cards revealed this way."); - } + Ability_Sub abSub = sa.getSubAbility(); if (abSub != null) {