mirror of
https://github.com/correl/mage.git
synced 2025-04-11 01:01:05 -09:00
Fixed possible NPE in HumanPlayer.announceXMana (Fixes #319).
This commit is contained in:
parent
594b6c1c75
commit
acd52e2a61
1 changed files with 5 additions and 1 deletions
|
@ -517,10 +517,14 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int announceXMana(int min, int max, String message, Game game, Ability ability) {
|
public int announceXMana(int min, int max, String message, Game game, Ability ability) {
|
||||||
|
int xValue = 0;
|
||||||
updateGameStatePriority("announceXMana", game);
|
updateGameStatePriority("announceXMana", game);
|
||||||
game.fireGetAmountEvent(playerId, message, min, max);
|
game.fireGetAmountEvent(playerId, message, min, max);
|
||||||
waitForIntegerResponse(game);
|
waitForIntegerResponse(game);
|
||||||
return response.getInteger();
|
if (response != null) {
|
||||||
|
xValue = response.getInteger();
|
||||||
|
}
|
||||||
|
return xValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void playManaAbilities(ManaCost unpaid, Game game) {
|
protected void playManaAbilities(ManaCost unpaid, Game game) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue