Constant Story "ISAAC NEWTON'S BEACH"; Constant Headline "^An Interactive Metaphor ^Type Credits for help acknowledgment^^"; Release 2; Serial "093005"; Replace Throwsub; Include "Parser"; Include "VerbLib"; Include "Beach"; !replacement for Grammar.h [Initialise i; for (i=0 : i<5 : i++) move Pebble.create() to RPool; location = Seashore; move coat to player; "Welcome to...^";]; Class Pebble (5) with name 'pebble' 'stone' 'pebbles//p' 'stones//p' 'rock' 'rocks//p', short_name "pebble", description "A smooth beach pebble washed up from the sea.", plural "beach pebbles", before [; ! to remember where the pebble was taken from Drop,Insert,PutOn,Remove,Take: self.previous_parent = parent(self); ThrowIn: if (second==RPool && noun ofclass Pebble) {move self to RPool; "You throw the pebble into the rock pool.";} if (second==Breakers && noun ofclass Pebble) Pebble.destroy(noun); print "The pebble splashes into the sea and is gone forever.^";], previous_parent nothing ; Object Coat "Beach Coat" with name 'coat' 'jacket' 'garment', description " A colorful beach jacket that keeps the rays of the sun from tanning your hide.", before [; drop: if (second ~=Rpool) {move self to location; give self ~worn; "You drop the coat in a heap at your feet.";} move self to Rpool; give self ~worn; "You drop the coat into the pool."; wear: if (self has worn) "But you're already wearing it."; move self to player; give self worn; "You wear the coat."; throw: remove self; give self ~worn; "You throw the coat into the sea where it is lost forever."; throwin: if (second ==Rpool) {move self to Rpool; give self ~worn; "You throw the coat into the rock-pool.";}; if (second==Breakers) {remove self; give self ~worn; "You throw the coat into the sea where it's lost forever.";} throwat: if (second ==Shingle) <>; else move self to location; give self ~worn; "You throw the coat at ",(the)second,"."; drop: if (second==RPool) {move self to RPool; "You drop the coat into the pool.";}; throwin: if (second==Breakers) {remove self; "The coat splashes into the sea and is gone forever.";}; if (second==RPool) {move self to RPool; "You throw the coat into the pool.";}], has clothing worn ; Object Seashore "Sea Shore" with description "You seem to be only a boy playing on a sea-shore, and diverting yourself in finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lies all undiscovered before you.^^ The breakers drain ceaselessly through the shingle, spilling into a momentary rock-pool.", has light; Object -> Breakers "Breakers" with name 'breakers' 'waves' 'sea' 'ocean', article "large", description "These huge ocean breakers enter incessantly from the sea.", before [; ThrowIn: if (noun==Shell || noun ofclass Pebble) {remove noun; "",(The) noun, " splashes into the sea and is gone forever.";} if (noun ofclass Pebble) Pebble.destroy(noun); else remove noun; print_ret (The) noun, " splashes into the sea and is gone forever.";], has scenery; Object-> Shingle "Shingle" with name 'shingle' 'beach', description "This secluded stretch of shingle is known only to you.", before [; Receive,ThrowIn: if (noun ofclass Pebble) { Pebble.destroy(noun); print_ret (The) noun, " disappears amidst the shingle.";} move noun to location; "If you like.";], has scenery; [ignore; ]; ! print rule to ignore routine's return value. Object-> RPool "rock pool" with name 'rock' 'pool' 'rock-pool', description [; "The pool fills and empties at the whim of the tide.", (ignore) self.contents(" ");], before [; Drop,Insert,Throw,ThrowIn: if (noun ofclass Pebble || noun==Shell) {move noun to RPool; "You ",(address)verb_word, " ",(the)noun, " into the pool.";};], after [; LetGo: if (noun ~= Coat) "You take ", (a) noun, " from the pool.", (ignore) self.contents(" still "); Receive: if (noun ~= Coat) "You drop ", (a) noun, " from the pool.", (ignore) self.contents(" now "); ], contents [ str; if (children(self)) { print " You can", (string) str, "see "; WriteListFrom(child(self), ENGLISH_BIT); print " lying at the bottom."; }], has scenery open container; Object-> -> Shell "shell" with name 'shell' 'seashell' 'mollusk', previous_parent nothing, description "A colorful seashell.", before [; throwat: "You throw the shell at ",(the)second,"."; throwin: if (second == Breakers) {remove noun; "You throw the shell into the sea where it is lost forever.";} if (second==RPool) "You throw the shell into the pool."; self.previous_parent = parent(self);], ; [CreditsSub; "Much thanks to following: Roger Firth (mainly)^ Daniel Barkalow^ John Evans^ Cedric Knight^ Fredrik Ramsberg^ and Mark Tilford^";]; [ThrowSub; if (noun== Shell && second==0) "Where do want to throw the shell?"; if (noun ofclass Pebble && second==0) "Where do want to throw the pebble?";]; [ThrowOnSub; "You can't throw ",(the)noun, " onto ",(the)second,"!";]; [ThrowInSub; if (second ~= Breakers or RPool or Shingle) "You can't throw that in ",(the)second."!";]; verb 'credits' * -> Credits;