eating and drinking
eat (eating): verbs eat/consume/devour X, plus
munch and nibble [on] X, gated on the edible trait
(not_edible). Liquids refuse is_drink ("You should drink that, not
eat it") and solids refuse drinking with not_drinkable; there is no
cross-routing. Food is implicitly taken first. A thing has one serving
unless its block says servings <n>. Multi-serving food counts
down (eaten_some, then eaten_all), and the last serving takes the
thing out of the world: it is gone from the inventory, the room, and
the parser's reach. The message honors the trait's data: taste
(delicious/tasty/bland/awful), a poison effect (message-only:
"It tastes strange…", no mechanical harm today), satisfiesHunger
(filling / still_hungry). Event: eaten.
drink (drinking): verbs drink/sip/quaff/swallow/ imbibe X, plus drink from X and sip from X. Two things are
drinkable. The first is an edible marked liquid: in a .story, the
drinkable adjective, which composes the edible trait with the liquid
flag set, order-independent with edible (ratchet G1). It follows the
rule for food: one serving unless its block says servings <n>, and
the last serving takes the drink out of the world. The second is a
container of liquid (containsLiquid, TypeScript territory), open
if openable. Container drinking decrements liquidAmount and reports
from_container / empty_now, and the container is never removed,
however empty. Verb flavor: sipped, quaffed. Event: drunk.
The author writes:
create the Pantry
a room
Stone shelves, cool air, the smell of apples.
create the bramley apple
aka apple
a thing, edible
in the Pantry
A knobbly green cooking apple.
create the elderflower cordial
aka cordial
a thing, drinkable
in the Pantry
Pale gold in a stoppered bottle.
create the ship's biscuit
aka biscuit
a thing, edible
servings 2
states: whole, gnawed
in the Pantry
Dense enough to drive nails.
phrase detail while the ship's biscuit is gnawed:
One corner is missing.
on the player eating
refuse when the ship's biscuit is gnawed: biscuit-enough
change the ship's biscuit to gnawed
end on
define phrase biscuit-enough
One corner was plenty.
end phrase
create Alex
a person
playable
starts in the Pantry
before the game starts
change the player to Alex
end before
The player sees:
> eat the cordial
You should drink the elderflower cordial, not eat it.
> drink the apple
That's not something you can drink.
> eat the apple
(first taking the bramley apple)
Taken.
You eat the bramley apple.
> eat the apple
You can't see any such thing.
> eat the biscuit
(first taking the ship's biscuit)
Taken.
You eat some of the ship's biscuit.
> eat the biscuit
One corner was plenty.
> examine the biscuit
Dense enough to drive nails. One corner is missing.
> inventory
You are carrying:
a ship's biscuit
> drink the cordial
You drink the elderflower cordial.
> sip the cordial
You can't see any such thing.
The transcript shows the cross-refusals, the implicit take, and the two
ways a meal can end. The apple is the default: one serving, so eating it
removes it, and the second eat the apple finds nothing to name. The
cordial goes the same way: one drink finishes it, and the sip that
follows finds nothing either. The
biscuit is a story that wants something else. servings 2 means the first
bite leaves it in hand, and its own on the player eating clause refuses
the second, so the last serving is never eaten and the biscuit stays for
the rest of the story, gnawed. Anything more elaborate is built the same
way: a servings count for how long the thing lasts, and a clause on the
thing for what each bite does.
One thing to plan for: once a thing has been eaten or drunk away it no longer exists, and a later rule that names it fails. Give a thing the story means to mention again a serving that is never taken, as the biscuit has.
eat (eating-*) | drink (drinking-*) | |
|---|---|---|
| Refusals | no_item · not_edible · is_drink · already_consumed | no_item · not_drinkable · already_consumed · container_closed |
| Success | eaten · eaten_some / eaten_all · taste flavor (delicious/tasty/bland/awful) · filling / still_hungry · poisonous | drunk · sipped / quaffed · from_container / empty_now |
| Events | eaten | drunk |
Interceptors: on the player eating / after the player eating and on the player drinking /
after the player drinking on the item, as above.
An emptied containsLiquid vessel stays nominally drinkable and keeps
saying empty_now (caveat, flagged). Neither shipped story exercises
eat/drink; the zoo's feeding is its own feedable trait.