mirror of
https://github.com/correl/mage.git
synced 2025-04-02 11:25:59 -09:00
fixed issue with computer player handling target distribution
This commit is contained in:
parent
7d5e12d7ea
commit
f07ac5e844
1 changed files with 2 additions and 1 deletions
|
@ -785,7 +785,8 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
||||||
log.debug("chooseTarget: " + outcome.toString() + ':' + target.toString());
|
log.debug("chooseTarget: " + outcome.toString() + ':' + target.toString());
|
||||||
}
|
}
|
||||||
UUID opponentId = game.getOpponents(playerId).iterator().next();
|
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()) {
|
if (outcome == Outcome.Damage && game.getPlayer(opponentId).getLife() <= target.getAmountRemaining()) {
|
||||||
target.addTarget(opponentId, target.getAmountRemaining(), source, game);
|
target.addTarget(opponentId, target.getAmountRemaining(), source, game);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue