#Ifdef notdef; Object x "x"; #Endif; CvsId "$Id: SantaCruz.inf,v 1.18 2005/03/14 03:03:30 joelh Exp $"; ! Regarding my inspiration for this area: ! ! A "Mystery Spot" appears in Sam & Max Hit The Road, a game which ! inspired this entire game. (If you haven't played it, I highly ! recommend you do so.) However, my Mystery Spot is not at all based ! on theirs. ! ! There really is a Mystery Spot in Santa Cruz, and I've based the ! appearance of mine on that. The behavior of the world is mostly ! inspired by the Animatrix short "Beyond" (Vision 7). ! FIXME-4 Put some random people driving with Mystery Spot bumper ! stickers. Street santa_cruz "Santa Cruz" with name 'santa' 'cruz', description "You can feel the sea air throughout the town as you go through Santa Cruz. 50 year-old hippies, random slackers, and retired .com programmers litter the streets, mostly indistinguishable from one another. Quaint townhouses in vivid colors line the hilly streets. A short rainbow is in the sky to the west, although there hasn't been any rain in weeks. The drive northwest back to Sunnyvale is treacherous when it's foggy, but that's of no concern to you. People who want to get away from the city but don't like the strange people in Santa Cruz usually go southwest to Monterey.", ralph_thinks "~I used to live in Santa Cruz,~ Ralph tells you, ~but had to move back up to San Francisco.~^ ~Why's that?~^ ~The townsfolk burned down my house.~^ ~Why? Were you performing Frankensteinian experiments that were an affront to everything that's right in this world?~^ ~Yes, but they didn't mind that. They didn't like the color I painted the house.~", nw_to sunnyvale, sw_to monterey, w_to mystery_spot; Global mystery_event_timer; ! Special sequences, as high as we can store in a byte array. Array primes string 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251; Array fibonacci string 1 2 3 5 8 13 21 34 55 89 144 233; Array echoing_line -> INPUT_BUFFER_LEN+3; [SelectRandomMessage timer sequence message_count evnum n; ! Events occur predicatibly on all turns listed in sequence (based ! on timer), up to the number of messages. After that, they ! happen randomly on every turn in the sequence up to 255. Then, ! they occur on random turns. if (timer > 255) { timer = random(255); } evnum = 0; for (n = 1 : n <= sequence->0 : n++) { if (sequence->n == timer) { if (n <= message_count) return n; else return random(message_count); } else if (sequence->n > timer) { return 0; } } return 0; ]; Class Mystery_Room class Room ! Be careful about Group 2 actions; descriptions of the ! actions are prone to failure! with print_consultation [word letter; word = consult_from; for (::) { for (letter = 0: letter < WordLength(word): letter++) print (char)WordAddress(word)->letter; word++; if (word >= consult_from+consult_words) break; print " "; } ], react_before [; Open,Close,SwitchOn,SwitchOff,Lock,Unlock,Pull,Push,PushDir,Turn: print "As you reach for ", (thatorthose)noun, ", ", (the)noun, " seems to anticipate your action and move on its own. With a start, you see a ghostly image of your own hand in place ahead of the rest of you.^"; Drop: if (noun == player) << Jump >>; ThrowAt: ! FIXME-3 AFAICT, this never can be called. if (noun == player && second == d_obj) ! THROW SELF AT GROUND (for Hitchhiker's fans) << Jump >>; ], before [; ! Group 3 actions: Answer: ! We don't get called if the addressee hasnt animate. Not ! even in a react_before, since it's trapped by the ! parser. ! Clarify this message. print "As you speak, you hear ", (the)second, "'s voice coming out of your mouth saying"; if (consult_words == 0) { print " nothing.^"; } else { print ", ~"; self.print_consultation(); print "~^"; } RunLife(second,##Answer); rtrue; Ask: print "As you speak, you hear ", (the)noun, "'s voice coming out of your mouth asking about "; if (metaclass(second) == Object) print (the)second; else self.print_consultation(); print ".^"; rfalse; Tell: print "As you speak, you hear ", (the)noun, "'s voice coming out of your mouth talking about "; if (metaclass(second) == Object) print (the)second; else self.print_consultation(); print ".^"; rfalse; ! AskFor doesn't get dispatched through here in any ! circumstances I can discern. AskFor: print "As you speak, you hear ", (the)noun, "'s voice coming out of your mouth asking for ", (the)second, ".^ "; rfalse; Attack,Cut: ! FIXME-4 Probably should give different messages for melee, ! ranged, and bare-handed attacks. "As your attack nears, it slows down. Slower and slower, until at last, at the point of contact, it has no momentum."; Blow: if (noun == feather) rfalse; "As you draw in a breath, you suddenly realize that you are in a vacuum. Your eyes go wide, and you begin to lose consciousness...^ You wake up a moment later, breathing normally, but hovering horizontally a scant inch from the ground. As you wake up, you hit the ground. Or maybe you imagined that whole hovering thing."; Burn: "Nothing will ignite in this environment."; Dig: if (noun == d_obj) "As you experimentally tap the ground, it sounds like glass tapping against metal. Whatever's with the ground here, it doesn't seem like it's something you can dig."; rfalse; Drink: ! Alice in Wonderland reference "What, does it look like ", (the)noun, " has ~Drink Me~ written on it?"; Kiss: "The strange occurrences going on around you leave you feeling a bit more spooked than romantic."; LookUnder: if (parent(noun) == self) { if (RunRoutines(noun, before)) rtrue; "Underneath ", (the)noun, ", you see an abyss, black as sackcloth and deep as a Stanley Kubrick film. You blink at the abyss, and it blinks back at you. You blink again, and everything seems normal."; } Mild,Strong: "A hollow voice swears at you."; Pray: "The strange goings-on here put you in a philosophical mood. You pray for enlightenment regarding the nature of the universe, but realize no immediately practical results."; Rub: "As you near ", (the)noun, ", you realize that it's not actually dirty; it's just shadows. You try to identify the source of the shadows, but can't see anything."; Sing: "As you open your mouth, you hear Ma@:iwenn Le Besco's voice come forth, singing an electronic opera about the futility of existence."; Sleep: "You'd never get to sleep here, worrying about what might happen to you before you wake."; Sorry: "A hollow voice says, ~That's okay.~"; Swing: "You hear the faint voice of Bruce Willis echoing around you. You look up and see Ralph swinging on a star, and decide you can't top that."; Wake: "You can't be sure, but you think this isn't a dream. At least, not yours."; WakeOther: "You can't shake the feeling that this is ", (the)noun, "'s dream, and that if it ends, you'd cease to exist."; WaveHands: "You wave, with the usual effect, but when you stop, ghostly images of your hands keep waving for a few seconds longer."; Touch: if (noun == nothing) "The air feels slightly chilly."; if (RunRoutines(noun, before)) rtrue; if (ObjectIsUntouchable(noun)) rtrue; print (The)noun, " feels like something "; print (string)random("orange", "blue", "yellow", "pink", "bitter", "sour", "salty", "piquant", "pungent", "aeromatic", "loud", "quiet", "warbling"); "."; Smell: if (noun == nothing) "The air smells faintly of ozone."; if (RunRoutines(noun, before)) rtrue; print (The)noun, " smells like something "; print (string)random("orange", "blue", "yellow", "pink", "bitter", "sour", "salty", "soft", "hard", "smooth", "rough", "scaly", "loud", "quiet", "warbling"); "."; Listen: if (noun == nothing) "You hear a slight echo; it sounds like it's coming from the rainbow."; if (RunRoutines(noun, before)) rtrue; print (The)noun, " sounds like something "; print (string)random("orange", "blue", "yellow", "pink", "bitter", "sour", "salty", "soft", "hard", "smooth", "rough", "scaly", "piquant", "pungent", "aeromatic"); "."; Taste: if (noun == nothing) "The air has a slightly acrid taste."; if (RunRoutines(noun, before)) rtrue; print (The)noun, " tastes like something "; print (string)random("orange", "blue", "yellow", "pink", "soft", "hard", "smooth", "rough", "scaly", "piquant", "pungent", "aeromatic", "loud", "quiet", "warbling"); "."; Climb: if (noun == u_obj) << Go u_obj >>; rfalse; Swim,Jump,JumpOver: "You try to leap through the air, but your feet seem to be stuck to the ground as if by glue."; ! Group 2 actions: Eat: if (noun hasnt edible) ! Alice in Wonderland reference. Or Jefferson Airplane. print_ret (CThatOrThose)noun, " ", (isorare)noun, " not a mushroom.^"; ThrowAt: if (second == d_obj) << Drop noun >>; ! FIXME-3 The default routine (which usually ends up ! running) often just prints "Futile." in which case this ! isn't useful. However, I like this description, since ! it provides for unusual motion, and it's important to ! have that in this place. ! FIXME-3 PUT RALPH IN CAN will print this, then "You ! aren't holding Ralph!" print (The)noun, " arcs through the air at ", (the)second, ". As it reaches its apex, it hovers in midair, and starts to come back at you. Just before impact, it whips around and returns to its original target.^"; ], after [; Disrobe: ! Called if successful print_ret (The)noun, " hovers over your shoulders for a moment, and comes to rest in your hands."; Wear: ! Called if successful print_ret (The)noun, " hovers over your shoulders for a moment, and comes to rest on top of you."; Drop: ! Called if successful if (noun == feather) rfalse; print_ret "You throw ", (itorthem)noun, " to the ground. Uncharacteristically, ", (the)noun, " shatters into a thousand pieces. The shards scatter, but suddenly pause, reassemble themselves, and bounce back to your feet."; Empty: ! FIXME-3 Never called, AFAICT. That's a bummer, because ! this is a gravity clue. if (second == d_obj) ! FIXME-3 This has some issues regarding number: if the ! thingy was empty, or had only one item, this doesn't ! make sense. print "The contents of ", (the)noun, " hover above the ground for a moment, before hurtling upwards. As they pass your head level, they slow to a standstill. With a blink, you see that they're not in midair anymore, but rather sitting on the ground as if nothing was wrong.^"; !Remove: ! FIXME-2 This would only get called if the remove failed. ! x = random(hat,coat,ralph); ! if (InScope(x)) { ! move noun to x; ! print "With a start, you realize that ", (the)noun, " isn't ! in your hands.^"; ! } Search: ! Called if listing will be successful, but before it's ! listed. print (The)noun, " blinks at you, and you get the feeling that your very soul is being scrutinized.^"; Take: ! Called after the take is successful, but before ! resetting notheld_mode, so if this returns true, then ! the command ends. ! FIXME This shouldn't happen if the noun is in something ! you are holding, should it? print_ret (The)noun, " leaps through the air into your waiting hand."; ], each_turn [evnum n; ! Events occur predicatibly on all prime turns (spent in ! the mystery spot) up to 23 (which is the number of Eris, ! goddess of chaos, in modern Discordian theology), then ! randomly on prime turns, then randomly. I don't have a ! random event on each prime turn after that because I ! don't want to have a primality test running on an ! each_turn. For what it's worth, prime numbers occur with ! a frequency of about about one prime in n/logn according ! to the prime number theorem. ! Occasionally save the line. The frequency doesn't ! matter, but should probably be odd so that the echoed ! line is always at least two behind the player's last ! input. if (mystery_event_timer % 5 == 0) for (n = 1 : n<=(buffer->1+1) : n++) echoing_line->n = buffer->n; evnum = SelectRandomMessage(mystery_event_timer++, primes, 9); if (evnum == 0) return; print "^"; switch (evnum) { 1: "Twenty-three dandelions sprout up from the ground, grow, bloom, wither, and turn to dust, all in the space of a half-second."; 2: print "The ground suddenly turns into a mirror, which reflects everything here"; if (rainbow in location) print ", but not the rainbow above you"; ". Just as suddenly, the ground returns to normal."; 3: "A hole opens up in the air in front of you. A head pokes out, looks around, and retreats back into the hole, which promptly vanishes."; 4: if (location == mystery_spot) { print "The wisp of vapor emits a thin cloud"; } else { print "Just under the ceiling, a wispy cloud forms"; } " shaped like a dragon. It lets out a fierce roar just before dissolving into nothingness."; 5: print "A frog jumps in "; switch (location) { mystery_spot: print "from the east"; dark_mystery_basement: print "from the north"; rainy_mystery_basement: print "from the south"; } print ". It sings a couple of bars of ~Ragtime Gal~, and then leaps "; switch (location) { mystery_spot: "into the air and over the rainbow."; dark_mystery_basement: "through the hole in the ceiling."; rainy_mystery_basement: "back out again."; } 6: "Clouds of thick purple smoke surround the room, swirl around it, and then evaporate."; 7: "A ghostly voice echoes, ~Avon calling!~"; 8: print "A star falls down from "; switch (location) { mystery_spot: print "the rainbow"; dark_mystery_basement: print "the hole in the ceiling"; rainy_mystery_basement: print "the ceiling"; } ", and shatters on the ground in a blaze of light."; 9: print "You hear your own voice echoing off the walls, saying ~"; for (n=2: n<=(echoing_line->1+1): n++) print (char) echoing_line->n; "~."; default: "A random (but unimportant) event that the implementor failed to handle takes place, adding to the mystery of the mystery spot."; } ]; Object mystery_object "mysterious artifact" with name 'dandelion' 'dandelions//p' 'dust' 'mirror' 'head' 'cloud' 'dragon' 'roar' 'frog' 'smoke' 'voice' 'star' 'light', found_in [; return (location ofclass Mystery_Room); ], before [; "That's gone now; it mysteriously vanished moments after appearing."; ], ralph_thinks "~I didn't get a good look either.~", has scenery; ! I refer to Prather Cabin itself as the "Mystery Spot" for the ! purposes of this game, rather than the entire region (which in RL is ! about 150' in diameter, if you care). Mystery_Room mystery_spot "Mystery Spot" with name 'mystery' 'spot', description ! The rainbow may be too obviously placed here. The first ! and last parts of the description are the most noticable ! parts of a description, so if this puzzle is too easy ! because the rainbow is too obvious, then move it to the ! middle of the description. "The historic Mystery Spot was once a cabin, but all that remains are three half-rotted wooden walls. The room seems mundane at first glance, but is full of irregularities that would drive Euclid batty. Most notably, the corners are square, and the walls appear parallel, but the room is 10' square at the roofless top and 20' square at the wooden bottom. The floor is rotted out in one corner, leaving a sizable hole. There's no trace of any of the ceiling left; only a rainbow lies between you and the clear sky.", ralph_thinks "~V svaq gung gur tbvatf-ba bs gur ertvba ner va cresrpg unezbal jvgu gur pbafgnag qvfpbeq bs bhe qnvyl yvirf.~", cant_go [; if (over_santa_cruz hasnt visited) "You can only go east and down."; Smartcantgo(); ], e_to santa_cruz, d_to [; if (light_bulb hasnt light) StartTimer(light_bulb, 2); return hole; ], ! FIXME This U_TO makes the exit appear on Nitfol's ! automapper, giving away the gig. I don't know if that can ! be fixed while still allowing UP (a sensible construct) to ! work. The only thing I can think of offhand is to fail the ! first U, and inform the player to try it again somehow. u_to [; if (~~ralph in self) { move ralph to self; if (over_santa_cruz has visited) print "You set Ralph on the ground to give you a boost.^ ~Ready when you are!~ he says. "; else print "You consider your stunt, and decide to put Ralph firmly on the ground as you begin.^"; } if (over_santa_cruz has visited) { print "You take a running jump and soar into the skies.^~"; } else { Achieved(6); print "~Hey, Ralph, something seems weird about the gravity here.~^ ~You noticed it too?~^ ~Yup. I've got a notion... stand back!~^ You brace yourself with your back against the corner, and push off against the walls. A running step, then two, and you ricochet off the opposing corner.^ You start to tumble in midair-- but tumble upwards! You soon find yourself climbing into the skies over Santa Cruz.^ ~Hey, Ralph,~ you call to your landbound buddy. ~You gotta try this!~^ ~You know I'm afraid to fly. "; } print "Don't worry about me,~ says Ralph, ~I'll catch up.~^"; return over_santa_cruz; ], compass_look [dir; if (dir ~= u_obj) rfalse; print "A rainbow stretches overhead, even though "; if (rainy_mystery_basement has visited) "the only rain is in the basement."; "there hasn't been any rain in a week."; ], before [; Climb,Swim,Jump,JumpOver: << Go u_obj >>; ]; ! The rainbow is a reference to the Animatrix short, "Beyond". If ! investigated, it helps clue the player about the gravity effect. ! FIXME Can color-blind animals see rainbows? Object rainbow "rainbow" with name 'rainbow', ask_in_scope [; if (santa_cruz has visited) return 2; return 0; ], found_in santa_cruz mystery_spot over_santa_cruz, describe [; ! The question of when this should appear is probably ! pretty crucial. If it appears in the Mystery Spot, then ! the puzzle may be too easy, since players will almost ! certainly interact with it immediately. It also looks ! out of place. But if it doesn't, they may not notice it ! in the room description. if (location ~= over_santa_cruz) rtrue; "^A rainbow arcs over the Mystery Spot, just underneath you."; ], ralph_thinks "~Maybe if we slide down it, there's a pot of gold at the end!~", description [; switch (location) { santa_cruz: "The rainbow arcs high over the Mystery Spot to the west. It seems to be confined to just that area."; mystery_spot: "From this angle, the brilliant rainbow seems to be just a few feet above you."; over_santa_cruz: ! Note that it doesn't color the view of the ground; ! Jacques is color-blind. "The translucent rainbow is just underneath you, between you and the Mystery Spot below."; } ], before [; Examine,Search,FireAt: rfalse; default: switch (location) { santa_cruz: "The rainbow is too far away."; mystery_spot: "You reach towards the rainbow, stretching as far as you can; it even feels like your hind paws lift off the ground a little bit. But the rainbow seems to be just a little bit out beyond your grasp."; over_santa_cruz: "The rainbow becomes more and more insubstantial as you approach, and vanishes entirely when you get near it. When you back away, it reappears."; } ], has static; Object vapor "wisp of vapor" mystery_spot with name 'wisp' 'vapor', blows_to d_obj, initial [; if (self.blows_to == u_obj) "A wisp of vapor drifts from below, rising into the air."; "A wisp of vapor drifts from below, but instead of rising into the air, wafts to ", (the)self.blows_to, "."; ], description [; if (self.blows_to == u_obj) rfalse; "Other than the fact that the vapor is coming from nowhere in particular, and is in fact wafting to ", (the)self.blows_to, " instead of upwards, you see nothing unusual about the wisp of vapor."; ], ralph_thinks "~Maybe there's a poltergeist making Theraflu.~", just_moved false, before [; PushDir: if (parent(second) == Compass) { self.blows_to = second; "The wisp of vapor takes your guidance."; } ], each_turn [dirs_seen dir_on; ! When testing this, be sure to handle "throw vapor at ! ground", which atomically takes and drops the vapor. if (parent(self) == mystery_spot) { ! Just in case, reset everything. give self ~moved; self.just_moved = false; rtrue; } if (~~self.just_moved) { self.just_moved = true; rtrue; } ! This should reset everything in all cases, just to be ! sure. self.just_moved = false; dirs_seen = 1; give self ~moved; for (dir_on = child(Compass): dir_on ~= nothing: dir_on = sibling(dir_on)) if (random(dirs_seen++) == 1) self.blows_to = dir_on; if (parent(self) == mystery_spot) ! The vapor has moved back to the mystery spot on its ! own by now. Perhaps the player did "throw vapor at ! ground". rtrue; print "^Wait a second... did you just pick up ", (the)self, "? Surely you just imagined it!^"; move self to mystery_spot; rtrue; ]; ! FIXME SEARCH CAN says that the can is empty every time. Object can "tin can" mystery_spot with name 'tin' 'can' 'lid', initial [; print "An old tin can sits discarded on the ground."; if (child(self)) { print " In the can"; WriteListFrom(child(self), CONCEAL_BIT+ENGLISH_BIT+ISARE_BIT+TERSE_BIT); print "."; } " Something seems a bit odd about the can's shadow."; ], ralph_thinks "Ralph breaks into a frenetic dance.^~What are you doing, Ralph?~^~The can-can, of course!~", seen_lost_hover false, description [; if (self hasnt moved) "Upon careful inspection, you see that the can is actually floating a half inch off of the ground."; if (parent(self) == mystery_spot && ~~self.seen_lost_hover) print "It now seems to be resting on the ground in the normal fashion. "; self.seen_lost_hover = true; "The #2 tin can is open, with a bit of its lid still attached. The label is too sun-bleached to make out, but you suppose it used to hold food."; ], capacity 1, before [; LookUnder: if (self hasnt moved) << Examine can_shadow >>; Push,Pull: if (self hasnt moved) "You tap at the can experimentally, and realize you can push it down a little bit towards the ground. When you release it, the can resumes its former hover."; ], after [; Take: give can_shadow moved; remove can_shadow; ], has container open; Object can_shadow "tin can's shadow" mystery_spot with name 'shadow', ralph_thinks "Ralph breaks into a bit of song. ~Just me and my shadow...~", each_turn [; ! Safeguard: this shouldn't be necessary, but just be sure. if (can has moved) { give self moved; remove self; } ], description [; if (can has moved) { give self moved; remove self; } << Examine can >>; ], before [; Examine,Search,FireAt: rfalse; default: "The shadow ducks out of your reach."; ], has scenery; ! It's called the mystery hole so that ASK GUARD ABOUT HOLE (in ! Alcatraz) can disambiguate. Object hole "mystery hole" mystery_spot with name 'mystery' 'hole' 'floor', description "The hole looks large enough for you to crawl through. You know, your breed can fit through any opening you can put your head through.", ! Alice in Wonderland / Sam & Max reference: The rabbit hole ! is obvious, and lagomorph is a generic term for rabbits, and ! is how Max's breed is always referred to. ralph_thinks "~Were you expecting a lagomorph?~", door_dir d_to, door_to dark_mystery_basement, before [; Take: "Even in this place, that's hardly portable."; ], has scenery door open; [random_mystery_room obj dest count; count = 0; objectloop (obj ofclass Mystery_Room) if (random(++count) == 1) dest = obj; return dest; ]; Mystery_Room dark_mystery_basement "Dark Mystery Basement" with name 'dark' 'mystery' 'basement', description "The flickering light bulb affords little comfort here. The wooden planks underfoot make a metallic ping with every step, and a breeze comes from no particular place. Although the underground room seems rectangular, in one corner you're tall enough that you have to crouch, but in the opposite corner you're barely half the height of the room. Fortunately, the passage back up is in the former. There are also doorways to the north and east.", ralph_thinks "~It feels kinda homey, specifically how I'm utterly creeped out by all aspects of my surroundings.~", u_to mystery_spot, n_to rainy_mystery_basement, e_to [; return random_mystery_room(); ], before [; Go: if (light_bulb hasnt light) "You can't find your way."; ], has ~light; Object light_bulb "phantom light bulb" dark_mystery_basement with name 'phantom' 'light' 'bulb' 'lamp' 'base' 'image', description "The light bulb in the top corner of the room is shattered, and only the base remains. Nevertheless, a phantom image of the bulb in its place affords a flickering light to the room.", time_left 2, time_out [; give self light; "A light bulb flickers once, twice, and then comes on."; ], before [; Take,Turn: "The light bulb is shattered, and there isn't enough left to unscrew it."; Switchon,Switchoff: "There is no obvious light switch."; ], has scenery; Mystery_Room rainy_mystery_basement "Rainy Mystery Basement", with name 'rainy' 'raining' 'mystery' 'basement', description [; if (rain in self) print "A light rain falls here, although it's not clear from where, since y"; else print "Y"; "ou're underground and the ceiling is made of concrete. The soil underneath your feet is soaked, yet still very hard. There are crawlways to the south and west."; ], ralph_thinks "~Just a little haunted shower, how nice!~", compass_look [dir; switch (dir) { u_obj: print "The ceiling seems like any normal, everyday"; if (rain in rainy_mystery_basement) print ", raining"; " concrete ceiling."; default: rfalse; } ], before [; Go: if (~~(rain in rainy_mystery_basement)) { ! FIXME This is too easy to miss. ! FIXME This even happens when you're unsuccessful. ! Perhaps both can be solved with an each_turn print "The rain stays in the room as you leave.^"; move rain to rainy_mystery_basement; } rfalse; ], s_to dark_mystery_basement, w_to [; return random_mystery_room(); ]; Object "soil" rainy_mystery_basement with name 'soil' 'ground' 'earth' 'dirt', description "The earth here is soaked, but as solid as rock.", ralph_thinks "~I couldn't dig it.~", before [; Take: "You can't dig into it."; ], has scenery; Object rain "rain" rainy_mystery_basement with name 'light' 'rain' 'mist', article "", describe [; return (parent(rain) == rainy_mystery_basement); ], description [; if (self in rainy_mystery_basement) { print "The light rain-- almost a mist-- falls from the concrete ceiling above, yet there are no cracks in the ceiling. The rain vanishes an inch before it strikes anything"; if (feather in rainy_mystery_basement) print ", except the feather, which is soaked"; "."; } print "The rain is, against all expectations, falling only "; if (parent(self) has container || self in player) print "within "; else print "on "; if (self in player) "your hand."; print_ret (the)parent(self), "."; ], ralph_thinks "~I don't think it'll go away.~", before [; Dry: "How do you expect that to work?"; Push,Pull: if (self in rainy_mystery_basement) "Hardly likely."; Take: if (self in rainy_mystery_basement && feather in rainy_mystery_basement) print "As you make a grab for the rain, you think you see something in the room move.^"; ], message_timer 0, each_turn [evnum; ! Similar to the each_turn for all mystery spot rooms, but ! tied to the Fibonacci sequence. The message_count ! doesn't have any significance; it's just what I could ! come up with. if (self notin rainy_mystery_basement) { self.message_timer++; return; } evnum = SelectRandomMessage(self.message_timer++, fibonacci, 9); if (evnum == 0) return; print "^"; switch (evnum) { 2,4,6,8: print "The rain briefly huddles in the "; switch (evnum) { 2: print "northwest"; 4: print "northeast"; 6: print "southeast"; 8: print "southwest"; } " corner, then returns to fill the room."; 1: "The rain stops in mid-air for a moment, then resumes."; 3: "The rain swirls around in a nonexistent wind briefly."; 5: print "The rain briefly falls in a small column"; if (IndirectlyContains(location, feather)) print ", only on the feather"; ", then returns to the entire room."; 7: "The rain turns to hail for a moment, then back to water."; 9: "The rain comes to a brief halt, then resumes its downpour."; } ]; Object feather "feather" rainy_mystery_basement with name 'wet' 'dry' 'jub-jub' 'jub' 'bird' 'contour' 'feather', short_name [; ! Beware of the obvious simplification: self.wet shouldn't ! be tested when self in basement, regardless of rain. if (self in rainy_mystery_basement) { if (rain in rainy_mystery_basement) print "wet "; } else if (self.wet) { print "wet "; } print "feather"; rtrue; ], wet true, describe [; if (location ~= rainy_mystery_basement) rfalse; if (rain in location) "^A feather lies on the ground."; "^A feather is flying around the room, darting and weaving like a bird."; ], ralph_thinks "~The elusive Jub-Jub bird, if I'm not mistaken. Long believed to be mythological.~", description [; print "The multihued contour feather "; if (self in rainy_mystery_basement) { if (rain in rainy_mystery_basement) "sits on the ground lifelessly. The fluffy barbs at the base are soaked through from the rain."; "flutters around near the ceiling, occasionally pausing as it changes direction. As it flies over your head, it almost looks and sounds like a bird, but when you turn around to face it, the feather remains a feather. Unusually animate, but still a feather."; } else { print "would normally contribute to the overall shape and color of a bird's plumage. Here, it's just one partridge of a foul puzzle. The feather "; if (self.wet) "is soaked through from the rain, and doesn't seem to have dried off at all."; print "occasionally flutters against "; if (parent(self) == player) print "your hand"; else print (the)parent(self); ", but generally sits idle and hasn't blown away."; } ], before [; Dry: if (self in rainy_mystery_basement) { print "The "; if (rain in rainy_mystery_basement) print "presence"; else print "absence"; print " of the rain seems to have more of an effect on the feather than your own efforts."; } if (self.wet) "Your efforts to dry the feather prove futile; the rain in the basement seems to be soaked into the fluffy barbs beyond mortal repair."; "The feather has remained perfectly dry since you picked it up."; Take: if (self in rainy_mystery_basement) self.wet = rain in rainy_mystery_basement; ! I briefly tried to update the synonyms WET and DRY, and ! the short_name, to give the player a clue. But that's a ! bit difficult to get right when the rain may be moving ! too. So now I just have short_name be a routine, and ! always allow WET and DRY. rfalse; Blow: if (self.wet) { move self to parent(actor); "The soaked feather falls like a pebble rather than wafting through the air like you expected."; } << Drop self >>; ], after [; Drop: if (self.wet) { if (location ofclass Sky) rfalse; "The feather lands at your feet with a wet thud and lifelessly sits on the ground."; } Achieved(10); print "The feather slows in mid-air, then suddenly transforms into a small jub-jub bird. The bird "; if (~~(location ofclass Sky)) print "hops and "; print "flutters around anxiously before "; if (location == meadow && worm hasnt moved) { Achieved(11); move worm to meadow; give worm moved; print "landing on the ground and pulling up a worm. At the sight of you standing nearby, it drops its lunch just as "; } print "it turns back into a feather"; if (location ofclass Sky) print " and falls back to Earth"; "."; Insert: if (second == hat && IndirectlyContains(location, ralph)) "Ralph says, ~Macaroni!~"; ]; ! Local variables: ! mode:inform ! inform-project-file:"Flibnaub.inf" ! End: