3 * @brief モンスター魔法の実装(対モンスター処理) / Monster spells (attack monster)
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
7 * This software may be copied and distributed for educational, research,\n
8 * and not for profit purposes provided that this copyright and statement\n
9 * are included in all such copies. Other copyrights may also apply.\n
10 * 2014 Deskull rearranged comment for Doxygen.\n
21 #include "realm-hex.h"
22 #include "player-move.h"
23 #include "player-class.h"
25 #include "monster-status.h"
26 #include "monster-spell.h"
30 #include "view-mainwindow.h"
33 * @brief モンスターが敵対モンスターにビームを当てること可能かを判定する /
34 * Determine if a beam spell will hit the target.
39 * @param m_ptr 使用するモンスターの構造体参照ポインタ
40 * @return ビームが到達可能ならばTRUEを返す
42 static bool direct_beam(POSITION y1, POSITION x1, POSITION y2, POSITION x2, monster_type *m_ptr)
51 bool is_friend = is_pet(m_ptr);
53 /* Check the projection path */
54 grid_n = project_path(p_ptr->current_floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, PROJECT_THRU);
56 /* No grid is ever projectable from itself */
57 if (!grid_n) return (FALSE);
59 for (i = 0; i < grid_n; i++)
61 y = GRID_Y(grid_g[i]);
62 x = GRID_X(grid_g[i]);
64 if (y == y2 && x == x2)
66 else if (is_friend && p_ptr->current_floor_ptr->grid_array[y][x].m_idx > 0 &&
67 !are_enemies(m_ptr, &p_ptr->current_floor_ptr->m_list[p_ptr->current_floor_ptr->grid_array[y][x].m_idx]))
69 /* Friends don't shoot friends */
73 if (is_friend && player_bold(p_ptr, y, x))
83 * @brief モンスターが敵対モンスターに直接ブレスを当てることが可能かを判定する /
84 * Determine if a breath will hit the target.
91 * @param is_friend TRUEならば、プレイヤーを巻き込む時にブレスの判定をFALSEにする。
92 * @return ブレスを直接当てられるならばTRUEを返す
94 static bool breath_direct(player_type *master_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, EFFECT_ID typ, bool is_friend)
96 /* Must be the same as projectable() */
108 POSITION gx[1024], gy[1024];
110 POSITION gm_rad = rad;
123 case GF_DISINTEGRATE:
131 /* Check the projection path */
132 grid_n = project_path(master_ptr->current_floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, flg);
134 /* Project along the path */
135 for (i = 0; i < grid_n; ++i)
137 int ny = GRID_Y(grid_g[i]);
138 int nx = GRID_X(grid_g[i]);
140 if (flg & PROJECT_DISI)
142 /* Hack -- Balls explode before reaching walls */
143 if (cave_stop_disintegration(master_ptr->current_floor_ptr, ny, nx)) break;
145 else if (flg & PROJECT_LOS)
147 /* Hack -- Balls explode before reaching walls */
148 if (!cave_los_bold(master_ptr->current_floor_ptr, ny, nx)) break;
152 /* Hack -- Balls explode before reaching walls */
153 if (!cave_have_flag_bold(master_ptr->current_floor_ptr, ny, nx, FF_PROJECT)) break;
156 /* Save the "blast epicenter" */
165 if (flg & PROJECT_DISI)
167 if (in_disintegration_range(master_ptr->current_floor_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
168 if (in_disintegration_range(master_ptr->current_floor_ptr, y1, x1, master_ptr->y, master_ptr->x) && (distance(y1, x1, master_ptr->y, master_ptr->x) <= rad)) hityou = TRUE;
170 else if (flg & PROJECT_LOS)
172 if (los(master_ptr->current_floor_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
173 if (los(master_ptr->current_floor_ptr, y1, x1, master_ptr->y, master_ptr->x) && (distance(y1, x1, master_ptr->y, master_ptr->x) <= rad)) hityou = TRUE;
177 if (projectable(master_ptr->current_floor_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
178 if (projectable(master_ptr->current_floor_ptr, y1, x1, master_ptr->y, master_ptr->x) && (distance(y1, x1, master_ptr->y, master_ptr->x) <= rad)) hityou = TRUE;
183 breath_shape(master_ptr->current_floor_ptr, grid_g, grid_n, &grids, gx, gy, gm, &gm_rad, rad, y1, x1, y, x, typ);
185 for (i = 0; i < grids; i++)
189 if ((y == y2) && (x == x2)) hit2 = TRUE;
190 if (player_bold(master_ptr, y, x)) hityou = TRUE;
194 if (!hit2) return FALSE;
195 if (is_friend && hityou) return FALSE;
202 * @brief モンスターが特殊能力の目標地点を決める処理 /
203 * Get the actual center point of ball spells (rad > 1) (originally from TOband)
206 * @param ty 目標Y座標を返す参照ポインタ
207 * @param tx 目標X座標を返す参照ポインタ
208 * @param flg 判定のフラグ配列
211 void get_project_point(floor_type *floor_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg)
216 path_n = project_path(floor_ptr, path_g, MAX_RANGE, sy, sx, *ty, *tx, flg);
221 /* Project along the path */
222 for (i = 0; i < path_n; i++)
224 sy = GRID_Y(path_g[i]);
225 sx = GRID_X(path_g[i]);
227 /* Hack -- Balls explode before reaching walls */
228 if (!cave_have_flag_bold(floor_ptr, sy, sx, FF_PROJECT)) break;
237 * @brief モンスターが敵モンスターに魔力消去を使うかどうかを返す /
238 * Check should monster cast dispel spell at other monster.
239 * @param m_idx 術者のモンスターID
240 * @param t_idx 目標のモンスターID
241 * @return 魔力消去を使うべきならばTRUEを変えす。
243 static bool dispel_check_monster(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
245 monster_type *t_ptr = &p_ptr->current_floor_ptr->m_list[t_idx];
247 if (MON_INVULNER(t_ptr)) return TRUE;
249 if (t_ptr->mspeed < 135)
251 if (MON_FAST(t_ptr)) return TRUE;
255 if (t_idx == p_ptr->riding)
257 if (dispel_check(p_ptr, m_idx)) return TRUE;
260 /* No need to cast dispel spell */
266 * todo モンスターからモンスターへの呪文なのにplayer_typeが引数になり得るのは間違っている……
267 * @brief モンスターが敵モンスターに特殊能力を使う処理のメインルーチン /
268 * Monster tries to 'cast a spell' (or breath, etc) at another monster.
269 * @param target_ptr プレーヤーへの参照ポインタ
270 * @param m_idx 術者のモンスターID
271 * @return 実際に特殊能力を使った場合TRUEを返す
273 * The player is only disturbed if able to be affected by the spell.
275 bool monst_spell_monst(player_type *target_ptr, MONSTER_IDX m_idx)
277 POSITION y = 0, x = 0;
279 MONSTER_IDX target_idx = 0;
285 byte spell[96], num = 0;
287 GAME_TEXT m_name[160];
288 GAME_TEXT t_name[160];
294 floor_type *floor_ptr = target_ptr->current_floor_ptr;
295 monster_type *m_ptr = &floor_ptr->m_list[m_idx];
296 monster_type *t_ptr = NULL;
298 monster_race *r_ptr = &r_info[m_ptr->r_idx];
302 bool see_m = is_seen(m_ptr);
303 bool maneable = player_has_los_bold(target_ptr, m_ptr->fy, m_ptr->fx);
304 bool pet = is_pet(m_ptr);
306 bool in_no_magic_dungeon = (d_info[target_ptr->dungeon_idx].flags1 & DF1_NO_MAGIC) && floor_ptr->dun_level
307 && (!floor_ptr->inside_quest || is_fixed_quest_idx(floor_ptr->inside_quest));
309 bool can_use_lite_area = FALSE;
312 /* Cannot cast spells when confused */
313 if (MON_CONFUSED(m_ptr)) return (FALSE);
315 /* Extract the racial spell flags */
317 f5 = r_ptr->a_ability_flags1;
318 f6 = r_ptr->a_ability_flags2;
320 /* Target is given for pet? */
321 if (target_ptr->pet_t_m_idx && pet)
323 target_idx = target_ptr->pet_t_m_idx;
324 t_ptr = &floor_ptr->m_list[target_idx];
326 /* Cancel if not projectable (for now) */
327 if ((m_idx == target_idx) || !projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
333 /* Is there counter attack target? */
334 if (!target_idx && m_ptr->target_y)
336 target_idx = floor_ptr->grid_array[m_ptr->target_y][m_ptr->target_x].m_idx;
340 t_ptr = &floor_ptr->m_list[target_idx];
342 /* Cancel if neither enemy nor a given target */
343 if ((m_idx == target_idx) ||
344 ((target_idx != target_ptr->pet_t_m_idx) && !are_enemies(m_ptr, t_ptr)))
349 /* Allow only summoning etc.. if not projectable */
350 else if (!projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
352 f4 &= (RF4_INDIRECT_MASK);
353 f5 &= (RF5_INDIRECT_MASK);
354 f6 &= (RF6_INDIRECT_MASK);
359 /* Look for enemies normally */
362 bool success = FALSE;
364 if (target_ptr->phase_out)
366 start = randint1(floor_ptr->m_max-1) + floor_ptr->m_max;
367 if (randint0(2)) plus = -1;
369 else start = floor_ptr->m_max + 1;
371 /* Scan thru all monsters */
372 for (i = start; ((i < start + floor_ptr->m_max) && (i > start - floor_ptr->m_max)); i += plus)
374 MONSTER_IDX dummy = (i % floor_ptr->m_max);
375 if (!dummy) continue;
378 t_ptr = &floor_ptr->m_list[target_idx];
380 if (!monster_is_valid(t_ptr)) continue;
382 /* Monster must be 'an enemy' */
383 if ((m_idx == target_idx) || !are_enemies(m_ptr, t_ptr)) continue;
385 /* Monster must be projectable */
386 if (!projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
394 if (!success) return FALSE;
397 /* OK -- we've got a target */
401 /* Forget old counter attack target */
404 /* Remove unimplemented spells */
405 f6 &= ~(RF6_WORLD | RF6_TRAPS | RF6_FORGET);
407 if (f4 & RF4_BR_LITE)
409 if (!los(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
410 f4 &= ~(RF4_BR_LITE);
413 /* Remove unimplemented special moves */
414 if (f6 & RF6_SPECIAL)
416 if ((m_ptr->r_idx != MON_ROLENTO) && (r_ptr->d_char != 'B'))
417 f6 &= ~(RF6_SPECIAL);
420 if (f6 & RF6_DARKNESS)
422 bool vs_ninja = (target_ptr->pclass == CLASS_NINJA) && !is_hostile(t_ptr);
425 !(r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) &&
426 !(r_ptr->flags7 & RF7_DARK_MASK))
427 can_use_lite_area = TRUE;
429 if (!(r_ptr->flags2 & RF2_STUPID))
431 if (d_info[target_ptr->dungeon_idx].flags1 & DF1_DARKNESS) f6 &= ~(RF6_DARKNESS);
432 else if (vs_ninja && !can_use_lite_area) f6 &= ~(RF6_DARKNESS);
436 if (in_no_magic_dungeon && !(r_ptr->flags2 & RF2_STUPID))
438 f4 &= (RF4_NOMAGIC_MASK);
439 f5 &= (RF5_NOMAGIC_MASK);
440 f6 &= (RF6_NOMAGIC_MASK);
443 if (floor_ptr->inside_arena || target_ptr->phase_out)
445 f4 &= ~(RF4_SUMMON_MASK);
446 f5 &= ~(RF5_SUMMON_MASK);
447 f6 &= ~(RF6_SUMMON_MASK | RF6_TELE_LEVEL);
449 if (m_ptr->r_idx == MON_ROLENTO) f6 &= ~(RF6_SPECIAL);
452 if (target_ptr->phase_out && !one_in_(3))
457 if (m_idx == target_ptr->riding)
459 f4 &= ~(RF4_RIDING_MASK);
460 f5 &= ~(RF5_RIDING_MASK);
461 f6 &= ~(RF6_RIDING_MASK);
467 f6 &= ~(RF6_DARKNESS | RF6_TRAPS);
469 if (!(target_ptr->pet_extra_flags & PF_TELEPORT))
471 f6 &= ~(RF6_BLINK | RF6_TPORT | RF6_TELE_TO | RF6_TELE_AWAY | RF6_TELE_LEVEL);
474 if (!(target_ptr->pet_extra_flags & PF_ATTACK_SPELL))
476 f4 &= ~(RF4_ATTACK_MASK);
477 f5 &= ~(RF5_ATTACK_MASK);
478 f6 &= ~(RF6_ATTACK_MASK);
481 if (!(target_ptr->pet_extra_flags & PF_SUMMON_SPELL))
483 f4 &= ~(RF4_SUMMON_MASK);
484 f5 &= ~(RF5_SUMMON_MASK);
485 f6 &= ~(RF6_SUMMON_MASK);
488 /* Prevent collateral damage */
489 if (!(target_ptr->pet_extra_flags & PF_BALL_SPELL) && (m_idx != target_ptr->riding))
491 if ((f4 & (RF4_BALL_MASK & ~(RF4_ROCKET))) ||
492 (f5 & RF5_BALL_MASK) ||
493 (f6 & RF6_BALL_MASK))
498 get_project_point(floor_ptr, m_ptr->fy, m_ptr->fx, &real_y, &real_x, 0L);
500 if (projectable(floor_ptr, real_y, real_x, target_ptr->y, target_ptr->x))
502 int dist = distance(real_y, real_x, target_ptr->y, target_ptr->x);
506 f4 &= ~(RF4_BALL_MASK & ~(RF4_ROCKET));
507 f5 &= ~(RF5_BALL_MASK);
508 f6 &= ~(RF6_BALL_MASK);
512 f4 &= ~(RF4_BIG_BALL_MASK);
513 f5 &= ~(RF5_BIG_BALL_MASK);
514 f6 &= ~(RF6_BIG_BALL_MASK);
517 else if (f5 & RF5_BA_LITE)
519 if ((distance(real_y, real_x, target_ptr->y, target_ptr->x) <= 4) && los(floor_ptr, real_y, real_x, target_ptr->y, target_ptr->x))
520 f5 &= ~(RF5_BA_LITE);
529 get_project_point(floor_ptr, m_ptr->fy, m_ptr->fx, &real_y, &real_x, PROJECT_STOP);
530 if (projectable(floor_ptr, real_y, real_x, target_ptr->y, target_ptr->x) && (distance(real_y, real_x, target_ptr->y, target_ptr->x) <= 2))
534 if (((f4 & RF4_BEAM_MASK) || (f5 & RF5_BEAM_MASK) || (f6 & RF6_BEAM_MASK)) &&
535 !direct_beam(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, m_ptr))
537 f4 &= ~(RF4_BEAM_MASK);
538 f5 &= ~(RF5_BEAM_MASK);
539 f6 &= ~(RF6_BEAM_MASK);
542 if ((f4 & RF4_BREATH_MASK) || (f5 & RF5_BREATH_MASK) || (f6 & RF6_BREATH_MASK))
544 /* Expected breath radius */
545 POSITION rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
547 if (!breath_direct(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, 0, TRUE))
549 f4 &= ~(RF4_BREATH_MASK);
550 f5 &= ~(RF5_BREATH_MASK);
551 f6 &= ~(RF6_BREATH_MASK);
553 else if ((f4 & RF4_BR_LITE) &&
554 !breath_direct(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, GF_LITE, TRUE))
556 f4 &= ~(RF4_BR_LITE);
558 else if ((f4 & RF4_BR_DISI) &&
559 !breath_direct(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, GF_DISINTEGRATE, TRUE))
561 f4 &= ~(RF4_BR_DISI);
566 /* Special moves restriction */
567 if (f6 & RF6_SPECIAL)
569 if (m_ptr->r_idx == MON_ROLENTO)
571 if ((target_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_SUMMON_SPELL)) != (PF_ATTACK_SPELL | PF_SUMMON_SPELL))
572 f6 &= ~(RF6_SPECIAL);
574 else if (r_ptr->d_char == 'B')
576 if ((target_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_TELEPORT)) != (PF_ATTACK_SPELL | PF_TELEPORT))
577 f6 &= ~(RF6_SPECIAL);
579 else f6 &= ~(RF6_SPECIAL);
583 /* Remove some spells if necessary */
585 if (!(r_ptr->flags2 & RF2_STUPID))
587 /* Check for a clean bolt shot */
588 if (((f4 & RF4_BOLT_MASK) ||
589 (f5 & RF5_BOLT_MASK) ||
590 (f6 & RF6_BOLT_MASK)) &&
591 !clean_shot(m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, pet))
593 f4 &= ~(RF4_BOLT_MASK);
594 f5 &= ~(RF5_BOLT_MASK);
595 f6 &= ~(RF6_BOLT_MASK);
598 /* Check for a possible summon */
599 if (((f4 & RF4_SUMMON_MASK) ||
600 (f5 & RF5_SUMMON_MASK) ||
601 (f6 & RF6_SUMMON_MASK)) &&
602 !(summon_possible(t_ptr->fy, t_ptr->fx)))
604 /* Remove summoning spells */
605 f4 &= ~(RF4_SUMMON_MASK);
606 f5 &= ~(RF5_SUMMON_MASK);
607 f6 &= ~(RF6_SUMMON_MASK);
611 if ((f4 & RF4_DISPEL) && !dispel_check_monster(m_idx, target_idx))
613 /* Remove dispel spell */
617 /* Check for a possible raise dead */
618 if ((f6 & RF6_RAISE_DEAD) && !raise_possible(m_ptr))
620 /* Remove raise dead spell */
621 f6 &= ~(RF6_RAISE_DEAD);
624 /* Special moves restriction */
625 if (f6 & RF6_SPECIAL)
627 if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(t_ptr->fy, t_ptr->fx))
629 f6 &= ~(RF6_SPECIAL);
634 if (r_ptr->flags2 & RF2_SMART)
636 /* Hack -- allow "desperate" spells */
637 if ((m_ptr->hp < m_ptr->maxhp / 10) &&
638 (randint0(100) < 50))
640 /* Require intelligent spells */
641 f4 &= (RF4_INT_MASK);
642 f5 &= (RF5_INT_MASK);
643 f6 &= (RF6_INT_MASK);
646 /* Hack -- decline "teleport level" in some case */
647 if ((f6 & RF6_TELE_LEVEL) && is_teleport_level_ineffective(target_ptr, (target_idx == target_ptr->riding) ? 0 : target_idx))
649 f6 &= ~(RF6_TELE_LEVEL);
654 if (!f4 && !f5 && !f6) return FALSE;
656 /* Extract the "inate" spells */
657 for (k = 0; k < 32; k++)
659 if (f4 & (1L << k)) spell[num++] = k + RF4_SPELL_START;
662 /* Extract the "normal" spells */
663 for (k = 0; k < 32; k++)
665 if (f5 & (1L << k)) spell[num++] = k + RF5_SPELL_START;
668 /* Extract the "bizarre" spells */
669 for (k = 0; k < 32; k++)
671 if (f6 & (1L << k)) spell[num++] = k + RF6_SPELL_START;
675 if (!num) return (FALSE);
677 /* Stop if player is dead or gone */
678 if (!target_ptr->playing || target_ptr->is_dead) return (FALSE);
680 /* Handle "leaving" */
681 if (target_ptr->leaving) return (FALSE);
683 /* Get the monster name (or "it") */
684 monster_desc(m_name, m_ptr, 0x00);
687 /* Get the monster possessive ("his"/"her"/"its") */
688 monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
691 /* Get the target's name (or "it") */
692 monster_desc(t_name, t_ptr, 0x00);
694 /* Choose a spell to cast */
695 thrown_spell = spell[randint0(num)];
697 if (target_ptr->riding && (m_idx == target_ptr->riding)) disturb(target_ptr, TRUE, TRUE);
699 /* Check for spell failure (inate attacks never fail) */
700 if (!spell_is_inate(thrown_spell) && (in_no_magic_dungeon || (MON_STUNNED(m_ptr) && one_in_(2))))
702 disturb(target_ptr, TRUE, TRUE);
703 if (see_m) msg_format(_("%^sは呪文を唱えようとしたが失敗した。",
704 "%^s tries to cast a spell, but fails."), m_name);
709 /* Hex: Anti Magic Barrier */
710 if (!spell_is_inate(thrown_spell) && magic_barrier(target_ptr, m_idx))
712 if (see_m) msg_format(_("反魔法バリアが%^sの呪文をかき消した。",
713 "Anti magic barrier cancels the spell which %^s casts."), m_name);
717 can_remember = is_original_ap_and_seen(m_ptr);
719 dam = monspell_to_monster(target_ptr, thrown_spell, y, x, m_idx, target_idx);
720 if (dam < 0) return FALSE;
722 if (m_ptr->ml && maneable && !current_world_ptr->timewalk_m_idx && !target_ptr->blind && (target_ptr->pclass == CLASS_IMITATOR))
724 if (thrown_spell != 167) /* Not RF6_SPECIAL */
726 if (target_ptr->mane_num == MAX_MANE)
728 target_ptr->mane_num--;
729 for (i = 0; i < target_ptr->mane_num - 1; i++)
731 target_ptr->mane_spell[i] = target_ptr->mane_spell[i+1];
732 target_ptr->mane_dam[i] = target_ptr->mane_dam[i+1];
736 target_ptr->mane_spell[target_ptr->mane_num] = thrown_spell - RF4_SPELL_START;
737 target_ptr->mane_dam[target_ptr->mane_num] = dam;
738 target_ptr->mane_num++;
739 target_ptr->new_mane = TRUE;
741 target_ptr->redraw |= (PR_IMITATION);
745 /* Remember what the monster did, if we saw it */
749 if (thrown_spell < RF4_SPELL_START + RF4_SPELL_SIZE)
751 r_ptr->r_flags4 |= (1L << (thrown_spell - RF4_SPELL_START));
752 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
756 else if (thrown_spell < RF5_SPELL_START + RF5_SPELL_SIZE)
758 r_ptr->r_flags5 |= (1L << (thrown_spell - RF5_SPELL_START));
759 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
763 else if (thrown_spell < RF6_SPELL_START + RF6_SPELL_SIZE)
765 r_ptr->r_flags6 |= (1L << (thrown_spell - RF6_SPELL_START));
766 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
770 /* Always take note of monsters that kill you */
771 if (target_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !floor_ptr->inside_arena)
773 r_ptr->r_deaths++; /* Ignore appearance difference */
776 /* A spell was cast */