normalized ContinuousEffects

This commit is contained in:
BetaSteward 2012-03-10 22:20:24 -05:00
parent 033215c3ce
commit 3b643805c8
4 changed files with 237 additions and 169 deletions

View file

@ -26,13 +26,13 @@ public class BoostContinuousEffectTest extends CardTestBase {
@Test
public void testHonorOfThePoor2() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Honor of the Pure");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Honor of the Pure", 2);
addCard(Constants.Zone.BATTLEFIELD, playerA, "White Knight");
addCard(Constants.Zone.BATTLEFIELD, playerA, "Black Knight");
setStopAt(1, PhaseStep.CLEANUP);
execute();
assertPowerToughness(playerA, "White Knight", 3, 3, Filter.ComparisonScope.Any);
assertPowerToughness(playerA, "White Knight", 4, 4, Filter.ComparisonScope.Any);
assertPowerToughness(playerA, "Black Knight", 2, 2, Filter.ComparisonScope.Any);
}

View file

@ -0,0 +1,53 @@
package org.mage.test.serverside.cards.effects;
import org.mage.test.cards.*;
import junit.framework.Assert;
import mage.Constants;
import mage.filter.Filter;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* @author BetaSteward
*/
public class TestActivatedContinuousEffect extends CardTestPlayerBase {
@Test
public void testCard() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 3);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Captive Flame");
addCard(Constants.Zone.BATTLEFIELD, playerA, "White Knight");
activateAbility(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "{R}:", "White Knight");
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 20);
assertPermanentCount(playerA, "White Knight", 1);
assertPowerToughness(playerA, "White Knight", 3, 2, Filter.ComparisonScope.Any);
}
@Test
public void testCard2() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 3);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Captive Flame");
addCard(Constants.Zone.BATTLEFIELD, playerA, "White Knight");
activateAbility(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "{R}:", "White Knight");
activateAbility(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "{R}:", "White Knight");
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 20);
assertPermanentCount(playerA, "White Knight", 1);
assertPowerToughness(playerA, "White Knight", 4, 2, Filter.ComparisonScope.Any);
}
}