- Fixed Lord of the Undead, it will now pump zombies on both sides of the battlefield.

This commit is contained in:
jendave
2011-08-06 05:58:05 +00:00
parent 81953b3728
commit 7bcdbe7fe1

View File

@@ -15062,86 +15062,90 @@ public class GameActionUtil {
}; //Wizened Cenn Other }; //Wizened Cenn Other
public static Command Lord_of_the_Undead_Pump = new Command() { public static Command Lord_of_the_Undead_Pump = new Command() {
private static final long serialVersionUID = 4866202925944860238L; private static final long serialVersionUID = 4866202925944860238L;
CardList gloriousAnthemList = new CardList(); CardList gloriousAnthemList = new CardList();
public void execute() { public void execute() {
CardList cList = gloriousAnthemList; CardList cList = gloriousAnthemList;
Card c; Card c;
for(int i = 0; i < cList.size(); i++) { for(int i = 0; i < cList.size(); i++) {
c = cList.get(i); c = cList.get(i);
c.addSemiPermanentAttackBoost(-1); c.addSemiPermanentAttackBoost(-1);
c.addSemiPermanentDefenseBoost(-1); c.addSemiPermanentDefenseBoost(-1);
} }
cList.clear(); cList.clear();
PlayerZone[] zone = getZone("Lord of the Undead"); PlayerZone[] zone = getZone("Lord of the Undead");
// 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 = new CardList(zone[outer].getCards());
zone[outer].getCards()); CardList creature = new CardList();
creature = creature.getType("Zombie"); creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getType("Zombie");
for(int i = 0; i < creature.size(); i++) { for(int i = 0; i < creature.size(); i++) {
c = creature.get(i); c = creature.get(i);
if(c.isCreature() if(c.isCreature()
&& !c.getName().equals( && !c.getName().equals("Lord of the Undead")) {
"Lord of the Undead")) { c.addSemiPermanentAttackBoost(1);
c.addSemiPermanentAttackBoost(1); c.addSemiPermanentDefenseBoost(1);
c.addSemiPermanentDefenseBoost(1);
gloriousAnthemList.add(c); gloriousAnthemList.add(c);
} }
} // for } // for
} // for } // for
}// execute() }// execute()
}; //Lord_of_the_Undead_ }; //Lord_of_the_Undead_
public static Command Lord_of_the_Undead_Other = new Command() { public static Command Lord_of_the_Undead_Other = new Command() {
private static final long serialVersionUID = -6925991029956531314L; private static final long serialVersionUID = -6925991029956531314L;
int otherLords = 0; int otherLords = 0;
private int countOtherLords(Card c) { private int countOtherLords(Card c) {
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController()); // PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController());
CardList capts = new CardList(play.getCards()); // CardList capts = new CardList(play.getCards());
capts = capts.filter(new CardListFilter() { PlayerZone hPlay = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
public boolean addCard(Card c) { PlayerZone cPlay = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
return c.getName().equals( CardList capts = new CardList();
"Lord of the Undead") capts.addAll(hPlay.getCards());
&& (c.getType().contains("Zombie") || c.getKeyword().contains( capts.addAll(cPlay.getCards());
"Changeling")); capts = capts.filter(new CardListFilter() {
} public boolean addCard(Card c) {
}); return c.getName().equals("Lord of the Undead")
return capts.size() - 1; && (c.getType().contains("Zombie") || c.getKeyword().contains("Changeling"));
}
});
return capts.size() - 1;
} }
public void execute() { public void execute() {
CardList creature = new CardList(); CardList creature = new CardList();
creature.addAll(AllZone.Human_Play.getCards()); creature.addAll(AllZone.Human_Play.getCards());
creature.addAll(AllZone.Computer_Play.getCards()); creature.addAll(AllZone.Computer_Play.getCards());
creature = creature.getName("Lord of the Undead"); 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);
otherLords = countOtherLords(c); otherLords = countOtherLords(c);
c.setOtherAttackBoost(otherLords); c.setOtherAttackBoost(otherLords);
c.setOtherDefenseBoost(otherLords); c.setOtherDefenseBoost(otherLords);
}// for inner }// for inner
}// execute() }// execute()
}; //Lord_of_the_Undead_Other }; //Lord_of_the_Undead_Other
public static Command Cemetery_Reaper_Pump = new Command() { public static Command Cemetery_Reaper_Pump = new Command() {