mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Added looking at card and revealing it for Miracle keyword
This commit is contained in:
parent
074faf09ec
commit
836b9aaf25
1 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue