Inform 7 Home Page / Documentation
§10.2. Liquids
Liquids are notoriously difficult to simulate well. A fully thorough approach consumes endless storage and can be very finicky to write and keep realistic. It is essential to decide what aspect of a liquid's behaviour is actually needed in a given story, and to simulate only that. For instance, if we only need a little chemistry, where a player can add (say) water to salt and make a solution, we do not want to fool around with calculating quantities or concentrations: what's important is that "some water" (amount unspecified) combines with "some salt" to produce "some salty water". We should no more calculate precisely here than we would work out where all the furniture is to the nearest inch. Good advice for handling liquids is to simulate the least amount of realism possible, but no less.
Sometimes all we want is a down-in-one drink: we needn't simulate the actual liquid, just the bottle it comes in, and all we need is to handle the "drinking" action. See Beverage Service, and also 3 AM, where carbonated drinks can be shaken - again simulating the vessel, not the liquid.
Some elementary biochemistry in Xylan is done simply by... well, the point is that two different liquids are represented by single things each, and a chemical reaction simply switches one for the other.
In Frizz, we allow any container to be filled with water (only) and we simulate what happens to any solid objects also inside: some waterproof, some not. Flotation provides a well (always full of water), with rules to determine whether things dropped into it should sink or float.
Next we move up to quantitative approaches, where we remember not just whether a liquid is present, but how much of it. In its simplest form, we could have a drinking vessel from which we draw in sips, so that it can be full, half-empty or empty: see Thirst.
The example with the best compromise between simulation quality and complexity is Lemonade. Here we provide a kind of container called a "fluid container", not just a single cup, and each such vessel has a given "fluid capacity". Each holds only a single liquid at a time (so no mixtures) and can be empty or full to any level (rounded off to the nearest 0.1 fl oz). We can fill one vessel from another (unless it would make a mixture). But liquids leaving these vessels must be consumed - drunk or poured away without trace: we cannot make pools on the floor, or carry liquids in our cupped hands. There is no object representing "lemonade": there are only fluid containers, but which can be called LEMONADE if that is what they now contain.
Savannah is a light elaboration of Lemonade, showing how liquids might be poured on other objects, as for instance to extinguish a fire.
Noisy Cricket extends Lemonade to allow for mixing, though then the number of different possible mixtures is so large that complexity increases greatly. Lakeside Living extends Lemonade differently to add a "liquid source" kind, a form of fluid container which has infinite fluid capacity and is scenery - ideal for a lake, river or spring.
See Bags, Bottles, Boxes and Safes for stoppered bottles which could also be used for carrying liquids around in
See Heat for keeping liquids warm in insulated containers
Start of Chapter 10: Physics: Substances, Ropes, Energy and Weight | |
Back to §10.1. Gases | |
Onward to §10.3. Dispensers and Supplies of Small Objects |
ExampleThirst |
The player carries a waterskin. The waterskin can be full, partly drained, or empty. The waterskin is full. Understand "water" as the waterskin.
Instead of drinking the waterskin when the waterskin is empty:
say "There is no water left."
Instead of drinking the waterskin: if the waterskin is partly drained, now the waterskin is empty; if the waterskin is full, now the waterskin is partly drained; say "You drink a long draught."
After printing the name of the waterskin: say " ([waterskin condition])"
Campsite is a room. "It is solid night now, and the stars have come out. Unfamiliar stars. On the other side of the valley -- a valley round-bottomed but shallow, like a soup bowl -- burn other campfires, most likely bandits. Their voices do not carry, but the smoke rises and obscures the starlight over that way."
A sleepsack is an enterable container in the Campsite. "Your sleepsack is laid out in a pocket of sandy soil and coarse grass."
The sandy soil, the stars, the distant campfires, and the coarse grass are scenery in the Campsite. Understand "smoke" as the campfires. Instead of listening in the presence of your campfire: say "All you hear are the reassuring snaps and cracks of the sticks in your fire." Understand "campfires" or "fires" as the distant campfires.
Your campfire is scenery in the Campsite. Instead of pushing, pulling, turning, tasting, or touching your campfire, say "You would burn yourself." Understand "fire" as your campfire. The description of your campfire is "A reassuring protection against wild animals and cold."
The description of the stars is "You invent constellations for them. The slingshot. The scroll. The heart (upside down)."
Instead of going nowhere when the player is in Campsite:
say "Now is not the time for wandering, alone in the dark. Better to keep here[if your campfire is visible], by the fire[end if]."
Singing is an action applying to nothing. Understand "sing" as singing.
Instead of singing:
say "You sing, deep and low, a song from home. It is a good night for singing and the song raises your spirits."
ExampleBeverage Service |
Some kinds of game objects -- food, for instance -- can only sensibly be used once, and should then be destroyed. The EAT command already implements this, but suppose we also had a category of drinkable potions:
A potion is a kind of thing. The sparkly blue potion is a potion carried by the player.
Instead of drinking a potion (called the drink):
now the drink is nowhere;
say "You quaff [the drink]. It goes down beautifully."
ExampleFlotation |
Here we want a rulebook to determine whether objects float or sink, so we create an object-based rulebook for the purpose. The more specific rules here, pertaining to corks and to inflated things, will be consulted first; then, as a default, the general flotation rule.
We also want a switch that can turn flotation off at will. The rule about the big switch will be observed before the others because the when... clause makes it more specific than the other rules in the flotation rulebook.
If we wanted, we could also put these rules into a rulebook in an explicit order, overriding Inform's automatic sorting by specificity.
Instead of examining the well:
say "[if something is in the well]On the surface of the water you can see [a list of things in the well][otherwise]There is nothing on the surface of the water, nor can you see into the depths[end if]."
The cork, the rubber ring and a lead ingot are in the Pumping House.
A big switch is a fixed in place device in the Pumping House. "A big switch labelled 'MAKE EVERYTHING SINK' is mounted on one wall[if switched on]. It crackles with electricity[otherwise]. It is currently switched off and silent[end if]."
A thing can be inflated or uninflated. A thing is usually uninflated. Before printing the name of an inflated thing: say "inflated ".
A flotation rule for the cork: rule succeeds.
A flotation rule for an inflated thing: rule succeeds.
A flotation rule when the big switch is switched on: rule fails.
After inserting something into the well:
follow the flotation rules for the noun;
if the rule succeeded:
say "[The noun] bobs on the surface.";
otherwise:
move the noun to the well bottom;
say "[The noun] sinks out of sight."
A thing can be sinking, rising, or static. A thing is usually static.
Definition: a thing is wet:
if it is in the well, yes;
if it is in the well bottom, yes;
no.
Every turn:
now every thing is static;
repeat with item running through wet things:
follow the flotation rules for the item;
if the rule failed and the item is in the well, now the item is sinking;
if the rule succeeded and the item is in the well bottom, now the item is rising;
now every rising thing is in the well;
now every sinking thing is in the well bottom;
if something is rising, say "[The list of rising things] rise[if the number of rising things is 1]s[end if] to the surface of the well.";
if something is sinking, say "[The list of sinking things] sink[if the number of sinking things is 1]s[end if] out of sight."
And finally a few description rules to make things look prettier:
Rule for writing a paragraph about the well when the well contains something:
say "The chief feature of the room is a concrete-sided well in which there float[if the number of things in the well is 1]s[end if] [a list of things in the well]."
Rule for writing a paragraph about the well:
say "The chief feature of the room is a concrete-sided well full of water."
As we recall from the chapter on activities, "writing a paragraph about..." is an activity; activities are themselves structured as sets of object-based rulebooks. The activity "writing a paragraph about" uses three object-based rulebooks (before writing..., for writing..., after writing...). We could have made a flotation activity as well, but in general it is overkill to make an activity to make success/failure decisions. For that purpose an object-based rulebook is sufficient.
Test me with "get all / put cork in well / put ring in well / put ingot in well / x well / get cork / get ring / switch switch on / put cork in well / put ring in well / x well / switch switch off / switch switch on".
ExampleXylan |
If we wanted to define a brand new verb that did affect a specific object, we might begin like this:
Understand "hydrolyze [something]" as hydrolyzing. Hydrolyzing is an action applying to one thing.
Carry out hydrolyzing:
say "[The noun] cannot be hydrolyzed."
Instead of hydrolyzing the xylan:
move the xylose to the holder of the xylan;
now the xylan is nowhere;
say "At once the xylan becomes xylose."
There is a xylose sample. The xylan sample is a thing in Plant Cell Wall. The description of the xylan is "A polysaccharide. Totally useless. If only you had some xylose, instead!" The description of the xylose is "Awesome!"
Of course, how our players will ever solve this problem is another question (especially if their biology and chemistry are both rusty). When adding entirely new commands to a game, it is often a good idea to provide as many ways of phrasing the command as possible; to drop hints about the correct phrasing within the game's text; or even to tell the player about the expanded command list in some documentation or help at the beginning of the game. So for instance we might also add
Understand "break down [something] with water" or "break [something] down with water" as hydrolyzing.
And these lines will also provide syntax for our new command, without interfering with the previous syntax. It's also good to anticipate alternative (British or American) spellings. People's typing habits are hard to overcome, even if they know you are spelling the word the other way. It is probably best not to annoy them unduly. So:
Then some text in-game might offer a clue, subtle or (since this is an example) blunt:
Instead of examining the player, say "You're a drop of water, which means that you can break down certain chemicals!"
Understand "break down [something]" or "break [something] down" as hydrolyzing.
And finally, we could try adding instructions explicitly:
Understand "help" or "hint" or "hints" or "instructions" or "info" or "about" as asking for help. Asking for help is an action out of world. Carry out asking for help: say "The following commands are understood, in addition to the standard ones: EVAPORATE, FREEZE, HYDROLYZE, SUBLIME..."
...though of course in fact these other commands won't be available until we define them, too.
This last approach, defining all the extra commands up front, is especially useful if these commands are very technical or unusual; if they are needed early in the game, before you've a chance to educate the player; or if they are not suggested by any in-game objects. A player who encounters a tool with an obvious use, such as a hairbrush, will likely think of trying to BRUSH things with it. It's harder to rely on his guessing actions that are both outside the range of usual commands and unrelated to any of the visible props, however.
ExampleFrizz |
Suppose we have some items that get wet in contact with other damp things; in particular, if we touch anything wet while wearing a pair of gloves, the gloves too get damp. This requires that we be systematic about detecting all cases where contact occurs. So:
A thing can be waterproof or porous. A container is usually waterproof. An animal is usually waterproof.
Before printing the name of a sodden thing: say "sodden ". Understand the sodden property as describing a thing.
The player wears a pair of woolly gloves. Instead of wearing a sodden thing: say "You dubiously contemplate [the noun], and decide it's best to wear dry clothing."
A liquid distribution rule:
repeat with item running through containers:
if the item is open and the item is empty and the item is in a waterfilled container:
now the item is waterfilled;
if the player can see the item, say "[The item] fills up with water, of course.".
A liquid distribution rule:
repeat with item running through things in a waterfilled container:
if the item is porous and the item is dry:
if the player can see the item, say "[The item] soaks through.";
now the item is sodden.
A liquid distribution rule:
repeat with item running through sodden things in the airing cupboard:
if the item is not The Last Man, now the item is dry.
The last liquid distribution rule:
if the player carries a dry copy of The Last Man, end the story finally.
Instead of examining a waterfilled container:
say "[The noun] is full of water[if the noun contains something visible]; it also contains [the list of things in the noun][end if]."
Instead of examining a container:
say "Dry inside[if the noun contains something visible], and containing [a list of things in the noun]."
A book is a kind of thing. Instead of examining a sodden book, say "[The noun] is too soaked to read, thanks to someone's carelessness." Understand "book" as a book.
The copy of The Last Man is a book. The description of The Last Man is "Mary Shelley's very own original copy, loaned to you under the strictest of agreements[if the pond encloses the copy]. How it came to be in its present position is a long story, and not important at the moment: the critical thing is not to blame oneself - who could have anticipated the cricket bat, anyway? - but to fix it immediately, before anything worse occurs[end if]." The The Last Man is in the ziploc bag. The ziploc bag is waterproof and empty. It is openable, transparent, and closed.
The Back Garden is a room. The Back Garden contains a pond. The pond is a waterfilled container. In the pond is the ziploc bag. A carp is in the pond. The carp is an animal. Instead of taking the carp, say "You're not fast enough."
Rule for writing a paragraph about the pond:
if the pond encloses the Last Man:
say "It is a beautiful day just at the end of spring and beginning of summer. The sun shines, the trees blossom, the world conspires in Edenic cheerfulness. You can take in none of it. Your eye is on [the Last Man].";
otherwise:
say "The pond[if something is in the pond] (containing [the list of things in the pond])[end if] remains a figure of menace in an otherwise lushly verdant landscape."
Before printing the name of the Last Man when the Last Man is enclosed by the Pond: if the Last Man is dry, say "delicate, valuable ".
After printing the name of something (called the target) while writing a paragraph about something:
if the Last Man is enclosed by the Pond:
if the target is in something (called the parent), say " - which is in [the parent]".
The Kitchen is west of the Back Garden. "Not in any sense your province: Mrs Peaswell gets agitated if anyone besides herself so much as boils a kettle. In general it is best to sneak through, disturbing as little as possible and preserving the cosy domestic fiction that academics cannot cook.
The Stairwell is above the Kitchen. "Halfway up and halfway down." The airing cupboard is a container in the Stairwell. "An airing cupboard here contains the heating system, and is the ideal place for restoring wet items to a dry state." The airing cupboard is fixed in place.
Now: whenever the player definitely touches something, we want to follow certain rules about the transfer of liquid. These rules need to come after an action's check rules (to make sure the action really occurs) and before the carry out rules (so that nothing has moved or changed yet). So we'll borrow from the chapter on rulebooks to create a whole new stage to the action, occurring between the check and the carry out phases:
This is the post-check stage rule:
abide by the post-check rules.
The post-check stage rule is listed before the carry out stage rule in the specific action-processing rules.
A post-check rule (this is the dry glove rule):
if we get wet:
if the player wears the gloves and the gloves are dry:
now the gloves are sodden;
say "(soaking your gloves in the process)";
continue the action.
A post-check rule (this is the wet glove rule):
if the player wears the sodden gloves:
if the The Last Man must be touched and the Last Man is not sodden:
say "(soaking the parched pages of The Last Man with the rude touch of your sodden gloves)";
now the The Last Man is sodden;
continue the action.
Before doing something when the player does not wear the gloves:
if The Last Man must be touched:
if The Last Man is dry, say "[The The Last Man] is too precious to endanger when you are not wearing gloves." instead;
otherwise say "You hesitate instinctively, then recollect that you can hardly harm [The The Last Man] any more than it has already been harmed...".
To decide whether we get wet:
if the noun is not a thing, no;
if the noun dampens us, yes;
if the second noun is not a thing, no;
if the second noun dampens us, yes;
no.
To decide whether (item - a thing) dampens us:
if the item is not liquiferous, no;
if item must be touched, yes;
no.
To decide whether (item - a thing) must be touched:
if the item is the noun and the action requires a touchable noun, yes;
if the item is the second noun and the action requires a touchable second noun, yes;
no.
Definition: a thing is liquiferous:
if it is sodden, yes;
if it is in a waterfilled container, yes;
no.
Test me with "x book / x bag / get bag / take off gloves / w / u / put gloves in cupboard / z / open bag / touch book / push book / turn book / get gloves / wear gloves / get book".
Example3 AM |
Carry out shaking:
say "Nothing results of your shaking [the noun]."
Instead of shaking a closed container when something is in the noun:
say "Something rattles inside [the noun]."
Instead of shaking a closed transparent container when something is in the noun:
say "Inside [the noun] there are banging noises produced by [the list of things contained by the noun]."
Instead of shaking an open container which contains something:
say "[The list of things contained by the noun] might fly out."
The Wawa is a room. "A convenience store, if you like to call it that, vending the usual assortment of chips, donuts, soda, and beer. There is something of a line at the sandwich counter."
The box of enrobed cakes is in the Wawa. "A box of Tastykake Enrobed Cakes has fallen off its shelf." The description is "'Enrobed Cakes' is a fancy term for 'strange sponge-like baked good, covered in a thin shell of waxy chocolate'. They are addictive, but not in a way that lets you respect yourself in the morning." The box is a closed openable container. In the box is a cake.
Instead of opening the box, say "The Wawa clerks frown on the consumption of unpurchased foodstuffs."
The can of root beer is a closed openable container carried by the player. The can of root beer is either agitated or calm.
Because the can of root beer should have some reactions to having been shaken later in the game, we need to borrow a few ideas from the chapter on Time:
Instead of shaking the can of root beer:
the can calms down in five turns from now;
say "You give the can a good hard shake.";
now the can is agitated.
Instead of listening to the can: say "It sounds [if agitated]fizzy[otherwise]calm[end if]!"
The sticky mess is fixed in place. "There is a sticky mess on the ground."
Instead of opening the agitated can of root beer:
now the can of root beer is nowhere;
now the sticky mess is in the location;
say "You open the can and fizzing sweet soda goes absolutely everywhere."
Instead of opening the calm can of root beer when the can has been agitated:
now the can of root beer is nowhere;
say "The root beer is disappointingly flat. That's what you get for shaking it up!"
Test me with "get box / shake box / open box / shake box / listen to can / shake can / listen to can / wait / wait / wait / wait / wait / listen to can / open can".
ExampleLemonade |
Liquids, and all substances that can be mixed or broken off in partial amounts, pose a challenge to model in interactive fiction. The following example is a simple one, but adequate for many scenarios.
We start by assuming that all liquids in the game will always appear in containers. The player can pour liquids from one container to another, and the containers keep track of how full they are and describe themselves appropriately. The player can also refer to containers by content.
Mixture, however, is not allowed, nor is it possible to put liquids on other objects, pour them out on the ground, etc. These ideas would require a more complicated set-up.
A volume is a kind of value. 15.9 fl oz specifies a volume with parts ounces and tenths (optional, preamble optional).
A fluid container is a kind of container. A fluid container has a volume called a fluid capacity. A fluid container has a volume called current volume.
The fluid capacity of a fluid container is usually 12.0 fl oz. The current volume of a fluid container is usually 0.0 fl oz.
Liquid is a kind of value. The liquids are water, milk, lemonade, and iced tea. A fluid container has a liquid.
Instead of examining a fluid container:
if the noun is empty,
say "You catch just a hint of [the liquid of the noun] at the bottom.";
otherwise
say "[The noun] contains [current volume of the noun in rough terms] of [liquid of the noun]."
To say (amount - a volume) in rough terms:
if the amount is less than 0.5 fl oz:
say "a swallow or two";
otherwise if tenths part of amount is greater than 3 and tenths part of amount is less than 7:
let estimate be ounces part of amount;
say "[estimate in words] or [estimate plus 1 in words] fluid ounces";
otherwise:
if tenths part of amount is greater than 6, increase amount by 1.0 fl oz;
say "about [ounces part of amount in words] fluid ounce[s]".
Before printing the name of a fluid container (called the target) while not drinking:
if the target is empty:
say "empty ";
otherwise:
do nothing.
After printing the name of a fluid container (called the target) while not examining:
unless the target is empty:
say " of [liquid of the target]";
omit contents in listing.
Instead of inserting something into a fluid container:
say "[The second noun] has too narrow a mouth to accept anything but liquids."
Definition: a fluid container is empty if the current volume of it is 0.0 fl oz. Definition: a fluid container is full if the current volume of it is the fluid capacity of it.
Instead of drinking a fluid container:
if the noun is empty:
say "There is no more [liquid of the noun] within." instead;
otherwise:
decrease the current volume of the noun by 0.2 fl oz;
if the current volume of the noun is less than 0.0 fl oz, now the current volume of the noun is 0.0 fl oz;
say "You take a sip of [the liquid of the noun][if the noun is empty], leaving [the noun] empty[end if]."
We have allowed all liquids to be drunk, but it would be possible also to add checking, if we had a game where some liquids were beverages and others were, say, motor oil.
Understand "pour [fluid container] in/into/on/onto [fluid container]" as pouring it into. Understand "empty [fluid container] into [fluid container]" as pouring it into. Understand "fill [fluid container] with/from [fluid container]" as pouring it into (with nouns reversed).
Understand "pour [something] in/into/on/onto [something]" as pouring it into. Understand "empty [something] into [something]" as pouring it into. Understand "fill [something] with/from [something]" as pouring it into (with nouns reversed).
Check pouring it into:
if the noun is not a fluid container, say "You can't pour [the noun]." instead;
if the second noun is not a fluid container, say "You can't pour liquids into [the second noun]." instead;
if the noun is the second noun, say "You can hardly pour [the noun] into itself." instead;
if the liquid of the noun is not the liquid of the second noun:
if the second noun is empty, now the liquid of the second noun is the liquid of the noun;
otherwise say "Mixing [the liquid of the noun] with [the liquid of the second noun] would give unsavory results." instead;
if the noun is empty, say "No more [liquid of the noun] remains in [the noun]." instead;
if the second noun is full, say "[The second noun] cannot contain any more than it already holds." instead.
Carry out pouring it into:
let available capacity be the fluid capacity of the second noun minus the current volume of the second noun;
if the available capacity is greater than the current volume of the noun, now the available capacity is the current volume of the noun;
increase the current volume of the second noun by available capacity;
decrease the current volume of the noun by available capacity.
Report pouring it into:
say "[if the noun is empty][The noun] is now empty;[otherwise][The noun] now contains [current volume of the noun in rough terms] of [liquid of the noun]; [end if]";
say "[the second noun] contains [current volume of the second noun in rough terms] of [liquid of the second noun][if the second noun is full], and is now full[end if]."
This is probably a drier description than we would actually want in our story, but it does allow us to see that the mechanics of the system are working, so we'll stick with this for the example.
Now we need a trick from a later chapter, which allows something to be described in terms of a property it has. This way, the story will understand not only "pitcher" and "glass" but also "pitcher of lemonade" and "glass of milk" -- and, indeed, "glass of lemonade", if we empty the glass and refill it with another substance:
Understand the liquid property as describing a fluid container. Understand "of" as a fluid container.
And now the scenario itself:
The Porch is a room. The porch swing is an enterable supporter in the Porch. "An inviting swing hangs here at the end of the porch, allowing you to enjoy the summer with a cool beverage, and watch your neighbor Ted mowing his lawn with the very last manual powerless lawnmower on the block."
The glass is a fluid container carried by the player. The liquid of the glass is milk. The current volume of the glass is 0.8 fl oz.
The pitcher is a fluid container in the Porch. The fluid capacity of the pitcher is 32.0 fl oz. The current volume of the pitcher is 20.0 fl oz. The liquid of the pitcher is lemonade.
Ted's Lawn is outside from the Porch. Ted is a man in Ted's Lawn. "Ted has taken off his shirt, but still seems a bit oppressed by the sun." The description of Ted is "He looks hot. In all senses."
Instead of doing something to Ted when the player is in the Porch: say "You can't really interact with Ted from this distance, except in the sense of eyeing him surreptitiously."
Instead of giving an empty fluid container to Ted: say "Yes, taunt the poor man, why don't you?"
Instead of giving a fluid container to Ted when the liquid of the noun is milk: say "Ted looks ruefully at the milk. 'Thanks, but I'm lactose-intolerant,' he says."
The block giving rule is not listed in the check giving it to rules.
Every turn:
if Ted is in the location:
if Ted carries a fluid container (called refreshment):
try Ted drinking the refreshment;
otherwise if a random chance of 1 in 3 succeeds:
say "Ted pushes the ineffective mower over some dandelions."
Instead of someone drinking a fluid container:
if the noun is empty:
try the person asked giving the noun to the player;
otherwise:
decrease the current volume of the noun by 2.0 fl oz;
if the current volume of the noun is less than 0.0 fl oz, now the current volume of the noun is 0.0 fl oz;
say "[The person asked] gulps down some [liquid of the noun]."
After someone giving something to the player:
say "'Here,' says [the person asked], handing [the noun] back to you. 'Thanks, I owe you one.'";
end the story finally.
Test me with "x milk / x lemonade / drink lemonade / drink milk / pour lemonade into glass / drink milk / x milk / drink milk / g / i / fill glass with lemonade / drink lemonade / drop glass / drink lemonade / pitcher".
Test Ted with "out / give milk to ted / drink milk / g / g / g / give glass to ted / in / fill glass with lemonade / out / give lemonade to ted / wait / z / z / z ".
ExampleSavannah |
Here we build very slightly on the existing liquid implementation to add a puzzle where the player puts out a fire with a bucket of water. Most of the liquid implementation remains the same as before, but now we understand the names of containers according to the liquids they contain.
The new material, pertaining to extinguishing fires, is at the bottom in section 2.
A volume is a kind of value. 15.9 fl oz specifies a volume with parts ounces and tenths (optional, preamble optional).
A fluid container is a kind of container. A fluid container has a volume called a fluid capacity. A fluid container has a volume called current volume.
The fluid capacity of a fluid container is usually 12.0 fl oz. The current volume of a fluid container is usually 0.0 fl oz.
Instead of examining a fluid container:
if the noun is empty,
say "You catch just a hint of [the liquid of the noun] at the bottom.";
otherwise
say "[The noun] contains [current volume of the noun in rough terms] of [liquid of the noun]."
To say (amount - a volume) in rough terms:
if the amount is less than 0.5 fl oz:
say "a swallow or two";
otherwise if tenths part of amount is greater than 3 and tenths part of amount is less than 7:
let estimate be ounces part of amount;
say "[estimate in words] or [estimate plus 1 in words] fluid ounces";
otherwise:
if tenths part of amount is greater than 6, increase amount by 1.0 fl oz;
say "about [ounces part of amount in words] fluid ounce[s]".
Before printing the name of a fluid container (called the target) while not drinking:
if the target is empty:
say "empty ";
otherwise:
do nothing.
After printing the name of a fluid container (called the target) while not examining:
unless the target is empty:
say " of [liquid of the target]";
omit contents in listing.
Instead of inserting something into a fluid container:
say "[The second noun] has too narrow a mouth to accept anything but liquids."
Definition: a fluid container is empty if the current volume of it is 0.0 fl oz. Definition: a fluid container is full if the current volume of it is the fluid capacity of it.
Instead of drinking a fluid container:
if the noun is empty:
say "There is no more [liquid of the noun] within." instead;
otherwise:
decrease the current volume of the noun by 0.2 fl oz;
if the current volume of the noun is less than 0.0 fl oz, now the current volume of the noun is 0.0 fl oz;
say "You take a sip of [the liquid of the noun][if the noun is empty], leaving [the noun] empty[end if]."
Understand "pour [fluid container] in/into/on/onto [fluid container]" as pouring it into. Understand "empty [fluid container] into [fluid container]" as pouring it into. Understand "fill [fluid container] with/from [fluid container]" as pouring it into (with nouns reversed).
Understand "pour [something] in/into/on/onto [something]" as pouring it into. Understand "empty [something] into [something]" as pouring it into. Understand "fill [something] with/from [something]" as pouring it into (with nouns reversed).
Check pouring it into:
if the noun is not a fluid container, say "You can't pour [the noun]." instead;
if the second noun is not a fluid container, say "You can't pour liquids into [the second noun]." instead;
if the noun is the second noun, say "You can hardly pour [the noun] into itself." instead;
if the liquid of the noun is not the liquid of the second noun:
if the second noun is empty, now the liquid of the second noun is the liquid of the noun;
otherwise say "Mixing [the liquid of the noun] with [the liquid of the second noun] would give unsavory results." instead;
if the noun is empty, say "No more [liquid of the noun] remains in [the noun]." instead;
if the second noun is full, say "[The second noun] cannot contain any more than it already holds." instead.
Carry out pouring it into:
let available capacity be the fluid capacity of the second noun minus the current volume of the second noun;
if the available capacity is greater than the current volume of the noun, now the available capacity is the current volume of the noun;
increase the current volume of the second noun by available capacity;
decrease the current volume of the noun by available capacity.
Report pouring it into:
say "[if the noun is empty][The noun] is now empty;[otherwise][The noun] now contains [current volume of the noun in rough terms] of [liquid of the noun]; [end if]";
say "[the second noun] contains [current volume of the second noun in rough terms] of [liquid of the second noun][if the second noun is full], and is now full[end if]."
Understand the liquid property as describing a fluid container. Understand "of" as a fluid container.
The Beach is a room. "The Atlantic stretches east to the horizon, though it is at low tide at the moment. It is dawn: time to pack up and go home."
We will skip implementing the Pacific ocean itself, though the example Lakeside Living shows how to incorporate large bodies of water into our liquid simulation.
The liquids are seawater. [We could include others, but for the moment...]
Instead of drinking a fluid container when the liquid of the noun is seawater:
say "Blech!"
The bucket is a fluid container carried by the player. The liquid of the bucket is seawater. The current volume of the bucket is 64.0 fl oz.
The fire is a fixed in place thing in the beach. "A low fire crackles here, left over from an attempt at s'mores much earlier in the evening."
Instead of touching or rubbing or taking the fire, say "You're not such a glutton for punishment."
Instead of pouring something into the fire:
now the fire is nowhere;
now the current volume of the noun is 0.0 fl oz;
say "[The second noun] goes out in a great hiss."
Test me with "drink seawater / pour seawater on fire / x bucket / i".
This is still a specific implementation: if we wanted to weave liquids together with a full-scale burning model (as in "In Fire or in Flood"), where pretty much any object in the game can be flaming (currently on fire) or damp (extinguished), we might generalize our rule to
Instead of pouring something into a flaming thing:
now the second noun is damp;
now the current volume of the noun is 0.0 fl oz;
say "[The second noun] goes out in a great hiss."
Of course, the merging of fire and liquids also raises the possibility of gasoline and explosives, of heating and boiling liquids, etc.: as always, it's wise to incorporate a simulation that is only as detailed as the game's interactions really justify.
ExampleNoisy Cricket |
Our previous experiments into liquid have not dealt with the possibility of mixing components, but that is because for most games, tracking the details of mixture is overkill.
But let's suppose that this time we do want to have mixed liquids; moreover, we want a way to describe the mixtures to the player inventively, so that if he hits specific combinations those combinations are recognized: calling the result a martini, say, rather than just "a mixture of vodka and vermouth".
The implementation that follows relies on a fairly simple idea from linear algebra. Any given liquid can be expressed as a vector in N-space, where N is the number of available ingredients and the length of the vector depends on how much of each ingredient is used; then we find the recipe that best describes the liquid by taking the dot product of our liquid vector with a bunch of sample vectors and selecting the one with the largest result.
If this does not make sense, don't worry: it's not necessary to understand the idea to use the code.
Any implementation involving a large number of place values is always a bit challenging in integer arithmetic. This examples assumes that no bodies of liquid will ever be very large, and that the proportions of ingredients in a mixture will not be vastly askew. (No 20-parts-to-1 proportions, for instance.) This probably works reasonably well for the cocktails that we make the basis of the example.
A volume is a kind of value. 15.9 fl oz specifies a volume with parts ounces and tenths (optional, preamble optional).
A fluid container is a kind of container. A fluid container has a volume called a fluid capacity. A fluid container has a volume called creme de menthe volume. A fluid container has a volume called vodka volume. A fluid container has a volume called cacao volume.
The fluid capacity of a fluid container is usually 12.0 fl oz. The creme de menthe volume of a fluid container is usually 0.0 fl oz. The vodka volume of a fluid container is usually 0.0 fl oz. The cacao volume of fluid container is usually 0.0 fl oz.
To decide what volume is the current volume of (item - a fluid container):
let total be the creme de menthe volume of the item;
increase total by the vodka volume of the item;
increase total by the cacao volume of the item;
decide on total.
Instead of examining a fluid container:
if the noun is empty,
say "You catch just a hint of [the nominal descriptor of the noun] at the bottom.";
otherwise
say "[The noun] contains [current volume of the noun in rough terms] of [adjectival descriptor of the noun] [nominal descriptor of the noun]."
Adjectival descriptor is a kind of value. The adjectival descriptors are strong, chocolatey, minty, perfect, and pure.
Nominal descriptor is a kind of value. The Nominal descriptors are creme de menthe, vodka, creme de cacao, grasshopper, chocolate vodka, mint vodka, chocolate martini, mintini, chocolate mint martini.
Our table of mixtures is expressed in parts: so if a recipe contains one part X and two parts Y, we would put "1" in the first column and "2" in the second column.
rating |
creme de menthe comp |
vodka comp |
cacao comp |
adjectival descriptor |
nominal descriptor |
0.0 fl oz |
1 |
0 |
0 |
minty |
creme de menthe |
0.0 fl oz |
0 |
1 |
0 |
chocolatey |
vodka |
0.0 fl oz |
0 |
0 |
1 |
chocolatey |
creme de cacao |
0.0 fl oz |
1 |
2 |
0 |
chocolatey |
mintini |
0.0 fl oz |
1 |
0 |
1 |
chocolatey |
grasshopper |
0.0 fl oz |
0 |
2 |
1 |
chocolatey |
chocolate martini |
0.0 fl oz |
0 |
3 |
1 |
chocolatey |
chocolate vodka |
0.0 fl oz |
1 |
3 |
0 |
chocolatey |
mint vodka |
0.0 fl oz |
1 |
2 |
1 |
chocolatey |
chocolate mint martini |
A fluid container has an adjectival descriptor. A fluid container has a nominal descriptor. Understand the adjectival descriptor property as describing a fluid container. Understand the nominal descriptor property as describing a fluid container.
To decide what number is (quantity - a number) squared:
decide on quantity times quantity.
To score mixtures in (item - a fluid container):
repeat through Table of Mixtures:
let total line parts be creme de menthe comp entry squared;
let total line parts be total line parts plus vodka comp entry squared;
let total line parts be total line parts plus cacao comp entry squared;
let creme de menthe score be creme de menthe comp entry times the creme de menthe volume of item;
let vodka score be vodka comp entry times the vodka volume of item;
let cacao score be cacao comp entry times the cacao volume of item;
let total score be creme de menthe score plus vodka score;
let total score be total score plus cacao score;
let total score be total score times calibration for total line parts;
now rating entry is total score;
if total line parts is 1, now adjectival descriptor entry is pure;
otherwise now adjectival descriptor entry is perfect;
[and for creme de menthe...]
now creme de menthe comp entry is creme de menthe comp entry plus 1;
let total line parts be creme de menthe comp entry squared plus vodka comp entry squared;
let total line parts be total line parts plus cacao comp entry squared;
let creme de menthe score be creme de menthe comp entry times the creme de menthe volume of item;
let vodka score be vodka comp entry times the vodka volume of item;
let cacao score be cacao comp entry times the cacao volume of item;
let total score be creme de menthe score plus vodka score;
let total score be total score plus cacao score;
let total score be total score times calibration for total line parts;
if total score is greater than rating entry, now adjectival descriptor entry is minty;
now creme de menthe comp entry is creme de menthe comp entry minus 1;
[and for vodka...]
now vodka comp entry is vodka comp entry plus 1;
let total line parts be creme de menthe comp entry squared plus vodka comp entry squared;
let total line parts be total line parts plus cacao comp entry squared;
let creme de menthe score be creme de menthe comp entry times the creme de menthe volume of item;
let vodka score be vodka comp entry times the vodka volume of item;
let cacao score be cacao comp entry times the cacao volume of item;
let total score be creme de menthe score plus vodka score;
let total score be total score plus cacao score;
let total score be total score times calibration for total line parts;
if total score is greater than rating entry, now adjectival descriptor entry is strong;
now vodka comp entry is vodka comp entry minus 1;
[and for cacao...]
now cacao comp entry is cacao comp entry plus 1;
let total line parts be creme de menthe comp entry squared plus vodka comp entry squared;
let total line parts be total line parts plus cacao comp entry squared;
let creme de menthe score be creme de menthe comp entry times the creme de menthe volume of item;
let vodka score be vodka comp entry times the vodka volume of item;
let cacao score be cacao comp entry times the cacao volume of item;
let total score be creme de menthe score plus vodka score;
let total score be total score plus cacao score;
let total score be total score times calibration for total line parts;
if total score is greater than rating entry, now adjectival descriptor entry is chocolatey;
now cacao comp entry is cacao comp entry minus 1.
To identify mixture in (item - a fluid container):
score mixtures in item;
sort Table of Mixtures in reverse rating order;
choose row 1 in Table of Mixtures;
now nominal descriptor of the item is nominal descriptor entry;
let sample vodka be vodka comp entry; [Now keep track of all these]
let sample creme de menthe be creme de menthe comp entry;
let sample cacao be cacao comp entry;
if rating entry divided by 100 is the current volume of the item:
now adjectival descriptor of the item is pure;
otherwise:
now adjectival descriptor of the item is adjectival descriptor entry.
To decide what number is the raw quantity of (item volume - a volume):
let raw be item volume divided by 0.5 fl oz;
decide on raw.
To decide what number is calibration for (total - a number):
if total is an initial listed in the table of Multipliers, decide on result entry;
decide on 21.
Here we cheat on our arithmetic. The following chart just provides values corresponding roughly to 1/(sqrt (x)), but since Inform does not deal very gracefully with square roots or fractions, we will calculate this elsewhere and just supply the answers in the code:
initial |
result |
1 |
100 |
2 |
71 |
3 |
57 |
4 |
50 |
5 |
44 |
6 |
41 |
7 |
38 |
8 |
35 |
9 |
33 |
10 |
31 |
11 |
30 |
12 |
29 |
13 |
28 |
14 |
27 |
15 |
26 |
16 |
25 |
17 |
24 |
18 |
24 |
19 |
23 |
20 |
22 |
When play begins:
repeat with item running through fluid containers:
identify mixture in item.
To say (amount - a volume) in rough terms:
if the amount is less than 0.6 fl oz:
say "half an ounce or less";
otherwise if tenths part of amount is greater than 3 and tenths part of amount is less than 7:
let estimate be ounces part of amount;
say "[estimate in words] or [estimate plus 1 in words] fluid ounces";
otherwise:
if tenths part of amount is greater than 6, increase amount by 1.0 fl oz;
say "about [ounces part of amount in words] fluid ounce[s]".
Before printing the name of a fluid container (called the target) while not drinking or pouring:
if the target is empty:
say "empty ";
otherwise:
do nothing.
After printing the name of a fluid container (called the target) while not examining or pouring:
unless the target is empty:
say " of [adjectival descriptor of the target] [nominal descriptor of the target]";
omit contents in listing.
Instead of inserting something into a fluid container:
say "[The second noun] has too narrow a mouth to accept anything but liquids."
Definition: a fluid container is empty if the current volume of it is 0.0 fl oz. Definition: a fluid container is full if the current volume of it is the fluid capacity of it.
Instead of drinking a fluid container:
if the noun is empty:
say "There is no more [nominal descriptor of the noun] within." instead;
otherwise:
let cacao loss be the consumed cacao of the noun out of sip volume;
let creme de menthe loss be the consumed creme de menthe of the noun out of sip volume;
let vodka loss be the consumed vodka of the noun out of sip volume;
decrease the cacao volume of the noun by the cacao loss;
decrease the creme de menthe volume of the noun by creme de menthe loss;
decrease the vodka volume of the noun by vodka loss;
say "You take a sip of [the nominal descriptor of the noun][if the noun is empty], leaving [the noun] empty[end if].".
Sip volume is a volume that varies. Sip volume is 0.5 fl oz.
To decide what volume is the consumed cacao of (item - a fluid container) out of (total consumption - a volume):
let new volume be the cacao volume of the item times 100;
let percentage be the new volume divided by the current volume of the item;
let consumed volume be the percentage times total consumption;
let consumed volume be consumed volume divided by 100;
if consumed volume is greater than the cacao volume of the item, decide on the cacao volume of the item;
decide on consumed volume.
To decide what volume is the consumed creme de menthe of (item - a fluid container) out of (total consumption - a volume):
let new volume be the creme de menthe volume of the item times 100;
let percentage be the new volume divided by the current volume of the item;
let consumed volume be the percentage times total consumption;
let consumed volume be consumed volume divided by 100;
if consumed volume is greater than the creme de menthe volume of the item, decide on the creme de menthe volume of the item;
decide on consumed volume.
To decide what volume is the consumed vodka of (item - a fluid container) out of (total consumption - a volume):
let new volume be the vodka volume of the item times 100;
let percentage be the new volume divided by the current volume of the item;
let consumed volume be the percentage times total consumption;
let consumed volume be consumed volume divided by 100;
if consumed volume is greater than the vodka volume of the item, decide on the vodka volume of the item;
decide on consumed volume.
Understand "fill [something] with/from [something]" as filling it with.
Filling it with is an action applying to two things. Carry out filling it with: try pouring the second noun into the noun instead.
Understand "pour [fluid container] in/into/on/onto [fluid container]" as pouring it into. Understand "empty [fluid container] into [fluid container]" as pouring it into.
Understand "pour [something] in/into/on/onto [something]" as pouring it into. Understand "empty [something] into [something]" as pouring it into.
Check pouring it into:
if the noun is not a fluid container, say "You can't pour [the noun]." instead;
if the second noun is not a fluid container, say "You can't pour liquids into [the second noun]." instead;
if the noun is the second noun, say "You can hardly pour [the noun] into itself." instead;
if the noun is empty, say "No more [nominal descriptor of the noun] remains in [the noun]." instead;
if the second noun is full, say "[The second noun] cannot contain any more than it already holds." instead.
Carry out pouring it into:
let available capacity be the fluid capacity of the second noun minus the current volume of the second noun;
if the available capacity is greater than the current volume of the noun, now the available capacity is the current volume of the noun;
let cacao loss be the consumed cacao of the noun out of available capacity;
let creme de menthe loss be the consumed creme de menthe of the noun out of available capacity;
let vodka loss be the consumed vodka of the noun out of available capacity;
decrease the cacao volume of the noun by the cacao loss;
decrease the creme de menthe volume of the noun by creme de menthe loss;
decrease the vodka volume of the noun by vodka loss;
increase the cacao volume of the second noun by the cacao loss;
increase the creme de menthe volume of the second noun by creme de menthe loss;
increase the vodka volume of the second noun by vodka loss.
Report pouring it into:
identify mixture in noun;
identify mixture in second noun;
say "[if the noun is empty][The noun] is now empty; [otherwise][The noun] now contains [current volume of the noun in rough terms] of [nominal descriptor of the noun]; [end if]";
say "[the second noun] contains [current volume of the second noun in rough terms] of [adjectival descriptor of the second noun] [nominal descriptor of the second noun][if the second noun is full], and is now full[end if]."
When play begins: say "When you decided to try Mixology WS102 (*cross-listed with Women's Studies), you envisioned yourself writing essays about gender discrimination during the Prohibition, say, or reading essays on male vs. female metabolism of alcohol. But no: MxWS102 turns out to be about... mixing the perfect chocolate mint martini."
The College of Mixology is a room. The bar is a supporter in the college.
The cocktail glass is a fluid container carried by the player. The fluid capacity of the cocktail glass is 4.0 fl oz.
The flask is a fluid container carried by the player. The vodka volume of the flask is 4.0 fl oz.
The jigger is a fluid container carried by the player. The fluid capacity of the jigger is 1.0 fl oz.
The small measure is a fluid container carried by the player. The fluid capacity of the small measure is 0.5 fl oz.
The decanter is a fluid container on the bar. The fluid capacity of the decanter is 32.0 fl oz. The creme de menthe volume of the decanter is 20.0 fl oz.
The bottle is a fluid container carried by the player. The cacao volume of the bottle is 10.0 fl oz.
Test me with "i / pour flask in jigger / pour jigger in glass / pour bottle in jigger / pour jigger in glass / pour bottle in jigger / pour jigger in glass / pour decanter in jigger / pour jigger in glass / drink glass / g / g / x glass / pour flask in glass".
ExampleLakeside Living |
Much of what follows is identical to "Lemonade" earlier; the new material begins at Part 2.
A volume is a kind of value. 15.9 fl oz specifies a volume with parts ounces and tenths (optional, preamble optional).
A fluid container is a kind of container. A fluid container has a volume called a fluid capacity. A fluid container has a volume called current volume.
The fluid capacity of a fluid container is usually 12.0 fl oz. The current volume of a fluid container is usually 0.0 fl oz.
Liquid is a kind of value. The liquids are water, absinthe, and iced tea. A fluid container has a liquid.
Instead of examining a fluid container:
if the noun is empty,
say "You catch just a hint of [the liquid of the noun] at the bottom.";
otherwise
say "[The noun] contains [current volume of the noun in rough terms] of [liquid of the noun]."
To say (amount - a volume) in rough terms:
if the amount is less than 0.5 fl oz:
say "a swallow or two";
otherwise if tenths part of amount is greater than 3 and tenths part of amount is less than 7:
let estimate be ounces part of amount;
say "[estimate in words] or [estimate plus 1 in words] fluid ounces";
otherwise:
if tenths part of amount is greater than 6, increase amount by 1.0 fl oz;
say "about [ounces part of amount in words] fluid ounce[s]".
Before printing the name of a fluid container (called the target) while not drinking or pouring:
if the target is empty:
say "empty ";
otherwise:
do nothing.
After printing the name of a fluid container (called the target) while not examining or pouring:
unless the target is empty:
say " of [liquid of the target]";
omit contents in listing.
Instead of inserting something into a fluid container:
say "[The second noun] has too narrow a mouth to accept anything but liquids."
Definition: a fluid container is empty if the current volume of it is 0.0 fl oz. Definition: a fluid container is full if the current volume of it is the fluid capacity of it.
Instead of drinking a fluid container:
if the noun is empty:
say "There is no more [liquid of the noun] within." instead;
otherwise:
decrease the current volume of the noun by 0.2 fl oz;
if the current volume of the noun is less than 0.0 fl oz, now the current volume of the noun is 0.0 fl oz;
say "You take a sip of [the liquid of the noun][if the noun is empty], leaving [the noun] empty[end if]."
Here we want Inform to prefer full liquid sources to other containers when it chooses an end to a player's unfinished or ambiguous command. And so:
Understand "fill [fluid container] with/from [full liquid source]" as filling it with. Understand "fill [fluid container] with/from [fluid container]" as filling it with.
Both grammar lines point to the same ultimate outcome; the purpose of specifying both is to tell Inform to check thoroughly for full liquid sources before falling back on other fluid containers when making its decisions.
Understand "fill [something] with/from [something]" as filling it with.
Filling it with is an action applying to two things. Carry out filling it with: try pouring the second noun into the noun instead.
Understand "pour [fluid container] in/into/on/onto [fluid container]" as pouring it into. Understand "empty [fluid container] into [fluid container]" as pouring it into.
Understand "pour [something] in/into/on/onto [something]" as pouring it into. Understand "empty [something] into [something]" as pouring it into.
Check pouring it into:
if the noun is not a fluid container, say "You can't pour [the noun]." instead;
if the second noun is not a fluid container, say "You can't pour liquids into [the second noun]." instead;
if the noun is the second noun, say "You can hardly pour [the noun] into itself." instead;
if the liquid of the noun is not the liquid of the second noun:
if the second noun is empty, now the liquid of the second noun is the liquid of the noun;
otherwise say "Mixing [the liquid of the noun] with [the liquid of the second noun] would give unsavory results." instead;
if the noun is empty, say "No more [liquid of the noun] remains in [the noun]." instead;
if the second noun is full, say "[The second noun] cannot contain any more than it already holds." instead.
Carry out pouring it into:
let available capacity be the fluid capacity of the second noun minus the current volume of the second noun;
if the available capacity is greater than the current volume of the noun, now the available capacity is the current volume of the noun;
increase the current volume of the second noun by available capacity;
decrease the current volume of the noun by available capacity.
Report pouring it into:
say "[if the noun is empty][The noun] is now empty;[otherwise][The noun] now contains [current volume of the noun in rough terms] of [liquid of the noun]; [end if]";
say "[the second noun] contains [current volume of the second noun in rough terms] of [liquid of the second noun][if the second noun is full], and is now full[end if]."
Understand the liquid property as describing a fluid container. Understand "of" as a fluid container.
And now we add our liquid source kind, which will represent lakes, absinthe fountains, and any other infinite supplies of liquid we might need. Note that 3276.7 is the largest possible number of fluid ounces available to us.
A liquid source is a kind of fluid container. A liquid source has a liquid. A liquid source is usually scenery. The fluid capacity of a liquid source is usually 3276.7 fl oz. The current volume of a liquid source is usually 3276.7 fl oz. Instead of examining a liquid source: say "[The noun] is full of [liquid of the noun]."
Carry out pouring a liquid source into something: now the current volume of the noun is 3276.7 fl oz.
We want filling things from liquid sources to work the same way as usual, with the distinction that a) the liquid source never depletes in quantity (hence the carry-out rule resetting its fullness); and b) we should report the results a bit differently as well:
After pouring a liquid source into a fluid container:
say "You fill [the second noun] up with [liquid of the noun] from [the noun]."
On the other hand, pouring liquids into a liquid source needs to work completely differently from pouring liquids into anything else. Let's say we're going to allow any liquid at all to be dumped into rivers and streams (environmental protections evidently are not very well-enforced in this scenario):
Instead of pouring a fluid container into a liquid source:
if the noun is empty, say "[The noun] is already empty." instead;
now the current volume of the noun is 0.0 fl oz;
say "You dump out [the noun] into [the second noun]."
A couple of minor refinements:
Swimming is an action applying to nothing. Understand "swim" or "dive" as swimming.
Instead of swimming in the presence of a liquid source:
say "You don't feel like a dip just now."
Before inserting something into a liquid source: say "[The noun] would get lost and never be seen again." instead.
The Lakeside is a room. The Lakeside swing is an enterable supporter in the Lakeside. "Here you are by the lake, enjoying a summery view."
The glass is a fluid container carried by the player. The liquid of the glass is absinthe. The current volume of the glass is 0.8 fl oz.
The pitcher is a fluid container in the Lakeside. The fluid capacity of the pitcher is 32.0 fl oz. The current volume of the pitcher is 20.0 fl oz. The liquid of the pitcher is absinthe.
The player wears a bathing outfit. The description of the bathing outfit is "Stylishly striped in blue and white, and daringly cut to reveal almost all of your calves, and quite a bit of upper arm, as well. You had a moral struggle, purchasing it; but mercifully the lakeshore is sufficiently secluded that no one can see you in this immodest apparel."
Instead of taking off the outfit: say "What odd ideas come into your head sometimes!"
Test me with "fill glass / empty absinthe into lake / fill glass / swim / drink lake / drink / x water / x lake".