generalize card showing in PlayEffect

This commit is contained in:
Peter F. Patel-Schneider
2019-02-15 10:59:12 -05:00
parent f63e59fbda
commit 2b0fc5a00a
2 changed files with 3 additions and 3 deletions

View File

@@ -82,8 +82,8 @@ public class PlayEffect extends SpellAbilityEffect {
tgtCards = new CardCollection(
AbilityUtils.filterListByType(game.getCardsIn(zone), sa.getParam("Valid"), sa)
);
if ( sa.hasParam("ShowRemembered") ) {
showCards = new CardCollection(AbilityUtils.filterListByType(game.getCardsIn(zone), "Card.IsRemembered", sa));
if ( sa.hasParam("ShowCards") ) {
showCards = new CardCollection(AbilityUtils.filterListByType(game.getCardsIn(zone), sa.getParam("ShowCards"), sa));
}
}
else if (sa.hasParam("AnySupportedCard")) {

View File

@@ -3,7 +3,7 @@ ManaCost:5 R
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Card.wasCastFromHand | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDig | TriggerDescription$ Whenever you cast a spell from your hand, reveal the top X cards of your library, where X is that spell's converted mana cost. You may cast a card revealed this way with converted mana cost X or less without paying its mana cost. Put the rest on the bottom of your library in a random order.
SVar:TrigDig:DB$ PeekAndReveal | Defined$ You | PeekAmount$ X | RememberRevealed$ True | SubAbility$ DBPlay
SVar:DBPlay:DB$ Play | ValidZone$ Library | Valid$ Card.nonLand+IsRemembered+cmcLEX | WithoutManaCost$ True | Optional$ True | Amount$ 1 | ShowRemembered$ True | ForgetTargetRemembered$ True | SubAbility$ DBRestRandomOrder
SVar:DBPlay:DB$ Play | ValidZone$ Library | Valid$ Card.nonLand+IsRemembered+cmcLEX | WithoutManaCost$ True | Optional$ True | Amount$ 1 | ShowCards$ Card.IsRemembered | ForgetTargetRemembered$ True | SubAbility$ DBRestRandomOrder
SVar:DBRestRandomOrder:DB$ ChangeZone | Defined$ Remembered | AtRandom$ True | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | Shuffle$ False | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:TriggerCount$CastSACMC