An interactive fiction by Juhana Leinonen (2008) - the Inform 7 source text
|Book 3 - Scoring
Use no scoring. [this disables the default visible mechanisms so that we can build a custom one instead. The built-in score counter is still available.]
To decide whether the score is the maximum:
if the score is 11:
Requesting the full score is an action out of world.
Understand "full" or "full score" or "escapes" or "escapades" as requesting the full score.
Understand the command "notify" as something new.
Instead of requesting the score:
try requesting the full score.
The score printing rule is listed instead of the announce the score rule in the carry out requesting the score rules.
Carry out requesting the full score (this is the score printing rule):
if the score is 0:
say "So far you have scored zero points.[if the creature is present][line break][c]Whoopee. There's my great adventurer,' [the creature] comments." instead;
if the score is 1:
choose row 1 in the Table of Accomplished escapes;
say "You have escaped once by [method entry].";
say "You [if the game ended in victory or the game ended in death][otherwise]have [end if]escaped [if the score is 2]twice[otherwise][score in words] times[end if]:[line break]";
repeat through Table of Accomplished escapes:
say " - by [method entry][line break]";
if the creature is present:
say "[line break]";
if the score < 3, say "[c]I bet if I put you in a paper bag and gave you scissors you couldn't find your way out,' [the creature] speculates." instead;
if the score < 5, say "[c]On the other hand you have been caught [italic type][score + 1 in words][roman type] times now,' [the creature] remarks." instead;
say "[c]Impressive. Now, to escape [italic type]without[roman type] getting caught...' [the creature] muses." instead;
Table of Accomplished escapes
To mark the escape down as ( feat - text ):
choose a blank row in Table of Accomplished escapes;
change method entry to feat;
award 1 point;
if the score is 4:
the dark clouds gather in three turns from now;
if the score is 5:
the food is delivered to the cell in two turns from now.
At the time when the dark clouds gather:
say silent c; [no H.R. quips this turn]
say "Dark clouds gather in the sky and block the moonlight.";
now the clouds are in the cell.
At the time when the food is delivered to the cell:
say silent c;
if the electrical wire is boobytrapping the door:
say "There's a knock on the door. The guard doesn't wait for a response but starts turning the key in the lock and shouts: 'Your DINNER IS...'
The electrical wire gives a good shock to the guard and he flies backwards to the opposite wall. You go see if the door opened - and it did! You take off into the corridors.";
pause the cutscene;
say "After wandering around the castle for some while you realize you have no idea where you are. The corridors and staircases create a maze where you just can't know where you're going[if the player is naked]. The coldness makes you soon wish you had clothes on[end if].
You turn around a corner and bump into the guard who is still a bit dazed. He reacts quickly now and grabs a hold of you. 'And STAY THERE!' he shouts when he throws you back in the cell.
A plate with a tin foil bundle on it has been left in the cell.";
zap the guard;
say "There's a knock on the door. Not waiting for a response the guard opens the door and shouts: 'Your DINNER IS HERE!' He throws a plate in the cell with a silvery package on it and locks the door again.";
now the dinner plate is in the cell.