!---------------------------------------------------------------------------- !*************************************************** EXIT LISTINGS FOR ROOMS !---------------------------------------------------------------------------- routine PrintText14(val1,val2) { select val1 !---------------- ! Prologue Exits !---------------- case grassland { !Usage: (14,location) "You can go onward." } case at_grassy_patch, campsite { print "Your journey is "; game_fore_dir.name; ", but it may be worth staying here a moment." } !-------------- ! Part 1 Exits !-------------- case farm_path { !Usage: (14,location) "The path leads east." } case hill { !Usage: (14,location) "You can go south (back to the farm house), "; if InList(wagon,found_at,location) { "or southeast along a well-packed path (into the barn)." } else { "but the entrance to the barn (down the southeast path) is blocked by the upturned wagon." } } case barn { !Usage: (14,location) ! We're going to print the available exits in the barn. In order ! to make it read right, it's sort of a complicated routine. val1 = 0 !Used to designate highest exit num. val2 = 0 !Used to designate the first exit num. if (barn_doors is not locked) { if val2 = 0: val2 = 1 tempbuf1[1] = true val1 = 1 } else { tempbuf1[1] = false } if (wagon.found_at #1 = hill) { if val2 = 0: val2 = 2 tempbuf1[2] = true val1 = 2 } else { tempbuf1[2] = false } if (barn_southexit is open) { if val2 = 0: val2 = 3 tempbuf1[3] = true val1 = 3 } else { tempbuf1[3] = false } if not IsAttached(rope,hatch_handle) { if val2 = 0: val2 = 4 tempbuf1[4] = true val1 = 4 } else { tempbuf1[4] = false } if (loft_ladder is not distant) { if val2 = 0: val2 = 5 tempbuf1[5] = true val1 = 5 } else { tempbuf1[5] = false } if (val1 = 0) { !I'm not sure I like this message, but it'll work. "You have nowhere to go!" } else { "From here, you can go "; for (rnd = 1; rnd <= 5; rnd++) { !Check if this exit was valid. if (tempbuf1[rnd]) { if (rnd > val2) { !This isn't the first one printed, so: if (rnd = val1) { " and "; !We're printing the last one. } else { ", "; !We're printing another in the list. } } select rnd case 1 { "west (out the double doors)"; } case 2 { "northwest (to the "; if (hill is visited) { "feeding hill)"; } else { "outside)"; } } case 3 { ! We have to visit the orchard before we can ! exit to the orchard from here, so no need ! to specifically check to see if it's known. "southwest (to the orchard)"; } case 4 { "down (to the cellar)"; } case 5 { "up (to the loft)"; } } } print "."; if (barn_southexit is not open) and \ (barn_southexit.found_in #1 = barn) and \ (object ~= sw_obj) { ! We have to not say this if the player tries going SW ! because it would be redundant. " A panel to the southwest is closed, blocking that exit." } else { print newline !Or just end the line. We're done now. } } } case orchard { !Usage: (14,location) if (barn_southexit is open) { rnd = 1 !Used as a flag, below. "You can go northeast (into the barn), "; } else { rnd = 2 !Used as a flag, below. "A large panel can be lifted to open an entrance to the barn (northeast), "; } if (south_gate is locked) { if not Contains(player,gate_key) { "but the gate (leading north) is locked." } else { "and a gate (leading north) can be unlocked." } } else { "or "; if (rnd = 2): "you can go "; "north through the gate (back to the farm house)." } } case house { !Usage: (14,location) "You can go north (to the feeding hill)"; !Using some segmented text, so that duplicate partial phrases !will only use up one space in the Hugo text dictionary table. if (south_gate is not locked) or Contains(player, gate_key) { if (barn_doors is not locked) { print ", "; "east (into the barn)"; print ", or "; print "south (to the orchard)"; } else { print " or "; "south (to the orchard)"; } } elseif (barn_doors is not locked) { print " or "; "east (into the barn)"; } "."; !A period to end the prior line. if (south_gate is locked) and not Contains(player, gate_key) { " A gate to the south is locked." } else { print newline !Nothing else to add. } } case loft { !Usage: (14,location) "A ladder "; if (not loft_ladder.misc #1) { "is held up by a flat lever, and it "; } "leads down into the barn." } case cellar { !Usage: (14,location) "Ladder-like steps lead way up, into the barn." } !-------------- ! Part 2 Exits !-------------- !Message for at_grassy_patch in prologue is already covering this one. !case campsite { !} case trawl { !Usage: (14,location) "You can see no way out but up." } case deck { !Usage: (14,location) if (count_spiders > 0) { "You can't go anywhere while huge spiders are here." } else { if (deck.misc #1 = 3) { "A ladder leads down from the starboard side (currently north). "; } "An entrance to the cabin is aft (currently "; print barge_aft_dir.name; "), and steps lead up the side of the cabin, to "; if (quarters is visited) { "the captain's quarters."; } else { "a room above."; } if InList(cargo,misc,mast) { " You can also climb three crates stacked step-like near the mast." } else { print newline !Nothing else to add. } } } case cabin { !Usage: (14,location) print "An exit is forward (currently "; barge_fore_dir.name; "), "; "and a ladder leads up to another room." } case mill { rnd = false !There wasn't an exit already shown, as a flag. if (starboard_wing.misc #1) { "You can climb the wing against the windmill's lower steps"; rnd = true } if (mill_door is not locked) { if (rnd): ", "; else: "You can "; "enter the windmill (to the west)"; if (rnd): ","; rnd = true } if (rnd): " or "; else: "You can "; "climb the ladder to the barge's deck (south)." } case in_mill { !Usage: (14,location) print "A door leads out to the east." } case quarters { !Usage: (14,location) print "A door is forward (currently "; barge_fore_dir.name; "), "; "and a ladder leads down to the cabin." } !-------------- ! Part 3 Exits !-------------- case wharf { !Usage: (14,location) "A ladder leads down to the dry riverbed, and the village is to the east." } case riverbed { !Usage: (14,location) "A ladder leads up to the wharf." } case village { !Usage: (14,locations) if (chain.misc #1) { "A long chain leads down into the well. You can also "; } else { "You can "; } "go north (into huts that line the dry riverside) or west (back to the wharf)." } case east_tunnel { "You can go up (a chain leads out) or west (to the other end of the tunnel). "; if (simple_door is open) { "A simple door leads into "; if (hall is visited) { "a large chamber "; } else { "another room "; } "(to the northwest), but it is quickly closing." } else { "A simple door to the northwest is closed." } } case west_tunnel { "The tunnel leads back to the east. A large, ornate door "; PrintOpenClosed(ornate_door) " is to the west." } case chamber { !Usage: (14,location) print "A large, ornate door is to the east (closed, and without an apparent means of opening from this side), and a door-sized panel is to the north "; : PrintOpenClosed(river_panel, true, true) } case hall { !Usage: (14,location) "The only way from here is through the simple door (to the southeast). The larger chamber below the ledge is inaccessible." } !---------------- ! Epilogue Exits !---------------- case kitchen { !Usage: (14,location) print "A hallway ("; game_fore_dir.name; ") leads to the back door." } case hallway { print "The back door leads "; game_fore_dir.name; print ", and the kitchen is to the "; game_back_dir.name; "." } }