OSDN Git Service

[Refactor] #37353 minus_ac() を acid_minus_ac()に改名、処理時メッセージを修正。 / Rename minus_ac...
[hengband/hengband.git] / src / spells2.c
index 671cc6c..1e4a09a 100644 (file)
@@ -612,7 +612,7 @@ bool detect_monsters_mind(POSITION range)
  * @param Match 対応シンボルの混じったモンスター文字列(複数指定化)
  * @return 効力があった場合TRUEを返す
  */
-bool detect_monsters_string(POSITION range, cptr Match)
+bool detect_monsters_string(POSITION range, concptr Match)
 {
        MONSTER_IDX i;
        POSITION y, x;
@@ -671,7 +671,7 @@ bool detect_monsters_xxx(POSITION range, u32b match_flag)
        MONSTER_IDX i;
        POSITION y, x;
        bool flag = FALSE;
-       cptr desc_monsters = _("変なモンスター", "weird monsters");
+       concptr desc_monsters = _("変なモンスター", "weird monsters");
 
        if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
 
@@ -990,7 +990,7 @@ void aggravate_monsters(MONSTER_IDX who)
  * @param spell_name 抹殺効果を起こした魔法の名前
  * @return 効力があった場合TRUEを返す
  */
-bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, cptr spell_name)
+bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name)
 {
        int          msec = delay_factor * delay_factor * delay_factor;
        monster_type *m_ptr = &m_list[m_idx];
@@ -1214,7 +1214,7 @@ bool probing(void)
        bool_hack cu, cv;
        bool probe = FALSE;
        char buf[256];
-       cptr align;
+       concptr align;
 
        cu = Term->scr->cu;
        cv = Term->scr->cv;
@@ -1804,7 +1804,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
 
                if (damage)
                {
-                       cptr killer;
+                       concptr killer;
 
                        if (m_idx)
                        {
@@ -3496,7 +3496,7 @@ bool activate_ty_curse(bool stop_ty, int *count)
                        }
                        if (!one_in_(6)) break;
                default:
-                       while (i < 6)
+                       while (i < A_MAX)
                        {
                                do
                                {
@@ -3865,23 +3865,14 @@ bool kawarimi(bool success)
        x = p_ptr->x;
 
        teleport_player(10 + randint1(90), 0L);
-
        object_wipe(q_ptr);
-
        object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
 
        q_ptr->pval = MON_NINJA;
-
-       /* Drop it in the dungeon */
        (void)drop_near(q_ptr, -1, y, x);
 
-#ifdef JP
-       if (success) msg_print("攻撃を受ける前に素早く身をひるがえした。");
-       else msg_print("失敗!攻撃を受けてしまった。");
-#else
-       if (success) msg_print("You have turned around just before the attack hit you.");
-       else msg_print("Failed! You are hit by the attack.");
-#endif
+       if (success) msg_print(_("攻撃を受ける前に素早く身をひるがえした。", "You have turned around just before the attack hit you."));
+       else msg_print(_("失敗!攻撃を受けてしまった。", "Failed! You are hit by the attack."));
 
        p_ptr->special_defense &= ~(NINJA_KAWARIMI);
        p_ptr->redraw |= (PR_STATUS);
@@ -3976,8 +3967,7 @@ bool rush_attack(bool *mdeath)
                if (tm_idx != cave[ny][nx].m_idx)
                {
 #ifdef JP
-                       msg_format("%s%sが立ちふさがっている!", tm_idx ? "別の" : "",
-                                  m_ptr->ml ? "モンスター" : "何か");
+                       msg_format("%s%sが立ちふさがっている!", tm_idx ? "別の" : "", m_ptr->ml ? "モンスター" : "何か");
 #else
                        msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
 #endif
@@ -4749,9 +4739,9 @@ void cast_shuffle(void)
        }
 }
 
-bool_hack life_stream(bool_hack message, bool_hack virtue)
+bool_hack life_stream(bool_hack message, bool_hack virtue_change)
 {
-       if(virtue)
+       if(virtue_change)
        {
                chg_virtue(V_VITALITY, 1);
                chg_virtue(V_UNLIFE, -5);
@@ -4995,25 +4985,14 @@ bool psychometry(void)
        object_type     *o_ptr;
        GAME_TEXT o_name[MAX_NLEN];
        byte            feel;
-       cptr            q, s;
+       concptr            q, s;
        bool okay = FALSE;
 
        q = _("どのアイテムを調べますか?", "Meditate on which item? ");
        s = _("調べるアイテムがありません。", "You have nothing appropriate.");
 
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
+       o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+       if (!o_ptr) return (FALSE);
 
        /* It is fully known, no information needed */
        if (object_is_known(o_ptr))
@@ -5036,12 +5015,10 @@ bool psychometry(void)
        }
 
 #ifdef JP
-       msg_format("%sは%sという感じがする...",
-               o_name, game_inscriptions[feel]);
+       msg_format("%sは%sという感じがする...", o_name, game_inscriptions[feel]);
 #else
        msg_format("You feel that the %s %s %s...",
-               o_name, ((o_ptr->number == 1) ? "is" : "are"),
-               game_inscriptions[feel]);
+               o_name, ((o_ptr->number == 1) ? "is" : "are"), game_inscriptions[feel]);
 #endif