* New interface.
* This breaks a lot of things. It is not feature-equivalent. It
  probably doesn't compile under windows and doesn't work on PSP.
* Damage is not resolved any more. This will have to be fixed.
* Blockers can't be ordered any more. This will have to be fixed.
* A lot of new art is included.
This commit is contained in:
jean.chalard
2009-08-22 05:59:43 +00:00
parent bf4262c0a0
commit 3349f974f1
101 changed files with 2424 additions and 2361 deletions

View File

@@ -10,51 +10,35 @@
#define MTG_MINIIMAGE_WIDTH 45
#define MTG_MINIIMAGE_HEIGHT 64
#define MAX_TYPES_PER_CARD 10
#include "ManaCost.h"
class TexturesCache;
#include <string>
#include <vector>
#include <map>
#include "ManaCost.h"
using namespace std;
class MTGCard {
protected:
int mtgid;
ManaCost manaCost;
char rarity;
char image_name[MTGCARD_NAME_SIZE];
vector<string> ftdText;
int init();
public:
TexturesCache * mCache;
string text;
string name;
int colors[Constants::MTG_NB_COLORS];
map<int,int> basicAbilities;
vector<string> formattedText;
string magicText;
int alias;
string spellTargetType;
int formattedTextInit;
int power;
int toughness;
int setId;
@@ -62,11 +46,8 @@ class MTGCard {
int nb_types;
int types[MAX_TYPES_PER_CARD];
MTGCard();
MTGCard(TexturesCache * cache, int set_id);
MTGCard(int set_id);
MTGCard(MTGCard * source);
JQuad * getQuad(TexturesCache * cache);
JQuad * getQuad(int type=1);
JQuad * getThumb();
void setColor(int _color, int removeAllOthers = 0);
int getColor();
@@ -87,13 +68,13 @@ class MTGCard {
//void setImageName( char * value);
char * getImageName ();
void setText( string value);
void setText(string value);
const char * getText();
void addMagicText(string value);
void setName( string value);
const char * getName();
void setName(string value);
const string getName() const;
void addType(char * type_text);
void addType(int id);
@@ -101,22 +82,24 @@ class MTGCard {
void setSubtype( string value);
int removeType(string value, int removeAll = 0);
int removeType(int value, int removeAll = 0);
int hasSubtype(int _subtype);
int hasSubtype(const char * _subtype);
int hasSubtype(string _subtype);
int hasType(int _type);
int hasType(const char * type);
bool hasSubtype(int _subtype);
bool hasSubtype(const char * _subtype);
bool hasSubtype(string _subtype);
bool hasType(int _type);
bool hasType(const char * type);
void setManaCost(string value);
ManaCost * getManaCost();
int isACreature();
bool isCreature();
bool isLand();
bool isSpell();
void setPower(int _power);
int getPower();
void setToughness(int _toughness);
int getToughness();
const vector<string>& formattedText();
};