!% $MAX_ARRAYS=1500 !% $MAX_CLASSES=200 !% $MAX_VERBS=300 !% $MAX_LABELS=10000 !% $MAX_ZCODE_SIZE=50000 !% $MAX_STATIC_DATA=50000 !% $MAX_PROP_TABLE_SIZE=50000 !% $MAX_INDIV_PROP_TABLE_SIZE=20000 ! -------------------------------------------------------------------------- ! Generated by NI build: Constant NI_BUILD_COUNT "4B91"; Array UUID_ARRAY string "UUID://E43058C4-9179-4C97-90B3-1F6F5C7AE0E6//"; Constant Story SC_0; Constant Headline SC_1; Constant Story_Author SC_2; Serial "061226"; #ifdef TARGET_ZCODE; Constant I6_NULL $ffff; #ifnot; Constant I6_NULL $ffffffff; #endif; Constant NO_PLACES; Constant PREFER_HELD; Constant START_MOVE 1; Constant HIGHEST_RULEBOOK_NO 343; Constant I7_OBJECT_TY 58; [ I7ExtensionVersions; print "Standard Rules version 1/060806 by Graham Nelson^"; ]; Global location = InformLibrary; Global sline1; Global sline2; Global I7_prompt_text = ">"; Global I7_command; Global I7_match_snippet; Global I7_mistake_code; Global I7_left_sl = SL_Location; Global I7_right_sl = SL_Score_Moves; Global I7_box; Global act_requester; Global I7_action_deciding_rule; Global I7_concealed_item; Global I7_TProp; Global I7_TSign; Global say__n; Array I7_CS --> 16; Array I7_boxes_appeared --> I7_BOXES; Constant WITHOUT_DIRECTIONS; Global SACK_OBJECT; Constant RUCKSACK_CLASS = K10_player_s_holdall; ! --- Replacements of library routines --- #IFDEF DEBUG; #IFDEF TEST_SCENARIOS_EXIST; Replace KeyboardPrimitive; #ENDIF; #ENDIF; Replace DrawStatusLine; Replace BeforeRoutines; Replace ActionPrimitive; Replace AfterRoutines; Replace ObjectIsUntouchable; Replace AllowPushDir; Replace ActionsOnSub; Replace ActionsOffSub; Replace InvSub; Replace TakeSub; Replace RemoveSub; Replace DropSub; Replace PutOnSub; Replace InsertSub; Replace WaitSub; Replace GoSub; Replace EnterSub; Replace ExitSub; Replace GetOffSub; Replace LookSub; Replace ExamineSub; Replace LookUnderSub; Replace SearchSub; Replace ConsultSub; Replace LockSub; Replace UnlockSub; Replace SwitchOnSub; Replace SwitchOffSub; Replace OpenSub; Replace CloseSub; Replace WearSub; Replace DisrobeSub; Replace EatSub; Replace GiveSub; Replace ShowSub; Replace WakeOtherSub; Replace ThrowAtSub; Replace AttackSub; Replace KissSub; Replace AnswerSub; Replace TellSub; Replace AskSub; Replace AskForSub; Replace TouchSub; Replace WaveSub; Replace PullSub; Replace PushSub; Replace TurnSub; Replace PushDirSub; Replace SqueezeSub; Replace YesSub; Replace NoSub; Replace BurnSub; Replace WakeSub; Replace ThinkSub; Replace SmellSub; Replace ListenSub; Replace TasteSub; Replace CutSub; Replace JumpSub; Replace TieSub; Replace DrinkSub; Replace SorrySub; Replace StrongSub; Replace MildSub; Replace SwingSub; Replace RubSub; Replace SetToSub; Replace WaveHandsSub; Replace BuySub; Replace SingSub; Replace ClimbSub; Replace SleepSub; Replace ScoreSub; Replace QuitSub; Replace SaveSub; Replace RestoreSub; Replace RestartSub; Replace VerifySub; Replace VersionSub; Replace ScriptOnSub; Replace ScriptOffSub; Replace LMode3Sub; Replace LMode2Sub; Replace LMode1Sub; Replace PronounsSub; Replace NotifyOnSub; Replace NotifyOffSub; ! --- Variables used in printing --- Global say__c; Global say__p = 1; Global say__pc = 0; Global I7_caps_mode = false; ! --- Properties --- Property component_parent; Property component_child; Property component_sibling; Property I7_Map_Region; Property regional_found_in; ! --- Inclusion of library routines --- Include "Parser"; Include "VerbLib"; Array Protect_I7_Arrays --> 16339 12345; ! --- Attributes --- Property additive i7_kind; Attribute initially_carried; Attribute i7listflag; Attribute I7_mentioned; ! --- Quantities --- Array I7_Globals --> (SC_2) ! 1: Q25_story_author (SC_1) ! 2: Q26_story_headline ("") ! 3: Q27_story_genre (SC_3) ! 4: Q28_story_description (0) ! 5: Q29_release_number (0) ! 6: Q30_story_creation_year I6_NULL ; ! extent 7 words ! --- Activities --- Constant V0_printing_the_name_of_some = 0; Constant V1_listing_contents_of_somet = 1; Constant V2_grouping_together_somethi = 2; Constant V3_constructing_the_status_l = 3; Constant V4_listing_nondescript_items = 4; Constant V5_deciding_the_scope_of_som = 5; Constant V6_supplying_a_missing_noun = 6; Constant V7_supplying_a_missing_secon = 7; Constant V8_reading_a_command = 8; Constant V9_deciding_whether_all_incl = 9; Constant V10_printing_the_player_s_ob = 10; Constant V11_amusing_a_victorious_pla = 11; Constant V12_printing_the_banner_text = 12; Constant V13_printing_the_plural_name = 13; Constant V14_deciding_the_concealed_p = 14; Constant V15_printing_a_refusal_to_ac = 15; Constant V16_printing_the_announcemen = 16; Constant V17_printing_the_name_of_a_d = 17; Constant V18_printing_the_description = 18; Constant V19_printing_room_descriptio = 19; Constant V20_printing_a_parser_error = 20; Constant V21_implicitly_taking_someth = 21; Constant V22_starting_the_virtual_mac = 22; Constant V23_writing_a_paragraph_abou = 23; Array Activity_before_rulebooks --> 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 I6_NULL; Array Activity_when_rulebooks --> 32 35 38 41 44 47 50 53 56 59 62 65 68 71 74 77 80 83 86 89 92 95 98 101 I6_NULL; Array Activity_after_rulebooks --> 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 93 96 99 102 I6_NULL; Array Activity_atb_rulebooks -> 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 $ff; ! --- Variable used in debugging --- Global debug_rules = 0; Global debug_scenes = 0; ! --- Variables and arrays used in action processing --- Attribute pushable; Global move_pushing; Global move_from; Global move_to; Global move_by; Global move_through; Constant RS_CAPACITY = 666; Global rulechange_sp = 0; Array rulechange_stack --> RS_CAPACITY; Global los_rv = false; Array scene_started --> (0+2); Array scene_status --> (0+2); Array scene_endings --> (0+2); Array scene_latest_ending --> (0+2); Constant Relation_Implicit -1; Constant Relation_OtoO 1; Constant Relation_OtoV 2; Constant Relation_VtoO 3; Constant Relation_VtoV 4; Constant Relation_Sym_OtoO 5; Constant Relation_Sym_VtoV 6; Constant Relation_Equiv 7; Constant Relation_ByRoutine 8; Array RelationList --> 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" door_to Relation_OtoV "Leading-through relates one room (called the other side) to various doors" 0 Relation_Implicit "--" with_key Relation_OtoV "Lock-fitting relates one thing (called the matching key) to various things" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" 0 Relation_Implicit "--" I6_NULL; ! --- Printing routines --- [ I7_Kind_Name k; if (k == K1_room) print "room"; if (k == K2_thing) print "thing"; if (k == K3_direction) print "direction"; if (k == K4_door) print "door"; if (k == K5_container) print "container"; if (k == K6_supporter) print "supporter"; if (k == K7_backdrop) print "backdrop"; if (k == K8_person) print "person"; if (k == K9_region) print "region"; if (k == K10_player_s_holdall) print "player's holdall"; if (k == K11_device) print "device"; if (k == K24_animal) print "animal"; if (k == K25_man) print "man"; if (k == K26_woman) print "woman"; if (k == K27_player_character) print "player-character"; if (k == K30_vehicle) print "vehicle"; ]; ! --- Object tree --- Class K0_kind with vector 0 ; Class K1_room class K0_kind with n_to 0, ne_to 0, e_to 0, se_to 0, s_to 0, sw_to 0, w_to 0, nw_to 0, u_to 0, d_to 0, in_to 0, out_to 0, with vector 0 has light has ~visited with plural "rooms" ; Class K2_thing class K0_kind with before [; PushDir: AllowPushDir(); rtrue; ], with add_to_scope I7_ScopeParts, with component_parent nothing, component_sibling nothing, component_child nothing, with describe [ o; if (self has I7_mentioned ) rtrue; say__p = 0; CarryOutActivity( V23_writing_a_paragraph_abou , self); if (say__p) { give self I7_mentioned; rtrue; } ], with vector 0 has ~light has ~edible has ~transparent has ~concealed has ~scenery has ~static has ~clothing has ~workflag has lockable with action_bitmap 0 0 0 0 0 0 ; Class K3_direction class K0_kind class CompassDirection, with vector 0 with plural "directions" with p10_opposite 0, with p11_inform_property 0, with p12_inform_object 0, ; Class K4_door class K2_thing with i7_kind K2_thing with vector 0 has static has ~pushable has door has ~open has openable has ~lockable has ~locked with plural "doors" ; Class K5_container class K2_thing with i7_kind K2_thing with vector 0 has container has open has ~openable has ~lockable has ~locked with plural "containers" ; Class K6_supporter class K2_thing with i7_kind K2_thing with vector 0 has transparent has static has supporter with plural "supporters" ; Class K7_backdrop class K2_thing with i7_kind K2_thing with vector 0 has scenery has static with plural "backdrops" ; Class K8_person class K2_thing with i7_kind K2_thing with vector 0 with capacity 100 has animate has ~female has ~neuter with plural "persons" ; Class K9_region class K0_kind with vector 0 with plural "regions" ; Class K10_player_s_holdall class K5_container with i7_kind K5_container with vector 0 has ~static has openable with plural "player's holdalls" ; Class K11_device class K2_thing with i7_kind K2_thing with vector 0 has switchable has ~on with plural "devices" ; Class K24_animal class K8_person with i7_kind K8_person with vector 0 with plural "animals" ; Class K25_man class K8_person with i7_kind K8_person with vector 0 has male has ~female has ~neuter with plural "mans" ; Class K26_woman class K8_person with i7_kind K8_person with vector 0 has female has ~neuter with plural "women" ; Class K27_player_character class K8_person with i7_kind K8_person with before NULL, after NULL, life NULL, each_turn NULL, time_out NULL, before_implicit NULL, parse_name 0, orders 0, number 0, has proper transparent, with vector 0 with description SC_4 with plural "player-characters" ; Class K30_vehicle class K5_container with i7_kind K5_container with before [; Go: return 1; ], with vector 0 has enterable has static with plural "vehicles" ; Object Value_Property_Holder ; Object n_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link ne_obj, with name 'n//' 'north' 'wall', door_dir n_to, with vector 0 with p10_opposite s_obj with short_name "north" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object ne_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link nw_obj, with name 'ne' 'northeast' 'wall', door_dir ne_to, with vector 0 with p10_opposite sw_obj with short_name "northeast" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object nw_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link s_obj, with name 'nw' 'northwest' 'wall', door_dir nw_to, with vector 0 with p10_opposite se_obj with short_name "northwest" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object s_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link se_obj, with name 's//' 'south' 'wall', door_dir s_to, with vector 0 with p10_opposite n_obj with short_name "south" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object se_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link sw_obj, with name 'se' 'southeast' 'wall', door_dir se_to, with vector 0 with p10_opposite nw_obj with short_name "southeast" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object sw_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link e_obj, with name 'sw' 'southwest' 'wall', door_dir sw_to, with vector 0 with p10_opposite ne_obj with short_name "southwest" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object e_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link w_obj, with name 'e//' 'east' 'wall', door_dir e_to, with vector 0 with p10_opposite w_obj with short_name "east" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object w_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link u_obj, with name 'w//' 'west' 'wall', door_dir w_to, with vector 0 with p10_opposite e_obj with short_name "west" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object u_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link d_obj, with name 'u//' 'up', door_dir u_to, with vector 0 with p10_opposite d_obj with short_name "up" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object d_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link in_obj, with name 'd//' 'down', door_dir d_to, with vector 0 with p10_opposite u_obj with short_name "down" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object in_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link out_obj, with name 'in//' 'inside', door_dir in_to, with vector 0 with p10_opposite out_obj with short_name "inside" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object out_obj "" Compass class K3_direction with i7_kind K3_direction with K3_Link nothing, with name 'out//' 'outside', door_dir out_to, with vector 0 with p10_opposite in_obj with short_name "outside" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object selfobj "" class K27_player_character with i7_kind K27_player_character with K27_Link O97_bob, with K8_Link O97_bob, with K2_Link O92_amulet_of_death, with name 'yourself' 'yourselfs//p' with parse_name Parse_Name_88 with vector 0 has concealed with short_name "yourself" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object -> O92_amulet_of_death "" class K2_thing with i7_kind K2_thing with K2_Link O108_picture_id, with name 'amulet' 'of' 'death' 'amulet//' with vector 0 with description SC_5 has ~static with short_name "Amulet of Death" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object -> O108_picture_id "" class K2_thing with i7_kind K2_thing with K2_Link O109_ball_point_pen, with name 'picture' 'id' 'id//' 'picture//' 'card//' with vector 0 with description SC_6 with short_name "picture ID" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object -> O109_ball_point_pen "" class K2_thing with i7_kind K2_thing with K2_Link O94_doorway_sign, with name 'ball-point' 'pen' 'pen//' 'ballpoint//' with vector 0 with description SC_7 with short_name "ball-point pen" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object O93_parking_lot "" class K1_room with i7_kind K1_room with K1_Link O95_foyer, with name 'parking' 'lot' 'lots//p' with vector 0 with n_to O95_foyer with description SC_8 with short_name "Parking Lot" with list_together 0, ; Object -> O94_doorway_sign "" class K2_thing with i7_kind K2_thing with K2_Link O96_kiosk, with name 'doorway' 'sign' 'doorway//' 'sign//' with vector 0 with description text_routine_0 has scenery with short_name "doorway sign" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object O95_foyer "" class K1_room with i7_kind K1_room with K1_Link O98_main_desk, with name 'foyer' 'foyers//p' with vector 0 with n_to O101_dance_floor with s_to O93_parking_lot with e_to O105_waiting_area with w_to O98_main_desk with description text_routine_1 with short_name "Foyer" with list_together 0, ; Object -> O96_kiosk "" class K5_container with i7_kind K5_container with K5_Link nothing, with K2_Link O97_bob, with name 'kiosk' 'kiosks//p' 'booth//' with vector 0 with initial SC_9 has enterable has transparent has static has open with short_name "kiosk" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object -> -> O97_bob "" class K27_player_character with i7_kind K27_player_character with K27_Link nothing, with K8_Link O100_photographer, with K2_Link O99_desk_sign, with name 'bob' 'bobs//p' 'man//' 'crusty//' with parse_name Parse_Name_85 with vector 0 has proper with description text_routine_2 with initial SC_10 has ~female with short_name "Bob" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object O98_main_desk "" class K1_room with i7_kind K1_room with K1_Link O101_dance_floor, with name 'main' 'desk' 'desks//p' with vector 0 with n_to O102_testing_area with ne_to O101_dance_floor with e_to O95_foyer with description SC_11 with short_name "main desk" with list_together 0, ; Object -> O99_desk_sign "" class K2_thing with i7_kind K2_thing with K2_Link O100_photographer, with name 'desk' 'sign' with vector 0 with description text_routine_3 has scenery with short_name "desk sign" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object -> O100_photographer "" class K25_man with i7_kind K25_man with K25_Link nothing, with K8_Link O107_bratty_girl, with K2_Link O107_bratty_girl, with name 'photographer' 'photographers//p' with vector 0 with initial SC_12 with short_name "photographer" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Object O101_dance_floor "" class K1_room with i7_kind K1_room with K1_Link O102_testing_area, with name 'dance' 'floor' 'floors//p' with vector 0 with n_to O104_cashier with s_to O95_foyer with se_to O105_waiting_area with sw_to O98_main_desk with e_to O103_clerk_windows with w_to O102_testing_area with description SC_13 with short_name "Dance Floor" with list_together 0, ; Object O102_testing_area "" class K1_room with i7_kind K1_room with K1_Link O103_clerk_windows, with name 'testing' 'area' 'areas//p' with vector 0 with n_to O106_washroom with ne_to O104_cashier with s_to O98_main_desk with e_to O101_dance_floor with description SC_14 with short_name "Testing Area" with list_together 0, ; Object O103_clerk_windows "" class K1_room with i7_kind K1_room with K1_Link O104_cashier, with name 'clerk' 'windows' 'windowses//p' with vector 0 with nw_to O104_cashier with s_to O105_waiting_area with w_to O101_dance_floor with description SC_15 with short_name "Clerk Windows" with list_together 0, ; Object O104_cashier "" class K1_room with i7_kind K1_room with K1_Link O105_waiting_area, with name 'cashier' 'cashiers//p' with vector 0 with s_to O101_dance_floor with se_to O103_clerk_windows with sw_to O102_testing_area with description SC_16 with short_name "Cashier" with list_together 0, ; Object O105_waiting_area "" class K1_room with i7_kind K1_room with K1_Link O106_washroom, with name 'waiting' 'area' 'areas//p' with vector 0 with n_to O103_clerk_windows with nw_to O101_dance_floor with w_to O95_foyer with description SC_17 with short_name "Waiting Area" with list_together 0, ; Object O106_washroom "" class K1_room with i7_kind K1_room with K1_Link nothing, with name 'washroom' 'washrooms//p' with vector 0 with s_to O102_testing_area with description SC_18 with short_name "Washroom" with list_together 0, ; Object -> O107_bratty_girl "" class K26_woman with i7_kind K26_woman with K26_Link nothing, with K8_Link nothing, with K2_Link nothing, with name 'bratty' 'girl' 'girls//p' with vector 0 with short_name "bratty girl" with list_together 0, with action_bitmap 0 0 0 0 0 0 ; Constant K0_First = n_obj; Constant K1_First = O93_parking_lot; Constant K2_First = selfobj; Constant K3_First = n_obj; Constant K4_First = nothing; Constant K5_First = O96_kiosk; Constant K6_First = nothing; Constant K7_First = nothing; Constant K8_First = selfobj; Constant K9_First = nothing; Constant K10_First = nothing; Constant K11_First = nothing; Constant K24_First = nothing; Constant K25_First = O100_photographer; Constant K26_First = O107_bratty_girl; Constant K27_First = selfobj; Constant K30_First = nothing; ! --- Property metadata --- Array property_metadata --> "map region" K1_room I6_NULL "description" K1_room K2_thing I6_NULL "printed name" K1_room K2_thing I6_NULL "initial appearance" K2_thing I6_NULL "printed plural name" K2_thing I6_NULL "inventory listing" K2_thing I6_NULL "indefinite article" K2_thing I6_NULL "matching key" K2_thing I6_NULL "other side" K4_door I6_NULL "carrying capacity" K5_container K6_supporter K8_person I6_NULL "opposite" K3_direction I6_NULL "inform property" K3_direction I6_NULL "inform object" K3_direction I6_NULL "lighted" K1_room K1_room K2_thing I6_NULL "visited" K1_room I6_NULL "enterable" K2_thing I6_NULL "lit" K2_thing K1_room K2_thing I6_NULL "edible" K2_thing I6_NULL "transparent" I6_NULL "undescribed" I6_NULL "scenery" K2_thing I6_NULL "fixed in place" K2_thing I6_NULL "wearable" K2_thing I6_NULL "handled" K2_thing I6_NULL "pushable between rooms" K2_thing I6_NULL "an inform library door" K2_thing I6_NULL "an inform library container" K2_thing I6_NULL "an inform library supporter" K2_thing I6_NULL "inform library switchable" K2_thing I6_NULL "an inform library animate object" K2_thing I6_NULL "an inform library male" K2_thing I6_NULL "marked for listing" K2_thing I6_NULL "mentioned" K2_thing I6_NULL "initially carried" K2_thing I6_NULL "open" K4_door K5_container I6_NULL "openable" K4_door K5_container I6_NULL "lockable" K4_door K5_container I6_NULL "locked" K4_door K5_container I6_NULL "switched on" K11_device I6_NULL "female" K8_person I6_NULL "neuter" K8_person I6_NULL "specification" I6_NULL "score for visiting" I6_NULL "score" I6_NULL "worn" I6_NULL ; Array attribute_offsets --> (50 + 59); #IFDEF TARGET_ZCODE; Array property_offsets --> (100 + 59); #IFNOT; ! TARGET_ZCODE Array property_offsets --> (100 + 59 + INDIV_PROP_START - 48); #ENDIF; ! TARGET_ZCODE [ CreatePropertyOffsets i; for (i=0: i<109: i++) attribute_offsets-->i = -1; for (i=0: i<159: i++) property_offsets-->i = -1; attribute_offsets-->light = 43; attribute_offsets-->visited = 48; attribute_offsets-->enterable = 51; attribute_offsets-->light = 54; attribute_offsets-->edible = 59; attribute_offsets-->transparent = 62; attribute_offsets-->concealed = 64; attribute_offsets-->scenery = 66; attribute_offsets-->static = 69; attribute_offsets-->clothing = 72; attribute_offsets-->moved = 75; attribute_offsets-->pushable = 78; attribute_offsets-->door = 81; attribute_offsets-->container = 84; attribute_offsets-->supporter = 87; attribute_offsets-->switchable = 90; attribute_offsets-->animate = 93; attribute_offsets-->male = 96; attribute_offsets-->workflag = 99; attribute_offsets-->I7_mentioned = 102; attribute_offsets-->initially_carried = 105; attribute_offsets-->open = 108; attribute_offsets-->openable = 112; attribute_offsets-->lockable = 116; attribute_offsets-->locked = 120; attribute_offsets-->on = 124; attribute_offsets-->female = 127; attribute_offsets-->neuter = 130; property_offsets-->I7_Map_Region = 0; property_offsets-->description = 3; property_offsets-->short_name = 7; property_offsets-->initial = 11; property_offsets-->plural = 14; property_offsets-->invent = 17; property_offsets-->article = 20; property_offsets-->with_key = 23; property_offsets-->door_to = 26; property_offsets-->capacity = 29; property_offsets-->p10_opposite = 34; property_offsets-->p11_inform_property = 37; property_offsets-->p12_inform_object = 40; property_offsets-->p55_specification = 133; property_offsets-->score = 135; property_offsets-->score = 137; property_offsets-->worn = 139; ]; Array T0_speaker_announcements --> 1 tab_0_0; Array tab_0_0 table 100 (SC_19) (SC_20) (SC_21) ; [ PrintTableName T; switch(T) { T0_speaker_announcements: print "Table of Speaker Announcements"; return; default: print "** No such table **"; } ]; Global parameter_object; ! : [ R_0 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! : [ R_1 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! : [ R_2 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! : [ R_3 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! : [ R_4 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! : [ R_5 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! : [ R_6 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! : [ R_7 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! : [ R_8 t_0 ! Call parameter 'it' = I6_OBJECT_SPEC_TY ; rfalse; ]; ! first when play begins rule : [ R_9 ; ! [1: consider the scene changing rules]^"; #endif; ProcessRulebook(30); rfalse; ]; ! first turn sequence rule : [ R_10 ; ! [1: consider the scene changing rules]^"; #endif; ProcessRulebook(30); ! [2: consider the every turn rules]^"; #endif; ProcessRulebook(24); ! [3: consider the timed events rule]^"; #endif; ProcessRulebook(ProcessI7Timers); rfalse; ]; ! last turn sequence rule : [ R_11 ; ! [1: consider the scene changing rules]^"; #endif; ProcessRulebook(30); ! [2: consider the adjust light rule]^"; #endif; ProcessRulebook(TS5_R); ! [3: consider the note object acquisitions rule]^"; #endif; ProcessRulebook(TS6_R); rfalse; ]; ! last scene changing rule : [ R_12 ; ! [1: run scene change machinery]^"; #endif; I7_SceneChange(); rfalse; ]; ! first accessibility rule : [ R_13 ; ! [1: abide by the access to scoped objects rule]^"; #endif; if (ProcessRulebook(OIU_Scoped)) rtrue; rfalse; ]; ! last accessibility rule : [ R_14 ; ! [1: abide by the access through barriers rule]^"; #endif; if (ProcessRulebook(OIU_Barrier)) rtrue; rfalse; ]; ! last reaching inside rule : [ R_15 ; ! [1: abide by the can't reach inside rooms rule]^"; #endif; if (ProcessRulebook(OIUB_RI)) rtrue; ! [2: abide by the can't reach inside closed containers rule]^"; #endif; if (ProcessRulebook(OIUB_CCI)) rtrue; rfalse; ]; ! last reaching outside rule : [ R_16 ; ! [1: abide by the can't reach outside closed containers rule]^"; #endif; if (ProcessRulebook(OIUB_CCO)) rtrue; rfalse; ]; ! last visibility rule : [ R_17 ; ! [1: abide by the can't act in the dark rule]^"; #endif; if (ProcessRulebook(CSITDR)) rtrue; rfalse; ]; ! last general before rule : [ R_18 ; ! [1: abide by i6 gamepreroutine]^"; #endif; if (GamePreRoutine()~=0) rtrue; rfalse; ]; ! last actor-specific before rule : [ R_19 ; ! [1: abide by i6 orders property]^"; #endif; if (RunRoutines(player,orders)~=0) rtrue; rfalse; ]; ! last location-specific before rule : [ R_20 ; ! [1: abide by i6 location before]^"; #endif; if (location~=0 && RunRoutines(location,before)~=0) rtrue; rfalse; ]; ! last reaction before rule : [ R_21 ; ! [1: abide by i6 react_before property]^"; #endif; scope_reason=REACT_BEFORE_REASON; parser_one=0;SearchScope(ScopeCeiling(player),player,0); scope_reason=PARSING_REASON; if (parser_one~=0) rtrue; rfalse; ]; ! last object-specific before rule : [ R_22 ; ! [1: abide by i6 object before]^"; #endif; if (inp1>1 && RunRoutines(inp1,before)~=0) rtrue; rfalse; ]; ! first general after rule : [ R_23 ; ! [1: abide by i6 gamepostroutine]^"; #endif; if (GamePostRoutine()~=0) rtrue; rfalse; ]; ! first location-specific after rule : [ R_24 ; ! [1: abide by i6 location after]^"; #endif; if (location~=0 && RunRoutines(location,after)~=0) rtrue; rfalse; ]; ! first reaction after rule : [ R_25 ; ! [1: abide by i6 react_after property]^"; #endif; scope_reason=REACT_AFTER_REASON; parser_one=0;SearchScope(ScopeCeiling(player),player,0); scope_reason=PARSING_REASON; if (parser_one~=0) rtrue; rfalse; ]; ! first object-specific after rule : [ R_26 ; ! [1: abide by i6 object after]^"; #endif; if (inp1>1 && RunRoutines(inp1,after)~=0) rtrue; rfalse; ]; ! first action-processing rule : [ R_27 ; ! [1: abide by the before rules]^"; #endif; if (ProcessRulebook(1)) rtrue; rfalse; ]; ! last action-processing rule : [ R_28 ; ! [1: abide by the basic accessibility rule]^"; #endif; if (ProcessRulebook(PA_R)) rtrue; ! [2: abide by the carrying requirements rule]^"; #endif; if (ProcessRulebook(CR_R)) rtrue; ! [3: abide by the instead rules]^"; #endif; if (ProcessRulebook(2)) rtrue; ! [4: abide by the non-player character action rule]^"; #endif; if (ProcessRulebook(I7_NPCA)) rtrue; ! [5: abide by the action-specific rules]^"; #endif; if (ProcessRulebook(6)) rtrue; ! [6: rule succeeds]^"; #endif; RulebookSucceeds(); rtrue; rfalse; ]; ! last before rule : [ R_29 ; ! [1: abide by the general before rules]^"; #endif; if (ProcessRulebook(12)) rtrue; ! [2: abide by the actor-specific before rules]^"; #endif; if (ProcessRulebook(13)) rtrue; ! [3: abide by the location-specific before rules]^"; #endif; if (ProcessRulebook(14)) rtrue; ! [4: abide by the reaction before rules]^"; #endif; if (ProcessRulebook(15)) rtrue; ! [5: abide by the object-specific before rules]^"; #endif; if (ProcessRulebook(16)) rtrue; rfalse; ]; ! last action-specific rule : [ R_30 ; ! [1: cause the action to take place]^"; #endif; _I6_ActionPrimitive(); rtrue; rfalse; ]; ! first after rule : [ R_31 ; ! [1: abide by the object-specific after rules]^"; #endif; if (ProcessRulebook(21)) rtrue; ! [2: abide by the reaction after rules]^"; #endif; if (ProcessRulebook(20)) rtrue; ! [3: abide by the location-specific after rules]^"; #endif; if (ProcessRulebook(19)) rtrue; ! [4: abide by the actor-specific after rules]^"; #endif; if (ProcessRulebook(18)) rtrue; ! [5: abide by the general after rules]^"; #endif; if (ProcessRulebook(17)) rtrue; rfalse; ]; ! last for printing the name rule : [ R_32 ; ! [1: cause the description to take place]^"; #endif; I6_PSN__(parameter_object); rfalse; ]; ! last for listing contents rule : [ R_33 ; ! [1: cause the listing to take place]^"; #endif; I7_WLF(child(parameter_object), 0); rfalse; ]; ! last for printing the player's obituary rule : [ R_34 ; ! [1: abide by the print obituary headline rule]^"; #endif; if (ProcessRulebook(OBIT_HEAD)) rtrue; ! [2: abide by the print final score rule]^"; #endif; if (ProcessRulebook(OBIT_FINAL)) rtrue; ! [3: abide by the display final status line rule]^"; #endif; if (ProcessRulebook(OBIT_DISP)) rtrue; rfalse; ]; ! printing the name of a thing : [ R_35 t_0 ! Local variable e.g. 'XXXX' = OBJECT_TY ; if ((t_0 = parameter_object, ((parameter_object ofclass K2_thing)))) { if (debug_rules) DB_Rule(R_35); ! [1: now xxxx is mentioned]^"; #endif; give t_0 I7_mentioned; } else { if (debug_rules > 1) DB_Rule(R_35,1); } rfalse; ]; ! supplying a missing noun : [ R_36 ; if (((((action ==##Smell) && (actor==player))))) { ! [1: change the noun to the location]^"; #endif; noun = real_location; RulebookSucceeds(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_36,1); } rfalse; ]; ! supplying a missing noun : [ R_37 ; if (((((action ==##Listen) && (actor==player))))) { ! [1: change the noun to the location]^"; #endif; noun = real_location; RulebookSucceeds(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_37,1); } rfalse; ]; ! supplying a missing noun : [ R_38 ; if (((((action ==##Go) && (actor==player))))) { ! [1: say ~You'll have to say which compass direction to go in.~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_22; new_line; .L0; RulebookSucceeds(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_38,1); } rfalse; ]; ! say contents of token-0 : [ R_198 t_0 ! Call parameter 'O' = OBJECT_TY ; ! [1: list the contents of o , as a sentence]^"; #endif; I7WriteListFrom(child(t_0), 8); rfalse; ]; ! say the contents of token-0 : [ R_199 t_0 ! Call parameter 'O' = OBJECT_TY ; ! [1: list the contents of o , as a sentence , using the definite article]^"; #endif; I7WriteListFrom(child(t_0), 264); rfalse; ]; ! of examining the amulet for the third time : [ R_310 ; if ((((TimesActionHasHappened-->0) == 3) && (TurnsActionHasBeenHappening-->0 > 0))) { if (debug_rules) DB_Rule(R_310); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~The amulet grows annoyed at the attention you are giving it. Best stop looking!~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_23; new_line; .L1; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_310,1); } rfalse; ]; ! of examining the amulet for the fourth time : [ R_311 ; if ((((TimesActionHasHappened-->1) == 4) && (TurnsActionHasBeenHappening-->1 > 0))) { if (debug_rules) DB_Rule(R_311); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~Enraged by your unrelenting gaze, the amulet unleashes the fires of hell upon your mortal coil. Passers-by seem eerily unaware of you as you are consumed in flame.~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_24; new_line; .L2; ! [2: end the game saying ~You have been incinerated~]^"; #endif; deadflag=SC_25; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_311,1); } rfalse; ]; ! of showing the amulet to a player-character : [ R_312 t_0 ! Local variable e.g. 'posessed' = OBJECT_TY ; if ((action ==##Show) && (actor==player) && (noun == O92_amulet_of_death) && (t_0 = second, ((second ofclass K27_player_character)))) { if (debug_rules) DB_Rule(R_312); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~[The posessed] screams hideously and is engulfed in hellfire. A moment later the smoke clears and the ashes scatter. Luckily, nobody else seemed to notice.~]^"; #endif; say__c=0; say__p=1; print (The) t_0; print (I7_string) SC_26; new_line; .L3; #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [2: change the player to the posessed]^"; #endif; I7_ChangePlayer(t_0); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [3: move the amulet to the posessed]^"; #endif; I7_Move(O92_amulet_of_death, t_0, 0, 0); RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_312,1); } rfalse; ]; ! of waiting in the parking lot : [ R_313 ; if ((action ==##Wait) && (actor==player) && (real_location == O93_parking_lot)) { if (debug_rules) DB_Rule(R_313); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~You tap your toes for a minute, but the line doesn't seem to be moving.~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_27; new_line; .L4; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_313,1); } rfalse; ]; ! of going nowhere from the parking lot : [ R_314 ; if ((action ==##Go) && (actor==player) && (move_from == O93_parking_lot) && (move_to == nothing)) { if (debug_rules) DB_Rule(R_314); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~You're here to get a driver's license, remember?~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_28; new_line; .L5; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_314,1); } rfalse; ]; ! going to the foyer for the first time : [ R_315 ; if ((((TimesActionHasHappened-->2) == 1) && (TurnsActionHasBeenHappening-->2 > 0))) { if (debug_rules) DB_Rule(R_315); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~You discretely push your way past the crowd, hoping not to anger anyone...~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_29; new_line; .L6; } else { if (debug_rules > 1) DB_Rule(R_315,1); } rfalse; ]; ! of going nowhere from the foyer : [ R_316 ; if ((action ==##Go) && (actor==player) && (move_from == O95_foyer) && (move_to == nothing)) { if (debug_rules) DB_Rule(R_316); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~I wouldn't cut across those lines of people.~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_30; new_line; .L7; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_316,1); } rfalse; ]; ! of showing anything that is not the amulet to bob when the player is not bob : [ R_317 ; if ((action ==##Show) && (actor==player) && ((noun ofclass K2_thing) && ~~((noun == O92_amulet_of_death))) && (second == O97_bob) && (~~((player == O97_bob)))) { if (debug_rules) DB_Rule(R_317); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~The man grunts. You're not sure if he understands you.~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_31; new_line; .L8; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_317,1); } rfalse; ]; ! of kissing bob when the player is not bob : [ R_318 ; if ((action ==##Kiss) && (actor==player) && (noun == O97_bob) && (~~((player == O97_bob)))) { if (debug_rules) DB_Rule(R_318); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~The man is stunned at first, then blinks coyly at you.~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_32; new_line; .L9; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_318,1); } rfalse; ]; ! of examining the photographer : [ R_319 ; if ((action ==##Examine) && (actor==player) && (noun == O100_photographer)) { if (debug_rules) DB_Rule(R_319); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~Apparently not many people are ready to get their licenses, since he appears almost asleep.~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_33; new_line; .L10; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_319,1); } rfalse; ]; ! of doing anything other than examining to the photographer : [ R_320 ; if ((action ~=##Examine) && (actor==player) && (noun == O100_photographer)) { if (debug_rules) DB_Rule(R_320); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~The man opens half an eye at you, realizes you don't have what he wants, and goes back to his daydream.~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_34; new_line; .L11; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_320,1); } rfalse; ]; ! of going nowhere from the waiting area : [ R_321 ; if ((action ==##Go) && (actor==player) && (move_from == O105_waiting_area) && (move_to == nothing)) { if (debug_rules) DB_Rule(R_321); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: say ~It's peaceful here, and the nagging feeling that help may come entices you to take a seat...~]^"; #endif; say__c=0; say__p=1; print (I7_string) SC_35; new_line; .L12; RulebookFails(); rtrue; } else { if (debug_rules > 1) DB_Rule(R_321,1); } rfalse; ]; ! turn when in the waiting area and a random chance of 1 in 2 succeeds : [ R_322 ct_0 ct_1 ! Used for table searches ; if ( (actor==player) && (( (I7_WhetherIn(O105_waiting_area)) ) && ( (random(2) <= 1) ))) { if (debug_rules) DB_Rule(R_322); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: choose a random row in the table of speaker announcements]^"; #endif; ct_0 = T0_speaker_announcements; ct_1 = TableRandomRow(ct_0); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [2: say ~[announcement entry][paragraph break]~]^"; #endif; say__c=0; say__p=1; print (I7_string) TableLookUpEntry(ct_0,100,ct_1); I7_DivideParagraph(); new_line; .L13; } else { if (debug_rules > 1) DB_Rule(R_322,1); } rfalse; ]; ! turn : [ R_323 t_0 ! Local variable e.g. 'current room' = OBJECT_TY t_1 ! Local variable e.g. 'next room' = OBJECT_TY ; #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [1: if the bratty girl is in a room ( called the current room ) and a random chance of 1 in 3 succeeds begin]^"; #endif; if ((((t_0=I7_InWhat(O107_bratty_girl)) && (I7_InWhat(O107_bratty_girl) ofclass K1_room))) && ( (random(3) <= 1) )) { #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [2: let next room be a random room which is adjacent to the current room]^"; #endif; t_1 = (Prop_0(t_0)) ; #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [3: if the bratty girl is visible , say ~The little monster storms off to [the next room]~]^"; #endif; if ((Adj_1(O107_bratty_girl))) { say__c=0; say__p=1; print (I7_string) SC_36; print (the) t_1; .L14; } #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [4: move the bratty girl to the next room]^"; #endif; I7_Move(O107_bratty_girl, t_1, 0, 0); #ifndef I7_ECONOMY; if (debug_rules>1) print "@31 [5: if the bratty girl is visible , say ~A [bratty girl] races in.~]^"; #endif; if ((Adj_1(O107_bratty_girl))) { say__c=0; say__p=1; print (I7_string) SC_37; print (name) O107_bratty_girl; print (I7_string) SC_38; new_line; .L15; } ! [6: end if]^"; #endif; } rfalse; ]; Array I7TimerTable table 0 0; Array I7TimerTableTimes table 0 0; [ TurnEndPrimitive; actor = player; act_requester = 0; BeginActionProcessing(); ProcessRulebook(TURNEND_RB); EndActionProcessing(); ]; [ BeforeRoutines x; self = noun; ChronologyPoint(); rfalse; ]; [ AfterRoutines; self = noun; if (ProcessRulebook(AFTER_RB)) rtrue; if (keep_silent == 1) rtrue; return ProcessRulebook(REPLY_RB); ]; Array EMPTY_RULEBOOK -> $ff $ff $ff $ff; ! 4 bytes needed in case of Glulx Array rulebooks_array --> B0_action_processing B1_before B2_instead B3_after B4_procedural B5_accessibility B6_action_specific B7_carry_out B8_general_report B9_turn_sequence B10_reaching_inside B11_reaching_outside B12_general_before B13_actor_specific_before B14_location_specific_before B15_reaction_before B16_object_specific_before B17_general_after B18_actor_specific_after B19_location_specific_after B20_reaction_after B21_object_specific_after B22_when_play_begins B23_when_play_ends B24_every_turn B25_check B26_report B27_persuasion B28_unsuccessful_attempt_by B29_visibility B30_scene_changing B31_before_printing_the_name B32_for_printing_the_name B33_after_printing_the_name B34_before_listing_contents B35_for_listing_contents B36_after_listing_contents B37_before_grouping_together B38_for_grouping_together B39_after_grouping_together B40_before_constructing_the_ B41_for_constructing_the_sta B42_after_constructing_the_s B43_before_listing_nondescri B44_for_listing_nondescript_ B45_after_listing_nondescrip B46_before_deciding_the_scop B47_for_deciding_the_scope B48_after_deciding_the_scope B49_before_supplying_a_missi B50_for_supplying_a_missing_ B51_after_supplying_a_missin B52_before_supplying_a_missi B53_for_supplying_a_missing_ B54_after_supplying_a_missin B55_before_reading_a_command B56_for_reading_a_command B57_after_reading_a_command B58_before_deciding_whether_ B59_for_deciding_whether_all B60_after_deciding_whether_a B61_before_printing_the_play B62_for_printing_the_player_ B63_after_printing_the_playe B64_before_amusing_a_victori B65_for_amusing_a_victorious B66_after_amusing_a_victorio B67_before_printing_the_bann B68_for_printing_the_banner_ B69_after_printing_the_banne B70_before_printing_the_plur B71_for_printing_the_plural_ B72_after_printing_the_plura B73_before_deciding_the_conc B74_for_deciding_the_conceal B75_after_deciding_the_conce B76_before_printing_a_refusa B77_for_printing_a_refusal_t B78_after_printing_a_refusal B79_before_printing_the_anno B80_for_printing_the_announc B81_after_printing_the_annou B82_before_printing_the_name B83_for_printing_the_name_of B84_after_printing_the_name_ B85_before_printing_the_desc B86_for_printing_the_descrip B87_after_printing_the_descr B88_before_printing_room_des B89_for_printing_room_descri B90_after_printing_room_desc B91_before_printing_a_parser B92_for_printing_a_parser_er B93_after_printing_a_parser_ B94_before_implicitly_taking B95_for_implicitly_taking B96_after_implicitly_taking B97_before_starting_the_virt B98_for_starting_the_virtual B99_after_starting_the_virtu B100_before_writing_a_paragr B101_for_writing_a_paragraph B102_after_writing_a_paragra B103_check_taking_inventory B104_carry_out_taking_invent B105_report_taking_inventory B106_check_taking B107_carry_out_taking B108_report_taking B109_check_removing_it_from B110_carry_out_removing_it_f B111_report_removing_it_from B112_check_dropping B113_carry_out_dropping B114_report_dropping B115_check_putting_it_on B116_carry_out_putting_it_on B117_report_putting_it_on B118_check_inserting_it_into B119_carry_out_inserting_it_ B120_report_inserting_it_int B121_check_waiting B122_carry_out_waiting B123_report_waiting B124_check_going B125_carry_out_going B126_report_going B127_check_entering B128_carry_out_entering B129_report_entering B130_check_exiting B131_carry_out_exiting B132_report_exiting B133_check_getting_off B134_carry_out_getting_off B135_report_getting_off B136_check_looking B137_carry_out_looking B138_report_looking B139_check_examining B140_carry_out_examining B141_report_examining B142_check_looking_under B143_carry_out_looking_under B144_report_looking_under B145_check_searching B146_carry_out_searching B147_report_searching B148_check_consulting_it_abo B149_carry_out_consulting_it B150_report_consulting_it_ab B151_check_locking_it_with B152_carry_out_locking_it_wi B153_report_locking_it_with B154_check_unlocking_it_with B155_carry_out_unlocking_it_ B156_report_unlocking_it_wit B157_check_switching_on B158_carry_out_switching_on B159_report_switching_on B160_check_switching_off B161_carry_out_switching_off B162_report_switching_off B163_check_opening B164_carry_out_opening B165_report_opening B166_check_closing B167_carry_out_closing B168_report_closing B169_check_wearing B170_carry_out_wearing B171_report_wearing B172_check_taking_off B173_carry_out_taking_off B174_report_taking_off B175_check_eating B176_carry_out_eating B177_report_eating B178_check_giving_it_to B179_carry_out_giving_it_to B180_report_giving_it_to B181_check_showing_it_to B182_carry_out_showing_it_to B183_report_showing_it_to B184_check_waking B185_carry_out_waking B186_report_waking B187_check_throwing_it_at B188_carry_out_throwing_it_a B189_report_throwing_it_at B190_check_attacking B191_carry_out_attacking B192_report_attacking B193_check_kissing B194_carry_out_kissing B195_report_kissing B196_check_answering_it_that B197_carry_out_answering_it_ B198_report_answering_it_tha B199_check_telling_it_about B200_carry_out_telling_it_ab B201_report_telling_it_about B202_check_asking_it_about B203_carry_out_asking_it_abo B204_report_asking_it_about B205_check_asking_it_for B206_carry_out_asking_it_for B207_report_asking_it_for B208_check_touching B209_carry_out_touching B210_report_touching B211_check_waving B212_carry_out_waving B213_report_waving B214_check_pulling B215_carry_out_pulling B216_report_pulling B217_check_pushing B218_carry_out_pushing B219_report_pushing B220_check_turning B221_carry_out_turning B222_report_turning B223_check_pushing_it_to B224_carry_out_pushing_it_to B225_report_pushing_it_to B226_check_squeezing B227_carry_out_squeezing B228_report_squeezing B229_check_saying_yes B230_carry_out_saying_yes B231_report_saying_yes B232_check_saying_no B233_carry_out_saying_no B234_report_saying_no B235_check_burning B236_carry_out_burning B237_report_burning B238_check_waking_up B239_carry_out_waking_up B240_report_waking_up B241_check_thinking B242_carry_out_thinking B243_report_thinking B244_check_smelling B245_carry_out_smelling B246_report_smelling B247_check_listening_to B248_carry_out_listening_to B249_report_listening_to B250_check_tasting B251_carry_out_tasting B252_report_tasting B253_check_cutting B254_carry_out_cutting B255_report_cutting B256_check_jumping B257_carry_out_jumping B258_report_jumping B259_check_tying_it_to B260_carry_out_tying_it_to B261_report_tying_it_to B262_check_drinking B263_carry_out_drinking B264_report_drinking B265_check_saying_sorry B266_carry_out_saying_sorry B267_report_saying_sorry B268_check_swearing_obscenel B269_carry_out_swearing_obsc B270_report_swearing_obscene B271_check_swearing_mildly B272_carry_out_swearing_mild B273_report_swearing_mildly B274_check_swinging B275_carry_out_swinging B276_report_swinging B277_check_rubbing B278_carry_out_rubbing B279_report_rubbing B280_check_setting_it_to B281_carry_out_setting_it_to B282_report_setting_it_to B283_check_waving_hands B284_carry_out_waving_hands B285_report_waving_hands B286_check_buying B287_carry_out_buying B288_report_buying B289_check_singing B290_carry_out_singing B291_report_singing B292_check_climbing B293_carry_out_climbing B294_report_climbing B295_check_sleeping B296_carry_out_sleeping B297_report_sleeping B298_check_requesting_the_sc B299_carry_out_requesting_th B300_report_requesting_the_s B301_check_quitting_the_game B302_carry_out_quitting_the_ B303_report_quitting_the_gam B304_check_saving_the_game B305_carry_out_saving_the_ga B306_report_saving_the_game B307_check_restoring_the_gam B308_carry_out_restoring_the B309_report_restoring_the_ga B310_check_restarting_the_ga B311_carry_out_restarting_th B312_report_restarting_the_g B313_check_verifying_the_sto B314_carry_out_verifying_the B315_report_verifying_the_st B316_check_requesting_the_st B317_carry_out_requesting_th B318_report_requesting_the_s B319_check_switching_the_sto B320_carry_out_switching_the B321_report_switching_the_st B322_check_switching_the_sto B323_carry_out_switching_the B324_report_switching_the_st B325_check_preferring_abbrev B326_carry_out_preferring_ab B327_report_preferring_abbre B328_check_preferring_unabbr B329_carry_out_preferring_un B330_report_preferring_unabb B331_check_preferring_someti B332_carry_out_preferring_so B333_report_preferring_somet B334_check_requesting_the_pr B335_carry_out_requesting_th B336_report_requesting_the_p B337_check_switching_score_n B338_carry_out_switching_sco B339_report_switching_score_ B340_check_switching_score_n B341_carry_out_switching_sco B342_report_switching_score_ 0; Array B0_action_processing --> R_27 R_28 I6_NULL; Array B1_before --> R_315 R_29 I6_NULL; Array B2_instead --> R_313 R_314 R_316 R_321 R_317 R_312 R_311 R_310 R_318 R_320 R_319 I6_NULL; Array B3_after --> R_31 I6_NULL; Constant B4_procedural = EMPTY_RULEBOOK; Array B5_accessibility --> R_13 R_14 I6_NULL; Array B6_action_specific --> R_30 I6_NULL; Constant B7_carry_out = EMPTY_RULEBOOK; Constant B8_general_report = EMPTY_RULEBOOK; Array B9_turn_sequence --> R_10 TS1_R TS2_R TS3_R TS4_R R_11 I6_NULL; Array B10_reaching_inside --> R_15 I6_NULL; Array B11_reaching_outside --> R_16 I6_NULL; Array B12_general_before --> R_18 I6_NULL; Array B13_actor_specific_before --> R_19 I6_NULL; Array B14_location_specific_before --> R_20 I6_NULL; Array B15_reaction_before --> R_21 I6_NULL; Array B16_object_specific_before --> R_22 I6_NULL; Array B17_general_after --> R_23 I6_NULL; Constant B18_actor_specific_after = EMPTY_RULEBOOK; Array B19_location_specific_after --> R_24 I6_NULL; Array B20_reaction_after --> R_25 I6_NULL; Array B21_object_specific_after --> R_26 I6_NULL; Array B22_when_play_begins --> R_9 I6_NULL; Constant B23_when_play_ends = EMPTY_RULEBOOK; Array B24_every_turn --> R_322 R_323 I6_NULL; Constant B25_check = EMPTY_RULEBOOK; Constant B26_report = EMPTY_RULEBOOK; Constant B27_persuasion = EMPTY_RULEBOOK; Constant B28_unsuccessful_attempt_by = EMPTY_RULEBOOK; Array B29_visibility --> R_17 I6_NULL; Array B30_scene_changing --> R_12 I6_NULL; Array B31_before_printing_the_name --> R_35 I6_NULL; Array B32_for_printing_the_name --> R_32 I6_NULL; Constant B33_after_printing_the_name = EMPTY_RULEBOOK; Constant B34_before_listing_contents = EMPTY_RULEBOOK; Array B35_for_listing_contents --> R_33 I6_NULL; Constant B36_after_listing_contents = EMPTY_RULEBOOK; Constant B37_before_grouping_together = EMPTY_RULEBOOK; Constant B38_for_grouping_together = EMPTY_RULEBOOK; Constant B39_after_grouping_together = EMPTY_RULEBOOK; Constant B40_before_constructing_the_ = EMPTY_RULEBOOK; Constant B41_for_constructing_the_sta = EMPTY_RULEBOOK; Constant B42_after_constructing_the_s = EMPTY_RULEBOOK; Constant B43_before_listing_nondescri = EMPTY_RULEBOOK; Constant B44_for_listing_nondescript_ = EMPTY_RULEBOOK; Constant B45_after_listing_nondescrip = EMPTY_RULEBOOK; Constant B46_before_deciding_the_scop = EMPTY_RULEBOOK; Constant B47_for_deciding_the_scope = EMPTY_RULEBOOK; Constant B48_after_deciding_the_scope = EMPTY_RULEBOOK; Constant B49_before_supplying_a_missi = EMPTY_RULEBOOK; Array B50_for_supplying_a_missing_ --> R_36 R_37 R_38 I6_NULL; Constant B51_after_supplying_a_missin = EMPTY_RULEBOOK; Constant B52_before_supplying_a_missi = EMPTY_RULEBOOK; Constant B53_for_supplying_a_missing_ = EMPTY_RULEBOOK; Constant B54_after_supplying_a_missin = EMPTY_RULEBOOK; Constant B55_before_reading_a_command = EMPTY_RULEBOOK; Constant B56_for_reading_a_command = EMPTY_RULEBOOK; Constant B57_after_reading_a_command = EMPTY_RULEBOOK; Constant B58_before_deciding_whether_ = EMPTY_RULEBOOK; Constant B59_for_deciding_whether_all = EMPTY_RULEBOOK; Constant B60_after_deciding_whether_a = EMPTY_RULEBOOK; Constant B61_before_printing_the_play = EMPTY_RULEBOOK; Array B62_for_printing_the_player_ --> R_34 I6_NULL; Constant B63_after_printing_the_playe = EMPTY_RULEBOOK; Constant B64_before_amusing_a_victori = EMPTY_RULEBOOK; Constant B65_for_amusing_a_victorious = EMPTY_RULEBOOK; Constant B66_after_amusing_a_victorio = EMPTY_RULEBOOK; Constant B67_before_printing_the_bann = EMPTY_RULEBOOK; Constant B68_for_printing_the_banner_ = EMPTY_RULEBOOK; Constant B69_after_printing_the_banne = EMPTY_RULEBOOK; Constant B70_before_printing_the_plur = EMPTY_RULEBOOK; Constant B71_for_printing_the_plural_ = EMPTY_RULEBOOK; Constant B72_after_printing_the_plura = EMPTY_RULEBOOK; Constant B73_before_deciding_the_conc = EMPTY_RULEBOOK; Constant B74_for_deciding_the_conceal = EMPTY_RULEBOOK; Constant B75_after_deciding_the_conce = EMPTY_RULEBOOK; Constant B76_before_printing_a_refusa = EMPTY_RULEBOOK; Constant B77_for_printing_a_refusal_t = EMPTY_RULEBOOK; Constant B78_after_printing_a_refusal = EMPTY_RULEBOOK; Constant B79_before_printing_the_anno = EMPTY_RULEBOOK; Constant B80_for_printing_the_announc = EMPTY_RULEBOOK; Constant B81_after_printing_the_annou = EMPTY_RULEBOOK; Constant B82_before_printing_the_name = EMPTY_RULEBOOK; Constant B83_for_printing_the_name_of = EMPTY_RULEBOOK; Constant B84_after_printing_the_name_ = EMPTY_RULEBOOK; Constant B85_before_printing_the_desc = EMPTY_RULEBOOK; Constant B86_for_printing_the_descrip = EMPTY_RULEBOOK; Constant B87_after_printing_the_descr = EMPTY_RULEBOOK; Constant B88_before_printing_room_des = EMPTY_RULEBOOK; Constant B89_for_printing_room_descri = EMPTY_RULEBOOK; Constant B90_after_printing_room_desc = EMPTY_RULEBOOK; Constant B91_before_printing_a_parser = EMPTY_RULEBOOK; Constant B92_for_printing_a_parser_er = EMPTY_RULEBOOK; Constant B93_after_printing_a_parser_ = EMPTY_RULEBOOK; Constant B94_before_implicitly_taking = EMPTY_RULEBOOK; Constant B95_for_implicitly_taking = EMPTY_RULEBOOK; Constant B96_after_implicitly_taking = EMPTY_RULEBOOK; Constant B97_before_starting_the_virt = EMPTY_RULEBOOK; Constant B98_for_starting_the_virtual = EMPTY_RULEBOOK; Constant B99_after_starting_the_virtu = EMPTY_RULEBOOK; Constant B100_before_writing_a_paragr = EMPTY_RULEBOOK; Constant B101_for_writing_a_paragraph = EMPTY_RULEBOOK; Constant B102_after_writing_a_paragra = EMPTY_RULEBOOK; Constant B103_check_taking_inventory = EMPTY_RULEBOOK; Array B104_carry_out_taking_invent --> InvSub_O1 InvSub_O2 InvSub_O3 InvSub_O4 I6_NULL; Array B105_report_taking_inventory --> InvSub_R1 I6_NULL; Array B106_check_taking --> TakeSub_C1 TakeSub_C2 TakeSub_C3 OIUB_CP TakeSub_C4 OIUB_AP TakeSub_C6 TakeSub_C7 TakeSub_C8 TakeSub_C9 TakeSub_C10 TakeSub_C11 TakeSub_C12 I6_NULL; Array B107_carry_out_taking --> TakeSub_O1 TakeSub_O2 I6_NULL; Array B108_report_taking --> TakeSub_R1 TakeSub_R2 I6_NULL; Array B109_check_removing_it_from --> OIUB_CP RemoveSub_C2 RemoveSub_C3 RemoveSub_C4 RemoveSub_C1 TakeSub_C2 TakeSub_C3 TakeSub_C4 OIUB_AP TakeSub_C6 TakeSub_C7 TakeSub_C8 TakeSub_C9 TakeSub_C10 TakeSub_C11 TakeSub_C12 I6_NULL; Array B110_carry_out_removing_it_f --> TakeSub_O1 RemoveSub_O2 I6_NULL; Array B111_report_removing_it_from --> RemoveSub_R1 I6_NULL; Array B112_check_dropping --> DropSub_C1 DropSub_C2 DropSub_C3 DropSub_C4 DropSub_C5 I6_NULL; Array B113_carry_out_dropping --> DropSub_O1 I6_NULL; Array B114_report_dropping --> DropSub_R1 I6_NULL; Array B115_check_putting_it_on --> PutOnSub_C1 PutOnSub_C2 PutOnSub_C3 PutOnSub_C4 PutOnSub_C5 PutOnSub_C6 PutOnSub_C7 PutOnSub_C8 I6_NULL; Array B116_carry_out_putting_it_on --> PutOnSub_O1 PutOnSub_O2 I6_NULL; Array B117_report_putting_it_on --> PutOnSub_R1 I6_NULL; Array B118_check_inserting_it_into --> InsertSub_C1 InsertSub_C2 InsertSub_C3 OIUB_CP InsertSub_C4 InsertSub_C5 InsertSub_C6 InsertSub_C7 InsertSub_C8 I6_NULL; Array B119_carry_out_inserting_it_ --> InsertSub_O1 InsertSub_O2 I6_NULL; Array B120_report_inserting_it_int --> InsertSub_R1 I6_NULL; Constant B121_check_waiting = EMPTY_RULEBOOK; Constant B122_carry_out_waiting = EMPTY_RULEBOOK; Array B123_report_waiting --> WaitSub_R1 I6_NULL; Array B124_check_going --> GoSub_C1 GoSub_C2 GoSub_C3 GoSub_C4 GoSub_C5 GoSub_C6 GoSub_C7 GoSub_C8 GoSub_C9 GoSub_C10 GoSub_C11 I6_NULL; Array B125_carry_out_going --> GoSub_O1 GoSub_O2 GoSub_O3 I6_NULL; Array B126_report_going --> GoSub_R1 I6_NULL; Array B127_check_entering --> EnterSub_C1 EnterSub_C2 EnterSub_C3 EnterSub_C4 EnterSub_C5 EnterSub_C6 EnterSub_C7 EnterSub_C8 I6_NULL; Array B128_carry_out_entering --> EnterSub_O1 I6_NULL; Array B129_report_entering --> EnterSub_R1 EnterSub_R2 I6_NULL; Array B130_check_exiting --> ExitSub_C1 ExitSub_C2 ExitSub_C3 I6_NULL; Array B131_carry_out_exiting --> ExitSub_O1 I6_NULL; Array B132_report_exiting --> ExitSub_R1 ExitSub_R2 I6_NULL; Array B133_check_getting_off --> GetOffSub_C1 GetOffSub_C2 I6_NULL; Constant B134_carry_out_getting_off = EMPTY_RULEBOOK; Constant B135_report_getting_off = EMPTY_RULEBOOK; Constant B136_check_looking = EMPTY_RULEBOOK; Array B137_carry_out_looking --> LookSub_O1 LookSub_O2 LookSub_O3 LookSub_O4 LookSub_O5 LookSub_O6 I6_NULL; Array B138_report_looking --> LookSub_R1 I6_NULL; Constant B139_check_examining = EMPTY_RULEBOOK; Array B140_carry_out_examining --> ExamineSub_O1 ExamineSub_O2 ExamineSub_O3 ExamineSub_O4 ExamineSub_O5 I6_NULL; Array B141_report_examining --> ExamineSub_R1 I6_NULL; Constant B142_check_looking_under = EMPTY_RULEBOOK; Array B143_carry_out_looking_under --> LookUnderSub_O1 I6_NULL; Array B144_report_looking_under --> LookUnderSub_R1 I6_NULL; Array B145_check_searching --> SearchSub_C1 SearchSub_C2 I6_NULL; Array B146_carry_out_searching --> SearchSub_O1 I6_NULL; Array B147_report_searching --> SearchSub_R1 SearchSub_R2 SearchSub_R3 I6_NULL; Constant B148_check_consulting_it_abo = EMPTY_RULEBOOK; Constant B149_carry_out_consulting_it = EMPTY_RULEBOOK; Array B150_report_consulting_it_ab --> ConsultSub_C1 I6_NULL; Array B151_check_locking_it_with --> LockSub_C1 LockSub_C2 LockSub_C3 LockSub_C4 I6_NULL; Array B152_carry_out_locking_it_wi --> LockSub_O1 I6_NULL; Array B153_report_locking_it_with --> LockSub_R1 I6_NULL; Array B154_check_unlocking_it_with --> UnlockSub_C1 UnlockSub_C2 UnlockSub_C3 I6_NULL; Array B155_carry_out_unlocking_it_ --> UnlockSub_O1 I6_NULL; Array B156_report_unlocking_it_wit --> UnlockSub_R1 I6_NULL; Array B157_check_switching_on --> SwitchOnSub_C1 SwitchOnSub_C2 I6_NULL; Array B158_carry_out_switching_on --> SwitchOnSub_O1 I6_NULL; Array B159_report_switching_on --> SwitchOnSub_R1 I6_NULL; Array B160_check_switching_off --> SwitchOffSub_C1 SwitchOffSub_C2 I6_NULL; Array B161_carry_out_switching_off --> SwitchOffSub_O1 I6_NULL; Array B162_report_switching_off --> SwitchOffSub_R1 I6_NULL; Array B163_check_opening --> OpenSub_C1 OpenSub_C2 OpenSub_C3 I6_NULL; Array B164_carry_out_opening --> OpenSub_O1 I6_NULL; Array B165_report_opening --> OpenSub_R1 OpenSub_R2 I6_NULL; Array B166_check_closing --> CloseSub_C1 CloseSub_C2 I6_NULL; Array B167_carry_out_closing --> CloseSub_O1 I6_NULL; Array B168_report_closing --> CloseSub_R1 I6_NULL; Array B169_check_wearing --> WearSub_C1 WearSub_C2 WearSub_C3 I6_NULL; Array B170_carry_out_wearing --> WearSub_O1 I6_NULL; Array B171_report_wearing --> WearSub_R1 I6_NULL; Array B172_check_taking_off --> DisrobeSub_C1 I6_NULL; Array B173_carry_out_taking_off --> DisrobeSub_O1 I6_NULL; Array B174_report_taking_off --> DisrobeSub_R1 I6_NULL; Array B175_check_eating --> EatSub_C1 EatSub_C2 I6_NULL; Array B176_carry_out_eating --> EatSub_O1 I6_NULL; Array B177_report_eating --> EatSub_R1 I6_NULL; Array B178_check_giving_it_to --> GiveSub_C1 GiveSub_C2 GiveSub_C3 GiveSub_C4 GiveSub_C5 I6_NULL; Array B179_carry_out_giving_it_to --> GiveSub_O1 I6_NULL; Array B180_report_giving_it_to --> GiveSub_R1 I6_NULL; Array B181_check_showing_it_to --> ShowSub_C1 ShowSub_C2 ShowSub_C3 ShowSub_C4 I6_NULL; Constant B182_carry_out_showing_it_to = EMPTY_RULEBOOK; Constant B183_report_showing_it_to = EMPTY_RULEBOOK; Array B184_check_waking --> WakeOtherSub_C1 WakeOtherSub_C2 I6_NULL; Constant B185_carry_out_waking = EMPTY_RULEBOOK; Constant B186_report_waking = EMPTY_RULEBOOK; Array B187_check_throwing_it_at --> ThrowAtSub_C1 ThrowAtSub_C2 ThrowAtSub_C3 ThrowAtSub_C4 ThrowAtSub_C5 I6_NULL; Constant B188_carry_out_throwing_it_a = EMPTY_RULEBOOK; Constant B189_report_throwing_it_at = EMPTY_RULEBOOK; Array B190_check_attacking --> AttackSub_C1 AttackSub_C2 I6_NULL; Constant B191_carry_out_attacking = EMPTY_RULEBOOK; Constant B192_report_attacking = EMPTY_RULEBOOK; Array B193_check_kissing --> KissSub_C1 KissSub_C2 KissSub_C3 I6_NULL; Constant B194_carry_out_kissing = EMPTY_RULEBOOK; Constant B195_report_kissing = EMPTY_RULEBOOK; Array B196_check_answering_it_that --> AnswerSub_C1 I6_NULL; Constant B197_carry_out_answering_it_ = EMPTY_RULEBOOK; Array B198_report_answering_it_tha --> AnswerSub_C2 I6_NULL; Array B199_check_telling_it_about --> TellSub_C1 TellSub_C2 I6_NULL; Constant B200_carry_out_telling_it_ab = EMPTY_RULEBOOK; Array B201_report_telling_it_about --> TellSub_C3 I6_NULL; Array B202_check_asking_it_about --> AskSub_C1 I6_NULL; Constant B203_carry_out_asking_it_abo = EMPTY_RULEBOOK; Array B204_report_asking_it_about --> AskSub_C2 I6_NULL; Array B205_check_asking_it_for --> AskForSub_C1 AskForSub_C2 I6_NULL; Constant B206_carry_out_asking_it_for = EMPTY_RULEBOOK; Constant B207_report_asking_it_for = EMPTY_RULEBOOK; Constant B208_check_touching = EMPTY_RULEBOOK; Constant B209_carry_out_touching = EMPTY_RULEBOOK; Array B210_report_touching --> TouchSub_R1 TouchSub_R2 TouchSub_R3 I6_NULL; Array B211_check_waving --> WaveSub_C1 I6_NULL; Constant B212_carry_out_waving = EMPTY_RULEBOOK; Array B213_report_waving --> WaveSub_R1 I6_NULL; Array B214_check_pulling --> PullSub_C1 PullSub_C2 PullSub_C3 I6_NULL; Constant B215_carry_out_pulling = EMPTY_RULEBOOK; Array B216_report_pulling --> PullSub_R1 I6_NULL; Array B217_check_pushing --> PushSub_C1 PushSub_C2 PushSub_C3 I6_NULL; Constant B218_carry_out_pushing = EMPTY_RULEBOOK; Array B219_report_pushing --> PushSub_R1 I6_NULL; Array B220_check_turning --> TurnSub_C1 TurnSub_C2 TurnSub_C3 I6_NULL; Constant B221_carry_out_turning = EMPTY_RULEBOOK; Array B222_report_turning --> TurnSub_R1 I6_NULL; Array B223_check_pushing_it_to --> PushDirSub_C1 I6_NULL; Constant B224_carry_out_pushing_it_to = EMPTY_RULEBOOK; Constant B225_report_pushing_it_to = EMPTY_RULEBOOK; Array B226_check_squeezing --> SqueezeSub_C1 I6_NULL; Constant B227_carry_out_squeezing = EMPTY_RULEBOOK; Array B228_report_squeezing --> SqueezeSub_R1 I6_NULL; Array B229_check_saying_yes --> YesSub_C1 I6_NULL; Constant B230_carry_out_saying_yes = EMPTY_RULEBOOK; Constant B231_report_saying_yes = EMPTY_RULEBOOK; Array B232_check_saying_no --> NoSub_C1 I6_NULL; Constant B233_carry_out_saying_no = EMPTY_RULEBOOK; Constant B234_report_saying_no = EMPTY_RULEBOOK; Array B235_check_burning --> BurnSub_C1 I6_NULL; Constant B236_carry_out_burning = EMPTY_RULEBOOK; Constant B237_report_burning = EMPTY_RULEBOOK; Array B238_check_waking_up --> WakeSub_C1 I6_NULL; Constant B239_carry_out_waking_up = EMPTY_RULEBOOK; Constant B240_report_waking_up = EMPTY_RULEBOOK; Array B241_check_thinking --> ThinkSub_C1 I6_NULL; Constant B242_carry_out_thinking = EMPTY_RULEBOOK; Constant B243_report_thinking = EMPTY_RULEBOOK; Array B244_check_smelling --> SmellSub_C1 I6_NULL; Constant B245_carry_out_smelling = EMPTY_RULEBOOK; Constant B246_report_smelling = EMPTY_RULEBOOK; Array B247_check_listening_to --> ListenSub_C1 I6_NULL; Constant B248_carry_out_listening_to = EMPTY_RULEBOOK; Constant B249_report_listening_to = EMPTY_RULEBOOK; Array B250_check_tasting --> TasteSub_C1 I6_NULL; Constant B251_carry_out_tasting = EMPTY_RULEBOOK; Constant B252_report_tasting = EMPTY_RULEBOOK; Array B253_check_cutting --> CutSub_C1 I6_NULL; Constant B254_carry_out_cutting = EMPTY_RULEBOOK; Constant B255_report_cutting = EMPTY_RULEBOOK; Array B256_check_jumping --> JumpSub_C1 I6_NULL; Constant B257_carry_out_jumping = EMPTY_RULEBOOK; Constant B258_report_jumping = EMPTY_RULEBOOK; Array B259_check_tying_it_to --> TieSub_C1 I6_NULL; Constant B260_carry_out_tying_it_to = EMPTY_RULEBOOK; Constant B261_report_tying_it_to = EMPTY_RULEBOOK; Array B262_check_drinking --> DrinkSub_C1 I6_NULL; Constant B263_carry_out_drinking = EMPTY_RULEBOOK; Constant B264_report_drinking = EMPTY_RULEBOOK; Array B265_check_saying_sorry --> SorrySub_C1 I6_NULL; Constant B266_carry_out_saying_sorry = EMPTY_RULEBOOK; Constant B267_report_saying_sorry = EMPTY_RULEBOOK; Array B268_check_swearing_obscenel --> StrongSub_C1 I6_NULL; Constant B269_carry_out_swearing_obsc = EMPTY_RULEBOOK; Constant B270_report_swearing_obscene = EMPTY_RULEBOOK; Array B271_check_swearing_mildly --> MildSub_C1 I6_NULL; Constant B272_carry_out_swearing_mild = EMPTY_RULEBOOK; Constant B273_report_swearing_mildly = EMPTY_RULEBOOK; Array B274_check_swinging --> SwingSub_C1 I6_NULL; Constant B275_carry_out_swinging = EMPTY_RULEBOOK; Constant B276_report_swinging = EMPTY_RULEBOOK; Array B277_check_rubbing --> RubSub_C1 I6_NULL; Constant B278_carry_out_rubbing = EMPTY_RULEBOOK; Constant B279_report_rubbing = EMPTY_RULEBOOK; Array B280_check_setting_it_to --> SetToSub_C1 I6_NULL; Constant B281_carry_out_setting_it_to = EMPTY_RULEBOOK; Constant B282_report_setting_it_to = EMPTY_RULEBOOK; Array B283_check_waving_hands --> WaveHandsSub_C1 I6_NULL; Constant B284_carry_out_waving_hands = EMPTY_RULEBOOK; Constant B285_report_waving_hands = EMPTY_RULEBOOK; Array B286_check_buying --> BuySub_C1 I6_NULL; Constant B287_carry_out_buying = EMPTY_RULEBOOK; Constant B288_report_buying = EMPTY_RULEBOOK; Array B289_check_singing --> SingSub_C1 I6_NULL; Constant B290_carry_out_singing = EMPTY_RULEBOOK; Constant B291_report_singing = EMPTY_RULEBOOK; Array B292_check_climbing --> ClimbSub_C1 I6_NULL; Constant B293_carry_out_climbing = EMPTY_RULEBOOK; Constant B294_report_climbing = EMPTY_RULEBOOK; Array B295_check_sleeping --> SleepSub_C1 I6_NULL; Constant B296_carry_out_sleeping = EMPTY_RULEBOOK; Constant B297_report_sleeping = EMPTY_RULEBOOK; Constant B298_check_requesting_the_sc = EMPTY_RULEBOOK; Array B299_carry_out_requesting_th --> ScoreSub_O1 I6_NULL; Constant B300_report_requesting_the_s = EMPTY_RULEBOOK; Constant B301_check_quitting_the_game = EMPTY_RULEBOOK; Array B302_carry_out_quitting_the_ --> QuitSub_O1 I6_NULL; Constant B303_report_quitting_the_gam = EMPTY_RULEBOOK; Constant B304_check_saving_the_game = EMPTY_RULEBOOK; Array B305_carry_out_saving_the_ga --> SaveSub_O1 I6_NULL; Constant B306_report_saving_the_game = EMPTY_RULEBOOK; Constant B307_check_restoring_the_gam = EMPTY_RULEBOOK; Array B308_carry_out_restoring_the --> RestoreSub_O1 I6_NULL; Constant B309_report_restoring_the_ga = EMPTY_RULEBOOK; Constant B310_check_restarting_the_ga = EMPTY_RULEBOOK; Array B311_carry_out_restarting_th --> RestartSub_O1 I6_NULL; Constant B312_report_restarting_the_g = EMPTY_RULEBOOK; Constant B313_check_verifying_the_sto = EMPTY_RULEBOOK; Array B314_carry_out_verifying_the --> VerifySub_O1 I6_NULL; Constant B315_report_verifying_the_st = EMPTY_RULEBOOK; Constant B316_check_requesting_the_st = EMPTY_RULEBOOK; Array B317_carry_out_requesting_th --> VersionSub_O1 I6_NULL; Constant B318_report_requesting_the_s = EMPTY_RULEBOOK; Constant B319_check_switching_the_sto = EMPTY_RULEBOOK; Array B320_carry_out_switching_the --> ScriptOnSub_O1 I6_NULL; Constant B321_report_switching_the_st = EMPTY_RULEBOOK; Constant B322_check_switching_the_sto = EMPTY_RULEBOOK; Array B323_carry_out_switching_the --> ScriptOffSub_O1 I6_NULL; Constant B324_report_switching_the_st = EMPTY_RULEBOOK; Constant B325_check_preferring_abbrev = EMPTY_RULEBOOK; Array B326_carry_out_preferring_ab --> LMode3Sub_O1 I6_NULL; Constant B327_report_preferring_abbre = EMPTY_RULEBOOK; Constant B328_check_preferring_unabbr = EMPTY_RULEBOOK; Array B329_carry_out_preferring_un --> LMode2Sub_O1 I6_NULL; Constant B330_report_preferring_unabb = EMPTY_RULEBOOK; Constant B331_check_preferring_someti = EMPTY_RULEBOOK; Array B332_carry_out_preferring_so --> LMode1Sub_O1 I6_NULL; Constant B333_report_preferring_somet = EMPTY_RULEBOOK; Constant B334_check_requesting_the_pr = EMPTY_RULEBOOK; Array B335_carry_out_requesting_th --> PronounsSub_O1 I6_NULL; Constant B336_report_requesting_the_p = EMPTY_RULEBOOK; Constant B337_check_switching_score_n = EMPTY_RULEBOOK; Array B338_carry_out_switching_sco --> NotifyOnSub_O1 I6_NULL; Constant B339_report_switching_score_ = EMPTY_RULEBOOK; Constant B340_check_switching_score_n = EMPTY_RULEBOOK; Array B341_carry_out_switching_sco --> NotifyOffSub_O1 I6_NULL; Constant B342_report_switching_score_ = EMPTY_RULEBOOK; ! RTP.i6 segment ! Reporting of run-time problems in a format which can be parsed by the ! Inform application Global I7_enable_rte = true; Constant RTP_BACKDROP 1; Constant RTP_EXITDOOR 2; Constant RTP_NOEXIT 3; Constant RTP_CANTCHANGE 4; Constant RTP_IMPREL 5; Constant RTP_RULESTACK 6; Constant RTP_TOOMANYRULEBOOKS 7; Constant RTP_TOOMANYEVENTS 8; Constant RTP_BADPROPERTY 9; Constant RTP_UNPROVIDED 10; Constant RTP_UNSET 11; Constant RTP_TOOMANYACTS 12; Constant RTP_CANTABANDON 13; Constant RTP_CANTEND 14; Constant RTP_CANTMOVENOTHING 15; Constant RTP_CANTREMOVENOTHING 16; Constant RTP_DIVZERO 17; Constant RTP_BADVALUEPROPERTY 18; Constant RTP_NOTBACKDROP 19; Constant RTP_TABLE_NOCOL 20; Constant RTP_TABLE_NOCORR 21; Constant RTP_TABLE_NOROW 22; Constant RTP_TABLE_NOENTRY 23; Constant RTP_TABLE_NOTABLE 24; Constant RTP_TABLE_NOMOREBLANKS 25; Constant RTP_TABLE_NOROWS 26; Constant RTP_TABLE_CANTSORT 27; Constant RTP_NOTINAROOM 28; Constant RTP_BADTOPIC 29; [ RunTimeProblem n obj obj2 ln obj3 i c; ! if (I7_enable_rte == false) return; I7_enable_rte = false; print "^*** Run-time problem P", n; ! if (ln == 0) ln=1; if (ln) print " (at paragraph ", ln, " in the source text)"; print ": "; switch(n) { RTP_BACKDROP: print "Tried to move ", (the) obj, " (a backdrop) to ", (the) obj2, ", which is not a region.^"; RTP_CANTCHANGE: print "Tried to change player to ", (the) obj, ", which is not a player-character.^"; RTP_NOEXIT: print "Tried to change ", (the) obj2, " exit of ", (the) obj, ", but it didn't seem to have such an exit to change.^"; RTP_EXITDOOR: print "Tried to change ", (the) obj2, " exit of ", (the) obj, ", but it led to a door, not a room.^"; RTP_IMPREL: print "Tried to access an inappropriate relation for ", (the) obj, ", violating '"; for (i=0: RelationList-->i ~= I6_NULL: i=i+3) { c = RelationList-->(i+1); if (((c == Relation_VtoV) || (c == Relation_Sym_VtoV)) && (obj2 == RelationList-->i)) { print (string) RelationList-->(i+2), "'.^"; } } RTP_RULESTACK: print "Too many procedural rules acting all at once.^"; RTP_TOOMANYRULEBOOKS: print "Too many rulebooks in simultaneous use.^"; RTP_TOOMANYEVENTS: print "Too many timed events are going on at once.^"; RTP_BADPROPERTY: print "Tried to access non-existent property for ", (the) obj, ".^"; RTP_UNPROVIDED: print "Since ", (the) obj, " is not allowed the property ~", (string) obj2, "~, it is against the rules to try to use it.^"; RTP_UNSET: print "Although ", (the) obj, " is allowed to have the property ~", (string) obj2, "~, no value was ever given, so it can't now be used.^"; RTP_TOOMANYACTS: print "Too many activities are going on at once.^"; RTP_CANTABANDON: print "Tried to abandon an activity which wasn't going on.^"; RTP_CANTEND: print "Tried to end an activity which wasn't going on.^"; RTP_CANTMOVENOTHING: print "You can't move nothing.^"; RTP_CANTREMOVENOTHING: print "You can't remove nothing from play.^"; RTP_DIVZERO: print "You can't divide by zero.^"; RTP_BADVALUEPROPERTY: print "Tried to access property for a value which didn't fit: ", "if this were a number it would be ", obj, ".^"; RTP_NOTBACKDROP: print "Tried to move ", (the) obj, " (not a backdrop) to ", (the) obj2, ", which is a region.^"; RTP_TABLE_NOCOL: print "Attempt to look up a non-existent column in the table '", (PrintTableName) obj, "'.^"; RTP_TABLE_NOCORR: print "Attempt to look up a non-existent correspondence in the table '", (PrintTableName) obj, "'.^"; RTP_TABLE_NOROW: print "Attempt to look up a non-existent row in the table '", (PrintTableName) obj, "'.^"; RTP_TABLE_NOENTRY: print "Attempt to look up a non-existent entry at column ", obj2, ", row ", obj3, " of the table '", (PrintTableName) obj, "'.^"; RTP_TABLE_NOTABLE: print "Attempt to blank out a row from a non-existent table (value ", obj, ").^"; RTP_TABLE_NOMOREBLANKS: print "Attempt to choose a blank row in a table with none left: table '", (PrintTableName) obj, "'.^"; RTP_TABLE_NOROWS: print "Attempt to choose a random row in an entirely blank table: table '", (PrintTableName) obj, "'.^"; RTP_TABLE_CANTSORT: print "Attempt to sort a table whose ordering must remain fixed: table '", (PrintTableName) obj, "'.^"; RTP_NOTINAROOM: print "Attempt to test if the current location is '", (the) obj, "', which is not a room or region.^"; RTP_BADTOPIC: print "Attempt to see if a snippet of text matches something which is not a topic.^"; } print "^"; ]; ! Protected Z-machine division routines: [ I7_Divide A B; if (B == 0) { RunTimeProblem(RTP_DIVZERO); rfalse; } return A/B; ]; [ I7_Rem A B; if (B == 0) { RunTimeProblem(RTP_DIVZERO); rfalse; } return A%B; ]; ! Protected Z-machine property and attribute access: [ PermitAttributeR obj off i; ! print "Asking permission of ", (the) obj, "^"; i=off; while (property_metadata-->i >= 0) { if (obj == property_metadata-->i) rtrue; i++; } rfalse; ]; [ PermitAttribute f obj att off textual i a l; if (att<0) att = ~att; if (metaclass(obj) ~= Object) rfalse; if (f) { if (att < I7_FBNA) off = attribute_offsets-->att; else off = attribute_offsets-->(50+att-I7_FBNA); } else off = property_offsets-->att; ! print "Off is ", off, "^"; ! for (i=0: i<116: i++) print attribute_offsets-->i, ", "; ! print "^^Props: "; ! for (i=0: i<166: i++) print property_offsets-->i, ", "; ! print "^"; if (off<0) return RunTimeProblem(RTP_BADPROPERTY, obj); textual = property_metadata-->off; off++; if (PermitAttributeR(obj, off)) jump Okay; if (obj provides i7_kind) { l = (obj.#i7_kind)/2; a = obj.&i7_kind; for (i=0: ii, off)) jump Okay; } RunTimeProblem(RTP_UNPROVIDED, obj, textual); rfalse; .Okay; if (f) rtrue; if (obj provides att) rtrue; RunTimeProblem(RTP_UNSET, obj, textual); rfalse; ]; [ AccessProp obj pr; if (Value_Property_Holder provides pr) { if ((obj<=0) || (obj > (Value_Property_Holder.pr)-->0)) { RunTimeProblem(RTP_BADVALUEPROPERTY); rfalse; } return (Value_Property_Holder.pr)-->(obj+1); } if ((pr == door_to) && (obj provides pr)) return obj.pr(); if (PermitAttribute(false, obj, pr)) return obj.pr; rfalse; ]; [ WriteAccessProp obj pr val; if (Value_Property_Holder provides pr) { if ((obj<=0) || (obj > (Value_Property_Holder.pr)-->0)) return RunTimeProblem(RTP_BADVALUEPROPERTY); (Value_Property_Holder.pr)-->(obj+1) = val; return; } if (PermitAttribute(false, obj, pr)) obj.pr = val; ]; ! Type checking failing at run-time [ Runtime_Type_Error file line arg; print ">--> A mistake in the source (~", (string) file, "~, line ", line, ") meant that argument ", arg, " had the wrong type.^"; ]; ! End of RTP.i6 segment ! Printing.i6 [ I7_DefaultPrinter x; print x; ]; Global debug_rule_nesting; [ SetString31 d; switch(d) { 0: string 31 ""; 1: string 31 " "; 2: string 31 " "; 3: string 31 " "; 4: string 31 " "; default: string 31 " "; } ]; [ I7_DivideParagraph; !print "[DP", say__p, say__pc, "]"; if (say__p) { new_line; say__p = 0; say__pc = say__pc | PARA_COMPLETED; if (say__pc & PARA_LINEBREAK) say__pc = say__pc - PARA_LINEBREAK; if (say__pc & PARA_FORCELINEBREAK) say__pc = say__pc - PARA_FORCELINEBREAK; } !print "[TO", say__p, say__pc, "]"; ]; [ I7_RunOnParagraph said; say__p = 0; say__pc = say__pc | PARA_LINEBREAK; if (said) say__pc = say__pc | PARA_FORCELINEBREAK; ]; [ I7_Prompt i; ! print "^"; style roman; if ((say__p) || ((say__pc & PARA_LINEBREAK) && ((say__pc & PARA_FORCELINEBREAK)==0))) { new_line; say__p=0; say__pc = 0; } switch(metaclass(I7_prompt_text)) { String: print (string) I7_prompt_text; Routine: I7_prompt_text(); } say__p = 0; say__pc = 0; if (I7_box) { for (i=0: I7_boxes_appeared-->i: i++) if (I7_boxes_appeared-->i == I7_box) { I7_box = 0; return; } I7_boxes_appeared-->i = I7_box; I7_box(); I7_box = 0; say__p = 0; say__pc = 0; } I7_enable_rte = true; ]; [ SL_Score_Moves; #ifdef I7_NOSCORE; print sline2; #ifnot; print sline1, "/", sline2; #endif; ]; [ SL_Location; if (location == thedark) print (name) location; else { FindVisibilityLevels(); if (visibility_ceiling == location) print (name) location; else print (The) visibility_ceiling; } ]; #Ifdef TARGET_ZCODE; #IfV5; #Iftrue (#version_number == 6); Constant DrawStatusLine_Preempted; [ DrawStatusLine width x charw scw s spc; (0-->8) = (0-->8) &~ $$00000100; s = say__p; spc = say__pc; BeginActivity(3); StatusLineHeight(gg_statuswin_size); ! Now clear the window. This isn't totally trivial. Our approach is to select the ! fixed space font, measure its width, and print an appropriate ! number of spaces. We round up if the screen isn't a whole number ! of characters wide, and rely on window 1 being set to clip by default. MoveCursor(1, 1); @set_font 4 -> x; width = ScreenWidth(); spaces width; say__p = 0; say__pc = 0; if (ForActivity(3) == false) { ! Back to standard font for the display. We use output_stream 3 to ! measure the space required, the aim being to get 50 characters ! worth of space for the location name. MoveCursor(1, 2); @set_font 1 -> x; switch (metaclass(I7_left_sl)) { String: print (string) I7_left_sl; Routine: I7_left_sl(); } @get_wind_prop 1 3 -> width; @get_wind_prop 1 13 -> charw; charw = charw & $FF; @output_stream 3 StorageForShortName; print (I7_string) I7_right_sl; @output_stream -3; scw = HDR_PIXELSTO3-->0 + charw; x = 1+width-scw; @set_cursor 1 x; print (I7_string) I7_right_sl; } ! Reselect roman, as Infocom's interpreters interpreters go funny ! if reverse is selected twice. MainWindow(); say__p = 0; say__pc = 0; EndActivity(3); say__p = s; say__pc = spc; ]; #Endif; ! #version_number == 6 #Endif; ! V5 #Endif; ! TARGET_ZCODE #Ifndef DrawStatusLine_Preempted; [ DrawStatusLine width posb s spc; s = say__p; spc = say__pc; BeginActivity(3); StatusLineHeight(1); MoveCursor(1, 1); width = ScreenWidth(); posb = width-15; spaces width; say__p = 0; say__pc = 0; if (ForActivity(3) == false) { MoveCursor(1, 2); switch(metaclass(I7_left_sl)) { String: print (string) I7_left_sl; Routine: I7_left_sl(); } MoveCursor(1, posb); switch(metaclass(I7_right_sl)) { String: print (string) I7_right_sl; Routine: I7_right_sl(); } } MoveCursor(1, 1); MainWindow(); say__p = 0; say__pc = 0; EndActivity(3); say__p = s; say__pc = spc; ]; #Endif; ! DrawStatusLine_Preempted [ I7_say_s; if (say__n ~= 1) print "s"; ]; [ I7_string s; if (s ofclass String) { print (string) s; return; } indirect(s); ]; [ I7SwapWF obj lst; objectloop (obj ofclass Object) { lst = false; if (obj has i7listflag) lst = true; give obj ~i7listflag; if (obj has workflag) give obj i7listflag; give obj ~workflag; if (lst) give obj workflag; } ]; [ I7List supp obj par flag mixed ct defart; objectloop (obj ofclass Object && obj has i7listflag) { ct++; if (flag == false) { flag = true; par = parent(obj); } else { if (parent(obj) ~= par) mixed = true; } } if (ct == 0) { print "nothing"; return; } if (supp < 0) { supp = -supp; mixed = true; defart = true; } if (supp & ISARE_BIT) { if (ct > 1) print "are "; else print "is "; supp = supp - ISARE_BIT; } if ((mixed == false) && (par)) { ct = c_style; I7SwapWF(); ! print "<"; WriteListFrom(child(par), ENGLISH_BIT+WORKFLAG_BIT+supp); I7SwapWF(); ! print ">"; c_style = ct; return; } objectloop (obj ofclass Object && obj has i7listflag) { give obj ~i7listflag; if (supp & DEFART_BIT) { if (defart) print (The) obj; else print (the) obj; defart = false; } else print (a) obj; ct--; #ifdef US_DIALECT; if (ct == 1) print ", and "; #ifnot; if (ct == 1) print " and "; #endif; if (ct > 1) print ", "; } ! print ">"; ]; [ I7WriteListFrom A opt; if (opt & EXTRAINDENT_BIT) { opt = opt - EXTRAINDENT_BIT; if (opt & WORKFLAG_BIT) opt = opt - WORKFLAG_BIT + EXTRA_WORKFLAG_BIT; WriteListFrom(A, opt, 1); } else WriteListFrom(A, opt); ]; [ I7_Locale L T1 T2; objectloop (L ofclass Object) give L ~I7_mentioned; ]; ! End of Printing.i6 ! Rulebooks.i6 segment ! (i) Rulebooks are numbered, and we need I6 constants for the numbers of ! some commonly used ones. (These numbers must correspond to those in the ! source of NI, and to the creation sequence in the Standard Rules.) Constant APROC_RB = 0; Constant AFTER_RB = 3; Constant PROC_RB = 4; Constant ACCESS_RB = 5; Constant GENERIC_CARRYOUT_RB = 7; Constant REPLY_RB = 8; Constant TURNEND_RB = 9; Constant REACHIN_RB = 10; Constant REACHOUT_RB = 11; Constant GAME_BEGINS_RB = 22; Constant GAME_ENDS_RB = 23; Constant GENERIC_CHECK_RB = 25; Constant GENERIC_REPORT_RB = 26; Constant PERSUADE_RB = 27; Constant UNABLE_RB = 28; Constant VISIBLE_RB = 29; ! (ii) We maintain a "rule change stack" to keep track of any temporary ! abolition or modification of rules otherwise used in the rulebooks. ! The rule change stack contains 3-word (6 byte) records, and is defined ! in Main.i6. [ PushRuleChange usage rule1 rule2; if (rulechange_sp >= RS_CAPACITY) { return RunTimeProblem(RTP_RULESTACK); } rulechange_stack-->rulechange_sp++ = usage; rulechange_stack-->rulechange_sp++ = rule1; rulechange_stack-->rulechange_sp++ = rule2; ]; ! The first word of each record indicates a usage type, of which one value ! is special and indicates the start of a frame. A new frame is opened on ! the stack each time a new "follow" occurs; recall that this processes a ! rulebook after consulting procedural rules, which may in turn modify ! the behaviour of other rules. These frame divisions, therefore, mark ! local scopes for modifications: anything from the top of the stack down ! to the topmost frame marker is currently in force. Global rule_frames = 0; Constant RS_FRAME = -1; ! The other possible values of usage are as follows: Constant RS_DONOTRUN = 1; Constant RS_RUN = 2; Constant RS_MOVEBEFORE = 3; Constant RS_MOVEAFTER = 4; Constant RS_DONOTUSE = 5; Constant RS_USE = 6; Constant RS_SUBSTITUTE = 7; Constant RS_SUCCEEDS = 8; Constant RS_FAILS = 9; ! (iii) To "follow" a rulebook, we start a new frame, process the ! procedural rules, then process the rulebook, then clear the frame back off ! the stack: [ BeginFollowRulebook; PushRuleChange(RS_FRAME, RS_FRAME, RS_FRAME); rule_frames++; ! print "+<", rule_frames, "/", rulechange_sp, ">"; if (rule_frames == 20) { RunTimeProblem(RTP_TOOMANYRULEBOOKS); rule_frames = -1; return; } ProcessRulebook(PROC_RB, 0, 1); ]; [ EndFollowRulebook r x y; if (rulechange_stack-->rulechange_sp == RS_SUCCEEDS) r = 1; else if (rulechange_stack-->rulechange_sp == RS_FAILS) r = 0; else r = -1; if (r ~= -1) { x = rulechange_stack-->(rulechange_sp+1); y = rulechange_stack-->(rulechange_sp+2); } rule_frames--; while (rulechange_sp > 0) { rulechange_sp = rulechange_sp - 3; if (rulechange_stack-->rulechange_sp == RS_FRAME) break; } if (rulechange_sp == 0) rule_frames = 0; if (r == 1) rulechange_stack-->rulechange_sp = RS_SUCCEEDS; else if (r == 0) rulechange_stack-->rulechange_sp = RS_FAILS; if (r ~= -1) { rulechange_stack-->(rulechange_sp+1) = x; rulechange_stack-->(rulechange_sp+2) = y; } ! print "-<", rule_frames, "/", rulechange_sp, ">"; ]; [ FollowRulebook rulebook par activity_flag rv; ! print "^{", rulebook, "}"; if (rulebook ~= PROC_RB) BeginFollowRulebook(); rv = ProcessRulebook(rulebook, par, activity_flag); if (rulebook ~= PROC_RB) EndFollowRulebook(); ! print "{/", rulebook, "}"; if (rv) rtrue; rfalse; ]; [ FollowRulebookSelfed R o ss rv; ss = self; if (o) self = o; rv = FollowRulebook(R, o, true); self = ss; return rv; ]; ! (iv) The main rulebook processing routine is ! ProcessRulebook(rulebook/rule) ! which returns true if the rulebook or rule chose to "succeed" or "fail", ! and false if it made no choice. In the event that a choice was made, the ! result is left as a record above the top of the stack, and should be ! collected immediately. ! First a variable logging the depth of recursion of rulebook processing, ! which at present is used only to print neatly formatted debugging: Global process_rulebook_count; ! The following bitmap is used in a simple state machine while working ! through a given routine: Constant RS_ACTIVE_BIT = 1; Constant RS_MOVED_BIT = 2; Constant RS_USERESULT_BIT = 4; Constant RS_ACTIVITY = 8; Constant RS_NOSKIPS = 16; ! The following flag records whether we are tracing rule invocations: Global debugging_rules = false; [ ProcessRulebook rulebook par bits rv x frame_base substituted_rule usage original_deadflag; ! if ((rulebook >= 0) && (rulebook < HIGHEST_RULEBOOK_NO)) { ! print "Rulebook ", rulebook, "^"; ! } if ((Protect_I7_Arrays-->0 ~= 16339) || (Protect_I7_Arrays-->1 ~= 12345)) { print "^^*** Fatal programming error: I7 arrays corrupted ***^^"; @quit; } if (bits) bits = RS_ACTIVITY + RS_NOSKIPS; if (rule_frames<0) rfalse; original_deadflag = deadflag; if (par) parameter_object = par; for (x = rulechange_sp-3: x>=0: x = x - 3) { usage = rulechange_stack-->x; if (usage == RS_FRAME) { x=x+3; break; } if (rulechange_stack-->(x+1) == rulebook) { if (usage == RS_MOVEBEFORE) bits = bits | (RS_MOVED_BIT); if (usage == RS_MOVEAFTER) bits = bits | (RS_MOVED_BIT); } } if (x<0) x=0; frame_base = x; if ((bits & RS_MOVED_BIT) && (rv == false)) { rfalse; } ! rv was a call parameter: it's no longer needed and is now reused bits = bits | RS_ACTIVE_BIT; bits = bits | RS_USERESULT_BIT; substituted_rule = rulebook; rv = 0; for (: xx; if (rulechange_stack-->(x+1) == rulebook) { if (usage == RS_DONOTRUN) bits = bits & (~RS_ACTIVE_BIT); if (usage == RS_RUN) bits = bits | (RS_ACTIVE_BIT); if (usage == RS_DONOTUSE) bits = bits & (~RS_USERESULT_BIT); if (usage == RS_USE) bits = bits | (RS_USERESULT_BIT); if (usage == RS_SUBSTITUTE) substituted_rule = rulechange_stack-->(x+2); } if ((usage == RS_MOVEBEFORE) && (rulechange_stack-->(x+2) == rulebook)) { rv = ProcessRulebook(rulechange_stack-->(x+1), par, (bits & RS_ACTIVITY ~= 0), true); if (rv) return rv; } } if ((bits & RS_ACTIVE_BIT) == 0) rfalse; ! We now reuse usage to keep the stack frame slimmer usage = debugging_rules; #ifdef DEBUG; AdjustDbr(substituted_rule); #endif; #ifndef I7_ECONOMY; if (debugging_rules) DebugRulebooks(substituted_rule, par); #endif; ! (A routine defined in the I7 code generator) process_rulebook_count = process_rulebook_count + debugging_rules; if ((substituted_rule >= 0) && (substituted_rule < HIGHEST_RULEBOOK_NO)) { substituted_rule = rulebooks_array-->substituted_rule; for (x=0, rv=0: (substituted_rule-->x~=I6_NULL) && (original_deadflag == deadflag): x++) { if ((rv = (ProcessRulebook(substituted_rule-->x, par, (bits & RS_ACTIVITY ~= 0)))) && (bits & RS_USERESULT_BIT)) break; rv = 0; } } else { if ((say__p) && (bits & RS_NOSKIPS == 0)) I7_DivideParagraph(); rv = indirect(substituted_rule); if (rv) rv = substituted_rule; } if (rv && (bits & RS_USERESULT_BIT)) { #ifdef DEBUG; AdjustDbr(substituted_rule); #endif; process_rulebook_count = process_rulebook_count - debugging_rules; if (process_rulebook_count < 0) process_rulebook_count = 0; #ifndef I7_ECONOMY; if (debugging_rules) { spaces(2*process_rulebook_count); if (rulechange_stack-->rulechange_sp == RS_SUCCEEDS) print "[stopped: success]^"; if (rulechange_stack-->rulechange_sp == RS_FAILS) print "[stopped: fail]^"; } #endif; debugging_rules = usage; return rv; } for (x=rulechange_sp-3: x>=frame_base: x = x-3) { if ((rulechange_stack-->x == RS_MOVEAFTER) && (rulechange_stack-->(x+2) == rulebook)) { rv = ProcessRulebook(rulechange_stack-->(x+1), par, (bits & RS_ACTIVITY ~= 0), true); if (rv) { process_rulebook_count--; debugging_rules = usage; return rv; } } } process_rulebook_count = process_rulebook_count - debugging_rules; rulechange_stack-->rulechange_sp = 0; debugging_rules = usage; rfalse; ]; ! (v) The following routines provide a sort of rule-changing API: [ ResultOfRule a; a = rulechange_stack-->rulechange_sp; if ((a == RS_FAILS) || (a == RS_SUCCEEDS)) { a = rulechange_stack-->(rulechange_sp + 1); if (a) return rulechange_stack-->(rulechange_sp + 2); } rfalse; ]; [ ActRulebookSucceeds rule_id; if (rule_id) I7_action_deciding_rule = rule_id; RulebookSucceeds(); ]; [ ActRulebookFails rule_id; if (rule_id) I7_action_deciding_rule = rule_id; RulebookFails(); ]; [ RulebookSucceeds valueflag value; PushRuleChange(RS_SUCCEEDS, valueflag, value); rulechange_sp = rulechange_sp - 3; ]; [ RulebookFails valueflag value; PushRuleChange(RS_FAILS, valueflag, value); rulechange_sp = rulechange_sp - 3; ]; [ RulebookSucceeded; if (rulechange_stack-->rulechange_sp == RS_SUCCEEDS) rtrue; rfalse; ]; [ SuppressRule rule; PushRuleChange(RS_DONOTRUN, rule, 0); ]; [ ReinstateRule rule; PushRuleChange(RS_RUN, rule, 0); ]; [ DonotuseRule rule; PushRuleChange(RS_DONOTUSE, rule, 0); ]; [ UseRule rule; PushRuleChange(RS_USE, rule, 0); ]; [ SubstituteRule rule1 rule2; PushRuleChange(RS_SUBSTITUTE, rule2, rule1); ]; [ MoveRuleBefore rule1 rule2; PushRuleChange(RS_MOVEBEFORE, rule1, rule2); ]; [ MoveRuleAfter rule1 rule2; PushRuleChange(RS_MOVEAFTER, rule1, rule2); ]; ! (vi) This is the I6 printing rule used for a value of kind "rule", which ! is the I6 packed address of the rule's routine: #IFNDEF I7_ECONOMY; Array RulebookNames --> "Action-processing rulebook" ! 0 "Before rulebook" ! 1 "Instead rulebook" ! 2 "After rulebook" ! 3 "Procedural rulebook" ! 4 "Accessibility rulebook" ! 5 "Action-specific rulebook" ! 6 "Carry out rulebook" ! 7 "General report rulebook" ! 8 "Turn sequence rulebook" ! 9 "Reaching inside rulebook" ! 10 "Reaching outside rulebook" ! 11 "General before rulebook" ! 12 "Actor-specific before rulebook" ! 13 "Location-specific before rulebook" ! 14 "Reaction before rulebook" ! 15 "Object-specific before rulebook" ! 16 "General after rulebook" ! 17 "Actor-specific after rulebook" ! 18 "Location-specific after rulebook" ! 19 "Reaction after rulebook" ! 20 "Object-specific after rulebook" ! 21 "When play begins rulebook" ! 22 "When play ends rulebook" ! 23 "Every turn rulebook" ! 24 "Check rulebook" ! 25 "Report rulebook" ! 26 "Persuasion rulebook" ! 27 "Unsuccessful attempt by rulebook" ! 28 "Visibility rulebook" ! 29 "Scene changing rulebook" ! 30 "before Printing the name rulebook" ! 31 "for Printing the name rulebook" ! 32 "after Printing the name rulebook" ! 33 "before Listing contents rulebook" ! 34 "for Listing contents rulebook" ! 35 "after Listing contents rulebook" ! 36 "before Grouping together rulebook" ! 37 "for Grouping together rulebook" ! 38 "after Grouping together rulebook" ! 39 "before Constructing the status line rulebook" ! 40 "for Constructing the status line rulebook" ! 41 "after Constructing the status line rulebook" ! 42 "before Listing nondescript items rulebook" ! 43 "for Listing nondescript items rulebook" ! 44 "after Listing nondescript items rulebook" ! 45 "before Deciding the scope rulebook" ! 46 "for Deciding the scope rulebook" ! 47 "after Deciding the scope rulebook" ! 48 "before Supplying a missing noun rulebook" ! 49 "for Supplying a missing noun rulebook" ! 50 "after Supplying a missing noun rulebook" ! 51 "before Supplying a missing second noun rulebook" ! 52 "for Supplying a missing second noun rulebook" ! 53 "after Supplying a missing second noun rulebook" ! 54 "before Reading a command rulebook" ! 55 "for Reading a command rulebook" ! 56 "after Reading a command rulebook" ! 57 "before Deciding whether all includes rulebook" ! 58 "for Deciding whether all includes rulebook" ! 59 "after Deciding whether all includes rulebook" ! 60 "before Printing the player's obituary rulebook" ! 61 "for Printing the player's obituary rulebook" ! 62 "after Printing the player's obituary rulebook" ! 63 "before Amusing a victorious player rulebook" ! 64 "for Amusing a victorious player rulebook" ! 65 "after Amusing a victorious player rulebook" ! 66 "before Printing the banner text rulebook" ! 67 "for Printing the banner text rulebook" ! 68 "after Printing the banner text rulebook" ! 69 "before Printing the plural name rulebook" ! 70 "for Printing the plural name rulebook" ! 71 "after Printing the plural name rulebook" ! 72 "before Deciding the concealed possessions rulebook" ! 73 "for Deciding the concealed possessions rulebook" ! 74 "after Deciding the concealed possessions rulebook" ! 75 "before Printing a refusal to act in the dark rulebook" ! 76 "for Printing a refusal to act in the dark rulebook" ! 77 "after Printing a refusal to act in the dark rulebook" ! 78 "before Printing the announcement of darkness rulebook" ! 79 "for Printing the announcement of darkness rulebook" ! 80 "after Printing the announcement of darkness rulebook" ! 81 "before Printing the name of a dark room rulebook" ! 82 "for Printing the name of a dark room rulebook" ! 83 "after Printing the name of a dark room rulebook" ! 84 "before Printing the description of a dark room rulebook" ! 85 "for Printing the description of a dark room rulebook" ! 86 "after Printing the description of a dark room rulebook" ! 87 "before Printing room description details rulebook" ! 88 "for Printing room description details rulebook" ! 89 "after Printing room description details rulebook" ! 90 "before Printing a parser error rulebook" ! 91 "for Printing a parser error rulebook" ! 92 "after Printing a parser error rulebook" ! 93 "before Implicitly taking rulebook" ! 94 "for Implicitly taking rulebook" ! 95 "after Implicitly taking rulebook" ! 96 "before Starting the virtual machine rulebook" ! 97 "for Starting the virtual machine rulebook" ! 98 "after Starting the virtual machine rulebook" ! 99 "before Writing a paragraph about rulebook" ! 100 "for Writing a paragraph about rulebook" ! 101 "after Writing a paragraph about rulebook" ! 102 "check Taking inventory rulebook" ! 103 "carry out Taking inventory rulebook" ! 104 "report Taking inventory rulebook" ! 105 "check Taking rulebook" ! 106 "carry out Taking rulebook" ! 107 "report Taking rulebook" ! 108 "check Removing it from rulebook" ! 109 "carry out Removing it from rulebook" ! 110 "report Removing it from rulebook" ! 111 "check Dropping rulebook" ! 112 "carry out Dropping rulebook" ! 113 "report Dropping rulebook" ! 114 "check Putting it on rulebook" ! 115 "carry out Putting it on rulebook" ! 116 "report Putting it on rulebook" ! 117 "check Inserting it into rulebook" ! 118 "carry out Inserting it into rulebook" ! 119 "report Inserting it into rulebook" ! 120 "check Waiting rulebook" ! 121 "carry out Waiting rulebook" ! 122 "report Waiting rulebook" ! 123 "check Going rulebook" ! 124 "carry out Going rulebook" ! 125 "report Going rulebook" ! 126 "check Entering rulebook" ! 127 "carry out Entering rulebook" ! 128 "report Entering rulebook" ! 129 "check Exiting rulebook" ! 130 "carry out Exiting rulebook" ! 131 "report Exiting rulebook" ! 132 "check Getting off rulebook" ! 133 "carry out Getting off rulebook" ! 134 "report Getting off rulebook" ! 135 "check Looking rulebook" ! 136 "carry out Looking rulebook" ! 137 "report Looking rulebook" ! 138 "check Examining rulebook" ! 139 "carry out Examining rulebook" ! 140 "report Examining rulebook" ! 141 "check Looking under rulebook" ! 142 "carry out Looking under rulebook" ! 143 "report Looking under rulebook" ! 144 "check Searching rulebook" ! 145 "carry out Searching rulebook" ! 146 "report Searching rulebook" ! 147 "check Consulting it about rulebook" ! 148 "carry out Consulting it about rulebook" ! 149 "report Consulting it about rulebook" ! 150 "check Locking it with rulebook" ! 151 "carry out Locking it with rulebook" ! 152 "report Locking it with rulebook" ! 153 "check Unlocking it with rulebook" ! 154 "carry out Unlocking it with rulebook" ! 155 "report Unlocking it with rulebook" ! 156 "check Switching on rulebook" ! 157 "carry out Switching on rulebook" ! 158 "report Switching on rulebook" ! 159 "check Switching off rulebook" ! 160 "carry out Switching off rulebook" ! 161 "report Switching off rulebook" ! 162 "check Opening rulebook" ! 163 "carry out Opening rulebook" ! 164 "report Opening rulebook" ! 165 "check Closing rulebook" ! 166 "carry out Closing rulebook" ! 167 "report Closing rulebook" ! 168 "check Wearing rulebook" ! 169 "carry out Wearing rulebook" ! 170 "report Wearing rulebook" ! 171 "check Taking off rulebook" ! 172 "carry out Taking off rulebook" ! 173 "report Taking off rulebook" ! 174 "check Eating rulebook" ! 175 "carry out Eating rulebook" ! 176 "report Eating rulebook" ! 177 "check Giving it to rulebook" ! 178 "carry out Giving it to rulebook" ! 179 "report Giving it to rulebook" ! 180 "check Showing it to rulebook" ! 181 "carry out Showing it to rulebook" ! 182 "report Showing it to rulebook" ! 183 "check Waking rulebook" ! 184 "carry out Waking rulebook" ! 185 "report Waking rulebook" ! 186 "check Throwing it at rulebook" ! 187 "carry out Throwing it at rulebook" ! 188 "report Throwing it at rulebook" ! 189 "check Attacking rulebook" ! 190 "carry out Attacking rulebook" ! 191 "report Attacking rulebook" ! 192 "check Kissing rulebook" ! 193 "carry out Kissing rulebook" ! 194 "report Kissing rulebook" ! 195 "check Answering it that rulebook" ! 196 "carry out Answering it that rulebook" ! 197 "report Answering it that rulebook" ! 198 "check Telling it about rulebook" ! 199 "carry out Telling it about rulebook" ! 200 "report Telling it about rulebook" ! 201 "check Asking it about rulebook" ! 202 "carry out Asking it about rulebook" ! 203 "report Asking it about rulebook" ! 204 "check Asking it for rulebook" ! 205 "carry out Asking it for rulebook" ! 206 "report Asking it for rulebook" ! 207 "check Touching rulebook" ! 208 "carry out Touching rulebook" ! 209 "report Touching rulebook" ! 210 "check Waving rulebook" ! 211 "carry out Waving rulebook" ! 212 "report Waving rulebook" ! 213 "check Pulling rulebook" ! 214 "carry out Pulling rulebook" ! 215 "report Pulling rulebook" ! 216 "check Pushing rulebook" ! 217 "carry out Pushing rulebook" ! 218 "report Pushing rulebook" ! 219 "check Turning rulebook" ! 220 "carry out Turning rulebook" ! 221 "report Turning rulebook" ! 222 "check Pushing it to rulebook" ! 223 "carry out Pushing it to rulebook" ! 224 "report Pushing it to rulebook" ! 225 "check Squeezing rulebook" ! 226 "carry out Squeezing rulebook" ! 227 "report Squeezing rulebook" ! 228 "check Saying yes rulebook" ! 229 "carry out Saying yes rulebook" ! 230 "report Saying yes rulebook" ! 231 "check Saying no rulebook" ! 232 "carry out Saying no rulebook" ! 233 "report Saying no rulebook" ! 234 "check Burning rulebook" ! 235 "carry out Burning rulebook" ! 236 "report Burning rulebook" ! 237 "check Waking up rulebook" ! 238 "carry out Waking up rulebook" ! 239 "report Waking up rulebook" ! 240 "check Thinking rulebook" ! 241 "carry out Thinking rulebook" ! 242 "report Thinking rulebook" ! 243 "check Smelling rulebook" ! 244 "carry out Smelling rulebook" ! 245 "report Smelling rulebook" ! 246 "check Listening to rulebook" ! 247 "carry out Listening to rulebook" ! 248 "report Listening to rulebook" ! 249 "check Tasting rulebook" ! 250 "carry out Tasting rulebook" ! 251 "report Tasting rulebook" ! 252 "check Cutting rulebook" ! 253 "carry out Cutting rulebook" ! 254 "report Cutting rulebook" ! 255 "check Jumping rulebook" ! 256 "carry out Jumping rulebook" ! 257 "report Jumping rulebook" ! 258 "check Tying it to rulebook" ! 259 "carry out Tying it to rulebook" ! 260 "report Tying it to rulebook" ! 261 "check Drinking rulebook" ! 262 "carry out Drinking rulebook" ! 263 "report Drinking rulebook" ! 264 "check Saying sorry rulebook" ! 265 "carry out Saying sorry rulebook" ! 266 "report Saying sorry rulebook" ! 267 "check Swearing obscenely rulebook" ! 268 "carry out Swearing obscenely rulebook" ! 269 "report Swearing obscenely rulebook" ! 270 "check Swearing mildly rulebook" ! 271 "carry out Swearing mildly rulebook" ! 272 "report Swearing mildly rulebook" ! 273 "check Swinging rulebook" ! 274 "carry out Swinging rulebook" ! 275 "report Swinging rulebook" ! 276 "check Rubbing rulebook" ! 277 "carry out Rubbing rulebook" ! 278 "report Rubbing rulebook" ! 279 "check Setting it to rulebook" ! 280 "carry out Setting it to rulebook" ! 281 "report Setting it to rulebook" ! 282 "check Waving hands rulebook" ! 283 "carry out Waving hands rulebook" ! 284 "report Waving hands rulebook" ! 285 "check Buying rulebook" ! 286 "carry out Buying rulebook" ! 287 "report Buying rulebook" ! 288 "check Singing rulebook" ! 289 "carry out Singing rulebook" ! 290 "report Singing rulebook" ! 291 "check Climbing rulebook" ! 292 "carry out Climbing rulebook" ! 293 "report Climbing rulebook" ! 294 "check Sleeping rulebook" ! 295 "carry out Sleeping rulebook" ! 296 "report Sleeping rulebook" ! 297 "check Requesting the score rulebook" ! 298 "carry out Requesting the score rulebook" ! 299 "report Requesting the score rulebook" ! 300 "check Quitting the game rulebook" ! 301 "carry out Quitting the game rulebook" ! 302 "report Quitting the game rulebook" ! 303 "check Saving the game rulebook" ! 304 "carry out Saving the game rulebook" ! 305 "report Saving the game rulebook" ! 306 "check Restoring the game rulebook" ! 307 "carry out Restoring the game rulebook" ! 308 "report Restoring the game rulebook" ! 309 "check Restarting the game rulebook" ! 310 "carry out Restarting the game rulebook" ! 311 "report Restarting the game rulebook" ! 312 "check Verifying the story file rulebook" ! 313 "carry out Verifying the story file rulebook" ! 314 "report Verifying the story file rulebook" ! 315 "check Requesting the story file version rulebook" ! 316 "carry out Requesting the story file version rulebook" ! 317 "report Requesting the story file version rulebook" ! 318 "check Switching the story transcript on rulebook" ! 319 "carry out Switching the story transcript on rulebook" ! 320 "report Switching the story transcript on rulebook" ! 321 "check Switching the story transcript off rulebook" ! 322 "carry out Switching the story transcript off rulebook" ! 323 "report Switching the story transcript off rulebook" ! 324 "check Preferring abbreviated room descriptions rulebook" ! 325 "carry out Preferring abbreviated room descriptions rulebook" ! 326 "report Preferring abbreviated room descriptions rulebook" ! 327 "check Preferring unabbreviated room descriptions rulebook" ! 328 "carry out Preferring unabbreviated room descriptions rulebook" ! 329 "report Preferring unabbreviated room descriptions rulebook" ! 330 "check Preferring sometimes abbreviated room descriptions rulebook" ! 331 "carry out Preferring sometimes abbreviated room descriptions rulebook" ! 332 "report Preferring sometimes abbreviated room descriptions rulebook" ! 333 "check Requesting the pronoun meanings rulebook" ! 334 "carry out Requesting the pronoun meanings rulebook" ! 335 "report Requesting the pronoun meanings rulebook" ! 336 "check Switching score notification on rulebook" ! 337 "carry out Switching score notification on rulebook" ! 338 "report Switching score notification on rulebook" ! 339 "check Switching score notification off rulebook" ! 340 "carry out Switching score notification off rulebook" ! 341 "report Switching score notification off rulebook" ! 342 ; #ENDIF; ! I7_ECONOMY [ I7_RulePrintingRule R p1; #ifndef I7_ECONOMY; if ((R>=0) && (R<343)) { print (string) (RulebookNames-->R); } else { if (R == R_36) { print "ambient odour rule"; return; } ! 0, case 1 if (R == R_37) { print "ambient sound rule"; return; } ! 1, case 1 if (R == R_38) { print "block vaguely going rule"; return; } ! 2, case 1 if (R == InvSub_O1) { print "default inventory style rule"; return; } ! 109, case 1 if (R == InvSub_O2) { print "print empty inventory rule"; return; } ! 110, case 1 if (R == InvSub_O3) { print "print standard inventory rule"; return; } ! 111, case 1 if (R == InvSub_O4) { print "use inventory to set pronouns rule"; return; } ! 112, case 1 if (R == InvSub_R1) { print "report other people taking inventory rule"; return; } ! 113, case 1 if (R == TakeSub_C1) { print "avoid unnecessary implicit taking rule"; return; } ! 117, case 1 if (R == TakeSub_C2) { print "can't take yourself rule"; return; } ! 118, case 1 if (R == TakeSub_C3) { print "can't take other people rule"; return; } ! 119, case 1 if (R == OIUB_CP) { print "can't take component parts rule"; return; } ! 120, case 1 if (R == TakeSub_C4) { print "determine common ancestor for taking rule"; return; } ! 121, case 1 if (R == OIUB_AP) { print "can't take people's possessions rule"; return; } ! 122, case 1 if (R == TakeSub_C6) { print "can't take what you're inside rule"; return; } ! 123, case 1 if (R == TakeSub_C7) { print "can't take what's already taken rule"; return; } ! 124, case 1 if (R == TakeSub_C8) { print "check let-go-before rule"; return; } ! 125, case 1 if (R == TakeSub_C9) { print "can't take scenery rule"; return; } ! 126, case 1 if (R == TakeSub_C10) { print "can't take what's fixed in place rule"; return; } ! 127, case 1 if (R == TakeSub_C11) { print "use player's holdall to avoid exceeding carrying capacity rule"; return; } ! 128, case 1 if (R == TakeSub_C12) { print "can't exceed carrying capacity rule"; return; } ! 129, case 1 if (R == TakeSub_O1) { print "standard taking rule"; return; } ! 130, case 1 if (R == TakeSub_O2) { print "check let-go-after rule"; return; } ! 131, case 1 if (R == TakeSub_R1) { print "don't report successful implicit takes rule"; return; } ! 132, case 1 if (R == TakeSub_R2) { print "standard report taking rule"; return; } ! 133, case 1 if (R == OIUB_CP) { print "can't take component parts rule"; return; } ! 120, case 1 if (R == RemoveSub_C2) { print "can't remove what's not inside rule"; return; } ! 138, case 1 if (R == RemoveSub_C3) { print "can't remove from people rule"; return; } ! 139, case 1 if (R == RemoveSub_C4) { print "convert remove to take rule"; return; } ! 140, case 1 if (R == RemoveSub_C1) { print "can't remove from closed containers rule"; return; } ! 141, case 1 if (R == TakeSub_C2) { print "can't take yourself rule"; return; } ! 118, case 1 if (R == TakeSub_C3) { print "can't take other people rule"; return; } ! 119, case 1 if (R == TakeSub_C4) { print "determine common ancestor for taking rule"; return; } ! 121, case 1 if (R == OIUB_AP) { print "can't take people's possessions rule"; return; } ! 122, case 1 if (R == TakeSub_C6) { print "can't take what you're inside rule"; return; } ! 123, case 1 if (R == TakeSub_C7) { print "can't take what's already taken rule"; return; } ! 124, case 1 if (R == TakeSub_C8) { print "check let-go-before rule"; return; } ! 125, case 1 if (R == TakeSub_C9) { print "can't take scenery rule"; return; } ! 126, case 1 if (R == TakeSub_C10) { print "can't take what's fixed in place rule"; return; } ! 127, case 1 if (R == TakeSub_C11) { print "use player's holdall to avoid exceeding carrying capacity rule"; return; } ! 128, case 1 if (R == TakeSub_C12) { print "can't exceed carrying capacity rule"; return; } ! 129, case 1 if (R == TakeSub_O1) { print "standard taking rule"; return; } ! 130, case 1 if (R == RemoveSub_O2) { print "check after-rules for taking too rule"; return; } ! 154, case 1 if (R == RemoveSub_R1) { print "standard report removing rule"; return; } ! 155, case 1 if (R == DropSub_C1) { print "can't drop yourself rule"; return; } ! 159, case 1 if (R == DropSub_C2) { print "can't drop what's already dropped rule"; return; } ! 160, case 1 if (R == DropSub_C3) { print "can't drop what's not held rule"; return; } ! 161, case 1 if (R == DropSub_C4) { print "can't drop clothes being worn rule"; return; } ! 162, case 1 if (R == DropSub_C5) { print "can't drop if this exceeds carrying capacity rule"; return; } ! 163, case 1 if (R == DropSub_O1) { print "standard dropping rule"; return; } ! 164, case 1 if (R == DropSub_R1) { print "standard report dropping rule"; return; } ! 165, case 1 if (R == PutOnSub_C1) { print "convert put to drop where possible rule"; return; } ! 169, case 1 if (R == PutOnSub_C2) { print "can't put what's not held rule"; return; } ! 170, case 1 if (R == PutOnSub_C3) { print "can't put something on itself rule"; return; } ! 171, case 1 if (R == PutOnSub_C4) { print "check receive-before for supporter rule"; return; } ! 172, case 1 if (R == PutOnSub_C5) { print "can't put onto what's not a supporter rule"; return; } ! 173, case 1 if (R == PutOnSub_C6) { print "can't put onto something being carried rule"; return; } ! 174, case 1 if (R == PutOnSub_C7) { print "can't put clothes being worn rule"; return; } ! 175, case 1 if (R == PutOnSub_C8) { print "can't put if this exceeds carrying capacity rule"; return; } ! 176, case 1 if (R == PutOnSub_O1) { print "standard putting rule"; return; } ! 177, case 1 if (R == PutOnSub_O2) { print "check receive-after for supporter rule"; return; } ! 178, case 1 if (R == PutOnSub_R1) { print "standard report putting rule"; return; } ! 179, case 1 if (R == InsertSub_C1) { print "convert insert to drop where possible rule"; return; } ! 183, case 1 if (R == InsertSub_C2) { print "can't insert what's not held rule"; return; } ! 184, case 1 if (R == InsertSub_C3) { print "can't insert something into itself rule"; return; } ! 185, case 1 if (R == OIUB_CP) { print "can't insert component parts rule"; return; } ! 186, case 1 if (R == InsertSub_C4) { print "check receive-before for container rule"; return; } ! 187, case 1 if (R == InsertSub_C5) { print "can't insert into closed containers rule"; return; } ! 188, case 1 if (R == InsertSub_C6) { print "can't insert into what's not a container rule"; return; } ! 189, case 1 if (R == InsertSub_C7) { print "can't insert clothes being worn rule"; return; } ! 190, case 1 if (R == InsertSub_C8) { print "can't insert if this exceeds carrying capacity rule"; return; } ! 191, case 1 if (R == InsertSub_O1) { print "standard inserting rule"; return; } ! 192, case 1 if (R == InsertSub_O2) { print "check receive-after for container rule"; return; } ! 193, case 1 if (R == InsertSub_R1) { print "standard report inserting rule"; return; } ! 194, case 1 if (R == WaitSub_R1) { print "standard report waiting rule"; return; } ! 198, case 1 if (R == GoSub_C1) { print "set up going rule"; return; } ! 202, case 1 if (R == GoSub_C2) { print "check to see if in a vehicle rule"; return; } ! 203, case 1 if (R == GoSub_C3) { print "can't travel in what's not a vehicle rule"; return; } ! 204, case 1 if (R == GoSub_C4) { print "determine direction property rule"; return; } ! 205, case 1 if (R == GoSub_C5) { print "determine map connection rule"; return; } ! 206, case 1 if (R == GoSub_C6) { print "print textual map connections rule"; return; } ! 207, case 1 if (R == GoSub_C7) { print "consult routine map connections rule"; return; } ! 208, case 1 if (R == GoSub_C8) { print "can't go that way rule"; return; } ! 209, case 1 if (R == GoSub_C9) { print "can't go through concealed doors rule"; return; } ! 210, case 1 if (R == GoSub_C10) { print "can't go through closed doors rule"; return; } ! 211, case 1 if (R == GoSub_C11) { print "determine what's through door rule"; return; } ! 212, case 1 if (R == GoSub_O1) { print "move player and vehicle rule"; return; } ! 213, case 1 if (R == GoSub_O2) { print "move floating objects rule"; return; } ! 214, case 1 if (R == GoSub_O3) { print "check light in new location rule"; return; } ! 215, case 1 if (R == GoSub_R1) { print "describe room gone into rule"; return; } ! 216, case 1 if (R == EnterSub_C1) { print "convert enter door into go rule"; return; } ! 220, case 1 if (R == EnterSub_C2) { print "convert enter compass direction into go rule"; return; } ! 221, case 1 if (R == EnterSub_C3) { print "can't enter what's already entered rule"; return; } ! 222, case 1 if (R == EnterSub_C4) { print "can't enter what's not enterable rule"; return; } ! 223, case 1 if (R == EnterSub_C5) { print "can't enter closed containers rule"; return; } ! 224, case 1 if (R == EnterSub_C6) { print "determine common ancestor for entering rule"; return; } ! 225, case 1 if (R == EnterSub_C7) { print "can't enter something carried rule"; return; } ! 226, case 1 if (R == EnterSub_C8) { print "implicitly pass through other barriers rule"; return; } ! 227, case 1 if (R == EnterSub_O1) { print "standard entering rule"; return; } ! 228, case 1 if (R == EnterSub_R1) { print "standard report entering rule"; return; } ! 229, case 1 if (R == EnterSub_R2) { print "describe contents entered into rule"; return; } ! 230, case 1 if (R == ExitSub_C1) { print "convert exit into go out rule"; return; } ! 234, case 1 if (R == ExitSub_C2) { print "can't exit when not inside anything rule"; return; } ! 235, case 1 if (R == ExitSub_C3) { print "can't exit closed containers rule"; return; } ! 236, case 1 if (R == ExitSub_O1) { print "standard exiting rule"; return; } ! 237, case 1 if (R == ExitSub_R1) { print "standard report exiting rule"; return; } ! 238, case 1 if (R == ExitSub_R2) { print "describe room emerged into rule"; return; } ! 239, case 1 if (R == GetOffSub_C1) { print "convert get off to exit where possible rule"; return; } ! 243, case 1 if (R == GetOffSub_C2) { print "can't get off things rule"; return; } ! 244, case 1 if (R == LookSub_O1) { print "determine visibility ceiling rule"; return; } ! 248, case 1 if (R == LookSub_O2) { print "room description heading rule"; return; } ! 249, case 1 if (R == LookSub_O3) { print "room description body text rule"; return; } ! 250, case 1 if (R == LookSub_O4) { print "room description paragraphs about objects rule"; return; } ! 251, case 1 if (R == LookSub_O5) { print "consult LookRoutine entry point rule"; return; } ! 252, case 1 if (R == LookSub_O6) { print "check new arrival rule"; return; } ! 253, case 1 if (R == LookSub_R1) { print "report other people looking rule"; return; } ! 254, case 1 if (R == ExamineSub_O1) { print "examine undescribed containers rule"; return; } ! 258, case 1 if (R == ExamineSub_O2) { print "examine undescribed devices rule"; return; } ! 259, case 1 if (R == ExamineSub_O3) { print "examine undescribed things rule"; return; } ! 260, case 1 if (R == ExamineSub_O4) { print "standard examining rule"; return; } ! 261, case 1 if (R == ExamineSub_O5) { print "examine described devices rule"; return; } ! 262, case 1 if (R == ExamineSub_R1) { print "report other people examining rule"; return; } ! 263, case 1 if (R == LookUnderSub_O1) { print "standard looking under rule"; return; } ! 267, case 1 if (R == LookUnderSub_R1) { print "report other people looking under rule"; return; } ! 268, case 1 if (R == SearchSub_C1) { print "can't search unless container or supporter rule"; return; } ! 272, case 1 if (R == SearchSub_C2) { print "can't search closed opaque containers rule"; return; } ! 273, case 1 if (R == SearchSub_O1) { print "standard searching rule"; return; } ! 274, case 1 if (R == SearchSub_R1) { print "standard search containers rule"; return; } ! 275, case 1 if (R == SearchSub_R2) { print "standard search supporters rule"; return; } ! 276, case 1 if (R == SearchSub_R3) { print "report other people searching rule"; return; } ! 277, case 1 if (R == ConsultSub_C1) { print "block consulting rule"; return; } ! 281, case 1 if (R == LockSub_C1) { print "can't lock without a lock rule"; return; } ! 285, case 1 if (R == LockSub_C2) { print "can't lock what's already locked rule"; return; } ! 286, case 1 if (R == LockSub_C3) { print "can't lock what's open rule"; return; } ! 287, case 1 if (R == LockSub_C4) { print "can't lock without the correct key rule"; return; } ! 288, case 1 if (R == LockSub_O1) { print "standard locking rule"; return; } ! 289, case 1 if (R == LockSub_R1) { print "standard report locking rule"; return; } ! 290, case 1 if (R == UnlockSub_C1) { print "can't unlock without a lock rule"; return; } ! 294, case 1 if (R == UnlockSub_C2) { print "can't unlock what's already unlocked rule"; return; } ! 295, case 1 if (R == UnlockSub_C3) { print "can't unlock without the correct key rule"; return; } ! 296, case 1 if (R == UnlockSub_O1) { print "standard unlocking rule"; return; } ! 297, case 1 if (R == UnlockSub_R1) { print "standard report unlocking rule"; return; } ! 298, case 1 if (R == SwitchOnSub_C1) { print "can't switch on unless switchable rule"; return; } ! 302, case 1 if (R == SwitchOnSub_C2) { print "can't switch on what's already on rule"; return; } ! 303, case 1 if (R == SwitchOnSub_O1) { print "standard switching on rule"; return; } ! 304, case 1 if (R == SwitchOnSub_R1) { print "standard report switching on rule"; return; } ! 305, case 1 if (R == SwitchOffSub_C1) { print "can't switch off unless switchable rule"; return; } ! 309, case 1 if (R == SwitchOffSub_C2) { print "can't switch off what's already off rule"; return; } ! 310, case 1 if (R == SwitchOffSub_O1) { print "standard switching off rule"; return; } ! 311, case 1 if (R == SwitchOffSub_R1) { print "standard report switching off rule"; return; } ! 312, case 1 if (R == OpenSub_C1) { print "can't open unless openable rule"; return; } ! 316, case 1 if (R == OpenSub_C2) { print "can't open what's locked rule"; return; } ! 317, case 1 if (R == OpenSub_C3) { print "can't open what's already open rule"; return; } ! 318, case 1 if (R == OpenSub_O1) { print "standard opening rule"; return; } ! 319, case 1 if (R == OpenSub_R1) { print "reveal any newly visible exterior rule"; return; } ! 320, case 1 if (R == OpenSub_R2) { print "standard report opening rule"; return; } ! 321, case 1 if (R == CloseSub_C1) { print "can't close unless openable rule"; return; } ! 325, case 1 if (R == CloseSub_C2) { print "can't close what's already closed rule"; return; } ! 326, case 1 if (R == CloseSub_O1) { print "standard closing rule"; return; } ! 327, case 1 if (R == CloseSub_R1) { print "standard report closing rule"; return; } ! 328, case 1 if (R == WearSub_C1) { print "can't wear what's not clothing rule"; return; } ! 332, case 1 if (R == WearSub_C2) { print "can't wear what's not held rule"; return; } ! 333, case 1 if (R == WearSub_C3) { print "can't wear what's already worn rule"; return; } ! 334, case 1 if (R == WearSub_O1) { print "standard wearing rule"; return; } ! 335, case 1 if (R == WearSub_R1) { print "standard report wearing rule"; return; } ! 336, case 1 if (R == DisrobeSub_C1) { print "can't take off what's not worn rule"; return; } ! 340, case 1 if (R == DisrobeSub_O1) { print "standard taking off rule"; return; } ! 341, case 1 if (R == DisrobeSub_R1) { print "standard report taking off rule"; return; } ! 342, case 1 if (R == EatSub_C1) { print "can't eat unless edible rule"; return; } ! 346, case 1 if (R == EatSub_C2) { print "can't eat clothing without removing it first rule"; return; } ! 347, case 1 if (R == EatSub_O1) { print "standard eating rule"; return; } ! 348, case 1 if (R == EatSub_R1) { print "standard report eating rule"; return; } ! 349, case 1 if (R == GiveSub_C1) { print "can't give what you haven't got rule"; return; } ! 353, case 1 if (R == GiveSub_C2) { print "can't give to yourself rule"; return; } ! 354, case 1 if (R == GiveSub_C3) { print "can't give to a non-person rule"; return; } ! 355, case 1 if (R == GiveSub_C4) { print "check life property for giving rule"; return; } ! 356, case 1 if (R == GiveSub_C5) { print "block giving rule"; return; } ! 357, case 1 if (R == GiveSub_O1) { print "standard giving rule"; return; } ! 358, case 1 if (R == GiveSub_R1) { print "standard report giving rule"; return; } ! 359, case 1 if (R == ShowSub_C1) { print "can't show what you haven't got rule"; return; } ! 363, case 1 if (R == ShowSub_C2) { print "convert show to yourself to examine rule"; return; } ! 364, case 1 if (R == ShowSub_C3) { print "check life property for showing rule"; return; } ! 365, case 1 if (R == ShowSub_C4) { print "block showing rule"; return; } ! 366, case 1 if (R == WakeOtherSub_C1) { print "check life property for waking rule"; return; } ! 370, case 1 if (R == WakeOtherSub_C2) { print "block waking rule"; return; } ! 371, case 1 if (R == ThrowAtSub_C1) { print "check thrown-at rule"; return; } ! 375, case 1 if (R == ThrowAtSub_C2) { print "implicitly remove thrown clothing rule"; return; } ! 376, case 1 if (R == ThrowAtSub_C3) { print "futile to throw things at inanimate objects rule"; return; } ! 377, case 1 if (R == ThrowAtSub_C4) { print "check life property for throwing at rule"; return; } ! 378, case 1 if (R == ThrowAtSub_C5) { print "block throwing at rule"; return; } ! 379, case 1 if (R == AttackSub_C1) { print "check life property for attacking rule"; return; } ! 383, case 1 if (R == AttackSub_C2) { print "block attacking rule"; return; } ! 384, case 1 if (R == KissSub_C1) { print "kissing yourself rule"; return; } ! 388, case 1 if (R == KissSub_C2) { print "check life property for kissing rule"; return; } ! 389, case 1 if (R == KissSub_C3) { print "block kissing rule"; return; } ! 390, case 1 if (R == AnswerSub_C1) { print "check life property for answering rule"; return; } ! 394, case 1 if (R == AnswerSub_C2) { print "block answering rule"; return; } ! 395, case 1 if (R == TellSub_C1) { print "telling yourself rule"; return; } ! 399, case 1 if (R == TellSub_C2) { print "check life property for telling rule"; return; } ! 400, case 1 if (R == TellSub_C3) { print "block telling rule"; return; } ! 401, case 1 if (R == AskSub_C1) { print "check life property for asking rule"; return; } ! 405, case 1 if (R == AskSub_C2) { print "block asking rule"; return; } ! 406, case 1 if (R == AskForSub_C1) { print "asking yourself for something rule"; return; } ! 410, case 1 if (R == AskForSub_C2) { print "translate asking for to giving rule"; return; } ! 411, case 1 if (R == TouchSub_R1) { print "report touching yourself rule"; return; } ! 415, case 1 if (R == TouchSub_R2) { print "report touching other people rule"; return; } ! 416, case 1 if (R == TouchSub_R3) { print "report touching things rule"; return; } ! 417, case 1 if (R == WaveSub_C1) { print "can't wave what's not held rule"; return; } ! 421, case 1 if (R == WaveSub_R1) { print "report waving things rule"; return; } ! 422, case 1 if (R == PullSub_C1) { print "can't pull what's fixed in place rule"; return; } ! 426, case 1 if (R == PullSub_C2) { print "can't pull scenery rule"; return; } ! 427, case 1 if (R == PullSub_C3) { print "can't pull people rule"; return; } ! 428, case 1 if (R == PullSub_R1) { print "report pulling rule"; return; } ! 429, case 1 if (R == PushSub_C1) { print "can't push what's fixed in place rule"; return; } ! 433, case 1 if (R == PushSub_C2) { print "can't push scenery rule"; return; } ! 434, case 1 if (R == PushSub_C3) { print "can't push people rule"; return; } ! 435, case 1 if (R == PushSub_R1) { print "report pushing rule"; return; } ! 436, case 1 if (R == TurnSub_C1) { print "can't turn what's fixed in place rule"; return; } ! 440, case 1 if (R == TurnSub_C2) { print "can't turn scenery rule"; return; } ! 441, case 1 if (R == TurnSub_C3) { print "can't turn people rule"; return; } ! 442, case 1 if (R == TurnSub_R1) { print "report turning rule"; return; } ! 443, case 1 if (R == PushDirSub_C1) { print "block pushing in directions rule"; return; } ! 447, case 1 if (R == SqueezeSub_C1) { print "innuendo about squeezing people rule"; return; } ! 451, case 1 if (R == SqueezeSub_R1) { print "report squeezing rule"; return; } ! 452, case 1 if (R == YesSub_C1) { print "block saying yes rule"; return; } ! 456, case 1 if (R == NoSub_C1) { print "block saying no rule"; return; } ! 460, case 1 if (R == BurnSub_C1) { print "block burning rule"; return; } ! 464, case 1 if (R == WakeSub_C1) { print "block waking up rule"; return; } ! 468, case 1 if (R == ThinkSub_C1) { print "block thinking rule"; return; } ! 472, case 1 if (R == SmellSub_C1) { print "block smelling rule"; return; } ! 476, case 1 if (R == ListenSub_C1) { print "block listening rule"; return; } ! 480, case 1 if (R == TasteSub_C1) { print "block tasting rule"; return; } ! 484, case 1 if (R == CutSub_C1) { print "block cutting rule"; return; } ! 488, case 1 if (R == JumpSub_C1) { print "block jumping rule"; return; } ! 492, case 1 if (R == TieSub_C1) { print "block tying rule"; return; } ! 496, case 1 if (R == DrinkSub_C1) { print "block drinking rule"; return; } ! 500, case 1 if (R == SorrySub_C1) { print "block saying sorry rule"; return; } ! 504, case 1 if (R == StrongSub_C1) { print "block swearing obscenely rule"; return; } ! 508, case 1 if (R == MildSub_C1) { print "block swearing mildly rule"; return; } ! 512, case 1 if (R == SwingSub_C1) { print "block swinging rule"; return; } ! 516, case 1 if (R == RubSub_C1) { print "block rubbing rule"; return; } ! 520, case 1 if (R == SetToSub_C1) { print "block setting to rule"; return; } ! 524, case 1 if (R == WaveHandsSub_C1) { print "block waving hands rule"; return; } ! 528, case 1 if (R == BuySub_C1) { print "block buying rule"; return; } ! 532, case 1 if (R == SingSub_C1) { print "block singing rule"; return; } ! 536, case 1 if (R == ClimbSub_C1) { print "block climbing rule"; return; } ! 540, case 1 if (R == SleepSub_C1) { print "block sleeping rule"; return; } ! 544, case 1 if (R == ScoreSub_O1) { print "announce the score rule"; return; } ! 548, case 1 if (R == QuitSub_O1) { print "quit the game rule"; return; } ! 552, case 1 if (R == SaveSub_O1) { print "save the game rule"; return; } ! 556, case 1 if (R == RestoreSub_O1) { print "restore the game rule"; return; } ! 560, case 1 if (R == RestartSub_O1) { print "restart the game rule"; return; } ! 564, case 1 if (R == VerifySub_O1) { print "verify the story file rule"; return; } ! 568, case 1 if (R == VersionSub_O1) { print "announce the story file version rule"; return; } ! 572, case 1 if (R == ScriptOnSub_O1) { print "switch the story transcript on rule"; return; } ! 576, case 1 if (R == ScriptOffSub_O1) { print "switch the story transcript off rule"; return; } ! 580, case 1 if (R == LMode3Sub_O1) { print "prefer abbreviated room descriptions rule"; return; } ! 584, case 1 if (R == LMode2Sub_O1) { print "prefer unabbreviated room descriptions rule"; return; } ! 588, case 1 if (R == LMode1Sub_O1) { print "prefer sometimes abbreviated room descriptions rule"; return; } ! 592, case 1 if (R == PronounsSub_O1) { print "announce the pronoun meanings rule"; return; } ! 596, case 1 if (R == NotifyOnSub_O1) { print "switch score notification on rule"; return; } ! 600, case 1 if (R == NotifyOffSub_O1) { print "switch score notification off rule"; return; } ! 604, case 1 if (R == TS1_R) { print "advance time rule"; return; } ! 605, case 1 if (R == TS2_R) { print "timers and daemons rule"; return; } ! 606, case 1 if (R == TS3_R) { print "each turn properties rule"; return; } ! 607, case 1 if (R == TS4_R) { print "time passes rule"; return; } ! 608, case 1 if (R == TS5_R) { print "adjust light rule"; return; } ! 609, case 1 if (R == TS6_R) { print "note object acquisitions rule"; return; } ! 610, case 1 if (R == ProcessI7Timers) { print "timed events rule"; return; } ! 611, case 1 if (R == I7_NPCA) { print "non-player character action rule"; return; } ! 612, case 1 if (R == OIU_Scoped) { print "access to scoped objects rule"; return; } ! 613, case 1 if (R == OIU_Barrier) { print "access through barriers rule"; return; } ! 614, case 1 if (R == OIUB_CCI) { print "can't reach inside closed containers rule"; return; } ! 615, case 1 if (R == OIUB_CCO) { print "can't reach outside closed containers rule"; return; } ! 616, case 1 if (R == OIUB_RI) { print "can't reach inside rooms rule"; return; } ! 617, case 1 if (R == PA_R) { print "basic accessibility rule"; return; } ! 618, case 1 if (R == CR_R) { print "carrying requirements rule"; return; } ! 619, case 1 if (R == CSITDR) { print "can't act in the dark rule"; return; } ! 620, case 1 if (R == OBIT_HEAD) { print "print obituary headline rule"; return; } ! 621, case 1 if (R == OBIT_FINAL) { print "print final score rule"; return; } ! 622, case 1 if (R == OBIT_DISP) { print "display final status line rule"; return; } ! 623, case 1 if (R == R_9) { print "first when play begins rule"; return; } ! 624, case 2 if (R == R_10) { print "first turn sequence rule"; return; } ! 625, case 2 if (R == R_11) { print "last turn sequence rule"; return; } ! 626, case 2 if (R == R_12) { print "last scene changing rule"; return; } ! 627, case 2 if (R == R_13) { print "first accessibility rule"; return; } ! 628, case 2 if (R == R_14) { print "last accessibility rule"; return; } ! 629, case 2 if (R == R_15) { print "last reaching inside rule"; return; } ! 630, case 2 if (R == R_16) { print "last reaching outside rule"; return; } ! 631, case 2 if (R == R_17) { print "last visibility rule"; return; } ! 632, case 2 if (R == R_18) { print "last general before rule"; return; } ! 633, case 2 if (R == R_19) { print "last actor-specific before rule"; return; } ! 634, case 2 if (R == R_20) { print "last location-specific before rule"; return; } ! 635, case 2 if (R == R_21) { print "last reaction before rule"; return; } ! 636, case 2 if (R == R_22) { print "last object-specific before rule"; return; } ! 637, case 2 if (R == R_23) { print "first general after rule"; return; } ! 638, case 2 if (R == R_24) { print "first location-specific after rule"; return; } ! 639, case 2 if (R == R_25) { print "first reaction after rule"; return; } ! 640, case 2 if (R == R_26) { print "first object-specific after rule"; return; } ! 641, case 2 if (R == R_27) { print "first action-processing rule"; return; } ! 642, case 2 if (R == R_28) { print "last action-processing rule"; return; } ! 643, case 2 if (R == R_29) { print "last before rule"; return; } ! 644, case 2 if (R == R_30) { print "last action-specific rule"; return; } ! 645, case 2 if (R == R_31) { print "first after rule"; return; } ! 646, case 2 if (R == R_32) { print "last for printing the name rule"; return; } ! 647, case 2 if (R == R_33) { print "last for listing contents rule"; return; } ! 648, case 2 if (R == R_34) { print "last for printing the player's obituary rule"; return; } ! 649, case 2 if (R == R_35) { print "Before printing the name of a thing ( called XXXX )"; return; } ! 650, case 2 if (R == R_310) { print "Instead of examining the amulet for the third time"; return; } ! 651, case 2 if (R == R_311) { print "Instead of examining the amulet for the fourth time"; return; } ! 652, case 2 if (R == R_312) { print "Instead of showing the amulet to a player-character ( called the posessed )"; return; } ! 653, case 2 if (R == R_313) { print "Instead of waiting in the Parking Lot"; return; } ! 654, case 2 if (R == R_314) { print "Instead of going nowhere from the Parking Lot"; return; } ! 655, case 2 if (R == R_315) { print "Before going to the foyer for the first time"; return; } ! 656, case 2 if (R == R_316) { print "Instead of going nowhere from the foyer"; return; } ! 657, case 2 if (R == R_317) { print "Instead of showing anything that is not the amulet to Bob when the player is not Bob"; return; } ! 658, case 2 if (R == R_318) { print "Instead of kissing Bob when the player is not Bob"; return; } ! 659, case 2 if (R == R_319) { print "Instead of examining the photographer"; return; } ! 660, case 2 if (R == R_320) { print "Instead of doing anything other than examining to the photographer"; return; } ! 661, case 2 if (R == R_321) { print "Instead of going nowhere from the waiting area"; return; } ! 662, case 2 if (R == R_322) { print "Every turn when in the waiting area and a random chance of 1 in 2 succeeds"; return; } ! 663, case 2 if (R == R_323) { print "Every turn"; return; } ! 664, case 2 if (R == TS1_R) { print "advance time rule"; return; } ! 665, case 1 if (R == TS2_R) { print "timers and daemons rule"; return; } ! 666, case 1 if (R == TS3_R) { print "each turn properties rule"; return; } ! 667, case 1 if (R == TS4_R) { print "time passes rule"; return; } ! 668, case 1 print "(nameless rule at address ", R, ")"; } #ifnot; if ((R>=0) && (R<343)) { print "(rulebook ", R, ")"; } else { print "(rule at address ", R, ")"; } #endif; ]; [ DebugRulebooks subs par i; spaces(2*process_rulebook_count); print "[", (I7_RulePrintingRule) subs; if (par) print " / on O", par; print "]^"; ]; ! (vii) Used from calls compiled in to NI-generated rules, printing a trace ! of which rules are executed: [ DB_Rule R blocked; if (R==0) return; print "@31[Rule ~", (I7_RulePrintingRule) R, "~ "; if (blocked == false) "applies.]"; "does not apply.]"; ]; ! End of Rulebooks.i6 ! Actions.i6 [ _I6_ActionPrimitive; #ifdef TARGET_ZCODE; indirect(#actions_table-->action); #ifnot; indirect(#actions_table-->(action+1)); #endif; ]; [ BeginActionProcessing; BeginFollowRulebook(); ]; [ EndActionProcessing; EndFollowRulebook(); ]; [ TestActionBitmap obj act i j k; if (obj == nothing) return ((ActionHappened->act) ~= 0); if (~~(obj provides action_bitmap)) rfalse; ! for (i=0; i<10; i++) print (obj.&action_bitmap)->i, " "; for (i=0, k=1; ii) { return ((((obj.&action_bitmap)->j) & k) ~= 0); } k = k*2; if (k == 256) { k = 1; j++; } } rfalse; ]; [ SetActionBitmap obj act i j k; for (i=0, k=1; ii) { if ((obj) && (obj provides action_bitmap)) { (obj.&action_bitmap)->0 = ((obj.&action_bitmap)->0) | 1; (obj.&action_bitmap)->j = ((obj.&action_bitmap)->j) | k; return; } ActionHappened->0 = (ActionHappened->0) | 1; ActionHappened->j = (ActionHappened->j) | k; } k = k*2; if (k == 256) { k = 1; j++; } } ]; Global trace_actions = 0; [ ActionsOnSub; trace_actions = 1; "Actions listing on."; ]; [ ActionsOffSub; trace_actions = 0; "Actions listing off."; ]; [ ActionPrimitive sa sn mf mt mb mth rv p1 p2 p3 p4 p5; sa = action; sn = noun; mf = move_from; mt = move_to; mb = move_by; mth = move_through; self = noun; if ((keep_silent == false) && (multiflag == false)) I7_DivideParagraph(); I7_action_deciding_rule = 0; if (action == ##Consult or ##Ask or ##Tell or ##NotUnderstood or ##Answer) { inp2 = 1; second = consult_from + 256*consult_words; parsed_number = 100*consult_from + consult_words; } ! DB_Action(actor, false, action, noun, second); ! print "Actor = ", (the) actor, "^"; ! print noun, "/", second, ";", inp1, "/", inp2, "^"; if (I7_VerifyNouns()) return; ! print noun, "/", second, ";", inp1, "/", inp2, "^"; if ((action == ##Go) && (noun)) { move_from = Room_Of(actor); move_to = nothing; move_by = nothing; move_through = nothing; if ((parent(actor) has container) && (parent(actor) has enterable)) move_by = parent(actor); if ((parent(actor) has supporter) && (parent(actor) has enterable)) move_by = parent(actor); if (noun in compass) { move_to = move_from.(noun.door_dir); } else { if (noun has door) move_to = noun; } if ((move_to ~= nothing) && (move_to has door)) { move_through = move_to; p1 = location; location = Room_Of(actor); move_to = move_to.door_to(); location = p1; } #IFDEF DEBUG; if ((debug_flag & 2 ~= 0)) { print "[Go with move_from = "; if (move_from) print (the) move_from; else print "nowhere"; print ", move_to = "; if (move_to) print (the) move_to; else print "nowhere"; print ", move_by = "; if (move_by) print (the) move_by; else print "nothing"; print ", move_through = "; if (move_through) print (the) move_through; else print "nothing"; print ", move_pushing = "; if (move_pushing) print (the) move_pushing; else print "nothing"; print "]^"; } #ENDIF; } #IFDEF DEBUG; if ((trace_actions) && (FindAction())) { print "["; p1=actor; p2=act_requester; p3=action; p4=noun; p5=second; DB_Action(p1,p2,p3,p4,p5); print "]^"; } SetString31(++debug_rule_nesting); #ENDIF; TrackActions(); BeginActionProcessing(); if (meta) { _I6_ActionPrimitive(); say__p = 1; } else ProcessRulebook(APROC_RB); rv = rulechange_stack-->rulechange_sp; #IFDEF DEBUG; SetString31(--debug_rule_nesting); if ((trace_actions) && (FindAction())) { print "["; DB_Action(p1,p2,p3,p4,p5); print " - "; switch (rv) { RS_SUCCEEDS: print "succeeded"; RS_FAILS: print "failed"; #IFNDEF I7_ECONOMY; if (I7_action_deciding_rule) print " the ", (I7_RulePrintingRule) I7_action_deciding_rule; #ENDIF; default: print "ended without result"; } print "]^"; } #ENDIF; if (rv == RS_SUCCEEDS) { SetActionBitmap(noun, action); if (action == ##Go) SetActionBitmap(location, ##Enter); } EndActionProcessing(); move_from = mf; move_to = mt; action = sa; noun = sn; move_by = mb; move_through = mth; TrackActions(1); if ((keep_silent == false) && (multiflag == false)) I7_DivideParagraph(); if (rv == RS_SUCCEEDS) rtrue; rfalse; ]; [ DA_Name n; print (name) n; ]; [ DA_Topic ignore a b c d i; print "~"; for (a=consult_from:di; } if (d0) { if (fa == ActionData-->t) return t; t = t+9; } rfalse; ]; [ DB_Action ac acr act n s t l j v c; if (debug_rule_nesting > 0) print "(", debug_rule_nesting, ") "; if (ac ~= player) { if (acr) print "asking ", (the) ac, " to try "; else print (the) ac, " trying "; } t = 1; while (t <= ActionData-->0) { if (act == ActionData-->t) { l = t+9; t = t+4; while ((v = ActionData-->t) ~= I6_NULL) { if (v ofclass Routine) { if (c==0) { (v)(n); } else { (v)(s); } c++; } else print (string) v; t++; if (t == l) break; if (ActionData-->t ~= I6_NULL) print " "; } if (keep_silent) print " - silently"; return; } t = t+9; } ]; [ I7_TryAction req by ac n s; @push actor; @push act_requester; @push inp1; @push inp2; actor = by; if (req) act_requester = player; else act_requester = 0; ! print inp1, inp2, "^"; by = FindAction(ac); if (by) { if (ActionData-->(by+2) == I7_OBJECT_TY) inp1 = n; else inp1 = 1; if (ActionData-->(by+3) == I7_OBJECT_TY) inp2 = s; else inp2 = 1; } ! print "Made by ITA: ", inp1, inp2, "^"; InformLibrary.begin_action(ac, n, s); ! <(ac) n s>; ! print inp1, inp2, "^"; @pull inp2; @pull inp1; @pull act_requester; @pull actor; TrackActions(1); ]; [ I7_NPCA s; if ((actor == player) || (act_requester == nothing)) rfalse; s = say__p; say__p = FALSE; ProcessRulebook(PERSUADE_RB); if (rulechange_stack-->rulechange_sp ~= RS_SUCCEEDS) { if (say__p == FALSE) L__M(##Order, 1, actor); RulebookFails(); rtrue; } say__p = s; rfalse; ]; [ I7_VerifyNouns mask noun_subtype second_subtype at; at = FindAction(); if (at == 0) rfalse; mask = ActionData-->(at+1); noun_subtype = ActionData-->(at+2); if (mask & $$100000) { meta = 1; rfalse; } second_subtype = ActionData-->(at+3); if (noun_subtype == 57 or 72) { inp2 = inp1; second = noun; parsed_number = 100*consult_from + consult_words; inp1 = 1; noun = consult_from + 256*consult_words; } if (second_subtype == 57 or 72) { parsed_number = 100*consult_from + consult_words; inp2 = 1; second = consult_from + 256*consult_words; } if (inp1 == 1) { if (noun_subtype == 58) { "You must name an object.^"; } } else { if (noun_subtype ~= 58) { "You may not name an object.^"; } if ((mask & $$01000) && (noun == nothing)) { CarryOutActivity(6); if (noun == nothing) { if (say__p) rtrue; "You must supply a noun.^"; } } if (((mask & $$01000) == 0) && (noun ~= nothing)) { "You may not supply a noun.^"; } } if (inp2 == 1) { if (second_subtype == 58) { "You must name an object.^"; } } else { if (second_subtype ~= 58) { "You may not name a second object.^"; } if ((mask & $$10000) && (second == nothing)) { CarryOutActivity(7); if (second == nothing) { if (say__p) rtrue; "You must supply a second noun.^"; } } if (((mask & $$10000) == 0) && (second ~= nothing)) { "You may not supply a second noun.^"; } } rfalse; ]; [ I7_TestActionMask match mask at; at = FindAction(); if (at == 0) rfalse; mask = ActionData-->(at+1); if (mask & match) rtrue; rfalse; ]; [ I7_NeedToCarryNoun; return I7_TestActionMask($$01000000); ]; [ I7_NeedToCarrySecondNoun; return I7_TestActionMask($$10000000); ]; [ I7_NeedToTouchNoun; return I7_TestActionMask($$00001); ]; [ I7_NeedToTouchSecondNoun; return I7_TestActionMask($$00010); ]; [ I7_NeedLightForAction; return I7_TestActionMask($$00100); ]; [ I7_ImplicitTake obj ks; ks = keep_silent; keep_silent = true; print "("; if (actor ~= player) print (the) actor, " "; print "first taking ", (the) obj, ")^"; say__p = 0; I7_TryAction(true, actor, ##Take, obj, nothing); keep_silent = ks; if (obj in actor) rtrue; rfalse; ]; ! The can't see in the dark rule [ CSITDR; if (location == thedark) { RulebookSucceeds(); rtrue; } rfalse; ]; ! The primitive accessibility rule [ PA_R mask at; if (act_requester) rfalse; at = FindAction(); if (at == 0) rfalse; mask = ActionData-->(at+1); ! print "actor = ", (the) actor, "inp1 = ", inp1, "; inp2 = ", inp2, "^"; ! print "Mask is ", mask, "^"; if ((mask & $$00100) && (actor == player) && (ProcessRulebook(VISIBLE_RB)) && ((rulechange_stack-->rulechange_sp == RS_SUCCEEDS))) { BeginActivity(TOODARK_ACT); if (ForActivity(TOODARK_ACT)==false) L__M(##Miscellany, 17); EndActivity(TOODARK_ACT); I7_action_deciding_rule = CSITDR; RulebookFails(); rtrue; } if ((mask & $$00001) && noun && (inp1 ~= 1)) { if (noun in compass) { RulebookFails(); I7_action_deciding_rule = PA_R; if (actor~=player) rtrue; "You must name something more substantial.^"; } if (ObjectIsUntouchable(noun, (actor~=player), FALSE, actor)) { RulebookFails(); I7_action_deciding_rule = PA_R; rtrue; } } if ((mask & $$00010) && second && (inp2 ~= 1)) { if (second in compass) { RulebookFails(); I7_action_deciding_rule = PA_R; if (actor~=player) rtrue; "You must name something more substantial.^"; } if (ObjectIsUntouchable(second, (actor~=player), FALSE, actor)) { RulebookFails(); I7_action_deciding_rule = PA_R; rtrue; } } rfalse; ]; [ CR_R mask at; if (act_requester) rfalse; at = FindAction(); if (at == 0) rfalse; mask = ActionData-->(at+1); if ((mask & $$00001) && noun && (inp1 ~= 1)) { if ((mask & $$01000000) && (noun notin actor)) { BeginActivity(IMPLICITTAKE_ACT, noun); if (ForActivity(IMPLICITTAKE_ACT, noun)==false) I7_ImplicitTake(noun); EndActivity(IMPLICITTAKE_ACT, noun); if (noun notin actor) { RulebookFails(); I7_action_deciding_rule = CR_R; rtrue; } } } if ((mask & $$00010) && second && (inp2 ~= 1)) { if ((mask & $$10000000) && (second notin actor)) { BeginActivity(IMPLICITTAKE_ACT, second); if (ForActivity(IMPLICITTAKE_ACT, second)==false) I7_ImplicitTake(second); EndActivity(IMPLICITTAKE_ACT, second); if (second notin actor) { RulebookFails(); I7_action_deciding_rule = CR_R; rtrue; } } } rfalse; ]; [ I7_SnippetMatches snip top; wn=1; if (top == 0) rfalse; if (metaclass(top) == Routine) { if ((top)(snip/100, snip%100)~=GPR_FAIL) rtrue; rfalse; } RunTimeProblem(RTP_BADTOPIC); rfalse; ]; ! End of Actions.i6 ! Activities.i6 segment Global activities_sp = 0; Array activities_stack --> 25; Array activities_ostack --> 25; Global inhibit_flag = 0; Global inhibit_dr = 0; [ FixInhibitFlag n i_f; for (n=0:nn <= 4) i_f = true; if ((inhibit_flag == false) && (i_f)) { inhibit_dr = debug_rules; debug_rules = 0; } if ((inhibit_flag) && (i_f == false)) { debug_rules = inhibit_dr; } inhibit_flag = i_f; ]; [ BeginActivity A o x; ! print "Begin ", A, "^"; if (activities_sp == 25) return RunTimeProblem(RTP_TOOMANYACTS); activities_ostack-->activities_sp = o; activities_stack-->(activities_sp++) = A; FixInhibitFlag(); if (Activity_atb_rulebooks->A) { x = action; action = action_to_be; } o = FollowRulebookSelfed(Activity_before_rulebooks-->A, o); if (Activity_atb_rulebooks->A) action = x; return o; ]; [ ForActivity A o x; ! print "For ", A, "^"; if (Activity_atb_rulebooks->A) { x = action; action = action_to_be; } o = FollowRulebookSelfed(Activity_when_rulebooks-->A, o); if (Activity_atb_rulebooks->A) action = x; return o; ]; [ EndActivity A o rv x; ! print "End ", A, "^"; if (activities_sp == 0) jump BadEnd; if (activities_stack-->(activities_sp-1) == A) { if (Activity_atb_rulebooks->A) { x = action; action = action_to_be; } rv = FollowRulebookSelfed(Activity_after_rulebooks-->A, o); if (Activity_atb_rulebooks->A) action = x; activities_sp--; FixInhibitFlag(); ! print "Ended^"; return rv; } .BadEnd; return RunTimeProblem(RTP_CANTABANDON); ]; [ AbandonActivity A o; if (activities_sp == 0) jump BadEnd; if (activities_stack-->(activities_sp-1) == A) { activities_sp--; FixInhibitFlag(); return; } .BadEnd; return RunTimeProblem(RTP_CANTEND); ]; [ CarryOutActivity A o rv; BeginActivity(A,o); rv = ForActivity(A,o); EndActivity(A,o); return rv; ]; [ TestActivity A Pattern i; for (i=0:ii == A) { if (Pattern == false) rtrue; if ((Pattern)(activities_ostack-->i)) rtrue; } rfalse; ]; [ I7_Amusing_Provided x; x = Activity_when_rulebooks-->AMUSING_ACT; if (((rulebooks_array-->x)-->0) == I6_NULL) rfalse; rtrue; ]; ! End of Activities.i6 ! Relations.i6 segment [ I7_Now1to1 obj1 rel obj2 ol; if (obj2) objectloop (ol provides rel) if (ol.rel == obj2) ol.rel = nothing; if (obj1) obj1.rel = obj2; ]; [ I7_NowN1toV obj1 rel obj2; if (obj1.rel == obj2) obj1.rel = nothing; ]; [ I7_NowS1to1 obj1 rel obj2 ol; if (obj1 ofclass Object && obj2 ofclass Object && obj1 provides rel && obj2 provides rel) { if (obj1.rel) { (obj1.rel).rel = 0; } if (obj2.rel) { (obj2.rel).rel = 0; } obj1.rel = obj2; obj2.rel = obj1; } ]; [ I7_NowSN1to1 obj1 rel obj2 ol; if (obj1 ofclass Object && obj2 ofclass Object && obj1 provides rel && obj2 provides rel) { if (obj1.rel == obj2) { obj1.rel = 0; obj2.rel = 0; } } ]; [ I7_NowVtoV obj1 bp_id obj2 sym pr pr2 i1 i2; ! I7_ShowVtoV(bp_id); if (sym && (obj2 ~= obj1)) { I7_NowVtoV(obj2, bp_id, obj1, false); } pr = bp_id-->0; pr2 = bp_id-->1; if (pr) { if ((obj1 ofclass Object) && pr && (obj1 provides pr)) i1 = obj1.pr; else return RunTimeProblem(RTP_IMPREL, obj1, bp_id, 0); } else i1 = obj1-1; if (pr2) { if ((obj2 ofclass Object) && pr2 && (obj2 provides pr2)) i2 = obj2.pr2; else return RunTimeProblem(RTP_IMPREL, obj2, bp_id, 0); } else i2 = obj2-1; ! print "Setting relation", "(", i1, ",", i2, ")^"; pr = i1*(bp_id-->3) + i2; i1 = 1; i2 = pr%16; while (i2) { i2--; i1=i1*2; } pr = pr/16 + 6; bp_id-->pr = (bp_id-->pr) | i1; ]; [ I7_NowNVtoV obj1 bp_id obj2 sym pr pr2 i1 i2; ! I7_ShowVtoV(bp_id); ! if (sym && (obj2 > obj1)) { sym = obj1; obj1 = obj2; obj2 = sym; } if (sym && (obj2 ~= obj1)) { I7_NowNVtoV(obj2, bp_id, obj1, false); } pr = bp_id-->0; pr2 = bp_id-->1; if (pr) { if ((obj1 ofclass Object) && pr && (obj1 provides pr)) i1 = obj1.pr; else return RunTimeProblem(RTP_IMPREL, obj1, bp_id, 0); } else i1 = obj1-1; if (pr2) { if ((obj2 ofclass Object) && pr2 && (obj2 provides pr2)) i2 = obj2.pr2; else return RunTimeProblem(RTP_IMPREL, obj2, bp_id, 0); } else i2 = obj2-1; ! print "Clearing relation", "(", i1, ",", i2, ")^"; pr = i1*(bp_id-->3) + i2; i1 = 1; i2 = pr%16; while (i2) { i2--; i1=i1*2; } pr = pr/16 + 6; if ((bp_id-->pr) & i1) bp_id-->pr = bp_id-->pr - i1; ]; [ I7_NowEquiv obj1 prop obj2 big little; big = obj1.prop; little = obj2.prop; if (big == little) return; if (big < little) { little = obj1.prop; big = obj2.prop; } objectloop (obj1 provides prop) if (obj1.prop == big) obj1.prop = little; ]; [ I7_NowNEquiv obj1 prop obj2 old new; old = obj1.prop; new = obj2.prop; if (old ~= new) return; new = 0; objectloop (obj2 provides prop) if (obj2.prop > new) new = obj2.prop; new++; obj1.prop = new; ]; [ I7_TestVtoV obj1 bp_id obj2 sym pr pr2 i1 i2; pr = bp_id-->0; pr2 = bp_id-->1; if (sym && (obj2 > obj1)) { sym = obj1; obj1 = obj2; obj2 = sym; } if (pr) { if ((obj1 ofclass Object) && pr && (obj1 provides pr)) i1 = obj1.pr; else { RunTimeProblem(RTP_IMPREL, obj1, bp_id, 0); rfalse; } } else i1 = obj1-1; if (pr2) { if ((obj2 ofclass Object) && pr2 && (obj2 provides pr2)) i2 = obj2.pr2; else { RunTimeProblem(RTP_IMPREL, obj2, bp_id, 0); rfalse; } } else i2 = obj2-1; pr = i1*(bp_id-->3) + i2; i1 = 1; i2 = pr%16; while (i2) { i2--; i1=i1*2; } pr = pr/16 + 6; if ((bp_id-->pr) & i1) rtrue; rfalse; ]; [ I7_ShowVtoV bp_id sym x obj1 obj2 pr pr2 proutine1 proutine2; pr = bp_id-->0; pr2 = bp_id-->1; proutine1 = bp_id-->4; proutine2 = bp_id-->5; if (pr && pr2) { objectloop (obj1 provides pr) objectloop (obj2 provides pr2) { if (sym && obj2 > obj1) continue; if (I7_TestVtoV(obj1, bp_id, obj2)) { if (x) { I7_ShowRHeader(x); x=0; } print " ", (The) obj1; if (sym) print " <=> "; else print " >=> "; print (the) obj2, "^"; } } return; } if (pr && (pr2==0)) { objectloop (obj1 provides pr) for (obj2=1:obj2<=bp_id-->3:obj2++) { if (I7_TestVtoV(obj1, bp_id, obj2)) { if (x) { I7_ShowRHeader(x); x=0; } print " ", (The) obj1, " >=> "; (proutine2).call(obj2); print "^"; } } return; } if ((pr==0) && (pr2)) { for (obj1=1:obj1<=bp_id-->2:obj1++) objectloop (obj2 provides pr2) { if (I7_TestVtoV(obj1, bp_id, obj2)) { if (x) { I7_ShowRHeader(x); x=0; } print " "; (proutine1).call(obj1); print " >=> ", (the) obj2, "^"; } } return; } for (obj1=1:obj1<=bp_id-->2:obj1++) for (obj2=1:obj2<=bp_id-->3:obj2++) if (I7_TestVtoV(obj1, bp_id, obj2)) { if (x) { I7_ShowRHeader(x); x=0; } print " "; (proutine1).call(obj1); print " >=> "; (proutine2).call(obj2); print "^"; } ]; [ I7_ShowOtoO pr sym x obj1 obj2; objectloop (obj1 provides pr) { obj2 = obj1.pr; if (sym && obj2 < obj1) continue; if (obj2 == 0) continue; if (x) { I7_ShowRHeader(x); x=0; } print " ", (The) obj1; if (sym) print " == "; else print " >=> "; print (the) obj2, "^"; } ]; [ I7_RShowOtoO pr sym x obj1 obj2; objectloop (obj1) { objectloop (obj2 provides pr) { if (obj2.pr ~= obj1) continue; if (x) { I7_ShowRHeader(x); x=0; } print " ", (The) obj1; print " >=> "; print (the) obj2, "^"; } } ]; [ I7_ShowEquiv pr obj1 obj2 v c somegroups; ! objectloop (obj1 provides pr) print (name) obj1, " ", obj1.pr, "^"; objectloop (obj1 provides pr) obj1.pr = -(obj1.pr); objectloop (obj1 provides pr) { if (obj1.pr < 0) { v = obj1.pr; c = 0; objectloop (obj2 has i7listflag) give obj2 ~i7listflag; objectloop (obj2 provides pr) { if (obj2.pr == v) { give obj2 i7listflag; obj2.pr = -v; c++; } } if (c>1) { somegroups = true; print " { "; I7List(0); print " }^"; } else obj1.pr = v; } } objectloop (obj2 has i7listflag) give obj2 ~i7listflag; c = 0; objectloop (obj1 provides pr) if (obj1.pr < 0) { c++; give obj1 i7listflag; } if (c == 0) return; if (somegroups) print " and "; else print " "; if (c < 4) { I7List(0); print " in"; } else print c; if (c == 1) print " a"; print " single-member group"; if (c > 1) print "s"; print "^"; objectloop (obj1 provides pr) if (obj1.pr < 0) obj1.pr = -(obj1.pr); ]; [ I7_ShowRHeader x rel_type; rel_type = RelationList-->(x+1); print (string) RelationList-->(x+2); if (rel_type == Relation_ByRoutine) "."; print ":^"; ]; [ I7_ShowR rel_num rel_type x; x = rel_num*3; rel_type = RelationList-->(x+1); if (rel_type == Relation_Implicit) return; if (rel_type == Relation_ByRoutine) { I7_ShowRHeader(x); return; } switch(rel_type) { Relation_OtoO: I7_RShowOtoO(RelationList-->x, false, x); break; Relation_OtoV: I7_RShowOtoO(RelationList-->x, false, x); break; Relation_VtoO: I7_ShowOtoO(RelationList-->x, false, x); break; Relation_VtoV: I7_ShowVtoV(RelationList-->x, false, x); break; Relation_Sym_OtoO: I7_ShowOtoO(RelationList-->x, true, x); break; Relation_Sym_VtoV: I7_ShowVtoV(RelationList-->x, true, x); break; Relation_Equiv: I7_ShowRHeader(x); I7_ShowEquiv(RelationList-->x); break; Relation_ByRoutine: break; } ]; #ifdef TARGET_ZCODE; Constant I7_ROUTE_HIGH_BIT = $8000; #ifnot; ! This will fail if any object numbers (addresses) are past the 2 GB boundary. Constant I7_ROUTE_HIGH_BIT = $80000000; #endif; [ I7_RouteTo from to filter use_doors obj dir in_direction progressed sl through_door; if (from == to) return nothing; objectloop (obj ofclass K1_room) obj.vector = 0; to.vector = 1; !print "Routing from ", (the) from, " to ", (the) to, "^"; while (true) { progressed = false; !print "Pass begins^"; objectloop (obj && (obj ofclass K1_room) && ((filter == 0) || (filter(obj)))) if (obj.vector == 0) objectloop (dir in compass) if (obj provides (dir.door_dir)) { in_direction = obj.(dir.door_dir); if (in_direction == nothing) continue; !print (the) obj, " > ", (the) dir, " > ", (the) in_direction, "^"; if ((in_direction ofclass K1_room) && (in_direction.vector > 0) && ((filter == 0) || (filter(in_direction)))) { obj.vector = dir | I7_ROUTE_HIGH_BIT; !print "* ", (the) obj, " vector is ", (the) dir, "^"; progressed = true; continue; } if (use_doors && (in_direction ofclass K4_door) && ((use_doors & 2) || (in_direction has open) || ((in_direction has openable) && (in_direction hasnt locked)))) { sl = location; location = obj; through_door = in_direction.door_to(); location = sl; !print "Through door is ", (the) through_door, "^"; if ((through_door ofclass K1_room) && (through_door.vector > 0) && ((filter == 0) || (filter(through_door)))) { obj.vector = dir | I7_ROUTE_HIGH_BIT; !print "* ", (the) obj, " vector is ", (the) dir, "^"; progressed = true; continue; } } } objectloop (obj ofclass K1_room) obj.vector = obj.vector &~ I7_ROUTE_HIGH_BIT; if (progressed == false) return from.vector; } ]; [ I7_CountRouteTo from to filter use_doors obj i; if (from == to) return 0; if (from ofclass K1_room && to ofclass K1_room) { obj = I7_RouteTo(from,to,filter,use_doors); if (obj == nothing) return -1; i = 0; obj = from; while ((obj ~= to) && (i<1000)) { i++; obj = I7_RoomFrom(obj,obj.vector); } return i; } return -1; ]; [ I7_RelRouteTo relprop from to obj obj2 in_direction relkind progressed pr pr2; if (from == to) return nothing; if (relprop == 0) return nothing; relkind = RelationList-->(3*relprop+1); if (relkind == Relation_ByRoutine) return nothing; relprop = RelationList-->(3*relprop); if (relprop == 0) return nothing; ! print "Rel kind is ", relkind, "^"; if (relkind == Relation_VtoO) { objectloop (obj ofclass Object && obj provides relprop) obj.vector = 0; to.vector = 1; while (true) { progressed = false; objectloop (obj ofclass Object && obj provides relprop) if (obj.vector == 0) { in_direction = obj.relprop; if ((in_direction ofclass Object && in_direction provides relprop) && (in_direction.vector > 0)) { obj.vector = in_direction | I7_ROUTE_HIGH_BIT; progressed = true; continue; } } objectloop (obj ofclass Object && obj provides relprop) obj.vector = obj.vector &~ I7_ROUTE_HIGH_BIT; if (progressed == false) return from.vector; } } if (relkind == Relation_OtoV) { while (to->relprop) { if (to->relprop == from) return to; to = to->relprop; } return nothing; } pr = relprop-->0; pr2 = relprop-->1; objectloop (obj ofclass Object && obj provides vector) obj.vector = 0; to.vector = 1; while (true) { progressed = false; objectloop (obj ofclass Object && obj provides pr) if (obj.vector == 0) { objectloop (obj2 ofclass Object && obj2 provides pr2 && obj2.vector > 0) { if (I7_TestVtoV(obj, relprop, obj2)) { obj.vector = obj2 | I7_ROUTE_HIGH_BIT; progressed = true; continue; } } } objectloop (obj ofclass Object && obj provides vector) obj.vector = obj.vector &~ I7_ROUTE_HIGH_BIT; if (progressed == false) return from.vector; } ]; [ I7_CountRelRouteTo relprop from to obj i; if (from == to) return 0; i = 0; obj = from; if (I7_RelRouteTo(relprop,from,to) == nothing) return -1; while ((obj ~= to) && (i<1000)) { i++; obj = obj.vector; } return i; ]; ! End of Relations.i6 ! WorldModel.i6 segment ! Replaced from the I6 library: Global untouchable_object; Global untouchable_silence; Global touch_persona; [ ObjectIsUntouchable item silent_flag flag2 p save_sp; untouchable_object = item; untouchable_silence = silent_flag; touch_persona = p; if (p == actor) touch_persona = 0; if ((actor ~= player) && ((item ofclass K4_door) || (item ofclass K7_backdrop))) rfalse; save_sp = say__p; say__p = 0; if (ProcessRulebook(ACCESS_RB, 0, 1)) { if (say__p) save_sp = true; else say__p = save_sp; if (rulechange_stack-->rulechange_sp == RS_SUCCEEDS) { untouchable_silence = 0; rfalse; ! No barrier } else { untouchable_silence = 0; rtrue; ! Barrier } } if (say__p) save_sp = true; else say__p = save_sp; ! No decision is interpreted as no barrier to access: untouchable_silence = 0; rfalse; ]; [ OIU_Scoped i o; ! i = ObjectScopedBySomething(untouchable_object); ! if (i ~= 0) { ! o = parameter_object; ! if (ObjectIsUntouchable(i, 0, 0, touch_persona)) rtrue; ! parameter_object = i; ! return OIUB_CP(); ! } rfalse; ]; [ OIU_Core o; while (o && (o provides component_parent) && (o.component_parent)) o = o.component_parent; return o; ]; [ OIU_Parent o; return OIU_Core(parent(OIU_Core(o))); ]; [ OIU_CommonAncestor o1 o2 i j; ! Find the nearest object indirectly containing o1 and o2, ! or return 0 if there is no common ancestor. o1 = OIU_Core(o1); o2 = OIU_Core(o2); i = o1; while (i ~= 0) { j = o2; while (j ~= 0) { if (j == i) return i; j = OIU_Parent(j); } i = OIU_Parent(i); } return 0; ]; [ OIU_Barrier ancestor i j external p; p = touch_persona; if (p == 0) p = actor; ancestor = OIU_CommonAncestor(p, untouchable_object); ! if (ancestor == 0) { ! RulebookFails(); ! Wholly different locations ! rtrue; ! } ! print "Doing OIU barriers for ", (the) p, " and ", (the) untouchable_object, ! ": common ancestor is ", (the) ancestor, ".^"; ! First, a barrier between the player and the ancestor. if (OIU_Core(p) ~= ancestor) { i = parent(OIU_Core(p)); j = OIU_Core(i); external = false; if (j ~= i) { i = j; external = true; } while (i~=ancestor && i) { if ((external == false) && (ProcessRulebook(REACHOUT_RB, i)) && (rulechange_stack-->rulechange_sp == RS_FAILS)) rtrue; ! Barrier i = parent(OIU_Core(i)); j = OIU_Core(i); external = false; if (j ~= i) { i = j; external = true; } } } ! Second, a barrier between the item and the ancestor. if (OIU_Core(untouchable_object) ~= ancestor) { i = parent(OIU_Core(untouchable_object)); j = OIU_Core(i); external = false; if (j ~= i) { i = j; external = true; } while (i~=ancestor && i) { if ((external == false) && (ProcessRulebook(REACHIN_RB, i)) && (rulechange_stack-->rulechange_sp == RS_FAILS)) rtrue; ! Barrier i = parent(OIU_Core(i)); j = OIU_Core(i); external = false; if (j ~= i) { i = j; external = true; } } } RulebookSucceeds(); ! No barrier rtrue; ]; [ OIUB_CCI; if (parameter_object has container && parameter_object hasnt open) { if (touch_persona == 0) GL__M(##Take,9,parameter_object); RulebookFails(); rtrue; } rfalse; ]; [ OIUB_CCO; if (parameter_object has container && parameter_object hasnt open) { if (touch_persona == 0) GL__M(##Take,9,parameter_object); RulebookFails(); rtrue; } rfalse; ]; [ OIUB_RI; ! print parameter_object, "=", (the) parameter_object, "^"; if (parameter_object && parameter_object ofclass K1_room) { if (touch_persona == 0) GL__M(##Take,14,parameter_object); RulebookFails(); rtrue; } rfalse; ]; [ OIUB_CP; if ((noun provides component_parent) && (noun.component_parent)) { ! if (noun.component_parent has transparent) return GL__M(##Take,7,noun.component_parent); return GL__M(##Take,8,noun.component_parent); } rfalse; ]; [ I7_parent o; if (o==0) return 0; return parent(o); ]; [ I7_WhetherIn obj; if (obj ofclass K9_region) return I7_In(real_location, obj); if (obj ofclass K1_room) { if (obj == real_location) rtrue; rfalse; } RunTimeProblem(RTP_NOTINAROOM, obj); rfalse; ]; [ I7_Move F T opt ln; if (F == false) return RunTimeProblem(RTP_CANTMOVENOTHING); if (F ofclass K7_backdrop) { if (T ofclass K9_region) { give F ~absent; F.found_in = T.regional_found_in; if (I7_In(Room_Of(player), T)) move F to Room_Of(player); else remove F; return; } return RunTimeProblem(RTP_BACKDROP, F, T, ln); } if (T ofclass K9_region) { return RunTimeProblem(RTP_NOTBACKDROP, F, T, ln); } give F ~worn; I7_DetachPart(F, nothing); if (F == player) PlayerTo(T, opt); else move F to T; ]; [ I7_Remove F; if (F == false) return RunTimeProblem(RTP_CANTREMOVENOTHING); give F ~worn; I7_DetachPart(F, nothing); if (F ofclass K7_backdrop) give F absent; remove F; ]; [ I7_Wear F T opt; if (F == false) rfalse; I7_Move(F, T, opt); give F worn; ]; [ I7_DetachPart P From Daddy O; Daddy = P.component_parent; P.component_parent = nothing; if (Daddy == nothing) { P.component_sibling = nothing; return; } if (Daddy.component_child == P) { Daddy.component_child = P.component_sibling; P.component_sibling = nothing; return; } for (O = Daddy.component_child: O: O = O.component_sibling) if (O.component_sibling == P) { O.component_sibling = P.component_sibling; P.component_sibling = nothing; return; } ]; [ I7_MakePart P Of First; if (parent(P)) remove P; give P ~worn; if (Of == nothing) { I7_DetachPart(P, nothing); return; } if (P.component_parent) I7_DetachPart(P); P.component_parent = Of; First = Of.component_child; Of.component_child = P; P.component_sibling = First; ]; [ I7_OnStage O x; if (O ofclass K1_room) rfalse; while (O) { if (O ofclass K1_room) rtrue; if (metaclass(O) ~= Object) rfalse; if (O ofclass K9_region) rfalse; if (O ofclass K4_door) rtrue; if (O ofclass K7_backdrop) { if (O has absent) rfalse; rtrue; } x = O.component_parent; if (x) { O = x; continue; } x = parent(O); if (x) { O = x; continue; } rfalse; } rfalse; ]; [ I7_InWhat obj p; p = parent(obj); if (p == nothing) return nothing; if (p ofclass K5_container) return p; if (p ofclass K1_room) return p; if (p ofclass K9_region) return p; return nothing; ]; [ I7_OnWhat obj p; p = parent(obj); if (p == nothing) return nothing; if (p ofclass K6_supporter) return p; return nothing; ]; [ I7_CarriedBy obj p; p = parent(obj); if (p && (p ofclass K8_person) && (obj hasnt worn)) return p; return nothing; ]; [ I7_HeldBy obj p; p = parent(obj); if (p) return p; p = obj.component_parent; if (p) return p; return nothing; ]; [ I7_WornBy obj p; p = parent(obj); if (p && (p ofclass K8_person) && (obj has worn)) return p; return nothing; ]; [ I7_HadBy obj p; p = parent(obj); if (p && (p ofclass K8_person)) return p; return nothing; ]; [ I7_Adjacent R1 R2 d pr; objectloop (d in compass) { pr = d.door_dir; if ((R1 provides pr) && (R2 == R1.pr)) rtrue; } rfalse; ]; [ I7_In obj region o; if ((obj == nothing) || (region == nothing)) rfalse; if (~~(obj ofclass K1_room)) obj = I7_Location(obj); if (obj == nothing) rfalse; o = obj.I7_Map_Region; while (o) { if (o == region) rtrue; o = parent(o); } rfalse; ]; [ I7_CanSee A B; if (location == thedark) rfalse; return TestScope(B, A); ]; [ I7_CanTouch A B; if (TestScope(B,A) == false) rfalse; if (ObjectIsUntouchable(B, 1, 0, A)) rfalse; rtrue; ]; [ I7_Conceals A B; if (A ofclass K2_thing && B ofclass K2_thing) { I7_concealed_item = B; if (CarryOutActivity(CONCEALMENT_ACT, A)) rtrue; } rfalse; ]; [ I7_RoomFrom obj dir use_doors in_direction sl through_door; use_doors = 2; if ((obj ofclass K1_room) && (dir in compass)) { if (obj provides (dir.door_dir)) { in_direction = obj.(dir.door_dir); if (in_direction ofclass K1_room) return in_direction; if (use_doors && (in_direction ofclass K4_door) && ((use_doors & 2) || (in_direction has open) || ((in_direction has openable) && (in_direction hasnt locked)))) { sl = location; location = obj; through_door = in_direction.door_to(); location = sl; if (through_door ofclass K1_room) return through_door; } } } return nothing; ]; [ I7_ChangeExit r1 dir r2 pr; pr = dir.door_dir; if (r1 provides pr) { if ((r1.pr == 0) || (r1.pr ofclass K1_room)) { r1.pr = r2; return; } if (r1.pr ofclass K4_door) { RunTimeProblem(RTP_EXITDOOR, r1, dir); return; } } RunTimeProblem(RTP_NOEXIT, r1, dir); ]; [ I7_ChangeNExit r1 dir r2 pr; pr = dir.door_dir; if (r1 ofclass K4_door) { RunTimeProblem(RTP_EXITDOOR, r1, dir); return; } if ((r1 provides pr) && (r1.pr == r2)) r1.pr = 0; return; ]; [ IndirectHolder A B; while (B) { if (B==A) rtrue; B = I7_Holder(B); } rfalse; ]; [ I7_Holder X; if (parent(X)) return parent(X); if (X.component_parent) return X.component_parent; rfalse; ]; [ I7_ChangePlayer O; if (O ofclass K27_player_character) return ChangePlayer(O); RunTimeProblem(RTP_CANTCHANGE); ]; [ I7_FrontSide D; if (~~(D ofclass K4_door)) rfalse; if (D provides found_in) return (D.&found_in)-->0; return parent(D); ]; [ I7_BackSide D; if (~~(D ofclass K4_door)) rfalse; if (D provides found_in) return (D.&found_in)-->1; rfalse; ]; [ I7_Location O; if (~~(O ofclass K2_thing)) rfalse; if (O ofclass K4_door) return I7_FrontSide(O); if (O ofclass K7_backdrop) rfalse; while (O && (~~(O ofclass K1_room))) { if (parent(O)) O = parent(O); else O = O.component_parent; } return O; ]; [ I7_IndirectlyContains o1 o2; ! Does o1 enclose o2? if ((o1==o2) || (o1 == 0) || (o2 == 0)) rfalse; if (o2 ofclass K4_door) { if (o1 == I7_FrontSide(o2)) rtrue; if (o1 == I7_BackSide(o2)) rtrue; rfalse; } if (o2 ofclass K7_backdrop) rfalse; while (o2) { if (o1==o2) rtrue; if (parent(o2)) o2 = parent(o2); else o2 = o2.component_parent; } rfalse; ]; [ I7_PlaceInScope O opts; if (opts) return PlaceInScope(O); if (O ofclass K2_thing) PlaceInScope(O); ScopeWithin(O); ]; [ I7_ScopeParts from obj saw; ! print "I7_ScopeParts ", from, "^"; saw = advance_warning; advance_warning = -1; if (from == 0) from = self; for (obj = from.component_child: obj: obj = obj.component_sibling) if ((from == actor) || (I7_Conceals(from, obj) == false)) { ScopeWithin_O(obj,0,scope_reason); } advance_warning = saw; ]; ! End of WorldModel.i6 ! Time.i6 segment [ RoundOffTime t1 t2; return ((t1+t2/2)/t2)*t2; ]; [ PrintTimeOfDay t h aop; if (t<0) { print ""; return; } if (t >= 60*12) { aop = "pm"; t=t-60*12; } else aop = "am"; h = t/60; if (h==0) h=12; print h, ":"; if (t%60<10) print "0"; print t%60, " ", (string) aop; ]; [ PrintTimeOfDayEnglish t h m dir aop; h = (t/60) % 12; m = t%60; if (h==0) h=12; if (m==0) { print (number) h, " o'clock"; return; } dir = "past"; if (m > 30) { m = 60-m; h = (h+1)%12; if (h==0) h=12; dir = "to"; } switch(m) { 15: print "quarter"; 30: print "half"; default: print (number) m; if (m%5 ~= 0) { if (m == 1) print " minute"; else print " minutes"; } } print " ", (string) dir, " ", (number) h; ]; Constant I7_TWELVE_HOURS = 720; [ I7_HoursMinsWordToTime hour minute word x; if (hour >= 24) return -1; if (minute >= 60) return -1; x = hour*60 + minute; if (hour >= 13) return x; x = x%I7_TWELVE_HOURS; if (word == 'pm') x = x + I7_TWELVE_HOURS; if (word ~= 'am' or 'pm' && hour == 12) x = x + I7_TWELVE_HOURS; return x; ]; [ I7_ExtendedTryNumber wordnum i j; i = wn; wn = wordnum; j = NextWordStopped(); wn = i; switch (j) { 'twenty-one': return 21; 'twenty-two': return 22; 'twenty-three': return 23; 'twenty-four': return 24; 'twenty-five': return 25; 'twenty-six': return 26; 'twenty-seven': return 27; 'twenty-eight': return 28; 'twenty-nine': return 29; 'thirty': return 30; default: return TryNumber(wordnum); } ]; [ I7_TIME_TOKEN first_word second_word at length flag illegal_char offhour hr mn i; first_word = NextWordStopped(); switch (first_word) { 'midnight': parsed_number = 0; return GPR_NUMBER; 'midday', 'noon': parsed_number = I7_TWELVE_HOURS; return GPR_NUMBER; } ! Next try the format 12:02 at = WordAddress(wn-1); length = WordLength(wn-1); for (i=0: ii) { ':': if (flag == false && i>0 && i 5 || illegal_char) flag = false; if (flag) { for (i=0: at->i~=':': i++, hr=hr*10) hr = hr + at->i - '0'; hr = hr/10; for (i++: ii - '0'; mn = mn/10; second_word = NextWordStopped(); parsed_number = I7_HoursMinsWordToTime(hr, mn, second_word); if (parsed_number == -1) return GPR_FAIL; if (second_word ~= 'pm' or 'am') wn--; return GPR_NUMBER; } ! Lastly the wordy format offhour = -1; if (first_word == 'half') offhour = 30; if (first_word == 'quarter') offhour = 15; if (offhour < 0) offhour = I7_ExtendedTryNumber(wn-1); if (offhour < 0 || offhour >= 60) return GPR_FAIL; second_word = NextWordStopped(); switch (second_word) { ! "six o'clock", "six" 'o^clock', 'am', 'pm', -1: hr = offhour; if (hr > 12) return GPR_FAIL; ! "quarter to six", "twenty past midnight" 'to', 'past': mn = offhour; hr = I7_ExtendedTryNumber(wn); if (hr <= 0) { switch (NextWordStopped()) { 'noon', 'midday': hr = 12; 'midnight': hr = 0; default: return GPR_FAIL; } } if (hr >= 13) return GPR_FAIL; if (second_word == 'to') { mn = 60-mn; hr--; if (hr<0) hr=23; } wn++; second_word = NextWordStopped(); ! "six thirty" default: hr = offhour; mn = I7_ExtendedTryNumber(--wn); if (mn < 0 || mn >= 60) return GPR_FAIL; wn++; second_word = NextWordStopped(); } parsed_number = I7_HoursMinsWordToTime(hr, mn, second_word); if (parsed_number < 0) return GPR_FAIL; if (second_word ~= 'pm' or 'am' or 'o^clock') wn--; return GPR_NUMBER; ]; [ SetI7Timer R t f i b; for (i=1: i<=(I7TimerTable-->0): i++) { if (R == I7TimerTable-->i) { b=i; jump SlotFound; } if ((b==0) && (I7TimerTable-->i == 0)) b=i; } if (b==0) return RunTimeProblem(RTP_TOOMANYEVENTS); .SlotFound; I7TimerTable-->b = R; if (f == 0) I7TimerTableTimes-->b = -t; else I7TimerTableTimes-->b = t; ]; [ ProcessI7Timers i t f r; for (i=1: i<=(I7TimerTable-->0): i++) if ((r=I7TimerTable-->i) ~= 0) { t = I7TimerTableTimes-->i; f = 0; if (t<0) { (I7TimerTableTimes-->i)++; if (I7TimerTableTimes-->i == 0) f=1; } else { if ((the_time >= t) && (the_time < t+30)) f=1; } if (f) { I7TimerTable-->i = 0; ProcessRulebook(r); } } rfalse; ]; ! --- Turn sequence rules --- [ TS1_R; AdvanceWorldClock(); rfalse; ]; [ TS2_R; RunTimersAndDaemons(); rfalse; ]; [ TS3_R; RunEachTurnProperties(); rfalse; ]; [ TS4_R; TimePasses(); rfalse; ]; [ TS5_R; AdjustLight(); rfalse; ]; [ TS6_R obj; NoteObjectAcquisitions(); objectloop (obj in player) if (obj ofclass RUCKSACK_CLASS) SACK_OBJECT = obj; rfalse; ]; ! End of Time.i6 segment ! Figures.i6 #IFDEF TARGET_GLULX; #IFNDEF infglk_h; ! Standard Glulx definitions contributed by John Cater Constant infglk_h; !------------------------------------------------------------------------------- ! infglk.h - an Inform library to allow easy access to glk functions ! under glulx ! Dynamically created by glk2inf.pl on 08/31/2006 at 19:20:21. ! Send comments or suggestions to: katre@ruf.rice.edu !------------------------------------------------------------------------------- #Ifdef infglk_h; ! remove "Constant declared but not used" warnings #Endif; Constant GLK_NULL 0; ! Constant definitions from glk.h Constant gestalt_Version 0; Constant gestalt_CharInput 1; Constant gestalt_LineInput 2; Constant gestalt_CharOutput 3; Constant gestalt_CharOutput_CannotPrint 0; Constant gestalt_CharOutput_ApproxPrint 1; Constant gestalt_CharOutput_ExactPrint 2; Constant gestalt_MouseInput 4; Constant gestalt_Timer 5; Constant gestalt_Graphics 6; Constant gestalt_DrawImage 7; Constant gestalt_Sound 8; Constant gestalt_SoundVolume 9; Constant gestalt_SoundNotify 10; Constant gestalt_Hyperlinks 11; Constant gestalt_HyperlinkInput 12; Constant gestalt_SoundMusic 13; Constant gestalt_GraphicsTransparency 14; Constant gestalt_Unicode 15; Constant evtype_None 0; Constant evtype_Timer 1; Constant evtype_CharInput 2; Constant evtype_LineInput 3; Constant evtype_MouseInput 4; Constant evtype_Arrange 5; Constant evtype_Redraw 6; Constant evtype_SoundNotify 7; Constant evtype_Hyperlink 8; Constant keycode_Unknown $ffffffff; Constant keycode_Left $fffffffe; Constant keycode_Right $fffffffd; Constant keycode_Up $fffffffc; Constant keycode_Down $fffffffb; Constant keycode_Return $fffffffa; Constant keycode_Delete $fffffff9; Constant keycode_Escape $fffffff8; Constant keycode_Tab $fffffff7; Constant keycode_PageUp $fffffff6; Constant keycode_PageDown $fffffff5; Constant keycode_Home $fffffff4; Constant keycode_End $fffffff3; Constant keycode_Func1 $ffffffef; Constant keycode_Func2 $ffffffee; Constant keycode_Func3 $ffffffed; Constant keycode_Func4 $ffffffec; Constant keycode_Func5 $ffffffeb; Constant keycode_Func6 $ffffffea; Constant keycode_Func7 $ffffffe9; Constant keycode_Func8 $ffffffe8; Constant keycode_Func9 $ffffffe7; Constant keycode_Func10 $ffffffe6; Constant keycode_Func11 $ffffffe5; Constant keycode_Func12 $ffffffe4; Constant keycode_MAXVAL 28; Constant style_Normal 0; Constant style_Emphasized 1; Constant style_Preformatted 2; Constant style_Header 3; Constant style_Subheader 4; Constant style_Alert 5; Constant style_Note 6; Constant style_BlockQuote 7; Constant style_Input 8; Constant style_User1 9; Constant style_User2 10; Constant style_NUMSTYLES 11; Constant wintype_AllTypes 0; Constant wintype_Pair 1; Constant wintype_Blank 2; Constant wintype_TextBuffer 3; Constant wintype_TextGrid 4; Constant wintype_Graphics 5; Constant winmethod_Left $00; Constant winmethod_Right $01; Constant winmethod_Above $02; Constant winmethod_Below $03; Constant winmethod_DirMask $0f; Constant winmethod_Fixed $10; Constant winmethod_Proportional $20; Constant winmethod_DivisionMask $f0; Constant fileusage_Data $00; Constant fileusage_SavedGame $01; Constant fileusage_Transcript $02; Constant fileusage_InputRecord $03; Constant fileusage_TypeMask $0f; Constant fileusage_TextMode $100; Constant fileusage_BinaryMode $000; Constant filemode_Write $01; Constant filemode_Read $02; Constant filemode_ReadWrite $03; Constant filemode_WriteAppend $05; Constant seekmode_Start 0; Constant seekmode_Current 1; Constant seekmode_End 2; Constant stylehint_Indentation 0; Constant stylehint_ParaIndentation 1; Constant stylehint_Justification 2; Constant stylehint_Size 3; Constant stylehint_Weight 4; Constant stylehint_Oblique 5; Constant stylehint_Proportional 6; Constant stylehint_TextColor 7; Constant stylehint_BackColor 8; Constant stylehint_ReverseColor 9; Constant stylehint_NUMHINTS 10; Constant stylehint_just_LeftFlush 0; Constant stylehint_just_LeftRight 1; Constant stylehint_just_Centered 2; Constant stylehint_just_RightFlush 3; Constant imagealign_InlineUp $01; Constant imagealign_InlineDown $02; Constant imagealign_InlineCenter $03; Constant imagealign_MarginLeft $04; Constant imagealign_MarginRight $05; ! The actual glk functions. [ glk_exit _vararg_count ret; ! glk_exit () ! And now the @glk call @glk 1 _vararg_count ret; return ret; ]; [ glk_set_interrupt_handler _vararg_count ret; ! glk_set_interrupt_handler (func) ! And now the @glk call @glk 2 _vararg_count ret; return ret; ]; [ glk_tick _vararg_count ret; ! glk_tick () ! And now the @glk call @glk 3 _vararg_count ret; return ret; ]; [ glk_gestalt _vararg_count ret; ! glk_gestalt (sel val) ! And now the @glk call @glk 4 _vararg_count ret; return ret; ]; [ glk_gestalt_ext _vararg_count ret; ! glk_gestalt_ext (sel val arr arrlen) ! And now the @glk call @glk 5 _vararg_count ret; return ret; ]; [ glk_char_to_lower _vararg_count ret; ! glk_char_to_lower (ch) ! And now the @glk call @glk 160 _vararg_count ret; return ret; ]; [ glk_char_to_upper _vararg_count ret; ! glk_char_to_upper (ch) ! And now the @glk call @glk 161 _vararg_count ret; return ret; ]; [ glk_window_get_root _vararg_count ret; ! glk_window_get_root () ! And now the @glk call @glk 34 _vararg_count ret; return ret; ]; [ glk_window_open _vararg_count ret; ! glk_window_open (split method size wintype rock) ! And now the @glk call @glk 35 _vararg_count ret; return ret; ]; [ glk_window_close _vararg_count ret; ! glk_window_close (win result) ! And now the @glk call @glk 36 _vararg_count ret; return ret; ]; [ glk_window_get_size _vararg_count ret; ! glk_window_get_size (win widthptr heightptr) ! And now the @glk call @glk 37 _vararg_count ret; return ret; ]; [ glk_window_set_arrangement _vararg_count ret; ! glk_window_set_arrangement (win method size keywin) ! And now the @glk call @glk 38 _vararg_count ret; return ret; ]; [ glk_window_get_arrangement _vararg_count ret; ! glk_window_get_arrangement (win methodptr sizeptr keywinptr) ! And now the @glk call @glk 39 _vararg_count ret; return ret; ]; [ glk_window_iterate _vararg_count ret; ! glk_window_iterate (win rockptr) ! And now the @glk call @glk 32 _vararg_count ret; return ret; ]; [ glk_window_get_rock _vararg_count ret; ! glk_window_get_rock (win) ! And now the @glk call @glk 33 _vararg_count ret; return ret; ]; [ glk_window_get_type _vararg_count ret; ! glk_window_get_type (win) ! And now the @glk call @glk 40 _vararg_count ret; return ret; ]; [ glk_window_get_parent _vararg_count ret; ! glk_window_get_parent (win) ! And now the @glk call @glk 41 _vararg_count ret; return ret; ]; [ glk_window_get_sibling _vararg_count ret; ! glk_window_get_sibling (win) ! And now the @glk call @glk 48 _vararg_count ret; return ret; ]; [ glk_window_clear _vararg_count ret; ! glk_window_clear (win) ! And now the @glk call @glk 42 _vararg_count ret; return ret; ]; [ glk_window_move_cursor _vararg_count ret; ! glk_window_move_cursor (win xpos ypos) ! And now the @glk call @glk 43 _vararg_count ret; return ret; ]; [ glk_window_get_stream _vararg_count ret; ! glk_window_get_stream (win) ! And now the @glk call @glk 44 _vararg_count ret; return ret; ]; [ glk_window_set_echo_stream _vararg_count ret; ! glk_window_set_echo_stream (win str) ! And now the @glk call @glk 45 _vararg_count ret; return ret; ]; [ glk_window_get_echo_stream _vararg_count ret; ! glk_window_get_echo_stream (win) ! And now the @glk call @glk 46 _vararg_count ret; return ret; ]; [ glk_set_window _vararg_count ret; ! glk_set_window (win) ! And now the @glk call @glk 47 _vararg_count ret; return ret; ]; [ glk_stream_open_file _vararg_count ret; ! glk_stream_open_file (fileref fmode rock) ! And now the @glk call @glk 66 _vararg_count ret; return ret; ]; [ glk_stream_open_memory _vararg_count ret; ! glk_stream_open_memory (buf buflen fmode rock) ! And now the @glk call @glk 67 _vararg_count ret; return ret; ]; [ glk_stream_close _vararg_count ret; ! glk_stream_close (str result) ! And now the @glk call @glk 68 _vararg_count ret; return ret; ]; [ glk_stream_iterate _vararg_count ret; ! glk_stream_iterate (str rockptr) ! And now the @glk call @glk 64 _vararg_count ret; return ret; ]; [ glk_stream_get_rock _vararg_count ret; ! glk_stream_get_rock (str) ! And now the @glk call @glk 65 _vararg_count ret; return ret; ]; [ glk_stream_set_position _vararg_count ret; ! glk_stream_set_position (str pos seekmode) ! And now the @glk call @glk 69 _vararg_count ret; return ret; ]; [ glk_stream_get_position _vararg_count ret; ! glk_stream_get_position (str) ! And now the @glk call @glk 70 _vararg_count ret; return ret; ]; [ glk_stream_set_current _vararg_count ret; ! glk_stream_set_current (str) ! And now the @glk call @glk 71 _vararg_count ret; return ret; ]; [ glk_stream_get_current _vararg_count ret; ! glk_stream_get_current () ! And now the @glk call @glk 72 _vararg_count ret; return ret; ]; [ glk_put_char _vararg_count ret; ! glk_put_char (ch) ! And now the @glk call @glk 128 _vararg_count ret; return ret; ]; [ glk_put_char_stream _vararg_count ret; ! glk_put_char_stream (str ch) ! And now the @glk call @glk 129 _vararg_count ret; return ret; ]; [ glk_put_string _vararg_count ret; ! glk_put_string (s) ! And now the @glk call @glk 130 _vararg_count ret; return ret; ]; [ glk_put_string_stream _vararg_count ret; ! glk_put_string_stream (str s) ! And now the @glk call @glk 131 _vararg_count ret; return ret; ]; [ glk_put_buffer _vararg_count ret; ! glk_put_buffer (buf len) ! And now the @glk call @glk 132 _vararg_count ret; return ret; ]; [ glk_put_buffer_stream _vararg_count ret; ! glk_put_buffer_stream (str buf len) ! And now the @glk call @glk 133 _vararg_count ret; return ret; ]; [ glk_set_style _vararg_count ret; ! glk_set_style (styl) ! And now the @glk call @glk 134 _vararg_count ret; return ret; ]; [ glk_set_style_stream _vararg_count ret; ! glk_set_style_stream (str styl) ! And now the @glk call @glk 135 _vararg_count ret; return ret; ]; [ glk_get_char_stream _vararg_count ret; ! glk_get_char_stream (str) ! And now the @glk call @glk 144 _vararg_count ret; return ret; ]; [ glk_get_line_stream _vararg_count ret; ! glk_get_line_stream (str buf len) ! And now the @glk call @glk 145 _vararg_count ret; return ret; ]; [ glk_get_buffer_stream _vararg_count ret; ! glk_get_buffer_stream (str buf len) ! And now the @glk call @glk 146 _vararg_count ret; return ret; ]; [ glk_stylehint_set _vararg_count ret; ! glk_stylehint_set (wintype styl hint val) ! And now the @glk call @glk 176 _vararg_count ret; return ret; ]; [ glk_stylehint_clear _vararg_count ret; ! glk_stylehint_clear (wintype styl hint) ! And now the @glk call @glk 177 _vararg_count ret; return ret; ]; [ glk_style_distinguish _vararg_count ret; ! glk_style_distinguish (win styl1 styl2) ! And now the @glk call @glk 178 _vararg_count ret; return ret; ]; [ glk_style_measure _vararg_count ret; ! glk_style_measure (win styl hint result) ! And now the @glk call @glk 179 _vararg_count ret; return ret; ]; [ glk_fileref_create_temp _vararg_count ret; ! glk_fileref_create_temp (usage rock) ! And now the @glk call @glk 96 _vararg_count ret; return ret; ]; [ glk_fileref_create_by_name _vararg_count ret; ! glk_fileref_create_by_name (usage name rock) ! And now the @glk call @glk 97 _vararg_count ret; return ret; ]; [ glk_fileref_create_by_prompt _vararg_count ret; ! glk_fileref_create_by_prompt (usage fmode rock) ! And now the @glk call @glk 98 _vararg_count ret; return ret; ]; [ glk_fileref_create_from_fileref _vararg_count ret; ! glk_fileref_create_from_fileref (usage fref rock) ! And now the @glk call @glk 104 _vararg_count ret; return ret; ]; [ glk_fileref_destroy _vararg_count ret; ! glk_fileref_destroy (fref) ! And now the @glk call @glk 99 _vararg_count ret; return ret; ]; [ glk_fileref_iterate _vararg_count ret; ! glk_fileref_iterate (fref rockptr) ! And now the @glk call @glk 100 _vararg_count ret; return ret; ]; [ glk_fileref_get_rock _vararg_count ret; ! glk_fileref_get_rock (fref) ! And now the @glk call @glk 101 _vararg_count ret; return ret; ]; [ glk_fileref_delete_file _vararg_count ret; ! glk_fileref_delete_file (fref) ! And now the @glk call @glk 102 _vararg_count ret; return ret; ]; [ glk_fileref_does_file_exist _vararg_count ret; ! glk_fileref_does_file_exist (fref) ! And now the @glk call @glk 103 _vararg_count ret; return ret; ]; [ glk_select _vararg_count ret; ! glk_select (event) ! And now the @glk call @glk 192 _vararg_count ret; return ret; ]; [ glk_select_poll _vararg_count ret; ! glk_select_poll (event) ! And now the @glk call @glk 193 _vararg_count ret; return ret; ]; [ glk_request_timer_events _vararg_count ret; ! glk_request_timer_events (millisecs) ! And now the @glk call @glk 214 _vararg_count ret; return ret; ]; [ glk_request_line_event _vararg_count ret; ! glk_request_line_event (win buf maxlen initlen) ! And now the @glk call @glk 208 _vararg_count ret; return ret; ]; [ glk_request_char_event _vararg_count ret; ! glk_request_char_event (win) ! And now the @glk call @glk 210 _vararg_count ret; return ret; ]; [ glk_request_mouse_event _vararg_count ret; ! glk_request_mouse_event (win) ! And now the @glk call @glk 212 _vararg_count ret; return ret; ]; [ glk_cancel_line_event _vararg_count ret; ! glk_cancel_line_event (win event) ! And now the @glk call @glk 209 _vararg_count ret; return ret; ]; [ glk_cancel_char_event _vararg_count ret; ! glk_cancel_char_event (win) ! And now the @glk call @glk 211 _vararg_count ret; return ret; ]; [ glk_cancel_mouse_event _vararg_count ret; ! glk_cancel_mouse_event (win) ! And now the @glk call @glk 213 _vararg_count ret; return ret; ]; [ glk_buffer_to_lower_case_uni _vararg_count ret; ! glk_buffer_to_lower_case_uni (buf len numchars) ! And now the @glk call @glk 288 _vararg_count ret; return ret; ]; [ glk_buffer_to_upper_case_uni _vararg_count ret; ! glk_buffer_to_upper_case_uni (buf len numchars) ! And now the @glk call @glk 289 _vararg_count ret; return ret; ]; [ glk_buffer_to_title_case_uni _vararg_count ret; ! glk_buffer_to_title_case_uni (buf len numchars lowerrest) ! And now the @glk call @glk 290 _vararg_count ret; return ret; ]; [ glk_put_char_uni _vararg_count ret; ! glk_put_char_uni (ch) ! And now the @glk call @glk 296 _vararg_count ret; return ret; ]; [ glk_put_string_uni _vararg_count ret; ! glk_put_string_uni (s) ! And now the @glk call @glk 297 _vararg_count ret; return ret; ]; [ glk_put_buffer_uni _vararg_count ret; ! glk_put_buffer_uni (buf len) ! And now the @glk call @glk 298 _vararg_count ret; return ret; ]; [ glk_put_char_stream_uni _vararg_count ret; ! glk_put_char_stream_uni (str ch) ! And now the @glk call @glk 299 _vararg_count ret; return ret; ]; [ glk_put_string_stream_uni _vararg_count ret; ! glk_put_string_stream_uni (str s) ! And now the @glk call @glk 300 _vararg_count ret; return ret; ]; [ glk_put_buffer_stream_uni _vararg_count ret; ! glk_put_buffer_stream_uni (str buf len) ! And now the @glk call @glk 301 _vararg_count ret; return ret; ]; [ glk_get_char_stream_uni _vararg_count ret; ! glk_get_char_stream_uni (str) ! And now the @glk call @glk 304 _vararg_count ret; return ret; ]; [ glk_get_buffer_stream_uni _vararg_count ret; ! glk_get_buffer_stream_uni (str buf len) ! And now the @glk call @glk 305 _vararg_count ret; return ret; ]; [ glk_get_line_stream_uni _vararg_count ret; ! glk_get_line_stream_uni (str buf len) ! And now the @glk call @glk 306 _vararg_count ret; return ret; ]; [ glk_stream_open_file_uni _vararg_count ret; ! glk_stream_open_file_uni (fileref fmode rock) ! And now the @glk call @glk 312 _vararg_count ret; return ret; ]; [ glk_stream_open_memory_uni _vararg_count ret; ! glk_stream_open_memory_uni (buf buflen fmode rock) ! And now the @glk call @glk 313 _vararg_count ret; return ret; ]; [ glk_request_char_event_uni _vararg_count ret; ! glk_request_char_event_uni (win) ! And now the @glk call @glk 320 _vararg_count ret; return ret; ]; [ glk_request_line_event_uni _vararg_count ret; ! glk_request_line_event_uni (win buf maxlen initlen) ! And now the @glk call @glk 321 _vararg_count ret; return ret; ]; [ glk_image_draw _vararg_count ret; ! glk_image_draw (win image val1 val2) ! And now the @glk call @glk 225 _vararg_count ret; return ret; ]; [ glk_image_draw_scaled _vararg_count ret; ! glk_image_draw_scaled (win image val1 val2 width height) ! And now the @glk call @glk 226 _vararg_count ret; return ret; ]; [ glk_image_get_info _vararg_count ret; ! glk_image_get_info (image width height) ! And now the @glk call @glk 224 _vararg_count ret; return ret; ]; [ glk_window_flow_break _vararg_count ret; ! glk_window_flow_break (win) ! And now the @glk call @glk 232 _vararg_count ret; return ret; ]; [ glk_window_erase_rect _vararg_count ret; ! glk_window_erase_rect (win left top width height) ! And now the @glk call @glk 233 _vararg_count ret; return ret; ]; [ glk_window_fill_rect _vararg_count ret; ! glk_window_fill_rect (win color left top width height) ! And now the @glk call @glk 234 _vararg_count ret; return ret; ]; [ glk_window_set_background_color _vararg_count ret; ! glk_window_set_background_color (win color) ! And now the @glk call @glk 235 _vararg_count ret; return ret; ]; [ glk_schannel_create _vararg_count ret; ! glk_schannel_create (rock) ! And now the @glk call @glk 242 _vararg_count ret; return ret; ]; [ glk_schannel_destroy _vararg_count ret; ! glk_schannel_destroy (chan) ! And now the @glk call @glk 243 _vararg_count ret; return ret; ]; [ glk_schannel_iterate _vararg_count ret; ! glk_schannel_iterate (chan rockptr) ! And now the @glk call @glk 240 _vararg_count ret; return ret; ]; [ glk_schannel_get_rock _vararg_count ret; ! glk_schannel_get_rock (chan) ! And now the @glk call @glk 241 _vararg_count ret; return ret; ]; [ glk_schannel_play _vararg_count ret; ! glk_schannel_play (chan snd) ! And now the @glk call @glk 248 _vararg_count ret; return ret; ]; [ glk_schannel_play_ext _vararg_count ret; ! glk_schannel_play_ext (chan snd repeats notify) ! And now the @glk call @glk 249 _vararg_count ret; return ret; ]; [ glk_schannel_stop _vararg_count ret; ! glk_schannel_stop (chan) ! And now the @glk call @glk 250 _vararg_count ret; return ret; ]; [ glk_schannel_set_volume _vararg_count ret; ! glk_schannel_set_volume (chan vol) ! And now the @glk call @glk 251 _vararg_count ret; return ret; ]; [ glk_sound_load_hint _vararg_count ret; ! glk_sound_load_hint (snd flag) ! And now the @glk call @glk 252 _vararg_count ret; return ret; ]; [ glk_set_hyperlink _vararg_count ret; ! glk_set_hyperlink (linkval) ! And now the @glk call @glk 256 _vararg_count ret; return ret; ]; [ glk_set_hyperlink_stream _vararg_count ret; ! glk_set_hyperlink_stream (str linkval) ! And now the @glk call @glk 257 _vararg_count ret; return ret; ]; [ glk_request_hyperlink_event _vararg_count ret; ! glk_request_hyperlink_event (win) ! And now the @glk call @glk 258 _vararg_count ret; return ret; ]; [ glk_cancel_hyperlink_event _vararg_count ret; ! glk_cancel_hyperlink_event (win) ! And now the @glk call @glk 259 _vararg_count ret; return ret; ]; #ENDIF; #ENDIF; ! End of infglk.h inclusion #IFDEF TARGET_GLULX; Array I7_FigureFlags->(0+4); #ENDIF; [ I7_DisplayFigure resource_ID one_time; #IFDEF TARGET_ZCODE; ! Do nothing if on the V5 or V8 Z-machine, but still compile and run #IFTRUE #version_number == 6; print "V6: picture ", resource_ID, " here.^"; @draw_picture resource_ID; #ENDIF; ! Z-machine version 6 #IFNOT; ! Glulx, then: if (one_time) { if (I7_FigureFlags->resource_ID) return; } I7_FigureFlags->resource_ID = true; glk_image_draw(gg_mainwin, resource_ID, imagealign_InlineCenter, 0); #ENDIF; ! TARGET_ ]; ! End of Figures.i6 [ I7_char_to_digit c n; n = c-'0'; if ((n<0) || (n>9)) return -1; return n; ]; [ I7_Match test snippet w1 wlen i j; w1 = snippet/100; wlen = snippet%100; for (i=w1, j=wlen: j>0: i++, j--) { if (((test)(i, 0)) ~= GPR_FAIL) return i*100+wn-i; } rfalse; ]; [ I7_ParseToken x y; if (wn>WordCount()) return GPR_FAIL; return ParseToken(x,y); ]; [ I7_SeedRNG n; ! Seed the random number generator #ifdef TARGET_ZCODE; if (n > 0) n = -n; @random n -> n; #ifnot; ! TARGET_GLULX @setrandom n; #endif; ! TARGET_ ]; [ I7_SceneChange chs sc ch; .CScene; if (chs>10) ">--> The scene change machinery is stuck."; if (ch>0) I7_SceneChange(++chs); ]; #IFDEF DEBUG; [ I7_SceneStatus chs sc ch; ]; #ENDIF; Constant BR_0 = R_36; Constant BR_1 = R_37; Constant BR_2 = R_38; ! Tables.i6 segment ! A table T is represented by a "table" array: T-->0 holds the ! number of columns and T-->i is the address of column number i. ! Columns are therefore numbered from 1 to T-->0, but they are also ! identified by an ID number of 100 or more, with each different ! column name having its own ID number. Each column C is also a ! "table" array, with C-->1 holding the unique ID number for the ! column's name, and C-->2 up to C-->(C-->0) holding the entries. ! Except that C-->1 also contains two upper bit flags: Constant I7_COLUMN_NUMBER $0fff; Constant I7_COLUMN_SIGNED $4000; Constant I7_COLUMN_TOPIC $2000; Constant I7_COLUMN_DONTSORTME $1000; [ TableFindCol tab col f i j n; j = tab-->0; for (i=1:i<=j:i++) if (col == ((tab-->i)-->1) & I7_COLUMN_NUMBER) return i; if (f) return RunTimeProblem(RTP_TABLE_NOCOL, tab); return 0; ]; ! The columns in a table can be assumed all to have the same ! height (i.e., number of rows): thus the number of rows in T ! can be calculated as (T-->1)-->0 - 1. [ TableRows tab; return ((tab-->1)-->0)-1; ]; ! The following dummy value is invalid for most types and unlikely ! in the others, so is used to represent an empty cell. #ifdef TARGET_ZCODE; Constant I7_TABLE_NOVALUE $7fe3; #ifnot; ! TARGET_GLULX Constant I7_TABLE_NOVALUE $deadce11; #endif; ! TARGET_ ! TableRowCorr(T, C, V) returns the first row on which value V ! appears in column C of table T, or prints an error if it doesn't. [ TableRowCorr tab lookup_col lookup_value i j; if (lookup_col >= 100) lookup_col=TableFindCol(tab, lookup_col, true); lookup_col = tab-->lookup_col; j = lookup_col-->0; for (i=2:i<=j:i++) if (lookup_col-->i == lookup_value) return i-1; return RunTimeProblem(RTP_TABLE_NOCORR, tab); ]; ! ExistsTableRowCorr(T, C, V) returns the first row on which V ! appears in column C of table T, or 0 if V does not occur at all. [ ExistsTableRowCorr tab col entry i k v f; if (col >= 100) col=TableFindCol(tab, col); f = ((tab-->col)-->1) & I7_COLUMN_TOPIC; if (col == 0) rfalse; k = ((tab-->1)-->0)-1; for (i=1:i<=k:i++) { ! print "Checking row ", i, "^"; v = (tab-->col)-->(i+1); if (v == I7_TABLE_NOVALUE) continue; if (f) { if ((v)(consult_from, consult_words) ~= GPR_FAIL) return i; } else { if (v == entry) return i; } } ! print "Giving up^"; return 0; ]; ! TableLookUpCorr(T, C1, C2, V) finds the first row on which value ! V appears in column C2, and returns the corresponding value in C1, ! or prints an error if the value V cannot be found or has no ! corresponding value in C1. [ TableLookUpCorr tab col lookup_col lookup_value write_flag write_value i j v; if (col >= 100) col=TableFindCol(tab, col, true); if (lookup_col >= 100) lookup_col=TableFindCol(tab, lookup_col, true); col = tab-->col; lookup_col = tab-->lookup_col; j = lookup_col-->0; for (i=2:i<=j:i++) if (lookup_col-->i == lookup_value) { if (write_flag) { col-->i = write_value; rfalse; } v = col-->i; if (v ~= I7_TABLE_NOVALUE) return v; } return RunTimeProblem(RTP_TABLE_NOCORR, tab); ]; ! ExistsTableLookUpCorr(T, C1, C2, V) returns true if the operation ! TableLookUpCorr(T, C1, C2, V) can be done, false otherwise. [ ExistsTableLookUpCorr tab col lookup_col lookup_value i j; if (col >= 100) col=TableFindCol(tab, col, false); if (lookup_col >= 100) lookup_col=TableFindCol(tab, lookup_col, false); if (col*lookup_col == 0) rfalse; col = tab-->col; lookup_col = tab-->lookup_col; j = lookup_col-->0; for (i=2:i<=j:i++) if ((lookup_col-->i == lookup_value) && (col-->i ~= I7_TABLE_NOVALUE)) rtrue; rfalse; ]; ! TableLookUpEntry(T, C, R) returns the value at column C, row R, ! printing an error if that doesn't exist. [ TableLookUpEntry tab col index write_flag write_value v; if (col >= 100) col=TableFindCol(tab, col, true); if ((index < 1) || (index > (((tab-->col)-->0)-1))) return RunTimeProblem(RTP_TABLE_NOROW, tab, index); if (write_flag) { (tab-->col)-->(index+1) = write_value; rfalse; } v = ((tab-->col)-->(index+1)); if (v == I7_TABLE_NOVALUE) return RunTimeProblem(RTP_TABLE_NOENTRY, tab, col, 0, index); return v; ]; ! ExistsTableLookUpEntry(T, C, R) returns true if a value exists ! at column C, row R, false otherwise. [ ExistsTableLookUpEntry tab col index v; if (col >= 100) col=TableFindCol(tab, col); if (col == 0) rfalse; if ((index<1) || (index > (((tab-->col)-->0)-1))) rfalse; v = ((tab-->col)-->(index+1)); if (v == I7_TABLE_NOVALUE) rfalse; rtrue; ]; ! TableRowIsBlank(T, R) returns true if row R of table T is blank. ! (R must be a legal row number.) [ TableRowIsBlank tab j k; for (k=1:k<=tab-->0:k++) if (((tab-->k)-->(j+1)) ~= I7_TABLE_NOVALUE) rfalse; rtrue; ]; ! TableBlankOutRow(T, R) fills row R of table T with blanks. ! (R must be a legal row number.) [ TableBlankOutRow tab j k; if (tab==0) return RunTimeProblem(RTP_TABLE_NOTABLE, tab); for (k=1:k<=tab-->0:k++) (tab-->k)-->(j+1) = I7_TABLE_NOVALUE; ]; ! TableBlankRows(T) returns the number of blank rows in T. [ TableBlankRows tab i j c; i = TableRows(tab); !print i, " rows^"; for (j=1:j<=i:j++) if (TableRowIsBlank(tab, j)) c++; !print c, " blank^"; return c; ]; ! TableFilledRows(T) returns the number of non-blank rows in T. [ TableFilledRows tab; return TableRows(tab) - TableBlankRows(tab); ]; ! TableBlankRow(T) finds the first blank row in T. [ TableBlankRow tab i j; i = TableRows(tab); for (j=1:j<=i:j++) if (TableRowIsBlank(tab, j)) return j; RunTimeProblem(RTP_TABLE_NOMOREBLANKS, tab); return i; ]; ! TableRandomRow(T) chooses a random non-blank row in T. [ TableRandomRow tab i j k; i = TableRows(tab); j = TableFilledRows(tab); if (j==0) return RunTimeProblem(RTP_TABLE_NOROWS, tab); if (j>1) j = random(j); for (k=1:k<=i:k++) { if (TableRowIsBlank(tab, k) == false) j--; if (j==0) return k; } ]; ! TableSwapRows(T, R1, R2) exchanges rows R1 and R2. [ TableSwapRows tab i j k l m; if (i==j) return; l = tab-->0; for (k=1:k<=l:k++) { m = (tab-->k)-->(i+1); (tab-->k)-->(i+1) = (tab-->k)-->(j+1); (tab-->k)-->(j+1) = m; } ]; ! TableShuffle(T) sorts T into random row order. [ TableShuffle tab i j k; k = ((tab-->1)-->0)-1; for (i=2:i<=k:i++) TableSwapRows(tab, i, random(i)); ]; ! TableNextRow(T, C, R, D) is used when scanning through a ! table in order of the values in column C: ascending order ! if D = 1, descending if D = -1. The current position is row R ! of column C, or R=0 if we have not yet found the first row. ! The return value is the row number for the next value, or 0 ! if we are already at the final value. Note that if there ! are several equal values in the column, they will be run ! through in turn, in order of their physical row numbers - ! ascending if D = 1, descending if D = -1, so that using ! the routine with D = -1 always produces the exact reverse ! ordering from using it with D = 1 and the same parameters. ! Rows with blank entries in C are skipped. ! ! for (R=TableNextRow(T,C,0,D): R : R=TableNextRow(T,C,R,D)) ... ! will perform a loop of valid row numbers in order of column C. [ TableNextRow tab col row dir i k val v dv min_dv min_at signed_arithmetic f; if (col >= 100) col=TableFindCol(tab, col, false); signed_arithmetic = ((tab-->col)-->1) & I7_COLUMN_SIGNED; #ifdef TARGET_ZCODE; if (row == 0) { if (signed_arithmetic) { if (dir == 1) val = $8000; else val = $7fff; } else { if (dir == 1) val = 0; else val = $ffff; } } else val = (tab-->col)-->(row+1); if (signed_arithmetic) min_dv = $7fff; else min_dv = $ffff; #ifnot; ! TARGET_GLULX if (row == 0) { if (signed_arithmetic) { if (dir == 1) val = $80000000; else val = $7fffffff; } else { if (dir == 1) val = 0; else val = $ffffffff; } } else val = (tab-->col)-->(row+1); if (signed_arithmetic) min_dv = $7fffffff; else min_dv = $ffffffff; #endif; ! TARGET_ k = ((tab-->1)-->0)-1; if (dir == 1) { for (i=1:i<=k:i++) { v = (tab-->col)-->(i+1); if (v == I7_TABLE_NOVALUE) continue; dv = dir*v; if (signed_arithmetic) f = (((dv > dir*val) || ((v == val) && (i>row))) && (dv < min_dv)); else f = (((UnsignedCompare(dv, dir*val) > 0) || ((v == val) && (i>row))) && (UnsignedCompare(dv, min_dv) < 0)); if (f) { min_dv = dv; min_at = i; } } } else { for (i=k:i>=1:i--) { v = (tab-->col)-->(i+1); if (v == I7_TABLE_NOVALUE) continue; dv = dir*v; if (signed_arithmetic) f = (((dv > dir*val) || ((v == val) && (i 0) || ((v == val) && (i the entry at row R2, ! 0 if they are equal, and ! -1 if entry at R1 < entry at R2. ! When D = +1, a blank value is > all other values, so that in ! an ascending sort the blanks come last; when D = -1, a blank ! value is < all others, so that once again blanks are last. ! Finally, a wholly blank row is always placed after a row in ! which the entry in C is blank but where other entries are not. [ TableCompareRows tab col row1 row2 dir val1 val2; if (col >= 100) col=TableFindCol(tab, col, false); val1 = (tab-->col)-->(row1+1); val2 = (tab-->col)-->(row2+1); if (val1 == val2) { if (val1 ~= I7_TABLE_NOVALUE) return 0; if (TableRowIsBlank(tab, row1)) { if (TableRowIsBlank(tab, row2)) return 0; return -1*dir; } if (TableRowIsBlank(tab, row2)) return dir; return 0; } if (val1 == I7_TABLE_NOVALUE) return -1*dir; if (val2 == I7_TABLE_NOVALUE) return dir; if (((tab-->col)-->1) & I7_COLUMN_SIGNED) { if (val1 > val2) return 1; return -1; } else { if (UnsignedCompare(val1, val2) > 0) return 1; return -1; } ]; [ TableSort tab col dir i j k f; for (i=1:i<=tab-->0:i++) { j = tab-->i; ! Address of column table if ((j-->1) & I7_COLUMN_DONTSORTME) return RunTimeProblem(RTP_TABLE_CANTSORT, tab); } if (col >= 100) col=TableFindCol(tab, col, false); k = TableRows(tab); f = true; while (f) { f = false; for (i=1:i<=k:i++) for (j=i+1:j<=k:j++) if (dir*TableCompareRows(tab, col, i, j, dir) > 0) { TableSwapRows(tab, i, j); f = true; break; } } ]; #ifdef I7_RANKING_TABLE; [ PrintRank i j v; print ", earning you the rank of "; j = TableRows(I7_RANKING_TABLE); for (i=j:i>=1:i--) if (score >= TableLookUpEntry(I7_RANKING_TABLE, 1, i)) { v = TableLookUpEntry(I7_RANKING_TABLE, 2, i); if (v ofclass String) print (string) v; else v(); "."; } "."; ]; #endif; ! End of Tables.i6 [ Adj_0 t_0; if (((t_0 ofclass K1_room))) return (((I7_Adjacent(real_location,t_0)))); rfalse; ]; [ Adj_1 t_0; if (((t_0 ofclass K2_thing))) return (((I7_CanSee(player,t_0)))); rfalse; ]; [ Adj_2 t_0; if (((t_0 ofclass K2_thing))) return (((I7_CanTouch(player,t_0)))); rfalse; ]; [ Adj_3 t_0; if (((t_0 ofclass K2_thing))) return ((~~((I7_CanSee(player,t_0))))); rfalse; ]; [ Adj_4 t_0; if (((t_0 ofclass K2_thing))) return ((~~((I7_CanTouch(player,t_0))))); rfalse; ]; [ Adj_5 t_0; if (((t_0 ofclass K2_thing))) return (((I7_Conceals( (I7_Holder(t_0)) ,t_0)))); rfalse; ]; [ Adj_6 t_0; if (((t_0 ofclass K2_thing))) return ((~~((I7_Conceals( (I7_Holder(t_0)) ,t_0))))); rfalse; ]; [ Adj_7 t_0; if (((t_0 ofclass K2_thing))) return (( (I7_OnStage(t_0)) )); rfalse; ]; [ Adj_8 t_0; if (((t_0 ofclass K2_thing))) return (( (I7_OnStage(t_0)==false) )); rfalse; ]; [ MistakeActionSub; switch(I7_mistake_code) { default: "I didn't understand that sentence."; } ]; [ text_routine_0 ; say__c=0; say__p=1; print (I7_string) SC_39; I7_RunOnParagraph(true); new_line; print (I7_string) SC_40; I7_RunOnParagraph(true); new_line; print (I7_string) SC_41; I7_RunOnParagraph(true); new_line; print (I7_string) SC_42; new_line; .L16; rtrue; ]; [ text_routine_1 ; say__c=0; say__p=1; print (I7_string) SC_43; style underline; print (I7_string) SC_44; style roman; print (I7_string) SC_45; new_line; .L17; rtrue; ]; [ text_routine_2 ; say__c=0; say__p=1; .L18; if (((player == O97_bob))) say__c=true; else jump L19; print (I7_string) SC_46; .L19; if (say__c==false) say__c=true; else jump L20; print (I7_string) SC_47; .L20; say__c = false; print (I7_string) SC_48; new_line; .L21; rtrue; ]; [ text_routine_3 ; say__c=0; say__p=1; print (I7_string) SC_49; I7_RunOnParagraph(true); new_line; print (I7_string) SC_50; I7_RunOnParagraph(true); new_line; print (I7_string) SC_51; I7_RunOnParagraph(true); new_line; print (I7_string) SC_52; I7_RunOnParagraph(true); new_line; print (I7_string) SC_53; I7_RunOnParagraph(true); new_line; print (I7_string) SC_54; .L22; rtrue; ]; Constant ActionCount = 80; Array ActionData table ##Inv $$00000000 58 58 "taking inventory" I6_NULL I6_NULL I6_NULL I6_NULL ##Take $$00001001 58 58 "taking" DA_Name I6_NULL I6_NULL I6_NULL ##Remove $$00011011 58 58 "removing" DA_Name "from" DA_Name I6_NULL ##Drop $$00001001 58 58 "dropping" DA_Name I6_NULL I6_NULL I6_NULL ##PutOn $$00011011 58 58 "putting" DA_Name "on" DA_Name I6_NULL ##Insert $$00011011 58 58 "inserting" DA_Name "into" DA_Name I6_NULL ##Wait $$00000000 58 58 "waiting" I6_NULL I6_NULL I6_NULL I6_NULL ##Go $$00001000 58 58 "going" DA_Name I6_NULL I6_NULL I6_NULL ##Enter $$00001001 58 58 "entering" DA_Name I6_NULL I6_NULL I6_NULL ##Exit $$00000000 58 58 "exiting" I6_NULL I6_NULL I6_NULL I6_NULL ##GetOff $$00001001 58 58 "getting off" DA_Name I6_NULL I6_NULL I6_NULL ##Look $$00000000 58 58 "looking" I6_NULL I6_NULL I6_NULL I6_NULL ##Examine $$00001100 58 58 "examining" DA_Name I6_NULL I6_NULL I6_NULL ##LookUnder $$00001100 58 58 "looking under" DA_Name I6_NULL I6_NULL I6_NULL ##Search $$00001101 58 58 "searching" DA_Name I6_NULL I6_NULL I6_NULL ##Consult $$00011001 58 72 "consulting" DA_Name "about" DA_Topic I6_NULL ##Lock $$10011011 58 58 "locking" DA_Name "with" DA_Name I6_NULL ##Unlock $$10011011 58 58 "unlocking" DA_Name "with" DA_Name I6_NULL ##SwitchOn $$00001001 58 58 "switching on" DA_Name I6_NULL I6_NULL I6_NULL ##SwitchOff $$00001001 58 58 "switching off" DA_Name I6_NULL I6_NULL I6_NULL ##Open $$00001001 58 58 "opening" DA_Name I6_NULL I6_NULL I6_NULL ##Close $$00001001 58 58 "closing" DA_Name I6_NULL I6_NULL I6_NULL ##Wear $$01001001 58 58 "wearing" DA_Name I6_NULL I6_NULL I6_NULL ##Disrobe $$01001001 58 58 "taking off" DA_Name I6_NULL I6_NULL I6_NULL ##Eat $$01001001 58 58 "eating" DA_Name I6_NULL I6_NULL I6_NULL ##Give $$01011011 58 58 "giving" DA_Name "to" DA_Name I6_NULL ##Show $$01011001 58 58 "showing" DA_Name "to" DA_Name I6_NULL ##WakeOther $$00001001 58 58 "waking" DA_Name I6_NULL I6_NULL I6_NULL ##ThrowAt $$01011001 58 58 "throwing" DA_Name "at" DA_Name I6_NULL ##Attack $$00001001 58 58 "attacking" DA_Name I6_NULL I6_NULL I6_NULL ##Kiss $$00001001 58 58 "kissing" DA_Name I6_NULL I6_NULL I6_NULL ##Answer $$00011001 58 72 "answering" DA_Name "that" DA_Topic I6_NULL ##Tell $$00011001 58 72 "telling" DA_Name "about" DA_Topic I6_NULL ##Ask $$00011001 58 72 "asking" DA_Name "about" DA_Topic I6_NULL ##AskFor $$00011011 58 58 "asking" DA_Name "for" DA_Name I6_NULL ##Touch $$00001001 58 58 "touching" DA_Name I6_NULL I6_NULL I6_NULL ##Wave $$00001001 58 58 "waving" DA_Name I6_NULL I6_NULL I6_NULL ##Pull $$00001001 58 58 "pulling" DA_Name I6_NULL I6_NULL I6_NULL ##Push $$00001001 58 58 "pushing" DA_Name I6_NULL I6_NULL I6_NULL ##Turn $$00001001 58 58 "turning" DA_Name I6_NULL I6_NULL I6_NULL ##PushDir $$00011011 58 58 "pushing" DA_Name "to" DA_Name I6_NULL ##Squeeze $$00001001 58 58 "squeezing" DA_Name I6_NULL I6_NULL I6_NULL ##Yes $$00000000 58 58 "saying yes" I6_NULL I6_NULL I6_NULL I6_NULL ##No $$00000000 58 58 "saying no" I6_NULL I6_NULL I6_NULL I6_NULL ##Burn $$00001001 58 58 "burning" DA_Name I6_NULL I6_NULL I6_NULL ##Wake $$00000000 58 58 "waking up" I6_NULL I6_NULL I6_NULL I6_NULL ##Think $$00000000 58 58 "thinking" I6_NULL I6_NULL I6_NULL I6_NULL ##Smell $$00001001 58 58 "smelling" DA_Name I6_NULL I6_NULL I6_NULL ##Listen $$00001001 58 58 "listening to" DA_Name I6_NULL I6_NULL I6_NULL ##Taste $$00001001 58 58 "tasting" DA_Name I6_NULL I6_NULL I6_NULL ##Cut $$00001001 58 58 "cutting" DA_Name I6_NULL I6_NULL I6_NULL ##Jump $$00000000 58 58 "jumping" I6_NULL I6_NULL I6_NULL I6_NULL ##Tie $$00011011 58 58 "tying" DA_Name "to" DA_Name I6_NULL ##Drink $$00001001 58 58 "drinking" DA_Name I6_NULL I6_NULL I6_NULL ##Sorry $$00000000 58 58 "saying sorry" I6_NULL I6_NULL I6_NULL I6_NULL ##Strong $$00000000 58 58 "swearing obscenely" I6_NULL I6_NULL I6_NULL I6_NULL ##Mild $$00000000 58 58 "swearing mildly" I6_NULL I6_NULL I6_NULL I6_NULL ##Swing $$00001001 58 58 "swinging" DA_Name I6_NULL I6_NULL I6_NULL ##Rub $$00001001 58 58 "rubbing" DA_Name I6_NULL I6_NULL I6_NULL ##SetTo $$00011001 58 72 "setting" DA_Name "to" DA_Topic I6_NULL ##WaveHands $$00000000 58 58 "waving hands" I6_NULL I6_NULL I6_NULL I6_NULL ##Buy $$00001001 58 58 "buying" DA_Name I6_NULL I6_NULL I6_NULL ##Sing $$00000000 58 58 "singing" I6_NULL I6_NULL I6_NULL I6_NULL ##Climb $$00001001 58 58 "climbing" DA_Name I6_NULL I6_NULL I6_NULL ##Sleep $$00000000 58 58 "sleeping" I6_NULL I6_NULL I6_NULL I6_NULL ##Score $$00100000 58 58 "requesting the score" I6_NULL I6_NULL I6_NULL I6_NULL ##Quit $$00100000 58 58 "quitting the game" I6_NULL I6_NULL I6_NULL I6_NULL ##Save $$00100000 58 58 "saving the game" I6_NULL I6_NULL I6_NULL I6_NULL ##Restore $$00100000 58 58 "restoring the game" I6_NULL I6_NULL I6_NULL I6_NULL ##Restart $$00100000 58 58 "restarting the game" I6_NULL I6_NULL I6_NULL I6_NULL ##Verify $$00100000 58 58 "verifying the story file" I6_NULL I6_NULL I6_NULL I6_NULL ##Version $$00100000 58 58 "requesting the story file version" I6_NULL I6_NULL I6_NULL I6_NULL ##ScriptOn $$00100000 58 58 "switching the story transcript on" I6_NULL I6_NULL I6_NULL I6_NULL ##ScriptOff $$00100000 58 58 "switching the story transcript off" I6_NULL I6_NULL I6_NULL I6_NULL ##LMode3 $$00100000 58 58 "preferring abbreviated room descriptions" I6_NULL I6_NULL I6_NULL I6_NULL ##LMode2 $$00100000 58 58 "preferring unabbreviated room descriptions" I6_NULL I6_NULL I6_NULL I6_NULL ##LMode1 $$00100000 58 58 "preferring sometimes abbreviated room descriptions" I6_NULL I6_NULL I6_NULL I6_NULL ##Pronouns $$00100000 58 58 "requesting the pronoun meanings" I6_NULL I6_NULL I6_NULL I6_NULL ##NotifyOn $$00100000 58 58 "switching score notification on" I6_NULL I6_NULL I6_NULL I6_NULL ##NotifyOff $$00100000 58 58 "switching score notification off" I6_NULL I6_NULL I6_NULL I6_NULL ; Array ActionCoding --> ##Inv ##Take ##Remove ##Drop ##PutOn ##Insert ##Wait ##Go ##Enter ##Exit ##GetOff ##Look ##Examine ##LookUnder ##Search ##Consult ##Lock ##Unlock ##SwitchOn ##SwitchOff ##Open ##Close ##Wear ##Disrobe ##Eat ##Give ##Show ##WakeOther ##ThrowAt ##Attack ##Kiss ##Answer ##Tell ##Ask ##AskFor ##Touch ##Wave ##Pull ##Push ##Turn ##PushDir ##Squeeze ##Yes ##No ##Burn ##Wake ##Think ##Smell ##Listen ##Taste ##Cut ##Jump ##Tie ##Drink ##Sorry ##Strong ##Mild ##Swing ##Rub ##SetTo ##WaveHands ##Buy ##Sing ##Climb ##Sleep ##Score ##Quit ##Save ##Restore ##Restart ##Verify ##Version ##ScriptOn ##ScriptOff ##LMode3 ##LMode2 ##LMode1 ##Pronouns ##NotifyOn ##NotifyOff; Array ActionHappened --> 0 0 0 0 0 0; [ InvSub; return GenericVerbSub(103,104,105,1); ]; [ TakeSub; return GenericVerbSub(106,107,108,1); ]; [ RemoveSub; return GenericVerbSub(109,110,111,1); ]; [ DropSub; return GenericVerbSub(112,113,114,1); ]; [ PutOnSub; return GenericVerbSub(115,116,117,1); ]; [ InsertSub; return GenericVerbSub(118,119,120,1); ]; [ WaitSub; return GenericVerbSub(121,122,123,1); ]; [ GoSub; return GenericVerbSub(124,125,126,1); ]; [ EnterSub; return GenericVerbSub(127,128,129,1); ]; [ ExitSub; return GenericVerbSub(130,131,132,1); ]; [ GetOffSub; return GenericVerbSub(133,134,135,1); ]; [ LookSub; return GenericVerbSub(136,137,138,1); ]; [ ExamineSub; return GenericVerbSub(139,140,141,1); ]; [ LookUnderSub; return GenericVerbSub(142,143,144,1); ]; [ SearchSub; return GenericVerbSub(145,146,147,1); ]; [ ConsultSub; return GenericVerbSub(148,149,150,1); ]; [ LockSub; return GenericVerbSub(151,152,153,1); ]; [ UnlockSub; return GenericVerbSub(154,155,156,1); ]; [ SwitchOnSub; return GenericVerbSub(157,158,159,1); ]; [ SwitchOffSub; return GenericVerbSub(160,161,162,1); ]; [ OpenSub; return GenericVerbSub(163,164,165,1); ]; [ CloseSub; return GenericVerbSub(166,167,168,1); ]; [ WearSub; return GenericVerbSub(169,170,171,1); ]; [ DisrobeSub; return GenericVerbSub(172,173,174,1); ]; [ EatSub; return GenericVerbSub(175,176,177,1); ]; [ GiveSub; return GenericVerbSub(178,179,180,1); ]; [ ShowSub; return GenericVerbSub(181,182,183,0); ]; [ WakeOtherSub; return GenericVerbSub(184,185,186,0); ]; [ ThrowAtSub; return GenericVerbSub(187,188,189,0); ]; [ AttackSub; return GenericVerbSub(190,191,192,0); ]; [ KissSub; return GenericVerbSub(193,194,195,0); ]; [ AnswerSub; return GenericVerbSub(196,197,198,0); ]; [ TellSub; return GenericVerbSub(199,200,201,0); ]; [ AskSub; return GenericVerbSub(202,203,204,0); ]; [ AskForSub; return GenericVerbSub(205,206,207,1); ]; [ TouchSub; return GenericVerbSub(208,209,210,1); ]; [ WaveSub; return GenericVerbSub(211,212,213,1); ]; [ PullSub; return GenericVerbSub(214,215,216,1); ]; [ PushSub; return GenericVerbSub(217,218,219,1); ]; [ TurnSub; return GenericVerbSub(220,221,222,1); ]; [ PushDirSub; return GenericVerbSub(223,224,225,1); ]; [ SqueezeSub; return GenericVerbSub(226,227,228,1); ]; [ YesSub; return GenericVerbSub(229,230,231,0); ]; [ NoSub; return GenericVerbSub(232,233,234,0); ]; [ BurnSub; return GenericVerbSub(235,236,237,0); ]; [ WakeSub; return GenericVerbSub(238,239,240,0); ]; [ ThinkSub; return GenericVerbSub(241,242,243,0); ]; [ SmellSub; return GenericVerbSub(244,245,246,0); ]; [ ListenSub; return GenericVerbSub(247,248,249,0); ]; [ TasteSub; return GenericVerbSub(250,251,252,0); ]; [ CutSub; return GenericVerbSub(253,254,255,0); ]; [ JumpSub; return GenericVerbSub(256,257,258,0); ]; [ TieSub; return GenericVerbSub(259,260,261,0); ]; [ DrinkSub; return GenericVerbSub(262,263,264,0); ]; [ SorrySub; return GenericVerbSub(265,266,267,0); ]; [ StrongSub; return GenericVerbSub(268,269,270,0); ]; [ MildSub; return GenericVerbSub(271,272,273,0); ]; [ SwingSub; return GenericVerbSub(274,275,276,0); ]; [ RubSub; return GenericVerbSub(277,278,279,0); ]; [ SetToSub; return GenericVerbSub(280,281,282,0); ]; [ WaveHandsSub; return GenericVerbSub(283,284,285,0); ]; [ BuySub; return GenericVerbSub(286,287,288,0); ]; [ SingSub; return GenericVerbSub(289,290,291,0); ]; [ ClimbSub; return GenericVerbSub(292,293,294,0); ]; [ SleepSub; return GenericVerbSub(295,296,297,0); ]; [ ScoreSub; return GenericVerbSub(298,299,300,0); ]; [ QuitSub; return GenericVerbSub(301,302,303,0); ]; [ SaveSub; return GenericVerbSub(304,305,306,0); ]; [ RestoreSub; return GenericVerbSub(307,308,309,0); ]; [ RestartSub; return GenericVerbSub(310,311,312,0); ]; [ VerifySub; return GenericVerbSub(313,314,315,0); ]; [ VersionSub; return GenericVerbSub(316,317,318,0); ]; [ ScriptOnSub; return GenericVerbSub(319,320,321,0); ]; [ ScriptOffSub; return GenericVerbSub(322,323,324,0); ]; [ LMode3Sub; return GenericVerbSub(325,326,327,0); ]; [ LMode2Sub; return GenericVerbSub(328,329,330,0); ]; [ LMode1Sub; return GenericVerbSub(331,332,333,0); ]; [ PronounsSub; return GenericVerbSub(334,335,336,0); ]; [ NotifyOnSub; return GenericVerbSub(337,338,339,0); ]; [ NotifyOffSub; return GenericVerbSub(340,341,342,0); ]; ! Verbs.i6 segment [ AllowPushDir i oldrm newrm infl; if ((noun ofclass K2_thing) && (noun hasnt pushable)) return L__M(##PushDir,1,noun); if (parent(second)~=compass) return L__M(##PushDir,2,noun); if (second==u_obj or d_obj) return L__M(##PushDir,3,noun); AfterRoutines(); i=noun; if (actor notin noun) { move i to actor; infl = true; } move_pushing = i; oldrm = Room_Of(noun); ; newrm = Room_Of(actor); move_pushing = nothing; move i to newrm; if (newrm ~= oldrm) { if (IndirectHolder(i, player)) I7_TryAction(0, player, ##Look, 0, 0); RulebookSucceeds(); } else RulebookFails(); ]; Global GVS_converted = -1; [ GVS_Convert ac n s; GVS_converted = InformLibrary.begin_action(ac, n, s); rtrue; ]; [ GenericVerbSub ch co re any vis rv; @push GVS_converted; GVS_converted = -1; if (actor ~= player) { if (act_requester) { act_requester = nothing; if (ActionPrimitive() == false) { if (ProcessRulebook(UNABLE_RB) == false) { print (The) actor, " ", (IsOrAre) actor, " unable to do that.^^"; } } jump HappyEnding; } vis = I7_CanSee(player, actor); if ((noun ofclass K2_thing) && (~~(noun ofclass K7_backdrop))) vis = vis || (I7_CanSee(player, noun)); if ((second ofclass K2_thing) && (~~(second ofclass K7_backdrop))) vis = vis || (I7_CanSee(player, second)); if (rv=ProcessRulebook(GENERIC_CHECK_RB)) jump FailsUnlessConverted; if (any && (rv=ProcessRulebook(ch))) jump FailsUnlessConverted; if (ProcessRulebook(GENERIC_CARRYOUT_RB) == 0) if (any) ProcessRulebook(co); if (rv=ProcessRulebook(AFTER_RB)) jump HappyEnding; vis = vis || (I7_CanSee(player, actor)); if ((noun ofclass K2_thing) && (~~(noun ofclass K7_backdrop))) vis = vis || (I7_CanSee(player, noun)); if ((second ofclass K2_thing) && (~~(second ofclass K7_backdrop))) vis = vis || (I7_CanSee(player, second)); if (keep_silent || (vis==false)) jump HappyEnding; if (rv=ProcessRulebook(GENERIC_REPORT_RB)) jump HappyEnding; if (any) rv=ProcessRulebook(re); jump HappyEnding; } if ((rv=ProcessRulebook(GENERIC_CHECK_RB)) || (rv=ProcessRulebook(ch))) jump FailsUnlessConverted; if (ProcessRulebook(GENERIC_CARRYOUT_RB) == 0) ProcessRulebook(co); if (meta) say__p = 0; if (rv=ProcessRulebook(AFTER_RB)) jump HappyEnding; if (keep_silent) jump HappyEnding; if (rv=ProcessRulebook(GENERIC_REPORT_RB)) jump HappyEnding; rv=ProcessRulebook(re); .HappyEnding; ActRulebookSucceeds(rv); @pull GVS_converted; rtrue; .FailsUnlessConverted; if (GVS_converted == 1) jump HappyEnding; ActRulebookFails(rv); @pull GVS_converted; rtrue; ]; [ GL__M a b c; if ((actor ~= player) || (untouchable_silence)) rtrue; return L__M(a,b,c); ]; [ HisHerTheir o; if (o has pluralname) { print "their"; return; } if (o has female) { print "her"; return; } print "his"; ]; ! Waiting [ WaitSub_R1; if (actor ~= player) print_ret (The) actor, " waits.^"; return L__M(##Wait,1,noun); ]; ! The inventory [ InvSub_O1; if (actor ~= player) rfalse; if (inventory_style==0) inventory_style = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT; rfalse; ]; [ InvSub_O2; if (actor ~= player) rfalse; if (child(player)==0) return L__M(##Inv,1); rfalse; ]; [ InvSub_O3; if (actor ~= player) rfalse; L__M(##Inv,2); if (inventory_style & NEWLINE_BIT ~= 0) print ":^"; else print " "; WriteListFrom(child(player), inventory_style, 1); if (inventory_style & ENGLISH_BIT ~= 0) print ".^"; rfalse; ]; [ InvSub_O4 x; if (actor ~= player) rfalse; #IFNDEF MANUAL_PRONOUNS; objectloop(x in player) PronounNotice(x); #ENDIF; x = 0; ! To prevent a "not used" error rfalse; ]; [ InvSub_R1; if (actor ~= player) print_ret (The) actor, " looks through ", (HisHerTheir) actor, " possessions.^"; rfalse; ]; ! Object movements Global ac_common_ancestor; Global take_after_recipient; [ TakeSub_C1; if (onotheld_mode==1 && noun in actor) { RulebookSucceeds(); rtrue; } rfalse; ]; [ TakeSub_C2; if (noun == actor) return GL__M(##Take,2); rfalse; ]; [ TakeSub_C3; if (noun has animate) return GL__M(##Take,3,noun); rfalse; ]; [ TakeSub_C4 i; ! if (noun provides component_parent) ! return GL__M(##Take,7,noun.component_parent); ac_common_ancestor = OIU_CommonAncestor(actor, noun); if (ac_common_ancestor == 0) { i = ObjectScopedBySomething(noun); if (i ~= 0) ac_common_ancestor = CommonAncestor(actor, i); } rfalse; ]; [ OIUB_AP i; if (noun ~= ac_common_ancestor) { i = OIU_Parent(noun); while (i~=ac_common_ancestor && i) { if (i has animate) return GL__M(##Take,6,i); i = OIU_Parent(i); } } rfalse; ]; ![ TakeSub_C5; ! if (ac_common_ancestor == 0) return GL__M(##Take,8,noun); rfalse; ]; [ TakeSub_C6; if (ac_common_ancestor == noun) return GL__M(##Take,4,noun); rfalse; ]; [ TakeSub_C7; if (noun in actor) return GL__M(##Take,5,noun); rfalse; ]; [ TakeSub_C8 i k; i=parent(noun); take_after_recipient = 0; if (i && (i ~= ac_common_ancestor) && (i has container || i has supporter)) { take_after_recipient=i; k=action; action=##LetGo; if (RunRoutines(i,before)~=0) { action=k; rtrue; } action=k; } rfalse; ]; [ TakeSub_C9; if (noun has scenery) return GL__M(##Take,10,noun); rfalse; ]; [ TakeSub_C10; if (noun has static) return GL__M(##Take,11,noun); rfalse; ]; [ TakeSub_C11 j k ks; if (SACK_OBJECT == nothing || SACK_OBJECT notin actor) rfalse; k=0; objectloop (j in actor) if (j hasnt worn) k++; if (k >= ValueOrRun(actor,capacity)) { j=0; objectloop (k in actor) if (k~=SACK_OBJECT && k hasnt worn && k hasnt light) j=k; if (j~=0) { GL__M(##Take,13,j); ks = keep_silent; keep_silent = 1; ; keep_silent = ks; if (j notin SACK_OBJECT) rtrue; rfalse; } } rfalse; ]; [ TakeSub_C12 j k; k=0; objectloop (j in actor) if (j hasnt worn) k++; if (k >= ValueOrRun(actor,capacity)) return GL__M(##Take,12); rfalse; ]; [ TakeSub_O1 rest i; ! if ((noun provides component_parent) && (rest = (noun.component_parent))) { ! noun.component_parent = nothing; ! if (rest provides add_to_scope) { ! for (i=0: i<(rest.#add_to_scope)/2: i++) { ! if ((rest.&add_to_scope)-->i == noun) ! (rest.&add_to_scope)-->i = nothing; ! } ! } ! } ! move noun to actor; I7_Move(noun, actor); rfalse; ]; [ TakeSub_O2 k; if (take_after_recipient) { k=action; action=##LetGo; if (RunRoutines(take_after_recipient,after)~=0) { action=k; rtrue; } action=k; } rfalse; ]; [ TakeSub_R1; if (actor == player) { notheld_mode=onotheld_mode; if (notheld_mode==1) { RulebookSucceeds(); rtrue; } } rfalse; ]; [ TakeSub_R2; if (player == actor) return GL__M(##Take, 1); print (The) actor, " picks up ", (the) noun, ".^^"; ]; [ RemoveSub_C1 i; i=parent(noun); if (i has container && i hasnt open) return GL__M(##Remove,1,noun); rfalse; ]; [ RemoveSub_C2 i; i=parent(noun); if (i~=second) return GL__M(##Remove,2,noun); rfalse; ]; [ RemoveSub_C3 i; i=parent(noun); if (i has animate) return GL__M(##Take,6,i); rfalse; ]; [ RemoveSub_C4; return GVS_Convert(##Take, noun, 0); ]; [ RemoveSub_O2; action=##Take; if (AfterRoutines()==1) { action=##Remove; rtrue; } action=##Remove; rfalse; ]; [ RemoveSub_R1; if (player == actor) return GL__M(##Remove,3,noun); print (The) actor, " removes ", (the) noun, " from ", (the) second, ".^^"; ]; [ DropSub_C1; if (noun == actor) return GL__M(##PutOn, 4); rfalse; ]; [ DropSub_C2; if (noun in parent(actor)) return GL__M(##Drop,1,noun); rfalse; ]; [ DropSub_C3; if (noun notin actor) return GL__M(##Drop,2,noun); rfalse; ]; [ DropSub_C4 k; if (noun has worn) { GL__M(##Drop,3,noun); say__p=0; k = keep_silent; keep_silent = 1; ; keep_silent = k; if (noun has worn && noun in actor) rtrue; } rfalse; ]; [ DropSub_C5 p; p = parent(actor); if (p ofclass K1_room) rfalse; if (children(p) < ValueOrRun(p,capacity)) rfalse; if (actor ~= player) rtrue; print "There is no more room "; if (p has supporter) print "on "; else print "in "; print (the) p, ".^^"; rtrue; ]; [ DropSub_O1; I7_Move(noun, parent(actor)); give noun ~worn; rfalse; ]; [ DropSub_R1; if (player == actor) return GL__M(##Drop,4,noun); print (The) actor, " puts down ", (the) noun, ".^^"; ]; [ PutOnSub_C1; if (second == d_obj || actor in second) return GVS_Convert(##Drop, noun, 0); rfalse; ]; [ PutOnSub_C2; if (parent(noun)~=actor) return GL__M(##PutOn,1,noun); rfalse; ]; [ PutOnSub_C3; if (OIU_Core(noun) == OIU_Core(second)) return GL__M(##PutOn,2,noun); ac_common_ancestor = OIU_CommonAncestor(noun, second); if (ac_common_ancestor == noun) return GL__M(##PutOn,2,noun); rfalse; ]; [ PutOnSub_C4; if (second ~= ac_common_ancestor) { action=##Receive; receive_action=##PutOn; if (RunRoutines(second,before)~=0) { action=##PutOn; return; } action=##PutOn; } rfalse; ]; [ PutOnSub_C5; if (second hasnt supporter) return GL__M(##PutOn,3,second); rfalse; ]; [ PutOnSub_C6; if (ac_common_ancestor == actor) return GL__M(##PutOn,4); rfalse; ]; [ PutOnSub_C7 k; if (noun has worn) { GL__M(##PutOn,5,noun); say__p=0; k = keep_silent; keep_silent = 1; ; keep_silent = k; if (noun has worn) rtrue; } rfalse; ]; [ PutOnSub_C8; if (children(second)>=ValueOrRun(second,capacity)) return GL__M(##PutOn,6,second); rfalse; ]; [ PutOnSub_O1; move noun to second; give noun ~worn; rfalse; ]; [ PutOnSub_O2; if (second ~= ac_common_ancestor) { action=##Receive; if (RunRoutines(second,after)~=0) { action=##PutOn; return; } action=##PutOn; } rfalse; ]; [ PutOnSub_R1; if (player == actor) { if (multiflag==1) return GL__M(##PutOn,7); return GL__M(##PutOn,8,noun); } else { print (The) actor, " puts ", (the) noun, " on ", (the) second, ".^^"; rtrue; } ]; [ InsertSub_C1; if (second==d_obj || actor in second) return GVS_Convert(##Drop, noun, 0);; rfalse; ]; [ InsertSub_C2; if (parent(noun)~=actor) return GL__M(##Insert,1,noun); rfalse; ]; [ InsertSub_C3; if (OIU_Core(noun) == OIU_Core(second)) return GL__M(##Insert, 5, noun); ac_common_ancestor = OIU_CommonAncestor(noun, second); if (ac_common_ancestor == noun) return GL__M(##Insert, 5, noun); rfalse; ]; [ InsertSub_C4; if (second ~= ac_common_ancestor) { action=##Receive; receive_action = ##Insert; if (RunRoutines(second,before)~=0) { action=##Insert; rtrue; } action=##Insert; } rfalse; ]; [ InsertSub_C5; if (second ~= ac_common_ancestor) { if (second has container && second hasnt open) return GL__M(##Insert,3,second); } rfalse; ]; [ InsertSub_C6; if (second hasnt container) return GL__M(##Insert,2,second); rfalse; ]; [ InsertSub_C7 k; if (noun has worn) { GL__M(##Insert,6,noun); say__p=0; k = keep_silent; keep_silent = 1; ; keep_silent = k; if (noun has worn) rtrue; } rfalse; ]; [ InsertSub_C8; if (children(second) >= ValueOrRun(second,capacity)) return GL__M(##Insert,7,second); rfalse; ]; [ InsertSub_O1; move noun to second; give noun ~worn; rfalse; ]; [ InsertSub_O2; if (second ~= ac_common_ancestor) { action=##Receive; if (RunRoutines(second,after)~=0) { action=##Insert; rtrue; } action=##Insert; } rfalse; ]; [ InsertSub_R1; if (actor == player) { if (multiflag==1) return GL__M(##Insert,8,noun); GL__M(##Insert,9,noun); } else { print (The) actor, " puts ", (the) noun, " into ", (the) second, ".^^"; } rtrue; ]; ! Actions involving movement of the player [ EnterSub_C1; if (noun has door) return GVS_Convert(##Go, noun, 0);; rfalse; ]; [ EnterSub_C2; if (noun in compass) return GVS_Convert(##Go, noun, 0);; rfalse; ]; [ EnterSub_C3; if (actor in noun) return GL__M(##Enter,1,noun); rfalse; ]; [ EnterSub_C4; if (noun hasnt enterable) return GL__M(##Enter,2,noun); rfalse; ]; [ EnterSub_C5; if (noun has container && noun hasnt open) return GL__M(##Enter,3,noun); rfalse; ]; [ EnterSub_C6; ac_common_ancestor = OIU_CommonAncestor(actor, noun); rfalse; ]; [ EnterSub_C7; if (ac_common_ancestor == actor) return GL__M(##Enter,4,noun); rfalse; ]; [ EnterSub_C8 i j k; if (parent(actor) ~= parent(noun)) { while (actor notin ac_common_ancestor) { j = parent(actor); k = keep_silent; if (OIU_parent(j) ~= ac_common_ancestor || noun ~= ac_common_ancestor) { GL__M(##Enter,6,j); keep_silent = 1; } ; keep_silent = k; if (actor in j) return; } if (actor in noun) return; if (noun notin ac_common_ancestor) { if ((noun provides component_parent) && (noun.component_parent)) { j = OIU_Parent(noun); if (j) j = OIU_Parent(j); } else j = OIU_parent(noun); while (j && (OIU_parent(j) ~= ac_common_ancestor)) j = OIU_parent(j); if (j) { GL__M(##Enter,7,j); k = keep_silent; keep_silent = 1; ; keep_silent = k; if (actor notin j) return; return GVS_Convert(##Enter, noun, 0);; } } } rfalse; ]; [ EnterSub_O1; move actor to noun; rfalse; ]; [ EnterSub_R1; if (actor ~= player) { print (The) actor, " gets "; if (noun has container) print "into "; else print "onto "; print (the) noun, ".^^"; } GL__M(##Enter,5,noun); rfalse; ]; [ EnterSub_R2; if (actor == player) Locale(noun); rfalse; ]; [ ExitSub_C1; if (actor in Room_Of(actor)) { if ((parent(actor)).out_to ~= 0) return GVS_Convert(##Go, out_obj, 0);; } rfalse; ]; [ ExitSub_C2; if (actor in Room_Of(actor)) return GL__M(##Exit,1); rfalse; ]; [ ExitSub_C3 p; p=parent(actor); if (p has container && p hasnt open) return GL__M(##Exit,2,p); rfalse; ]; [ ExitSub_O1; noun = parent(actor); move actor to OIU_Parent(noun); rfalse; ]; [ ExitSub_R1; if (actor ~= player) print (The) actor, " gets out of ", (the) noun, ".^^"; GL__M(##Exit,3,noun); rfalse; ]; [ ExitSub_R2; if (actor == player) LookSub_P(1); rfalse; ]; [ GetOffSub_C1; if (actor in noun) <>; rfalse; ]; [ GetOffSub_C2; return GL__M(##GetOff,1,noun); ]; Global go_to_location; Global go_from_location; Global go_with_vehicle; Global go_dir_prop; [ Room_Of p; while(p) { if (p ofclass K1_room) return p; if (parent(p)) { p = parent(p); continue; } if (p.component_parent) { p = p.component_parent; continue; } return nothing; } return nothing; ]; [ GoSub_C1; go_to_location = 0; go_from_location = Room_Of(actor); go_with_vehicle = 0; go_dir_prop = 0; if (second ~= 0 && second notin Compass && ObjectIsUntouchable(second)) return; rfalse; ]; [ GoSub_C2 i j k; i=parent(actor); if (i ~= go_from_location) { j = location; location = go_from_location; k=RunRoutines(i,before); if (k~=3) location = j; if (k==1) go_with_vehicle = i; } rfalse; ]; [ GoSub_C3 i; if (go_with_vehicle == nothing) { i=parent(actor); if (i ~= go_from_location) { return GL__M(##Go,1,i); } } rfalse; ]; [ GoSub_C4 j; go_dir_prop=noun.door_dir; j = location; location = go_from_location; if (go_dir_prop ofclass Routine) go_dir_prop=RunRoutines(noun,door_dir); location = j; rfalse; ]; [ GoSub_C5 i; i = Room_Of(actor); if (go_with_vehicle) i = Room_Of(go_with_vehicle); go_to_location = i.go_dir_prop; rfalse; ]; [ GoSub_C6; if (go_to_location ofclass String) { if (player == actor) { print (string) go_to_location; new_line; } rtrue; } rfalse; ]; [ GoSub_C7 i j; i = Room_Of(actor); if (go_with_vehicle) i = Room_Of(go_with_vehicle); if (go_to_location ofclass Routine) { j = location; location = go_from_location; go_to_location = RunRoutines(i, go_dir_prop); location = j; if (go_to_location == true) rtrue; } rfalse; ]; [ GoSub_C8 i; i = parent(actor); if (go_with_vehicle) i = Room_Of(go_with_vehicle); if (go_to_location == nothing) { if (actor == player) { PrintOrRun(i, cant_go); say__p = 1; } rtrue; } rfalse; ]; [ GoSub_C9; if (go_to_location has door && go_to_location has concealed) return GL__M(##Go,2); rfalse; ]; [ GoSub_C10; if (go_to_location has door && go_to_location hasnt open) { if (noun==u_obj) return GL__M(##Go,3,go_to_location); if (noun==d_obj) return GL__M(##Go,4,go_to_location); return GL__M(##Go,5,go_to_location); } rfalse; ]; [ GoSub_C11 k j; if (go_to_location has door) { j = location; location = go_from_location; k=RunRoutines(go_to_location,door_to); location = j; if (k==0) return GL__M(##Go,6,go_to_location); if (k==1) rtrue; go_to_location = k; } rfalse; ]; [ GoSub_O1; if (go_with_vehicle==0) { if (actor == player) move player to go_to_location; else I7_Move(actor, go_to_location); } else I7_Move(go_with_vehicle, go_to_location); if (actor == player) location=go_to_location; rfalse; ]; [ GoSub_O2; if (actor == player) MoveFloatingObjects(); rfalse; ]; [ GoSub_O3 df; if (actor ~= player) rfalse; df = OffersLight(go_to_location); if (df~=0) { location=go_to_location; real_location=go_to_location; lightflag=1; } else { if (go_from_location == thedark) { DarkToDark(); if (deadflag~=0) rtrue; } real_location=go_to_location; location=thedark; lightflag=0; } rfalse; ]; [ GoSub_R1; if (player == actor) { if (say__pc & PARA_COMPLETED == 0) new_line; LookSub_P(1); } else { say__p = 1; print (The) actor; if (noun ofclass K3_direction) { if (location == go_from_location) print " goes "; else print " arrives "; if (location == go_to_location) { print "from "; switch (noun.p10_opposite) { u_obj: print "above"; d_obj: print "below"; default: print "the ", (name) noun.p10_opposite; } } else { if (location == go_from_location) { switch (noun) { u_obj: print "up"; d_obj: print "down"; default: print (name) noun; } } else { print "at ", (the) go_to_location, " from "; switch (noun.p10_opposite) { u_obj: print "above"; d_obj: print "below"; default: print "the ", (name) noun.p10_opposite; } } } } else { if (location == go_from_location) print " goes through "; else print " arrives from "; print (the) noun; } if (go_with_vehicle) { if (go_with_vehicle has supporter) print " on "; else print " in "; print (the) go_with_vehicle; } if (move_pushing) { print ", pushing ", (the) move_pushing; if (IndirectHolder(move_pushing, player)) { print " in front, and you along too"; } else { if (IndirectHolder(go_with_vehicle, player)) print " in front"; else if (location == go_from_location) print " away"; else print " in"; } } if ((IndirectHolder(go_with_vehicle, player)) && (IndirectHolder(move_pushing, player) == false)) { print ", taking you along.^"; I7_TryAction(0, player, ##Look, 0, 0); rfalse; } print ".^"; } rfalse; ]; ! Actions involving sight Global allow_abbreviated_look = 0; Global visibility_levels; [ LookSub_P allow_abbrev; allow_abbreviated_look = allow_abbrev; LookSub(); allow_abbreviated_look = 0; ]; [ LookSub_O1; if (actor ~= player) rfalse; if (parent(actor)==0) return RunTimeError(10); visibility_levels = 0; .MovedByInitial; if (location == thedark) { visibility_ceiling = thedark; NoteArrival(); } else { visibility_levels = FindVisibilityLevels(); if (visibility_ceiling == location) { NoteArrival(); if (visibility_ceiling ~= location) jump MovedByInitial; } } rfalse; ]; [ LookSub_O2 i j; ! Printing the top line: e.g. ! Octagonal Room (on the table) (as Frodo) if (actor ~= player) rfalse; I7_DivideParagraph(); style bold; if (visibility_levels == 0) print (name) thedark; else { if (visibility_ceiling ~= location) print (The) visibility_ceiling; else print (name) visibility_ceiling; } style roman; for (j=1, i=Vis_parent(actor):j0: j--, i=Vis_parent(i)) give i workflag; for (j=visibility_levels: j>0: j--) { for (i=actor, k=0: k; if (noun has worn) { RulebookFails(); rtrue; } } rfalse; ]; [ EatSub_O1; I7_Remove(noun); rfalse; ]; [ EatSub_R1; if (actor ~= player) print (The) actor, " eats ", (the) noun, ".^^"; GL__M(##Eat,2,noun); RulebookSucceeds(); rtrue; ]; ! Actions which are checked but then do nothing [ TouchSub_R1; if (noun==actor) { if (actor ~= player) { print (The) actor, " touches "; if (actor has female) print "herself.^^"; else print "himself.^^"; } return GL__M(##Touch,3,noun); } rfalse; ]; [ TouchSub_R2; if (actor ~= player) { print (The) actor, " touches "; if (noun == player) print "you"; else print (the) noun; ".^"; } if (noun has animate) return GL__M(##Touch,1,noun); rfalse; ]; [ TouchSub_R3; if (actor ~= player) print (The) actor, " touches ", (the) noun, ".^^"; return GL__M(##Touch,2,noun); ]; [ WaveSub_C1; if (noun notin actor) return GL__M(##Wave,1,noun); rfalse; ]; [ WaveSub_R1; if (actor ~= player) print (The) actor, " waves ", (the) noun, ".^^"; return GL__M(##Wave,2,noun); ]; [ PullSub_C1; if (noun has static) return GL__M(##Pull,1,noun); rfalse; ]; [ PullSub_C2; if (noun has scenery) return GL__M(##Pull,2,noun); rfalse; ]; [ PullSub_C3; if (noun has animate) return GL__M(##Pull,4,noun); rfalse; ]; [ PullSub_R1; if (actor ~= player) print (The) actor, " pulls ", (the) noun, ".^^"; return GL__M(##Pull,3,noun); ]; [ PushSub_C1; if (noun has static) return GL__M(##Push,1,noun); rfalse; ]; [ PushSub_C2; if (noun has scenery) return GL__M(##Push,2,noun); rfalse; ]; [ PushSub_C3; if (noun has animate) return GL__M(##Pull,4,noun); rfalse; ]; [ PushSub_R1; if (actor ~= player) print (The) actor, " pushes ", (the) noun, ".^^"; return GL__M(##Push,3,noun); ]; [ TurnSub_C1; if (noun has static) return GL__M(##Turn,1,noun); rfalse; ]; [ TurnSub_C2; if (noun has scenery) return GL__M(##Turn,2,noun); rfalse; ]; [ TurnSub_C3; if (noun has animate) return GL__M(##Pull,4,noun); rfalse; ]; [ TurnSub_R1; if (actor ~= player) print (The) actor, " turns ", (the) noun, ".^^"; return GL__M(##Turn,3,noun); ]; [ PushDirSub_C1; return GL__M(##PushDir,1,noun); ]; [ SqueezeSub_C1; if (noun has animate) return GL__M(##Squeeze,1,noun); rfalse; ]; [ SqueezeSub_R1; if (actor ~= player) print (The) actor, " squeezes ", (the) noun, ".^^"; return GL__M(##Squeeze,2,noun); ]; ! Actions concerning other people [ GiveSub_C1; if (parent(noun)~=actor) return GL__M(##Give,1,noun); rfalse; ]; [ GiveSub_C2; if (second==actor) return GL__M(##Give,2,noun); rfalse; ]; [ GiveSub_C3; if (RunLife(second,##Give)~=0) rtrue; rfalse; ]; [ GiveSub_C4; if (second ofclass K8_person) rfalse; return GL__M(##Give,4,second); ]; [ GiveSub_C5; return GL__M(##Give,3,second); ]; [ GiveSub_O1; I7_Move(noun, second); rfalse; ]; [ GiveSub_R1; if (actor ~= player) print (The) actor, " gives "; else print "You give "; print (the) noun, " to "; if (second ~= player) print (the) second, ".^^"; else print "you.^^"; rtrue; ]; [ ShowSub_C1; if (parent(noun)~=actor) return GL__M(##Show,1,noun); rfalse; ]; [ ShowSub_C2; if (second==actor) return GVS_Convert(##Examine, noun, 0);; rfalse; ]; [ ShowSub_C3; if (RunLife(second,##Show)~=0) rtrue; rfalse; ]; [ ShowSub_C4; return GL__M(##Show,2,second); ]; [ WakeOtherSub_C1; if (RunLife(noun,##WakeOther)~=0) rtrue; rfalse; ]; [ WakeOtherSub_C2; return GL__M(##WakeOther,1,noun); ]; [ ThrowAtSub_C1; if (second>1) { action=##ThrownAt; if (RunRoutines(second,before)~=0) { action=##ThrowAt; rtrue; } action=##ThrowAt; } rfalse; ]; [ ThrowAtSub_C2 k; if (noun has worn) { GL__M(##Drop,3,noun); say__p=0; k = keep_silent; keep_silent = 1; ; keep_silent = k; if (noun has worn && noun in actor) rtrue; } rfalse; ]; [ ThrowAtSub_C3; if (second hasnt animate) return GL__M(##ThrowAt,1); rfalse; ]; [ ThrowAtSub_C4; if (RunLife(second,##ThrowAt)~=0) rtrue; rfalse; ]; [ ThrowAtSub_C5; return GL__M(##ThrowAt,2,noun); ]; [ AttackSub_C1; if (noun has animate && RunLife(noun,##Attack)~=0) rtrue; rfalse; ]; [ AttackSub_C2; return GL__M(##Attack,1,noun); ]; [ KissSub_C1; if (noun==actor) return GL__M(##Touch,3,noun); rfalse; ]; [ KissSub_C2; if (RunLife(noun,##Kiss)~=0) rtrue; rfalse; ]; [ KissSub_C3; return GL__M(##Kiss,1,noun); ]; [ AnswerSub_C1; if (second~=0 && inp2 ~= 1 && RunLife(second,##Answer)~=0) rtrue; rfalse; ]; [ AnswerSub_C2; return GL__M(##Answer,1,noun); ]; [ TellSub_C1; if (noun==actor) return GL__M(##Tell,1,noun); rfalse; ]; [ TellSub_C2; if (RunLife(noun,##Tell)~=0) rtrue; rfalse; ]; [ TellSub_C3; return GL__M(##Tell,2,noun); ]; [ AskSub_C1; if (RunLife(noun,##Ask)~=0) rtrue; rfalse; ]; [ AskSub_C2; return GL__M(##Ask,1,noun); ]; [ AskForSub_C1; if (noun==actor) <>; rfalse; ]; [ AskForSub_C2; I7_TryAction(1, noun, ##Give, second, actor); rtrue; ]; ! Actions blocked in all cases [ YesSub_C1; return GL__M(##Yes); ]; [ NoSub_C1; return GL__M(##No); ]; [ BurnSub_C1; return GL__M(##Burn); ]; [ PraySub_C1; return GL__M(##Pray); ]; [ WakeSub_C1; return GL__M(##Wake); ]; [ ThinkSub_C1; return GL__M(##Think); ]; [ SmellSub_C1; return GL__M(##Smell,1,noun); ]; [ ListenSub_C1; return GL__M(##Listen,1,noun); ]; [ TasteSub_C1; return GL__M(##Taste,1,noun); ]; [ DigSub_C1; return GL__M(##Dig,1,noun); ]; [ CutSub_C1; return GL__M(##Cut,1,noun); ]; [ JumpSub_C1; return GL__M(##Jump,1,noun); ]; [ JumpOverSub_C1; return GL__M(##JumpOver,1,noun); ]; [ TieSub_C1; return GL__M(##Tie,1,noun); ]; [ DrinkSub_C1; return GL__M(##Drink,1,noun); ]; [ FillSub_C1; return GL__M(##Fill,1,noun); ]; [ SorrySub_C1; return GL__M(##Sorry,1,noun); ]; [ StrongSub_C1; return GL__M(##Strong,1,noun); ]; [ MildSub_C1; return GL__M(##Mild,1,noun); ]; [ SwimSub_C1; return GL__M(##Swim,1,noun); ]; [ SwingSub_C1; return GL__M(##Swing,1,noun); ]; [ BlowSub_C1; return GL__M(##Blow,1,noun); ]; [ RubSub_C1; return GL__M(##Rub,1,noun); ]; [ SetSub_C1; return GL__M(##Set,1,noun); ]; [ SetToSub_C1; return GL__M(##SetTo,1,noun); ]; [ WaveHandsSub_C1; return GL__M(##WaveHands,1,noun); ]; [ BuySub_C1; return GL__M(##Buy,1,noun); ]; [ SingSub_C1; return GL__M(##Sing,1,noun); ]; [ ClimbSub_C1; return GL__M(##Climb,1,noun); ]; [ SleepSub_C1; return GL__M(##Sleep,1,noun); ]; [ ScoreSub_O1; #ifdef I7_NOSCORE; "[There is no numerical score.]"; #ifnot; GL__M(##Score); PrintRank(); #endif; ]; [ FullScoreSub_O1 i; ScoreSub_O1(); #ifndef I7_NOSCORE; if (score==0 || TASKS_PROVIDED==1) rfalse; new_line; GL__M(##FullScore,1); for (i=0:ii==1) { PANum(task_scores->i); PrintTaskName(i); } if (things_score~=0) { PANum(things_score); GL__M(##FullScore,2); } if (places_score~=0) { PANum(places_score); GL__M(##FullScore,3); } new_line; PANum(score); GL__M(##FullScore,4); #endif; ]; #ifdef TARGET_ZCODE; [ QuitSub_O1; GL__M(##Quit,2); if (YesOrNo()~=0) quit; ]; [ RestartSub_O1; GL__M(##Restart,1); if (YesOrNo()~=0) { @restart; GL__M(##Restart,2); } ]; [ RestoreSub_O1; restore Rmaybe; return GL__M(##Restore,1); .RMaybe; GL__M(##Restore,2); ]; [ SaveSub_O1 flag; #IFV5; @save -> flag; switch (flag) { 0: GL__M(##Save,1); 1: GL__M(##Save,2); 2: GL__M(##Restore,2); } #IFNOT; save Smaybe; return GL__M(##Save,1); .SMaybe; GL__M(##Save,2); #ENDIF; ]; [ VerifySub_O1; @verify ?Vmaybe; jump Vwrong; .Vmaybe; return GL__M(##Verify,1); .Vwrong; GL__M(##Verify,2); ]; [ ScriptOnSub_O1; transcript_mode = ((0-->8) & 1); if (transcript_mode) return GL__M(##ScriptOn,1); @output_stream 2; if (((0-->8) & 1) == 0) return GL__M(##ScriptOn,3); GL__M(##ScriptOn,2); VersionSub(); transcript_mode = true; ]; [ ScriptOffSub_O1; transcript_mode = ((0-->8) & 1); if (transcript_mode == false) return GL__M(##ScriptOff,1); GL__M(##ScriptOff,2); @output_stream -2; if ((0-->8) & 1) return GL__M(##ScriptOff,3); transcript_mode = false; ]; #ifnot; ! TARGET_GLULX [ QuitSub_O1; GL__M(##Quit, 2); if (YesOrNo()~=0) quit; ]; [ RestartSub_O1; GL__M(##Restart, 1); if (YesOrNo() ~= 0) { @restart; GL__M(##Restart, 2); } ]; [ RestoreSub_O1 res fref; fref = glk($0062, $01, $02, 0); ! fileref_create_by_prompt if (fref == 0) jump RFailed; gg_savestr = glk($0042, fref, $02, GG_SAVESTR_ROCK); ! stream_open_file glk($0063, fref); ! fileref_destroy if (gg_savestr == 0) jump RFailed; @restore gg_savestr res; glk($0044, gg_savestr, 0); ! stream_close gg_savestr = 0; .RFailed; GL__M(##Restore, 1); ]; [ SaveSub_O1 res fref; fref = glk($0062, $01, $01, 0); ! fileref_create_by_prompt if (fref == 0) jump SFailed; gg_savestr = glk($0042, fref, $01, GG_SAVESTR_ROCK); ! stream_open_file glk($0063, fref); ! fileref_destroy if (gg_savestr == 0) jump SFailed; @save gg_savestr res; if (res == -1) { ! The player actually just typed "restore". We're going to print ! GL__M(##Restore,2); the Z-Code Inform library does this correctly ! now. But first, we have to recover all the Glk objects; the values ! in our global variables are all wrong. GGRecoverObjects(); glk($0044, gg_savestr, 0); ! stream_close gg_savestr = 0; return GL__M(##Restore, 2); } glk($0044, gg_savestr, 0); ! stream_close gg_savestr = 0; if (res == 0) return GL__M(##Save, 2); .SFailed; GL__M(##Save, 1); ]; [ VerifySub_O1 res; @verify res; if (res == 0) return GL__M(##Verify, 1); GL__M(##Verify, 2); ]; [ ScriptOnSub_O1; if (gg_scriptstr ~= 0) return GL__M(##ScriptOn, 1); if (gg_scriptfref == 0) { ! fileref_create_by_prompt gg_scriptfref = glk($0062, $102, $05, GG_SCRIPTFREF_ROCK); if (gg_scriptfref == 0) jump S1Failed; } ! stream_open_file gg_scriptstr = glk($0042, gg_scriptfref, $05, GG_SCRIPTSTR_ROCK); if (gg_scriptstr == 0) jump S1Failed; glk($002D, gg_mainwin, gg_scriptstr); ! window_set_echo_stream GL__M(##ScriptOn, 2); VersionSub(); return; .S1Failed; GL__M(##ScriptOn, 3); ]; [ ScriptOffSub_O1; if (gg_scriptstr == 0) return GL__M(##ScriptOff,1); GL__M(##ScriptOff, 2); glk($0044, gg_scriptstr, 0); ! stream_close gg_scriptstr = 0; ]; #endif; ! TARGET_ [ VersionSub_O1 ix; Banner(); #ifdef NI_BUILD_COUNT; print "Identification number: "; for (ix=6: ix <= UUID_ARRAY->0: ix++) print (char) UUID_ARRAY->ix; print "^"; #endif; ! NI_BUILD_COUNT #Ifdef TARGET_ZCODE; ix = 0; ! shut up compiler warning if (standard_interpreter > 0) { print "Standard interpreter ", standard_interpreter/256, ".", standard_interpreter%256, " (", HDR_TERPNUMBER->0; #Iftrue (#version_number == 6); print (char) '.', HDR_TERPVERSION->0; #Ifnot; print (char) HDR_TERPVERSION->0; #Endif; print ") / "; } else { print "Interpreter ", HDR_TERPNUMBER->0, " Version "; #Iftrue (#version_number == 6); print HDR_TERPVERSION->0; #Ifnot; print (char) HDR_TERPVERSION->0; #Endif; print " / "; } #Ifnot; ! TARGET_GLULX; @gestalt 1 0 ix; print "Interpreter version ", ix / $10000, ".", (ix & $FF00) / $100, ".", ix & $FF, " / "; @gestalt 0 0 ix; print "VM ", ix / $10000, ".", (ix & $FF00) / $100, ".", ix & $FF, " / "; #Endif; ! TARGET_; print "Library serial number ", (string) LibSerial, "^"; #Ifdef LanguageVersion; print (string) LanguageVersion, "^"; #Endif; ! LanguageVersion #ifdef I7ExtensionVersions; I7ExtensionVersions(); #endif; ]; [ NotifyOnSub_O1; #ifdef I7_NOSCORE; ScoreSub_O1(); #ifnot; notify_mode=1; GL__M(##NotifyOn); #endif; ]; [ NotifyOffSub_O1; #ifdef I7_NOSCORE; ScoreSub_O1(); #ifnot; notify_mode=0; GL__M(##NotifyOff); #endif; ]; [ LMode1Sub_O1; lookmode=1; print (string) Story; GL__M(##LMode1); ]; ! Brief [ LMode2Sub_O1; lookmode=2; print (string) Story; GL__M(##LMode2); ]; ! Verbose [ LMode3Sub_O1; lookmode=3; print (string) Story; GL__M(##LMode3); ]; ! Superbrief [ PronounsSub_O1 x y c d; GL__M(##Pronouns, 1); c = (LanguagePronouns-->0)/3; if (player ~= selfobj) c++; if (c==0) return GL__M(##Pronouns, 4); for (x = 1, d = 0 : x <= LanguagePronouns-->0: x = x+3) { print "~", (address) LanguagePronouns-->x, "~ "; y = LanguagePronouns-->(x+2); if (y == NULL) GL__M(##Pronouns, 3); else { GL__M(##Pronouns, 2); print (the) y; } d++; if (d < c-1) print ", "; if (d == c-1) print (string) AND__TX; } if (player ~= selfobj) { print "~", (address) ME1__WD, "~ "; GL__M(##Pronouns, 2); c = player; player = selfobj; print (the) c; player = c; } "."; ]; ! End of Verbs.i6 ! --- List together routines --- [ Initialise; CreatePropertyOffsets(); location = O93_parking_lot; the_time = 540; #ifdef I7_LOOKMODE; lookmode = I7_LOOKMODE; #endif; InformLibrary.end_turn_sequence = TurnEndPrimitive; TimePasses(); TS6_R(); print "^^"; FollowRulebook(GAME_BEGINS_RB); ]; [ DeathMessage; if (deadflag ofclass Routine) (deadflag)(); if (deadflag ofclass String) print (string) deadflag; ]; [ AfterLife; FollowRulebook(GAME_ENDS_RB); ]; [ TimePasses; ChronologyTurnEnd(); ]; [ ParserError error_type; if (error_type ofclass String) print_ret (string) error_type; if (error_type ofclass Routine) { error_type.call(); rtrue; } rfalse; ]; [ I7ReadUseOption UO; rfalse; ]; ! Chronology.i6 segment [ TrackActions adjust; if ((action ==##Examine) && (actor==player) && (noun == O92_amulet_of_death)) { if (adjust) { if (TurnsActionHasBeenHappening-->0==0) TurnsActionHasBeenHappening-->0 = 1; } else { (TimesActionHasHappened-->0)++; (TurnsActionHasBeenHappening-->0)++; } } else TurnsActionHasBeenHappening-->0 = 0; if ((action ==##Examine) && (actor==player) && (noun == O92_amulet_of_death)) { if (adjust) { if (TurnsActionHasBeenHappening-->1==0) TurnsActionHasBeenHappening-->1 = 1; } else { (TimesActionHasHappened-->1)++; (TurnsActionHasBeenHappening-->1)++; } } else TurnsActionHasBeenHappening-->1 = 0; if ((action ==##Go) && (actor==player) && (move_to == O95_foyer)) { if (adjust) { if (TurnsActionHasBeenHappening-->2==0) TurnsActionHasBeenHappening-->2 = 1; } else { (TimesActionHasHappened-->2)++; (TurnsActionHasBeenHappening-->2)++; } } else TurnsActionHasBeenHappening-->2 = 0; ]; [ ChronologyTurnEnd pt; ! Called from TimePasses() for (pt=0:ptpt = present_tense-->pt; ]; [ ChronologyRecord tense pt turn_end wanted old new trips consecutives; if (tense == 1) { new = (past_tense-->pt) & 1; trips = ((past_tense-->pt) & $$11111110)/2; consecutives = ((past_tense-->pt) & $$111111100000000)/256; } else { ! print "PT-->pt = ", (present_tense-->pt), "^"; old = (present_tense-->pt) & 1; trips = ((present_tense-->pt) & $$11111110)/2; consecutives = ((present_tense-->pt) & $$111111100000000)/256; switch(pt) { } ! print pt,":o=",old," n=",new," t=",trips," c=",consecutives,"^"; if ((old == 0) && (new == 1)) { trips++; if (trips > 127) trips = 127; } if (new == 0) consecutives=0; if ((new == 1) && (turn_end)) { consecutives++; if (consecutives > 127) consecutives = 127; } present_tense-->pt = new + 2*trips + 256*consecutives; } if ((wanted < 8) && (new == 0)) return 0; switch(wanted%8) { 0: return new; 1: return trips; 2: return consecutives; } ]; Constant NO_PAST_TENSES 0; Constant NO_PAST_ACTIONS 3; Array TimesActionHasHappened-->(NO_PAST_ACTIONS+1); Array TurnsActionHasBeenHappening-->(NO_PAST_ACTIONS+1); Array past_tense-->(NO_PAST_TENSES+1); Array present_tense-->(NO_PAST_TENSES+1); ! End of Chronology.i6 segment Constant SUPPRESS_ACTION_GRAMMAR; #IFTRUE (0 == 1); [ UnknownVerb; verb_wordnum = 0; return 'no.verb'; ]; [ PrintVerb v; if (v == 'no.verb') { print "do something to"; rtrue; } rfalse; ]; #ENDIF; Include "Grammar"; [ I7_NUMBER_TOKEN wnc wna r; wnc = wn; wn = wnc; r = I7_ParseToken(ELEMENTARY_TT, NUMBER_TOKEN); if (r == 0) return GPR_FAIL; return GPR_NUMBER; ]; [ Noun_Filter_0 x; x=noun; return ((noun ofclass K3_direction)); ]; [ Noun_Filter_1 x; x=noun; return ((noun ofclass K3_direction)); ]; [ Noun_Filter_2 x; x=noun; return ((noun ofclass K3_direction)); ]; Verb 'take//' 'carry//' 'hold//' * 'inventory//' -> Inv * multi -> Take * 'off//' noun -> Disrobe * multiinside 'off//' noun -> Remove * multiinside 'from//' noun -> Remove ; Verb 'get//' * 'out//' / 'off//' / 'up//' -> Exit * multi -> Take * 'in//' / 'into//' / 'on//' / 'onto//' noun -> Enter * 'off//' noun -> GetOff * multiinside 'from//' noun -> Remove ; Verb 'pick//' * multi 'up//' -> Take * 'up//' multi -> Take ; Verb 'stand//' * -> Exit * 'up//' -> Exit * 'on//' noun -> Enter ; Verb 'remove//' * held -> Disrobe * multiinside 'from//' noun -> Remove ; Verb 'shed//' 'doff//' 'disrobe//' * held -> Disrobe ; Verb 'wear//' 'don//' * held -> Wear ; Verb 'put//' * 'on//' held -> Wear * multiheld 'down//' -> Drop * 'down//' multiheld -> Drop * multiexcept 'on//' / 'onto//' noun -> PutOn * multiexcept 'in//' / 'inside//' / 'into//' noun -> Insert ; Verb 'insert//' * multiexcept 'in//' / 'into//' noun -> Insert ; Verb 'drop//' 'throw//' 'discard//' * multiheld -> Drop * held 'at//' / 'against//' / 'on//' / 'onto//' noun -> ThrowAt * multiexcept 'on//' / 'onto//' noun -> PutOn * multiexcept 'in//' / 'into//' / 'down//' noun -> Insert ; Verb 'give//' 'pay//' 'offer//' 'feed//' * creature held -> Give reverse * held 'to//' creature -> Give ; Verb 'show//' 'present//' 'display//' * creature held -> Show reverse * held 'to//' creature -> Show ; Verb 'go//' 'walk//' 'leave//' 'run//' * -> Go * noun=Noun_Filter_0 -> Go * noun -> Enter * 'into//' / 'in//' / 'inside//' / 'through//' noun -> Enter ; Verb 'inventory//' 'i//' 'inv//' * -> Inv ; Verb 'look//' 'l//' * -> Look * 'at//' noun -> Examine * 'inside//' / 'in//' / 'into//' / 'through//' noun -> Search * 'under//' noun -> LookUnder * 'up//' topic 'in//' noun -> Consult reverse ; Verb 'consult//' * noun 'on//' / 'about//' topic -> Consult ; Verb 'open//' 'unwrap//' 'uncover//' * noun -> Open * noun 'with//' held -> Unlock ; Verb 'close//' 'shut//' 'cover//' * noun -> Close * 'up//' noun -> Close * 'off//' noun -> SwitchOff ; Verb 'enter//' 'cross//' * noun -> Enter ; Verb 'sit//' * 'on//' / 'in//' / 'inside//' noun -> Enter * 'on//' 'top//' 'of//' noun -> Enter ; Verb 'exit//' 'out//' * -> Exit ; Verb 'examine//' 'x//' 'watch//' 'describe//' 'check//' * noun -> Examine ; Verb 'read//' * noun -> Examine * 'about//' topic 'in//' noun -> Consult reverse * topic 'in//' noun -> Consult reverse ; Verb 'yes//' 'y//' * -> Yes ; Verb 'no//' * -> No ; Verb 'sorry//' * -> Sorry ; Verb 'shit//' 'fuck//' 'damn//' * -> Strong ; Verb 'bother//' 'curses//' 'drat//' 'darn//' * -> Mild ; Verb 'search//' * noun -> Search ; Verb 'wave//' * -> WaveHands * noun -> Wave ; Verb 'set//' 'adjust//' * noun 'to//' topic -> SetTo ; Verb 'pull//' 'drag//' * noun -> Pull ; Verb 'push//' 'move//' 'shift//' 'clear//' 'press//' * noun -> Push * noun noun=Noun_Filter_1 -> PushDir * noun 'to//' noun=Noun_Filter_2 -> PushDir ; Verb 'turn//' 'rotate//' 'twist//' 'unscrew//' 'screw//' * noun -> Turn * noun 'on//' -> SwitchOn * 'on//' noun -> SwitchOn * noun 'off//' -> SwitchOff * 'off//' noun -> SwitchOff ; Verb 'switch//' * noun -> SwitchOn * noun 'on//' -> SwitchOn * noun 'off//' -> SwitchOff * 'off//' noun -> SwitchOff ; Verb 'lock//' * noun 'with//' held -> Lock ; Verb 'unlock//' * noun 'with//' held -> Unlock ; Verb 'attack//' 'break//' 'smash//' 'hit//' 'fight//' 'torture//' 'wreck//' 'crack//' 'destroy//' 'murder//' 'kill//' 'punch//' 'thump//' * noun -> Attack ; Verb 'wait//' 'z//' * -> Wait ; Verb 'answer//' 'say//' 'shout//' 'speak//' * topic 'to//' creature -> Answer reverse ; Verb 'tell//' * creature 'about//' topic -> Tell ; Verb 'ask//' * creature 'for//' noun -> AskFor * creature 'about//' topic -> Ask ; Verb 'eat//' * held -> Eat ; Verb 'sleep//' 'nap//' * -> Sleep ; Verb 'sing//' * -> Sing ; Verb 'climb//' 'scale//' * noun -> Climb * 'up//' / 'over//' noun -> Climb ; Verb 'buy//' 'purchase//' * noun -> Buy ; Verb 'squeeze//' 'squash//' * noun -> Squeeze ; Verb 'swing//' * noun -> Swing * 'on//' noun -> Swing ; Verb 'wake//' 'awake//' 'awaken//' * -> Wake * 'up//' -> Wake * creature -> WakeOther * creature 'up//' -> WakeOther * 'up//' creature -> WakeOther ; Verb 'kiss//' 'embrace//' 'hug//' * creature -> Kiss ; Verb 'think//' * -> Think ; Verb 'smell//' 'sniff//' * -> Smell * noun -> Smell ; Verb 'listen//' * -> Listen * 'to//' noun -> Listen ; Verb 'hear//' * noun -> Listen ; Verb 'taste//' * noun -> Taste ; Verb 'touch//' 'feel//' * noun -> Touch ; Verb 'rub//' 'shine//' 'polish//' 'sweep//' 'clean//' 'dust//' 'wipe//' 'scrub//' * noun -> Rub ; Verb 'tie//' 'attach//' 'fix//' 'fasten//' * noun 'to//' noun -> Tie ; Verb 'burn//' 'light//' * noun -> Burn ; Verb 'drink//' 'swallow//' 'sip//' * noun -> Drink ; Verb 'cut//' 'slice//' 'prune//' 'chop//' * noun -> Cut ; Verb 'jump//' 'skip//' 'hop//' * -> Jump ; Verb 'score//' * -> Score ; Verb 'quit//' * -> Quit ; Verb 'q//' * -> Quit ; Verb 'save//' * -> Save ; Verb 'restart//' * -> Restart ; Verb 'restore//' * -> Restore ; Verb 'verify//' * -> Verify ; Verb 'version//' * -> Version ; Verb 'script//' * -> ScriptOn * 'on//' -> ScriptOn * 'off//' -> ScriptOff ; Verb 'transcript//' * -> ScriptOn * 'on//' -> ScriptOn * 'off//' -> ScriptOff ; Verb 'superbrief//' * -> LMode3 ; Verb 'short//' * -> LMode3 ; Verb 'verbose//' * -> LMode2 ; Verb 'long//' * -> LMode2 ; Verb 'brief//' * -> LMode1 ; Verb 'normal//' * -> LMode1 ; Verb 'nouns//' * -> Pronouns ; Verb 'pronouns//' * -> Pronouns ; Verb 'notify//' * -> NotifyOn * 'on//' -> NotifyOn * 'off//' -> NotifyOff ; [ Parse_Name_85 wnc wna rv w g f wnb n p1n p; if (parser_action == ##TheSame) return 0; wnc = wn; p = 1; .Pass2; wn = wnc; wnb = wn; f=0; g=0; n=0; if (p==1) { while (WordInProperty(NextWordStopped(), self, name)) n++; wn--; if (n>0) f=1; n=0; } if (NextWordStopped() ~= 'old//') jump Fail_1; if (NextWordStopped() ~= 'man//') jump Fail_1; wnb=wn; f=1; .Fail_1; wn = wnb; if (p==2) while (WordInProperty(NextWordStopped(), self, name)) n++; if ((f)||(n>0)) n=n+wnb-wnc; if (p==1) { p=2; p1n=n; jump Pass2; } if (parser_trace >= 3) print p1n, " ", n, "^"; if (p1n>n) { wn = wnc+p1n; return p1n; } wn = wnc+n; return n; ]; [ Parse_Name_88 wnc wna rv w g f wnb n p1n p; if (parser_action == ##TheSame) return 0; wnc = wn; p = 1; .Pass2; wn = wnc; wnb = wn; f=0; g=0; n=0; if (p==1) { while (WordInProperty(NextWordStopped(), self, name)) n++; wn--; if (n>0) f=1; n=0; } if (NextWordStopped() ~= 'former//') jump Fail_1; if (NextWordStopped() ~= 'self//') jump Fail_1; wnb=wn; f=1; .Fail_1; wn = wnb; if (p==2) while (WordInProperty(NextWordStopped(), self, name)) n++; if ((f)||(n>0)) n=n+wnb-wnc; if (p==1) { p=2; p1n=n; jump Pass2; } if (parser_trace >= 3) print p1n, " ", n, "^"; if (p1n>n) { wn = wnc+p1n; return p1n; } wn = wnc+n; return n; ]; #IFDEF DEBUG; ! Tests.i6 segment ! Should only be included if DEBUG is defined. Verb meta "test" * -> TestScript * special -> TestScript; #IFDEF TEST_SCENARIOS_EXIST; [ TestScriptSub; switch(special_word) { default: print ">--> The following tests are available:^"; } ]; Array test_stack --> 15; Global test_sp = 0; [ TestStart T R k; if (test_sp == 15) ">--> Testing too many levels deep"; test_stack-->test_sp = T; test_stack-->(test_sp+1) = 1; test_sp = test_sp + 3; if ((R-->0) && (R-->0 ~= real_location)) { print "(first moving to ", (name) R-->0, ")^"; PlayerTo(R-->0, 1); } k=1; while (R-->k) { if (R-->k notin player) { print "(first acquiring ", (the) R-->k, ")^"; move R-->k to player; } k++; } print "(Testing.)^"; ]; [ KeyboardPrimitive a_buffer a_table p i j l spaced; if (test_sp == 0) { test_stack-->2 = 1; return KeyboardPrimitive__(a_buffer, a_table); } else { p = test_stack-->(test_sp-3); i = test_stack-->(test_sp-2); print "["; print test_stack-->2; print "] "; test_stack-->2 = test_stack-->2+1; style bold; while ((i <= p->0) && (p->i ~= '/')) { if (spaced || (p->i ~= ' ')) { a_buffer->(j+WORDSIZE) = p->i; print (char) p->i; i++; j++; spaced = true; } else i++; } style roman; print "^"; #ifdef TARGET_ZCODE; a_buffer->1 = j; #ifnot; ! TARGET_GLULX a_buffer-->0 = j; #endif; Tokenise__(a_buffer, a_table); if (p->i == '/') i++; if (i > p->0) { test_sp = test_sp - 3; } else test_stack-->(test_sp-2) = i; } ]; #IFNOT; ! TEST_SCENARIOS_EXIST [ TestScriptSub; ">--> No test scripts exist for this game."; ]; #ENDIF; ! TEST_SCENARIOS_EXIST ! End of Tests.i6 segment ! Debugging.i6 segment ! Should only be included if DEBUG is defined. ! Not all of these commands are documented; this is intentional. They may ! be changed in name or function. But this is all of the grammar defined ! in the segments except for the TEST command, which is in Tests.i6. Constant NO_DEBUGGABLES = 30; Array debuggable_states -> NO_DEBUGGABLES; [ DebugRbOffSub state i c; if ((noun >= 0) && (noun < NO_DEBUGGABLES)) { debuggable_states->noun = state; print "Now tracing rulebooks: "; for (i=0:ii) { c++; print i, " "; } if (c==0) "none"; new_line; return; } "Rulebook number out of range."; ]; [ DebugRbSub; DebugRbOffSub(true); ]; [ AdjustDbr s; if ((s>=0) && (ss; ]; [ RulesOnSub; debug_rules = 1; "Rules tracing now switched on. Type ~rules off~ to switch it off again, or ~rules all~ to include even rules which do not apply."; ]; [ RulesAllSub; debug_rules = 2; "Rules tracing now switched to ~all~. Type ~rules off~ to switch it off again."; ]; [ RulesOffSub; debug_rules = 0; "Rules tracing now switched off. Type ~rules~ to switch it on again."; ]; [ ScenesOnSub; debug_scenes = 1; I7_SceneStatus(); "(Scene monitoring now switched on. Type ~scenes off~ to switch it off again.)"; ]; [ ScenesOffSub; debug_scenes = 0; "(Scene monitoring now switched off. Type ~scenes~ to switch it on again.)"; ]; [ ShowRLocation obj top; if (obj ofclass K1_room) return; print " "; if (parent(obj)) { if (obj has worn) print "worn by "; else { if (parent(obj) has animate) print "carried by "; if (parent(obj) has container) print "in "; if (parent(obj) ofclass K1_room) print "in "; if (parent(obj) has supporter) print "on "; } print (the) parent(obj); ShowRLocation(parent(obj)); } else { if (obj.component_parent) { if (top == false) print ", which is "; print "part of ", (the) obj.component_parent; ShowRLocation(obj.component_parent); } else print "out of play"; } ]; [ ShowMeSub; if (noun == nothing) noun = real_location; if (ShowMeRecursively(noun, 0, (noun == real_location))) { if (noun == real_location) print "* denotes things which are not in scope^"; } if (noun ofclass K2_thing) { print "location:"; ShowRLocation(noun, true); print "^"; } ]; [ ShowMeRecursively obj depth f c i k; spaces(2*depth); if (f && (depth > 0) && (TestScope(obj, player) == false)) { print "*"; c = true; } print (name) obj; if (depth > 0) { if (obj.component_parent) print " (part of ", (name) obj.component_parent, ")"; if (obj has worn) print " (worn)"; } if (obj provides i7_kind) { k = obj.&i7_kind-->0; if ((k ~= K2_thing) || (depth==0)) { print " - "; if (k == K4_door or K5_container) { if (obj has transparent) print "transparent "; if (obj has locked) print "locked "; else if (obj has open) print "open "; else print "closed "; } print (I7_Kind_Name) k; } } print "^"; if (obj.component_child) c = c | ShowMeRecursively(obj.component_child, depth+2, f); if ((depth>0) && (obj.component_sibling)) c = c | ShowMeRecursively(obj.component_sibling, depth, f); if (child(obj)) c = c | ShowMeRecursively(child(obj), depth+2, f); if ((depth>0) && (sibling(obj))) c = c | ShowMeRecursively(sibling(obj), depth, f); return c; ]; Constant RELATIONS_CREATED; #IFDEF RELATIONS_CREATED; [ ShowRelationsSub rc; for (rc=0:rc<100:rc++) I7_ShowR(rc); ]; #IFNOT; ! RELATIONS_CREATED [ ShowRelationsSub; "No new relations have been created."; ]; #ENDIF; ! RELATIONS_CREATED Verb meta "dbrb" * number -> DebugRb * number "off" -> DebugRbOff; Verb meta "rules" * -> RulesOn * "all" -> RulesAll * "off" -> RulesOff; Verb meta "scenes" * -> ScenesOn * "off" -> ScenesOff; Verb meta "showme" * -> ShowMe * multi -> ShowMe; Verb meta "relations" * -> ShowRelations; ! End of Debugging.i6 #ENDIF; ! DEBUG ! The falsity proposition represents the empty set [ Prop_Falsity reason obj; return 0; ]; ! Find a random x such that: ! (kind(x)=K1'room' ^ adjacent-to(const_0,x)) [ Prop_0 const_0 x counter tohit; tohit = -1; .SearchAgain; counter = 0; for (x=K1_First: x: x=x.K1_Link) { if ((I7_Adjacent(const_0,x))) {counter++; if (counter == tohit) return x; jump NextOuterLoop_0; } .NextOuterLoop_0; } if (counter == 0) return nothing; tohit = random(counter); jump SearchAgain; ]; Constant SC_45 = " needs. In every direction there are lines of people waiting to be served in different ways. To the east is that limbo known as the Waiting Area, and complete escape lies to the south."; Constant SC_38 = " races in."; Constant SC_26 = " screams hideously and is engulfed in hellfire. A moment later the smoke clears and the ashes scatter. Luckily, nobody else seemed to notice."; Constant SC_21 = "~Attention all customers -- please be sure to ~"; Constant SC_15 = "~May I have your information please?~, says a perky woman."; Constant SC_20 = "~Mr. Willard, you have a phone call.~"; Constant SC_19 = "~Mrs. Jones, please come and fetch your child from the parking lot.~"; Constant SC_48 = "."; Constant SC_51 = "2. Proof of Eye Test"; Constant SC_52 = "3. Proof of Written Test"; Constant SC_53 = "4. Proof of Road Test"; Constant SC_37 = "A "; Constant SC_16 = "A bored looking woman is willing to take your money here."; Constant SC_12 = "A bored-looking photographer is quietly sitting behind the desk, waiting to take pictures."; Constant SC_10 = "A crusty old man is sitting in the kiosk, staring at you."; Constant SC_9 = "A kiosk grows out of the middle of the area."; Constant SC_1 = "A short interactive story"; Constant SC_33 = "Apparently not many people are ready to get their licenses, since he appears almost asleep."; Constant SC_4 = "As good-looking as ever."; Constant SC_49 = "Before receiving your driver's license,"; Constant SC_5 = "Careful not to look at it directly, it glows menacingly in your hand. Woe to those to stare upon it!"; Constant SC_8 = "Crestfallen, you are standing before a large architecturally-deficient building. A long line of miserable people (waiting to be processed) spills into the parking lot, and you're at the end of the line. The line wanders north through the building's only entrance, which is topped by a cheerful sign."; Constant SC_39 = "DRIVER SERVICES CENTER"; Constant SC_40 = "Department of Motor Vehicles"; Constant SC_0 = "Driver's License"; Constant SC_24 = "Enraged by your unrelenting gaze, the amulet unleashes the fires of hell upon your mortal coil. Passers-by seem eerily unaware of you as you are consumed in flame."; Constant SC_47 = "He's gruff and balding, and looks to old to hold any other job"; Constant SC_30 = "I wouldn't cut across those lines of people."; Constant SC_18 = "It's a gross place in here."; Constant SC_35 = "It's peaceful here, and the nagging feeling that help may come entices you to take a seat..."; Constant SC_2 = "John Lodder and Ben Collins-Sussman , adapted to I7 by David Anderson"; Constant SC_7 = "Looking through its transparent body, you can see that it's very low on ink. The tip is covered with bite marks."; Constant SC_14 = "Many people scribble furiously at tiny desks."; Constant SC_41 = "Niles, IL"; Constant SC_23 = "The amulet grows annoyed at the attention you are giving it. Best stop looking!"; Constant SC_36 = "The little monster storms off to "; Constant SC_31 = "The man grunts. You're not sure if he understands you."; Constant SC_32 = "The man is stunned at first, then blinks coyly at you."; Constant SC_34 = "The man opens half an eye at you, realizes you don't have what he wants, and goes back to his daydream."; Constant SC_13 = "This is the crossroads, full of people mulling about, but obviously in no mood to dance. Osmotic pressure encourages you to move elsewhere."; Constant SC_11 = "This is the main desk, presumably where the final driver's licenses are handed out. There is a sterm looking sign attached to the desk."; Constant SC_6 = "Ug. Is that really you?"; Constant SC_42 = "Working to serve you!"; Constant SC_29 = "You discretely push your way past the crowd, hoping not to anger anyone..."; Constant SC_25 = "You have been incinerated"; Constant SC_27 = "You tap your toes for a minute, but the line doesn't seem to be moving."; Constant SC_22 = "You'll have to say which compass direction to go in."; Constant SC_46 = "You're Bob. Gruff and balding, with creaky joints and back pains"; Constant SC_28 = "You're here to get a driver's license, remember?"; Constant SC_43 = "You're in the foyer of the Driver Services Center, built to serve "; Constant SC_17 = "You're standing in a drab area with bored-looking people mulling around. Apparently they're there for the same reason you are -- looking for help -- but no one is sure if it will ever come. To the east is a washroom.^^Time seems to stand still."; Constant SC_3 = "You've been lying about your driver's license for four years. Maybe it's time to really get one!^^Luckily, a friend drops you off at your local Driver Services Center. These things are optimized to process people quickly, so it shouldn't be too bad."; Constant SC_50 = "you must present four receipts:^^1. Proof of ID"; Constant SC_44 = "your"; Constant SC_54 = "^^NO EXCEPTIONS"; #ifndef I7_Map_Region; Constant I7_Map_Region = 0; #endif; #ifndef description; Constant description = 0; #endif; #ifndef short_name; Constant short_name = 0; #endif; #ifndef initial; Constant initial = 0; #endif; #ifndef plural; Constant plural = 0; #endif; #ifndef invent; Constant invent = 0; #endif; #ifndef article; Constant article = 0; #endif; #ifndef with_key; Constant with_key = 0; #endif; #ifndef door_to; Constant door_to = 0; #endif; #ifndef capacity; Constant capacity = 0; #endif; #ifndef p10_opposite; Constant p10_opposite = 0; #endif; #ifndef p11_inform_property; Constant p11_inform_property = 0; #endif; #ifndef p12_inform_object; Constant p12_inform_object = 0; #endif; #ifndef light; Constant light = 0; #endif; #ifndef visited; Constant visited = 0; #endif; #ifndef enterable; Constant enterable = 0; #endif; #ifndef light; Constant light = 0; #endif; #ifndef edible; Constant edible = 0; #endif; #ifndef transparent; Constant transparent = 0; #endif; #ifndef concealed; Constant concealed = 0; #endif; #ifndef scenery; Constant scenery = 0; #endif; #ifndef static; Constant static = 0; #endif; #ifndef clothing; Constant clothing = 0; #endif; #ifndef moved; Constant moved = 0; #endif; #ifndef pushable; Constant pushable = 0; #endif; #ifndef door; Constant door = 0; #endif; #ifndef container; Constant container = 0; #endif; #ifndef supporter; Constant supporter = 0; #endif; #ifndef switchable; Constant switchable = 0; #endif; #ifndef animate; Constant animate = 0; #endif; #ifndef male; Constant male = 0; #endif; #ifndef workflag; Constant workflag = 0; #endif; #ifndef I7_mentioned; Constant I7_mentioned = 0; #endif; #ifndef initially_carried; Constant initially_carried = 0; #endif; #ifndef open; Constant open = 0; #endif; #ifndef openable; Constant openable = 0; #endif; #ifndef lockable; Constant lockable = 0; #endif; #ifndef locked; Constant locked = 0; #endif; #ifndef on; Constant on = 0; #endif; #ifndef female; Constant female = 0; #endif; #ifndef neuter; Constant neuter = 0; #endif; #ifndef p55_specification; Constant p55_specification = 0; #endif; #ifndef score; Constant score = 0; #endif; #ifndef score; Constant score = 0; #endif; #ifndef worn; Constant worn = 0; #endif; Constant I7_FBNA = 10000; #IFNDEF I7_cap_short_name; Constant I7_cap_short_name = short_name; #ENDIF; Constant I7_BOXES = 1; ! End of automatically generated I6 source ! --------------------------------------------------------------------------