Child's Play

An interactive fiction by Stephen Granade (2007) - the Inform 7 source text

Chapter 1 - Beneath the Covers

Beneath the Covers is a room. "It is dark and stuffy and you are covered over, something is all draped over you, it is enough to make you crazy." The printed name is "Smothered in Darkness".

[Without this rule, if players type something like >TAKE while under the covers, the game will assume they mean the blanket and print "(the blanket)". By explicitly assuming that they mean the blanket, the announcement isn't printed, and instead handling falls through to the "Instead of doing something..." rule below. Tah-dah!]
Rule for supplying a missing noun while in Beneath the Covers: change the noun to the blanket.

Instead of doing something other than looking, examining, crying, breathing, breathing fast, breathing slow, sleeping, or waiting in Beneath the Covers, say "Everything you try just winds you tighter in the darkness, this sucks."

Instead of examining in Beneath the Covers, say "It is too dark."

Instead of going a direction in Beneath the Covers, say "You flail around but you are wound up in darkness, it is like there is no escape."

Instead of breathing slow in Beneath the Covers, say "You wish you could, it's not that easy, maybe it gets easier when you get older."

Instead of sleeping in Beneath the Covers, say "It is tempting but no, naps just waste time."

Instead of crying in Beneath the Covers:
    now the player is upset;
    say "Suddenly the darkness is gone, and it is so light, you are blinded for just a second. You blink and blink and then you can see the mom holding the blanket she was covering you with. 'Oh, kid, I'm so sorry, I thought you were having fun,' she says. 'We'll do something else.'

That'll teach her[note crying-in-darkness].[banner text][paragraph break]";

[The darkness "instead" rule is to override the "Instead of examining" rule above. The "in Beneath the Covers" clause is needed to make it more specific than the above rule.]
The blanket is scenery in Beneath the Covers. Understand "cover" or "covers" or "something" or "thing" or "man" as the blanket. The darkness is scenery in Beneath the Covers. Understand "dark" or "darkness" as the darkness. Instead of examining the darkness in Beneath the Covers, say "It is so dark you cannot even see the darkness, that is how dark it is."

The source code to Child's Play is licensed under a Creative Commons NonCommercial Sampling Plus 1.0 License.