mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Refactoring snow mana to allow tracking how much is spent (Ready for Review) (#7406)
* refactored mana methods to WUBRG order * more WUBRG refactoring * added new mana tracking object * fixed code error * fixed missing mana count * fixed null pointer exception in tests * fixed issue with equality * more equality fixes * some cosmetic changes to ManaTest * added copy method to setToMana * fixed some initialization issues * fixed serialization issue * [KHM] Implemented Search for Glory * updated mana handling to track snow * added tests for snow mana tracking * updated implementation of setter methods * updated paramater to use copy methods * fixed snow mana test to ensure proper mana tapping * replaced instances of getPayment with getUsedManaToPay * updated tracking of snow mana * reverted snow mana tracking removal * finished reverting change
This commit is contained in:
parent
5e4b5239d8
commit
e5344b7a96
99 changed files with 1006 additions and 720 deletions
|
|
@ -7,12 +7,11 @@ import org.junit.Test;
|
|||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class ManaWasSpentToCastTest extends CardTestPlayerBase {
|
||||
|
||||
|
||||
@Test
|
||||
public void testArtifactWillBeDestroyed() {
|
||||
// Tin Street Hooligan - Creature 2/1 {1}{R}
|
||||
|
|
@ -20,9 +19,9 @@ public class ManaWasSpentToCastTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerA, "Tin Street Hooligan");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Abzan Banner");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tin Street Hooligan");
|
||||
addTarget(playerA, "Abzan Banner");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
|
|
@ -38,9 +37,9 @@ public class ManaWasSpentToCastTest extends CardTestPlayerBase {
|
|||
// When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.
|
||||
addCard(Zone.HAND, playerA, "Tin Street Hooligan");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Abzan Banner");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tin Street Hooligan");
|
||||
addTarget(playerA, "Abzan Banner");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
|
|
@ -49,5 +48,42 @@ public class ManaWasSpentToCastTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Tin Street Hooligan", 1);
|
||||
assertPermanentCount(playerB, "Abzan Banner", 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSnowMana() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Snow-Covered Plains");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Boreal Druid");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains");
|
||||
addCard(Zone.HAND, playerA, "Search for Glory");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Search for Glory");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Search for Glory", 1);
|
||||
assertLife(playerA, 22);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSnowMana2() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Snow-Covered Mountain");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Vodalian Arcanist");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Rimefeather Owl");
|
||||
addCard(Zone.HAND, playerA, "Search for Glory");
|
||||
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {U}");
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {R}");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{S}", "Vodalian Arcanist");
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Search for Glory");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Search for Glory", 1);
|
||||
assertLife(playerA, 21);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue