mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 15:32:08 -08:00
Fix Irencrag Feat's spell casting effect. (#6268)
* Create a test for Irencrag Feat to ensure it functions correctly. * Fix Irencrag Feat so it works correctly.
This commit is contained in:
parent
def8ef0a26
commit
51424b1460
2 changed files with 79 additions and 12 deletions
|
|
@ -0,0 +1,65 @@
|
|||
package org.mage.test.cards.continuous;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
public class IrencragFeatTest extends CardTestPlayerBase {
|
||||
@Test
|
||||
public void castFirst() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 10);
|
||||
addCard(Zone.HAND, playerA, "Irencrag Feat", 1);
|
||||
addCard(Zone.HAND, playerA, "Dwarven Trader", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Irencrag Feat");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Dwarven Trader", 1);
|
||||
assertPermanentCount(playerA, "Dwarven Trader", 1);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void castThird() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 10);
|
||||
addCard(Zone.HAND, playerA, "Irencrag Feat", 1);
|
||||
addCard(Zone.HAND, playerA, "Dwarven Trader", 4);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Irencrag Feat");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Dwarven Trader", 1);
|
||||
assertPermanentCount(playerA, "Dwarven Trader", 3);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void nextTurn() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 10);
|
||||
addCard(Zone.HAND, playerA, "Irencrag Feat", 1);
|
||||
addCard(Zone.HAND, playerA, "Dwarven Trader", 4);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Irencrag Feat");
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Dwarven Trader");
|
||||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
||||
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Dwarven Trader", 0);
|
||||
assertPermanentCount(playerA, "Dwarven Trader", 4);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue