Erwan
- fix a bug where the AI would crash when playing cards with cycling or any other "autohand" ability
This commit is contained in:
@@ -21,7 +21,7 @@ int AIAction::Act(){
|
||||
if (target) g->cardClick(target);
|
||||
return 1;
|
||||
}else if (click){ //Shouldn't be used, really...
|
||||
g->cardClick(click);
|
||||
g->cardClick(click,click);
|
||||
if (target) g->cardClick(target);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -217,6 +217,10 @@ int ActionLayer::reactToClick(MTGCardInstance * card){
|
||||
|
||||
|
||||
void ActionLayer::setMenuObject(Targetable * object, bool must){
|
||||
if (!object){
|
||||
OutputDebugString("FATAL: ActionLayer::setMenuObject\n");
|
||||
return;
|
||||
}
|
||||
menuObject = object;
|
||||
|
||||
SAFE_DELETE(abilitiesMenu);
|
||||
|
||||
Reference in New Issue
Block a user