1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-01 19:07:57 -09:00

Fixed possible NPE in HumanPlayer.announceXMana (Fixes ).

This commit is contained in:
LevelX2 2013-09-12 13:14:22 +02:00
parent 594b6c1c75
commit acd52e2a61

View file

@ -517,10 +517,14 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
*/
@Override
public int announceXMana(int min, int max, String message, Game game, Ability ability) {
int xValue = 0;
updateGameStatePriority("announceXMana", game);
game.fireGetAmountEvent(playerId, message, min, max);
waitForIntegerResponse(game);
return response.getInteger();
if (response != null) {
xValue = response.getInteger();
}
return xValue;
}
protected void playManaAbilities(ManaCost unpaid, Game game) {