mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Improved Auto mana payment for Cavern of Souls.
- Fixed the AI trying to play Endless One for 0 when in presence of Cavern of Souls.
This commit is contained in:
@@ -223,7 +223,8 @@ public class ComputerUtilMana {
|
|||||||
// 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")
|
&& ma.getHostCard().getName().equals("Cavern of Souls")
|
||||||
&& !ma.getManaPart().isAnyMana()) {
|
&& !ma.getManaPart().isAnyMana()
|
||||||
|
&& sa.getHostCard().getType().getCreatureTypes().contains(ma.getHostCard().getChosenType())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -590,7 +590,9 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
// No target. So must be defined
|
// No target. So must be defined
|
||||||
list = new CardCollection(AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa));
|
list = new CardCollection(AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa));
|
||||||
|
|
||||||
if (amountStr.equals("X") && ((sa.hasParam(amountStr) && sa.getSVar(amountStr).equals("Count$xPaid")) || source.getSVar(amountStr).equals("Count$xPaid") )) {
|
if (amountStr.equals("X")
|
||||||
|
&& !source.hasSVar("PayX") /* SubAbility on something that already had set PayX, e.g. Endless One ETB counters */
|
||||||
|
&& ((sa.hasParam(amountStr) && sa.getSVar(amountStr).equals("Count$xPaid")) || source.getSVar(amountStr).equals("Count$xPaid") )) {
|
||||||
|
|
||||||
// detect if there's more than one X in the cost (Hangarback Walker, Walking Ballista, etc.)
|
// detect if there's more than one X in the cost (Hangarback Walker, Walking Ballista, etc.)
|
||||||
SpellAbility testSa = sa;
|
SpellAbility testSa = sa;
|
||||||
|
|||||||
Reference in New Issue
Block a user