Erwan
- 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:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "../include/MTGDefinitions.h"
|
||||
#include "../include/MTGCard.h"
|
||||
#include "../include/CardPrimitive.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
using std::map;
|
||||
@@ -16,7 +17,7 @@ class Cmp1 { // compares cards by their name
|
||||
bool operator()(MTGCard * card1, MTGCard * card2) const {
|
||||
if (!card2) return true;
|
||||
if (!card1) return false;
|
||||
int result = card1->name.compare(card2->name);
|
||||
int result = card1->data->name.compare(card2->data->name);
|
||||
if (!result) return card1->getMTGId() < card2->getMTGId();
|
||||
return ( result < 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user