fix Hurkyl's Recall (looks like the Java code inadvertently got deleted)

This commit is contained in:
slapshot5
2012-01-06 05:24:45 +00:00
parent b625753f37
commit f2b0c1b94f

View File

@@ -47,7 +47,7 @@ import forge.gui.input.InputPayManaCost;
/**
* <p>
* CardFactory_Instants class.
* CardFactoryInstants class.
* </p>
*
* @author Forge
@@ -233,6 +233,48 @@ public class CardFactoryInstants {
card.addSpellAbility(spell);
} // *************** END ************ END **************************
//*************** START *********** START **************************
else if (cardName.equals("Hurkyl's Recall")) {
/*
* Return all artifacts target player owns to his or her hand.
*/
Target t = new Target(card, "Select target player", "Player");
Cost cost = new Cost("1 U", cardName, false);
SpellAbility spell = new Spell(card, cost, t) {
private static final long serialVersionUID = -4098702062413878046L;
@Override
public boolean canPlayAI() {
CardList humanArts = AllZone.getHumanPlayer().getCardsIn(Zone.Battlefield);
humanArts = humanArts.getType("Artifact");
return humanArts.size() > 0;
} //canPlayAI
@Override
public void chooseTargetAI() {
setTargetPlayer(AllZone.getHumanPlayer());
} //chooseTargetAI()
@Override
public void resolve() {
Player player = getTargetPlayer();
CardList artifacts = AllZoneUtil.getCardsIn(Zone.Battlefield);
artifacts = artifacts.getType("Artifact");
for (int i = 0; i < artifacts.size(); i++) {
Card thisArtifact = artifacts.get(i);
if (thisArtifact.getOwner().equals(player)) {
//moveToHand handles tokens
AllZone.getGameAction().moveToHand(thisArtifact);
}
}
} //resolve()
};
card.addSpellAbility(spell);
} //*************** END ************ END **************************
// *************** START *********** START **************************
else if (cardName.equals("Echoing Decay")) {
final Cost cost = new Cost(card.getManaCost(), cardName, false);