mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fixed Coat of Arms.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user