From 44a226dede9624190f063ce2a7c5481d6ece17f8 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 19 Mar 2013 12:13:28 +0100 Subject: [PATCH] Test for issue #164. --- .../abilities/enters/MasterBiomancerTest.java | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/MasterBiomancerTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/MasterBiomancerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/MasterBiomancerTest.java new file mode 100644 index 00000000000..8aaceccd575 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/MasterBiomancerTest.java @@ -0,0 +1,84 @@ +package org.mage.test.cards.abilities.enters; + +import mage.Constants; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ + + +public class MasterBiomancerTest extends CardTestPlayerBase { + + /* Master Biomancer {2}{G}{U} + * Creature - Elf Wizard + * 2/4 + * Each other creature you control enters the battlefield with a number of additional +1/+1 counters + * on it equal to Master Biomancer's power and as a Mutant in addition to its other types. + * + */ + + @Test + public void testCreatureGetsCounters() { + + // a creature enters the battlefield and gets a counter for each point of power of Master Biomancer + + addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 5); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Master Biomancer", 1); + addCard(Constants.Zone.HAND, playerA, "Mindeye Drake"); + + castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Mindeye Drake"); + + setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + assertPermanentCount(playerA, "Master Biomancer", 1); + assertPermanentCount(playerA, "Mindeye Drake", 1); + + assertPowerToughness(playerA, "Master Biomancer", 2, 4); + // P/T = 2/5 + (2 * +1/+1) = 4 / 7 + assertPowerToughness(playerA, "Mindeye Drake", 4, 7); + } + + @Test + public void testCreatureGetsDoubleCountersFromCorpsejackMenace() { + + // a creature enters the battlefield and gets a counter for each point of power of Master Biomancer + // doubled by Corpsejack Menace (when he ist cast, his own ability will not apply) + // http://blogs.magicjudges.org/rulestips/2013/03/corpsejack-menace-and-master-biomancer/ + + addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 2); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest", 2); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Swamp", 1); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Master Biomancer", 1); + + addCard(Constants.Zone.HAND, playerA, "Corpsejack Menace"); + addCard(Constants.Zone.HAND, playerA, "Mindeye Drake"); + + castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Corpsejack Menace"); + castSpell(3, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Mindeye Drake"); + + setStopAt(3, Constants.PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + assertPermanentCount(playerA, "Master Biomancer", 1); + assertPermanentCount(playerA, "Corpsejack Menace", 1); + assertPermanentCount(playerA, "Mindeye Drake", 1); + + assertPowerToughness(playerA, "Master Biomancer", 2, 4); + + // P/T = 4/4 + (2 * +1/+1) = 6 / 6 (own doubling not active yet) + assertPowerToughness(playerA, "Corpsejack Menace", 6, 6); + + // P/T = 2/5 + 2* (2 * +1/+1) = 6 / 9 + assertPowerToughness(playerA, "Mindeye Drake", 6, 9); + } +}