mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 13:19:18 -08: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 {
|
} else {
|
||||||
player.choose(outcome, choice, game);
|
player.choose(outcome, choice, game);
|
||||||
}
|
}
|
||||||
if (choice.getChoice().equals("Black")) {
|
if (choice.getChoice() != null) {
|
||||||
player.getManaPool().addMana(Mana.BlackMana, game, source);
|
switch (choice.getChoice()) {
|
||||||
} else if (choice.getChoice().equals("Blue")) {
|
case "Black":
|
||||||
player.getManaPool().addMana(Mana.BlueMana, game, source);
|
player.getManaPool().addMana(Mana.BlackMana, game, source);
|
||||||
} else if (choice.getChoice().equals("Red")) {
|
break;
|
||||||
player.getManaPool().addMana(Mana.RedMana, game, source);
|
case "Blue":
|
||||||
} else if (choice.getChoice().equals("Green")) {
|
player.getManaPool().addMana(Mana.BlueMana, game, source);
|
||||||
player.getManaPool().addMana(Mana.GreenMana, game, source);
|
break;
|
||||||
} else if (choice.getChoice().equals("White")) {
|
case "Red":
|
||||||
player.getManaPool().addMana(Mana.WhiteMana, game, source);
|
player.getManaPool().addMana(Mana.RedMana, game, source);
|
||||||
} else if (choice.getChoice().equals("Colorless")) {
|
break;
|
||||||
player.getManaPool().addMana(Mana.ColorlessMana, game, source);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue