Fixed a bug that existing continuous effects were not applied before state based effects were checked.

This commit is contained in:
LevelX2 2015-06-20 01:07:35 +02:00
parent db5526a1c6
commit e509a35795
4 changed files with 101 additions and 2 deletions

View file

@ -311,8 +311,9 @@ public class ComputerPlayer extends PlayerImpl implements Player {
if (card != null) {
cards.add(card);
}
}
while(!target.isChosen() && !cards.isEmpty()) {
}
while((outcome.isGood() ? target.getTargets().size() < target.getMaxNumberOfTargets() : !target.isChosen())
&& !cards.isEmpty()) {
Card pick = pickTarget(cards, outcome, target, null, game);
if (pick != null) {
target.addTarget(pick.getId(), null, game);