mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
[TSP] fixed Gauntlet of Power adding mana to the wrong mana pool (fixes #8154)
This commit is contained in:
parent
002a7af6d0
commit
3dff1783ac
2 changed files with 75 additions and 2 deletions
|
@ -7,7 +7,6 @@ import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.common.ChooseColorEffect;
|
import mage.abilities.effects.common.ChooseColorEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
import mage.abilities.effects.mana.AddManaChosenColorEffect;
|
|
||||||
import mage.abilities.effects.mana.ManaEffect;
|
import mage.abilities.effects.mana.ManaEffect;
|
||||||
import mage.abilities.mana.TriggeredManaAbility;
|
import mage.abilities.mana.TriggeredManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -69,7 +68,7 @@ public final class GauntletOfPower extends CardImpl {
|
||||||
class GauntletOfPowerTapForManaAllTriggeredAbility extends TriggeredManaAbility {
|
class GauntletOfPowerTapForManaAllTriggeredAbility extends TriggeredManaAbility {
|
||||||
|
|
||||||
GauntletOfPowerTapForManaAllTriggeredAbility() {
|
GauntletOfPowerTapForManaAllTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new AddManaChosenColorEffect(), false);
|
super(Zone.BATTLEFIELD, new GauntletOfPowerManaEffect2(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private GauntletOfPowerTapForManaAllTriggeredAbility(GauntletOfPowerTapForManaAllTriggeredAbility ability) {
|
private GauntletOfPowerTapForManaAllTriggeredAbility(GauntletOfPowerTapForManaAllTriggeredAbility ability) {
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
package org.mage.test.cards.single.tsp;
|
||||||
|
|
||||||
|
import mage.constants.PhaseStep;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class GauntletOfPowerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
private static final String gauntlet = "Gauntlet of Power";
|
||||||
|
private static final String red = "Red";
|
||||||
|
private static final String maaka = "Feral Maaka";
|
||||||
|
private static final String myr = "Hovermyr";
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBoost() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, maaka);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, myr);
|
||||||
|
addCard(Zone.HAND, playerA, gauntlet);
|
||||||
|
|
||||||
|
setChoice(playerA, red);
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, gauntlet);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
|
assertPowerToughness(playerA, maaka, 2 + 1, 2 + 1);
|
||||||
|
assertPowerToughness(playerA, myr, 1, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testControllerMana() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
|
||||||
|
addCard(Zone.HAND, playerA, gauntlet);
|
||||||
|
addCard(Zone.HAND, playerA, maaka);
|
||||||
|
|
||||||
|
setChoice(playerA, red);
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, gauntlet);
|
||||||
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, maaka);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
|
assertPowerToughness(playerA, maaka, 2 + 1, 2 + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testNotControllerMana() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||||
|
addCard(Zone.HAND, playerA, gauntlet);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Mountain");
|
||||||
|
addCard(Zone.HAND, playerB, maaka);
|
||||||
|
|
||||||
|
setChoice(playerA, red);
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, gauntlet);
|
||||||
|
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, maaka);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
setStopAt(2, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
|
assertPowerToughness(playerB, maaka, 2 + 1, 2 + 1);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue