Name:Sanar, Innovative First-Year
ManaCost:2 UR UR
Types:Legendary Creature Goblin Sorcerer
PT:2/4
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDigUntil | TriggerDescription$ Vivid — At the beginning of your first main phase, reveal cards from the top of your library until you reveal X nonland cards, where X is the number of colors among permanents you control. For each of those colors, you may exile a card of that color from among the revealed cards. Then shuffle. You may cast the exiled cards this turn.
SVar:TrigDigUntil:DB$ DigUntil | Amount$ X | Valid$ Card.nonLand | ValidDescription$ nonland card | RevealedDestination$ Library | RememberRevealed$ True | SubAbility$ DBExileW
SVar:DBExileW:DB$ ChangeZone | ChooseFromDefined$ Remembered.White | Origin$ Library | Destination$ Exile | ConditionCheckSVar$ HaveW | Imprint$ True | LockInText$ True | ChangeNum$ 1 | SubAbility$ DBExileU
SVar:DBExileU:DB$ ChangeZone | ChooseFromDefined$ Remembered.Blue | Origin$ Library | Destination$ Exile | ConditionCheckSVar$ HaveU | Imprint$ True | LockInText$ True | ChangeNum$ 1 | SubAbility$ DBExileB
SVar:DBExileB:DB$ ChangeZone | ChooseFromDefined$ Remembered.Black | Origin$ Library | Destination$ Exile | ConditionCheckSVar$ HaveB | Imprint$ True | LockInText$ True | ChangeNum$ 1 | SubAbility$ DBExileR
SVar:DBExileR:DB$ ChangeZone | ChooseFromDefined$ Remembered.Red | Origin$ Library | Destination$ Exile | ConditionCheckSVar$ HaveR | Imprint$ True | LockInText$ True | ChangeNum$ 1 | SubAbility$ DBExileG
SVar:DBExileG:DB$ ChangeZone | ChooseFromDefined$ Remembered.Green | Origin$ Library | Destination$ Exile | ConditionCheckSVar$ HaveG | Imprint$ True | LockInText$ True | ChangeNum$ 1 | SubAbility$ DBShuffle
SVar:DBShuffle:DB$ Shuffle | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ Imprinted | StaticAbilities$ STPlay | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:STPlay:Mode$ Continuous | MayPlay$ True | Affected$ Card.nonLand+IsRemembered | AffectedZone$ Exile | Description$ You may cast the exiled cards this turn.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
SVar:X:Count$Valid Permanent.YouCtrl$Colors
SVar:HaveW:Count$Valid Permanent.White+YouCtrl
SVar:HaveU:Count$Valid Permanent.Blue+YouCtrl
SVar:HaveB:Count$Valid Permanent.Black+YouCtrl
SVar:HaveR:Count$Valid Permanent.Red+YouCtrl
SVar:HaveG:Count$Valid Permanent.Green+YouCtrl
Oracle:Vivid — At the beginning of your first main phase, reveal cards from the top of your library until you reveal X nonland cards, where X is the number of colors among permanents you control. For each of those colors, you may exile a card of that color from among the revealed cards. Then shuffle. You may cast the exiled cards this turn.
