Added mana production statistics to the deck viewer.
Two new screens (5,6): 5.) Counts of manasources per color and type. - Basic lands - Non basic lands - Other source 6.) Focusing on mana produced by lands only, displaying amounts of each mana potentialy produced graphically, along with percentages - to be easily compared with following screen (detailing mana cost per colors)
This commit is contained in:
@@ -63,6 +63,7 @@ struct StatsWrapper {
|
|||||||
float avgCreatureCost;
|
float avgCreatureCost;
|
||||||
int totalSpellCost;
|
int totalSpellCost;
|
||||||
float avgSpellCost;
|
float avgSpellCost;
|
||||||
|
int countManaProducers;
|
||||||
|
|
||||||
int countCreatures, countSpells, countInstants, countEnchantments, countSorceries, countArtifacts;
|
int countCreatures, countSpells, countInstants, countEnchantments, countSorceries, countArtifacts;
|
||||||
|
|
||||||
@@ -75,6 +76,9 @@ struct StatsWrapper {
|
|||||||
int countCreaturesPerCostAndColor[STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
|
int countCreaturesPerCostAndColor[STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
|
||||||
int countSpellsPerCost[STATS_MAX_MANA_COST+1];
|
int countSpellsPerCost[STATS_MAX_MANA_COST+1];
|
||||||
int countSpellsPerCostAndColor[STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
|
int countSpellsPerCostAndColor[STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
|
||||||
|
int countLandsPerColor[Constants::MTG_NB_COLORS+1];
|
||||||
|
int countBasicLandsPerColor[Constants::MTG_NB_COLORS+1];
|
||||||
|
int countNonLandProducersPerColor[Constants::MTG_NB_COLORS+1];
|
||||||
int totalCostPerColor[Constants::MTG_NB_COLORS+1];
|
int totalCostPerColor[Constants::MTG_NB_COLORS+1];
|
||||||
int totalColoredSymbols;
|
int totalColoredSymbols;
|
||||||
|
|
||||||
|
|||||||
@@ -202,8 +202,8 @@ class AbilityFactory{
|
|||||||
int countCards(TargetChooser * tc, Player * player = NULL, int option = 0);
|
int countCards(TargetChooser * tc, Player * player = NULL, int option = 0);
|
||||||
int parsePowerToughness(string s, int *power, int *toughness);
|
int parsePowerToughness(string s, int *power, int *toughness);
|
||||||
TriggeredAbility * parseTrigger(string s, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
|
TriggeredAbility * parseTrigger(string s, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
|
||||||
MTGAbility * parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated = 0, int forceUEOT = 0);
|
|
||||||
public:
|
public:
|
||||||
|
MTGAbility * parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated = 0, int forceUEOT = 0);
|
||||||
int abilityEfficiency(MTGAbility * a, Player * p, int mode = MODE_ABILITY);
|
int abilityEfficiency(MTGAbility * a, Player * p, int mode = MODE_ABILITY);
|
||||||
int magicText(int id, Spell * spell, MTGCardInstance * card = NULL, int mode = MODE_PUTINTOPLAY);
|
int magicText(int id, Spell * spell, MTGCardInstance * card = NULL, int mode = MODE_PUTINTOPLAY);
|
||||||
static int computeX(Spell * spell, MTGCardInstance * card);
|
static int computeX(Spell * spell, MTGCardInstance * card);
|
||||||
|
|||||||
@@ -6,8 +6,28 @@
|
|||||||
#include "../include/GameStateDeckViewer.h"
|
#include "../include/GameStateDeckViewer.h"
|
||||||
#include "../include/Translate.h"
|
#include "../include/Translate.h"
|
||||||
#include "../include/ManaCostHybrid.h"
|
#include "../include/ManaCostHybrid.h"
|
||||||
|
#include "../include/MTGCardInstance.h"
|
||||||
|
#include "../include/MTGCardInstance.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
//!! helper function; this is probably handled somewhere in the code already.
|
||||||
|
// If not, should be placed in general library
|
||||||
|
void StringExplode(string str, string separator, vector<string>* results){
|
||||||
|
int found;
|
||||||
|
found = str.find_first_of(separator);
|
||||||
|
while(found != (int)string::npos){
|
||||||
|
if(found > 0){
|
||||||
|
results->push_back(str.substr(0,found));
|
||||||
|
}
|
||||||
|
str = str.substr(found+1);
|
||||||
|
found = str.find_first_of(separator);
|
||||||
|
}
|
||||||
|
if(str.length() > 0){
|
||||||
|
results->push_back(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GameStateDeckViewer::GameStateDeckViewer(GameApp* parent): GameState(parent) {
|
GameStateDeckViewer::GameStateDeckViewer(GameApp* parent): GameState(parent) {
|
||||||
bgMusic = NULL;
|
bgMusic = NULL;
|
||||||
scrollSpeed = MED_SPEED;
|
scrollSpeed = MED_SPEED;
|
||||||
@@ -690,7 +710,103 @@ void GameStateDeckViewer::renderOnScreenMenu(){
|
|||||||
r->DrawLine(20 + leftTransition, posY + 13, posX + 40 + leftTransition, posY + 13, ARGB(128, 255, 255, 255));
|
r->DrawLine(20 + leftTransition, posY + 13, posX + 40 + leftTransition, posY + 13, ARGB(128, 255, 255, 255));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 5: // Land statistics
|
||||||
|
sprintf(buffer, STATS_TITLE_FORMAT.c_str(), stw.currentPage, _("Mana production").c_str());
|
||||||
|
font->DrawString(buffer, 10+leftTransition, 10);
|
||||||
|
|
||||||
|
font->DrawString(_("Counts of manasources per type and color:"), 20 + leftTransition, 30);
|
||||||
|
|
||||||
|
posY = 70;
|
||||||
|
|
||||||
|
// Column titles
|
||||||
|
for (int j=0; j<Constants::MTG_NB_COLORS-1;j++){
|
||||||
|
r->RenderQuad(mIcons[j], 52 + j*15 + leftTransition, posY - 10,0,0.5,0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
//font->DrawString(_("C"), 30 + leftTransition, posY-16);
|
||||||
|
//font->DrawString(_("Ty"), 27 + leftTransition, posY-16);
|
||||||
|
|
||||||
|
// Horizontal table lines
|
||||||
|
r->DrawLine(27 + leftTransition, posY - 20, 60 + (Constants::MTG_NB_COLORS-2)*15 + leftTransition, posY - 20, ARGB(128, 255, 255, 255));
|
||||||
|
r->DrawLine(27 + leftTransition, posY - 1, 60 + (Constants::MTG_NB_COLORS-2)*15 + leftTransition, posY - 1, ARGB(128, 255, 255, 255));
|
||||||
|
r->DrawLine(27 + leftTransition, 2*10 + posY + 12, 60 + (Constants::MTG_NB_COLORS-2)*15 + leftTransition, 2*10 + posY + 12, ARGB(128, 255, 255, 255));
|
||||||
|
r->DrawLine(27 + leftTransition, 3*10 + posY + 14, 60 + (Constants::MTG_NB_COLORS-2)*15 + leftTransition, 3*10 + posY + 14, ARGB(128, 255, 255, 255));
|
||||||
|
|
||||||
|
// Vertical table lines
|
||||||
|
r->DrawLine(26 + leftTransition, posY - 20, 26 + leftTransition, 3*10 + posY + 14, ARGB(128, 255, 255, 255));
|
||||||
|
r->DrawLine(43 + leftTransition, posY - 20, 43 + leftTransition, 3*10 + posY + 14, ARGB(128, 255, 255, 255));
|
||||||
|
r->DrawLine(60 + leftTransition + (Constants::MTG_NB_COLORS-2)*15, posY - 20, 60 + leftTransition + (Constants::MTG_NB_COLORS-2)*15, 3*10 + posY + 14, ARGB(128, 255, 255, 255));
|
||||||
|
|
||||||
|
font->DrawString(_("BL"), 27 + leftTransition, posY);
|
||||||
|
font->DrawString(_("NB"), 27 + leftTransition, posY+10);
|
||||||
|
font->DrawString(_("O"), 30 + leftTransition, posY+20);
|
||||||
|
font->DrawString(_("T"), 30 + leftTransition, posY+33);
|
||||||
|
|
||||||
|
int curCount;
|
||||||
|
|
||||||
|
for (int j=0; j<Constants::MTG_NB_COLORS-1;j++){
|
||||||
|
curCount = stw.countBasicLandsPerColor[j];
|
||||||
|
sprintf(buffer, (curCount==0?".":"%i"), curCount);
|
||||||
|
font->DrawString(buffer, 49 + leftTransition + j*15, posY);
|
||||||
|
|
||||||
|
curCount = stw.countLandsPerColor[j];
|
||||||
|
sprintf(buffer, (curCount==0?".":"%i"), curCount);
|
||||||
|
font->DrawString(buffer, 49 + leftTransition + j*15, posY+10);
|
||||||
|
|
||||||
|
curCount = stw.countNonLandProducersPerColor[j];
|
||||||
|
sprintf(buffer, (curCount==0?".":"%i"), curCount);
|
||||||
|
font->DrawString(buffer, 49 + leftTransition + j*15, posY+20);
|
||||||
|
|
||||||
|
curCount = stw.countLandsPerColor[j] + stw.countBasicLandsPerColor[j] + stw.countNonLandProducersPerColor[j];
|
||||||
|
sprintf(buffer, (curCount==0?".":"%i"), curCount);
|
||||||
|
font->DrawString(buffer, 49 + leftTransition + j*15, posY+33);
|
||||||
|
}
|
||||||
|
|
||||||
|
posY += 55;
|
||||||
|
font->DrawString(_("BL - Basic lands"), 20 + leftTransition, posY);
|
||||||
|
posY += 10;
|
||||||
|
font->DrawString(_("NB - Non-basic lands"), 20 + leftTransition, posY);
|
||||||
|
posY += 10;
|
||||||
|
font->DrawString(_("O - Other (non-land) manasources"), 26 + leftTransition, posY);
|
||||||
|
posY += 10;
|
||||||
|
font->DrawString(_("T - Totals"), 26 + leftTransition, posY);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6: // Land statistics - in symbols
|
||||||
|
sprintf(buffer, STATS_TITLE_FORMAT.c_str(), stw.currentPage, _("Mana production - in mana symbols").c_str());
|
||||||
|
font->DrawString(buffer, 10+leftTransition, 10);
|
||||||
|
font->DrawString(_("Total colored manasymbols in lands' production:"), 20 + leftTransition, 30);
|
||||||
|
|
||||||
|
int totalProducedSymbols;
|
||||||
|
totalProducedSymbols = 0;
|
||||||
|
for (int i=1; i<Constants::MTG_NB_COLORS-1; i++) {
|
||||||
|
totalProducedSymbols += stw.countLandsPerColor[i] + stw.countBasicLandsPerColor[i]; //!! Move to updatestats!
|
||||||
|
}
|
||||||
|
|
||||||
|
posY = 50;
|
||||||
|
for (int i=1; i<Constants::MTG_NB_COLORS-1; i++) {
|
||||||
|
if (stw.countLandsPerColor[i] + stw.countBasicLandsPerColor[i]>0) {
|
||||||
|
sprintf(buffer, _("%i").c_str(), stw.countLandsPerColor[i] + stw.countBasicLandsPerColor[i]);
|
||||||
|
font->DrawString(buffer, 20 + leftTransition, posY);
|
||||||
|
sprintf(buffer, _("(%i%%)").c_str(), (int)(100*(float)(stw.countLandsPerColor[i] + stw.countBasicLandsPerColor[i])/totalProducedSymbols));
|
||||||
|
font->DrawString(buffer, 33 + leftTransition, posY);
|
||||||
|
posX = 72;
|
||||||
|
for (int j=0; j<stw.countLandsPerColor[i] + stw.countBasicLandsPerColor[i]; j++) {
|
||||||
|
r->RenderQuad(mIcons[i], posX + leftTransition, posY+6, 0, 0.5, 0.5);
|
||||||
|
posX += ((j+1)%10==0)?17:13;
|
||||||
|
if ((((j+1)%30)==0) && (j<stw.countLandsPerColor[i] + stw.countBasicLandsPerColor[i]-1)) {
|
||||||
|
posX = 72;
|
||||||
|
posY += 15;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
posY += 17;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case 2: // Mana cost detail
|
case 2: // Mana cost detail
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
@@ -737,7 +853,7 @@ void GameStateDeckViewer::renderOnScreenMenu(){
|
|||||||
|
|
||||||
// Column titles
|
// Column titles
|
||||||
for (int j=0; j<Constants::MTG_NB_COLORS-1;j++){
|
for (int j=0; j<Constants::MTG_NB_COLORS-1;j++){
|
||||||
r->RenderQuad(mIcons[j], 67 + j*15 + leftTransition, posY - 11,0,0.5,0.5);
|
r->RenderQuad(mIcons[j], 67 + j*15 + leftTransition, posY - 10,0,0.5,0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
font->DrawString(_("C"), 30 + leftTransition, posY-16);
|
font->DrawString(_("C"), 30 + leftTransition, posY-16);
|
||||||
@@ -760,7 +876,7 @@ void GameStateDeckViewer::renderOnScreenMenu(){
|
|||||||
sprintf(buffer, _("%i").c_str(), (*countPerCost)[i]);
|
sprintf(buffer, _("%i").c_str(), (*countPerCost)[i]);
|
||||||
font->DrawString(buffer, 45 + leftTransition, posY);
|
font->DrawString(buffer, 45 + leftTransition, posY);
|
||||||
for (int j=0; j<Constants::MTG_NB_COLORS-1;j++){
|
for (int j=0; j<Constants::MTG_NB_COLORS-1;j++){
|
||||||
sprintf(buffer, ((*countPerCostAndColor)[i][j]>0)?_("%i").c_str():" ", (*countPerCostAndColor)[i][j]);
|
sprintf(buffer, ((*countPerCostAndColor)[i][j]>0)?_("%i").c_str():".", (*countPerCostAndColor)[i][j]);
|
||||||
font->DrawString(buffer, 64 + leftTransition + j*15, posY);
|
font->DrawString(buffer, 64 + leftTransition + j*15, posY);
|
||||||
}
|
}
|
||||||
r->FillRect(77 + leftTransition + (Constants::MTG_NB_COLORS-2)*15, posY + 2, (*countPerCost)[i]*5, 8, graphColor);
|
r->FillRect(77 + leftTransition + (Constants::MTG_NB_COLORS-2)*15, posY + 2, (*countPerCost)[i]*5, 8, graphColor);
|
||||||
@@ -778,7 +894,7 @@ void GameStateDeckViewer::renderOnScreenMenu(){
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 8:
|
||||||
// Title
|
// Title
|
||||||
sprintf(buffer, STATS_TITLE_FORMAT.c_str(), stw.currentPage, _("Probabilities").c_str());
|
sprintf(buffer, STATS_TITLE_FORMAT.c_str(), stw.currentPage, _("Probabilities").c_str());
|
||||||
font->DrawString(buffer, 10+leftTransition, 10);
|
font->DrawString(buffer, 10+leftTransition, 10);
|
||||||
@@ -816,7 +932,7 @@ void GameStateDeckViewer::renderOnScreenMenu(){
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5: // Total mana cost per color
|
case 7: // Total mana cost per color
|
||||||
// Title
|
// Title
|
||||||
sprintf(buffer, STATS_TITLE_FORMAT.c_str(), stw.currentPage, _("Mana cost per color").c_str());
|
sprintf(buffer, STATS_TITLE_FORMAT.c_str(), stw.currentPage, _("Mana cost per color").c_str());
|
||||||
font->DrawString(buffer, 10+leftTransition, 10);
|
font->DrawString(buffer, 10+leftTransition, 10);
|
||||||
@@ -830,12 +946,12 @@ void GameStateDeckViewer::renderOnScreenMenu(){
|
|||||||
font->DrawString(buffer, 20 + leftTransition, posY);
|
font->DrawString(buffer, 20 + leftTransition, posY);
|
||||||
sprintf(buffer, _("(%i%%)").c_str(), (int)(100*(float)stw.totalCostPerColor[i]/stw.totalColoredSymbols));
|
sprintf(buffer, _("(%i%%)").c_str(), (int)(100*(float)stw.totalCostPerColor[i]/stw.totalColoredSymbols));
|
||||||
font->DrawString(buffer, 33 + leftTransition, posY);
|
font->DrawString(buffer, 33 + leftTransition, posY);
|
||||||
posX = 70;
|
posX = 72;
|
||||||
for (int j=0; j<stw.totalCostPerColor[i]; j++) {
|
for (int j=0; j<stw.totalCostPerColor[i]; j++) {
|
||||||
r->RenderQuad(mIcons[i], posX + leftTransition, posY+6, 0, 0.5, 0.5);
|
r->RenderQuad(mIcons[i], posX + leftTransition, posY+6, 0, 0.5, 0.5);
|
||||||
posX += ((j+1)%10==0)?17:13;
|
posX += ((j+1)%10==0)?17:13;
|
||||||
if ((((j+1)%30)==0) && (j<stw.totalCostPerColor[i]-1)) {
|
if ((((j+1)%30)==0) && (j<stw.totalCostPerColor[i]-1)) {
|
||||||
posX = 70;
|
posX = 72;
|
||||||
posY += 15;
|
posY += 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -844,7 +960,7 @@ void GameStateDeckViewer::renderOnScreenMenu(){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: // Victory statistics
|
case 9: // Victory statistics
|
||||||
// Title
|
// Title
|
||||||
sprintf(buffer, STATS_TITLE_FORMAT.c_str(), stw.currentPage, _("Victory statistics").c_str());
|
sprintf(buffer, STATS_TITLE_FORMAT.c_str(), stw.currentPage, _("Victory statistics").c_str());
|
||||||
font->DrawString(buffer, 10+leftTransition, 10);
|
font->DrawString(buffer, 10+leftTransition, 10);
|
||||||
@@ -882,12 +998,18 @@ void GameStateDeckViewer::updateStats() {
|
|||||||
if (!stw.needUpdate) {
|
if (!stw.needUpdate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AbilityFactory * af;
|
||||||
|
af = NEW AbilityFactory();
|
||||||
|
|
||||||
stw.needUpdate = false;
|
stw.needUpdate = false;
|
||||||
|
|
||||||
stw.cardCount = myDeck->getCount();
|
stw.cardCount = myDeck->getCount();
|
||||||
stw.countLands = myDeck->getCount(Constants::MTG_COLOR_LAND);
|
stw.countLands = myDeck->getCount(Constants::MTG_COLOR_LAND);
|
||||||
stw.totalPrice = myDeck->totalPrice();
|
stw.totalPrice = myDeck->totalPrice();
|
||||||
|
|
||||||
|
stw.countManaProducers = 0;
|
||||||
|
stw.countManaProducers = 0;
|
||||||
// Mana cost
|
// Mana cost
|
||||||
int currentCount, convertedCost;
|
int currentCount, convertedCost;
|
||||||
ManaCost * currentCost;
|
ManaCost * currentCost;
|
||||||
@@ -905,6 +1027,9 @@ void GameStateDeckViewer::updateStats() {
|
|||||||
|
|
||||||
for (int i=0; i<=Constants::MTG_NB_COLORS; i++) {
|
for (int i=0; i<=Constants::MTG_NB_COLORS; i++) {
|
||||||
stw.totalCostPerColor[i] = 0;
|
stw.totalCostPerColor[i] = 0;
|
||||||
|
stw.countLandsPerColor[i] = 0;
|
||||||
|
stw.countBasicLandsPerColor[i] = 0;
|
||||||
|
stw.countNonLandProducersPerColor[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<=STATS_MAX_MANA_COST; i++) {
|
for (int i=0; i<=STATS_MAX_MANA_COST; i++) {
|
||||||
@@ -932,8 +1057,53 @@ void GameStateDeckViewer::updateStats() {
|
|||||||
} else if (current->isSpell()) {
|
} else if (current->isSpell()) {
|
||||||
stw.countSpellsPerCost[convertedCost] += currentCount;
|
stw.countSpellsPerCost[convertedCost] += currentCount;
|
||||||
stw.totalSpellCost += convertedCost * currentCount;
|
stw.totalSpellCost += convertedCost * currentCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if (current->isLand()) {
|
||||||
|
// Lets look for mana producing abilities
|
||||||
|
MTGCardInstance * cin;
|
||||||
|
MTGAbility * ab = NULL;
|
||||||
|
int found;
|
||||||
|
|
||||||
|
// TODO: Creating card instance for the sole purpose of getting the card abilities is dirty. Do something about it.
|
||||||
|
cin = new MTGCardInstance(current, NULL);
|
||||||
|
|
||||||
|
vector<string> abilityStrings;
|
||||||
|
string thisstring = current->magicText;
|
||||||
|
StringExplode(thisstring, "\n", &abilityStrings);
|
||||||
|
|
||||||
|
/*char buf[4096];
|
||||||
|
sprintf(buf, "Card: %s Ability count:%i Iterating....", (current->name).c_str(),(int)abilityStrings.size());
|
||||||
|
OutputDebugString(buf);*/
|
||||||
|
|
||||||
|
for (int i=0; i<(int)abilityStrings.size(); i++) {
|
||||||
|
found = abilityStrings.at(i).find("add");
|
||||||
|
if (found != (int)string::npos){ //Parse only mana abilities
|
||||||
|
ab = af->parseMagicLine(abilityStrings.at(i),0,0,cin);
|
||||||
|
AManaProducer * amp = dynamic_cast<AManaProducer*>(ab);
|
||||||
|
|
||||||
|
if (amp){
|
||||||
|
//OutputDebugString("M ");
|
||||||
|
for (int j=0; j<Constants::MTG_NB_COLORS;j++){
|
||||||
|
if (amp->output->hasColor(j)) {
|
||||||
|
if (current->isLand()) {
|
||||||
|
if (current->hasType("Basic")) {
|
||||||
|
stw.countBasicLandsPerColor[j] += currentCount;
|
||||||
|
} else {
|
||||||
|
stw.countLandsPerColor[j] += currentCount;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
stw.countNonLandProducersPerColor[j] += currentCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SAFE_DELETE(ab);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SAFE_DELETE(cin);
|
||||||
|
//OutputDebugString("...Done\n");
|
||||||
|
//}
|
||||||
// Add to the per color counters
|
// Add to the per color counters
|
||||||
// a. regular costs
|
// a. regular costs
|
||||||
for (int j=0; j<Constants::MTG_NB_COLORS;j++){
|
for (int j=0; j<Constants::MTG_NB_COLORS;j++){
|
||||||
@@ -968,7 +1138,7 @@ void GameStateDeckViewer::updateStats() {
|
|||||||
stw.totalColoredSymbols += stw.totalCostPerColor[j];
|
stw.totalColoredSymbols += stw.totalCostPerColor[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
stw.countCardsPerCost[0] -= stw.countLands; // Quick hack to exclude lands from zero costed card count
|
stw.countCardsPerCost[0] -= stw.countLands;
|
||||||
|
|
||||||
// Counts by type
|
// Counts by type
|
||||||
stw.countCreatures = countCardsByType("Creature");
|
stw.countCreatures = countCardsByType("Creature");
|
||||||
@@ -990,6 +1160,7 @@ void GameStateDeckViewer::updateStats() {
|
|||||||
stw.noCreaturesProbInTurn[i] = noLuck(stw.cardCount, stw.countCreatures, 7+i)*100;
|
stw.noCreaturesProbInTurn[i] = noLuck(stw.cardCount, stw.countCreatures, 7+i)*100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SAFE_DELETE(af);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This should probably be cached in DeckDataWrapper
|
// This should probably be cached in DeckDataWrapper
|
||||||
@@ -1148,7 +1319,7 @@ void GameStateDeckViewer::Render()
|
|||||||
int GameStateDeckViewer::loadDeck(int deckid){
|
int GameStateDeckViewer::loadDeck(int deckid){
|
||||||
SAFE_DELETE(myCollection);
|
SAFE_DELETE(myCollection);
|
||||||
stw.currentPage = 0;
|
stw.currentPage = 0;
|
||||||
stw.pageCount = 7;
|
stw.pageCount = 9;
|
||||||
stw.needUpdate = true;
|
stw.needUpdate = true;
|
||||||
|
|
||||||
string profile = options[Options::ACTIVE_PROFILE].str;
|
string profile = options[Options::ACTIVE_PROFILE].str;
|
||||||
|
|||||||
Reference in New Issue
Block a user