more changes to fix the combo system.

This commit is contained in:
omegablast2002@yahoo.com
2013-03-15 02:08:03 +00:00
parent 31ee6d2b90
commit 9c0ce5f7bf
2 changed files with 9 additions and 2 deletions

View File

@@ -160,7 +160,7 @@ bool AIHints::HintSaysItsForCombo(GameObserver* observer,MTGCardInstance * card)
for(unsigned int hPart = 0; hPart < hints[i]->hold.size(); hPart++)
{
hintTc = tfc.createTargetChooser(hints[i]->hold[hPart],card);
if(hintTc && hintTc->canTarget(card,true) && hintTc->countValidTargets() <= hintTc->maxtargets)
if(hintTc && hintTc->canTarget(card,true))
{
forCombo = true;
}

View File

@@ -1846,8 +1846,15 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
{
if(!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->kicker)
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost());
DebugTrace(" AI wants to play card." << endl
DebugTrace(" AI wants to play card." << endl
<< "- Next card to play: " << (nextCardToPlay ? nextCardToPlay->name : "None" ) << endl );
if(hints && hints->HintSaysItsForCombo(observer,nextCardToPlay))
{
DebugTrace(" AI wants to play a card that belongs to a combo.")
nextCardToPlay = NULL;
}
}
return nextCardToPlay;
}