- null check on Illusionary Terrain

This commit is contained in:
Jeff 2019-01-07 14:41:02 -06:00
parent 2b4c7eba13
commit e6896fcca8

View file

@ -217,7 +217,9 @@ class ChooseTwoBasicLandTypesEffect extends OneShotEffect {
game.informPlayers(mageObject.getName() + ": Second chosen basic land type is " + choices.getChoice()); game.informPlayers(mageObject.getName() + ": Second chosen basic land type is " + choices.getChoice());
game.getState().setValue(mageObject.getId().toString() + "secondChoice", choices.getChoice()); game.getState().setValue(mageObject.getId().toString() + "secondChoice", choices.getChoice());
choiceTwo = SubType.byDescription((String) game.getState().getValue(source.getSourceId().toString() + "secondChoice")).getDescription(); choiceTwo = SubType.byDescription((String) game.getState().getValue(source.getSourceId().toString() + "secondChoice")).getDescription();
if (mageObject instanceof Permanent) { if (mageObject instanceof Permanent
&& choiceOne != null
&& choiceTwo != null) {
((Permanent) mageObject).addInfo("Chosen Types", CardUtil.addToolTipMarkTags("First chosen basic land type: " + choiceOne ((Permanent) mageObject).addInfo("Chosen Types", CardUtil.addToolTipMarkTags("First chosen basic land type: " + choiceOne
+ "\n Second chosen basic land type: " + choiceTwo), game); + "\n Second chosen basic land type: " + choiceTwo), game);
} }