mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
adjusting tests for #3359. also consolidated kalitas test to here
This commit is contained in:
parent
f912ee6213
commit
0fbc86be47
2 changed files with 41 additions and 93 deletions
|
@ -1,88 +0,0 @@
|
||||||
/*
|
|
||||||
* To change this license header, choose License Headers in Project Properties.
|
|
||||||
* To change this template file, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
package org.mage.test.cards.replacement;
|
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
|
||||||
*/
|
|
||||||
public class KalitasTraitorOfGhetTest extends CardTestPlayerBase {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Reported bug: Damnation with Kalitas, Traitor of Ghet on my side and 3 opponent creatures, it only exiled 1 creature giving me only 1 zombie instead of 3.
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testDamnation() {
|
|
||||||
|
|
||||||
/*
|
|
||||||
Kalitas, Traitor of Ghet {2}{B}{B} 3/4 lifelink - Legendary Vampire
|
|
||||||
If a nontoken creature an opponent controls would die, instead exile that card and put a 2/2 black Zombie creature token onto the battlefield.
|
|
||||||
*/
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Kalitas, Traitor of Ghet", 1);
|
|
||||||
/*
|
|
||||||
Damnation {2}{B}{B} - Sorcery
|
|
||||||
Destroy all creatures. They can't be regenerated.
|
|
||||||
*/
|
|
||||||
addCard(Zone.HAND, playerA, "Damnation", 1);
|
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
|
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Bronze Sable", 1);
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Wall of Roots", 1);
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Sigiled Starfish", 1);
|
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Damnation");
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
|
||||||
execute();
|
|
||||||
|
|
||||||
assertGraveyardCount(playerA, "Kalitas, Traitor of Ghet", 1);
|
|
||||||
assertGraveyardCount(playerA, "Damnation", 1);
|
|
||||||
assertExileCount("Bronze Sable", 1);
|
|
||||||
assertExileCount("Wall of Roots", 1);
|
|
||||||
assertExileCount("Sigiled Starfish", 1);
|
|
||||||
assertGraveyardCount(playerB, 0); // all 3 creatures of playerB should be exiled not in graveyard
|
|
||||||
assertExileCount("Kalitas, Traitor of Ghet", 0); // player controlled, not opponent so not exiled
|
|
||||||
assertPermanentCount(playerA, "Zombie", 3); // 3 tokens generated from exiling 3 opponent's creatures
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testDamnationGraveyard() {
|
|
||||||
|
|
||||||
/*
|
|
||||||
Kalitas, Traitor of Ghet {2}{B}{B} 3/4 lifelink - Legendary Vampire
|
|
||||||
If a nontoken creature an opponent controls would die, instead exile that card and put a 2/2 black Zombie creature token onto the battlefield.
|
|
||||||
*/
|
|
||||||
addCard(Zone.GRAVEYARD, playerA, "Kalitas, Traitor of Ghet", 1);
|
|
||||||
/*
|
|
||||||
Damnation {2}{B}{B} - Sorcery
|
|
||||||
Destroy all creatures. They can't be regenerated.
|
|
||||||
*/
|
|
||||||
addCard(Zone.HAND, playerA, "Damnation", 1);
|
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
|
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Bronze Sable", 1);
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Wall of Roots", 1);
|
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Sigiled Starfish", 1);
|
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Damnation");
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
|
||||||
execute();
|
|
||||||
|
|
||||||
assertGraveyardCount(playerA, "Kalitas, Traitor of Ghet", 1);
|
|
||||||
assertGraveyardCount(playerA, "Damnation", 1);
|
|
||||||
assertGraveyardCount(playerB, "Bronze Sable", 1);
|
|
||||||
assertGraveyardCount(playerB, "Wall of Roots", 1);
|
|
||||||
assertGraveyardCount(playerB, "Sigiled Starfish", 1);
|
|
||||||
assertPermanentCount(playerA, "Zombie", 0); // 3 tokens generated from exiling 3 opponent's creatures
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -2,7 +2,6 @@ package org.mage.test.cards.replacement;
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.turn.Phase;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
@ -11,6 +10,43 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
*/
|
*/
|
||||||
public class WouldDieExileInsteadTest extends CardTestPlayerBase {
|
public class WouldDieExileInsteadTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reported bug: Damnation with Kalitas, Traitor of Ghet on my side and 3 opponent creatures, it only exiled 1 creature giving me only 1 zombie instead of 3.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void kalitasDamnationInteraction() {
|
||||||
|
|
||||||
|
/*
|
||||||
|
Kalitas, Traitor of Ghet {2}{B}{B} 3/4 lifelink - Legendary Vampire
|
||||||
|
If a nontoken creature an opponent controls would die, instead exile that card and put a 2/2 black Zombie creature token onto the battlefield.
|
||||||
|
*/
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Kalitas, Traitor of Ghet", 1);
|
||||||
|
/*
|
||||||
|
Damnation {2}{B}{B} - Sorcery
|
||||||
|
Destroy all creatures. They can't be regenerated.
|
||||||
|
*/
|
||||||
|
addCard(Zone.HAND, playerA, "Damnation", 1);
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Bronze Sable", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Wall of Roots", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Sigiled Starfish", 1);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Damnation");
|
||||||
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, "Kalitas, Traitor of Ghet", 1);
|
||||||
|
assertGraveyardCount(playerA, "Damnation", 1);
|
||||||
|
assertExileCount("Bronze Sable", 1);
|
||||||
|
assertExileCount("Wall of Roots", 1);
|
||||||
|
assertExileCount("Sigiled Starfish", 1);
|
||||||
|
assertGraveyardCount(playerB, 0); // all 3 creatures of playerB should be exiled not in graveyard
|
||||||
|
assertExileCount("Kalitas, Traitor of Ghet", 0); // player controlled, not opponent so not exiled
|
||||||
|
assertPermanentCount(playerA, "Zombie", 3); // 3 tokens generated from exiling 3 opponent's creatures
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reported bug #3359 (NOTE: test is failing due to bug in code)
|
* Reported bug #3359 (NOTE: test is failing due to bug in code)
|
||||||
* Creature with 2 toughness targetted by Soul-Scar Mage and Magma Spray was not exiled when it died
|
* Creature with 2 toughness targetted by Soul-Scar Mage and Magma Spray was not exiled when it died
|
||||||
|
@ -53,10 +89,10 @@ public class WouldDieExileInsteadTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Incendiary Flow though worded slightly differently than Magma Spray, still would exile the creature from damage dealt to it
|
* Incendiary Flow is worded slightly differently and would not exile here. See issue #3359 for details.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void incendiaryFlow_SoulScarMageEffect_ShouldExile() {
|
public void incendiaryFlow_SoulScarMageEffect_ShouldNotExile() {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Soul-Scar Mage {R}
|
Soul-Scar Mage {R}
|
||||||
|
@ -89,7 +125,7 @@ public class WouldDieExileInsteadTest extends CardTestPlayerBase {
|
||||||
assertGraveyardCount(playerA, iFlow, 1);
|
assertGraveyardCount(playerA, iFlow, 1);
|
||||||
assertPermanentCount(playerB, hGiant, 0);
|
assertPermanentCount(playerB, hGiant, 0);
|
||||||
assertPowerToughness(playerA, ssMage, 2, 3); // prowess triggered
|
assertPowerToughness(playerA, ssMage, 2, 3); // prowess triggered
|
||||||
assertGraveyardCount(playerB, hGiant, 0);
|
assertGraveyardCount(playerB, hGiant, 1);
|
||||||
assertExileCount(playerB, hGiant, 1);
|
assertExileCount(playerB, hGiant, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue