more changes to fix the combo system.
This commit is contained in:
@@ -160,7 +160,7 @@ bool AIHints::HintSaysItsForCombo(GameObserver* observer,MTGCardInstance * card)
|
|||||||
for(unsigned int hPart = 0; hPart < hints[i]->hold.size(); hPart++)
|
for(unsigned int hPart = 0; hPart < hints[i]->hold.size(); hPart++)
|
||||||
{
|
{
|
||||||
hintTc = tfc.createTargetChooser(hints[i]->hold[hPart],card);
|
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;
|
forCombo = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1846,8 +1846,15 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
|
|||||||
{
|
{
|
||||||
if(!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->kicker)
|
if(!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->kicker)
|
||||||
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost());
|
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 );
|
<< "- 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;
|
return nextCardToPlay;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user