OSDN Git Service

[Refactor] #38862 Moved object*.c/h to object/
[hengband/hengband.git] / src / cmd / cmd-zaprod.c
index cc7e78b..2379df6 100644 (file)
@@ -1,20 +1,23 @@
 #include "angband.h"
 #include "util.h"
+#include "main/sound-definitions-table.h"
 
 #include "avatar.h"
 #include "player-status.h"
 #include "player-effects.h"
 #include "player-class.h"
 #include "player-inventory.h"
-#include "objectkind.h"
-#include "object-hook.h"
-#include "spells.h"
+#include "object/object-kind.h"
+#include "object/object-hook.h"
+#include "spell/spells-type.h"
 #include "spells-status.h"
 #include "spells-floor.h"
 #include "cmd-basic.h"
-#include "floor.h"
+#include "floor/floor.h"
 #include "targeting.h"
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
+#include "spell/spells2.h"
+#include "spell/spells3.h"
 
 /*!
  * @brief ロッドの効果を発動する
@@ -55,10 +58,10 @@ int rod_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION d
        case SV_ROD_IDENTIFY:
        {
                if (powerful) {
-                       if (!identify_fully(FALSE)) *use_charge = FALSE;
+                       if (!identify_fully(creature_ptr, FALSE, 0)) *use_charge = FALSE;
                }
                else {
-                       if (!ident_spell(creature_ptr, FALSE)) *use_charge = FALSE;
+                       if (!ident_spell(creature_ptr, FALSE, 0)) *use_charge = FALSE;
                }
                ident = TRUE;
                break;
@@ -133,14 +136,14 @@ int rod_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION d
        case SV_ROD_TELEPORT_AWAY:
        {
                int distance = MAX_SIGHT * (powerful ? 8 : 5);
-               if (teleport_monster(dir, distance)) ident = TRUE;
+               if (teleport_monster(creature_ptr, dir, distance)) ident = TRUE;
                break;
        }
 
        case SV_ROD_DISARMING:
        {
-               if (disarm_trap(dir)) ident = TRUE;
-               if (powerful && disarm_traps_touch()) ident = TRUE;
+               if (disarm_trap(creature_ptr, dir)) ident = TRUE;
+               if (powerful && disarm_traps_touch(creature_ptr)) ident = TRUE;
                break;
        }
 
@@ -148,32 +151,32 @@ int rod_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION d
        {
                HIT_POINT dam = damroll((powerful ? 12 : 6), 8);
                msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
-               (void)lite_line(dir, dam);
+               (void)lite_line(creature_ptr, dir, dam);
                ident = TRUE;
                break;
        }
 
        case SV_ROD_SLEEP_MONSTER:
        {
-               if (sleep_monster(dir, lev)) ident = TRUE;
+               if (sleep_monster(creature_ptr, dir, lev)) ident = TRUE;
                break;
        }
 
        case SV_ROD_SLOW_MONSTER:
        {
-               if (slow_monster(dir, lev)) ident = TRUE;
+               if (slow_monster(creature_ptr, dir, lev)) ident = TRUE;
                break;
        }
 
        case SV_ROD_HYPODYNAMIA:
        {
-               if (hypodynamic_bolt(dir, 70 + 3 * lev / 2)) ident = TRUE;
+               if (hypodynamic_bolt(creature_ptr, dir, 70 + 3 * lev / 2)) ident = TRUE;
                break;
        }
 
        case SV_ROD_POLYMORPH:
        {
-               if (poly_monster(dir, lev)) ident = TRUE;
+               if (poly_monster(creature_ptr, dir, lev)) ident = TRUE;
                break;
        }
 
@@ -243,7 +246,7 @@ int rod_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION d
        case SV_ROD_STONE_TO_MUD:
        {
                HIT_POINT dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
-               if (wall_to_mud(dir, dam)) ident = TRUE;
+               if (wall_to_mud(creature_ptr, dir, dam)) ident = TRUE;
                break;
        }
 
@@ -299,7 +302,7 @@ void exe_zap_rod(player_type *creature_ptr, INVENTORY_IDX item)
                !object_is_aware(o_ptr))
        {
                /* Get a direction, allow cancel */
-               if (!get_aim_dir(&dir)) return;
+               if (!get_aim_dir(creature_ptr, &dir)) return;
        }
 
 
@@ -380,7 +383,7 @@ void exe_zap_rod(player_type *creature_ptr, INVENTORY_IDX item)
        /* Successfully determined the object function */
        if (ident && !object_is_aware(o_ptr))
        {
-               object_aware(o_ptr);
+               object_aware(creature_ptr, o_ptr);
                gain_exp(creature_ptr, (lev + (creature_ptr->lev >> 1)) / creature_ptr->lev);
        }