fix test failures

This commit is contained in:
Evan Kranzler 2022-11-11 08:24:25 -05:00
parent 30a498145e
commit d06fabf9bd
3 changed files with 7 additions and 5 deletions

View file

@ -112,7 +112,6 @@ public class AmplifyTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Through the Breach"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Through the Breach");
setChoice(playerA, true); // Put a creature into play with Through the Breach?
setChoice(playerA, "Kilnmouth Dragon"); setChoice(playerA, "Kilnmouth Dragon");
//setChoice(playerA, true); // no reveal request cause no cards to show //setChoice(playerA, true); // no reveal request cause no cards to show
//addTarget(playerA, "Kilnmouth Dragon"); //addTarget(playerA, "Kilnmouth Dragon");

View file

@ -992,7 +992,6 @@ public class ModalDoubleFacesCardsTest extends CardTestPlayerBase {
// move // move
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}:"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}:");
setChoice(playerA, true); // yes, activate
setChoice(playerA, "Akoum Warrior"); setChoice(playerA, "Akoum Warrior");
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
checkPermanentCount("after move", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 1); checkPermanentCount("after move", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 1);

View file

@ -15,6 +15,7 @@ import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInHand;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil; import mage.util.CardUtil;
/** /**
@ -62,13 +63,16 @@ public class PutCardIntoPlayWithHasteAndSacrificeEffect extends OneShotEffect {
return false; return false;
} }
player.moveCards(card, Zone.BATTLEFIELD, source, game); player.moveCards(card, Zone.BATTLEFIELD, source, game);
Permanent permanent = game.getPermanent(card.getId()); Permanent permanent = game.getPermanent(CardUtil.getDefaultCardSideForBattlefield(game, card).getId());
if (permanent == null) { if (permanent == null) {
return false; return false;
} }
game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), duration), source); game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), duration)
.setTargetPointer(new FixedTarget(permanent, game)), source);
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility( game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
new SacrificeTargetEffect("sacrifice it"), TargetController.ANY new SacrificeTargetEffect("sacrifice it")
.setTargetPointer(new FixedTarget(permanent, game)),
TargetController.ANY
), source); ), source);
return true; return true;
} }