Damage distribution test. Reproduces Issue 375.

This commit is contained in:
magenoxx 2011-12-12 14:28:33 +04:00
parent 268acd0904
commit 9fe16d3518
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,34 @@
package org.mage.test.combat;
import junit.framework.Assert;
import mage.Constants;
import mage.game.permanent.Permanent;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestBase;
/**
*
* @author ayrat
*/
public class DamageDistributionTest extends CardTestBase {
@Test
public void testDoubleStrike() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Warren Instigator");
addCard(Constants.Zone.BATTLEFIELD, playerB, "Merfolk Looter");
setLife(playerB, 4);
execute();
Permanent instigator = getPermanent("Warren Instigator", playerA.getId());
Assert.assertNotNull(instigator);
// should block and die
assertPermanentCount(playerB, "Merfolk Looter", 0);
// creature is blocked
// blocker dies and second strike does nothing
assertLife(playerB, 4);
}
}