- AI should not attempt targeting AF ChangeZoneAll which does not need any targets (e.g. Timetwister, Memory Jar, etc., which the current AI can't use).

This commit is contained in:
Agetian
2016-12-17 14:16:02 +00:00
parent 2b055b84fb
commit 8977d1ad8f

View File

@@ -127,6 +127,11 @@ public class ChangeZoneAllAi extends SpellAbilityAi {
// TODO improve restrictions on when the AI would want to use this // TODO improve restrictions on when the AI would want to use this
// spBounceAll has some AI we can compare to. // spBounceAll has some AI we can compare to.
if (origin.equals(ZoneType.Hand) || origin.equals(ZoneType.Library)) { if (origin.equals(ZoneType.Hand) || origin.equals(ZoneType.Library)) {
if (!sa.usesTargeting()) {
// TODO: the AI can't currently handle non-targeting abilities of this type (e.g. Memory Jar, Timetwister, etc.)
return false;
}
// search targetable Opponents // search targetable Opponents
final Iterable<Player> oppList = Iterables.filter(ai.getOpponents(), PlayerPredicates.isTargetableBy(sa)); final Iterable<Player> oppList = Iterables.filter(ai.getOpponents(), PlayerPredicates.isTargetableBy(sa));