Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Ruins.inf

Objects moved into place during play (lines 668-920)

668  !       These objects are moved into place as the game proceeds.
669  !
670  !       Defined in DM4 §14, modified in §23
671  Object  sodium_lamp "sodium lamp"
672    with  name 'sodium' 'lamp' 'heavy',
673          describe [;
674              if (self has on)
675                  "^The sodium lamp squats on the ground, burning away.";
676              "^The sodium lamp squats heavily on the ground.";
677              ],
678          before [;
679              Examine:
680                  print "It is a heavy-duty archaeologist's lamp, ";
681                  if (self hasnt on) "currently off.";
682                  if (self.battery_power < 10) "glowing a dim yellow.";
683                  "blazing with brilliant yellow light.";
684              Burn:
685                  <<SwitchOn self>>;
686              SwitchOn:
687                  if (self.battery_power <= 0)
688                      "Unfortunately, the battery seems to be dead.";
689                  if (parent(self) hasnt supporter && self notin location)
690                      "The lamp must be securely placed before being lit.";
691              Take, Remove:
692                  if (self has on)
693                      "The bulb's too delicate and the metal handle's too hot
694                       to lift the lamp while it's switched on.";
695              PushDir:
696                  if (location == Shrine && second == sw_obj)
697                      "The nearest you can do is to push the sodium lamp to the
698                       very lip of the Shrine, where the cave floor falls away.";
699                  AllowPushDir();
700                  rtrue;
701              ],
702          after [;
703              SwitchOn:
704                  give self light;
705              SwitchOff:
706                  give self ~light;
707              ],
708          daemon [;
709              if (self hasnt on) return;
710              if (--self.battery_power == 0) give self ~light ~on;
711              if (self in location) {
712                  switch (self.battery_power) {
713                      10: "^The sodium lamp is getting dimmer!";
714                      5:  "^The sodium lamp can't last much longer.";
715                      0:  "^The sodium lamp fades and suddenly dies.";
716                      }
717                  }
718              ],
719          battery_power 100,
720    has   switchable;
721   
722  !       Defined in DM4 §16
723  Object  dictionary "Waldeck's Mayan dictionary"
724    with  name 'dictionary' 'local' 'guide' 'book' 'mayan' 'waldeck'
725               'waldeck^s',
726          description
727              "Compiled from the unreliable lithographs of the legendary raconteur
728               and explorer ~Count~ Jean Frederic Maximilien Waldeck
729               (1766??-1875), this guide contains what little is known of the
730               glyphs used in the local ancient dialect.",
731          before [ w1 w2 glyph;
732              Consult:
733                  wn = consult_from;
734                  w1 = NextWord(); ! First word of subject
735                  w2 = NextWord(); ! Second word (if any) of subject
736                  if (consult_words==1 && w1~='glyph' or 'glyphs') glyph = w1;
737                  else if (consult_words==2 && w1=='glyph') glyph = w2;
738                  else if (consult_words==2 && w2=='glyph') glyph = w1;
739                  else "Try ~look up  in book~.";
740                  switch (glyph) {
741                      'q1':       "(This is one glyph you have memorised!)^^
742                                   Q1: ~sacred site~.";
743                      'crescent': "Crescent: believed pronounced ~xibalba~,
744                                   though its meaning is unknown.";
745                      'arrow':    "Arrow: ~journey; becoming~.";
746                      'skull':    "Skull: ~death, doom; fate (not nec. bad)~.";
747                      'circle':   "Circle: ~the Sun; also life, lifetime~.";
748                      'jaguar':   "Jaguar: ~lord~.";
749                      'monkey':   "Monkey: ~priest?~.";
750                      'bird':     if (self.correct) "Bird: ~dead as a stone~.";
751                                  "Bird: ~rich, affluent?~.";
752                      default:    "That glyph is so far unrecorded.";
753                  }
754              ],
755          correct false,
756    has   proper;
757   
758  !       Defined in DM4 §23
759  Object  map "sketch-map of Quintana Roo"
760    with  name 'map' 'sketch' 'sketch-map' 'quintana' 'roo',
761          description
762              "This map marks little more than the creek which brought you
763               here, off the south-east edge of Mexico and into deepest
764               rainforest, broken only by this raised plateau.";
765   
766  !       Defined in DM4 §23
767  Object  stone_key "stone key"
768    with  name 'stone' 'key';
769   
770  !       Defined in DM4 §17, modified in §18 and §23
771  Object  priest "mummified priest"
772    with  name 'mummified' 'priest',
773          initial
774              "Behind the slab, a mummified priest stands waiting,
775               barely alive at best, impossibly venerable.",
776          description
777              "He is desiccated and hangs together only by will-power. Though his
778               first language is presumably local Mayan, you have the curious
779               instinct that he will understand your speech.",
780          life [;
781              Answer:
782                  "The priest coughs, and almost falls apart.";
783              Ask: switch (second) {
784                  'dictionary', 'book':
785                      if (dictionary.correct == false)
786                          "~The ~bird~ glyph... very funny.~";
787                      "~A dictionary? Really?~";
788                  'glyph', 'glyphs', 'mayan', 'dialect':
789                      "~In our culture, the Priests are ever literate.~";
790                  'lord', 'tomb', 'shrine', 'temple':
791                      "~This is a private matter.~";
792                  'paintings':
793                      "The calendrical priest frowns. ~10 baktun, 4 katun,
794                       that makes 1,468,800 days since the beginning of time:
795                       in your calendar 19 January 909.~";
796                  'ruins':
797                      "~The ruins will ever defeat thieves. In the underworld,
798                       looters are tortured throughout eternity.~ A pause.
799                       ~As are archaeologists.~";
800                  'web', 'wormcast':
801                      "~No man can pass the Wormcast.~";
802                  'xibalba':
803                      if (Shrine.sw_to == Junction)
804                          "The priest shakes his bony finger.";
805                      Shrine.sw_to = Junction;
806                      "The priest extends one bony finger southwest toward the
807                       icicles, which vanish like frost as he speaks. ~Xibalb@'a,
808                       the Underworld.~";
809                      }
810                  "~You must find your own answer.~";
811              Tell:
812                  "The priest has no interest in your sordid life.";
813              Attack, Kiss:
814                  remove self;
815                  "The priest desiccates away into dust until nothing remains,
816                   not a breeze nor a bone.";
817              ThrowAt:
818                  move noun to location; <<Attack self>>;
819              Show, Give:
820                  if (noun == dictionary && dictionary.correct == false) {
821                      dictionary.correct = true;
822                      "The priest reads a little of the book, laughing in a
823                       hollow, whispering way. Unable to restrain his mirth,
824                       he scratches in a correction somewhere before returning
825                       the book.";
826                      }
827                  if (noun == newspaper)
828                      "He looks at the date. ~12 baktun 16 katun 4 tun 1 uinal
829                       12 kin~, he declares before browsing the front page.
830                       ~Ah. Progress, I see.~";
831                  "The priest is not interested in earthly things.";
832              ],
833          orders [;
834              Go:
835                  "~I must not leave the Shrine.~";
836              NotUnderstood:
837                  "~You speak in riddles.~";
838              default:
839                  "~It is not your orders I serve.~";
840              ],
841    has   animate;
842   
843  !       Defined in DM4 Exercise 53
844  Object  warthog "Warthog"
845    with  name 'wart' 'hog' 'warthog',
846          initial
847              "A warthog snuffles and grunts about in the ashes.",
848          description
849              "Muddy and grunting.",
850          orders [;
851              Go, Look, Examine, Smell, Taste, Touch, Search,Jump, Enter:
852                  rfalse;
853              Eat:
854                  "You haven't the knack of snuffling up to food yet.";
855              default:
856                  "Warthogs can't do anything so involved. If it weren't for the
857                   nocturnal eyesight and the lost weight, they'd be worse off
858                   all round than people.";
859              ],
860    has   animate proper;
861   
862  !       Defined in DM4 §8
863  Object  low_mist "low mist"
864    with  name 'low' 'swirling' 'mist',
865          description "The mist has an aroma reminiscent of tortilla.",
866          before [;
867              Examine, Search:
868                  ;
869              Smell:
870                  <<Examine self>>;
871              default:
872                  "The mist is too insubstantial.";
873              ],
874          react_before [; Smell: if (noun == nothing) <<Smell self>>; ],
875          found_in Square_Chamber Forest,
876    has   scenery;
877   
878  !       Defined in DM4 Exercise 46
879  Object  tiny_claws "sound of tiny claws" thedark
880    with  name 'tiny' 'claws' 'sound' 'of' 'scuttling' 'scuttle' 'things'
881               'creatures' 'monsters' 'insects',
882          article "the",
883          initial
884              "Somewhere, tiny claws are scuttling.",
885          before [;
886              Listen:
887                  "How intelligent they sound, for mere insects.";
888              Touch, Taste:
889                  "You wouldn't want to. Really.";
890              Smell:
891                  "You can only smell your own fear.";
892              Attack:
893                  "They easily evade your flailing about.";
894              default:
895                  "The creatures evade you, chittering.";
896              ],
897          each_turn [; StartDaemon(self); ],
898          daemon [;
899              if (location ~= thedark) {
900                  self.turns_active = 0;
901                  StopDaemon(self);
902                  rtrue;
903                  }
904              switch (++(self.turns_active)) {
905                  1:  "^The scuttling draws a little nearer, and your breathing
906                       grows loud and hoarse.";
907                  2:  "^The perspiration of terror runs off your brow. The
908                       creatures are almost here!";
909                  3:  "^You feel a tickling at your extremities and kick outward,
910                       shaking something chitinous off. Their sound alone is a
911                       menacing rasp.";
912                  4:  deadflag = true;
913                      "^Suddenly there is a tiny pain, of a hypodermic-sharp fang
914                       at your calf. Almost at once your limbs go into spasm, your
915                       shoulders and knee-joints lock, your tongue swells...";
916                  }
917              ],
918          turns_active 0;
919   
920  ! ---------------------------------------------------------------------------- !


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.