OSDN Git Service

[Refactor] #39963 Changed inclusion for spells.h to process-effect.c
[hengband/hengband.git] / src / spells3.c
index 2fbf85e..ad04abe 100644 (file)
  */
 
 #include "angband.h"
-#include "bldg.h"
+#include "market/building.h"
 #include "core.h"
-#include "term.h"
+#include "gameterm.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 #include "object-ego.h"
 
 #include "creature.h"
 #include "avatar.h"
 #include "spells.h"
 #include "spells-floor.h"
+#include "spell/technic-info-table.h"
 #include "grid.h"
+#include "market/building-util.h"
 #include "monster-process.h"
 #include "monster-status.h"
 #include "monster-spell.h"
-#include "cmd-spell.h"
-#include "cmd-dump.h"
+#include "io/write-diary.h"
+#include "cmd/cmd-save.h"
+#include "cmd/cmd-spell.h"
+#include "cmd/cmd-dump.h"
 #include "snipe.h"
 #include "floor-save.h"
 #include "files.h"
 #include "player-effects.h"
 #include "player-skill.h"
 #include "player-personality.h"
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
 #include "mind.h"
 #include "wild.h"
 #include "world.h"
-#include "objectkind.h"
-#include "autopick.h"
+#include "object/object-kind.h"
+#include "autopick/autopick.h"
 #include "targeting.h"
+#include "effect/spells-effect-util.h"
+#include "spell/spells-util.h"
+#include "spell/spells-execution.h"
+#include "spell/process-effect.h"
 
 /*! テレポート先探索の試行数 / Maximum number of tries for teleporting */
 #define MAX_TRIES 100
@@ -77,7 +86,7 @@ static bool redraw_player(player_type *caster_ptr);
  * Attempt to move the monster at least "dis/2" grids away.
  * But allow variation to prevent infinite loops.
  */
-bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode)
+bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, teleport_flags mode)
 {
        monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[m_idx];
        if (!monster_is_valid(m_ptr)) return FALSE;
@@ -98,14 +107,10 @@ bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, BIT
        while (look)
        {
                tries++;
-
-               /* Verify max distance */
                if (dis > 200) dis = 200;
 
-               /* Try several locations */
                for (int i = 0; i < 500; i++)
                {
-                       /* Pick a (possibly illegal) location */
                        while (TRUE)
                        {
                                ny = rand_spread(oy, dis);
@@ -114,12 +119,8 @@ bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, BIT
                                if ((d >= min) && (d <= dis)) break;
                        }
 
-                       /* Ignore illegal locations */
                        if (!in_bounds(caster_ptr->current_floor_ptr, ny, nx)) continue;
-
-                       if (!cave_monster_teleportable_bold(m_idx, ny, nx, mode)) continue;
-
-                       /* No teleporting into vaults and such */
+                       if (!cave_monster_teleportable_bold(caster_ptr, m_idx, ny, nx, mode)) continue;
                        if (!(caster_ptr->current_floor_ptr->inside_quest || caster_ptr->current_floor_ptr->inside_arena))
                                if (caster_ptr->current_floor_ptr->grid_array[ny][nx].info & CAVE_ICKY) continue;
 
@@ -127,31 +128,22 @@ bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, BIT
                        break;
                }
 
-               /* Increase the maximum distance */
                dis = dis * 2;
-
                min = min / 2;
                if (tries > MAX_TRIES) return FALSE;
        }
 
        sound(SOUND_TPOTHER);
-
-       /* Update the old location */
        caster_ptr->current_floor_ptr->grid_array[oy][ox].m_idx = 0;
-
-       /* Update the new location */
        caster_ptr->current_floor_ptr->grid_array[ny][nx].m_idx = m_idx;
 
-       /* Move the monster */
        m_ptr->fy = ny;
        m_ptr->fx = nx;
 
-       /* Forget the counter target */
        reset_target(m_ptr);
-
        update_monster(caster_ptr, m_idx, TRUE);
-       lite_spot(oy, ox);
-       lite_spot(ny, nx);
+       lite_spot(caster_ptr, oy, ox);
+       lite_spot(caster_ptr, ny, nx);
 
        if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
                caster_ptr->update |= (PU_MON_LITE);
@@ -171,12 +163,10 @@ bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, BIT
  * @param mode オプション
  * @return なし
  */
-void teleport_monster_to(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode)
+void teleport_monster_to(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, teleport_flags mode)
 {
        monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[m_idx];
        if(!m_ptr->r_idx) return;
-
-       /* "Skill" test */
        if(randint1(100) > power) return;
 
        POSITION ny = m_ptr->fy;
@@ -190,13 +180,10 @@ void teleport_monster_to(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION ty
        bool look = TRUE;
        while (look && --attempts)
        {
-               /* Verify max distance */
                if (dis > 200) dis = 200;
 
-               /* Try several locations */
                for (int i = 0; i < 500; i++)
                {
-                       /* Pick a (possibly illegal) location */
                        while (TRUE)
                        {
                                ny = rand_spread(ty, dis);
@@ -205,39 +192,29 @@ void teleport_monster_to(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION ty
                                if ((d >= min) && (d <= dis)) break;
                        }
 
-                       /* Ignore illegal locations */
                        if (!in_bounds(caster_ptr->current_floor_ptr, ny, nx)) continue;
-
-                       if (!cave_monster_teleportable_bold(m_idx, ny, nx, mode)) continue;
+                       if (!cave_monster_teleportable_bold(caster_ptr, m_idx, ny, nx, mode)) continue;
 
                        look = FALSE;
                        break;
                }
 
-               /* Increase the maximum distance */
                dis = dis * 2;
-
-               /* Decrease the minimum distance */
                min = min / 2;
        }
 
        if (attempts < 1) return;
 
        sound(SOUND_TPOTHER);
-
-       /* Update the old location */
        caster_ptr->current_floor_ptr->grid_array[oy][ox].m_idx = 0;
-
-       /* Update the new location */
        caster_ptr->current_floor_ptr->grid_array[ny][nx].m_idx = m_idx;
 
-       /* Move the monster */
        m_ptr->fy = ny;
        m_ptr->fx = nx;
 
        update_monster(caster_ptr, m_idx, TRUE);
-       lite_spot(oy, ox);
-       lite_spot(ny, nx);
+       lite_spot(caster_ptr, oy, ox);
+       lite_spot(caster_ptr, ny, nx);
 
        if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
                caster_ptr->update |= (PU_MON_LITE);
@@ -249,6 +226,7 @@ void teleport_monster_to(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION ty
  * Teleport the player to a location up to "dis" grids away.
  * @param creature_ptr プレーヤーへの参照ポインタ
  * @param dis 基本移動距離
+ * @param is_quantum_effect 量子的効果 (反テレポ無効)によるテレポートアウェイならばTRUE
  * @param mode オプション
  * @return 実際にテレポート処理が行われたらtrue
  * @details
@@ -267,10 +245,10 @@ void teleport_monster_to(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION ty
  * of candidates has equal possibility to be choosen as a destination.
  * </pre>
  */
-bool teleport_player_aux(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode)
+bool teleport_player_aux(player_type *creature_ptr, POSITION dis, bool is_quantum_effect, teleport_flags mode)
 {
        if (creature_ptr->wild_mode) return FALSE;
-       if (creature_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
+       if (!is_quantum_effect && creature_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
        {
                msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
                return FALSE;
@@ -280,10 +258,8 @@ bool teleport_player_aux(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode
        for (int i = 0; i <= MAX_TELEPORT_DISTANCE; i++)
                candidates_at[i] = 0;
 
-       /* Limit the distance */
        if (dis > MAX_TELEPORT_DISTANCE) dis = MAX_TELEPORT_DISTANCE;
 
-       /* Search valid locations */
        int left = MAX(1, creature_ptr->x - dis);
        int right = MIN(creature_ptr->current_floor_ptr->width - 2, creature_ptr->x + dis);
        int top = MAX(1, creature_ptr->y - dis);
@@ -293,38 +269,26 @@ bool teleport_player_aux(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode
        {
                for (POSITION x = left; x <= right; x++)
                {
-                       /* Skip illegal locations */
-                       if (!cave_player_teleportable_bold(y, x, mode)) continue;
+                       if (!cave_player_teleportable_bold(creature_ptr, y, x, mode)) continue;
 
-                       /* Calculate distance */
                        int d = distance(creature_ptr->y, creature_ptr->x, y, x);
-
-                       /* Skip too far locations */
                        if (d > dis) continue;
 
-                       /* Count the total number of candidates */
                        total_candidates++;
-
-                       /* Count the number of candidates in this circumference */
                        candidates_at[d]++;
                }
        }
 
-       /* No valid location! */
        if (0 == total_candidates) return FALSE;
 
-       /* Fix the minimum distance */
        int cur_candidates;
        int min = dis;
        for (cur_candidates = 0; min >= 0; min--)
        {
                cur_candidates += candidates_at[min];
-
-               /* 50% of all candidates will have an equal chance to be choosen. */
                if (cur_candidates && (cur_candidates >= total_candidates / 2)) break;
        }
 
-       /* Pick up a single location randomly */
        int pick = randint1(cur_candidates);
 
        /* Search again the choosen location */
@@ -333,40 +297,31 @@ bool teleport_player_aux(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode
        {
                for (xx = left; xx <= right; xx++)
                {
-                       /* Skip illegal locations */
-                       if (!cave_player_teleportable_bold(yy, xx, mode)) continue;
+                       if (!cave_player_teleportable_bold(creature_ptr, yy, xx, mode)) continue;
 
-                       /* Calculate distance */
                        int d = distance(creature_ptr->y, creature_ptr->x, yy, xx);
-
-                       /* Skip too far locations */
                        if (d > dis) continue;
-
-                       /* Skip too close locations */
                        if (d < min) continue;
 
-                       /* This grid was picked up? */
                        pick--;
                        if (!pick) break;
                }
 
-               /* Exit the loop */
                if (!pick) break;
        }
 
        if (player_bold(creature_ptr, yy, xx)) return FALSE;
 
        sound(SOUND_TELEPORT);
-
 #ifdef JP
-       if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+       if (IS_ECHIZEN(creature_ptr))
                msg_format("『こっちだぁ、%s』", creature_ptr->name);
 #endif
-
        (void)move_player_effect(creature_ptr, yy, xx, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
        return TRUE;
 }
 
+
 /*!
  * @brief プレイヤーのテレポート処理メインルーチン
  * @param creature_ptr プレーヤーへの参照ポインタ
@@ -376,7 +331,7 @@ bool teleport_player_aux(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode
  */
 void teleport_player(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode)
 {
-       if (!teleport_player_aux(creature_ptr, dis, mode)) return;
+       if (!teleport_player_aux(creature_ptr, dis, FALSE, mode)) return;
 
        /* Monsters with teleport ability may follow the player */
        POSITION oy = creature_ptr->y;
@@ -394,12 +349,12 @@ void teleport_player(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode)
                        monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[tmp_m_idx];
                        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
-                       bool is_resistible = r_ptr->a_ability_flags2 & RF6_TPORT;
-                       is_resistible &= !(r_ptr->flagsr & RFR_RES_TELE);
-                       is_resistible &= !MON_CSLEEP(m_ptr);
+                       bool is_resistible = (r_ptr->a_ability_flags2 & RF6_TPORT) != 0;
+                       is_resistible &= (r_ptr->flagsr & RFR_RES_TELE) == 0;
+                       is_resistible &= MON_CSLEEP(m_ptr) == 0;
                        if (is_resistible)
                        {
-                               teleport_monster_to(creature_ptr, tmp_m_idx, creature_ptr->y, creature_ptr->x, r_ptr->level, 0L);
+                               teleport_monster_to(creature_ptr, tmp_m_idx, creature_ptr->y, creature_ptr->x, r_ptr->level, TELEPORT_SPONTANEOUS);
                        }
                }
        }
@@ -411,11 +366,12 @@ void teleport_player(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode)
  * @param m_idx アウェイを試みたモンスターID
  * @param target_ptr プレーヤーへの参照ポインタ
  * @param dis テレポート距離
+ * @param is_quantum_effect 量子的効果によるテレポートアウェイならばTRUE
  * @return なし
  */
-void teleport_player_away(MONSTER_IDX m_idx, player_type *target_ptr, POSITION dis)
+void teleport_player_away(MONSTER_IDX m_idx, player_type *target_ptr, POSITION dis, bool is_quantum_effect)
 {
-       if (!teleport_player_aux(target_ptr, dis, TELEPORT_PASSIVE)) return;
+       if (!teleport_player_aux(target_ptr, dis, TELEPORT_PASSIVE, is_quantum_effect)) return;
 
        /* Monsters with teleport ability may follow the player */
        POSITION oy = target_ptr->y;
@@ -436,12 +392,12 @@ void teleport_player_away(MONSTER_IDX m_idx, player_type *target_ptr, POSITION d
                        monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[tmp_m_idx];
                        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
-                       bool is_resistible = r_ptr->a_ability_flags2 & RF6_TPORT;
-                       is_resistible &= !(r_ptr->flagsr & RFR_RES_TELE);
-                       is_resistible &= !MON_CSLEEP(m_ptr);
+                       bool is_resistible = (r_ptr->a_ability_flags2 & RF6_TPORT) != 0;
+                       is_resistible &= (r_ptr->flagsr & RFR_RES_TELE) == 0;
+                       is_resistible &= MON_CSLEEP(m_ptr) == 0;
                        if (is_resistible)
                        {
-                               teleport_monster_to(target_ptr, tmp_m_idx, target_ptr->y, target_ptr->x, r_ptr->level, 0L);
+                               teleport_monster_to(target_ptr, tmp_m_idx, target_ptr->y, target_ptr->x, r_ptr->level, TELEPORT_SPONTANEOUS);
                        }
                }
        }
@@ -462,7 +418,7 @@ void teleport_player_away(MONSTER_IDX m_idx, player_type *target_ptr, POSITION d
  * This function allows teleporting into vaults (!)
  * </pre>
  */
-void teleport_player_to(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mode)
+void teleport_player_to(player_type *creature_ptr, POSITION ny, POSITION nx, teleport_flags mode)
 {
        if (creature_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
        {
@@ -475,7 +431,6 @@ void teleport_player_to(player_type *creature_ptr, POSITION ny, POSITION nx, BIT
        POSITION dis = 0, ctr = 0;
        while (TRUE)
        {
-               /* Pick a nearby legal location */
                while (TRUE)
                {
                        y = (POSITION)rand_spread(ny, dis);
@@ -483,13 +438,14 @@ void teleport_player_to(player_type *creature_ptr, POSITION ny, POSITION nx, BIT
                        if (in_bounds(creature_ptr->current_floor_ptr, y, x)) break;
                }
 
-               /* Accept any grid when wizard mode */
-               if (current_world_ptr->wizard && !(mode & TELEPORT_PASSIVE) && (!creature_ptr->current_floor_ptr->grid_array[y][x].m_idx || (creature_ptr->current_floor_ptr->grid_array[y][x].m_idx == creature_ptr->riding))) break;
+               bool is_anywhere = current_world_ptr->wizard;
+               is_anywhere &= (mode & TELEPORT_PASSIVE) == 0;
+               is_anywhere &= (creature_ptr->current_floor_ptr->grid_array[y][x].m_idx > 0) ||
+                       creature_ptr->current_floor_ptr->grid_array[y][x].m_idx == creature_ptr->riding;
+               if (is_anywhere) break;
 
-               /* Accept teleportable floor grids */
-               if (cave_player_teleportable_bold(y, x, mode)) break;
+               if (cave_player_teleportable_bold(creature_ptr, y, x, mode)) break;
 
-               /* Occasionally advance the distance */
                if (++ctr > (4 * dis * dis + 4 * dis + 1))
                {
                        ctr = 0;
@@ -510,11 +466,11 @@ void teleport_away_followable(player_type *tracer_ptr, MONSTER_IDX m_idx)
        bool old_ml = m_ptr->ml;
        POSITION old_cdis = m_ptr->cdis;
 
-       teleport_away(tracer_ptr, m_idx, MAX_SIGHT * 2 + 5, 0L);
+       teleport_away(tracer_ptr, m_idx, MAX_SIGHT * 2 + 5, TELEPORT_SPONTANEOUS);
 
        bool is_followable = old_ml;
        is_followable &= old_cdis <= MAX_SIGHT;
-       is_followable &= !current_world_ptr->timewalk_m_idx;
+       is_followable &= current_world_ptr->timewalk_m_idx == 0;
        is_followable &= !tracer_ptr->phase_out;
        is_followable &= los(tracer_ptr, tracer_ptr->y, tracer_ptr->x, oldfy, oldfx);
        if (!is_followable) return;
@@ -553,7 +509,7 @@ void teleport_away_followable(player_type *tracer_ptr, MONSTER_IDX m_idx)
        }
        else
        {
-               teleport_player_to(tracer_ptr, m_ptr->fy, m_ptr->fx, 0L);
+               teleport_player_to(tracer_ptr, m_ptr->fy, m_ptr->fx, TELEPORT_SPONTANEOUS);
        }
 
        tracer_ptr->energy_need += ENERGY_NEED();
@@ -573,7 +529,7 @@ bool teleport_level_other(player_type *caster_ptr)
        m_ptr = &caster_ptr->current_floor_ptr->m_list[target_m_idx];
        r_ptr = &r_info[m_ptr->r_idx];
        GAME_TEXT m_name[MAX_NLEN];
-       monster_desc(m_name, m_ptr, 0);
+       monster_desc(caster_ptr, m_name, m_ptr, 0);
        msg_format(_("%^sの足を指さした。", "You gesture at %^s's feet."), m_name);
 
        if ((r_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE)) ||
@@ -591,6 +547,7 @@ bool teleport_level_other(player_type *caster_ptr)
 
 
 /*!
+ * todo cmd-save.h への依存あり。コールバックで何とかしたい
  * @brief プレイヤー及びモンスターをレベルテレポートさせる /
  * Teleport the player one level up or down (random when legal)
  * @param creature_ptr プレーヤーへの参照ポインタ
@@ -601,34 +558,29 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
 {
        GAME_TEXT m_name[160];
        bool see_m = TRUE;
-       if (m_idx <= 0) /* To player */
+       if (m_idx <= 0)
        {
                strcpy(m_name, _("あなた", "you"));
        }
-       else /* To monster */
+       else
        {
                monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[m_idx];
-
-               /* Get the monster name (or "it") */
-               monster_desc(m_name, m_ptr, 0);
-
+               monster_desc(creature_ptr, m_name, m_ptr, 0);
                see_m = is_seen(m_ptr);
        }
 
-       /* No effect in some case */
        if (is_teleport_level_ineffective(creature_ptr, m_idx))
        {
                if (see_m) msg_print(_("効果がなかった。", "There is no effect."));
                return;
        }
 
-       if ((m_idx <= 0) && creature_ptr->anti_tele) /* To player */
+       if ((m_idx <= 0) && creature_ptr->anti_tele)
        {
                msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
                return;
        }
 
-       /* Choose up or down */
        bool go_up;
        if (randint0(100) < 50) go_up = TRUE;
        else go_up = FALSE;
@@ -639,7 +591,6 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
                else if (get_check("Force to go down? ")) go_up = FALSE;
        }
 
-       /* Down only */ 
        if ((ironman_downward && (m_idx <= 0)) || (creature_ptr->current_floor_ptr->dun_level <= d_info[creature_ptr->dungeon_idx].mindepth))
        {
 #ifdef JP
@@ -647,7 +598,7 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
 #else
                if (see_m) msg_format("%^s sink%s through the floor.", m_name, (m_idx <= 0) ? "" : "s");
 #endif
-               if (m_idx <= 0) /* To player */
+               if (m_idx <= 0)
                {
                        if (!creature_ptr->current_floor_ptr->dun_level)
                        {
@@ -656,7 +607,7 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
                                creature_ptr->oldpx = creature_ptr->x;
                        }
 
-                       if (record_stair) exe_write_diary(creature_ptr, NIKKI_TELE_LEV, 1, NULL);
+                       if (record_stair) exe_write_diary(creature_ptr, DIARY_TELEPORT_LEVEL, 1, NULL);
 
                        if (autosave_l) do_cmd_save_game(creature_ptr, TRUE);
 
@@ -673,8 +624,6 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
                        creature_ptr->leaving = TRUE;
                }
        }
-
-       /* Up only */
        else if (quest_number(creature_ptr, creature_ptr->current_floor_ptr->dun_level) || (creature_ptr->current_floor_ptr->dun_level >= d_info[creature_ptr->dungeon_idx].maxdepth))
        {
 #ifdef JP
@@ -683,10 +632,9 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
                if (see_m) msg_format("%^s rise%s up through the ceiling.", m_name, (m_idx <= 0) ? "" : "s");
 #endif
 
-
-               if (m_idx <= 0) /* To player */
+               if (m_idx <= 0)
                {
-                       if (record_stair) exe_write_diary(creature_ptr, NIKKI_TELE_LEV, -1, NULL);
+                       if (record_stair) exe_write_diary(creature_ptr, DIARY_TELEPORT_LEVEL, -1, NULL);
 
                        if (autosave_l) do_cmd_save_game(creature_ptr, TRUE);
 
@@ -705,10 +653,9 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
                if (see_m) msg_format("%^s rise%s up through the ceiling.", m_name, (m_idx <= 0) ? "" : "s");
 #endif
 
-
-               if (m_idx <= 0) /* To player */
+               if (m_idx <= 0)
                {
-                       if (record_stair) exe_write_diary(creature_ptr, NIKKI_TELE_LEV, -1, NULL);
+                       if (record_stair) exe_write_diary(creature_ptr, DIARY_TELEPORT_LEVEL, -1, NULL);
 
                        if (autosave_l) do_cmd_save_game(creature_ptr, TRUE);
 
@@ -724,11 +671,9 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
                if (see_m) msg_format("%^s sink%s through the floor.", m_name, (m_idx <= 0) ? "" : "s");
 #endif
 
-               if (m_idx <= 0) /* To player */
+               if (m_idx <= 0)
                {
-                       /* Never reach this code on the surface */
-                       /* if (!creature_ptr->current_floor_ptr->dun_level) creature_ptr->dungeon_idx = creature_ptr->recall_dungeon; */
-                       if (record_stair) exe_write_diary(creature_ptr, NIKKI_TELE_LEV, 1, NULL);
+                       if (record_stair) exe_write_diary(creature_ptr, DIARY_TELEPORT_LEVEL, 1, NULL);
                        if (autosave_l) do_cmd_save_game(creature_ptr, TRUE);
 
                        prepare_change_floor_mode(creature_ptr, CFM_SAVE_FLOORS | CFM_DOWN | CFM_RAND_PLACE | CFM_RAND_CONNECT);
@@ -736,7 +681,6 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
                }
        }
 
-       /* Monster level teleportation is simple deleting now */
        if (m_idx <= 0)
        {
                sound(SOUND_TPLEVEL);
@@ -749,11 +693,11 @@ void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx)
        {
                char m2_name[MAX_NLEN];
 
-               monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
-               exe_write_diary(creature_ptr, NIKKI_NAMED_PET, RECORD_NAMED_PET_TELE_LEVEL, m2_name);
+               monster_desc(creature_ptr, m2_name, m_ptr, MD_INDEF_VISIBLE);
+               exe_write_diary(creature_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_TELE_LEVEL, m2_name);
        }
 
-       delete_monster_idx(m_idx);
+       delete_monster_idx(creature_ptr, m_idx);
        sound(SOUND_TPLEVEL);
 }
 
@@ -771,8 +715,6 @@ bool recall_player(player_type *creature_ptr, TIME_EFFECT turns)
         * TODO: Recall the player to the last
         * visited town when in the wilderness
         */
-
-       /* Ironman option */
        if (creature_ptr->current_floor_ptr->inside_arena || ironman_downward)
        {
                msg_print(_("何も起こらなかった。", "Nothing happens."));
@@ -789,7 +731,7 @@ bool recall_player(player_type *creature_ptr, TIME_EFFECT turns)
                {
                        max_dlv[creature_ptr->dungeon_idx] = creature_ptr->current_floor_ptr->dun_level;
                        if (record_maxdepth)
-                               exe_write_diary(creature_ptr, NIKKI_TRUMP, creature_ptr->dungeon_idx, _("帰還のときに", "when recall from dungeon"));
+                               exe_write_diary(creature_ptr, DIARY_TRUMP, creature_ptr->dungeon_idx, _("帰還のときに", "when recalled from dungeon"));
                }
 
        }
@@ -820,12 +762,9 @@ bool recall_player(player_type *creature_ptr, TIME_EFFECT turns)
 bool free_level_recall(player_type *creature_ptr)
 {
        DUNGEON_IDX select_dungeon = choose_dungeon(_("にテレポート", "teleport"), 4, 0);
-
        if (!select_dungeon) return FALSE;
 
        DEPTH max_depth = d_info[select_dungeon].maxdepth;
-
-       /* Limit depth in Angband */
        if (select_dungeon == DUNGEON_ANGBAND)
        {
                if (quest[QUEST_OBERON].status != QUEST_STATUS_FINISHED) max_depth = 98;
@@ -834,7 +773,6 @@ bool free_level_recall(player_type *creature_ptr)
 
        QUANTITY amt = get_quantity(format(_("%sの何階にテレポートしますか?", "Teleport to which level of %s? "),
                d_name + d_info[select_dungeon].name), (QUANTITY)max_depth);
-
        if (amt <= 0)
        {
                return FALSE;
@@ -844,7 +782,7 @@ bool free_level_recall(player_type *creature_ptr)
        creature_ptr->recall_dungeon = select_dungeon;
        max_dlv[creature_ptr->recall_dungeon] = ((amt > d_info[select_dungeon].maxdepth) ? d_info[select_dungeon].maxdepth : ((amt < d_info[select_dungeon].mindepth) ? d_info[select_dungeon].mindepth : amt));
        if (record_maxdepth)
-               exe_write_diary(creature_ptr, NIKKI_TRUMP, select_dungeon, _("トランプタワーで", "at Trump Tower"));
+               exe_write_diary(creature_ptr, DIARY_TRUMP, select_dungeon, _("トランプタワーで", "at Trump Tower"));
 
        msg_print(_("回りの大気が張りつめてきた...", "The air about you becomes charged..."));
 
@@ -865,8 +803,6 @@ bool reset_recall(player_type *caster_ptr)
        char tmp_val[160];
 
        select_dungeon = choose_dungeon(_("をセット", "reset"), 2, 14);
-
-       /* Ironman option */
        if (ironman_downward)
        {
                msg_print(_("何も起こらなかった。", "Nothing happens."));
@@ -874,20 +810,15 @@ bool reset_recall(player_type *caster_ptr)
        }
 
        if (!select_dungeon) return FALSE;
-       /* Prompt */
        sprintf(ppp, _("何階にセットしますか (%d-%d):", "Reset to which level (%d-%d): "),
                (int)d_info[select_dungeon].mindepth, (int)max_dlv[select_dungeon]);
-
-       /* Default */
        sprintf(tmp_val, "%d", (int)MAX(caster_ptr->current_floor_ptr->dun_level, 1));
 
-       /* Ask for a level */
        if (!get_string(ppp, tmp_val, 10))
        {
                return FALSE;
        }
 
-       /* Extract request */
        dummy = atoi(tmp_val);
        if (dummy < 1) dummy = 1;
        if (dummy > max_dlv[select_dungeon]) dummy = max_dlv[select_dungeon];
@@ -896,8 +827,7 @@ bool reset_recall(player_type *caster_ptr)
        max_dlv[select_dungeon] = dummy;
 
        if (record_maxdepth)
-               exe_write_diary(caster_ptr, NIKKI_TRUMP, select_dungeon, _("フロア・リセットで", "using a scroll of reset recall"));
-       /* Accept request */
+               exe_write_diary(caster_ptr, DIARY_TRUMP, select_dungeon, _("フロア・リセットで", "using a scroll of reset recall"));
 #ifdef JP
        msg_format("%sの帰還レベルを %d 階にセット。", d_name + d_info[select_dungeon].name, dummy, dummy * 50);
 #else
@@ -932,24 +862,18 @@ bool apply_disenchant(player_type *target_ptr, BIT_FLAGS mode)
 
        object_type *o_ptr;
        o_ptr = &target_ptr->inventory_list[t];
-
-       /* No item, nothing happens */
        if (!o_ptr->k_idx) return FALSE;
 
-       /* Disenchant equipments only -- No disenchant on monster ball */
        if (!object_is_weapon_armour_ammo(o_ptr))
                return FALSE;
 
-       /* Nothing to disenchant */
        if ((o_ptr->to_h <= 0) && (o_ptr->to_d <= 0) && (o_ptr->to_a <= 0) && (o_ptr->pval <= 1))
        {
                return FALSE;
        }
 
        GAME_TEXT o_name[MAX_NLEN];
-       object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
-
-       /* Artifacts have 71% chance to resist */
+       object_desc(target_ptr, o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
        if (object_is_artifact(o_ptr) && (randint0(100) < 71))
        {
 #ifdef JP
@@ -961,26 +885,20 @@ bool apply_disenchant(player_type *target_ptr, BIT_FLAGS mode)
                return TRUE;
        }
        
-       /* Memorize old value */
        int to_h = o_ptr->to_h;
        int to_d = o_ptr->to_d;
        int to_a = o_ptr->to_a;
        int pval = o_ptr->pval;
 
-       /* Disenchant tohit */
        if (o_ptr->to_h > 0) o_ptr->to_h--;
        if ((o_ptr->to_h > 5) && (randint0(100) < 20)) o_ptr->to_h--;
 
-       /* Disenchant todam */
        if (o_ptr->to_d > 0) o_ptr->to_d--;
        if ((o_ptr->to_d > 5) && (randint0(100) < 20)) o_ptr->to_d--;
 
-       /* Disenchant toac */
        if (o_ptr->to_a > 0) o_ptr->to_a--;
        if ((o_ptr->to_a > 5) && (randint0(100) < 20)) o_ptr->to_a--;
 
-       /* Disenchant pval (occasionally) */
-       /* Unless called from wild_magic() */
        if ((o_ptr->pval > 1) && one_in_(13) && !(mode & 0x01)) o_ptr->pval--;
 
        bool is_actually_disenchanted = to_h != o_ptr->to_h;
@@ -995,7 +913,6 @@ bool apply_disenchant(player_type *target_ptr, BIT_FLAGS mode)
        msg_format("Your %s (%c) %s disenchanted!", o_name, index_to_label(t),
                ((o_ptr->number != 1) ? "were" : "was"));
 #endif
-
        chg_virtue(target_ptr, V_HARMONY, 1);
        chg_virtue(target_ptr, V_ENCHANT, -2);
        target_ptr->update |= (PU_BONUS);
@@ -1019,7 +936,6 @@ bool vanish_dungeon(player_type *caster_ptr)
        is_special_floor |= !caster_ptr->current_floor_ptr->dun_level;
        if (is_special_floor) return FALSE;
 
-       /* Scan all normal grids */
        grid_type *g_ptr;
        feature_type *f_ptr;
        monster_type *m_ptr;
@@ -1030,62 +946,42 @@ bool vanish_dungeon(player_type *caster_ptr)
                {
                        g_ptr = &caster_ptr->current_floor_ptr->grid_array[y][x];
 
-                       /* Seeing true feature code (ignore mimic) */
                        f_ptr = &f_info[g_ptr->feat];
-
-                       /* Lose room and vault */
                        g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
-
                        m_ptr = &caster_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
-
-                       /* Awake monster */
                        if (g_ptr->m_idx && MON_CSLEEP(m_ptr))
                        {
                                (void)set_monster_csleep(caster_ptr, g_ptr->m_idx, 0);
-
-                               /* Notice the "waking up" */
                                if (m_ptr->ml)
                                {
-                                       monster_desc(m_name, m_ptr, 0);
+                                       monster_desc(caster_ptr, m_name, m_ptr, 0);
                                        msg_format(_("%^sが目を覚ました。", "%^s wakes up."), m_name);
                                }
                        }
 
-                       /* Process all walls, doors and patterns */
                        if (have_flag(f_ptr->flags, FF_HURT_DISI)) cave_alter_feat(caster_ptr, y, x, FF_HURT_DISI);
                }
        }
 
-       /* Special boundary walls -- Top and bottom */
        for (POSITION x = 0; x < caster_ptr->current_floor_ptr->width; x++)
        {
                g_ptr = &caster_ptr->current_floor_ptr->grid_array[0][x];
                f_ptr = &f_info[g_ptr->mimic];
-
-               /* Lose room and vault */
                g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
 
-               /* Set boundary mimic if needed */
                if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
                {
-                       g_ptr->mimic = feat_state(g_ptr->mimic, FF_HURT_DISI);
-
-                       /* Check for change to boring grid */
+                       g_ptr->mimic = feat_state(caster_ptr, g_ptr->mimic, FF_HURT_DISI);
                        if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
                }
 
                g_ptr = &caster_ptr->current_floor_ptr->grid_array[caster_ptr->current_floor_ptr->height - 1][x];
                f_ptr = &f_info[g_ptr->mimic];
-
-               /* Lose room and vault */
                g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
 
-               /* Set boundary mimic if needed */
                if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
                {
-                       g_ptr->mimic = feat_state(g_ptr->mimic, FF_HURT_DISI);
-
-                       /* Check for change to boring grid */
+                       g_ptr->mimic = feat_state(caster_ptr, g_ptr->mimic, FF_HURT_DISI);
                        if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
                }
        }
@@ -1095,43 +991,32 @@ bool vanish_dungeon(player_type *caster_ptr)
        {
                g_ptr = &caster_ptr->current_floor_ptr->grid_array[y][0];
                f_ptr = &f_info[g_ptr->mimic];
-
-               /* Lose room and vault */
                g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
 
-               /* Set boundary mimic if needed */
                if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
                {
-                       g_ptr->mimic = feat_state(g_ptr->mimic, FF_HURT_DISI);
-
-                       /* Check for change to boring grid */
+                       g_ptr->mimic = feat_state(caster_ptr, g_ptr->mimic, FF_HURT_DISI);
                        if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
                }
 
                g_ptr = &caster_ptr->current_floor_ptr->grid_array[y][caster_ptr->current_floor_ptr->width - 1];
                f_ptr = &f_info[g_ptr->mimic];
-
-               /* Lose room and vault */
                g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
 
-               /* Set boundary mimic if needed */
                if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI))
                {
-                       g_ptr->mimic = feat_state(g_ptr->mimic, FF_HURT_DISI);
-
-                       /* Check for change to boring grid */
+                       g_ptr->mimic = feat_state(caster_ptr, g_ptr->mimic, FF_HURT_DISI);
                        if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER)) g_ptr->info &= ~(CAVE_MARK);
                }
        }
 
-       /* Mega-Hack -- Forget the view and lite */
        caster_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
        caster_ptr->redraw |= (PR_MAP);
        caster_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
        return TRUE;
 }
 
+
 /*!
  * @brief 虚無招来処理 /
  * @param caster_ptr プレーヤーへの参照ポインタ
@@ -1178,7 +1063,6 @@ void call_the_void(player_type *caster_ptr)
                return;
        }
 
-       /* Prevent destruction of quest levels and town */
        bool is_special_fllor = caster_ptr->current_floor_ptr->inside_quest && is_fixed_quest_idx(caster_ptr->current_floor_ptr->inside_quest);
        is_special_fllor |= !caster_ptr->current_floor_ptr->dun_level;
        if (is_special_fllor)
@@ -1199,7 +1083,7 @@ void call_the_void(player_type *caster_ptr)
 
        if (one_in_(666))
        {
-               if (!vanish_dungeon(caster_ptr)) msg_print(_("ダンジョンは一瞬静まり返った。", "The dungeon silences a moment."));
+               if (!vanish_dungeon(caster_ptr)) msg_print(_("ダンジョンは一瞬静まり返った。", "The dungeon becomes quiet for a moment."));
                take_hit(caster_ptr, DAMAGE_NOESCAPE, 100 + randint1(150), _("自殺的な虚無招来", "a suicidal Call the Void"), -1);
                return;
        }
@@ -1227,7 +1111,6 @@ void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los)
        object_type *o_ptr;
        GAME_TEXT o_name[MAX_NLEN];
 
-       /* Check to see if an object is already there */
        if (caster_ptr->current_floor_ptr->grid_array[caster_ptr->y][caster_ptr->x].o_idx)
        {
                msg_print(_("自分の足の下にある物は取れません。", "You can't fetch when you're already standing on something."));
@@ -1247,22 +1130,18 @@ void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los)
                }
 
                g_ptr = &caster_ptr->current_floor_ptr->grid_array[ty][tx];
-
-               /* We need an item to fetch */
                if (!g_ptr->o_idx)
                {
                        msg_print(_("そこには何もありません。", "There is no object at this place."));
                        return;
                }
 
-               /* No fetching from vault */
                if (g_ptr->info & CAVE_ICKY)
                {
                        msg_print(_("アイテムがコントロールを外れて落ちた。", "The item slips from your control."));
                        return;
                }
 
-               /* We need to see the item */
                if (require_los)
                {
                        if (!player_has_los_bold(caster_ptr, ty, tx))
@@ -1296,10 +1175,8 @@ void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los)
        }
 
        o_ptr = &caster_ptr->current_floor_ptr->o_list[g_ptr->o_idx];
-
        if (o_ptr->weight > wgt)
        {
-               /* Too heavy to 'fetch' */
                msg_print(_("そのアイテムは重過ぎます。", "The object is too heavy."));
                return;
        }
@@ -1312,10 +1189,10 @@ void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los)
        o_ptr->iy = caster_ptr->y;
        o_ptr->ix = caster_ptr->x;
 
-       object_desc(o_name, o_ptr, OD_NAME_ONLY);
+       object_desc(caster_ptr, o_name, o_ptr, OD_NAME_ONLY);
        msg_format(_("%^sがあなたの足元に飛んできた。", "%^s flies through the air to your feet."), o_name);
 
-       note_spot(caster_ptr->y, caster_ptr->x);
+       note_spot(caster_ptr, caster_ptr->y, caster_ptr->x);
        caster_ptr->redraw |= PR_MAP;
 }
 
@@ -1327,7 +1204,6 @@ void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los)
  */
 void reserve_alter_reality(player_type *caster_ptr)
 {
-       /* Ironman option */
        if (caster_ptr->current_floor_ptr->inside_arena || ironman_downward)
        {
                msg_print(_("何も起こらなかった。", "Nothing happens."));
@@ -1337,7 +1213,7 @@ void reserve_alter_reality(player_type *caster_ptr)
        if (caster_ptr->alter_reality)
        {
                caster_ptr->alter_reality = 0;
-               msg_print(_("景色が元に戻った...", "The view around you got back..."));
+               msg_print(_("景色が元に戻った...", "The view around you returns to normal..."));
                caster_ptr->redraw |= PR_STATUS;
                return;
        }
@@ -1358,17 +1234,12 @@ void reserve_alter_reality(player_type *caster_ptr)
  */
 void identify_pack(player_type *target_ptr)
 {
-       INVENTORY_IDX i;
-
-       /* Simply identify and know every item */
-       for (i = 0; i < INVEN_TOTAL; i++)
+       for (INVENTORY_IDX i = 0; i < INVEN_TOTAL; i++)
        {
                object_type *o_ptr = &target_ptr->inventory_list[i];
                if (!o_ptr->k_idx) continue;
 
                identify_item(target_ptr, o_ptr);
-
-               /* Auto-inscription */
                autopick_alter_item(target_ptr, i, FALSE);
        }
 }
@@ -1397,14 +1268,8 @@ static int remove_curse_aux(player_type *creature_ptr, int all)
        {
                object_type *o_ptr = &creature_ptr->inventory_list[i];
                if (!o_ptr->k_idx) continue;
-
-               /* Uncursed already */
                if (!object_is_cursed(o_ptr)) continue;
-
-               /* Heavily Cursed Items need a special spell */
                if (!all && (o_ptr->curse_flags & TRC_HEAVY_CURSE)) continue;
-
-               /* Perma-Cursed Items can NEVER be uncursed */
                if (o_ptr->curse_flags & TRC_PERMA_CURSE)
                {
                        o_ptr->curse_flags &= (TRC_CURSED | TRC_HEAVY_CURSE | TRC_PERMA_CURSE);
@@ -1417,15 +1282,11 @@ static int remove_curse_aux(player_type *creature_ptr, int all)
 
                creature_ptr->update |= (PU_BONUS);
                creature_ptr->window |= (PW_EQUIP);
-
-               /* Count the uncursings */
                cnt++;
        }
 
        if (cnt)
-       {
                msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
-       }
        
        return cnt;
 }
@@ -1466,51 +1327,45 @@ bool alchemy(player_type *caster_ptr)
        if (command_arg > 0) force = TRUE;
 
        concptr q = _("どのアイテムを金に変えますか?", "Turn which item to gold? ");
-       concptr s = _("金に変えられる物がありません。", "You have nothing to current_world_ptr->game_turn to gold.");
+       concptr s = _("金に変えられる物がありません。", "You have nothing to turn to gold.");
        OBJECT_IDX item;
        object_type *o_ptr;
        o_ptr = choose_object(caster_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
        if (!o_ptr) return FALSE;
 
-       /* See how many items */
        int amt = 1;
        if (o_ptr->number > 1)
        {
                amt = get_quantity(NULL, o_ptr->number);
-
-               /* Allow user abort */
                if (amt <= 0) return FALSE;
        }
 
        ITEM_NUMBER old_number = o_ptr->number;
        o_ptr->number = amt;
        GAME_TEXT o_name[MAX_NLEN];
-       object_desc(o_name, o_ptr, 0);
+       object_desc(caster_ptr, o_name, o_ptr, 0);
        o_ptr->number = old_number;
 
-       /* Verify unless quantity given */
        if (!force)
        {
                if (confirm_destroy || (object_value(o_ptr) > 0))
                {
-                       /* Make a verification */
                        char out_val[MAX_NLEN + 40];
-                       sprintf(out_val, _("本当に%sを金に変えますか?", "Really current_world_ptr->game_turn %s to gold? "), o_name);
+                       sprintf(out_val, _("本当に%sを金に変えますか?", "Really turn %s to gold? "), o_name);
                        if (!get_check(out_val)) return FALSE;
                }
        }
 
-       /* Artifacts cannot be destroyed */
        if (!can_player_destroy_object(o_ptr))
        {
-               msg_format(_("%sを金に変えることに失敗した。", "You fail to current_world_ptr->game_turn %s to gold!"), o_name);
+               msg_format(_("%sを金に変えることに失敗した。", "You fail to turn %s to gold!"), o_name);
                return FALSE;
        }
 
        PRICE price = object_value_real(o_ptr);
        if (price <= 0)
        {
-               msg_format(_("%sをニセの金に変えた。", "You current_world_ptr->game_turn %s to fool's gold."), o_name);
+               msg_format(_("%sをニセの金に変えた。", "You turn %s to fool's gold."), o_name);
                vary_item(caster_ptr, item, -amt);
                return TRUE;
        }
@@ -1520,7 +1375,7 @@ bool alchemy(player_type *caster_ptr)
        if (amt > 1) price *= amt;
 
        if (price > 30000) price = 30000;
-       msg_format(_("%sを$%d の金に変えた。", "You current_world_ptr->game_turn %s to %ld coins worth of gold."), o_name, price);
+       msg_format(_("%sを$%d の金に変えた。", "You turn %s to %ld coins worth of gold."), o_name, price);
 
        caster_ptr->au += price;
        caster_ptr->redraw |= PR_GOLD;
@@ -1541,14 +1396,13 @@ bool artifact_scroll(player_type *caster_ptr)
 
        concptr q = _("どのアイテムを強化しますか? ", "Enchant which item? ");
        concptr s = _("強化できるアイテムがない。", "You have nothing to enchant.");
-
        object_type *o_ptr;
        OBJECT_IDX item;
        o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
        if (!o_ptr) return FALSE;
 
        GAME_TEXT o_name[MAX_NLEN];
-       object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
+       object_desc(caster_ptr, o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 #ifdef JP
        msg_format("%s は眩い光を発した!",o_name);
 #else
@@ -1565,7 +1419,6 @@ bool artifact_scroll(player_type *caster_ptr)
 #endif
                okay = FALSE;
        }
-
        else if (object_is_ego(o_ptr))
        {
 #ifdef JP
@@ -1577,7 +1430,6 @@ bool artifact_scroll(player_type *caster_ptr)
 #endif
                okay = FALSE;
        }
-
        else if (o_ptr->xtra3)
        {
 #ifdef JP
@@ -1587,7 +1439,6 @@ bool artifact_scroll(player_type *caster_ptr)
                    ((o_ptr->number > 1) ? "customized items" : "a customized item"));
 #endif
        }
-
        else
        {
                if (o_ptr->number > 1)
@@ -1623,8 +1474,8 @@ bool artifact_scroll(player_type *caster_ptr)
 
        if (record_rand_art)
        {
-               object_desc(o_name, o_ptr, OD_NAME_ONLY);
-               exe_write_diary(caster_ptr, NIKKI_ART_SCROLL, 0, o_name);
+               object_desc(caster_ptr, o_name, o_ptr, OD_NAME_ONLY);
+               exe_write_diary(caster_ptr, DIARY_ART_SCROLL, 0, o_name);
        }
 
        chg_virtue(caster_ptr, V_ENCHANT, 1);
@@ -1643,13 +1494,13 @@ bool artifact_scroll(player_type *caster_ptr)
 bool identify_item(player_type *owner_ptr, object_type *o_ptr)
 {
        GAME_TEXT o_name[MAX_NLEN];
-       object_desc(o_name, o_ptr, 0);
+       object_desc(owner_ptr, o_name, o_ptr, 0);
 
        bool old_known = FALSE;
        if (o_ptr->ident & IDENT_KNOWN)
                old_known = TRUE;
 
-       if (!(o_ptr->ident & (IDENT_MENTAL)))
+       if (!OBJECT_IS_FULL_KNOWN(o_ptr))
        {
                if (object_is_artifact(o_ptr) || one_in_(5))
                        chg_virtue(owner_ptr, V_KNOWLEDGE, 1);
@@ -1665,12 +1516,12 @@ bool identify_item(player_type *owner_ptr, object_type *o_ptr)
        strcpy(record_o_name, o_name);
        record_turn = current_world_ptr->game_turn;
 
-       object_desc(o_name, o_ptr, OD_NAME_ONLY);
+       object_desc(owner_ptr, o_name, o_ptr, OD_NAME_ONLY);
 
        if(record_fix_art && !old_known && object_is_fixed_artifact(o_ptr))
-               exe_write_diary(owner_ptr, NIKKI_ART, 0, o_name);
+               exe_write_diary(owner_ptr, DIARY_ART, 0, o_name);
        if(record_rand_art && !old_known && o_ptr->art_name)
-               exe_write_diary(owner_ptr, NIKKI_ART, 0, o_name);
+               exe_write_diary(owner_ptr, DIARY_ART, 0, o_name);
 
        return old_known;
 }
@@ -1686,7 +1537,7 @@ bool identify_item(player_type *owner_ptr, object_type *o_ptr)
  * This routine does *not* automatically combine objects.
  * Returns TRUE if something was identified, else FALSE.
  */
-bool ident_spell(player_type *caster_ptr, bool only_equip)
+bool ident_spell(player_type *caster_ptr, bool only_equip, OBJECT_TYPE_VALUE item_tester_tval)
 {
        if (only_equip)
                item_tester_hook = item_tester_hook_identify_weapon_armour;
@@ -1709,7 +1560,6 @@ bool ident_spell(player_type *caster_ptr, bool only_equip)
        }
 
        concptr s = _("鑑定するべきアイテムがない。", "You have nothing to identify.");
-
        OBJECT_IDX item;
        object_type *o_ptr;
        o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
@@ -1718,7 +1568,7 @@ bool ident_spell(player_type *caster_ptr, bool only_equip)
        bool old_known = identify_item(caster_ptr, o_ptr);
 
        GAME_TEXT o_name[MAX_NLEN];
-       object_desc(o_name, o_ptr, 0);
+       object_desc(caster_ptr, o_name, o_ptr, 0);
        if (item >= INVEN_RARM)
        {
                msg_format(_("%^s: %s(%c)。", "%^s: %s (%c)."), describe_use(caster_ptr, item), o_name, index_to_label(item));
@@ -1783,6 +1633,7 @@ bool mundane_spell(player_type *owner_ptr, bool only_equip)
        return TRUE;
 }
 
+
 /*!
  * @brief アイテム*鑑定*のメインルーチン処理 /
  * Identify an object in the inventory (or on the floor)
@@ -1793,7 +1644,7 @@ bool mundane_spell(player_type *owner_ptr, bool only_equip)
  * Fully "identify" an object in the inventory -BEN-
  * This routine returns TRUE if an item was identified.
  */
-bool identify_fully(player_type *caster_ptr, bool only_equip)
+bool identify_fully(player_type *caster_ptr, bool only_equip, OBJECT_TYPE_VALUE item_tester_tval)
 {
        if (only_equip)
                item_tester_hook = item_tester_hook_identify_fully_weapon_armour;
@@ -1824,12 +1675,11 @@ bool identify_fully(player_type *caster_ptr, bool only_equip)
 
        bool old_known = identify_item(caster_ptr, o_ptr);
 
-       /* Mark the item as fully known */
-       o_ptr->ident |= (IDENT_MENTAL);
+       o_ptr->ident |= (IDENT_FULL_KNOWN);
        handle_stuff(caster_ptr);
 
        GAME_TEXT o_name[MAX_NLEN];
-       object_desc(o_name, o_ptr, 0);
+       object_desc(caster_ptr, o_name, o_ptr, 0);
        if (item >= INVEN_RARM)
        {
                msg_format(_("%^s: %s(%c)。", "%^s: %s (%c)."), describe_use(caster_ptr, item), o_name, index_to_label(item));
@@ -1843,7 +1693,7 @@ bool identify_fully(player_type *caster_ptr, bool only_equip)
                msg_format(_("床上: %s。", "On the ground: %s."), o_name);
        }
 
-       (void)screen_object(o_ptr, 0L);
+       (void)screen_object(caster_ptr, o_ptr, 0L);
        autopick_alter_item(caster_ptr, item, (bool)(destroy_identify && !old_known));
        return TRUE;
 }
@@ -1890,58 +1740,35 @@ bool recharge(player_type *caster_ptr, int power)
        bool is_recharge_successful = TRUE;
        if (o_ptr->tval == TV_ROD)
        {
-               /* Extract a recharge strength by comparing object level to power. */
                recharge_strength = ((power > lev / 2) ? (power - lev / 2) : 0) / 5;
-
-
-               /* Back-fire */
                if (one_in_(recharge_strength))
                {
-                       /* Activate the failure code. */
                        is_recharge_successful = FALSE;
                }
-
-               /* Recharge */
                else
                {
-                       /* Recharge amount */
                        recharge_amount = (power * damroll(3, 2));
-
-                       /* Recharge by that amount */
                        if (o_ptr->timeout > recharge_amount)
                                o_ptr->timeout -= recharge_amount;
                        else
                                o_ptr->timeout = 0;
                }
        }
-       
-       /* Recharge wand/staff */
        else
        {
-               /* Extract a recharge strength by comparing object level to power.
-                * Divide up a stack of wands' charges to calculate charge penalty.
-                */
                if ((o_ptr->tval == TV_WAND) && (o_ptr->number > 1))
                        recharge_strength = (100 + power - lev - (8 * o_ptr->pval / o_ptr->number)) / 15;
-
-               /* All staffs, unstacked wands. */
                else recharge_strength = (100 + power - lev - (8 * o_ptr->pval)) / 15;
+
                if (recharge_strength < 0) recharge_strength = 0;
 
-               /* Back-fire */
                if (one_in_(recharge_strength))
                {
-                       /* Activate the failure code. */
                        is_recharge_successful = FALSE;
                }
-
-               /* If the spell didn't backfire, recharge the wand or staff. */
                else
                {
-                       /* Recharge based on the standard number of charges. */
                        recharge_amount = randint1(1 + k_ptr->pval / 2);
-
-                       /* Multiple wands in a stack increase recharging somewhat. */
                        if ((o_ptr->tval == TV_WAND) && (o_ptr->number > 1))
                        {
                                recharge_amount +=
@@ -1950,23 +1777,14 @@ bool recharge(player_type *caster_ptr, int power)
                                if (recharge_amount > 12) recharge_amount = 12;
                        }
 
-                       /* But each staff in a stack gets fewer additional charges,
-                        * although always at least one.
-                        */
                        if ((o_ptr->tval == TV_STAFF) && (o_ptr->number > 1))
                        {
                                recharge_amount /= (TIME_EFFECT)o_ptr->number;
                                if (recharge_amount < 1) recharge_amount = 1;
                        }
 
-                       /* Recharge the wand or staff. */
                        o_ptr->pval += recharge_amount;
-
-
-                       /* Hack -- we no longer "know" the item */
                        o_ptr->ident &= ~(IDENT_KNOWN);
-
-                       /* Hack -- we no longer think the item is empty */
                        o_ptr->ident &= ~(IDENT_EMPTY);
                }
        }
@@ -1980,20 +1798,16 @@ bool recharge(player_type *caster_ptr, int power)
        GAME_TEXT o_name[MAX_NLEN];
        if (object_is_fixed_artifact(o_ptr))
        {
-               object_desc(o_name, o_ptr, OD_NAME_ONLY);
+               object_desc(caster_ptr, o_name, o_ptr, OD_NAME_ONLY);
                msg_format(_("魔力が逆流した!%sは完全に魔力を失った。", "The recharging backfires - %s is completely drained!"), o_name);
-
-               /* Artifact rods. */
                if ((o_ptr->tval == TV_ROD) && (o_ptr->timeout < 10000))
                        o_ptr->timeout = (o_ptr->timeout + 100) * 2;
-
-               /* Artifact wands and staffs. */
                else if ((o_ptr->tval == TV_WAND) || (o_ptr->tval == TV_STAFF))
                        o_ptr->pval = 0;
                return update_player(caster_ptr);
        }
        
-       object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
+       object_desc(caster_ptr, o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
        if (IS_WIZARD_CLASS(caster_ptr) || caster_ptr->pclass == CLASS_MAGIC_EATER || caster_ptr->pclass == CLASS_BLUE_MAGE)
        {
@@ -2099,17 +1913,14 @@ void display_spell_list(player_type *caster_ptr)
 
        clear_from(0);
 
-       /* They have too many spells to list */
        if (caster_ptr->pclass == CLASS_SORCERER) return;
        if (caster_ptr->pclass == CLASS_RED_MAGE) return;
-
        if (caster_ptr->pclass == CLASS_SNIPER)
        {
                display_snipe_list(caster_ptr);
                return;
        }
 
-       /* mind.c type classes */
        if ((caster_ptr->pclass == CLASS_MINDCRAFTER) ||
            (caster_ptr->pclass == CLASS_BERSERKER) ||
            (caster_ptr->pclass == CLASS_NINJA) ||
@@ -2119,16 +1930,15 @@ void display_spell_list(player_type *caster_ptr)
                PERCENTAGE minfail = 0;
                PLAYER_LEVEL plev = caster_ptr->lev;
                PERCENTAGE chance = 0;
-               mind_type       spell;
-               char            comment[80];
-               char            psi_desc[80];
-               int             use_mind;
+               mind_type spell;
+               char comment[80];
+               char psi_desc[80];
+               int use_mind;
                bool use_hp = FALSE;
 
                y = 1;
                x = 1;
 
-               /* Display a list of spells */
                prt("", y, x);
                put_str(_("名前", "Name"), y, x + 5);
                put_str(_("Lv   MP 失率 効果", "Lv Mana Fail Info"), y, x + 35);
@@ -2143,28 +1953,17 @@ void display_spell_list(player_type *caster_ptr)
                default:                use_mind = 0;break;
                }
 
-               /* Dump the spells */
-               int i;
-               for (i = 0; i < MAX_MIND_POWERS; i++)
+               for (int i = 0; i < MAX_MIND_POWERS; i++)
                {
                        byte a = TERM_WHITE;
-
-                       /* Access the available spell */
                        spell = mind_powers[use_mind].info[i];
                        if (spell.min_lev > plev) break;
 
-                       /* Get the failure rate */
                        chance = spell.fail;
-
-                       /* Reduce failure rate by "effective" level adjustment */
                        chance -= 3 * (caster_ptr->lev - spell.min_lev);
-
-                       /* Reduce failure rate by INT/WIS adjustment */
                        chance -= 3 * (adj_mag_stat[caster_ptr->stat_ind[mp_ptr->spell_stat]] - 1);
-
                        if (!use_hp)
                        {
-                               /* Not enough mana to cast */
                                if (spell.mana_cost > caster_ptr->csp)
                                {
                                        chance += 5 * (spell.mana_cost - caster_ptr->csp);
@@ -2173,7 +1972,6 @@ void display_spell_list(player_type *caster_ptr)
                        }
                        else
                        {
-                               /* Not enough hp to cast */
                                if (spell.mana_cost > caster_ptr->chp)
                                {
                                        chance += 100;
@@ -2181,23 +1979,15 @@ void display_spell_list(player_type *caster_ptr)
                                }
                        }
 
-                       /* Extract the minimum failure rate */
                        minfail = adj_mag_fail[caster_ptr->stat_ind[mp_ptr->spell_stat]];
-
-                       /* Minimum failure rate */
                        if (chance < minfail) chance = minfail;
 
-                       /* Stunning makes spells harder */
                        if (caster_ptr->stun > 50) chance += 25;
                        else if (caster_ptr->stun) chance += 15;
 
-                       /* Always a 5 percent chance of working */
                        if (chance > 95) chance = 95;
 
-                       /* Get info */
                        mindcraft_info(caster_ptr, comment, use_mind, i);
-
-                       /* Dump the spell */
                        sprintf(psi_desc, "  %c) %-30s%2d %4d %3d%%%s",
                            I2A(i), spell.name,
                            spell.min_lev, spell.mana_cost, chance, comment);
@@ -2208,30 +1998,18 @@ void display_spell_list(player_type *caster_ptr)
                return;
        }
 
-       /* Cannot read spellbooks */
        if (REALM_NONE == caster_ptr->realm1) return;
 
-       /* Normal spellcaster with books */
-
-       /* Scan books */
        for (int j = 0; j < ((caster_ptr->realm2 > REALM_NONE) ? 2 : 1); j++)
        {
-               /* Reset vertical */
                m[j] = 0;
-
-               /* Vertical location */
                y = (j < 3) ? 0 : (m[j - 3] + 2);
-
-               /* Horizontal location */
                x = 27 * (j % 3);
-
-               /* Scan spells */
                int n = 0;
                for (int i = 0; i < 32; i++)
                {
                        byte a = TERM_WHITE;
 
-                       /* Access the spell */
                        if (!is_magic((j < 1) ? caster_ptr->realm1 : caster_ptr->realm2))
                        {
                                s_ptr = &technic_info[((j < 1) ? caster_ptr->realm1 : caster_ptr->realm2) - MIN_TECHNIC][i % 32];
@@ -2243,48 +2021,33 @@ void display_spell_list(player_type *caster_ptr)
 
                        strcpy(name, exe_spell(caster_ptr, (j < 1) ? caster_ptr->realm1 : caster_ptr->realm2, i % 32, SPELL_NAME));
 
-                       /* Illegible */
                        if (s_ptr->slevel >= 99)
                        {
-                               /* Illegible */
                                strcpy(name, _("(判読不能)", "(illegible)"));
-
-                               /* Unusable */
                                a = TERM_L_DARK;
                        }
-
-                       /* Forgotten */
                        else if ((j < 1) ?
                                ((caster_ptr->spell_forgotten1 & (1L << i))) :
                                ((caster_ptr->spell_forgotten2 & (1L << (i % 32)))))
                        {
-                               /* Forgotten */
                                a = TERM_ORANGE;
                        }
-
-                       /* Unknown */
                        else if (!((j < 1) ?
                                (caster_ptr->spell_learned1 & (1L << i)) :
                                (caster_ptr->spell_learned2 & (1L << (i % 32)))))
                        {
-                               /* Unknown */
                                a = TERM_RED;
                        }
-
-                       /* Untried */
                        else if (!((j < 1) ?
                                (caster_ptr->spell_worked1 & (1L << i)) :
                                (caster_ptr->spell_worked2 & (1L << (i % 32)))))
                        {
-                               /* Untried */
                                a = TERM_YELLOW;
                        }
 
-                       /* Dump the spell --(-- */
                        sprintf(out_val, "%c/%c) %-20.20s",
                                I2A(n / 8), I2A(n % 8), name);
 
-                       /* Track maximum */
                        m[j] = y + n;
                        Term_putstr(x, m[j], -1, a, out_val);
                        n++;
@@ -2325,21 +2088,13 @@ MANA_POINT mod_need_mana(player_type *caster_ptr, MANA_POINT need_mana, SPELL_ID
 #define MANA_CONST   2400
 #define MANA_DIV        4
 #define DEC_MANA_DIV    3
-
-       /* Realm magic */
        if ((realm > REALM_NONE) && (realm <= MAX_REALM))
        {
-               /*
-                * need_mana defaults if spell exp equals SPELL_EXP_EXPERT and !caster_ptr->dec_mana.
-                * MANA_CONST is used to calculate need_mana effected from spell proficiency.
-                */
                need_mana = need_mana * (MANA_CONST + SPELL_EXP_EXPERT - experience_of_spell(caster_ptr, spell, realm)) + (MANA_CONST - 1);
                need_mana *= caster_ptr->dec_mana ? DEC_MANA_DIV : MANA_DIV;
                need_mana /= MANA_CONST * MANA_DIV;
                if (need_mana < 1) need_mana = 1;
        }
-
-       /* Non-realm magic */
        else
        {
                if (caster_ptr->dec_mana) need_mana = (need_mana + 1) * DEC_MANA_DIV / MANA_DIV;
@@ -2406,12 +2161,9 @@ PERCENTAGE mod_spell_chance_2(player_type *caster_ptr, PERCENTAGE chance)
  */
 PERCENTAGE spell_chance(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX use_realm)
 {
-       /* Paranoia -- must be literate */
        if (!mp_ptr->spell_book) return 100;
-
        if (use_realm == REALM_HISSATSU) return 0;
 
-       /* Access the spell */
        const magic_type *s_ptr;
        if (!is_magic(use_realm))
        {
@@ -2422,22 +2174,13 @@ PERCENTAGE spell_chance(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX use_
                s_ptr = &mp_ptr->info[use_realm - 1][spell];
        }
 
-       /* Extract the base spell failure rate */
        PERCENTAGE chance = s_ptr->sfail;
-
-       /* Reduce failure rate by "effective" level adjustment */
        chance -= 3 * (caster_ptr->lev - s_ptr->slevel);
-
-       /* Reduce failure rate by INT/WIS adjustment */
        chance -= 3 * (adj_mag_stat[caster_ptr->stat_ind[mp_ptr->spell_stat]] - 1);
-
        if (caster_ptr->riding)
                chance += (MAX(r_info[caster_ptr->current_floor_ptr->m_list[caster_ptr->riding].r_idx].level - caster_ptr->skill_exp[GINOU_RIDING] / 100 - 10, 0));
 
-       /* Extract mana consumption rate */
        MANA_POINT need_mana = mod_need_mana(caster_ptr, s_ptr->smana, spell, use_realm);
-
-       /* Not enough mana to cast */
        if (need_mana > caster_ptr->csp)
        {
                chance += 5 * (need_mana - caster_ptr->csp);
@@ -2445,25 +2188,16 @@ PERCENTAGE spell_chance(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX use_
 
        if ((use_realm != caster_ptr->realm1) && ((caster_ptr->pclass == CLASS_MAGE) || (caster_ptr->pclass == CLASS_PRIEST))) chance += 5;
 
-       /* Extract the minimum failure rate */
        PERCENTAGE minfail = adj_mag_fail[caster_ptr->stat_ind[mp_ptr->spell_stat]];
-
-       /*
-        * Non mage/priest characters never get too good
-        * (added high mage, mindcrafter)
-        */
        if (mp_ptr->spell_xtra & MAGIC_FAIL_5PERCENT)
        {
                if (minfail < 5) minfail = 5;
        }
 
-       /* Hack -- Priest prayer penalty for "edged" weapons  -DGK */
        if (((caster_ptr->pclass == CLASS_PRIEST) || (caster_ptr->pclass == CLASS_SORCERER)) && caster_ptr->icky_wield[0]) chance += 25;
        if (((caster_ptr->pclass == CLASS_PRIEST) || (caster_ptr->pclass == CLASS_SORCERER)) && caster_ptr->icky_wield[1]) chance += 25;
 
        chance = mod_spell_chance_1(caster_ptr, chance);
-
-       /* Goodness or evilness gives a penalty to failure rate */
        PERCENTAGE penalty = (mp_ptr->spell_stat == A_WIS) ? 10 : 4;
        switch (use_realm)
        {
@@ -2483,7 +2217,6 @@ PERCENTAGE spell_chance(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX use_
        if (caster_ptr->stun > 50) chance += 25;
        else if (caster_ptr->stun) chance += 15;
 
-       /* Always a 5 percent chance of working */
        if (chance > 95) chance = 95;
 
        if ((use_realm == caster_ptr->realm1) || (use_realm == caster_ptr->realm2)
@@ -2515,7 +2248,6 @@ void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *sp
        if (((use_realm <= REALM_NONE) || (use_realm > MAX_REALM)) && current_world_ptr->wizard)
        msg_print(_("警告! print_spell が領域なしに呼ばれた", "Warning! print_spells called with null realm"));
 
-       /* Title the list */
        prt("", y, x);
        char buf[256];
        if (use_realm == REALM_HISSATSU)
@@ -2533,7 +2265,6 @@ void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *sp
 
        int i;
        int exp_level;
-       SPELL_IDX spell;
        const magic_type *s_ptr;
        char info[80];
        char out_val[160];
@@ -2541,7 +2272,7 @@ void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *sp
        bool max = FALSE;
        for (i = 0; i < num; i++)
        {
-               spell = spells[i];
+               SPELL_IDX spell = spells[i];
 
                if (!is_magic(use_realm))
                {
@@ -2558,10 +2289,7 @@ void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *sp
                else
                {
                        EXP exp = experience_of_spell(caster_ptr, spell, use_realm);
-
-                       /* Extract mana consumption rate */
                        need_mana = mod_need_mana(caster_ptr, s_ptr->smana, spell, use_realm);
-
                        if ((increment == 64) || (s_ptr->slevel >= 99)) exp_level = EXP_LEVEL_UNSKILLED;
                        else exp_level = spell_exp_level(exp);
 
@@ -2584,7 +2312,7 @@ void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *sp
                                strcpy(out_val, "     ");
                }
                else sprintf(out_val, "  %c) ", I2A(i));
-               /* Skip illegible spells */
+
                if (s_ptr->slevel >= 99)
                {
                        strcat(out_val, format("%-30s", _("(判読不能)", "(illegible)")));
@@ -2592,18 +2320,9 @@ void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *sp
                        continue;
                }
 
-               /* XXX XXX Could label spells above the players level */
-
-               /* Get extra info */
                strcpy(info, exe_spell(caster_ptr, use_realm, spell, SPELL_INFO));
-
-               /* Use that info */
                concptr comment = info;
-
-               /* Assume spell is known and tried */
                byte line_attr = TERM_WHITE;
-
-               /* Analyze the spell */
                if ((caster_ptr->pclass == CLASS_SORCERER) || (caster_ptr->pclass == CLASS_RED_MAGE))
                {
                        if (s_ptr->slevel > caster_ptr->max_plv)
@@ -2644,18 +2363,15 @@ void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *sp
                        line_attr = TERM_L_GREEN;
                }
 
-               /* Dump the spell --(-- */
                if (use_realm == REALM_HISSATSU)
                {
                        strcat(out_val, format("%-25s %2d %4d",
-                           exe_spell(caster_ptr, use_realm, spell, SPELL_NAME), /* realm, spell */
-                           s_ptr->slevel, need_mana));
+                           exe_spell(caster_ptr, use_realm, spell, SPELL_NAME), s_ptr->slevel, need_mana));
                }
                else
                {
                        strcat(out_val, format("%-25s%c%-4s %2d %4d %3d%% %s",
-                           exe_spell(caster_ptr, use_realm, spell, SPELL_NAME), /* realm, spell */
-                           (max ? '!' : ' '), ryakuji,
+                           exe_spell(caster_ptr, use_realm, spell, SPELL_NAME), (max ? '!' : ' '), ryakuji,
                            s_ptr->slevel, need_mana, spell_chance(caster_ptr, spell, use_realm), comment));
                }
 
@@ -2677,36 +2393,23 @@ void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *sp
  */
 static MONRACE_IDX poly_r_idx(player_type *caster_ptr, MONRACE_IDX r_idx)
 {
-       /* Hack -- Uniques/Questors never polymorph */
        monster_race *r_ptr = &r_info[r_idx];
        if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags1 & RF1_QUESTOR))
                return (r_idx);
 
-       /* Allowable range of "levels" for resulting monster */
        DEPTH lev1 = r_ptr->level - ((randint1(20) / randint1(9)) + 1);
        DEPTH lev2 = r_ptr->level + ((randint1(20) / randint1(9)) + 1);
-
-       /* Pick a (possibly new) non-unique race */
        MONRACE_IDX r;
        for (int i = 0; i < 1000; i++)
        {
-               /* Pick a new race, using a level calculation */
-               r = get_mon_num((caster_ptr->current_floor_ptr->dun_level + r_ptr->level) / 2 + 5);
-
-               /* Handle failure */
+               r = get_mon_num(caster_ptr, (caster_ptr->current_floor_ptr->dun_level + r_ptr->level) / 2 + 5, 0);
                if (!r) break;
 
                r_ptr = &r_info[r];
-
-               /* Ignore unique monsters */
                if (r_ptr->flags1 & RF1_UNIQUE) continue;
-
-               /* Ignore monsters with incompatible levels */
                if ((r_ptr->level < lev1) || (r_ptr->level > lev2)) continue;
 
-               /* Use that index */
                r_idx = r;
-
                break;
        }
 
@@ -2735,72 +2438,53 @@ bool polymorph_monster(player_type *caster_ptr, POSITION y, POSITION x)
        if (floor_ptr->inside_arena || caster_ptr->phase_out) return FALSE;
        if ((caster_ptr->riding == g_ptr->m_idx) || (m_ptr->mflag2 & MFLAG2_KAGE)) return FALSE;
 
-       /* Memorize the monster before polymorphing */
        monster_type back_m = *m_ptr;
-
-       /* Pick a "new" monster race */
        new_r_idx = poly_r_idx(caster_ptr, old_r_idx);
-
-       /* Handle polymorph */
        if (new_r_idx == old_r_idx) return FALSE;
 
        bool preserve_hold_objects = back_m.hold_o_idx ? TRUE : FALSE;
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
-       /* Get the monsters attitude */
        BIT_FLAGS mode = 0L;
        if (is_friendly(m_ptr)) mode |= PM_FORCE_FRIENDLY;
        if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
        if (m_ptr->mflag2 & MFLAG2_NOPET) mode |= PM_NO_PET;
 
-       /* Mega-hack -- ignore held objects */
        m_ptr->hold_o_idx = 0;
-
-       /* "Kill" the "old" monster */
-       delete_monster_idx(g_ptr->m_idx);
-
-       /* Create a new monster (no groups) */
+       delete_monster_idx(caster_ptr, g_ptr->m_idx);
        bool polymorphed = FALSE;
-       if (place_monster_aux(0, y, x, new_r_idx, mode))
+       if (place_monster_aux(caster_ptr, 0, y, x, new_r_idx, mode))
        {
                floor_ptr->m_list[hack_m_idx_ii].nickname = back_m.nickname;
                floor_ptr->m_list[hack_m_idx_ii].parent_m_idx = back_m.parent_m_idx;
                floor_ptr->m_list[hack_m_idx_ii].hold_o_idx = back_m.hold_o_idx;
-
-               /* Success */
                polymorphed = TRUE;
        }
        else
        {
-               /* Placing the new monster failed */
-               if (place_monster_aux(0, y, x, old_r_idx, (mode | PM_NO_KAGE | PM_IGNORE_TERRAIN)))
+               if (place_monster_aux(caster_ptr, 0, y, x, old_r_idx, (mode | PM_NO_KAGE | PM_IGNORE_TERRAIN)))
                {
                        floor_ptr->m_list[hack_m_idx_ii] = back_m;
-
-                       /* Re-initialize monster process */
                        mproc_init(floor_ptr);
                }
                else preserve_hold_objects = FALSE;
        }
 
-       /* Mega-hack -- preserve held objects */
        if (preserve_hold_objects)
        {
                for (this_o_idx = back_m.hold_o_idx; this_o_idx; this_o_idx = next_o_idx)
                {
                        object_type *o_ptr = &floor_ptr->o_list[this_o_idx];
                        next_o_idx = o_ptr->next_o_idx;
-
-                       /* Held by new monster */
                        o_ptr->held_m_idx = hack_m_idx_ii;
                }
        }
-       else if (back_m.hold_o_idx) /* Failed (paranoia) */
+       else if (back_m.hold_o_idx)
        {
                for (this_o_idx = back_m.hold_o_idx; this_o_idx; this_o_idx = next_o_idx)
                {
                        next_o_idx = floor_ptr->o_list[this_o_idx].next_o_idx;
-                       delete_object_idx(floor_ptr, this_o_idx);
+                       delete_object_idx(caster_ptr, this_o_idx);
                }
        }
 
@@ -2809,6 +2493,7 @@ bool polymorph_monster(player_type *caster_ptr, POSITION y, POSITION x)
        return polymorphed;
 }
 
+
 /*!
  * @brief 次元の扉処理 /
  * Dimension Door
@@ -2823,7 +2508,7 @@ static bool dimension_door_aux(player_type *caster_ptr, POSITION x, POSITION y)
 
        caster_ptr->energy_need += (s16b)((s32b)(60 - plev) * ENERGY_NEED() / 100L);
 
-       if (!cave_player_teleportable_bold(y, x, 0L) ||
+       if (!cave_player_teleportable_bold(caster_ptr, y, x, TELEPORT_SPONTANEOUS) ||
            (distance(y, x, caster_ptr->y, caster_ptr->x) > plev / 2 + 10) ||
            (!randint0(plev / 10 + 10)))
        {
@@ -2832,7 +2517,7 @@ static bool dimension_door_aux(player_type *caster_ptr, POSITION x, POSITION y)
                return FALSE;
        }
 
-       teleport_player_to(caster_ptr, y, x, 0L);
+       teleport_player_to(caster_ptr, y, x, TELEPORT_SPONTANEOUS);
        return TRUE;
 }
 
@@ -2846,7 +2531,6 @@ static bool dimension_door_aux(player_type *caster_ptr, POSITION x, POSITION y)
 bool dimension_door(player_type *caster_ptr)
 {
        DEPTH x = 0, y = 0;
-
        if (!tgt_pt(caster_ptr, &x, &y)) return FALSE;
        if (dimension_door_aux(caster_ptr, x, y)) return TRUE;
 
@@ -2881,14 +2565,12 @@ bool mirror_tunnel(player_type *caster_ptr)
 bool eat_magic(player_type *caster_ptr, int power)
 {
        byte fail_type = 1;
-
-       concptr q, s;
        GAME_TEXT o_name[MAX_NLEN];
 
        item_tester_hook = item_tester_hook_recharge;
 
-       q = _("どのアイテムから魔力を吸収しますか?", "Drain which item? ");
-       s = _("魔力を吸収できるアイテムがありません。", "You have nothing to drain.");
+       concptr q = _("どのアイテムから魔力を吸収しますか?", "Drain which item? ");
+       concptr s = _("魔力を吸収できるアイテムがありません。", "You have nothing to drain.");
 
        object_type *o_ptr;
        OBJECT_IDX item;
@@ -2904,11 +2586,8 @@ bool eat_magic(player_type *caster_ptr, int power)
        if (o_ptr->tval == TV_ROD)
        {
                recharge_strength = ((power > lev/2) ? (power - lev/2) : 0) / 5;
-
-               /* Back-fire */
                if (one_in_(recharge_strength))
                {
-                       /* Activate the failure code. */
                        is_eating_successful = FALSE;
                }
                else
@@ -2926,11 +2605,9 @@ bool eat_magic(player_type *caster_ptr, int power)
        }
        else
        {
-               /* All staffs, wands. */
                recharge_strength = (100 + power - lev) / 15;
                if (recharge_strength < 0) recharge_strength = 0;
 
-               /* Back-fire */
                if (one_in_(recharge_strength))
                {
                        is_eating_successful = FALSE;
@@ -2942,7 +2619,6 @@ bool eat_magic(player_type *caster_ptr, int power)
                                caster_ptr->csp += lev / 2;
                                o_ptr->pval --;
 
-                               /* XXX Hack -- unstack if necessary */
                                if ((o_ptr->tval == TV_STAFF) && (item >= 0) && (o_ptr->number > 1))
                                {
                                        object_type forge;
@@ -2950,13 +2626,8 @@ bool eat_magic(player_type *caster_ptr, int power)
                                        q_ptr = &forge;
                                        object_copy(q_ptr, o_ptr);
 
-                                       /* Modify quantity */
                                        q_ptr->number = 1;
-
-                                       /* Restore the charges */
                                        o_ptr->pval++;
-
-                                       /* Unstack the used item */
                                        o_ptr->number--;
                                        caster_ptr->total_weight -= q_ptr->weight;
                                        item = inven_carry(caster_ptr, q_ptr);
@@ -2978,26 +2649,19 @@ bool eat_magic(player_type *caster_ptr, int power)
                return redraw_player(caster_ptr);
        }
 
-       /* Artifacts are never destroyed. */
        if (object_is_fixed_artifact(o_ptr))
        {
-               object_desc(o_name, o_ptr, OD_NAME_ONLY);
+               object_desc(caster_ptr, o_name, o_ptr, OD_NAME_ONLY);
                msg_format(_("魔力が逆流した!%sは完全に魔力を失った。", "The recharging backfires - %s is completely drained!"), o_name);
-
-               /* Artifact rods. */
                if (o_ptr->tval == TV_ROD)
                        o_ptr->timeout = k_ptr->pval * o_ptr->number;
-
-               /* Artifact wands and staffs. */
                else if ((o_ptr->tval == TV_WAND) || (o_ptr->tval == TV_STAFF))
                        o_ptr->pval = 0;
+
                return redraw_player(caster_ptr);
        }
        
-       /* Get the object description */
-       object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
-
-       /*** Determine Seriousness of Failure ***/
+       object_desc(caster_ptr, o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
        /* Mages recharge objects more safely. */
        if (IS_WIZARD_CLASS(caster_ptr))
@@ -3044,9 +2708,6 @@ bool eat_magic(player_type *caster_ptr, int power)
                }
        }
 
-       /*** Apply draining and destruction. ***/
-
-       /* Drain object or stack of objects. */
        if (fail_type == 1)
        {
                if (o_ptr->tval == TV_ROD)
@@ -3062,7 +2723,6 @@ bool eat_magic(player_type *caster_ptr, int power)
                }
        }
 
-       /* Destroy an object or one in a stack of objects. */
        if (fail_type == 2)
        {
                if (o_ptr->number > 1)
@@ -3080,7 +2740,6 @@ bool eat_magic(player_type *caster_ptr, int power)
                vary_item(caster_ptr, item, -1);
        }
 
-       /* Destroy all members of a stack of objects. */
        if (fail_type == 3)
        {
                if (o_ptr->number > 1)
@@ -3102,17 +2761,14 @@ bool eat_magic(player_type *caster_ptr, int power)
  */
 void massacre(player_type *caster_ptr)
 {
-       POSITION x, y;
        grid_type *g_ptr;
        monster_type *m_ptr;
        for (DIRECTION dir = 0; dir < 8; dir++)
        {
-               y = caster_ptr->y + ddy_ddd[dir];
-               x = caster_ptr->x + ddx_ddd[dir];
+               POSITION y = caster_ptr->y + ddy_ddd[dir];
+               POSITION x = caster_ptr->x + ddx_ddd[dir];
                g_ptr = &caster_ptr->current_floor_ptr->grid_array[y][x];
                m_ptr = &caster_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
-
-               /* Hack -- attack monsters */
                if (g_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(caster_ptr->current_floor_ptr, y, x, FF_PROJECT)))
                        py_attack(caster_ptr, y, x, 0);
        }
@@ -3137,7 +2793,6 @@ bool eat_rock(player_type *caster_ptr)
        mimic_f_ptr = &f_info[get_feat_mimic(g_ptr)];
 
        stop_mouth(caster_ptr);
-
        if (!have_flag(mimic_f_ptr->flags, FF_HURT_ROCK))
        {
                msg_print(_("この地形は食べられない。", "You cannot eat this feature."));
@@ -3203,7 +2858,7 @@ bool shock_power(player_type *caster_ptr)
        monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
        GAME_TEXT m_name[MAX_NLEN];
-       monster_desc(m_name, m_ptr, 0);
+       monster_desc(caster_ptr, m_name, m_ptr, 0);
 
        if (randint1(r_ptr->level * 3 / 2) > randint0(dam / 2) + dam / 2)
        {
@@ -3215,12 +2870,15 @@ bool shock_power(player_type *caster_ptr)
        {
                y += ddy[dir];
                x += ddx[dir];
-               if (cave_empty_bold(caster_ptr->current_floor_ptr, y, x))
+               if (is_cave_empty_bold(caster_ptr, y, x))
                {
                        ty = y;
                        tx = x;
                }
-               else break;
+               else
+               {
+                       break;
+               }
        }
 
        bool is_shock_successful = ty != oy;
@@ -3234,14 +2892,79 @@ bool shock_power(player_type *caster_ptr)
        m_ptr->fx = tx;
 
        update_monster(caster_ptr, m_idx, TRUE);
-       lite_spot(oy, ox);
-       lite_spot(ty, tx);
+       lite_spot(caster_ptr, oy, ox);
+       lite_spot(caster_ptr, ty, tx);
 
        if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
                caster_ptr->update |= (PU_MON_LITE);
        return TRUE;
 }
 
+bool fetch_monster(player_type *caster_ptr)
+{
+       monster_type *m_ptr;
+       MONSTER_IDX m_idx;
+       GAME_TEXT m_name[MAX_NLEN];
+       int i;
+       int path_n;
+       u16b path_g[512];
+       POSITION ty, tx;
+
+       if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
+       m_idx = caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx;
+       if (!m_idx) return FALSE;
+       if (m_idx == caster_ptr->riding) return FALSE;
+       if (!player_has_los_bold(caster_ptr, target_row, target_col)) return FALSE;
+       if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) return FALSE;
+       m_ptr = &caster_ptr->current_floor_ptr->m_list[m_idx];
+       monster_desc(caster_ptr, m_name, m_ptr, 0);
+       msg_format(_("%sを引き戻した。", "You pull back %s."), m_name);
+       path_n = project_path(caster_ptr, path_g, MAX_RANGE, target_row, target_col, caster_ptr->y, caster_ptr->x, 0);
+       ty = target_row, tx = target_col;
+       for (i = 1; i < path_n; i++)
+       {
+               POSITION ny = GRID_Y(path_g[i]);
+               POSITION nx = GRID_X(path_g[i]);
+               grid_type *g_ptr = &caster_ptr->current_floor_ptr->grid_array[ny][nx];
+
+               if (in_bounds(caster_ptr->current_floor_ptr, ny, nx) && is_cave_empty_bold(caster_ptr, ny, nx) &&
+                       !(g_ptr->info & CAVE_OBJECT) &&
+                       !pattern_tile(caster_ptr->current_floor_ptr, ny, nx))
+               {
+                       ty = ny;
+                       tx = nx;
+               }
+       }
+       /* Update the old location */
+       caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx = 0;
+
+       /* Update the new location */
+       caster_ptr->current_floor_ptr->grid_array[ty][tx].m_idx = m_idx;
+
+       /* Move the monster */
+       m_ptr->fy = ty;
+       m_ptr->fx = tx;
+
+       /* Wake the monster up */
+       (void)set_monster_csleep(caster_ptr, m_idx, 0);
+
+       update_monster(caster_ptr, m_idx, TRUE);
+       lite_spot(caster_ptr, target_row, target_col);
+       lite_spot(caster_ptr, ty, tx);
+
+       if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
+               caster_ptr->update |= (PU_MON_LITE);
+
+       if (m_ptr->ml)
+       {
+               /* Auto-Recall if possible and visible */
+               if (!caster_ptr->image) monster_race_track(caster_ptr, m_ptr->ap_r_idx);
+               health_track(caster_ptr, m_idx);
+       }
+       return TRUE;
+
+}
+
 
 bool booze(player_type *creature_ptr)
 {
@@ -3268,10 +2991,10 @@ bool booze(player_type *creature_ptr)
                ident = TRUE;
                if (one_in_(3)) lose_all_info(creature_ptr);
                else wiz_dark(creature_ptr);
-               (void)teleport_player_aux(creature_ptr, 100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
+               (void)teleport_player_aux(creature_ptr, 100, FALSE, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
                wiz_dark(creature_ptr);
                msg_print(_("知らない場所で目が醒めた。頭痛がする。", "You wake up somewhere with a sore head..."));
-               msg_print(_("何も思い出せない。どうやってここへ来たのかも分からない!", "You can't remember a thing, or how you got here!"));
+               msg_print(_("何も思い出せない。どうやってここへ来たのかも分からない!", "You can't remember a thing or how you got here!"));
        }
 
        return ident;
@@ -3307,6 +3030,7 @@ void blood_curse_to_enemy(player_type *caster_ptr, MONSTER_IDX m_idx)
                                earthquake(caster_ptr, m_ptr->fy, m_ptr->fx, 4 + randint0(4), 0);
                                if (!one_in_(6)) break;
                        }
+                       /* Fall through */
                case 3: case 4: case 5: case 6:
                        if (!count)
                        {
@@ -3316,6 +3040,7 @@ void blood_curse_to_enemy(player_type *caster_ptr, MONSTER_IDX m_idx)
                                project(caster_ptr, 0, 8, m_ptr->fy, m_ptr->fx, extra_dam, GF_MANA, curse_flg, -1);
                                if (!one_in_(6)) break;
                        }
+                       /* Fall through */
                case 7: case 8:
                        if (!count)
                        {
@@ -3325,16 +3050,20 @@ void blood_curse_to_enemy(player_type *caster_ptr, MONSTER_IDX m_idx)
                                if (one_in_(13)) count += activate_hi_summon(caster_ptr, m_ptr->fy, m_ptr->fx, TRUE);
                                if (!one_in_(6)) break;
                        }
+                       /* Fall through */
                case 9: case 10: case 11:
                        msg_print(_("エネルギーのうねりを感じた!", "You feel a surge of energy!"));
                        project(caster_ptr, 0, 7, m_ptr->fy, m_ptr->fx, 50, GF_DISINTEGRATE, curse_flg, -1);
                        if (!one_in_(6)) break;
+                       /* Fall through */
                case 12: case 13: case 14: case 15: case 16:
                        aggravate_monsters(caster_ptr, 0);
                        if (!one_in_(6)) break;
+                       /* Fall through */
                case 17: case 18:
                        count += activate_hi_summon(caster_ptr, m_ptr->fy, m_ptr->fx, TRUE);
                        if (!one_in_(6)) break;
+                       /* Fall through */
                case 19: case 20: case 21: case 22:
                {
                        bool pet = !one_in_(3);
@@ -3343,9 +3072,10 @@ void blood_curse_to_enemy(player_type *caster_ptr, MONSTER_IDX m_idx)
                        if (pet) mode |= PM_FORCE_PET;
                        else mode |= (PM_NO_PET | PM_FORCE_FRIENDLY);
 
-                       count += summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, (pet ? caster_ptr->lev * 2 / 3 + randint1(caster_ptr->lev / 2) : caster_ptr->current_floor_ptr->dun_level), 0, mode);
+                       count += summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, (pet ? caster_ptr->lev * 2 / 3 + randint1(caster_ptr->lev / 2) : caster_ptr->current_floor_ptr->dun_level), 0, mode);
                        if (!one_in_(6)) break;
                }
+                       /* Fall through */
                case 23: case 24: case 25:
                        if (caster_ptr->hold_exp && (randint0(100) < 75)) break;
                        msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away..."));
@@ -3353,6 +3083,7 @@ void blood_curse_to_enemy(player_type *caster_ptr, MONSTER_IDX m_idx)
                        if (caster_ptr->hold_exp) lose_exp(caster_ptr, caster_ptr->exp / 160);
                        else lose_exp(caster_ptr, caster_ptr->exp / 16);
                        if (!one_in_(6)) break;
+                       /* Fall through */
                case 26: case 27: case 28:
                {
                        if (one_in_(13))
@@ -3391,11 +3122,8 @@ bool fire_crimson(player_type *shooter_ptr)
        DIRECTION dir;
        if (!get_aim_dir(shooter_ptr, &dir)) return FALSE;
 
-       /* Use the given direction */
        POSITION tx = shooter_ptr->x + 99 * ddx[dir];
        POSITION ty = shooter_ptr->y + 99 * ddy[dir];
-
-       /* Hack -- Use an actual "target" */
        if ((dir == 5) && target_okay(shooter_ptr))
        {
                tx = target_col;
@@ -3405,13 +3133,8 @@ bool fire_crimson(player_type *shooter_ptr)
        int num = 1;
        if (shooter_ptr->pclass == CLASS_ARCHER)
        {
-               /* Extra shot at level 10 */
                if (shooter_ptr->lev >= 10) num++;
-
-               /* Extra shot at level 30 */
                if (shooter_ptr->lev >= 30) num++;
-
-               /* Extra shot at level 45 */
                if (shooter_ptr->lev >= 45) num++;
        }
 
@@ -3458,7 +3181,7 @@ bool tele_town(player_type *caster_ptr)
                num++;
        }
 
-       if (!num)
+       if (num == 0)
        {
                msg_print(_("まだ行けるところがない。", "You have not yet visited any town."));
                msg_print(NULL);
@@ -3466,7 +3189,7 @@ bool tele_town(player_type *caster_ptr)
                return FALSE;
        }
 
-       prt(_("どこに行きますか:", "Which town you go: "), 0, 0);
+       prt(_("どこに行きますか:", "Where do you want to go: "), 0, 0);
        while (TRUE)
        {
                i = inkey();