!'Vindaloo' !Copyright (c) 1996 !By Adam G Crutchlow !This is just a little game created whilst I was learning Inform. !I put it in the archives for the hell of it. Switches v5; !Constant DEBUG; Constant Story "'Vindaloo'"; Constant Headline "^An Interactive Recipe.^Copyright 1996 by Adam G Crutchlow.^"; Constant max_score 18; Constant max_carried 4; Global chicken_status=0; Global choppedo=0; Global choppedt=0; Include "Parser"; Include "Verblib"; Include "Adname"; ! ROOMS Object alley_1 "Alley" with description "You are in dirty alley. There is a big pile of rubbish stopping you from going any further north.", s_to alley_2, n_to "You scramble half way up the pile of rubbish but that's as far as you get.", has light; Nearby rubbish "pile of rubbish" with description "The rubbish is mounted so high that there is no way you can get past it.", name "rubbish" "stuff" "pile" "of" "alley", before [; search: if (hat hasnt general) { give hat general; move hat to player; "You dig deep into all the rubbish and discover a hat which someone has just tossed aside. It looks fairly new."; } ], has scenery; Object alley_2 "Alley" with description "The dim alley extends north from your back garden, which you can see to the west.", n_to alley_1, sw_to back_garden, has light; Object back_garden "Your Back Garden" with description "The back garden doesn't look as neat and tidy as it probably should. You'll get around to tidying it up one day. The whole place is overgrown with weeds. At the end of the garden is the entrance to the alley behind your house.", ne_to alley_2, s_to kitchen, has light; Nearby weeds "weeds" with description "Your whole garden is overgrown with weeds.", name "weeds" "plants" "garden", article "some", before [; Search: if (self hasnt general) { give self general; move onion to player; score=score+1; "As you pull aside the weeds you discover an onion growing in amongst them. You had forgotten you had planted it, but it will come in handy."; } ], has scenery; Object bathroom "Small Bathroom" with description "This is your little bathroom. It contains all the usual things.", initial "Ah, the bathroom. You'd better remember this place. You could be needing to find it very quickly after this vindaloo.", s_to bedroom, has light; Object kitchen "Kitchen" with description "This is the kitchen. It is fairly messy as is the rest of the house. To the north you can see the back door, leading into the garden. In the corner or the room is your stove. Over by the sink is a drawer. In the centre of the room is a large square table. On the wall above the drawer is a reasonably sized cupboard. Over near the back door is the sink.", s_to hall, n_to back_door, has light; Nearby stove "stove" with description [; if (self has on) "Your trusty stove which you have used to make numorous curries is on and ready to cook. You can see a flame coming from the ring."; "Ahh yes many curries have been made at this stove, you look forward to using your trusty stove again for this next one."; ], name "stove" "cooker" "hob" "stovetop", before [; switchon: if (self has on) "The stove is already on."; if (pan in self) { if (onion in pan && tomatoes in pan && chicken in pan && spices in pan) { deadflag=2; score=score+3; "You turn on the stove and your meal begins cooking. Soon you are enjoying your long awaited vindaloo."; } "You don't have all the ingeredients in the pan, so you decide against it."; } give self on; move flames to stove; "As you turn the knob flames shoot from the stove top."; switchoff: if (self hasnt on) "The stove is already off."; { remove flames; give self ~on; "You turn off the stove, and the flames die down."; } ], has scenery switchable supporter; Nearby drawer "drawer" with description "This drawer contains all the odds and ends you feel you need in the kitchen.", name "drawer", before [; open: if (self hasnt open) "The drawer is jammed shut and it won't budge no matter how hard you try."; unlock: if (second==crowbar) { if (self hasnt open) {if (self hasnt general) { score=score+2; give self general; } give self open; "You just manage to force the drawer open with the crowbar."; } "It's already open."; } ], has openable ~open container scenery; Nearby kitchen_table "table" class adnc, with description "It is a big square table, perfect for preparing food.", name "table", adname 'kitchen', has scenery supporter; Nearby cupboard "cupboard" with description "Your cupboard for pots and pans.", name "cupboard", has scenery container openable ~open; Nearby sink "sink" with description "Just an average sink with a tap.", name "sink", has scenery container open; Nearby tap "tap" with description "A tap for getting water from, nothing unusual here.", name "tap" "faucet", before [; switchon: if (self has on) "The tap is already on."; { move water to sink; give self on; "Water pours copiously from the tap into the sink."; } switchoff: if (self hasnt on) "The tap is already off."; { remove water; give self ~on; "You turn off the tap, and the water runs down the plughole.";} ], has scenery switchable; Nearby back_door "back door" class adnc, with description "The door leading between the kitchen and the garden.", name "door", adname 'back', door_to back_garden, door_dir n_to, has scenery door openable ~open; Object closet "Closet" with description "The closet which contains all your clothes and things.", e_to bedroom, has light; Nearby clothes "clothes" with description "Your whole collection of clothes. You don't seem to have thrown anything out for a long time. There are all kinds of interesting articles of clothing.", name "clothes" "articles" "clothing" "closet" "things", before [; search: if (self hasnt general) { give self general; move scarf to location; "You push all your clothes aside looking for anything interesting, and you see your favourite scarf in the corner of the closet."; } ], has scenery; Object bedroom "Bedroom" with description "You are in your bedroom. There is a bed here and a bedside table. Your closet is in the west wall. North is the bathroom.", w_to closet, n_to bathroom, e_to hall, has light; Nearby bed "bed" with description "It is your soft comfortable bed.", name "bed", before [; search: if (self hasnt general) { give self general; move coin to player; "You thoroughly search the bed, knowing how easily things can be lost in there. Ah ha what's this? You find an old pound coin."; } ], has container enterable open static; Nearby bedside_table "bedside table" class adnc, with description "Your bedside table is a cheap DIY job from a local shop. Every time you put something on it you think it will collapse, but as yet it hasn't.", name "table", adname 'bedside', has static supporter; Object hall "The Hallway" with description "You are at the centre of your house. The front door is south of here. There are other rooms in most directions.", w_to bedroom, n_to kitchen, s_to front_door, has light; Nearby hall_table "hall table" class adnc, with description "This is the hall table. There is stuff on it.", name "table", adname 'hall', before [; examine, search: if (self hasnt general) { give self general; move key to player; score=score+1; "You find a key on the hall table."; } ], has static supporter; Object front_door "front door" class adnc, with description "It is the front door to your house.", name "door", adname 'front', before [; examine: if (front_door has locked) "The door is locked, so if you don't have a key then this is the end of the road for you."; ], door_to [; if (location==house_front) return hall; return house_front; ], door_dir [; if (location==house_front) return n_to; return s_to; ], with_key key, found_in house_front hall, has scenery door openable lockable ~locked ~open; Object garage "Garage" with description "In your garage there are many tools and bits of old junk lying around, nothing out of the ordinary and nothing particularly interesting.", name "garage", e_to house_front, has light; Object house_front "Front of House" with description "You are standing at the front of your house, which is to the north. A road stretches out infront of you. To the west is your garage.", n_to front_door, s_to road, w_to garage, initial [; if (front_door has open) { give front_door ~open locked; "A gust of wind slams the front door of you house shut"; } ], has light; Object shop "Indian Shop" with description "This is a small Indian shop filled with shelves holding many exotic products.", s_to more_road, before [; Take: if (noun==shelves || noun==spices) "Raj says: If you want something you'll have to buy it."; Drop: "Raj says: Please don't throw your things down on my floor."; Buy: if (coin in player) { if (noun==spices) { move spices to player; move coin to patel; score=score+2; "Raj says: Thankyou, enjoy your meal. (Handing you some spices)"; } "You think twice and decide not to."; } "You have no money."; ], has light; Nearby shelves "shelves" class adnc, with description "The shelves are packed with all kinds of Indian food stuffs. You shouldn't have any trouble finding what you are looking for here.", name "shelves" "shelf" "food" "curry" "naan" "rice" "vindaloo" "paste", adname 'indian' 'stuffs' 'exotic', article "many", has static; Nearby patel "Raj" with description "Raj is your good neighbour and local shop keeper.", name "raj", life [; ask: switch(second) {'curry', 'meal', 'food', 'spices', 'vindaloo': "Raj says: I have many fine spices for sale. I am sure they are just what you are looking for."; 'price', 'money', 'coin', 'pound': "Raj says: Everything for a pound today sir."; } "Raj says: Sorry, I don't know anything about that."; tell, answer: switch(noun) {'hello', 'hi': "Raj says: Hello to you sir."; 'goodbye', 'bye': "Raj says: Goodbye. Come again soon."; } "Raj says: If you need help on anything just ask me about it."; ], has animate proper ~female; Object building_site "Building Site" with description "Bricks and junk and the like are piled everywhere.", e_to road_bend, se_to fruit_n_veg, has light; Nearby junk "junk" with description "There could be anything in amongst this lot.", name "junk" "sand" "bricks" "piles" "pile" "building" "site", before [; search: if (self hasnt general) { give self general; move crowbar to player; "You kick bricks and bits of pipes out of the way and discover a steel crowbar."; } ], has scenery; Object road_bend "Bend in road" with description "Here the road bends from east to south.", w_to building_site, e_to road_west, s_to fruit_n_veg, has light; Object road_west "Road" with description "The road heads east or west depending on which way you are going.", w_to road_bend, e_to road, before [; if (chicken_status==0) if (random(2)==1) move chicken to location; ], has light; Object road "Road" with description "You are on the road outside your house. It stretches from east to west.", w_to road_west, e_to road_east, n_to house_front, s_to park_1, before [; if (chicken_status==0) if (random(2)==1) move chicken to location; ], has light; Object road_east "Road" with description "Another bit of east west road.", w_to road, e_to more_road, s_to park_2, before [; if (chicken_status==0) if (random(2)==1) move chicken to location; ], has light; Object more_road "Road Outside Shop" with description "To the north you can see a small shop. East is what looks like roadworks.", n_to shop, w_to road_east, e_to road_works, has light; Object road_works "Road Works" with description "There are a lot of road works here. You won't be able to go any further in this direction.", w_to more_road, has light; Object fruit_n_veg "Fruit and Veg' Stall" with description "It is good ol' Bill and his fruit and veg stall, he is here all weather. He sells the best wares around.", before [; buy: if (coin in player) { if (noun==tomatoes) { if (bill has general) "Bill says: Sorry mate, I gave you my last ones."; {move tomatoes to player; score=score+1; move coin to bill; "Bill says: 'ere ya go me old son. (handing you some tomatoes)"; } } "You thinck twice and decide not to."; } "You have no money."; take: if (noun==stall || noun==tomatoes) "Bill says: This stuff isn't free ya know. If you want it, you pay for it."; drop: "Bill says: Oi! don't go chucking yer litter 'round 'ere."; ], n_to road_bend, nw_to building_site, has light; Nearby stall "fruit and veg' stall" with description "On the stall there are all manner of fresh fruit and vegetables. Everyone comes to Bill.", name "stall" "fruit" "veg" "vegetables" "apples" "cabbage" "carrots" "onions" "cauliflour" "potatoes", has static; Nearby bill "Bill" with description "You see good ol' Bill. He is here whatever the weather to sell the finest fruit and veg in these parts", name "bill", life [; answer: if (hat notin bill) "Bill says: Some hooligan has stolen my new hat."; "Bill says: Ah, it is good to have my new hat back."; give: if (noun==scarf && hat notin bill) "Bill says: It's just not the same as my hat. Thanks anyway."; if (noun==hat) { if (coin notin bill) { move tomatoes to player; score=score+2; give self general; move hat to bill; "Bill says: Ah, thanks you found my hat. Here have my last tomatoes as a reward."; } move apples to player; move hat to bill; "Bill says: Ah, thanks you found my hat. Here have some apples as a reward."; } ], has animate proper ~female; Object park_1 "The Park" with description "You are in the lovely green park. Quiet birdsong is all that is to be heard.", n_to road, e_to park_2, has light; Object park_2 "The Park" with description "This park is a favourite place of yours. You often come here to just relax and watch the world go by.", n_to road_east, w_to park_1, has light; Object park_3 "park" with description "The park is lush and green, excellent soil.", name "park" "earth" "ground" "grass", found_in park_1 park_2, before [; dig: if (spade in player) if (self hasnt general) { give self general; move worm to location; score=score+1; "As you dig the soft earth with your trust spade a big fat worm emerges and wiggles at you."; } ], has scenery; ! ITEMS Object key "front door key" class adnc, with description "It is your front door key.", name "key", adname 'front' 'door'; Object onion "onion" with description [; if (choppedo==1) "You see a finely chopped onion."; "A medium sized white onion."; ], name "onion", article [; if (choppedo==1) print "a chopped"; else print "an"; ], before [; cut: if (choppedo==1) "It is already chopped up."; if (knife notin player) "You have nothing to chop it with."; if (player notin kitchen) "You'd rather try that in a more convienient location."; { choppedo=1; score=score+1; "You chop the onion finely."; } ], has edible; Object chicken "chicken" with description [; if (chicken_status==4) "It is a chopped and plucked, dead chicken."; if (chicken_status==3) "It is a plucked, dead chicken."; if (chicken_status==2) "It is a dead chicken."; "The chicken is running hapily around."; ], article [; if (chicken_status==4) print "some chopped"; if (chicken_status==3) print "a plucked"; if (chicken_status==2) print "a dead"; if (chicken_status<=1) print "a"; ], name "chicken", before [; Take: if (chicken_status<=1) "You chase the chicken around but can't catch it."; Attack: if (chicken_status>=2) "The chicken is already dead"; if (player notin kitchen) "This isn't the place for killing chickens."; { chicken_status=2; score=score+1; give chicken ~animate; "You grab the chicken's head and twist it off. The chicken is now dead."; } cut: if (chicken_status==4) "The chicken is already chopped up."; if (knife notin player) "You have nohing with which to chop the chicken."; if (player notin kitchen) "You don't think this is a good place to try that."; if (chicken_status==3) { chicken_status=4; score=score+1; "You chop the chicken into cubes and throw away the bones."; } if (chicken_status==2) "You can't cut up the chicken with it's feathers on."; "You chase wildy around around after the chicken, waving your knife furiously, but there is no way you'll catch this chicken."; ], life [; answer: "Cluck! Cluck!"; Give: if (noun==worm) { remove worm; score=score+1; chicken_status=1; "The chicken pecks the worm to pieces, and is happy. It seems to be following you now."; } ], has animate; Object worm "worm" class adnc, with description "A big fat juicy earth worm. It is wiggling around.", name "worm", adname 'big' 'fat' 'juicy' 'earth', before [; eat: remove self; "The worm wriggles around in your mouth as you chew on it. As you swallow the mushed up worm you begin to feel a little queezy. A passer-by looks at you very strangely."; ], has edible; Object spade "spade" garage with description "A good solid looking spade, good for digging.", name "spade" "shovel", initial "A garden spade rests against the garage wall."; Object hat "hat" class adnc, with description "A tartan cloth cap.", name "cap" "hat", adname 'tartan' 'cloth', has clothing; Object ball "red ball" park_2 class adnc, with description "It is a new red football. Some unfortunate child must have lost it.", name "ball", adname 'red'; Object tomatoes "tomatoes" with description [; if (choppedt==1) "You see some chopped tomatoes."; "They are juicy tomatoes."; ], article [; if (choppedt==1) print "some chopped"; else print "some"; ], name "tomatoes" "tomato", before [; cut: if (choppedt==1) "They are already chopped up."; if (knife notin player) "You have nothing to chop them with."; if (player notin kitchen) "You'd rather try that in a more convienient location."; { choppedt=1; score=score+1; "You chop the tomatoes finely."; } ], has edible; Object scarf "scarf" class adnc, with description "It is you favourite old blue woolen scarf. It's seen you through eleven cold winters has this scarf.", Initial "A scarf is bundled up in the corner of the closet.", name "scarf", adname 'old' 'blue' 'woolen' 'favourite' 'wool', has clothing; Object crowbar "crowbar" with description "It is a heavy bar of steal bent at one end. You think you could really do some dammage with this.", name "crowbar" "bar"; Object knife "sharp knife" drawer class adnc, with description "Looking at how sharp this knife is, you had better count your fingers after using it.", name "knife", adname 'sharp'; Object pan "frying pan" cupboard class adnc, with description "It is an ordinary large frying pan.", name "pan", adname 'frying', before [; receive: if (noun==onion && choppedo==1) {move onion to pan; "You put the chopped onion into the frying pan." } if (noun==tomatoes && choppedt==1) {move tomatoes to pan; "You put the chopped tomatoes into the frying pan."; } if (noun==chicken && chicken_status==4) {move chicken to pan; "You put the chopped chicken into the frying pan."; } if (noun==spices) {move spices to pan; "You put the spices into the frying pan."; } "You don't need to be putting that in there."; puton: if (second==stove or flames) if (stove has on) { if (onion in self && tomatoes in self && chicken in self && spices in self) { deadflag=2; score=score+3; "You place the frying pan down on the flames and soon your meal is cooked. Ahh nothing like a good vindaloo."; } "You don't have all the ingeredients in the pan, so you decide against it."; } ], has container open; Object coin "pound coin" with description "It is an old pound coin dated 1987.", name "pound" "coin"; Object spices "spices" with description "They are all the spices you need for making a vindaloo already premixed by Raj himself.", name "spices", article "some", before [; eat: remove spices; "Hooooo! Hooooo! The spices were very hot. You wish you hadn't eaten them now."; ], has edible; Object cone "traffic cone" road_works class adnc, with description "It is a traffic cone.", initial "A traffic cone is sitting in the middle of the road.", name "cone", adname 'traffic', has clothing; Object apples "apples" with description "Some of Bill's finest apples.", article "some", name "apples" "apple", has edible; Object water "water" class adnc, with description "The water is cool and wet.", name "water" "h2o", adname 'tap' 'faucet' 'cool', before [; drink: "Ahhh, the water is cool and refreshing."; take: "The water just slips through your fingers"; ], has static proper; Object flames "flame" with description "The flames flicker and dance as the are emitted from the stove.", name "flame" "flames" "fire" "ring", before [; take: "In your futile atempt to take the flames you only succeed in burning your fingers."; ], has proper scenery; [ NewRoom; if (chicken_status==1) { move chicken to location; "The chicken follows you."; } ]; [ InScope i; if (location==shop) { objectloop (i near player) PlaceInScope(spices); } if (location==fruit_n_veg) { objectloop (i near player) PlaceInScope(tomatoes); } rfalse; ]; [ Initialise; location = bed; "^^As you awake in your bed you decide today you feel like making your famous vindaloo curry. You are looking forward to it already.^"; ]; Include "Grammar"; [ ExitsSub; if (location ~= thedark) { print "Obvious exits: "; if (location.n_to ~= 0) print "north "; if (location.nw_to ~= 0) print "northwest "; if (location.ne_to ~= 0) print "northeast "; if (location.w_to ~= 0) print "west "; if (location.e_to ~= 0) print "east "; if (location.s_to ~= 0) print "south "; if (location.sw_to ~= 0) print "southwest "; if (location.se_to ~= 0) print "southeast "; if (location.u_to ~= 0) print "up "; if (location.d_to ~= 0) print "down "; if (location.in_to ~= 0) print "in "; if (location.out_to ~= 0) print "out "; print "^"; } else print "It is pitch dark, and you can't see a thing.^"; ]; [ PluckChickenSub; if (noun==chicken) { if (chicken_status==4) "The chicken has already been plucked and chopped."; if (chicken_status==3) "The chicken has already been plucked."; if (player notin kitchen) "This isn't really the place for plucking chickens."; if (chicken_status==2) { chicken_status=3; score=score+1; "You pluck the chicken."; } if (chicken_status==1) "You attempt to pull out the bird's feathers but it just pecks you and struggles free."; } "You can't pluck that."; ]; Verb "exits" * -> Exits; Verb "pluck" * noun -> PluckChicken; end;