From 00adb20dc71fff4c46f3420c240960ed39c78588 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 30 May 2016 01:17:53 +0800 Subject: [PATCH] super rare loop in ai combos and fix #667 thanks zeth --- projects/mtg/src/AIPlayerBaka.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index a2c237e6c..561b8ee65 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -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;