* Myth Unbound - Fixed the two working abilities(fixe #5347).

This commit is contained in:
LevelX2 2019-01-07 16:39:49 +01:00
parent 15ba067be5
commit e938f91e3e
5 changed files with 133 additions and 8 deletions

View file

@ -1,11 +1,9 @@
package org.mage.test.commander;
import mage.cards.Card;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.filter.FilterMana;
import mage.util.CardUtil;
import org.junit.Assert;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestCommander3PlayersFFA;

View file

@ -0,0 +1,51 @@
package org.mage.test.commander.duel;
import java.io.FileNotFoundException;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.GameException;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestCommanderDuelBase;
/**
*
* @author LevelX2
*/
public class MythUnboundTest extends CardTestCommanderDuelBase {
@Override
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
// Karador, Ghost Chieftain costs {1} less to cast for each creature card in your graveyard.
// During each of your turns, you may cast one creature card from your graveyard.
setDecknamePlayerA("CommanderOviya.dck"); // Commander = Oviya Pashiri, Sage Lifecrafter {G}
setDecknamePlayerB("CMDNorinTheWary.dck");
return super.createNewGameAndPlayers();
}
@Test
public void castCommanderTwice() {
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
// Your commander costs {1} less to cast for each time it's been cast from the command zone this game.
// Whenever your commander is put into the command zone from anywhere, draw a card.
addCard(Zone.BATTLEFIELD, playerA, "Myth Unbound", 1); // Enchantment {2}{G}
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
addCard(Zone.HAND, playerB, "Lightning Bolt", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oviya Pashiri, Sage Lifecrafter");
castSpell(1, PhaseStep.BEGIN_COMBAT, playerB, "Lightning Bolt", "Oviya Pashiri, Sage Lifecrafter");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Oviya Pashiri, Sage Lifecrafter");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertPermanentCount(playerA, "Myth Unbound", 1);
assertGraveyardCount(playerB, "Lightning Bolt", 1);
assertPermanentCount(playerA, "Oviya Pashiri, Sage Lifecrafter", 1);
assertHandCount(playerA, 1);
assertTappedCount("Forest", false, 1);
}
}