### GAME RULES ### player is in foyer? player moves north; say "The door is barred from the other side." player put cloak on hook; player hang cloak on hook; player hang cloak on hook; player has cloak; player is in cloakroom? cloak is on hook; cloak is on hook? bar is dark; bar is lit; player has cloak? bar is lit; bar is dark; player is in foyer; player moves south; bar is dark? player is in bar; say "You carefully make your way into the darkness." player is in bar; bar is dark? player moves north; player is in foyer; say "You find your way out of the darkness." player is in bar? bar is dark? player moves $direction; say "You stumble around the darkness." player is in bar; bar is lit; player read message; say "The message reads: 'You have won.'"; game ends; ### PLATFORM RULES ### # first-person commands for player player $alias; $alias means $something? player $something player $direction; $direction is a direction? player moves $direction player go $direction; $direction is a direction? player moves $direction player move $direction; $direction is a direction? player moves $direction player drop $something; player drops $something player take $something; player takes $something player get $something; player takes $something player pick up $something; player takes $something player pick $something up; player takes $something player quit; ; # movement rules $somebody moves $direction; $somebody is in $place; $destination is $direction of $place? $somebody travels $direction to $destination $somebody moves $direction; $somebody is in $place; $direction is the opposite of $opposite? $place is $opposite of $destination? $somebody travels $direction to $destination player travels $direction to $destination; $destination is called $name? player is in $destination; say "You head $direction to $name." player travels $direction to $destination; player is in $destination; say "You head $direction to $destination." player moves $direction; say "You can't go $direction from here." # looking around player look; player is in $place? $place is dark? say "It is dark." player look; player is in $place? $place is described as $description? say $description; see everything; see everything; player is in $place? $item is in $place? $item is called $something? say "$something is here." see everything; ; player look at $something; player has $something? $something is described as $description? say $description player look at $something; player is in $place? $something is in $place? $something is described as $description? say $description player look at $something; player is in $place? $something is in $place? say "You don't see anything special about it." player look at $something; player is in $place? $place features $something? $something is described as $description? say $description player look at $something; say "You don't see anything like that." # inventory player inventory; say "You are carrying:"; list inventory; list inventory; player has $item? $item is called $name? say " $name"; $somebody drops $item; $somebody has $item; $somebody is in $place? $item is called $name? $item is in $place; say "You drop the $name." $somebody drops $item; $somebody has $item; $somebody is in $place? $item is in $place; say "You drop the $item." $somebody drops $item; say "You don't have any $item." $somebody takes $item; $somebody is in $place? $item is in $place; $item is called $name? $somebody has $item; say "You take the $name." $somebody takes $item; $somebody is in $place? $item is in $place; $somebody has $item; say "You take the $item." $somebody takes $item; say "You don't see any $item here." # eval'd rules say $something; @ print($something) --- ### GAME DATA ### say " Cloak of Darkness Enter commands like 'look' or 'go north'. Type 'quit' to quit the game. Have fun! " foyer is called "the opera house foyer" foyer is described as "The foyer has doors to the south and west, and an exit to the north. Nobody else is here." player is in foyer player has cloak cloak is called "black velvet cloak" cloak is described as "The cloak seems to absorb ambient light in the area." player has spork spork is called "plastic spork" spork is described as "If only you had something to eat!" cloakroom is west of foyer cloakroom is called "the cloakroom" cloakroom is described as "This cloakroom has a brass hook on the wall." cloakroom features hook hook is called "brass hook" hook is described as "The brass hook looks perfect for hanging garments on." bar is south of foyer bar is called "the bar" bar is described as "The bar is darker than the other rooms." bar is dark bar features message message is described as "A message is scratched in the sawdust on the floor." ### PLATFORM DATA ### # directions east is a direction west is a direction north is a direction south is a direction northeast is a direction northwest is a direction southeast is a direction southwest is a direction east is the opposite of west west is the opposite of east north is the opposite of south south is the opposite of north northeast is the opposite of southwest northwest is the opposite of southeast southeast is the opposite of northwest southwest is the opposite of northeast # aliases e means east w means west n means north s means south ne means northeast nw means northwest se means southeast sw means southwest i means inventory