updating calls to GameAction.shuffle (part 2)

This commit is contained in:
jendave
2011-08-06 09:38:27 +00:00
parent bbb42339a3
commit 2f564f78d6
7 changed files with 34 additions and 34 deletions

View File

@@ -572,7 +572,7 @@ public class CardFactory implements NewConstants {
else if(Destination.equals("Shuffle")) else if(Destination.equals("Shuffle"))
{ {
AllZone.GameAction.moveToBottomOfLibrary(sa.getSourceCard()); AllZone.GameAction.moveToBottomOfLibrary(sa.getSourceCard());
AllZone.GameAction.shuffle(sa.getSourceCard().getController()); sa.getSourceCard().getController().shuffle();
} }
else else
{ {
@@ -3286,7 +3286,7 @@ public class CardFactory implements NewConstants {
else if(Destination.equals("ShuffleIntoLibrary")) else if(Destination.equals("ShuffleIntoLibrary"))
{ {
AllZone.GameAction.moveToTopOfLibrary(tgtC); AllZone.GameAction.moveToTopOfLibrary(tgtC);
AllZone.GameAction.shuffle(tgtC.getOwner()); tgtC.getOwner().shuffle();
} }
else if(Destination.equals("Exile")) else if(Destination.equals("Exile"))
AllZone.GameAction.exile(tgtC); AllZone.GameAction.exile(tgtC);
@@ -3449,7 +3449,7 @@ public class CardFactory implements NewConstants {
else if (Destination.equals("ShuffleIntoLibrary")) else if (Destination.equals("ShuffleIntoLibrary"))
{ {
AllZone.GameAction.moveToTopOfLibrary(tgtC); AllZone.GameAction.moveToTopOfLibrary(tgtC);
AllZone.GameAction.shuffle(tgtC.getOwner()); tgtC.getOwner().shuffle();
} }
else if (Destination.equals("Exile")) else if (Destination.equals("Exile"))
AllZone.GameAction.exile(tgtC); AllZone.GameAction.exile(tgtC);
@@ -3625,7 +3625,7 @@ public class CardFactory implements NewConstants {
else if(Destination.equals("BottomofLibrary")) AllZone.GameAction.moveToBottomOfLibrary(c); else if(Destination.equals("BottomofLibrary")) AllZone.GameAction.moveToBottomOfLibrary(c);
else if(Destination.equals("ShuffleIntoLibrary")) { else if(Destination.equals("ShuffleIntoLibrary")) {
AllZone.GameAction.moveToTopOfLibrary(c); AllZone.GameAction.moveToTopOfLibrary(c);
AllZone.GameAction.shuffle(c.getOwner()); c.getOwner().shuffle();
} }
else if(Destination.equals("Exile")) AllZone.GameAction.exile(c); else if(Destination.equals("Exile")) AllZone.GameAction.exile(c);
else if(Destination.equals("Hand")) { else if(Destination.equals("Hand")) {
@@ -4170,7 +4170,7 @@ public class CardFactory implements NewConstants {
list = list.getNotName(card.getName()); list = list.getNotName(card.getName());
} }
Card c = list.get(0); Card c = list.get(0);
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
AllZone.Computer_Library.remove(c); AllZone.Computer_Library.remove(c);
if (Destination.equals("Hand")) AllZone.Computer_Hand.add(c); //move to hand if (Destination.equals("Hand")) AllZone.Computer_Hand.add(c); //move to hand
if (Destination.equals("TopOfLibrary")) AllZone.Computer_Library.add(c, 0); //move to top of library if (Destination.equals("TopOfLibrary")) AllZone.Computer_Library.add(c, 0); //move to top of library
@@ -4192,7 +4192,7 @@ public class CardFactory implements NewConstants {
if(list.size() != 0) { if(list.size() != 0) {
Object o = AllZone.Display.getChoiceOptional("Select a card", list.toArray()); Object o = AllZone.Display.getChoiceOptional("Select a card", list.toArray());
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
if(o != null) { if(o != null) {
AllZone.Human_Library.remove(o); AllZone.Human_Library.remove(o);
if (Destination.equals("Hand")) AllZone.Human_Hand.add((Card) o); //move to hand if (Destination.equals("Hand")) AllZone.Human_Hand.add((Card) o); //move to hand
@@ -5839,7 +5839,7 @@ public class CardFactory implements NewConstants {
} }
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
} }
}; };
@@ -10717,7 +10717,7 @@ public class CardFactory implements NewConstants {
lib.add(c); lib.add(c);
} }
AllZone.getZone(Constant.Zone.Graveyard, player).reset(); AllZone.getZone(Constant.Zone.Graveyard, player).reset();
AllZone.GameAction.shuffle(player); player.shuffle();
} }
@Override @Override
@@ -10853,7 +10853,7 @@ public class CardFactory implements NewConstants {
AllZone.GameAction.exile(c); AllZone.GameAction.exile(c);
} }
AllZone.getZone(Constant.Zone.Graveyard, player).reset(); AllZone.getZone(Constant.Zone.Graveyard, player).reset();
AllZone.GameAction.shuffle(player); player.shuffle();
} }
@Override @Override

View File

@@ -500,7 +500,7 @@ public class CardFactory_Instants {
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController()); PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
AllZone.GameAction.moveTo(grave, (Card) check); AllZone.GameAction.moveTo(grave, (Card) check);
} }
AllZone.GameAction.shuffle(AllZone.HumanPlayer); AllZone.HumanPlayer.shuffle();
} }
public void computerResolve() { public void computerResolve() {
@@ -559,7 +559,7 @@ public class CardFactory_Instants {
//shuffle card back into the library //shuffle card back into the library
PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController()); PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController());
AllZone.GameAction.moveTo(library,card); AllZone.GameAction.moveTo(library,card);
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
} }
}; };
spell.setChooseTargetAI(CardFactoryUtil.AI_targetHumanCreatureOrPlayer()); spell.setChooseTargetAI(CardFactoryUtil.AI_targetHumanCreatureOrPlayer());
@@ -2111,7 +2111,7 @@ public class CardFactory_Instants {
creature = creature.getType("Creature"); creature = creature.getType("Creature");
if(creature.size() != 0) { if(creature.size() != 0) {
Card c = creature.get(0); Card c = creature.get(0);
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
//move to top of library //move to top of library
AllZone.Computer_Library.remove(c); AllZone.Computer_Library.remove(c);
@@ -2132,7 +2132,7 @@ public class CardFactory_Instants {
if(list.size() != 0) { if(list.size() != 0) {
Object o = AllZone.Display.getChoiceOptional("Select a creature", list.toArray()); Object o = AllZone.Display.getChoiceOptional("Select a creature", list.toArray());
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
if(o != null) { if(o != null) {
//put creature on top of library //put creature on top of library
library.remove(o); library.remove(o);
@@ -2597,7 +2597,7 @@ public class CardFactory_Instants {
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController()); PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
AllZone.GameAction.moveTo(hand, (Card) check); AllZone.GameAction.moveTo(hand, (Card) check);
} }
AllZone.GameAction.shuffle(AllZone.HumanPlayer); AllZone.HumanPlayer.shuffle();
} }
public void computerResolve() { public void computerResolve() {
@@ -2832,7 +2832,7 @@ public class CardFactory_Instants {
c = creature.get(0); c = creature.get(0);
} }
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
//move to top of library //move to top of library
AllZone.Computer_Library.remove(c); AllZone.Computer_Library.remove(c);
@@ -2853,7 +2853,7 @@ public class CardFactory_Instants {
if(list.size() != 0) { if(list.size() != 0) {
Object o = AllZone.Display.getChoiceOptional("Select a card", list.toArray()); Object o = AllZone.Display.getChoiceOptional("Select a card", list.toArray());
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
if(o != null) { if(o != null) {
//put card on top of library //put card on top of library
library.remove(o); library.remove(o);
@@ -2933,7 +2933,7 @@ public class CardFactory_Instants {
grave.add(toGrave1); grave.add(toGrave1);
grave.add(toGrave2); grave.add(toGrave2);
AllZone.GameAction.shuffle(AllZone.HumanPlayer); AllZone.HumanPlayer.shuffle();
} }
public void computerResolve() { public void computerResolve() {
@@ -3378,7 +3378,7 @@ public class CardFactory_Instants {
AllZone.Human_Play.add(card); AllZone.Human_Play.add(card);
card.tap(); card.tap();
lands.remove(card); lands.remove(card);
AllZone.GameAction.shuffle(player); player.shuffle();
} }
}// if choice yes }// if choice yes
} // player equals human } // player equals human
@@ -3389,7 +3389,7 @@ public class CardFactory_Instants {
AllZone.Computer_Play.add(card); AllZone.Computer_Play.add(card);
card.tap(); card.tap();
lands.remove(card); lands.remove(card);
AllZone.GameAction.shuffle(player); player.shuffle();
} }
} }
}//resolve() }//resolve()

View File

@@ -446,7 +446,7 @@ class CardFactory_Planeswalkers {
play.add(c); play.add(c);
} }
} }
AllZone.GameAction.shuffle(AllZone.HumanPlayer); AllZone.HumanPlayer.shuffle();
}//human }//human
else { else {
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card2.getController()); PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card2.getController());
@@ -459,7 +459,7 @@ class CardFactory_Planeswalkers {
lib.remove(nissa); lib.remove(nissa);
play.add(nissa); play.add(nissa);
} }
AllZone.GameAction.shuffle(AllZone.ComputerPlayer); AllZone.ComputerPlayer.shuffle();
} }
} }
@@ -1105,7 +1105,7 @@ class CardFactory_Planeswalkers {
creature = creature.getType("Creature"); creature = creature.getType("Creature");
if(creature.size() != 0) { if(creature.size() != 0) {
Card c = creature.get(0); Card c = creature.get(0);
AllZone.GameAction.shuffle(card2.getController()); card2.getController().shuffle();
//move to top of library //move to top of library
AllZone.Computer_Library.remove(c); AllZone.Computer_Library.remove(c);
@@ -1121,7 +1121,7 @@ class CardFactory_Planeswalkers {
if(list.size() != 0) { if(list.size() != 0) {
Object o = AllZone.Display.getChoiceOptional("Select any card", list.toArray()); Object o = AllZone.Display.getChoiceOptional("Select any card", list.toArray());
AllZone.GameAction.shuffle(card2.getController()); card2.getController().shuffle();
if(o != null) { if(o != null) {
//put creature on top of library //put creature on top of library
library.remove(o); library.remove(o);

View File

@@ -1327,7 +1327,7 @@ public class CombatUtil {
} }
} }
} }
AllZone.GameAction.shuffle(c.getController()); c.getController().shuffle();
//we have to have cards like glorious anthem take effect immediately: //we have to have cards like glorious anthem take effect immediately:
for(String effect:AllZone.StaticEffects.getStateBasedMap().keySet()) { for(String effect:AllZone.StaticEffects.getStateBasedMap().keySet()) {
Command com = GameActionUtil.commands.get(effect); Command com = GameActionUtil.commands.get(effect);
@@ -1346,7 +1346,7 @@ public class CombatUtil {
Card card = enchantments.get(0); Card card = enchantments.get(0);
library.remove(card); library.remove(card);
play.add(card); play.add(card);
AllZone.GameAction.shuffle(c.getController()); c.getController().shuffle();
//we have to have cards like glorious anthem take effect immediately: //we have to have cards like glorious anthem take effect immediately:
GameActionUtil.executeCardStateEffects(); GameActionUtil.executeCardStateEffects();
} }
@@ -2767,7 +2767,7 @@ public class CombatUtil {
play.add(Enchantment); play.add(Enchantment);
Enchantment.enchantCard(attacker); Enchantment.enchantCard(attacker);
} }
if(player.isHuman()) AllZone.GameAction.shuffle(attacker.getController()); if(player.isHuman()) attacker.getController().shuffle();
}//resolve }//resolve
};// ability4 };// ability4
ability4.setStackDescription(c + " - (Exalted) searches library for an Aura card that could enchant that creature, put it into play attached to that creature, then shuffles library. "); ability4.setStackDescription(c + " - (Exalted) searches library for an Aura card that could enchant that creature, put it into play attached to that creature, then shuffles library. ");

View File

@@ -30,7 +30,7 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
{ {
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, c.getOwner()); PlayerZone lib = AllZone.getZone(Constant.Zone.Library, c.getOwner());
lib.add(c); lib.add(c);
AllZone.GameAction.shuffle(c.getOwner()); c.getOwner().shuffle();
return; return;
} }
//slight difference from above I guess, the card gets put into the grave first, then shuffled into library. //slight difference from above I guess, the card gets put into the grave first, then shuffled into library.
@@ -43,7 +43,7 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
grave.addOnce(c); grave.addOnce(c);
grave.remove(c); grave.remove(c);
lib.add(c); lib.add(c);
AllZone.GameAction.shuffle(c.getOwner()); c.getOwner().shuffle();
return; return;
} }
@@ -57,7 +57,7 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
for(Card gc : grave.getCards()) for(Card gc : grave.getCards())
lib.add(gc); lib.add(gc);
grave.reset(); grave.reset();
AllZone.GameAction.shuffle(c.getOwner()); c.getOwner().shuffle();
return; return;
} }

View File

@@ -6192,7 +6192,7 @@ public class GameActionUtil {
} }
} }
AllZone.GameAction.shuffle(AllZone.HumanPlayer); AllZone.HumanPlayer.shuffle();
}// if choice yes }// if choice yes
} // player equals human } // player equals human
else if(player.equals(AllZone.ComputerPlayer) && lands.size() > 0) { else if(player.equals(AllZone.ComputerPlayer) && lands.size() > 0) {
@@ -6214,7 +6214,7 @@ public class GameActionUtil {
lands.remove(card); lands.remove(card);
} }
} }
AllZone.GameAction.shuffle(AllZone.ComputerPlayer); AllZone.ComputerPlayer.shuffle();
} }
} }
@@ -6775,7 +6775,7 @@ public class GameActionUtil {
hand.add(card); hand.add(card);
} }
AllZone.GameAction.shuffle(player); player.shuffle();
} }
} }
@@ -7734,7 +7734,7 @@ public class GameActionUtil {
play.add(creature2); play.add(creature2);
} }
AllZone.GameAction.shuffle(card.getController()); card.getController().shuffle();
} }

View File

@@ -32,7 +32,7 @@ public class Input_Mulligan extends Input {
} }
for(int i = 0; i < 100; i++) for(int i = 0; i < 100; i++)
AllZone.GameAction.shuffle(AllZone.HumanPlayer); AllZone.HumanPlayer.shuffle();
int newHand = hand.length - 1; int newHand = hand.length - 1;