From 44044bc99bf339c49bd2a197cb8265938573a946 Mon Sep 17 00:00:00 2001 From: "wagic.jeck" Date: Thu, 25 Feb 2010 15:09:53 +0000 Subject: [PATCH] Jeck - Fix to deck statistics regarding land. --- projects/mtg/src/GameStateDeckViewer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/mtg/src/GameStateDeckViewer.cpp b/projects/mtg/src/GameStateDeckViewer.cpp index c24462f61..b9fb984df 100644 --- a/projects/mtg/src/GameStateDeckViewer.cpp +++ b/projects/mtg/src/GameStateDeckViewer.cpp @@ -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;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;