mirror of
https://github.com/correl/mage.git
synced 2025-03-07 20:53:18 -10:00
Reproduces the AI issue when its own creature is sacrificed for no reason.
This commit is contained in:
parent
41f0fecd6e
commit
20aa0c645f
1 changed files with 33 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue