1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-03 17:00:16 -09:00

* Fixed a problem that the AI did not care for maximum allowed mana payment for X mana costs.

This commit is contained in:
LevelX2 2018-03-12 16:33:42 +01:00
parent dc3e47e045
commit b7fa942b10
2 changed files with 8 additions and 6 deletions
Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai
Mage/src/main/java/mage/abilities/common

View file

@ -1312,6 +1312,9 @@ public class ComputerPlayer extends PlayerImpl implements Player {
if (numAvailable < 0) { if (numAvailable < 0) {
numAvailable = 0; numAvailable = 0;
} }
if (numAvailable > max) {
numAvailable = max;
}
return numAvailable; return numAvailable;
} }

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.abilities.common; package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
@ -39,8 +38,8 @@ import mage.target.targetpointer.FixedTarget;
* *
* @author LevelX2 * @author LevelX2
*/ */
public class GainLifeControllerTriggeredAbility extends TriggeredAbilityImpl { public class GainLifeControllerTriggeredAbility extends TriggeredAbilityImpl {
private boolean setTargetPointer; private boolean setTargetPointer;
public GainLifeControllerTriggeredAbility(Effect effect, boolean optional) { public GainLifeControllerTriggeredAbility(Effect effect, boolean optional) {