From 7ca5887c9e009071f8c5717fc647d48bb98493f2 Mon Sep 17 00:00:00 2001 From: Hourier Date: Fri, 5 Jun 2020 20:37:44 +0900 Subject: [PATCH] [Refactor] #40414 Separated spells-charm.c/h from spells2.c/h --- Hengband/Hengband/Hengband.vcxproj | 4 ++ Hengband/Hengband/Hengband.vcxproj.filters | 12 ++++++ src/Makefile.am | 1 + src/cmd-item/cmd-activate.c | 2 +- src/cmd-item/cmd-zaprod.c | 1 - src/cmd-item/cmd-zapwand.c | 2 +- src/core/player-processor.c | 1 - src/grid/trap.c | 1 - src/inventory/inventory-curse.c | 1 - src/monster/monster-status.c | 34 ++++++++-------- src/monster/monster-status.h | 40 +++++++++--------- src/mspell/mspells2.c | 1 - src/mutation/mutation.c | 3 +- src/player/patron.c | 1 - src/realm/realm-death.c | 8 ++-- src/realm/realm-nature.c | 10 ++--- src/realm/realm-sorcery.c | 4 +- src/specific-object/chest.c | 1 - src/spell-kind/spells-charm.c | 56 +++++++++++++++++++++++++ src/spell-kind/spells-charm.h | 8 ++++ src/spell/spells2.c | 65 +++--------------------------- src/spell/spells2.h | 4 -- src/spell/spells3.c | 1 - 23 files changed, 138 insertions(+), 123 deletions(-) create mode 100644 src/spell-kind/spells-charm.c create mode 100644 src/spell-kind/spells-charm.h diff --git a/Hengband/Hengband/Hengband.vcxproj b/Hengband/Hengband/Hengband.vcxproj index d8c6d1626..9d680ea50 100644 --- a/Hengband/Hengband/Hengband.vcxproj +++ b/Hengband/Hengband/Hengband.vcxproj @@ -356,6 +356,8 @@ + + @@ -579,6 +581,8 @@ + + diff --git a/Hengband/Hengband/Hengband.vcxproj.filters b/Hengband/Hengband/Hengband.vcxproj.filters index fdf0da6e4..2cfda830d 100644 --- a/Hengband/Hengband/Hengband.vcxproj.filters +++ b/Hengband/Hengband/Hengband.vcxproj.filters @@ -1163,6 +1163,12 @@ spell-kind + + spell-kind + + + spell-kind + @@ -2482,6 +2488,12 @@ spell-kind + + spell-kind + + + spell-kind + diff --git a/src/Makefile.am b/src/Makefile.am index 87dbf2d88..db8626293 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -403,6 +403,7 @@ hengband_SOURCES = \ \ spell-kind/spells-beam.c spell-kind/spells-beam.h \ spell-kind/spells-chaos.c spell-kind/spells-chaos.h \ + spell-kind/spells-charm.c spell-kind/spells-charm.h \ spell-kind/spells-detection.c spell-kind/spells-detection.h \ spell-kind/spells-floor.c spell-kind/spells-floor.h \ spell-kind/spells-genocide.c spell-kind/spells-genocide.h \ diff --git a/src/cmd-item/cmd-activate.c b/src/cmd-item/cmd-activate.c index 711e3885b..b94a6af97 100644 --- a/src/cmd-item/cmd-activate.c +++ b/src/cmd-item/cmd-activate.c @@ -30,6 +30,7 @@ #include "spell/process-effect.h" #include "spell-kind/spells-beam.h" #include "spell-kind/spells-chaos.h" +#include "spell-kind/spells-charm.h" #include "spell-kind/spells-detection.h" #include "spell-kind/spells-floor.h" #include "spell-kind/spells-genocide.h" @@ -44,7 +45,6 @@ #include "spell/spells-summon.h" #include "spell-kind/spells-teleport.h" #include "spell/spells-type.h" -#include "spell/spells2.h" #include "spell/spells3.h" #include "world/world.h" diff --git a/src/cmd-item/cmd-zaprod.c b/src/cmd-item/cmd-zaprod.c index cae0b3d00..34f1c8a40 100644 --- a/src/cmd-item/cmd-zaprod.c +++ b/src/cmd-item/cmd-zaprod.c @@ -27,7 +27,6 @@ #include "spell/spells-status.h" #include "spell-kind/spells-teleport.h" #include "spell/spells-type.h" -#include "spell/spells2.h" #include "spell/spells3.h" #include "util/util.h" #include "view/display-main-window.h" diff --git a/src/cmd-item/cmd-zapwand.c b/src/cmd-item/cmd-zapwand.c index d04a75b1b..42e37b862 100644 --- a/src/cmd-item/cmd-zapwand.c +++ b/src/cmd-item/cmd-zapwand.c @@ -16,6 +16,7 @@ #include "player/player-effects.h" #include "player/player-status.h" #include "spell-kind/spells-beam.h" +#include "spell-kind/spells-charm.h" #include "spell-kind/spells-launcher.h" #include "spell-kind/spells-lite.h" #include "spell-kind/spells-neighbor.h" @@ -23,7 +24,6 @@ #include "spell/spells-status.h" #include "spell-kind/spells-teleport.h" #include "spell/spells-type.h" -#include "spell/spells2.h" #include "util/util.h" #include "view/display-main-window.h" #include "view/object-describer.h" diff --git a/src/core/player-processor.c b/src/core/player-processor.c index 8f4de3679..330da35ca 100644 --- a/src/core/player-processor.c +++ b/src/core/player-processor.c @@ -16,7 +16,6 @@ #include "spell/music-checker.h" #include "spell-kind/spells-chaos.h" #include "spell/spells-hex.h" -#include "spell/spells2.h" // 相互依存している。後でどうするか検討する. #include "view/display-main-window.h" bool load = TRUE; diff --git a/src/grid/trap.c b/src/grid/trap.c index 9fc09d2b4..45cfb0d23 100644 --- a/src/grid/trap.c +++ b/src/grid/trap.c @@ -27,7 +27,6 @@ #include "spell/spells-summon.h" #include "spell-kind/spells-teleport.h" #include "spell/spells-type.h" -#include "spell/spells2.h" #include "util/util.h" #include "world/world.h" diff --git a/src/inventory/inventory-curse.c b/src/inventory/inventory-curse.c index 0488db66d..c7f425e66 100644 --- a/src/inventory/inventory-curse.c +++ b/src/inventory/inventory-curse.c @@ -15,7 +15,6 @@ #include "spell-kind/spells-chaos.h" #include "spell-kind/spells-teleport.h" #include "spell/spells-summon.h" -#include "spell/spells2.h" #define TRC_P_FLAG_MASK \ (TRC_TELEPORT_SELF | TRC_CHAINSWORD | TRC_TY_CURSE | TRC_DRAIN_EXP | TRC_ADD_L_CURSE | TRC_ADD_H_CURSE | TRC_CALL_ANIMAL | TRC_CALL_DEMON \ diff --git a/src/monster/monster-status.c b/src/monster/monster-status.c index 284d8c1c0..2332dd516 100644 --- a/src/monster/monster-status.c +++ b/src/monster/monster-status.c @@ -1,34 +1,32 @@ -#include "system/angband.h" -#include "core/stuff-handler.h" -#include "util/util.h" -#include "main/sound-definitions-table.h" -#include "monster/creature.h" -#include "io/write-diary.h" +#include "monster/monster-status.h" #include "autopick/autopick-pref-processor.h" -#include "cmd/cmd-draw.h" #include "cmd-io/cmd-dump.h" +#include "cmd/cmd-draw.h" +#include "combat/monster-attack-effect.h" +#include "combat/monster-attack-types.h" +#include "core/stuff-handler.h" #include "dungeon/dungeon.h" #include "floor/floor.h" #include "grid/grid.h" -#include "monster/monster.h" -#include "monster/monster-status.h" -#include "mspell/monster-spell.h" +#include "io/files-util.h" +#include "io/report.h" +#include "io/write-diary.h" +#include "main/sound-definitions-table.h" +#include "monster/creature.h" #include "monster/monster-process.h" -#include "spell/spells2.h" -#include "spell/spells-summon.h" #include "monster/monster-race-hook.h" -#include "object-enchant/object-curse.h" +#include "monster/monster.h" +#include "mspell/monster-spell.h" #include "object-enchant/artifact.h" +#include "object-enchant/object-curse.h" #include "player/avatar.h" -#include "io/files-util.h" #include "player/player-effects.h" #include "player/player-personalities-table.h" +#include "spell-kind/spells-chaos.h" +#include "spell/spells-summon.h" +#include "util/util.h" #include "view/display-main-window.h" #include "world/world.h" -#include "io/report.h" -#include "combat/monster-attack-effect.h" -#include "combat/monster-attack-types.h" -#include "spell-kind/spells-chaos.h" /*! * @brief モンスターIDからPOWERFULフラグの有無を取得する / diff --git a/src/monster/monster-status.h b/src/monster/monster-status.h index 97c879a25..b4f52d6cd 100644 --- a/src/monster/monster-status.h +++ b/src/monster/monster-status.h @@ -1,25 +1,27 @@ #pragma once -extern bool monster_is_powerful(floor_type *floor_ptr, MONSTER_IDX m_idx); -extern DEPTH monster_level_idx(floor_type *floor_ptr, MONSTER_IDX m_idx); +#include "system/angband.h" -extern HIT_POINT mon_damage_mod(player_type *target_ptr, monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear); -extern bool mon_take_hit(player_type *target_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note); -extern int get_mproc_idx(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type); -extern bool monster_is_valid(monster_type *m_ptr); +bool monster_is_powerful(floor_type *floor_ptr, MONSTER_IDX m_idx); +DEPTH monster_level_idx(floor_type *floor_ptr, MONSTER_IDX m_idx); -extern bool set_monster_csleep(player_type *target_ptr, MONSTER_IDX m_idx, int v); -extern bool set_monster_fast(player_type *target_ptr, MONSTER_IDX m_idx, int v); -extern bool set_monster_slow(player_type *target_ptr, MONSTER_IDX m_idx, int v); -extern bool set_monster_stunned(player_type *target_ptr, MONSTER_IDX m_idx, int v); -extern bool set_monster_confused(player_type *target_ptr, MONSTER_IDX m_idx, int v); -extern bool set_monster_monfear(player_type *target_ptr, MONSTER_IDX m_idx, int v); -extern bool set_monster_invulner(player_type *target_ptr, MONSTER_IDX m_idx, int v, bool energy_need); -extern bool set_monster_timewalk(player_type *target_ptr, int num, MONSTER_IDX who, bool vs_player); +HIT_POINT mon_damage_mod(player_type *target_ptr, monster_type *m_ptr, HIT_POINT dam, bool is_psy_spear); +bool mon_take_hit(player_type *target_ptr, MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note); +int get_mproc_idx(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type); +bool monster_is_valid(monster_type *m_ptr); -extern void dispel_monster_status(player_type *target_ptr, MONSTER_IDX m_idx); -extern void monster_gain_exp(player_type *target_ptr, MONSTER_IDX m_idx, MONRACE_IDX s_idx); +bool set_monster_csleep(player_type *target_ptr, MONSTER_IDX m_idx, int v); +bool set_monster_fast(player_type *target_ptr, MONSTER_IDX m_idx, int v); +bool set_monster_slow(player_type *target_ptr, MONSTER_IDX m_idx, int v); +bool set_monster_stunned(player_type *target_ptr, MONSTER_IDX m_idx, int v); +bool set_monster_confused(player_type *target_ptr, MONSTER_IDX m_idx, int v); +bool set_monster_monfear(player_type *target_ptr, MONSTER_IDX m_idx, int v); +bool set_monster_invulner(player_type *target_ptr, MONSTER_IDX m_idx, int v, bool energy_need); +bool set_monster_timewalk(player_type *target_ptr, int num, MONSTER_IDX who, bool vs_player); -extern int get_mproc_idx(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type); -extern void mproc_init(floor_type *floor_ptr); -extern void process_monsters_mtimed(player_type *target_ptr, int mtimed_idx); +void dispel_monster_status(player_type *target_ptr, MONSTER_IDX m_idx); +void monster_gain_exp(player_type *target_ptr, MONSTER_IDX m_idx, MONRACE_IDX s_idx); + +int get_mproc_idx(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type); +void mproc_init(floor_type *floor_ptr); +void process_monsters_mtimed(player_type *target_ptr, int mtimed_idx); diff --git a/src/mspell/mspells2.c b/src/mspell/mspells2.c index 4ac9b4fb0..155c22d43 100644 --- a/src/mspell/mspells2.c +++ b/src/mspell/mspells2.c @@ -1,5 +1,4 @@ /*! - * @file mspells2.c * @brief モンスター魔法の実装(対モンスター処理) / Monster spells (attack monster) * @date 2014/01/17 * @author diff --git a/src/mutation/mutation.c b/src/mutation/mutation.c index 4f457c058..7150c37dd 100644 --- a/src/mutation/mutation.c +++ b/src/mutation/mutation.c @@ -31,14 +31,15 @@ #include "player/player-races-table.h" #include "player/player-status.h" #include "player/selfinfo.h" +#include "spell-kind/spells-charm.h" #include "spell-kind/spells-detection.h" #include "spell-kind/spells-floor.h" #include "spell-kind/spells-launcher.h" #include "spell-kind/spells-lite.h" #include "spell-kind/spells-sight.h" +#include "spell-kind/spells-teleport.h" #include "spell/spells-status.h" #include "spell/spells-summon.h" -#include "spell-kind/spells-teleport.h" #include "spell/spells-type.h" #include "spell/spells2.h" #include "spell/spells3.h" diff --git a/src/player/patron.c b/src/player/patron.c index 8d65f2f89..50723b682 100644 --- a/src/player/patron.c +++ b/src/player/patron.c @@ -24,7 +24,6 @@ #include "spell/spells-status.h" #include "spell/spells-summon.h" #include "spell/spells-type.h" -#include "spell/spells2.h" #include "util/util.h" #ifdef JP diff --git a/src/realm/realm-death.c b/src/realm/realm-death.c index 95cb06182..d3e9d9620 100644 --- a/src/realm/realm-death.c +++ b/src/realm/realm-death.c @@ -8,19 +8,19 @@ #include "player/player-effects.h" #include "player/player-race.h" #include "player/player-status.h" -#include "spell/process-effect.h" +#include "spell-kind/spells-charm.h" #include "spell-kind/spells-detection.h" -#include "spell/spells-diceroll.h" #include "spell-kind/spells-genocide.h" #include "spell-kind/spells-launcher.h" #include "spell-kind/spells-neighbor.h" -#include "spell/spells-object.h" #include "spell-kind/spells-sight.h" #include "spell-kind/spells-specific-bolt.h" +#include "spell/process-effect.h" +#include "spell/spells-diceroll.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" /*! diff --git a/src/realm/realm-nature.c b/src/realm/realm-nature.c index 45ff32dd8..6481c70ec 100644 --- a/src/realm/realm-nature.c +++ b/src/realm/realm-nature.c @@ -6,26 +6,26 @@ #include "io/targeting.h" #include "object/object-generator.h" #include "object/object-kind-hook.h" -#include "sv-definition/sv-food-types.h" #include "player/avatar.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "player/player-races-table.h" -#include "spell/process-effect.h" #include "spell-kind/spells-beam.h" +#include "spell-kind/spells-charm.h" #include "spell-kind/spells-detection.h" -#include "spell/spells-diceroll.h" #include "spell-kind/spells-floor.h" #include "spell-kind/spells-launcher.h" #include "spell-kind/spells-lite.h" #include "spell-kind/spells-neighbor.h" -#include "spell/spells-object.h" #include "spell-kind/spells-sight.h" +#include "spell/process-effect.h" +#include "spell/spells-diceroll.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 "sv-definition/sv-food-types.h" #include "util/util.h" /*! diff --git a/src/realm/realm-sorcery.c b/src/realm/realm-sorcery.c index 135e2d717..a073c7a15 100644 --- a/src/realm/realm-sorcery.c +++ b/src/realm/realm-sorcery.c @@ -4,15 +4,15 @@ #include "player/avatar.h" #include "player/player-effects.h" #include "player/selfinfo.h" +#include "spell-kind/spells-charm.h" #include "spell-kind/spells-detection.h" #include "spell-kind/spells-floor.h" #include "spell-kind/spells-launcher.h" #include "spell-kind/spells-lite.h" #include "spell-kind/spells-sight.h" -#include "spell/spells-status.h" #include "spell-kind/spells-teleport.h" +#include "spell/spells-status.h" #include "spell/spells-type.h" -#include "spell/spells2.h" #include "spell/spells3.h" #include "util/util.h" diff --git a/src/specific-object/chest.c b/src/specific-object/chest.c index 21e5d5ba2..bcf584af5 100644 --- a/src/specific-object/chest.c +++ b/src/specific-object/chest.c @@ -16,7 +16,6 @@ #include "spell-kind/spells-sight.h" #include "spell/spells-summon.h" #include "spell/spells-type.h" -#include "spell/spells2.h" #include "spell/spells3.h" #include "util/util.h" diff --git a/src/spell-kind/spells-charm.c b/src/spell-kind/spells-charm.c new file mode 100644 index 000000000..954d91822 --- /dev/null +++ b/src/spell-kind/spells-charm.c @@ -0,0 +1,56 @@ +#include "spell-kind/spells-charm.h" +#include "effect/effect-characteristics.h" +#include "spell-kind/spells-launcher.h" +#include "spell/spells-type.h" + +/*! + * @brief チャーム・モンスター(1体) + * @param caster_ptr プレーヤーへの参照ポインタ + * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする) + * @param plev パワー + * @return 作用が実際にあった場合TRUEを返す + */ +bool charm_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev) +{ + BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL; + return (project_hook(caster_ptr, GF_CHARM, dir, plev, flg)); +} + +/*! + * @brief アンデッド支配(1体) + * @param caster_ptr プレーヤーへの参照ポインタ + * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする) + * @param plev パワー + * @return 作用が実際にあった場合TRUEを返す + */ +bool control_one_undead(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev) +{ + BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL; + return (project_hook(caster_ptr, GF_CONTROL_UNDEAD, dir, plev, flg)); +} + +/*! + * @brief 悪魔支配(1体) + * @param caster_ptr プレーヤーへの参照ポインタ + * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする) + * @param plev パワー + * @return 作用が実際にあった場合TRUEを返す + */ +bool control_one_demon(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev) +{ + BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL; + return (project_hook(caster_ptr, GF_CONTROL_DEMON, dir, plev, flg)); +} + +/*! + * @brief 動物支配(1体) + * @param caster_ptr プレーヤーへの参照ポインタ + * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする) + * @param plev パワー + * @return 作用が実際にあった場合TRUEを返す + */ +bool charm_animal(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev) +{ + BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL; + return (project_hook(caster_ptr, GF_CONTROL_ANIMAL, dir, plev, flg)); +} diff --git a/src/spell-kind/spells-charm.h b/src/spell-kind/spells-charm.h new file mode 100644 index 000000000..d2a602265 --- /dev/null +++ b/src/spell-kind/spells-charm.h @@ -0,0 +1,8 @@ +#pragma once + +#include "system/angband.h" + +bool charm_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev); +bool control_one_undead(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev); +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); diff --git a/src/spell/spells2.c b/src/spell/spells2.c index 83a3c5081..4bfa39916 100644 --- a/src/spell/spells2.c +++ b/src/spell/spells2.c @@ -50,6 +50,7 @@ #include "player/player-effects.h" #include "player/player-skill.h" #include "player/player-status.h" +#include "spell-kind/spells-charm.h" #include "spell/process-effect.h" #include "spell/spells-diceroll.h" #include "spell-kind/spells-chaos.h" @@ -73,62 +74,6 @@ #include "world/world.h" /*! - * @brief チャーム・モンスター(1体) - * @param caster_ptr プレーヤーへの参照ポインタ - * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする) - * @param plev パワー - * @return 作用が実際にあった場合TRUEを返す - */ -bool charm_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev) -{ - BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL; - return (project_hook(caster_ptr, GF_CHARM, dir, plev, flg)); -} - - -/*! - * @brief アンデッド支配(1体) - * @param caster_ptr プレーヤーへの参照ポインタ - * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする) - * @param plev パワー - * @return 作用が実際にあった場合TRUEを返す - */ -bool control_one_undead(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev) -{ - BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL; - return (project_hook(caster_ptr, GF_CONTROL_UNDEAD, dir, plev, flg)); -} - - -/*! - * @brief 悪魔支配(1体) - * @param caster_ptr プレーヤーへの参照ポインタ - * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする) - * @param plev パワー - * @return 作用が実際にあった場合TRUEを返す - */ -bool control_one_demon(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev) -{ - BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL; - return (project_hook(caster_ptr, GF_CONTROL_DEMON, dir, plev, flg)); -} - - -/*! - * @brief 動物支配(1体) - * @param caster_ptr プレーヤーへの参照ポインタ - * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする) - * @param plev パワー - * @return 作用が実際にあった場合TRUEを返す - */ -bool charm_animal(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev) -{ - BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL; - return (project_hook(caster_ptr, GF_CONTROL_ANIMAL, dir, plev, flg)); -} - - -/*! * @brief カオス魔法「流星群」の処理としてプレイヤーを中心に隕石落下処理を10+1d10回繰り返す。 * / Drop 10+1d10 meteor ball at random places near the player * @param caster_ptr プレーヤーへの参照ポインタ @@ -521,10 +466,10 @@ bool vampirism(player_type *caster_ptr) /*! -* ヒット&アウェイのレイシャルパワー/突然変異 -* @param caster_ptr プレーヤーへの参照ポインタ -* @return コマンドの入力先にモンスターがいたらTRUE -*/ + * ヒット&アウェイのレイシャルパワー/突然変異 + * @param caster_ptr プレーヤーへの参照ポインタ + * @return コマンドの入力先にモンスターがいたらTRUE + */ bool hit_and_away(player_type *caster_ptr) { DIRECTION dir; diff --git a/src/spell/spells2.h b/src/spell/spells2.h index ea2f0f7b0..6392dd921 100644 --- a/src/spell/spells2.h +++ b/src/spell/spells2.h @@ -2,10 +2,6 @@ #include "system/angband.h" -bool charm_monster(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev); -bool control_one_undead(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev); -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 eat_magic(player_type* caster_ptr, int power); void wild_magic(player_type* caster_ptr, int spell); void cast_meteor(player_type* caster_ptr, HIT_POINT dam, POSITION rad); diff --git a/src/spell/spells3.c b/src/spell/spells3.c index 8c18a0894..fd591e929 100644 --- a/src/spell/spells3.c +++ b/src/spell/spells3.c @@ -69,7 +69,6 @@ #include "spell-kind/spells-sight.h" #include "spell/spells-summon.h" #include "spell-kind/spells-teleport.h" -#include "spell/spells2.h" #include "spell/technic-info-table.h" #include "term/gameterm.h" #include "util/util.h" -- 2.11.0