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.
13 #include "core/scores.h"
14 #include "cmd-io/cmd-dump.h"
15 #include "core/asking-player.h"
16 #include "core/turn-compensator.h"
17 #include "dungeon/dungeon.h"
18 #include "game-option/birth-options.h"
19 #include "game-option/game-play-options.h"
20 #include "io/input-key-acceptor.h"
21 #include "io/report.h"
22 #include "io/signal-handlers.h"
23 #include "io/uid-checker.h"
24 #include "io/write-diary.h"
25 #include "player/player-class.h"
26 #include "player/player-personality.h"
27 #include "player/player-sex.h"
28 #include "player/player-status.h"
29 #include "player/race-info-table.h"
30 #include "system/angband-version.h"
31 #include "system/floor-type-definition.h"
32 #include "term/screen-processor.h"
33 #include "term/term-color-types.h"
34 #include "util/angband-files.h"
35 #include "util/int-char-converter.h"
36 #include "util/string-processor.h"
37 #include "view/display-messages.h"
38 #include "world/world.h"
40 #include "locale/japanese.h"
44 * The "highscore" file descriptor, if available.
46 int highscore_fd = -1;
49 * @brief i番目のスコア情報にバッファ位置をシークする / Seek score 'i' in the highscore file
53 static int highscore_seek(int i)
55 /* Seek for the requested record */
56 return (fd_seek(highscore_fd, (huge)(i) * sizeof(high_score)));
61 * @brief 所定ポインタからスコア情報を読み取る / Read one score from the highscore file
62 * @param score スコア情報参照ポインタ
65 static errr highscore_read(high_score *score)
67 /* Read the record, note failure */
68 return (fd_read(highscore_fd, (char*)(score), sizeof(high_score)));
73 * @brief 所定ポインタへスコア情報を書き込む / Write one score to the highscore file
74 * @param score スコア情報参照ポインタ
75 * @return エラーコード(問題がなければ0を返す)
77 static int highscore_write(high_score *score)
79 /* Write the record, note failure */
80 return (fd_write(highscore_fd, (char*)(score), sizeof(high_score)));
85 * @brief スコア情報を全て得るまで繰り返し取得する / Just determine where a new score *would* be placed
86 * @param score スコア情報参照ポインタ
87 * @return 正常ならば(MAX_HISCORES - 1)、問題があれば-1を返す
89 static int highscore_where(high_score *score)
91 /* Paranoia -- it may not have opened */
92 if (highscore_fd < 0) return -1;
94 /* Go to the start of the highscore file */
95 if (highscore_seek(0)) return -1;
97 /* Read until we get to a higher score */
99 int my_score = atoi(score->pts);
100 for (int i = 0; i < MAX_HISCORES; i++)
103 if (highscore_read(&the_score)) return (i);
104 old_score = atoi(the_score.pts);
105 if (my_score > old_score) return (i);
108 /* The "last" entry is always usable */
109 return MAX_HISCORES - 1;
114 * @brief スコア情報をバッファの末尾に追加する / Actually place an entry into the high score file
115 * @param score スコア情報参照ポインタ
116 * @return 正常ならば書き込んだスロット位置、問題があれば-1を返す / Return the location (0 is best) or -1 on "failure"
118 static int highscore_add(high_score *score)
120 /* Paranoia -- it may not have opened */
121 if (highscore_fd < 0) return -1;
123 /* Determine where the score should go */
124 int 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 high_score the_score = (*score);
132 /* Slide all the scores down one */
135 for (int i = slot; !done && (i < MAX_HISCORES); i++)
137 /* Read the old guy, note errors */
138 if (highscore_seek(i)) return -1;
139 if (highscore_read(&tmpscore)) done = TRUE;
141 /* Back up and dump the score we were holding */
142 if (highscore_seek(i)) return -1;
143 if (highscore_write(&the_score)) return -1;
145 /* Hack -- Save the old score, for the next pass */
146 the_score = tmpscore;
149 /* Return location used */
155 * @brief 指定された順位範囲でスコアを並べて表示する / Display the scores in a given range.
158 * @param note 黄色表示でハイライトする順位
159 * @param score スコア配列参照ポインタ
163 * Assumes the high score list is already open.
164 * Only five entries per line, too much info.
166 * Mega-Hack -- allow "fake" entry at the given position.
169 void display_scores_aux(int from, int to, int note, high_score *score)
171 int i, j, k, n, place;
174 high_score the_score;
176 GAME_TEXT out_val[256];
177 GAME_TEXT tmp_val[160];
179 TERM_LEN wid, hgt, per_screen;
181 term_get_size(&wid, &hgt);
182 per_screen = (hgt - 4) / 4;
184 /* Paranoia -- it may not have opened */
185 if (highscore_fd < 0) return;
188 /* Assume we will show the first 10 */
189 if (from < 0) from = 0;
191 if (to > MAX_HISCORES) to = MAX_HISCORES;
194 /* Seek to the beginning */
195 if (highscore_seek(0)) return;
197 /* Hack -- Count the high scores */
198 for (i = 0; i < MAX_HISCORES; i++)
200 if (highscore_read(&the_score)) break;
203 /* Hack -- allow "fake" entry to be last */
204 if ((note == i) && score) i++;
206 /* Forget about the last entries */
210 /* Show per_screen per page, until "done" */
211 for (k = from, place = k+1; k < i; k += per_screen)
216 put_str(_(" 馬鹿馬鹿蛮怒: 勇者の殿堂", " Bakabakaband Hall of Fame"), 0, 0);
218 /* Indicate non-top scores */
221 sprintf(tmp_val, _("( %d 位以下 )", "(from position %d)"), k + 1);
222 put_str(tmp_val, 0, 40);
225 /* Dump per_screen entries */
226 for (j = k, n = 0; j < i && n < per_screen; place++, j++, n++)
228 int pr, pc, pa, clev, mlev, cdun, mdun;
230 concptr user, gold, when, aged;
233 /* Hack -- indicate death in yellow */
234 attr = (j == note) ? TERM_YELLOW : TERM_WHITE;
237 /* Mega-Hack -- insert a "fake" record */
238 if ((note == j) && score)
240 the_score = (*score);
247 /* Read a normal record */
250 /* Read the proper record */
251 if (highscore_seek(j)) break;
252 if (highscore_read(&the_score)) break;
255 /* Extract the race/class */
256 pr = atoi(the_score.p_r);
257 pc = atoi(the_score.p_c);
258 pa = atoi(the_score.p_a);
260 /* Extract the level info */
261 clev = atoi(the_score.cur_lev);
262 mlev = atoi(the_score.max_lev);
263 cdun = atoi(the_score.cur_dun);
264 mdun = atoi(the_score.max_dun);
266 /* Hack -- extract the gold and such */
267 for (user = the_score.uid; iswspace(*user); user++) /* loop */;
268 for (when = the_score.day; iswspace(*when); when++) /* loop */;
269 for (gold = the_score.gold; iswspace(*gold); gold++) /* loop */;
270 for (aged = the_score.turns; iswspace(*aged); aged++) /* loop */;
272 /* Clean up standard encoded form of "when" */
273 if ((*when == '@') && strlen(when) == 9)
275 sprintf(tmp_val, "%.4s-%.2s-%.2s",
276 when + 1, when + 5, when + 7);
282 /*sprintf(out_val, "%3d.%9s %s%s%sという名の%sの%s (レベル %d)", */
283 sprintf(out_val, "%3d.%9s %s%s%s - %s%s (レベル %d)",
284 place, the_score.pts,
285 personality_info[pa].title, (personality_info[pa].no ? "の" : ""),
287 race_info[pr].title, class_info[pc].title,
291 sprintf(out_val, "%3d.%9s %s %s the %s %s, Level %d",
292 place, the_score.pts,
293 personality_info[pa].title,
294 the_score.who, race_info[pr].title, class_info[pc].title,
299 /* Append a "maximum level" */
300 if (mlev > clev) strcat(out_val, format(_(" (最高%d)", " (Max %d)"), mlev));
302 /* Dump the first line */
303 c_put_str(attr, out_val, n*4 + 2, 0);
305 /* Another line of info */
308 sprintf(out_val, " 最高%3d階", mdun);
310 sprintf(out_val, " ");
313 /* 死亡原因をオリジナルより細かく表示 */
314 if (streq(the_score.how, "yet"))
316 sprintf(out_val+13, " まだ生きている (%d%s)",
320 if (streq(the_score.how, "ripe"))
322 sprintf(out_val+13, " 勝利の後に引退 (%d%s)",
325 else if (streq(the_score.how, "Seppuku"))
327 sprintf(out_val+13, " 勝利の後に切腹 (%d%s)",
332 codeconv(the_score.how);
334 /* Some people die outside of the dungeon */
336 sprintf(out_val+13, " 地上で%sに殺された", the_score.how);
338 sprintf(out_val+13, " %d階で%sに殺された",
339 cdun, the_score.how);
343 /* Some people die outside of the dungeon */
346 " Killed by %s on the surface",
350 " Killed by %s on %s %d",
351 the_score.how, "Dungeon Level", cdun);
353 /* Append a "maximum level" */
354 if (mdun > cdun) strcat(out_val, format(" (Max %d)", mdun));
358 c_put_str(attr, out_val, n*4 + 3, 0);
360 /* And still another line of info */
365 /* 日付を 19yy/mm/dd の形式に変更する */
366 if (strlen(when) == 8 && when[2] == '/' && when[5] == '/') {
367 sprintf(buf, "%d%s/%.5s", 19 + (when[6] < '8'), when + 6, when);
371 " (ユーザー:%s, 日付:%s, 所持金:%s, ターン:%s)",
372 user, when, gold, aged);
377 " (User %s, Date %s, Gold %s, Turn %s).",
378 user, when, gold, aged);
381 c_put_str(attr, out_val, n*4 + 4, 0);
385 /* Wait for response */
386 prt(_("[ ESCで中断, その他のキーで続けます ]", "[Press ESC to quit, any other key to continue.]"), hgt - 1, _(21, 17));
391 /* Hack -- notice Escape */
392 if (j == ESCAPE) break;
398 * @brief スコア表示処理メインルーチン / Hack -- Display the scores in a given range and quit.
404 * This function is only called from "main.c" when the user asks
405 * to see the "high scores".
408 void display_scores(int from, int to)
411 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
413 /* Open the binary high score file, for reading */
414 highscore_fd = fd_open(buf, O_RDONLY);
416 /* Paranoia -- No score file */
417 if (highscore_fd < 0) quit(_("スコア・ファイルが使用できません。", "Score file unavailable."));
420 /* Display the scores */
421 display_scores_aux(from, to, -1, NULL);
423 /* Shut the high score file */
424 (void)fd_close(highscore_fd);
426 /* Forget the high score fd */
435 * todo プリプロが邪魔していて最初のif文を削除すると到達不能コードが発生する
436 * @brief スコアサーバへの転送処理
437 * @param current_player_ptr プレーヤーへの参照ポインタ
438 * @param do_send 実際に転送ア処置を行うか否か
439 * @return 転送が成功したらTRUEを返す
441 bool send_world_score(player_type *current_player_ptr, bool do_send, void(*update_playtime)(void), display_player_pf display_player)
444 if (send_score && do_send)
448 msg_print(_("初心者モードではワールドスコアに登録できません。",
449 "Since you are in the Easy Mode, you cannot send score to world score server."));
453 bool is_registration = get_check_strict(current_player_ptr,
454 _("スコアをスコア・サーバに登録しますか? ", "Do you send score to the world score server? "), (CHECK_NO_ESCAPE | CHECK_NO_HISTORY));
455 if (!is_registration) return FALSE;
459 prt(_("送信中..", "Sending..."), 0, 0);
462 err = report_score(current_player_ptr, update_playtime, display_player);
464 if (err) return FALSE;
466 prt(_("完了。何かキーを押してください。", "Completed. Hit any key."), 0, 0);
475 * @brief スコアの過去二十位内ランキングを表示する
476 * Enters a players name on a hi-score table, if "legal", and in any
477 * case, displays some relevant portion of the high score list.
478 * @param current_player_ptr スコアに適用するための現在プレイヤークリーチャー参照ポインタ
481 * Assumes "signals_ignore_tstp()" has been called.
483 errr top_twenty(player_type *current_player_ptr)
485 high_score the_score;
486 (void)WIPE(&the_score, high_score);
488 /* Save the version */
489 sprintf(the_score.what, "%u.%u.%u",
490 FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
492 /* Calculate and save the points */
493 sprintf(the_score.pts, "%9ld", (long)calc_score(current_player_ptr));
494 the_score.pts[9] = '\0';
496 /* Save the current gold */
497 sprintf(the_score.gold, "%9lu", (long)current_player_ptr->au);
498 the_score.gold[9] = '\0';
500 /* Save the current turn */
501 sprintf(the_score.turns, "%9lu", (long)turn_real(current_player_ptr, current_world_ptr->game_turn));
502 the_score.turns[9] = '\0';
504 time_t ct = time((time_t*)0);
506 /* Save the date in standard encoded form (9 chars) */
507 strftime(the_score.day, 10, "@%Y%m%d", localtime(&ct));
509 /* Save the player name (15 chars) */
510 sprintf(the_score.who, "%-.15s", current_player_ptr->name);
512 /* Save the player info */
513 sprintf(the_score.uid, "%7u", current_player_ptr->player_uid);
514 sprintf(the_score.sex, "%c", (current_player_ptr->psex ? 'm' : 'f'));
515 sprintf(the_score.p_r, "%2d", MIN(current_player_ptr->prace, MAX_RACES));
516 sprintf(the_score.p_c, "%2d", MIN(current_player_ptr->pclass, MAX_CLASS));
517 sprintf(the_score.p_a, "%2d", MIN(current_player_ptr->pseikaku, MAX_PERSONALITIES));
519 /* Save the level and such */
520 sprintf(the_score.cur_lev, "%3d", MIN((u16b)current_player_ptr->lev, 999));
521 sprintf(the_score.cur_dun, "%3d", (int)current_player_ptr->current_floor_ptr->dun_level);
522 sprintf(the_score.max_lev, "%3d", MIN((u16b)current_player_ptr->max_plv, 999));
523 sprintf(the_score.max_dun, "%3d", (int)max_dlv[current_player_ptr->dungeon_idx]);
525 /* Save the cause of death (31 chars) */
526 if (strlen(current_player_ptr->died_from) >= sizeof(the_score.how))
529 angband_strcpy(the_score.how, current_player_ptr->died_from, sizeof(the_score.how) - 2);
530 strcat(the_score.how, "…");
532 angband_strcpy(the_score.how, current_player_ptr->died_from, sizeof(the_score.how) - 3);
533 strcat(the_score.how, "...");
538 strcpy(the_score.how, current_player_ptr->died_from);
541 /* Grab permissions */
542 safe_setuid_grab(current_player_ptr);
544 /* Lock (for writing) the highscore file, or fail */
545 errr err = fd_lock(highscore_fd, F_WRLCK);
547 /* Drop permissions */
552 /* Add a new entry to the score list, see where it went */
553 int j = highscore_add(&the_score);
555 /* Grab permissions */
556 safe_setuid_grab(current_player_ptr);
558 /* Unlock the highscore file, or fail */
559 err = fd_lock(highscore_fd, F_UNLCK);
561 /* Drop permissions */
566 /* Hack -- Display the top fifteen scores */
569 display_scores_aux(0, 15, j, NULL);
573 /* Display the scores surrounding the player */
574 display_scores_aux(0, 5, j, NULL);
575 display_scores_aux(j - 2, j + 7, j, NULL);
581 * @brief プレイヤーの現在のスコアをランキングに挟む /
582 * Predict the players location, and display it.
585 errr predict_score(player_type *current_player_ptr)
587 high_score the_score;
590 if (highscore_fd < 0)
592 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
597 /* Save the version */
598 sprintf(the_score.what, "%u.%u.%u",
599 FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
601 /* Calculate and save the points */
602 sprintf(the_score.pts, "%9ld", (long)calc_score(current_player_ptr));
604 /* Save the current gold */
605 sprintf(the_score.gold, "%9lu", (long)current_player_ptr->au);
607 /* Save the current turn */
608 sprintf(the_score.turns, "%9lu", (long)turn_real(current_player_ptr, current_world_ptr->game_turn));
610 /* Hack -- no time needed */
611 strcpy(the_score.day, _("今日", "TODAY"));
613 /* Save the player name (15 chars) */
614 sprintf(the_score.who, "%-.15s", current_player_ptr->name);
616 /* Save the player info */
617 sprintf(the_score.uid, "%7u", current_player_ptr->player_uid);
618 sprintf(the_score.sex, "%c", (current_player_ptr->psex ? 'm' : 'f'));
619 sprintf(the_score.p_r, "%2d", MIN(current_player_ptr->prace, MAX_RACES));
620 sprintf(the_score.p_c, "%2d", MIN(current_player_ptr->pclass, MAX_CLASS));
621 sprintf(the_score.p_a, "%2d", MIN(current_player_ptr->pseikaku, MAX_PERSONALITIES));
623 /* Save the level and such */
624 sprintf(the_score.cur_lev, "%3d", MIN((u16b)current_player_ptr->lev, 999));
625 sprintf(the_score.cur_dun, "%3d", (int)current_player_ptr->current_floor_ptr->dun_level);
626 sprintf(the_score.max_lev, "%3d", MIN((u16b)current_player_ptr->max_plv, 999));
627 sprintf(the_score.max_dun, "%3d", (int)max_dlv[current_player_ptr->dungeon_idx]);
629 /* Hack -- no cause of death */
630 /* まだ死んでいないときの識別文字 */
631 strcpy(the_score.how, _("yet", "nobody (yet!)"));
633 /* See where the entry would be placed */
634 int j = highscore_where(&the_score);
636 /* Hack -- Display the top fifteen scores */
639 display_scores_aux(0, 15, j, &the_score);
643 display_scores_aux(0, 5, -1, NULL);
644 display_scores_aux(j - 2, j + 7, j, &the_score);
650 * @brief スコアランキングの簡易表示 /
651 * show_highclass - selectively list highscores based on class -KMW-
654 void show_highclass(player_type *current_player_ptr)
657 char buf[1024], out_val[256];
658 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
660 highscore_fd = fd_open(buf, O_RDONLY);
662 if (highscore_fd < 0)
664 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
669 if (highscore_seek(0)) return;
671 high_score the_score;
672 for (int i = 0; i < MAX_HISCORES; i++)
673 if (highscore_read(&the_score)) break;
677 PLAYER_LEVEL clev = 0;
679 while ((m < 9) && (j < MAX_HISCORES))
681 if (highscore_seek(j)) break;
682 if (highscore_read(&the_score)) break;
683 pr = atoi(the_score.p_r);
684 clev = (PLAYER_LEVEL)atoi(the_score.cur_lev);
687 sprintf(out_val, " %3d) %sの%s (レベル %2d)",
688 (m + 1), race_info[pr].title,the_score.who, clev);
690 sprintf(out_val, "%3d) %s the %s (Level %2d)",
691 (m + 1), the_score.who, race_info[pr].title, clev);
694 prt(out_val, (m + 7), 0);
700 sprintf(out_val, "あなた) %sの%s (レベル %2d)",
701 race_info[current_player_ptr->prace].title,current_player_ptr->name, current_player_ptr->lev);
703 sprintf(out_val, "You) %s the %s (Level %2d)",
704 current_player_ptr->name, race_info[current_player_ptr->prace].title, current_player_ptr->lev);
707 prt(out_val, (m + 8), 0);
709 (void)fd_close(highscore_fd);
711 prt(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"),0,0);
715 for (j = 5; j < 18; j++) prt("", j, 0);
721 * @brief スコアランキングの簡易表示(種族毎)サブルーチン /
723 * @param race_num 種族ID
726 void race_score(player_type *current_player_ptr, int race_num)
728 register int i = 0, j, m = 0;
729 int pr, clev, lastlev;
730 high_score the_score;
731 char buf[1024], out_val[256], tmp_str[80];
735 /* rr9: TODO - pluralize the race */
736 sprintf(tmp_str,_("最高の%s", "The Greatest of all the %s"), race_info[race_num].title);
739 path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
741 highscore_fd = fd_open(buf, O_RDONLY);
743 if (highscore_fd < 0)
745 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
750 if (highscore_seek(0)) return;
752 for (i = 0; i < MAX_HISCORES; i++)
754 if (highscore_read(&the_score)) break;
760 while ((m < 10) || (j < MAX_HISCORES))
762 if (highscore_seek(j)) break;
763 if (highscore_read(&the_score)) break;
764 pr = atoi(the_score.p_r);
765 clev = atoi(the_score.cur_lev);
770 sprintf(out_val, " %3d) %sの%s (レベル %2d)",
771 (m + 1), race_info[pr].title,
774 sprintf(out_val, "%3d) %s the %s (Level %3d)",
775 (m + 1), the_score.who,
776 race_info[pr].title, clev);
779 prt(out_val, (m + 7), 0);
786 /* add player if qualified */
787 if ((current_player_ptr->prace == race_num) && (current_player_ptr->lev >= lastlev))
790 sprintf(out_val, "あなた) %sの%s (レベル %2d)",
791 race_info[current_player_ptr->prace].title,current_player_ptr->name, current_player_ptr->lev);
793 sprintf(out_val, "You) %s the %s (Level %3d)",
794 current_player_ptr->name, race_info[current_player_ptr->prace].title, current_player_ptr->lev);
797 prt(out_val, (m + 8), 0);
800 (void)fd_close(highscore_fd);
806 * @brief スコアランキングの簡易表示(種族毎)メインルーチン /
810 void race_legends(player_type *current_player_ptr)
812 for (int i = 0; i < MAX_RACES; i++)
814 race_score(current_player_ptr, i);
815 msg_print(_("何かキーを押すとゲームに戻ります", "Hit any key to continue"));
817 for (int j = 5; j < 19; j++)
824 * @brief 勝利者用の引退演出処理 /
825 * Change the player into a King! -RAK-
828 void kingly(player_type *winner_ptr)
832 bool seppuku = streq(winner_ptr->died_from, "Seppuku");
834 /* Hack -- retire in town */
835 winner_ptr->current_floor_ptr->dun_level = 0;
840 (void)strcpy(winner_ptr->died_from, _("ripe", "Ripe Old Age"));
842 /* Restore the experience */
843 winner_ptr->exp = winner_ptr->max_exp;
845 /* Restore the level */
846 winner_ptr->lev = winner_ptr->max_plv;
848 term_get_size(&wid, &hgt);
852 /* Hack -- Instant Gold */
853 winner_ptr->au += 10000000L;
856 /* Display a crown */
857 put_str("#", cy - 11, cx - 1);
858 put_str("#####", cy - 10, cx - 3);
859 put_str("#", cy - 9, cx - 1);
860 put_str(",,, $$$ ,,,", cy - 8, cx - 7);
861 put_str(",,=$ \"$$$$$\" $=,,", cy - 7, cx - 11);
862 put_str(",$$ $$$ $$,", cy - 6, cx - 13);
863 put_str("*> <*> <*", cy - 5, cx - 13);
864 put_str("$$ $$$ $$", cy - 4, cx - 13);
865 put_str("\"$$ $$$ $$\"", cy - 3, cx - 13);
866 put_str("\"$$ $$$ $$\"", cy - 2, cx - 12);
867 put_str("*#########*#########*", cy - 1, cx - 11);
868 put_str("*#########*#########*", cy, cx - 11);
870 /* Display a message */
872 put_str("Veni, Vidi, Vici!", cy + 3, cx - 9);
873 put_str("来た、見た、勝った!", cy + 4, cx - 10);
874 put_str(format("偉大なる%s万歳!", sp_ptr->winner), cy + 5, cx - 11);
876 put_str("Veni, Vidi, Vici!", cy + 3, cx - 9);
877 put_str("I came, I saw, I conquered!", cy + 4, cx - 14);
878 put_str(format("All Hail the Mighty %s!", sp_ptr->winner), cy + 5, cx - 13);
881 /* If player did Seppuku, that is already written in playrecord */
884 exe_write_diary(winner_ptr, DIARY_DESCRIPTION, 0, _("ダンジョンの探索から引退した。", "retired exploring dungeons."));
885 exe_write_diary(winner_ptr, DIARY_GAMESTART, 1, _("-------- ゲームオーバー --------", "-------- Game Over --------"));
886 exe_write_diary(winner_ptr, DIARY_DESCRIPTION, 1, "\n\n\n\n");
892 /* Wait for response */
899 * Display some character info
902 bool check_score(player_type *current_player_ptr)
907 if (highscore_fd < 0)
909 msg_print(_("スコア・ファイルが使用できません。", "Score file unavailable."));
914 /* Wizard-mode pre-empts scoring */
915 if (current_world_ptr->noscore & 0x000F)
917 msg_print(_("ウィザード・モードではスコアが記録されません。", "Score not registered for wizards."));
922 /* Cheaters are not scored */
923 if (current_world_ptr->noscore & 0xFF00)
925 msg_print(_("詐欺をやった人はスコアが記録されません。", "Score not registered for cheaters."));
931 if (!current_world_ptr->total_winner && streq(current_player_ptr->died_from, _("強制終了", "Interrupting")))
933 msg_print(_("強制終了のためスコアが記録されません。", "Score not registered due to interruption."));
939 if (!current_world_ptr->total_winner && streq(current_player_ptr->died_from, _("途中終了", "Quitting")))
941 msg_print(_("途中終了のためスコアが記録されません。", "Score not registered due to quitting."));