- Prevent the AI from cheating with Cavern of Souls, paying an arbitrary amount of mana with it.

This commit is contained in:
Agetian
2017-08-14 04:50:22 +00:00
parent 14d5034b8e
commit 74b12606ef

View File

@@ -226,10 +226,12 @@ public class ComputerUtilMana {
&& sa.getHostCard().getType().getCreatureTypes().contains(ma.getHostCard().getChosenType())) {
for (SpellAbility ab : saList) {
if (ab.isManaAbility() && ab.getManaPart().isAnyMana() && ab.hasParam("AddsNoCounter")) {
if (canPayShardWithSpellAbility(toPay, ai, ma, sa, checkCosts)) {
return ab;
}
}
}
}
final String typeRes = cost.getSourceRestriction();
if (StringUtils.isNotBlank(typeRes) && !ma.getHostCard().getType().hasStringType(typeRes)) {