- A more reliable check in the Cavern of Souls AI that works with ability-changing effects like Blood Moon.

This commit is contained in:
Agetian
2017-06-10 16:39:09 +00:00
parent 7519e22d67
commit ab8038c3bb

View File

@@ -222,10 +222,13 @@ public class ComputerUtilMana {
// Exception: when paying generic mana with Cavern of Souls, prefer the colored mana producing ability
// to attempt to make the spell uncounterable when possible.
if ((toPay == ManaCostShard.GENERIC || toPay == ManaCostShard.X)
&& ma.getHostCard().getName().equals("Cavern of Souls")
&& !ma.getManaPart().isAnyMana()
&& ComputerUtilAbility.getAbilitySourceName(ma).equals("Cavern of Souls")
&& sa.getHostCard().getType().getCreatureTypes().contains(ma.getHostCard().getChosenType())) {
continue;
for (SpellAbility ab : saList) {
if (ab.isManaAbility() && ab.getManaPart().isAnyMana() && ab.hasParam("AddsNoCounter")) {
return ab;
}
}
}
final String typeRes = cost.getSourceRestriction();