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:
parent
3e3a930794
commit
f134a79203
1 changed files with 22 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue