Jeck - Fix to deck statistics regarding land.

This commit is contained in:
wagic.jeck
2010-02-25 15:09:53 +00:00
parent febad680b1
commit 44044bc99b

View File

@@ -1040,7 +1040,6 @@ void GameStateDeckViewer::updateStats() {
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;
@@ -1074,11 +1073,16 @@ void GameStateDeckViewer::updateStats() {
}
}
stw.countLands = 0;
for(int ic=0;ic<myDeck->Size();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;