couple tweaks to transforms to it doesn't add subkeywords as types....

2nd, removed a peice of code which was originally added i imagine before list mentioner was created which added cards whos names ended in "s" to the subtypes list, this is completely unrelated to the "s" charector added to targetchooser. this was actually a really nasty hack....
previous subtypes list contained 1200 variables...the new one after this removel is about 237ish....

this does not impact foreach, or any targetchoosers ability to target a card by name, targetchooser is coded to add card names to the subtypes list as it needs them, so using foreach(arbor elf) will add this to subtypes list for targeting purposes, in the future we might want to have this kind of check done and handled outside of the subtypes list, adding card names to that list for the purpose of targeting is just dirty.

this fixes a ugly lag spike introduced with the change to subtypes...for now...we need to consider a better way to sort these in the future to avoid this returning as subtypeslist gets bigger.
This commit is contained in:
omegablast2002@yahoo.com
2011-05-09 18:10:10 +00:00
parent 6d4f0c024c
commit 8737aec005
3 changed files with 26 additions and 30 deletions

View File

@@ -272,10 +272,6 @@ void CardPrimitive::setName(const string& value)
name = value;
lcname = value;
std::transform(lcname.begin(), lcname.end(), lcname.begin(), ::tolower);
//This is a bug fix for plague rats and the "foreach ability"
//Right now we add names as types, so that they get recognized
if (value.length() && lcname.at(value.length() - 1) == 's')
Subtypes::subtypesList->find(lcname);
}
const string& CardPrimitive::getName() const