Jeck - Added custom booster packs (see miki), numerous small fixes. Once we hit feature-freeze I'll be reviewing this stuff in depth, as again there's likely a lot of room for cleaning... just wanted to get it in first :).

I cut some bits out that weren't ready for SVN, hopefully I've committed everything correctly.
This commit is contained in:
wagic.jeck
2010-02-11 18:32:44 +00:00
parent 103a3d2822
commit ab34fc16f9
31 changed files with 1013 additions and 134 deletions

View File

@@ -5,8 +5,10 @@ class WCardFilter;
struct WCardSort;
struct WDistort;
class PriceList;
class MTGCard;
class MTGDeck;
class MTGAllCards;
class JQuad;
class WSyncable{
public:
@@ -69,22 +71,29 @@ public:
virtual void Sort(int method);
virtual bool setOffset(int pos);
virtual bool isEmptySet(WCardFilter * f);
virtual void addFilter(WCardFilter * f);
virtual void clearFilters();
virtual WCardFilter* unhookFilters();
virtual bool matchesFilters(MTGCard * c);
virtual void validateFilters();
virtual void bakeFilters(); //Discards all invalidated cards.
virtual float filterFee();
virtual int addToDeck(MTGDeck * i, int num=-1); //Returns num that didn't add
//Loads into us.
virtual int loadMatches(MTGAllCards* ac); //loadMatches adds the cards from something
virtual int loadMatches(MTGDeck * deck); //into this, if it matches our filter
virtual int loadMatches(WSrcCards* src, bool all=false); //If all==true, ignore filters on src.
//We load it
virtual int addRandomCards(MTGDeck * i, int howmany=1);
virtual int addToDeck(MTGDeck * i, int num=-1); //Returns num that didn't add
enum {
MAX_CYCLES = 4, //How many cycles to search, for addToDeck
SORT_COLLECTOR,
SORT_ALPHA
SORT_ALPHA,
SORT_RARITY
};
protected:
vector<MTGCard*> cards;
@@ -122,5 +131,10 @@ struct WCSortAlpha{
bool operator()(const MTGCard*l, const MTGCard*r);
};
struct WCSortRarity{
int rareToInt(char r);
bool operator()(const MTGCard*l, const MTGCard*r);
};
#endif