1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-05 09:12:29 -09:00

Added test for additional damage from AI after combat. Fixed NimShamblerTest.

This commit is contained in:
magenoxx 2011-12-24 19:00:10 +04:00
parent 3e3a930794
commit f134a79203

View file

@ -2,6 +2,7 @@ package org.mage.test.ai;
import junit.framework.Assert;
import mage.Constants;
import mage.counters.CounterType;
import mage.game.permanent.Permanent;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestBase;
@ -18,7 +19,7 @@ public class NimShamblerTest extends CardTestBase {
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");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Craw Wurm");
execute();
@ -27,6 +28,26 @@ public class NimShamblerTest extends CardTestBase {
Permanent bloodCultist = getPermanent("Blood Cultist", playerA.getId());
Assert.assertNotNull(bloodCultist);
Assert.assertFalse(bloodCultist.isTapped()); // shouldn't be tapped
}
@Test
public void testAttackAndKillBlockerWithAdditionalDamage() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Nim Shambler");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Blood Cultist");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Ob Nixilis, the Fallen");
execute();
// should die in attack
assertPermanentCount(playerA, "Nim Shambler", 0);
// should die because of attack + 1 damage from Blood Cultist
assertPermanentCount(playerA, "Ob Nixilis, the Fallen", 0);
// Blood Cultist should kill Ob Nixilis, the Fallen and get +1\+1
Permanent bloodCultist = getPermanent("Blood Cultist", playerA.getId());
Assert.assertNotNull(bloodCultist);
Assert.assertEquals(1, bloodCultist.getCounters().size());
Assert.assertEquals(1, bloodCultist.getCounters().getCount(CounterType.P1P1));
}
}