- Simple AI logic for Explore with a target (e.g. Enter the Unknown), fixes the AI wasting its activation.

This commit is contained in:
Agetian
2018-01-23 18:17:36 +03:00
parent 2e51375c0f
commit ce35c6232e

View File

@@ -13,6 +13,17 @@ public class ExploreAi extends SpellAbilityAi {
*/ */
@Override @Override
protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) { protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) {
// Explore with a target (e.g. Enter the Unknown)
if (sa.usesTargeting()) {
Card bestCreature = ComputerUtilCard.getBestCreatureAI(aiPlayer.getCardsIn(ZoneType.Battlefield));
if (bestCreature == null) {
return false;
}
sa.resetTargets();
sa.getTargets().add(bestCreature);
}
return true; return true;
} }