recoded altercost, its finally not using a dirty clean up. this fixes the bug with it not effecting ai also and the bug where it was ineffective when combined with affinity creatures... removed a aspect of the wolf class... soft coded support for aspect of the wolf...using word variable subkeyword "halfup" and "halfdown" it can go anywhere a parsable word vairable is stringing...i preffer the front of it... these are Wparsedint subkeywords, not keywords you can use with standard abilities... its meant to return half the varible rounds up, or down... fixed player not losing with cantlifelose when they have 10 or more poison...the player should die. reworked taplandformana, i send the main card as a target now, check against the cost if its affordable...anyways, i discussed this bool function a while back with devs and wololo saw the same issues i saw in it...he then removed it from being used as an if statement...i changed it back to an if statement with the new checks...we are either going to go back to a void, or go all the way bool, but not inbetween.
95 lines
2.1 KiB
C++
95 lines
2.1 KiB
C++
#ifndef _CARDPRIMITIVE_H_
|
|
#define _CARDPRIMITIVE_H_
|
|
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
#include "ManaCost.h"
|
|
|
|
using namespace std;
|
|
|
|
class CardPrimitive {
|
|
protected:
|
|
vector<string> ftdText;
|
|
string lcname;
|
|
ManaCost manaCost;
|
|
|
|
public:
|
|
ManaCost reducedCost;
|
|
ManaCost increasedCost;
|
|
string text;
|
|
string name;
|
|
int init();
|
|
|
|
int colors[Constants::MTG_NB_COLORS];
|
|
map<int,int> basicAbilities;
|
|
map<string,string> magicTexts;
|
|
string magicText;
|
|
int alias;
|
|
string spellTargetType;
|
|
int power;
|
|
int toughness;
|
|
bool hasRestriction;
|
|
string restriction;
|
|
string otherrestriction;
|
|
int suspendedTime;
|
|
|
|
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(const string& value);
|
|
const char * getText();
|
|
|
|
void addMagicText(string value);
|
|
void addMagicText(string value, string zone);
|
|
|
|
void setName(const string& value);
|
|
const string& getName() const;
|
|
const string& getLCName() const;
|
|
|
|
void addType(char * type_text);
|
|
void addType(int id);
|
|
void setType(const string& type_text);
|
|
void setSubtype(const 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();
|
|
ManaCost * getReducedManaCost();
|
|
ManaCost * getIncreasedManaCost();
|
|
bool isCreature();
|
|
bool isLand();
|
|
bool isSpell();
|
|
|
|
void setPower(int _power);
|
|
int getPower();
|
|
void setToughness(int _toughness);
|
|
int getToughness();
|
|
void setRestrictions(string _restriction);
|
|
void getRestrictions();
|
|
void setOtherRestrictions(string _restriction);
|
|
void getOtherRestrictions();
|
|
const vector<string>& formattedText();
|
|
};
|
|
|
|
|
|
#endif
|