OSDN Git Service

[Refactor] #37353 'if 0' のプリプロを削除 / Removed pre-processor 'if 0'
[hengband/hengband.git] / src / monster-spell.h
index de95c04..0363620 100644 (file)
@@ -14,6 +14,33 @@ struct monster_power
        concptr    name;
 };
 
+/* Spell Type flag */
+#define MONSTER_TO_PLAYER     0x01
+#define MONSTER_TO_MONSTER    0x02
+
+/* summoning number */
+#define S_NUM_6     (easy_band ? 2 : 6)
+#define S_NUM_4     (easy_band ? 1 : 4)
+
+/* monster spell number */
+#define RF4_SPELL_START 32 * 3
+#define RF5_SPELL_START 32 * 4
+#define RF6_SPELL_START 32 * 5
+
+#define RF4_SPELL_SIZE 32
+#define RF5_SPELL_SIZE 32
+#define RF6_SPELL_SIZE 32
+
+/* Spell Damage Calc Flag*/
+#define DAM_ROLL 1
+#define DAM_MAX 2
+#define DAM_MIN 3
+#define DICE_NUM 4
+#define DICE_SIDE 5
+#define DICE_MULT 6
+#define DICE_DIV 7
+#define BASE_DAM 8
+
 #define MAX_MONSPELLS 96
 #define MONSPELL_TYPE_BOLT 1
 #define MONSPELL_TYPE_BALL 2
@@ -279,29 +306,29 @@ extern const monster_power monster_powers[MAX_MONSPELLS];
 extern const concptr monster_powers_short[MAX_MONSPELLS];
 
 /* mspells1.c */
-extern bool clean_shot(POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend);
-extern bool summon_possible(POSITION y1, POSITION x1);
-extern bool raise_possible(monster_type *m_ptr);
-extern bool dispel_check(MONSTER_IDX m_idx);
+extern bool clean_shot(player_type *target_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend);
+extern bool summon_possible(player_type *target_ptr, POSITION y1, POSITION x1);
+extern bool raise_possible(player_type *target_ptr, monster_type *m_ptr);
+extern bool dispel_check(player_type *creature_ptr, MONSTER_IDX m_idx);
 extern bool spell_is_inate(SPELL_IDX spell);
-extern bool make_attack_spell(MONSTER_IDX m_idx);
-extern void beam(MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type);
-extern void bolt(MONSTER_IDX m_idx, POSITION y, POSITION x, EFFECT_ID typ, int dam_hp, int monspell, int target_type);
-extern void breath(POSITION y, POSITION x, MONSTER_IDX m_idx, EFFECT_ID typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type);
+extern bool make_attack_spell(MONSTER_IDX m_idx, player_type *target_ptr);
+extern 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);
+extern 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);
+extern 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);
 
 /* mspells2.c */
-extern void get_project_point(POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg);
-extern bool monst_spell_monst(MONSTER_IDX m_idx);
+extern void get_project_point(player_type *target_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg);
+extern bool monst_spell_monst(player_type *target_ptr, MONSTER_IDX m_idx);
 
 /* mspells3.c */
-extern bool do_cmd_cast_learned(void);
-extern void learn_spell(int monspell);
+extern bool do_cmd_cast_learned(player_type *caster_ptr);
+extern void learn_spell(player_type *learner_ptr, int monspell);
 extern void set_rf_masks(BIT_FLAGS *f4, BIT_FLAGS *f5, BIT_FLAGS *f6, BIT_FLAGS mode);
 
 /* mspells4.c */
-extern bool spell_learnable(MONSTER_IDX m_idx);
-extern HIT_POINT monspell_to_player(int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx);
-extern HIT_POINT monspell_to_monster(int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
-extern HIT_POINT monspell_damage(int SPELL_NUM, MONSTER_IDX m_idx, int TYPE);
-extern HIT_POINT monspell_race_damage(int SPELL_NUM, MONRACE_IDX r_idx, int TYPE);
-extern HIT_POINT monspell_bluemage_damage(int SPELL_NUM, PLAYER_LEVEL plev, int TYPE);
+extern bool spell_learnable(player_type *target_ptr, MONSTER_IDX m_idx);
+extern HIT_POINT monspell_to_player(int SPELL_NUM, player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx);
+extern HIT_POINT monspell_to_monster(player_type *target_ptr, int SPELL_NUM, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
+extern HIT_POINT monspell_damage(player_type *target_ptr, int SPELL_NUM, MONSTER_IDX m_idx, int TYPE);
+extern HIT_POINT monspell_race_damage(player_type *target_ptr, int SPELL_NUM, MONRACE_IDX r_idx, int TYPE);
+extern HIT_POINT monspell_bluemage_damage(player_type *target_ptr, int SPELL_NUM, PLAYER_LEVEL plev, int TYPE);