diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index 850465316f..8ee7bc1e90 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -666,10 +666,15 @@ public class ComputerPlayer> extends PlayerImpl i //put everything into X for (Permanent perm: this.getAvailableManaProducers(game)) { for (ManaAbility ability: perm.getAbilities().getManaAbilities(Zone.BATTLEFIELD)) { - if (activateAbility(ability, game)) - return true; + activateAbility(ability, game); } } + + // don't allow X=0 + if (getManaPool().count() == 0) { + return false; + } + cost.setPaid(); return true; } diff --git a/Mage.Tests/scenario1.txt b/Mage.Tests/scenario1.txt index 479785f2c9..e32560107c 100644 --- a/Mage.Tests/scenario1.txt +++ b/Mage.Tests/scenario1.txt @@ -1,14 +1,14 @@ ### ComputerA ### # Battlefield -battlefield:ComputerA:Island:1 +battlefield:ComputerA:Mountain:1 #battlefield:ComputerA:Goblin Guide:1 # Hand hand:ComputerA:Mountain:2 -hand:ComputerA:Hellspark Elemental:5 +hand:ComputerA:Lightning Bolt:5 # Library # from down to top library:ComputerA:clear:0 -library:ComputerA:Hellspark Elemental:10 +library:ComputerA:Lightning Bolt:10 ### ComputerB ### # Battlefield