mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Converted Gaddock Teeg to script.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
Name:Gaddock Teeg
|
||||
ManaCost:G W
|
||||
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
|
||||
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:Picture:http://www.wizards.com/global/images/magic/general/gaddock_teeg.jpg
|
||||
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/248.jpg
|
||||
|
||||
@@ -5152,6 +5152,11 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
if (!isToken()) return false;
|
||||
} else if (Property.startsWith("nonToken")) {
|
||||
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
|
||||
Property.startsWith("toughness") ||
|
||||
Property.startsWith("cmc")) {
|
||||
|
||||
@@ -2044,59 +2044,6 @@ public final class GameActionUtil {
|
||||
} // execute()
|
||||
}; // 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
|
||||
// if Computer has 2 Glorious Anthems, AllZone.getComputerPlay() will be
|
||||
// returned twice
|
||||
|
||||
@@ -205,7 +205,6 @@ public class StaticEffects {
|
||||
|
||||
cardToEffectsList.put("Alpha Status", new String[]{"Alpha_Status"});
|
||||
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("Liu Bei, Lord of Shu", new String[]{"Liu_Bei"});
|
||||
|
||||
Reference in New Issue
Block a user