mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- 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:
@@ -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));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user