From 7a7b98d6363fddb66bf1b3e7b9f87504e222f398 Mon Sep 17 00:00:00 2001 From: Hourier Date: Fri, 8 May 2020 18:03:33 +0900 Subject: [PATCH] [Refactor] #39963 Separated spells3.h from spells1.h --- Hengband/Hengband/Hengband.vcxproj | 1 + Hengband/Hengband/Hengband.vcxproj.filters | 3 ++ src/Makefile.am | 2 +- src/chest.c | 1 + src/cmd/cmd-activate.c | 1 + src/cmd/cmd-basic.c | 1 + src/cmd/cmd-item.c | 2 +- src/cmd/cmd-magiceat.c | 2 +- src/cmd/cmd-mane.c | 1 + src/cmd/cmd-quaff.c | 1 + src/cmd/cmd-read.c | 1 + src/cmd/cmd-spell.c | 1 + src/cmd/cmd-usestaff.c | 1 + src/cmd/cmd-zaprod.c | 1 + src/cmd/cmd-zapwand.c | 1 + src/combat/melee.c | 1 + src/core.c | 1 + src/effect/effect-item.c | 1 + src/effect/effect-monster-resist-hurt.c | 1 + src/effect/effect-monster.c | 1 + src/effect/effect-player-resist-hurt.c | 1 + src/market/building.c | 2 +- src/market/store.c | 2 +- src/mind.c | 1 + src/monster/quantum-effect.c | 1 + src/mspells1.c | 1 + src/mspells2.c | 1 + src/mspells3.c | 1 + src/mspells4.c | 1 + src/mutation.c | 1 + src/object2.c | 2 +- src/player-move.c | 1 + src/racial.c | 1 + src/realm/realm-arcane.c | 1 + src/realm/realm-chaos.c | 1 + src/realm/realm-craft.c | 1 + src/realm/realm-crusade.c | 1 + src/realm/realm-death.c | 1 + src/realm/realm-hex.c | 1 + src/realm/realm-hissatsu.c | 1 + src/realm/realm-life.c | 1 + src/realm/realm-nature.c | 1 + src/realm/realm-song.c | 1 + src/realm/realm-sorcery.c | 1 + src/realm/realm-trump.c | 1 + src/spell/spells1.h | 62 +++--------------------------- src/spell/spells2.c | 1 + src/spell/spells3.c | 1 + src/spell/spells3.h | 49 +++++++++++++++++++++++ src/spells-floor.c | 2 +- src/spells-object.c | 2 +- src/spells-status.c | 1 + src/trap.c | 1 + src/view/display-main-window.c | 1 + src/wizard2.c | 1 + 55 files changed, 110 insertions(+), 64 deletions(-) create mode 100644 src/spell/spells3.h diff --git a/Hengband/Hengband/Hengband.vcxproj b/Hengband/Hengband/Hengband.vcxproj index 92d563fa8..9ad52ec30 100644 --- a/Hengband/Hengband/Hengband.vcxproj +++ b/Hengband/Hengband/Hengband.vcxproj @@ -564,6 +564,7 @@ + diff --git a/Hengband/Hengband/Hengband.vcxproj.filters b/Hengband/Hengband/Hengband.vcxproj.filters index e4538fbba..e0e567468 100644 --- a/Hengband/Hengband/Hengband.vcxproj.filters +++ b/Hengband/Hengband/Hengband.vcxproj.filters @@ -1550,6 +1550,9 @@ spell + + spell + diff --git a/src/Makefile.am b/src/Makefile.am index 43a226f80..ac9bf7898 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -195,7 +195,7 @@ hengband_SOURCES = \ spell/spells-util.h spell/spells-type.h \ spell/process-effect.h spell/process-effect.h \ spell/spells1.c spell/spells1.h spell/spells2.c spell/spells2.h \ - spell/spells3.c \ + spell/spells3.c spell/spells3.h \ spells-diceroll.c spells-diceroll.h \ spells-floor.c spells-floor.h \ spells-object.c spells-object.h \ diff --git a/src/chest.c b/src/chest.c index 45c4dd8bc..53220226c 100644 --- a/src/chest.c +++ b/src/chest.c @@ -12,6 +12,7 @@ #include "player-effects.h" #include "grid.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 箱からアイテムを引き出す / diff --git a/src/cmd/cmd-activate.c b/src/cmd/cmd-activate.c index d765fc440..ea812e17c 100644 --- a/src/cmd/cmd-activate.c +++ b/src/cmd/cmd-activate.c @@ -35,6 +35,7 @@ #include "spell/process-effect.h" #include "effect/effect-characteristics.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 装備耐性に準じたブレス効果の選択テーブル / diff --git a/src/cmd/cmd-basic.c b/src/cmd/cmd-basic.c index d9c25bcbc..3b630ac19 100644 --- a/src/cmd/cmd-basic.c +++ b/src/cmd/cmd-basic.c @@ -52,6 +52,7 @@ #include "targeting.h" #include "world.h" #include "effect/spells-effect-util.h" +#include "spell/spells3.h" /*! * @brief フロア脱出時に出戻りが不可能だった場合に警告を加える処理 diff --git a/src/cmd/cmd-item.c b/src/cmd/cmd-item.c index 357d093ff..0f0b5d9ba 100644 --- a/src/cmd/cmd-item.c +++ b/src/cmd/cmd-item.c @@ -40,7 +40,7 @@ #include "player-personality.h" #include "monster.h" #include "view/display-main-window.h" -#include "spell/spells1.h" +#include "spell/spells3.h" #include "object/object-kind.h" #include "autopick/autopick.h" #include "autopick/autopick-registry.h" diff --git a/src/cmd/cmd-magiceat.c b/src/cmd/cmd-magiceat.c index c5f0e5a9f..2b3ca8fec 100644 --- a/src/cmd/cmd-magiceat.c +++ b/src/cmd/cmd-magiceat.c @@ -64,7 +64,7 @@ #include "cmd-magiceat.h" #include "avatar.h" #include "player-status.h" -#include "spell/spells1.h" +#include "spell/spells3.h" #include "player-class.h" #include "object/object-kind.h" #include "targeting.h" diff --git a/src/cmd/cmd-mane.c b/src/cmd/cmd-mane.c index c4ea9ba06..04188591a 100644 --- a/src/cmd/cmd-mane.c +++ b/src/cmd/cmd-mane.c @@ -30,6 +30,7 @@ #include "view/display-main-window.h" #include "spell/spells-type.h" #include "spell/spells2.h" +#include "spell/spells3.h" static int damage; diff --git a/src/cmd/cmd-quaff.c b/src/cmd/cmd-quaff.c index a6070072e..3249d1240 100644 --- a/src/cmd/cmd-quaff.c +++ b/src/cmd/cmd-quaff.c @@ -16,6 +16,7 @@ #include "mutation.h" #include "avatar.h" #include "spell/spells2.h" +#include "spell/spells3.h" #include "spells-status.h" #include "player-effects.h" #include "player-status.h" diff --git a/src/cmd/cmd-read.c b/src/cmd/cmd-read.c index 3602b119f..72eb52a82 100644 --- a/src/cmd/cmd-read.c +++ b/src/cmd/cmd-read.c @@ -35,6 +35,7 @@ #include "view/display-main-window.h" #include "spell/spells-type.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 巻物を読むコマンドのサブルーチン diff --git a/src/cmd/cmd-spell.c b/src/cmd/cmd-spell.c index d83aeb23d..1c704229d 100644 --- a/src/cmd/cmd-spell.c +++ b/src/cmd/cmd-spell.c @@ -17,6 +17,7 @@ #include "selfinfo.h" #include "spell/technic-info-table.h" #include "spell/spells2.h" +#include "spell/spells3.h" #include "spells-summon.h" #include "realm/realm-hex.h" #include "mind.h" diff --git a/src/cmd/cmd-usestaff.c b/src/cmd/cmd-usestaff.c index 3a67f79e9..27001f9ff 100644 --- a/src/cmd/cmd-usestaff.c +++ b/src/cmd/cmd-usestaff.c @@ -10,6 +10,7 @@ #include "player-class.h" #include "player-inventory.h" #include "spell/spells2.h" +#include "spell/spells3.h" #include "spells-status.h" #include "spells-floor.h" #include "object-hook.h" diff --git a/src/cmd/cmd-zaprod.c b/src/cmd/cmd-zaprod.c index e4148f3ff..9c3bae43c 100644 --- a/src/cmd/cmd-zaprod.c +++ b/src/cmd/cmd-zaprod.c @@ -17,6 +17,7 @@ #include "targeting.h" #include "view/display-main-window.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief ロッドの効果を発動する diff --git a/src/cmd/cmd-zapwand.c b/src/cmd/cmd-zapwand.c index 67b64c2a5..254b6c8b0 100644 --- a/src/cmd/cmd-zapwand.c +++ b/src/cmd/cmd-zapwand.c @@ -16,6 +16,7 @@ #include "targeting.h" #include "view/display-main-window.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 魔法棒の効果を発動する diff --git a/src/combat/melee.c b/src/combat/melee.c index e54704a9d..f45ca3ec9 100644 --- a/src/combat/melee.c +++ b/src/combat/melee.c @@ -47,6 +47,7 @@ #include "world.h" #include "spells-floor.h" #include "spell/spells2.h" +#include "spell/spells3.h" #define BLOW_EFFECT_TYPE_NONE 0 #define BLOW_EFFECT_TYPE_FEAR 1 diff --git a/src/core.c b/src/core.c index 3a67f850a..ce961bb2d 100644 --- a/src/core.c +++ b/src/core.c @@ -119,6 +119,7 @@ #include "spell/spells-util.h" #include "spell/spells-execution.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * コピーライト情報 / diff --git a/src/effect/effect-item.c b/src/effect/effect-item.c index 7e514a976..6f9a093ac 100644 --- a/src/effect/effect-item.c +++ b/src/effect/effect-item.c @@ -5,6 +5,7 @@ #include "object-broken.h" #include "autopick/autopick.h" #include "spell/spells-type.h" +#include "spell/spells3.h" /*! * @brief 汎用的なビーム/ボルト/ボール系によるアイテムオブジェクトへの効果処理 / Handle a beam/bolt/ball causing damage to a monster. diff --git a/src/effect/effect-monster-resist-hurt.c b/src/effect/effect-monster-resist-hurt.c index 109ca0826..05d4b378f 100644 --- a/src/effect/effect-monster-resist-hurt.c +++ b/src/effect/effect-monster-resist-hurt.c @@ -2,6 +2,7 @@ #include "effect/effect-monster-util.h" #include "effect/effect-monster-resist-hurt.h" #include "monster-status.h" +#include "spell/spells3.h" gf_switch_result effect_monster_void(effect_monster_type *em_ptr) { diff --git a/src/effect/effect-monster.c b/src/effect/effect-monster.c index bbbf41dfe..ffc973bbc 100644 --- a/src/effect/effect-monster.c +++ b/src/effect/effect-monster.c @@ -17,6 +17,7 @@ #include "avatar.h" #include "spell/spells-type.h" #include "effect/effect-characteristics.h" +#include "spell/spells3.h" /*! * @brief ビーム/ボルト/ボール系魔法によるモンスターへの効果があるかないかを判定する diff --git a/src/effect/effect-player-resist-hurt.c b/src/effect/effect-player-resist-hurt.c index f7f251402..095d15205 100644 --- a/src/effect/effect-player-resist-hurt.c +++ b/src/effect/effect-player-resist-hurt.c @@ -9,6 +9,7 @@ #include "mutation.h" #include "monster-spell.h" #include "spells-status.h" +#include "spell/spells3.h" // 毒を除く4元素. void effect_player_elements(player_type *target_ptr, effect_player_type *ep_ptr, diff --git a/src/market/building.c b/src/market/building.c index 89c1580ee..ecc1b6b0d 100644 --- a/src/market/building.c +++ b/src/market/building.c @@ -45,7 +45,7 @@ #include "quest.h" #include "artifact.h" #include "cmd-spell.h" -#include "spell/spells1.h" +#include "spell/spells3.h" #include "spells-object.h" #include "spells-status.h" #include "realm/realm-hex.h" diff --git a/src/market/store.c b/src/market/store.c index 320453515..7bbb9e3e6 100644 --- a/src/market/store.c +++ b/src/market/store.c @@ -38,7 +38,7 @@ #include "cmd/cmd-visuals.h" #include "cmd/cmd-zapwand.h" #include "cmd/cmd-magiceat.h" -#include "spell/spells1.h" +#include "spell/spells3.h" #include "market/store.h" #include "avatar.h" #include "cmd-spell.h" diff --git a/src/mind.c b/src/mind.c index edf449da0..2002ad44b 100644 --- a/src/mind.c +++ b/src/mind.c @@ -44,6 +44,7 @@ #include "spell/spells-type.h" #include "spell/process-effect.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! 特殊技能の一覧テーブル */ mind_power const mind_powers[5] = diff --git a/src/monster/quantum-effect.c b/src/monster/quantum-effect.c index a8d54699f..46e70c05e 100644 --- a/src/monster/quantum-effect.c +++ b/src/monster/quantum-effect.c @@ -1,6 +1,7 @@ #include "angband.h" #include "quantum-effect.h" #include "monster-spell.h" +#include "spell/spells3.h" /*! * @brief ユニークでない量子生物を消滅させる diff --git a/src/mspells1.c b/src/mspells1.c index 973f434b9..0376a0efc 100644 --- a/src/mspells1.c +++ b/src/mspells1.c @@ -58,6 +58,7 @@ #include "player-race.h" #include "player-class.h" #include "spell/process-effect.h" +#include "spell/spells3.h" #define DO_SPELL_NONE 0 #define DO_SPELL_BR_LITE 1 diff --git a/src/mspells2.c b/src/mspells2.c index d278738a3..525dfad1e 100644 --- a/src/mspells2.c +++ b/src/mspells2.c @@ -29,6 +29,7 @@ #include "dungeon.h" #include "world.h" #include "view/display-main-window.h" +#include "spell/spells3.h" /*! * @brief モンスターが敵対モンスターにビームを当てること可能かを判定する / diff --git a/src/mspells3.c b/src/mspells3.c index 0aed7765d..c596e99f8 100644 --- a/src/mspells3.c +++ b/src/mspells3.c @@ -30,6 +30,7 @@ #include "targeting.h" #include "view/display-main-window.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief モンスター魔法をプレイヤーが使用する場合の換算レベル diff --git a/src/mspells4.c b/src/mspells4.c index 95e33ba33..b1ecebc61 100644 --- a/src/mspells4.c +++ b/src/mspells4.c @@ -28,6 +28,7 @@ #include "view/display-main-window.h" // 暫定、後で消したい. #include "spell/process-effect.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief モンスター2体がプレイヤーの近くに居るかの判定 / diff --git a/src/mutation.c b/src/mutation.c index 3e986b59b..0aa962e18 100644 --- a/src/mutation.c +++ b/src/mutation.c @@ -39,6 +39,7 @@ #include "effect/spells-effect-util.h" #include "spell/spells-type.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief プレイヤーに突然変異を与える diff --git a/src/object2.c b/src/object2.c index bd027f1c8..6f720156b 100644 --- a/src/object2.c +++ b/src/object2.c @@ -22,7 +22,7 @@ #include "io/write-diary.h" #include "cmd/cmd-dump.h" #include "cmd/cmd-spell.h" -#include "spell/spells1.h" +#include "spell/spells3.h" #include "dungeon.h" #include "floor.h" #include "grid.h" diff --git a/src/player-move.c b/src/player-move.c index 57ed205c4..27bee4a35 100644 --- a/src/player-move.c +++ b/src/player-move.c @@ -177,6 +177,7 @@ #include "autopick/autopick.h" #include "targeting.h" #include "spell/process-effect.h" +#include "spell/spells3.h" travel_type travel; diff --git a/src/racial.c b/src/racial.c index b99fd77e4..ed2069475 100644 --- a/src/racial.c +++ b/src/racial.c @@ -38,6 +38,7 @@ #include "effect/spells-effect-util.h" #include "spell/spells-type.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 修行僧の構え設定処理 diff --git a/src/realm/realm-arcane.c b/src/realm/realm-arcane.c index 235f53d77..bd787415b 100644 --- a/src/realm/realm-arcane.c +++ b/src/realm/realm-arcane.c @@ -5,6 +5,7 @@ #include "avatar.h" #include "spell/spells2.h" +#include "spell/spells3.h" #include "spells-floor.h" #include "spells-object.h" #include "spells-summon.h" diff --git a/src/realm/realm-chaos.c b/src/realm/realm-chaos.c index d22b66555..50e39a2e9 100644 --- a/src/realm/realm-chaos.c +++ b/src/realm/realm-chaos.c @@ -16,6 +16,7 @@ #include "spell/process-effect.h" #include "effect/effect-characteristics.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief カオス領域魔法の各処理を行う diff --git a/src/realm/realm-craft.c b/src/realm/realm-craft.c index e61a71e17..4c748cb2e 100644 --- a/src/realm/realm-craft.c +++ b/src/realm/realm-craft.c @@ -11,6 +11,7 @@ #include "player-status.h" #include "player-effects.h" #include "realm/realm-craft.h" +#include "spell/spells3.h" /*! * @brief 匠領域魔法の各処理を行う diff --git a/src/realm/realm-crusade.c b/src/realm/realm-crusade.c index 6894fa992..b6716cfbf 100644 --- a/src/realm/realm-crusade.c +++ b/src/realm/realm-crusade.c @@ -16,6 +16,7 @@ #include "realm/realm-crusade.h" #include "spell/process-effect.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 破邪領域魔法の各処理を行う diff --git a/src/realm/realm-death.c b/src/realm/realm-death.c index a099ea7e4..640cac51e 100644 --- a/src/realm/realm-death.c +++ b/src/realm/realm-death.c @@ -16,6 +16,7 @@ #include "spell/process-effect.h" #include "effect/effect-characteristics.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 暗黒領域魔法の各処理を行う diff --git a/src/realm/realm-hex.c b/src/realm/realm-hex.c index 251366b4e..5e7d19ecc 100644 --- a/src/realm/realm-hex.c +++ b/src/realm/realm-hex.c @@ -42,6 +42,7 @@ #include "spell/spells-type.h" #include "spell/process-effect.h" #include "spell/spells2.h" +#include "spell/spells3.h" #define MAX_KEEP 4 /*!<呪術の最大詠唱数 */ diff --git a/src/realm/realm-hissatsu.c b/src/realm/realm-hissatsu.c index ae2cd2633..e939c5975 100644 --- a/src/realm/realm-hissatsu.c +++ b/src/realm/realm-hissatsu.c @@ -26,6 +26,7 @@ #include "spell/spells-type.h" #include "spell/process-effect.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 剣術の各処理を行う diff --git a/src/realm/realm-life.c b/src/realm/realm-life.c index 36d000b92..2a35b064a 100644 --- a/src/realm/realm-life.c +++ b/src/realm/realm-life.c @@ -3,6 +3,7 @@ #include "spells-status.h" #include "spells-floor.h" #include "spell/spells2.h" +#include "spell/spells3.h" #include "player-status.h" #include "player-effects.h" #include "floor.h" diff --git a/src/realm/realm-nature.c b/src/realm/realm-nature.c index 7d6bd0e90..2b287caf9 100644 --- a/src/realm/realm-nature.c +++ b/src/realm/realm-nature.c @@ -18,6 +18,7 @@ #include "spell/process-effect.h" #include "effect/effect-characteristics.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 自然領域魔法の各処理を行う diff --git a/src/realm/realm-song.c b/src/realm/realm-song.c index 6d144af65..69f780e69 100644 --- a/src/realm/realm-song.c +++ b/src/realm/realm-song.c @@ -13,6 +13,7 @@ #include "spell/process-effect.h" #include "effect/effect-characteristics.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 歌の開始を処理する / Start singing if the player is a Bard diff --git a/src/realm/realm-sorcery.c b/src/realm/realm-sorcery.c index 17fe1b3b4..bdc3c8010 100644 --- a/src/realm/realm-sorcery.c +++ b/src/realm/realm-sorcery.c @@ -12,6 +12,7 @@ #include "targeting.h" #include "realm/realm-sorcery.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief 仙術領域魔法の各処理を行う diff --git a/src/realm/realm-trump.c b/src/realm/realm-trump.c index c507bd52b..f90e9d5c6 100644 --- a/src/realm/realm-trump.c +++ b/src/realm/realm-trump.c @@ -13,6 +13,7 @@ #include "realm/realm-trump.h" #include "spell/spells-type.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief トランプ領域魔法の各処理を行う diff --git a/src/spell/spells1.h b/src/spell/spells1.h index 9e3d7521a..ad48d7896 100644 --- a/src/spell/spells1.h +++ b/src/spell/spells1.h @@ -1,59 +1,9 @@ #pragma once #include "realm/realm.h" -/* spells1.c */ -extern bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2); -extern void breath_shape(player_type *caster_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ); -extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2); -extern bool binding_field(player_type *caster_ptr, HIT_POINT dam); -extern void seal_of_mirror(player_type *caster_ptr, HIT_POINT dam); -extern concptr spell_category_name(OBJECT_TYPE_VALUE tval); - -/* spells3.c */ -extern bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, teleport_flags mode); -extern void teleport_monster_to(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, teleport_flags mode); -extern bool teleport_player_aux(player_type *creature_ptr, POSITION dis, bool is_quantum_effect, teleport_flags mode); -extern void teleport_player(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode); -extern void teleport_player_away(MONSTER_IDX m_idx, player_type *target_ptr, POSITION dis, bool is_quantum_effect); -extern void teleport_player_to(player_type *creature_ptr, POSITION ny, POSITION nx, teleport_flags mode); -extern void teleport_away_followable(player_type *creature_ptr, MONSTER_IDX m_idx); -extern bool teleport_level_other(player_type *caster_ptr); -extern void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx); -extern bool recall_player(player_type *creature_ptr, TIME_EFFECT turns); -extern bool free_level_recall(player_type *creature_ptr); -extern bool reset_recall(player_type *caster_ptr); -extern bool apply_disenchant(player_type *target_ptr, BIT_FLAGS mode); -extern void call_the_void(player_type *caster_ptr); -extern void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los); -extern void reserve_alter_reality(player_type *caster_ptr); -extern void identify_pack(player_type *target_ptr); -extern int remove_curse(player_type *caster_ptr); -extern int remove_all_curse(player_type *caster_ptr); -extern bool alchemy(player_type *caster_ptr); - -extern bool artifact_scroll(player_type *caster_ptr); -extern bool ident_spell(player_type *caster_ptr, bool only_equip, OBJECT_TYPE_VALUE item_tester_tval); -extern bool mundane_spell(player_type *ownner_ptr, bool only_equip); -extern bool identify_item(player_type *owner_ptr, object_type *o_ptr); -extern bool identify_fully(player_type *caster_ptr, bool only_equip, OBJECT_TYPE_VALUE item_tester_tval); -extern bool recharge(player_type *caster_ptr, int power); -extern void display_spell_list(player_type *caster_ptr); -extern EXP experience_of_spell(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX use_realm); -extern MANA_POINT mod_need_mana(player_type *caster_ptr, MANA_POINT need_mana, SPELL_IDX spell, REALM_IDX realm); -extern PERCENTAGE mod_spell_chance_1(player_type *caster_ptr, PERCENTAGE chance); -extern PERCENTAGE mod_spell_chance_2(player_type *caster_ptr, PERCENTAGE chance); -extern PERCENTAGE spell_chance(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX realm); -extern void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX *spells, int num, TERM_LEN y, TERM_LEN x, REALM_IDX realm); -extern bool polymorph_monster(player_type *caster_ptr, POSITION y, POSITION x); -extern bool dimension_door(player_type *caster_ptr); -extern bool mirror_tunnel(player_type *caster_ptr); -extern void massacre(player_type *caster_ptr); -extern bool eat_rock(player_type *caster_ptr); -extern bool shock_power(player_type *caster_ptr); -extern bool fetch_monster(player_type *caster_ptr); -extern bool booze(player_type *creature_ptr); -extern bool detonation(player_type *creature_ptr); -extern void blood_curse_to_enemy(player_type *caster_ptr, MONSTER_IDX m_idx); -extern bool fire_crimson(player_type *shooter_ptr); -extern bool tele_town(player_type *caster_ptr); -extern bool is_teleport_level_ineffective(player_type *caster_ptr, MONSTER_IDX idx); +bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2); +void breath_shape(player_type *caster_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ); +POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2); +bool binding_field(player_type *caster_ptr, HIT_POINT dam); +void seal_of_mirror(player_type *caster_ptr, HIT_POINT dam); +concptr spell_category_name(OBJECT_TYPE_VALUE tval); diff --git a/src/spell/spells2.c b/src/spell/spells2.c index 6cc8a5526..f5b1fa8e8 100644 --- a/src/spell/spells2.c +++ b/src/spell/spells2.c @@ -30,6 +30,7 @@ #include "melee.h" #include "world.h" #include "spell/spells2.h" +#include "spell/spells3.h" #include "spells-summon.h" #include "mutation.h" #include "quest.h" diff --git a/src/spell/spells3.c b/src/spell/spells3.c index 907df1448..718c5e7b0 100644 --- a/src/spell/spells3.c +++ b/src/spell/spells3.c @@ -38,6 +38,7 @@ #include "artifact.h" #include "avatar.h" #include "spell/spells2.h" +#include "spell/spells3.h" #include "spells-floor.h" #include "spell/technic-info-table.h" #include "grid.h" diff --git a/src/spell/spells3.h b/src/spell/spells3.h new file mode 100644 index 000000000..59f4b4469 --- /dev/null +++ b/src/spell/spells3.h @@ -0,0 +1,49 @@ +#pragma once + +bool teleport_away(player_type* caster_ptr, MONSTER_IDX m_idx, POSITION dis, teleport_flags mode); +void teleport_monster_to(player_type* caster_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, teleport_flags mode); +bool teleport_player_aux(player_type* creature_ptr, POSITION dis, bool is_quantum_effect, teleport_flags mode); +void teleport_player(player_type* creature_ptr, POSITION dis, BIT_FLAGS mode); +void teleport_player_away(MONSTER_IDX m_idx, player_type* target_ptr, POSITION dis, bool is_quantum_effect); +void teleport_player_to(player_type* creature_ptr, POSITION ny, POSITION nx, teleport_flags mode); +void teleport_away_followable(player_type* creature_ptr, MONSTER_IDX m_idx); +bool teleport_level_other(player_type* caster_ptr); +void teleport_level(player_type* creature_ptr, MONSTER_IDX m_idx); +bool recall_player(player_type* creature_ptr, TIME_EFFECT turns); +bool free_level_recall(player_type* creature_ptr); +bool reset_recall(player_type* caster_ptr); +bool apply_disenchant(player_type* target_ptr, BIT_FLAGS mode); +void call_the_void(player_type* caster_ptr); +void fetch(player_type* caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los); +void reserve_alter_reality(player_type* caster_ptr); +void identify_pack(player_type* target_ptr); +int remove_curse(player_type* caster_ptr); +int remove_all_curse(player_type* caster_ptr); +bool alchemy(player_type* caster_ptr); + +bool artifact_scroll(player_type* caster_ptr); +bool ident_spell(player_type* caster_ptr, bool only_equip, OBJECT_TYPE_VALUE item_tester_tval); +bool mundane_spell(player_type* ownner_ptr, bool only_equip); +bool identify_item(player_type* owner_ptr, object_type* o_ptr); +bool identify_fully(player_type* caster_ptr, bool only_equip, OBJECT_TYPE_VALUE item_tester_tval); +bool recharge(player_type* caster_ptr, int power); +void display_spell_list(player_type* caster_ptr); +EXP experience_of_spell(player_type* caster_ptr, SPELL_IDX spell, REALM_IDX use_realm); +MANA_POINT mod_need_mana(player_type* caster_ptr, MANA_POINT need_mana, SPELL_IDX spell, REALM_IDX realm); +PERCENTAGE mod_spell_chance_1(player_type* caster_ptr, PERCENTAGE chance); +PERCENTAGE mod_spell_chance_2(player_type* caster_ptr, PERCENTAGE chance); +PERCENTAGE spell_chance(player_type* caster_ptr, SPELL_IDX spell, REALM_IDX realm); +void print_spells(player_type* caster_ptr, SPELL_IDX target_spell, SPELL_IDX* spells, int num, TERM_LEN y, TERM_LEN x, REALM_IDX realm); +bool polymorph_monster(player_type* caster_ptr, POSITION y, POSITION x); +bool dimension_door(player_type* caster_ptr); +bool mirror_tunnel(player_type* caster_ptr); +void massacre(player_type* caster_ptr); +bool eat_rock(player_type* caster_ptr); +bool shock_power(player_type* caster_ptr); +bool fetch_monster(player_type* caster_ptr); +bool booze(player_type* creature_ptr); +bool detonation(player_type* creature_ptr); +void blood_curse_to_enemy(player_type* caster_ptr, MONSTER_IDX m_idx); +bool fire_crimson(player_type* shooter_ptr); +bool tele_town(player_type* caster_ptr); +bool is_teleport_level_ineffective(player_type* caster_ptr, MONSTER_IDX idx); diff --git a/src/spells-floor.c b/src/spells-floor.c index 9e1ef2434..d7a342f81 100644 --- a/src/spells-floor.c +++ b/src/spells-floor.c @@ -24,7 +24,7 @@ #include "monster-status.h" -#include "spell/spells1.h" +#include "spell/spells3.h" #include "spells-floor.h" /* diff --git a/src/spells-object.c b/src/spells-object.c index 5b58276a7..ce5765c01 100644 --- a/src/spells-object.c +++ b/src/spells-object.c @@ -6,7 +6,7 @@ #include "artifact.h" #include "floor.h" #include "grid.h" -#include "spell/spells1.h" +#include "spell/spells3.h" #include "spells-object.h" #include "object-boost.h" #include "object-hook.h" diff --git a/src/spells-status.c b/src/spells-status.c index 88958f094..adeb17106 100644 --- a/src/spells-status.c +++ b/src/spells-status.c @@ -18,6 +18,7 @@ #include "realm/realm-song.h" #include "view/display-main-window.h" #include "spell/spells2.h" +#include "spell/spells3.h" /*! * @brief モンスター回復処理 diff --git a/src/trap.c b/src/trap.c index 84cfcaa3c..b6469bbc9 100644 --- a/src/trap.c +++ b/src/trap.c @@ -26,6 +26,7 @@ #include "world.h" #include "spell/process-effect.h" #include "spell/spells2.h" +#include "spell/spells3.h" static s16b normal_traps[MAX_NORMAL_TRAPS]; diff --git a/src/view/display-main-window.c b/src/view/display-main-window.c index 24ae009b7..5d69eb0fc 100644 --- a/src/view/display-main-window.c +++ b/src/view/display-main-window.c @@ -50,6 +50,7 @@ #include "market/arena-info-table.h" #include "effect/spells-effect-util.h" +#include "spell/spells3.h" /* * Not using graphical tiles for this feature? diff --git a/src/wizard2.c b/src/wizard2.c index b7fa5d6f5..45980a3e9 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -57,6 +57,7 @@ #include "view/display-main-window.h" #include "world.h" #include "spell/spells2.h" +#include "spell/spells3.h" #define NUM_O_SET 8 #define NUM_O_BIT 32 -- 2.11.0