finally fixed Changeling abilities= keyword.

This commit is contained in:
omegablast2002@yahoo.com
2010-10-22 17:45:56 +00:00
parent f3449592de
commit 90fb03aba7
2 changed files with 22 additions and 0 deletions

View File

@@ -307,8 +307,13 @@ 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]){
s += _("Shapeshifter - ");
break;
}else{
s += _(Subtypes::subtypesList->find(card->data->types[i]));
s += _(" - ");
}
}
if(card->data->types.size())
s += _(Subtypes::subtypesList->find(card->data->types[0]));

View File

@@ -186,6 +186,23 @@ void CardPrimitive::addType(char * _type_text){
void CardPrimitive::setSubtype(const string& value){
int id = Subtypes::subtypesList->find(value);
addType(id);
if(basicAbilities[55]){
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")
{//dont add "nothing" or land type to this card.
}else{
addType(i);
}
}
}
}
}
void CardPrimitive::addType(int id){