OSDN Git Service

[Refactor] #40414 Separated spells-launcher.c/h from spells2.c/h
authorHourier <hourier@users.sourceforge.jp>
Thu, 4 Jun 2020 11:31:49 +0000 (20:31 +0900)
committerHourier <hourier@users.sourceforge.jp>
Thu, 4 Jun 2020 11:31:49 +0000 (20:31 +0900)
42 files changed:
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/cmd-action/cmd-mane.c
src/cmd-item/cmd-activate.c
src/cmd-item/cmd-read.c
src/cmd-item/cmd-zaprod.c
src/cmd-item/cmd-zapwand.c
src/grid/trap.c
src/grid/trap.h
src/mind/mind.c
src/mind/racial.c
src/mspell/mspell-summon.c
src/mspell/mspell-summon.h
src/mspell/mspells3.c
src/mutation/mutation-processor.c
src/mutation/mutation.c
src/player/patron.c
src/player/patron.h
src/realm/realm-arcane.c
src/realm/realm-chaos.c
src/realm/realm-crusade.c
src/realm/realm-daemon.c
src/realm/realm-daemon.h
src/realm/realm-death.c
src/realm/realm-death.h
src/realm/realm-hex.c
src/realm/realm-hissatsu.c
src/realm/realm-life.c
src/realm/realm-life.h
src/realm/realm-nature.c
src/realm/realm-song.c
src/realm/realm-sorcery.c
src/realm/realm-trump.c
src/specific-object/chest.c
src/spell/spells-launcher.c [new file with mode: 0644]
src/spell/spells-launcher.h [new file with mode: 0644]
src/spell/spells-status.c
src/spell/spells-teleport.c
src/spell/spells2.c
src/spell/spells2.h
src/spell/spells3.c

index 8acbb91..f411cea 100644 (file)
     <ClCompile Include="..\..\src\spell\spells-describer.c" />\r
     <ClCompile Include="..\..\src\spell\spells-detection.c" />\r
     <ClCompile Include="..\..\src\spell\spells-hex.c" />\r
+    <ClCompile Include="..\..\src\spell\spells-launcher.c" />\r
     <ClCompile Include="..\..\src\spell\spells-teleport.c" />\r
     <ClCompile Include="..\..\src\system\system-variables.c" />\r
     <ClCompile Include="..\..\src\core\show-file.c" />\r
     <ClInclude Include="..\..\src\realm\realm-song-numbers.h" />\r
     <ClInclude Include="..\..\src\spell\spells-describer.h" />\r
     <ClInclude Include="..\..\src\spell\spells-hex.h" />\r
+    <ClInclude Include="..\..\src\spell\spells-launcher.h" />\r
     <ClInclude Include="..\..\src\spell\spells-teleport.h" />\r
     <ClInclude Include="..\..\src\sv-definition\sv-amulet-types.h" />\r
     <ClInclude Include="..\..\src\sv-definition\sv-armor-types.h" />\r
index 936fe0d..ae64df4 100644 (file)
     <ClCompile Include="..\..\src\spell\spells-teleport.c">
       <Filter>spell</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\spell\spells-launcher.c">
+      <Filter>spell</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\cmd\cmd-basic.h">
     <ClInclude Include="..\..\src\spell\spells-teleport.h">
       <Filter>spell</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\spell\spells-launcher.h">
+      <Filter>spell</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 7e0ce8b..847c8dd 100644 (file)
@@ -382,24 +382,25 @@ hengband_SOURCES = \
        specific-object/death-scythe.c specific-object/death-scythe.h \
        specific-object/torch.c specific-object/torch.h \
        \
-       spell/technic-info-table.c spell/technic-info-table.h \
-       spell/spells-describer.c spell/spells-describer.h \
-       spell/spells-execution.c spell/spells-execution.h \
-       spell/spells-util.h spell/spells-type.h \
+       spell/music-checker.c spell/music-checker.h \
        spell/process-effect.c spell/process-effect.h \
        spell/range-calc.c spell/range-calc.h \
        spell/spells2.c spell/spells2.h \
        spell/spells3.c spell/spells3.h \
-       spell/music-checker.c spell/music-checker.h \
+       spell/spells-describer.c spell/spells-describer.h \
+       spell/spells-detection.c spell/spells-detection.h \
        spell/spells-diceroll.c spell/spells-diceroll.h \
+       spell/spells-execution.c spell/spells-execution.h \
        spell/spells-floor.c spell/spells-floor.h \
        spell/spells-hex.c spell/spells-hex.h \
+       spell/spells-launcher.c spell/spells-launcher.h \
        spell/spells-object.c spell/spells-object.h \
+       spell/spells-summon.c spell/spells-summon.h \
        spell/spells-status.c spell/spells-status.h \
        spell/spells-teleport.c spell/spells-teleport.h \
-       spell/spells-summon.c spell/spells-summon.h \
+       spell/spells-util.h spell/spells-type.h \
        spell/spells-world.c spell/spells-world.h \
-       spell/spells-detection.c spell/spells-detection.h \
+       spell/technic-info-table.c spell/technic-info-table.h \
        \
        store/store.c store/store.h \
        store/black-market.c store/black-market.h \
index 2d10044..41dec9f 100644 (file)
@@ -23,6 +23,7 @@
 #include "mspell/mspell-type.h"
 #include "player/player-effects.h"
 #include "player/player-status.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
index 5ef9158..1985b21 100644 (file)
@@ -31,6 +31,7 @@
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
 #include "spell/spells-hex.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
index e9e740e..718d232 100644 (file)
@@ -27,6 +27,7 @@
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
 #include "spell/spells-hex.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
index e7bf1bd..f1ade29 100644 (file)
@@ -17,6 +17,7 @@
 #include "player/player-status.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
index e9254d7..637a4d7 100644 (file)
@@ -15,6 +15,7 @@
 #include "player/player-class.h"
 #include "player/player-effects.h"
 #include "player/player-status.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
index ef33efa..a3f74fc 100644 (file)
@@ -1,32 +1,33 @@
 #include "system/angband.h"
-#include "util/util.h"
-#include "main/sound-definitions-table.h"
-#include "io/write-diary.h"
+#include "grid/trap.h"
 #include "cmd-io/cmd-dump.h"
 #include "cmd-io/cmd-save.h"
-#include "grid/trap.h"
-#include "player/player-damage.h"
-#include "player/player-move.h"
-#include "player/player-effects.h"
-#include "player/player-class.h"
-#include "player/player-personalities-table.h"
-#include "spell/spells-summon.h"
+#include "dungeon/dungeon.h"
 #include "dungeon/quest.h"
-#include "object-enchant/artifact.h"
-#include "grid/feature.h"
-#include "player/player-status.h"
-#include "grid/grid.h"
-#include "spell/spells-type.h"
 #include "effect/effect-characteristics.h"
 #include "floor/floor-save.h"
-#include "main/init.h"
+#include "grid/feature.h"
+#include "grid/grid.h"
 #include "io/files-util.h"
-#include "dungeon/dungeon.h"
-#include "world/world.h"
+#include "io/write-diary.h"
+#include "main/init.h"
+#include "main/sound-definitions-table.h"
+#include "mind/racial-mirror-master.h"
+#include "object-enchant/artifact.h"
+#include "player/player-class.h"
+#include "player/player-damage.h"
+#include "player/player-effects.h"
+#include "player/player-move.h"
+#include "player/player-personalities-table.h"
+#include "player/player-status.h"
 #include "spell/process-effect.h"
+#include "spell/spells-launcher.h"
+#include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
+#include "spell/spells-type.h"
 #include "spell/spells2.h"
-#include "mind/racial-mirror-master.h"
+#include "util/util.h"
+#include "world/world.h"
 
 static s16b normal_traps[MAX_NORMAL_TRAPS];
 
index 4982a84..c8a1e51 100644 (file)
@@ -1,11 +1,4 @@
-
-extern void init_normal_traps(void);
-extern FEAT_IDX choose_random_trap(player_type *trapped_ptr);
-extern void disclose_grid(player_type *trapped_ptr, POSITION y, POSITION x);
-extern void place_trap(player_type *trapped_ptr, POSITION y, POSITION x);
-extern void hit_trap(player_type *trapped_ptr, bool break_trap);
-
-extern const int chest_traps[64];
+#pragma once
 
 /*!
  * 箱のトラップ定義 Chest trap flags
@@ -47,12 +40,15 @@ extern const int chest_traps[64];
 
 #define MAX_NORMAL_TRAPS 18
 
-
 /* Types of special traps */
 #define TRAP_OPEN       18
 #define TRAP_ARMAGEDDON 19
 #define TRAP_PIRANHA    20
 
+extern const int chest_traps[64];
 
-
-/* See init_feat_variables() in init2.c */
+void init_normal_traps(void);
+FEAT_IDX choose_random_trap(player_type *trapped_ptr);
+void disclose_grid(player_type *trapped_ptr, POSITION y, POSITION x);
+void place_trap(player_type *trapped_ptr, POSITION y, POSITION x);
+void hit_trap(player_type *trapped_ptr, bool break_trap);
index 0c0b268..ef0b360 100644 (file)
@@ -39,6 +39,7 @@
 #include "spell/process-effect.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
index c219d05..0813e91 100644 (file)
@@ -34,6 +34,7 @@
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
 #include "spell/spells-hex.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-teleport.h"
index 7d26b5c..93458a5 100644 (file)
@@ -1,25 +1,24 @@
-#include "system/angband.h"
-#include "mspell/mspell-summon.h"
-#include "spell/spells-summon.h"
-#include "mspell/monster-spell.h"
-#include "spell/spells-type.h"
+#include "mspell/mspell-summon.h"
 #include "effect/effect-characteristics.h"
+#include "monster/monster-status.h"
+#include "mspell/monster-spell.h"
 #include "mspell/mspell-util.h"
-#include "spell/spells2.h"
-#include "spell/process-effect.h"
 #include "player/player-move.h"
-#include "monster/monster-status.h"
+#include "spell/process-effect.h"
+#include "spell/spells-launcher.h"
+#include "spell/spells-summon.h"
+#include "spell/spells-type.h"
 
 /*!
-* @brief 特定条件のモンスター召喚のみPM_ALLOW_UNIQUEを許可する /
-* @param floor_ptr 現在フロアへの参照ポインタ
-* @param m_idx モンスターID
-* @return 召喚可能であればPM_ALLOW_UNIQUEを返す。
-*/
-static BIT_FLAGS monster_u_mode(floor_typefloor_ptr, MONSTER_IDX m_idx)
+ * @brief 特定条件のモンスター召喚のみPM_ALLOW_UNIQUEを許可する /
+ * @param floor_ptr 現在フロアへの参照ポインタ
+ * @param m_idx モンスターID
+ * @return 召喚可能であればPM_ALLOW_UNIQUEを返す。
+ */
+static BIT_FLAGS monster_u_mode(floor_type *floor_ptr, MONSTER_IDX m_idx)
 {
     BIT_FLAGS u_mode = 0L;
-    monster_typem_ptr = &floor_ptr->m_list[m_idx];
+    monster_type *m_ptr = &floor_ptr->m_list[m_idx];
     bool pet = is_pet(m_ptr);
     if (!pet)
         u_mode |= PM_ALLOW_UNIQUE;
@@ -27,15 +26,15 @@ static BIT_FLAGS monster_u_mode(floor_type* floor_ptr, MONSTER_IDX m_idx)
 }
 
 /*!
-* @brief 鷹召喚の処理。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param rlev 呪文を唱えるモンスターのレベル
-* @param m_idx 呪文を唱えるモンスターID
-* @return 召喚したモンスターの数を返す。
-*/
-MONSTER_NUMBER summon_EAGLE(player_typetarget_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+ * @brief 鷹召喚の処理。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param rlev 呪文を唱えるモンスターのレベル
+ * @param m_idx 呪文を唱えるモンスターID
+ * @return 召喚したモンスターの数を返す。
+ */
+MONSTER_NUMBER summon_EAGLE(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
 {
     int count = 0;
     int num = 4 + randint1(3);
@@ -55,7 +54,7 @@ MONSTER_NUMBER summon_EAGLE(player_type* target_ptr, POSITION y, POSITION x, int
  * @param m_idx 呪文を唱えるモンスターID
  * @return 召喚したモンスターの数を返す。
  */
-MONSTER_NUMBER summon_IE(player_typetarget_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_IE(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
 {
     BIT_FLAGS mode = 0L;
     int count = 0;
@@ -78,17 +77,15 @@ MONSTER_NUMBER summon_IE(player_type* target_ptr, POSITION y, POSITION x, int rl
  * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
  * @return 召喚したモンスターの数を返す。
  */
-MONSTER_NUMBER summon_guardian(player_typetarget_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+MONSTER_NUMBER summon_guardian(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
     int num = 2 + randint1(3);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
 
     if (r_info[MON_JORMUNGAND].cur_num < r_info[MON_JORMUNGAND].max_num && one_in_(6)) {
-        simple_monspell_message(target_ptr, m_idx, t_idx,
-            _("地面から水が吹き出した!", "Water blew off from the ground!"),
-            _("地面から水が吹き出した!", "Water blew off from the ground!"),
-            TARGET_TYPE);
+        simple_monspell_message(target_ptr, m_idx, t_idx, _("地面から水が吹き出した!", "Water blew off from the ground!"),
+            _("地面から水が吹き出した!", "Water blew off from the ground!"), TARGET_TYPE);
 
         if (mon_to_player)
             fire_ball_hide(target_ptr, GF_WATER_FLOW, 0, 3, 8);
@@ -105,14 +102,14 @@ MONSTER_NUMBER summon_guardian(player_type* target_ptr, POSITION y, POSITION x,
 }
 
 /*!
-* @brief ロックのクローン召喚の処理。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @return 召喚したモンスターの数を返す。
-*/
-MONSTER_NUMBER summon_LOCKE_CLONE(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+ * @brief ロックのクローン召喚の処理。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @return 召喚したモンスターの数を返す。
+ */
+MONSTER_NUMBER summon_LOCKE_CLONE(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
 {
     BIT_FLAGS mode = 0L;
     int count = 0;
@@ -125,15 +122,15 @@ MONSTER_NUMBER summon_LOCKE_CLONE(player_type* target_ptr, POSITION y, POSITION
 }
 
 /*!
-* @brief シラミ召喚の処理。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param rlev 呪文を唱えるモンスターのレベル
-* @param m_idx 呪文を唱えるモンスターID
-* @return 召喚したモンスターの数を返す。
-*/
-MONSTER_NUMBER summon_LOUSE(player_typetarget_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+ * @brief シラミ召喚の処理。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param rlev 呪文を唱えるモンスターのレベル
+ * @param m_idx 呪文を唱えるモンスターID
+ * @return 召喚したモンスターの数を返す。
+ */
+MONSTER_NUMBER summon_LOUSE(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
 {
     int count = 0;
     int num = 2 + randint1(3);
@@ -145,15 +142,15 @@ MONSTER_NUMBER summon_LOUSE(player_type* target_ptr, POSITION y, POSITION x, int
 }
 
 /*!
-* @brief 救援召喚の通常処理。同シンボルのモンスターを召喚する。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param rlev 呪文を唱えるモンスターのレベル
-* @param m_idx 呪文を唱えるモンスターID
-* @return 召喚したモンスターの数を返す。
-*/
-MONSTER_NUMBER summon_Kin(player_typetarget_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+ * @brief 救援召喚の通常処理。同シンボルのモンスターを召喚する。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param rlev 呪文を唱えるモンスターのレベル
+ * @param m_idx 呪文を唱えるモンスターID
+ * @return 召喚したモンスターの数を返す。
+ */
+MONSTER_NUMBER summon_Kin(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
 {
     int count = 0;
     for (int k = 0; k < 4; k++) {
@@ -164,20 +161,20 @@ MONSTER_NUMBER summon_Kin(player_type* target_ptr, POSITION y, POSITION x, int r
 }
 
 /*!
-* @brief RF6_S_KINの処理。救援召喚。使用するモンスターの種類により、実処理に分岐させる。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_KIN(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_KINの処理。救援召喚。使用するモンスターの種類により、実処理に分岐させる。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_KIN(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
-    monster_typem_ptr = &floor_ptr->m_list[m_idx];
-    monster_racer_ptr = &r_info[m_ptr->r_idx];
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
+    monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+    monster_race *r_ptr = &r_info[m_ptr->r_idx];
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     int count = 0;
     GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN], m_poss[80];
@@ -191,11 +188,9 @@ void spell_RF6_S_KIN(player_type* target_ptr, POSITION y, POSITION x, MONSTER_ID
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
     if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT) {
-        monspell_message(target_ptr, m_idx, t_idx,
-            _("%^sが何かをつぶやいた。", "%^s mumbles."),
-            _("%^sがダンジョンの主を召喚した。", "%^s magically summons guardians of dungeons."),
+        monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
             _("%^sがダンジョンの主を召喚した。", "%^s magically summons guardians of dungeons."),
-            TARGET_TYPE);
+            _("%^sがダンジョンの主を召喚した。", "%^s magically summons guardians of dungeons."), TARGET_TYPE);
     } else {
         if (mon_to_player || (mon_to_mon && known && see_either))
             disturb(target_ptr, TRUE, TRUE);
@@ -251,29 +246,27 @@ void spell_RF6_S_KIN(player_type* target_ptr, POSITION y, POSITION x, MONSTER_ID
 }
 
 /*!
-* @brief RF6_S_CYBERの処理。サイバー・デーモン召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_CYBER(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_CYBERの処理。サイバー・デーモン召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_CYBER(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
     int count = 0;
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
-    monster_typem_ptr = &floor_ptr->m_list[m_idx];
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
+    monster_type *m_ptr = &floor_ptr->m_list[m_idx];
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
 
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sがサイバーデーモンを召喚した!", "%^s magically summons Cyberdemons!"),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
         _("%^sがサイバーデーモンを召喚した!", "%^s magically summons Cyberdemons!"),
-        TARGET_TYPE);
+        _("%^sがサイバーデーモンを召喚した!", "%^s magically summons Cyberdemons!"), TARGET_TYPE);
 
     if (is_friendly(m_ptr) && mon_to_mon) {
         count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP));
@@ -289,24 +282,21 @@ void spell_RF6_S_CYBER(player_type* target_ptr, POSITION y, POSITION x, MONSTER_
 }
 
 /*!
-* @brief RF6_S_MONSTERの処理。モンスター一体召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_MONSTER(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_MONSTERの処理。モンスター一体召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_MONSTER(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法で仲間を召喚した!", "%^s magically summons help!"),
-        _("%^sが魔法で仲間を召喚した!", "%^s magically summons help!"),
-        TARGET_TYPE);
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが魔法で仲間を召喚した!", "%^s magically summons help!"),
+        _("%^sが魔法で仲間を召喚した!", "%^s magically summons help!"), TARGET_TYPE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     int count = 0;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
@@ -327,24 +317,22 @@ void spell_RF6_S_MONSTER(player_type* target_ptr, POSITION y, POSITION x, MONSTE
 }
 
 /*!
-* @brief RF6_S_MONSTERSの処理。モンスター複数召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_MONSTERS(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_MONSTERSの処理。モンスター複数召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_MONSTERS(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法でモンスターを召喚した!", "%^s magically summons monsters!"),
-        _("%^sが魔法でモンスターを召喚した!", "%^s magically summons monsters!"),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
+        _("%^sが魔法でモンスターを召喚した!", "%^s magically summons monsters!"), _("%^sが魔法でモンスターを召喚した!", "%^s magically summons monsters!"),
         TARGET_TYPE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     int count = 0;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
@@ -365,25 +353,22 @@ void spell_RF6_S_MONSTERS(player_type* target_ptr, POSITION y, POSITION x, MONST
 }
 
 /*!
-* @brief RF6_S_ANTの処理。アリ召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_ANT(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_ANTの処理。アリ召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_ANT(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法でアリを召喚した。", "%^s magically summons ants."),
-        _("%^sが魔法でアリを召喚した。", "%^s magically summons ants."),
-        TARGET_TYPE);
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが魔法でアリを召喚した。", "%^s magically summons ants."),
+        _("%^sが魔法でアリを召喚した。", "%^s magically summons ants."), TARGET_TYPE);
 
     int count = 0;
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
@@ -399,27 +384,24 @@ void spell_RF6_S_ANT(player_type* target_ptr, POSITION y, POSITION x, MONSTER_ID
 }
 
 /*!
-* @brief RF6_S_SPIDERの処理。クモ召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_SPIDER(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_SPIDERの処理。クモ召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_SPIDER(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法でクモを召喚した。", "%^s magically summons spiders."),
-        _("%^sが魔法でクモを召喚した。", "%^s magically summons spiders."),
-        TARGET_TYPE);
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."), _("%^sが魔法でクモを召喚した。", "%^s magically summons spiders."),
+        _("%^sが魔法でクモを召喚した。", "%^s magically summons spiders."), TARGET_TYPE);
 
     int count = 0;
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     for (int k = 0; k < S_NUM_6; k++) {
         count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP);
@@ -433,25 +415,23 @@ void spell_RF6_S_SPIDER(player_type* target_ptr, POSITION y, POSITION x, MONSTER
 }
 
 /*!
-* @brief RF6_S_HOUNDの処理。ハウンド召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_HOUND(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_HOUNDの処理。ハウンド召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_HOUND(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法でハウンドを召喚した。", "%^s magically summons hounds."),
-        _("%^sが魔法でハウンドを召喚した。", "%^s magically summons hounds."),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
+        _("%^sが魔法でハウンドを召喚した。", "%^s magically summons hounds."), _("%^sが魔法でハウンドを召喚した。", "%^s magically summons hounds."),
         TARGET_TYPE);
 
     int count = 0;
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
@@ -467,25 +447,22 @@ void spell_RF6_S_HOUND(player_type* target_ptr, POSITION y, POSITION x, MONSTER_
 }
 
 /*!
-* @brief RF6_S_HYDRAの処理。ヒドラ召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_HYDRA(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_HYDRAの処理。ヒドラ召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_HYDRA(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法でヒドラを召喚した。", "%^s magically summons hydras."),
-        _("%^sが魔法でヒドラを召喚した。", "%^s magically summons hydras."),
-        TARGET_TYPE);
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
+        _("%^sが魔法でヒドラを召喚した。", "%^s magically summons hydras."), _("%^sが魔法でヒドラを召喚した。", "%^s magically summons hydras."), TARGET_TYPE);
 
     int count = 0;
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
@@ -501,26 +478,23 @@ void spell_RF6_S_HYDRA(player_type* target_ptr, POSITION y, POSITION x, MONSTER_
 }
 
 /*!
-* @brief RF6_S_ANGELの処理。天使一体召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_ANGEL(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_ANGELの処理。天使一体召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_ANGEL(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法で天使を召喚した!", "%^s magically summons an angel!"),
-        _("%^sが魔法で天使を召喚した!", "%^s magically summons an angel!"),
-        TARGET_TYPE);
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
+        _("%^sが魔法で天使を召喚した!", "%^s magically summons an angel!"), _("%^sが魔法で天使を召喚した!", "%^s magically summons an angel!"), TARGET_TYPE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
-    monster_typem_ptr = &floor_ptr->m_list[m_idx];
-    monster_racer_ptr = &r_info[m_ptr->r_idx];
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
+    monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+    monster_race *r_ptr = &r_info[m_ptr->r_idx];
     int num = 1;
     if ((r_ptr->flags1 & RF1_UNIQUE) && !easy_band) {
         num += r_ptr->level / 40;
@@ -546,24 +520,22 @@ void spell_RF6_S_ANGEL(player_type* target_ptr, POSITION y, POSITION x, MONSTER_
 }
 
 /*!
-* @brief RF6_S_DEMONの処理。デーモン一体召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_DEMON(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_DEMONの処理。デーモン一体召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_DEMON(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sは魔法で混沌の宮廷から悪魔を召喚した!", "%^s magically summons a demon from the Courts of Chaos!"),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
         _("%^sは魔法で混沌の宮廷から悪魔を召喚した!", "%^s magically summons a demon from the Courts of Chaos!"),
-        TARGET_TYPE);
+        _("%^sは魔法で混沌の宮廷から悪魔を召喚した!", "%^s magically summons a demon from the Courts of Chaos!"), TARGET_TYPE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     int count = 0;
     for (int k = 0; k < 1; k++) {
@@ -579,24 +551,22 @@ void spell_RF6_S_DEMON(player_type* target_ptr, POSITION y, POSITION x, MONSTER_
 }
 
 /*!
-* @brief RF6_S_UNDEADの処理。アンデッド一体召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_UNDEAD(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_UNDEADの処理。アンデッド一体召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_UNDEAD(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
         _("%^sが魔法でアンデッドの強敵を召喚した!", "%^s magically summons an undead adversary!"),
-        _("%sが魔法でアンデッドを召喚した。", "%^s magically summons undead."),
-        TARGET_TYPE);
+        _("%sが魔法でアンデッドを召喚した。", "%^s magically summons undead."), TARGET_TYPE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     int count = 0;
     for (int k = 0; k < 1; k++) {
@@ -612,24 +582,22 @@ void spell_RF6_S_UNDEAD(player_type* target_ptr, POSITION y, POSITION x, MONSTER
 }
 
 /*!
-* @brief RF6_S_DRAGONの処理。ドラゴン一体召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_DRAGON(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_DRAGONの処理。ドラゴン一体召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_DRAGON(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法でドラゴンを召喚した!", "%^s magically summons a dragon!"),
-        _("%^sが魔法でドラゴンを召喚した!", "%^s magically summons a dragon!"),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
+        _("%^sが魔法でドラゴンを召喚した!", "%^s magically summons a dragon!"), _("%^sが魔法でドラゴンを召喚した!", "%^s magically summons a dragon!"),
         TARGET_TYPE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     int count = 0;
     for (int k = 0; k < 1; k++) {
@@ -645,14 +613,14 @@ void spell_RF6_S_DRAGON(player_type* target_ptr, POSITION y, POSITION x, MONSTER
 }
 
 /*!
-* @brief ナズグル戦隊召喚の処理。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @return 召喚したモンスターの数を返す。
-*/
-MONSTER_NUMBER summon_NAZGUL(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
+ * @brief ナズグル戦隊召喚の処理。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @return 召喚したモンスターの数を返す。
+ */
+MONSTER_NUMBER summon_NAZGUL(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
 {
     BIT_FLAGS mode = 0L;
     POSITION cy = y;
@@ -691,54 +659,47 @@ MONSTER_NUMBER summon_NAZGUL(player_type* target_ptr, POSITION y, POSITION x, MO
         x = cx;
         count++;
         if (count == 1)
-            msg_format(_("「幽鬼戦隊%d号、ナズグル・ブラック!」",
-                           "A Nazgul says 'Nazgul-Rangers Number %d, Nazgul-Black!'"),
-                count);
+            msg_format(_("「幽鬼戦隊%d号、ナズグル・ブラック!」", "A Nazgul says 'Nazgul-Rangers Number %d, Nazgul-Black!'"), count);
         else
-            msg_format(_("「同じく%d号、ナズグル・ブラック!」",
-                           "Another one says 'Number %d, Nazgul-Black!'"),
-                count);
+            msg_format(_("「同じく%d号、ナズグル・ブラック!」", "Another one says 'Number %d, Nazgul-Black!'"), count);
 
         msg_print(NULL);
     }
 
-    msg_format(_("「%d人そろって、リングレンジャー!」",
-                   "They say 'The %d meets! We are the Ring-Ranger!'."),
-        count);
+    msg_format(_("「%d人そろって、リングレンジャー!」", "They say 'The %d meets! We are the Ring-Ranger!'."), count);
     msg_print(NULL);
     return count;
 }
 
 /*!
-* @brief RF6_S_HI_UNDEADの処理。強力なアンデッド召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_HI_UNDEAD(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_HI_UNDEADの処理。強力なアンデッド召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_HI_UNDEAD(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
     GAME_TEXT m_name[MAX_NLEN];
     monster_name(target_ptr, m_idx, m_name);
 
     disturb(target_ptr, TRUE, TRUE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
-    monster_typem_ptr = &floor_ptr->m_list[m_idx];
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
+    monster_type *m_ptr = &floor_ptr->m_list[m_idx];
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     int count = 0;
-    if (((m_ptr->r_idx == MON_MORGOTH) || (m_ptr->r_idx == MON_SAURON) || (m_ptr->r_idx == MON_ANGMAR)) && ((r_info[MON_NAZGUL].cur_num + 2) < r_info[MON_NAZGUL].max_num) && mon_to_player) {
+    if (((m_ptr->r_idx == MON_MORGOTH) || (m_ptr->r_idx == MON_SAURON) || (m_ptr->r_idx == MON_ANGMAR))
+        && ((r_info[MON_NAZGUL].cur_num + 2) < r_info[MON_NAZGUL].max_num) && mon_to_player) {
         count += summon_NAZGUL(target_ptr, y, x, m_idx);
     } else {
-        monspell_message(target_ptr, m_idx, t_idx,
-            _("%^sが何かをつぶやいた。", "%^s mumbles."),
+        monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
             _("%^sが魔法で強力なアンデッドを召喚した!", "%^s magically summons greater undead!"),
-            _("%sが魔法でアンデッドを召喚した。", "%^s magically summons undead."),
-            TARGET_TYPE);
+            _("%sが魔法でアンデッドを召喚した。", "%^s magically summons undead."), TARGET_TYPE);
 
         DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
         for (int k = 0; k < S_NUM_6; k++) {
@@ -759,24 +720,22 @@ void spell_RF6_S_HI_UNDEAD(player_type* target_ptr, POSITION y, POSITION x, MONS
 }
 
 /*!
-* @brief RF6_S_HI_DRAGONの処理。古代ドラゴン召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_HI_DRAGON(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_HI_DRAGONの処理。古代ドラゴン召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_HI_DRAGON(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sが魔法で古代ドラゴンを召喚した!", "%^s magically summons ancient dragons!"),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
         _("%^sが魔法で古代ドラゴンを召喚した!", "%^s magically summons ancient dragons!"),
-        TARGET_TYPE);
+        _("%^sが魔法で古代ドラゴンを召喚した!", "%^s magically summons ancient dragons!"), TARGET_TYPE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
@@ -798,25 +757,23 @@ void spell_RF6_S_HI_DRAGON(player_type* target_ptr, POSITION y, POSITION x, MONS
 }
 
 /*!
-* @brief RF6_S_AMBERITESの処理。アンバーの王族召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_AMBERITES(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_AMBERITESの処理。アンバーの王族召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_AMBERITES(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
-        _("%^sがアンバーの王族を召喚した!", "%^s magically summons Lords of Amber!"),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
         _("%^sがアンバーの王族を召喚した!", "%^s magically summons Lords of Amber!"),
-        TARGET_TYPE);
+        _("%^sがアンバーの王族を召喚した!", "%^s magically summons Lords of Amber!"), TARGET_TYPE);
 
     int count = 0;
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
@@ -833,25 +790,23 @@ void spell_RF6_S_AMBERITES(player_type* target_ptr, POSITION y, POSITION x, MONS
 }
 
 /*!
-* @brief RF6_S_UNIQUEの処理。ユニーク・モンスター召喚。 /
-* @param target_ptr プレーヤーへの参照ポインタ
-* @param y 対象の地点のy座標
-* @param x 対象の地点のx座標
-* @param m_idx 呪文を唱えるモンスターID
-* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
-* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
-* @return 召喚したモンスターの数を返す。
-*/
-void spell_RF6_S_UNIQUE(player_typetarget_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+ * @brief RF6_S_UNIQUEの処理。ユニーク・モンスター召喚。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
+ * @param y 対象の地点のy座標
+ * @param x 対象の地点のx座標
+ * @param m_idx 呪文を唱えるモンスターID
+ * @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
+ * @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
+ * @return 召喚したモンスターの数を返す。
+ */
+void spell_RF6_S_UNIQUE(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
 {
-    monspell_message(target_ptr, m_idx, t_idx,
-        _("%^sが何かをつぶやいた。", "%^s mumbles."),
+    monspell_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
         _("%^sが魔法で特別な強敵を召喚した!", "%^s magically summons special opponents!"),
-        _("%^sが魔法で特別な強敵を召喚した!", "%^s magically summons special opponents!"),
-        TARGET_TYPE);
+        _("%^sが魔法で特別な強敵を召喚した!", "%^s magically summons special opponents!"), TARGET_TYPE);
 
-    floor_typefloor_ptr = target_ptr->current_floor_ptr;
-    monster_typem_ptr = &floor_ptr->m_list[m_idx];
+    floor_type *floor_ptr = target_ptr->current_floor_ptr;
+    monster_type *m_ptr = &floor_ptr->m_list[m_idx];
     DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
     bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
     bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
index d7f8ca3..42ec7bf 100644 (file)
@@ -1,5 +1,7 @@
 #pragma once
 
+#include "system/angband.h"
+
 MONSTER_NUMBER summon_EAGLE(player_type* target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
 MONSTER_NUMBER summon_IE(player_type* target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx);
 MONSTER_NUMBER summon_guardian(player_type* target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE);
index 2361350..b55eda9 100644 (file)
@@ -28,6 +28,7 @@
 #include "player/player-effects.h"
 #include "io/targeting.h"
 #include "view/display-main-window.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells2.h"
 #include "spell/spells3.h"
index 1579669..39da49c 100644 (file)
@@ -9,6 +9,7 @@
 #include "player/player-move.h"
 #include "spell/spells-floor.h"
 #include "spell/spells-hex.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
index 76487f8..3ff47e6 100644 (file)
@@ -33,6 +33,7 @@
 #include "player/selfinfo.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
index a943323..b2c454c 100644 (file)
@@ -1,29 +1,28 @@
 #include "system/angband.h"
-#include "util/util.h"
-
-#include "io/write-diary.h"
-#include "cmd-io/cmd-dump.h"
 #include "player/patron.h"
 #include "cmd-action/cmd-pet.h"
-#include "object-enchant/object-curse.h"
-#include "object/object-flavor.h"
+#include "cmd-io/cmd-dump.h"
+#include "floor/floor.h"
+#include "io/write-diary.h"
 #include "monster/monster-race-hook.h"
-#include "object/object-kind-hook.h"
 #include "mutation/mutation.h"
 #include "object-enchant/artifact.h"
-#include "player/player-status.h"
-#include "player/player-effects.h"
-#include "player/player-races-table.h"
+#include "object-enchant/object-curse.h"
+#include "object/object-flavor.h"
+#include "object/object-kind-hook.h"
 #include "player/player-class.h"
 #include "player/player-damage.h"
-
-#include "spell/spells-type.h"
-#include "spell/spells-summon.h"
+#include "player/player-effects.h"
+#include "player/player-races-table.h"
+#include "player/player-status.h"
+#include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
-#include "spell/spells-floor.h"
-#include "floor/floor.h"
+#include "spell/spells-summon.h"
+#include "spell/spells-type.h"
 #include "spell/spells2.h"
+#include "util/util.h"
 
 #ifdef JP
 /*!
index cba6d35..faa89d2 100644 (file)
@@ -1,4 +1,5 @@
-
+#pragma once
+
 #define MAX_PATRON      16 /*!< カオスパトロンの最大定義数 / The number of "patrons" available (for Chaos Warriors) */
 
 /* カオスパトロンからの報酬種別定義 / Chaos Warrior: Reward types: */
@@ -39,7 +40,7 @@
 #define REW_SER_DEMO    35  /*!< カオスパトロンからの報酬: 悪魔の下僕下賜 */
 #define REW_SER_MONS    36  /*!< カオスパトロンからの報酬: モンスターの下僕下賜 */
 
-extern void gain_level_reward(player_type *creature_ptr, int chosen_reward);
-extern void admire_from_patron(player_type *creature_ptr);
 extern const concptr chaos_patrons[MAX_PATRON];
 
+void gain_level_reward(player_type *creature_ptr, int chosen_reward);
+void admire_from_patron(player_type *creature_ptr);
index 0852be9..478c92d 100644 (file)
@@ -7,6 +7,7 @@
 #include "spell/spells-detection.h"
 #include "spell/spells-diceroll.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
index 42b50d5..7280e56 100644 (file)
@@ -7,6 +7,7 @@
 #include "spell/process-effect.h"
 #include "spell/spells-diceroll.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
index 2af9e83..dbb0ac1 100644 (file)
@@ -9,6 +9,7 @@
 #include "spell/spells-detection.h"
 #include "spell/spells-diceroll.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
index 6616253..5286b28 100644 (file)
@@ -1,21 +1,20 @@
-#include "system/angband.h"
-#include "util/util.h"
-
-#include "player/player-class.h"
+#include "realm/realm-daemon.h"
 #include "cmd-action/cmd-spell.h"
-#include "spell/spells-type.h"
-#include "spell/spells-summon.h"
-#include "spell/spells-floor.h"
-#include "spell/spells-status.h"
-#include "spell/spells-object.h"
-#include "spell/spells-diceroll.h"
+#include "io/targeting.h"
+#include "player/player-class.h"
+#include "player/player-damage.h"
 #include "player/player-effects.h"
 #include "player/player-race.h"
-#include "player/player-damage.h"
-#include "io/targeting.h"
-#include "realm/realm-daemon.h"
-#include "spell/spells2.h"
 #include "spell/spells-detection.h"
+#include "spell/spells-diceroll.h"
+#include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
+#include "spell/spells-object.h"
+#include "spell/spells-status.h"
+#include "spell/spells-summon.h"
+#include "spell/spells-type.h"
+#include "spell/spells2.h"
+#include "util/util.h"
 
 /*!
 * @brief 悪魔領域魔法の各処理を行う
index 209f6c8..aceeed8 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 
+#include "system/angband.h"
 #include "spell/spells-util.h"
 
 concptr do_daemon_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode);
index 633a3fc..ebb24ea 100644 (file)
@@ -1,23 +1,23 @@
-#include "system/angband.h"
+#include "realm/realm-death.h"
 #include "cmd-action/cmd-spell.h"
-#include "spell/spells-type.h"
-#include "spell/spells-summon.h"
-#include "spell/spells-status.h"
-#include "spell/spells-object.h"
-#include "spell/spells-diceroll.h"
-#include "player/avatar.h"
-#include "player/player-status.h"
-#include "player/player-effects.h"
+#include "effect/effect-characteristics.h"
 #include "io/targeting.h"
+#include "player/avatar.h"
 #include "player/player-class.h"
 #include "player/player-damage.h"
+#include "player/player-effects.h"
 #include "player/player-race.h"
-#include "realm/realm-death.h"
+#include "player/player-status.h"
 #include "spell/process-effect.h"
-#include "effect/effect-characteristics.h"
+#include "spell/spells-detection.h"
+#include "spell/spells-diceroll.h"
+#include "spell/spells-launcher.h"
+#include "spell/spells-object.h"
+#include "spell/spells-status.h"
+#include "spell/spells-summon.h"
+#include "spell/spells-type.h"
 #include "spell/spells2.h"
 #include "spell/spells3.h"
-#include "spell/spells-detection.h"
 
 /*!
 * @brief 暗黒領域魔法の各処理を行う
index c31cda7..38b2f6d 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 
+#include "system/angband.h"
 #include "spell/spells-util.h"
 
 concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode);
index 796cb97..44515ea 100644 (file)
@@ -37,6 +37,7 @@
 #include "spell/process-effect.h"
 #include "spell/spells-execution.h"
 #include "spell/spells-hex.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
index 93a6700..0ab9428 100644 (file)
@@ -22,6 +22,7 @@
 #include "spell/process-effect.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
 #include "spell/spells-util.h"
index 56ebfbd..e45dbcc 100644 (file)
@@ -1,16 +1,16 @@
-#include "system/angband.h"
+#include "realm/realm-life.h"
 #include "cmd-action/cmd-spell.h"
-#include "spell/spells-status.h"
-#include "spell/spells-floor.h"
-#include "spell/spells2.h"
-#include "spell/spells3.h"
-#include "player/player-status.h"
-#include "player/player-effects.h"
 #include "floor/floor.h"
 #include "io/targeting.h"
-#include "realm/realm-life.h"
-#include "spell/spells-type.h"
+#include "player/player-effects.h"
+#include "player/player-status.h"
 #include "spell/spells-detection.h"
+#include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
+#include "spell/spells-status.h"
+#include "spell/spells-type.h"
+#include "spell/spells2.h"
+#include "spell/spells3.h"
 
 /*!
 * @brief 生命領域魔法の各処理を行う
index ba4ceca..30dc3e9 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 
+#include "system/angband.h"
 #include "spell/spells-util.h"
 
 concptr do_life_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode);
index 98836fd..371fd0b 100644 (file)
@@ -15,6 +15,7 @@
 #include "spell/spells-detection.h"
 #include "spell/spells-diceroll.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
index ca1fa83..90e4d00 100644 (file)
@@ -7,6 +7,7 @@
 #include "spell/process-effect.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-type.h"
 #include "spell/spells2.h"
index a8615b9..076e05f 100644 (file)
@@ -6,6 +6,7 @@
 #include "player/selfinfo.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
index 6220af7..4814eba 100644 (file)
@@ -6,6 +6,7 @@
 #include "player/player-class.h"
 #include "player/player-effects.h"
 #include "spell/spells-detection.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-object.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
index d90f99a..bb59a51 100644 (file)
@@ -12,6 +12,7 @@
 #include "player/player-damage.h"
 #include "player/player-effects.h"
 #include "player/player-status.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-type.h"
 #include "spell/spells2.h"
diff --git a/src/spell/spells-launcher.c b/src/spell/spells-launcher.c
new file mode 100644 (file)
index 0000000..5569ac2
--- /dev/null
@@ -0,0 +1,270 @@
+#include "spell/spells-launcher.h"
+#include "effect/effect-characteristics.h"
+#include "io/targeting.h"
+#include "spell/process-effect.h"
+#include "spell/spells-type.h"
+
+/*!
+ * @brief ボール系スペルの発動 / Cast a ball spell
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param rad 半径
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, act as a "ball"
+ * Allow "target" mode to pass over monsters
+ * Affect grids, objects, and monsters
+ * </pre>
+ */
+bool fire_ball(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+{
+    BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+    if (typ == GF_CHARM_LIVING)
+        flg |= PROJECT_HIDE;
+
+    POSITION tx = caster_ptr->x + 99 * ddx[dir];
+    POSITION ty = caster_ptr->y + 99 * ddy[dir];
+
+    if ((dir == 5) && target_okay(caster_ptr)) {
+        flg &= ~(PROJECT_STOP);
+        tx = target_col;
+        ty = target_row;
+    }
+
+    return project(caster_ptr, 0, rad, ty, tx, dam, typ, flg, -1);
+}
+
+/*!
+ * @brief ブレス系スペルの発動 / Cast a breath spell
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param rad 半径
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, act as a "ball"
+ * Allow "target" mode to pass over monsters
+ * Affect grids, objects, and monsters
+ * </pre>
+ */
+bool fire_breath(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad) { return fire_ball(caster_ptr, typ, dir, dam, -rad); }
+
+/*!
+ * @brief ロケット系スペルの発動(詳細な差は確認中) / Cast a ball spell
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param rad 半径
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, act as a "ball"
+ * Allow "target" mode to pass over monsters
+ * Affect grids, objects, and monsters
+ * </pre>
+ */
+bool fire_rocket(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+{
+    POSITION tx = caster_ptr->x + 99 * ddx[dir];
+    POSITION ty = caster_ptr->y + 99 * ddy[dir];
+    if ((dir == 5) && target_okay(caster_ptr)) {
+        tx = target_col;
+        ty = target_row;
+    }
+
+    BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+    return (project(caster_ptr, 0, rad, ty, tx, dam, typ, flg, -1));
+}
+
+/*!
+ * @brief ボール(ハイド)系スペルの発動 / Cast a ball spell
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param rad 半径
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, act as a "ball"
+ * Allow "target" mode to pass over monsters
+ * Affect grids, objects, and monsters
+ * </pre>
+ */
+bool fire_ball_hide(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+{
+    POSITION tx = caster_ptr->x + 99 * ddx[dir];
+    POSITION ty = caster_ptr->y + 99 * ddy[dir];
+    BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
+    if ((dir == 5) && target_okay(caster_ptr)) {
+        flg &= ~(PROJECT_STOP);
+        tx = target_col;
+        ty = target_row;
+    }
+
+    return (project(caster_ptr, 0, rad, ty, tx, dam, typ, flg, -1));
+}
+
+/*!
+ * @brief メテオ系スペルの発動 / Cast a meteor spell
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param who スぺル詠唱者のモンスターID(0=プレイヤー)
+ * @param typ 効果属性
+ * @param dam 威力
+ * @param rad 半径
+ * @param y 中心点Y座標
+ * @param x 中心点X座標
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Cast a meteor spell, defined as a ball spell cast by an arbitary monster,
+ * player, or outside source, that starts out at an arbitrary location, and
+ * leaving no trail from the "caster" to the target.  This function is
+ * especially useful for bombardments and similar. -LM-
+ * Option to hurt the player.
+ * </pre>
+ */
+bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, EFFECT_ID typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
+{
+    BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+    return (project(caster_ptr, who, rad, y, x, dam, typ, flg, -1));
+}
+
+/*!
+ * @brief ブラスト系スペルの発動 / Cast a blast spell
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dd 威力ダイス数
+ * @param ds 威力ダイス目
+ * @param num 基本回数
+ * @param dev 回数分散
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool fire_blast(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev)
+{
+    POSITION ty, tx, y, x;
+    POSITION ly, lx;
+    if (dir == 5) {
+        tx = target_col;
+        ty = target_row;
+
+        lx = 20 * (tx - caster_ptr->x) + caster_ptr->x;
+        ly = 20 * (ty - caster_ptr->y) + caster_ptr->y;
+    } else {
+        ly = ty = caster_ptr->y + 20 * ddy[dir];
+        lx = tx = caster_ptr->x + 20 * ddx[dir];
+    }
+
+    int ld = distance(caster_ptr->y, caster_ptr->x, ly, lx);
+    BIT_FLAGS flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
+    bool result = TRUE;
+    for (int i = 0; i < num; i++) {
+        while (TRUE) {
+            /* Get targets for some bolts */
+            y = rand_spread(ly, ld * dev / 20);
+            x = rand_spread(lx, ld * dev / 20);
+
+            if (distance(ly, lx, y, x) <= ld * dev / 20)
+                break;
+        }
+
+        /* Analyze the "dir" and the "target". */
+        if (!project(caster_ptr, 0, 0, y, x, damroll(dd, ds), typ, flg, -1)) {
+            result = FALSE;
+        }
+    }
+
+    return result;
+}
+
+/*!
+ * @brief ボルト系スペルの発動 / Cast a bolt spell.
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, as a "bolt".
+ * Affect monsters and grids (not objects).
+ * </pre>
+ */
+bool fire_bolt(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
+{
+    BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
+    if (typ != GF_ARROW)
+        flg |= PROJECT_REFLECTABLE;
+    return (project_hook(caster_ptr, typ, dir, dam, flg));
+}
+
+/*!
+ * @brief ビーム系スペルの発動 / Cast a beam spell.
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Pass through monsters, as a "beam".
+ * Affect monsters, grids and objects.
+ * </pre>
+ */
+bool fire_beam(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
+{
+    BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
+    return (project_hook(caster_ptr, typ, dir, dam, flg));
+}
+
+/*!
+ * @brief 確率に応じたボルト系/ビーム系スペルの発動 / Cast a bolt spell, or rarely, a beam spell.
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param prob ビーム化する確率(%)
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Pass through monsters, as a "beam".
+ * Affect monsters, grids and objects.
+ * </pre>
+ */
+bool fire_bolt_or_beam(player_type *caster_ptr, PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
+{
+    if (randint0(100) < prob) {
+        return (fire_beam(caster_ptr, typ, dir, dam));
+    }
+
+    return (fire_bolt(caster_ptr, typ, dir, dam));
+}
+
+/*!
+ * @brief 指定方向に飛び道具を飛ばす (フラグ任意指定) / Apply a "project()" in a direction (or at the target)
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param flg フラグ
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool project_hook(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg)
+{
+    flg |= (PROJECT_THRU);
+    POSITION tx = caster_ptr->x + ddx[dir];
+    POSITION ty = caster_ptr->y + ddy[dir];
+    if ((dir == 5) && target_okay(caster_ptr)) {
+        tx = target_col;
+        ty = target_row;
+    }
+
+    return (project(caster_ptr, 0, 0, ty, tx, dam, typ, flg, -1));
+}
diff --git a/src/spell/spells-launcher.h b/src/spell/spells-launcher.h
new file mode 100644 (file)
index 0000000..ed1c0b9
--- /dev/null
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "system/angband.h"
+
+bool fire_ball(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_breath(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_rocket(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_ball_hide(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
+bool fire_bolt(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
+bool fire_blast(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
+bool fire_beam(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
+bool fire_bolt_or_beam(player_type *caster_ptr, PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
+bool project_hook(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
index 52713a6..c803814 100644 (file)
@@ -22,9 +22,9 @@
 #include "player/player-class.h"
 #include "player/player-effects.h"
 #include "player/player-status.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
-#include "spell/spells2.h"
 #include "util/util.h"
 #include "view/display-main-window.h"
 
index 7838ffc..de316fb 100644 (file)
@@ -19,8 +19,8 @@
 #include "object/object-hook.h"
 #include "player/avatar.h"
 #include "player/player-move.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-type.h"
-#include "spell/spells2.h" // 相互参照している.
 #include "world/world.h"
 
 /*!
index a80573a..3750aaa 100644 (file)
@@ -55,6 +55,7 @@
 #include "spell/process-effect.h"
 #include "spell/spells-diceroll.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
@@ -1125,292 +1126,6 @@ bool unlite_area(player_type *caster_ptr, HIT_POINT dam, POSITION rad)
 
 
 /*!
- * @brief ボール系スペルの発動 / Cast a ball spell
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param typ 効果属性
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @param rad 半径
- * @return 作用が実際にあった場合TRUEを返す
- * @details
- * <pre>
- * Stop if we hit a monster, act as a "ball"
- * Allow "target" mode to pass over monsters
- * Affect grids, objects, and monsters
- * </pre>
- */
-bool fire_ball(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
-{
-       BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
-       if (typ == GF_CHARM_LIVING) flg |= PROJECT_HIDE;
-
-       POSITION tx = caster_ptr->x + 99 * ddx[dir];
-       POSITION ty = caster_ptr->y + 99 * ddy[dir];
-
-       if ((dir == 5) && target_okay(caster_ptr))
-       {
-               flg &= ~(PROJECT_STOP);
-               tx = target_col;
-               ty = target_row;
-       }
-
-       return project(caster_ptr, 0, rad, ty, tx, dam, typ, flg, -1);
-}
-
-
-/*!
-* @brief ブレス系スペルの発動 / Cast a breath spell
-* @param caster_ptr プレーヤーへの参照ポインタ
-* @param typ 効果属性
-* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
-* @param dam 威力
-* @param rad 半径
-* @return 作用が実際にあった場合TRUEを返す
-* @details
-* <pre>
-* Stop if we hit a monster, act as a "ball"
-* Allow "target" mode to pass over monsters
-* Affect grids, objects, and monsters
-* </pre>
-*/
-bool fire_breath(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
-{
-       return fire_ball(caster_ptr, typ, dir, dam, -rad);
-}
-
-
-/*!
- * @brief ロケット系スペルの発動(詳細な差は確認中) / Cast a ball spell
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param typ 効果属性
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @param rad 半径
- * @return 作用が実際にあった場合TRUEを返す
- * @details
- * <pre>
- * Stop if we hit a monster, act as a "ball"
- * Allow "target" mode to pass over monsters
- * Affect grids, objects, and monsters
- * </pre>
- */
-bool fire_rocket(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
-{
-       POSITION tx = caster_ptr->x + 99 * ddx[dir];
-       POSITION ty = caster_ptr->y + 99 * ddy[dir];
-       if ((dir == 5) && target_okay(caster_ptr))
-       {
-               tx = target_col;
-               ty = target_row;
-       }
-
-       BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
-       return (project(caster_ptr, 0, rad, ty, tx, dam, typ, flg, -1));
-}
-
-
-/*!
- * @brief ボール(ハイド)系スペルの発動 / Cast a ball spell
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param typ 効果属性
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @param rad 半径
- * @return 作用が実際にあった場合TRUEを返す
- * @details
- * <pre>
- * Stop if we hit a monster, act as a "ball"
- * Allow "target" mode to pass over monsters
- * Affect grids, objects, and monsters
- * </pre>
- */
-bool fire_ball_hide(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
-{
-       POSITION tx = caster_ptr->x + 99 * ddx[dir];
-       POSITION ty = caster_ptr->y + 99 * ddy[dir];
-       BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
-       if ((dir == 5) && target_okay(caster_ptr))
-       {
-               flg &= ~(PROJECT_STOP);
-               tx = target_col;
-               ty = target_row;
-       }
-
-       return (project(caster_ptr, 0, rad, ty, tx, dam, typ, flg, -1));
-}
-
-
-/*!
- * @brief メテオ系スペルの発動 / Cast a meteor spell
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param who スぺル詠唱者のモンスターID(0=プレイヤー)
- * @param typ 効果属性
- * @param dam 威力
- * @param rad 半径
- * @param y 中心点Y座標
- * @param x 中心点X座標
- * @return 作用が実際にあった場合TRUEを返す
- * @details
- * <pre>
- * Cast a meteor spell, defined as a ball spell cast by an arbitary monster,
- * player, or outside source, that starts out at an arbitrary location, and
- * leaving no trail from the "caster" to the target.  This function is
- * especially useful for bombardments and similar. -LM-
- * Option to hurt the player.
- * </pre>
- */
-bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, EFFECT_ID typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
-{
-       BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
-       return (project(caster_ptr, who, rad, y, x, dam, typ, flg, -1));
-}
-
-
-/*!
- * @brief ブラスト系スペルの発動 / Cast a blast spell
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param typ 効果属性
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dd 威力ダイス数
- * @param ds 威力ダイス目
- * @param num 基本回数
- * @param dev 回数分散
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool fire_blast(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev)
-{
-       POSITION ty, tx, y, x;
-       POSITION ly, lx;
-       if (dir == 5)
-       {
-               tx = target_col;
-               ty = target_row;
-
-               lx = 20 * (tx - caster_ptr->x) + caster_ptr->x;
-               ly = 20 * (ty - caster_ptr->y) + caster_ptr->y;
-       }
-       else
-       {
-               ly = ty = caster_ptr->y + 20 * ddy[dir];
-               lx = tx = caster_ptr->x + 20 * ddx[dir];
-       }
-
-       int ld = distance(caster_ptr->y, caster_ptr->x, ly, lx);
-       BIT_FLAGS flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
-       bool result = TRUE;
-       for (int i = 0; i < num; i++)
-       {
-               while (TRUE)
-               {
-                       /* Get targets for some bolts */
-                       y = rand_spread(ly, ld * dev / 20);
-                       x = rand_spread(lx, ld * dev / 20);
-
-                       if (distance(ly, lx, y, x) <= ld * dev / 20) break;
-               }
-
-               /* Analyze the "dir" and the "target". */
-               if (!project(caster_ptr, 0, 0, y, x, damroll(dd, ds), typ, flg, -1))
-               {
-                       result = FALSE;
-               }
-       }
-
-       return result;
-}
-
-
-/*!
- * @brief 指定方向に飛び道具を飛ばす(フラグ任意指定) / Hack -- apply a "project()" in a direction (or at the target)
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param typ 効果属性
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @param flg フラグ
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool project_hook(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg)
-{
-       flg |= (PROJECT_THRU);
-       POSITION tx = caster_ptr->x + ddx[dir];
-       POSITION ty = caster_ptr->y + ddy[dir];
-       if ((dir == 5) && target_okay(caster_ptr))
-       {
-               tx = target_col;
-               ty = target_row;
-       }
-
-       return (project(caster_ptr, 0, 0, ty, tx, dam, typ, flg, -1));
-}
-
-
-/*!
- * @brief ボルト系スペルの発動 / Cast a bolt spell.
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param typ 効果属性
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @return 作用が実際にあった場合TRUEを返す
- * @details
- * <pre>
- * Stop if we hit a monster, as a "bolt".
- * Affect monsters and grids (not objects).
- * </pre>
- */
-bool fire_bolt(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
-{
-       BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
-       if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
-       return (project_hook(caster_ptr, typ, dir, dam, flg));
-}
-
-
-/*!
- * @brief ビーム系スペルの発動 / Cast a beam spell.
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param typ 効果属性
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @return 作用が実際にあった場合TRUEを返す
- * @details
- * <pre>
- * Pass through monsters, as a "beam".
- * Affect monsters, grids and objects.
- * </pre>
- */
-bool fire_beam(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
-{
-       BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
-       return (project_hook(caster_ptr, typ, dir, dam, flg));
-}
-
-
-/*!
- * @brief 確率に応じたボルト系/ビーム系スペルの発動 / Cast a bolt spell, or rarely, a beam spell.
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param prob ビーム化する確率(%)
- * @param typ 効果属性
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @return 作用が実際にあった場合TRUEを返す
- * @details
- * <pre>
- * Pass through monsters, as a "beam".
- * Affect monsters, grids and objects.
- * </pre>
- */
-bool fire_bolt_or_beam(player_type *caster_ptr, PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
-{
-       if (randint0(100) < prob)
-       {
-               return (fire_beam(caster_ptr, typ, dir, dam));
-       }
-
-       return (fire_bolt(caster_ptr, typ, dir, dam));
-}
-
-
-/*!
  * @brief LITE_WEAK属性による光源ビーム処理
  * @param caster_ptr プレーヤーへの参照ポインタ
  * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
index d1dedae..bb74fc4 100644 (file)
@@ -28,16 +28,7 @@ bool starlight(player_type* caster_ptr, bool magic);
 void unlite_room(player_type* caster_ptr, POSITION y1, POSITION x1);
 bool lite_area(player_type* caster_ptr, HIT_POINT dam, POSITION rad);
 bool unlite_area(player_type* caster_ptr, HIT_POINT dam, POSITION rad);
-bool fire_ball(player_type* caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_breath(player_type* caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_rocket(player_type* caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_ball_hide(player_type* caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-bool fire_meteor(player_type* caster_ptr, MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
-bool fire_bolt(player_type* caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
-bool fire_blast(player_type* caster_ptr, EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
 void call_chaos(player_type* caster_ptr);
-bool fire_beam(player_type* caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
-bool fire_bolt_or_beam(player_type* caster_ptr, PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
 bool lite_line(player_type* caster_ptr, DIRECTION dir, HIT_POINT dam);
 bool hypodynamic_bolt(player_type* caster_ptr, DIRECTION dir, HIT_POINT dam);
 bool death_ray(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
@@ -70,7 +61,6 @@ bool control_one_undead(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL ple
 bool control_one_demon(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
 bool charm_animal(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
 bool mindblast_monsters(player_type* caster_ptr, HIT_POINT dam);
-bool project_hook(player_type* caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
 bool project_all_los(player_type* caster_ptr, EFFECT_ID typ, HIT_POINT dam);
 bool eat_magic(player_type* caster_ptr, int power);
 void discharge_minion(player_type* caster_ptr);
index 013544e..c80929e 100644 (file)
@@ -65,6 +65,7 @@
 #include "spell/process-effect.h"
 #include "spell/spells-execution.h"
 #include "spell/spells-floor.h"
+#include "spell/spells-launcher.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells2.h"