- introducing "grade" system for cards
- Fixed a few typos in _cards.dat
This commit is contained in:
wagic.the.homebrew@gmail.com
2010-01-30 06:33:40 +00:00
parent ccdda4e7a8
commit dd01706527
13 changed files with 117 additions and 32 deletions
+10
View File
@@ -42,6 +42,7 @@ public:
REVERSETRIGGERS,
DISABLECARDS,
INTERRUPT_SECONDS,
MAX_GRADE,
//My interrupts
INTERRUPTMYSPELLS,
INTERRUPTMYABILITIES,
@@ -159,6 +160,15 @@ private:
OptionManaDisplay();
static OptionManaDisplay mDef;
};
class OptionMaxGrade: public EnumDefinition {
public:
static EnumDefinition * getInstance() {return &mDef;};
private:
OptionMaxGrade();
static OptionMaxGrade mDef;
};
class OptionDifficulty: public EnumDefinition {
public:
enum { NORMAL = 0, HARD = 1, HARDER = 2, EVIL = 3};
+2 -1
View File
@@ -80,6 +80,7 @@ class MTGAllCards {
private:
MTGCard * tempCard; //used by parser
CardPrimitive * tempPrimitive; //used by parser
int currentGrade; //used by Parser (we don't want an additional attribute for the primitives for that as it is only used at load time)
protected:
int conf_read_mode;
int colorsCount[Constants::MTG_NB_COLORS];
@@ -113,7 +114,7 @@ private:
private:
int processConfLine(string s, MTGCard* card, CardPrimitive * primitive);
bool addCardToCollection(MTGCard * card, int setId);
bool addPrimitive(CardPrimitive * primitive, MTGCard * card = NULL);
CardPrimitive * addPrimitive(CardPrimitive * primitive, MTGCard * card = NULL);
};
+6
View File
@@ -131,6 +131,12 @@ class Constants
MENU_FONT = 1,
MAGIC_FONT = 2,
OPTION_FONT = 1,
GRADE_SUPPORTED = 1,
GRADE_BORDERLINE = 2,
GRADE_CRAPPY = 3,
GRADE_UNSUPPORTED = 4,
GRADE_DANGEROUS = 5,
};
static char MTGColorChars[];
+3 -3
View File
@@ -440,15 +440,15 @@ class OptionInteger:public OptionItem{
int value; //Current value.
int defValue; //Default value.
string strDefault; //What to call the default value.
int maxValue, increment;
int maxValue, increment, minValue;
OptionInteger(int _id, string _displayValue, int _maxValue = 1, int _increment = 1, int _defV = 0, string _sDef = "");
OptionInteger(int _id, string _displayValue, int _maxValue = 1, int _increment = 1, int _defV = 0, string _sDef = "", int _minValue = 0);
virtual void Reload() {if(id != INVALID_OPTION) value = options[id].number;};
virtual bool Changed() {return value != options[id].number;};
virtual void Render();
virtual void setData();
virtual void updateValue(){value+=increment; if (value>maxValue) value=0;};
virtual void updateValue(){value+=increment; if (value>maxValue) value=minValue;};
};
class OptionSelect:public OptionItem{