!============================================================================= ! A conversion from the original MiniAdventure source. Constant Story "Secret Maze by Jon Ripley (C) 1995"; Constant Headline "^^You are lost in a maze full of winding tunnels. You only have enough time to make 100 moves in your attempt to escape before the doors close and you are trapped forever...This maze CAN be mapped!!!^^A conversion from the original MiniAdventure source.^^"; Serial "050130"; Release 1; ! Constant NO_HEALTH; Constant MAX_SCORE = 0; Include "Parser"; Include "VerbLib"; Global Strength = 100; !============================================================================= ! Object classes Class Room has light; Class Prop with before [; Take,Pull,Push,PushDir: print_ret (The) self, " is fixed in place."; default: "You don't need to worry about ", (the) self, "."; ], has static; !============================================================================= ! Game locations Room maze_01 "Maze" with description "You are in a maze full of twisty turny passages. There are exits north, south, east and west.", n_to maze_01, s_to maze_02, e_to maze_02, w_to maze_01; !============================================================================= Room maze_02 "Maze" with description "You are in a maze full of twisty, turny passages. There are exits north, south, east and west.", n_to maze_01, s_to maze_01, e_to maze_01, w_to maze_03; !============================================================================= Room maze_03 "Maze" with description "You are in a maze full of twisty turny, passages. There are exits north, south, east and west.", n_to maze_09, s_to maze_03, e_to maze_01, w_to maze_07; !============================================================================= Room maze_04 "Maze" with description "You are in a maze full of twisty, turny, passages. There are exits north, south, east and west.", n_to maze_07, s_to maze_09, e_to maze_06, w_to maze_08; !============================================================================= Room maze_05 "Freedom" with description "You are outside the maze. There are no obvious exits.", ; !============================================================================= Room maze_06 "Maze" with description "You are in a maze full of turny twisty passages. There are exits north, south, east and west.", n_to maze_01, s_to maze_01, e_to maze_01, w_to maze_01; !============================================================================= Room maze_07 "Maze" with description "You are in a maze full of turny, twisty passages. There are exits north, south, east and west.", n_to maze_05, s_to maze_04, e_to maze_08, w_to maze_09; !============================================================================= Room maze_08 "Maze" with description "You are in a maze full of turny twisty, passages. There are exits north, south, east and west.", n_to maze_04, s_to maze_08, e_to maze_08, w_to maze_04; !============================================================================= Room maze_09 "Maze" with description "You are in a maze full of turny, twisty, passages. There are exits north, south, east and west.", n_to maze_02, s_to maze_08, e_to maze_03, w_to maze_09; !============================================================================= ! Setup Daemons Object strength_drain with daemon [; Strength=Strength-1; if (Strength > 0 ) return; StopDaemon(self); GameOver(4); ]; Object endgame_test with daemon [; if (score < MAX_SCORE) return; if (real_location ~= maze_05) return; StopDaemon(self); GameOver(2); ]; !============================================================================= ! Display end-game messages [ DeathMessage; switch(deadflag) { 3: print "You killed yourself"; 4: print "You ran out of time"; } ]; [ GameOver x; deadflag=x; switch(deadflag) { 2 : print "^You have managed to find your way out of the maze!"; 3,4: print "^You are lost, all the doors have closed and you are trapped in the maze forever..."; } ]; !============================================================================= ! Initialisation routine [ Initialise; location=maze_01; lookmode=2; #Ifndef NO_HEALTH; StartDaemon(strength_drain); #Endif; ! NO_HEALTH StartDaemon(endgame_test); ]; !============================================================================= ! Include grammar here Include "Grammar"; !============================================================================= ! Custom Verbs [ HealthSub; #Ifdef NO_HEALTH; if (deadflag == 0) "As strong and healthy as usual."; #Ifnot; "You have ",Strength," health points remaining."; #Endif; ! NO_HEALTH ]; Verb meta 'health' 'strength' * -> Health; !=============================================================================