# Drawstep engine · Conditions · `wasCast` > Was cast — CR 400.7, 603.4: the entering object, or the source outside an enters-trigger context, was actually cast, optionally by you; direct entries and uncast copies fail. 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/conditions#wasCast ## Where it goes A condition: `{ "kind": "wasCast", … }` — in an `if` effect, a trigger's `condition` (intervening if), a static's `condition` ("as long as"), an activated ability's `onlyIf`, a replacement's `unless`. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `by` | `"you"` | no | Whose action it is, or which kind of source | ## Minimal form ```json {"kind":"wasCast","by":"you"} ``` The engine reads that minimal form as: “you cast it”. ## Stock examples - **Cast Entry Watcher Study** — “” ```json {"kind":"wasCast","by":"you"} ``` - **Cast History Study** — “” ```json {"kind":"wasCast","by":"you"} ``` - **Alex Wilder, Runaway** — “Whenever Alex Wilder or another creature you control enters, if you cast it from anywhere other than your hand, it gets +2/+0 and gains haste until end of turn.” ```json {"kind":"wasCast","by":"you"} ``` ## Related - [Conditions](https://drawstep.xyz/wiki/mtg/conditions.md) — the whole topic - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive