- Added Life from the Loam (based on Ranger of Eos code). - Some other fixes (can't remember exactly).

This commit is contained in:
jendave
2011-08-06 04:41:36 +00:00
parent e2a5d87045
commit 226e335aac
5 changed files with 136 additions and 0 deletions

View File

@@ -20895,6 +20895,105 @@ public class CardFactory implements NewConstants {
}//*************** END ************ END **************************
//*************** START *********** START **************************
if(cardName.equals("Life from the Loam")) {
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 9071771496065272936L;
@Override
public void resolve() {
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
CardList cards = new CardList(grave.getCards());
CardList lands = new CardList();
for(int i = 0; i < cards.size(); i++) {
if(cards.get(i).getType().contains("Land")) {
lands.add(cards.get(i));
}
}
String controller = card.getController();
if(lands.size() == 0) return;
if(controller.equals(Constant.Player.Human)) {
Object o = AllZone.Display.getChoiceOptional("Select First Land", lands.toArray());
if(o != null) {
//ability.setTargetCard((Card)o);
//AllZone.Stack.add(ability);
Card c1 = (Card) o;
grave.remove(c1);
hand.add(c1);
lands.remove(c1);
if(lands.size() == 0) return;
o = AllZone.Display.getChoiceOptional("Select Second Land", lands.toArray());
if(o != null) {
Card c2 = (Card) o;
grave.remove(c2);
hand.add(c2);
lands.remove(c2);
if(lands.size() == 0) return;
o = AllZone.Display.getChoiceOptional("Select Third Land", lands.toArray());
if(o != null) {
Card c3 = (Card) o;
grave.remove(c3);
hand.add(c3);
lands.remove(c3);
}
}
}
AllZone.GameAction.shuffle(controller);
} else //computer
{
lands.shuffle();
if(lands.size() >= 1) {
Card c1 = lands.getCard(0);
grave.remove(c1);
hand.add(c1);
lands.remove(c1);
if(lands.size() >= 1) {
Card c2 = lands.getCard(0);
grave.remove(c2);
hand.add(c2);
lands.remove(c2);
if(lands.size() >= 1) {
Card c3 = lands.getCard(0);
grave.remove(c3);
hand.add(c3);
lands.remove(c3);
}
}
}
//ability.setTargetCard(powerTwoCreatures.get(0));
//AllZone.Stack.add(ability);
AllZone.GameAction.shuffle(controller);
}
//...
}//resolve()
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found
if(hasKeyword(card, "Cycling") != -1) {