The Beast of Torrack Moor

An interactive fiction by Linda Wright (2007) - the Inform 7 source text

Home page

Contents
Previous
Next

Complete text
Section 4 - The Bus

The bus is a vehicle. The description is "A number 53 - it's about to leave."

The bus stop is scenery in Long Street.

[ If the player knows about Miss Myrtle, and has missed the bus - game over ]
To check if the player has failed:
    if the letter is read and the time of day is after 9:49 AM begin;
        say "It occurs to you that the bus to Puddlecombe only runs once a day - and you've missed it!";
        end the game saying "You didn't get the story";
    end if.

At 9:44 AM:
    if the player is in Long Street,
        say "A bus arrives.";
    move the bus to Long Street.

At 9:50 AM:
    if the player is in Long Street,
        say "The bus leaves.";
    remove the bus from play;
    check if the player has failed.
    
Instead of entering the bus:
    calculate funds;
    if total money is less than £1.00 begin;
        say "You don't have enough money for the fare!";
    otherwise;
        say "You board the bus, pay your fare and are slowly transported to the village of Puddlecombe-by-the-Moor, where you alight before the bus trundles on its way.";
        spend £1.00;
        change the time of day to 1 hour after the time of day;
        now the player is in The Green;
    end if.