Reproduces the AI issue when its own creature is sacrificed for no reason.

This commit is contained in:
magenoxx 2011-12-11 16:38:06 +04:00
parent 41f0fecd6e
commit 20aa0c645f

View file

@ -0,0 +1,33 @@
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 ObNixilistheFallenTest extends CardTestBase {
/**
* Reproduces bug when AI doesn't use good "may" ability.
*/
@Test
public void testMayAbilityUsed() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Ob Nixilis, the Fallen");
addCard(Constants.Zone.HAND, playerA, "Swamp", 1);
playLand(playerA, "Swamp");
execute();
Permanent master = getPermanent("Ob Nixilis, the Fallen", playerA.getId());
Assert.assertNotNull(master);
Assert.assertEquals(6, master.getPower().getValue());
Assert.assertEquals(6, master.getToughness().getValue());
assertLife(playerA, 20);
assertLife(playerB, 11); // lose 3 life + attack with 6\6
}
}