This distribution should include these instructions, WaterElement.h, Sploosh.inf (a sample game using WaterElement), and Sploosh.z5 (that sample game compiled in playable form), as well as a hacked version of parserm.h.
This library may be freely included in your Inform game files. Credit is appreciated, but not demanded.
Extend 'squeeze' * noun 'into'/'in'/'on'/'onto'/'over' noun -> SqueezeInto;
Liquid oliveoil "olive oil",
with
spec_name "olive oil",
name "olive" "oil",
description [;
"Clear yellow and viscous.";
],
has edible;
|
mixtaste [ other;
switch(other)
{
oliveoil: "More of a salad dressing than a beverage.";
water: "The wine is dominant over the water, but the
water is still definitely there. Stuff for children.
You swallow resentfully.";
mint_tea: "After a moment's concentration, you manage to swallow.
The effect is queerly medicinal.";
}
];
|
Liquid flour "flour",
with number 50,
name "flour", spec_name "flour",
article "a quantity of",
description [;
"Fine sifted flour.";
],
has ~wet edible;
|
Object rubber_duck "rubber duck" lab,
with name "rubber" "duck" "yellow" "adorable",
describe [;
if (self has floating)
"^Your beloved rubber duck floats to and fro.";
"^Your beloved rubber duck lies discarded at your feet.";
],
description [;
"An adorable rubber duck that has somehow managed to avoid being
plunged into a vat of acid. So far, anyway.";
],
has floater;
|
Absorbent sponge "sponge",
with name "sponge",
size 1,
after [;
douse: give self general; rfalse;
],
description [;
print "A sea sponge, sized and rounded like an apple. It is currently ";
if (self has wet) "sopping wet.";
if (self has general) "slightly damp.";
"bone dry.";
];
|
[ BadContainer x;
if (x ofclass cloth)
{
if (keep_silent) rtrue;
"", (The) x, " is too porous.";
}
rfalse;
];
|
Object InfiniteDitch "very deep ditch" Lab,
with
initial [;
"A very deep ditch runs along one side of the room.";
],
name "very" "deep" "ditch",
leak_cap [;
! Whatever its apparent size, it will keep on accepting liquids
! virtually forever.
return 10000;
],
has container open ~openable;
|
Object pot "pot",
with name "pot",
leak_cap [;
return 200;
],
water_leak [ liq flag par;
if (flag==0) rfalse;
liq.number = liq.number-5;
if (TestScope(self))
{ new_line;
if (liq.number) print "Some of ", (the) liq;
else print (The) liq;
print " boils off.^";
}
if (liq.number < 1) liq.evaporate();
],
has open container ~openable;
|
Leaky leaky_container "leaky container",
with name "leaky" "container",
leak_cap [;
return 200;
],
drip 10,
has open ~openable;
|