Constant Story "In Media Res"; Constant Headline "^Copyright (c) 1997 by Joe Mason.^"; Constant DEBUG; Constant USES_TIMER; Replace DrawStatusLine; Replace UpdateTimer; Include "Parser_RT"; Object LibraryMessages; Include "Verblib"; [ DrawStatusLine width pos; @split_window 1; @set_window 1; @set_cursor 1 1; style reverse; width = 0->33; pos = width-13; spaces width; @set_cursor 1 2; print (name) location; if (width > 76) { @set_cursor 1 pos; print (string) TIME__TX, (time) timer.time_left; } if (width > 63 && width <= 76) { @set_cursor 1 pos; print sline2; } if (helmet has general && helmet has worn) { pos = width - 27; if (width > 76) { @set_cursor 1 pos; print "Air: "; if (helmet.time_left <= 0) print (time) 0; else print (time) helmet.time_left; } } @set_cursor 1 1; style roman; @set_window 0; ]; [ Time the_time h m s; if (the_time < 0) the_time = 0; h = the_time / 3600; m = the_time % 3600 / 60; s = the_time % 3600 % 60; print h, ":"; if (m < 10) print "0"; print m, ":"; if (s < 10) print "0"; print s; rtrue; ]; [ UpdateTimer interfered; interfered = 0; if (timer hasnt stopped) { timer.time_left--; if (helmet has general) helmet.time_left--; } DrawStatusLine(); if (helmet.time_left == 60 && helmet has worn) { interfered = 1; print "^Suddenly, the indicator light in your helmet burns red.^"; } if (timer.time_left <= 0) { deadflag = 1; interfered = 1; print "^There is a distant explosion, and the ground rocks, sea and sky tilting together in a sickening crunch. The bomb has detonated. You have failed. And, because you were in the danger zone..."; } if (interfered) { no_parse = 1; rtrue; } else rfalse; ]; [ RealLoc; if (location == thedark) return real_location; else return location; ]; Attribute stopped; Attribute underwater; Object timer with time_left 7200; ! 2 hours Object Start_Room "The French Riviera" with description "Sunlight glances blindingly off the deep blue Mediterranean waters, reflecting and refracting into myriad patterns which blur into solidity as you speed past. The road hugs the edge of the cliff, and far below the sea beckons hungrily.", has light; Object -> Japanese_bike "Yamaha" with name 'Japanese' 'bike' 'motor' 'cycle' 'motorcycle' 'motorbike' 'Yamaha' 'racing', description "A customized Yamaha Sabre - heavily customized. Apart from a bullet-proof chassis (more useful then it sounds, since the bike's styling places the rider flat against it) and built in radar, the bike is fully amphibious - flicking a toggle switch on the handlebar shuts off the engine and opens the intake for a water jet, turning the racing cycle into a submersible hydrojet.", has supporter; Class Harley_Class with name 'American' 'bike' 'motor' 'cycle' 'motorcycle' 'motorbike' 'Harley' 'Davidson', has supporter; Object -> American_bike "Harley" class Harley_Class with initial "With a throaty roar one of the Manticore's henchmen, riding a low-slung American road hog, careens around the corner."; Object Bond_Player with number 0, description "Tall, dark, and debonaire."; Object -> helmet "helmet" ! has general if it is sealed with name 'helmet' 'neckpiece', description [; print "The helmet is an integral part of the bike's aquatic capabilities - twisting the neckpiece causes it to lock tight, creating an air-tight seal. Miniaturized tanks hidden beneath the carapace can hold up to a half hour of compressed air.^"; if (self has general) { print "^An indicator, just visible beside the faceplate, "; if (self.time_left <= 60) print "is flashing red. It "; print "reads "; if (self.time_left <= 0) print (time) 0; else print (time) self.time_left; print ".^"; } rtrue; ], before [; Turn: if (self hasnt worn) "The seal will not lock unless you are wearing the helmet."; if (self has general) { give self ~general; print "The seal pops with a sharp crack, and the "; if (self.time_left <= 60) print "red "; print "light in the corner of your eye fades away."; if (RealLoc() has underwater) { deadflag = 1; " Almost immediately, water begins to seep in past the base of your neck. You fumble desperately at the seal, but are unable to make it lock again. The clammy fingers feel their way up you throat, your chin, your nostrils..."; } if (self.time_left <= 0) print " Almost immediately there is a gasp of fresh air."; new_line; rtrue; } else { give self general; print "You feel a moment of horrible suction at the base of your throat as the helmet seals itself. A small indicator lights up to the left of the faceplate, easily within your peripheral vision. It reads "; if (self.time_left <= 0) print (time) 0; else print (time) self.time_left; if (self.time_left <= 60) ", flashing red."; else "."; } Disrobe: if (self has general) "The helmet is sealed tight to your neck."; ], time_left 1800, has clothing worn; [ Initialise; ChangePlayer(Bond_Player,0); location = Japanese_bike; DrawStatusLine(); "^^You huddle low against the Japanese racing bike as it whips effortlessly around the sharpest of tortuous curves. Left, right, left again - and still your pursuers are with you.^ ^ The road is narrowing. The clock is ticking.^"; ]; Include "Grammar"; IFDEF DEBUG; [ SetTimerSub; timer.time_left = noun; print_ret "[Timer set to ", (time) noun, ".]"; ]; [ StopTimerSub; give timer stopped; "[Timer stopped.]"; ]; [ StartTimerSub; give timer ~stopped; "[Timer running.]"; ]; [ SpeedTimerSub; timer_speed = noun; print_ret "[Timer speed set to ", noun, ".]"; ]; Verb meta 'time' * number -> SetTimer * 'stop' -> StopTimer * 'start' -> StartTimer * 'speed' number -> SpeedTimer; [ SetAirSub; helmet.time_left = noun; print_ret "[Air supply set to ", (time) noun, ".]"; ]; Verb meta 'air' * number -> SetAir; ENDIF; [ PauseSub keypress; @erase_window -1; new_line; font off; print "[ Paused ]"; font on; new_line; new_line; print "Press any key..."; @read_char 1 0 0 keypress; @erase_window -1; DrawStatusLine(); ; ]; Verb 'pause' * -> Pause; [ XyzzySub; "A hollow voice booms, ~BOOM!~"; ]; Verb 'xyzzy' * -> Xyzzy;