! !Story Start Messages ! Constant Story "Cheezy^"; Constant Headline "^CIS 587 Assignment #2^May 2000^by Mike Baker^"; Constant MAX_SCORE = 200; ! !included libraries ! (_must_ go after the constants!) ! Include "parser"; Include "verblib"; Include "grammar"; Attribute CatSeesPlayer; Attribute PersonSeesPlayer; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !Define Rooms !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! LIVING ROOM ! Object Living_Room "Talking_Box_Room" has light supporter with name "Living_Room" "Talking_Box_Room" "People_Sitting_Room" "People_Room", Description [; print "In this room you normally see the people sitting for hours on end watching a colorful box. You can see the box from under the couch your hole is behind...you just have to look around their big feet!^^"; print "You can see a round_thing and a mouse_trap under the couch with you. "; if( Person has PersonSeesPlayer ) print "You can see the person watching the talking box now.^^"; else print "You can see the person struggling to see behind the couch now.^^"; print "To the south you can see your hole in the wall under the couch. To the east you can see the long room."; ], e_to Hall_Room, s_to Mouse_Hole; ! HALLWAY ! Object Hall_Room "Long_Room" has light supporter has general with name "Hall" "Long_Room", description "There is nothing worth noting in this room. It is long and carpeted.^^ To the west you see into the talking box room and to the south you can see into the food room. You notice the counter in the food room and a dishrag hanging from it almost to the floor. You cann't see the window from this angle.^^ West is the talking box room and the food room is south.", w_to Living_Room, s_to Kitchen_Room, After [; if( Person has PersonSeesPlayer ) { self.description(); print "^^The person sees you as you scurry into the hallway! You hear her yell for the cat.^ ~Oliver!! You worthless cat! Get That Mouse!!!~^ The monster comes bounding into the hallway all fur and claws. He chases you back to your hole in the kitchen.^^"; PlayerTo( Mouse_Hole ); } else { ! we only want to see this message once! if( self has general ) { give self ~general; print "^^The person is busy looking behind the couch at the mouse trap. She doesn't see you go into the hallway!^^"; } } if( cat in TrashCan ) give cat ~CatSeesPlayer; ]; ! KITCHEN ! Object Kitchen_Room "Food_Room" has light supporter with name "kitchen" "Food_Room" "Heaven" "Eating_Place", n_to Hall_Room, w_to Mouse_Hole, Description [; if( player in Kitchen_Room ) { print "This is your favorite room where you can always find a snack... at least until that cat came!^^ The floor is tiled in black and white tile that is cold to your feet. There is a flip top garbage can under the window which is open and you can feel a breeze comming from it. There is a counter just next to that where you can usually find something to eat. "; if( Cheese in Kitchen_Room || Cheese in KitchenCounter) print "You can smell the scent of cheese from something on the counter. "; if( Person hasnt PersonSeesPlayer ) print "You can see a Dish Rag hanging from the top of the counter almost to the floor.^"; else print "^"; print "^To the north you see the empty room that the people use to get back and forth from the talking box room and the food room. To the west you see the hole leading to home."; } ], After [; if( cat in TrashCan && cat has CatSeesPlayer && player in Kitchen_Room ) { self.description(); print "^^The monster growls and leaps at you!!^Good thing you're _very_ fast, but he chases you back into your hole!^^"; PlayerTo( Mouse_Hole ); } else if( cat in TrashCan ) print "^^You can hear the beast purring softly. He cann't see you^^"; ]; ! MOUSE HOLE ! Object Mouse_Hole "Mouse Hole" has light supporter with name "Mouse_Hole" "Hole" "Home", description "home...This is where you can sleep safely from the people in your house and that darn cat! You can see the backside of the plaster walls (nice to scurry up and down) and your comfortable bedding.^^ There are your creature comforts here, but nothing useful for getting by that cat and to some food!^^ To the east and north you have made some nice holes to get around the house. East is the food room and north the talking box room.", e_to Kitchen_Room, n_to Living_Room, Before [; if( cat in TrashCan ) give cat CatSeesPlayer; ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !Set Intial player location and description !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ Initialise; score = 0; location = Mouse_Hole; lookmode = 2; give Person PersonSeesPlayer; give cat CatSeesPlayer; print "^^^^^It's a hot summer day and you're a VERY hungry mouse! Life was good, even when these people moved in last month. For some reason, you got the feeling they didn't want you around... especially after they got that mouse trap (ha! like that could catch a smart rodent like you...people are so dumb)^^ Now they've gotten that CAT! The big monster sits in the kitchen all the time and keeps you out of it. You can hear your stomach growling.^^ So can the beast. Odd how the people have seemed so cheery lately.....^^"; print "All you want is to be able to sit back on your comfortable bed and enjoy some food without having to worry about that THING out there!^^"; ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Define Objects in the Mouse hole !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! HOLE LEADING TO KITCHEN ! Object KitchenHole "Kitchen_Hole" Mouse_Hole has scenery with name "Kitchen" "Kitchen_Hole" "Hole", description [; print "The edges to the hole are a little rough, but you're no craftsman! The hole opens into the kitchen where you can see the kitchen tile, a counter, and the window with the flip top garbage can. The window is open and you can feel a nice breeze coming from it through your hole in the wall."; if( cat in TrashCan ) print "You can see the cat sitting in his favorite spot on top of the garbage can."; ]; ! HOLE LEADING TO LIVING ROOM ! Object LivingRoomHole "Tv_Room_Hole" Mouse_Hole has scenery with name "Tv_Room_Hole" "People_Room" "People_Sitting_Room" "Talking_Box_Room", description [; print "The edges to the hole are a little rough, but you're no craftsman! The hole opens to the talking box room "; if( Person has PersonSeesPlayer ) print "you can see a Person watching the talking box (don't they _ever_ have something better to do?)."; else print "you can see the person still trying to get behind the couch. You have to give them credit for being stubborn."; ]; ! BEDDING ! Object MouseBed "Bedding" Mouse_Hole has static enterable supporter with name "Bed" "Bedding", description "Your bed looks comfortable and warm. You don't feel tired, though. It would be a nice place to sit and eat your cheese!", Before [; Enter: if( score == MAX_SCORE ) { deadflag = 2; print "^^You sit back in your bed nibbling on your hard won cheese. As you drift off to sleep you have pleasant dreams of a shocked furry face heading out the window^^"; } else if( score == 100 ) { deadflag = 2; print "^^You eat your cheese and can rest for the evening. If only you could get rid of that cat though!^^"; } else { print "You cann't rest yet! You're still hungry and that cat is still around!"; rtrue; } ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Define Object in Living Room !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! TV ! Object LivingRoomTV "Talking_Box" Living_Room has scenery with name "Tv" "Television" "Talking_Box", description "The talking box is on and the colors keep changing. You can hear it talking, but you have better things to do than stare at it (like getting some food) !!!"; ! COUCH ! Object LivingRoomCouch "Couch" Living_Room has concealed static supporter with name "Couch" "People_Seat", description "This is the thing the people sit on while watching the talking box. It's held up in the air by big pillars on the four corners and there is plenty of room for you to run around under it. You can see the whole room from under here without being noticed. There is a mouse trap off to one side under here."; ! MOUSE TRAP (under couch) ! Object MouseTrap "Mouse_Trap" Living_Room has concealed supporter enterable animate has general ! general = armed with name "Trap" "Mouse_Trap", description "A mouse trap without any cheese. Any mouse dumb enough to get caught in one of these deserves what they get....darwinism in action.", Before [; Enter: if( self has general ) { print "^^The trap goes off! Darwinism in action.^ Look on the bright side...you'll never be hungry again......^^"; deadflag = 1; } ], Life [; ThrowAt: if( noun == Button && Button in Player ) { give person ~PersonSeesPlayer; give self ~general; print "^^You and the Person hear the trap snap!^ You can see the person excitedly trying to get behind the couch while exclaiming ~Gotchya little sucker!~^^"; remove Button; score = score + 50; rtrue; } ]; ! PERSON (on couch) (secondary puzzle) ! Object Person "Person" LivingRoomCouch has scenery has PersonSeesPlayer with name "Person", description "big. what else is there to say besides slow and dumb?", After [; if( self has PersonSeesPlayer ) "^She is busy watching the Talking_Box^"; else "^She is busy trying to get behind the couch. Maybe if she didn't watch so much of the talking_box she would be able to^"; ]; ! BUTTON (under couch) ! Object Button "Button" Living_Room has concealed with name "Button" "Round_Thing", description "One of those frisbee like things the people have on their clothes and always seem to lose. It's just the right size for you to throw around to make sure they don't find it too! hehehe"; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Define objects in kitchen !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Counter where food is ! Object KitchenCounter "Counter" Kitchen_Room has concealed enterable supporter with name "Counter" "Kitchen_Counter" "Tall_Place", description "The people usually leave tasty stuff up there! All you have to do is find a way up it!", Before [; Climb, Enter: print "^It is a hard, cold, white surface your claws cann't get a grip on. You can not climb it.^"; rtrue; ]; ! Dish towel (needed so player can climb to top of counter) (minor puzzle) ! Object DishTowel "Dish_Towel" Kitchen_Room has concealed supporter enterable with name "Dish_Towel" "rag" "Dish_Rag" "dishrag" "dishtowel" "towel", description "A tattered dish_rag that is blue with yellow trim. It hangs off the top of the counter and almost reaches down to the floor! You think you can reach it if you stand on your toes....", Before [; Enter: print "you cann't enter that!"; rtrue; Climb: if( player in Kitchen_Room ) { print "^You climb the rag and get to the counter top!^"; PlayerTo( KitchenCounter ); rtrue; } else { print "^You climb down the rag to the floor.^"; PlayerTo( Kitchen_Room ); rtrue; } Take: "You cann't take that!"; ]; ! Knife Block used to get rid of cat ! Object KnifeBlock "Big_Wooden_Block" KitchenCounter has animate with name "Knife_Block" "Wooden_Block" "Big_Wooden_Block" "block", Description [; if( self in KitchenCounter && player in KitchenCounter ) "A big wooden block with sharp shiny blades stuck in the top, you can see the handles sitting right over that beast. It's too big to push around, but you might be able to push it over the edge of the counter..."; else if( self in Kitchen_Room ) "A big wooden block with sharp shiny blades stuck in the top, you can see the handles. It's lying on the floor of the kitchen with the knives stuck in the top still!"; else ! self is in Kitchen Counter and player isn't "It looks like a big wooden block, but you cann't make it out from here."; ], Before [; Push: if( self in KitchenCounter && player in KitchenCounter ) { remove cat; score = score + 100; move self to Kitchen_Room; print "You push the Wooden_Block off of the counter and it misses the cat, but hits the Flip_Top_Garbage_Can pedal opening it! "; print "^The cat is flipped into the air by the lid! As he goes out the window you catch a glimps of his shocked furry face...hahaha bye bye kitty!"; rtrue; } else "It's lying on the side so you cann't push it over and it's too heavy to move around."; Take: if( player in KitchenCounter ) print "^It's too heavy."; else print "^You cann't reach it."; rtrue; ]; ! FOOD!!! ! Object Cheese "Cheese!" KitchenCounter with name "Food" "Cheese" "Cheese!", description "This smells *really* good!", Before [; Take: if( player notin KitchenCounter && self in KitchenCounter ) rtrue; else score = score + 50; if( cat in TrashCan ) give cat CatSeesPlayer; ]; ! tool for setting cat up for demise.... ! Object TrashCan "Flip_Top_Garbage_Can" Kitchen_Room has supporter static with name "Trash_Can" "Flip_Top_Garbage_Can" "Trash" "Garbage_Can", description "Trash is put into here and it's the cat's favorite place to sit and watch your hole. There is a big pedal the people step on to flip the top open."; ! The main obstacle for player to remove (primary puzzle) ! Object cat "Cat" TrashCan has static animate has CatSeesPlayer with name "cat" "beast" "monster" "oliver", description "The cat is BIG with BIG SHARP TEETH. He also has claws. His fluffy white fur makes him look friendly, but you know better than to pet him!", Before [; Attack, Push, Pull, Climb: print "^As you approach the cat he pounces on you!^"; print "That's the good thing about Darwinism...only the smart mice will remain."; deadflag=1; rtrue; ];