OSDN Git Service

経験値を吸い取る能力(TRC_DRAIN_EXP)がアンドロイドの強化度も吸い取って不気味だったので、アンドロイドでは無効になるように修正。
[hengbandforosx/hengbandosx.git] / src / dungeon.c
index c2702a8..955eeea 100644 (file)
@@ -198,7 +198,8 @@ o_name, index_to_label(slot),game_inscriptions[feel]);
        /* Auto-inscription/destroy */
        idx = is_autopick(o_ptr);
        auto_inscribe_item(slot, idx);
-       auto_destroy_item(slot, idx, FALSE);
+        if (destroy_feeling)
+                auto_destroy_item(slot, idx, FALSE);
 
        /* Combine / Reorder the pack (later) */
        p_ptr->notice |= (PN_COMBINE | PN_REORDER);
@@ -672,6 +673,14 @@ msg_format("%d 
        /* Change level */
        dun_level = command_arg;
 
+       leave_quest_check();
+
+       if (record_stair) do_cmd_write_nikki(NIKKI_PAT_TELE,0,NULL);
+
+       p_ptr->inside_quest = 0;
+       p_ptr->leftbldg = FALSE;
+       energy_use = 0;
+
        /* Leaving */
        p_ptr->leaving = TRUE;
 }
@@ -1335,7 +1344,7 @@ static void gere_music(s32b music)
                 case MUSIC_DETECT:
                 case MUSIC_DETECT+1:
                 case MUSIC_DETECT+2:
-                       detect_traps(DETECT_RAD_DEFAULT);
+                       detect_traps(DETECT_RAD_DEFAULT, TRUE);
                        detect_doors(DETECT_RAD_DEFAULT);
                        detect_stairs(DETECT_RAD_DEFAULT);
                        if ((p_ptr->lev > 14)  && (music  < MUSIC_DETECT+3)) p_ptr->magic_num1[0] = music+1;
@@ -3386,7 +3395,8 @@ if (!get_rnd_line("chainswd_j.txt", 0, noise))
                        (void)activate_ty_curse(FALSE, &count);
                }
                /* Handle experience draining */
-               if ((p_ptr->cursed & TRC_DRAIN_EXP) && one_in_(4))
+               if (p_ptr->prace != RACE_ANDROID && 
+                       ((p_ptr->cursed & TRC_DRAIN_EXP) && one_in_(4)))
                {
                        p_ptr->exp -= (p_ptr->lev+1)/2;
                        if (p_ptr->exp < 0) p_ptr->exp = 0;
@@ -5052,7 +5062,7 @@ msg_print("
 #ifdef JP
                                msg_print("±Â¤À¤±¿©¤ï¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª¤¯¤Ã¤½¡Á¡ª");
 #else
-                               msg_print("Damn! The fish took a bait away!");
+                               msg_print("Damn!  The fish stole your bait!");
 #endif
                        }
                        disturb(0, 0);
@@ -5766,10 +5776,7 @@ static void dungeon(bool load_game)
        character_xtra = TRUE;
 
        /* Window stuff */
-       p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
-
-       /* Window stuff */
-       p_ptr->window |= (PW_MONSTER);
+       p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_MONSTER | PW_OVERHEAD | PW_DUNGEON);
 
        /* Redraw dungeon */
        p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_EQUIPPY);
@@ -5777,14 +5784,14 @@ static void dungeon(bool load_game)
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
-       p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
        /* Update stuff */
        p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
 
-       /* Calculate torch radius */
-       p_ptr->update |= (PU_TORCH);
+       /* Update lite/view */
+       p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE | PU_TORCH);
+
+       /* Update monsters */
+       p_ptr->update |= (PU_MONSTERS | PU_DISTANCE | PU_FLOW);
 
        /* Update stuff */
        update_stuff();
@@ -5795,16 +5802,6 @@ static void dungeon(bool load_game)
        /* Redraw stuff */
        window_stuff();
 
-       /* Update stuff */
-       p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_DISTANCE | PU_MON_LITE);
-       p_ptr->update |= (PU_MONSTERS);/*¼«Ê¬¤Ç¸÷¤Ã¤Æ¤¤¤ë¥â¥ó¥¹¥¿¡¼¤Î°Ù */
-
-       /* Update stuff */
-       update_stuff();
-
-       /* Redraw stuff */
-       redraw_stuff();
-
        /* Leave "xtra" mode */
        character_xtra = FALSE;
 
@@ -6264,7 +6261,7 @@ quit("
                character_icky = TRUE;
 
                /* Build the filename */
-               path_build(buf, 1024, ANGBAND_DIR_APEX, "scores.raw");
+               path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
 
                /* Open the high score file, for reading/writing */
                highscore_fd = fd_open(buf, O_RDWR);
@@ -6528,7 +6525,11 @@ prt("
 
 
        /* Hack -- Enter wizard mode */
-       if (arg_wizard && enter_wizard_mode()) p_ptr->wizard = TRUE;
+       if (arg_wizard)
+        {
+                if (enter_wizard_mode()) p_ptr->wizard = TRUE;
+                else if (p_ptr->is_dead) quit("Already dead.");
+        }
 
        /* Initialize the town-buildings if necessary */
        if (!dun_level && !p_ptr->inside_quest)