Implement per-file license notices
[spiritwrak.git] / src / gambit3.inf
1 ! (level 3)
2 !
3 ! This file is part of SPIRITWRAK.
4 !
5 ! SPIRITWRAK is free software; you can redistribute it and/or modify
6 ! it under the terms of the GNU General Public License as published by
7 ! the Free Software Foundation; either version 3 of the License, or
8 ! (at your option) any later version.
9 !
10 ! SPIRITWRAK is distributed in the hope that it will be useful, but
11 ! WITHOUT ANY WARRANTY; without even the implied warranty of
12 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 ! General Public License for more details.
14 !
15 ! You should have received a copy of the GNU General Public License
16 ! along with SPIRITWRAK. If not, see <https://www.gnu.org/licenses/>.
17
18 Class Gambit_Room_Lev3_Class
19    with description "You are on the surface of a floating stone \
20 cube. The red light from below seems a bit brighter here.",
21         name "stone" "cube" "light",
22 has light;
23
24 Object GAMBIT_31 "On Giant White Cube"
25    class Gambit_Room_Lev3_Class
26    with w_to
27         [ i ;
28           i = CheckGambit(n312,0,3);
29           if (i ~= 2) return i;
30           else return GAMBIT_W31;
31         ],
32         s_to 
33         [ i ;
34           i = CheckGambit(n313,0,3);
35           if (i ~= 2) return i;
36           else return GAMBIT_W32;
37         ],
38 ;
39
40 Object GAMBIT_32 "On Giant White Cube"
41    class Gambit_Room_Lev3_Class
42    with e_to
43         [ i ;
44           i = CheckGambit(n324,0,3);
45           if (i ~= 2) return i;
46           else return GAMBIT_W31;
47         ],
48         w_to
49         [ i ;
50           i = CheckGambit(n322,0,3);
51           if (i ~= 2) return i;
52           else return GAMBIT_W31;
53         ],
54         s_to 
55         [ i ;
56           i = CheckGambit(n323,0,3);
57           if (i ~= 2) return i;
58           else return GAMBIT_W32;
59         ],
60 ;
61
62 Object GAMBIT_33 "On Giant White Cube"
63    class Gambit_Room_Lev3_Class
64    with e_to
65         [ i ;
66           i = CheckGambit(n334,0,3);
67           if (i ~= 2) return i;
68           else return GAMBIT_W31;
69         ],
70         s_to
71         [ i ;
72           i = CheckGambit(n333,0,3);
73           if (i ~= 2) return i;
74           else return GAMBIT_W32;
75         ],
76 ;
77
78 Object GAMBIT_34 "On Giant White Cube"
79    class Gambit_Room_Lev3_Class
80    with w_to
81         [ i ;
82           i = CheckGambit(n342,0,3);
83           if (i ~= 2) return i;
84           else return GAMBIT_W31;
85         ],
86         n_to 
87         [ i ;
88           i = CheckGambit(n341,0,3);
89           if (i ~= 2) return i;
90           else return GAMBIT_W32;
91         ],   
92         s_to 
93         [ i ;
94           i = CheckGambit(n343,0,3);
95           if (i ~= 2) return i;
96           else return GAMBIT_W32;
97         ],   
98 ;
99
100 Object GAMBIT_35 "On Giant White Cube"
101    class Gambit_Room_Lev3_Class
102    with e_to
103         [ i ;
104           i = CheckGambit(n354,0,3);
105           if (i ~= 2) return i;
106           else return GAMBIT_W31;
107         ],
108         w_to
109         [ i ;
110           i = CheckGambit(n352,0,3);
111           if (i ~= 2) return i;
112           else return GAMBIT_W31;
113         ],
114         n_to 
115         [ i ;
116           i = CheckGambit(n351,0,3);
117           if (i ~= 2) return i;
118           else return GAMBIT_W32;
119         ],   
120         s_to 
121         [ i ;
122           i = CheckGambit(n353,0,3);
123           if (i ~= 2) return i;
124           else return GAMBIT_W32;
125         ],   
126 ;
127        
128 Object GAMBIT_36 "On Giant White Cube"
129    class Gambit_Room_Lev3_Class
130    with e_to
131         [ i ;
132           i = CheckGambit(n364,0,3);
133           if (i ~= 2) return i;
134           else return GAMBIT_W31;
135         ],
136         n_to 
137         [ i ;
138           i = CheckGambit(n361,0,3);
139           if (i ~= 2) return i;
140           else return GAMBIT_W32;
141         ],   
142         s_to 
143         [ i ;
144           i = CheckGambit(n363,0,3);
145           if (i ~= 2) return i;
146           else return GAMBIT_W32;
147         ],   
148 ;
149
150 Object GAMBIT_37 "On Giant White Cube"
151    class Gambit_Room_Lev3_Class
152    with w_to
153         [ i ;
154           i = CheckGambit(n372,0,3);
155           if (i ~= 2) return i;
156           else return GAMBIT_W31;
157         ],
158         n_to 
159         [ i ;
160           i = CheckGambit(n371,0,3);
161           if (i ~= 2) return i;
162           else return GAMBIT_W32;
163         ],   
164 ;
165
166 Object GAMBIT_38 "On Giant White Cube"
167    class Gambit_Room_Lev3_Class
168    with w_to
169         [ i ;
170           i = CheckGambit(n382,0,3);
171           if (i ~= 2) return i;
172           else return GAMBIT_W31;
173         ],
174         n_to 
175         [ i ;
176           i = CheckGambit(n381,0,3);
177           if (i ~= 2) return i;
178           else return GAMBIT_W32;
179         ],
180         e_to
181         [ i ;
182           i = CheckGambit(n384,0,3);
183           if (i ~= 2) return i;
184           else return GAMBIT_W31;
185         ],
186 ;
187
188 Object GAMBIT_39 "On Giant White Cube"
189    class Gambit_Room_Lev3_Class
190    with e_to
191         [ i ;
192           i = CheckGambit(n394,0,3);
193           if (i ~= 2) return i;
194           else return GAMBIT_W31;
195         ],
196         n_to 
197         [ i ;
198           i = CheckGambit(n381,0,3);
199           if (i ~= 2) return i;
200           else return GAMBIT_W32;
201         ],   
202 ;
203
204
205 ! (level 3 niches)
206  
207 Object n313 "southern niche" GAMBIT_31
208    class niche_class
209    with name "southern",
210         counter_niche n341,
211         niche_dir 3;
212 Object n312 "western niche" GAMBIT_31
213    class niche_class
214    with name "western",
215         counter_niche n324,
216         niche_dir 2;
217
218 Object n324 "eastern niche" GAMBIT_32
219    class niche_class
220    with name "eastern",
221         counter_niche n312,
222         niche_dir 4;
223 Object n323 "southern niche" GAMBIT_32
224    class niche_class
225    with name "southern",
226         counter_niche n351,
227         niche_dir 3;
228 Object n322 "western niche" GAMBIT_32
229    class niche_class
230    with name "western",
231         counter_niche n334,
232         niche_dir 2;
233
234 Object n334 "eastern niche" GAMBIT_33
235    class niche_class
236    with name "eastern",
237         counter_niche n322,
238         niche_dir 4;
239 Object n333 "southern niche" GAMBIT_33
240    class niche_class
241    with name "southern",
242         counter_niche n361,
243         niche_dir 3;
244
245 Object n341 "northern niche" GAMBIT_34
246    class niche_class
247    with name "northern",
248         counter_niche n313,
249         niche_dir 1;
250 Object n342 "western niche" GAMBIT_34
251    class niche_class
252    with name "western",
253         counter_niche n354,
254         niche_dir 2;
255 Object n343 "southern niche" GAMBIT_34
256    class niche_class
257    with name "southern",
258         counter_niche n371,
259         niche_dir 3;
260
261 Object n351 "northern niche" GAMBIT_35
262    class niche_class
263    with name "northern",
264         counter_niche n323,
265         niche_dir 1;
266 Object n354 "eastern niche" GAMBIT_35
267    class niche_class
268    with name "eastern",
269         counter_niche n342,
270         niche_dir 4;
271 Object n352 "western niche" GAMBIT_35
272    class niche_class
273    with name "western",
274         counter_niche n364,
275         niche_dir 2;
276 Object n353 "southern niche" GAMBIT_35
277    class niche_class
278    with name "southern",
279         counter_niche n381,
280         niche_dir 3;
281
282 Object n364 "eastern niche" GAMBIT_36
283    class niche_class
284    with name "eastern",
285         counter_niche n352,
286         niche_dir 4;
287 Object n361 "northern niche" GAMBIT_36
288    class niche_class
289    with name "northern",
290         counter_niche n333,
291         niche_dir 1;
292 Object n363 "southern niche" GAMBIT_36
293    class niche_class
294    with name "southern",
295         counter_niche n391,
296         niche_dir 3;
297
298 Object n371 "northern niche" GAMBIT_37
299    class niche_class
300    with name "northern",
301         counter_niche n343,
302         niche_dir 1;
303 Object n372 "western niche" GAMBIT_37
304    class niche_class
305    with name "western",
306         counter_niche n384,
307         niche_dir 2;
308
309 Object n381 "northern niche" GAMBIT_38
310    class niche_class
311    with name "northern",
312         counter_niche n353,
313         niche_dir 1;
314 Object n382 "western niche" GAMBIT_38
315    class niche_class
316    with name "western",
317         counter_niche n394,
318         niche_dir 2;
319 Object n384 "eastern niche" GAMBIT_38
320    class niche_class
321    with name "eastern",
322         counter_niche n372,
323         niche_dir 4;
324
325 Object n391 "northern niche" GAMBIT_39
326    class niche_class
327    with name "northern",
328         counter_niche n363,
329         niche_dir 1;
330 Object n394 "eastern niche" GAMBIT_39
331    class niche_class
332    with name "eastern",
333         counter_niche n382,
334         niche_dir 4;
335
336 ! (level 3 initial wood beam layout)
337 ! wood beam, as two 'halves'
338
339 Object p31 "pine beam" n322 class pine_beam_class;
340 Object p311 "pine beam" n334 class pine_beam_class with number 99;
341
342 ! (side note: with balsa beams, 2nd side need not be 99, since 
343 ! it will always break on the first try, and the default number is 0
344 Object b31 "balsa beam" n312 class balsa_beam_class;
345 Object b311 "balsa beam" n324 class balsa_beam_class;
346 Object b32 "balsa beam" n313 class balsa_beam_class;
347 Object b321 "balsa beam" n341 class balsa_beam_class;
348 Object b33 "balsa beam" n323 class balsa_beam_class;
349 Object b331 "balsa beam" n351 class balsa_beam_class;
350 Object b34 "balsa beam" n333 class balsa_beam_class;
351 Object b341 "balsa beam" n361 class balsa_beam_class;
352 Object b35 "balsa beam" n342 class balsa_beam_class;
353 Object b351 "balsa beam" n354 class balsa_beam_class;
354 Object b36 "balsa beam" n352 class balsa_beam_class;
355 Object b361 "balsa beam" n364 class balsa_beam_class;
356 Object b37 "balsa beam" n343 class balsa_beam_class;
357 Object b371 "balsa beam" n371 class balsa_beam_class;
358 Object b38 "balsa beam" n353 class balsa_beam_class;
359 Object b381 "balsa beam" n381 class balsa_beam_class;
360 Object b39 "balsa beam" n363 class balsa_beam_class;
361 Object b391 "balsa beam" n391 class balsa_beam_class;
362 Object b3a "balsa beam" n372 class balsa_beam_class;
363 Object b3a1 "balsa beam" n384 class balsa_beam_class;
364 Object b3b "balsa beam" n382 class balsa_beam_class;
365 Object b3b1 "balsa beam" n394 class balsa_beam_class;
366
367
368 ! extra goodies...
369
370 Object Gambit_hole "large round hole" GAMBIT_37
371    with name "hole" "round",
372         initial "In the center of the room is a large round \
373 hole, going straight down through the floating cube.",
374         description "A large round hole cut straight through the \
375 giant cube you stand on. All you need is a huge square peg.",
376         size 30,
377         before [;
378           Enter:
379             if (fire_spirit in GAMBIT_37)
380                "The towering fire spirit blocks your way!";
381             print "^You close your eyes and jump straight \
382 into the hole! There is a bright flash of light...^";
383             Achieved(5);
384             PlayerTo(GAMBIT_11);
385             return 2;
386           Receive:
387             if (fire_spirit in GAMBIT_37)
388                "The towering fire spirit is in your way!";
389             move noun to GAMBIT_11;
390             print "You drop "; DefArt(noun); 
391             " into the hole. There is a bright flash of light, and \
392 the object disappears!";
393           Rub, Push, Pull, Touch, Squeeze, Turn, Shake:
394 "I don't know how to do that to a giant hole.";
395         ],
396         after [;
397           Search:
398              if (fire_spirit in GAMBIT_37)
399                "The towering fire spirit fills the hole currently!";
400 else "Looking through the hole, you can see a reddish haze \
401 far below.";
402         ],
403    has static container open enterable;
404
405 ! rod piece -- SMOKE
406 Object smoke_rod_piece "smoke rod piece" GAMBIT_37
407   class rod_class,
408   with name "smoke",
409        initial "Sitting on the floor is a short smoke-colored rod.",
410        description "It's a short section of a rod made of some \
411 undeterminable hard substance, \
412 colored smoke. A piece of the Rod of \
413 the Ancients, no doubt!",
414 ;
415
416
417 Object fire_spirit "fire spirit" GAMBIT_37
418   with name "spirit",
419        description "It looks like a tower of animated flame.",
420        each_turn [ i ;
421        ! spirit attack
422        ! (in general, the 4 spirits are _very_ dangerous.
423        ! There's a 1/5 chance of killing outright, and 2
424        ! chances of doing 10 and 5 points of damage respectively.
425        ! In short, the player needs to realize it's time to swanko,
426        ! and do so, quickly)
427        if (self hasnt general) {
428             give self general ~concealed;    
429             "^Suddenly, a flash of flame bursts through the hole \
430 in the center of the cube! A living tower of flame attacks!";            
431        }
432        i = random(5);
433        if (i == 1) {
434           deadflag = 1;
435           "^The fire creature engulfs you in a deadly inferno! \
436 You are burned to a crisp.";          
437        }
438        if (i == 2) 
439           Player_HP_CUR = Player_HP_CUR - 10;
440        if (i==3) 
441           Player_HP_CUR = Player_HP_CUR - 5;
442        if (Player_HP_CUR <= 0) {
443           deadflag = 1;
444           "^The last blow from the fire spirit was too much for \
445 you, I'm afraid to say. The spirit senses your \
446 weakness and engulfs you in flame.";          
447        } 
448        print "^The fir spirit ";
449        if (i==2)
450           "singes you with a jet of fire!";
451        if (i==3) {
452           "sends a small ball of \
453 flame your way! You get slightly burned!";          
454        }
455        "tries to torch you in a sheet of \
456 flame, but you evade just in time!";       
457        ],
458        before [;
459           Cast:
460             if (the_spell_was == swanko_spell) {
461                remove self;
462                "As you speak the chant, the fire spirit falls back \
463 in fear! You finish the chant, and the fire spirit \
464 dissipates into harmless smoke, banished!";
465             }
466             print "Crackling flame drowns out your chant.^";
467        ],
468        life [ ;
469           Attack: 
470             if (random(20) >= 8)
471             "You strike the fire creature, but your attack passes \
472             harmlessly through it! You hear a crackling noise \
473 that could pass for laughter.";            
474             "You attack the fire spirit, but miss!";
475           default: "It's too busy trying to kill you.";
476        ],
477    has animate concealed;