- Fixed the morphAbility null exception for AI

This commit is contained in:
Jeff 2019-01-31 10:44:30 -06:00
parent ef2e7e352e
commit 8d6c6cb765

View file

@ -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());