diff --git a/forge-ai/src/main/java/forge/ai/ability/PeekAndRevealAi.java b/forge-ai/src/main/java/forge/ai/ability/PeekAndRevealAi.java index 331ee87051c..81bb8bf9d05 100644 --- a/forge-ai/src/main/java/forge/ai/ability/PeekAndRevealAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/PeekAndRevealAi.java @@ -40,7 +40,7 @@ public class PeekAndRevealAi extends SpellAbilityAi { // once things get converted from Dig + NoMove return true; } - + /* (non-Javadoc) * @see forge.card.ability.SpellAbilityAi#confirmAction(forge.game.player.Player, forge.card.spellability.SpellAbility, forge.game.player.PlayerActionConfirmMode, java.lang.String) */ diff --git a/forge-gui/res/cardsfolder/c/candles_of_leng.txt b/forge-gui/res/cardsfolder/c/candles_of_leng.txt index 8336b3f7d3e..f314bee39c3 100644 --- a/forge-gui/res/cardsfolder/c/candles_of_leng.txt +++ b/forge-gui/res/cardsfolder/c/candles_of_leng.txt @@ -3,6 +3,6 @@ ManaCost:2 Types:Artifact A:AB$ PeekAndReveal | Cost$ 4 T | NoPeek$ True | RememberRevealed$ True | SubAbility$ DBCandlesChangeZone | SpellDescription$ Reveal the top card of your library. SVar:DBCandlesChangeZone:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Graveyard | ConditionDefined$ Remembered | ConditionPresent$ Card.sharesNameWith YourGraveyard | SubAbility$ DBCandlesDraw | StackDescription$ If it has the same name as a card in their graveyard, they put it into their graveyard. | SpellDescription$ If it has the same name as a card in your graveyard, put it into your graveyard. -SVar:DBCandlesDraw:DB$ Draw | ConditionDefined$ Remembered | ConditionPresent$ Card.sharesNameWith YourGraveyard | ConditionCompare$ EQ0 | SubAbility$ DBCandlesCleanup | StackDescription$ Otherwise, they draw a card. | SpellDescription$ Otherwise, draw a card. +SVar:DBCandlesDraw:DB$ Draw | ConditionDefined$ Remembered | ConditionPresent$ Card.sharesNameWith YourGraveyard | ConditionCompare$ EQ0 | SubAbility$ DBCandlesCleanup | StackDescription$ Otherwise, they draw a card. | SpellDescription$ Otherwise, draw a card. SVar:DBCandlesCleanup:DB$ Cleanup | ClearRemembered$ True Oracle:{4}, {T}: Reveal the top card of your library. If it has the same name as a card in your graveyard, put it into your graveyard. Otherwise, draw a card. diff --git a/forge-gui/res/cardsfolder/d/depala_pilot_exemplar.txt b/forge-gui/res/cardsfolder/d/depala_pilot_exemplar.txt index eee948e5c3c..e6285844486 100644 --- a/forge-gui/res/cardsfolder/d/depala_pilot_exemplar.txt +++ b/forge-gui/res/cardsfolder/d/depala_pilot_exemplar.txt @@ -5,6 +5,6 @@ PT:3/3 S:Mode$ Continuous | Affected$ Permanent.Dwarf+Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | Description$ Other Dwarves you control get +1/+1. S:Mode$ Continuous | Affected$ Creature.Vehicle+YouCtrl | AddPower$ 1 | AddToughness$ 1 | Description$ Each Vehicle you control gets +1/+1 as long as it's a creature. T:Mode$ Taps | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigDig | TriggerDescription$ Whenever CARDNAME becomes tapped, you may pay {X}. If you do, reveal the top X cards of your library, put all Dwarf and Vehicle cards from among them into your hand, then put the rest on the bottom of your library in a random order. -SVar:TrigDig:AB$Dig | Cost$ X | DigNum$ X | Reveal$ True | ChangeNum$ All | DestinationZone$ Hand | DestinationZone2$ Library | LibraryPosition$ -1 | RestRandomOrder$ True | ChangeValid$ Dwarf,Vehicle | AILogic$ PayXButSaveMana.3 +SVar:TrigDig:AB $Dig | Cost$ X | DigNum$ X | Reveal$ True | ChangeNum$ All | DestinationZone$ Hand | DestinationZone2$ Library | LibraryPosition$ -1 | RestRandomOrder$ True | ChangeValid$ Dwarf,Vehicle | AILogic$ PayXButSaveMana.3 SVar:X:Count$xPaid Oracle:Other Dwarves you control get +1/+1.\nEach Vehicle you control gets +1/+1 as long as it's a creature.\nWhenever Depala, Pilot Exemplar becomes tapped, you may pay {X}. If you do, reveal the top X cards of your library, put all Dwarf and Vehicle cards from among them into your hand, then put the rest on the bottom of your library in a random order. diff --git a/forge-gui/res/cardsfolder/e/epiphany_at_the_drownyard.txt b/forge-gui/res/cardsfolder/e/epiphany_at_the_drownyard.txt index 7f51974c033..7bf1fbb7213 100644 --- a/forge-gui/res/cardsfolder/e/epiphany_at_the_drownyard.txt +++ b/forge-gui/res/cardsfolder/e/epiphany_at_the_drownyard.txt @@ -1,7 +1,7 @@ Name:Epiphany at the Drownyard ManaCost:X U Types:Instant -A:SP$ PeekAndReveal | Cost$ X U | PeekAmount$ Y | RememberRevealed$ True | NoPeek$ True | SubAbility$ DBTwoPiles | AILogic$ PayX | SpellDescription$ Reveal the top X plus one cards of your library and separate them into two piles. An opponent chooses one of those piles. Put that pile into your hand and the other into your graveyard. +A:SP$ PeekAndReveal | Cost$ X U | PeekAmount$ Y | RememberRevealed$ True | NoPeek$ True | SubAbility$ DBTwoPiles | SpellDescription$ Reveal the top X plus one cards of your library and separate them into two piles. An opponent chooses one of those piles. Put that pile into your hand and the other into your graveyard. SVar:DBTwoPiles:DB$ TwoPiles | Chooser$ Opponent | DefinedCards$ Remembered | Separator$ You | ChosenPile$ DBHand | UnchosenPile$ DBGrave | AILogic$ Worst SVar:DBHand:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | SubAbility$ DBCleanup SVar:DBGrave:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Graveyard | SubAbility$ DBCleanup diff --git a/forge-gui/res/cardsfolder/o/orcish_spy.txt b/forge-gui/res/cardsfolder/o/orcish_spy.txt index 7a1c43149b0..48102c97716 100644 --- a/forge-gui/res/cardsfolder/o/orcish_spy.txt +++ b/forge-gui/res/cardsfolder/o/orcish_spy.txt @@ -2,5 +2,5 @@ Name:Orcish Spy ManaCost:R Types:Creature Orc Rogue PT:1/1 -A:AB$ PeekAndReveal | Cost$ T | ValidTgts$ Player | PeekAmount$ 3 | NoReveal$ True | AILogic$ Never | SpellDescription$ Look at the top three cards of target player's library. +A:AB$ PeekAndReveal | Cost$ T | ValidTgts$ Player | PeekAmount$ 3 | NoReveal$ True | SpellDescription$ Look at the top three cards of target player's library. Oracle:{T}: Look at the top three cards of target player's library. diff --git a/forge-gui/res/cardsfolder/p/prophecy.txt b/forge-gui/res/cardsfolder/p/prophecy.txt index 7e974439f55..bc2dc74feed 100644 --- a/forge-gui/res/cardsfolder/p/prophecy.txt +++ b/forge-gui/res/cardsfolder/p/prophecy.txt @@ -1,7 +1,7 @@ Name:Prophecy ManaCost:W Types:Sorcery -A:SP$ Dig | ValidTgts$ Opponent | NoPeek$ True | RememberRevealed$ True | SubAbility$ DBGainLife | SpellDescription$ Reveal the top card of target opponent's library. If it's a land, you gain 1 life. Then that player shuffles. Draw a card at the beginning of the next turn's upkeep. +A:SP$ PeekAndReveal | ValidTgts$ Opponent | NoPeek$ True | RememberRevealed$ True | SubAbility$ DBGainLife | SpellDescription$ Reveal the top card of target opponent's library. If it's a land, you gain 1 life. Then that player shuffles. Draw a card at the beginning of the next turn's upkeep. SVar:DBGainLife:DB$ GainLife | LifeAmount$ 1 | ConditionDefined$ Remembered | ConditionPresent$ Card.Land | ConditionCompare$ GE1 | SubAbility$ DBShuffle SVar:DBShuffle:DB$ Shuffle | Defined$ ParentTarget | SubAbility$ DelTrigSlowtrip SVar:DelTrigSlowtrip:DB$ DelayedTrigger | NextTurn$ True | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | TriggerDescription$ Draw a card at the beginning of the next turn's upkeep. diff --git a/forge-gui/res/cardsfolder/v/visions.txt b/forge-gui/res/cardsfolder/v/visions.txt index 2959752db7d..3f45adb2ea5 100644 --- a/forge-gui/res/cardsfolder/v/visions.txt +++ b/forge-gui/res/cardsfolder/v/visions.txt @@ -1,7 +1,7 @@ Name:Visions ManaCost:W Types:Sorcery -A:SP$ Dig | ValidTgts$ Player | PeekAmount$ 5 | NoReveal$ True | SubAbility$ DBShuffle | SpellDescription$ Look at the top five cards of target player's library. You may then have that player shuffle that library. +A:SP$ PeekAndReveal | ValidTgts$ Player | PeekAmount$ 5 | NoReveal$ True | SubAbility$ DBShuffle | SpellDescription$ Look at the top five cards of target player's library. You may then have that player shuffle that library. SVar:DBShuffle:DB$ Shuffle | Defined$ Targeted | Optional$ True AI:RemoveDeck:All Oracle:Look at the top five cards of target player's library. You may then have that player shuffle that library. diff --git a/forge-gui/res/cardsfolder/w/wand_of_denial.txt b/forge-gui/res/cardsfolder/w/wand_of_denial.txt index ac9ed1ff56d..98f584667bb 100644 --- a/forge-gui/res/cardsfolder/w/wand_of_denial.txt +++ b/forge-gui/res/cardsfolder/w/wand_of_denial.txt @@ -1,7 +1,7 @@ Name:Wand of Denial ManaCost:2 Types:Artifact -A:AB$ Dig | Cost$ T | ValidTgts$ Player | NoReveal$ True | RememberPeeked$ True | SubAbility$ DBChangeZone | StackDescription$ SpellDescription | SpellDescription$ Look at the top card of target player's library. If it's a nonland card, you may pay 2 life. If you do, put it into that player's graveyard. +A:AB$ PeekAndReveal | Cost$ T | ValidTgts$ Player | NoReveal$ True | RememberPeeked$ True | SubAbility$ DBChangeZone | StackDescription$ SpellDescription | SpellDescription$ Look at the top card of target player's library. If it's a nonland card, you may pay 2 life. If you do, put it into that player's graveyard. SVar:DBChangeZone:DB$ Mill | Defined$ Targeted | NumCards$ 1 | ConditionDefined$ Remembered | ConditionPresent$ Card.nonLand | ConditionCompare$ GE1 | UnlessPayer$ You | UnlessCost$ PayLife<2> | UnlessSwitched$ True | StackDescription$ None | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True AI:RemoveDeck:All diff --git a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java index bca91f87235..5fc71d73963 100644 --- a/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java +++ b/forge-gui/src/main/java/forge/player/PlayerControllerHuman.java @@ -1114,23 +1114,13 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont @Override public CardCollectionView chooseCardsToDiscardFrom(final Player p, final SpellAbility sa, final CardCollection valid, final int min, final int max) { - if (GuiBase.getInterface().isLibgdxPort()) { - boolean optional = min == 0; - tempShowCards(valid); - GameEntityViewMap gameCacheDiscard = GameEntityView.getMap(valid); - List views = getGui().many(String.format(localizer.getMessage("lblChooseMinCardToDiscard"), optional ? max : min), - localizer.getMessage("lblDiscarded"), min, max, gameCacheDiscard.getTrackableKeys(), null); - endTempShowCards(); - final CardCollection choices = new CardCollection(); - gameCacheDiscard.addToList(views, choices); - return choices; - } + boolean optional = min == 0; if (p != player) { tempShowCards(valid); GameEntityViewMap gameCacheDiscard = GameEntityView.getMap(valid); - List views = getGui().many(String.format(localizer.getMessage("lblChooseMinCardToDiscard"), min), - localizer.getMessage("lblDiscarded"), min, min, gameCacheDiscard.getTrackableKeys(), null); + List views = getGui().many(String.format(localizer.getMessage("lblChooseMinCardToDiscard"), optional ? max : min), + localizer.getMessage("lblDiscarded"), min, max, gameCacheDiscard.getTrackableKeys(), null); endTempShowCards(); final CardCollection choices = new CardCollection(); gameCacheDiscard.addToList(views, choices);