- fixed memory leaks introduced in previous revision
- removed incorrect casts of MTGCardInstance into Spell objects. - AI Test system now allows you to put decks in ai/bakaA and ai/bakaB instead of ai/baka. This allows to let AIPlayerBaka and AIPlayerBakaB play with specific decks - Test suite speed improvement. Improved the card name cache. Test suite now runs in 850 seconds instead of 950 on my machine. - minor code cleanup
This commit is contained in:
@@ -180,11 +180,19 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
{
|
||||
targetMin = true;//if upto: is not found, then we need to have a minimum of the amount....
|
||||
}
|
||||
WParsedInt * howmuch = NEW WParsedInt(howmany, NULL, card);
|
||||
howmany.find("anyamount") != string::npos?maxtargets = TargetChooser::UNLITMITED_TARGETS:maxtargets = howmuch->getValue();
|
||||
if(howmany.find("anyamount") != string::npos)
|
||||
|
||||
if (howmany.find("anyamount") != string::npos)
|
||||
{
|
||||
maxtargets = TargetChooser::UNLITMITED_TARGETS;
|
||||
targetMin = false;
|
||||
delete howmuch;
|
||||
}
|
||||
else
|
||||
{
|
||||
WParsedInt * howmuch = NEW WParsedInt(howmany, NULL, card);
|
||||
maxtargets = howmuch->getValue();
|
||||
delete howmuch;
|
||||
}
|
||||
|
||||
s1 = s1.substr(end + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user