From c397a9b7e99780f6b273ad96523d2d1e44eb56be Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 19:18:31 +0000 Subject: [PATCH] - Converted Exhume to script. --- res/cardsfolder/exhume.txt | 4 +- src/forge/CardFactory_Sorceries.java | 61 ---------------------------- 2 files changed, 3 insertions(+), 62 deletions(-) diff --git a/res/cardsfolder/exhume.txt b/res/cardsfolder/exhume.txt index 2a6545b5c0e..9a40a5738cf 100644 --- a/res/cardsfolder/exhume.txt +++ b/res/cardsfolder/exhume.txt @@ -1,7 +1,9 @@ Name:Exhume ManaCost:1 B Types:Sorcery -Text:Each player puts a creature card from his or her graveyard onto the battlefield. +Text:no text +A:SP$ ChangeZone | Cost$ 1 B | Origin$ Graveyard | Destination$ Battlefield | Defined$ Opponent | ChangeType$ Creature.YouDontCtrl | ChangeNum$ 1 | Hidden$ True | SubAbility$ SVar=DBChangeZoneYou | SpellDescription$ Each player puts a creature card from his or her graveyard onto the battlefield. +SVar:DBChangeZoneYou:DB$ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ChangeType$ Creature.YouCtrl | ChangeNum$ 1 | Hidden$ True SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/exhume.jpg SetInfo:USG|Common|http://magiccards.info/scans/en/us/134.jpg diff --git a/src/forge/CardFactory_Sorceries.java b/src/forge/CardFactory_Sorceries.java index ef4c4574cf5..f76a17ed32f 100644 --- a/src/forge/CardFactory_Sorceries.java +++ b/src/forge/CardFactory_Sorceries.java @@ -2662,67 +2662,6 @@ public class CardFactory_Sorceries { card.addSpellAbility(spell); }//*********************END**********END*********************** - - //*************** START *********** START ************************** - else if(cardName.equals("Exhume")) - { - // Can this be converted to SP$ChangeZone | Hidden$ True | Defined$ Each ? - final SpellAbility spell = new Spell(card) - { - private static final long serialVersionUID = 8073863864604364654L; - - public void resolve() - { - CardList humanList = AllZoneUtil.getPlayerGraveyard(AllZone.HumanPlayer); - humanList = humanList.getType("Creature"); - CardList computerList = AllZoneUtil.getPlayerGraveyard(AllZone.ComputerPlayer); - computerList = computerList.getType("Creature"); - - Card c; - if (humanList.size() > 0) - { - Object check = GuiUtils.getChoiceOptional("Select creature to Exhume", humanList.toArray()); - if (check!=null) - { - c = (Card)check; - AllZone.GameAction.moveToPlay(c); - } - - } - - if (computerList.size() > 0) - { - c = CardFactoryUtil.AI_getBestCreature(computerList); - if (c != null) - c = computerList.get(0); - - AllZone.GameAction.moveToPlay(c); - } - } - - public boolean canPlayAI() - { - CardList humanList = AllZoneUtil.getPlayerGraveyard(AllZone.HumanPlayer); - humanList = humanList.getType("Creature"); - CardList computerList = AllZoneUtil.getPlayerGraveyard(AllZone.ComputerPlayer); - computerList = computerList.getType("Creature"); - - if (computerList.size() > 0) - { - if (humanList.size() == 0) - return true; - - return CardFactoryUtil.AI_getBestCreature(computerList).getNetAttack() > - CardFactoryUtil.AI_getBestCreature(humanList).getNetAttack(); - } - return false; - } - }; - card.clearSpellAbility(); - card.addSpellAbility(spell); - } - //*************** END ************ END ************************** - //*************** START *********** START **************************