Some additions to the deck statistics.

- Displaying title for each page
- In screen showing games against AI, displaying actual number of games won/played in addition to percentage
- Added two new screens (3,4) - mana cost/color breakdown for creatures (3) and non-creature spells (4)

More to come...
This commit is contained in:
d32.wagic
2009-11-07 20:04:09 +00:00
parent 245cfc625c
commit af343a4a7f
4 changed files with 128 additions and 45 deletions

View File

@@ -14,6 +14,7 @@
#include "../include/PriceList.h"
#include "../include/PlayerData.h"
#include "../include/DeckDataWrapper.h"
#include "../include/DeckStats.h"
#define NO_USER_ACTIVITY_HELP_DELAY 10
#define NO_USER_ACTIVITY_SHOWCARD_DELAY 0.1
@@ -58,6 +59,10 @@ struct StatsWrapper {
int totalPrice;
int totalManaCost;
float avgManaCost;
int totalCreatureCost;
float avgCreatureCost;
int totalSpellCost;
float avgSpellCost;
int countCreatures, countSpells, countInstants, countEnchantments, countSorceries, countArtifacts;
@@ -66,11 +71,15 @@ struct StatsWrapper {
int countCardsPerCost[STATS_MAX_MANA_COST+1];
int countCardsPerCostAndColor[STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
int countCreaturesPerCost[STATS_MAX_MANA_COST+1];
int countCreaturesPerCostAndColor[STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
int countSpellsPerCost[STATS_MAX_MANA_COST+1];
int countSpellsPerCostAndColor[STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
int totalCostPerColor[Constants::MTG_NB_COLORS+1];
int totalColoredSymbols;
vector<int> aiVictoryRatio;
vector<string> aiDeckNames;
vector<DeckStat*> aiDeckStats;
};
class GameStateDeckViewer: public GameState, public JGuiListener