mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Added global alternate costs to canPlay test. Added Omniscienece test
case.
This commit is contained in:
parent
9ab812f1ac
commit
4b6993f398
3 changed files with 117 additions and 33 deletions
|
|
@ -0,0 +1,45 @@
|
|||
package org.mage.test.cards.cost.alternate;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
public class OmniscienceTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testSpellNoCost() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Omniscience", 1);
|
||||
|
||||
addCard(Zone.HAND, playerA, "Gray Ogre", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gray Ogre");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
//Gray Ogre is cast because it is free
|
||||
assertPermanentCount(playerA, "Gray Ogre", 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSpellHasCostIfCastFromGraveyard() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Omniscience", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Haakon, Stromgald Scourge", 1);
|
||||
|
||||
addCard(Zone.GRAVEYARD, playerA, "Knight of the White Orchid", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Knight of the White Orchid");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
//Knight of the White Orchid was not cast due to lack of mana
|
||||
assertPermanentCount(playerA, "Knight of the White Orchid", 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue