* Fixes to spend any mana to pay handling-

This commit is contained in:
LevelX2 2015-07-12 19:49:53 +02:00
parent e9667b430b
commit 55966f3056
5 changed files with 6 additions and 6 deletions

View file

@ -674,7 +674,7 @@ public class HumanPlayer extends PlayerImpl {
}
@Override
public boolean playMana(ManaCost unpaid, String promptText, Game game) {
public boolean playMana(Ability ability, ManaCost unpaid, String promptText, Game game) {
payManaMode = true;
boolean result = playManaHandling(unpaid, promptText, game);
payManaMode = false;

View file

@ -1826,8 +1826,8 @@ public class TestPlayer implements Player {
}
@Override
public boolean playMana(ManaCost unpaid, String promptText, Game game) {
return computerPlayer.playMana(unpaid, promptText, game);
public boolean playMana(Ability ability, ManaCost unpaid, String promptText, Game game) {
return computerPlayer.playMana(ability, unpaid, promptText, game);
}
@Override

View file

@ -219,7 +219,7 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost {
while (!isPaid()) {
ManaCost unpaid = this.getUnpaid();
String promptText = ManaUtil.addSpecialManaPayAbilities(ability, game, unpaid);
if (player.playMana(unpaid, promptText, game)) {
if (player.playMana(ability, unpaid, promptText, game)) {
assignPayment(game, ability, player.getManaPool());
} else {
return false;

View file

@ -131,7 +131,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
while (!isPaid()) {
ManaCost unpaid = this.getUnpaid();
String promptText = ManaUtil.addSpecialManaPayAbilities(ability, game, unpaid);
if (player.playMana(unpaid, promptText, game)) {
if (player.playMana(ability, unpaid, promptText, game)) {
assignPayment(game, ability, player.getManaPool());
} else {
return false;

View file

@ -445,7 +445,7 @@ public interface Player extends MageItem, Copyable<Player> {
boolean choosePile(Outcome outcome, String message, List<? extends Card> pile1, List<? extends Card> pile2, Game game);
boolean playMana(ManaCost unpaid, String promptText, Game game);
boolean playMana(Ability ability, ManaCost unpaid, String promptText, Game game);
/**
* Moves the cards from cards to the bottom of the players library.