Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Ruins.inf

Wormcast (lines 609-667)

609  !       The WORMCAST.
610  !
611  !       Defined in DM4 Exercises 7 and 8, modified in Exercise 54
612  Object  Wormcast "Wormcast"
613    with  description
614              "A disturbed place of hollows carved like a spider's web, strands of
615               empty space hanging in stone. The only burrows wide enough to crawl
616               through begin by running northeast, south and upwards.",
617          w_to Square_Chamber,
618          s_to [;
619              print "The wormcast becomes slippery around you, as though your
620                     body-heat is melting long hardened resins, and you shut your
621                     eyes tightly as you burrow through darkness.^";
622              if (eggsac in player) return Square_Chamber;
623              return random(Square_Chamber, Corridor, Forest);
624              ],
625          ne_to [; return self.s_to(); ],
626          u_to [; return self.s_to(); ],
627          cant_go [;
628              if (player ~= warthog)
629                  "Though you begin to feel certain that something lies behind
630                   and through the wormcast, this way must be an animal-run at
631                   best: it's far too narrow for your armchair-archaeologist's
632                   paunch.";
633              print "The wormcast becomes slippery around your warthog body, and
634                     you squeal involuntarily as you burrow through the darkness,
635                     falling finally southwards to...^";
636              PlayerTo(Burial_Shaft);
637              rtrue;
638              ],
639          after [;
640              Drop:
641                  move noun to Square_Chamber;
642                  print_ret (The) noun,
643                            " slips through one of the burrows and is quickly
644                             lost from sight.";
645              ],
646    has   light;
647   
648  !       Defined in DM4 §23
649  Object  -> eggsac "glistening white eggsac",
650    with  name 'egg' 'sac' 'eggs' 'eggsac',
651          initial
652              "A glistening white eggsac, like a clump of frogspawn the size of a
653               beach ball, has adhered itself to something in a crevice in one
654               wall.",
655          after [; Take: "Oh my."; ],
656          react_before [;
657              Go:
658                  if (location == Square_Chamber && noun == u_obj) {
659                      deadflag = true;
660                      "The moment that natural light falls upon the eggsac, it
661                       bubbles obscenely and distends. Before you can throw it
662                       away, it bursts into a hundred tiny, birth-hungry
663                       insects...";
664                      }
665              ];
666   
667  ! ---------------------------------------------------------------------------- !


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.