mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- A more reliable check in the Cavern of Souls AI that works with ability-changing effects like Blood Moon.
This commit is contained in:
@@ -222,10 +222,13 @@ public class ComputerUtilMana {
|
|||||||
// Exception: when paying generic mana with Cavern of Souls, prefer the colored mana producing ability
|
// Exception: when paying generic mana with Cavern of Souls, prefer the colored mana producing ability
|
||||||
// to attempt to make the spell uncounterable when possible.
|
// to attempt to make the spell uncounterable when possible.
|
||||||
if ((toPay == ManaCostShard.GENERIC || toPay == ManaCostShard.X)
|
if ((toPay == ManaCostShard.GENERIC || toPay == ManaCostShard.X)
|
||||||
&& ma.getHostCard().getName().equals("Cavern of Souls")
|
&& ComputerUtilAbility.getAbilitySourceName(ma).equals("Cavern of Souls")
|
||||||
&& !ma.getManaPart().isAnyMana()
|
|
||||||
&& sa.getHostCard().getType().getCreatureTypes().contains(ma.getHostCard().getChosenType())) {
|
&& 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();
|
final String typeRes = cost.getSourceRestriction();
|
||||||
|
|||||||
Reference in New Issue
Block a user