Test for AI that reproduces the case when useful "may" ability isn't used.

This commit is contained in:
magenoxx 2011-12-11 16:37:34 +04:00
parent af05af7050
commit 41f0fecd6e

View file

@ -0,0 +1,32 @@
package org.mage.test.ai;
import junit.framework.Assert;
import mage.Constants;
import mage.game.permanent.Permanent;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestBase;
/**
* @author ayratn
*/
public class NimShamblerTest extends CardTestBase {
/**
* Reproduces the bug when AI sacrifices its creatures for no reason.
*/
@Test
public void testNoCreatureWasSacrificed() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Nim Shambler");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Blood Cultist");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Ob Nixilis, the Fallen");
execute();
Permanent nimShambler = getPermanent("Nim Shambler", playerA.getId());
Assert.assertNotNull(nimShambler);
Permanent bloodCultist = getPermanent("Blood Cultist", playerA.getId());
Assert.assertNotNull(bloodCultist);
}
}