reimplemented mana color display for deck selection. This is now totally controlled by
stats generation. No data needs to be written to the deck master files themselves. Now the mana colors will only show if you have battled with a particular deck at least once. This is not retroactive, so you will need to battle the ai again. This can not be edited manually either to prevent tampering with the statistical data. Player deck mana color display is also covered this way. Decks will still be saved in the new layout if a disk write is necessary. So any changes via the deck editor will result in a deck file rewrite is was always the case.:)
This commit is contained in:
@@ -15,10 +15,11 @@ class GameObserver;
|
||||
class DeckStat
|
||||
{
|
||||
public:
|
||||
DeckStat(int _nbgames = 0, int _victories = 0);
|
||||
DeckStat(int _nbgames = 0, int _victories = 0, string manaColorIndex = "");
|
||||
|
||||
int nbgames;
|
||||
int victories;
|
||||
string manaColorIndex;
|
||||
int percentVictories();
|
||||
};
|
||||
|
||||
@@ -27,9 +28,8 @@ class DeckStats
|
||||
protected:
|
||||
static DeckStats * mInstance;
|
||||
public:
|
||||
//map<string, DeckStat *> stats; // current set of statistics
|
||||
string currentDeck;
|
||||
map<string, map<string,DeckStat*> > masterDeckStats;
|
||||
map<string, map<string, DeckStat*> > masterDeckStats;
|
||||
|
||||
static DeckStats * GetInstance();
|
||||
static void EndInstance();
|
||||
@@ -94,7 +94,8 @@ public:
|
||||
int countNonLandProducersPerColor[Constants::MTG_NB_COLORS + 1];
|
||||
int totalCostPerColor[Constants::MTG_NB_COLORS + 1];
|
||||
int totalColoredSymbols;
|
||||
|
||||
|
||||
string getManaColorIndex();
|
||||
void updateStats(string filename, MTGAllCards * collection);
|
||||
void updateStats(DeckDataWrapper *mtgDeck);
|
||||
int countCardsByType(const char * _type, DeckDataWrapper * myDeck);
|
||||
|
||||
Reference in New Issue
Block a user