VisP = { (Visp List Propno) => True IFF an object }
(($eq %1 0) : ($rtrn FALSE)) { is visible on List that has Propno }
($rtrn TRUE)) { Found one! }
($prop %1 TRANS)): { Look inside...}
( (VisP ($cont %1) %2): ($rtrn TRUE) ))
($rtrn (VisP ($link %1) %2))
ROUTINE Reach; { (Reach obj loc) => True IFF the obj }
Reach = { IS the loc or can be reached }
(($eq %2 0) : ($rtrn FALSE)) { by the loc }
(($eq %1 %2): ($rtrn TRUE))
((Reach %1 ($cont %2)): ($rtrn TRUE))
($rtrn (Reach %1 ($link %2)))
ROUTINE See; { (See obj loc) => True IFF the obj }
See = { IS the loc or can be seen }
(@DARKG: ($rtrn FALSE)) { Can't see in a dark room! }
(($eq %2 0) : ($rtrn FALSE))
(($eq %1 %2): ($rtrn TRUE))
(($or ($prop %2 TRANS) { Still explore inside }
((See %1 ($cont %2)): ($rtrn TRUE))
($rtrn (See %1 ($link %2)))
(($eq ($loc %1) .ME) : ($rtrn TRUE)) { shd be closure, really }
(($not %1):($say "The what?\n")($exit 1))
(($not (See %1 ($cont ($loc .ME)))):
($say "I can't see that item here.\n")
(($not (Reach %1 ($cont ($loc .ME)))):
($say "I can't get at that item.\n")
($not ($prop %1 SHRNK)) ):
"Right now, ")(($sdisc %1))($say " is too big for you to deal with.\n")
LitP = { (LitP Room) => True IFF Room is lit }
(($prop %1 LIGHT) : ($rtrn TRUE))
(($or (VisP ($cont %1) LIGHT)
(VisP ($cont %1) FLAME)): ($rtrn TRUE))
(($or (VisP ($cont .ME) LIGHT) { Check .ME 'cause invisibl }
(VisP ($cont .ME) FLAME)): ($rtrn TRUE))
Blank = { Blank n => Type n blanks }
ROUTINE Llook; ROUTINE Slook;
Llook = { (Llook Level Object) describes Object }
(($eq %1 0) : { Level 0 == This is a room. Check lighting }
(($ldisc %2)) { Talk about the room }
(Llook 1 ($cont %2)) { Talk about its contents }
($say "It's mighty dark in here!\n")
{else} : { Level > 0 == This is a list of objs }
( ($ldisc %2) : { Talk (only) about the visible }
(($ldisc %2)) { Blurb the object }
( ($cont %2): { something inside it...}
(($or ($prop %2 OPEN)($prop %2 TRANS)):
(Slook ($plus %1 1) ($cont %2))
{ Short descriptions for contents }
Slook = { (Llook Level Object) describes Object }
(($eq %1 0) : { Level 0 == This is a room. Check lighting }
(($sdisc %2)) { Talk about the room }
(Slook 1 ($cont %2)) { Talk about its contents }
($say "It's mighty dark in here!\n")
{else} : { Level > 0 == This is a list of objs }
(($sdisc %2) : { Talk (only) about the visible }
(($not ($prop ($loc %2) CONTS)):
($setp ($loc %2) CONTS TRUE)
(($sdisc %2)) { Blurb the object }
(($and ($ne ($cont %2) 0) { something inside it...}
($or ($prop %2 OPEN) {...and you can see it }
(Slook ($plus %1 1) ($cont %2))
{ Short descriptions for contents }
(($prop ($loc .ME) VISIT):
($setp ($loc .ME) VISIT TRUE)
(@DARKG : ($setp ($loc .ME) VISIT FALSE))
ROUTINE GrowX; ROUTINE ShrnX;
GrowX = (($prop %1 SHRNK):
Grow = (($prop .ME SHRNK):
ShrnX = (($not ($prop %1 SHRNK)):
($say "You hear a tiny POP as ")(($sdisc %1))
($say " vanishes completely!\n")
Shrink = (($not ($prop .ME SHRNK)):
WzTgl = { Toggle the Wizard flag }
($setg Wizrd ($not @Wizrd))
"You hear a low rumble of thunder, shaking the very ground on
which you stand. Suddenly, there is a blazing flash of light!!
You are unharmed, but feal great power flowing in your body.\n")
"Your wizardly powers unceremoniously fade away.\n")