mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
fix test failures
This commit is contained in:
parent
30a498145e
commit
d06fabf9bd
3 changed files with 7 additions and 5 deletions
|
@ -112,7 +112,6 @@ public class AmplifyTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||
|
||||
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, true); // no reveal request cause no cards to show
|
||||
//addTarget(playerA, "Kilnmouth Dragon");
|
||||
|
|
|
@ -992,7 +992,6 @@ public class ModalDoubleFacesCardsTest extends CardTestPlayerBase {
|
|||
|
||||
// move
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}:");
|
||||
setChoice(playerA, true); // yes, activate
|
||||
setChoice(playerA, "Akoum Warrior");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
checkPermanentCount("after move", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akoum Warrior", 1);
|
||||
|
|
|
@ -15,6 +15,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
|
@ -62,13 +63,16 @@ public class PutCardIntoPlayWithHasteAndSacrificeEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
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) {
|
||||
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(
|
||||
new SacrificeTargetEffect("sacrifice it"), TargetController.ANY
|
||||
new SacrificeTargetEffect("sacrifice it")
|
||||
.setTargetPointer(new FixedTarget(permanent, game)),
|
||||
TargetController.ANY
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue