OSDN Git Service

ケケソキ
[hengband/hengband.git] / src / files.c
index f2b8a99..787c8cd 100644 (file)
@@ -586,7 +586,7 @@ errr process_pref_file_command(char *buf)
                            option_info[i].o_text &&
                            streq(option_info[i].o_text, buf + 2))
                        {
-                               if (alive && 6 == option_info[i].o_page)
+                               if (alive && 6 == option_info[i].o_page && !wizard)
                                {
 #ifdef JP
                                        msg_format("½é´ü¥ª¥×¥·¥ç¥ó¤ÏÊѹ¹¤Ç¤­¤Þ¤»¤ó! '%s'", buf);        
@@ -626,7 +626,7 @@ errr process_pref_file_command(char *buf)
                            option_info[i].o_text &&
                            streq(option_info[i].o_text, buf + 2))
                        {
-                               if (alive && 6 == option_info[i].o_page)
+                               if (alive && 6 == option_info[i].o_page && !wizard)
                                {
 #ifdef JP
                                        msg_format("½é´ü¥ª¥×¥·¥ç¥ó¤ÏÊѹ¹¤Ç¤­¤Þ¤»¤ó! '%s'", buf);        
@@ -2197,7 +2197,7 @@ static void display_player_various(void)
                        if (object_known_p(o_ptr)) damage[i] += o_ptr->to_d*100;
                        basedam = (o_ptr->dd * (o_ptr->ds + 1))*50;
                        object_flags(o_ptr, &f1, &f2, &f3);
-                       if ((o_ptr->ident & IDENT_MENTAL) && (o_ptr->name1 == ART_VORPAL_BLADE))
+                       if ((o_ptr->ident & IDENT_MENTAL) && ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)))
                        {
                                /* vorpal blade */
                                basedam *= 5;
@@ -2971,7 +2971,7 @@ static void display_player_flag_aux(int row, int col, char *header,
                                    u32b im_f[], u32b vul_f)
 {
        int     i;
-       u32b    f[3];
+       u32b    f[4];
        bool    vuln = FALSE;
 
        if ((vul_f & flag1) && !((im_f[0] | im_f[1] | im_f[2]) & flag1))
@@ -2987,13 +2987,14 @@ static void display_player_flag_aux(int row, int col, char *header,
        for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
        {
                object_type *o_ptr;
-               f[0] = f[1] = f[2] = 0L;
+               f[0] = f[1] = f[2] = f[3] = 0L;
 
                /* Object */
                o_ptr = &inventory[i];
 
                /* Known flags */
                object_flags_known(o_ptr, &f[0], &f[1], &f[2]);
+               f[3] = o_ptr->curse_flags;
 
                /* Default */
                c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
@@ -3008,6 +3009,7 @@ static void display_player_flag_aux(int row, int col, char *header,
 
        /* Player flags */
        player_flags(&f[0], &f[1], &f[2]);
+       f[3] = 0L;
 
        /* Default */
        c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
@@ -3017,6 +3019,7 @@ static void display_player_flag_aux(int row, int col, char *header,
 
        /* Timed player flags */
        tim_player_flags(&f[0], &f[1], &f[2], TRUE);
+       f[3] = 0L;
 
        /* Check flags */
        if (f[n-1] & flag1) c_put_str((byte)(vuln ? TERM_ORANGE : TERM_YELLOW), "#", row, col);
@@ -3132,7 +3135,7 @@ display_player_flag_aux(row+5, col, "
 display_player_flag_aux(row+6, col, "µÞ²óÉü    :", 3, TR3_REGEN, 0, im_f[2], vul_f[2]);
 display_player_flag_aux(row+7, col, "ÉâÍ·      :", 3, TR3_FEATHER, 0, im_f[2], vul_f[2]);
 display_player_flag_aux(row+8, col, "±Ê±ó¸÷¸»  :", 3, TR3_LITE, 0, im_f[2], vul_f[2]);
-display_player_flag_aux(row+9, col, "¼ö¤¤      :", 3, (TR3_CURSED | TR3_HEAVY_CURSE), TR3_PERMA_CURSE, im_f[2], vul_f[2]);
+display_player_flag_aux(row+9, col, "¼ö¤¤      :", 4, (TRC_CURSED | TRC_HEAVY_CURSE), TRC_PERMA_CURSE, im_f[2], vul_f[2]);
 #else
        display_player_flag_aux(row+0, col, "Speed     :", 1, TR1_SPEED, 0, im_f[0], vul_f[0]);
        display_player_flag_aux(row+1, col, "FreeAction:", 2, TR2_FREE_ACT, 0, im_f[1], vul_f[1]);
@@ -3143,7 +3146,7 @@ display_player_flag_aux(row+9, col, "
        display_player_flag_aux(row+6, col, "Regene.   :", 3, TR3_REGEN, 0, im_f[2], vul_f[2]);
        display_player_flag_aux(row+7, col, "Levitation:", 3, TR3_FEATHER, 0, im_f[2], vul_f[2]);
        display_player_flag_aux(row+8, col, "Perm Lite :", 3, TR3_LITE, 0, im_f[2], vul_f[2]);
-       display_player_flag_aux(row+9, col, "Cursed    :", 3, (TR3_CURSED | TR3_HEAVY_CURSE), TR3_PERMA_CURSE, im_f[2], vul_f[2]);
+       display_player_flag_aux(row+9, col, "Cursed    :", 4, (TRC_CURSED | TRC_HEAVY_CURSE), TRC_PERMA_CURSE, im_f[2], vul_f[2]);
 #endif
 
 }
@@ -3720,9 +3723,9 @@ NULL,
 "¥Æ¥ì¥Ý¡¼¥È",
 "È¿´¶",
 "½ËÊ¡",
-"¼ö¤¤",
-"½Å¤¤¼ö¤¤",
-"±Ê±ó¤Î¼ö¤¤"
+NULL,
+NULL,
+NULL,
 #else
        "NoTeleport",
        "AntiMagic",
@@ -3749,9 +3752,9 @@ NULL,
        "Teleport",
        "Aggravate",
        "Blessed",
-       "Cursed",
-       "Hvy Curse",
-       "Prm Curse"
+       NULL,
+       NULL,
+       NULL,
 #endif
 
 };
@@ -4127,6 +4130,8 @@ void display_player(int mode)
                /* Display "history" info */
                if (mode == 1)
                {
+                       char statmsg[1000];
+
 #ifdef JP
                        put_str("(¥­¥ã¥é¥¯¥¿¡¼¤ÎÀ¸¤¤Î©¤Á)", 11, 25);
 #else
@@ -4138,13 +4143,14 @@ void display_player(int mode)
                                put_str(history[i], i + 12, 10);
                        }
 
+                       *statmsg = '\0';
 
                        if (death && total_winner)
                        {
 #ifdef JP
-                               put_str("¡Ä¤¢¤Ê¤¿¤Ï¾¡Íø¤Î¸å°úÂष¤¿¡£", 5 + 12, 10);
+                               strcpy(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï¾¡Íø¤Î¸å°úÂष¤¿¡£");
 #else
-                               put_str("...You retired from the adventure after the winning.", 5 + 12, 10);
+                               strcpy(statmsg, "...You retired from the adventure after the winning.");
 #endif
                        }
                        else if (death)
@@ -4154,25 +4160,25 @@ void display_player(int mode)
                                        if (p_ptr->inside_quest && (p_ptr->inside_quest < MIN_RANDOM_QUEST))
                                        {
 #ifdef JP
-                                               put_str(format("¡Ä¤¢¤Ê¤¿¤Ï ¥¯¥¨¥¹¥È¡Ö%s¡×¤Ç»à¤ó¤À¡£", quest[p_ptr->inside_quest].name), 5 + 12, 10);
+                                               sprintf(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï¡¢¥¯¥¨¥¹¥È¡Ö%s¡×¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£", quest[p_ptr->inside_quest].name, died_from);
 #else
-                                               put_str(format("...You died in the quest '%s'.", quest[p_ptr->inside_quest].name), 5 + 12, 10);
+                                               sprintf(statmsg, "...You were killed by %s in the quest '%s'.", died_from, quest[p_ptr->inside_quest].name);
 #endif
                                        }
                                        else
                                        {                                       
 #ifdef JP
-                                               put_str(format("¡Ä¤¢¤Ê¤¿¤Ï %s ¤Î %d ³¬¤Ç»à¤ó¤À¡£", map_name(), dun_level), 5 + 12, 10);
+                                               sprintf(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï¡¢%s¤Î%d³¬¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£", map_name(), dun_level, died_from);
 #else
-                                               put_str(format("...You died on level %d of %s.", dun_level, map_name()), 5 + 12, 10);
+                                               sprintf(statmsg, "...You were killed by %s on level %d of %s.", died_from, dun_level, map_name());
 #endif
                                        }
                                }
                                else
 #ifdef JP
-                                       put_str(format("¡Ä¤¢¤Ê¤¿¤Ï %s ¤Ç»à¤ó¤À¡£", map_name()), 5 + 12, 10);
+                                       sprintf(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£", map_name(), died_from);
 #else
-                                       put_str(format("...You died in %s.", map_name()), 5 + 12, 10);
+                                       sprintf(statmsg, "...You were killed by %s in %s.", died_from, map_name());
 #endif
                        }
                        else if (character_dungeon)
@@ -4182,27 +4188,45 @@ void display_player(int mode)
                                        if (p_ptr->inside_quest && (p_ptr->inside_quest < MIN_RANDOM_QUEST))
                                        {
 #ifdef JP
-                                               put_str(format("¡Ä¤¢¤Ê¤¿¤Ï¸½ºß¡¢ ¥¯¥¨¥¹¥È¡Ö%s¡×¤ò¿ë¹ÔÃæ¤À¡£", quest[p_ptr->inside_quest].name), 5 + 12, 10);
+                                               sprintf(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï¸½ºß¡¢ ¥¯¥¨¥¹¥È¡Ö%s¡×¤ò¿ë¹ÔÃæ¤À¡£", quest[p_ptr->inside_quest].name);
 #else
-                                               put_str(format("...Now, you are in the quest '%s'.", quest[p_ptr->inside_quest].name), 5 + 12, 10);
+                                               sprintf(statmsg, "...Now, you are in the quest '%s'.", quest[p_ptr->inside_quest].name);
 #endif
                                        }                                                       
                                        else
                                        {
 #ifdef JP
-                                               put_str(format("¡Ä¤¢¤Ê¤¿¤Ï¸½ºß¡¢ %s ¤Î %d ³¬¤Çõº÷¤·¤Æ¤¤¤ë¡£", map_name(), dun_level), 5 + 12, 10);
+                                               sprintf(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï¸½ºß¡¢ %s ¤Î %d ³¬¤Çõº÷¤·¤Æ¤¤¤ë¡£", map_name(), dun_level);
 #else
-                                               put_str(format("...Now, you are exploring level %d of %s.", dun_level, map_name()), 5 + 12, 10);
+                                               sprintf(statmsg, "...Now, you are exploring level %d of %s.", dun_level, map_name());
 #endif
                                        }
                                }
                                else
 #ifdef JP
-                                       put_str(format("¡Ä¤¢¤Ê¤¿¤Ï¸½ºß¡¢ %s ¤Ë¤¤¤ë¡£", map_name()), 5 + 12, 10);
+                                       sprintf(statmsg, "¡Ä¤¢¤Ê¤¿¤Ï¸½ºß¡¢ %s ¤Ë¤¤¤ë¡£", map_name());
 #else
-                                       put_str(format("...Now, you are in %s.", map_name()), 5 + 12, 10);
+                                       sprintf(statmsg, "...Now, you are in %s.", map_name());
 #endif
                        }
+
+                       if (*statmsg)
+                       {
+                               char temp[64*2], *t;
+                               roff_to_buf(statmsg, 60, temp);
+                               t = temp;
+                               for(i=0 ; i<2 ; i++)
+                               {
+                                       if(t[0]==0)
+                                               break; 
+                                       else
+                                       {
+                                               put_str(t, i + 5 + 12, 10);
+                                               t += strlen(t)+1;
+                                       }
+                               }
+                       }
+
                }
 
                /* Display "various" info */
@@ -4305,7 +4329,7 @@ errr make_character_dump(FILE *fff)
        display_player(1);
 
        /* Dump part of the screen */
-       for (y = 10; y < 18; y++)
+       for (y = 10; y < 19; y++)
        {
                /* Dump each row */
                for (x = 0; x < 79; x++)
@@ -5912,9 +5936,9 @@ void do_cmd_suicide(void)
        {
                /* Verify */
 #ifdef JP
-if (!get_check("°úÂष¤Þ¤¹¤«? ")) return;
+if (!get_check_strict("°úÂष¤Þ¤¹¤«? ", CHECK_NO_HISTORY)) return;
 #else
-               if (!get_check("Do you want to retire? ")) return;
+               if (!get_check_strict("Do you want to retire? ", CHECK_NO_HISTORY)) return;
 #endif
 
        }
@@ -6810,9 +6834,9 @@ if (!save_player()) msg_print("
                        if ((!send_world_score(do_send)))
                        {
 #ifdef JP
-                               if (get_check("¸å¤Ç¥¹¥³¥¢¤òÅÐÏ¿¤¹¤ë¤¿¤á¤ËÂÔµ¡¤·¤Þ¤¹¤«¡©"))
+                               if (get_check_strict("¸å¤Ç¥¹¥³¥¢¤òÅÐÏ¿¤¹¤ë¤¿¤á¤ËÂÔµ¡¤·¤Þ¤¹¤«¡©", (CHECK_NO_ESCAPE | CHECK_NO_HISTORY)))
 #else
-                               if (get_check("Stand by for later score registration? "))
+                               if (get_check_strict("Stand by for later score registration? ", (CHECK_NO_ESCAPE | CHECK_NO_HISTORY)))
 #endif
                                {
                                        wait_report_score = TRUE;