- Converted Exhume to script.

This commit is contained in:
jendave
2011-08-06 19:18:31 +00:00
parent 30fefaacd2
commit c397a9b7e9
2 changed files with 3 additions and 62 deletions

View File

@@ -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

View File

@@ -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 **************************