!!! 'sky' synonym added to GlassCeiling by Rob ! Segment 2 of ifwhispers. Thanks to baf is this thing going through. ! Write a function called PoorMansInitialise if you want to assign ! different values to properties. It is guaranteed that this function ! will be called before the properties are invoked. Note that it will ! be a good idea to provide a call to another Initialise function ! framed by IfDefs so that the next author can also set properties: Global initialised = false; ! To avoid redundant computation. [ MakeInitialise; initialised = true; ! Automatic VERBOSE is in order: lookmode = 2; ! We will simplify the problem of getting off the cube by adding a ladder: Roof.description = NewRoofDesc; Roof.d_to = ClimbDownCube; ! The hydraulic lift will be able to rise to new heights: HydraulicLift.description = NewLiftDesc; #IfDef PoorMansInitialise; PoorMansInitialise (); #EndIf; ]; ! Modifications of baf's stuff: [ NewRoofDesc; print "You're on top of a 20-foot steel cube in the middle of a vast cornfield."; if (Slab in self) " A stone slab forms part of the roof, and a steel ladder leads down one side."; " A steel ladder leads down."; ]; [ NewLiftDesc; switch (location) { SteelRoom: "A circular shaft, wider around than you can reach with both arms, stretches from a dark hole in the floor to the stone slab now flush with the ceiling."; Roof: "A circular shaft, wider around than you can reach with both arms, stretches from a small aperture in the floor to the stone slab now flush with the glass ceiling."; default: "[BUG] Lift doesn't go here."; } ]; ! If you add more rooms to the cornfield, then make them of this class ! so that they will contain the glass ceiling and the corn. !!! Line changed at serhei's request. Original line follows: ! Class CornLoc; Class CornLoc with name 'corn'; ! And object definitions: Object Ladder "steel ladder" Roof has scenery, with name 'narrow' 'steel' 'metal' 'ladder' 'leading' 'down' 'up' 'small' 'round' 'aperture' 'in' 'floor', author "serhei", before "That's not something you need to refer to in the course of this game.", found_in Roof CornEntry; Object GlassCeiling "glass ceiling" Roof has light, ! Oh yes. The ceiling is providing light in the text - why not ! in the world model? with name 'glowing' 'glass' 'ceiling' 'roof' 'light' 'fixture' 'sky', author "serhei", initial [; if (HydraulicLift in location) "The shaft of the hydraulic lift extends upwards to the glass ceiling."; "However, that's no comfort to you, as the cornfield is not in Kansas anymore. Rather, it is under a vast glass ceiling which is shedding an even grey light on the area."; ], ! Bleah: Long-winded description. description "The ceiling stretches out as far as you can see (as does the cornfield). Its facelessness reminds you of the light fixtures in an office building, and the light that it sheds is so grey and dim that you wonder how the corn manages to survive.", before [; Examine, Listen: ; default: print "You won't be able to accomplish much except by using your senses, especially since the ceiling is (at a guess) "; if (location == Roof) "a further 20 feet above you."; "40 feet above you."; ], found_in [; ! This property is called whenever the player changes ! location. Hence, it's convenient as a poor man's ! Initialize, as the player will change location before ! this section or any other is entered. if (~~initialised) MakeInitialise (); ! Also, it's good for making sure that ! the player doesn't see the initial () for the roof when ! he is exploring down in the cornfield: if (location == Roof) { give self ~scenery; ! rtrue; } else give self scenery; ! And the found_in property. It loops through an array so ! that cornfield locations can be added: return location ofclass CornLoc || location == Roof; ]; Object DeadBody "dead body" Roof ! has general if searched with name 'dead' 'body' 'rotting' 'corpse' 'companion', author "serhei", initial [; if (location == Roof) "A further lack of comfort is caused by the silent companionship of a rotting corpse."; "Maddeningly, the corpse is here."; ], description "To your disgust, the man has died a long time ago. He resembles no one you know, either from your scientific life or your family life (the two of which you take great care to keep separate).", before [; Examine: ; Search: if (self hasnt general) { give self general; move CodePaper to player; "You gingerly examine the corpse and find that it has a piece of paper in its pocket, which you take. A more thorough search would be too disgusting to carry out."; } else "You don't want to do that again."; Push, Pull, PushDir: if (location == Roof) { move self to CornEntry; "You push the corpse off the roof."; } "You're not going to get the corpse any lower."; default: "Ugh. You don't want to spend too much time with the corpse."; ]; ! Rather than amnesia, let us have an Infidel-like language. Note that ! ($) = vault ! !^^^ = to grow/rise ! >>> = corn Object CodePaper "piece of paper" with name 'piece' 'scrap' 'of' 'paper' 'messy' 'handwriting' 'hand' 'writing', author "serhei", description [; print "Scribbled on it in messy handwriting is:^^"; style bold; print "This is * I remember (sadly little):^ ^ - Message was [||] !<> ($)^ - Each sentence begins with a new line and an ~o~^ - | = 1, || = 2, etc. up to 4. Then + = 5, ++ = 10 ...^ - [||] = square^ - Verbs contain !, eg !<> = to open (as I found)^ - Verbs never conjugated^ - ($) meaning is unknown - not forgotten^"; style roman; rtrue; ]; [ ClimbDownCube; print "You make your way down the ladder.^"; return CornEntry; ]; CornLoc CornEntry "By The Cube, West Side" with name 'metal' 'ladder' 'path', author "serhei", description "The corn is taller than your head here. If not for the cube as a landmark, you would be completely lost, as though in one of those mazes of twisty passages, all corn. There is only one passage here, leading west, unless you care to take the metal ladder leading up the cube.^^On the side of the cube are an ultra-green button and a plaque.", u_to [; print "You climb up the ladder.^"; return Roof; ], w_to [; if (WhiteButton has general) print "You feel as though you have stepped into the middle of a standoff.^"; return Fallow; ]; Object WestCubeSide "twenty-foot steel cube" CornEntry has static scenery, with name 'side' 'of' 'twenty' 'foot' 'steel' 'cube', author "serhei", description "This wall of the cube is as featureless as the inside, except for a small ultra-green button let into it and a plaque.", add_to_scope UltraGreenButton Plaque; Object UltraGreenButton "ultra-green button" has scenery, ! general if currently counting down with name 'ultra' 'green' 'button', author "serhei", description [; print "If the button inside the cube was pure green, this is twice as green as that - hence ultra-green. It is therefore twice as inviting as the button within and you have a headache. Written on the button is the following:^^"; style bold; print " o [||] !@@94@@94@@94 ++++^"; style roman; rtrue; ], before [; Push: if (self hasnt general) { StartTimer (self, 6); give self general; "Ten muffled beeps emanate from the hidden machinery."; } return Bing (); ], time_left 0, time_out [; give self ~general; return ToggleSlabUp (); ]; ! In the context of IF Whispers I disagree with boxed quotations ! because they need precise formatting which can be interfered with. ! Therefore I'll just bold the quotations: Global python_quoted = false; [ Bing; print "The button responds with only a small "; style bold; print "bing"; style roman; if (~~python_quoted) { python_quoted = true; print ".^^"; style bold; print "Do you know what that is? That's the machine^ that goes: *bing*! Now aren't you lucky?^ ^ -- Monty Python and the Meaning of Life^"; style roman; rtrue; } "."; ]; Object Plaque "plaque" has scenery, with name 'metal' 'plaque', author "serhei", description [; print "The plaque says:^^"; style bold; print " o >>> !@@94@@94@@94 [|||]^"; style roman; rtrue; ]; [ ToggleSlabUp; if (slab in Roof) return RaiseSlabFurther (); else if (slab in Blindness) return LowerSlabFurther (); else " *** Slab in wrong location for ToggleSlabUp *** "; ]; [ RaiseSlabFurther; move Slab to Blindness; move HydraulicLift to Roof; if (location == thedark) rtrue; if (IndirectlyContains (Slab, player)) { print "^The slab zooms up above the cornfield. Just as you are about to smash into the glass ceiling, yet another panel opens and you emerge into a different room.^"; PlayerTo (parent (player)); rtrue; } switch (location) { Roof: "^With an unassuming wheeze, the massive slab zooms up to new heights, now flush with the glass ceiling. You guess that there must be another room up there. However, no hole in the the roof of the cube is revealed - there is only a small round aperture which is occupied by the shaft."; Blindness: "^The darkness at your feet is suddenly punctured by the arrival of the hydraulic slab."; SteelRoom: move HydraulicLift to SteelRoom; "^The slab goes further up, so that the metal pole of the lift appears to be attached to the ceiling."; ! Impossible? } ]; [ LowerSlabFurther; move Slab to Roof; move HydraulicLift to SteelRoom; if (location == thedark) rtrue; if (IndirectlyContains (Slab, player)) { print "^Without warning, the slab plunges back onto the cube, the ceiling closing up behind it.^"; PlayerTo (parent (player)); rtrue; } switch (location) { SteelRoom: "^The cube reappears in the ceiling."; ! Impossible? Roof: "^The slab is lowered silently onto the roof."; Blindness: "^The slab plunges into the darkness."; } ]; CornLoc Fallow "Empty Field" with name 'square' 'patch' 'of' 'land' 'steel' 'metal' 'twenty' 'foot' 'cube' 'path', author "serhei", description "This is a square patch of land, about 20 feet to a side (everything's measured in increments of 20 feet here, it seems), where no corn is currently growing. At the edges of the patch the corn stands unbroken in every direction except east, where a path leads away to the cube.", e_to [; if (WhiteButton has general) print "You feel as though you have just walked out of a stuffy building.^"; return CornEntry; ], n_to ShedDoor, in_to ShedDoor; Object ShedDoor "metal shed" Fallow has door openable lockable locked, with name 'metal' 'steel' 'shed' 'building' 'structure' 'door' 'handle', author "serhei", when_closed "To the north is the entrance to some sort of metal shed.", when_open "The shed stands open to the north.", door_dir n_to, door_to Shed, description "The shed is partly buried in the soil. A metal door (with a handle) leads into it. Beside the door are two buttons - a red one and a white one.", add_to_scope WhiteButton RedButton; Object WhiteButton "white button" has scenery, ! general if it is currently unlocking with name 'white' 'button', author "serhei", description "Looks innocuous enough.", time_left 0, daemon [; if (location == Fallow) switch (--self.time_left) { 3: "^You suddenly notice how silent it is."; 2: "^The air here feels like it is charged with static as though before a thunderstorm."; 1: give ShedDoor ~locked; print "^The temperature rises a couple of degrees, and there is a series of worrying squeaks from the ceiling which remind you of the theme from "; style bold; print "Psycho"; style roman; "."; 0: !!! Added at serhei's request if (ShedDoor has open) { StopDaemon (self); "The charged atmosphere dispels suddenly."; } !!! End of addition StopDaemon (self); give self ~general; give ShedDoor locked; "^Suddenly, the charged atmosphere dispels itself. The door emits a grinding noise which sounds exactly as though it had just been locked."; } else self.time_left--; ], before [; Push: if (self hasnt general) { give self general; self.time_left = 4; StartDaemon (self); print "The button emits a small "; style bold; print "click"; style roman; "."; } return Bing (); ]; Object RedButton "red button" has scenery, ! general if pushed already (out of gas) with name 'red' 'button', author "serhei", description "Looks highly dangerous.", time_left 0, daemon [; if (location ofclass CornLoc || location == Roof) switch (--self.time_left) { 3: "^You suddenly notice how silent it is."; 2: "^The air here feels like it is charged with static as though before a thunderstorm."; 1: print "^The temperature rises a couple of degrees, and there are a series of worrying squeaks from the ceiling which remind you of the theme from "; style bold; print "Psycho"; style roman; "."; 0: StopDaemon (self); if (location == Roof or SteelRoom or Crawlspace) { deadflag = 1; print "^Without warning, slam bang you're dead.^^"; style bold; print "Victims never knew what happened. The mind^cannot react fast enough to record such an event.^ ^ -- A History Textbook^"; style roman; rtrue; } "^Suddenly, there is a blinding flash of light. Before it is over, your eyes adjust to it in time to see all the corn around you suddenly grow an inch.^^ The charged atmosphere is dispelled."; } else self.time_left--; ], before [; Push: if (self hasnt general) { give self general; self.time_left = 4; StartDaemon (self); print "The button emits a small "; style bold; print "click"; style roman; "."; } return Bing (); ]; Object Shed "Inside The Shed" has light, with name 'bare' 'metallic' 'walls', author "serhei", description "The shed is partly sunken into the ground. Bare metallic walls stare at you from all directions.", cant_go "The exit to the cornfield is to the south.", s_to Fallow, out_to Fallow, d_to 0; ! You can now add an underground section by saying "A ! HOLE OPENS UP! ! cube ! corn ! There is currently no reward for going here, which should be ! changed. I also provided for adding rooms to this so this can be ! made into a full-fledged area: Object Blindness "Blindness" has light, with name 'blindness' 'blind' 'dark' 'darkness' 'rectangle' 'of' 'dazzling' 'bright' 'light', author "serhei", ! Change to include slab: description "You think it was pitch dark here if it wasn't for the fact that you can see yourself, your belongings, and the slab in the floor. There is also a rectangle of dazzling light to the south.", ! Take NOTE: you may add exits to Blindness by assigning rooms ! to this room's e_to, w_to, and n_to properties if you wish. ! Example: by solving a puzzle. cant_go "You bumped into something hard there.", e_to 0, w_to 0, n_to 0, s_to HumanChessN; ! ChessLoc is similar to CornLoc, except that it contains the ! fantastic chess pieces (in general). Class ChessLoc has light; ChessLoc HumanChessN "Human Chess, North" has light, with name 'board' 'chessboard' 'human' 'dark' 'openings', author "serhei", description "You're standing on the northern edge of a 40-foot chrome cube, the bottom of which is occupied by an enormous chessboard. What look like fantastic chess pieces are scattered across it. Everything gleams at you.", n_to Blindness, ! This should probably be changed if we're going to play any chess: s_to "Some force prevents you from doing that."; Object DummyChessPieces "fantastic chess pieces" HumanChessN has scenery, with name 'fantastic' 'chess' 'pieces' 'chessmen' 'men', author "serhei", description "Shapes so fantastic that your brain refuses to register them.", found_in [; return location ofclass ChessLoc; ];