From 807e818e927a921677b54c3c66e2dbb23a1aef39 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Wed, 21 Sep 2011 11:07:41 +0000 Subject: [PATCH] add the manapool at the end of gotpayments, only once. otherwise we get false amounts. --- projects/mtg/src/AIPlayerBaka.cpp | 1 + projects/mtg/src/AIPlayerBakaB.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index 66a2a0dfb..b96e340bb 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -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())) { diff --git a/projects/mtg/src/AIPlayerBakaB.cpp b/projects/mtg/src/AIPlayerBakaB.cpp index d86b5da1f..a4ad3a5d9 100644 --- a/projects/mtg/src/AIPlayerBakaB.cpp +++ b/projects/mtg/src/AIPlayerBakaB.cpp @@ -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())) {