From 8d6c6cb76563518a44c205d5f1c7c0014fd6d21c Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 31 Jan 2019 10:44:30 -0600 Subject: [PATCH] - Fixed the morphAbility null exception for AI --- .../Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java index 66d5a3af590..5b19c6ac359 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java @@ -36,6 +36,7 @@ import org.apache.log4j.Logger; import java.io.File; import java.util.*; import java.util.concurrent.*; +import mage.abilities.StaticAbility; /** * @author nantuko @@ -465,7 +466,8 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ { } Game sim = game.copy(); sim.setSimulation(true); - if (sim.getPlayer(currentPlayer.getId()).activateAbility((ActivatedAbility) action.copy(), sim)) { + if (!(action instanceof StaticAbility) //for MorphAbility, etc + && sim.getPlayer(currentPlayer.getId()).activateAbility((ActivatedAbility) action.copy(), sim)) { sim.applyEffects(); if (checkForRepeatedAction(sim, node, action, currentPlayer.getId())) { logger.debug("Sim Prio [" + depth + "] -- repeated action: " + action.toString());