OSDN Git Service

[Refactor] #37353 メッセージ整理。
[hengband/hengband.git] / src / spells3.c
index 8f8e329..89adb98 100644 (file)
@@ -145,17 +145,18 @@ bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode)
  */
 void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode)
 {
-       int ny, nx, oy, ox, d, i, min;
+       POSITION ny, nx, oy, ox;
+       int d, i, min;
        int attempts = 500;
-       int dis = 2;
+       POSITION dis = 2;
        bool look = TRUE;
        monster_type *m_ptr = &m_list[m_idx];
 
        /* Paranoia */
-       if (!m_ptr->r_idx) return;
+       if(!m_ptr->r_idx) return;
 
        /* "Skill" test */
-       if (randint1(100) > power) return;
+       if(randint1(100) > power) return;
 
        /* Initialize */
        ny = m_ptr->fy;
@@ -258,7 +259,7 @@ void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power,
  * </pre>
  */
 
-bool teleport_player_aux(int dis, BIT_FLAGS mode)
+bool teleport_player_aux(POSITION dis, BIT_FLAGS mode)
 {
        int candidates_at[MAX_TELEPORT_DISTANCE + 1];
        int total_candidates, cur_candidates;
@@ -374,7 +375,7 @@ bool teleport_player_aux(int dis, BIT_FLAGS mode)
  * @param mode オプション
  * @return なし
  */
-void teleport_player(int dis, BIT_FLAGS mode)
+void teleport_player(POSITION dis, BIT_FLAGS mode)
 {
        int yy, xx;
 
@@ -418,7 +419,7 @@ void teleport_player(int dis, BIT_FLAGS mode)
  * @param dis テレポート距離
  * @return なし
  */
-void teleport_player_away(MONSTER_IDX m_idx, int dis)
+void teleport_player_away(MONSTER_IDX m_idx, POSITION dis)
 {
        int yy, xx;
 
@@ -472,7 +473,7 @@ void teleport_player_away(MONSTER_IDX m_idx, int dis)
 void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode)
 {
        POSITION y, x;
-       int dis = 0, ctr = 0;
+       POSITION dis = 0, ctr = 0;
 
        if (p_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
        {
@@ -529,7 +530,7 @@ void teleport_away_followable(MONSTER_IDX m_idx)
                if ((p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR)) follow = TRUE;
                else
                {
-                       u32b flgs[TR_FLAG_SIZE];
+                       BIT_FLAGS flgs[TR_FLAG_SIZE];
                        object_type *o_ptr;
                        int i;
 
@@ -998,7 +999,6 @@ bool apply_disenchant(BIT_FLAGS mode)
        /* Artifacts have 71% chance to resist */
        if (object_is_artifact(o_ptr) && (randint0(100) < 71))
        {
-               /* Message */
 #ifdef JP
 msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
 #else
@@ -1038,7 +1038,6 @@ msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
        if ((to_h != o_ptr->to_h) || (to_d != o_ptr->to_d) ||
            (to_a != o_ptr->to_a) || (pval != o_ptr->pval))
        {
-               /* Message */
 #ifdef JP
                msg_format("%s(%c)は劣化してしまった!",
                           o_name, index_to_label(t) );
@@ -1054,7 +1053,6 @@ msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
                /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
-               /* Window stuff */
                p_ptr->window |= (PW_EQUIP | PW_PLAYER);
 
                calc_android_exp();
@@ -1185,7 +1183,6 @@ void phlogiston(void)
        /* Refuel */
        o_ptr->xtra4 += (XTRA16)(max_flog / 2);
 
-       /* Message */
        msg_print(_("照明用アイテムに燃素を補充した。", "You add phlogiston to your light item."));
 
        /* Comment */
@@ -1217,7 +1214,6 @@ void brand_weapon(int brand_type)
        item_tester_hook = object_allow_enchant_melee_weapon;
        item_tester_no_ryoute = TRUE;
 
-       /* Get an item */
        q = _("どの武器を強化しますか? ", "Enchant which weapon? ");
        s = _("強化できる武器がない。", "You have nothing to enchant.");
 
@@ -1486,7 +1482,6 @@ static bool vanish_dungeon(void)
        /* Mega-Hack -- Forget the view and lite */
        p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
 
-       /* Update stuff */
        p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
 
        /* Update the monsters */
@@ -1495,7 +1490,6 @@ static bool vanish_dungeon(void)
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
        return TRUE;
@@ -1727,7 +1721,6 @@ void alter_reality(void)
  */
 bool warding_glyph(void)
 {
-       /* XXX XXX XXX */
        if (!cave_clean_bold(p_ptr->y, p_ptr->x))
        {
                msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
@@ -1753,7 +1746,6 @@ bool warding_glyph(void)
  */
 bool place_mirror(void)
 {
-       /* XXX XXX XXX */
        if (!cave_clean_bold(p_ptr->y, p_ptr->x))
        {
                msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
@@ -1786,7 +1778,6 @@ bool place_mirror(void)
  */
 bool explosive_rune(void)
 {
-       /* XXX XXX XXX */
        if (!cave_clean_bold(p_ptr->y, p_ptr->x))
        {
                msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
@@ -1902,13 +1893,16 @@ static int remove_curse_aux(int all)
                /* Recalculate the bonuses */
                p_ptr->update |= (PU_BONUS);
 
-               /* Window stuff */
                p_ptr->window |= (PW_EQUIP);
 
                /* Count the uncursings */
                cnt++;
        }
 
+       if (cnt)
+       {
+               msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
+       }
        /* Return "something uncursed" */
        return (cnt);
 }
@@ -1956,7 +1950,6 @@ bool alchemy(void)
        /* Hack -- force destruction */
        if (command_arg > 0) force = TRUE;
 
-       /* Get an item */
        q = _("どのアイテムを金に変えますか?", "Turn which item to gold? ");
        s = _("金に変えられる物がありません。", "You have nothing to turn to gold.");
 
@@ -2006,10 +1999,8 @@ bool alchemy(void)
        /* Artifacts cannot be destroyed */
        if (!can_player_destroy_object(o_ptr))
        {
-               /* Message */
                msg_format(_("%sを金に変えることに失敗した。", "You fail to turn %s to gold!"), o_name);
 
-               /* Done */
                return FALSE;
        }
 
@@ -2017,7 +2008,6 @@ bool alchemy(void)
 
        if (price <= 0)
        {
-               /* Message */
                msg_format(_("%sをニセの金に変えた。", "You turn %s to fool's gold."), o_name);
        }
        else
@@ -2034,7 +2024,6 @@ bool alchemy(void)
                /* Redraw gold */
                p_ptr->redraw |= (PR_GOLD);
 
-               /* Window stuff */
                p_ptr->window |= (PW_PLAYER);
 
        }
@@ -2189,7 +2178,6 @@ bool enchant(object_type *o_ptr, int n, int eflag)
        /* Combine / Reorder the pack (later) */
        p_ptr->notice |= (PN_COMBINE | PN_REORDER);
 
-       /* Window stuff */
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
 
        calc_android_exp();
@@ -2226,7 +2214,6 @@ bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
        /* Enchant armor if requested */
        if (num_ac) item_tester_hook = object_is_armour;
 
-       /* Get an item */
        q = _("どのアイテムを強化しますか? ", "Enchant which item? ");
        s = _("強化できるアイテムがない。", "You have nothing to enchant.");
 
@@ -2270,7 +2257,6 @@ msg_format("%s は明るく輝いた!",
                /* Flush */
                if (flush_failure) flush();
 
-               /* Message */
                msg_print(_("強化に失敗した。", "The enchantment failed."));
 
                if (one_in_(3)) chg_virtue(V_ENCHANT, -1);
@@ -2303,7 +2289,6 @@ bool artifact_scroll(void)
        /* Enchant weapon/armour */
        item_tester_hook = item_tester_hook_nameless_weapon_armour;
 
-       /* Get an item */
        q = _("どのアイテムを強化しますか? ", "Enchant which item? ");
        s = _("強化できるアイテムがない。", "You have nothing to enchant.");
 
@@ -2401,7 +2386,6 @@ bool artifact_scroll(void)
                /* Flush */
                if (flush_failure) flush();
 
-               /* Message */
                msg_print(_("強化に失敗した。", "The enchantment failed."));
 
                if (one_in_(3)) chg_virtue(V_ENCHANT, -1);
@@ -2460,7 +2444,6 @@ bool identify_item(object_type *o_ptr)
        /* Combine / Reorder the pack (later) */
        p_ptr->notice |= (PN_COMBINE | PN_REORDER);
 
-       /* Window stuff */
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
 
        strcpy(record_o_name, o_name);
@@ -2515,7 +2498,6 @@ bool ident_spell(bool only_equip)
                q = _("すべて鑑定済みです。 ", "All items are identified. ");
        }
 
-       /* Get an item */
        s = _("鑑定するべきアイテムがない。", "You have nothing to identify.");
 
        if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return (FALSE);
@@ -2581,7 +2563,6 @@ bool mundane_spell(bool only_equip)
        if (only_equip) item_tester_hook = object_is_weapon_armour_ammo;
        item_tester_no_ryoute = TRUE;
 
-       /* Get an item */
        q = _("どれを使いますか?", "Use which item? ");
        s = _("使えるものがありません。", "You have nothing you can use.");
 
@@ -2599,7 +2580,6 @@ bool mundane_spell(bool only_equip)
                o_ptr = &o_list[0 - item];
        }
 
-       /* Oops */
        msg_print(_("まばゆい閃光が走った!", "There is a bright flash of light!"));
        {
                POSITION iy = o_ptr->iy;                 /* Y-position on map, or zero */
@@ -2662,7 +2642,6 @@ bool identify_fully(bool only_equip)
                q = _("すべて*鑑定*済みです。 ", "All items are *identified*. ");
        }
 
-       /* Get an item */
        s = _("*鑑定*するべきアイテムがない。", "You have nothing to *identify*.");
 
        if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return (FALSE);
@@ -2735,7 +2714,7 @@ bool identify_fully(bool only_equip)
  * strongly they recharge.  Staffs, however, each get fewer charges if
  * stacked.
  *
- * XXX XXX XXX Beware of "sliding index errors".
+ * Beware of "sliding index errors".
  */
 bool recharge(int power)
 {
@@ -2756,7 +2735,6 @@ bool recharge(int power)
        /* Only accept legal items */
        item_tester_hook = item_tester_hook_recharge;
 
-       /* Get an item */
        q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? ");
        s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge.");
 
@@ -3017,7 +2995,6 @@ bool recharge(int power)
        /* Combine / Reorder the pack (later) */
        p_ptr->notice |= (PN_COMBINE | PN_REORDER);
 
-       /* Window stuff */
        p_ptr->window |= (PW_INVEN);
 
        /* Something was done */
@@ -3043,7 +3020,6 @@ bool bless_weapon(void)
        /* Bless only weapons */
        item_tester_hook = object_is_weapon;
 
-       /* Get an item */
        q = _("どのアイテムを祝福しますか?", "Bless which weapon? ");
        s = _("祝福できる武器がありません。", "You have weapon to bless.");
 
@@ -3108,7 +3084,6 @@ msg_format("%s から邪悪なオーラが消えた。",
                /* Recalculate the bonuses */
                p_ptr->update |= (PU_BONUS);
 
-               /* Window stuff */
                p_ptr->window |= (PW_EQUIP);
        }
 
@@ -3200,7 +3175,6 @@ msg_format("%s は劣化した!",
        /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
-       /* Window stuff */
        p_ptr->window |= (PW_EQUIP | PW_PLAYER);
 
        calc_android_exp();
@@ -3218,7 +3192,7 @@ bool pulish_shield(void)
 {
        OBJECT_IDX item;
        object_type     *o_ptr;
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        char            o_name[MAX_NLEN];
        cptr            q, s;
 
@@ -3226,7 +3200,6 @@ bool pulish_shield(void)
        /* Assume enchant weapon */
        item_tester_tval = TV_SHIELD;
 
-       /* Get an item */
        q = _("どの盾を磨きますか?", "Pulish which weapon? ");
        s = _("磨く盾がありません。", "You have weapon to pulish.");
 
@@ -3456,8 +3429,8 @@ bool potion_smash_effect(MONSTER_IDX who, POSITION y, POSITION x, KIND_OBJECT_ID
  * Hack -- Display all known spells in a window
  * return なし
  * @details
- * XXX XXX XXX Need to analyze size of the window.
- * XXX XXX XXX Need more color coding.
+ * Need to analyze size of the window.
+ * Need more color coding.
  */
 void display_spell_list(void)
 {
@@ -3491,7 +3464,7 @@ void display_spell_list(void)
            (p_ptr->pclass == CLASS_FORCETRAINER))
        {
                int             minfail = 0;
-               int             plev = p_ptr->lev;
+               PLAYER_LEVEL plev = p_ptr->lev;
                int             chance = 0;
                mind_type       spell;
                char            comment[80];
@@ -3945,7 +3918,7 @@ bool spell_okay(int spell, bool learned, bool study_pray, int use_realm)
  * @param use_realm 魔法領域ID
  * @return なし
  */
-void print_spells(SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_POSITION y, TERM_POSITION x, REALM_IDX use_realm)
+void print_spells(SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, REALM_IDX use_realm)
 {
        int             i, spell, exp_level, increment = 64;
        const magic_type *s_ptr;
@@ -4281,7 +4254,7 @@ bool hates_cold(object_type *o_ptr)
  */
 int set_acid_destroy(object_type *o_ptr)
 {
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        if (!hates_acid(o_ptr)) return (FALSE);
        object_flags(o_ptr, flgs);
        if (have_flag(flgs, TR_IGNORE_ACID)) return (FALSE);
@@ -4298,7 +4271,7 @@ int set_acid_destroy(object_type *o_ptr)
  */
 int set_elec_destroy(object_type *o_ptr)
 {
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        if (!hates_elec(o_ptr)) return (FALSE);
        object_flags(o_ptr, flgs);
        if (have_flag(flgs, TR_IGNORE_ELEC)) return (FALSE);
@@ -4315,7 +4288,7 @@ int set_elec_destroy(object_type *o_ptr)
  */
 int set_fire_destroy(object_type *o_ptr)
 {
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        if (!hates_fire(o_ptr)) return (FALSE);
        object_flags(o_ptr, flgs);
        if (have_flag(flgs, TR_IGNORE_FIRE)) return (FALSE);
@@ -4332,7 +4305,7 @@ int set_fire_destroy(object_type *o_ptr)
  */
 int set_cold_destroy(object_type *o_ptr)
 {
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        if (!hates_cold(o_ptr)) return (FALSE);
        object_flags(o_ptr, flgs);
        if (have_flag(flgs, TR_IGNORE_COLD)) return (FALSE);
@@ -4392,7 +4365,6 @@ int inven_damage(inven_func typ, int perc)
                                /* Get a description */
                                object_desc(o_name, o_ptr, OD_OMIT_PREFIX);
 
-                               /* Message */
                                msg_format(_("%s(%c)が%s壊れてしまった!", "%sour %s (%c) %s destroyed!"),
 
 #ifdef JP
@@ -4448,7 +4420,7 @@ o_name, index_to_label(i),
 static int minus_ac(void)
 {
        object_type *o_ptr = NULL;
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        char        o_name[MAX_NLEN];
 
 
@@ -4486,7 +4458,6 @@ static int minus_ac(void)
                return (TRUE);
        }
 
-       /* Message */
        msg_format(_("%sがダメージを受けた!", "Your %s is damaged!"), o_name);
 
        /* Damage the item */
@@ -4495,7 +4466,6 @@ static int minus_ac(void)
        /* Calculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
-       /* Window stuff */
        p_ptr->window |= (PW_EQUIP | PW_PLAYER);
 
        calc_android_exp();
@@ -4715,7 +4685,6 @@ bool rustproof(void)
        /* Select a piece of armour */
        item_tester_hook = object_is_armour;
 
-       /* Get an item */
        q = _("どの防具に錆止めをしますか?", "Rustproof which piece of armour? ");
        s = _("錆止めできるものがありません。", "You have nothing to rustproof.");
 
@@ -4807,7 +4776,6 @@ msg_format("%sが%sを包み込もうとしたが、%sはそれを跳ね返し
        /* not artifact or failed save... */
        else
        {
-               /* Oops */
                msg_format(_("恐怖の暗黒オーラがあなたの%sを包み込んだ!", "A terrible black aura blasts your %s!"), o_name);
                chg_virtue(V_ENCHANT, -5);
 
@@ -4836,7 +4804,6 @@ msg_format("%sが%sを包み込もうとしたが、%sはそれを跳ね返し
                /* Recalculate mana */
                p_ptr->update |= (PU_MANA);
 
-               /* Window stuff */
                p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
        }
 
@@ -4877,7 +4844,6 @@ bool curse_weapon_object(bool force, object_type *o_ptr)
        /* not artifact or failed save... */
        else
        {
-               /* Oops */
                if (!force) msg_format(_("恐怖の暗黒オーラがあなたの%sを包み込んだ!", "A terrible black aura blasts your %s!"), o_name);
                chg_virtue(V_ENCHANT, -5);
 
@@ -4906,7 +4872,6 @@ bool curse_weapon_object(bool force, object_type *o_ptr)
                /* Recalculate mana */
                p_ptr->update |= (PU_MANA);
 
-               /* Window stuff */
                p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
        }
 
@@ -4955,7 +4920,6 @@ bool brand_bolts(void)
                /* Randomize */
                if (randint0(100) < 75) continue;
 
-               /* Message */
                msg_print(_("クロスボウの矢が炎のオーラに包まれた!", "Your bolts are covered in a fiery aura!"));
 
                /* Ego-item */
@@ -5025,7 +4989,6 @@ static IDX poly_r_idx(MONRACE_IDX r_idx)
                /* Use that index */
                r_idx = r;
 
-               /* Done */
                break;
        }
 
@@ -5066,7 +5029,7 @@ bool polymorph_monster(POSITION y, POSITION x)
        {
                BIT_FLAGS mode = 0L;
                bool preserve_hold_objects = back_m.hold_o_idx ? TRUE : FALSE;
-               s16b this_o_idx, next_o_idx = 0;
+               OBJECT_IDX this_o_idx, next_o_idx = 0;
 
                /* Get the monsters attitude */
                if (is_friendly(m_ptr)) mode |= PM_FORCE_FRIENDLY;
@@ -5230,7 +5193,6 @@ bool eat_magic(int power)
 
        item_tester_hook = item_tester_hook_recharge;
 
-       /* Get an item */
        q = _("どのアイテムから魔力を吸収しますか?", "Drain which item? ");
        s = _("魔力を吸収できるアイテムがありません。", "You have nothing to drain.");
 
@@ -5315,7 +5277,6 @@ bool eat_magic(int power)
                                        p_ptr->total_weight -= q_ptr->weight;
                                        item = inven_carry(q_ptr);
 
-                                       /* Message */
                                        msg_print(_("杖をまとめなおした。", "You unstack your staff."));
                                }
                        }
@@ -5631,3 +5592,130 @@ void massacre(void)
                        py_attack(y, x, 0);
        }
 }
+
+bool eat_lock(void)
+{
+       POSITION x, y;
+       cave_type *c_ptr;
+       feature_type *f_ptr, *mimic_f_ptr;
+       DIRECTION dir;
+
+       if (!get_rep_dir2(&dir)) return FALSE;
+       y = p_ptr->y + ddy[dir];
+       x = p_ptr->x + ddx[dir];
+       c_ptr = &cave[y][x];
+       f_ptr = &f_info[c_ptr->feat];
+       mimic_f_ptr = &f_info[get_feat_mimic(c_ptr)];
+
+       stop_mouth();
+
+       if (!have_flag(mimic_f_ptr->flags, FF_HURT_ROCK))
+       {
+               msg_print(_("この地形は食べられない。", "You cannot eat this feature."));
+       }
+       else if (have_flag(f_ptr->flags, FF_PERMANENT))
+       {
+               msg_format(_("いてっ!この%sはあなたの歯より硬い!", "Ouch!  This %s is harder than your teeth!"), f_name + mimic_f_ptr->name);
+       }
+       else if (c_ptr->m_idx)
+       {
+               monster_type *m_ptr = &m_list[c_ptr->m_idx];
+               msg_print(_("何かが邪魔しています!", "There's something in the way!"));
+
+               if (!m_ptr->ml || !is_pet(m_ptr)) py_attack(y, x, 0);
+       }
+       else if (have_flag(f_ptr->flags, FF_TREE))
+       {
+               msg_print(_("木の味は好きじゃない!", "You don't like the woody taste!"));
+       }
+       else if (have_flag(f_ptr->flags, FF_GLASS))
+       {
+               msg_print(_("ガラスの味は好きじゃない!", "You don't like the glassy taste!"));
+       }
+       else if (have_flag(f_ptr->flags, FF_DOOR) || have_flag(f_ptr->flags, FF_CAN_DIG))
+       {
+               (void)set_food(p_ptr->food + 3000);
+       }
+       else if (have_flag(f_ptr->flags, FF_MAY_HAVE_GOLD) || have_flag(f_ptr->flags, FF_HAS_GOLD))
+       {
+               (void)set_food(p_ptr->food + 5000);
+       }
+       else
+       {
+               msg_format(_("この%sはとてもおいしい!", "This %s is very filling!"), f_name + mimic_f_ptr->name);
+               (void)set_food(p_ptr->food + 10000);
+       }
+
+       /* Destroy the wall */
+       cave_alter_feat(y, x, FF_HURT_ROCK);
+
+       /* Move the player */
+       (void)move_player_effect(y, x, MPE_DONT_PICKUP);
+       return TRUE;
+}
+
+
+bool shock_power(void)
+{
+       DIRECTION dir;
+       POSITION y, x;
+       HIT_POINT dam;
+       PLAYER_LEVEL plev = p_ptr->lev;
+       int boost = P_PTR_KI;
+       if (heavy_armor()) boost /= 2;
+
+       project_length = 1;
+       if (!get_aim_dir(&dir)) return FALSE;
+
+       y = p_ptr->y + ddy[dir];
+       x = p_ptr->x + ddx[dir];
+       dam = damroll(8 + ((plev - 5) / 4) + boost / 12, 8);
+       fire_beam(GF_MISSILE, dir, dam);
+       if (cave[y][x].m_idx)
+       {
+               int i;
+               int ty = y, tx = x;
+               int oy = y, ox = x;
+               MONSTER_IDX m_idx = cave[y][x].m_idx;
+               monster_type *m_ptr = &m_list[m_idx];
+               monster_race *r_ptr = &r_info[m_ptr->r_idx];
+               char m_name[80];
+
+               monster_desc(m_name, m_ptr, 0);
+
+               if (randint1(r_ptr->level * 3 / 2) > randint0(dam / 2) + dam / 2)
+               {
+                       msg_format(_("%sは飛ばされなかった。", "%^s was not blown away."), m_name);
+               }
+               else
+               {
+                       for (i = 0; i < 5; i++)
+                       {
+                               y += ddy[dir];
+                               x += ddx[dir];
+                               if (cave_empty_bold(y, x))
+                               {
+                                       ty = y;
+                                       tx = x;
+                               }
+                               else break;
+                       }
+                       if ((ty != oy) || (tx != ox))
+                       {
+                               msg_format(_("%sを吹き飛ばした!", "You blow %s away!"), m_name);
+                               cave[oy][ox].m_idx = 0;
+                               cave[ty][tx].m_idx = (s16b)m_idx;
+                               m_ptr->fy = (byte_hack)ty;
+                               m_ptr->fx = (byte_hack)tx;
+
+                               update_mon(m_idx, TRUE);
+                               lite_spot(oy, ox);
+                               lite_spot(ty, tx);
+
+                               if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
+                                       p_ptr->update |= (PU_MON_LITE);
+                       }
+               }
+       }
+       return TRUE;
+}
\ No newline at end of file