add test for AddManaInAnyCombinationEffect

cleanup Grand Warlord Radha, add test

simplify some abilities to common class

remove unused constructors
This commit is contained in:
xenohedron 2024-07-25 01:35:20 -04:00
parent be3065789d
commit 5cc4901580
8 changed files with 104 additions and 354 deletions

View file

@ -0,0 +1,31 @@
package org.mage.test.cards.mana;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class AddManaAnyCombinationTest extends CardTestPlayerBase {
@Test
public void testOrcishLumberjack() {
String ability = "{T}, Sacrifice a Forest: Add three mana in any combination of {R} and/or {G}.";
addCard(Zone.BATTLEFIELD, playerA, "Orcish Lumberjack");
addCard(Zone.BATTLEFIELD, playerA, "Forest");
addCard(Zone.HAND, playerA, "Living Twister");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, ability);
setChoice(playerA, "Forest"); // to sac
setChoiceAmount(playerA, 2, 1); // RRG
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Living Twister");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPowerToughness(playerA, "Living Twister", 2, 5);
assertGraveyardCount(playerA, "Forest", 1);
}
}

View file

@ -0,0 +1,31 @@
package org.mage.test.cards.single.dom;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class GrandWarlordRadhaTest extends CardTestPlayerBase {
@Test
public void testMana() {
addCard(Zone.BATTLEFIELD, playerA, "Raging Goblin");
addCard(Zone.BATTLEFIELD, playerA, "Lightning Elemental");
addCard(Zone.BATTLEFIELD, playerA, "Grand Warlord Radha");
addCard(Zone.HAND, playerA, "Living Twister");
attack(1, playerA, "Raging Goblin");
attack(1, playerA, "Lightning Elemental");
attack(1, playerA, "Grand Warlord Radha");
setChoiceAmount(playerA, 2, 1); // RRG
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Living Twister");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertPowerToughness(playerA, "Living Twister", 2, 5);
}
}