1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-03-31 01:07:39 -09:00

fixed issue with computer player handling target distribution

This commit is contained in:
Evan Kranzler 2018-04-20 12:35:39 -04:00
parent 7d5e12d7ea
commit f07ac5e844

View file

@ -785,7 +785,8 @@ public class ComputerPlayer extends PlayerImpl implements Player {
log.debug("chooseTarget: " + outcome.toString() + ':' + target.toString());
}
UUID opponentId = game.getOpponents(playerId).iterator().next();
if (target.getOriginalTarget() instanceof TargetCreatureOrPlayerAmount) {
if (target.getOriginalTarget() instanceof TargetCreatureOrPlayerAmount
|| target.getOriginalTarget() instanceof TargetAnyTargetAmount) {
if (outcome == Outcome.Damage && game.getPlayer(opponentId).getLife() <= target.getAmountRemaining()) {
target.addTarget(opponentId, target.getAmountRemaining(), source, game);
return true;