Escapade!

An interactive fiction by Juhana Leinonen (2008) - the Inform 7 source text

Home page

Contents
Previous
Next

Complete text
Book Trading



Part Trading action


Understand "give [something preferably held] with [something]" as giving it to.
Understand the command "trade" as "give".
Understand the command "exchange" as "give".
Understand the command "swap" as "give".
Understand the command "bargain" as "give".

Does the player mean giving something to the creature when the creature is present: It is very likely.

Does the player mean giving something to the player: It is very unlikely.

Understand "give [something]" as giving it to.

Rule for supplying a missing second noun while giving:
    if the guard is in the cell:
        change the second noun to the guard;
    otherwise if the creature is in the cell:
        change the second noun to the creature;
    otherwise:
        say "There's no-one here.".


Before giving something to the creature when the creature is absent:
    if the creature is first name basis and the guard is in the cell:
        say goodbye to the guard;
        continue the action;
    otherwise:
        say "You'd rather not give stuff to a strange monster when you have no idea what it wants.";
        stop the action.

To hand (merchandise - a thing) to the player:
    if the merchandise is bulky and the player carries a substantial thing:
        say "[line break]You drop everything from your hands to make room for [the merchandise].";
        repeat with x running through substantial things carried by the player:
            silently try dropping x;
    now the merchandise is in the cell;
    now the merchandise is seen;
    silently try taking the merchandise.


Instead of giving something to the creature when the creature is present:
    if the noun is the player:
        say "'What if I trade myself? What would you give in return?'[paragraph break][c]It's a tempting offer, but I'm not that hungry right now,' [the creature] replies.";
    otherwise if the noun is useful:
        say "You decide to hold on to it for a bit longer. It might still come useful.";
    otherwise:
        say "[one of]The creature shrugs. [c]Meh. Those kind of things don't sell.'[or][c]No thanks,' the creature says.[or][c]I think I have one of those already,' [the creature] says.[or][c]Thanks, but you should keep it,' [the creature] says.[at random]".