fix up Sutured Ghoul so compy won't play it with no creatures in Graveyard. Fixed to display */* for P/T while not in play.

This commit is contained in:
jendave
2011-08-06 13:30:19 +00:00
parent c39cc19bdc
commit 52b3d12714
2 changed files with 71 additions and 72 deletions

View File

@@ -2,7 +2,7 @@ Name:Sutured Ghoul
ManaCost:4 B B B ManaCost:4 B B B
Types:Creature Zombie Types:Creature Zombie
Text:As Sutured Ghoul enters the battlefield, exile any number of creature cards from your graveyard.\r\nSutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness. Text:As Sutured Ghoul enters the battlefield, exile any number of creature cards from your graveyard.\r\nSutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness.
PT:1/1 PT:*/*
K:Trample K:Trample
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/sutured_ghoul.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/sutured_ghoul.jpg

View File

@@ -15544,10 +15544,7 @@ public class CardFactory_Creatures {
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
//get all creatures //get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCreaturesInPlay();
list.addAll(AllZone.Human_Battlefield.getCards());
list.addAll(AllZone.Computer_Battlefield.getCards());
list = list.getType("Creature");
return 0 < list.size(); return 0 < list.size();
} }
@@ -15895,73 +15892,75 @@ public class CardFactory_Creatures {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Sutured Ghoul")) { else if(cardName.equals("Sutured Ghoul")) {
final int[] numCreatures = new int[1];
//final String player = card.getController(); final int[] sumPower = new int[1];
final int[] numCreatures = new int[1]; final int[] sumToughness = new int[1];
final int[] sumPower = new int[1];
final int[] sumToughness = new int[1]; Command intoPlay = new Command() {
private static final long serialVersionUID = -75234586897814L;
Command intoPlay = new Command() {
private static final long serialVersionUID = -75234586897814L; public void execute() {
int intermSumPower,intermSumToughness;
public void execute() { intermSumPower = intermSumToughness = 0;
int intermSumPower,intermSumToughness; PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
intermSumPower = intermSumToughness = 0; CardList creats = new CardList(grave.getCards());
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController()); creats = creats.filter(new CardListFilter() {
CardList creats = new CardList(grave.getCards()); public boolean addCard(Card c) {
creats = creats.filter(new CardListFilter() { return c.isCreature() && !c.equals(card);
public boolean addCard(Card c) { }
return c.isCreature() && !c.equals(card); });
}
}); if(card.getController().equals(AllZone.HumanPlayer)) {
if (creats.size() > 0)
//System.out.println("Creats size: " + creats.size()); {
List<Card> selection = AllZone.Display.getChoicesOptional("Select creatures to sacrifice", creats.toArray());
if(card.getController().equals(AllZone.HumanPlayer)) {
if (creats.size() > 0) numCreatures[0] = selection.size();
{ for(int m = 0; m < selection.size(); m++) {
List<Card> selection = AllZone.Display.getChoicesOptional("Select creatures to sacrifice", creats.toArray()); intermSumPower += selection.get(m).getBaseAttack();
intermSumToughness += selection.get(m).getBaseDefense();
numCreatures[0] = selection.size(); AllZone.GameAction.exile(selection.get(m));
for(int m = 0; m < selection.size(); m++) { }
intermSumPower += selection.get(m).getBaseAttack(); }
intermSumToughness += selection.get(m).getBaseDefense();
AllZone.GameAction.exile(selection.get(m)); }//human
} else {
} int count = 0;
for(int i = 0; i < creats.size(); i++) {
}//human Card c = creats.get(i);
else { if(c.getNetAttack() <= 2 && c.getNetDefense() <= 3) {
int count = 0; intermSumPower += c.getBaseAttack();
for(int i = 0; i < creats.size(); i++) { intermSumToughness += c.getBaseDefense();
Card c = creats.get(i); AllZone.GameAction.exile(c);
if(c.getNetAttack() <= 2 && c.getNetDefense() <= 3) { count++;
intermSumPower += c.getBaseAttack(); }
intermSumToughness += c.getBaseDefense(); //is this needed?
AllZone.GameAction.exile(c); AllZone.Computer_Battlefield.updateObservers();
count++; }
} numCreatures[0] = count;
//is this needed? }
AllZone.Computer_Battlefield.updateObservers(); sumPower[0] = intermSumPower;
} sumToughness[0] = intermSumToughness;
numCreatures[0] = count; card.setBaseAttack(sumPower[0]);
} card.setBaseDefense(sumToughness[0]);
sumPower[0] = intermSumPower; }
sumToughness[0] = intermSumToughness; };
card.setBaseAttack(sumPower[0]);
card.setBaseDefense(sumToughness[0]); card.clearSpellAbility();
//AllZone.Stack.add(suture); card.addComesIntoPlayCommand(intoPlay);
} card.addSpellAbility(new Spell_Permanent(card) {
}; private static final long serialVersionUID = 304885517082977723L;
//suture.setStackDescription(card.getName() + " - has power equal to the sum of the power of all exiled creatures and toughness equal to the sum of their toughness."); @Override
//suture.setDescription("When Sutured Ghoul enters the battlefield, exile any number of creature cards from your graveyard. Sutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness."); public boolean canPlayAI() {
//card.addSpellAbility(suture); //get all creatures
card.addComesIntoPlayCommand(intoPlay); CardList list = AllZoneUtil.getPlayerGraveyard(AllZone.ComputerPlayer);
list = list.filter(AllZoneUtil.creatures);
//card.addSpellAbility(CardFactoryUtil.ability_Devour(card, magnitude)); return 0 < list.size();
}//*************** END ************ END ************************** }
});
}//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Myr Galvanizer")) else if(cardName.equals("Myr Galvanizer"))