Jeck - Fix to deck statistics regarding land.
This commit is contained in:
@@ -1040,7 +1040,6 @@ void GameStateDeckViewer::updateStats() {
|
|||||||
stw.needUpdate = false;
|
stw.needUpdate = false;
|
||||||
|
|
||||||
stw.cardCount = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES);
|
stw.cardCount = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES);
|
||||||
stw.countLands = myDeck->getCount(Constants::MTG_COLOR_LAND);
|
|
||||||
stw.totalPrice = myDeck->totalPrice();
|
stw.totalPrice = myDeck->totalPrice();
|
||||||
|
|
||||||
stw.countManaProducers = 0;
|
stw.countManaProducers = 0;
|
||||||
@@ -1074,11 +1073,16 @@ void GameStateDeckViewer::updateStats() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stw.countLands = 0;
|
||||||
for(int ic=0;ic<myDeck->Size();ic++){
|
for(int ic=0;ic<myDeck->Size();ic++){
|
||||||
current = myDeck->getCard(ic);
|
current = myDeck->getCard(ic);
|
||||||
currentCost = current->data->getManaCost();
|
currentCost = current->data->getManaCost();
|
||||||
convertedCost = currentCost->getConvertedCost();
|
convertedCost = currentCost->getConvertedCost();
|
||||||
currentCount = myDeck->count(current);
|
currentCount = myDeck->count(current);
|
||||||
|
|
||||||
|
if(current->data->isLand())
|
||||||
|
stw.countLands += currentCount;
|
||||||
|
|
||||||
|
|
||||||
// Add to the cards per cost counters
|
// Add to the cards per cost counters
|
||||||
stw.totalManaCost += convertedCost * currentCount;
|
stw.totalManaCost += convertedCost * currentCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user