diff --git a/.gitattributes b/.gitattributes index c70a7284435..ac8d23a4e1d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -872,6 +872,7 @@ res/cardsfolder/b/blurred_mongoose.txt svneol=native#text/plain res/cardsfolder/b/boa_constrictor.txt svneol=native#text/plain res/cardsfolder/b/boar_umbra.txt svneol=native#text/plain res/cardsfolder/b/boartusk_liege.txt svneol=native#text/plain +res/cardsfolder/b/body_double.txt -text res/cardsfolder/b/body_of_jukai.txt svneol=native#text/plain res/cardsfolder/b/bog_glider.txt svneol=native#text/plain res/cardsfolder/b/bog_gnarr.txt svneol=native#text/plain diff --git a/res/cardsfolder/b/body_double.txt b/res/cardsfolder/b/body_double.txt new file mode 100644 index 00000000000..2c97b4652e0 --- /dev/null +++ b/res/cardsfolder/b/body_double.txt @@ -0,0 +1,9 @@ +Name:Body Double +ManaCost:4 U +Types:Creature Shapeshifter +Text:You may have CARDNAME enter the battlefield as a copy of any creature card in a graveyard. +PT:0/0 +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/body_double.jpg +End \ No newline at end of file diff --git a/src/main/java/forge/card/cardFactory/CardFactory_Creatures.java b/src/main/java/forge/card/cardFactory/CardFactory_Creatures.java index 7b622fc45bb..b9fb9ac1982 100644 --- a/src/main/java/forge/card/cardFactory/CardFactory_Creatures.java +++ b/src/main/java/forge/card/cardFactory/CardFactory_Creatures.java @@ -2278,7 +2278,8 @@ public class CardFactory_Creatures { || cardName.equals("Quicksilver Gargantuan") || cardName.equals("Jwari Shapeshifter") || cardName.equals("Phyrexian Metamorph") - || cardName.equals("Phantasmal Image")) { + || cardName.equals("Phantasmal Image") + || cardName.equals("Body Double")) { final CardFactoryInterface cfact = cf; final Card[] copyTarget = new Card[1]; final Card[] cloned = new Card[1]; @@ -2403,11 +2404,36 @@ public class CardFactory_Creatures { } } }; + + Input graveyardRuntime = new Input() { + private static final long serialVersionUID = 6950318443268022876L; + + @Override + public void showMessage() { + String message = "Select a creature in a graveyard"; + CardList choices = AllZoneUtil.getCardsIn(Zone.Graveyard); + Object o = GuiUtils.getChoiceOptional(message, choices.toArray()); + if (null == o) { + stop(); + } + else { + Card c = (Card) o; + copyTarget[0] = c; + stopSetNext(new Input_PayManaCost(copy)); + } + } + }; + // Do not remove SpellAbilities created by AbilityFactory or Keywords. card.clearFirstSpell(); card.addSpellAbility(copy); copy.setStackDescription(cardName + " - enters the battlefield as a copy of selected card."); - copy.setBeforePayMana(runtime); + if (cardName.equals("Body Double")) { + copy.setBeforePayMana(graveyardRuntime); + } + else { + copy.setBeforePayMana(runtime); + } }//*************** END ************ END **************************