Name:Pir's Whim
ManaCost:3 G
Types:Sorcery
A:SP$ AssignGroup | Cost$ 3 G | Defined$ Player | Choices$ DBSearch,DBSacrifice | AILogic$ FriendOrFoe | SpellDescription$ For each player, choose friend or foe. Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. Each foe sacrifices an artifact or enchantment they control.
SVar:DBSearch:DB$ChangeZone | Origin$ Library | Destination$ Battlefield | DefinedPlayer$ Remembered | ChangeType$ Land | ChangeNum$ 1 | StackDescription$ Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. | SpellDescription$ Friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library.
SVar:DBSacrifice:DB$Sacrifice | Defined$ Remembered | SacValid$ Artifact,Enchantment | SacMessage$ artifact or enchantment | StackDescription$ Each foe sacrifices an artifact or enchantment they control. | SpellDescription$ Foe sacrifices an artifact or enchantment they control.
SVar:NeedsToPlayVar:Z GE1
SVar:Z:SVar$Z1/Plus.C1
SVar:Z1:SVar$C2/Plus.C3
SVar:C1:Count$Valid Land.YourTeamCtrl+inZoneLibrary
SVar:C2:Count$Valid Enchantment.OppCtrl+inZoneBattlefield
SVar:C3:Count$Valid Artifact.OppCtrl+inZoneBattlefield
SVar:Picture:http://www.wizards.com/global/images/magic/general/pirs_whim.jpg
Oracle:For each player, choose friend or foe. Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. Each foe sacrifices an artifact or enchantment they control.
