! This file is part of the game: Typo ! Copyright 2004 Kevin Lynn and Peter Seebach. Feel free to ! copy what you need as long as you give credit where it's ! due. No fair stealing. Dibs. #Ifdef TARGET_ZCODE; Zcharacter table + '@{00A9}'; Constant Headline "^Copyright @{00A9} 2004 Peter Seebach, Kevin Lynn, and Flavorplex^"; #Ifnot; Constant Headline "^Copyright 2004 Peter Seebach, Kevin Lynn, and Flavorplex^"; #Endif; Constant AMUSING_PROVIDED; Constant MAX_SCORE = 10; Constant Story "^Typo!"; Replace KeyboardPrimitive; Include "Parser"; ! ------- Override a few of the standard messages: Include ">mistype.inf"; Object LibraryMessages with before [; Strong: "[Flavorplex Psychic Typo Correction knows you don't really mean that.]"; ] ; Include "Verblib"; ! ------- globals: Global bugCount = 0; Global windowGazes = 0; Global simRunning = 0; ! 0 is on, not 0 is off Global runLevel = 0; ! 0=off, 1= 2= 3= 4= 5=running corrctly Global powerOn = 0; ! 0=off Global spigotsCleaned = 0; Global hosesCleaned = 0; Global consultations = 0; Global wireDeathCount = 0; ! number of electrocutions Global hoseDeathCount = 0; ! number of hose deaths Global paperDeathCount = 0; ! number of paper cut deaths Global pileDeathCount = 0; ! number of poisonings Global tubDeathCount = 0; ! number of butter poisonings Global maxDeathCount = 5; ! numberof ways to die Global rulesCount = 0; Global endgameCount = 0; Global fluid = 0; ! 1=black 2=red Statusline time; ! ------- Places: Class Place has light ; ! chamber uses general flag for init flag Place chamber "Hyper-mimetic Test Chamber" has scenery general, with name 'room' 'chamber' 'here' 'holodeck', initial [; if (self has general) { print "^A technician in a white lab coat speaks to you as she reads from a clipboard. ~Hello Test Subject! Welcome to the new Industrial Products Division of Flavorplex. Here we provide an interactive training environment which clients use to gain experience operating complex and dangerous industrial equipment without risking the loss of equipment or personnel...~ She lowers the clipboard and rolls her eyes. ~Anyway, today we're testing out the PTECS --the Psychic Typo Error Correction System. So what we'd like you to do is just use this field service manual to respond to problems with the machine when they pop up. We'll be measuring the efficiency with which you perform the standard tasks, and comparing your performance to previous tests we ran without PTECS.~^ She hands you a manual. ~Here watch, I'll demonstrate:~^^>"; FakeInput("inventree"); print "[Flavorplex Psychic Typo Correction has divined that you want to ~inventory~]^"; print "You are carrying:^"; print " the Field Service Manual^^"; print "~Impressive, isn't it.~ She opens her mouth to speak again, but seems to think better of it. As she leaves the room, the padded door closes behind her without a sound.^"; give self ~general; give player light; }; ], description [; print "You are in the Flavorplex Hyper-mimetic Test Chamber, where experimental new technologies are evaluated. The walls of this room are covered from floor to ceiling with thick, soft padding. There's a window in the north wall, and you can make out the outline of the door by which you entered in the south wall. "; if (simRunning > 0) { print "The room is dominated by the presence of a large machine in its center. Standing next to the machine is a supply cabinet."; }; print_ret ""; ], n_to atwindow, s_to atdoor; Place atwindow "Hyper-mimetic Test Chamber, At The Window" has scenery, with name 'room' 'chamber' 'here' 'holodeck', description [; print "The only window in the room is here, interrupting the padding at about 5 feet above the floor and continuing almost to the ceiling. "; if (simRunning > 0) { print "The room is dominated by the presence of a large machine in its center. Standing next to the machine is a supply cabinet."; }; print_ret ""; ], s_to chamber; Place atdoor "Hyper-mimetic Test Chamber, near the door" has scenery, with name 'exit' 'door' 'doorway', description [; print "You are at the padded door at the south end of the room. There is no handle, or hardware of any kind on this side of the door. "; if (simRunning > 0) { print "The room is dominated by the presence of a large machine in its center. Standing next to the machine is a supply cabinet."; }; print_ret ""; ], before [; Examine: if (noun == "window") { "You can't see through the window from here."; }; ], n_to chamber; ! ------- stuff: Object paddeddoor "exit door" atdoor has scenery door openable ~open, with name 'door' 'padded door' 'exit', description "The door is completely covered with soft padding, either as a safety precaution or sound-proofing. Beyond the door you know that your employer is monitoring your progress.", before [; if (location ~= atdoor) { PlayerTo(atdoor,1); print "You cross the room and approach the door. "; }; open: print_ret "The door appears to be locked from the outside."; knock: print_ret "Not surprisingly, this action produces almost no sound."; taste: "It tastes a little like... marshmallow?"; ], found_in atwindow chamber atdoor ; Class PaddedWall has scenery, with description "A large window fills the upper half of the north wall.", before [; Attack: "Not only did that not hurt, but it was almost pleasant! This is some great padding!"; Push: "Your entire hand disappears momentarily into the padding. Now THAT'S soft!"; Touch: "Yep, soft."; taste: "It tastes a little like... marshmallow?"; ] ; PaddedWall north_wall "north wall" has scenery, with name 'padded' 'north' 'wall' 'pad', found_in atwindow chamber atdoor ; PaddedWall south_wall "south wall" has scenery, with name 'padded' 'south' 'wall' 'pad', description "You can just see the outline of the door by which you entered.", found_in atwindow chamber atdoor ; PaddedWall east_wall "east wall" has scenery, with name 'padded' 'east' 'wall' 'pad', description "The eastern wall of the chamber is completely covered with padding.", found_in atwindow chamber atdoor ; PaddedWall west_wall "west wall" has scenery, with name 'padded' 'west' 'wall' 'pad', description [; if (simRunning > 0) { "There is a standard telephone jack within easy reach on the west wall."; } else { "The west wall is completely covered with padding."; } ], found_in atwindow chamber atdoor ; Object padding "padding" has scenery, with name 'soft' 'padding', description "The soft padding covers all four walls of the chamber.", before [; Attack: "Not only did that not hurt, but it was almost pleasant! This is some great padding!"; Push: "Your entire hand disappears momentarily into the padding. Now THAT'S soft!"; Touch: "Yep, soft."; ], found_in atwindow chamber atdoor ; Object socket "wall jack" west_wall has scenery container transparent open absent, with name 'telephone' 'phone' 'socket' 'jack' 'outlet', description [; print "It's a ", (em) "standard", " telephone jack, which means we don't have to provide any more description. "; if (wire in self) { print "The thin wire is plugged into the phone jack."; }; print_ret ""; ], before [; ], found_in chamber atwindow atdoor ; Object window "window" atwindow has scenery ~open, with name 'window' 'glass' 'lattice' 'control' 'skyline' 'city' 'street' 'sidewalk', before [; if (location ~= atwindow) { PlayerTo(atwindow,1); print "You cross the room and approach the window. "; }; Knock: "You knock, but it's not clear whether anyone heard you."; LookThru: <>; Search: <>; Open: "You try the window, but it's not the kind of window that can be opened."; Attack: "Unbreakable glass, apparently."; ], description [; if (simRunning > 0) { if (sline2 % 2 == 0 && windowGazes < 5) { print "As you look out at the cityscape, your attention is drawn to "; if (windowGazes == 0) { windowGazes++; print_ret "a funny little pizza delivery car as it cruises slowly along the street."; } if (windowGazes == 1) { windowGazes++; print_ret "the annual Running of the Cats!."; } if (windowGazes == 2) { windowGazes++; print_ret "a marching band, complete with drill team. Are they really playing a John Cage composition?"; } if (windowGazes == 3) { windowGazes++; print_ret "a giant rodent of some kind?! No, of course it's someone in a costume."; } if (windowGazes == 4) { windowGazes++; print_ret "a dirigible drifting lazily across your view. Somewhere beyond the door, your employer is surely noting your lack of focus."; } } else { print "You gaze out the window at the city skyline and the street below. "; print_ret (string) random("It is snowing lightly.", "The heavy clouds are darkening as evening approaches."); } } else { print "Peering through the glass, you see what appears to be a control room. The technician you met before is there, along with a man in a lab coat.^^ The technician leans toward a microphone and you hear a voice from above saying ~Alright, let's begin the simulation.~ The man in the lab coat does something, and suddenly your view of the control room is replaced by a city skyline. You turn around to see that the room has changed as well.^"; give machine ~absent; give wire ~absent; give pipe ~absent; give door1 ~absent; give door2 ~absent; give tube ~absent; give sauce ~absent; give belt ~absent; give hose1 ~absent; give hose2 ~absent; give barrel1 ~absent; give barrel2 ~absent; give hatch ~absent; give panel ~absent; give blueswitch ~absent; give greenswitch ~absent; give yellowswitch ~absent; give bluelight ~absent; give greenlight ~absent; give yellowlight ~absent; give hopper ~absent; give socket ~absent; give cabinet ~absent; move cabinet to chamber; move machine to chamber; PlayerTo(atwindow,1); simRunning = 1; } ], found_in atwindow chamber atdoor, s_to chamber ; Object car "funny little car" atwindow has scenery, with name 'funny' 'car' 'Frank' 'Gehry', description [; if (windowGazes == 1) { "It has all the usual features of a car, but it's not quite like any car you've seen before. Imagine if Frank Gehry were to design a car."; } if (windowGazes > 1) { "You glance out the window, but the car is gone."; } if (windowGazes < 1) { "There are no cars in sight.^"; } ], before [; Take: if (windowGazes == 1) { "You'll have to content yourself with looking at the car."; } else { "There are no cars in this chamber."; } ] ; Object cats "cats" atwindow has scenery animate, with name 'running' 'cats' 'cat' 'event', description [; if (windowGazes == 2) { "You watch through the window as the event proceeds. Despite the many injuries that are reported each year, it remains wildly popular."; } if (windowGazes > 2) { "A quick peek through the window confirms that the cats are gone."; } if (windowGazes < 2) { "There are no cats in sight.^"; } ], before [; Take: if (windowGazes == 2) { "You'll have to content yourself with looking at the cats."; } else { "There are no cats in this chamber."; } ] ; Object band "marching band" atwindow has scenery animate, with name 'marching' 'band' 'parade' 'drum' 'major', description [; if (windowGazes == 3) { "Through the window, you can't see much more than thefFunny hats, funny synchronized walk, and shiny instruments. You watch as the drum major leads them down the street."; } if (windowGazes > 3) { "You can no longer see or hear the band."; } if (windowGazes < 3) { "There is no band here.^"; } ], before [; Take: if (windowGazes == 3) { "You must have known that wouldn't work."; } else { "There is no band here.^"; } Listen: if (windowGazes == 3) { "The sound is muted by the glass."; } else { "There is no band here.^"; } ] ; Object varment "giant rodent" atwindow has scenery animate, with name 'giant' 'rodent' 'varment' 'costume' 'rat', description [; if (windowGazes == 4) { "It's an absurd sight. You watch as the giant rodent walks upright along the street."; } if (windowGazes > 4) { "Rats. You can no longer see the giant rodent."; } if (windowGazes < 4) { "There is no such contamination here."; } ], before [; Take: if (windowGazes == 4) { "It's outside. You're inside."; } else { "There is no such contamination in this chamber."; } ] ; Object blimp "dirigible" atwindow has scenery, with name 'blimp' 'dirigible' 'airship' 'ship' 'zeppelin', description [; if (windowGazes == 5) { "You watch through the window as the massive airship floats by."; } if (windowGazes > 5) { "Only the memory of the dirigible remains."; } if (windowGazes < 3) { "No blimps here."; } ], before [; Take: if (windowGazes == 3) { "It's the size of a building!"; } else { "No zeppelins to be taken."; } ] ; Object heap "pile of mush" theDark has edible, with name 'pile' 'mush' 'heap' 'food', description "A festering heap of mush.", before [; Smell: "The fumes cause your eyes to water."; Take: "The slimey consistency of the pile of mush makes it impossible to pick up."; Taste: pileDeathCount++; deadflag = 1; print "That's odd. It doesn't taste anything like it smells."; rtrue; Eat: pileDeathCount++; deadflag = 1; print "That's odd. It doesn't taste anything like it smells."; rtrue; ] ; Object tub "tub of Dear God, Don't Let That Be Butter" theDark has edible openable ~open, with name 'label' 'thick' 'black' 'substance' 'tub', description [; print "This is a small tub containing a thick black substance which seems to move under its own power. "; ; if (self has open) print "The tub contains a thick black substance."; print_ret ""; ], before [; Consult, Read: "The tub is labeled ~Dear God, Don't Let That Be Butter~. "; Listen: "It whispers dark concepts in a language that bypasses your conscious mind entirely. Thoughts of death fill your head."; Smell: "It smells of death and decay."; Open: "Opening the tub reveals a thick black substance."; Taste: tubDeathCount++; deadflag = 1; print "That's odd. Most people would not have been able to force that down."; rtrue; Eat: tubDeathCount++; deadflag = 1; print "That's odd. Most people would not have been able to force that down."; rtrue; ] ; Object box "pizza box" theDark has edible ~open openable supporter, with name 'container' 'cardboard' 'pizza' 'carton' 'box', description [; print_ret "It's a box containing, according to the receipt tag, an extra large pizza."; ], before [; Open: print "That would be against the rules"; if (rulesCount > 0) " too."; else { rulesCount++; "."; } Eat: print "That would be against the rules"; if (rulesCount > 0) " too."; else { rulesCount++; "."; } Taste: print "That would be against the rules"; if (rulesCount > 0) " too."; else { rulesCount++; "."; } Smell: if (self in player) { "You take a moment to stop and smell the pizza. Mmmm. There must be some way to eat around the ~mystery topping~."; } else { "You can't smell there from here. (You'll need to be holding the box.)"; } Take: move self to player; EndGameSub(); rtrue; ] ; Object receipt "pizza receipt" box with name 'label' 'packing' 'list' 'delivery' 'bill' 'receipt' 'tag', description [; print "The address on the label is: 4024 Eucalyptus Street. The price is $15. According to the receipt, the box contains an extra large pizza with pepperoni, anchovies, extra cheese, pineapple, and one ~mystery~ topping"; if (crust1 in door1 or door2 || heap in door1 or door2) " which you know to be the crusty brown stuff you scraped off of the spigot."; else if (crust2 in door1 or door2 || heap in door1 or door2) " which you know to be the gooey white stuff you scraped off of the spigot."; else if (tub in door1 or door2) " which you know to be ~Dear God, Don't Let That Be Butter~."; else if (spigotsCleaned < 2) " which you realize must be the gunk from the spigot which you failed to clean."; else if (hosesCleaned < 2) " which you realize is really the crusty stuff from the hose which you failed to clean."; else "."; ], before [; Take: "Removing the receipt from the pizza box would render it undeliverable."; ] ; Include ">manual.inf"; ! ------- machine components: Include ">machine.inf"; ! ------- people: Class Person with courtesyFlag ; Person techy "Flavorplex Technician" theDark has female proper animate, with courtesyFlag, name 'lady' 'young' 'woman' 'ditz' 'cynthia' 'bracegirdle' 'tech', description "Police Sgt Duffy appears to be experienced, efficient, and fair. From his appearance you can tell that he has an acerbic wit, and a love for beagles. You suspect that he snores. But then, you were asking about Cynthia, weren't you.", grammar [; self.courtesyFlag = false; ! could refuse if not true wn = verb_wordnum; if (NextWord() == 'please') { self.courtesyFlag = true; print "Courtesy flag is waiving!^"; verb_wordnum = wn; } ], life [; Give: if (noun == manual) { move noun to self; "~Thanks, I must have dropped it.~^"; } else { "I hope you're not trying to bribe me with that!"; } ], orders [; Go: "~I'll wait for you here.~"; Consult, Read: if (noun in techy) { switch (noun) { manual: "What manual? There's a manual?"; default: "~What's the word I'm looking for, ah yes, illegible. Can't be read.^~"; } } else { "~I can't read what I don't have. Or rather, I can, and I definitely don't have ", (the) noun, ".~^"; } NotUnderstood: "~Was that a joke? No wait, that was a pun, right? Or a palindrome, maybe?~"; default: "~You are not the boss of me.~"; ], before [; ]; ! ------- main: [ Initialise; SetTime(60 * 16, 1); location = chamber; lookmode = 2; notify_mode = false; box "Non-Disclosure Agreement^"; print "The undersigned, (hereinafter referred to as ~Recipient~), in consideration of having received information regarding an idea entitled ~Psychic Typographical Error Correction System~, (hereinafter referred to as the ~Idea~), for the purpose of testing and evaluation, and Flavorplex, a corporation according to the laws of the Commonwealth, (hereinafter referred to as ~Owner~), hereby agree that:^ 1. Recipient will maintain the information concerning the Idea obtained from Owner in strict confidence.^ 2. This Agreement shall remain in force and effect for one (1) thousand years from the date set forth below.^ The rights and duties of either party under this Agreement may not be assigned or delegated without the written consent of the other party. This Agreement shall be construed under the laws of the Commonwealth.^^"; print "Press any key to accept the agreement."; PressAnyKey(); move manual to player; new_line; ]; ! ------- verbs: Verb meta 'bug' * -> BugReport * noun -> BugReport; Verb meta 'typo' * -> BugReport * noun -> BugReport; Verb meta 'about' * -> About; Verb meta 'credits' * -> About; Verb meta 'walkthru' * -> Walkthru; Verb meta 'walkthrough' * -> Walkthru; Verb 'rtfm' * -> RTFM * topic -> RTFM; Verb 'lookup' * topic -> RTFM; Verb 'man' * topic -> RTFM; Verb 'face' * noun -> Face; Verb 'knock' * "on" noun -> Knock; Verb 'plug' * noun 'in' noun -> Insert * noun 'into' noun -> Insert; Verb 'install' * noun 'in' noun -> Insert * noun 'into' noun -> Insert; Verb 'connect' * noun 'to' noun -> Insert; Verb 'unplug' * noun -> Take; Verb 'find' * noun -> Take; Verb 'use' 'employ' 'utilise' 'utilize' * noun -> User; Verb 'disconnect' * noun -> Take * noun 'from' noun -> Take; Verb 'lift' * noun -> Push; Verb 'shake' * noun -> Shaker; Verb 'engage' * noun -> SwitchOn; Verb 'disengage' * noun -> SwitchOff; Verb 'flip' * noun -> Flipper * noun 'on' -> SwitchOn * noun 'off' -> SwitchOff; Verb 'toggle' * noun -> Flipper * noun 'on' -> SwitchOn * noun 'off' -> SwitchOff; Verb 'vi' * noun -> Vi; Verb 'edit' * noun -> Vi; Verb 'gaze' * -> Look * noun -> LookThru * 'out' noun -> LookThru * 'through' noun -> LookThru; Verb meta 'help' * -> Help * noun -> Help; Verb meta 'hint' * -> Help * noun -> Help; ! ------- common subroutines: [ HelpSub; if (noun > 0) print_ret "If you need help with ", (the) noun, " you might try consulting the Field Service Manual about it."; else "Everything you need to know is supposedly in the Field Service Manual. Try CONSULT MANUAL ABOUT . Additional hints are available in the hints file that came with the game, and at the Flavorplex web site: http://www.flavorplex.com/support.html"; ]; [ WalkthruSub; "Sorry, we don't have one of those. There is a hints page, though. It's available online at www.flavorplex.com/support.html "; ]; [ PowerUpSub; ! initial text: print "When you flip the power switch to the ~on~ position, a humming sound from deep inside the machine indicates that it has been activated. "; powerOn = 1; ! determine run level: runLevel = 1; if (blueswitch has on) { runLevel = 2; if (yellowswitch has on) { runLevel = 3; if (greenswitch has on) { runLevel = 4; } } } ! level one (wire and blue switch): if (powerOn == 1) { BlueSwitchOnSub(); } ! level two (hoses and carts and yellow switch): if (powerOn == 1) { YellowSwitchOnSub(); } ! level three (tray, cardboard, green switch): if (powerOn == 1) { GreenSwitchOnSub(); } if (runLevel <= 0) score = 0; if (runLevel == 1) score = 2; if (runLevel == 2) score = 4; if (runLevel == 3) score = 6; if (runLevel >= 4) score = 8; print "^"; ]; [ PowerDownSub; if (powerOn <= 0) "The power is already off."; powerOn = 0; give greenlight ~flashing; give bluelight ~flashing; give yellowlight ~flashing; score = 0; fluid = 0; ! finally, return text: "You flip the switch to the ~off~ position. As the humming fades away, a final exhaust of gas sounds almost like a sigh. The machine has been deactivated."; ]; [ BlueSwitchOnSub; if (powerOn) { if (blueswitch has on) { print "Soon the machine begins to emit a series of electronic beeps. "; if (wire in socket) { print "After flashing for a few moments, the blue light remains on. "; give bluelight ~flashing; give bluelight on; score = 4; } else { give bluelight flashing; print "You notice that a blue light on the control panel has begun flashing. "; } } OutputSub(); } else print "Nothing happens. Given that the power is off, this is not surprising. "; ]; [ YellowSwitchOnSub; if (powerOn) { if (yellowswitch has on) { print "Next, you hear what sounds like a flame igniting somewhere inside the machine. "; if ((hose1 in barrel1) && (hose2 in barrel2) && (standard in compartment1) && (premium in compartment2) && (door1 hasnt open) && (door2 hasnt open) && (bluelight has on)) { give yellowlight on; give yellowlight ~flashing; score = 6; fluid = 2; print "The yellow light flashes a few times, then remains on. From inside the machine comes a long sequence of clinking, clanking, and hissing noises, followed by what can only be described as a flushing sound. A wave of heat emanates from the machine and washes over you. Red fluid begins bubbling through the tube on top of the machine. "; } else { give yellowlight flashing; print "You notice that a yellow light on the control panel has begun flashing. "; if ((hose1 in barrel2) || (hose2 in barrel1) || (hose1 in barrel1) || (hose2 in barrel2) || (standard in door1) || (standard in door2) || (premium in door1) || (premium in door2)) { fluid = 1; print "You smell something strange, like a combination of mustard and vanilla. Thick black fluid oozes through the tube on top of the machine. "; } } } OutputSub(); } !if powerOn else print "~click~"; ]; [ GreenSwitchOnSub; if (powerOn) { if (greenswitch has on) { print "The humming of the machine increases to a roar, and the entire assembly begins to vibrate perceptibly. "; if ((tray in machine) && (bundle in hopper) && (bluelight has on) && (yellowlight has on)) { give greenlight on; give greenlight ~flashing; score = 8; if (spigotsCleaned == 2 && hosesCleaned == 2) score = 9; } else { give greenlight flashing; print "The green light on the control panel has begun flashing. "; } } OutputSub(); } else print "If you tally up all the things that happen as a result, it adds up to zero. "; ]; ! produce pizza or other according to machine state [ OutputSub; if (powerOn) { ! make pizza: if (greenlight has on && bluelight has on && yellowlight has on) { if (box in theDark) { move box to belt; print "The conveyor belt begins to move and as the panel lifts, a flat box emerges and is carried out of the machine before the conveyor stops and the panel closes. "; } ! no! this will print after each switch on sub: !else ! print "Apparently, the machine only comes with ~demo~ cartridges, ! which only contain enough ingredients for 1 production run. "; } ! make something else: else { if ((bluelight has on || bluelight has flashing) && (yellowlight has on || yellowlight has flashing) && (greenlight has on || greenlight has flashing)) { if ((hose1 in barrel2) || (hose2 in barrel1) || (hose1 in barrel1) || (hose2 in barrel2) || (standard in door1) || (standard in door2) || (premium in door1) || (premium in door2)) { if (hose1 in barrel2 && tub in theDark) { print "The conveyor belt begins to move and as the panel lifts, a small tub is carried along the conveyor belt and drops onto the floor. The tub is labeled ~Dear God, Don't Let That Be Butter~. "; move tub to chamber; } else { print "Suddenly the conveyor belt begins to move. The hatch opens and a pile of mush that smells like "; switch(random(3)) { 1: print "hot peppers and looks like ice cream"; 2: print "rotten eggs and looks like desiccated fruit cake"; 3: print "cat food and looks like grey cottage cheese"; } print " is carried along the length of the conveyor, then plops onto the floor"; if (heap notin theDark) print ", enlarging the heap of mush. "; else print ". "; move heap to chamber; } } } } } ]; [ ShakerSub; print "You shake ", (the) noun, ", but nothing much happens.^" ; rtrue; ]; [ ReadSub; <>; ]; ![ StrongSub; ! print "[Flavorplex Psychic Typo Correction knows that you didn't mean that.]"; ! rtrue; !]; [ PressAnyKey k; @read_char 1->k; return k; ]; [ BugReportSub; if (bugCount % 5 == 0) { print "A disembodied voice says:^ ~Hello, this is Euripides Managua speaking, Vice President in charge of quality control here at Flavorplex. We hope you are enjoying your job as Test Subject Number 12!^ Your job is extremely important to our company, but in a way that doesn't require us to pay you very much. It is our goal to find and correct every bug and typographical error in the system you are testing. Should you discover a problem or an error, please take the time to report it to support@@64flavorplex.com.~^"; } bugCount = bugCount + 1; rtrue; ]; [ AboutSub; print_ret (string) ( "Typo is Copyright Kevin Lynn and Peter Seebach. All dibs reserved. ^This game benefits greatly from Cedric Knight's mistype.h library. ^Thanks also to Dunn Brothers Coffee for the concoctions and the free WiFi."); ]; [ Amusing; "For additional information about this and other Flavorplex games, or to register a complaint, be sure to visit our website: ^ http://www.flavorplex.com/ ^^Of particular interest is the hints file: ^ http://www.flavorplex.com/typo/hints.html^ "; ]; [ FlipperSub; !debug print "~They call me Flipper, Flipper, master of ", (name)noun, ".~ "; if (noun > 0) { if (~~(noun == blueswitch or yellowswitch or greenswitch or powerswitch)) { print_ret "Lacking in wrestling and judo expertise, you instead mutter some flippant remarks at ", (the) noun, " under your breath."; } if (noun has on) <>; else <>; } ]; [ StandSub; "Let's agree not to bother with obvious implied actions like standing before walking and thinking before speaking.^"; ]; [ FaceSub; "You are now facing ", (the) noun, "."; ]; [ LookThruSub; "The ", (string) noun, " is opaque.^"; ]; [ KnockSub; print "This action produces a knocking sound.^"; ]; [ RTFMSub; if (consult_from >0) { <>; } else "Try ~consult manual about ~"; ]; [ UserSub; "What do you want to do with ", (the) noun, "?"; ]; [ em x; style bold; print (string) x; style roman; ]; [ ViSub; print "You cannot edit the ", (name)noun; print_ret "."; ]; [ PrintRank deathCount; print ", earning you the rank of "; if (score == 10) "Qualified Pizza Professional. "; if (score >= 9) print "Mostly Ept. "; else if (score >= 6) print "Inept. "; else if (score >= 3) print "Minor Disappointment. "; else print "Major Disappointment. "; if (wireDeathCount > 0) deathCount++; if (hoseDeathCount > 0) deathCount++; if (paperDeathCount > 0) deathCount++; if (pileDeathCount > 0) deathCount++; if (tubDeathCount > 0) deathCount++; if (endgameCount < 1) { if (deathCount <= 0 && deadflag == 2) "What's more, you managed it without getting yourself injured or killed."; if (deathCount <= 0) "On the other hand, you haven't managed to get yourself killed yet."; else print "On a brighter note, you've managed to find "; print deathCount; print " out of a possible "; print maxDeathCount; print_ret " ways to kill yourself."; } ]; [ CleanerSub; switch (random(4)) { 1: print_ret "You apply a generous amount of nature's cleaning compound (elbow grease) until ", (the) noun, " looks new again. "; 2: print_ret "It's pretty clean. Not so clean that you would eat off of it, but cleanish."; 3: print_ret "Have you considered becoming a janitor? You know, the people at Flavorplex can help you with that."; 4: print_ret "Consider it cleaned."; } ]; [ TakeAllSub ; print "You'll have to specify what it is you want to "; print_ret (address) verb_word, "."; ]; [ MyVerifySub ; ; "Intact, yet tactless. Verily."; ]; [ EaterSub ; if (noun >0 && noun == box) { ; } else ; ]; [ AfterLife; print " As your consciousness fades you hear voices from somewhere...^"; em("^ *** You have died. ***^^"); switch(random(3)) { 1: print "~You could kind of see that one coming, couldn't you.~^"; 2: print "~That's disgusting!~^"; 3: print "~Eeeewwww!~^"; } switch(random(3)) { 1: print "~Now THAT'S why customers will be lining up to book time in the Hyper-mimetic Test Chamber!~^"; 2: print "~I don't think I'll ever get used to seeing that.~^"; 3: print "~That would make a fun obituary!~^"; } print "~How many moves was that? Who had ", turns, " in the pool...~^"; if (consultations == 0) print "~Never once looked at the manual!~^"; else { switch(random(2)) { 1: print "~It's a good thing that wasn't real pain!~^"; 2: print "~YES! I knew it! Pay up, Cyn!~^"; } } print "~Engaging UNDO system now.~^"; print "^After a moment of disorientation, your surroundings seem to stabilize.^"; ; deadflag = 0; ]; [ EndGameSub ; endgameCount++; print "[Flavorplex Psychic Typo Correction has divined that you want to ~bake the socks~]^"; print "You can't see any such thing. --And even if you could, trying to bake the socks wouldn't make any sense.^^"; FakePrompt(); print "[Flavorplex Psychic Typo Correction has divined that you want to ~kill self with wire~]^"; if (wire in socket) print "Much to your own surprise, you unplug the wire and wrap it around your neck! "; else if (wire in player) print "Much to your own surprise, you wrap it around your neck! "; else print "Much to your own surprise, you take the wire and wrap it around your neck! "; print "Only the inadequate length of the insulated wire prevents you from hanging yourself with it.^^"; FakePrompt(); print "[Flavorplex Psychic Typo Correction has divined that you want to ~purloin knife. kill self with knife~]^"; print "~Oh no. No no no...~^"; print "Out of nowhere, a dagger suddenly appears in your hand.^"; print "~Shut it down! Shut it down now!~^"; print "As you plunge the nasty knife into your chest, the room seems to shift and fade around you.^"; print "~Engaging UNDO system now!~^"; print "^After a moment of disorientation, your surroundings seem to stabilize.^"; print "^"; em("Wicker Room"); print"^"; print "This room is full of half-finished wickerwork projects. Some of them are quite impressively ambitious, but almost none of them are complete. A doorway leads south. There is a giant snake here!^^"; FakePrompt(); print "[Flavorplex Psychic Typo Correction has divined that you want to ~kill self with snake~]^"; print "~SHUT IT DOWN!~^"; print "~I'm trying! It's not responding!~^"; print "~Try anything!~^"; print "The room seems to melt around you, as your surroundings change.^"; print "^"; em("Left of Car"); print"^"; print "You see cars zipping by, most of them paying you no attention at all. Occasionally, one seems to slow down a little; perhaps you could attract some attention.^^"; FakePrompt(); print "[Flavorplex Psychic Typo Correction has divined that you want to ~throw self at traffic~]^"; print "~Try to buy some time. I'm going to go shut down the power!~^"; print "~Hurry!~^"; print "Dizziness nearly overcomes you as your surroundings abruptly change.^"; print "^"; em("Bay and 39th"); print"^"; print "You are at the intersection of Bay and 39th. The bay lies to the north. To the southwest lies the warehouse. To the southeast you see the tobacconist's shop. To the northwest is a shipping office. To the northeast you can see the docks. The snow has eased up, but it's still cloudy.^^"; FakePrompt(); print "[Flavorplex Psycho Typo Correction has decided that you want to ~jump in bay~]^"; print "You plunge into the icy water of the bay and immediately begin to sink. A strange calmness comes over you. You notice the pizza box descending nearby, and for some reason you decide to grab it. You can still hear the disembodied voices, but now they are garbled by the water.^"; print "~Hold your breath! I'll try the UNDO system again!~^"; print "^"; em("Creepy Porch"); print"^"; print "The door looks quite weathered with age. It has been painted with lamb's blood in an effort to keep door-to-door salesmen at bay. Faded numbers identify the address as 4024. A heavy bronze door knocker is attached to the door by a single rusty nail; the other nails seem to have fallen off, and the knocker is at an angle which was surely not chosen by any mortal hand. You are holding the pizza box, shifting it from hand to hand to keep from burning yourself.^^"; print "Your surroundings change again, and your're back in the test chamber. The machine is gone, replaced with the technician in the white lab coat.^"; print "^~I'm so, so sorry!~ she says. ~That's almost NEVER happened before! You're alright aren't you? I mean, the room did work, in the end. I don't understand it, we've been testing this thing for months; every time we think we've got it, there's another impossible setback. It's insane....~^"; print "She stops and looks at you sympatheticly. ~Anyway, you don't care about our problems. Here's your money, and a little extra for your trouble. Hey, it'll make a great story, right? How many people can say they were almost killed by a spell checker! Oh, and please keep the pizza with our compliments.~^^"; score = score + 1; deadflag = 2; ; ]; Array inputscratch buffer 100; [ FakePrompt p; inputscratch->0 = 100; print ">"; p = 0; @aread inputscratch p ; ]; [ FakeInput str i j k; @output_stream - 1; @output_stream 3 inputscratch; print (string) str; @output_stream 1; @output_stream - 3; style bold; k = 0; for (i = 0 : i < inputscratch-->0 : ++i) { j = 6; if (~~k) @read_char 1 j AlwaysTrue -> k; ! Work around Frotz bug. if (k == '?') k = 0; print (char) inputscratch->(i+WORDSIZE); } j = 12; @read_char 1 j AlwaysTrue -> k; style roman; print "^"; ]; [ AlwaysTrue; rtrue; ]; ! ------- inform lib and extensions: Include "Grammar"; Extend 'consult' * noun -> Consult; Extend only 'consult' * 'about' noun -> RTFM; Extend only 'read' * 'about' noun -> RTFM; Extend 'stand' * -> Stand; Extend 'look' * 'out' noun -> LookThru; Extend 'verify' replace * -> MyVerify; Extend 'put' * noun 'under' noun -> Insert; Extend only 'attach' replace * noun 'to' noun -> Insert; Extend 'screw' * noun 'to' noun -> Insert * noun 'into' noun -> Insert * noun 'onto' noun -> Insert; Extend only 'clean' replace * noun -> Cleaner; Extend only 'take' replace * noun -> Take * noun 'from' noun -> Take * 'all' -> TakeAll; Extend only 'remove' replace * noun -> Take * noun 'from' noun -> Take; Extend 'eat' replace * noun -> Eater; !probably a bad idea: !Extend 'press' replace ! * noun -> Flipper;