Name:The Magic Bandit
ManaCost:3 B
Types:Legendary Creature Human Rogue
PT:3/2
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigDig | TriggerZones$ Battlefield | TriggerDescription$ When CARDNAME deals combat damage to an opponent, exile the top card of that player's library. You may cast that card for as long as it remains exiled, and mana of any type can be spent to cast that spell.
SVar:TrigDig:DB$ Dig | DigNum$ 1 | Defined$ TriggeredTarget | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ You may cast that card for as long as it remains exiled, and mana of any type can be spent to cast that spell.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
T:Mode$ SpellCast | ValidCard$ Card.YouDontOwn | ValidActivatingPlayer$ You | Execute$ TrigCopySpell | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a spell or play a land you don't own, copy it.
SVar:TrigCopySpell:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility
T:Mode$ LandPlayed | ValidCard$ Land.YouCtrl+YouDontOwn | TriggerZones$ Battlefield | Execute$ TrigCopyLand | Secondary$ True | TriggerDescription$ Whenever you cast a spell or play a land you don't own, copy it.
SVar:TrigCopyLand:DB$ CopyPermanent | Defined$ TriggeredCardLKICopy
Oracle:When The Magic Bandit deals combat damage to an opponent, exile the top card of that player's library. You may cast that card for as long as it remains exiled, and mana of any type can be spent to cast that spell.\nWhenever you cast a spell or play a land you don't own, copy it.
