!============================================================================= ! A conversion from the original MiniAdventure source. Constant Story "Secret Maze II (C) 1996 Jon Ripley"; Constant Headline "^^Welcome to secret maze 2, another cunningly deceptive although mappable maze. To escape from this maze you need to collect 25 valuable items. You only have 75 moves in which to complete the game. Good Luck!^^A conversion from the original MiniAdventure source.^^"; Serial "050130"; Release 1; ! Constant NO_HEALTH; Constant MAX_SCORE = 25; Include "Parser"; Include "VerbLib"; Global Strength = 75; !============================================================================= ! Object classes Class Room has light; Class Treasure with treasurepoints 0, after [; Take: score=score+self.treasurepoints; Drop: score=score-self.treasurepoints; ]; !============================================================================= ! Game locations Room maze_01 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_25, s_to maze_06, e_to maze_02, w_to maze_25, u_to maze_24, d_to maze_07; Treasure -> amber "amber" with description "amber", name 'amber', treasurepoints 1; !============================================================================= Room maze_02 "Maze" with description "You are walking down a narrow corridor, there are doors in all directions and wooden steps lead up and down There are exits north, south, east, west, up and down.", n_to maze_21, s_to maze_07, e_to maze_03, w_to maze_01, u_to maze_25, d_to maze_08; Treasure -> bracelet "bracelet" with description "bracelet", name 'bracelet', treasurepoints 1; !============================================================================= Room maze_03 "Maze" with description "You are in an ornate room, fine tapestries adorn the walls There are exits north, south, east, west, up and down.", n_to maze_22, s_to maze_08, e_to maze_04, w_to maze_02, u_to maze_20, d_to maze_09; Treasure -> crown "crown" with description "crown", name 'crown', treasurepoints 1; !============================================================================= Room maze_04 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_23, s_to maze_09, e_to maze_05, w_to maze_03, u_to maze_15, d_to maze_10; Treasure -> diamond "diamond" with description "diamond", name 'diamond', treasurepoints 1; !============================================================================= Room maze_05 "Maze" with description "You are in an ornate room, fine tapestries adorn the walls There are exits north, south, east, west, up and down.", n_to maze_24, s_to maze_10, e_to maze_06, w_to maze_04, u_to maze_10, d_to maze_21; Treasure -> ebony "ebony" with description "ebony", name 'ebony', treasurepoints 1; !============================================================================= Room maze_06 "Maze" with description "You are in a plain, ordinary room with no distinguishing features There are exits north, south, east, west, up and down.", n_to maze_01, s_to maze_11, e_to maze_07, w_to maze_05, u_to maze_23, d_to maze_12; Treasure -> flowers "flowers" with description "flowers", name 'flowers', treasurepoints 1; !============================================================================= Room maze_07 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_02, s_to maze_12, e_to maze_08, w_to maze_06, u_to maze_01, d_to maze_13; Treasure -> gold "gold" with description "gold", name 'gold', treasurepoints 1; !============================================================================= Room maze_08 "Maze" with description "You are walking down a narrow corridor, there are doors in all directions and wooden steps lead up and down There are exits north, south, east, west, up and down.", n_to maze_03, s_to maze_13, e_to maze_09, w_to maze_07, u_to maze_02, d_to maze_14; Treasure -> herbs "herbs" with description "herbs", name 'herbs', treasurepoints 1; !============================================================================= Room maze_09 "Maze" with description "You are in an ornate room, fine tapestries adorn the walls There are exits north, south, east, west, up and down.", n_to maze_04, s_to maze_14, e_to maze_10, w_to maze_08, u_to maze_03, d_to maze_15; Treasure -> ingot "ingot" with description "ingot", name 'ingot', treasurepoints 1; !============================================================================= Room maze_10 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_05, s_to maze_15, e_to maze_11, w_to maze_09, u_to maze_04, d_to maze_05; Treasure -> jewel "jewel" with description "jewel", name 'jewel', treasurepoints 1; !============================================================================= Room maze_11 "Maze" with description "You are in a plain, ordinary room with no distinguishing features There are exits north, south, east, west, up and down.", n_to maze_06, s_to maze_16, e_to maze_12, w_to maze_10, u_to maze_22, d_to maze_17; Treasure -> king "king" with description "king", name 'king', treasurepoints 1; !============================================================================= Room maze_12 "Maze" with description "You are in an ornate room, fine tapestries adorn the walls There are exits north, south, east, west, up and down.", n_to maze_07, s_to maze_17, e_to maze_13, w_to maze_11, u_to maze_06, d_to maze_18; Treasure -> locket "locket" with description "locket", name 'locket', treasurepoints 1; !============================================================================= Room maze_13 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_08, s_to maze_18, e_to maze_14, w_to maze_12, u_to maze_07, d_to maze_19; Treasure -> money "money" with description "money", name 'money', treasurepoints 1; !============================================================================= Room maze_14 "Maze" with description "You are in an ornate room, fine tapestries adorn the walls There are exits north, south, east, west, up and down.", n_to maze_09, s_to maze_19, e_to maze_15, w_to maze_13, u_to maze_08, d_to maze_20; Treasure -> nightengale "nightengale" with description "nightengale", name 'nightengale', treasurepoints 1; !============================================================================= Room maze_15 "Maze" with description "You are walking down a narrow corridor, there are doors in all directions and wooden steps lead up and down There are exits north, south, east, west, up and down.", n_to maze_10, s_to maze_20, e_to maze_16, w_to maze_14, u_to maze_09, d_to maze_03; Treasure -> onyx "onyx" with description "onyx", name 'onyx', treasurepoints 1; !============================================================================= Room maze_16 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_11, s_to maze_21, e_to maze_17, w_to maze_15, u_to maze_21, d_to maze_22; Treasure -> platinum "platinum" with description "platinum", name 'platinum', treasurepoints 1; !============================================================================= Room maze_17 "Maze" with description "You are in a plain, ordinary room with no distinguishing features There are exits north, south, east, west, up and down.", n_to maze_12, s_to maze_22, e_to maze_18, w_to maze_16, u_to maze_11, d_to maze_23; Treasure -> queen "queen" with description "queen", name 'queen', treasurepoints 1; !============================================================================= Room maze_18 "Maze" with description "You are walking down a narrow corridor, there are doors in all directions and wooden steps lead up and down There are exits north, south, east, west, up and down.", n_to maze_13, s_to maze_23, e_to maze_19, w_to maze_17, u_to maze_12, d_to maze_24; Treasure -> ruby "ruby" with description "ruby", name 'ruby', treasurepoints 1; !============================================================================= Room maze_19 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_14, s_to maze_24, e_to maze_20, w_to maze_18, u_to maze_13, d_to maze_25; Treasure -> sapphire "sapphire" with description "sapphire", name 'sapphire', treasurepoints 1; !============================================================================= Room maze_20 "Maze" with description "You are in an ornate room, fine tapestries adorn the walls There are exits north, south, east, west, up and down.", n_to maze_15, s_to maze_25, e_to maze_21, w_to maze_19, u_to maze_14, d_to maze_03; Treasure -> teardrop "teardrop" with description "teardrop", name 'teardrop', treasurepoints 1; !============================================================================= Room maze_21 "Maze" with description "You are walking down a narrow corridor, there are doors in all directions and wooden steps lead up and down There are exits north, south, east, west, up and down.", n_to maze_16, s_to maze_02, e_to maze_22, w_to maze_20, u_to maze_05, d_to maze_16; Treasure -> umbrella "umbrella" with description "umbrella", name 'umbrella', treasurepoints 1; !============================================================================= Room maze_22 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_17, s_to maze_03, e_to maze_23, w_to maze_21, u_to maze_16, d_to maze_11; Treasure -> vase "vase" with description "vase", name 'vase', treasurepoints 1; !============================================================================= Room maze_23 "Maze" with description "You are in an ornate room, fine tapestries adorn the walls There are exits north, south, east, west, up and down.", n_to maze_18, s_to maze_04, e_to maze_24, w_to maze_22, u_to maze_17, d_to maze_06; Treasure -> wine "wine" with description "wine", name 'wine', treasurepoints 1; !============================================================================= Room maze_24 "Maze" with description "You are walking down a narrow corridor, there are doors in all directions and wooden steps lead up and down There are exits north, south, east, west, up and down.", n_to maze_19, s_to maze_05, e_to maze_25, w_to maze_23, u_to maze_18, d_to maze_01; Treasure -> xylophone "xylophone" with description "xylophone", name 'xylophone', treasurepoints 1; !============================================================================= Room maze_25 "Maze" with description "You are inside a large chamber, a small alcove is barely visible in one corner There are exits north, south, east, west, up and down.", n_to maze_20, s_to maze_01, e_to maze_01, w_to maze_24, u_to maze_19, d_to maze_02; Treasure -> yasmin "yasmin" with description "yasmin", name 'yasmin', treasurepoints 1; !============================================================================= ! 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; 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 "^Congratulations you have managed to collect all the treasure! A magical door opens by you and you are able to go home... "; 3,4: print "^Oh dear, the maze has got the better of you. Better luck next time..."; } ]; !============================================================================= ! 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; !=============================================================================