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.
14 #include "io/signal-handlers.h"
20 #include "player/race-info-table.h"
21 #include "player-status.h"
22 #include "player-class.h"
23 #include "player-personality.h"
24 #include "player-sex.h"
25 #include "uid-checker.h"
30 #include "io/write-diary.h"
31 #include "cmd/cmd-dump.h"
36 * The "highscore" file descriptor, if available.
38 int highscore_fd = -1;
41 * @brief i番目のスコア情報にバッファ位置をシークする / Seek score 'i' in the highscore file
45 static int highscore_seek(int i)
47 /* Seek for the requested record */
48 return (fd_seek(highscore_fd, (huge)(i) * sizeof(high_score)));
53 * @brief 所定ポインタからスコア情報を読み取る / Read one score from the highscore file
54 * @param score スコア情報参照ポインタ
57 static errr highscore_read(high_score *score)
59 /* Read the record, note failure */
60 return (fd_read(highscore_fd, (char*)(score), sizeof(high_score)));
65 * @brief 所定ポインタへスコア情報を書き込む / Write one score to the highscore file
66 * @param score スコア情報参照ポインタ
67 * @return エラーコード(問題がなければ0を返す)
69 static int highscore_write(high_score *score)
71 /* Write the record, note failure */
72 return (fd_write(highscore_fd, (char*)(score), sizeof(high_score)));
77 * @brief スコア情報を全て得るまで繰り返し取得する / Just determine where a new score *would* be placed
78 * @param score スコア情報参照ポインタ
79 * @return 正常ならば(MAX_HISCORES - 1)、問題があれば-1を返す
81 static int highscore_where(high_score *score)
83 /* Paranoia -- it may not have opened */
84 if (highscore_fd < 0) return -1;
86 /* Go to the start of the highscore file */
87 if (highscore_seek(0)) return -1;
89 /* Read until we get to a higher score */
91 int my_score = atoi(score->pts);
92 for (int i = 0; i < MAX_HISCORES; i++)
95 if (highscore_read(&the_score)) return (i);
96 old_score = atoi(the_score.pts);
97 if (my_score > old_score) return (i);
100 /* The "last" entry is always usable */
101 return MAX_HISCORES - 1;
106 * @brief スコア情報をバッファの末尾に追加する / Actually place an entry into the high score file
107 * @param score スコア情報参照ポインタ
108 * @return 正常ならば書き込んだスロット位置、問題があれば-1を返す / Return the location (0 is best) or -1 on "failure"
110 static int highscore_add(high_score *score)
112 /* Paranoia -- it may not have opened */
113 if (highscore_fd < 0) return -1;
115 /* Determine where the score should go */
116 int slot = highscore_where(score);
118 /* Hack -- Not on the list */
119 if (slot < 0) return -1;
121 /* Hack -- prepare to dump the new score */
122 high_score the_score = (*score);
124 /* Slide all the scores down one */
127 for (int i = slot; !done && (i < MAX_HISCORES); i++)
129 /* Read the old guy, note errors */
130 if (highscore_seek(i)) return -1;
131 if (highscore_read(&tmpscore)) done = TRUE;
133 /* Back up and dump the score we were holding */
134 if (highscore_seek(i)) return -1;
135 if (highscore_write(&the_score)) return -1;
137 /* Hack -- Save the old score, for the next pass */
138 the_score = tmpscore;
141 /* Return location used */
147 * @brief 指定された順位範囲でスコアを並べて表示する / Display the scores in a given range.
150 * @param note 黄色表示でハイライトする順位
151 * @param score スコア配列参照ポインタ
155 * Assumes the high score list is already open.
156 * Only five entries per line, too much info.
158 * Mega-Hack -- allow "fake" entry at the given position.
161 void display_scores_aux(int from, int to, int note, high_score *score)
163 int i, j, k, n, place;
166 high_score the_score;
168 GAME_TEXT out_val[256];
169 GAME_TEXT tmp_val[160];
171 TERM_LEN wid, hgt, per_screen;
173 Term_get_size(&wid, &hgt);
174 per_screen = (hgt - 4) / 4;
176 /* Paranoia -- it may not have opened */
177 if (highscore_fd < 0) return;
180 /* Assume we will show the first 10 */
181 if (from < 0) from = 0;
183 if (to > MAX_HISCORES) to = MAX_HISCORES;
186 /* Seek to the beginning */
187 if (highscore_seek(0)) return;
189 /* Hack -- Count the high scores */
190 for (i = 0; i < MAX_HISCORES; i++)
192 if (highscore_read(&the_score)) break;
195 /* Hack -- allow "fake" entry to be last */
196 if ((note == i) && score) i++;
198 /* Forget about the last entries */
202 /* Show per_screen per page, until "done" */
203 for (k = from, place = k+1; k < i; k += per_screen)
208 put_str(_(" 変愚蛮怒: 勇者の殿堂", " Hengband Hall of Fame"), 0, 0);
210 /* Indicate non-top scores */
213 sprintf(tmp_val, _("( %d 位以下 )", "(from position %d)"), k + 1);
214 put_str(tmp_val, 0, 40);
217 /* Dump per_screen entries */
218 for (j = k, n = 0; j < i && n < per_screen; place++, j++, n++)
220 int pr, pc, pa, clev, mlev, cdun, mdun;
222 concptr user, gold, when, aged;
225 /* Hack -- indicate death in yellow */
226 attr = (j == note) ? TERM_YELLOW : TERM_WHITE;
229 /* Mega-Hack -- insert a "fake" record */
230 if ((note == j) && score)
232 the_score = (*score);
239 /* Read a normal record */
242 /* Read the proper record */
243 if (highscore_seek(j)) break;
244 if (highscore_read(&the_score)) break;
247 /* Extract the race/class */
248 pr = atoi(the_score.p_r);
249 pc = atoi(the_score.p_c);
250 pa = atoi(the_score.p_a);
252 /* Extract the level info */
253 clev = atoi(the_score.cur_lev);
254 mlev = atoi(the_score.max_lev);
255 cdun = atoi(the_score.cur_dun);
256 mdun = atoi(the_score.max_dun);
258 /* Hack -- extract the gold and such */
259 for (user = the_score.uid; iswspace(*user); user++) /* loop */;
260 for (when = the_score.day; iswspace(*when); when++) /* loop */;
261 for (gold = the_score.gold; iswspace(*gold); gold++) /* loop */;
262 for (aged = the_score.turns; iswspace(*aged); aged++) /* loop */;
264 /* Clean up standard encoded form of "when" */
265 if ((*when == '@') && strlen(when) == 9)
267 sprintf(tmp_val, "%.4s-%.2s-%.2s",
268 when + 1, when + 5, when + 7);
274 /*sprintf(out_val, "%3d.%9s %s%s%sという名の%sの%s (レベル %d)", */
275 sprintf(out_val, "%3d.%9s %s%s%s - %s%s (レベル %d)",
276 place, the_score.pts,
277 seikaku_info[pa].title, (seikaku_info[pa].no ? "の" : ""),
279 race_info[pr].title, class_info[pc].title,
283 sprintf(out_val, "%3d.%9s %s %s the %s %s, Level %d",
284 place, the_score.pts,
285 seikaku_info[pa].title,
286 the_score.who, race_info[pr].title, class_info[pc].title,
291 /* Append a "maximum level" */
292 if (mlev > clev) strcat(out_val, format(_(" (最高%d)", " (Max %d)"), mlev));
294 /* Dump the first line */
295 c_put_str(attr, out_val, n*4 + 2, 0);
297 /* Another line of info */
300 sprintf(out_val, " 最高%3d階", mdun);
302 sprintf(out_val, " ");
305 /* 死亡原因をオリジナルより細かく表示 */
306 if (streq(the_score.how, "yet"))
308 sprintf(out_val+13, " まだ生きている (%d%s)",
312 if (streq(the_score.how, "ripe"))
314 sprintf(out_val+13, " 勝利の後に引退 (%d%s)",
317 else if (streq(the_score.how, "Seppuku"))
319 sprintf(out_val+13, " 勝利の後に切腹 (%d%s)",
324 codeconv(the_score.how);
326 /* Some people die outside of the dungeon */
328 sprintf(out_val+13, " 地上で%sに殺された", the_score.how);
330 sprintf(out_val+13, " %d階で%sに殺された",
331 cdun, the_score.how);
335 /* Some people die outside of the dungeon */
338 " Killed by %s on the surface",
342 " Killed by %s on %s %d",
343 the_score.how, "Dungeon Level", cdun);
345 /* Append a "maximum level" */
346 if (mdun > cdun) strcat(out_val, format(" (Max %d)", mdun));
350 c_put_str(attr, out_val, n*4 + 3, 0);
352 /* And still another line of info */
357 /* 日付を 19yy/mm/dd の形式に変更する */
358 if (strlen(when) == 8 && when[2] == '/' && when[5] == '/') {
359 sprintf(buf, "%d%s/%.5s", 19 + (when[6] < '8'), when + 6, when);
363 " (ユーザー:%s, 日付:%s, 所持金:%s, ターン:%s)",
364 user, when, gold, aged);
369 " (User %s, Date %s, Gold %s, Turn %s).",
370 user, when, gold, aged);
373 c_put_str(attr, out_val, n*4 + 4, 0);
377 /* Wait for response */
378 prt(_("[ ESCで中断, その他のキーで続けます ]", "[Press ESC to quit, any other key to continue.]"), hgt - 1, _(21, 17));
383 /* Hack -- notice Escape */
384 if (j == ESCAPE) break;
390 * @brief スコア表示処理メインルーチン / Hack -- Display the scores in a given range and quit.
396 * This function is only called from "main.c" when the user asks
397 * to see the "high scores".
400 void display_scores(int from, int to)
403 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
405 /* Open the binary high score file, for reading */
406 highscore_fd = fd_open(buf, O_RDONLY);
408 /* Paranoia -- No score file */
409 if (highscore_fd < 0) quit(_("スコア・ファイルが使用できません。", "Score file unavailable."));
412 /* Display the scores */
413 display_scores_aux(from, to, -1, NULL);
415 /* Shut the high score file */
416 (void)fd_close(highscore_fd);
418 /* Forget the high score fd */
427 * todo プリプロが邪魔していて最初のif文を削除すると到達不能コードが発生する
428 * @brief スコアサーバへの転送処理
429 * @param current_player_ptr プレーヤーへの参照ポインタ
430 * @param do_send 実際に転送ア処置を行うか否か
431 * @return 転送が成功したらTRUEを返す
433 bool send_world_score(player_type *current_player_ptr, bool do_send, void(*update_playtime)(void), display_player_pf display_player, map_name_pf map_name)
436 if (send_score && do_send)
440 msg_print(_("初心者モードではワールドスコアに登録できません。",
441 "Since you are in the Easy Mode, you cannot send score to world score server."));
445 bool is_registration = get_check_strict(_("スコアをスコア・サーバに登録しますか? ", "Do you send score to the world score server? "), (CHECK_NO_ESCAPE | CHECK_NO_HISTORY));
446 if (!is_registration) return FALSE;
450 prt(_("送信中..", "Sending..."), 0, 0);
453 err = report_score(current_player_ptr, update_playtime, display_player, map_name);
455 if (err) return FALSE;
457 prt(_("完了。何かキーを押してください。", "Completed. Hit any key."), 0, 0);
466 * @brief スコアの過去二十位内ランキングを表示する
467 * Enters a players name on a hi-score table, if "legal", and in any
468 * case, displays some relevant portion of the high score list.
469 * @param current_player_ptr スコアに適用するための現在プレイヤークリーチャー参照ポインタ
472 * Assumes "signals_ignore_tstp()" has been called.
474 errr top_twenty(player_type *current_player_ptr)
476 high_score the_score;
477 (void)WIPE(&the_score, high_score);
479 /* Save the version */
480 sprintf(the_score.what, "%u.%u.%u",
481 FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
483 /* Calculate and save the points */
484 sprintf(the_score.pts, "%9ld", (long)calc_score(current_player_ptr));
485 the_score.pts[9] = '\0';
487 /* Save the current gold */
488 sprintf(the_score.gold, "%9lu", (long)current_player_ptr->au);
489 the_score.gold[9] = '\0';
491 /* Save the current turn */
492 sprintf(the_score.turns, "%9lu", (long)turn_real(current_player_ptr, current_world_ptr->game_turn));
493 the_score.turns[9] = '\0';
495 time_t ct = time((time_t*)0);
497 /* Save the date in standard encoded form (9 chars) */
498 strftime(the_score.day, 10, "@%Y%m%d", localtime(&ct));
500 /* Save the player name (15 chars) */
501 sprintf(the_score.who, "%-.15s", current_player_ptr->name);
503 /* Save the player info */
504 sprintf(the_score.uid, "%7u", current_player_ptr->player_uid);
505 sprintf(the_score.sex, "%c", (current_player_ptr->psex ? 'm' : 'f'));
506 sprintf(the_score.p_r, "%2d", MIN(current_player_ptr->prace, MAX_RACES));
507 sprintf(the_score.p_c, "%2d", MIN(current_player_ptr->pclass, MAX_CLASS));
508 sprintf(the_score.p_a, "%2d", MIN(current_player_ptr->pseikaku, MAX_SEIKAKU));
510 /* Save the level and such */
511 sprintf(the_score.cur_lev, "%3d", MIN((u16b)current_player_ptr->lev, 999));
512 sprintf(the_score.cur_dun, "%3d", (int)current_player_ptr->current_floor_ptr->dun_level);
513 sprintf(the_score.max_lev, "%3d", MIN((u16b)current_player_ptr->max_plv, 999));
514 sprintf(the_score.max_dun, "%3d", (int)max_dlv[current_player_ptr->dungeon_idx]);
516 /* Save the cause of death (31 chars) */
517 if (strlen(current_player_ptr->died_from) >= sizeof(the_score.how))
520 my_strcpy(the_score.how, current_player_ptr->died_from, sizeof(the_score.how) - 2);
521 strcat(the_score.how, "…");
523 my_strcpy(the_score.how, current_player_ptr->died_from, sizeof(the_score.how) - 3);
524 strcat(the_score.how, "...");
529 strcpy(the_score.how, current_player_ptr->died_from);
532 /* Grab permissions */
535 /* Lock (for writing) the highscore file, or fail */
536 errr err = fd_lock(highscore_fd, F_WRLCK);
538 /* Drop permissions */
543 /* Add a new entry to the score list, see where it went */
544 int j = highscore_add(&the_score);
546 /* Grab permissions */
549 /* Unlock the highscore file, or fail */
550 err = fd_lock(highscore_fd, F_UNLCK);
552 /* Drop permissions */
557 /* Hack -- Display the top fifteen scores */
560 display_scores_aux(0, 15, j, NULL);
564 /* Display the scores surrounding the player */
565 display_scores_aux(0, 5, j, NULL);
566 display_scores_aux(j - 2, j + 7, j, NULL);
572 * @brief プレイヤーの現在のスコアをランキングに挟む /
573 * Predict the players location, and display it.
576 errr predict_score(player_type *current_player_ptr)
578 high_score the_score;
581 if (highscore_fd < 0)
583 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
588 /* Save the version */
589 sprintf(the_score.what, "%u.%u.%u",
590 FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
592 /* Calculate and save the points */
593 sprintf(the_score.pts, "%9ld", (long)calc_score(current_player_ptr));
595 /* Save the current gold */
596 sprintf(the_score.gold, "%9lu", (long)current_player_ptr->au);
598 /* Save the current turn */
599 sprintf(the_score.turns, "%9lu", (long)turn_real(current_player_ptr, current_world_ptr->game_turn));
601 /* Hack -- no time needed */
602 strcpy(the_score.day, _("今日", "TODAY"));
604 /* Save the player name (15 chars) */
605 sprintf(the_score.who, "%-.15s", current_player_ptr->name);
607 /* Save the player info */
608 sprintf(the_score.uid, "%7u", current_player_ptr->player_uid);
609 sprintf(the_score.sex, "%c", (current_player_ptr->psex ? 'm' : 'f'));
610 sprintf(the_score.p_r, "%2d", MIN(current_player_ptr->prace, MAX_RACES));
611 sprintf(the_score.p_c, "%2d", MIN(current_player_ptr->pclass, MAX_CLASS));
612 sprintf(the_score.p_a, "%2d", MIN(current_player_ptr->pseikaku, MAX_SEIKAKU));
614 /* Save the level and such */
615 sprintf(the_score.cur_lev, "%3d", MIN((u16b)current_player_ptr->lev, 999));
616 sprintf(the_score.cur_dun, "%3d", (int)current_player_ptr->current_floor_ptr->dun_level);
617 sprintf(the_score.max_lev, "%3d", MIN((u16b)current_player_ptr->max_plv, 999));
618 sprintf(the_score.max_dun, "%3d", (int)max_dlv[current_player_ptr->dungeon_idx]);
620 /* Hack -- no cause of death */
621 /* まだ死んでいないときの識別文字 */
622 strcpy(the_score.how, _("yet", "nobody (yet!)"));
624 /* See where the entry would be placed */
625 int j = highscore_where(&the_score);
627 /* Hack -- Display the top fifteen scores */
630 display_scores_aux(0, 15, j, &the_score);
634 display_scores_aux(0, 5, -1, NULL);
635 display_scores_aux(j - 2, j + 7, j, &the_score);
641 * @brief スコアランキングの簡易表示 /
642 * show_highclass - selectively list highscores based on class -KMW-
645 void show_highclass(player_type *current_player_ptr)
648 char buf[1024], out_val[256];
649 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
651 highscore_fd = fd_open(buf, O_RDONLY);
653 if (highscore_fd < 0)
655 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
660 if (highscore_seek(0)) return;
662 high_score the_score;
663 for (int i = 0; i < MAX_HISCORES; i++)
664 if (highscore_read(&the_score)) break;
668 PLAYER_LEVEL clev = 0;
670 while ((m < 9) && (j < MAX_HISCORES))
672 if (highscore_seek(j)) break;
673 if (highscore_read(&the_score)) break;
674 pr = atoi(the_score.p_r);
675 clev = (PLAYER_LEVEL)atoi(the_score.cur_lev);
678 sprintf(out_val, " %3d) %sの%s (レベル %2d)",
679 (m + 1), race_info[pr].title,the_score.who, clev);
681 sprintf(out_val, "%3d) %s the %s (Level %2d)",
682 (m + 1), the_score.who, race_info[pr].title, clev);
685 prt(out_val, (m + 7), 0);
691 sprintf(out_val, "あなた) %sの%s (レベル %2d)",
692 race_info[current_player_ptr->prace].title,current_player_ptr->name, current_player_ptr->lev);
694 sprintf(out_val, "You) %s the %s (Level %2d)",
695 current_player_ptr->name, race_info[current_player_ptr->prace].title, current_player_ptr->lev);
698 prt(out_val, (m + 8), 0);
700 (void)fd_close(highscore_fd);
702 prt(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"),0,0);
706 for (j = 5; j < 18; j++) prt("", j, 0);
712 * @brief スコアランキングの簡易表示(種族毎)サブルーチン /
714 * @param race_num 種族ID
717 void race_score(player_type *current_player_ptr, int race_num)
719 register int i = 0, j, m = 0;
720 int pr, clev, lastlev;
721 high_score the_score;
722 char buf[1024], out_val[256], tmp_str[80];
726 /* rr9: TODO - pluralize the race */
727 sprintf(tmp_str,_("最高の%s", "The Greatest of all the %s"), race_info[race_num].title);
730 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
732 highscore_fd = fd_open(buf, O_RDONLY);
734 if (highscore_fd < 0)
736 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
741 if (highscore_seek(0)) return;
743 for (i = 0; i < MAX_HISCORES; i++)
745 if (highscore_read(&the_score)) break;
751 while ((m < 10) || (j < MAX_HISCORES))
753 if (highscore_seek(j)) break;
754 if (highscore_read(&the_score)) break;
755 pr = atoi(the_score.p_r);
756 clev = atoi(the_score.cur_lev);
761 sprintf(out_val, " %3d) %sの%s (レベル %2d)",
762 (m + 1), race_info[pr].title,
765 sprintf(out_val, "%3d) %s the %s (Level %3d)",
766 (m + 1), the_score.who,
767 race_info[pr].title, clev);
770 prt(out_val, (m + 7), 0);
777 /* add player if qualified */
778 if ((current_player_ptr->prace == race_num) && (current_player_ptr->lev >= lastlev))
781 sprintf(out_val, "あなた) %sの%s (レベル %2d)",
782 race_info[current_player_ptr->prace].title,current_player_ptr->name, current_player_ptr->lev);
784 sprintf(out_val, "You) %s the %s (Level %3d)",
785 current_player_ptr->name, race_info[current_player_ptr->prace].title, current_player_ptr->lev);
788 prt(out_val, (m + 8), 0);
791 (void)fd_close(highscore_fd);
797 * @brief スコアランキングの簡易表示(種族毎)メインルーチン /
801 void race_legends(player_type *current_player_ptr)
803 for (int i = 0; i < MAX_RACES; i++)
805 race_score(current_player_ptr, i);
806 msg_print(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"));
808 for (int j = 5; j < 19; j++)
815 * @brief 勝利者用の引退演出処理 /
816 * Change the player into a King! -RAK-
819 void kingly(player_type *winner_ptr)
823 bool seppuku = streq(winner_ptr->died_from, "Seppuku");
825 /* Hack -- retire in town */
826 winner_ptr->current_floor_ptr->dun_level = 0;
831 (void)strcpy(winner_ptr->died_from, _("ripe", "Ripe Old Age"));
833 /* Restore the experience */
834 winner_ptr->exp = winner_ptr->max_exp;
836 /* Restore the level */
837 winner_ptr->lev = winner_ptr->max_plv;
839 Term_get_size(&wid, &hgt);
843 /* Hack -- Instant Gold */
844 winner_ptr->au += 10000000L;
847 /* Display a crown */
848 put_str("#", cy - 11, cx - 1);
849 put_str("#####", cy - 10, cx - 3);
850 put_str("#", cy - 9, cx - 1);
851 put_str(",,, $$$ ,,,", cy - 8, cx - 7);
852 put_str(",,=$ \"$$$$$\" $=,,", cy - 7, cx - 11);
853 put_str(",$$ $$$ $$,", cy - 6, cx - 13);
854 put_str("*> <*> <*", cy - 5, cx - 13);
855 put_str("$$ $$$ $$", cy - 4, cx - 13);
856 put_str("\"$$ $$$ $$\"", cy - 3, cx - 13);
857 put_str("\"$$ $$$ $$\"", cy - 2, cx - 12);
858 put_str("*#########*#########*", cy - 1, cx - 11);
859 put_str("*#########*#########*", cy, cx - 11);
861 /* Display a message */
863 put_str("Veni, Vidi, Vici!", cy + 3, cx - 9);
864 put_str("来た、見た、勝った!", cy + 4, cx - 10);
865 put_str(format("偉大なる%s万歳!", sp_ptr->winner), cy + 5, cx - 11);
867 put_str("Veni, Vidi, Vici!", cy + 3, cx - 9);
868 put_str("I came, I saw, I conquered!", cy + 4, cx - 14);
869 put_str(format("All Hail the Mighty %s!", sp_ptr->winner), cy + 5, cx - 13);
872 /* If player did Seppuku, that is already written in playrecord */
875 exe_write_diary(winner_ptr, DIARY_DESCRIPTION, 0, _("ダンジョンの探索から引退した。", "retired exploring dungeons."));
876 exe_write_diary(winner_ptr, DIARY_GAMESTART, 1, _("-------- ゲームオーバー --------", "-------- Game Over --------"));
877 exe_write_diary(winner_ptr, DIARY_DESCRIPTION, 1, "\n\n\n\n");
883 /* Wait for response */
890 * Display some character info
893 bool check_score(player_type *current_player_ptr)
898 if (highscore_fd < 0)
900 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
905 /* Wizard-mode pre-empts scoring */
906 if (current_world_ptr->noscore & 0x000F)
908 msg_print(_("ウィザード・モードではスコアが記録されません。", "Score not registered for wizards."));
913 /* Cheaters are not scored */
914 if (current_world_ptr->noscore & 0xFF00)
916 msg_print(_("詐欺をやった人はスコアが記録されません。", "Score not registered for cheaters."));
922 if (!current_world_ptr->total_winner && streq(current_player_ptr->died_from, _("強制終了", "Interrupting")))
924 msg_print(_("強制終了のためスコアが記録されません。", "Score not registered due to interruption."));
930 if (!current_world_ptr->total_winner && streq(current_player_ptr->died_from, _("途中終了", "Quitting")))
932 msg_print(_("途中終了のためスコアが記録されません。", "Score not registered due to quitting."));