changed ai eff return on token creation. over 50 tokens on my battlefield return 0.

changed an inefficient check on phaseskip.
This commit is contained in:
omegablast2002@yahoo.com
2013-03-21 01:28:56 +00:00
parent 8b626b378f
commit 9b44d627a3
3 changed files with 19 additions and 1 deletions
+16
View File
@@ -595,6 +595,9 @@ int OrderedAIAction::getEfficiency()
efficiency = 0; efficiency = 0;
} }
} }
if(p->game->battlefield->countByType("token") >= 50)
efficiency = 0;
} }
//At this point the "basic" efficiency is computed, we further tweak it depending on general decisions, independent of theAbility type //At this point the "basic" efficiency is computed, we further tweak it depending on general decisions, independent of theAbility type
@@ -1887,7 +1890,20 @@ MTGCardInstance * AIPlayerBaka::activateCombo()
if(comboCards.size()) if(comboCards.size())
{ {
nextCardToPlay = comboCards.back(); nextCardToPlay = comboCards.back();
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName()); DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
DebugTrace("ai is doing a combo:" << nextCardToPlay->getName());
if (game->playRestrictions->canPutIntoZone(nextCardToPlay, game->stack) == PlayRestriction::CANT_PLAY) if (game->playRestrictions->canPutIntoZone(nextCardToPlay, game->stack) == PlayRestriction::CANT_PLAY)
return NULL; return NULL;
comboCards.pop_back(); comboCards.pop_back();
+1 -1
View File
@@ -869,7 +869,7 @@ void GameObserver::gameStateBasedEffects()
//Auto skip Phases //Auto skip Phases
int skipLevel = (currentPlayer->playMode == Player::MODE_TEST_SUITE || mLoading) ? Constants::ASKIP_NONE int skipLevel = (currentPlayer->playMode == Player::MODE_TEST_SUITE || mLoading) ? Constants::ASKIP_NONE
: options[Options::ASPHASES].number; : options[Options::ASPHASES].number;
int nrCreatures = currentPlayer->game->inPlay->countByType("Creature"); int nrCreatures = currentPlayer->game->inPlay->hasType("creature")?1:0;
if (skipLevel == Constants::ASKIP_SAFE || skipLevel == Constants::ASKIP_FULL) if (skipLevel == Constants::ASKIP_SAFE || skipLevel == Constants::ASKIP_FULL)
{ {
+2
View File
@@ -519,6 +519,8 @@ unsigned int MTGGameZone::countByType(const char * value)
{ {
result++; result++;
} }
else if(value == "token" && cards[i]->isToken)
result++;
} }
return result; return result;
} }