Hi, wow, thanks for digging in everybody.
and yes, my idea was indeed that dropping something in the water would do the same thing regardless of whether or not the PC was in the water.
I came up with this, take it for a spin and let me know if I’m doing things extremely backwards - as I said, I’m new here. Also this is just a test so lots of nice stuff is missing. What I’m actually planning to do with this is a pool of muddy water where things you drop disappear into the mud until you figure out how to get them back – you’re not supposed to be able to go and look at the bottom like in this example.
The “if the bottom of the pool is something” bit is there so you can create a pool that doesn’t “sink to” a special bottom; in that case everything just stays in the pool, floating or not.
Also, a question: is there a way to specify a directional one-to-one relationship and name both sides, like surface / bottom?
[code]“Sinking pool and buoyancy” by frudster
section buoyancy
A weight is a kind of value. 1kg specifies a weight. 1g specifies a weight scaled down by 1000.
Everything has a weight. A thing usually has weight 100g.
A thing has a weight called buoyancy. The buoyancy of a thing is usually 0kg.
Definition: A thing is buoyant if its weight is less than its buoyancy.
section pool with a hidden bottom
[A pool where you can drop things. If they sink they sink out of sight, actually into
another coontainer called the bottom of the pool]
A pool is a kind of container. A pool is usually enterable and fixed in place.
Sinking down relates one container to another (called the bottom). The verb to sink to (he sinks to, they sink to) implies the sinking down relation.
After inserting something into a pool, carry out the sinking activity with the noun.
After dropping something when the player is in a pool, carry out the sinking activity with the noun.
Sinking something is an activity on things.
Rule for sinking a thing which is in a pool:
Let a pool be the holder of the noun;
say “You drop the [noun] into the [pool].”;
if the noun is buoyant:
say “It floats!”;
stop the action;
if the bottom of the pool is something:
say “It sinks out of sight.”;
move the noun to the bottom of the pool;
otherwise:
say “It sinks.”.
section scenario
The garden is a room. "A cute little garden with a fairly unpleasant pond. A ladder goes down a hole in ground. "
The cellar is a room. It is down from the garden. "A damp little space. A ladder goes up into the garden. "
The pond is a pool in the garden. Understand “water” as the pond.
The water wall is an fixed in place enterable container in the cellar. “There’s a shimmering vertical surface of water here, like in Stargate. How tacky!” The pond sinks to the water wall.
A rusty bolt is a thing in the garden.
A cork is a thing in the garden. The weight of the cork is 10g. The buoyancy of the cork is 20g.
test pool with "take bolt / drop bolt in pond / take cork / drop cork in water / enter pond / take cork / drop cork / x pond / out / take cork / drop cork / down / x water / take bolt / up / drop bolt " in the garden
[/code]