mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
[AVR] Alchemist's Refuge with test
This commit is contained in:
parent
3bc9f9ccbe
commit
3cca30ca97
3 changed files with 229 additions and 0 deletions
|
|
@ -0,0 +1,57 @@
|
|||
package org.mage.test.cards.asthough;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* Alchemist's Refuge:
|
||||
* {G}{U}, {tap}: You may cast nonland cards this turn as though they had flash.
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public class AlchemistsRefugeTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testCastAsThoughHasFlash() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Alchemist's Refuge");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains");
|
||||
addCard(Constants.Zone.HAND, playerA, "Elite Vanguard");
|
||||
|
||||
activateAbility(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "{G}{U}, {tap}:");
|
||||
castSpell(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Elite Vanguard");
|
||||
|
||||
setStopAt(2, Constants.PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
assertPermanentCount(playerA, "Elite Vanguard", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests playing the same card but without Alchemist's Refuge effect
|
||||
*/
|
||||
@Test
|
||||
public void testNoCastPossibleOnOpponentsTurn() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Alchemist's Refuge");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains");
|
||||
addCard(Constants.Zone.HAND, playerA, "Elite Vanguard");
|
||||
|
||||
castSpell(2, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Elite Vanguard");
|
||||
|
||||
setStopAt(2, Constants.PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
// it shouldn't be possible, so no Elite Vanguard on the battlefield
|
||||
assertPermanentCount(playerA, "Elite Vanguard", 0);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue