Add GPL boilerplate to intro and set serial number
[vengeance.git] / vengeance.inf
1 !% -SD 
2
3 !============================================================================ 
4
5 Constant Story "Vengeance"; 
6 Constant Headline 
7              "^The Interactive Fiction debut of Victor Gijsbers.^
8                This work is released under the GNU General Public License, version 3 or any later version. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.^";
9 Release 1; 
10 Serial "190818";    ! for keeping track of public releases
11
12 !Constant MAX_SCORE = 10;
13 Constant DEATH_MENTION_UNDO;
14 Constant NO_SCORE; 
15
16
17 Include "parser"; 
18 Include "verblib"; 
19
20 !============================================================================ 
21 ! Object classes 
22
23 Class  Room
24  with  description "UNDER CONSTRUCTION.",
25   has  light;
26   
27 Class Prop 
28  with before [; 
29       Examine: return false;
30       default: print_ret "You don't need to worry about ", (the) self, ".";
31       ], 
32   has scenery;
33   
34 Class Furniture
35  with before [;
36       Take,Pull,Push,PushDir:
37         print_ret (The) self, "is too heavy for that.";
38       ],
39  has  static supporter;
40  
41
42
43
44 !============================================================================ 
45 ! The game objects 
46
47
48 !----------------------------------------------------------------------------
49 ! ***  The corridor where the game starts ***
50 !----------------------------------------------------------------------------
51
52 Room   corridor_1 "Dark corridor"
53  with  description [; if(emotions.rage == 0) {
54                     print "A small, dank corridor between the fighting pits to the south and the 
55                     slave cells to the north. An iron gate in the eastern wall leads to the 
56                     rest of Lord Haran Damaskos' mansion. The corridor is built in heavy grey
57                     stone, its walls unadorned but covered with lichen. You have come to dread
58                     treading this place, as it invariably led to episodes of pain and death.";
59                     if(self hasnt visited) {print "^^Two guards hold you by the shoulders as they
60                     lead you back to your cell.";};
61                     return true;
62                    }
63                    else {
64                     "This cramped hallway has been part of your prison for too long, the heavy
65                     stone walls caging your body and oppressing your spirit. Towards the south
66                     lie the fighting pits - the memories of ancient battles make you tense your
67                     muscles. On the other side lie the cells where the slaves are kept like cattle.
68                     A heavy iron gate in the eastern wall is all that stands between you and Haran's
69                     death.";
70                    }
71         ],
72   has   ;
73  
74 Prop   cor_1_walls "walls" corridor_1
75  with  name 'wall' 'walls',
76        description [; if(emotions.rage == 0) {
77                     "These walls are thick, moist and cold to the touch. The stones fit neatly,
78                     ensuring that it is impossible to pry one out.";
79                    }
80                    else {
81                     "Hard and unrelenting, these walls are your cage.";
82                    };
83        ],
84        before [;
85          Attack: if(emotions.rage == 0) {
86                     "Attacking the walls will surely serve no purpose. They are much too hard.";
87                    }
88                    else {
89                      if(parent(bar) == player) {
90                        if (guards.dead == 0){
91                          "Grinning madly at the advancing guards, you softly and repeatedly hit the walls with the
92                           iron bar. The dry sounds resemble a clock ticking away the last few seconds of your
93                           goalers' lives. You can see their knuckles going white as they grip their swords more
94                           tightly.";
95                        }
96                        else { 
97                          deadflag = 3;
98                          print "With the heavy iron bar clenched in your fists, you hit one of the lichen-covered
99                          wall. The force of the impact numbs your hands, but the stones are undamaged. You must
100                          escape! They can no longer keep you here! Reaching out towards the bestial strength
101                          that lies at the heart of your rage, you hit the walls again and again. Each collision is
102                          accompanied by the loud noise of metal on stone. The sound of shouts and running footsteps
103                          coming from the cell complex barely registers as your attention is occupied by the
104                          increasing pain in your arms and hands. Chips of stone start to fly around. The iron bar
105                          slowly bends, then breaks into two after a particularly violent hit. At that moment four
106                          guards burst into the corridor, swords drawn. Your face twisted inhumanly, you utter a cry
107                          of hate that seems to tear the world itself apart. You have only one thought: "; 
108                          style bold; print "Kill."; style roman; "
109                          ^^
110                          Your last sensations are of sharp pain and a world turned red entire.^";
111                        }
112                      }
113                      else {
114                        if (guards.attacking == 0 && guards.dead == 0) {
115                          print "With a sudden jerk you free yourself from the grip of the guards. ";
116                          }
117                        print "You hit one of the walls hard with your bare hands. It hurts, but you do not flinch.
118                        The pain makes you feel alive.";
119                        if (guards.attacking == 0 && guards.dead == 0) {
120                          print " With a surprised shout, the guards grab their swords and advance towards you.^";
121                          guards.loose(); 
122                          return true;
123                         }
124                      };
125                    };
126        ],
127   has  pluralname;
128
129 Prop   "stones" corridor_1
130  with  name 'stone' 'stones',
131        description [; if(emotions.rage == 0) {
132                       "These stones have been cut from the hardest granite. It is certainly impossible
133                        to pry one of them loose.";
134                     }
135                     else {
136                       "These stones have been cut from the hardest granite. You would like to see them
137                        smeared with Haran's brains.";
138                     };
139        ],
140        before [;
141           Attack: <<Attack cor_1_walls>>;  
142        ],
143   has  pluralname;
144
145 Prop   "lichen" corridor_1
146  with  name 'lichen' 'moss' 'plant' 'plants',
147        description [; if(emotions.rage == 0) {
148                         "The delicate green and orange hues of the lichen remind you of an autumnal
149                         forest. You used to take long hikes through the woods surrounding your father's
150                         country estate, long ago, before you turned to wine and dice. The worst thing
151                         about confinement in an underground dungeon is that one can never hear the wind softly 
152                         rustle the leaves of the ashes, never see the sun set in a sea of red and golden
153                         clouds, never feel the refreshing coolness of raindrops on one's laughing face.";
154                     }
155                     else {
156                         "The lichen definitely proves that Lord Haran has no qualms about housing his 
157                         slaves in most unhealthy quarters. Living in the damp and cold dungeons under the 
158                         mansion, more than one slave died from pneumonia before he could meet a grizzly
159                         fate in the pits.";
160                     }
161         ],
162   has  ;
163   
164 Object gate "iron gate" corridor_1
165   with name 'iron' 'gate' 'fence' 'door',
166        bar_present 1,
167        before [; 
168          Examine: if(self.bar_present == 0) {
169              "The heavy iron gate separates the cells and pits from the mansion proper. Two bent
170              parts of rusty metal indicate where you tore off an iron bar.";
171              }
172            else {
173              "The heavy iron gate separates the cells and pits from the mansion proper. One of the
174              bars has rusted almost through. With sufficient strength, it might be torn loose.";
175            };
176          Attack, Pull: if(self.bar_present == 1) {
177              <<Take bar>>;
178              }
179            else {
180              if(emotions.rage == 0) {
181                "The gate is far too strong and sturdy for you to have any chance of destroying it.";
182              }
183              else {
184                guards.loose();
185                "You grab the heavy iron gate with both your hands and attempt to pull it apart. Your muscles
186                 bulge, sweat appears on your forehead, but the bars do not move a single inch. After a few
187                 minutes, you have to admit your defeat.";
188                 
189              } 
190            };
191       ],
192       with_key gate_key,
193       door_dir e_to,
194       door_to hallway,
195   has scenery door lockable openable locked;
196
197 Object bar "iron bar" corridor_1
198   with name 'iron' 'bar' 'bars' 'pipe' 'stave' 'club' 'rod',
199        description [; if(emotions.rage == 0) {
200                         "A heavy iron bar, some eighty centimetres long and weighing perhaps five kilogram.
201                          The ends are rusty, and what paint once covered it fell victim to the damp long ago.";
202                     }
203                     else {
204                         "A heavy steel bar, allowing you to reach farther and hit harder than when fighting
205                         with your bare fists. No skull will survive a good swing with this baby.";
206                     }
207         ],
208        before [;
209          Take, Pull, Attack: if(gate.bar_present == 1) {
210            if(emotions.rage == 0) {
211              guards.loose();
212              "You grab the iron bar and pull with all your might - but it hardly budges. Your muscles feel tired and  
213              weak, as they always do between fights. It is only when you enter the pits, hearing the cries of Lord Haran and his guests, that your blood starts boiling and you are filled with the power to break bones
214              and tear bodies apart. Your strength lies in your hate.
215              ^ Maybe you should go into a rage.";
216            }
217            else {
218              move bar to player;
219              gate.bar_present = 0;
220              give bar ~scenery;
221              guards.loose();
222              "With a bloodthirsty cry, you grab the iron bar and tear it loose as if it were made of paper. You hear the guards behind you gasp. Fast as lightning you turn around.
223              ^ ~It's time to die,~ you hiss.";
224            }
225          }
226          else {
227            return false;
228          };
229         ],  
230           
231   has  scenery;
232
233 Object guards "guards" corridor_1
234   with name 'two' 'guard' 'guards' 'man' 'men' 'keeper' 'keepers' 'goaler' 'goalers' 'Roger' 'Frank', 
235        dead 0,
236        description [; if(self.attacking == 0) {
237                          if (emotions.rage == 0) {
238                            "The guards, Frank and Roger, are talking about their children. Apparently,
239                             Roger's seven year old son is afflicted with a mysterious disease and the
240                             doctors fear for his life. They are so engrossed in this subject that they
241                             do not seem to be paying you very much attention. Both have a sword hanging
242                             from their belt, which they can probably reach much faster than you.";
243                          }
244                          else {
245                            "Two of the cruel goalers that hold you captive. You remember vividly how one
246                            of them beat a young slave who was too scared to fight to death with the side
247                            of his sword. The young boy's cries of pain and despair mixed with the sickening 
248                            sound of cracking bones still echo in your mind.";
249                          }
250                        }
251                        else {
252                          if (emotions.rage == 0) {
253                            "Both men have drawn their swords and are carefully advancing towards you, neither
254                            of the two eager to strike the first blow and expose himself to you. Frank
255                            is a bit of a coward, always trying to intimidate the slaves with words but
256                            never actually carrying out any of his threats. You expect Roger to attack first.";
257                          }
258                          else {
259                            "Your eyes are first drawn towards the glistening tips of their sharp swords, but soon
260                            find their way upwards to the guards' eyes. As they look into yours and see the
261                            passionate hate that courses through your being, they hold back for a moment. Their
262                            eyes betray fear. You bare your teeth.";
263                          }                     
264                        };
265                    ],
266        life [;
267               Kiss: if (emotions.rage == 0) {
268                       "Tenderness will not make them release you.";
269                     }
270                     else {
271                       "You are not a succubus!";
272                     };
273               Give: if (emotions.rage == 0) {
274                       "The guards cannot be bribed with presents.";
275                     }
276                     else {
277                       "The only present they'll receive from you is a swift death.";
278                     };
279               Ask, Tell, Answer, Order: if (emotions.rage == 0) {
280                       "This is not the time for conversation.";
281                     }
282                     else {
283                       "You cry in wordless rage.";
284                     };
285               Show: if (emotions.rage == 1 && guards.attacking == 1) {
286                      if (noun == bar) {
287                        "You wave the iron bar in front of the guards, daring them to come closer.";
288                      }
289                      return false;
290                     };
291                     return false;
292               ThrowAt: if (noun == bar) {
293                          "No. It would be more satisfying to hit them with it.";
294                        };
295                        return false;
296               Attack: if (emotions.rage == 0) {
297                         if (parent(bar) == player) {
298                           "You do not feel strong enough to kill the guards. [And if you get here, its a BUG!]";
299                         }
300                         else {
301                           "Attacking them with your bare hands is not going to work. You need a weapon first,
302                           preferably a sharp or heavy one.";
303                         };
304                       }
305                       else {
306                         if (guards.attacking == 0) {
307                           deadflag = 3;
308                           "With a sudden jerk you free yourself from the grip of the guards. Turning to the one
309                           on your left, you grab his head in both your hands and smash it against the wall as hard you can. Blood spatters all around. He struggles feebly, but you hardly feel his pounding fists against your chest as you keep hitting his head against the hard grey stones. The fourth impact is accompanied by the sound of breaking bone. The pounding stops and the body goes limp in your arms. The guard's eyes bulge out of his head in an unnatural way, like those of a surprised, dead fish. Vengeance.
310                           ^^
311                           Suddenly, you feel a sharp, breath-taking pain. Four inches of sharp steel protrude from your chest. ~You bastard, you killed Frank!~ screams the guard behind you. You open your mouth to cry out your pain, but all you can do is cough up blood. You collapse to the ground, and all goes dark.";
312                         }
313                         else {
314                          if (parent(bar) == player){
315                            "[Player attacks attacking guards with iron bar. TODO]";
316                          }
317                          else{
318                            deadflag =3;
319                            print "You can no longer restrain yourself. The two blinking silver tips of the drawn swords flicker as the eyes of a malicious beast, mocking your righteous anger. You growl, a low rumbling sound coming from the depths of your being. The beast comes closer, and suddenly you ";style bold; print "pounce"; style roman; ", your arms outstretched, your hands like claws. The eyes rise to meet you, and the world explodes. Stars fill the void, blinking, then disappearing one by one. Only darkness remains. Where is your attacker? Once more a growl escapes from your mouth, as you cast about for the object of your rage.
320                            ^ But then a terrible weariness falls over you like a heavy blanket, muffling thought and emotion alike. You drift away into a deep sleep.^";
321                          };
322                         };
323                       };
324             ],
325        counter1 0, counter2 0,
326        daemon [; 
327          if(self.attacking == 0){
328            switch(++self.counter1){
329            1 to 2: "^The guards are dragging you through the corridor.";
330            3 : "^The guards have already led you halfway through.";
331            4 : "^You have almost reached the cells. If you wish to escape, you must act now.";
332            default: deadflag = 3; "Tja. TODO.";
333            
334            
335            }
336            
337          }
338          else{
339            switch(++self.counter2){
340            1: "Een!";
341            2: "Twee!";
342            3: "Drie!";
343            default: "Tja!";
344            }
345          
346          };
347         ],
348        attacking 0,
349        loose [;
350            self.attacking = 1;
351          ],
352        article "two",
353   
354   
355   has  animate pluralname scenery;
356   
357 Object sword "sword" corridor_1
358   with name 'sword' 'swords' 'Roger~s' 'Frank~s' 'guard~s' 'guards~',
359        description ,
360
361    has concealed
362 ;
363   
364   
365   
366   
367   
368   
369 ! -------------------------------------------------------------------------------
370 ! *** Temporary objects ***  
371   
372   
373   
374 Object gate_key "gatekey"
375   with description "Nog niets.";
376   
377 Room   hallway "hallway"
378   with description "Nog niets.";
379
380   
381   
382   
383   
384   
385   
386 ! ---------------------------------------------------------------------------
387 ! *** Abstract objects ***
388   
389 Object emotions
390   with rage 0,      !Zero when calm, One when raging
391        satisfied 0, !One if currently raging AND having committed violence in this rage, Zero otherwise
392        ;
393         
394   
395   
396
397 !============================================================================ 
398 ! The player's possessions 
399
400 !============================================================================ 
401 ! Entry point routines 
402 [ Initialise; 
403     location = corridor_1;
404     lookmode = 2; ! like the VERBOSE command
405     player.description = "You are a strong, muscled man, covered with scars and
406             bruises, wearing only rags.";
407     StartDaemon(guards);
408     print_ret "^Once you were quite the dandy, spending all your time and money
409                on glamour, girls and gambling. Enraged by your behaviour, your 
410                father disinherited you, but you hardly cared. Life was too beautiful,
411                the girls too lovely and the cards too much fun to worry about the
412                future. But you learnt that one cannot escape society's demands as easily
413                as that, and you learnt it the hard way. More than three years ago, 
414                you were seized by the Imperial Guard as you entered one of your favourite
415                gaming dens. Your creditors demanded their money, and they wanted it
416                instantly. As you could not pay and could find no rich friends or relatives 
417                to pay for you, the authorities decided to sell you into slavery. 
418                Unfortunately, you were bought by Lord Haran Damaskos, a man whose wealth
419                is only surpassed by his passion for watching his slaves fight to the 
420                death. He thought it would be amusing to see a pampered aristocratic boy be
421                slowly dismembered by a tough Nubian slave.
422                
423                But against all odds you survived that first fight, and continued surviving
424                for these past three years. It is no exaggeration to say that you are now
425                among the toughest of fighters. You have long lost track of the number of
426                Lord Damaskos' parties you have had to brighten by spilling the innocent blood
427                of fellow slaves to the wild cheers of the audience. Your life is a monotonous 
428                string of pain, violence and death. There is no hope of escape, and only your
429                rage has kept you alive thus far.
430                ^^
431                At least there was no hope of escape until now. For the two guards that are 
432                leading you back to your damp cell after yet another bloody fight in the pits, 
433                have forgotten to tie your hands. If you can grab a likely weapon and dispose 
434                of them before they lock you up again, you might be able to escape your 
435                predicament. Or better yet - you might be able to exact revenge upon your master.^"; 
436     ]; 
437     
438 [ DeathMessage; print "You have failed to achieve your revenge!"; ];
439
440 !============================================================================ 
441 ! Standard and extended grammar 
442 Include "grammar"; 
443
444
445
446
447 !----------------------------------------------------------------------------
448 ! *** Rage and Calm ***
449
450 [ RageSub;
451   if(emotions.rage == 0) { 
452        emotions.rage = 1;
453        "You release your hate and feel a wave of anger rise inside you, filling 
454         you with a burning desire for violence and revenge.";
455   
456   }
457   else { "You are already filled with burning anger, ready to lash out at the slightest
458           provocation.";
459   
460   };
461 ];
462
463 Verb 'rage' 'r' 'anger' 'enrage' 'mad' 'vengeful'
464  *                -> Rage;
465  
466 Extend 'go'
467  * 'in' 'rage'    -> Rage
468  * 'in' 'a' 'rage'    -> Rage
469  * 'into' 'rage'  -> Rage
470  * 'into' 'a' 'rage' -> Rage
471  * 'mad'          -> Rage;
472  
473 Verb 'become'
474  * 'angry'     -> Rage
475  * 'enraged'   -> Rage
476  * 'mad'       -> Rage
477  * 'vengeful'  -> Rage;
478  
479 Extend 'enter'
480  * 'rage'      -> Rage;
481  
482 [ CalmSub;
483   if(emotions.rage == 1){
484          if(emotions.satisfied == 1){
485              emotions.rage = 0;
486              "You close your eyes, try to control your breath and silently count to twenty.
487              Slowly the anger recedes, and you are once again in control of you violent
488              urges.";
489          }
490          else {
491              "You close your eyes, try to control your breath and silently count to twenty.
492              But the rage is far too strong, and cannot be controlled. You need to lash out
493              first.";
494          };
495   }
496   else {
497          "You are already as serene and calm as can be reasonably expected given your
498          present circumstances.";
499   
500   };
501 ];
502
503 Verb 'calm' 'cool' 'relax' 'serene'
504  *                -> Calm
505  * 'down'         -> Calm;
506  
507 Extend 'exit'
508  * 'rage'         -> Calm;
509  
510 Extend 'become'
511  * 'calm'        -> Calm
512  * 'serene'      -> Calm
513  * 'cool'        -> Calm
514  * 'relaxed'     -> Calm;
515
516 Extend 'go'
517  * 'out' 'rage'      -> Calm
518  * 'out' 'of' 'rage' -> Calm;
519  
520  
521  
522  
523 !---------------------------------------------------------------------------
524 ! *** Miscellaneous ***
525
526 Verb 'grab'
527 * noun       -> Take;
528  
529 !============================================================================
530
531