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 2 - Regular unlocking

Understand the command "unlock" as something new. Understand "unlock [something] with [something]" as unlocking it with. Understand "unlock [a locked lockable thing] with [something]" as unlocking it with. Understand "unlock [a lockable thing] with [something]" as unlocking it with.

Understand the commands "open" and "uncover" and "unwrap" as something new. Understand "open [something]" or "uncover [something]" or "unwrap [something]" as opening. Understand "open [something] with [something]" as unlocking it with. Understand "open [a locked lockable thing] with [something]" as unlocking it with. Understand "open [a lockable thing] with [something]" as unlocking it with.

Check unlocking it with:
    abide by the must have accessible the second noun rule.

Procedural rule: substitute the right second rule for the can't unlock without the correct key rule.

This is the right second rule:
    if the noun provides the property matching key
    begin;
        if the second noun is not the matching key of the noun, say "[The second noun] does not fit [the noun]." instead;
    otherwise;
        say "[The second noun] does not fit [the noun]." instead;
    end if.