mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Reflecting Pool - Fixed possible NPE.
This commit is contained in:
parent
e4a1f70057
commit
024ec1169a
1 changed files with 23 additions and 12 deletions
|
@ -131,19 +131,30 @@ class ReflectingPoolEffect extends ManaEffect<ReflectingPoolEffect> {
|
|||
} else {
|
||||
player.choose(outcome, choice, game);
|
||||
}
|
||||
if (choice.getChoice().equals("Black")) {
|
||||
player.getManaPool().addMana(Mana.BlackMana, game, source);
|
||||
} else if (choice.getChoice().equals("Blue")) {
|
||||
player.getManaPool().addMana(Mana.BlueMana, game, source);
|
||||
} else if (choice.getChoice().equals("Red")) {
|
||||
player.getManaPool().addMana(Mana.RedMana, game, source);
|
||||
} else if (choice.getChoice().equals("Green")) {
|
||||
player.getManaPool().addMana(Mana.GreenMana, game, source);
|
||||
} else if (choice.getChoice().equals("White")) {
|
||||
player.getManaPool().addMana(Mana.WhiteMana, game, source);
|
||||
} else if (choice.getChoice().equals("Colorless")) {
|
||||
player.getManaPool().addMana(Mana.ColorlessMana, game, source);
|
||||
if (choice.getChoice() != null) {
|
||||
switch (choice.getChoice()) {
|
||||
case "Black":
|
||||
player.getManaPool().addMana(Mana.BlackMana, game, source);
|
||||
break;
|
||||
case "Blue":
|
||||
player.getManaPool().addMana(Mana.BlueMana, game, source);
|
||||
break;
|
||||
case "Red":
|
||||
player.getManaPool().addMana(Mana.RedMana, game, source);
|
||||
break;
|
||||
case "Green":
|
||||
player.getManaPool().addMana(Mana.GreenMana, game, source);
|
||||
break;
|
||||
case "White":
|
||||
player.getManaPool().addMana(Mana.WhiteMana, game, source);
|
||||
break;
|
||||
case "Colorless":
|
||||
player.getManaPool().addMana(Mana.ColorlessMana, game, source);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue