mirror of
https://github.com/correl/mage.git
synced 2025-04-01 19:07:57 -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
|
||||
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue