- Card Primitives system. Check Royal Assassin in RV, 10E, M10
- Please review, is sets/primitives a good directory? Should we rename MTGCard into "CardPrint"? 
- Unfortunately for now it is not possible to "override" a Primitive. A card that links to a primitive but also defines new "values" will create its own data and ignore the data in the "linked" primitive for the time being. I hope to solve that at some point...
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-12-27 12:14:36 +00:00
parent 6135774016
commit 05a72de5bc
29 changed files with 713 additions and 564 deletions

View File

@@ -0,0 +1,82 @@
#ifndef _CARDPRIMITIVE_H_
#define _CARDPRIMITIVE_H_
#include <string>
#include <vector>
#include <map>
#include "ManaCost.h"
using namespace std;
class CardPrimitive {
protected:
ManaCost manaCost;
vector<string> ftdText;
int init();
string lcname;
public:
string text;
string name;
int colors[Constants::MTG_NB_COLORS];
map<int,int> basicAbilities;
map<string,string> magicTexts;
string magicText;
int alias;
string spellTargetType;
int power;
int toughness;
vector<int>types;
CardPrimitive();
CardPrimitive(CardPrimitive * source);
void setColor(int _color, int removeAllOthers = 0);
void setColor(string _color, int removeAllOthers = 0);
void removeColor(int color);
int getColor();
int hasColor(int _color);
int countColors();
int has(int ability);
void setText(string value);
const char * getText();
void addMagicText(string value);
void addMagicText(string value, string zone);
void setName(string value);
const string getName() const;
const string getLCName() const;
void addType(char * type_text);
void addType(int id);
void setType(const char * type_text);
void setSubtype( string value);
int removeType(string value, int removeAll = 0);
int removeType(int value, int removeAll = 0);
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();
bool isCreature();
bool isLand();
bool isSpell();
void setPower(int _power);
int getPower();
void setToughness(int _toughness);
int getToughness();
const vector<string>& formattedText();
};
#endif