# Drawstep engine · Effects · `shufflePermanentsAndReveal` > Shuffle permanents and reveal — Each player shuffles all permanents they own into their library and reveals that many cards. Matching cards enter together for each filter in order across all players. Owners put the rest on the bottom in their chosen order. Engine: Magic: The Gathering (`mtg`). This is one primitive of the Drawstep card vocabulary; field names and the discriminator are exact. Wiki page: https://drawstep.xyz/wiki/mtg/effects#shufflePermanentsAndReveal ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "shufflePermanentsAndReveal", … }`. Steps resolve in order. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `battlefieldGroups` | `ObjectFilter[]` | yes | An ObjectFilter (all set fields must match) | ## Minimal form ```json {"effect":"shufflePermanentsAndReveal","battlefieldGroups":[]} ``` The engine reads that minimal form as: “each player shuffles all permanents they own into their library, then reveals that many cards from the top of their library. , then puts the remaining revealed cards on the bottom of their library”. ## Related - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the whole topic - [Filters & targets](https://drawstep.xyz/wiki/mtg/targets.md) — how `target` / `filter` select objects and players (selection algebra) - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive