Add controll != null check.

Added recommended changes.
This commit is contained in:
JRHerlehy 2016-11-15 10:18:53 -08:00
parent 17705ea302
commit 6d8b37b2ac

View file

@ -105,7 +105,7 @@ class MetamorphoseEffect extends OneShotEffect {
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); Permanent permanent = game.getPermanentOrLKIBattlefield(source.getFirstTarget());
if (permanent != null) { if (permanent != null) {
Player controller = game.getPlayer(permanent.getControllerId()); Player controller = game.getPlayer(permanent.getControllerId());
if (controller.chooseUse(Outcome.PutCardInPlay, "Do you wish to put an artifact, creature, enchantment, or land card onto the battlefield?", source, game)) { if (controller != null && controller.canRespond() && controller.chooseUse(Outcome.PutCardInPlay, "Do you wish to put an artifact, creature, enchantment, or land card onto the battlefield?", source, game)) {
TargetCardInHand target = new TargetCardInHand(filter); TargetCardInHand target = new TargetCardInHand(filter);
target.clearChosen(); target.clearChosen();
if (controller.chooseTarget(outcome, target, source, game)) { if (controller.chooseTarget(outcome, target, source, game)) {