OSDN Git Service

patch src/
[jnethack/source.git] / src / rumors.c
1 /* NetHack 3.6  rumors.c        $NHDT-Date: 1446713640 2015/11/05 08:54:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.27 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed.  See license for details. */
4
5 #include "hack.h"
6 #include "lev.h"
7 #include "dlb.h"
8
9 /*      [note: this comment is fairly old, but still accurate for 3.1]
10  * Rumors have been entirely rewritten to speed up the access.  This is
11  * essential when working from floppies.  Using fseek() the way that's done
12  * here means rumors following longer rumors are output more often than those
13  * following shorter rumors.  Also, you may see the same rumor more than once
14  * in a particular game (although the odds are highly against it), but
15  * this also happens with real fortune cookies.  -dgk
16  */
17
18 /*      3.6
19  * The rumors file consists of a "do not edit" line, then a line containing
20  * three sets of three counts (first two in decimal, third in hexadecimal).
21  * The first set has the number of true rumors, the count in bytes for all
22  * true rumors, and the file offset to the first one.  The second set has
23  * the same group of numbers for the false rumors.  The third set has 0 for
24  * count, 0 for size, and the file offset for end-of-file.  The offset of
25  * the first true rumor plus the size of the true rumors matches the offset
26  * of the first false rumor.  Likewise, the offset of the first false rumor
27  * plus the size of the false rumors matches the offset for end-of-file.
28  */
29
30 /*      3.1     [now obsolete for rumors but still accurate for oracles]
31  * The rumors file consists of a "do not edit" line, a hexadecimal number
32  * giving the number of bytes of useful/true rumors, followed by those
33  * true rumors (one per line), followed by the useless/false/misleading/cute
34  * rumors (also one per line).  Number of bytes of untrue rumors is derived
35  * via fseek(EOF)+ftell().
36  *
37  * The oracles file consists of a "do not edit" comment, a decimal count N
38  * and set of N+1 hexadecimal fseek offsets, followed by N multiple-line
39  * records, separated by "---" lines.  The first oracle is a special case,
40  * and placed there by 'makedefs'.
41  */
42
43 STATIC_DCL void FDECL(init_rumors, (dlb *));
44 STATIC_DCL void FDECL(init_oracles, (dlb *));
45
46 /* rumor size variables are signed so that value -1 can be used as a flag */
47 static long true_rumor_size = 0L, false_rumor_size;
48 /* rumor start offsets are unsigned because they're handled via %lx format */
49 static unsigned long true_rumor_start, false_rumor_start;
50 /* rumor end offsets are signed because they're compared with [dlb_]ftell() */
51 static long true_rumor_end, false_rumor_end;
52 /* oracles are handled differently from rumors... */
53 static int oracle_flg = 0; /* -1=>don't use, 0=>need init, 1=>init done */
54 static unsigned oracle_cnt = 0;
55 static unsigned long *oracle_loc = 0;
56
57 STATIC_OVL void
58 init_rumors(fp)
59 dlb *fp;
60 {
61     static const char rumors_header[] = "%d,%ld,%lx;%d,%ld,%lx;0,0,%lx\n";
62     int true_count, false_count; /* in file but not used here */
63     unsigned long eof_offset;
64     char line[BUFSZ];
65
66     (void) dlb_fgets(line, sizeof line, fp); /* skip "don't edit" comment */
67     (void) dlb_fgets(line, sizeof line, fp);
68     if (sscanf(line, rumors_header, &true_count, &true_rumor_size,
69                &true_rumor_start, &false_count, &false_rumor_size,
70                &false_rumor_start, &eof_offset) == 7
71         && true_rumor_size > 0L
72         && false_rumor_size > 0L) {
73         true_rumor_end = (long) true_rumor_start + true_rumor_size;
74         /* assert( true_rumor_end == false_rumor_start ); */
75         false_rumor_end = (long) false_rumor_start + false_rumor_size;
76         /* assert( false_rumor_end == eof_offset ); */
77     } else {
78         true_rumor_size = -1L; /* init failed */
79         (void) dlb_fclose(fp);
80     }
81 }
82
83 /* exclude_cookie is a hack used because we sometimes want to get rumors in a
84  * context where messages such as "You swallowed the fortune!" that refer to
85  * cookies should not appear.  This has no effect for true rumors since none
86  * of them contain such references anyway.
87  */
88 char *
89 getrumor(truth, rumor_buf, exclude_cookie)
90 int truth; /* 1=true, -1=false, 0=either */
91 char *rumor_buf;
92 boolean exclude_cookie;
93 {
94     dlb *rumors;
95     long tidbit, beginning;
96     char *endp, line[BUFSZ], xbuf[BUFSZ];
97
98     rumor_buf[0] = '\0';
99     if (true_rumor_size < 0L) /* we couldn't open RUMORFILE */
100         return rumor_buf;
101
102     rumors = dlb_fopen(RUMORFILE, "r");
103
104     if (rumors) {
105         int count = 0;
106         int adjtruth;
107
108         do {
109             rumor_buf[0] = '\0';
110             if (true_rumor_size == 0L) { /* if this is 1st outrumor() */
111                 init_rumors(rumors);
112                 if (true_rumor_size < 0L) { /* init failed */
113                     Sprintf(rumor_buf, "Error reading \"%.80s\".", RUMORFILE);
114                     return rumor_buf;
115                 }
116             }
117             /*
118              *  input:      1    0   -1
119              *   rn2 \ +1  2=T  1=T  0=F
120              *   adj./ +0  1=T  0=F -1=F
121              */
122             switch (adjtruth = truth + rn2(2)) {
123             case 2: /*(might let a bogus input arg sneak thru)*/
124             case 1:
125                 beginning = (long) true_rumor_start;
126                 tidbit = Rand() % true_rumor_size;
127                 break;
128             case 0: /* once here, 0 => false rather than "either"*/
129             case -1:
130                 beginning = (long) false_rumor_start;
131                 tidbit = Rand() % false_rumor_size;
132                 break;
133             default:
134                 impossible("strange truth value for rumor");
135                 return strcpy(rumor_buf, "Oops...");
136             }
137             (void) dlb_fseek(rumors, beginning + tidbit, SEEK_SET);
138             (void) dlb_fgets(line, sizeof line, rumors);
139             if (!dlb_fgets(line, sizeof line, rumors)
140                 || (adjtruth > 0 && dlb_ftell(rumors) > true_rumor_end)) {
141                 /* reached end of rumors -- go back to beginning */
142                 (void) dlb_fseek(rumors, beginning, SEEK_SET);
143                 (void) dlb_fgets(line, sizeof line, rumors);
144             }
145             if ((endp = index(line, '\n')) != 0)
146                 *endp = 0;
147             Strcat(rumor_buf, xcrypt(line, xbuf));
148         } while (
149             count++ < 50 && exclude_cookie
150 #if 0 /*JP*/
151             && (strstri(rumor_buf, "fortune") || strstri(rumor_buf, "pity")));
152 #else
153             && (strstri(rumor_buf, "\90è") || strstri(rumor_buf, "\82È\82ñ\82Ä\82±\82Æ\82¾")));
154 #endif
155         (void) dlb_fclose(rumors);
156         if (count >= 50)
157             impossible("Can't find non-cookie rumor?");
158         else if (!in_mklev) /* avoid exercizing wisdom for graffiti */
159             exercise(A_WIS, (adjtruth > 0));
160     } else {
161 /*JP
162         pline("Can't open rumors file!");
163 */
164         pline("rumors\83t\83@\83C\83\8b\82ª\8aJ\82¯\82È\82¢\81I");
165         true_rumor_size = -1; /* don't try to open it again */
166     }
167 /* this is safe either way, so do it always since we can't get the definition
168  * out of makedefs.c
169  */
170 #define PAD_RUMORS_TO
171 #ifdef PAD_RUMORS_TO
172     /* remove padding */
173     {
174         char *x = eos(rumor_buf) - 1;
175
176         while (x > rumor_buf && *x == '_')
177             x--;
178         *++x = '\n';
179         *x = '\0';
180     }
181 #endif
182     return rumor_buf;
183 }
184
185 /*
186  * test that the true/false rumor boundaries are valid.
187  */
188 void
189 rumor_check()
190 {
191     dlb *rumors;
192     winid tmpwin;
193     char *endp, line[BUFSZ], xbuf[BUFSZ], rumor_buf[BUFSZ];
194
195     if (true_rumor_size < 0L) { /* we couldn't open RUMORFILE */
196     no_rumors:
197         pline("rumors not accessible.");
198         return;
199     }
200
201     rumors = dlb_fopen(RUMORFILE, "r");
202
203     if (rumors) {
204         long ftell_rumor_start = 0L;
205
206         rumor_buf[0] = '\0';
207         if (true_rumor_size == 0L) { /* if this is 1st outrumor() */
208             init_rumors(rumors);
209             if (true_rumor_size < 0L)
210                 goto no_rumors; /* init failed */
211         }
212         tmpwin = create_nhwindow(NHW_TEXT);
213
214         /*
215          * reveal the values.
216          */
217
218         Sprintf(
219             rumor_buf,
220             "T start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)",
221             (long) true_rumor_start, true_rumor_start, true_rumor_end,
222             (unsigned long) true_rumor_end, true_rumor_size,
223             (unsigned long) true_rumor_size);
224         putstr(tmpwin, 0, rumor_buf);
225
226         Sprintf(
227             rumor_buf,
228             "F start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)",
229             (long) false_rumor_start, false_rumor_start, false_rumor_end,
230             (unsigned long) false_rumor_end, false_rumor_size,
231             (unsigned long) false_rumor_size);
232         putstr(tmpwin, 0, rumor_buf);
233
234         /*
235          * check the first rumor (start of true rumors) by
236          * skipping the first two lines.
237          *
238          * Then seek to the start of the false rumors (based on
239          * the value read in rumors, and display it.
240          */
241         rumor_buf[0] = '\0';
242         (void) dlb_fseek(rumors, (long) true_rumor_start, SEEK_SET);
243         ftell_rumor_start = dlb_ftell(rumors);
244         (void) dlb_fgets(line, sizeof line, rumors);
245         if ((endp = index(line, '\n')) != 0)
246             *endp = 0;
247         Sprintf(rumor_buf, "T %06ld %s", ftell_rumor_start,
248                 xcrypt(line, xbuf));
249         putstr(tmpwin, 0, rumor_buf);
250         /* find last true rumor */
251         while (dlb_fgets(line, sizeof line, rumors)
252                && dlb_ftell(rumors) < true_rumor_end)
253             continue;
254         if ((endp = index(line, '\n')) != 0)
255             *endp = 0;
256         Sprintf(rumor_buf, "  %6s %s", "", xcrypt(line, xbuf));
257         putstr(tmpwin, 0, rumor_buf);
258
259         rumor_buf[0] = '\0';
260         (void) dlb_fseek(rumors, (long) false_rumor_start, SEEK_SET);
261         ftell_rumor_start = dlb_ftell(rumors);
262         (void) dlb_fgets(line, sizeof line, rumors);
263         if ((endp = index(line, '\n')) != 0)
264             *endp = 0;
265         Sprintf(rumor_buf, "F %06ld %s", ftell_rumor_start,
266                 xcrypt(line, xbuf));
267         putstr(tmpwin, 0, rumor_buf);
268         /* find last false rumor */
269         while (dlb_fgets(line, sizeof line, rumors)
270                && dlb_ftell(rumors) < false_rumor_end)
271             continue;
272         if ((endp = index(line, '\n')) != 0)
273             *endp = 0;
274         Sprintf(rumor_buf, "  %6s %s", "", xcrypt(line, xbuf));
275         putstr(tmpwin, 0, rumor_buf);
276
277         (void) dlb_fclose(rumors);
278         display_nhwindow(tmpwin, TRUE);
279         destroy_nhwindow(tmpwin);
280     } else {
281         impossible("Can't open rumors file!");
282         true_rumor_size = -1; /* don't try to open it again */
283     }
284 }
285
286 /* Gets a random line of text from file 'fname', and returns it. */
287 char *
288 get_rnd_text(fname, buf)
289 const char *fname;
290 char *buf;
291 {
292     dlb *fh;
293
294     buf[0] = '\0';
295
296     fh = dlb_fopen(fname, "r");
297
298     if (fh) {
299         /* TODO: cache sizetxt, starttxt, endtxt. maybe cache file contents?
300          */
301         long sizetxt = 0, starttxt = 0, endtxt = 0, tidbit = 0;
302         char *endp, line[BUFSZ], xbuf[BUFSZ];
303         (void) dlb_fgets(line, sizeof line,
304                          fh); /* skip "don't edit" comment */
305
306         (void) dlb_fseek(fh, 0L, SEEK_CUR);
307         starttxt = dlb_ftell(fh);
308         (void) dlb_fseek(fh, 0L, SEEK_END);
309         endtxt = dlb_ftell(fh);
310         sizetxt = endtxt - starttxt;
311         tidbit = Rand() % sizetxt;
312
313         (void) dlb_fseek(fh, starttxt + tidbit, SEEK_SET);
314         (void) dlb_fgets(line, sizeof line, fh);
315         if (!dlb_fgets(line, sizeof line, fh)) {
316             (void) dlb_fseek(fh, starttxt, SEEK_SET);
317             (void) dlb_fgets(line, sizeof line, fh);
318         }
319         if ((endp = index(line, '\n')) != 0)
320             *endp = 0;
321         Strcat(buf, xcrypt(line, xbuf));
322         (void) dlb_fclose(fh);
323     } else
324         impossible("Can't open file %s!", fname);
325     return buf;
326 }
327
328 void
329 outrumor(truth, mechanism)
330 int truth; /* 1=true, -1=false, 0=either */
331 int mechanism;
332 {
333     static const char fortune_msg[] =
334 /*JP
335         "This cookie has a scrap of paper inside.";
336 */
337         "\82±\82Ì\83N\83b\83L\81[\82É\82Í\8e\86\90Ø\82ª\93ü\82Á\82Ä\82¢\82é\81D";
338     const char *line;
339     char buf[BUFSZ];
340     boolean reading = (mechanism == BY_COOKIE || mechanism == BY_PAPER);
341
342     if (reading) {
343         /* deal with various things that prevent reading */
344         if (is_fainted() && mechanism == BY_COOKIE)
345             return;
346         else if (Blind) {
347             if (mechanism == BY_COOKIE)
348                 pline(fortune_msg);
349 /*JP
350             pline("What a pity that you cannot read it!");
351 */
352             pline("\82»\82ê\82ð\93Ç\82ß\82È\82¢\82È\82ñ\82Ä\8bC\82Ì\93Å\82È\81I");
353             return;
354         }
355     }
356     line = getrumor(truth, buf, reading ? FALSE : TRUE);
357     if (!*line)
358 /*JP
359         line = "NetHack rumors file closed for renovation.";
360 */
361         line = "\89\\82Ì\90^\91\8a\82Í\8dü\90V\82Ì\82½\82ß\8bx\8a§\82µ\82Ä\82¢\82é\81D";
362     switch (mechanism) {
363     case BY_ORACLE:
364         /* Oracle delivers the rumor */
365 #if 0 /*JP*/
366         pline("True to her word, the Oracle %ssays: ",
367               (!rn2(4) ? "offhandedly "
368                        : (!rn2(3) ? "casually "
369                                   : (rn2(2) ? "nonchalantly " : ""))));
370 #else
371         pline("\96ñ\91©\82Ç\82¨\82è\82É\81C\8c«\8eÒ\82Í%s\8fq\82×\82½:",
372               (!rn2(4) ? "\96³\91¢\8dì\82É"
373                        : (!rn2(3) ? "\89½\8bC\82È\82­"
374                                   : (rn2(2) ? "\96³\93Ú\92\85\82É" : ""))));
375 #endif
376         verbalize1(line);
377         /* [WIS exercized by getrumor()] */
378         return;
379     case BY_COOKIE:
380         pline(fortune_msg);
381     /* FALLTHRU */
382     case BY_PAPER:
383 /*JP
384         pline("It reads:");
385 */
386         pline("\82»\82ê\82ð\93Ç\82ñ\82¾:");
387         break;
388     }
389     pline1(line);
390 }
391
392 STATIC_OVL void
393 init_oracles(fp)
394 dlb *fp;
395 {
396     register int i;
397     char line[BUFSZ];
398     int cnt = 0;
399
400     /* this assumes we're only called once */
401     (void) dlb_fgets(line, sizeof line, fp); /* skip "don't edit" comment*/
402     (void) dlb_fgets(line, sizeof line, fp);
403     if (sscanf(line, "%5d\n", &cnt) == 1 && cnt > 0) {
404         oracle_cnt = (unsigned) cnt;
405         oracle_loc = (unsigned long *) alloc((unsigned) cnt * sizeof(long));
406         for (i = 0; i < cnt; i++) {
407             (void) dlb_fgets(line, sizeof line, fp);
408             (void) sscanf(line, "%5lx\n", &oracle_loc[i]);
409         }
410     }
411     return;
412 }
413
414 void
415 save_oracles(fd, mode)
416 int fd, mode;
417 {
418     if (perform_bwrite(mode)) {
419         bwrite(fd, (genericptr_t) &oracle_cnt, sizeof oracle_cnt);
420         if (oracle_cnt)
421             bwrite(fd, (genericptr_t) oracle_loc, oracle_cnt * sizeof(long));
422     }
423     if (release_data(mode)) {
424         if (oracle_cnt) {
425             free((genericptr_t) oracle_loc);
426             oracle_loc = 0, oracle_cnt = 0, oracle_flg = 0;
427         }
428     }
429 }
430
431 void
432 restore_oracles(fd)
433 int fd;
434 {
435     mread(fd, (genericptr_t) &oracle_cnt, sizeof oracle_cnt);
436     if (oracle_cnt) {
437         oracle_loc = (unsigned long *) alloc(oracle_cnt * sizeof(long));
438         mread(fd, (genericptr_t) oracle_loc, oracle_cnt * sizeof(long));
439         oracle_flg = 1; /* no need to call init_oracles() */
440     }
441 }
442
443 void
444 outoracle(special, delphi)
445 boolean special;
446 boolean delphi;
447 {
448     char line[COLNO];
449     char *endp;
450     dlb *oracles;
451     int oracle_idx;
452     char xbuf[BUFSZ];
453
454     /* early return if we couldn't open ORACLEFILE on previous attempt,
455        or if all the oracularities are already exhausted */
456     if (oracle_flg < 0 || (oracle_flg > 0 && oracle_cnt == 0))
457         return;
458
459     oracles = dlb_fopen(ORACLEFILE, "r");
460
461     if (oracles) {
462         winid tmpwin;
463         if (oracle_flg == 0) { /* if this is the first outoracle() */
464             init_oracles(oracles);
465             oracle_flg = 1;
466             if (oracle_cnt == 0)
467                 return;
468         }
469         /* oracle_loc[0] is the special oracle;
470            oracle_loc[1..oracle_cnt-1] are normal ones */
471         if (oracle_cnt <= 1 && !special)
472             return; /*(shouldn't happen)*/
473         oracle_idx = special ? 0 : rnd((int) oracle_cnt - 1);
474         (void) dlb_fseek(oracles, (long) oracle_loc[oracle_idx], SEEK_SET);
475         if (!special) /* move offset of very last one into this slot */
476             oracle_loc[oracle_idx] = oracle_loc[--oracle_cnt];
477
478         tmpwin = create_nhwindow(NHW_TEXT);
479         if (delphi)
480             putstr(tmpwin, 0,
481                    special
482 /*JP
483                      ? "The Oracle scornfully takes all your money and says:"
484 */
485                      ? "\8c«\8eÒ\82Í\8cy\95Ì\82µ\82½\82æ\82¤\82É\82 \82È\82½\82Ì\91S\82Ä\82Ì\82¨\8bà\82ð\8eó\82¯\82Æ\82è\81C\8fq\82×\82½\81F"
486 /*JP
487                      : "The Oracle meditates for a moment and then intones:");
488 */
489                      : "\8c«\8eÒ\82Í\82µ\82Î\82ç\82­\96»\91z\82µ\81C\89Ì\82¤\82æ\82¤\82É\98b\82µ\82½\81F");
490         else
491 /*JP
492             putstr(tmpwin, 0, "The message reads:");
493 */
494             putstr(tmpwin, 0, "\83\81\83b\83Z\81[\83W:");
495         putstr(tmpwin, 0, "");
496
497         while (dlb_fgets(line, COLNO, oracles) && strcmp(line, "---\n")) {
498             if ((endp = index(line, '\n')) != 0)
499                 *endp = 0;
500             putstr(tmpwin, 0, xcrypt(line, xbuf));
501         }
502         display_nhwindow(tmpwin, TRUE);
503         destroy_nhwindow(tmpwin);
504         (void) dlb_fclose(oracles);
505     } else {
506 /*JP
507         pline("Can't open oracles file!");
508 */
509         pline("oracles\83t\83@\83C\83\8b\82ð\8aJ\82¯\82È\82¢\81I");
510         oracle_flg = -1; /* don't try to open it again */
511     }
512 }
513
514 int
515 doconsult(oracl)
516 struct monst *oracl;
517 {
518     long umoney;
519     int u_pay, minor_cost = 50, major_cost = 500 + 50 * u.ulevel;
520     int add_xpts;
521     char qbuf[QBUFSZ];
522
523     multi = 0;
524     umoney = money_cnt(invent);
525
526     if (!oracl) {
527 /*JP
528         There("is no one here to consult.");
529 */
530         pline("\82±\82±\82É\82Í\90_\91õ\82ð\8fq\82×\82é\90l\82Í\82¢\82È\82¢\81D");
531         return 0;
532     } else if (!oracl->mpeaceful) {
533 /*JP
534         pline("%s is in no mood for consultations.", Monnam(oracl));
535 */
536         pline("\8c«\8eÒ\82Í\90_\91õ\82ð\8d\90\82°\82Ä\82­\82ê\82é\95µ\88Í\8bC\82Å\82Í\82È\82¢\81D");
537         return 0;
538     } else if (!umoney) {
539 /*JP
540         You("have no money.");
541 */
542         You("\82¨\8bà\82ª\82È\82¢\81D");
543         return 0;
544     }
545
546 /*JP
547     Sprintf(qbuf, "\"Wilt thou settle for a minor consultation?\" (%d %s)",
548 */
549     Sprintf(qbuf, "\81u\93ð\81C\92á\88Ê\82Ì\90_\91õ\82ð\8eó\82¯\82é\82©\81H\81v(%d%s)",
550             minor_cost, currency((long) minor_cost));
551     switch (ynq(qbuf)) {
552     default:
553     case 'q':
554         return 0;
555     case 'y':
556         if (umoney < (long) minor_cost) {
557 /*JP
558             You("don't even have enough money for that!");
559 */
560             You("\82±\82ê\82É\95¥\82¦\82é\82¾\82¯\82Ì\82¨\8bà\82·\82ç\8e\9d\82Á\82Ä\82¢\82È\82¢\81I");
561             return 0;
562         }
563         u_pay = minor_cost;
564         break;
565     case 'n':
566         if (umoney <= (long) minor_cost /* don't even ask */
567             || (oracle_cnt == 1 || oracle_flg < 0))
568             return 0;
569         Sprintf(qbuf, "\81u\82È\82ç\82Î\93ð\81C\8d\82\88Ê\82Ì\90_\91õ\82ð\8eó\82¯\82é\82©\81H\81v(%d%s)",
570                 major_cost, currency((long) major_cost));
571         if (yn(qbuf) != 'y')
572             return 0;
573         u_pay = (umoney < (long) major_cost) ? (int) umoney : major_cost;
574         break;
575     }
576     money2mon(oracl, (long) u_pay);
577     context.botl = 1;
578     add_xpts = 0; /* first oracle of each type gives experience points */
579     if (u_pay == minor_cost) {
580         outrumor(1, BY_ORACLE);
581         if (!u.uevent.minor_oracle)
582             add_xpts = u_pay / (u.uevent.major_oracle ? 25 : 10);
583         /* 5 pts if very 1st, or 2 pts if major already done */
584         u.uevent.minor_oracle = TRUE;
585     } else {
586         boolean cheapskate = u_pay < major_cost;
587
588         outoracle(cheapskate, TRUE);
589         if (!cheapskate && !u.uevent.major_oracle)
590             add_xpts = u_pay / (u.uevent.minor_oracle ? 25 : 10);
591         /* ~100 pts if very 1st, ~40 pts if minor already done */
592         u.uevent.major_oracle = TRUE;
593         exercise(A_WIS, !cheapskate);
594     }
595     if (add_xpts) {
596         more_experienced(add_xpts, u_pay / 50);
597         newexplevel();
598     }
599     return 1;
600 }
601
602 /*rumors.c*/