AIPlayer minor tweaks:

- In order to clarify getEfficiency, started creating "getEfficiency" functions specific to each type of ability (see example with Damager). This won't reduce the file size but should make things bit clearer
- Minor cleanup of getEfficiency
- bug fixes in getEfficiency
This commit is contained in:
wagic.the.homebrew
2011-09-21 15:10:06 +00:00
parent 11095f3339
commit 15f0143a8f
10 changed files with 413 additions and 2489 deletions

View File

@@ -61,7 +61,7 @@ int AIMomirPlayer::momir()
if (ability->isReactingToClick(card, cost))
{
payTheManaCost(cost);
AIAction * a = NEW AIAction(ability, card);
AIAction * a = NEW AIAction(this, ability, card);
clickstream.push(a);
result = 1;
}
@@ -112,7 +112,7 @@ int AIMomirPlayer::computeActions()
if (card && (canPutLandsIntoPlay == PlayRestriction::CAN_PLAY))
{
MTGAbility * putIntoPlay = g->mLayers->actionLayer()->getAbility(MTGAbility::PUT_INTO_PLAY);
AIAction * a = NEW AIAction(putIntoPlay, card); //TODO putinplay action
AIAction * a = NEW AIAction(this, putIntoPlay, card); //TODO putinplay action
clickstream.push(a);
return 1;
}