Inform - Resources - Examples

Back to List




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;
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;
1023  !  Cf. T. S. Eliot, "Burnt Norton" II:
1024  !  (but see also Mallarme's sonnet from which Eliot borrowed the image)
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         ];
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         ];

Last updated 23 June 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson ( assisted by C Knight.