- Fixed Coat of Arms.

This commit is contained in:
Sloth
2012-07-23 10:45:46 +00:00
parent 28a8705d0b
commit 14e9edf6a6

View File

@@ -1406,37 +1406,18 @@ public final class GameActionUtil {
// add +1/+1 to cards // add +1/+1 to cards
list.clear(); list.clear();
final int num = AllZoneUtil.getCardsIn(ZoneType.Battlefield, "Coat of Arms").size(); final int num = AllZoneUtil.getCardsIn(ZoneType.Battlefield, "Coat of Arms").size();
final CardList creatures = AllZoneUtil.getCardsIn(ZoneType.Battlefield).getType("Creature");
// for each zone found add +1/+1 to each card for (Card c : creatures) {
for (int j = 0; j < num; j++) { for (Card c2 : creatures) {
final CardList creature = AllZoneUtil.getCardsIn(ZoneType.Battlefield); if (!c.equals(c2) && c.sharesCreatureTypeWith(c2)) {
for (int j = 0; j < num; j++) {
for (int i = 0; i < creature.size(); i++) { c.addSemiPermanentAttackBoost(1);
final Card crd = creature.get(i); c.addSemiPermanentDefenseBoost(1);
CardList type = AllZoneUtil.getCardsIn(ZoneType.Battlefield); this.gloriousAnthemList.add(c);
type = type.filter(new CardListFilter() {
@Override
public boolean addCard(final Card card) {
return !card.equals(crd) && card.isCreature();
}
});
final CardList alreadyAdded = new CardList();
for (int x = 0; x < type.size(); x++) {
alreadyAdded.clear();
for (int x2 = 0; x2 < type.get(x).getType().size(); x2++) {
if (!alreadyAdded.contains(type.get(x))) {
if (CardUtil.isACreatureType(type.get(x).getType().get(x2))) {
if (crd.isType(type.get(x).getType().get(x2))) {
alreadyAdded.add(type.get(x));
crd.addSemiPermanentAttackBoost(1);
crd.addSemiPermanentDefenseBoost(1);
this.gloriousAnthemList.add(crd);
}
}
}
} }
} }
} // for inner }
} // for outer } // for outer
} // execute } // execute
}; // coatOfArms }; // coatOfArms