From a36e5a515181b1847c10aa2bc9eb3adfe9e41730 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 05:09:50 +0000 Subject: [PATCH] - Added Reclaim, sharing code block with cousin Regrowth --- res/card-pictures.txt | 1 + res/cards.txt | 5 +++++ res/common.txt | 1 + src/forge/CardFactory.java | 19 ++++++++++++++----- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 018a59cbf88..8565fbeb6ee 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg +reclaim.jpg http://www.wizards.com/global/images/magic/general/reclaim.jpg skirk_prospector.jpg http://www.wizards.com/global/images/magic/general/skirk_prospector.jpg sejiri_merfolk.jpg http://www.wizards.com/global/images/magic/general/sejiri_merfolk.jpg phyrexian_tower.jpg http://www.wizards.com/global/images/magic/general/phyrexian_tower.jpg diff --git a/res/cards.txt b/res/cards.txt index 05c51f3201a..4b52d79422e 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,8 @@ +Reclaim +G +Instant +Put target card from your graveyard on top of your library. + Skirk Prospector R Creature Goblin diff --git a/res/common.txt b/res/common.txt index 5e8a1ae990a..b75418b96a9 100644 --- a/res/common.txt +++ b/res/common.txt @@ -1019,6 +1019,7 @@ Razorfoot Griffin Razortooth Rats Reaping the Graves Reckless Scholar +Reclaim Recover Red Cliffs Armada Redwood Treefolk diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 6f63e69a750..3947fd97944 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -12873,7 +12873,8 @@ public class CardFactory implements NewConstants { //*************** START *********** START ************************** - else if(cardName.equals("Regrowth")) { + else if(cardName.equals("Regrowth") || cardName.equals("Reclaim")) { + // added cousin Reclaim since 90% of the code is shared final SpellAbility spell = new Spell(card) { private static final long serialVersionUID = -1771016287736735113L; @@ -12884,7 +12885,10 @@ public class CardFactory implements NewConstants { if(AllZone.GameAction.isCardInZone(getTargetCard(), graveyard)) { graveyard.remove(getTargetCard()); - hand.add(getTargetCard()); + if (cardName.equals("Regrowth")) + hand.add(getTargetCard()); + else if (cardName.equals("Reclaim")) + AllZone.GameAction.moveToTopOfLibrary(getTargetCard()); } }//resolve() @@ -12903,7 +12907,13 @@ public class CardFactory implements NewConstants { Object o = AllZone.Display.getChoiceOptional("Select target card", graveyard.getCards()); if(o == null) stop(); else { - spell.setStackDescription("Return " + o + " to its owner's hand"); + String location = ""; + if (cardName.equals("Regrowth")) + location = "owner's hand"; + else if (cardName.equals("Reclaim")) + location = "top of owner's library"; + + spell.setStackDescription("Return " + o + " to " + location); spell.setTargetCard((Card) o); if(this.isFree()) { @@ -12934,8 +12944,7 @@ public class CardFactory implements NewConstants { spell.setBeforePayMana(runtime); card.clearSpellAbility(); card.addSpellAbility(spell); - }//*************** END ************ END ************************** - + }//*************** END ************ END ************************** //*************** START *********** START ************************** else if(cardName.equals("Commune with Nature")) {