Slightly changed formatting while investigating src
This commit is contained in:
@@ -138,7 +138,7 @@ public:
|
||||
|
||||
static int findType(string subtype, bool forceAdd = true) {
|
||||
boost::mutex::scoped_lock lock(instance->mMutex);
|
||||
int result = instance->subtypesList.find(subtype, forceAdd);
|
||||
int result = instance->subtypesList.find(subtype, forceAdd);
|
||||
return result;
|
||||
};
|
||||
static int add(string value, unsigned int parentType) {
|
||||
|
||||
@@ -823,13 +823,13 @@ int GenericChooseTypeColor::resolve()
|
||||
for (size_t i = 0; i < values.size(); ++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);
|
||||
MTGAbility * set = setType->clone();
|
||||
set->oneShot = true;
|
||||
selection.push_back(set);
|
||||
SAFE_DELETE(setType);
|
||||
setType = NEW AASetTypeChosen(game, game->mLayers->actionLayer()->getMaxId(), source,(MTGCardInstance*)target, i,menu,baseAbility);
|
||||
MTGAbility * set = setType->clone();
|
||||
set->oneShot = true;
|
||||
selection.push_back(set);
|
||||
SAFE_DELETE(setType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
choose = NEW GenericActivatedAbility(observer, "","",id, card,choose,NULL);
|
||||
@@ -3272,7 +3272,7 @@ MTGAbility * AbilityFactory::parseChooseActionAbility(string s,MTGCardInstance *
|
||||
a->canBeInterrupted = false;
|
||||
return a;
|
||||
}
|
||||
//choose a color
|
||||
//choose a color
|
||||
vector<string> splitChooseAColor = parseBetween(s, "chooseacolor ", " chooseend");
|
||||
if (splitChooseAColor.size())
|
||||
{
|
||||
|
||||
@@ -54,7 +54,9 @@ int Subtypes::add(string value, unsigned int parentType)
|
||||
}
|
||||
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);
|
||||
}
|
||||
return subtype;
|
||||
@@ -115,8 +117,7 @@ void Subtypes::sortSubTypes()
|
||||
|
||||
const vector<string>& Subtypes::getCreatureValuesById()
|
||||
{
|
||||
sort(subtypesCreature.begin(),subtypesCreature.end());
|
||||
subtypesCreature.erase(unique(subtypesCreature.begin(),subtypesCreature.end()),subtypesCreature.end());
|
||||
sortSubTypes();
|
||||
return subtypesCreature;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user