add Fabricate from Mirrodin

This commit is contained in:
jendave
2011-08-06 04:14:10 +00:00
parent 28d41a120d
commit b65781fa17
4 changed files with 68 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
fabricate.jpg http://www.wizards.com/global/images/magic/general/fabricate.jpg
disorient.jpg http://www.wizards.com/global/images/magic/general/disorient.jpg disorient.jpg http://www.wizards.com/global/images/magic/general/disorient.jpg
feldons_cane.jpg http://www.wizards.com/global/images/magic/general/feldons_cane.jpg feldons_cane.jpg http://www.wizards.com/global/images/magic/general/feldons_cane.jpg
mirror_sigil_sergeant.jpg http://www.wizards.com/global/images/magic/general/mirror_sigil_sergeant.jpg mirror_sigil_sergeant.jpg http://www.wizards.com/global/images/magic/general/mirror_sigil_sergeant.jpg

View File

@@ -1,3 +1,8 @@
Fabricate
2 U
Sorcery
Search your library for an artifact card, reveal it, and put it into your hand. Then shuffle your library.
Disorient Disorient
3 U 3 U
Instant Instant

View File

@@ -278,4 +278,10 @@ public class AllZoneUtil {
return cards; return cards;
} }
////////////// cardListFilter for different types
public static CardListFilter artifacts = new CardListFilter() {
public boolean addCard(Card c) {
return c.isArtifact();
}
};
} }

View File

@@ -19139,6 +19139,62 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(ability); card.addSpellAbility(ability);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Fabricate")) {
SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 5274602734116058876L;
@Override
public boolean canPlayAI() {
return 4 < AllZone.Phase.getTurn();
}
@Override
public void resolve() {
String player = card.getController();
if(player.equals(Constant.Player.Human)) humanResolve();
else computerResolve();
}
public void computerResolve() {
CardList list = AllZoneUtil.getPlayerCardsInLibrary(Constant.Player.Computer);
list = list.filter(AllZoneUtil.artifacts);
if(list.size() != 0) {
//comp will just grab the first one it finds
Card c = list.get(0);
AllZone.GameAction.shuffle(card.getController());
//move to hand
AllZone.Computer_Library.remove(c);
AllZone.Computer_Hand.add(c);
CardList l = new CardList();
l.add(c);
AllZone.Display.getChoiceOptional("Computer picked:", l.toArray());
}
}//computerResolve()
public void humanResolve() {
CardList list = AllZoneUtil.getPlayerCardsInLibrary(Constant.Player.Human);
list = list.filter(AllZoneUtil.artifacts);
if(list.size() != 0) {
Object o = AllZone.Display.getChoiceOptional("Select an artifact", list.toArray());
AllZone.GameAction.shuffle(card.getController());
if(o != null) {
//put card in hand
AllZone.Human_Library.remove(o);
AllZone.Human_Hand.add((Card) o);
}
}//if
}//resolve()
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
// Cards with Cycling abilities // Cards with Cycling abilities
// -1 means keyword "Cycling" not found // -1 means keyword "Cycling" not found
if(hasKeyword(card, "Cycling") != -1) { if(hasKeyword(card, "Cycling") != -1) {