diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 6cdd57938..de234e559 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -306,7 +306,7 @@ void CardGui::alternateRender(MTGCard * card, const Pos& pos){ string s = ""; for (int i = card->data->types.size() - 1; i > 0; --i) { - if(card->data->basicAbilities[55]){// this avoids drawing the list of subtypes on changeling cards. + if(card->data->basicAbilities[Constants::CHANGELING]){// this avoids drawing the list of subtypes on changeling cards. s += _("Shapeshifter - "); break; }else{ diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index 65152fa82..339c38de9 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -186,24 +186,6 @@ void CardPrimitive::addType(char * _type_text){ void CardPrimitive::setSubtype(const string& value){ int id = Subtypes::subtypesList->find(value); addType(id); - - if(basicAbilities[55]){//if the card is a changeling. - for(int i=Subtypes::LAST_TYPE+1;;i++){ - string s = Subtypes::subtypesList->find(i); - if(!hasSubtype(i)) - { - if(s == "") break; - if(s.find(" ") != string::npos) continue; - if(s == "Nothing" || s == "Swamp" || s == "Plains" || s == "Mountain" || s == "Forest" || s == "Island" || s == "Shrine" || s == "Basic" || s == "Colony" || s == "Desert" || s == "Dismiss" || s == "Equipment" - || s == "Everglades" || s == "Grasslands" || s == "Lair" || s == "Level" || s == "Levelup" || s == "Mine" || s == "Oasis" || s == "World" || s == "Aura") - {//dont add "nothing" or land type to this card. - }else{ - addType(i); - } - } - } - } - } void CardPrimitive::addType(int id){ diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 9d5c7f146..9eb6c401f 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -128,6 +128,21 @@ void MTGCardInstance::initMTGCI(){ blocked = false; currentZone = NULL; data = this; //an MTGCardInstance point to itself for data, allows to update it without killing the underlying database item + + if(basicAbilities[Constants::CHANGELING]){//if the card is a changeling. + for(int i=Subtypes::LAST_TYPE+1;;i++){ + string s = Subtypes::subtypesList->find(i); + if(!hasSubtype(i)) + { + if(s == "") break; + if(s.find(" ") != string::npos) continue; + if(s == "Nothing" || s == "Swamp" || s == "Plains" || s == "Mountain" || s == "Forest" || s == "Island" || s == "Shrine" || s == "Basic" || s == "Colony" || s == "Desert" || s == "Dismiss" || s == "Equipment" + || s == "Everglades" || s == "Grasslands" || s == "Lair" || s == "Level" || s == "Levelup" || s == "Mine" || s == "Oasis" || s == "World" || s == "Aura") continue; + addType(i); + } + } + } + } diff --git a/projects/mtg/src/WFont.cpp b/projects/mtg/src/WFont.cpp index 4df261509..acd8b8561 100644 --- a/projects/mtg/src/WFont.cpp +++ b/projects/mtg/src/WFont.cpp @@ -1,4 +1,4 @@ -#include "PrecompiledHeader.h" +#include "PrecompiledHeader.h" #include "WFont.h" #include "WResourceManager.h"