OSDN Git Service

[Refactor] #38997 identify_fully() にplayer_type * 引数を追加 / Added player_type * argumen...
[hengband/hengband.git] / src / spells.h
1 #pragma once
2 #include "realm.h"
3
4 #define DETECT_RAD_DEFAULT 30
5 #define DETECT_RAD_MAP     30
6 #define DETECT_RAD_ALL     255
7
8 #define SPOP_DISPLAY_MES    0x0001 // !< スペル処理オプション … メッセージを表示する
9 #define SPOP_NO_UPDATE      0x0002 // !< スペル処理オプション … ステータス更新を解決後行う
10 #define SPOP_DEBUG          0x8000 // !< スペル処理オプション … デバッグ処理あり
11
12 /*
13  * Spell types used by project(), and related functions.
14  */
15 #define GF_ELEC         1                       /*!< 魔法効果: 電撃*/
16 #define GF_POIS         2                       /*!< 魔法効果: 毒*/
17 #define GF_ACID         3                       /*!< 魔法効果: 酸*/
18 #define GF_COLD         4                       /*!< 魔法効果: 冷気*/
19 #define GF_FIRE         5                       /*!< 魔法効果: 火炎*/
20 #define GF_PSY_SPEAR    9                       /*!< 魔法効果: 光の剣*/
21 #define GF_MISSILE      10                      /*!< 魔法効果: 弱魔力*/
22 #define GF_ARROW        11                      /*!< 魔法効果: 射撃*/
23 #define GF_PLASMA       12                      /*!< 魔法効果: プラズマ*/
24  /* Replaced with GF_HOLY_FIRE and GF_HELL_FIRE */
25  /* #define GF_HOLY_ORB     13 */
26 #define GF_WATER        14                      /*!< 魔法効果: 水流*/
27 #define GF_LITE         15                      /*!< 魔法効果: 閃光*/
28 #define GF_DARK         16                      /*!< 魔法効果: 暗黒*/
29 #define GF_LITE_WEAK    17                      /*!< 魔法効果: 弱光*/
30 #define GF_DARK_WEAK    18                      /*!< 魔法効果: 弱暗*/
31 #define GF_SHARDS       20                      /*!< 魔法効果: 破片*/
32 #define GF_SOUND        21                      /*!< 魔法効果: 轟音*/
33 #define GF_CONFUSION    22                      /*!< 魔法効果: 混乱*/
34 #define GF_FORCE        23                      /*!< 魔法効果: フォース*/
35 #define GF_INERTIAL     24                      /*!< 魔法効果: 遅鈍*/
36 #define GF_MANA         26                      /*!< 魔法効果: 純粋魔力*/
37 #define GF_METEOR       27                      /*!< 魔法効果: 隕石*/
38 #define GF_ICE          28                      /*!< 魔法効果: 極寒*/
39 #define GF_CHAOS        30                      /*!< 魔法効果: カオス*/
40 #define GF_NETHER       31                      /*!< 魔法効果: 地獄*/
41 #define GF_DISENCHANT   32                      /*!< 魔法効果: 劣化*/
42 #define GF_NEXUS        33                      /*!< 魔法効果: 因果混乱*/
43 #define GF_TIME         34                      /*!< 魔法効果: 時間逆転*/
44 #define GF_GRAVITY      35                      /*!< 魔法効果: 重力*/
45 #define GF_KILL_WALL    40                      /*!< 魔法効果: 岩石溶解*/
46 #define GF_KILL_DOOR    41                      /*!< 魔法効果: ドア破壊*/
47 #define GF_KILL_TRAP    42                      /*!< 魔法効果: トラップ破壊*/
48 #define GF_MAKE_WALL    45                      /*!< 魔法効果: 壁生成*/
49 #define GF_MAKE_DOOR    46                      /*!< 魔法効果: ドア生成*/
50 #define GF_MAKE_TRAP    47                      /*!< 魔法効果: トラップ生成*/
51 #define GF_MAKE_TREE    48                      /*!< 魔法効果: 森林生成*/
52 #define GF_OLD_CLONE    51                      /*!< 魔法効果: クローン・モンスター*/
53 #define GF_OLD_POLY     52                      /*!< 魔法効果: チェンジ・モンスター*/
54 #define GF_OLD_HEAL     53                      /*!< 魔法効果: 回復モンスター*/
55 #define GF_OLD_SPEED    54                      /*!< 魔法効果: スピード・モンスター*/
56 #define GF_OLD_SLOW     55                      /*!< 魔法効果: スロウ・モンスター*/
57 #define GF_OLD_CONF     56                      /*!< 魔法効果: パニック・モンスター*/
58 #define GF_OLD_SLEEP    57                      /*!< 魔法効果: スリープ・モンスター*/
59 #define GF_HYPODYNAMIA  58                      /*!< 魔法効果: 衰弱*/
60 #define GF_AWAY_UNDEAD  61                      /*!< 魔法効果: アンデッド・アウェイ*/
61 #define GF_AWAY_EVIL    62                      /*!< 魔法効果: 邪悪飛ばし*/
62 #define GF_AWAY_ALL     63                      /*!< 魔法効果: テレポート・アウェイ*/
63 #define GF_TURN_UNDEAD  64                      /*!< 魔法効果: アンデッド恐慌*/
64 #define GF_TURN_EVIL    65                      /*!< 魔法効果: 邪悪恐慌*/
65 #define GF_TURN_ALL     66                      /*!< 魔法効果: モンスター恐慌*/
66 #define GF_DISP_UNDEAD  67                      /*!< 魔法効果: アンデッド退散*/
67 #define GF_DISP_EVIL    68                      /*!< 魔法効果: 邪悪退散*/
68 #define GF_DISP_ALL     69                      /*!< 魔法効果: モンスター退散*/
69 /* New types for Zangband begin here... */
70 #define GF_DISP_DEMON      70           /*!< 魔法効果: 悪魔退散*/
71 #define GF_DISP_LIVING     71           /*!< 魔法効果: 生命退散*/
72 #define GF_ROCKET          72           /*!< 魔法効果: ロケット*/
73 #define GF_NUKE            73           /*!< 魔法効果: 放射性廃棄物*/
74 #define GF_MAKE_GLYPH      74           /*!< 魔法効果: 守りのルーン生成*/
75 #define GF_STASIS          75           /*!< 魔法効果: モンスター拘束*/
76 #define GF_STONE_WALL      76           /*!< 魔法効果: 壁生成*/
77 #define GF_DEATH_RAY       77           /*!< 魔法効果: 死の光線*/
78 #define GF_STUN            78           /*!< 魔法効果: 朦朧*/
79 #define GF_HOLY_FIRE       79           /*!< 魔法効果: 聖光*/
80 #define GF_HELL_FIRE       80           /*!< 魔法効果: 地獄の劫火*/
81 #define GF_DISINTEGRATE    81           /*!< 魔法効果: 分解*/
82 #define GF_CHARM           82           /*!< 魔法効果: モンスター魅了*/
83 #define GF_CONTROL_UNDEAD  83           /*!< 魔法効果: アンデッド支配*/
84 #define GF_CONTROL_ANIMAL  84           /*!< 魔法効果: 動物支配*/
85 #define GF_PSI             85           /*!< 魔法効果: サイキック攻撃*/
86 #define GF_PSI_DRAIN       86           /*!< 魔法効果: 精神吸収*/
87 #define GF_TELEKINESIS     87           /*!< 魔法効果: テレキシネス*/
88 #define GF_JAM_DOOR        88           /*!< 魔法効果: 施錠*/
89 #define GF_DOMINATION      89           /*!< 魔法効果: 精神支配*/
90 #define GF_DISP_GOOD       90           /*!< 魔法効果: 善良退散*/
91 #define GF_DRAIN_MANA      91           /*!< 魔法効果: 魔力吸収*/
92 #define GF_MIND_BLAST      92           /*!< 魔法効果: 精神攻撃*/
93 #define GF_BRAIN_SMASH     93           /*!< 魔法効果: 脳攻撃*/
94 #define GF_CAUSE_1         94           /*!< 魔法効果: 軽傷の呪い*/
95 #define GF_CAUSE_2         95           /*!< 魔法効果: 重傷の呪い*/
96 #define GF_CAUSE_3         96           /*!< 魔法効果: 致命傷の呪い*/
97 #define GF_CAUSE_4         97           /*!< 魔法効果: 秘孔を突く*/
98 #define GF_HAND_DOOM       98           /*!< 魔法効果: 破滅の手*/
99 #define GF_CAPTURE         99           /*!< 魔法効果: 捕縛*/
100 #define GF_ANIM_DEAD      100           /*!< 魔法効果: 死者復活*/
101 #define GF_CHARM_LIVING   101           /*!< 魔法効果: 生命魅了*/
102 #define GF_IDENTIFY       102           /*!< 魔法効果: 鑑定*/
103 #define GF_ATTACK         103           /*!< 魔法効果: 白兵*/
104 #define GF_ENGETSU        104           /*!< 魔法効果: 円月*/
105 #define GF_GENOCIDE       105           /*!< 魔法効果: 抹殺*/
106 #define GF_PHOTO          106           /*!< 魔法効果: 撮影*/
107 #define GF_CONTROL_DEMON  107           /*!< 魔法効果: 悪魔支配*/
108 #define GF_LAVA_FLOW      108           /*!< 魔法効果: 溶岩噴出*/
109 #define GF_BLOOD_CURSE    109           /*!< 魔法効果: 血の呪い*/
110 #define GF_SEEKER         110           /*!< 魔法効果: シーカーレイ*/
111 #define GF_SUPER_RAY      111           /*!< 魔法効果: スーパーレイ*/
112 #define GF_STAR_HEAL      112           /*!< 魔法効果: 星の癒し*/
113 #define GF_WATER_FLOW     113           /*!< 魔法効果: 流水*/
114 #define GF_CRUSADE        114           /*!< 魔法効果: 聖戦*/
115 #define GF_STASIS_EVIL    115           /*!< 魔法効果: 邪悪拘束*/
116 #define GF_WOUNDS         116           /*!< 魔法効果: 創傷*/
117
118 #define MAX_GF         117
119
120 /*
121  * The "name" of spell 'N' is stored as spell_names[X][N],
122  * where X is 0 for mage-spells and 1 for priest-spells.
123  */
124 typedef struct magic_type magic_type;
125
126 struct magic_type
127 {
128         PLAYER_LEVEL slevel;    /* Required level (to learn) */
129         MANA_POINT smana;               /* Required mana (to cast) */
130         PERCENTAGE sfail;               /* Minimum chance of failure */
131         EXP sexp;                               /* Encoded experience bonus */
132 };
133
134 extern int cap_mon;
135 extern int cap_mspeed;
136 extern HIT_POINT cap_hp;
137 extern HIT_POINT cap_maxhp;
138 extern STR_OFFSET cap_nickname;
139 extern bool sukekaku;
140
141 extern const magic_type technic_info[NUM_TECHNIC][32];
142
143 /* spells1.c */
144 extern bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
145 extern void breath_shape(floor_type *floor_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);
146 extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
147
148 #define PROJECT_WHO_UNCTRL_POWER -1 /*!< 魔法効果の自然発生要因: 名状し難い力の解放 */
149 #define PROJECT_WHO_GLASS_SHARDS -2 /*!< 魔法効果の自然発生要因: 破壊されたガラス地形の破片 */
150 extern bool project(player_type *caster_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
151
152 extern int project_length;
153 extern bool binding_field(player_type *caster_ptr, HIT_POINT dam);
154 extern void seal_of_mirror(player_type *caster_ptr, HIT_POINT dam);
155 extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
156
157 /* spells2.c */
158 extern bool detect_traps(player_type *caster_ptr, POSITION range, bool known);
159 extern bool detect_doors(player_type *caster_ptr, POSITION range);
160 extern bool detect_stairs(player_type *caster_ptr, POSITION range);
161 extern bool detect_treasure(player_type *caster_ptr, POSITION range);
162 extern bool detect_objects_gold(player_type *caster_ptr, POSITION range);
163 extern bool detect_objects_normal(player_type *caster_ptr, POSITION range);
164 extern bool detect_objects_magic(player_type *caster_ptr, POSITION range);
165 extern bool detect_monsters_normal(player_type *caster_ptr, POSITION range);
166 extern bool detect_monsters_invis(player_type *caster_ptr, POSITION range);
167 extern bool detect_monsters_evil(player_type *caster_ptr, POSITION range);
168 extern bool detect_monsters_xxx(player_type *caster_ptr, POSITION range, u32b match_flag);
169 extern bool detect_monsters_string(player_type *caster_ptr, POSITION range, concptr);
170 extern bool detect_monsters_nonliving(player_type *caster_ptr, POSITION range);
171 extern bool detect_monsters_mind(player_type *caster_ptr, POSITION range);
172 extern bool detect_all(player_type *caster_ptr, POSITION range);
173 extern bool wall_stone(player_type *caster_ptr);
174 extern bool speed_monsters(player_type *caster_ptr);
175 extern bool slow_monsters(player_type *caster_ptr, int power);
176 extern bool sleep_monsters(player_type *caster_ptr, int power);
177 extern void aggravate_monsters(player_type *caster_ptr, MONSTER_IDX who);
178 extern bool genocide_aux(player_type *caster_ptr, MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
179 extern bool symbol_genocide(player_type *caster_ptr, int power, bool player_cast);
180 extern bool mass_genocide(player_type *caster_ptr, int power, bool player_cast);
181 extern bool mass_genocide_undead(player_type *caster_ptr, int power, bool player_cast);
182 extern bool probing(player_type *caster_ptr);
183 extern bool banish_evil(player_type *caster_ptr, int dist);
184 extern bool dispel_evil(player_type *caster_ptr, HIT_POINT dam);
185 extern bool dispel_good(player_type *caster_ptr, HIT_POINT dam);
186 extern bool dispel_undead(player_type *caster_ptr, HIT_POINT dam);
187 extern bool dispel_monsters(player_type *caster_ptr, HIT_POINT dam);
188 extern bool dispel_living(player_type *caster_ptr, HIT_POINT dam);
189 extern bool dispel_demons(player_type *caster_ptr, HIT_POINT dam);
190 extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
191 extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
192 extern bool crusade(player_type *caster_ptr);
193 extern bool turn_undead(player_type *caster_ptr);
194 extern void lite_room(player_type *caster_ptr, POSITION y1, POSITION x1);
195 extern bool starlight(player_type *caster_ptr, bool magic);
196 extern void unlite_room(player_type *caster_ptr, POSITION y1, POSITION x1);
197 extern bool lite_area(player_type *caster_ptr, HIT_POINT dam, POSITION rad);
198 extern bool unlite_area(player_type *caster_ptr, HIT_POINT dam, POSITION rad);
199 extern bool fire_ball(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
200 extern bool fire_breath(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
201 extern bool fire_rocket(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
202 extern bool fire_ball_hide(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
203 extern bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
204 extern bool fire_bolt(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
205 extern bool fire_blast(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
206 extern void call_chaos(player_type *caster_ptr);
207 extern bool fire_beam(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
208 extern bool fire_bolt_or_beam(player_type *caster_ptr, PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
209 extern bool lite_line(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam);
210 extern bool hypodynamic_bolt(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam);
211 extern bool death_ray(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
212 extern bool wall_to_mud(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam);
213 extern bool destroy_door(player_type *caster_ptr, DIRECTION dir);
214 extern bool disarm_trap(player_type *caster_ptr, DIRECTION dir);
215 extern bool wizard_lock(player_type *caster_ptr, DIRECTION dir);
216 extern bool teleport_monster(player_type *caster_ptr, DIRECTION dir, int distance);
217 extern bool door_creation(player_type *caster_ptr, POSITION y, POSITION x);
218 extern bool trap_creation(player_type *caster_ptr, POSITION y, POSITION x);
219 extern bool tree_creation(player_type *caster_ptr, POSITION y, POSITION x);
220 extern bool glyph_creation(player_type *caster_ptr, POSITION y, POSITION x);
221 extern bool destroy_doors_touch(player_type *caster_ptr);
222 extern bool disarm_traps_touch(player_type *caster_ptr);
223 extern bool animate_dead(player_type *caster_ptr, MONSTER_IDX who, POSITION y, POSITION x);
224 extern bool sleep_monsters_touch(player_type *caster_ptr);
225 extern bool activate_ty_curse(player_type *target_ptr, bool stop_ty, int *count);
226 extern int activate_hi_summon(player_type *caster_ptr, POSITION y, POSITION x, bool can_pet);
227 extern void wall_breaker(player_type *caster_ptr);
228 extern bool confuse_monsters(player_type *caster_ptr, HIT_POINT dam);
229 extern bool charm_monsters(player_type *caster_ptr, HIT_POINT dam);
230 extern bool charm_animals(player_type *caster_ptr, HIT_POINT dam);
231 extern bool stun_monsters(player_type *caster_ptr, HIT_POINT dam);
232 extern bool stasis_monsters(player_type *caster_ptr, HIT_POINT dam);
233 extern bool banish_monsters(player_type *caster_ptr, int dist);
234 extern bool turn_monsters(player_type *caster_ptr, HIT_POINT dam);
235 extern bool turn_evil(player_type *caster_ptr, HIT_POINT dam);
236 extern bool deathray_monsters(player_type *caster_ptr);
237 extern bool charm_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
238 extern bool control_one_undead(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
239 extern bool control_one_demon(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
240 extern bool charm_animal(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
241 extern bool mindblast_monsters(player_type *caster_ptr, HIT_POINT dam);
242 extern bool teleport_swap(player_type *caster_ptr, DIRECTION dir);
243 extern bool project_hook(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
244 extern bool project_all_los(player_type *caster_ptr, EFFECT_ID typ, HIT_POINT dam);
245 extern bool eat_magic(player_type *caster_ptr, int power);
246 extern void discharge_minion(player_type *caster_ptr);
247 extern bool kawarimi(player_type *caster_ptr, bool success);
248 extern bool rush_attack(player_type *attacker_ptr, bool *mdeath);
249 extern void remove_all_mirrors(player_type *caster_ptr, bool explode);
250 extern void ring_of_power(player_type *caster_ptr, DIRECTION dir);
251 extern void wild_magic(player_type *caster_ptr, int spell);
252 extern void cast_meteor(player_type *caster_ptr, HIT_POINT dam, POSITION rad);
253 extern bool cast_wrath_of_the_god(player_type *caster_ptr, HIT_POINT dam, POSITION rad);
254 extern void cast_wonder(player_type *caster_ptr, DIRECTION dir);
255 extern void cast_invoke_spirits(player_type *caster_ptr, DIRECTION dir);
256 extern void cast_shuffle(player_type *caster_ptr);
257 extern void stop_mouth(player_type *caster_ptr);
258 extern bool_hack vampirism(player_type *caster_ptr);
259 extern bool hit_and_away(player_type *caster_ptr);
260 extern bool psychometry(player_type *caster_ptr);
261 extern bool draconian_breath(player_type *creature_ptr);
262 extern bool android_inside_weapon(player_type *creature_ptr);
263 extern bool create_ration(player_type *crature_ptr);
264 extern void hayagake(player_type *creature_ptr);
265 extern bool double_attack(player_type *creature_ptr);
266 extern bool comvert_hp_to_mp(player_type *creature_ptr);
267 extern bool comvert_mp_to_hp(player_type *creature_ptr);
268 extern bool demonic_breath(player_type *creature_ptr);
269 extern bool mirror_concentration(player_type *creature_ptr);
270 extern bool sword_dancing(player_type *creature_ptr);
271 extern bool confusing_light(player_type *creature_ptr);
272 extern bool rodeo(player_type *creature_ptr);
273 extern bool clear_mind(player_type *creature_ptr);
274 extern bool concentration(player_type *creature_ptr);
275 extern bool vanish_dungeon(player_type *caster_ptr);
276
277 /*
278  * Bit flags for teleportation
279  */
280 #define TELEPORT_NONMAGICAL 0x00000001
281 #define TELEPORT_PASSIVE    0x00000002
282 #define TELEPORT_DEC_VALOUR 0x00000004
283
284 /* spells3.c */
285 extern bool teleport_away(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode);
286 extern void teleport_monster_to(player_type *caster_ptr, MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode);
287 extern bool teleport_player_aux(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode);
288 extern void teleport_player(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode);
289 extern void teleport_player_away(MONSTER_IDX m_idx, player_type *target_ptr, POSITION dis);
290 extern void teleport_player_to(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mode);
291 extern void teleport_away_followable(player_type *creature_ptr, MONSTER_IDX m_idx);
292 extern bool teleport_level_other(player_type *caster_ptr);
293 extern void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx);
294 extern bool recall_player(player_type *creature_ptr, TIME_EFFECT turns);
295 extern bool free_level_recall(player_type *creature_ptr);
296 extern bool reset_recall(player_type *caster_ptr);
297 extern bool apply_disenchant(player_type *target_ptr, BIT_FLAGS mode);
298 extern void call_the_void(player_type *caster_ptr);
299 extern void fetch(player_type *caster_ptr, DIRECTION dir, WEIGHT wgt, bool require_los);
300 extern void reserve_alter_reality(player_type *caster_ptr);
301 extern void identify_pack(player_type *target_ptr);
302 extern int remove_curse(player_type *caster_ptr);
303 extern int remove_all_curse(player_type *caster_ptr);
304 extern bool alchemy(player_type *caster_ptr);
305
306 extern bool artifact_scroll(player_type *caster_ptr);
307 extern bool ident_spell(player_type *caster_ptr, bool only_equip);
308 extern bool mundane_spell(player_type *ownner_ptr, bool only_equip);
309 extern bool identify_item(player_type *owner_ptr, object_type *o_ptr);
310 extern bool identify_fully(player_type *caster_ptr, bool only_equip);
311 extern bool recharge(player_type *caster_ptr, int power);
312 extern void display_spell_list(player_type *caster_ptr);
313 extern EXP experience_of_spell(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX use_realm);
314 extern MANA_POINT mod_need_mana(MANA_POINT need_mana, SPELL_IDX spell, REALM_IDX realm);
315 extern PERCENTAGE mod_spell_chance_1(player_type *caster_ptr, PERCENTAGE chance);
316 extern PERCENTAGE mod_spell_chance_2(player_type *caster_ptr, PERCENTAGE chance);
317 extern PERCENTAGE spell_chance(player_type *caster_ptr, SPELL_IDX spell, REALM_IDX realm);
318 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);
319 extern bool polymorph_monster(player_type *caster_ptr, POSITION y, POSITION x);
320 extern bool dimension_door(void);
321 extern bool mirror_tunnel(void);
322 extern void massacre(player_type *caster_ptr);
323 extern bool eat_lock(player_type *caster_ptr);
324 extern bool shock_power(player_type *caster_ptr);
325 extern bool booze(player_type *creature_ptr);
326 extern bool detonation(player_type *creature_ptr);
327 extern void blood_curse_to_enemy(player_type *caster_ptr, MONSTER_IDX m_idx);
328 extern bool fire_crimson(player_type *shooter_ptr);
329 extern bool tele_town(player_type *caster_ptr);
330 extern int project_length;
331
332 /* Is "teleport level" ineffective to this target? */
333 #define TELE_LEVEL_IS_INEFF(TARGET) \
334         (p_ptr->current_floor_ptr->inside_arena || p_ptr->phase_out || \
335          (p_ptr->current_floor_ptr->inside_quest && !random_quest_number(p_ptr->current_floor_ptr->dun_level)) || \
336          (((TARGET) <= 0) && (quest_number(p_ptr->current_floor_ptr->dun_level) || (p_ptr->current_floor_ptr->dun_level >= d_info[p_ptr->dungeon_idx].maxdepth)) && \
337           (p_ptr->current_floor_ptr->dun_level >= 1) && ironman_downward))