mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
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:
@@ -15544,10 +15544,7 @@ public class CardFactory_Creatures {
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
//get all creatures
|
||||
CardList list = new CardList();
|
||||
list.addAll(AllZone.Human_Battlefield.getCards());
|
||||
list.addAll(AllZone.Computer_Battlefield.getCards());
|
||||
list = list.getType("Creature");
|
||||
CardList list = AllZoneUtil.getCreaturesInPlay();
|
||||
|
||||
return 0 < list.size();
|
||||
}
|
||||
@@ -15895,73 +15892,75 @@ public class CardFactory_Creatures {
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Sutured Ghoul")) {
|
||||
|
||||
//final String player = card.getController();
|
||||
final int[] numCreatures = 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;
|
||||
|
||||
public void execute() {
|
||||
int intermSumPower,intermSumToughness;
|
||||
intermSumPower = intermSumToughness = 0;
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
|
||||
CardList creats = new CardList(grave.getCards());
|
||||
creats = creats.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && !c.equals(card);
|
||||
}
|
||||
});
|
||||
|
||||
//System.out.println("Creats size: " + creats.size());
|
||||
|
||||
if(card.getController().equals(AllZone.HumanPlayer)) {
|
||||
if (creats.size() > 0)
|
||||
{
|
||||
List<Card> selection = AllZone.Display.getChoicesOptional("Select creatures to sacrifice", creats.toArray());
|
||||
|
||||
numCreatures[0] = selection.size();
|
||||
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++) {
|
||||
Card c = creats.get(i);
|
||||
if(c.getNetAttack() <= 2 && c.getNetDefense() <= 3) {
|
||||
intermSumPower += c.getBaseAttack();
|
||||
intermSumToughness += c.getBaseDefense();
|
||||
AllZone.GameAction.exile(c);
|
||||
count++;
|
||||
}
|
||||
//is this needed?
|
||||
AllZone.Computer_Battlefield.updateObservers();
|
||||
}
|
||||
numCreatures[0] = count;
|
||||
}
|
||||
sumPower[0] = intermSumPower;
|
||||
sumToughness[0] = intermSumToughness;
|
||||
card.setBaseAttack(sumPower[0]);
|
||||
card.setBaseDefense(sumToughness[0]);
|
||||
//AllZone.Stack.add(suture);
|
||||
}
|
||||
};
|
||||
|
||||
//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.");
|
||||
//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.");
|
||||
//card.addSpellAbility(suture);
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
|
||||
//card.addSpellAbility(CardFactoryUtil.ability_Devour(card, magnitude));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
final int[] numCreatures = 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;
|
||||
|
||||
public void execute() {
|
||||
int intermSumPower,intermSumToughness;
|
||||
intermSumPower = intermSumToughness = 0;
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
|
||||
CardList creats = new CardList(grave.getCards());
|
||||
creats = creats.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && !c.equals(card);
|
||||
}
|
||||
});
|
||||
|
||||
if(card.getController().equals(AllZone.HumanPlayer)) {
|
||||
if (creats.size() > 0)
|
||||
{
|
||||
List<Card> selection = AllZone.Display.getChoicesOptional("Select creatures to sacrifice", creats.toArray());
|
||||
|
||||
numCreatures[0] = selection.size();
|
||||
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++) {
|
||||
Card c = creats.get(i);
|
||||
if(c.getNetAttack() <= 2 && c.getNetDefense() <= 3) {
|
||||
intermSumPower += c.getBaseAttack();
|
||||
intermSumToughness += c.getBaseDefense();
|
||||
AllZone.GameAction.exile(c);
|
||||
count++;
|
||||
}
|
||||
//is this needed?
|
||||
AllZone.Computer_Battlefield.updateObservers();
|
||||
}
|
||||
numCreatures[0] = count;
|
||||
}
|
||||
sumPower[0] = intermSumPower;
|
||||
sumToughness[0] = intermSumToughness;
|
||||
card.setBaseAttack(sumPower[0]);
|
||||
card.setBaseDefense(sumToughness[0]);
|
||||
}
|
||||
};
|
||||
|
||||
card.clearSpellAbility();
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
card.addSpellAbility(new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = 304885517082977723L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
//get all creatures
|
||||
CardList list = AllZoneUtil.getPlayerGraveyard(AllZone.ComputerPlayer);
|
||||
list = list.filter(AllZoneUtil.creatures);
|
||||
return 0 < list.size();
|
||||
}
|
||||
});
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Myr Galvanizer"))
|
||||
|
||||
Reference in New Issue
Block a user