• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision68a46327809aa9491916d159246e21a28302c6aa (tree)
Time2002-07-21 16:38:12
Authorhabu <habu@0568...>
Commiterhabu

Log Message

キャラクタダンプにクエストの達成・失敗の情報を出力するようにした。

Change Summary

Incremental Difference

--- a/src/files.c
+++ b/src/files.c
@@ -4254,7 +4254,7 @@ errr make_character_dump(FILE *fff)
42544254 store_type *st_ptr;
42554255 char o_name[MAX_NLEN];
42564256 char buf[1024];
4257-
4257+ int total;
42584258
42594259 #ifdef JP
42604260 fprintf(fff, " [変愚蛮怒 %d.%d.%d キャラクタ情報]\n\n",
@@ -4392,6 +4392,153 @@ errr make_character_dump(FILE *fff)
43924392 if (pet) fprintf(fff, "\n");
43934393 }
43944394
4395+#ifdef JP
4396+ fprintf(fff, "\n [クエスト情報] \n");
4397+#else
4398+ fprintf(fff, "\n [Quest information] \n");
4399+#endif
4400+
4401+#ifdef JP
4402+ fprintf(fff, "\n《達成したクエスト》\n");
4403+#else
4404+ fprintf(fff, "\n< Completed Quest >\n");
4405+#endif
4406+ total = 0;
4407+ for (i = 1; i < max_quests; i++)
4408+ {
4409+ /* No info from "silent" quests */
4410+ if (quest[i].flags & QUEST_FLAG_SILENT) continue;
4411+
4412+ if (quest[i].status == QUEST_STATUS_FINISHED)
4413+ {
4414+ int old_quest;
4415+
4416+ total++;
4417+
4418+ if (i < MIN_RANDOM_QUEST)
4419+ {
4420+ /* Set the quest number temporary */
4421+ old_quest = p_ptr->inside_quest;
4422+ p_ptr->inside_quest = i;
4423+
4424+ /* Get the quest */
4425+ init_flags = INIT_ASSIGN;
4426+
4427+ process_dungeon_file("q_info_j.txt", 0, 0, 0, 0);
4428+
4429+ /* Reset the old quest number */
4430+ p_ptr->inside_quest = old_quest;
4431+ }
4432+
4433+ if ((i >= MIN_RANDOM_QUEST) && quest[i].r_idx)
4434+ {
4435+ /* Print the quest info */
4436+
4437+ if (quest[i].complev == 0)
4438+ {
4439+ fprintf(fff,
4440+#ifdef JP
4441+ " %s (%d階) - 不戦勝\n",
4442+#else
4443+ " %s (Dungeon level: %d) - (Cancelled)\n",
4444+#endif
4445+ r_name+r_info[quest[i].r_idx].name,
4446+ quest[i].level);
4447+ }
4448+ else
4449+ {
4450+ fprintf(fff,
4451+#ifdef JP
4452+ " %s (%d階) - レベル%d\n",
4453+#else
4454+ " %s (Dungeon level: %d) - level %d\n",
4455+#endif
4456+ r_name+r_info[quest[i].r_idx].name,
4457+ quest[i].level,
4458+ quest[i].complev);
4459+ }
4460+ }
4461+ else
4462+ {
4463+ /* Print the quest info */
4464+#ifdef JP
4465+ fprintf(fff, " %s (危険度:%d階相当) - レベル%d\n",
4466+#else
4467+ fprintf(fff, " %s (Danger level: %d) - level %d\n",
4468+#endif
4469+
4470+ quest[i].name, quest[i].level, quest[i].complev);
4471+ }
4472+ }
4473+ }
4474+#ifdef JP
4475+ if (!total) fprintf(fff, " なし\n");
4476+#else
4477+ if (!total) fprintf(fff, " Nothing.\n");
4478+#endif
4479+
4480+#ifdef JP
4481+ fprintf(fff, "\n《失敗したクエスト》\n");
4482+#else
4483+ fprintf(fff, "\n< Failed Quest >\n");
4484+#endif
4485+ total = 0;
4486+ for (i = 1; i < max_quests; i++)
4487+ {
4488+ /* No info from "silent" quests */
4489+ if (quest[i].flags & QUEST_FLAG_SILENT) continue;
4490+
4491+ if ((quest[i].status == QUEST_STATUS_FAILED_DONE) || (quest[i].status == QUEST_STATUS_FAILED))
4492+ {
4493+ int old_quest;
4494+
4495+ total++;
4496+
4497+ if (i < MIN_RANDOM_QUEST)
4498+ {
4499+ /* Set the quest number temporary */
4500+ old_quest = p_ptr->inside_quest;
4501+ p_ptr->inside_quest = i;
4502+
4503+ /* Get the quest text */
4504+ init_flags = INIT_ASSIGN;
4505+
4506+ process_dungeon_file("q_info_j.txt", 0, 0, 0, 0);
4507+
4508+ /* Reset the old quest number */
4509+ p_ptr->inside_quest = old_quest;
4510+ }
4511+
4512+ if ((i >= MIN_RANDOM_QUEST) && quest[i].r_idx)
4513+ {
4514+ /* Print the quest info */
4515+#ifdef JP
4516+ fprintf(fff, " %s (%d階) - レベル%d\n",
4517+#else
4518+ fprintf(fff, " %s (Dungeon level: %d) - level %d\n",
4519+#endif
4520+
4521+ r_name+r_info[quest[i].r_idx].name, quest[i].level, quest[i].complev);
4522+ }
4523+ else
4524+ {
4525+ /* Print the quest info */
4526+#ifdef JP
4527+ fprintf(fff, " %s (危険度:%d階相当) - レベル%d\n",
4528+#else
4529+ fprintf(fff, " %s (Danger level: %d) - level %d\n",
4530+#endif
4531+
4532+ quest[i].name, quest[i].level, quest[i].complev);
4533+ }
4534+ }
4535+ }
4536+#ifdef JP
4537+ if (!total) fprintf(fff, " なし\n");
4538+#else
4539+ if (!total) fprintf(fff, " Nothing.\n");
4540+#endif
4541+
43954542 if (p_ptr->is_dead && !p_ptr->total_winner)
43964543 {
43974544 #ifdef JP
Show on old repository browser