Reverting r3496 to fix failing tests

This commit is contained in:
wagic.the.homebrew
2011-04-21 15:16:22 +00:00
parent 1d295c0cef
commit 6f5919ed06
13 changed files with 53 additions and 70 deletions

View File

@@ -156,11 +156,11 @@ bool AIPlayer::tapLandsForMana(ManaCost * cost, MTGCardInstance * target)
{
used[card] = true;
int doUse = 1;
for (int colorsIdx = Constants::MTG_NB_COLORS - 1; colorsIdx >= 0; colorsIdx--)
for (int i = Constants::MTG_NB_COLORS - 1; i >= 0; i--)
{
if (diff->getCost(colorsIdx) && amp->output->getCost(colorsIdx))
if (diff->getCost(i) && amp->output->getCost(i))
{
diff->remove(colorsIdx, 1);
diff->remove(i, 1);
doUse = 0;
break;
}
@@ -513,8 +513,7 @@ int AIAction::getEfficiency()
case MTGAbility::MANA_PRODUCER://only way to hit this condition is nested manaabilities, ai skips manaproducers by defualt when finding an ability to use.
{
MTGCardInstance * _target = (MTGCardInstance *) (a->target);
// TODO: C6246: Clarify a, is this independant of the "a" declared outside this scope?
MTGAbility * a = AbilityFactory::getCoreAbility(ability);
MTGAbility * a = AbilityFactory::getCoreAbility(ability);
efficiency = 0;
//trying to encourage Ai to use his foreach manaproducers in first main