OSDN Git Service

Revert "Merge branch 'master' of git.osdn.net:/gitroot/hengband/hengband"
[hengband/hengband.git] / src / cmd-usestaff.c
index 7216190..4ab7403 100644 (file)
@@ -1,20 +1,9 @@
 #include "angband.h"
-#include "util.h"
-
-#include "player-race.h"
+#include "projection.h"
 #include "spells-summon.h"
 #include "avatar.h"
 #include "player-status.h"
-#include "player-effects.h"
-#include "player-class.h"
-#include "spells.h"
 #include "spells-status.h"
-#include "spells-floor.h"
-#include "object-hook.h"
-#include "cmd-basic.h"
-#include "floor.h"
-#include "objectkind.h"
-#include "view-mainwindow.h"
 
 
 
@@ -64,7 +53,7 @@ int staff_effect(OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, boo
                        const int times = randint1(powerful ? 8 : 4);
                        for (k = 0; k < times; k++)
                        {
-                               if (summon_specific(0, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+                               if (summon_specific(0, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET), '\0'))
                                {
                                        ident = TRUE;
                                }
@@ -262,8 +251,8 @@ int staff_effect(OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, boo
                case SV_STAFF_NOTHING:
                {
                        msg_print(_("何も起らなかった。", "Nothing happen."));
-                       if (PRACE_IS_(RACE_SKELETON) || PRACE_IS_(RACE_GOLEM) ||
-                               PRACE_IS_(RACE_ZOMBIE) || PRACE_IS_(RACE_SPECTRE))
+                       if (prace_is_(RACE_SKELETON) || prace_is_(RACE_GOLEM) ||
+                               prace_is_(RACE_ZOMBIE) || prace_is_(RACE_SPECTRE))
                                msg_print(_("もったいない事をしたような気がする。食べ物は大切にしなくては。", "What a waste.  It's your food!"));
                        break;
                }
@@ -293,7 +282,7 @@ void do_cmd_use_staff_aux(INVENTORY_IDX item)
        /* Get the item (in the pack) */
        if (item >= 0)
        {
-               o_ptr = &p_ptr->inventory_list[item];
+               o_ptr = &inventory[item];
        }
 
        /* Get the item (on the floor) */
@@ -394,6 +383,8 @@ void do_cmd_use_staff_aux(INVENTORY_IDX item)
                object_type forge;
                object_type *q_ptr;
                q_ptr = &forge;
+
+               /* Obtain a local object */
                object_copy(q_ptr, o_ptr);
 
                /* Modify quantity */