Name:Soul Foundry
ManaCost:4
Types:Artifact
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint — When CARDNAME enters, you may exile a creature card from your hand.
SVar:TrigExile:DB$ ChangeZone | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Creature | ChangeNum$ 1
A:AB$ CopyPermanent | Cost$ X T | Defined$ Imprinted.ExiledWithSource | AILogic$ AtEOT | SpellDescription$ Create a token that's a copy of the exiled card. X is the mana value of that card.
SVar:X:Imprinted$CardManaCost
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsImprinted+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetImprinted$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self | Destination$ Any | Execute$ DBCleanup | Static$ True
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True
SVar:NeedsToPlayVar:Y GE1
SVar:Y:Count$ValidHand Creature.YouOwn
Oracle:Imprint — When Soul Foundry enters, you may exile a creature card from your hand.\n{X}, {T}: Create a token that's a copy of the exiled card. X is the mana value of that card.
