OSDN Git Service

[Refactor] EFFECT_ID を spell_type に統合. / Integrate EFFECT_ID into spell_type.
authordeskull <deskull@users.sourceforge.jp>
Mon, 21 Sep 2020 16:14:24 +0000 (01:14 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 21 Sep 2020 16:14:24 +0000 (01:14 +0900)
35 files changed:
src/cmd-item/cmd-zapwand.c
src/combat/aura-counterattack.c
src/effect/effect-feature.c
src/effect/effect-feature.h
src/effect/effect-item.c
src/effect/effect-item.h
src/effect/effect-monster-util.c
src/effect/effect-monster-util.h
src/effect/effect-monster.c
src/effect/effect-monster.h
src/effect/effect-player-util.h
src/effect/effect-player.c
src/effect/effect-player.h
src/effect/effect-processor.c
src/effect/effect-processor.h
src/floor/object-allocator.c
src/floor/object-allocator.h
src/info-reader/vault-reader.c
src/mind/mind-ninja.c
src/monster-floor/monster-death.c
src/mspell/mspell-checker.c
src/mspell/mspell-checker.h
src/mspell/mspell-judgement.c
src/mspell/mspell-judgement.h
src/object/warning.c
src/room/room-generator.c
src/spell-kind/spells-launcher.c
src/spell-kind/spells-launcher.h
src/spell-kind/spells-sight.c
src/spell-kind/spells-sight.h
src/spell/range-calc.c
src/spell/range-calc.h
src/system/h-type.h
src/term/gameterm.c
src/term/gameterm.h

index 9528904..1e57982 100644 (file)
@@ -246,7 +246,7 @@ bool wand_effect(player_type *creature_ptr, OBJECT_SUBTYPE_VALUE sval, DIRECTION
 
     case SV_WAND_DRAGON_BREATH: {
         HIT_POINT dam;
-        EFFECT_ID typ;
+        spell_type typ;
 
         switch (randint1(5)) {
         case 1:
index 64416e1..765e7cb 100644 (file)
@@ -196,7 +196,7 @@ static void aura_shadow_by_monster_attack(player_type *target_ptr, monap_type *m
     }
 
     BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
-    EFFECT_ID typ[4][2] = { { INVEN_HEAD, GF_OLD_CONF }, { INVEN_LARM, GF_OLD_SLEEP }, { INVEN_HANDS, GF_TURN_ALL }, { INVEN_FEET, GF_OLD_SLOW } };
+    spell_type typ[4][2] = { { INVEN_HEAD, GF_OLD_CONF }, { INVEN_LARM, GF_OLD_SLEEP }, { INVEN_HANDS, GF_TURN_ALL }, { INVEN_FEET, GF_OLD_SLOW } };
 
     /* Some cursed armours gives an extra effect */
     for (int j = 0; j < 4; j++) {
index 96da677..75b5f82 100644 (file)
@@ -58,7 +58,7 @@ static bool cave_naked_bold(player_type *caster_ptr, POSITION y, POSITION x)
  * Perhaps we should affect doors?
  * </pre>
  */
-bool affect_feature(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
+bool affect_feature(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type typ)
 {
     floor_type *floor_ptr = caster_ptr->current_floor_ptr;
     grid_type *g_ptr = &floor_ptr->grid_array[y][x];
index a83c5f3..d64cf5f 100644 (file)
@@ -2,4 +2,4 @@
 
 #include "system/angband.h"
 
-bool affect_feature(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ);
+bool affect_feature(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type typ);
index 6409a59..a593c53 100644 (file)
@@ -34,7 +34,7 @@
  * @param typ 効果属性 / Type of damage to apply to monsters (and objects)
  * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
  */
-bool affect_item(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
+bool affect_item(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type typ)
 {
     grid_type *g_ptr = &caster_ptr->current_floor_ptr->grid_array[y][x];
 
index 8b7c581..dc67188 100644 (file)
@@ -2,4 +2,4 @@
 
 #include "system/angband.h"
 
-bool affect_item(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ);
+bool affect_item(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type typ);
index 7a605cc..09c854b 100644 (file)
@@ -24,7 +24,7 @@
  * @param see_s_msg TRUEならばメッセージを表示する
  * @return なし
  */
-static void substitute_effect_monster(effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID effect_type, BIT_FLAGS flag, bool see_s_msg)
+static void substitute_effect_monster(effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type effect_type, BIT_FLAGS flag, bool see_s_msg)
 {
        em_ptr->who = who;
        em_ptr->r = r;
@@ -51,7 +51,7 @@ static void substitute_effect_monster(effect_monster_type *em_ptr, MONSTER_IDX w
  * @param see_s_msg TRUEならばメッセージを表示する
  * @return なし
  */
-effect_monster_type *initialize_effect_monster(player_type *caster_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID effect_type, BIT_FLAGS flag, bool see_s_msg)
+effect_monster_type *initialize_effect_monster(player_type *caster_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type effect_type, BIT_FLAGS flag, bool see_s_msg)
 {
        substitute_effect_monster(em_ptr, who, r, y, x, dam, effect_type, flag, see_s_msg);
 
index adc8c6c..84bcb0e 100644 (file)
@@ -37,9 +37,9 @@ typedef struct effect_monster_type {
        POSITION y;
        POSITION x;
        HIT_POINT dam;
-       EFFECT_ID effect_type;
+       spell_type effect_type;
        BIT_FLAGS flag;
        bool see_s_msg;
 } effect_monster_type;
 
-effect_monster_type *initialize_effect_monster(player_type *caster_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID effect_type, BIT_FLAGS flag, bool see_s_msg);
+effect_monster_type *initialize_effect_monster(player_type *caster_ptr, effect_monster_type *em_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type effect_type, BIT_FLAGS flag, bool see_s_msg);
index 370da83..bc571d8 100644 (file)
@@ -571,7 +571,7 @@ static void postprocess_spell(player_type *caster_ptr, effect_monster_type *em_p
  * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
  */
 bool affect_monster(
-    player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID effect_type, BIT_FLAGS flag, bool see_s_msg)
+    player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type effect_type, BIT_FLAGS flag, bool see_s_msg)
 {
     effect_monster_type tmp_effect;
     effect_monster_type *em_ptr = initialize_effect_monster(caster_ptr, &tmp_effect, who, r, y, x, dam, effect_type, flag, see_s_msg);
index d9a6835..e11a529 100644 (file)
@@ -3,4 +3,4 @@
 #include "system/angband.h"
 #include "effect/effect-monster-util.h"
 
-bool affect_monster(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flag, bool see_s_msg);
+bool affect_monster(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, spell_type typ, BIT_FLAGS flag, bool see_s_msg);
index 29b3198..586d4ad 100644 (file)
@@ -13,7 +13,7 @@ typedef struct effect_player_type
 
        MONSTER_IDX who;
        HIT_POINT dam;
-       EFFECT_ID effect_type;
+       spell_type effect_type;
        BIT_FLAGS flag;
        int monspell;
 } effect_player_type;
index 2a10f4b..0775d62 100644 (file)
@@ -43,7 +43,7 @@ typedef enum effect_player_check_result {
  * @return 初期化後の構造体ポインタ
  */
 static effect_player_type *initialize_effect_player(
-    effect_player_type *ep_ptr, MONSTER_IDX who, HIT_POINT dam, EFFECT_ID effect_type, BIT_FLAGS flag, int monspell)
+    effect_player_type *ep_ptr, MONSTER_IDX who, HIT_POINT dam, spell_type effect_type, BIT_FLAGS flag, int monspell)
 {
     ep_ptr->rlev = 0;
     ep_ptr->m_ptr = NULL;
@@ -175,7 +175,7 @@ static void describe_effect_source(player_type *target_ptr, effect_player_type *
  * @param monspell 効果元のモンスター魔法ID
  * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
  */
-bool affect_player(MONSTER_IDX who, player_type *target_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID effect_type,
+bool affect_player(MONSTER_IDX who, player_type *target_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, spell_type effect_type,
     BIT_FLAGS flag, int monspell, project_func project)
 {
     effect_player_type tmp_effect;
index 00735eb..89e799b 100644 (file)
@@ -3,7 +3,7 @@
 #include "system/angband.h"
 
 typedef bool (*project_func)(
-    player_type *caster_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flag, int monspell);
+    player_type *caster_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, spell_type typ, BIT_FLAGS flag, int monspell);
 
-bool affect_player(MONSTER_IDX who, player_type *target_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flag,
+bool affect_player(MONSTER_IDX who, player_type *target_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, spell_type typ, BIT_FLAGS flag,
     int monspell, project_func project);
index e4d5e95..cec9829 100644 (file)
@@ -81,7 +81,7 @@ static void next_mirror(player_type *creature_ptr, POSITION *next_y, POSITION *n
  * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the
  * projection were observed, else FALSE
  */
-bool project(player_type *caster_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam, const EFFECT_ID typ, BIT_FLAGS flag,
+bool project(player_type *caster_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam, const spell_type typ, BIT_FLAGS flag,
     const int monspell)
 {
     int dist;
index ab2a951..81750be 100644 (file)
@@ -2,5 +2,5 @@
 
 #include "system/angband.h"
 
-bool project(player_type *caster_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam, const EFFECT_ID typ, BIT_FLAGS flag,
+bool project(player_type *caster_ptr, const MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, const HIT_POINT dam, const spell_type typ, BIT_FLAGS flag,
     const int monspell);
index 2172ce6..d964c18 100644 (file)
@@ -148,7 +148,7 @@ bool alloc_stairs(player_type *owner_ptr, FEAT_IDX feat, int num, int walls)
  * @param num 配置したい数
  * @return 規定数通りに生成に成功したらTRUEを返す。
  */
-void alloc_object(player_type *owner_ptr, dap_type set, EFFECT_ID typ, int num)
+void alloc_object(player_type *owner_ptr, dap_type set, spell_type typ, int num)
 {
     POSITION y = 0;
     POSITION x = 0;
index 31fa4d3..ed0565d 100644 (file)
@@ -4,4 +4,4 @@
 
 typedef enum dap_type dap_type;
 bool alloc_stairs(player_type *owner_ptr, FEAT_IDX feat, int num, int walls);
-void alloc_object(player_type *owner_ptr, dap_type set, EFFECT_ID typ, int num);
+void alloc_object(player_type *owner_ptr, dap_type set, spell_type typ, int num);
index e9355fc..9eb4b15 100644 (file)
@@ -41,7 +41,7 @@ errr parse_v_info(char *buf, angband_header *head)
         if (!add_text(&v_ptr->text, head, s, FALSE))
             return 7;
     } else if (buf[0] == 'X') {
-        EFFECT_ID typ, rat, hgt, wid;
+        spell_type typ, rat, hgt, wid;
         if (4 != sscanf(buf + 2, "%d:%d:%d:%d", &typ, &rat, &hgt, &wid))
             return 1;
 
index 78e965b..86e4962 100644 (file)
@@ -447,7 +447,7 @@ bool cast_ninja_spell(player_type *caster_ptr, mind_ninja_type spell)
     case PURGATORY_FLAME: {
         int num = damroll(3, 9);
         for (int k = 0; k < num; k++) {
-            EFFECT_ID typ = one_in_(2) ? GF_FIRE : one_in_(3) ? GF_NETHER : GF_PLASMA;
+            spell_type typ = one_in_(2) ? GF_FIRE : one_in_(3) ? GF_NETHER : GF_PLASMA;
             int attempts = 1000;
             while (attempts--) {
                 scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, PROJECT_NONE);
index 030165d..b2816fa 100644 (file)
@@ -63,7 +63,7 @@ static void on_dead_explosion(player_type *player_ptr, monster_death_type *md_pt
             continue;
 
         BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
-        EFFECT_ID typ = mbe_info[md_ptr->r_ptr->blow[i].effect].explode_type;
+        spell_type typ = mbe_info[md_ptr->r_ptr->blow[i].effect].explode_type;
         DICE_NUMBER d_dice = md_ptr->r_ptr->blow[i].d_dice;
         DICE_SID d_side = md_ptr->r_ptr->blow[i].d_side;
         HIT_POINT damage = damroll(d_dice, d_side);
index 542ae38..e1ea98d 100644 (file)
@@ -188,7 +188,7 @@ bool clean_shot(player_type *target_ptr, POSITION y1, POSITION x1, POSITION y2,
  * @param target_type モンスターからモンスターへ撃つならMONSTER_TO_MONSTER、モンスターからプレイヤーならMONSTER_TO_PLAYER
  * @return なし
  */
-void bolt(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type)
+void bolt(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, spell_type typ, int dam_hp, int monspell, int target_type)
 {
     BIT_FLAGS flg = 0;
     switch (target_type) {
@@ -219,7 +219,7 @@ void bolt(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, EF
  * @param target_type モンスターからモンスターへ撃つならMONSTER_TO_MONSTER、モンスターからプレイヤーならMONSTER_TO_PLAYER
  * @return なし
  */
-void beam(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type)
+void beam(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, spell_type typ, int dam_hp, int monspell, int target_type)
 {
     BIT_FLAGS flg = 0;
     switch (target_type) {
@@ -251,7 +251,7 @@ void beam(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, EF
  * @return なし
  */
 void breath(
-    player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, EFFECT_ID typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type)
+    player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, spell_type typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type)
 {
     monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
     monster_race *r_ptr = &r_info[m_ptr->r_idx];
index 24b9b23..d19436e 100644 (file)
@@ -7,7 +7,7 @@ bool clean_shot(player_type *target_ptr, POSITION y1, POSITION x1, POSITION y2,
 bool summon_possible(player_type *target_ptr, POSITION y1, POSITION x1);
 bool raise_possible(player_type *target_ptr, monster_type *m_ptr);
 bool spell_is_inate(SPELL_IDX spell);
-void beam(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type);
-void bolt(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type);
+void beam(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, spell_type typ, int dam_hp, int monspell, int target_type);
+void bolt(player_type *target_ptr, MONSTER_IDX m_idx, POSITION y, POSITION x, spell_type typ, int dam_hp, int monspell, int target_type);
 void breath(
-    player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, EFFECT_ID typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type);
+    player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, spell_type typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type);
index fb996f3..51c7d1a 100644 (file)
@@ -84,7 +84,7 @@ bool direct_beam(player_type *target_ptr, POSITION y1, POSITION x1, POSITION y2,
  * @param is_friend TRUEならば、プレイヤーを巻き込む時にブレスの判定をFALSEにする。
  * @return ブレスを直接当てられるならばTRUEを返す
  */
-bool breath_direct(player_type *master_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, EFFECT_ID typ, bool is_friend)
+bool breath_direct(player_type *master_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, spell_type typ, bool is_friend)
 {
     BIT_FLAGS flg;
     switch (typ) {
index d17ba69..d6cce16 100644 (file)
@@ -4,7 +4,7 @@
 
 typedef struct monster_type monster_type;
 bool direct_beam(player_type *target_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, monster_type *m_ptr);
-bool breath_direct(player_type *master_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, EFFECT_ID typ, bool is_friend);
+bool breath_direct(player_type *master_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, spell_type typ, bool is_friend);
 void get_project_point(player_type *target_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg);
 bool dispel_check_monster(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
 bool dispel_check(player_type *creature_ptr, MONSTER_IDX m_idx);
index 7e39346..39fb5c6 100644 (file)
@@ -79,7 +79,7 @@ object_type *choose_warning_item(player_type *creature_ptr)
  * @param max 算出した最大ダメージを返すポインタ
  * @return なし
  */
-static void spell_damcalc(player_type *target_ptr, monster_type *m_ptr, EFFECT_ID typ, HIT_POINT dam, int *max)
+static void spell_damcalc(player_type *target_ptr, monster_type *m_ptr, spell_type typ, HIT_POINT dam, int *max)
 {
     monster_race *r_ptr = &r_info[m_ptr->r_idx];
     int rlev = r_ptr->level;
@@ -252,7 +252,7 @@ static void spell_damcalc(player_type *target_ptr, monster_type *m_ptr, EFFECT_I
  * @param max 算出した最大ダメージを返すポインタ
  * @return なし
  */
-void spell_damcalc_by_spellnum(player_type *creature_ptr, monster_spell_type ms_type, EFFECT_ID typ, MONSTER_IDX m_idx, int *max)
+void spell_damcalc_by_spellnum(player_type *creature_ptr, monster_spell_type ms_type, spell_type typ, MONSTER_IDX m_idx, int *max)
 {
     monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[m_idx];
     HIT_POINT dam = monspell_damage(creature_ptr, ms_type, m_idx, DAM_MAX);
index 383230b..daa8a78 100644 (file)
@@ -25,7 +25,7 @@
  * @note that we restrict the number of "crowded" rooms to reduce the chance of overflowing the monster list during level creation.
  * @return 部屋の生成に成功した場合 TRUE を返す。
  */
-static bool room_build(player_type *player_ptr, dun_data_type *dd_ptr, EFFECT_ID typ)
+static bool room_build(player_type *player_ptr, dun_data_type *dd_ptr, spell_type typ)
 {
     switch (typ) {
     case ROOM_T_NORMAL:
index 6a56a46..6e8b7fb 100644 (file)
@@ -20,7 +20,7 @@
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_ball(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_ball(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
 {
     BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
     if (typ == GF_CHARM_LIVING)
@@ -53,7 +53,7 @@ bool fire_ball(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT
  * 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); }
+bool fire_breath(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, POSITION rad) { return fire_ball(caster_ptr, typ, dir, dam, -rad); }
 
 /*!
  * @brief ロケット系スペルの発動(詳細な差は確認中) / Cast a ball spell
@@ -70,7 +70,7 @@ bool fire_breath(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POIN
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_rocket(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_rocket(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
 {
     POSITION tx = caster_ptr->x + 99 * ddx[dir];
     POSITION ty = caster_ptr->y + 99 * ddy[dir];
@@ -98,7 +98,7 @@ bool fire_rocket(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POIN
  * Affect grids, objects, and monsters
  * </pre>
  */
-bool fire_ball_hide(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
+bool fire_ball_hide(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
 {
     POSITION tx = caster_ptr->x + 99 * ddx[dir];
     POSITION ty = caster_ptr->y + 99 * ddy[dir];
@@ -131,7 +131,7 @@ bool fire_ball_hide(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_P
  * 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)
+bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, spell_type 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));
@@ -148,7 +148,7 @@ bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, EFFECT_ID typ, POSITI
  * @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)
+bool fire_blast(player_type *caster_ptr, spell_type typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev)
 {
     POSITION ty, tx, y, x;
     POSITION ly, lx;
@@ -198,7 +198,7 @@ bool fire_blast(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, DICE_NUMB
  * Affect monsters and grids (not objects).
  * </pre>
  */
-bool fire_bolt(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
+bool fire_bolt(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam)
 {
     BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
     if (typ != GF_ARROW)
@@ -219,7 +219,7 @@ bool fire_bolt(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT
  * Affect monsters, grids and objects.
  * </pre>
  */
-bool fire_beam(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
+bool fire_beam(player_type *caster_ptr, spell_type 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));
@@ -239,7 +239,7 @@ bool fire_beam(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT
  * 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)
+bool fire_bolt_or_beam(player_type *caster_ptr, PERCENTAGE prob, spell_type typ, DIRECTION dir, HIT_POINT dam)
 {
     if (randint0(100) < prob) {
         return (fire_beam(caster_ptr, typ, dir, dam));
@@ -257,7 +257,7 @@ bool fire_bolt_or_beam(player_type *caster_ptr, PERCENTAGE prob, EFFECT_ID typ,
  * @param flg フラグ
  * @return 作用が実際にあった場合TRUEを返す
  */
-bool project_hook(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg)
+bool project_hook(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg)
 {
     flg |= (PROJECT_THRU);
     POSITION tx = caster_ptr->x + ddx[dir];
index ed1c0b9..a407335 100644 (file)
@@ -2,13 +2,13 @@
 
 #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);
+bool fire_ball(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_breath(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_rocket(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_ball_hide(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, spell_type typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
+bool fire_bolt(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam);
+bool fire_blast(player_type *caster_ptr, spell_type typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
+bool fire_beam(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam);
+bool fire_bolt_or_beam(player_type *caster_ptr, PERCENTAGE prob, spell_type typ, DIRECTION dir, HIT_POINT dam);
+bool project_hook(player_type *caster_ptr, spell_type typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
index 5f83261..29d57a2 100644 (file)
@@ -40,7 +40,7 @@
  * this is done in two passes. -- JDL
  * </pre>
  */
-bool project_all_los(player_type *caster_ptr, EFFECT_ID typ, HIT_POINT dam)
+bool project_all_los(player_type *caster_ptr, spell_type typ, HIT_POINT dam)
 {
     for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++) {
         monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
index 8da52a1..52184a8 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "system/angband.h"
 
-bool project_all_los(player_type *caster_ptr, EFFECT_ID typ, HIT_POINT dam);
+bool project_all_los(player_type *caster_ptr, spell_type typ, HIT_POINT dam);
 bool speed_monsters(player_type *caster_ptr);
 bool slow_monsters(player_type *caster_ptr, int power);
 bool sleep_monsters(player_type *caster_ptr, int power);
index 3dc8926..df752c5 100644 (file)
@@ -208,7 +208,7 @@ bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, PO
 /*
  * breath shape
  */
-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)
+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, spell_type typ)
 {
        POSITION by = y1;
        POSITION bx = x1;
index 5c09832..e13b587 100644 (file)
@@ -3,5 +3,5 @@
 #include "system/angband.h"
 
 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);
+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, spell_type typ);
 POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
index d380037..919ee8c 100644 (file)
@@ -218,8 +218,6 @@ typedef byte FEAT_POWER;   /*!< 地形強度の型定義 */
 
 typedef int QUANTITY; /*!< インターフェース上の指定個数 */
 
-typedef int EFFECT_ID; /*!< 効果属性ID */
-
 typedef s16b QUEST_TYPE;   /*!< クエストの種別ID */
 typedef s16b QUEST_STATUS; /*!< クエストの状態ID */
 
index 9781696..8bb458d 100644 (file)
@@ -415,7 +415,7 @@ static TERM_COLOR mh_attr(int max)
  * @param type 魔法属性
  * @return 対応する色ID
  */
-static TERM_COLOR spell_color(EFFECT_ID type)
+static TERM_COLOR spell_color(spell_type type)
 {
        /* Check if A.B.'s new graphics should be used (rr9) */
        if (streq(ANGBAND_GRAF, "new") || streq(ANGBAND_GRAF, "ne2"))
@@ -525,7 +525,7 @@ static TERM_COLOR spell_color(EFFECT_ID type)
  * If the distance is not "one", we (may) return "*".
  * </pre>
  */
-u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ)
+u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, spell_type typ)
 {
        int base;
 
index 73a7194..f2e6fa6 100644 (file)
@@ -31,4 +31,4 @@ extern byte angband_color_table[256][4];
 extern TERM_COLOR gf_color[MAX_GF];
 extern TERM_COLOR color_char_to_attr(SYMBOL_CODE c);
 
-u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
+u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, spell_type typ);