Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Advent.inf

9. The Hall of the Mountain King and side chambers (lines 920-1010)

0920  Room    In_Hall_Of_Mt_King "Hall of the Mountain King"
0921    with  name 'hall' 'of' 'mountain' 'king',
0922          description
0923              "You are in the hall of the mountain king, with passages off in all directions.",
0924          cant_go "Well, perhaps not quite all directions.",
0925          u_to In_Hall_Of_Mists,
0926          e_to In_Hall_Of_Mists,
0927          n_to Low_N_S_Passage,
0928          s_to In_South_Side_Chamber,
0929          w_to In_West_Side_Chamber,
0930          sw_to In_Secret_E_W_Canyon,
0931          before [;
0932            Go:
0933              if (Snake in self && (noun == n_obj or s_obj or w_obj ||
0934                                   (noun == sw_obj && random(100) <= 35)))
0935                  "You can't get by the snake.";
0936          ];
0937   
0938  Object  -> Snake "snake"
0939    with  name 'snake' 'cobra' 'asp' 'huge' 'fierce' 'green' 'ferocious'
0940               'venemous' 'venomous' 'large' 'big' 'killer',
0941          description "I wouldn't mess with it if I were you.",
0942          initial "A huge green fierce snake bars the way!",
0943          life [;
0944            Order, Ask, Answer:
0945              "Hiss!";
0946            ThrowAt:
0947              if (noun == axe) <<Attack self>>;
0948              <<Give noun self>>;
0949            Give:
0950              if (noun == little_bird) {
0951                  remove little_bird;
0952                  "The snake has now devoured your bird.";
0953              }
0954              "There's nothing here it wants to eat (except perhaps you).";
0955            Attack:
0956              "Attacking the snake both doesn't work and is very dangerous.";
0957            Take:
0958              deadflag = 1;
0959              "It takes you instead. Glrp!";
0960          ],
0961    has   animate;
0962   
0963  ! ------------------------------------------------------------------------------
0964   
0965  Room    Low_N_S_Passage "Low N/S Passage"
0966    with  name 'low' 'n/s' 'passage',
0967          description
0968              "You are in a low N/S passage at a hole in the floor.
0969               The hole goes down to an E/W passage.",
0970          s_to In_Hall_Of_Mt_King,
0971          d_to In_Dirty_Passage,
0972          n_to At_Y2;
0973   
0974  Treasure -> "bars of silver"
0975    with  name 'silver' 'bars',
0976          article "some",
0977          description "They're probably worth a fortune!",
0978          initial "There are bars of silver here!";
0979   
0980  ! ------------------------------------------------------------------------------
0981   
0982  Room    In_South_Side_Chamber "In South Side Chamber"
0983    with  name 'south' 's//''side' 'chamber',
0984          description "You are in the south side chamber.",
0985          n_to In_Hall_Of_Mt_King;
0986   
0987  Treasure -> "precious jewelry"
0988    with  name 'jewel' 'jewels' 'jewelry' 'precious' 'exquisite',
0989          article "some",
0990          description "It's all quite exquisite!",
0991          initial "There is precious jewelry here!";
0992   
0993  ! ------------------------------------------------------------------------------
0994   
0995  Room    In_West_Side_Chamber "In West Side Chamber"
0996    with  name 'west' 'w//' 'wide' 'chamber',
0997          description
0998              "You are in the west side chamber of the hall of the mountain king.
0999               A passage continues west and up here.",
1000          w_to Crossover,
1001          u_to Crossover,
1002          e_to In_Hall_Of_Mt_King;
1003   
1004  Treasure -> rare_coins "rare coins"
1005    with  name 'coins' 'rare',
1006          article "many",
1007          description "They're a numismatist's dream!",
1008          initial "There are many coins here!",
1009    has   multitude;
1010   


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.