diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index 043bd767157..5b90a90e5dd 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -174,9 +174,19 @@ public class AbilityUtils { // game.getCardState(Card c) is not working for LKI for (final Object o : hostCard.getRemembered()) { if (o instanceof Card) { - cards.addAll(addRememberedFromCardState(game, (Card)o)); + cards.addAll(addRememberedFromCardState(game, (Card) o)); } } + } else if (defined.equals("RememberedLast")) { + Card remembered = null; + for (final Object o : hostCard.getRemembered()) { + if (o instanceof Card) { + remembered = (Card)o; + } + } + if (remembered != null) { + cards.add(remembered); + } } else if (defined.equals("RememberedLKI")) { for (final Object o : hostCard.getRemembered()) { if (o instanceof Card) { diff --git a/forge-gui/res/cardsfolder/upcoming/shifting_shadow.txt b/forge-gui/res/cardsfolder/upcoming/shifting_shadow.txt index 455660bd270..7007a822c1c 100644 --- a/forge-gui/res/cardsfolder/upcoming/shifting_shadow.txt +++ b/forge-gui/res/cardsfolder/upcoming/shifting_shadow.txt @@ -4,12 +4,13 @@ Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 2 R | ValidTgts$ Creature | AILogic$ Pump | SubAbility$ RememberSelf | SpellDescription$ Enchanted creature has haste and "At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order." SVar:RememberSelf:DB$ Pump | Defined$ Creature.EnchantedBy | ImprintCards$ Self -S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Haste | AddTrigger$ ShadowUpkeepTrig | AddSVar$ ShadowRememberSelf,ShadowDestroyEnchanted,ShadowRevealCards,ShadowReattach +S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Haste | AddTrigger$ ShadowUpkeepTrig | AddSVar$ ShadowRememberSelf,ShadowDestroyEnchanted,ShadowRevealCards,ShadowReattach,DBCleanup +T:Mode$ ChangesZone | Affected$ Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True SVar:ShadowUpkeepTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ShadowRememberSelf | TriggerDescription$ At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order. SVar:ShadowRememberSelf:DB$ Pump | ImprintCards$ OriginalHost | SubAbility$ ShadowDestroyEnchanted SVar:ShadowDestroyEnchanted:DB$ Destroy | Defined$ Self | SubAbility$ ShadowRevealCards SVar:ShadowRevealCards:DB$ DigUntil | Valid$ Creature | ValidDescription$ creature | FoundDestination$ Battlefield | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | RevealRandomOrder$ True | RememberFound$ True | SubAbility$ ShadowReattach -SVar:ShadowReattach:DB$ Attach | Defined$ Remembered | Object$ Imprinted | SubAbility$ DBCleanup +SVar:ShadowReattach:DB$ Attach | Defined$ RememberedLast | Object$ Imprinted | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True SVar:Picture:http://www.wizards.com/global/images/magic/general/shifting_shadow.jpg Oracle:Enchant creature\nEnchanted creature has haste and "At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach Shifting Shadow to it, then put all other cards revealed this way on the bottom of your library in a random order."