Name:Night Dealings
ManaCost:2 B B
Types:Enchantment
T:Mode$ DamageDone | ValidSource$ Card.YouCtrl,Emblem.YouCtrl | ValidTarget$ Player.Other | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever a source you control deals damage to another player, put that many theft counters on CARDNAME.
SVar:TrigPutCounter:DB$ PutCounter | CounterType$ THEFT | CounterNum$ Y
A:AB$ ChangeZone | Cost$ 2 B B SubCounter<X/THEFT> | Origin$ Library | Destination$ Hand | ChangeType$ Card.nonLand+YouCtrl+cmcEQX | ChangeNum$ 1 | Reveal$ True | Shuffle$ True | SpellDescription$ Search your library for a nonland card with converted mana cost X, reveal it, and put it into your hand. Then shuffle your library.
SVar:X:Count$xPaid
SVar:Y:TriggerCount$DamageAmount
AI:RemoveDeck:All
Oracle:Whenever a source you control deals damage to another player, put that many theft counters on Night Dealings.\n{2}{B}{B}, Remove X theft counters from Night Dealings: Search your library for a nonland card with converted mana cost X, reveal it, and put it into your hand. Then shuffle your library.
