- KeepTapped Attach AI logic: try not to activate on things that can't tap.

This commit is contained in:
Agetian
2017-09-06 05:07:49 +00:00
parent aa58b3df35
commit 5352514c2b

View File

@@ -250,6 +250,18 @@ public class AttachAi extends SpellAbilityAi {
return false;
}
if (!mandatory) {
if (!c.isCreature() && !c.getType().hasSubtype("Vehicle") && !c.isTapped()) {
// try to identify if this thing can actually tap
for (SpellAbility ab : c.getAllSpellAbilities()) {
if (ab.getPayCosts() != null && ab.getPayCosts().hasTapCost()) {
return true;
}
}
return false;
}
}
if (!c.isEnchanted()) {
return true;
}