mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
- Fixed the morphAbility null exception for AI
This commit is contained in:
parent
ef2e7e352e
commit
8d6c6cb765
1 changed files with 3 additions and 1 deletions
|
@ -36,6 +36,7 @@ import org.apache.log4j.Logger;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
|
import mage.abilities.StaticAbility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author nantuko
|
* @author nantuko
|
||||||
|
@ -465,7 +466,8 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ {
|
||||||
}
|
}
|
||||||
Game sim = game.copy();
|
Game sim = game.copy();
|
||||||
sim.setSimulation(true);
|
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();
|
sim.applyEffects();
|
||||||
if (checkForRepeatedAction(sim, node, action, currentPlayer.getId())) {
|
if (checkForRepeatedAction(sim, node, action, currentPlayer.getId())) {
|
||||||
logger.debug("Sim Prio [" + depth + "] -- repeated action: " + action.toString());
|
logger.debug("Sim Prio [" + depth + "] -- repeated action: " + action.toString());
|
||||||
|
|
Loading…
Reference in a new issue