Added looking at card and revealing it for Miracle keyword

This commit is contained in:
Loki 2012-05-06 23:17:57 +04:00
parent db2a9c28c4
commit cb945d997e

View file

@ -35,6 +35,8 @@ import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.keyword.MiracleAbility; import mage.abilities.keyword.MiracleAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.stack.StackAbility; import mage.game.stack.StackAbility;
@ -98,8 +100,12 @@ public class MiracleWatcher extends WatcherImpl<MiracleWatcher> {
ManaCosts<ManaCost> manaCostsToPay = ability.getManaCostsToPay(); ManaCosts<ManaCost> manaCostsToPay = ability.getManaCostsToPay();
if (controller != null) { if (controller != null) {
game.getStack().add(new StackAbility(ability, controller.getId())); game.getStack().add(new StackAbility(ability, controller.getId()));
Cards cards = new CardsImpl(Constants.Zone.PICK);
cards.add(card);
controller.lookAtCards("Miracle", cards, game);
if (controller.chooseUse(Constants.Outcome.Benefit, "Use Miracle " + manaCostsToPay.getText() + "?", game)) { if (controller.chooseUse(Constants.Outcome.Benefit, "Use Miracle " + manaCostsToPay.getText() + "?", game)) {
game.getStack().poll(); game.getStack().poll();
controller.revealCards("Miracle", cards, game);
ManaCosts costRef = card.getSpellAbility().getManaCostsToPay(); ManaCosts costRef = card.getSpellAbility().getManaCostsToPay();
// replace with the new cost // replace with the new cost
costRef.clear(); costRef.clear();