From 040062a3f47ec5c41c07602a707a9f44f90c57c8 Mon Sep 17 00:00:00 2001 From: slapshot5 Date: Mon, 30 Jan 2012 04:24:47 +0000 Subject: [PATCH] add Jeweled Bird (from Arabian Nights) --- .gitattributes | 1 + res/cardsfolder/j/jeweled_bird.txt | 14 ++++++++++++++ .../abilityfactory/AbilityFactoryChangeZone.java | 15 ++++++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 res/cardsfolder/j/jeweled_bird.txt diff --git a/.gitattributes b/.gitattributes index bc7af083420..23523c139c1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4421,6 +4421,7 @@ res/cardsfolder/j/jeska_warrior_adept.txt svneol=native#text/plain res/cardsfolder/j/jesters_cap.txt svneol=native#text/plain res/cardsfolder/j/jesters_mask.txt svneol=native#text/plain res/cardsfolder/j/jet_medallion.txt svneol=native#text/plain +res/cardsfolder/j/jeweled_bird.txt -text res/cardsfolder/j/jeweled_spirit.txt svneol=native#text/plain res/cardsfolder/j/jeweled_torque.txt -text res/cardsfolder/j/jhessian_balmgiver.txt -text diff --git a/res/cardsfolder/j/jeweled_bird.txt b/res/cardsfolder/j/jeweled_bird.txt new file mode 100644 index 00000000000..cf6510cf8bc --- /dev/null +++ b/res/cardsfolder/j/jeweled_bird.txt @@ -0,0 +1,14 @@ +Name:Jeweled Bird +ManaCost:1 +Types:Artifact +Text:no text +K:Remove CARDNAME from your deck before playing if you're not playing for ante. +A:AB$ ChangeZone | Cost$ T | Defined$ Self | Origin$ Battlefield | Destination$ Ante | RememberChanged$ True | SubAbility$ DBUnAnte | SpellDescription$ Put CARDNAME into the ante. If you do, put all other cards you own from the ante into your graveyard, then draw a card. +SVar:DBUnAnte:DB$ ChangeZoneAll | ConditionCheckSVar$ Y | ConditionSVarCompare$ GT0 | Origin$ Ante | Destination$ Graveyard | ChangeType$ Card.YouOwn+Other | SubAbility$ DBDraw +SVar:DBDraw:DB$ Draw | ConditionCheckSVar$ Y | ConditionSVarCompare$ GT0 | Defined$ You | NumCards$ 1 | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:Y:Remembered$Amount +SVar:RemAIDeck:True +SVar:RemRandomDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/jeweled_bird.jpg +End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityfactory/AbilityFactoryChangeZone.java b/src/main/java/forge/card/abilityfactory/AbilityFactoryChangeZone.java index bd24085553f..bc4d4e51b63 100644 --- a/src/main/java/forge/card/abilityfactory/AbilityFactoryChangeZone.java +++ b/src/main/java/forge/card/abilityfactory/AbilityFactoryChangeZone.java @@ -1744,6 +1744,11 @@ public final class AbilityFactoryChangeZone { sb.append("."); } + if (destination.equals(Zone.Ante)) { + sb.append("Ante").append(targetname); + sb.append("."); + } + if (destination.equals(Zone.Graveyard)) { sb.append("Put").append(targetname); sb.append(" from ").append(origin); @@ -1944,7 +1949,7 @@ public final class AbilityFactoryChangeZone { @Override public String getStackDescription() { - return AbilityFactoryChangeZone.changeZoneAllDescription(af, this); + return AbilityFactoryChangeZone.changeZoneAllStackDescription(af, this); } @Override @@ -1982,7 +1987,7 @@ public final class AbilityFactoryChangeZone { @Override public String getStackDescription() { - return AbilityFactoryChangeZone.changeZoneAllDescription(af, this); + return AbilityFactoryChangeZone.changeZoneAllStackDescription(af, this); } }; AbilityFactoryChangeZone.setMiscellaneous(af, spChangeZone); @@ -2014,7 +2019,7 @@ public final class AbilityFactoryChangeZone { @Override public String getStackDescription() { - return AbilityFactoryChangeZone.changeZoneAllDescription(af, this); + return AbilityFactoryChangeZone.changeZoneAllStackDescription(af, this); } @Override @@ -2186,7 +2191,7 @@ public final class AbilityFactoryChangeZone { /** *

- * changeZoneAllDescription. + * changeZoneAllStackDescription. *

* * @param af @@ -2195,7 +2200,7 @@ public final class AbilityFactoryChangeZone { * a {@link forge.card.spellability.SpellAbility} object. * @return a {@link java.lang.String} object. */ - private static String changeZoneAllDescription(final AbilityFactory af, final SpellAbility sa) { + private static String changeZoneAllStackDescription(final AbilityFactory af, final SpellAbility sa) { // TODO build Stack Description will need expansion as more cards are // added final StringBuilder sb = new StringBuilder();