fix indentation for Hurkyl's Recall

This commit is contained in:
jendave
2011-08-06 04:11:05 +00:00
parent 403b7bd106
commit dbc1ceada3

View File

@@ -17795,61 +17795,59 @@ public class CardFactory implements NewConstants {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Hurkyl's Recall")) { else if(cardName.equals("Hurkyl's Recall")) {
/* /*
* Return all artifacts target player owns to his or her hand. * Return all artifacts target player owns to his or her hand.
*/ */
SpellAbility spell = new Spell(card) { SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = -4098702062413878046L; private static final long serialVersionUID = -4098702062413878046L;
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
PlayerZone humanPlay = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human); PlayerZone humanPlay = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
CardList humanArts = new CardList(humanPlay.getCards()); CardList humanArts = new CardList(humanPlay.getCards());
humanArts = humanArts.getType("Artifact"); humanArts = humanArts.getType("Artifact");
if(humanArts.size() > 0) { if(humanArts.size() > 0) {
return true; return true;
} }
else { else {
return false; return false;
} }
}//canPlayAI }//canPlayAI
@Override @Override
public void chooseTargetAI() { public void chooseTargetAI() {
setTargetPlayer(Constant.Player.Human); setTargetPlayer(Constant.Player.Human);
}//chooseTargetAI() }//chooseTargetAI()
@Override
public void resolve() {
String player = getTargetPlayer();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
final String opponent = AllZone.GameAction.getOpponent(player);
PlayerZone oppPlay = AllZone.getZone(Constant.Zone.Play, opponent);
CardList artifacts = new CardList(play.getCards());
artifacts.addAll(oppPlay.getCards());
artifacts = artifacts.getType("Artifact");
for(int i = 0; i < artifacts.size(); i++) {
Card thisArtifact = artifacts.get(i);
//if is token, remove token from play, else return artifact to hand
if(thisArtifact.getOwner().equals(player)) {
if(thisArtifact.isToken()) {
play.remove(thisArtifact);
}
else {
AllZone.GameAction.moveTo(hand, thisArtifact);
}
}
}
}//resolve()
};
card.clearSpellAbility();
card.addSpellAbility(spell);
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
}//*************** END ************ END **************************
@Override
public void resolve() {
String player = getTargetPlayer();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
final String opponent = AllZone.GameAction.getOpponent(player);
PlayerZone oppPlay = AllZone.getZone(Constant.Zone.Play, opponent);
CardList artifacts = new CardList(play.getCards());
artifacts.addAll(oppPlay.getCards());
artifacts = artifacts.getType("Artifact");
for(int i = 0; i < artifacts.size(); i++) {
Card thisArtifact = artifacts.get(i);
//if is token, remove token from play, else return artifact to hand
if(thisArtifact.getOwner().equals(player)) {
if(thisArtifact.isToken()) {
play.remove(thisArtifact);
}
else {
AllZone.GameAction.moveTo(hand, thisArtifact);
}
}
}
}//resolve()
};
card.clearSpellAbility();
card.addSpellAbility(spell);
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
}//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Fracturing Gust")) { else if(cardName.equals("Fracturing Gust")) {