value now can be casted to virtual "bool" type
[d2dqcc.git] / samples / flame.qc
blob3e93bc4e8e66b81666559b3a67248cef41ff0f89
1 #ifndef _FLAMEGENERATOR_H_
2 #define _FLAMEGENERATOR_H_
4 #include "../defs/defs.qh"
7 string flame_adjective ();
8 string flame_thing ();
9 string flame_group_adj ();
11 const string flame_person_array[20] = {
12   "Reagan",
13   "Ken Thompson",
14   "Dennis Ritchie",
15   "JFK",
16   "the Pope",
17   "Gadaffi",
18   "Napoleon",
19   "Karl Marx",
20   "Groucho",
21   "Michael Jackson",
22   "Caesar",
23   "Nietzsche",
24   "Heidegger",
25   "Henry Kissinger",
26   "Nixon",
27   "Castro",
28   "Thatcher",
29   "Attilla the Hun",
30   "Alaric the Visigoth",
31   "Hitler",
34 string flame_person () {
35   return flame_person_array[irand(20)];
39 const string flame_paper_array[8] = {
40   "Daily Mail",
41   "Daily Express",
42   "Centre Bulletin",
43   "Sun",
44   "Daily Mirror",
45   "Daily Telegraph",
46   "Beano",
47   "Multics Manual",
50 string flame_paper () {
51   return flame_paper_array[irand(8)];
55 const string flame_quality_array[13] = {
56   "ignorance",
57   "stupidity",
58   "worthlessness",
59   "prejudice",
60   "lack of intelligence",
61   "lousiness",
62   "bad grammar",
63   "lousy spelling",
64   "lack of common decency",
65   "ugliness",
66   "nastiness",
67   "subtlety",
68   "dishonesty",
71 string flame_quality () {
72   int t = irand(14);
73   if (t == 13) return strcat(strcat(flame_adjective(), " "), flame_quality());
74   return flame_quality_array[t];
78 string flame_add_plural (string s) {
80   float lastch = ' ', f;
81   for (f = 0; s[f]; ++f) lastch = s[f];
82   if (lastch >= 'A' && lastch <= 'Z') lastch += 32;
83   switch (lastch) {
84     case 'a': case 'e': case 'i': case 'o': case 'u': break;
85     default: s = strcat(s, "e"); break;
86   }
88   return (strcat(s, "s"));
93 string flame_reason () {
94   switch (irand(8)) {
95     case 0: return "they don't want their children to grow up to be too lazy to steal";
96     case 1: return strcat(strcat("they can't tell them apart from ", flame_group_adj()), " dudes");
97     case 2: return strcat("they're too ", flame_adjective());
98     case 3: return strcat(flame_person(), " wouldn't have done it");
99     case 4: return "they can't spray paint that small";
100     case 5: return flame_add_plural(strcat("they don't have ", flame_thing()));
101     case 6: return "they don't know how";
102     case 7: return flame_add_plural(strcat("they can't afford ", flame_thing()));
103     default: abort();
104   }
105   return "";
109 const string flame_adjective_array[24] = {
110   "ignorant",
111   "crass",
112   "pathetic",
113   "sick",
114   "bloated",
115   "malignant",
116   "perverted",
117   "sadistic",
118   "stupid",
119   "unpleasant",
120   "lousy",
121   "abusive",
122   "bad",
123   "braindamaged",
124   "selfish",
125   "improper",
126   "nasty",
127   "disgusting",
128   "foul",
129   "intolerable",
130   "primitive",
131   "depressing",
132   "dumb",
133   "phoney",
136 string flame_adjective () {
137   int t = irand(26);
138   switch (t) {
139     case 24: return strcat(strcat(flame_adjective(), " and "), flame_adjective());
140     case 25: return strcat(strcat(strcat("as ", flame_adjective()), " as a "), flame_thing());
141     default: return flame_adjective_array[t];
142   }
146 const string flame_group_adj_array[31] = {
147  "gay",
148  "old",
149  "lesbian",
150  "young",
151  "black",
152  "Polish",
153  "white",
154  "mentally retarded",
155  "Nicaraguan",
156  "homosexual",
157  "dead",
158  "underpriviledged",
159  "religious",
160  "feminist",
161  "foreign",
162  "intellectual",
163  "crazy",
164  "working",
165  "unborn",
166  "Chinese",
167  "short",
168  "poor",
169  "rich",
170  "funny-looking",
171  "Puerto Rican",
172  "Mexican",
173  "Italian",
174  "communist",
175  "fascist",
176  "Iranian",
177  "Moonie",
180 string flame_group_adj () {
181   int t = irand(34);
182   switch (t) {
183     case 31: return flame_adjective();
184     case 32: return strcat(flame_thing(), "-loving");
185     case 33: return flame_adjective();
186     default: return flame_group_adj_array[t];
187   }
191 const string flame_der_term_array[33] = {
192  "sexist",
193  "fascist",
194  "weakling",
195  "coward",
196  "beast",
197  "peasant",
198  "racist",
199  "cretin",
200  "fool",
201   "jerk",
202   "ignoramus",
203   "idiot",
204   "wanker",
205   "rat",
206   "slimebag",
207   "DAF driver",
208   "Neanderthal",
209   "sadist",
210   "drunk",
211   "capitalist",
212   "wimp",
213   "dogmatist",
214   "wally",
215   "maniac",
216   "whimpering scumbag",
217   "pea brain",
218   "arsehole",
219   "moron",
220   "goof",
221   "incompetant",
222   "lunkhead",
223   "Nazi",
224   "SysThug",
227 string flame_der_term () {
228   int t = irand(35);
229   switch (t) {
230     case 33: return strcat(strcat(flame_adjective(), " "), flame_der_term());
231     case 34: return strcat(strcat(flame_der_term(), " "), flame_der_term());
232     default: return flame_der_term_array[t];
233   }
237 const string flame_thing_array[29] = {
238   "computer",
239   "Honeywell DPS8",
240   "whale",
241   "operation",
242   "sexist joke",
243   "ten-incher",
244   "dog",
245   "MicroVAX II",
246   "source license",
247   "real-time clock",
248   "mental problem",
249   "sexual fantasy",
250   "venereal disease",
251   "Jewish grandmother",
252   "cardboard cut-out",
253   "punk haircut",
254   "surfboard",
255   "system call",
256   "wood-burning stove",
257   "graphics editor",
258   "right wing death squad",
259   "disease",
260   "vegetable",
261   "religion",
262   "cruise missile",
263   "bug fix",
264   "lawyer",
265   "copyright",
266   "PAD",
269 string flame_thing () {
270   int t = irand(30);
271   if (t == 29) return strcat(strcat(flame_adjective(), " "), flame_thing());
272   return flame_thing_array[t];
276 string flame_statement () {
277   switch (irand(73)) {
278     case 0: return strcat(strcat("your ", flame_thing()), " is great");
279     case 1: return strcat(flame_thing(), "s are fun");
280     case 2: return strcat(strcat(flame_person(), " is a "), flame_der_term());
281     case 3: return strcat(strcat(flame_group_adj(), " people are "), flame_adjective());
282     case 4: return strcat(strcat(strcat("every ", flame_group_adj()), " person is a "), flame_der_term());
283     case 5: return flame_add_plural(strcat(strcat(strcat("most ", flame_group_adj()), " people have "), flame_thing()));
284     case 6: return flame_add_plural(strcat(strcat(strcat("all ", flame_group_adj()), " dudes should get "), flame_thing()));
285     case 7: return strcat(strcat(flame_person(), " is "), flame_group_adj());
286     case 8: return strcat("trees are ", flame_adjective());
287     case 9: return strcat(strcat("if you've seen one ", flame_thing()), "you've seen them all");
288     case 10: return strcat("you're ", flame_group_adj());
289     case 11: return strcat("you have a ", flame_thing());
290     case 12: return strcat(strcat("my ", flame_thing()), " is pretty good");
291     case 13: return "the Martians are coming";
292     case 14: return strcat(strcat("the ", flame_paper()), " is always right");
293     case 15: return strcat(strcat("just because you read it in the ", flame_paper()), " that doesn't mean it's true");
294     case 16: return strcat(strcat(flame_person(), " was "), flame_group_adj());
295     case 17: return strcat(strcat(flame_person(), "'s ghost is living in your "), flame_thing());
296     case 18: return strcat("you look like a ", flame_thing());
297     case 19: return "the oceans are full of dirty fish";
298     case 20: return "people are dying every day";
299     case 21: return strcat(strcat("a ", flame_group_adj()), " man ain't got nothing in the world these days");
300     case 22: return "women are inherently superior to men";
301     case 23: return "the system staff is fascist";
302     case 24: return "there is life after death";
303     case 25: return flame_add_plural(strcat("the world is full of ", flame_der_term()));
304     case 26: return strcat("you remind me of ", flame_person());
305     case 27: return "technology is evil";
306     case 28: return strcat(strcat(flame_person(), " killed "), flame_person());
307     case 29: return "the Russians are tapping your phone";
308     case 30: return "the Earth is flat";
309     case 31: return strcat(strcat("it's OK to run down ", flame_group_adj()), " people");
310     case 32: return strcat(strcat("Multics is a really ", flame_adjective()), " operating system");
311     case 33: return strcat("the CIA killed ", flame_person());
312     case 34: return "the sexual revolution is over";
313     case 35: return strcat("Lassie was ", flame_group_adj());
314     case 36: return strcat(strcat("the ", flame_group_adj()), "s have really got it all together");
315     case 37: return strcat(strcat("I was ", flame_person()), " in a previous life");
316     case 38: return "breathing causes cancer";
317     case 39: return strcat("it's fun to be really ", flame_adjective());
318     case 40: return strcat(flame_quality(), " is pretty fun");
319     case 41: return strcat("you're a ", flame_der_term());
320     case 42: return strcat(strcat("the ", flame_group_adj()), " culture is fascinating");
321     case 43: return "when ya gotta go ya gotta go";
322     case 44: return strcat(strcat(flame_person(), " is "), flame_adjective());
323     case 45: return strcat(strcat(strcat(strcat(flame_person(), "'s "), flame_quality()), " is "), flame_adjective());
324     case 46: return "it's a wonderful day";
325     case 47: return strcat("everything is really a ", flame_thing());
326     case 48: return strcat(strcat(strcat(strcat("there's a ", flame_thing()), " in "), flame_person()), "'s brain");
327     case 49: return strcat(flame_person(), " is a cool dude");
328     case 50: return strcat(flame_person(), " is just a figment of your imagination");
329     case 51: return strcat(strcat("the more ", flame_thing()), "s you have, the better");
330     case 52: return strcat("life is a ", flame_thing());
331     case 53: return strcat("life is ", flame_quality());
332     case 54: return strcat(strcat(flame_person(), " is "), flame_adjective());
333     case 55: return flame_add_plural(strcat(strcat(strcat(strcat(flame_group_adj(), " people are all "), flame_adjective()), " "), flame_der_term()));
334     case 56: return strcat(strcat(flame_statement(), ", and "), flame_statement());
335     case 57: return strcat(strcat(flame_statement(), ", but "), flame_statement());
336     case 58: return strcat("I wish I had a ", flame_thing());
337     case 59: return strcat("you should have a ", flame_thing());
338     case 60: return strcat("you hope that ", flame_statement());
339     case 61: return strcat(strcat(flame_person(), " is secretly "), flame_group_adj());
340     case 62: return strcat("you wish you were ", flame_group_adj());
341     case 63: return strcat("you wish you were a ", flame_thing());
342     case 64: return strcat("I wish I were a ", flame_thing());
343     case 65: return strcat("you think that ", flame_statement());
344     case 66: return strcat(strcat(flame_statement(), ", because "), flame_statement());
345     case 67: return strcat(strcat(strcat(strcat(flame_group_adj(), " people don't get married to "), flame_group_adj()), " people because "), flame_reason());
346     case 68: return strcat(strcat(strcat(strcat(flame_group_adj(), " people are all "), flame_adjective()), " because "), flame_reason());
347     case 69: return strcat(strcat(strcat(strcat(flame_group_adj(), " people are "), flame_adjective()), ", and "), flame_reason());
348     case 70: return strcat(strcat(strcat(strcat(strcat(strcat(strcat("you must be a ", flame_adjective()), " "), flame_der_term()), " to think that "), flame_person()), " said "), flame_statement());
349     case 71: return strcat(strcat(strcat(flame_group_adj(), " people are inherently superior to "), flame_group_adj()), " people");
350     case 72: return "God is Dead";
351     default: abort();
352   }
353   return "";
357 string flame_sentence () {
358   switch (irand(37)) {
359     case 0: return strcat(strcat("how can you say that ", flame_statement()), "?");
360     case 1: return strcat(strcat("I can't believe how ", flame_adjective()), " you are.");
361     case 2: return strcat(strcat(strcat(strcat("only a ", flame_der_term()), " like you would say that "), flame_statement()), ".");
362     case 3: return strcat(flame_statement(), ", huh?");
363     case 4: return strcat(strcat("so, ", flame_statement()), "?");
364     case 5: return strcat(flame_statement(), ", right?");
365     case 6: return strcat("I mean, ", flame_sentence());
366     case 7: return strcat(strcat("don't you realise that ", flame_statement()), "?");
367     case 8: return strcat(strcat("I firmly believe that ", flame_statement()), ".");
368     case 9: return strcat(strcat(strcat(strcat("let me tell you something, you ", flame_der_term()), ", "), flame_statement()), ".");
369     case 10: return strcat(strcat(strcat(strcat("furthermore, you ", flame_der_term()), ", "), flame_statement()), ".");
370     case 11: return strcat(strcat("I couldn't care less about your ", flame_thing()), ".");
371     case 12: return strcat(strcat("how can you be so ", flame_adjective()), "?");
372     case 13: return "you make me sick.";
373     case 14: return strcat(strcat("it's well known that ", flame_statement()), ".");
374     case 15: return strcat(flame_statement(), ".");
375     case 16: return strcat(strcat(strcat(strcat(strcat(strcat("it takes a ", flame_group_adj()), " "), flame_der_term()), " like you to say that "), flame_statement()), ".");
376     case 17: return strcat(strcat("I don't want to hear about your ", flame_thing()), ".");
377     case 18: return "you're always totally wrong.";
378     case 19: return strcat(strcat("I've never heard anything as ridiculous as the idea that ", flame_statement()), ".");
379     case 20: return strcat(strcat(strcat(strcat("you must be a real ", flame_der_term()), " to think that "), flame_statement()), ".");
380     case 21: return strcat(strcat(strcat(strcat(strcat(strcat("you ", flame_adjective()), " "), flame_group_adj()), " "), flame_der_term()), "!");
381     case 22: return strcat(strcat("you're probably ", flame_group_adj()), " yourself.");
382     case 23: return strcat(strcat("you sound like a real ", flame_der_term()), ".");
383     case 24: return strcat(strcat("why, ", flame_statement()), "!");
384     case 25: return strcat(strcat("I have many ", flame_group_adj()), " friends.");
385     case 26: return strcat(strcat("save the ", flame_thing()), "s!");
386     case 27: return "no nukes!";
387     case 28: return strcat(strcat("ban ", flame_thing()), "s!");
388     case 29: return strcat(strcat(strcat(strcat("I'll bet you think that ", flame_thing()), "s are "), flame_adjective()), ".");
389     case 30: return strcat(strcat("you know, ", flame_statement()), ".");
390     case 31: return strcat(strcat(strcat(strcat("your ", flame_quality()), " reminds me of a "), flame_thing()), ".");
391     case 32: return strcat(strcat(strcat(strcat("you have the ", flame_quality()), " of a "), flame_der_term()), ".");
392     case 33: return strcat(flame_der_term(), "!");
393     case 34: return strcat(strcat(strcat(strcat(strcat(flame_adjective(), " "), flame_group_adj()), " "), flame_der_term()), "!");
394     case 35: return strcat(strcat(strcat(strcat("you're a typical ", flame_group_adj()), " person, totally "), flame_adjective()), ".");
395     case 36: return strcat("man, ", flame_sentence());
396     default: abort();
397   }
398   return "";
402 string flame_sentence_up () {
403   string s = strcat(flame_sentence(), "");
404   if (s[0] >= 'a' && s[0] <= 'z') s[0] = s[0]-32;
405   return s;
409 #ifndef _AS_MODULE_
410 void main () {
411   print(flame_sentence_up(), "\n");
413 #endif
416 #endif