mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed a bug of AI target selection that caused endless loops during build of test project.
This commit is contained in:
parent
dd916a30e4
commit
11fb2412cb
1 changed files with 2 additions and 1 deletions
|
@ -77,6 +77,7 @@ import java.util.*;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.predicate.other.PlayerIdPredicate;
|
import mage.filter.predicate.other.PlayerIdPredicate;
|
||||||
|
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1954,7 +1955,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
||||||
threats = game.getBattlefield().getActivePermanents(filter, this.getId(), sourceId, game); // all permanents within the range of the player
|
threats = game.getBattlefield().getActivePermanents(filter, this.getId(), sourceId, game); // all permanents within the range of the player
|
||||||
} else {
|
} else {
|
||||||
FilterPermanent filterCopy = filter.copy();
|
FilterPermanent filterCopy = filter.copy();
|
||||||
filterCopy.add(new PlayerIdPredicate(playerId));
|
filterCopy.add(new ControllerIdPredicate(playerId));
|
||||||
threats = game.getBattlefield().getActivePermanents(filter, this.getId(), sourceId, game);
|
threats = game.getBattlefield().getActivePermanents(filter, this.getId(), sourceId, game);
|
||||||
}
|
}
|
||||||
Iterator<Permanent> it = threats.iterator();
|
Iterator<Permanent> it = threats.iterator();
|
||||||
|
|
Loading…
Reference in a new issue