Constant Story "It's Easter, Peeps!"; Constant Headline "^Copyright (c) 2006 by Sara Brookside ^First time players, please type ~about~ before beginning game play.^"; Release 1; Constant MAX_SCORE 8; Constant DIALECT_US = 1; Attribute asktopic; Replace AnswerSub; Replace EatSub; Include "Parser"; !----------------------------------------------- ! Note: LibraryMessages should be defined before VerbLib is included. Object LibraryMessages ! see section 21 of the manual and english.h with did_examine_me 0, ! 0 = you haven't looked at yourself yet; 1 = you have looked at yourself. did_pray 0, ! 0 = you haven't prayed yet; 1 = you did pray. did_sing 0, ! 0 = you haven't sung yet; 1 = you did sing. before [; Miscellany: switch(lm_n) { 19: ! Override response to "examine me" if (self.did_examine_me) "You are feeling quite chipper!"; else { self.did_examine_me = 1; "You are feeling quite chipper! It is a beautiful spring day and you are looking forward to celebrating Easter with your family this weekend. You're out of the office and engaging in one of your favorite activities: brainstorming ways to make Max happy!"; } 44: ! Override "There are none at all available!" in response to a TAKE ALL. ! Note that we're only overriding this when the count of takeable objects is 0, ! which is a bit different then the Adrift version which disallows TAKE ALL completely. if (action_to_be == ##Take) "As much as you'd dearly love to bring the entire store home to Max, I'm afraid you're going to have to acquire the items for his Easter basket mostly one at a time."; } ! end of Miscellany block ! This is a wacky way of giving the standard ceiling and floor a description, but it should work. ! The u_obj and d_obj objects are defined in english.h, but they have no description property to override. ! So instead of defining a new floor and ceiling object, or replacing the old one, we're gonna ! override the "You see nothing special about the ." message instead. Examine: switch(lm_n) { 2: if (lm_o == u_obj) { if (~~pinata.found) { pinata.found = 1; move pinata to Store; } if (pinata.hits < 3) "You see a large pinata hanging from the high ceiling of the candy store."; "The shopkeeper has apparently disposed of the burst pinata."; } if (lm_o == d_obj) { "The floor is made of dark, hardwood planks. Walnut, perhaps? Or maybe oak? It is well-worn, but functional, and rather charming."; } } Pray: print "The effectual, fervent prayer of a righteous man (or woman) availeth much.^"; if (self.did_pray == 0) { self.did_pray = 1; print "^The shopkeeper chuckles. ~Asking the good Lord for some help, eh?~^"; } rtrue; Sing: print "You bellow the first song that comes to mind, which is, oddly enough, ~Santa Claus is Comin' to Town.~^"; if (self.did_sing == 0) { self.did_sing = 1; print "^~You may be rushing the season just a wee bit,~ the shopkeeper comments.^"; } rtrue; ]; Include "VerbLib"; !----------------------------------------------- ! I took the basic code from one of Roger Firth's pages: ! http://www.firthworks.com/roger/informfaq/ww.html#3 [ ChooseObjects obj code retval; switch (code) { 0: ! Parser is excluding obj from ALL ; ! ... accept parser's decision 1: ! Parser is including obj in ALL if (obj has static || obj has scenery || obj has concealed) retval = 2; ! Don't include most objects in a " ALL" context. 2: ! Parser is asking for 'appropriateness' hint ; ! ... but we don't provide one } return retval; ]; !------------------CLASSES---------------------- ! Use classes to reduce duplicate code and make a cleaner design. Class Room has light; ! The "Treasure" class is for the items we want in our basket. This will make checking our winning conditions ! and basket handling somewhat simpler. Class Treasure has edible; Class Distant with before [; Examine: rfalse; default: "You don't need to worry about that. It's not in the store."; ], has scenery; !------------- THE CANDY STORE ITSELF ---------------- Room Store "Candy store" with description [; "Cheerful images of colorful eggs, chicks, rabbits, carrots, and ribbon-festooned Easter baskets adorn the candy store. To the north, the shopkeeper stands patiently behind a counter. South of you, the storefront window beckons to passers-by, tempting them with its proffered seasonal wares. The wall to the west is lined with conveniences, such as a pay phone, newspaper rack, umbrella stand, gumball machine, and a chair. A lighted display case runs along the wall to the east, filled with candy."; ], cant_go "There is plenty here to see, do, and explore...^^Once you have some candy in your basket, bring it to the shopkeeper and he will let you know how you are progressing.", out_to [; return self.cant_go(); ], did_listen 0, ! Have we listened once already? before [; Buy: "The shopkeeper informs you, ~This is an enchanted shop, and as such the usual forms of currency aren't of much use to you here, I'm afraid.~"; Jump: if (verb_word == 'jump') "This isn't a steeplechase scene from ~Chariots of Fire.~"; if (verb_word == 'hop') "Doing your best Easter Bunny imitation, I see."; if (verb_word == 'skip') "Sure, mind if I join you? It IS a skipping kind of a day, isn't it?"; Listen: if (noun == nothing) { if (did_listen) "It's pretty quiet. You and the shopkeeper are the only people in the store at the moment. "; else { self.did_listen = 1; "You can hear the bustle of pedestrian, bicycle, and motor-vehicle traffic on the busy street outside the shop. Inside, however, you hear only an occassional soft chuckle from the shopkeeper and the echo of your footsteps across the wooden floor."; } } Smell: "A delicate sweetness hangs in the air, almost like the scent of honeysuckle."; WaveHands: "You wave to the shopkeeper, who holds a hand up in reply. ~Something I can help you with?~ he asks."; Yes: "Or ~no.~ Or ~maybe.~ Those are the basic options, anyhow."; ], daemon [; ! This daemon is started by the Initialise function. switch (turns) { 5: "^You hear a clucking noise emanating from the window display."; 10: "^~You must be shopping for somebody pretty special, I'd say.~ The shopkeeper glances at you knowingly."; 20: "^The shopkeeper retrieves a wind-up chick from beneath the counter, winds it up, and sets it down. The toy gyrates jubilantly across the wooden surface, while the whirring sound of the wind-up mechanism drones from inside it."; 25: "^~Once you have some candy in your basket, bring it to me and I'll check it against Max's list,~ the shopkeeper offers amiably.^^~Max's list???~ you think. Had you told the man your son's name? Or what sort of candy he likes?"; 30: move girl to Store; "^Outside, a little girl tugs on her father's arm, straining in the direction of the candy store, but he hustles her along past the door."; 50: "^~Don't forget to look up, if you haven't tried that yet. You never know where things may be hiding in this store, so you'll have to look around carefully.~ The shopkeeper's helpful voice rings out across the store."; 75: "^~Forgive me, but I didn't notice whether you had happened upon the golden goose yet or not. If you haven't, you might want to keep an eye out for her. She likes to think she's important around here!~ the shopkeeper hoots.^^~You'll find her in the window display, although I'm sure she'll make her presence known soon enough!~ He chuckles."; 100: move dog to Store; "^A dog leashed to a tree just outside the store begins barking furiously. A bird flitters out from the tree branches."; } ]; ! - - - - - - - THE SHOPKEEPER - - - - - - - Object shopkeeper "shopkeeper" Store with name 'shopkeeper' 'man' 'clerk' 'storekeeper' 'salesman' 'attendant' 'manner' 'shopkeep' 'owner' 'himself', ! initial "The shopkeeper looks on with a contented, secretive smile.", description "The shopkeeper seems to be a good-natured fellow whose forehead lines suggest the wisdom that is born of experience. His clear, gray-blue eyes sparkle and his deep smile lines and crows' feet bestow an air of mischief about him. He laughs often and heartily and possesses an affable, almost enchanted manner.", man_says "~Well, now... on the one hand, 'what you see is what you get' with me. On the other hand, 'still waters run deep' and you can't always see the bottom of the pond from the surface. I'll let you think on that a little bit.~ ", life [ x n; Ask, Tell: if (second == player) "~Why, you seem like a fine young person! 'Bout as fine as they come, I'd venture...~"; if (second == d_obj) second = floorboards; if (second provides man_says) { PrintOrRun(second, man_says); rtrue; } "~I have nothing to say about that.~"; ! NEWCODE Give, Show: if (noun == basket) { n = 0; objectloop (x in basket) { if (x ofclass Treasure) n = n + 1; } if (n == 8) { deadflag = 2; ! *** You have won *** "Congratulations! You have put together a marvelous Easter basket that will undoubtedly please Max greatly. The shopkeeper wraps it beautifully in cellophane and attaches a festive bow. You carry the basket back to your office, anticipating the holiday weekend ahead. You can almost picture Max's smile already..."; } if (list.found) "Since you already have Max's list, now all you have to do is make sure that everything that's on the list is in the Easter basket. When you have all the necessary items, bring the basket back to the shopkeeper. Easy as pie!"; if (child(basket) == 0) { ! A empty basket, not even candy dots! "~Why don't you look around the store a little more? I'm sure you can find something.~"; } else { move list to player; list.found = 1; "~Well, you've made a good start, but there are still some items on Max's list that you haven't found yet. Not to worry... 'well begun is half done,' as the old saying goes.~^^~Here,~ he says, handing you Max's list."; } } ], orders [; Give: if (noun == macaroon) <>; "Use the format ~ask shopkeeper about [subject]~."; default: "Use the format ~ask shopkeeper about [subject]~."; ], before [; Greet: "~Hello!~ you call out to the shopkeeper cheerily.^^He responds in kind. ~Hello there!~"; ], has male animate scenery asktopic; Object smile "smile" Store with name 'blue' 'crows^' 'eyes' 'feet' 'gray' 'gray-blue' 'grey' 'grey-blue' 'grin' 'lines' 'smile' 'smiles', description "The shopkeeper has such a jolly countenance, that you can't help but smile back at him in return.", man_says "~I'm a happy man, and you appear to be quite contented yourself today!~", has static scenery asktopic; Object list "Max's list" with name 'list' 'max^s', description "Your heart melts as you recognize your son's crude printing in orange crayon on a yellow piece of construction paper.^^a candy coin^a creme egg^a gumball^jellybeans ^a lollipop^a macaroon^tiny chocolate eggs^yellow marshmallow chicks", man_says [; print "~Oh, yes. "; if (~~self.found) print "I have it with me right here, behind the counter. "; "Once you have some items in your basket, bring it to me and we'll see how much progress you've made on Max's list.~"; ], found 0, ! has the list been found yet? has proper asktopic; !- - - - - - THE COUNTER - - - - - - Object counter "counter" Store with name 'counter', article "a", description "Just a simple slab of wood separating the shopkeeper's area from the rest of the store. It looks like it may be made of the same dark hardwood as the floor. A serving tray is on the counter.", man_says "He gives it several sturdy thumps with his right hand. ~Does the trick!~", has scenery supporter asktopic; Object tray "serving tray" counter with name 'serving' 'tray' 'inscription' 'sample', article "a", description "Since the candy samples have already been enjoyed, you can see that the silver tray bears an inscription on its top surface.", before [; Read: "~One code is as easy as ABC,^The other uses phone digits, 1-2-3...~"; Take: if (self hasnt moved) { give self ~concealed; move self to player; "You gently slide the candy wrappers onto the counter and pick up the serving tray. ^^~Yes, yes,~ says the shopkeeper. ~You go on and take that. I have a feeling it might be helpful to you!~"; } ], has supporter concealed; !- - - - - - - THE WINDOW DISPLAY - - - - - - - Object window "window display" Store with name 'seasonal' 'wares' 'window' 'display' 'proffered' 'storefront', article "the", description "The window display consists of a large ceramic rabbit holding out a serving plate, a golden goose, and abundant quantities of both plastic and painted Easter eggs nestled in copious green grass which lines the bottom of the storefront window. Gold letters form an arc above the main display which cheers, ~Happy Easter!!!~ to those peeking in from out-of-doors.", man_says "~There are some things a man or a woman simply needs to explore for him or herself.~", before [; JumpThru: "Suicidal already, are we?"; ! "jump through window" ], has scenery open container asktopic; Object rabbit "ceramic rabbit" window with name 'ceramic' 'large' 'rabbit', description "The ceramic rabbit in the storefront window puts you very much in mind of ~Alice in Wonderland.~ His fur is white and he dons a blue waistcoat. He is holding a serving plate.", man_says "~My storefront could use some livening up, I know. What do they call it? 'A woman's touch...~ Well, whether from man, woman, or child, I need all the decorating power I can borrow. Maybe you and Max could come in the Saturday before Memorial Day to help me decorate that storefront for the summer. Salt water taffy, gummi cola bottles, ice-cream flavored lollipops... I can see it now! Free candy for all volunteer helpers, of course!~ And, once again, he smiles.", before [; Take: "He's adorable, isn't he? Unfortunately, he is also quite large and immovable. It seems that you will have to simply enjoy him as part of the display."; ], has male static transparent asktopic; Object waistcoat "waistcoat" rabbit with name 'coat' 'waistcoat', article "a", description "The ceramic rabbit wears a royal blue coat, which falls to about mid-hip length and is fastened in the front with three brass buttons.", has scenery; Object plate "serving plate" window with name 'serving' 'plate' 'butterscotch', description "You see some butterscotch drizzled on the plate. It appears to be script of some sort.", before [; Read: "~Look up~"; Take: "The serving plate is part of the window display."; ], has supporter; Object goose "golden goose" window with name 'golden' 'gold' 'goose', description [; print "The golden goose is not only golden, she's also alive!"; if (~~token.found) print " She seems to be sitting on something in quite a protective manner."; new_line; rtrue; ], man_says "He leans forward conspiratorially, even though you and he are clearly the only ones in the shop at the moment. He whispers, ~I'll tell you a secret about that goose. She likes candy dots. They're her favorite food, in fact!~", life [; Ask, Tell: "That can't talk!"; ! NEWCODE Give: if (noun == dots) { move token to player; token.found = 1; remove dots; "The goose stands and pecks at the candy dots contentedly, revealing a token beneath her. You take the bronze token."; } ], before [; Take, Push, Pull, Search, LookUnder, Squeeze, Pet, Tickle: "The goose pecks at your hand sharply. Apparently, she doesn't wish to be disturbed."; Goose: "Duck, duck..."; Kiss: "The goose pecks at your hand sharply. Apparently, she isn't feeling particularly amorous at the moment."; ], has female animate static asktopic; Object token "token" with name 'token' 'coin', article "a", found 0, ! Have we found the token yet? See the code for the golden goose. description "A simple bronze-colored circular token.", man_says "~I'd check out the window display if I were you.~ ", has asktopic; ! NOT IMPLIMENTED: "take token" => "You have already spent the only token that you have!"; !- - - - - - THE DISPLAY CASE - - - - - - - Object case "display case" Store with name 'display' 'case' 'right', description [; print "The display case runs along the right-hand side of the candy store. It illuminates row upon row of tantalizing confections. The case is lined with a metal runner and a tube of black rubber piping where the smooth, curved glass meets the base of the display.^^"; <>; ], man_says "~Doesn't it all look positively scrumptious? Go ahead and look in the case. Just poke around for a bit.~", react_before [; Take: if (noun in case || noun in vase) { print_ret (The) noun, " ", (isorare) noun, " currently in a glass display case, inaccessible to you."; } ], before [; Attack: "The display case wasn't meant to be broken, but maybe you can find something else in the candy store that is meant to be broken..."; Open: "The shopkeeper comments, ~I hold the key to the display case, but it is a figurative key, not a literal one.~"; Search: "The lighted case is filled with candy of all sorts. You see some pastel-colored petit fors, marzipan carrots, macaroons decorated to resemble painted Easter eggs, pink marshmallow chicks, coconut eggs, buttercream eggs, peanut butter eggs, milk chocolate rabbits, and rock candy skewered on polished wooden dowels. There is a floral vase full of Pixie Stix in the case with a pile of ~pixie dust~ (aka ~colored sugar!~) in front of it."; ], has scenery transparent container asktopic; Object "metal runner" Store with name 'metal' 'runner' 'trim' 'section', article "the", description "The shiny, grooved piece of trim serves as would-be pin-stripe detailing for the display case. The runner is about 3~ wide and appears to be made of sturdy chrome.", before [; Pull, Take: "You're not entirely sure that the shopkeeper won't be upset if you start disassembling his display case..."; ], has scenery; Object piping "tube of black rubber piping" Store with name 'black' 'piping' 'rubber' 'tube', article "a", description "A narrow black tube of rubber piping, about 1/8 inch in diameter and hollow. A cross-section of the piping would look very much like the letter ~o.~", before [; Pull, Take: "You're not entirely sure that the shopkeeper won't be upset if you start disassembling his display case..."; ], has scenery; Object "base" Store with name 'base', article "the", description "The base of the display case looks sturdy and functional.", has scenery; ! This is the object to represent the concept of just "candy", as well as referring to the collection ! displayed in the display case. We'll want to make sure that referring to just "candy" always refers to just ! this object. Object "confections" case with name 'candy' 'confections', article "the", description [; <>; ], man_says "~It makes the children smile and that's all the reward I need!~", before [; Take: "~Aye, there's the rub!~^^Where do you find it? How do you get it? Good questions, all."; ], has scenery asktopic; Object vase "vase" case with name 'floral' 'vase', article "a", description "The glass vase is fluted and hand-painted with a bevy of tulips. It is holding a wide assortment of Pixie Stix. There is some ~pixie dust~ spread out in front of the vase.", has open container; Object "tulips" case with name 'bevy' 'of' 'tulip' 'tulips', before [; default: "The tulips on the fluted glass vase are beautiful, but purely decorative."; ], has scenery pluralname; Object stix "Pixie Stix" vase with name 'pixie' 'sticks' 'stix', article "the", description "These are a real classic! Paper straws filled with flavored sugar that leave kids of all ages begging for more!", man_says "~All I know is that when there's pixie dust lying around, there's sure to be magic afoot.~", has edible asktopic; Object pixie_dust "pixie dust" case with name 'colored' 'dust' 'pile' 'pixie' 'powder' 'sugar', article "some", description "You can see white linoleum gleaming through the colored powder in places. There is something scrawled in the pixie dust.", man_says "~All I know is that when there's pixie dust lying around, there's sure to be magic afoot.~", before [; Read: font off; print "~/3../3./3./3/__/2../2/6./3/9../__/3/6../8/7../__/8/6../__/4/6../6../7../3./~"; font on; " has been traced in the pixie dust."; ], has edible asktopic; Object "white linoleum" case with name 'white' 'linoleum', article "the", description [; <>; ], ! NOT USED: "I'm not sure exactly what linoleum you are referencing."; ! The above line was if the player hadn't examined the candy/confections in the case yet, which seems ! a bit absurd. There's not another patch of linoleum hiding in the game. ! (Actually, I'm a bit confused why the linoleum exists at all.) has scenery; Object rock_candy "rock candy" case with name 'candy' 'dowels' 'polished' 'rock' 'rocks' 'rocky' 'wooden', article "some", description "Colored crystal-like candy of various hues clings to gleaming wooden dowels. YUM!", parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd ~= 'candy') ! It can't be just 'candy'. We need at least one of the other words. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ], has edible; Object "milk chocolate rabbits" case with name 'chocolate' 'milk' 'rabbits', article "some", description "Solid, not hollow... if you had to guess.", has edible pluralname; Object "petit fors" case with name 'cake' 'cakes' 'cube' 'for' 'fors' 'icing' 'letters' 'petit' 'row' 'rows', article "the", description "The gleaming cubes of miniature iced cakes are carefully arranged in three rows, each row a different color. A letter has been written on the top of each morsel in contrasting icing.", has edible pluralname; Object "marzipan carrots" case with name 'carrot' 'carrots' 'marzipan', article "the", description "The candy has been carefully molded and decorated into very realistic-looking, albeit miniature, carrots. One could almost believe that they had been pulled from Mr. MacGregor's garden only just this morning. The candy appears rich and dense. ~Mmm...candy for grown-ups,~ you think to yourself.", has edible pluralname; Object "peanut butter eggs" case with name 'butter' 'egg' 'eggs' 'peanut', description "The filled eggs look extremely tasty, but you're looking for something with a little more pizzazz.", man_says "~Eggs are a reminder of the promise of new life ahead.~", has edible pluralname asktopic; Object "buttercream eggs" case with name 'butter' 'buttercream' 'cream' 'egg' 'eggs', description "The filled eggs look extremely tasty, but you're looking for something with a little more pizzazz.", has edible pluralname; Object "coconut eggs" case with name 'coconut' 'egg' 'eggs', description "The filled eggs look extremely tasty, but you're looking for something with a little more pizzazz.", has edible pluralname; Object "pink marshmallow chicks" case with name 'chick' 'chicks' 'marshmallow' 'pink', description "The marshmallow chicks are very... well, very... pink! The fact the the manufacturer was able to create colored sugar of such a bright, neon fuschia shade is rather remarkable to you.", has edible pluralname; Object macaroons "macaroons" case with name 'macaroons', article "the", description "Moist, glossy macaroons. They are decorated with icing to resemble painted Easter eggs.", has edible pluralname; ! In Inform, you can't can only ask for objects that are within scope. ! Since looking in the case is overridden, it should be safe to put extra objects like the Treasure macaroon in it. Treasure macaroon "macaroon" case with name 'macaroon', article "a", found 0, ! 0 if the PC hasn't asked for a macaroon; 1 if the PC did ask for one. description "A moist, glossy macaroon. It is decorated with icing to resemble a painted Easter egg. It looks extremely tempting and tasty.", man_says [; if (macaroon.found) "~Sorry,~ the shopkeeper says ruefully. ~Only one per customer, I'm afraid.~ "; else { macaroon.found = 1; move macaroon to player; "~Certainly! Here you are,~ he says, opening the display case with ease. He plucks a macaroon out of the case with a pair of tongs and deftly writes ~Max~ on it with a thin line of icing. He then wraps it in tissue paper and presents it to you with a flourish."; } ], has edible asktopic; !- - - - - - - THE PHONE - - - - - - - - - Object phone "pay phone" Store with name 'pay' 'phone' 'telephone' 'payphone' 'chute', article "a", description [; print "It's just a normal pay phone, like any other you'd see in a public place. The bulky receiver obscures the touch-tone dialing pad behind it, and a shiny metallic door that bears the word ~CHANGE~ swings over a small metal chute. You check simply out of habit, but... "; <>; ], man_says "~You look more like the e-mailing sort to me! But help yourself, if you need it. That's what it's there for.~", used 0, ! Have we tried to use the phone yet? before [; Search: if (~~candy_coin.found) { candy_coin.found = 1; move candy_coin to phone; move note to phone; rfalse; ! Continue with default handling. } Use: if (self.used) "There are some interesting things about the pay phone, but making a call with it isn't really one of them."; else { self.used = 1; "911 or Ghostbusters. The choice is yours!"; } Receive: "You don't need to put anything into the pay phone."; ! NEWCODE ], has scenery open container asktopic; ! Note: We don't begin the game with the note or coin in the phone. ! See the notes on the coin below. Object note "crumpled note" with name 'crumpled' 'note' 'numbers' 'paper' 'piece' 'scrap' 'slip', description "The crumpled note bears a column of numbers.", before [; Read: "1.19.11.19.8.15.16.11.5.5.16.5.18.6.15.18.13.1.3.1.18.15.15.14"; ], ; ! Note: There was a problem with the word "money". ! Early in the game, the player might open the wallet and try "x money" ! and the parser will complain 'do you mean the bills or the candy coin', ! which gives the coin away. To avoid this, we won't put he note and coin in the phone ! until the first attempt to either examine or search the phone. ! We'll control this behavior with candy_coin.found. Treasure candy_coin "candy coin" with name 'candy' 'coin' 'money', article "a", description "This rich, dark chocolate disc is molded to look like a coin and is wrapped in metallic gold foil, making it look like treasure indeed!", found 0, ! Has the coin been seen in the phone yet? parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd ~= 'candy') ! It can't be just 'candy'. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ], before [ ; Touch: if (self notin player) "You don't seem to be quite that wealthy at the moment!"; "You feel the ridged edges of the coin, as well as the familiar raised emblems on both of its faces."; ], has edible; !- - - - - - - THE NEWSPAPER RACK - - - - - - - - ! Note: I removed the word 'stand' from the names for the rack to avoid confusion with the umbrella stand. Object newsrack "newspaper rack" Store with name 'newspaper' 'paper' 'rack', article "a", description [; print "The newspaper rack is clearly more functional than aesthetic, constructed of metal and glass. "; if (child(self) ~= 0) <>; ], man_says "~Best to have a look for yourself, I think...~", parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd ~= 'newspaper' && wd ~= 'paper') ! The words 'newspaper' and 'paper' aren't enough to refer to the news stand. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ], before [; Read: "The newspaper itself is probably of more interest to you than the rack."; ], has scenery container open asktopic; Object newspaper "newspaper" newsrack with name 'news' 'paper' 'newspaper' 'business' 'section', description "The business section of today's paper.", man_says "~Best to have a look for yourself, I think...~", before [; Read: font off; print "AT&T Inc. T 1-1/1^ ONEOK Inc. OKE 1-3/3^ Inco Ltd. N 1-1/1^ Unilever NV UN 1-2/2^ D&E Communications Inc. DE(CC) 1-2/4^ R&G Financial Corp. RG(F) 1-2/3^ Oakley Inc. OO 1-2/2^ LS Starrett Co. S(CX) 1-1/3^ E*TRADE Financial Corp. E(T) 1-1/2^"; font on; rtrue; ! Take: ! NEWCODE ! if (~~lollipop.found) { ! move newspaper to player; move lollipop to player; lollipop.found = 1; ! "Taken. Oh! There was a lollipop hidden behind it! You take that as well."; ! } ! Search: ! NEWCODE ! if (~~lollipop.found) { ! move lollipop to player; lollipop.found = 1; ! "Hidden behind the newspaper is a lollipop, which you take."; ! } ], has asktopic; Treasure lollipop "lollipop" newsrack with name 'lolli' 'lollipop' 'lolly' 'lollypop' 'sucker', article "a", ! found 0, ! Has the lollipop been found? See the newspaper's code. description "A festive blue lollipop embossed with the white silhouette of a cheerful spring bird.", has edible; !- - - - - - - THE GUMBALL MACHINE - - - - - - - - Object machine "gumball machine" Store with name 'dispenser' 'gum' 'gumball' 'machine', description "A metal pole supports the classic-looking machine, a clear glass globe atop a shiny red support. The globe reveals heaps of huge, soft gumballs. Each gumball is stamped with the words ~Happy Easter~ in white script. A slot and knob assembly is engraved with the words, ~Insert Token Here~ and a swinging door covering a small chute reads, ~Thank You!~", man_says [; print "~You'll need to nose around and find a token for that gumball machine before you can get Max his Easter gumball. That's definitely on the list.~"; if (~~list.found) print " (List??? What list??)"; new_line; rtrue; ], parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd ~= 'gumball') ! The word 'gumball' by itself could be confused with the purple gumball. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ], before [; Receive: ! It only makes sense to insert either a token or quarter, or maybe the gumball. if (noun == token) { remove token; move gumball to player; "You put the token in the slot and turn the knob. You hear a slight clunking noise in the metal chute below, so you put your hand beneath it to catch a purple gumball as it rolls out."; } if (noun == gumball) "You can't put the gumball back into the machine."; "Of course that doesn't fit in the slot. You need a token for the gumball machine."; ], has container scenery open transparent asktopic; Object gumballs "gumballs" machine with name 'gumballs' 'gum' 'balls', article "some", description "The gumballs in the machine look positively scrumptious - they look soft, moist, juicy, and lusciously flavorful. Each one is about an inch in diameter. You are quite certain that Max would enjoy one very much!", before [; Take: "The gumball machine requires a token before dispensing a gumball."; ], has static pluralname edible; Object knob "knob" Store with name 'knob', description "A shiny chrome handle that rotates in a clockwise direction.", before [; Take: "The knob is part of the gumball machine."; Turn: if (parent(token) == player) <>; "You need a token."; ], has scenery; Treasure gumball "purple gumball" with name 'purple' 'gumball' 'gum' 'ball', article "a", description "It's a large purple gumball that Max is sure to love!", has edible; !- - - - - - - THE UMBRELLA STAND - - - - - - - - Object umbrella_stand "umbrella stand" Store with name 'stand' 'umbrella', article "the", description [; print "The umbrella stand is rather uninteresting. It is black in color and looks like it may be made of iron. It is cylindrical in shape, with a solid circular base and two circular bands of metal providing structural reinforcement above the base. "; <>; ], man_says "~Probably no need for it on a gorgeous day like today!~", parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'stand') ! We need the word 'stand'. It can't be just 'umbrella'. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ], before [ ; Take: "The iron umbrella stand is too heavy to be carried very far."; Receive: ! NEWCODE if (noun ~= umbrella) "Only umbrellas belong in the umbrella stand."; if (umbrella has open) { print "(first closing the umbrella)^"; give umbrella ~open; rfalse; } ], has scenery container open asktopic; Object umbrella "umbrella" umbrella_stand with name 'bumbershoot' 'umbrella', article "an", description [; print "A good-sized umbrella with a curved wooden handle. Its swirls of black material are held in place with a loop of material and a snap when the umbrella is closed. It is "; if (self has open) "open."; else "closed."; ], man_says [; if (umbrella notin umbrella_stand) "~Looks useful to me for striking objects with, I'd say...~"; else "~Oh... it's right over there; in the umbrella stand!~"; ], has openable transparent asktopic; Object "handle" umbrella with name 'bumbershoot' 'handle' 'umbrella', description "It's simply a curved, polished piece of wood to grasp on rainy days.", parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'handle') ! We need the word 'handle'. It can't be just 'umbrella'. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ]; !- - - - - - - - THE PINATA - - - - - - - - - - ! ! To inforce the puzzle, the pinata will not begin in the Store. ! The player must "look up" first; then the game puts the pinata there. ! ! The entire "hit pinata with umbrella" code is more complicated than you'd expect because of all the ! various checks and possibilities to worry about. An early concern is to test if the player didn't specify ! a weapon/tool to hit with; if no tool is specified, but the umbrella *is* in the inventory, then ! assume that the umbrella is the tool as if it had been specified explicitly. Object pinata "pinata" with name 'bunny' 'pinata' 'purple' 'rabbit', description "Hanging from the ceiling is a pinata, decorated to look like a purple bunny holding a large orange carrot. It appears to be out of your reach.", man_says [; if (parent(self) == store) "~Oh, yes! Almost everything in there is for Max. Why don't you see if you can find out what's inside?~"; "~I hope you enjoyed that. Pinatas are fun, aren't they?~"; ], ! alternate: "~Want to find out if there's candy in it?~ he teases. ~Go on... check it out for yourself!~" found 0, ! Has the pinata been discovered yet? hits 0, ! How many times has the pinata been successfully hit? before [ ; Attack: if (~~self.found) "You haven't yet discovered a pinata in the candy store!"; if (second == nothing) { if (umbrella notin player) "You're going to need some kind of tool to help you reach the pinata. Right now it is too high for you to hit."; else { second = umbrella; print "(with the umbrella)^"; } } if (second notin player) print_ret "You're not holding ", (the) second, "."; if (second ~= umbrella) "You can't seem to reach the pinata with that."; if (umbrella has open) "An open umbrella doesn't make a very effective tool."; self.hits = self.hits + 1; if (self.hits == 1) { "The pinata sways, suspended by a piece of twine. ^^~Ah... I think you're on the right track, there,~ the shopkeeper encourages."; } if (self.hits == 2) { move dots to Store; "A strip of candy dots flutters to the floor."; } if (self.hits == 3) { move creme_egg to Store; move tiny_eggs to Store; move chicks to Store; move beans to Store; remove pinata; "JACKPOT! A deluge of candy comes raining down from the burst pinata. The stash that has fallen from the pinata includes a creme egg, tiny chocolate eggs wrapped in pastel-colored foil, yellow marshmallow chicks, and a sack of jelly beans. ^^~Well done!~ says the shopkeeper. ~Good on you! That's for Max...all of it!~ ^^He tugs a nearby stool over and climbs upon it, detaching the empty burst pinata shell from the ceiling, and then disposing of it somewhere behind the counter."; } Take: "A length of twine attaches the pinata securely to the ceiling of the candy store."; ], has scenery transparent; !NOTE: The pinata shouldn't be an asktopic since it's not always valid to ask about it. Object "large carrot" pinata with name 'large' 'orange' 'carrot', description "That's a part of the pinata, true. You want to do something with the pinata as a whole, so its individual parts aren't all that important here."; Object dots "strip of candy dots" with name 'candy' 'dots' 'scrap' 'slip' 'strip' 'of', article "a", description "Colorful dots of confection attached in orderly rows to a strip of paper.", parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd ~= 'candy') ! We need a word other than just 'candy'. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ], has edible; Treasure creme_egg "creme egg" with name 'creme' 'egg', article "a", description "The familiar logo and brand name of the shiny foil wrapper intimate anticipation of a delectable pool of oozing white ~creme~ and a yellow ~yolk~ inside the delicate chocolate eggshell.", has edible; Treasure tiny_eggs "tiny chocolate eggs" with name 'chocolate' 'eggs' 'little' 'pastel' 'pastel-colored' 'tiny', article "some", description "These tiny eggs are about the size of an unshelled peanut, and they look to be made of delicious milk chocolate. Each little egg is wrapped in a glistening foil wrapper of spring-like yellow, green, blue, lilac, or green.", has edible pluralname; Treasure chicks "yellow marshmallow chicks" with name 'chicks' 'marshmallow' 'marshmallows' 'yellow', article "some", description "A little too garishly colored and sweet for your tastes, these are the sorts of treats that four-year-olds adore. After all, it's a marshmallow (sugar and air) covered with more sugar, which also happens to be colored a bright yellow. What's not to like?", has edible pluralname; Treasure beans "sack of jelly beans" with name 'bag' 'bean' 'beans' 'jelly' 'sack' 'jellybeans', article "a", description "A bag of good old-fashioned jelly beans! Everybody seems to have a favorite color, and the black ones are especially polarizing: most people tend to love them or hate them!", has edible; !- - - - - - - OTHER STUFF IN THE STORE - - - - - - - Object "candy shop" Store with name 'candy' 'shop' 'store', article "the", description [; <>; ], man_says "~I've been running this place for 35 years now. Can't imagine doing anything else. I love the sight of a smiling child! Or even an adult every now and then, mind you!~", parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd ~= 'candy') ! We need either 'shop' or 'store'. It can't be just 'candy'. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ], has scenery asktopic; Object decorations "decorations" Store with name 'baskets' 'chicks' 'colorful' 'decoration' 'decorations' 'easter' 'eggs' 'image' 'images' 'rabbits' 'ribbons', article "the", description "Simple, but tasteful, decorations frolick on the walls, counter, and display case of the candy store. Most are made of paper and some are laminated for added durability.", man_says [; if (self.eggflag) "~Eggs are a reminder of the promise of new life ahead.~"; "He laughs, almost embarrassed. ~I do the best I can to decorate the place and make it look festive. I'm a novice, though, and it undoubtedly shows. My wife was the decorating expert of our duo.~"; ], eggflag 0, ! did the player refer specifically to eggs? parse_name [ wd num; wd = NextWord(); self.eggflag = 0; while (WordInProperty(wd, self, name)) { if (wd == 'eggs') ! We want to flag if the word 'eggs' was used. self.eggflag = 1; num++; wd = NextWord(); } return num; ], has scenery pluralname asktopic; Object chair "chair" Store with name 'chair' 'seat' 'stool', article "a", description "It is just a simple plastic chair, the kind you might find behind a school desk or in the waiting room of an oil-change shop. It appears to be anchored to the floor.", man_says "~I'm afraid that it is fastened down in that location. Not all of our patrons are as careful and courteous as you are. Feel free to sit for a spell if you need a rest, though! I'd be glad to chat with you...~", before [; Take: "Sorry, but you are unable to remove the chair from its place along the left-hand wall of the candy shop."; ], has supporter enterable scenery asktopic; Object "door" Store with name 'door', article "the", description "The door leads out of the candy store, but it doesn't appear that you've finished assembling your basket for Max yet.", has scenery; ! NOTE: Fortunately, the parser downgrades the standard compass direction walls in favour of author-defined ones. Object "walls" Store with name 'wall' 'walls', article "the", description "The wall to your left is lined with various conveniences: a pay phone, a newspaper rack, an umbrella stand, and a gumball machine. The wall to your right is lined by a lighted display case.", has scenery pluralname; Object floorboards "floorboards" Store with name 'plank' 'planks' 'floorboard', man_says "~Now there's not too much to that, I suppose.~ He stamps his right foot twice. ~Does the trick!~ He winks briefly at you.", before [; Examine: "You can see nothing unusual about the dark wooden planks which comprise the floor of the candy store."; ], has scenery pluralname asktopic; !- - - - - - - ITEMS THAT AREN'T REALLY HERE - - - - - - Object "bed" Store with name 'bed', before [; LookUnder: "Played 9:05 recently, huh?"; default: "You can't see any such thing."; ], has scenery; Object "golden egg" Store with name 'golden' 'egg', ! Make sure that the player must refer to "golden egg" and not just "golden" or "egg". parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'golden') gotit = gotit | 1; if (wd == 'egg') gotit = gotit | 2; num++; wd = NextWord(); } if (gotit ~= 3) return 0; return num; ], before [; Examine: "Who said anything about a golden egg???"; default: "You can't see any such thing."; ], has scenery; Distant "office" Store with name 'office', description "Quite thankfully, you are on your lunch break and therefore are unable to see your office from the candy store!"; Distant "street" Store with name 'busy' 'road' 'street' 'traffic', description "People bustle about, luxuriating in the beautiful spring day. Some are walking briskly, while others are riding bicycles or strolling with their dogs."; Distant outside "outside" Store with name 'spring' 'day' 'outside', description "It is a beautiful spring day! ~Bottle this one!~ ", man_says "~One of my favorite times of year!~", has asktopic; ! Note: The girl and dog aren't here until the shop's daemon moves them here. Distant girl "little girl" with name 'little' 'girl', description "The little girl and her father are already further down the sidewalk near the post office now.", has animate female; Distant dog "dog" with name 'dog', description "The dog seems to have calmed down now that the bird is gone.", has animate neuter male; !------------- MISCELLANEOUS ASKTOPICS --------------------- Object "wife" with name 'his' 'wife', man_says "~Passed away seven years ago,~ he says, eyes clouding for the first time. ~She's with the good Lord now, though.~", has female asktopic; Object "Easter holiday" with name 'easter' 'holiday', man_says "~'Ressurrection Day.' That's what it should rightly be called, I suppose.~ And then, singing, ~He arose! He arose! Hallelujah! Christ arose!~", has proper asktopic; Object "hint" with name 'about' 'hint' 'hints' 'info' 'information', man_says "~Keep playing, experimenting, and looking around the store. All will become clear. And, I expect you'll want to do a fair bit of talking with me. Just ask me or talk to me about whatever's on your mind or in your heart, and I'll do my very best to try to help. All will be well in the end.~", has asktopic; Object "favorite candy" with name 'candy' 'favorite' 'favourite' 'his', article "his", man_says "~This time of year, I fancy those pink marshmallow chicks that you can see in the display case over there. During the summer time, I like to treat myself to Swedish fish!~", parse_name [ wd num gotit; wd = NextWord(); while (WordInProperty(wd, self, name)) { if (wd == 'favorite' || wd == 'favourite') ! We need 'favorite'. It can't be just 'candy'. gotit = true; num++; wd = NextWord(); } if (~~gotit) return 0; return num; ], has asktopic; Object "children" with name 'children', man_says "~Nothing makes my day like being able to put a smile on a child's face!~", has pluralname asktopic; Object "magic" with name 'enchantment' 'magic', man_says "A soft chuckle. ~Yes, this is definitely not your ordinary candy shop. Then again, I'm not your ordinary shopkeeper, am I?~", has asktopic; Object "Jesus" with name 'christ' 'jesus', man_says "~'He is altogether lovely,' the Good Book says.~", has proper male asktopic; Object "Christianity" with name 'christianity', man_says "~Phew! That's an awfully big topic! You might start by reading the book of John in the New Testament or a book called 'Mere Christianity,' by C.S. Lewis. If you have questions about what you read, come by and ask me any time!~", has proper asktopic; Object "Christmas" with name 'christmas' 'xmas', man_says "~Oh, yes! I simply love Christmas! It's a busy and wonderful time of year for me!~", has proper asktopic; Object "mother" with name 'his' 'mother', article "his", man_says "~Oh, she was a wonderful woman! You know what they say: 'The hand that rocks the cradle...' It's so true!~ he says wistfully.", has female asktopic; Object "high school" with name 'high' 'school', man_says "~Young one, that was quite a while back! There's not too much about it that I can remember. I do remember far more about playing on the baseball team than sitting in mathematics class, that's for sure!~", has asktopic; Object "credit" with name 'buy' 'buying' 'cards' 'check' 'cheque' 'credit' 'pay' 'paying' 'payment', man_says "~Your usual sort of currency isn't of much use to you here, I'm afraid.~", has asktopic; !------------- YOUR INITIAL INVENTORY ITEMS ------------------- Object basket "Easter basket" with name 'easter' 'basket', article "an", description "The basket is woven of yellow and lilac straw and is quite spacious. Apparently the shopkeeper wants you leaving his store with plenty of candy in tow!", man_says "~Yes... that's where you will want to put your candy!^^~For Max,~ he added, knowingly.", before [; Receive: if (noun hasnt edible) "But the basket is for Easter candy...!"; ! NEWCODE (This is mostly for the candy dots, which we'll let into the basket initially, ! but not when we know better.) if (list.found && ~~(noun ofclass Treasure)) "But that's not on Max's list!"; ], after [; ! NEWCODE (A simple scoring system. One point per candy on Max's list in the basket.) Receive: if (noun ofclass Treasure) score = score + 1; LetGo: if (noun ofclass Treasure) score = score - 1; ], has open container asktopic; Object straw "straw" with name 'straw', description "The flat, wide lengths of straw are woven into an attractive and sturdy basket.", before [; Pull, Take, Drop: "The straw is part of the Easter basket."; ], has scenery; ! NOTE: It would be better if this were in scope of the basket. Object wallet "wallet" with name 'black' 'leather' 'wallet' 'billfold', article "your", description [; print "A black leather billfold, monogrammed with the initials ~EMK.~ The wallet is "; if (self has open) { print "open. "; <>; } else "closed."; ], man_says "~Your usual sort of currency isn't of much use to you here, I'm afraid.~", before [; Receive: ! NEWCODE (very few things should be allowed inside the wallet) if (noun ~= bills or photos or note) print_ret "You can't put ", (the) noun, " into your wallet."; ], after [; Open: print " "; <>; ], has open openable container asktopic; Object bills "bills" wallet with name 'bills' 'money' 'cash' 'currency' 'few', article "a few", description "What's left of the $20 you withdrew from the ATM yesterday morning.", man_says "~Your usual sort of currency isn't of much use to you here, I'm afraid.~", has pluralname asktopic; Object photos "photographs" wallet with name 'photos' 'photographs' 'pictures' 'pics' 'max' 'son', article "a couple of", description "Two photographs of Max lie in your wallet: a baby picture and a more recent shot of him blowing out the candles on his fourth birthday cake.", man_says "~I can tell you love him very much...~", has pluralname asktopic; Object keychain "keychain" with name 'keychain' 'chain' 'fob' 'keyfob', article "a", description "The keychain is a handmade gift from Max. Your car and house keys dangle from a chain looped around a small red and blue heart that he crafted out of salt clay and then painted with tempera paints.", has transparent; Object house_key "house key" keychain with name 'house' 'key', article "your", description "A very ordinary looking key. It opens the front door to your home and has the term ~SCHLAGE~ written on it."; Object car_key "car key" keychain with name 'auto' 'automobile' 'car' 'key', article "your", description "It starts up your Toyota Camry sedan."; Object keys "keys" keychain with name 'keys', article "your", description "Your car key and house key hang from the keychain.", has pluralname; !---------- THE INITIALISE ROUTINE ----------- [ Initialise; print "It's the week before Easter, and you've popped out of your office one day on your lunch break. Your mission? To assemble an Easter basket that will both delight and mystify your 4-year-old son Max.^^"; print "You enter a nearby candy store, and the shopkeeper hands you a festive Easter basket. ~No charge,~ he says, smiling, and leaves you to your shopping.^^"; location = Store; move keychain to player; ! Move things to player in the reverse order you want them listed. move wallet to player; move basket to player; lookmode = 2; ! verbose mode inventory_style = FULLINV_BIT + ENGLISH_BIT + RECURSE_BIT; ! Wide inventory style. score = 0; StartDaemon(Store); ! The store's daemon will display the timed events. ]; !================= VERB ROUTINES =================== [ AboutSub; "~It's Easter, Peeps!~ ^^Release Version 1.0 submitted to the 2006 One Room Game Competition ^^Copyright (c) 2006 by Sara Brookside ^^The .pdf files in the ~Feelies~ folder are copyright Marilyn Scott-Waters and are used by permission of the artist. See www.thetoymaker.com for additional information. ^^Alpha- and beta-testing and other invaluable help from John Bruce, Daniel Hiebert (Tech), Sprite, David Welbourn, and David Whyld. Special thanks to David Welbourn, who also had a significant impact on the game design and development, and who graciously ported the entire game to Inform. Thank you to Dan Shiovitz and Lucian P. Smith for their help in the initial stages of the Inform port.^^The author welcomes your comments, feedback, rants, criticisms, reviews, bug reports, general impressions, suggestions, etc. As of this writing in April, 2006 you may contact Sara via e-mail at jsh11a@@64aol.com."; ]; [ ConversationSub; "A partial, but not exhaustive, list of topics about which you may converse with the shopkeeper follows:^^candy, chair, decorations, display case, floor, gumball machine, hint, me, money, newspaper, phone, shopkeeper, smile, store"; ]; [ HintSub; "The shopkeeper is clearly a wellspring of information and wisdom. You might want to try talking to him. ^^In order to converse with the shopkeeper, please use the format ~ask shopkeeper about (subject)~ or ~talk to shopkeeper about (subject).~ ^^Please type ~conversation~ for a partial list of topics about which you may converse with the shopkeeper."; ]; ! Note: This version of AnswerSub replaces the standard one in verblibm.h. ! The default answer grammar handles the verbs 'answer' 'say' 'shout' and 'speak'. [ AnswerSub; "In order to converse with the shopkeeper, please use the format ~ask shopkeeper about (subject)~ or ~talk to shopkeeper about (subject).~^^Please type ~conversation~ for a partial list of topics about which you may converse with the shopkeeper."; ]; ! Note: This version of EatSub replaces the standard one in verblibm.h. ! We'll keep the tests for touching and edibility, but we don't remove the item, ! and we have a different default message. [ EatSub; if (ObjectIsUntouchable(noun)) return; if (noun hasnt edible) return L__M(##Eat,1,noun); if (AfterRoutines()==1) rtrue; if (keep_silent==1) rtrue; "Tempting though it is, you decide that you really had better save the candy for Max."; ]; [ CrySub; "There, there, now..."; ]; [ GooseSub; <>; ]; [ GreetSub; print_ret (The) noun, " ignores you."; ]; ! NEWCODE [ HollerSub; "Catch a tiger by his toe,^If he hollers, let him go!"; ]; [ HootSub; "Night owl, are you????"; ]; [ JumpThruSub; "You can't jump through that."; ]; ! NEWCODE [ LaughSub; "A merry, hearty sound like that of a babbling brook rises up from within you and bubbles out into the air. ~It's simply a glorious day to be alive, isn't it?~ murmurs the shopkeeper softly. You nod your assent."; ]; [ LookDirSub; <>; ]; [ LookLeftSub; "The wall to your left is lined with various conveniences: a pay phone, a newspaper rack, an umbrella stand, and a gumball machine."; ]; [ LookOutsideSub; <>; ]; [ LookRightSub; <>; ]; [ PetSub; "You can't pet that."; ]; ! NEWCODE [ ReadSub; <>; ]; [ SmileSub; "You return the shopkeeper's smile with a beaming one of your own."; ]; [ TelephoneSub; <>; ]; [ TickleSub; "You can't tickle that."; ]; ! NEWCODE [ UseSub; "Be more specific, please."; ]; ! NEWCODE !================ GRAMMAR ======================= Include "Grammar"; Verb meta 'info' 'about' 'credits' 'information' 'author' * -> About; Verb meta 'conversation' 'topics' * -> Conversation; Verb meta 'hint' 'help' 'cheat' 'panic' 'panick' 'yell' 'scream' * -> Hint; Verb 'breathe' * -> Smell; Verb 'bring' * noun 'to' creature -> Show; Verb 'call' 'telephone' 'phone' 'dial' * topic -> Telephone; Verb 'capture' 'grasp' 'nab' 'grab' 'lift' * noun -> Take; Verb 'cry' 'weep' 'sob' * -> Cry; Verb 'goose' * creature -> Goose; Verb 'greet' * creature -> Greet; Verb 'holler' * -> Holler * topic -> Holler; Verb 'hoot' * -> Hoot; Verb 'intercede' * -> Pray; Verb 'laugh' 'chuckle' 'giggle' 'guffaw' 'titter' * -> Laugh; Verb 'left' * -> LookLeft; Verb 'make' * 'a//' 'phone'/'call' topic -> Telephone * 'phone'/'call' topic -> Telephone; Verb 'pet' * creature -> Pet; Verb 'procure' 'barter' 'trade' 'sell' * noun -> Buy; Verb 'right' * -> LookRight; Verb 'smile' 'grin' * -> Smile; Verb 'tickle' * creature -> Tickle; Verb 'use' 'operate' * noun -> Use; Verb 'strike' 'whack' 'slap' 'bust' * noun -> Attack * noun 'with' held -> Attack; !- - - - - - - - - - - - - - - - ! CONVERSATION VERBS. Awkward! [ IsTopic i; if (scope_stage == 1) rfalse; if (scope_stage == 2) { PlaceInScope(player); PlaceInScope(d_obj); if (pinata in Store) PlaceInScope(pinata); objectloop (i has asktopic) PlaceInScope(i); rtrue; } "The shopkeeper does not respond to your question."; ! TODO fix this so 'ask goose about love' doesn't say this. ]; Extend 'ask' replace * creature 'about' scope=IsTopic -> Ask * creature 'for' noun -> AskFor; Extend 'tell' replace * creature 'about' scope=IsTopic -> Ask; Verb 'talk' * 'to' creature -> Answer * 'to' creature 'about' scope=IsTopic -> Ask; Extend only 'answer' 'say' 'shout' 'speak' replace * -> Answer * 'to' creature -> Answer * 'to' creature 'about' scope=IsTopic -> Ask * scope=IsTopic 'to' creature -> Ask; !- - - - - - - - - - - - - - - - - Extend 'hit' * noun 'with' held -> Attack; Extend 'jump' * 'through' noun -> JumpThru; Extend only 'look' 'l//' replace * -> Look * 'left' -> LookLeft * 'right' -> LookRight * 'at' noun -> Examine * 'inside'/'in'/'into'/'through' noun -> Search * 'under' noun -> LookUnder * 'outside' -> LookOutside * 'out' 'window' -> LookOutside * noun=ADirection -> LookDir * 'up' topic 'in' noun -> Consult; Extend 'read' replace * noun -> Read * 'about' topic 'in' noun -> Consult * topic 'in' noun -> Consult; ! TODO: STILL NOT WORKING: ! * ask man for macaroon [request macaroon from shopkeeper, ask shopkeeper about macaroon, ! request a macaroon from the shopkeeper, request macaroon from the shopkeeper, ask shopkeeper for macaroon, ! ask shopkeeper for a macaroon, ask shopkeeper for the macaroon] ! COMMANDS NOT IMPLEMENTED: ! * exits => exit/out ! * hit pinata again // strike pinata again ! * "take candy from display case" etc. is handled, but differently. ! * 'feed goose' acts as 'feed goose (to the shopkeeper)' ! * 'examine candy/confections in (the) display case'