Name:Getaway Barrel
ManaCost:3 R
Types:Artifact
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigReveal | TriggerDescription$ When this artifact is put into a graveyard from the battlefield, reveal the top thirteen cards of your library. Put a random creature card from among them onto the battlefield. Put the rest on the bottom of your library in a random order.
SVar:TrigReveal:DB$ PeekAndReveal | Defined$ You | PeekAmount$ 13 | RememberRevealed$ True | SubAbility$ DBRandomPick
SVar:DBRandomPick:DB$ ChooseCard | Defined$ You | Amount$ 1 | Choices$ Card.Creature+IsRemembered | ChoiceZone$ Library | AtRandom$ True | SubAbility$ DBChangeZone
SVar:DBChangeZone:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | Defined$ ChosenCard | SubAbility$ DBRestRandomOrder
SVar:DBRestRandomOrder:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | RandomOrder$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True | ClearRemembered$ True
SVar:SacMe:5
Oracle:When this artifact is put into a graveyard from the battlefield, reveal the top thirteen cards of your library. Put a random creature card from among them onto the battlefield. Put the rest on the bottom of your library in a random order.
