3 * @brief ハイスコア処理 / Highscores handling
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
7 * This software may be copied and distributed for educational, research,
8 * and not for profit purposes provided that this copyright and statement
9 * are included in all such copies. Other copyrights may also apply.
10 * 2014 Deskull rearranged comment for Doxygen.
19 #include "player-race.h"
20 #include "player-status.h"
21 #include "player-class.h"
22 #include "player-personality.h"
23 #include "player-sex.h"
33 * The "highscore" file descriptor, if available.
35 int highscore_fd = -1;
38 * @brief i番目のスコア情報にバッファ位置をシークする / Seek score 'i' in the highscore file
42 static int highscore_seek(int i)
44 /* Seek for the requested record */
45 return (fd_seek(highscore_fd, (huge)(i) * sizeof(high_score)));
50 * @brief 所定ポインタからスコア情報を読み取る / Read one score from the highscore file
51 * @param score スコア情報参照ポインタ
54 static errr highscore_read(high_score *score)
56 /* Read the record, note failure */
57 return (fd_read(highscore_fd, (char*)(score), sizeof(high_score)));
62 * @brief 所定ポインタへスコア情報を書き込む / Write one score to the highscore file
63 * @param score スコア情報参照ポインタ
64 * @return エラーコード(問題がなければ0を返す)
66 static int highscore_write(high_score *score)
68 /* Write the record, note failure */
69 return (fd_write(highscore_fd, (char*)(score), sizeof(high_score)));
73 * @brief スコア情報を全て得るまで繰り返し取得する / Just determine where a new score *would* be placed
74 * @param score スコア情報参照ポインタ
75 * @return 正常ならば(MAX_HISCORES - 1)、問題があれば-1を返す
77 static int highscore_where(high_score *score)
84 my_score = atoi(score->pts);
86 /* Paranoia -- it may not have opened */
87 if (highscore_fd < 0) return (-1);
89 /* Go to the start of the highscore file */
90 if (highscore_seek(0)) return (-1);
92 /* Read until we get to a higher score */
93 for (i = 0; i < MAX_HISCORES; i++)
96 if (highscore_read(&the_score)) return (i);
97 old_score = atoi(the_score.pts);
98 /* if (strcmp(the_score.pts, score->pts) < 0) return (i); */
99 if (my_score > old_score) return (i);
102 /* The "last" entry is always usable */
103 return (MAX_HISCORES - 1);
108 * @brief スコア情報をバッファの末尾に追加する / Actually place an entry into the high score file
109 * @param score スコア情報参照ポインタ
110 * @return 正常ならば書き込んだスロット位置、問題があれば-1を返す / Return the location (0 is best) or -1 on "failure"
112 static int highscore_add(high_score *score)
117 high_score the_score, tmpscore;
120 /* Paranoia -- it may not have opened */
121 if (highscore_fd < 0) return (-1);
123 /* Determine where the score should go */
124 slot = highscore_where(score);
126 /* Hack -- Not on the list */
127 if (slot < 0) return (-1);
129 /* Hack -- prepare to dump the new score */
130 the_score = (*score);
132 /* Slide all the scores down one */
133 for (i = slot; !done && (i < MAX_HISCORES); i++)
135 /* Read the old guy, note errors */
136 if (highscore_seek(i)) return (-1);
137 if (highscore_read(&tmpscore)) done = TRUE;
139 /* Back up and dump the score we were holding */
140 if (highscore_seek(i)) return (-1);
141 if (highscore_write(&the_score)) return (-1);
143 /* Hack -- Save the old score, for the next pass */
144 the_score = tmpscore;
147 /* Return location used */
154 * @brief 指定された順位範囲でスコアを並べて表示する / Display the scores in a given range.
157 * @param note 黄色表示でハイライトする順位
158 * @param score スコア配列参照ポインタ
162 * Assumes the high score list is already open.
163 * Only five entries per line, too much info.
165 * Mega-Hack -- allow "fake" entry at the given position.
168 void display_scores_aux(int from, int to, int note, high_score *score)
170 int i, j, k, n, place;
173 high_score the_score;
175 GAME_TEXT out_val[256];
176 GAME_TEXT tmp_val[160];
178 TERM_LEN wid, hgt, per_screen;
180 Term_get_size(&wid, &hgt);
181 per_screen = (hgt - 4) / 4;
183 /* Paranoia -- it may not have opened */
184 if (highscore_fd < 0) return;
187 /* Assume we will show the first 10 */
188 if (from < 0) from = 0;
190 if (to > MAX_HISCORES) to = MAX_HISCORES;
193 /* Seek to the beginning */
194 if (highscore_seek(0)) return;
196 /* Hack -- Count the high scores */
197 for (i = 0; i < MAX_HISCORES; i++)
199 if (highscore_read(&the_score)) break;
202 /* Hack -- allow "fake" entry to be last */
203 if ((note == i) && score) i++;
205 /* Forget about the last entries */
209 /* Show per_screen per page, until "done" */
210 for (k = from, place = k+1; k < i; k += per_screen)
215 put_str(_(" 変愚蛮怒: 勇者の殿堂", " Hengband Hall of Fame"), 0, 0);
217 /* Indicate non-top scores */
220 sprintf(tmp_val, _("( %d 位以下 )", "(from position %d)"), k + 1);
221 put_str(tmp_val, 0, 40);
224 /* Dump per_screen entries */
225 for (j = k, n = 0; j < i && n < per_screen; place++, j++, n++)
227 int pr, pc, pa, clev, mlev, cdun, mdun;
229 concptr user, gold, when, aged;
232 /* Hack -- indicate death in yellow */
233 attr = (j == note) ? TERM_YELLOW : TERM_WHITE;
236 /* Mega-Hack -- insert a "fake" record */
237 if ((note == j) && score)
239 the_score = (*score);
246 /* Read a normal record */
249 /* Read the proper record */
250 if (highscore_seek(j)) break;
251 if (highscore_read(&the_score)) break;
254 /* Extract the race/class */
255 pr = atoi(the_score.p_r);
256 pc = atoi(the_score.p_c);
257 pa = atoi(the_score.p_a);
259 /* Extract the level info */
260 clev = atoi(the_score.cur_lev);
261 mlev = atoi(the_score.max_lev);
262 cdun = atoi(the_score.cur_dun);
263 mdun = atoi(the_score.max_dun);
265 /* Hack -- extract the gold and such */
266 for (user = the_score.uid; iswspace(*user); user++) /* loop */;
267 for (when = the_score.day; iswspace(*when); when++) /* loop */;
268 for (gold = the_score.gold; iswspace(*gold); gold++) /* loop */;
269 for (aged = the_score.turns; iswspace(*aged); aged++) /* loop */;
271 /* Clean up standard encoded form of "when" */
272 if ((*when == '@') && strlen(when) == 9)
274 sprintf(tmp_val, "%.4s-%.2s-%.2s",
275 when + 1, when + 5, when + 7);
281 /*sprintf(out_val, "%3d.%9s %s%s%sという名の%sの%s (レベル %d)", */
282 sprintf(out_val, "%3d.%9s %s%s%s - %s%s (レベル %d)",
283 place, the_score.pts,
284 seikaku_info[pa].title, (seikaku_info[pa].no ? "の" : ""),
286 race_info[pr].title, class_info[pc].title,
290 sprintf(out_val, "%3d.%9s %s %s the %s %s, Level %d",
291 place, the_score.pts,
292 seikaku_info[pa].title,
293 the_score.who, race_info[pr].title, class_info[pc].title,
298 /* Append a "maximum level" */
299 if (mlev > clev) strcat(out_val, format(_(" (最高%d)", " (Max %d)"), mlev));
301 /* Dump the first line */
302 c_put_str(attr, out_val, n*4 + 2, 0);
304 /* Another line of info */
307 sprintf(out_val, " 最高%3d階", mdun);
309 sprintf(out_val, " ");
312 /* 死亡原因をオリジナルより細かく表示 */
313 if (streq(the_score.how, "yet"))
315 sprintf(out_val+13, " まだ生きている (%d%s)",
319 if (streq(the_score.how, "ripe"))
321 sprintf(out_val+13, " 勝利の後に引退 (%d%s)",
324 else if (streq(the_score.how, "Seppuku"))
326 sprintf(out_val+13, " 勝利の後に切腹 (%d%s)",
331 codeconv(the_score.how);
333 /* Some people die outside of the dungeon */
335 sprintf(out_val+13, " 地上で%sに殺された", the_score.how);
337 sprintf(out_val+13, " %d階で%sに殺された",
338 cdun, the_score.how);
342 /* Some people die outside of the dungeon */
345 " Killed by %s on the surface",
349 " Killed by %s on %s %d",
350 the_score.how, "Dungeon Level", cdun);
352 /* Append a "maximum level" */
353 if (mdun > cdun) strcat(out_val, format(" (Max %d)", mdun));
357 c_put_str(attr, out_val, n*4 + 3, 0);
359 /* And still another line of info */
364 /* 日付を 19yy/mm/dd の形式に変更する */
365 if (strlen(when) == 8 && when[2] == '/' && when[5] == '/') {
366 sprintf(buf, "%d%s/%.5s", 19 + (when[6] < '8'), when + 6, when);
370 " (ユーザー:%s, 日付:%s, 所持金:%s, ターン:%s)",
371 user, when, gold, aged);
376 " (User %s, Date %s, Gold %s, Turn %s).",
377 user, when, gold, aged);
380 c_put_str(attr, out_val, n*4 + 4, 0);
384 /* Wait for response */
385 prt(_("[ ESCで中断, その他のキーで続けます ]", "[Press ESC to quit, any other key to continue.]"), hgt - 1, _(21, 17));
390 /* Hack -- notice Escape */
391 if (j == ESCAPE) break;
397 * @brief スコア表示処理メインルーチン / Hack -- Display the scores in a given range and quit.
403 * This function is only called from "main.c" when the user asks
404 * to see the "high scores".
407 void display_scores(int from, int to)
410 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
412 /* Open the binary high score file, for reading */
413 highscore_fd = fd_open(buf, O_RDONLY);
415 /* Paranoia -- No score file */
416 if (highscore_fd < 0) quit(_("スコア・ファイルが使用できません。", "Score file unavailable."));
419 /* Display the scores */
420 display_scores_aux(from, to, -1, NULL);
422 /* Shut the high score file */
423 (void)fd_close(highscore_fd);
425 /* Forget the high score fd */
434 * @brief スコアサーバへの転送処理
435 * @param current_player_ptr プレーヤーへの参照ポインタ
436 * @param do_send 実際に転送ア処置を行うか否か
437 * @return 転送が成功したらTRUEを返す
439 bool send_world_score(player_type *current_player_ptr, bool do_send)
442 if(send_score && do_send)
446 msg_print(_("初心者モードではワールドスコアに登録できません。",
447 "Since you are in the Easy Mode, you cannot send score to world score server."));
449 else if(get_check_strict(_("スコアをスコア・サーバに登録しますか? ", "Do you send score to the world score server? "),
450 (CHECK_NO_ESCAPE | CHECK_NO_HISTORY)))
454 prt(_("送信中..", "Sending..."),0,0);
457 err = report_score(current_player_ptr);
463 prt(_("完了。何かキーを押してください。", "Completed. Hit any key."), 0, 0);
473 * @brief スコアの過去二十位内ランキングを表示する
474 * Enters a players name on a hi-score table, if "legal", and in any
475 * case, displays some relevant portion of the high score list.
476 * @param current_player_ptr スコアに適用するための現在プレイヤークリーチャー参照ポインタ
479 * Assumes "signals_ignore_tstp()" has been called.
481 errr top_twenty(player_type *current_player_ptr)
485 high_score the_score;
487 time_t ct = time((time_t*)0);
491 /* Clear the record */
492 (void)WIPE(&the_score, high_score);
494 /* Save the version */
495 sprintf(the_score.what, "%u.%u.%u",
496 FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
498 /* Calculate and save the points */
499 sprintf(the_score.pts, "%9ld", (long)calc_score(current_player_ptr));
500 the_score.pts[9] = '\0';
502 /* Save the current gold */
503 sprintf(the_score.gold, "%9lu", (long)current_player_ptr->au);
504 the_score.gold[9] = '\0';
506 /* Save the current turn */
507 sprintf(the_score.turns, "%9lu", (long)turn_real(current_world_ptr->game_turn));
508 the_score.turns[9] = '\0';
510 #ifdef HIGHSCORE_DATE_HACK
511 /* Save the date in a hacked up form (9 chars) */
512 (void)sprintf(the_score.day, "%-.6s %-.2s", ctime(&ct) + 4, ctime(&ct) + 22);
514 /* Save the date in standard form (8 chars) */
515 /* (void)strftime(the_score.day, 9, "%m/%d/%y", localtime(&ct)); */
516 /* Save the date in standard encoded form (9 chars) */
517 strftime(the_score.day, 10, "@%Y%m%d", localtime(&ct));
520 /* Save the player name (15 chars) */
521 sprintf(the_score.who, "%-.15s", current_player_ptr->name);
523 /* Save the player info */
524 sprintf(the_score.uid, "%7u", current_player_ptr->player_uid);
525 sprintf(the_score.sex, "%c", (current_player_ptr->psex ? 'm' : 'f'));
526 sprintf(the_score.p_r, "%2d", MIN(current_player_ptr->prace, MAX_RACES));
527 sprintf(the_score.p_c, "%2d", MIN(current_player_ptr->pclass, MAX_CLASS));
528 sprintf(the_score.p_a, "%2d", MIN(current_player_ptr->pseikaku, MAX_SEIKAKU));
530 /* Save the level and such */
531 sprintf(the_score.cur_lev, "%3d", MIN((u16b)current_player_ptr->lev, 999));
532 sprintf(the_score.cur_dun, "%3d", (int)current_player_ptr->current_floor_ptr->dun_level);
533 sprintf(the_score.max_lev, "%3d", MIN((u16b)current_player_ptr->max_plv, 999));
534 sprintf(the_score.max_dun, "%3d", (int)max_dlv[current_player_ptr->dungeon_idx]);
536 /* Save the cause of death (31 chars) */
537 if (strlen(current_player_ptr->died_from) >= sizeof(the_score.how))
540 my_strcpy(the_score.how, current_player_ptr->died_from, sizeof(the_score.how) - 2);
541 strcat(the_score.how, "…");
543 my_strcpy(the_score.how, current_player_ptr->died_from, sizeof(the_score.how) - 3);
544 strcat(the_score.how, "...");
549 strcpy(the_score.how, current_player_ptr->died_from);
552 /* Grab permissions */
555 /* Lock (for writing) the highscore file, or fail */
556 err = fd_lock(highscore_fd, F_WRLCK);
558 /* Drop permissions */
563 /* Add a new entry to the score list, see where it went */
564 j = highscore_add(&the_score);
566 /* Grab permissions */
569 /* Unlock the highscore file, or fail */
570 err = fd_lock(highscore_fd, F_UNLCK);
572 /* Drop permissions */
578 /* Hack -- Display the top fifteen scores */
581 display_scores_aux(0, 15, j, NULL);
584 /* Display the scores surrounding the player */
587 display_scores_aux(0, 5, j, NULL);
588 display_scores_aux(j - 2, j + 7, j, NULL);
597 * @brief プレイヤーの現在のスコアをランキングに挟む /
598 * Predict the players location, and display it.
601 errr predict_score(player_type *current_player_ptr)
604 high_score the_score;
607 if (highscore_fd < 0)
609 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
614 /* Save the version */
615 sprintf(the_score.what, "%u.%u.%u",
616 FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
618 /* Calculate and save the points */
619 sprintf(the_score.pts, "%9ld", (long)calc_score(current_player_ptr));
621 /* Save the current gold */
622 sprintf(the_score.gold, "%9lu", (long)current_player_ptr->au);
624 /* Save the current turn */
625 sprintf(the_score.turns, "%9lu", (long)turn_real(current_world_ptr->game_turn));
627 /* Hack -- no time needed */
628 strcpy(the_score.day, _("今日", "TODAY"));
630 /* Save the player name (15 chars) */
631 sprintf(the_score.who, "%-.15s", current_player_ptr->name);
633 /* Save the player info */
634 sprintf(the_score.uid, "%7u", current_player_ptr->player_uid);
635 sprintf(the_score.sex, "%c", (current_player_ptr->psex ? 'm' : 'f'));
636 sprintf(the_score.p_r, "%2d", MIN(current_player_ptr->prace, MAX_RACES));
637 sprintf(the_score.p_c, "%2d", MIN(current_player_ptr->pclass, MAX_CLASS));
638 sprintf(the_score.p_a, "%2d", MIN(current_player_ptr->pseikaku, MAX_SEIKAKU));
640 /* Save the level and such */
641 sprintf(the_score.cur_lev, "%3d", MIN((u16b)current_player_ptr->lev, 999));
642 sprintf(the_score.cur_dun, "%3d", (int)current_player_ptr->current_floor_ptr->dun_level);
643 sprintf(the_score.max_lev, "%3d", MIN((u16b)current_player_ptr->max_plv, 999));
644 sprintf(the_score.max_dun, "%3d", (int)max_dlv[current_player_ptr->dungeon_idx]);
646 /* Hack -- no cause of death */
647 /* まだ死んでいないときの識別文字 */
648 strcpy(the_score.how, _("yet", "nobody (yet!)"));
650 /* See where the entry would be placed */
651 j = highscore_where(&the_score);
654 /* Hack -- Display the top fifteen scores */
657 display_scores_aux(0, 15, j, &the_score);
660 /* Display some "useful" scores */
663 display_scores_aux(0, 5, -1, NULL);
664 display_scores_aux(j - 2, j + 7, j, &the_score);
674 * @brief スコアランキングの簡易表示 /
675 * show_highclass - selectively list highscores based on class -KMW-
678 void show_highclass(player_type *current_player_ptr)
681 register int i = 0, j, m = 0;
683 PLAYER_LEVEL clev/*, al*/;
684 high_score the_score;
685 char buf[1024], out_val[256];
688 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
690 highscore_fd = fd_open(buf, O_RDONLY);
692 if (highscore_fd < 0)
694 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
699 if (highscore_seek(0)) return;
701 for (i = 0; i < MAX_HISCORES; i++)
702 if (highscore_read(&the_score)) break;
708 while ((m < 9) && (j < MAX_HISCORES))
710 if (highscore_seek(j)) break;
711 if (highscore_read(&the_score)) break;
712 pr = atoi(the_score.p_r);
713 clev = (PLAYER_LEVEL)atoi(the_score.cur_lev);
716 sprintf(out_val, " %3d) %sの%s (レベル %2d)",
717 (m + 1), race_info[pr].title,the_score.who, clev);
719 sprintf(out_val, "%3d) %s the %s (Level %2d)",
720 (m + 1), the_score.who, race_info[pr].title, clev);
723 prt(out_val, (m + 7), 0);
729 sprintf(out_val, "あなた) %sの%s (レベル %2d)",
730 race_info[current_player_ptr->prace].title,current_player_ptr->name, current_player_ptr->lev);
732 sprintf(out_val, "You) %s the %s (Level %2d)",
733 current_player_ptr->name, race_info[current_player_ptr->prace].title, current_player_ptr->lev);
736 prt(out_val, (m + 8), 0);
738 (void)fd_close(highscore_fd);
740 prt(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"),0,0);
744 for (j = 5; j < 18; j++) prt("", j, 0);
749 * @brief スコアランキングの簡易表示(種族毎)サブルーチン /
751 * @param race_num 種族ID
754 void race_score(player_type *current_player_ptr, int race_num)
756 register int i = 0, j, m = 0;
757 int pr, clev, lastlev;
758 high_score the_score;
759 char buf[1024], out_val[256], tmp_str[80];
763 /* rr9: TODO - pluralize the race */
764 sprintf(tmp_str,_("最高の%s", "The Greatest of all the %s"), race_info[race_num].title);
767 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
769 highscore_fd = fd_open(buf, O_RDONLY);
771 if (highscore_fd < 0)
773 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
778 if (highscore_seek(0)) return;
780 for (i = 0; i < MAX_HISCORES; i++)
782 if (highscore_read(&the_score)) break;
788 while ((m < 10) || (j < MAX_HISCORES))
790 if (highscore_seek(j)) break;
791 if (highscore_read(&the_score)) break;
792 pr = atoi(the_score.p_r);
793 clev = atoi(the_score.cur_lev);
798 sprintf(out_val, " %3d) %sの%s (レベル %2d)",
799 (m + 1), race_info[pr].title,
802 sprintf(out_val, "%3d) %s the %s (Level %3d)",
803 (m + 1), the_score.who,
804 race_info[pr].title, clev);
807 prt(out_val, (m + 7), 0);
814 /* add player if qualified */
815 if ((current_player_ptr->prace == race_num) && (current_player_ptr->lev >= lastlev))
818 sprintf(out_val, "あなた) %sの%s (レベル %2d)",
819 race_info[current_player_ptr->prace].title,current_player_ptr->name, current_player_ptr->lev);
821 sprintf(out_val, "You) %s the %s (Level %3d)",
822 current_player_ptr->name, race_info[current_player_ptr->prace].title, current_player_ptr->lev);
825 prt(out_val, (m + 8), 0);
828 (void)fd_close(highscore_fd);
834 * @brief スコアランキングの簡易表示(種族毎)メインルーチン /
838 void race_legends(player_type *current_player_ptr)
842 for (i = 0; i < MAX_RACES; i++)
844 race_score(current_player_ptr, i);
845 msg_print(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"));
847 for (j = 5; j < 19; j++)
853 * @brief 勝利者用の引退演出処理 /
854 * Change the player into a King! -RAK-
857 void kingly(player_type *winner_ptr)
861 bool seppuku = streq(winner_ptr->died_from, "Seppuku");
863 /* Hack -- retire in town */
864 winner_ptr->current_floor_ptr->dun_level = 0;
869 (void)strcpy(winner_ptr->died_from, _("ripe", "Ripe Old Age"));
871 /* Restore the experience */
872 winner_ptr->exp = winner_ptr->max_exp;
874 /* Restore the level */
875 winner_ptr->lev = winner_ptr->max_plv;
877 Term_get_size(&wid, &hgt);
881 /* Hack -- Instant Gold */
882 winner_ptr->au += 10000000L;
885 /* Display a crown */
886 put_str("#", cy - 11, cx - 1);
887 put_str("#####", cy - 10, cx - 3);
888 put_str("#", cy - 9, cx - 1);
889 put_str(",,, $$$ ,,,", cy - 8, cx - 7);
890 put_str(",,=$ \"$$$$$\" $=,,", cy - 7, cx - 11);
891 put_str(",$$ $$$ $$,", cy - 6, cx - 13);
892 put_str("*> <*> <*", cy - 5, cx - 13);
893 put_str("$$ $$$ $$", cy - 4, cx - 13);
894 put_str("\"$$ $$$ $$\"", cy - 3, cx - 13);
895 put_str("\"$$ $$$ $$\"", cy - 2, cx - 12);
896 put_str("*#########*#########*", cy - 1, cx - 11);
897 put_str("*#########*#########*", cy, cx - 11);
899 /* Display a message */
901 put_str("Veni, Vidi, Vici!", cy + 3, cx - 9);
902 put_str("来た、見た、勝った!", cy + 4, cx - 10);
903 put_str(format("偉大なる%s万歳!", sp_ptr->winner), cy + 5, cx - 11);
905 put_str("Veni, Vidi, Vici!", cy + 3, cx - 9);
906 put_str("I came, I saw, I conquered!", cy + 4, cx - 14);
907 put_str(format("All Hail the Mighty %s!", sp_ptr->winner), cy + 5, cx - 13);
910 /* If player did Seppuku, that is already written in playrecord */
913 exe_write_diary(winner_ptr, NIKKI_BUNSHOU, 0, _("ダンジョンの探索から引退した。", "retired exploring dungeons."));
914 exe_write_diary(winner_ptr, NIKKI_GAMESTART, 1, _("-------- ゲームオーバー --------", "-------- Game Over --------"));
915 exe_write_diary(winner_ptr, NIKKI_BUNSHOU, 1, "\n\n\n\n");
921 /* Wait for response */
927 * Display some character info
930 bool check_score(void)
935 if (highscore_fd < 0)
937 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
942 #ifndef SCORE_WIZARDS
943 /* Wizard-mode pre-empts scoring */
944 if (current_world_ptr->noscore & 0x000F)
946 msg_print(_("ウィザード・モードではスコアが記録されません。", "Score not registered for wizards."));
953 /* Borg-mode pre-empts scoring */
954 if (current_world_ptr->noscore & 0x00F0)
956 msg_print(_("ボーグ・モードではスコアが記録されません。", "Score not registered for borgs."));
962 #ifndef SCORE_CHEATERS
963 /* Cheaters are not scored */
964 if (current_world_ptr->noscore & 0xFF00)
966 msg_print(_("詐欺をやった人はスコアが記録されません。", "Score not registered for cheaters."));
973 if (!current_world_ptr->total_winner && streq(p_ptr->died_from, _("強制終了", "Interrupting")))
975 msg_print(_("強制終了のためスコアが記録されません。", "Score not registered due to interruption."));
981 if (!current_world_ptr->total_winner && streq(p_ptr->died_from, _("途中終了", "Quitting")))
983 msg_print(_("途中終了のためスコアが記録されません。", "Score not registered due to quitting."));