char b2 = ']';
char f = ' ';
- static char tmp[8];
+ static char tmp[10];
/* Initial */
s = (*sp);
else
v = "0";
}
+
+ /* Money */
+ else if (streq(b+1, "MONEY"))
+ {
+ sprintf(tmp, "%09d", p_ptr->au);
+ v = tmp;
+ }
}
/* Constant */
case RACE_S_FAIRY:
add_flag(flgs, TR_LEVITATION);
break;
- case RACE_KUTA:
+ case RACE_KUTAR:
add_flag(flgs, TR_RES_CONF);
break;
case RACE_ANDROID:
add_flag(flgs, TR_SUST_CON);
add_flag(flgs, TR_SUST_CHR);
}
+
+ /* Hex bonuses */
+ if (p_ptr->realm1 == REALM_HEX)
+ {
+ if (hex_spelling(HEX_DEMON_AURA))
+ {
+ add_flag(flgs, TR_SH_FIRE);
+ add_flag(flgs, TR_REGEN);
+ }
+ if (hex_spelling(HEX_ICE_ARMOR)) add_flag(flgs, TR_SH_COLD);
+ if (hex_spelling(HEX_SHOCK_CLOAK)) add_flag(flgs, TR_SH_ELEC);
+ }
}
fprintf(fff, p[i]);
}
}
+ else if (p_ptr->pclass == CLASS_MAGIC_EATER)
+ {
+ char s[EATER_EXT][MAX_NLEN];
+ int tval, ext, k_idx;
+ int i, magic_num;
+
+#ifdef JP
+ fprintf(fff, "\n\n [¼è¤ê¹þ¤ó¤ÀËâË¡Æ»¶ñ]\n");
+#else
+ fprintf(fff, "\n\n [Magic devices eaten]\n");
+#endif
+
+ for (ext = 0; ext < 3; ext++)
+ {
+ int eat_num = 0;
+
+ /* Dump an extent name */
+ switch (ext)
+ {
+ case 0:
+ tval = TV_STAFF;
+#ifdef JP
+ fprintf(fff, "\n[¾ó]\n");
+#else
+ fprintf(fff, "\n[Staffs]\n");
+#endif
+ break;
+ case 1:
+ tval = TV_WAND;
+#ifdef JP
+ fprintf(fff, "\n[ËâË¡ËÀ]\n");
+#else
+ fprintf(fff, "\n[Wands]\n");
+#endif
+ break;
+ case 2:
+ tval = TV_ROD;
+#ifdef JP
+ fprintf(fff, "\n[¥í¥Ã¥É]\n");
+#else
+ fprintf(fff, "\n[Rods]\n");
+#endif
+ break;
+ }
+
+ /* Get magic device names that were eaten */
+ for (i = 0; i < EATER_EXT; i++)
+ {
+ int idx = EATER_EXT * ext + i;
+
+ magic_num = p_ptr->magic_num2[idx];
+ if (!magic_num) continue;
+
+ k_idx = lookup_kind(tval, i);
+ if (!k_idx) continue;
+ sprintf(s[eat_num], "%23s (%2d)", (k_name + k_info[k_idx].name), magic_num);
+ eat_num++;
+ }
+
+ /* Dump magic devices in this extent */
+ if (eat_num > 0)
+ {
+ for (i = 0; i < eat_num; i++)
+ {
+ fputs(s[i], fff);
+ if (i % 3 < 2) fputs(" ", fff);
+ else fputs("\n", fff);
+ }
+
+ if (i % 3 > 0) fputs("\n", fff);
+ }
+ else /* Not found */
+ {
+#ifdef JP
+ fputs(" (¤Ê¤·)\n", fff);
+#else
+ fputs(" (none)\n", fff);
+#endif
+ }
+ }
+ }
}
/* Search for a shower string in the line */
if (shower)
{
- ptr = my_strstr(&lcstr[i], shower);
+ ptr = my_strstr(&lcstr[i], shower);
if (ptr) showercol = ptr - &lcstr[i];
}
/* Hold strings to find/show */
char finder_str[81];
char shower_str[81];
+ char back_str[81];
/* String to show */
cptr shower = NULL;
/* Get a special key code */
skey = inkey_special(TRUE);
- /* Show the help for the help */
- if (skey == '?')
+ switch (skey)
{
+ /* Show the help for the help */
+ case '?':
/* Hack - prevent silly recursion */
#ifdef JP
if (strcmp(name, "jhelpinfo.txt") != 0)
if (strcmp(name, "helpinfo.txt") != 0)
show_file(TRUE, "helpinfo.txt", NULL, 0, mode);
#endif
- }
+ break;
/* Hack -- try showing */
- if (skey == '=')
- {
+ case '=':
/* Get "shower" */
#ifdef JP
prt("¶¯Ä´: ", hgt - 1, 0);
prt("Show: ", hgt - 1, 0);
#endif
- (void)askfor(shower_str, 80);
-
- /* Make it lowercase */
- str_tolower(shower_str);
+ strcpy(back_str, shower_str);
+ if (askfor(shower_str, 80))
+ {
+ if (shower_str[0])
+ {
+ /* Make it lowercase */
+ str_tolower(shower_str);
- /* Show it */
- shower = shower_str;
- }
+ /* Show it */
+ shower = shower_str;
+ }
+ else shower = NULL; /* Stop showing */
+ }
+ else strcpy(shower_str, back_str);
+ break;
/* Hack -- try finding */
- if (skey == '/' || skey == KTRL('s'))
- {
+ case '/':
+ case KTRL('s'):
/* Get "finder" */
#ifdef JP
prt("¸¡º÷: ", hgt - 1, 0);
prt("Find: ", hgt - 1, 0);
#endif
-
+ strcpy(back_str, finder_str);
if (askfor(finder_str, 80))
{
- /* Find it */
- find = finder_str;
- back = line;
- line = line + 1;
+ if (finder_str[0])
+ {
+ /* Find it */
+ find = finder_str;
+ back = line;
+ line = line + 1;
- /* Make finder lowercase */
- str_tolower(finder_str);
+ /* Make finder lowercase */
+ str_tolower(finder_str);
- /* Show it */
- shower = finder_str;
+ /* Show it */
+ shower = finder_str;
+ }
+ else shower = NULL; /* Stop showing */
}
- }
+ else strcpy(finder_str, back_str);
+ break;
/* Hack -- go to a specific line */
- if (skey == '#')
- {
- char tmp[81];
+ case '#':
+ {
+ char tmp[81];
#ifdef JP
-prt("¹Ô: ", hgt - 1, 0);
+ prt("¹Ô: ", hgt - 1, 0);
#else
- prt("Goto Line: ", hgt - 1, 0);
+ prt("Goto Line: ", hgt - 1, 0);
#endif
- strcpy(tmp, "0");
+ strcpy(tmp, "0");
- if (askfor(tmp, 80))
- {
- line = atoi(tmp);
+ if (askfor(tmp, 80)) line = atoi(tmp);
}
- }
+ break;
/* Hack -- go to the top line */
- if (skey == SKEY_TOP)
- {
+ case SKEY_TOP:
line = 0;
- }
+ break;
/* Hack -- go to the bottom line */
- if (skey == SKEY_BOTTOM)
- {
- line = ((size-1)/rows)*rows;
- }
+ case SKEY_BOTTOM:
+ line = ((size - 1) / rows) * rows;
+ break;
/* Hack -- go to a specific file */
- if (skey == '%')
- {
- char tmp[81];
+ case '%':
+ {
+ char tmp[81];
#ifdef JP
-prt("¥Õ¥¡¥¤¥ë¡¦¥Í¡¼¥à: ", hgt - 1, 0);
-strcpy(tmp, "jhelp.hlp");
+ prt("¥Õ¥¡¥¤¥ë¡¦¥Í¡¼¥à: ", hgt - 1, 0);
+ strcpy(tmp, "jhelp.hlp");
#else
- prt("Goto File: ", hgt - 1, 0);
- strcpy(tmp, "help.hlp");
+ prt("Goto File: ", hgt - 1, 0);
+ strcpy(tmp, "help.hlp");
#endif
-
- if (askfor(tmp, 80))
- {
- if (!show_file(TRUE, tmp, NULL, 0, mode)) skey = 'q';
+ if (askfor(tmp, 80))
+ {
+ if (!show_file(TRUE, tmp, NULL, 0, mode)) skey = 'q';
+ }
}
- }
+ break;
/* Allow backing up */
- if (skey == '-')
- {
+ case '-':
line = line + (reverse ? rows : -rows);
if (line < 0) line = 0;
- }
+ break;
/* One page up */
- if (skey == SKEY_PGUP)
- {
+ case SKEY_PGUP:
line = line - rows;
if (line < 0) line = 0;
- }
+ break;
/* Advance a single line */
- if ((skey == '\n') || (skey == '\r'))
- {
+ case '\n':
+ case '\r':
line = line + (reverse ? -1 : 1);
if (line < 0) line = 0;
- }
-
+ break;
/* Move up / down */
- if (skey == '8' || skey == SKEY_UP)
- {
+ case '8':
+ case SKEY_UP:
line--;
if (line < 0) line = 0;
- }
+ break;
- if (skey == '2' || skey == SKEY_DOWN) line++;
+ case '2':
+ case SKEY_DOWN:
+ line++;
+ break;
/* Advance one page */
- if (skey == ' ')
- {
+ case ' ':
line = line + (reverse ? -rows : rows);
if (line < 0) line = 0;
- }
+ break;
/* One page down */
- if (skey == SKEY_PGDOWN)
- {
+ case SKEY_PGDOWN:
line = line + rows;
+ break;
}
/* Recurse on numbers */
strcpy (xtmp, "");
#ifdef JP
- if (!get_string("¥Õ¥¡¥¤¥ë̾: ", xtmp, 80))
+ if (!get_string("¥Õ¥¡¥¤¥ë̾: ", xtmp, 80)) continue;
#else
- if (!get_string("File name: ", xtmp, 80))
+ if (!get_string("File name: ", xtmp, 80)) continue;
#endif
- {
- continue;
- }
-
+
/* Close it */
my_fclose(fff);
if (!(fff && ffp))
{
#ifdef JP
-msg_print("¥Õ¥¡¥¤¥ë¤¬³«¤±¤Þ¤»¤ó¡£");
+ msg_print("¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó¡£");
#else
msg_print("Failed to open file.");
#endif
-
skey = ESCAPE;
break;
}
}
/* Return to last screen */
- if (skey == ESCAPE) break;
- if (skey == '<') break;
+ if ((skey == ESCAPE) || (skey == '<')) break;
/* Exit on the ^q */
if (skey == KTRL('q')) skey = 'q';