add the manapool at the end of gotpayments, only once. otherwise we get false amounts.

This commit is contained in:
omegablast2002@yahoo.com
2011-09-21 11:07:41 +00:00
parent e9ce574bca
commit 807e818e92
2 changed files with 2 additions and 0 deletions

View File

@@ -705,6 +705,7 @@ bool AIPlayerBaka::payTheManaCost(ManaCost * cost, MTGCardInstance * target,vect
paid->add(amp->output);
}
}
if(k == gotPayments.size())//only add it once, and at the end.
paid->add(this->getManaPool());//incase some of our payments were mana already in the pool/.
if(paid->canAfford(cost) && (!cost->hasX() || k == gotPayments.size()))
{

View File

@@ -75,6 +75,7 @@ bool AIPlayerBakaB::payTheManaCost(ManaCost * cost, MTGCardInstance * target, ve
paid->add(amp->output);
}
}
if(k == gotPayments.size())//add it once, and at the end.
paid->add(this->getManaPool());//incase some of our payments were mana already in the pool/.
if(paid->canAfford(cost) && (!cost->hasX() || k == gotPayments.size()))
{