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)));
74 * @brief スコア情報を全て得るまで繰り返し取得する / Just determine where a new score *would* be placed
75 * @param score スコア情報参照ポインタ
76 * @return 正常ならば(MAX_HISCORES - 1)、問題があれば-1を返す
78 static int highscore_where(high_score *score)
80 /* Paranoia -- it may not have opened */
81 if (highscore_fd < 0) return -1;
83 /* Go to the start of the highscore file */
84 if (highscore_seek(0)) return -1;
86 /* Read until we get to a higher score */
88 int my_score = atoi(score->pts);
89 for (int i = 0; i < MAX_HISCORES; i++)
92 if (highscore_read(&the_score)) return (i);
93 old_score = atoi(the_score.pts);
94 if (my_score > old_score) return (i);
97 /* The "last" entry is always usable */
98 return MAX_HISCORES - 1;
103 * @brief スコア情報をバッファの末尾に追加する / Actually place an entry into the high score file
104 * @param score スコア情報参照ポインタ
105 * @return 正常ならば書き込んだスロット位置、問題があれば-1を返す / Return the location (0 is best) or -1 on "failure"
107 static int highscore_add(high_score *score)
109 /* Paranoia -- it may not have opened */
110 if (highscore_fd < 0) return -1;
112 /* Determine where the score should go */
113 int slot = highscore_where(score);
115 /* Hack -- Not on the list */
116 if (slot < 0) return -1;
118 /* Hack -- prepare to dump the new score */
119 high_score the_score = (*score);
121 /* Slide all the scores down one */
124 for (int i = slot; !done && (i < MAX_HISCORES); i++)
126 /* Read the old guy, note errors */
127 if (highscore_seek(i)) return -1;
128 if (highscore_read(&tmpscore)) done = TRUE;
130 /* Back up and dump the score we were holding */
131 if (highscore_seek(i)) return -1;
132 if (highscore_write(&the_score)) return -1;
134 /* Hack -- Save the old score, for the next pass */
135 the_score = tmpscore;
138 /* Return location used */
144 * @brief 指定された順位範囲でスコアを並べて表示する / Display the scores in a given range.
147 * @param note 黄色表示でハイライトする順位
148 * @param score スコア配列参照ポインタ
152 * Assumes the high score list is already open.
153 * Only five entries per line, too much info.
155 * Mega-Hack -- allow "fake" entry at the given position.
158 void display_scores_aux(int from, int to, int note, high_score *score)
160 int i, j, k, n, place;
163 high_score the_score;
165 GAME_TEXT out_val[256];
166 GAME_TEXT tmp_val[160];
168 TERM_LEN wid, hgt, per_screen;
170 Term_get_size(&wid, &hgt);
171 per_screen = (hgt - 4) / 4;
173 /* Paranoia -- it may not have opened */
174 if (highscore_fd < 0) return;
177 /* Assume we will show the first 10 */
178 if (from < 0) from = 0;
180 if (to > MAX_HISCORES) to = MAX_HISCORES;
183 /* Seek to the beginning */
184 if (highscore_seek(0)) return;
186 /* Hack -- Count the high scores */
187 for (i = 0; i < MAX_HISCORES; i++)
189 if (highscore_read(&the_score)) break;
192 /* Hack -- allow "fake" entry to be last */
193 if ((note == i) && score) i++;
195 /* Forget about the last entries */
199 /* Show per_screen per page, until "done" */
200 for (k = from, place = k+1; k < i; k += per_screen)
205 put_str(_(" 変愚蛮怒: 勇者の殿堂", " Hengband Hall of Fame"), 0, 0);
207 /* Indicate non-top scores */
210 sprintf(tmp_val, _("( %d 位以下 )", "(from position %d)"), k + 1);
211 put_str(tmp_val, 0, 40);
214 /* Dump per_screen entries */
215 for (j = k, n = 0; j < i && n < per_screen; place++, j++, n++)
217 int pr, pc, pa, clev, mlev, cdun, mdun;
219 concptr user, gold, when, aged;
222 /* Hack -- indicate death in yellow */
223 attr = (j == note) ? TERM_YELLOW : TERM_WHITE;
226 /* Mega-Hack -- insert a "fake" record */
227 if ((note == j) && score)
229 the_score = (*score);
236 /* Read a normal record */
239 /* Read the proper record */
240 if (highscore_seek(j)) break;
241 if (highscore_read(&the_score)) break;
244 /* Extract the race/class */
245 pr = atoi(the_score.p_r);
246 pc = atoi(the_score.p_c);
247 pa = atoi(the_score.p_a);
249 /* Extract the level info */
250 clev = atoi(the_score.cur_lev);
251 mlev = atoi(the_score.max_lev);
252 cdun = atoi(the_score.cur_dun);
253 mdun = atoi(the_score.max_dun);
255 /* Hack -- extract the gold and such */
256 for (user = the_score.uid; iswspace(*user); user++) /* loop */;
257 for (when = the_score.day; iswspace(*when); when++) /* loop */;
258 for (gold = the_score.gold; iswspace(*gold); gold++) /* loop */;
259 for (aged = the_score.turns; iswspace(*aged); aged++) /* loop */;
261 /* Clean up standard encoded form of "when" */
262 if ((*when == '@') && strlen(when) == 9)
264 sprintf(tmp_val, "%.4s-%.2s-%.2s",
265 when + 1, when + 5, when + 7);
271 /*sprintf(out_val, "%3d.%9s %s%s%sという名の%sの%s (レベル %d)", */
272 sprintf(out_val, "%3d.%9s %s%s%s - %s%s (レベル %d)",
273 place, the_score.pts,
274 seikaku_info[pa].title, (seikaku_info[pa].no ? "の" : ""),
276 race_info[pr].title, class_info[pc].title,
280 sprintf(out_val, "%3d.%9s %s %s the %s %s, Level %d",
281 place, the_score.pts,
282 seikaku_info[pa].title,
283 the_score.who, race_info[pr].title, class_info[pc].title,
288 /* Append a "maximum level" */
289 if (mlev > clev) strcat(out_val, format(_(" (最高%d)", " (Max %d)"), mlev));
291 /* Dump the first line */
292 c_put_str(attr, out_val, n*4 + 2, 0);
294 /* Another line of info */
297 sprintf(out_val, " 最高%3d階", mdun);
299 sprintf(out_val, " ");
302 /* 死亡原因をオリジナルより細かく表示 */
303 if (streq(the_score.how, "yet"))
305 sprintf(out_val+13, " まだ生きている (%d%s)",
309 if (streq(the_score.how, "ripe"))
311 sprintf(out_val+13, " 勝利の後に引退 (%d%s)",
314 else if (streq(the_score.how, "Seppuku"))
316 sprintf(out_val+13, " 勝利の後に切腹 (%d%s)",
321 codeconv(the_score.how);
323 /* Some people die outside of the dungeon */
325 sprintf(out_val+13, " 地上で%sに殺された", the_score.how);
327 sprintf(out_val+13, " %d階で%sに殺された",
328 cdun, the_score.how);
332 /* Some people die outside of the dungeon */
335 " Killed by %s on the surface",
339 " Killed by %s on %s %d",
340 the_score.how, "Dungeon Level", cdun);
342 /* Append a "maximum level" */
343 if (mdun > cdun) strcat(out_val, format(" (Max %d)", mdun));
347 c_put_str(attr, out_val, n*4 + 3, 0);
349 /* And still another line of info */
354 /* 日付を 19yy/mm/dd の形式に変更する */
355 if (strlen(when) == 8 && when[2] == '/' && when[5] == '/') {
356 sprintf(buf, "%d%s/%.5s", 19 + (when[6] < '8'), when + 6, when);
360 " (ユーザー:%s, 日付:%s, 所持金:%s, ターン:%s)",
361 user, when, gold, aged);
366 " (User %s, Date %s, Gold %s, Turn %s).",
367 user, when, gold, aged);
370 c_put_str(attr, out_val, n*4 + 4, 0);
374 /* Wait for response */
375 prt(_("[ ESCで中断, その他のキーで続けます ]", "[Press ESC to quit, any other key to continue.]"), hgt - 1, _(21, 17));
380 /* Hack -- notice Escape */
381 if (j == ESCAPE) break;
387 * @brief スコア表示処理メインルーチン / Hack -- Display the scores in a given range and quit.
393 * This function is only called from "main.c" when the user asks
394 * to see the "high scores".
397 void display_scores(int from, int to)
400 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
402 /* Open the binary high score file, for reading */
403 highscore_fd = fd_open(buf, O_RDONLY);
405 /* Paranoia -- No score file */
406 if (highscore_fd < 0) quit(_("スコア・ファイルが使用できません。", "Score file unavailable."));
409 /* Display the scores */
410 display_scores_aux(from, to, -1, NULL);
412 /* Shut the high score file */
413 (void)fd_close(highscore_fd);
415 /* Forget the high score fd */
424 * todo プリプロが邪魔していて最初のif文を削除すると到達不能コードが発生する
425 * @brief スコアサーバへの転送処理
426 * @param current_player_ptr プレーヤーへの参照ポインタ
427 * @param do_send 実際に転送ア処置を行うか否か
428 * @return 転送が成功したらTRUEを返す
430 bool send_world_score(player_type *current_player_ptr, bool do_send)
433 if (send_score && do_send)
437 msg_print(_("初心者モードではワールドスコアに登録できません。",
438 "Since you are in the Easy Mode, you cannot send score to world score server."));
442 bool is_registration = get_check_strict(_("スコアをスコア・サーバに登録しますか? ", "Do you send score to the world score server? "), (CHECK_NO_ESCAPE | CHECK_NO_HISTORY));
443 if (!is_registration) return FALSE;
447 prt(_("送信中..", "Sending..."), 0, 0);
450 err = report_score(current_player_ptr);
452 if (err) return FALSE;
454 prt(_("完了。何かキーを押してください。", "Completed. Hit any key."), 0, 0);
463 * @brief スコアの過去二十位内ランキングを表示する
464 * Enters a players name on a hi-score table, if "legal", and in any
465 * case, displays some relevant portion of the high score list.
466 * @param current_player_ptr スコアに適用するための現在プレイヤークリーチャー参照ポインタ
469 * Assumes "signals_ignore_tstp()" has been called.
471 errr top_twenty(player_type *current_player_ptr)
473 high_score the_score;
474 (void)WIPE(&the_score, high_score);
476 /* Save the version */
477 sprintf(the_score.what, "%u.%u.%u",
478 FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
480 /* Calculate and save the points */
481 sprintf(the_score.pts, "%9ld", (long)calc_score(current_player_ptr));
482 the_score.pts[9] = '\0';
484 /* Save the current gold */
485 sprintf(the_score.gold, "%9lu", (long)current_player_ptr->au);
486 the_score.gold[9] = '\0';
488 /* Save the current turn */
489 sprintf(the_score.turns, "%9lu", (long)turn_real(current_player_ptr, current_world_ptr->game_turn));
490 the_score.turns[9] = '\0';
492 time_t ct = time((time_t*)0);
493 #ifdef HIGHSCORE_DATE_HACK
494 /* Save the date in a hacked up form (9 chars) */
495 (void)sprintf(the_score.day, "%-.6s %-.2s", ctime(&ct) + 4, ctime(&ct) + 22);
497 /* Save the date in standard form (8 chars) */
498 /* (void)strftime(the_score.day, 9, "%m/%d/%y", localtime(&ct)); */
499 /* Save the date in standard encoded form (9 chars) */
500 strftime(the_score.day, 10, "@%Y%m%d", localtime(&ct));
503 /* Save the player name (15 chars) */
504 sprintf(the_score.who, "%-.15s", current_player_ptr->name);
506 /* Save the player info */
507 sprintf(the_score.uid, "%7u", current_player_ptr->player_uid);
508 sprintf(the_score.sex, "%c", (current_player_ptr->psex ? 'm' : 'f'));
509 sprintf(the_score.p_r, "%2d", MIN(current_player_ptr->prace, MAX_RACES));
510 sprintf(the_score.p_c, "%2d", MIN(current_player_ptr->pclass, MAX_CLASS));
511 sprintf(the_score.p_a, "%2d", MIN(current_player_ptr->pseikaku, MAX_SEIKAKU));
513 /* Save the level and such */
514 sprintf(the_score.cur_lev, "%3d", MIN((u16b)current_player_ptr->lev, 999));
515 sprintf(the_score.cur_dun, "%3d", (int)current_player_ptr->current_floor_ptr->dun_level);
516 sprintf(the_score.max_lev, "%3d", MIN((u16b)current_player_ptr->max_plv, 999));
517 sprintf(the_score.max_dun, "%3d", (int)max_dlv[current_player_ptr->dungeon_idx]);
519 /* Save the cause of death (31 chars) */
520 if (strlen(current_player_ptr->died_from) >= sizeof(the_score.how))
523 my_strcpy(the_score.how, current_player_ptr->died_from, sizeof(the_score.how) - 2);
524 strcat(the_score.how, "…");
526 my_strcpy(the_score.how, current_player_ptr->died_from, sizeof(the_score.how) - 3);
527 strcat(the_score.how, "...");
532 strcpy(the_score.how, current_player_ptr->died_from);
535 /* Grab permissions */
538 /* Lock (for writing) the highscore file, or fail */
539 errr err = fd_lock(highscore_fd, F_WRLCK);
541 /* Drop permissions */
546 /* Add a new entry to the score list, see where it went */
547 int j = highscore_add(&the_score);
549 /* Grab permissions */
552 /* Unlock the highscore file, or fail */
553 err = fd_lock(highscore_fd, F_UNLCK);
555 /* Drop permissions */
560 /* Hack -- Display the top fifteen scores */
563 display_scores_aux(0, 15, j, NULL);
567 /* Display the scores surrounding the player */
568 display_scores_aux(0, 5, j, NULL);
569 display_scores_aux(j - 2, j + 7, j, NULL);
575 * @brief プレイヤーの現在のスコアをランキングに挟む /
576 * Predict the players location, and display it.
579 errr predict_score(player_type *current_player_ptr)
581 high_score the_score;
584 if (highscore_fd < 0)
586 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
591 /* Save the version */
592 sprintf(the_score.what, "%u.%u.%u",
593 FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
595 /* Calculate and save the points */
596 sprintf(the_score.pts, "%9ld", (long)calc_score(current_player_ptr));
598 /* Save the current gold */
599 sprintf(the_score.gold, "%9lu", (long)current_player_ptr->au);
601 /* Save the current turn */
602 sprintf(the_score.turns, "%9lu", (long)turn_real(current_player_ptr, current_world_ptr->game_turn));
604 /* Hack -- no time needed */
605 strcpy(the_score.day, _("今日", "TODAY"));
607 /* Save the player name (15 chars) */
608 sprintf(the_score.who, "%-.15s", current_player_ptr->name);
610 /* Save the player info */
611 sprintf(the_score.uid, "%7u", current_player_ptr->player_uid);
612 sprintf(the_score.sex, "%c", (current_player_ptr->psex ? 'm' : 'f'));
613 sprintf(the_score.p_r, "%2d", MIN(current_player_ptr->prace, MAX_RACES));
614 sprintf(the_score.p_c, "%2d", MIN(current_player_ptr->pclass, MAX_CLASS));
615 sprintf(the_score.p_a, "%2d", MIN(current_player_ptr->pseikaku, MAX_SEIKAKU));
617 /* Save the level and such */
618 sprintf(the_score.cur_lev, "%3d", MIN((u16b)current_player_ptr->lev, 999));
619 sprintf(the_score.cur_dun, "%3d", (int)current_player_ptr->current_floor_ptr->dun_level);
620 sprintf(the_score.max_lev, "%3d", MIN((u16b)current_player_ptr->max_plv, 999));
621 sprintf(the_score.max_dun, "%3d", (int)max_dlv[current_player_ptr->dungeon_idx]);
623 /* Hack -- no cause of death */
624 /* まだ死んでいないときの識別文字 */
625 strcpy(the_score.how, _("yet", "nobody (yet!)"));
627 /* See where the entry would be placed */
628 int j = highscore_where(&the_score);
630 /* Hack -- Display the top fifteen scores */
633 display_scores_aux(0, 15, j, &the_score);
637 display_scores_aux(0, 5, -1, NULL);
638 display_scores_aux(j - 2, j + 7, j, &the_score);
644 * @brief スコアランキングの簡易表示 /
645 * show_highclass - selectively list highscores based on class -KMW-
648 void show_highclass(player_type *current_player_ptr)
651 char buf[1024], out_val[256];
652 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
654 highscore_fd = fd_open(buf, O_RDONLY);
656 if (highscore_fd < 0)
658 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
663 if (highscore_seek(0)) return;
665 high_score the_score;
666 for (int i = 0; i < MAX_HISCORES; i++)
667 if (highscore_read(&the_score)) break;
671 PLAYER_LEVEL clev = 0;
673 while ((m < 9) && (j < MAX_HISCORES))
675 if (highscore_seek(j)) break;
676 if (highscore_read(&the_score)) break;
677 pr = atoi(the_score.p_r);
678 clev = (PLAYER_LEVEL)atoi(the_score.cur_lev);
681 sprintf(out_val, " %3d) %sの%s (レベル %2d)",
682 (m + 1), race_info[pr].title,the_score.who, clev);
684 sprintf(out_val, "%3d) %s the %s (Level %2d)",
685 (m + 1), the_score.who, race_info[pr].title, clev);
688 prt(out_val, (m + 7), 0);
694 sprintf(out_val, "あなた) %sの%s (レベル %2d)",
695 race_info[current_player_ptr->prace].title,current_player_ptr->name, current_player_ptr->lev);
697 sprintf(out_val, "You) %s the %s (Level %2d)",
698 current_player_ptr->name, race_info[current_player_ptr->prace].title, current_player_ptr->lev);
701 prt(out_val, (m + 8), 0);
703 (void)fd_close(highscore_fd);
705 prt(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"),0,0);
709 for (j = 5; j < 18; j++) prt("", j, 0);
715 * @brief スコアランキングの簡易表示(種族毎)サブルーチン /
717 * @param race_num 種族ID
720 void race_score(player_type *current_player_ptr, int race_num)
722 register int i = 0, j, m = 0;
723 int pr, clev, lastlev;
724 high_score the_score;
725 char buf[1024], out_val[256], tmp_str[80];
729 /* rr9: TODO - pluralize the race */
730 sprintf(tmp_str,_("最高の%s", "The Greatest of all the %s"), race_info[race_num].title);
733 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
735 highscore_fd = fd_open(buf, O_RDONLY);
737 if (highscore_fd < 0)
739 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
744 if (highscore_seek(0)) return;
746 for (i = 0; i < MAX_HISCORES; i++)
748 if (highscore_read(&the_score)) break;
754 while ((m < 10) || (j < MAX_HISCORES))
756 if (highscore_seek(j)) break;
757 if (highscore_read(&the_score)) break;
758 pr = atoi(the_score.p_r);
759 clev = atoi(the_score.cur_lev);
764 sprintf(out_val, " %3d) %sの%s (レベル %2d)",
765 (m + 1), race_info[pr].title,
768 sprintf(out_val, "%3d) %s the %s (Level %3d)",
769 (m + 1), the_score.who,
770 race_info[pr].title, clev);
773 prt(out_val, (m + 7), 0);
780 /* add player if qualified */
781 if ((current_player_ptr->prace == race_num) && (current_player_ptr->lev >= lastlev))
784 sprintf(out_val, "あなた) %sの%s (レベル %2d)",
785 race_info[current_player_ptr->prace].title,current_player_ptr->name, current_player_ptr->lev);
787 sprintf(out_val, "You) %s the %s (Level %3d)",
788 current_player_ptr->name, race_info[current_player_ptr->prace].title, current_player_ptr->lev);
791 prt(out_val, (m + 8), 0);
794 (void)fd_close(highscore_fd);
800 * @brief スコアランキングの簡易表示(種族毎)メインルーチン /
804 void race_legends(player_type *current_player_ptr)
806 for (int i = 0; i < MAX_RACES; i++)
808 race_score(current_player_ptr, i);
809 msg_print(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"));
811 for (int j = 5; j < 19; j++)
818 * @brief 勝利者用の引退演出処理 /
819 * Change the player into a King! -RAK-
822 void kingly(player_type *winner_ptr)
826 bool seppuku = streq(winner_ptr->died_from, "Seppuku");
828 /* Hack -- retire in town */
829 winner_ptr->current_floor_ptr->dun_level = 0;
834 (void)strcpy(winner_ptr->died_from, _("ripe", "Ripe Old Age"));
836 /* Restore the experience */
837 winner_ptr->exp = winner_ptr->max_exp;
839 /* Restore the level */
840 winner_ptr->lev = winner_ptr->max_plv;
842 Term_get_size(&wid, &hgt);
846 /* Hack -- Instant Gold */
847 winner_ptr->au += 10000000L;
850 /* Display a crown */
851 put_str("#", cy - 11, cx - 1);
852 put_str("#####", cy - 10, cx - 3);
853 put_str("#", cy - 9, cx - 1);
854 put_str(",,, $$$ ,,,", cy - 8, cx - 7);
855 put_str(",,=$ \"$$$$$\" $=,,", cy - 7, cx - 11);
856 put_str(",$$ $$$ $$,", cy - 6, cx - 13);
857 put_str("*> <*> <*", cy - 5, cx - 13);
858 put_str("$$ $$$ $$", cy - 4, cx - 13);
859 put_str("\"$$ $$$ $$\"", cy - 3, cx - 13);
860 put_str("\"$$ $$$ $$\"", cy - 2, cx - 12);
861 put_str("*#########*#########*", cy - 1, cx - 11);
862 put_str("*#########*#########*", cy, cx - 11);
864 /* Display a message */
866 put_str("Veni, Vidi, Vici!", cy + 3, cx - 9);
867 put_str("来た、見た、勝った!", cy + 4, cx - 10);
868 put_str(format("偉大なる%s万歳!", sp_ptr->winner), cy + 5, cx - 11);
870 put_str("Veni, Vidi, Vici!", cy + 3, cx - 9);
871 put_str("I came, I saw, I conquered!", cy + 4, cx - 14);
872 put_str(format("All Hail the Mighty %s!", sp_ptr->winner), cy + 5, cx - 13);
875 /* If player did Seppuku, that is already written in playrecord */
878 exe_write_diary(winner_ptr, DIARY_DESCRIPTION, 0, _("ダンジョンの探索から引退した。", "retired exploring dungeons."));
879 exe_write_diary(winner_ptr, DIARY_GAMESTART, 1, _("-------- ゲームオーバー --------", "-------- Game Over --------"));
880 exe_write_diary(winner_ptr, DIARY_DESCRIPTION, 1, "\n\n\n\n");
886 /* Wait for response */
893 * Display some character info
896 bool check_score(player_type *current_player_ptr)
901 if (highscore_fd < 0)
903 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
908 /* Wizard-mode pre-empts scoring */
909 if (current_world_ptr->noscore & 0x000F)
911 msg_print(_("ウィザード・モードではスコアが記録されません。", "Score not registered for wizards."));
916 /* Cheaters are not scored */
917 if (current_world_ptr->noscore & 0xFF00)
919 msg_print(_("詐欺をやった人はスコアが記録されません。", "Score not registered for cheaters."));
925 if (!current_world_ptr->total_winner && streq(current_player_ptr->died_from, _("強制終了", "Interrupting")))
927 msg_print(_("強制終了のためスコアが記録されません。", "Score not registered due to interruption."));
933 if (!current_world_ptr->total_winner && streq(current_player_ptr->died_from, _("途中終了", "Quitting")))
935 msg_print(_("途中終了のためスコアが記録されません。", "Score not registered due to quitting."));