- AI:increased percentage of chance to play an "unknown" Card
- removed delay before displaying big card ingame
- added 2 new AI Decks 
- Fixed a bug with afflict (see tests/afflict.txt)
This commit is contained in:
wagic.the.homebrew
2008-12-01 12:10:55 +00:00
parent 179b7deeb8
commit d66ef78d12
11 changed files with 194 additions and 14 deletions
+6 -5
View File
@@ -154,13 +154,13 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
}
}
//Champion. Very basic, needs to be improved !
found = s.find("champion(name:");
//foreach. Very basic, needs to be improved !
found = s.find("foreach(name:");
if (found != string::npos){
if (dryMode) return BAKA_EFFECT_GOOD;
unsigned int end = s.find(")", found+14);
unsigned int end = s.find(")", found+13);
if (end != string::npos){
string type = s.substr(found+14,end-found-14).c_str();
string type = s.substr(found+13,end-found-13).c_str();
game->addObserver(NEW APlagueRats(id,card,type.c_str()));
result++;
continue;
@@ -365,7 +365,8 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
found = s.find("/");
if (found != string::npos){
unsigned int start = s.find(":");
if (start == string::npos) start = found-2;
if (start == string::npos) start = s.find(" ");
if (start == string::npos) start = -1;
int power = atoi(s.substr(start+1,size-found).c_str());
unsigned int end = s.find(" ",start);
int toughness;