OSDN Git Service

[Refactor] #39963 Moved TELEPORT_* from spells.h to spells-util.h and made them enum...
[hengband/hengband.git] / src / cmd / cmd-activate.c
index 75f6948..56ef3d7 100644 (file)
@@ -7,37 +7,31 @@
 */
 
 #include "angband.h"
-#include "util.h"
+#include "main/sound-definitions-table.h"
 
-#include "cmd-activate.h"
-#include "cmd-item.h"
-#include "cmd-basic.h"
-#include "floor.h"
+#include "cmd/cmd-activate.h"
+#include "cmd/cmd-basic.h"
+#include "cmd/cmd-save.h"
 #include "object-hook.h"
 #include "sort.h"
 #include "artifact.h"
 #include "avatar.h"
-#include "spells.h"
 #include "spells-summon.h"
 #include "spells-status.h"
 #include "spells-object.h"
 #include "spells-floor.h"
 #include "player-effects.h"
-#include "realm-hex.h"
-#include "player-status.h"
+#include "realm/realm-hex.h"
 #include "player-damage.h"
 #include "player-inventory.h"
 #include "monster-status.h"
 #include "files.h"
-#include "objectkind.h"
+#include "object/object-kind.h"
 #include "object-ego.h"
-#include "grid.h"
 #include "targeting.h"
-#include "realm-song.h"
-#include "player-race.h"
-#include "player-class.h"
-#include "view-mainwindow.h"
 #include "world.h"
+#include "effect/spells-effect-util.h"
+#include "spell/spells-type.h"
 
 /*!
  * @brief 装備耐性に準じたブレス効果の選択テーブル /
@@ -537,9 +531,9 @@ void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
                {
                        success = FALSE;
                        if (!get_direction(user_ptr, &dir, FALSE, FALSE)) return;
-                       if (monster_can_enter(user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
+                       if (monster_can_enter(user_ptr, user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
                        {
-                               if (place_monster_aux(0, user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
+                               if (place_monster_aux(user_ptr, 0, user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
                                {
                                        if (o_ptr->xtra3) user_ptr->current_floor_ptr->m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
                                        if (o_ptr->xtra5) user_ptr->current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
@@ -859,8 +853,8 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        {
                msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
                if (!get_aim_dir(user_ptr, &dir)) return FALSE;
-               if (hypodynamic_bolt(user_ptr, dir, 100))
-                       break;
+               hypodynamic_bolt(user_ptr, dir, 100);
+               break;
        }
 
        case ACT_HYPODYNAMIA_2:
@@ -1142,7 +1136,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        {
                if (o_ptr->name1 == ART_HYOUSIGI)
                {
-                       msg_print(_("拍子木を打った。", "You beat Your wooden clappers."));
+                       msg_print(_("拍子木を打った。", "You beat your wooden clappers."));
                }
                else
                {
@@ -1189,14 +1183,14 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
 
        case ACT_SUMMON_ANIMAL:
        {
-               (void)summon_specific(-1, user_ptr->y, user_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
+               (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
                break;
        }
 
        case ACT_SUMMON_PHANTOM:
        {
                msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
-               (void)summon_specific(-1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
+               (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
                break;
        }
 
@@ -1221,7 +1215,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        case ACT_SUMMON_DAWN:
        {
                msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
-               (void)summon_specific(-1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
+               (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
                break;
        }
 
@@ -1483,7 +1477,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        case ACT_RUNE_EXPLO:
        {
                msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
-               explosive_rune(user_ptr->current_floor_ptr, user_ptr->y, user_ptr->x);
+               explosive_rune(user_ptr, user_ptr->y, user_ptr->x);
                break;
        }
 
@@ -1539,7 +1533,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        case ACT_TELEPORT:
        {
                msg_print(_("周りの空間が歪んでいる...", "It twists space around you..."));
-               teleport_player(user_ptr, 100, 0L);
+               teleport_player(user_ptr, 100, TELEPORT_SPONTANEOUS);
                break;
        }
 
@@ -1609,10 +1603,10 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
                switch (randint1(13))
                {
                case 1: case 2: case 3: case 4: case 5:
-                       teleport_player(user_ptr, 10, 0L);
+                       teleport_player(user_ptr, 10, TELEPORT_SPONTANEOUS);
                        break;
                case 6: case 7: case 8: case 9: case 10:
-                       teleport_player(user_ptr, 222, 0L);
+                       teleport_player(user_ptr, 222, TELEPORT_SPONTANEOUS);
                        break;
                case 11: case 12:
                        (void)stair_creation(user_ptr);
@@ -1665,7 +1659,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
 
        case ACT_PHASE_DOOR:
        {
-               teleport_player(user_ptr, 10, 0L);
+               teleport_player(user_ptr, 10, TELEPORT_SPONTANEOUS);
                break;
        }