mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 05:09:16 -08:00
* Kormus Bell - Fixed a bug with order land type changing effects are applied (fixes #3470).
This commit is contained in:
parent
4e8026fe59
commit
b9dff66fcb
8 changed files with 136 additions and 34 deletions
|
|
@ -30,8 +30,11 @@ package org.mage.test.cards.continuous;
|
|||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
|
@ -130,14 +133,14 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase {
|
|||
assertType("Forbidding Watchtower", CardType.LAND, "Island");
|
||||
assertPowerToughness(playerB, "Forbidding Watchtower", 1, 5);
|
||||
}
|
||||
|
||||
|
||||
String urborgtoy = "Urborg, Tomb of Yawgmoth";
|
||||
String bloodmoon = "Blood Moon";
|
||||
String canopyvista = "Canopy Vista";
|
||||
|
||||
/*
|
||||
NOTE: this test is currently failing due to bug in code. See issue #3072
|
||||
*/
|
||||
*/
|
||||
@Test
|
||||
public void testBloodMoonBeforeUrborg() {
|
||||
// Blood Moon 2R
|
||||
|
|
@ -146,14 +149,14 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerA, bloodmoon);
|
||||
// Each land is a Swamp in addition to its other land types.
|
||||
addCard(Zone.HAND, playerA, urborgtoy);
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, canopyvista, 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, bloodmoon);
|
||||
playLand(1, PhaseStep.POSTCOMBAT_MAIN, playerA, urborgtoy);
|
||||
|
||||
|
||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
|
|
@ -169,7 +172,7 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase {
|
|||
|
||||
/*
|
||||
NOTE: this test is currently failing due to bug in code. See issue #3072
|
||||
*/
|
||||
*/
|
||||
@Test
|
||||
public void testBloodMoonAfterUrborg() {
|
||||
// Blood Moon 2R
|
||||
|
|
@ -178,14 +181,14 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerA, bloodmoon);
|
||||
// Each land is a Swamp in addition to its other land types.
|
||||
addCard(Zone.HAND, playerA, urborgtoy);
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, canopyvista, 1);
|
||||
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, urborgtoy);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, bloodmoon);
|
||||
|
||||
|
||||
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
|
|
@ -199,4 +202,66 @@ public class LandTypeChangingEffectsTest extends CardTestPlayerBase {
|
|||
Assert.assertTrue("The mana the land can produce should be [{R}] but it's " + playerB.getManaAvailable(currentGame).toString(), playerB.getManaAvailable(currentGame).toString().equals("[{R}]"));
|
||||
}
|
||||
|
||||
/*
|
||||
I had Kormus Bell (all swamps are 1/1s) and Urborg, Tomb of Yawgmoth (all lands are swamps) and only basic lands (swamps) otherwise.
|
||||
Opponent had Quicksilver Fountain (put a flood counter on non-island land).
|
||||
In terms of time-stamp order, Urborg was down first, then Kormus Bell, then Quicksilver.
|
||||
When I put a flood counter on a basic swamp, it would become a 0/0 instead of a 1/1 and die.
|
||||
*/
|
||||
@Test
|
||||
public void testCormusBellAfterUrborg() {
|
||||
// Land - Legendary
|
||||
// Each land is a Swamp in addition to its other land types.
|
||||
addCard(Zone.HAND, playerA, urborgtoy);
|
||||
|
||||
// All Swamps are 1/1 black creatures that are still lands.
|
||||
addCard(Zone.HAND, playerA, "Kormus Bell"); // Artifact {4}
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
||||
|
||||
// At the beginning of each player's upkeep, that player puts a flood counter on target non-Island land he or she controls of his or her choice.
|
||||
// That land is an Island for as long as it has a flood counter on it.
|
||||
// At the beginning of each end step, if all lands on the battlefield are Islands, remove all flood counters from them.
|
||||
addCard(Zone.HAND, playerB, "Quicksilver Fountain", 1); // Artifact {3}
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Forest", 3);
|
||||
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, urborgtoy);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Kormus Bell");
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Quicksilver Fountain");
|
||||
addTarget(playerA, "Mountain");
|
||||
|
||||
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, urborgtoy, 1);
|
||||
assertPermanentCount(playerA, "Kormus Bell", 1);
|
||||
assertPermanentCount(playerB, "Quicksilver Fountain", 1);
|
||||
|
||||
assertGraveyardCount(playerA, "Mountain", 0);
|
||||
|
||||
int islandTypes = 0;
|
||||
int swampTypes = 0;
|
||||
int mountainTypes = 0;
|
||||
int creatures = 0;
|
||||
for (Permanent permanent : currentGame.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_LAND, playerA.getId(), currentGame)) {
|
||||
if (permanent.getSubtype(currentGame).contains(SubType.ISLAND)) {
|
||||
islandTypes++;
|
||||
}
|
||||
if (permanent.getSubtype(currentGame).contains(SubType.MOUNTAIN)) {
|
||||
mountainTypes++;
|
||||
}
|
||||
if (permanent.getSubtype(currentGame).contains(SubType.SWAMP)) {
|
||||
swampTypes++;
|
||||
}
|
||||
if (permanent.isCreature()) {
|
||||
creatures++;
|
||||
}
|
||||
}
|
||||
Assert.assertTrue("1 land has to be of island type", islandTypes == 1);
|
||||
Assert.assertTrue("3 lands have to be of mountain type", mountainTypes == 3);
|
||||
Assert.assertTrue("4 lands have to be of swamp type", swampTypes == 4);
|
||||
Assert.assertTrue("4 lands have to be creatures but there are " + creatures, creatures == 4);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue