Name:Whispering Madness
ManaCost:2 U B
Types:Sorcery
K:Cipher
A:SP$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ MadnessDiscard | SubAbility$ MadnessDraw | SpellDescription$ Each player discards their hand, then draws cards equal to the greatest number of cards a player discarded this way.
SVar:MadnessDiscard:DB$ Discard | Defined$ Player.IsRemembered | Mode$ Hand | RememberDiscarded$ True | SubAbility$ MadnessSaveAmount
SVar:MadnessSaveAmount:DB$ StoreSVar | SVar$ MaxDiscard | Type$ CountSVar | Expression$ NumDiscard | ConditionCheckSVar$ NumDiscard | ConditionSVarCompare$ GTMaxDiscard | SubAbility$ MadnessCleanUp
SVar:MadnessCleanUp:DB$ Cleanup | ClearRemembered$ True
SVar:MadnessDraw:DB$ Draw | Defined$ Player | NumCards$ MaxDiscard | SubAbility$ MadnessReset
SVar:MadnessReset:DB$ StoreSVar | SVar$ MaxDiscard | Type$ Number | Expression$ 0
SVar:NumDiscard:Count$RememberedSize/Minus.1
SVar:MaxDiscard:Number$0
AI:RemoveDeck:All
AI:RemoveDeck:Random
DeckNeeds:Type$Creature
Oracle:Each player discards their hand, then draws cards equal to the greatest number of cards a player discarded this way.\nCipher (Then you may exile this spell card encoded on a creature you control. Whenever that creature deals combat damage to a player, its controller may cast a copy of the encoded card without paying its mana cost.)
