Constant Story "CHEESESHOP"; Constant Headline "^An interactive re-creation of the famous Cheeseshop sketch by Monty Python's Flying Circus^ Program code by David Welbourn (dswxyz@@64look.ca)^ (Type ABOUT if you wish to learn a little more about this game.)^"; Release 2; Serial "021230"; Constant MAX_SCORE = 0; Constant DIALECT_US = 1; Constant AMUSING_PROVIDED; Constant DEATH_MENTION_UNDO; Constant NO_PLACES; Attribute topicattr; Attribute shootable; Replace BuySub; Replace DrawStatusLine; Replace InvSub; Replace ScoreSub; Replace ThinkSub; Include "Parser"; Object LibraryMessages ! see section 21 of the manual with before [; ! and english.h Miscellany: switch(lm_n) { 4: print " You have gained satisfaction "; rtrue; 19: " You, Mr. Mousebender, are an English gentleman, in search of cheesy comestibles. In other words, you wish to buy some cheese."; 30: " You can't see any such thing."; 37: " You can only do that to a person - preferably, a living person."; 38: " I don't recognize that verb."; 39: " That's not something you need to refer to in the course of this game."; 49: print " What do you want"; if (actor~=player) print " ", (the) actor; print " to "; PrintCommand(); "?"; } Answer: if (second == player) " Talking to yourself again?"; Ask, Tell: if (lm_o == player) " Talking to yourself again?"; Attack: " That's hardly the gentlemanly thing to do."; Climb, Jump, JumpOver, Sleep, Tie, Fill: " Why would you want to do that?"; Cut, Dig, Burn, Consult: " Why would you want to do that? And how?"; Drop: switch(lm_n) { 1: if (lm_o has pluralname) print " ", (The) lm_o, " are "; else print " ",(The) lm_o, " is "; "already here."; 2: " You haven't got ", (thatorthose) lm_o, "."; } Listen: " You hear nothing unusual."; Mild: " I can't say that I blame you, really."; No: " Well, of course not."; Pray : " Sadly, your prayer is ignored."; PutOn: if (lm_n == 4) " That's not possible."; Search: if (lm_n == 4) " You find nothing of interest."; Sing: " You haven't sang in public since that incident in Liverpool, and you're not about to start now."; Smell: if (lm_o == player) " You smell nothing unusual. The deodorant must be working."; " You smell nothing unusual."; Sorry: " No need to apologize."; Squeeze: switch(lm_n) { 1: " That's hardly the gentlemanly thing to do."; 2: " You achieve nothing by this."; } Strong: " My word. Try to keep up a stiff upper lip, eh what?"; Take: if (lm_n == 2) " I beg your pardon? You don't need to take yourself, since you are yourself. (Although whether Immanuel Kant would say you possess either your noumenal self or your phenomenal self, I really couldn't say.)"; Taste: " Right now, unless it's made of cheese, you don't want to taste it."; Touch: switch(lm_n) { 1: " ~Reach out and touch someone~ may be fine for telephone repairmen, but not for a gentleman like yourself."; 2: " You feel nothing unusual."; 3: " Okay. You verify that you're still here. Now what?"; } Wait: " You take a dramatic pause."; Wake, WakeOther: " No one is asleep."; Yes: " Well, of course."; ]; Include "VerbLib"; [ Amusing; "Did you try: ^... EXAMINE SHOP when outside? ^... GO a direction other than south from Outside Shop? ^... TAKE ALL when in the shop? ^... ASK the shopkeeper about non-cheese items, like the cat? ^... DANCE in the shop? (It is licensed for public dancing, after all) ^... DANCERS, SHUT UP after the music has become annoying? ^... Avoid doing BUY CHEESE or GREET MAN (or similar commands) until after the dancers are gone, and then GREET MAN? ^... EXAMINE GUN twice? ^... TAKE the corpse or ASK it about something? ^... RING BELL after you've killed the shopkeeper? Multiple times? ^... XYZZY? ^^Also, if this game has made you hungry for more cheese-filled adventures, I recommend a visit to the Cheese-Friendly Game Directory at http://emshort.home.mindspring.com/cheese.htm, maintained by Emily Short."; ]; ! Because of the nine-char limit on tokenization, we must fiddle with the ! input stream to distinguish between "saint-andre" and "saint-andrews". ! Likewise, between "st-andre" and "st-andrews". (Hyphens count as 2 Zchars.) [ BeforeParsing x; wn = 1; for(x=NextWordStopped() : x~=-1 : x=NextWordStopped()) { if (x == 'saint-an') { if (WordLength(wn-1)>11) parse-->(2*(wn-1)-1) = 'andrews'; else parse-->(2*(wn-1)-1) = 'andre'; } else if (x == 'st-andre') { if (WordLength(wn-1)>9) parse-->(2*(wn-1)-1) = 'andrews'; else parse-->(2*(wn-1)-1) = 'andre'; } } ]; [ ChooseObjects obj code; if (code == 0 or 1) rfalse; if (action_to_be == ##Push) { if (obj == handbell) return 1; } else if (action_to_be == ##Attack) { if (obj == mgr) return 1; } ! else if (action_to_be == ##Shoot) { ! if (obj == mgr) return 2; ! if (obj == gun) return 1; ! } return 0; ]; [ DeathMessage; if (deadflag == 3) print "You failed to get cheese"; ]; [ DrawStatusLine width posa posb; @split_window 1; @set_window 1; @set_cursor 1 1; style reverse; width = 0->33; posa = width-26; posb = width-13; spaces width; @set_cursor 1 2; if (location == thedark) print (name) location; else { FindVisibilityLevels(); if (visibility_ceiling == location) print (name) location; else print (The) visibility_ceiling; } if ((0->1)&2 == 0) { if (width > 76) { ! @set_cursor 1 posa; print (string) SCORE__TX, sline1; @set_cursor 1 posb; print (string) MOVES__TX, sline2; } if (width > 63 && width <= 76) { ! @set_cursor 1 posb; print sline1, "/", sline2; @set_cursor 1 posb; print sline2; } } else { @set_cursor 1 posa; print (string) TIME__TX; LanguageTimeOfDay(sline1, sline2); } @set_cursor 1 1; style roman; @set_window 0; ]; [ emph str; style underline; print (string) str; style roman; ]; [ InScope person; if (person == player && scope_reason == PARSING_REASON && action_to_be == ##Examine) PlaceInScope(misc); rfalse; ]; Array trills --> "doo da doo da doo dah doo da" "pa-plink! da doo da pa-plink! da doo da" "padaplink da doo da pa-plink da doo da" "puh-plunk da doo da padaplunk da doo da" "pa-plunk dah doo padadaplunk dah doo dah" "dadadadadadang doo da doo da doo da ..." "ta-ting! da doo da, ta-ting! da doo da" "tata-ting! da doo da, ta-ting! da doo da" "ta-tang! da doo da, tata-tang! da doo da" "ta-tang da doo tadadatang da doo ta" "tadadadatang da doo da doo da doo da ..." "dinga-dinga-dinga-dinga-dinga-dinga-dinga-dinga" "dinga-dinga-dinga-dinga-dinga-dinga-dinga-dahding" "dinga-dinga-dinga-dinga-dinga-dinga-dinga-dinga" "dinga-dinga-dinga-dinga-dinga-dinga-dinga-dinga" "zinga-zinga-zinga-zinga-zinga-zinga-zinga-zahzing" "zinga-zinga-zinga-zinga-zinga-zinga-zinga-zinga" "zonga-zinga-zinga-zinga-zinga-zinga-zinga-zahzing" "zinga-zinga-zinga-zinga-zinga-zinga-zinga-zahzonga" "zonga-zonga-zonga-zonga-zonga-zonga-zonga-zonga ..." "ZahZing!bingabingabingabingabingabinga!" "ZahZing!bingabingabingabingabingabinga!" "ZuhZung!bingabingabingabingabingabinga!" "ZatuhZung!bingabingabingabingabingabinga!" "ZahZung!bingabingabingabingabingabinga!" "ZatazataZung!bingabingabingabingabingabinga! ..." "ZahZing!taOompahOompahOompah ZahZing!taOompahOompahOompah" "paTAhZing!taOompahOompahOompah ZahZing!taOompahOompahOompah" "ZahZung!taOompahOompahOompah paTAhZung!taOompahOompahOompah" "ZahZung!taOompahOompahOompah paDaDaDaZung!taOompahOompahOompah" "paDaDaZung! PATABADALADAZING! PATABADALADAZING! PATABADALADAZING!" "PATABADALADAZING! PATABADALADAZING! PATABADALADAZING!" "PATABADALADAZING! PATABADALADAZING! PATABADALADAZING!" "PATABADALADAZING! PA-tA-BAHTA!-PATATA!-PATABADALADAZING!!" "PA-tA-BAHTA!-PATATA!-PATABADALADAZING! PINGA!PINGADABINGADAPINGADAPINGADADING!!" "BINGABINGBINGBINGAGAPINGABINGBING!! PINGA!PINGADABINGADAPINGADAPINGADADING!!"; !------------------------------------------------------------- Object OutShop "Outside the Cheeseshop" with name 'sign' 'signs' 'door', cant_go " (Be a lamb and just enter the shop to the south, would you, hon? Thanks. Kiss, kiss.)", description " Ah! How wonderful. You were just thinking how nice a piece of cheese would be, and look. Here is a pleasant little cheeseshop, whose door beckons to the south.", s_to [; print " Feeling somewhat peckish, you decide to sally forth and infiltrate this place of purveyance to negotiate the vending of cheesy comestibles.^"; return InShop; ], in_to [; return self.s_to(); ], has light; Object cheeseshop "cheeseshop" OutShop with name 'cheeseshop' 'shop' 'cheese' 'store', description " It's an Edwardian-style shop with a large sign above it reading 'Ye Olde Cheese Emporium'. Another sign below the first reads 'Henry Wensleydale, Purveyor of Fine Cheese to the Gentry and the Poverty Stricken Too', and a sign below that reads 'Licensed for Public Dancing'.", before [ rm; Enter: rm = OutShop.s_to(); PlayerTo(rm,0); rtrue; ], has scenery topicattr; Object InShop "Ye Olde Cheese Emporium" with name 'door', cant_go " The door out is to the north.", description [; print " The cheeseshop is large and redolent of the charm and languidity of a bygone age."; if (corpse in InShop) print " The door out is to the north."; if (dancers in InShop) print " In the corner, two men are Greek dancing to the music of a bouzouki."; if (corpse in InShop) "^ ", (The) mgr, "'s dead body has fallen behind the counter."; else if (mgr in InShop) "^ ", (The) mgr, " stands behind the counter."; else "^ On the counter is a small handbell."; ], before [; Listen: <>; Smell: if (noun == nothing) { if (corpse in InShop) " The shop doesn't smell quite as clean as it used to, now that there's a corpse behind the counter."; " The shop smells remarkably clean. You don't smell any cheese, certainly."; } ], out_to [; return self.n_to(); ], n_to [; if (corpse in InShop) { deadflag = 2; ! *** You have gained satisfaction *** " You put on your cowboy hat, stride out the shop, and ride your horse into the sunset.^ THE END"; } else if (mgr in InShop) { deadflag = 3; ! *** You failed to get cheese *** " Frustrated with your lack of progress, you stride out the shop, taking your custom elsewhere."; } else " Oh, please. You haven't even talked to the shopkeeper yet."; ], has light; [ PlayMusic; if (music.noiselevel > 0 && turns ~= music.last_turn) { print "([music]: ", (string) trills-->(music.number), ")^"; music.last_turn = turns; if (music.number < 35) music.number++; if (music.number > 10) music.noiselevel = 2; } ]; Object counter "counter" InShop with name 'counter', description [; if (corpse in InShop) " ", (The) mgr, "'s dead body has fallen behind the counter, on which there is an almost forgotten small handbell."; else if (cheese.phase >= 25) " ", (The) mgr, " is standing behind the counter, which you are beginning to suspect has no cheese behind it at all."; else if (mgr in InShop) " ", (The) mgr, " is standing behind the counter, ready to negotiate your purchase of cheesy comestibles."; else " You see a small handbell on the counter. It looks quite ringable."; ], before [; Search: " You don't find any cheese on the counter. Only a small handbell."; Smell: " You smell nothing untowards on the counter."; Take: " If I may suggest, a purchase of ", (emph) "cheese", " would be a more suitable souvenir of your visit."; ], has scenery topicattr supporter; Object handbell "small handbell" counter with name 'small' 'handbell' 'bell', description [; print " The small handbell is on the counter. It "; if (corpse in InShop) print (emph) "still", " "; "looks quite ringable."; ], before [; Push: if (corpse in InShop) { print " You ring the handbell, but "; switch (random(4)) { 1: "the dead ", (name) mgr, " ignores it."; 2: print_ret (the) mgr, " fails to come back to life."; 3: "the shop doesn't magically fill with cheese."; 4: "the sketch fails to continue past this point."; } } if (mgr in InShop) { " ", (string) random("No need. ","Why bother? "), (The) mgr, " is already here."; } move mgr to location; " You ring the handbell, and immediately, the shopkeeper pops up from behind the counter. ^ ~Good morning, sir,~ the man says. ^ You say to him, ~Good morning. I'd like to buy some cheese, please.~ ^ ~Yes, certainly, sir. What would you like?~"; Take: " You can't take the small handbell. You could try ringing it, though."; ], has scenery topicattr; Object dancers "Greek dancers" InShop with name 'greek' 'dancers' 'men' 'two' 'dancing' 'musician' 'musicians' 'corner', article "the", description " Two men in casual city wear are dancing a Greek folk dance while a third provides musical accompaniment with his bouzouki.", orders [; BeQuiet: return ShutUpDancers(); default: print " The Greek dancers ignore you and continue dancing."; if (music.noiselevel == 2) print " (Can they even hear you over the noise they're making?)"; new_line; rtrue; ], life [; Ask, Tell, Answer, Greet: print " The Greek dancers ignore you and continue dancing."; if (music.noiselevel == 2) print " (Can they even hear you over the noise they're making?)"; new_line; rtrue; Attack: " Loud words ought to suffice for dealing with these noisemakers."; ShoutAt: return ShutUpDancers(); ], before [; Smell: " Come, come. Gentlepersons such as yourself do not go about smelling other people."; Take, Kiss: " A BBC news reporter and camera crew suddenly pop in from nowhere! The reporter shouts into his microphone, ~Mousebender tries to pick up strange Greek men in a cheeseshop! Film at eleven!~ Then he and his film crew race out the door to file their story."; ], has animate pluralname scenery topicattr; ! if (music.noiselevel == 1) " Let them be. They're not that annoying...", (emph) "yet", "."; ! music.noiselevel = 0; remove dancers; remove music; remove bouzouki; ! " You suddenly turn to the dancers, and shout, ~WILL YOU SHUT BLOODY DANCING UP!~ ! ^(the music stops)^ ", (The) mgr, " tells the dancers, ! ~Told you so,~ as they sneak out the door."; [ ShutUpDancers; if (music.noiselevel == 1) " Let them be. They're not that annoying...", (emph) "yet", "."; music.noiselevel = 0; remove dancers; remove music; remove bouzouki; print " You suddenly turn to the dancers, and shout, ~WILL YOU SHUT BLOODY DANCING UP!~^(the music stops)"; if (mgr in InShop) "^ ", (The) mgr, " tells the dancers, ~Told you so,~ as they sneak out the door."; new_line; rtrue; ]; Object bouzouki "bouzouki" InShop with name 'bouzouki' 'instrument' 'instruments', description " Ah, the bouzouki. You know, of course, that it's practically the signature sound of both rebetiko and Greek folk music.", before [; Smell: " What an odd notion."; Take: " The bouzouki isn't yours to take."; Listen: <>; ], has scenery topicattr; Object music "music" InShop with name 'music' 'song' 'tune' 'melody' 'melos' 'noise' 'silence', noiselevel 1, ! should go up to 2 when .number is 10 or more number 0, ! which trill to play next (0..35) last_turn 0, ! track turn when music last played. description [; if (self.noiselevel >= 1) print " Unless you're badly mistaken, it's the title instrumental theme from 'Zorba the Greek'.^"; if (self.noiselevel == 2) print " But frankly, it's getting on your nerves. You have half a mind to tell them to ~shut up~ just so a body could think.^"; if (self.noiselevel == 0) " That bloody annoying music has finally ceased and replaced with blessed silence."; ], react_before [; default: PlayMusic(); rfalse; ], before [; Take: " Trying to pick up the melody, eh?"; Listen: <>; default: if (action ~= ##Examine) " What an odd notion."; ], has scenery topicattr; Object mgr "shopkeeper" with name 'mr' 'wensleydale' 'man' 'owner' 'shopkeeper' 'seller' 'proprietor' 'manager' 'salesman' 'mister' 'himself', short_name [; if (self has proper) print (string) random("Wensleydale","Mr. Wensleydale"); else print (string) random("shopkeeper","proprietor","man","owner"); rtrue; ], description [; print " ", (The) mgr, " waits patiently for you to select "; if (cheese.phase < 18) print "a cheese from his shop.^"; else print "yet another cheese from this so-called cheeseshop.^"; ThinkSub(); ], orders [; BeGreeted: if (cheese.asked == 0) return DoCheese0(); " You're already talking with ", (the) mgr, "."; Yes, No: " ~If you say so, sir,~ he says with an unctuous smile."; Give: " (Try something like ASK MAN FOR BRIE or BUY PROVOLONE instead.)"; default: " ", (The) mgr, " isn't going to do that. He has to man the shop. (Try something like ASK MAN FOR BRIE or BUY PROVOLONE instead.)"; ], life [; Answer: if (noun == 'hi' or 'hello' && cheese.asked == 0) return DoCheese0(); " ~I beg your pardon, sir?~"; Greet: if (cheese.asked == 0) return DoCheese0(); " You're already talking with ", (the) mgr, "."; ShoutAt: " No no no. A gentleman never raises his at a voice to a servant. This is, after all, a battle of wits. If you yelled at him, the shopkeeper would win, and you would lose."; ], before [; Smell: " Come, come. Gentlepersons such as yourself do not go about smelling other people."; Take: " Picking up ", (the) mgr, " isn't going to get you any cheese."; Search: " The shopkeeper isn't likely to let you do that."; Kiss: " Oddly enough, kissing ", (the) mgr, " is the last thing you want to do. Even if he is sort of cute."; Attack: if (gun in player) { print " ...and shoot the pathetic creature:^^ *** BANG! ***^"; if (dancers in location) print "^(the music stops)"; print "^ The body falls to the floor. You shake your head"; if (dancers notin location) print " as you put away your gun"; print ". ~What a senseless waste of human life.~"; remove gun; remove mgr; move corpse to InShop; if (dancers in location) { music.noiselevel = 0; remove dancers; remove music; remove bouzouki; print "^ The dancers beat a hasty retreat out the door as you put away your gun."; } new_line; rtrue; } else if (cheese.phase >= 28) " Oh, you are sorely tempted, but unfortunately your genteel nature forbids that course of action until all other options are exhausted. But you will get satisfaction from this miserable shopkeeper, in one way or another."; else if (cheese.phase >= 18) " ", (The) mgr, " is an annoying git, but that's no reason to resort to violence. Not yet, anyway."; rfalse; Ask: if (second ofclass CCheese) { if (second.isvague == 1) { if (second == cheese && cheese.asked == 0) return DoCheese0(); print " ~Any ", (name) second, "?~ you say.^ The owner almost looks apologetic. ~Er, could you be more specific, sir?~ he asks, unhelpfully.^"; return ThinkSub(); } else if (second.asked == 0) { if (second == camembert) { if (cheese.phase < 4) { print " You're about to ask for camembert, but then reconsider. You've hardly asked for any cheeses at all. Might there not be more exotic cheeses? You can always ask about camembert later, if the shop doesn't have your first few choices.^"; return ThinkSub(); } else if (camembert.number == 1) return DoCheese17(); else if (camembert.number == 2) return DoCheese18(); else ! if (cheese.phase < 16) return DoCheese16(camembert); } else if (second == wensleydale) return DoCheese25(); else if (second == cheddar) { if (cheese.phase < 20) { print " Not yet! Asking for cheddar this early would be an admission of defeat. Surely a cheeseshop has more than just cheddar! Consider all the cheeses that a cheeseshop might have!^"; return ThinkSub(); } else return DoCheese31(cheddar); } else if (second == popular) { if (cheese.phase ~= 32) { print " Popular cheese? What gave you that notion? The shopkeeper hasn't mentioned anything like that yet.^"; return ThinkSub(); } else return DoCheese32(popular); } else if (second == any_cheese) { if (cheese.phase ~= 36) { print " As a cheese connoisseur, it is beneath you to ask directly for ~any cheese at all~. It is for you to decide what cheese you want, not the shopkeeper's. Only in the most extreme circumstances, such as a cheeseshop with no cheese at all, would you consider asking such an audacious question.^"; return ThinkSub(); } else return DoCheese36(any_cheese); } else ! do the current phase (as normal) switch(cheese.phase) { 1: return DoCheese1(second); 2: return DoCheese2(second); 3: return DoCheese3(second); 4: return DoCheese4(second); 5: return DoCheese5(second); 6: return DoCheese6(second); 7,9,10,11,12,14,19,20,21,22,26,27,28,29: return DoCheese7(second); 8: return DoCheese8(second); 13: return DoCheese13(second); 15: return DoCheese15(second); 16: return DoCheese16(second); 23: return DoCheese23(second); 24: return DoCheese24(second); 30: return DoCheese30(second); 31: return DoCheese31(second); 32: return DoCheese32(second); 33: return DoCheese33(second); 34: return DoCheese34(second); 35: return DoCheese35(second); 36: return DoCheese36(second); 37: " No more talk. You aim your gun at the wretched shopkeeper..."; default : "[ERROR: DoCheese", cheese.phase, "(", (name) second, ")]"; } } else { print " You've already tried ", (name) second, ". Think of another cheese.^"; return ThinkSub(); } } else switch (second) { area: print " You ask ", (the) mgr, " about the area. ~Blimey, you ask a lot of questions. I didn't expect the Spanish Inquisition,~ he says."; if (inquisition has general) " A voice calls out, ~Bugger off. We're not doing that again.~"; give inquisition general; "^ Suddenly, four men in black robes leap into the shop! ~Nobody expects the Spanish Inquisition! Our chief weapons are... are... dammit, we're in the wrong sketch again.~ They turn around and march out."; breasts: " You ask ", (the) mgr, " about her breasts. ~It wasn't me, sir. I never even knew she had breasts,~ he says."; cat: " You ask ", (the) mgr, " about the cat. ~I got her from a cat detector van.~"; cheeseshop: " You ask ", (the) mgr, " about the cheeseshop. ~Finest in the district,~ he claims."; counter: " You ask ", (the) mgr, " about the counter. ~Have you noticed how clean it is?~"; dancers: " You ask ", (the) mgr, " about the dancers. ~They seem to be here all the time, ever since we got licensed for public dancing. Adds a bit of local colour to the place, wouldn't you say?~ he says."; fudges: " You ask ", (the) mgr, " about the fudges. ~I'm sorry, sir, but this is a cheeseshop. We don't have any fudges here,~ he says, miffed."; handbell: " You ask ", (the) mgr, " about the handbell. ~C'est Michelle, my bell,~ he says proudly."; inquisition: print " You ask ", (the) mgr, " about the Spanish Inquisition."; if (inquisition has general) " Before he can reply, a voice calls out, ~Bugger off. We're not doing that again.~"; give inquisition general; " ~The Spanish Inquisition? I didn't expect you to ask about the Spanish Inquisition!~ he exclaims. ^ Suddenly, four men in black robes leap into the shop! ~Nobody expects the Spanish Inquisition! Our chief weapons are... are... dammit, we're in the wrong sketch again.~ They turn around and march out."; lumberjack: " You ask ", (the) mgr, " about being a lumberjack. ~I didn't want to work in a cheeseshop. I wanted to be a lumberjack. Leaping from tree to tree as they float down the mighty rivers of British Columbia...~ ^ His voice trails off as he realizes that no one's going to oblige him with the appropriate sound cue."; mgr: " You ask ", (the) mgr, " about himself. ~Someday... I'd like to be... a lumberjack!~ he exclaims."; monty: " You ask ", (the) mgr, " about Monty Python. ~Who?~ he asks, all innocence."; music, bouzouki: if (music.noiselevel >= 1) " You ask ", (the) mgr, " about the music. ~I rather enjoy it. But I expect some music hater will tell them to shut up, sooner or later,~ he says."; " You're no longer interested in the music, now that it's stopped."; selfobj: " You ask ", (the) mgr, " about yourself. He just smiles back at you."; viking: " You ask ", (the) mgr, " about the Viking. ~Er, viking, sir?~ he says, solicitously."; default: " You ask ", (the) mgr, " about ", (the) second, ", but he acts like he didn't even hear your question."; } ], has male animate scenery topicattr; Object corpse "dead body" with name 'mr' 'wensleydale' 'man' 'owner' 'shopkeeper' 'seller' 'proprietor' 'manager' 'salesman' 'mister' 'corpse' 'dead' 'body' 'stiff' 'blood' 'bloody', short_name [; if (mgr has proper) print "Wensleydale's "; else print "shopkeeper's "; rfalse; ], description [; " ", (The) mgr, " lies dead behind the counter. You smile the smile of a job well done."; ], life [; Give, Show, ThrowAt: rfalse; Kiss: " Death hasn't made him any cuter, y'know."; Attack: if (corpse hasnt general) { give corpse general; " You allow yourself one last kick at the corpse to make sure the bastard is dead. He is. He is quite dead."; } " No, that's enough. Remember, you are still a gentleman. Time to leave, I'd say."; default: " It's a bit late to talk to the ol' beggar now. He's passed on. Mr. Wensleydale is no more. He has ceased to be. He's expired and gone to meet his maker. He's a stiff. Bereft of life, he rests in peace. He's rung down the curtain and joined the choir invisible. This is an ex-shopkeeper."; ], before [; Eat: " That peckish you are not."; Smell: " Let's not be morbid."; Take: " Yes, it would be jolly to pick up the dead Mr. Wensleydale, take him on holiday overseas and frighten the children, but unfortunately, you have other things to do."; Search: " Oh, leave him be. He obviously doesn't have any cheese secreted on his person."; Touch: " There's no pulse. Perhaps it's time to go."; ], has male scenery animate; ! was talkable, but there was ASK MAN ABOUT CHEESE confusion Object gun "gun" with name 'gun' 'pistol' 'weapon' 'six' 'shooter' 'six-shooter', description [; if (self hasnt general) { give self general; " Yes, you have a gun. Sorry about that. I should have mentioned it earlier."; } " It's a gun. You shoot lying deceitful shopkeepers with it."; ], before [; Drop, Give, Insert, PutOn, Transfer, ThrowAt: " On second thought, you decide to keep the gun."; Show: if (second == dancers) " They're not paying attention to you."; if (second == mgr) " You let the smiling bastard shopkeeper get a good long look at the business end of your pistol, ..."; ], has shootable; Object cyanide "cyanide" InShop with before [; Take: " You take the cyanide capsule that you've held onto for years for just such a situation as this, swallow it dry, and die. (No, sorry, just kidding. There's no cyanide in this game.)"; ], has scenery; Object misc "miscellany" with name 'business' 'suit' 'wallet' 'money' 'cash' 'key' 'keys' 'pen' 'hanky' 'hankerchief' 'craving' 'headache' 'pills', description [; if (player has general) print " I said, y"; else print " Y"; "ou don't need to refer to that in this game."; ], has scenery; [ DoCheese0; cheese.asked = 1; print " You tell ", (the) mgr, ", ~I was walking by your shop when suddenly I came over all peckish for a little fermented curd.~ ^ ~Peckish?~, he asks, puzzled.^ ~Esurient,~ you say.^ ~Eh?~ ^ ~Eee I were all hungry, like,~ you say, in a broad Yorkshire accent.^"; if (music.noiselevel >= 1) " ~Oh, hungry,~ agrees ", (the) mgr, ". ~I thought you were complaining about the music.~^ ~Heaven forbid,~ you say. ~I am one who delights in all manifestations of the terpsichorean muse.~^ ~Sorry?~ ^ ~I like a nice dance. You're forced to.~ you say."; else " ~Oh, hungry,~ says ", (the) mgr, ".^[Quick cut to a Viking] ^ ~Anyway...~ says the Viking.^[Cut back to the shop] ^ Startled, ", (the) mgr, " looks about. ~Who said that?~"; ]; [ DoCheese1 cheesetype; cheese.phase = 2; cheesetype.asked = 1; " ~Well, how about a little ", (name) cheesetype, "?~ you ask. ^ ~I'm afraid we're fresh out of ", (name) cheesetype, ", sir.~ ^ ~Oh never mind,~ you say, unconcerned."; ]; [ DoCheese2 cheesetype; cheese.phase = 3; cheesetype.asked = 1; " ~How are you on ", (name) cheesetype, "?~, you ask. ^ ~Never at this part of the week, sir. Always get it fresh first thing on Monday.~^ ~Tish, tish. No matter.~"; ]; [ DoCheese3 cheesetype; cheese.phase = 4; cheesetype.asked = 1; " ~Well, four ounces of ", (name) cheesetype, ", then, if you please, stout yeoman.~^ ~Ah, well, it's been on order for two weeks, sir,~ ", (the) mgr, " replies. ~I was expecting it this morning.~ ^ ~Yes, it's not my day is it,~ you say ruefully."; ]; [ DoCheese4 cheesetype; cheese.phase = 5; cheesetype.asked = 1; " ~Er, ", (name) cheesetype, "?~ you try.~^ ~Sorry.~"; ]; [ DoCheese5 cheesetype; cheese.phase = 6; cheesetype.asked = 1; " ~", (name) cheesetype, "?~ you ask.^ ~Normally, sir, yes, but today the van broke down.~"; ]; [ DoCheese6 cheesetype; cheese.phase = 7; cheesetype.asked = 1; " ~Ah. ", (name) cheesetype, "?~ you ask.^ ~Sorry.~"; ]; [ DoCheese7 cheesetype; cheese.phase = cheese.phase + 1; cheesetype.asked = 1; " ~", (name) cheesetype, "?~ you ask.^ ~No.~"; ]; [ DoCheese8 cheesetype; cheese.phase = cheese.phase + 1; cheesetype.asked = 1; " ~Any ", (name) cheesetype, "?~ you try.^ ~No.~"; ]; ! Phases 9..12 are identical to phase 7 [ DoCheese13 cheesetype; cheese.phase = 14; cheesetype.asked = 1; " ~Any ", (name) cheesetype, "?~ you ask.^ ~....No.~"; ]; ! Phase 14 is identical to phase 7 [ DoCheese15 cheesetype; if (camembert.asked == 0) cheese.phase = 16; else cheese.phase = 19; cheesetype.asked = 1; " ~Any ", (name) cheesetype, "?~ you try.^ ~No.~"; ]; ! Handling the first phase of Camembert cheese is tricky. ! First, don't let the player ask for Camembert too early; ! force him to choose another cheese if in phases 1, 2, or 3. ! Second, we need to skip over phases 16 to 18 if we've asked ! for Camembert earlier (ie: in phases 4..15). ! Third, force the asking of Camembert in phase 16 if we haven't ! asked for it yet. [ DoCheese16 cheesetype; print " You recite, ~"; CalcCamembertList(cheesetype); camembert.number = 1; cheese.phase = 19; "Camembert?~^ ", (The) mgr, " brightens. ~Ah! We do have some Camembert, sir.~ ^ ~You do. Excellent,~ you say.^ ", (The) mgr, " hesitates. ~It's a bit runny, sir.~"; ]; [ DoCheese17; camembert.number = 2; " ~Oh, I like it runny,~ you say with considerable relish. ^ ~Well, as a matter of fact, it's very runny, sir,~ ", (the) mgr, " cautions.^ ~No matter, no matter,~ you reply. ~Hand over the fromage de la Belle France qui s'appelle Camembert, s'il vous plait.~ ^ ~I think it's runnier than you like it, sir,~ ", (the) mgr, " warns."; ]; [ DoCheese18; camembert.number = 3; camembert.asked = 1; " ~I don't care how fucking runny it is. Hand it over with all speed,~ you demand.^ ~Yes, sir.~^ ", (The) mgr, " bends down below the counter and reappears. ~Oh...,~ he says. ^ ~What?~ ~The cat's eaten it.~ ~Has he?~ ~She, sir.~"; ]; ! Phases 19..22 are identical to phase 7 [ DoCheese23 cheesetype; cheese.phase = 24; cheesetype.asked = 1; " ~", (name) cheesetype, "?~ you ask.^ ~No, sir.~"; ]; ! NOTE: phase 26 (identical to phase 7) is called directly after phase 24. [ DoCheese24 cheesetype; cheese.phase = 26; print " ~You do have some cheese, do you?~ you inquire. ^ ~Certainly, sir. It's a cheese shop, sir. We've got...~ ^ ~No, no, no, don't tell me. I'm keen to guess.~^ ~Fair enough.~^"; return DoCheese7(cheesetype); ]; [ DoCheese25; wensleydale.asked = 1; give mgr proper; give corpse proper; " ~Wensleydale?~ you ask.^ ~Yes, sir?~^ You smile. ~Splendid. Well, I'll have some of that then, please.~^ ~Oh, I'm sorry, sir. I thought you were referring to me, Mr. Wensleydale.^ You stop smiling."; ]; ! Phases 26 to 29 are identical to Phase 7 [ DoCheese30 cheesetype; cheese.phase = 31; cheesetype.asked = 1; " ~", (name) cheesetype, "?~ you ask.^ ~Not today, sir, no.~"; ]; [ DoCheese31; cheese.phase = 32; cheddar.asked = 1; " You decide to cut to the chase. ~Well, let's keep it simple. How about Cheddar?~^ ~Well, I'm afraid we don't get much call for it around these parts.~^ You're flabbergasted. ~No call for it? It's the single most popular cheese in the world!~ ^ ~Not round these parts, sir,~ says ", (the) mgr, " with a straight face."; ]; ! Try to get the player to ask for "most popular cheese" ! Let him be stuck for ten turns, then go on as if he asked anyway. [ DoCheese32 cheesetype ilc; if (cheesetype ~= popular && popular.number < 10) { cheesetype.asked = 1; popular.number = popular.number + 1; " ~Any ", (name) cheesetype, "?~ you ask.^ ~No.~ Then ", (the) mgr, (string) random( " prompts, ~Don't you want to ask me what the most popular cheese is?~", " says, ~That's not popular around these parts either.~", " remarks, ~Is that cheese popular elsewhere?~" ); } cheese.phase = 33; popular.asked = 1; ilc = CalcIlchester(); if (popular.number >= 10) print " You grimace. The shopkeeper must really want you to ask what's popular.^"; " ~And pray, what is the most popular cheese round these parts?~^ ~", (name) ilc, ", sir,~ says ", (the) mgr, " proudly.^ ~I see,~ you say evenly. ^ ~Yes, sir. It's quite staggeringly popular in the manor.~ ^ ~Is it?~^ ~Yes sir,~ repeats ", (the) mgr, ". ~It's our number-one seller.~^ ~Is it?~ you ask again.^ ~Yes, sir.~^ ~", (name) ilc, ", eh?~ you ask, just to be quite sure.^ ~Right,~ ", (the) mgr, " confirms."; ]; ! If player tried a cheese other than "Ilchester", prompt him!! [ DoCheese33 cheesetype; if (cheesetype ~= ilchester.calcval) " Good god! Stop the insanity! Buy ", (name) ilchester.calcval, "!"; cheese.phase = 34; cheesetype.asked = 1; " ~OK, I'm game. Have you got any ", (name) cheesetype, ", he asked, expecting the answer 'no'?~^ ~I'll have a look, sir, ... nnnnnnooooooooo.~ ^ ~It's not much of a cheese shop really, is it?~ you observe. ^ ~Finest in the district, sir,~ ", (the) mgr, " claims. ^ ~And what leads you to that conclusion?~ you ask. ^ ~Well,~ ", (the) mgr, " sputters, ~it's so clean.~ ^ ~Well,~ you say, ~it's certainly uncontaminated by cheese.~"; ]; [ DoCheese34 cheesetype lim; print " ~", (name) cheesetype, "?~, you ask, without any real hope.^"; cheesetype.asked = 1; cheese.phase = 35; lim = CalcLimburger(); " ~Sorry,~ says ", (the) mgr, ". Then he points out, ~You haven't asked me about ", (name) lim, ", sir.~^ You hestitate. ~Is it worth it?~ ^ ~Could be,~ he says temptingly."; ]; ! If Player tried a cheese other than "Limburger", prompt him!! [ DoCheese35 cheesetype; if (cheesetype ~= limburger.calcval) " But the shopkeeper might have ", (name) limburger.calcval, "! Don't drag this out any longer!"; cheese.phase = 36; cheesetype.asked = 1; " You ask, ~Have you got any ", (name) cheesetype, "?~^ ~No.~ ^ ~No, that figures. It was pretty predictable really. It was an act of pure optimism to pose the question in the first place. Tell me something, do you have any cheese at all?~^ ~Yes, sir,~ says ", (the) mgr, "."; ]; ! Prompt the player to ASK FOR ANY CHEESE [ DoCheese36 cheesetype; if (cheesetype ~= any_cheese) " After all you've been through, do you ", (emph) "really", " believe there's any cheese at all here? Ask ", (the) mgr, " for 'any cheese'."; move gun to player; cheese.phase = 37; " You calmly tell ", (the) mgr, ", ~Now I'm going to ask you that question once more, and if you say 'no' I'm going to shoot you through the head. Now, do you have any cheese at all?~^ ~No.~ ^ You draw a gun,..."; ]; ! This should list nine unchosen cheeses, not including any of our ! specials or vagues. If the chosen cheese wasn't camembert, start with ! that one. [ CalcCamembertList cheesetype n x; n = 0; if (cheesetype ~= camembert) { cheesetype.asked = 1; n = 1; print (name) cheesetype, ", "; } objectloop(x ofclass CCheese) { if (x.asked == 0 && x.isvague == 0 && x ~= wensleydale or cheddar or camembert or cheese or popular or any_cheese) { x.asked = 1; n++; print (name) x, ", "; } if (n >= 9) break; } ]; [ CalcIlchester x; if (ilchester.asked == 0) ilchester.calcval = ilchester; else objectloop(x ofclass CCheese) { if (x.asked == 0 && x.isvague == 0 && x ~= wensleydale or cheddar or camembert or cheese or popular or any_cheese) { ilchester.calcval = x; break; } } return ilchester.calcval; ]; [ CalcLimburger x; if (limburger.asked == 0) limburger.calcval = limburger; else objectloop(x ofclass CCheese) { if (x.asked == 0 && x.isvague == 0 && x ~= wensleydale or cheddar or camembert or cheese or popular or any_cheese) { limburger.calcval = x; break; } } return limburger.calcval; ]; !------------------------------------------------------------- Class CCheese with name 'cheese', asked 0, isvague 0, has edible topicattr; CCheese red_leicester "Red Leicester" with name 'red' 'leicester'; CCheese tilsit "Tilsit" with name 'tilsit'; CCheese caerphilly "Caerphilly" with name 'caerphilly'; CCheese bel_paese "Bel Paese" with name 'bel' 'paese' 'pease' 'bel-paese' 'bel-pease'; CCheese red_windsor "Red Windsor" with name 'red' 'windsor'; CCheese stilton "Stilton" with name 'stilton'; CCheese gruyere "Gruyere" with name 'gruyere' 'guyere'; CCheese emmental "Emmental" with name 'swiss' 'emmental' 'emmenthal', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'emmental' or 'emmenthal') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese njarls "Norwegian Jarlsberger" with name 'norwegian' 'jarlsberger' 'jarlsburg'; CCheese liptauer "Liptauer" with name 'liptauer'; CCheese lancashire "Lancashire" with name 'lancashire'; CCheese white_stilton "White Stilton" with name 'white' 'stilton', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'white') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese danish_blue "Danish Blue" with name 'danish' 'blue'; CCheese dgloucester "Double Gloucester" with name 'dg' 'double' 'gloucester'; CCheese cheshire "Cheshire" with name 'cheshire'; CCheese dorset "Dorset Blue Vinney" with name 'dorset' 'blue' 'vinney' 'dbv'; CCheese brie "Brie" with name 'brie'; CCheese rocquefort "Rocquefort" with name 'rocquefort' 'roquefort'; CCheese pont "Pont-l'Eveque" with name 'pont-l^eveque' 'pont' 'l^eveque' 'eveque'; CCheese port "Port Salut" with name 'port-salut' 'port' 'salut'; CCheese savoyard "Savoyard" with name 'savoyard'; CCheese st_paulin "Saint-Paulin" with name 'st' 'saint' 'paulin' 'saint-paulin' 'st-paulin'; CCheese carre "Carre-de-L'Est" with name 'carre-de-l^est' 'de-l^est' 'carre' 'de' 'l^est' 'est'; CCheese boursin "Boursin" with name 'boursin'; CCheese wensleydale "Wensleydale" with name 'wensleydale'; CCheese bresse "Bresse-Bleue" with name 'bresse' 'bleue' 'bresse-bleue'; CCheese perle "Perle de Champagne" with name 'perle' 'de' 'champagne'; CCheese camembert "Camembert" with name 'cam' 'camembert', number 0; CCheese gouda "Gouda" with name 'dutch' 'gouda'; CCheese edam "Edam" with name 'dutch' 'edam'; CCheese caithness "Caithness" with name 'caithness'; CCheese smoked "Smoked Austrian" with name 'smoked' 'austrian'; CCheese sage "Sage Derby" with name 'sage' 'derby'; CCheese gorgonzola "Gorgonzola" with name 'gorgonzola'; CCheese parmesan "Parmesan" with name 'parmasan' 'parmesan'; CCheese mozza "Mozzarella" with name 'mozza' 'mozzarella'; CCheese pippo "Pippo Creme" with name 'pippo' 'creme'; CCheese danish_fimboe "Danish Fimboe" with name 'danish' 'fimboe'; CCheese czech "Czechoslovakian Sheep's Milk Cheese" with name 'csmc' 'czech' 'czechoslovakian' 'sheep' 'sheep^s' 'milk'; CCheese venez "Venezuelan Beaver Cheese" with name 'venez' 'vbc' 'venezuelan' 'beaver'; CCheese cheddar "Cheddar" with name 'cheddar' 'american' 'canadian'; CCheese feta "Feta" with name 'feta'; CCheese provolone "Provolone" with name 'provolone'; CCheese raclette "Raclette" with name 'raclette'; CCheese romano "Romano" with name 'romano'; CCheese bleu "Bleu" with name 'blue' 'bleu'; CCheese finlandia "Finlandia Swiss" with name 'finlandia' 'swiss', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'finlandia') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese cottage "Cottage Cheese" with name 'cottage'; CCheese swinzie "Swinzie" with name 'swinzie'; CCheese havarti "Havarti" with name 'cream' 'havarti'; CCheese allerdale "Allerdale" with name 'allerdale'; CCheese asiago "Asiago" with name 'asiago'; CCheese appenzeller "Appenzeller" with name 'appenzeller'; CCheese bath "Bath Cheese" with name 'bath'; CCheese baylough "Baylough" with name 'baylough'; CCheese bishop "Bishop Kennedy" with name 'bishop' 'kennedy' 'bishop-kennedy'; CCheese blue_castello "Blue Castello" with name 'blue' 'castello'; CCheese blue_shropshire "Blue Shropshire" with name 'blue' 'shropshire'; CCheese bonchester "Bonchester" with name 'bonchester'; CCheese bonnet "Bonnet" with name 'bonnet'; CCheese boursault "Boursault" with name 'boursault'; CCheese brodick "Brodick" with name 'brodick'; CCheese brodick_blue "Brodick Blue" with name 'brodick' 'blue', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'blue') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese cabrales "Cabrales" with name 'cabrales'; CCheese caboc "Caboc" with name 'caboc'; CCheese cairnsmore "Cairnsmore" with name 'cairnsmore'; CCheese calahora "Calahora" with name 'calahora'; CCheese celtic "Celtic Promise" with name 'celtic' 'promise'; CCheese cerney "Cerney" with name 'cerney'; CCheese colby "Colby" with name 'colby'; CCheese comte "Comte" with name 'comte'; CCheese coolea "Coolea" with name 'coolea'; CCheese coulommiers "Coulommiers" with name 'coulommiers'; CCheese crottin "Crottin du Chavignol" with name 'crottin' 'du' 'chavignol'; CCheese crowdie "Crowdie" with name 'crowdie'; CCheese devon "Devon Cream" with name 'devon' 'cream'; CCheese dolcelate "Dolcelate" with name 'dolcelate'; CCheese dworcester "Double Worcester" with name 'double' 'dw' 'worcester' 'worchester'; CCheese dunburra "Dunburra" with name 'dunburra'; CCheese dunlop "Dunlop" with name 'dunlop'; CCheese dunsyre "Dunsyre Blue" with name 'dunsyre' 'blue'; CCheese dry_jack "Dry Jack" with name 'dry' 'jack'; CCheese swiss "Swiss" with name 'swiss'; CCheese fontal "Fontal" with name 'fontal'; CCheese fontina "Fontina" with name 'fontina'; CCheese aosta "Fontina Val d'Aosta" with name 'fontina' 'val' 'd^aosta' 'aosta'; CCheese fresh_jack "Fresh Jack" with name 'fresh' 'jack'; CCheese gjetost "Gjetost" with name 'gjetost'; CCheese grana "Grana Padano" with name 'grana' 'padano'; CCheese gourmandise "Gourmandise" with name 'gourmandise'; CCheese gubbeen "Gubbeen" with name 'gubbeen'; CCheese halloumi "Halloumi" with name 'halloumi'; CCheese howgate "Howgate" with name 'howgate'; CCheese huntsman "Huntsman" with name 'huntsman'; CCheese ilchester "Ilchester" with name 'ilchester', calcval ilchester; CCheese innes_button "Innes Button" with name 'innes' 'button'; CCheese isle "Isle of Mull" with name 'isle' 'of' 'mull'; CCheese iverlock "Iverlock" with name 'iverlock'; CCheese jermi "Jermi Torte" with name 'jermi' 'torte'; CCheese kasseri "Kasseri" with name 'kasseri'; CCheese kefalotyri "Kefalotyri" with name 'kefalotyri'; CCheese kelsae "Kelsae" with name 'kelsae' 'kelsea'; CCheese knockalara "Knockalara" with name 'knockalara'; CCheese lanark_blue "Lanark Blue" with name 'lanark' 'blue'; CCheese lappi "Lappi" with name 'lappi'; CCheese leyden "Leyden" with name 'leyden'; CCheese limburger "Limburger" with name 'limburger' 'limberger', calcval limburger; CCheese loch_arthur "Loch Arthur" with name 'loch' 'arthur'; CCheese maasdam "Maasdam" with name 'maasdam'; CCheese malvern "Malvern" with name 'malvern'; CCheese manchego "Manchego" with name 'manchego'; CCheese mascarpone "Mascarpone" with name 'mascarpone'; CCheese mimolette "Mimolette" with name 'mimolette'; CCheese mizithra "Mizithra" with name 'mizithra'; CCheese monterey "Monterey Jack" with name 'pepper' 'monteray' 'monterey' 'jack'; CCheese morbier "Morbier" with name 'morbier'; CCheese munster "Munster" with name 'munster' 'muenster'; CCheese orla "Orla" with name 'orla'; CCheese pant_ys_gawn "Pant ys Gawn" with name 'pant' 'ys' 'gawn'; CCheese pecorino "Pecorino Romano" with name 'pecorino' 'romano', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'pecorino') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese pentland "Pentland" with name 'pentland'; CCheese petit_basque "Petit Basque" with name 'petit' 'basque'; CCheese petit_morin "Petit Morin" with name 'petit' 'morin'; CCheese reggiano "Parmigiano Reggiano" with name 'parmigiano' 'reggiano'; CCheese pouligny "Pouligny-Saint-Pierre" with name 'pouligny-' 'saint-pierre' 'st-pierre' 'pouligny' 'saint' 'st' 'pierre'; CCheese queso_vare "Queso Vare" with name 'queso' 'vare'; CCheese reblochon "Reblochon" with name 'reblochon'; CCheese reggianito "Reggianito" with name 'reggianito'; CCheese ricotta "Ricotta" with name 'ricotta'; CCheese ricotta_salata "Ricotta Salata" with name 'ricotta' 'salata', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'salata') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese romany "Romany" with name 'romany'; CCheese saga "Saga" with name 'saga'; CCheese salers "Salers" with name 'salers'; CCheese sardo "Sardo" with name 'sardo'; CCheese serra_da_estrela "Serra da Estrela" with name 'serra' 'da' 'estrela'; CCheese st_agur "Saint-Agur" with name 'st' 'saint' 'agur' 'saint-agur' 'st-agur'; CCheese st_andre "Saint-Andre" with name 'st' 'saint' 'andre' 'saint-andre' 'st-andre'; CCheese st_andrews "Saint-Andrews" with name 'st' 'saint' 'andrews' 'saint-andrews' 'st-andrews'; CCheese st_marcellin "Saint-Marcellin" with name 'st' 'saint' 'marcellin' 'saint-marcellin' 'st-marcellin'; CCheese st_nectaire "Saint-Nectaire" with name 'st' 'saint' 'nectaire' 'saint-nectaire' 'st-nectaire'; CCheese sapsago "Sapsago" with name 'sapsago'; CCheese staffordshire "Staffordshire" with name 'garlic' 'staffordshire'; CCheese stichill "Stichill" with name 'stichill'; CCheese stinking "Stinking Bishop" with name 'stinking' 'bishop'; CCheese strath "Strathkinness" with name 'strath' 'strathkinness'; CCheese sussex "Sussex Slipcote" with name 'sussex' 'slipcote'; CCheese taleggio "Taleggio" with name 'taleggio'; CCheese teviotdale "Teviotdale" with name 'teviotdale'; CCheese tomme "Tomme de Savoie" with name 'tomme' 'de' 'savoie'; CCheese trou_du_cru "Trou du Cru" with name 'trou' 'du' 'cru'; CCheese turunmaa "Turunmaa" with name 'turunmaa'; CCheese vieux "Vieux Corse" with name 'vieux' 'corse'; CCheese yarg "Yarg" with name 'yarg'; CCheese yorkshire "Yorkshire Blue" with name 'yorkshire' 'blue'; CCheese zamorano "Zamorano" with name 'zamorano'; CCheese buffalo "Buffalo Cheese" with name 'buffalo'; CCheese blue_stilton "Blue Stilton" with name 'blue' 'stilton', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'blue') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese somerset_brie "Somerset Brie" with name 'somerset' 'brie', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'somerset') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese charnwood "Charnwood Smoked Cheddar" with name 'charnwood' 'smoked' 'cheddar', parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'charnwood' or 'smoked') gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; CCheese chevre "chevre" with name 'chevre', isvague 1; CCheese goat "goat cheese" with name 'goat', isvague 1; ! CCheese cream "cream cheese" with name 'cream', isvague 1; CCheese any_cheese "any cheese at all" with name 'any' 'at' 'all' 'really'; CCheese popular "most popular cheese" with name 'most' 'popular', number 0; CCheese cheese "cheese" InShop with phase 1, isvague 1, before [; Smell: " You smell in vain for a whiff of cheese."; Take: " Take what cheese?"; Buy: rfalse; default: print " You don't actually see any cheese. But surely there's some behind the counter or in a back room.^"; return ThinkSub(); ], has scenery; !------------------------------------------------------------- ! Other topics not covered elsewhere Object area "area" with name 'area' 'district' 'these' 'parts', article "the", has scenery topicattr; Object breasts "breasts" with name 'her' 'breasts', article "her", has scenery topicattr pluralname; Object cat "cat" with name 'cat', has female animate scenery topicattr; Object fudges "fudges" with name 'fudge' 'fudges', has edible topicattr scenery pluralname; Object inquisition "Spanish Inquisition" with name 'spanish' 'inquisition', has proper scenery topicattr; Object lumberjack "lumberjack" with name 'lumberjack', has scenery topicattr; Object monty "Monty Python's Flying Circus" with name 'monty' 'python' 'python^s' 'flying' 'circus', has scenery proper topicattr; Object viking "viking" with name 'viking', has male animate scenery topicattr; !------------------------------------------------------------- [ Initialise; location = OutShop; score = 0; give player topicattr; print "^^^^^^^^^"; ]; [ AACheeseSub; <>; ]; [ AAWensleydaleSub; <>; ]; [ AboutSub; "CHEESESHOP is, of course, based on the famous Cheeseshop sketch by Monty Python's Flying Circus, and its original text may be found in ", (emph) "Monty Python's Flying Circus: Just the Words Volume Two.", " But what you may not know is that I first wrote this interactive version of Cheeseshop in JotaCode for the ifMud, and the source code for that version may be found at http://webhome.idirect.com/@@126dswxyz/cheeseshop.html .^^In case you're not familiar with the sketch, you are playing the role of Mousebender, who attempts to buy many varieties of cheese from Wensleydale, the shopkeeper. To do this, type commands like ASK MAN ABOUT BRIE or BUY GOUDA. Only varieties of cheese are recognized; the game doesn't know about brand names like Kraft or Velveeta. If you can't think of a new variety of cheese, type THINK.^^ If you are familiar with the sketch, be assured that this is an ", (emph) "interactive", " variant, which means that you can try to ask for different varieties of cheeses in any order (not just in the same order as in the original sketch), and do a few other things besides. On the other hand, the game remains somewhat ~on the rails~ in other ways, mostly so that progress through the dialogue occurs in reasonable order. (For example, the game will dissuade you from buying cheddar until late in the game.) ^^It's just a short little game, but I do hope you have fun with it. And thanks to folks on the ifMud for help and beta-testing, you know who you are."; ]; [ BeGreetedSub; " Talking to yourself again?"; ]; [ BeQuietSub; " Try telling someone else that."; ]; [ BuyCheeseSub; <>; ]; [ BuyWensleydaleSub; <>; ]; [ BuySub; if (location ~= InShop) " There's nothing for sale here outside the shop. Try going inside."; if (noun ofclass CCheese) { if (corpse in location) <>; else if (mgr in location) <>; " You don't see the shopkeeper here. Perhaps he can be summoned, somehow."; } " ", (CTheyreorThats) noun, " not for sale."; ]; [ DanceSub; " You dance about the room, in an apparent audition for the Ministry of Silly Dances."; ]; [ GreetSub; if (ObjectIsUntouchable(noun)) return; if (noun has animate && RunLife(noun,##Greet)~=0) rfalse; if (noun == player) " Talking to yourself again?"; print " ", (The) noun, " ignore"; if (noun hasnt pluralname) print "s"; " your greetings."; ]; [ InvSub; if (player hasnt general) print " (Your inventory isn't that important in this game, so I didn't implement it. But if you must know:)^"; print " You are impeccably dressed in a nice business suit, and you're carrying the things you usually carry. To wit: a wallet (with enough money in it to buy some delicious cheese), your keys (for a house that doesn't appear in this game), a pen, some headache pills, a hanky,..."; if (gun in player) print " and a gun."; else print " hmm, I think that's it."; print " None of which you can or need to refer to in this game."; if (gun in player) print " Except for the gun, of course."; print "^ "; if (player hasnt general) print "Oh wait. "; print "You also have a craving for ", (emph) "cheese", "."; if (player hasnt general) { give player general; print " (No, really, you do. It's kinda the point.)"; } new_line; rtrue; ]; [ IsTopic i; if (scope_stage == 1) rfalse; if (scope_stage == 2) { objectloop (i has topicattr) PlaceInScope(i); rtrue; } if (action_to_be == ##Buy) " That's not for sale."; else " You don't need to ask about that."; ]; [ ScoreSub; if (deadflag == 0) " (There is no score in this game.)"; else if (deadflag == 1) ! 16-ton weight "Ouch. How ", (emph) "depressing", "."; else if (deadflag == 2) ! satisfaction "Thanks for playing!^^And now for something completely different:"; else if (deadflag == 3) { ! no cheese print "This will never do. Would you rather eat "; print_ret (string) random( "spam, spam, spam, baked beans, and spam?", "a strawberry tart that doesn't have too much rat in it?", "a blancmange?"); } ]; [ ShootSub; if (noun ~= gun) " That's not something you can shoot with."; if (second == player) " Suicidal, you are not. Homocidal, however,... yesss. And you look at ", (the) mgr, ", who stands frozen behind the counter, and smiling that asinine grin. You grin back at him, ..."; <>; ]; [ ShoutAtSub; if (ObjectIsUntouchable(noun)) return; if (noun has animate && RunLife(noun,##ShoutAt)~=0) rfalse; if (noun == player) " You are about to yell imprecations at yourself, when you remember your promise to Greta that you wouldn't do that to yourself. So you don't."; print " Maddingly, ", (the) noun; if (noun has pluralname) print " don't"; else print " doesn't"; " respond to your shouting."; ]; [ ThinkSub n x; n = 0; print " (hmmm... what about "; objectloop(x ofclass CCheese) { if (x.asked == 0 && n < 10) { print (name) x, ", "; n++; } } "...?)"; ]; [ XyzzySub; deadflag = 1; " A hollow voice says ~Xyzzy? Tinny, tinny sort of word.~ ^ Then a sixteen-ton weight drops on your head."; ]; !------------------------------------------------------------- Include "Grammar"; Verb meta 'about' 'info' 'help' 'hint' * -> About; Extend 'ask' replace * creature 'about'/'for' 'cheese' -> AACheese * creature 'about'/'for' 'wensleydale' -> AAWensleydale * creature 'about'/'for' scope=IsTopic -> Ask; Verb 'be' * 'quiet'/'quiet!' -> BeQuiet; Extend 'buy' replace * 'cheese' -> BuyCheese * 'wensleydale' -> BuyWensleydale * scope=IsTopic -> Buy; Verb 'dance' * -> Dance * 'around'/'about' -> Dance; Verb 'hi' 'hello' * -> BeGreeted * creature -> Greet; Verb 'greet' * creature -> Greet; Verb 'kick' * noun -> Attack; Verb 'shush' 'hush' 'shh' 'quiet' * -> BeQuiet; Extend only 'shut' first * 'up'/'up!' -> BeQuiet; Verb 'stop' 'halt' 'end' * 'the'/'your'/'that' 'dancing'/'music'/'racket'/'noise' -> BeQuiet * 'dancing'/'music'/'racket'/'noise' -> BeQuiet; Verb 'ring' * noun -> Push; Verb 'shoot' 'fire' * shootable 'at' noun -> Shoot * noun 'with' shootable -> Shoot reverse; Extend only 'shout' replace * 'at' creature -> ShoutAt; Verb 'yell' * 'at' creature -> ShoutAt; Verb 'xyzzy' * -> Xyzzy; #ifdef DEBUG; [PhaseSub; "[phase is ", cheese.phase, "]"; ]; Verb 'phase' * -> Phase; #endif;