- Converted Gaddock Teeg to script.

This commit is contained in:
Sloth
2011-10-20 17:00:57 +00:00
parent 35e4bee0d6
commit b96c73e308
4 changed files with 8 additions and 55 deletions

View File

@@ -1,8 +1,10 @@
Name:Gaddock Teeg Name:Gaddock Teeg
ManaCost:G W ManaCost:G W
Types:Legendary Creature Kithkin Advisor Types:Legendary Creature Kithkin Advisor
Text:Noncreature spells with converted mana cost 4 or greater can't be cast.\r\nNoncreature spells with X in their mana costs can't be cast. Text:no text
PT:2/2 PT:2/2
S:Mode$ CantBeCast | ValidCard$ Card.nonCreature+cmcGE4 | Description$ Noncreature spells with converted mana cost 4 or greater can't be cast.
S:Mode$ CantBeCast | ValidCard$ Card.nonCreature+hasXCost | Description$ Noncreature spells with X in their mana costs can't be cast.
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/gaddock_teeg.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/gaddock_teeg.jpg
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/248.jpg SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/248.jpg

View File

@@ -5152,6 +5152,11 @@ public class Card extends GameEntity implements Comparable<Card> {
if (!isToken()) return false; if (!isToken()) return false;
} else if (Property.startsWith("nonToken")) { } else if (Property.startsWith("nonToken")) {
if (isToken()) return false; if (isToken()) return false;
} else if (Property.startsWith("hasXCost")) {
if (getSpellAbility().length > 0)
if (!getSpellAbility()[0].isXCost())
return false;
} else if (Property.startsWith("power") || // 8/10 } else if (Property.startsWith("power") || // 8/10
Property.startsWith("toughness") || Property.startsWith("toughness") ||
Property.startsWith("cmc")) { Property.startsWith("cmc")) {

View File

@@ -2044,59 +2044,6 @@ public final class GameActionUtil {
} // execute() } // execute()
}; // Muraganda_Petroglyphs }; // Muraganda_Petroglyphs
/** Constant <code>Gaddock_Teeg</code>. */
public static Command Gaddock_Teeg = new Command() {
private static final long serialVersionUID = -479252814191086571L;
CardList gloriousAnthemList = new CardList();
public void execute() {
CardList list = gloriousAnthemList;
Card c;
// reset all cards in list - aka "old" cards
for (int i = 0; i < list.size(); i++) {
c = list.get(i);
//c.removeIntrinsicKeyword("This card can't be cast");
c.setUnCastable(false);
}
list.clear();
CardList cl = AllZoneUtil.getCardsIn(Zone.Battlefield, "Gaddock Teeg");
for (int i = 0; i < cl.size(); i++) {
CardList spells = new CardList();
spells.addAll(AllZone.getHumanPlayer().getCardsIn(Zone.Graveyard));
spells.addAll(AllZone.getHumanPlayer().getCardsIn(Zone.Hand));
spells.addAll(AllZone.getComputerPlayer().getCardsIn(Zone.Hand));
spells.addAll(AllZone.getComputerPlayer().getCardsIn(Zone.Graveyard));
spells = spells.filter(new CardListFilter() {
public boolean addCard(final Card c) {
boolean isXNonCreature = false;
if (c.getSpellAbility().length > 0) {
if (c.getSpellAbility()[0].isXCost()) {
isXNonCreature = true;
}
}
return !c.isLand()
&& !c.isCreature()
&& (CardUtil.getConvertedManaCost(c.getManaCost()) >= 4 || isXNonCreature);
}
});
for (int j = 0; j < spells.size(); j++) {
c = spells.get(j);
if (!c.isLand()) {
c.setUnCastable(true);
gloriousAnthemList.add(c);
}
} // for inner
} // for outer
} // execute()
}; //
// returns all PlayerZones that has at least 1 Glorious Anthem // returns all PlayerZones that has at least 1 Glorious Anthem
// if Computer has 2 Glorious Anthems, AllZone.getComputerPlay() will be // if Computer has 2 Glorious Anthems, AllZone.getComputerPlay() will be
// returned twice // returned twice

View File

@@ -205,7 +205,6 @@ public class StaticEffects {
cardToEffectsList.put("Alpha Status", new String[]{"Alpha_Status"}); cardToEffectsList.put("Alpha Status", new String[]{"Alpha_Status"});
cardToEffectsList.put("Coat of Arms", new String[]{"Coat_of_Arms"}); cardToEffectsList.put("Coat of Arms", new String[]{"Coat_of_Arms"});
cardToEffectsList.put("Gaddock Teeg", new String[]{"Gaddock_Teeg"});
cardToEffectsList.put("Homarid", new String[]{"Homarid"}); cardToEffectsList.put("Homarid", new String[]{"Homarid"});
cardToEffectsList.put("Liu Bei, Lord of Shu", new String[]{"Liu_Bei"}); cardToEffectsList.put("Liu Bei, Lord of Shu", new String[]{"Liu_Bei"});