diff --git a/projects/mtg/src/GameStateDeckViewer.cpp b/projects/mtg/src/GameStateDeckViewer.cpp index b9fb984df..f3b77c807 100644 --- a/projects/mtg/src/GameStateDeckViewer.cpp +++ b/projects/mtg/src/GameStateDeckViewer.cpp @@ -1038,8 +1038,8 @@ void GameStateDeckViewer::updateStats() { myDeck->validate(); stw.needUpdate = false; - stw.cardCount = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES); + stw.countLands = myDeck->getCount(Constants::MTG_COLOR_LAND); stw.totalPrice = myDeck->totalPrice(); stw.countManaProducers = 0; @@ -1073,16 +1073,11 @@ void GameStateDeckViewer::updateStats() { } } - stw.countLands = 0; for(int ic=0;icSize();ic++){ current = myDeck->getCard(ic); currentCost = current->data->getManaCost(); convertedCost = currentCost->getConvertedCost(); currentCount = myDeck->count(current); - - if(current->data->isLand()) - stw.countLands += currentCount; - // Add to the cards per cost counters stw.totalManaCost += convertedCost * currentCount; diff --git a/projects/mtg/src/WDataSrc.cpp b/projects/mtg/src/WDataSrc.cpp index 6bf229d74..375e16f6f 100644 --- a/projects/mtg/src/WDataSrc.cpp +++ b/projects/mtg/src/WDataSrc.cpp @@ -413,7 +413,7 @@ void WSrcDeck::addCount(MTGCard * c, int qty){ } counts[UNFILTERED_COPIES] += qty; counts[UNFILTERED_UNIQUE]++; - for(int i=Constants::MTG_COLOR_GREEN;i<=Constants::MTG_COLOR_WHITE;i++) + for(int i=Constants::MTG_COLOR_ARTIFACT;i<=Constants::MTG_COLOR_LAND;i++) if (c->data->hasColor(i)) counts[i]+= qty; if(counts[UNFILTERED_MIN_COPIES] < 0 || qty < counts[UNFILTERED_MIN_COPIES]) counts[UNFILTERED_MIN_COPIES] = qty; if(qty > counts[UNFILTERED_MAX_COPIES]) counts[UNFILTERED_MAX_COPIES] = qty;