!---------------------------------------------------------------------------- ! ROOM DEFINITIONS - EPILOGUE !---------------------------------------------------------------------------- room kitchen "In Your Kitchen" { inherits game_room !provides initial_desc and long_desc handling. n_to { return epilogue_movement(n_obj) } s_to { return epilogue_movement(s_obj) } e_to { return epilogue_movement(e_obj) } w_to { return epilogue_movement(w_obj) } ne_to { return epilogue_movement(ne_obj) } se_to { return epilogue_movement(se_obj) } sw_to { return epilogue_movement(sw_obj) } nw_to { return epilogue_movement(nw_obj) } in_to { return epilogue_movement(in_obj) } out_to { return epilogue_movement(out_obj) } before { object DoSniff { PrintMessage(13,self,1) !The air smells like apple blossoms. } } } !---------------------------------------------------------------------------- room hallway "By the Back Door" { inherits game_room !provides initial_desc and long_desc handling. n_to { return epilogue_movement(n_obj) } s_to { return epilogue_movement(s_obj) } e_to { return epilogue_movement(e_obj) } w_to { return epilogue_movement(w_obj) } ne_to { return epilogue_movement(ne_obj) } se_to { return epilogue_movement(se_obj) } sw_to { return epilogue_movement(sw_obj) } nw_to { return epilogue_movement(nw_obj) } in_to { return epilogue_movement(in_obj) } out_to { return epilogue_movement(out_obj) } } !---------------------------------------------------------------------------- ! DAEMON/FUSE DEFINITIONS !---------------------------------------------------------------------------- !---------------------------------------------------------------------------- ! SCENERY OBJECT CLASSES !---------------------------------------------------------------------------- !---------------------------------------------------------------------------- ! ROOM OBJECTS, GROUND OBJECTS !---------------------------------------------------------------------------- !---------------------------------------------------------------------------- ! SCENERY DEFINITIONS !---------------------------------------------------------------------------- scenery back_door "back door" { inherits game_scenery !Provides handling for the description. nouns "door" adjectives "back" article "the" is openable, not open found_at hallway door_to { if Contains(player,umbrella) { !That's it. Game over. We won. game_ending !Perform the end. } else { return nothing } } before { object DoOpen { ! Silently assume we're going forward. The "can't go" message ! is generic enough to just say "you need an umbrella", and if ! we can go, the ending bit will describe opening the door. Perform(&DoGo, game_fore_dir) !Redirect to leaving. } } } !---------------------------------------------------------------------------- scenery basket "wicker basket" { inherits game_scenery !Provides handling for the description. nouns "basket" adjectives "tall", "wicker" article "the" is container capacity 50 !We can put stuff in it. found_at hallway } !---------------------------------------------------------------------------- scenery stove "stove" { inherits game_scenery !Provides handling for the description. nouns "stove", "oven" adjectives "old", "white", "gas-burning", "gas", "burning" article "the" is container, transparent, openable, not open is switchable, switchedon capacity 1 !We can't really put stuff in it. found_in kitchen before { object DoOpen, DoSwitchOff { PrintMessage(10,casserole,1) !Casserole still needs to bake. } object DoSniff { PrintMessage(13,self,1) !We smell the casserole. } } } !---------------------------------------------------------------------------- scenery radio "radio" { inherits game_scenery !Provides handling for the description. nouns "radio" article "the" is switchable, not switchedon found_in kitchen before { object DoSwitchOn { PrintMessage(2,self,2) !Can't turn it back on, though. } } } !---------------------------------------------------------------------------- scenery counter_top "counter top" { inherits game_scenery !Provides handling for the description. nouns "counter", "top", "counter-top", "edge" adjectives "counter", "granite", "cheap", "cheapest", "edge" article "the" is platform capacity 50 !Just in case we try putting stuff on it. found_in kitchen } !---------------------------------------------------------------------------- scenery kitchen_table "kitchen table" { inherits game_scenery !Provides handling for the description. nouns "table" adjectives "small", "kitchen" article "the" is platform capacity 50 !Just in case we try putting stuff on it. found_in kitchen } !---------------------------------------------------------------------------- scenery kitchen_chairs "kitchen chairs" { inherits game_scenery !Provides handling for the description. nouns "chairs", "chair" adjectives "kitchen", "three" article "the" is plural found_in kitchen } !---------------------------------------------------------------------------- scenery kitchen_cabinets "kitchen cabinets" { inherits game_scenery !Provides handling for the description. nouns "cabinet", "cabinets" adjectives "plain", "wooden", "kitchen" article "the" is plural, container, openable, not open capacity 1 !We can't really put stuff in it, though found_in kitchen before { object DoOpen, DoSearch, DoLookIn { PrintMessage(2,self,2) !Trying to open cabinets. } } } !---------------------------------------------------------------------------- scenery fridge "refrigerator" { inherits game_scenery !Provides handling for the description. nouns "fridge", "refrigerator", "refrigerater" adjectives "white", "old", "bulky" article "the" is container, openable, not open capacity 1 !We can't really put stuff in it, though found_in kitchen before { object DoOpen, DoSearch, DoLookIn { PrintMessage(2,self,2) !Trying to open refrigerator. } } } !---------------------------------------------------------------------------- scenery pictures "pictures" { inherits game_scenery !Provides handling for the description. nouns "frame", "frames", "picture", "pictures", "fruits", \ "covers", "fruit", "magazine", "magazines" adjectives "framed", "pictures", "magazine", "simple", "classy", \ "antique" article "the" is plural found_in kitchen } !---------------------------------------------------------------------------- scenery sink "kitchen sink" { inherits game_scenery !Provides handling for the description. nouns "sink", "faucet" adjectives "kitchen" article "the" is switchable, not switchedon found_in kitchen before { object DoSwitchOn { PrintMessage(2,self,2) !Can't turn sink on. } } } !---------------------------------------------------------------------------- ! ROUTINES SPECIFIC TO EPILOGUE !---------------------------------------------------------------------------- routine epilogue_movement(dir) { if (location = kitchen) { select dir case game_fore_dir, out_obj: return hallway case else: return nothing } else { select dir case game_fore_dir, out_obj: return back_door.door_to case game_back_dir, in_obj: return kitchen case else: return nothing } } !---------------------------------------------------------------------------- ! Determine if a given direction would be "to the side" (tangent) to the ! direction passed in as the parameter ! routine epilogue_side_dir(dir) { local gf : gf = game_fore_dir if (gf = n_obj, s_obj) and (dir = e_obj, w_obj) : return true if (gf = e_obj, w_obj) and (dir = n_obj, s_obj) : return true if (gf = ne_obj, sw_obj) and (dir = nw_obj, se_obj) : return true if (gf = nw_obj, se_obj) and (dir = ne_obj, sw_obj) : return true return false !The specified direction isn't a side dir. } !---------------------------------------------------------------------------- routine Game_Ending { AddScore(76) !For going outside and beating the game. PrintStatusLine !So the score gets updated. PrintMessage(7,13,1) !Beginning of the game ending cutscene. new_pause PrintMessage(7,13,2) !Dale notices, and communication starts. new_pause PrintMessage(7,13,3) !Communication continues new_pause PrintMessage(7,13,4) !Final bit. Last works. Game over! if (display.hasgraphics) and (has_graphics) { ! Debated with myself about having this final pause. It works without ! it, but the problem is, the Hugo screen kinda jumps, and it's easy ! to miss the last bit of text above the "The End" message when gone. new_pause print "" !A blank line before showing the "The End" title. } show_heading("theend","theend2") print "" !A blank line before printing the ending options. endflag = 3 !Prevent the "you won" or "you died" from showing. }