Slightly changed formatting while investigating src

This commit is contained in:
Dmitry Panin
2013-12-01 01:01:57 +04:00
parent a70259b5ba
commit 9effa7c975
4 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -823,7 +823,7 @@ int GenericChooseTypeColor::resolve()
for (size_t i = 0; i < values.size(); ++i) for (size_t i = 0; i < values.size(); ++i)
{ {
string menu = values[i]; string menu = values[i];
if(!ANonWall || (menu != "wall" && menu != "Wall")) if (!ANonWall || (menu != "wall" && menu != "Wall"))
{ {
setType = NEW AASetTypeChosen(game, game->mLayers->actionLayer()->getMaxId(), source,(MTGCardInstance*)target, i,menu,baseAbility); setType = NEW AASetTypeChosen(game, game->mLayers->actionLayer()->getMaxId(), source,(MTGCardInstance*)target, i,menu,baseAbility);
MTGAbility * set = setType->clone(); MTGAbility * set = setType->clone();
+1 -1
View File
@@ -1145,7 +1145,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
} }
if(s.compare(0, strlen("chooseacolor "), "chooseacolor ") == 0 || s.compare(0, strlen("chooseatype "), "chooseatype ") == 0) if (StartsWith(s, "chooseacolor ") || StartsWith(s, "chooseatype "))
{ {
MTGAbility * choose = parseChooseActionAbility(s,card,spell,target,0,id); MTGAbility * choose = parseChooseActionAbility(s,card,spell,target,0,id);
choose = NEW GenericActivatedAbility(observer, "","",id, card,choose,NULL); choose = NEW GenericActivatedAbility(observer, "","",id, card,choose,NULL);
+4 -3
View File
@@ -54,7 +54,9 @@ int Subtypes::add(string value, unsigned int parentType)
} }
if (isSubType(subtype) && (parentType == TYPE_CREATURE)) if (isSubType(subtype) && (parentType == TYPE_CREATURE))
{ {
if(value != "forest" && value != "Forest")//http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=136196 one creature with a land subtype exist, but the card has special ruling. if (value != "forest" && value != "Forest")
//http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=136196
//one creature with a land subtype exist, but the card has special ruling.
subtypesCreature.push_back(value); subtypesCreature.push_back(value);
} }
return subtype; return subtype;
@@ -115,8 +117,7 @@ void Subtypes::sortSubTypes()
const vector<string>& Subtypes::getCreatureValuesById() const vector<string>& Subtypes::getCreatureValuesById()
{ {
sort(subtypesCreature.begin(),subtypesCreature.end()); sortSubTypes();
subtypesCreature.erase(unique(subtypesCreature.begin(),subtypesCreature.end()),subtypesCreature.end());
return subtypesCreature; return subtypesCreature;
} }