diff --git a/Mage.Client/plugins/mage-player-ai-ma.jar b/Mage.Client/plugins/mage-player-ai-ma.jar index 083c03e4e5..914adf8edd 100644 Binary files a/Mage.Client/plugins/mage-player-ai-ma.jar and b/Mage.Client/plugins/mage-player-ai-ma.jar differ 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 34fdf84590..542da99f92 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 @@ -486,8 +486,8 @@ public class ComputerPlayer6 extends ComputerPlayer implements Game sim = game.copy(); if (sim.getPlayer(currentPlayer.getId()).activateAbility((ActivatedAbility) action.copy(), sim)) { sim.applyEffects(); - //if (checkForRepeatedAction(sim, node, action, currentPlayer.getId())) - //continue; + if (checkForRepeatedAction(sim, node, action, currentPlayer.getId())) + continue; if (!sim.isGameOver() && action.isUsesStack()) { // only pass if the last action uses the stack sim.getPlayer(currentPlayer.getId()).pass(); @@ -839,7 +839,7 @@ public class ComputerPlayer6 extends ComputerPlayer implements return sim; } - /*private boolean checkForRepeatedAction(Game sim, SimulationNode2 node, Ability action, UUID playerId) { + private boolean checkForRepeatedAction(Game sim, SimulationNode2 node, Ability action, UUID playerId) { if (action instanceof PassAbility) return false; int val = GameStateEvaluator2.evaluate(playerId, sim); @@ -848,12 +848,12 @@ public class ComputerPlayer6 extends ComputerPlayer implements test = test.getParent(); } if (test != null && test.getAbilities() != null && test.getAbilities().size() == 1) { - if (action.toString().equals(test.getAbilities().get(0).toString()) && GameStateEvaluator2.evaluate(playerId, sim) == val) { + if (action.toString().equals(test.getAbilities().get(0).toString()) && GameStateEvaluator2.evaluate(playerId, test.getGame()) == val) { return true; } } return false; - }*/ + } protected void getSuggestedActions() { try { diff --git a/Mage.Server/plugins/mage-player-ai-ma.jar b/Mage.Server/plugins/mage-player-ai-ma.jar index 083c03e4e5..914adf8edd 100644 Binary files a/Mage.Server/plugins/mage-player-ai-ma.jar and b/Mage.Server/plugins/mage-player-ai-ma.jar differ diff --git a/Mage.Tests/plugins/mage-player-ai-ma.jar b/Mage.Tests/plugins/mage-player-ai-ma.jar index 6a8228b01a..914adf8edd 100644 Binary files a/Mage.Tests/plugins/mage-player-ai-ma.jar and b/Mage.Tests/plugins/mage-player-ai-ma.jar differ diff --git a/Mage.Tests/src/test/java/org/mage/test/ai/LevelUpAbilityTest.java b/Mage.Tests/src/test/java/org/mage/test/ai/LevelUpAbilityTest.java index 7f47e8c57a..190a1af80b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/ai/LevelUpAbilityTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/ai/LevelUpAbilityTest.java @@ -33,6 +33,7 @@ public class LevelUpAbilityTest extends CardTestBase { System.out.println(counter.getKey() + " : " + counter.getValue().getName() + " : " + counter.getValue().getCount()); } + Assert.assertNotNull(master.getCounters()); Assert.assertFalse(master.getCounters().isEmpty()); Assert.assertEquals(12, master.getCounters().getCount(CounterType.LEVEL)); }