* Mogg Infestation - Fixed a problem with counting also commanders noz gong to graveyard.

This commit is contained in:
LevelX2 2017-05-16 17:40:43 +02:00
parent 351095a904
commit 0185bcb37e
4 changed files with 52 additions and 18 deletions

View file

@ -47,6 +47,7 @@ public class CastBRGCommanderTest extends CardTestCommanderDuelBase {
// When you cast Prossh, Skyraider of Kher, put X 0/1 red Kobold creature tokens named Kobolds of Kher Keep onto the battlefield, where X is the amount of mana spent to cast Prossh.
// Sacrifice another creature: Prossh gets +1/+0 until end of turn.
setDecknamePlayerA("Power Hungry.dck"); // Commander = Prosssh, Skyrider of Kher {3}{B}{R}{G}
setDecknamePlayerB("CommanderDuel_UW.dck"); // Daxos of Meletis {1}{W}{U}
return super.createNewGameAndPlayers();
}
@ -96,7 +97,36 @@ public class CastBRGCommanderTest extends CardTestCommanderDuelBase {
assertGraveyardCount(playerA, "Karn Liberated", 0);
assertPermanentCount(playerA, "Silvercoat Lion", 2);
assertCommandZoneCount(playerA, "Prossh, Skyraider of Kher", 1);
assertCommandZoneCount(playerB, "Ob Nixilis of the Black Oath", 1);
assertCommandZoneCount(playerB, "Daxos of Meletis", 1);
}
/**
* Mogg infestation creates tokens "for each creature that died this way".
* When a commander is moved to a command zone, it doesn't "die", and thus
* should not create tokens.
*/
@Test
public void castMoggInfestation() {
// Destroy all creatures target player controls. For each creature that died this way, create two 1/1 red Goblin creature tokens under that player's control.
addCard(Zone.HAND, playerA, "Mogg Infestation", 1); // Sorcery {3}{R}{R}
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
addCard(Zone.BATTLEFIELD, playerB, "Island", 1);
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Daxos of Meletis");
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Mogg Infestation");
setStopAt(3, PhaseStep.BEGIN_COMBAT);
execute();
assertGraveyardCount(playerA, "Mogg Infestation", 1);
assertCommandZoneCount(playerB, "Daxos of Meletis", 1);
assertPermanentCount(playerB, "Goblin", 0);
}
}

View file

@ -39,22 +39,21 @@ import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
*
* @author LevelX2
*/
public abstract class CardTestCommanderDuelBase extends CardTestPlayerAPIImpl {
public CardTestCommanderDuelBase() {
super();
this.deckNameA = "CommanderDuel.dck";
this.deckNameB = "CommanderDuel.dck";
this.deckNameA = "CommanderDuel.dck"; // Commander Ob Nixilis of the Black Oath
this.deckNameB = "CommanderDuel.dck"; // Commander Ob Nixilis of the Black Oath
}
@Override
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
Game game = new CommanderDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, 0, 40);
playerA = createPlayer(game, playerA, "PlayerA",deckNameA);
playerB = createPlayer(game, playerB, "PlayerB",deckNameB);
playerA = createPlayer(game, playerA, "PlayerA", deckNameA);
playerB = createPlayer(game, playerB, "PlayerB", deckNameB);
return game;
}
}
}
}