* Fixed attack tap handling - You can no longer attack with a mana producing creature that will be get tapped for attacking and use the creature itself to produce mana to pay for effects like Ghostly Prison if the mana ability has the cost to tap the creature.

This commit is contained in:
LevelX2 2015-04-16 15:57:17 +02:00
parent 28171b3b6a
commit b2fe13c8c8
20 changed files with 224 additions and 234 deletions

View file

@ -190,9 +190,13 @@ public class RandomPlayer extends ComputerPlayer {
binary.insert(0, "0"); //pad with zeros
}
for (int i = 0; i < attackersList.size(); i++) {
if (binary.charAt(i) == '1')
game.getCombat().declareAttacker(attackersList.get(i).getId(), defenderId, game);
}
if (binary.charAt(i) == '1') {
setStoredBookmark(game.bookmarkState()); // makes it possible to UNDO a declared attacker with costs from e.g. Propaganda
if (!game.getCombat().declareAttacker(attackersList.get(i).getId(), defenderId, playerId, game)) {
game.undo(playerId);
}
}
}
actionCount++;
}