OSDN Git Service

[Refactor] #37353 鏡使いのレイシャル「静水」を mirror_concentration() に分離。 / Separate Mirror master...
[hengband/hengband.git] / src / cmd-zaprod.c
index 8f3aa5d..2972d55 100644 (file)
@@ -1,4 +1,6 @@
 #include "angband.h"
+#include "avatar.h"
+#include "spells-status.h"
 
 /*!
  * @brief ロッドの効果を発動する
@@ -49,7 +51,7 @@ int rod_effect(OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool *use_charge, bool
 
        case SV_ROD_RECALL:
        {
-               if (!word_of_recall()) *use_charge = FALSE;
+               if (!recall_player(p_ptr, randint0(21) + 15)) *use_charge = FALSE;
                ident = TRUE;
                break;
        }
@@ -395,7 +397,19 @@ void do_cmd_zap_rod_aux(INVENTORY_IDX item)
 void do_cmd_zap_rod(void)
 {
        OBJECT_IDX item;
-       cptr q, s;
+       concptr q, s;
+
+       if (p_ptr->wild_mode)
+       {
+               return;
+       }
+
+       if (p_ptr->inside_arena)
+       {
+               msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
+               msg_print(NULL);
+               return;
+       }
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
@@ -408,7 +422,7 @@ void do_cmd_zap_rod(void)
        q = _("どのロッドを振りますか? ", "Zap which rod? ");
        s = _("使えるロッドがない。", "You have no rod to zap.");
 
-       if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
+       if (!choose_object(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
 
        /* Zap the rod */
        do_cmd_zap_rod_aux(item);