super rare loop in ai combos and fix #667

thanks zeth
This commit is contained in:
Anthony Calosa
2016-05-30 01:17:53 +08:00
parent 22d4cbbd1e
commit 00adb20dc7

View File

@@ -714,6 +714,9 @@ bool AIPlayerBaka::payTheManaCost(ManaCost * cost, MTGCardInstance * target,vect
if(!cost->getConvertedCost())
{
DebugTrace("AIPlayerBaka: Card was a land and ai cant play any more lands this turn. ");
if (target && target->isLand() && game->playRestrictions->canPutIntoZone(target, game->battlefield) == PlayRestriction::CANT_PLAY)
return false;
DebugTrace("AIPlayerBaka: Card or Ability was free to play. ");
if(!cost->hasX())//don't return true if it contains {x} but no cost, locks ai in a loop. ie oorchi hatchery cost {x}{x} to play.
return true;