mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
support for SumCMCGraveyard (Inferno Project)
This commit is contained in:
@@ -1286,9 +1286,13 @@ public class CardFactoryUtil {
|
||||
}
|
||||
// Count$SumCMC_valid
|
||||
if (sq[0].contains("SumCMC")) {
|
||||
ZoneType zone = ZoneType.Battlefield;
|
||||
//graveyard support for Inferno Project (may need other zones or multi-zone in future)
|
||||
if (sq[0].contains("Graveyard"))
|
||||
zone = ZoneType.Graveyard;
|
||||
final String[] restrictions = l[0].split("_");
|
||||
final String[] rest = restrictions[1].split(",");
|
||||
CardCollectionView cardsonbattlefield = game.getCardsIn(ZoneType.Battlefield);
|
||||
CardCollectionView cardsonbattlefield = game.getCardsIn(zone);
|
||||
CardCollection filteredCards = CardLists.getValidCards(cardsonbattlefield, rest, cc, c, null);
|
||||
return Aggregates.sum(filteredCards, CardPredicates.Accessors.fnGetCmc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user