code cleanup/consolidation in GameActionUtil.java

This commit is contained in:
jendave
2011-08-06 09:52:15 +00:00
parent e1b25006c1
commit 2132e38a66

View File

@@ -15063,63 +15063,15 @@ public class GameActionUtil {
}; //Liu_Bei }; //Liu_Bei
/*
public static Command Nimble_Mongoose = new Command() {
private static final long serialVersionUID = -8155356899650795833L;
public void execute() {
// get all creatures
CardList list = new CardList();
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Nimble Mongoose");
if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) {
Card c = list.get(i);
if(hasThreshold(c)) {
c.setBaseAttack(3);
c.setBaseDefense(3);
} else {
c.setBaseAttack(1);
c.setBaseDefense(1);
}
}
}
}// execute()
private boolean hasThreshold(Card c) {
PlayerZone grave = AllZone.getZone(
Constant.Zone.Graveyard, c.getController());
CardList gy = new CardList();
gy.addAll(grave.getCards());
if(gy.size() >= 7) return true;
else return false;
}
}; //Nimble_Mongoose
*/
public static Command Mystic_Enforcer = new Command() { public static Command Mystic_Enforcer = new Command() {
private static final long serialVersionUID = 4569052031336290843L; private static final long serialVersionUID = 4569052031336290843L;
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Mystic Enforcer");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Mystic Enforcer");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15158,14 +15110,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Bant Sureblade");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Bant Sureblade");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15193,14 +15140,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Esper Stormblade");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Esper Stormblade");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15228,14 +15170,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Grixis Grimblade");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Grixis Grimblade");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15263,14 +15200,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Jund Hackblade");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Jund Hackblade");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15297,14 +15229,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Naya Hushblade");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Naya Hushblade");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15332,14 +15259,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Ballynock Cohort");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Ballynock Cohort");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15366,14 +15288,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Ashenmoor Cohort");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Ashenmoor Cohort");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15400,14 +15317,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Briarberry Cohort");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Briarberry Cohort");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15434,14 +15346,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Crabapple Cohort");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Crabapple Cohort");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15468,14 +15375,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Mudbrawler Cohort");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Mudbrawler Cohort");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15503,10 +15405,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Werebear");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Werebear");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused //Card crd = list.get(0); //unused
@@ -15544,14 +15443,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Divinity of Pride");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Divinity of Pride");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15581,14 +15475,9 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Serra Ascendant");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Serra Ascendant");
if(list.size() > 0) { if(list.size() > 0) {
//Card crd = list.get(0); //unused
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15663,10 +15552,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Yavimaya Enchantress");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Yavimaya Enchantress");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15695,10 +15581,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Knight of the Reliquary");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Knight of the Reliquary");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -15737,11 +15620,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature =AllZoneUtil.getCardsInPlay("Relentless Rats");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Relentless Rats");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -15780,11 +15659,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Squirrel Mob");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Squirrel Mob");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -15970,11 +15845,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Elvish Archdruid");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Elvish Archdruid");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16046,11 +15917,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Knight Exemplar");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Knight Exemplar");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16129,11 +15996,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Wizened Cenn");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Wizened Cenn");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16214,11 +16077,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Lord of the Undead");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Lord of the Undead");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16293,11 +16152,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Cemetery Reaper");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Cemetery Reaper");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16376,11 +16231,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Captain of the Watch");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Captain of the Watch");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16456,11 +16307,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Veteran Swordsmith");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Veteran Swordsmith");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16534,11 +16381,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Veteran Armorsmith");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Veteran Armorsmith");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16616,11 +16459,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Elvish Champion");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Elvish Champion");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16699,14 +16538,7 @@ public class GameActionUtil {
int otherLords = 0; int otherLords = 0;
private int countOtherLords() { private int countOtherLords() {
PlayerZone hPlay = AllZone.getZone( CardList lords = AllZoneUtil.getCardsInPlay("Timber Protector");
Constant.Zone.Play, AllZone.HumanPlayer);
PlayerZone cPlay = AllZone.getZone(
Constant.Zone.Play, AllZone.ComputerPlayer);
CardList lords = new CardList();
lords.addAll(hPlay.getCards());
lords.addAll(cPlay.getCards());
lords = lords.getName("Timber Protector");
return lords.size() - 1; return lords.size() - 1;
} }
@@ -16714,11 +16546,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Timber Protector");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Timber Protector");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16789,14 +16617,7 @@ public class GameActionUtil {
int otherLords = 0; int otherLords = 0;
private int countOtherLords() { private int countOtherLords() {
PlayerZone hPlay = AllZone.getZone( CardList lords = AllZoneUtil.getCardsInPlay("Goblin Chieftain");
Constant.Zone.Play, AllZone.HumanPlayer);
PlayerZone cPlay = AllZone.getZone(
Constant.Zone.Play, AllZone.ComputerPlayer);
CardList lords = new CardList();
lords.addAll(hPlay.getCards());
lords.addAll(cPlay.getCards());
lords = lords.getName("Goblin Chieftain");
return lords.size() - 1; return lords.size() - 1;
} }
@@ -16804,11 +16625,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Goblin Chieftain");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Goblin Chieftain");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -16848,10 +16665,7 @@ public class GameActionUtil {
// for each zone found add +1/+1 to each card // for each zone found add +1/+1 to each card
for(int outer = 0; outer < zone.length; outer++) { for(int outer = 0; outer < zone.length; outer++) {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getTypeInPlay("Goblin");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getType("Goblin");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
c = creature.get(i); c = creature.get(i);
@@ -16876,14 +16690,7 @@ public class GameActionUtil {
int otherLords = 0; int otherLords = 0;
private int countOtherLords() { private int countOtherLords() {
PlayerZone hPlay = AllZone.getZone( CardList lords = AllZoneUtil.getCardsInPlay("Goblin King");
Constant.Zone.Play, AllZone.HumanPlayer);
PlayerZone cPlay = AllZone.getZone(
Constant.Zone.Play, AllZone.ComputerPlayer);
CardList lords = new CardList();
lords.addAll(hPlay.getCards());
lords.addAll(cPlay.getCards());
lords = lords.getName("Goblin King");
return lords.size() - 1; return lords.size() - 1;
} }
@@ -16971,11 +16778,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Merfolk Sovereign");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Merfolk Sovereign");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -17052,11 +16855,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Lord of Atlantis");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Lord of Atlantis");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -17125,14 +16924,7 @@ public class GameActionUtil {
int otherMarshals = 0; int otherMarshals = 0;
private int countOtherMarshals() { private int countOtherMarshals() {
PlayerZone hPlay = AllZone.getZone( CardList marshals = AllZoneUtil.getCardsInPlay("Field Marshal");
Constant.Zone.Play, AllZone.HumanPlayer);
PlayerZone cPlay = AllZone.getZone(
Constant.Zone.Play, AllZone.ComputerPlayer);
CardList marshals = new CardList();
marshals.addAll(hPlay.getCards());
marshals.addAll(cPlay.getCards());
marshals = marshals.getName("Field Marshal");
return marshals.size() - 1; return marshals.size() - 1;
} }
@@ -17140,11 +16932,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Field Marshal");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Field Marshal");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -17226,11 +17014,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Death Baron");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Death Baron");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -17268,9 +17052,7 @@ public class GameActionUtil {
// for each zone found add +1/+1 to each card // for each zone found add +1/+1 to each card
for(int outer = 0; outer < zone.length; outer++) { for(int outer = 0; outer < zone.length; outer++) {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay();
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.filter(new CardListFilter() creature = creature.filter(new CardListFilter()
{ {
public boolean addCard(Card crd) public boolean addCard(Card crd)
@@ -17398,11 +17180,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Aven Brigadier");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Aven Brigadier");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -17477,11 +17255,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCardsInPlay("Scion of Oona");
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Scion of Oona");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
Card c = creature.get(i); Card c = creature.get(i);
@@ -17896,10 +17670,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Loxodon Punisher");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Loxodon Punisher");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -17923,10 +17694,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Goblin Gaveleer");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Goblin Gaveleer");
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -17950,10 +17718,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Rabid Wombat");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Rabid Wombat");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -17975,10 +17740,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Uril, the Miststalker");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Uril, the Miststalker");
if(list.size() > 0) { if(list.size() > 0) {
Card c = list.get(0); Card c = list.get(0);
@@ -18001,10 +17763,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Kithkin Rabble");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Kithkin Rabble");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18034,10 +17793,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Crowd of Cinders");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Crowd of Cinders");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18067,10 +17823,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Faerie Swarm");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Faerie Swarm");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18100,10 +17853,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Drove of Elves");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Drove of Elves");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18164,10 +17914,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Molimo, Maro-Sorcerer");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Molimo, Maro-Sorcerer");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18216,10 +17963,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Maro");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Maro");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18256,10 +18000,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Masumaro, First to Live");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Masumaro, First to Live");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18297,10 +18038,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Adamaro, First to Desire");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Adamaro, First to Desire");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18337,10 +18075,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Overbeing of Myth");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Overbeing of Myth");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18377,10 +18112,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Guul Draz Specter");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Guul Draz Specter");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18453,10 +18185,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Mortivore");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Mortivore");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18490,10 +18219,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Cognivore");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Cognivore");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18527,10 +18253,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Cantivore");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Cantivore");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18564,10 +18287,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Lhurgoyf");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Lhurgoyf");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18601,10 +18321,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Svogthos, the Restless Tomb");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Svogthos, the Restless Tomb");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18653,10 +18370,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Death's Shadow");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Death's Shadow");
for(Card c:list) { for(Card c:list) {
int n = 13 - c.getController().getLife(); int n = 13 - c.getController().getLife();
@@ -18672,10 +18386,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Nightmare");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Nightmare");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18699,10 +18410,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Aven Trailblazer");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Aven Trailblazer");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18734,10 +18442,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Matca Rioters");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Matca Rioters");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18769,10 +18474,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Rakdos Pit Dragon");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Rakdos Pit Dragon");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18803,10 +18505,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Nyxathid");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Nyxathid");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18834,10 +18533,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Lord of Extinction");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Lord of Extinction");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18868,10 +18564,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Terravore");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Terravore");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18908,10 +18601,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Magnivore");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Magnivore");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -18947,10 +18637,7 @@ public class GameActionUtil {
public void execute() { public void execute() {
// get all creatures // get all creatures
CardList list = new CardList(); CardList list = AllZoneUtil.getCardsInPlay("Tarmogoyf");
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Tarmogoyf");
for(int i = 0; i < list.size(); i++) { for(int i = 0; i < list.size(); i++) {
Card c = list.get(i); Card c = list.get(i);
@@ -20190,10 +19877,7 @@ public class GameActionUtil {
// for each zone found add +1/+1 to each black card // for each zone found add +1/+1 to each black card
for(int outer = 0; outer < zone.length; outer++) { for(int outer = 0; outer < zone.length; outer++) {
// CardList creature = new CardList(zone[outer].getCards()); // CardList creature = new CardList(zone[outer].getCards());
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCreaturesInPlay();
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getType("Creature");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
c = creature.get(i); c = creature.get(i);
@@ -20232,10 +19916,7 @@ public class GameActionUtil {
// for each zone found add +1/+1 to each white card // for each zone found add +1/+1 to each white card
for(int outer = 0; outer < zone.length; outer++) { for(int outer = 0; outer < zone.length; outer++) {
// CardList creature = new CardList(zone[outer].getCards()); // CardList creature = new CardList(zone[outer].getCards());
CardList creature = new CardList(); CardList creature = AllZoneUtil.getCreaturesInPlay();
creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getType("Creature");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
c = creature.get(i); c = creature.get(i);
@@ -20306,15 +19987,7 @@ public class GameActionUtil {
// add +1/+1 to cards // add +1/+1 to cards
list.clear(); list.clear();
PlayerZone hplay = AllZone.getZone( CardList cl = AllZoneUtil.getCardsInPlay("Beastmaster Ascension");
Constant.Zone.Play, AllZone.HumanPlayer);
PlayerZone cplay = AllZone.getZone(
Constant.Zone.Play, AllZone.ComputerPlayer);
CardList cl = new CardList();
cl.addAll(hplay.getCards());
cl.addAll(cplay.getCards());
cl = cl.getName("Beastmaster Ascension");
for(int i = 0; i < cl.size(); i++) { for(int i = 0; i < cl.size(); i++) {
Player player = cl.get(i).getController(); Player player = cl.get(i).getController();
@@ -20693,13 +20366,7 @@ public class GameActionUtil {
list.clear(); list.clear();
PlayerZone cplay = AllZone.Computer_Play; CardList cl = AllZoneUtil.getCardsInPlay("Meddling Mage");
PlayerZone hplay = AllZone.Human_Play;
CardList cl = new CardList();
cl.addAll(cplay.getCards());
cl.addAll(hplay.getCards());
cl = cl.getName("Meddling Mage");
for(int i = 0; i < cl.size(); i++) { for(int i = 0; i < cl.size(); i++) {
final Card crd = cl.get(i); final Card crd = cl.get(i);