moved the gaurds i introduced in r2734 into the function selectAbility() as a static bool as suggested by jean, its much cleaner this way.

This commit is contained in:
omegablast2002@yahoo.com
2010-12-04 18:25:59 +00:00
parent 15e6fabd9f
commit 8a49d2af51
4 changed files with 17 additions and 44 deletions

View File

@@ -85,11 +85,7 @@ int AIMomirPlayer::computeActions()
int currentGamePhase = g->getCurrentGamePhase();
if (g->isInterrupting == this)
{ // interrupting
if (!mFindingAbility)//if not looking for an activated ability to use, then go ahead and look now.
{
mFindingAbility = true;
selectAbility();
}
selectAbility();
return 1;
}
else if (p == this && g->mLayers->stackLayer()->count(0, NOT_RESOLVED) == 0)
@@ -123,11 +119,7 @@ int AIMomirPlayer::computeActions()
break;
}
case Constants::MTG_PHASE_SECONDMAIN:
if (!mFindingAbility)//if not looking for an activated ability to use, then go ahead and look now.
{
mFindingAbility = true;
selectAbility();
}
selectAbility();
return 1;
break;
default: