Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Balances.inf

10. The cave mouth and the perfect sapphire (lines 996-1052)

0996  Place Cave_Mouth "Cave Mouth"
0997    with name "gorse" "footpath" "cave" "mouth",
0998         description
0999            "This is a cave mouth, at one end of a road which winds southeast
1000             over rising ground.  The entrance west to the caves is a dark
1001             tunnel, and only a footpath runs further north, into gorse.",
1002         u_to Up_Road, se_to Up_Road, in_to Iron_Door, w_to Iron_Door,
1003         n_to Footpath;
1004   
1005  Object -> Iron_Door "iron door"
1006    with name "iron" "door" "heavy",
1007         description "It just looks like an ordinary heavy iron door.",
1008         door_dir
1009         [; if (location==Cave_Mouth) return w_to; return e_to;
1010         ],
1011         door_to
1012         [; if (location==Cave_Mouth) return In_Cave;
1013            return Cave_Mouth;
1014         ],
1015         describe
1016         [; if (self has open) "^The iron door stands open.";
1017            if (self hasnt locked) "^The iron door is unlocked but shut.";
1018            "A heavy iron door bars the cave mouth.";
1019         ],
1020         found_in  In_Cave  Cave_Mouth
1021    has  static door openable locked lockable;
1022   
1023  !  Cf. T. S. Eliot, "Burnt Norton" II:
1024  !  (but see also Mallarme's sonnet from which Eliot borrowed the image)
1025   
1026  Object -> sapphire "perfect sapphire"
1027    with name "perfect" "sapphire" "gemstone" "gem",
1028         initial "Clotted in the mud beside the door is a perfect sapphire.",
1029         before
1030         [;  Examine: remove self; move caskly_spell to memory;
1031                      players_book.learn_spell(caskly_spell);
1032                      caskly_spell.number=100;
1033                      "As you gaze into the perfect blue of the sapphire,
1034                       you feel your mind begin to reel.  Unable to bear
1035                       the naked sight of perfection, you look away, ashamed. 
1036                       As you do so, the sapphire cracks and wastes away to
1037                       thin hot dust.  But something remains, something in your
1038                       mind...";
1039         ];
1040   
1041  Spell caskly_spell
1042    with name "caskly",
1043         purpose "cause perfection",
1044         magic
1045         [;  if (second==0) "Trying to make everything perfect was a little
1046                             too ambitious.";
1047             if (second==player) "Oh, don't be too hard on yourself.";
1048             if (second==helistars_book)
1049                 "Your spell is not powerful enough to restore the lost pages.";
1050             print_ret (The) second, " looks pretty perfect as is.";
1051         ];
1052   


Last updated 23 June 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.