Fixed a bug of cost paying handling not showing only the left over unpaid part of mana cost (fixes #185). Added the name of the object the cost is paid for to the feedback panel.

This commit is contained in:
LevelX2 2015-02-26 13:52:02 +01:00
parent 972fe78898
commit 4a5140d0ab
6 changed files with 43 additions and 29 deletions

View file

@ -1011,7 +1011,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
}
@Override
public boolean playMana(ManaCost unpaid, Game game) {
public boolean playMana(ManaCost unpaid, String promptText, Game game) {
payManaMode = true;
boolean result = playManaHandling(unpaid, game);
payManaMode = false;

View file

@ -606,17 +606,17 @@ public class HumanPlayer extends PlayerImpl {
@Override
public boolean playMana(ManaCost unpaid, Game game) {
public boolean playMana(ManaCost unpaid, String promptText, Game game) {
payManaMode = true;
boolean result = playManaHandling(unpaid, game);
boolean result = playManaHandling(unpaid, promptText, game);
payManaMode = false;
return result;
}
protected boolean playManaHandling(ManaCost unpaid, Game game) {
protected boolean playManaHandling(ManaCost unpaid, String promptText, Game game) {
updateGameStatePriority("playMana", game);
game.firePlayManaEvent(playerId, "Pay " + unpaid.getText());
game.firePlayManaEvent(playerId, "Pay " + promptText);
waitForResponse(game);
if (!this.isInGame()) {
return false;