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.
35 * @param target_ptr プレーヤーへの参照ポインタ
40 * @param m_ptr 使用するモンスターの構造体参照ポインタ
41 * @return ビームが到達可能ならばTRUEを返す
43 static bool direct_beam(player_type *target_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, monster_type *m_ptr)
52 bool is_friend = is_pet(m_ptr);
54 /* Check the projection path */
55 floor_type *floor_ptr = target_ptr->current_floor_ptr;
56 grid_n = project_path(floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, PROJECT_THRU);
58 /* No grid is ever projectable from itself */
59 if (!grid_n) return FALSE;
61 for (i = 0; i < grid_n; i++)
63 y = GRID_Y(grid_g[i]);
64 x = GRID_X(grid_g[i]);
66 if (y == y2 && x == x2)
68 else if (is_friend && floor_ptr->grid_array[y][x].m_idx > 0 &&
69 !are_enemies(m_ptr, &floor_ptr->m_list[floor_ptr->grid_array[y][x].m_idx]))
71 /* Friends don't shoot friends */
75 if (is_friend && player_bold(target_ptr, y, x))
85 * @brief モンスターが敵対モンスターに直接ブレスを当てることが可能かを判定する /
86 * Determine if a breath will hit the target.
93 * @param is_friend TRUEならば、プレイヤーを巻き込む時にブレスの判定をFALSEにする。
94 * @return ブレスを直接当てられるならばTRUEを返す
96 static bool breath_direct(player_type *master_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, POSITION rad, EFFECT_ID typ, bool is_friend)
98 /* Must be the same as projectable() */
110 POSITION gx[1024], gy[1024];
112 POSITION gm_rad = rad;
125 case GF_DISINTEGRATE:
133 /* Check the projection path */
134 grid_n = project_path(master_ptr->current_floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, flg);
136 /* Project along the path */
137 for (i = 0; i < grid_n; ++i)
139 int ny = GRID_Y(grid_g[i]);
140 int nx = GRID_X(grid_g[i]);
142 if (flg & PROJECT_DISI)
144 /* Hack -- Balls explode before reaching walls */
145 if (cave_stop_disintegration(master_ptr->current_floor_ptr, ny, nx)) break;
147 else if (flg & PROJECT_LOS)
149 /* Hack -- Balls explode before reaching walls */
150 if (!cave_los_bold(master_ptr->current_floor_ptr, ny, nx)) break;
154 /* Hack -- Balls explode before reaching walls */
155 if (!cave_have_flag_bold(master_ptr->current_floor_ptr, ny, nx, FF_PROJECT)) break;
158 /* Save the "blast epicenter" */
167 if (flg & PROJECT_DISI)
169 if (in_disintegration_range(master_ptr->current_floor_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
170 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;
172 else if (flg & PROJECT_LOS)
174 if (los(master_ptr->current_floor_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
175 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;
179 if (projectable(master_ptr->current_floor_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
180 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;
185 breath_shape(master_ptr->current_floor_ptr, grid_g, grid_n, &grids, gx, gy, gm, &gm_rad, rad, y1, x1, y, x, typ);
187 for (i = 0; i < grids; i++)
191 if ((y == y2) && (x == x2)) hit2 = TRUE;
192 if (player_bold(master_ptr, y, x)) hityou = TRUE;
196 if (!hit2) return FALSE;
197 if (is_friend && hityou) return FALSE;
204 * @brief モンスターが特殊能力の目標地点を決める処理 /
205 * Get the actual center point of ball spells (rad > 1) (originally from TOband)
208 * @param ty 目標Y座標を返す参照ポインタ
209 * @param tx 目標X座標を返す参照ポインタ
210 * @param flg 判定のフラグ配列
213 void get_project_point(floor_type *floor_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg)
218 path_n = project_path(floor_ptr, path_g, MAX_RANGE, sy, sx, *ty, *tx, flg);
223 /* Project along the path */
224 for (i = 0; i < path_n; i++)
226 sy = GRID_Y(path_g[i]);
227 sx = GRID_X(path_g[i]);
229 /* Hack -- Balls explode before reaching walls */
230 if (!cave_have_flag_bold(floor_ptr, sy, sx, FF_PROJECT)) break;
239 * @brief モンスターが敵モンスターに魔力消去を使うかどうかを返す /
240 * Check should monster cast dispel spell at other monster.
241 * @param target_ptr プレーヤーへの参照ポインタ
242 * @param m_idx 術者のモンスターID
243 * @param t_idx 目標のモンスターID
244 * @return 魔力消去を使うべきならばTRUEを変えす。
246 static bool dispel_check_monster(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx)
248 monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
250 if (MON_INVULNER(t_ptr)) return TRUE;
252 if (t_ptr->mspeed < 135)
254 if (MON_FAST(t_ptr)) return TRUE;
258 if (t_idx == target_ptr->riding)
260 if (dispel_check(target_ptr, m_idx)) return TRUE;
263 /* No need to cast dispel spell */
269 * todo モンスターからモンスターへの呪文なのにplayer_typeが引数になり得るのは間違っている……
270 * @brief モンスターが敵モンスターに特殊能力を使う処理のメインルーチン /
271 * Monster tries to 'cast a spell' (or breath, etc) at another monster.
272 * @param target_ptr プレーヤーへの参照ポインタ
273 * @param m_idx 術者のモンスターID
274 * @return 実際に特殊能力を使った場合TRUEを返す
276 * The player is only disturbed if able to be affected by the spell.
278 bool monst_spell_monst(player_type *target_ptr, MONSTER_IDX m_idx)
280 POSITION y = 0, x = 0;
282 MONSTER_IDX target_idx = 0;
288 byte spell[96], num = 0;
290 GAME_TEXT m_name[160];
291 GAME_TEXT t_name[160];
297 floor_type *floor_ptr = target_ptr->current_floor_ptr;
298 monster_type *m_ptr = &floor_ptr->m_list[m_idx];
299 monster_type *t_ptr = NULL;
301 monster_race *r_ptr = &r_info[m_ptr->r_idx];
305 bool see_m = is_seen(m_ptr);
306 bool maneable = player_has_los_bold(target_ptr, m_ptr->fy, m_ptr->fx);
307 bool pet = is_pet(m_ptr);
309 bool in_no_magic_dungeon = (d_info[target_ptr->dungeon_idx].flags1 & DF1_NO_MAGIC) && floor_ptr->dun_level
310 && (!floor_ptr->inside_quest || is_fixed_quest_idx(floor_ptr->inside_quest));
312 bool can_use_lite_area = FALSE;
315 /* Cannot cast spells when confused */
316 if (MON_CONFUSED(m_ptr)) return FALSE;
318 /* Extract the racial spell flags */
320 f5 = r_ptr->a_ability_flags1;
321 f6 = r_ptr->a_ability_flags2;
323 /* Target is given for pet? */
324 if (target_ptr->pet_t_m_idx && pet)
326 target_idx = target_ptr->pet_t_m_idx;
327 t_ptr = &floor_ptr->m_list[target_idx];
329 /* Cancel if not projectable (for now) */
330 if ((m_idx == target_idx) || !projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
336 /* Is there counter attack target? */
337 if (!target_idx && m_ptr->target_y)
339 target_idx = floor_ptr->grid_array[m_ptr->target_y][m_ptr->target_x].m_idx;
343 t_ptr = &floor_ptr->m_list[target_idx];
345 /* Cancel if neither enemy nor a given target */
346 if ((m_idx == target_idx) ||
347 ((target_idx != target_ptr->pet_t_m_idx) && !are_enemies(m_ptr, t_ptr)))
352 /* Allow only summoning etc.. if not projectable */
353 else if (!projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
355 f4 &= (RF4_INDIRECT_MASK);
356 f5 &= (RF5_INDIRECT_MASK);
357 f6 &= (RF6_INDIRECT_MASK);
362 /* Look for enemies normally */
365 bool success = FALSE;
367 if (target_ptr->phase_out)
369 start = randint1(floor_ptr->m_max-1) + floor_ptr->m_max;
370 if (randint0(2)) plus = -1;
372 else start = floor_ptr->m_max + 1;
374 /* Scan thru all monsters */
375 for (i = start; ((i < start + floor_ptr->m_max) && (i > start - floor_ptr->m_max)); i += plus)
377 MONSTER_IDX dummy = (i % floor_ptr->m_max);
378 if (!dummy) continue;
381 t_ptr = &floor_ptr->m_list[target_idx];
383 if (!monster_is_valid(t_ptr)) continue;
385 /* Monster must be 'an enemy' */
386 if ((m_idx == target_idx) || !are_enemies(m_ptr, t_ptr)) continue;
388 /* Monster must be projectable */
389 if (!projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
397 if (!success) return FALSE;
400 /* OK -- we've got a target */
404 /* Forget old counter attack target */
407 /* Remove unimplemented spells */
408 f6 &= ~(RF6_WORLD | RF6_TRAPS | RF6_FORGET);
410 if (f4 & RF4_BR_LITE)
412 if (!los(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
413 f4 &= ~(RF4_BR_LITE);
416 /* Remove unimplemented special moves */
417 if (f6 & RF6_SPECIAL)
419 if ((m_ptr->r_idx != MON_ROLENTO) && (r_ptr->d_char != 'B'))
420 f6 &= ~(RF6_SPECIAL);
423 if (f6 & RF6_DARKNESS)
425 bool vs_ninja = (target_ptr->pclass == CLASS_NINJA) && !is_hostile(t_ptr);
428 !(r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) &&
429 !(r_ptr->flags7 & RF7_DARK_MASK))
430 can_use_lite_area = TRUE;
432 if (!(r_ptr->flags2 & RF2_STUPID))
434 if (d_info[target_ptr->dungeon_idx].flags1 & DF1_DARKNESS) f6 &= ~(RF6_DARKNESS);
435 else if (vs_ninja && !can_use_lite_area) f6 &= ~(RF6_DARKNESS);
439 if (in_no_magic_dungeon && !(r_ptr->flags2 & RF2_STUPID))
441 f4 &= (RF4_NOMAGIC_MASK);
442 f5 &= (RF5_NOMAGIC_MASK);
443 f6 &= (RF6_NOMAGIC_MASK);
446 if (floor_ptr->inside_arena || target_ptr->phase_out)
448 f4 &= ~(RF4_SUMMON_MASK);
449 f5 &= ~(RF5_SUMMON_MASK);
450 f6 &= ~(RF6_SUMMON_MASK | RF6_TELE_LEVEL);
452 if (m_ptr->r_idx == MON_ROLENTO) f6 &= ~(RF6_SPECIAL);
455 if (target_ptr->phase_out && !one_in_(3))
460 if (m_idx == target_ptr->riding)
462 f4 &= ~(RF4_RIDING_MASK);
463 f5 &= ~(RF5_RIDING_MASK);
464 f6 &= ~(RF6_RIDING_MASK);
470 f6 &= ~(RF6_DARKNESS | RF6_TRAPS);
472 if (!(target_ptr->pet_extra_flags & PF_TELEPORT))
474 f6 &= ~(RF6_BLINK | RF6_TPORT | RF6_TELE_TO | RF6_TELE_AWAY | RF6_TELE_LEVEL);
477 if (!(target_ptr->pet_extra_flags & PF_ATTACK_SPELL))
479 f4 &= ~(RF4_ATTACK_MASK);
480 f5 &= ~(RF5_ATTACK_MASK);
481 f6 &= ~(RF6_ATTACK_MASK);
484 if (!(target_ptr->pet_extra_flags & PF_SUMMON_SPELL))
486 f4 &= ~(RF4_SUMMON_MASK);
487 f5 &= ~(RF5_SUMMON_MASK);
488 f6 &= ~(RF6_SUMMON_MASK);
491 /* Prevent collateral damage */
492 if (!(target_ptr->pet_extra_flags & PF_BALL_SPELL) && (m_idx != target_ptr->riding))
494 if ((f4 & (RF4_BALL_MASK & ~(RF4_ROCKET))) ||
495 (f5 & RF5_BALL_MASK) ||
496 (f6 & RF6_BALL_MASK))
501 get_project_point(floor_ptr, m_ptr->fy, m_ptr->fx, &real_y, &real_x, 0L);
503 if (projectable(floor_ptr, real_y, real_x, target_ptr->y, target_ptr->x))
505 int dist = distance(real_y, real_x, target_ptr->y, target_ptr->x);
509 f4 &= ~(RF4_BALL_MASK & ~(RF4_ROCKET));
510 f5 &= ~(RF5_BALL_MASK);
511 f6 &= ~(RF6_BALL_MASK);
515 f4 &= ~(RF4_BIG_BALL_MASK);
516 f5 &= ~(RF5_BIG_BALL_MASK);
517 f6 &= ~(RF6_BIG_BALL_MASK);
520 else if (f5 & RF5_BA_LITE)
522 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))
523 f5 &= ~(RF5_BA_LITE);
532 get_project_point(floor_ptr, m_ptr->fy, m_ptr->fx, &real_y, &real_x, PROJECT_STOP);
533 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))
537 if (((f4 & RF4_BEAM_MASK) || (f5 & RF5_BEAM_MASK) || (f6 & RF6_BEAM_MASK)) &&
538 !direct_beam(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, m_ptr))
540 f4 &= ~(RF4_BEAM_MASK);
541 f5 &= ~(RF5_BEAM_MASK);
542 f6 &= ~(RF6_BEAM_MASK);
545 if ((f4 & RF4_BREATH_MASK) || (f5 & RF5_BREATH_MASK) || (f6 & RF6_BREATH_MASK))
547 /* Expected breath radius */
548 POSITION rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
550 if (!breath_direct(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, 0, TRUE))
552 f4 &= ~(RF4_BREATH_MASK);
553 f5 &= ~(RF5_BREATH_MASK);
554 f6 &= ~(RF6_BREATH_MASK);
556 else if ((f4 & RF4_BR_LITE) &&
557 !breath_direct(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, GF_LITE, TRUE))
559 f4 &= ~(RF4_BR_LITE);
561 else if ((f4 & RF4_BR_DISI) &&
562 !breath_direct(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, rad, GF_DISINTEGRATE, TRUE))
564 f4 &= ~(RF4_BR_DISI);
569 /* Special moves restriction */
570 if (f6 & RF6_SPECIAL)
572 if (m_ptr->r_idx == MON_ROLENTO)
574 if ((target_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_SUMMON_SPELL)) != (PF_ATTACK_SPELL | PF_SUMMON_SPELL))
575 f6 &= ~(RF6_SPECIAL);
577 else if (r_ptr->d_char == 'B')
579 if ((target_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_TELEPORT)) != (PF_ATTACK_SPELL | PF_TELEPORT))
580 f6 &= ~(RF6_SPECIAL);
582 else f6 &= ~(RF6_SPECIAL);
586 /* Remove some spells if necessary */
588 if (!(r_ptr->flags2 & RF2_STUPID))
590 /* Check for a clean bolt shot */
591 if (((f4 & RF4_BOLT_MASK) ||
592 (f5 & RF5_BOLT_MASK) ||
593 (f6 & RF6_BOLT_MASK)) &&
594 !clean_shot(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx, pet))
596 f4 &= ~(RF4_BOLT_MASK);
597 f5 &= ~(RF5_BOLT_MASK);
598 f6 &= ~(RF6_BOLT_MASK);
601 /* Check for a possible summon */
602 if (((f4 & RF4_SUMMON_MASK) ||
603 (f5 & RF5_SUMMON_MASK) ||
604 (f6 & RF6_SUMMON_MASK)) &&
605 !(summon_possible(floor_ptr, t_ptr->fy, t_ptr->fx)))
607 /* Remove summoning spells */
608 f4 &= ~(RF4_SUMMON_MASK);
609 f5 &= ~(RF5_SUMMON_MASK);
610 f6 &= ~(RF6_SUMMON_MASK);
614 if ((f4 & RF4_DISPEL) && !dispel_check_monster(target_ptr, m_idx, target_idx))
616 /* Remove dispel spell */
620 /* Check for a possible raise dead */
621 if ((f6 & RF6_RAISE_DEAD) && !raise_possible(floor_ptr, m_ptr))
623 /* Remove raise dead spell */
624 f6 &= ~(RF6_RAISE_DEAD);
627 /* Special moves restriction */
628 if (f6 & RF6_SPECIAL)
630 if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(floor_ptr, t_ptr->fy, t_ptr->fx))
632 f6 &= ~(RF6_SPECIAL);
637 if (r_ptr->flags2 & RF2_SMART)
639 /* Hack -- allow "desperate" spells */
640 if ((m_ptr->hp < m_ptr->maxhp / 10) &&
641 (randint0(100) < 50))
643 /* Require intelligent spells */
644 f4 &= (RF4_INT_MASK);
645 f5 &= (RF5_INT_MASK);
646 f6 &= (RF6_INT_MASK);
649 /* Hack -- decline "teleport level" in some case */
650 if ((f6 & RF6_TELE_LEVEL) && is_teleport_level_ineffective(target_ptr, (target_idx == target_ptr->riding) ? 0 : target_idx))
652 f6 &= ~(RF6_TELE_LEVEL);
657 if (!f4 && !f5 && !f6) return FALSE;
659 /* Extract the "inate" spells */
660 for (k = 0; k < 32; k++)
662 if (f4 & (1L << k)) spell[num++] = k + RF4_SPELL_START;
665 /* Extract the "normal" spells */
666 for (k = 0; k < 32; k++)
668 if (f5 & (1L << k)) spell[num++] = k + RF5_SPELL_START;
671 /* Extract the "bizarre" spells */
672 for (k = 0; k < 32; k++)
674 if (f6 & (1L << k)) spell[num++] = k + RF6_SPELL_START;
678 if (!num) return FALSE;
680 /* Stop if player is dead or gone */
681 if (!target_ptr->playing || target_ptr->is_dead) return FALSE;
683 /* Handle "leaving" */
684 if (target_ptr->leaving) return FALSE;
686 /* Get the monster name (or "it") */
687 monster_desc(m_name, m_ptr, 0x00);
690 /* Get the monster possessive ("his"/"her"/"its") */
691 monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
694 /* Get the target's name (or "it") */
695 monster_desc(t_name, t_ptr, 0x00);
697 /* Choose a spell to cast */
698 thrown_spell = spell[randint0(num)];
700 if (target_ptr->riding && (m_idx == target_ptr->riding)) disturb(target_ptr, TRUE, TRUE);
702 /* Check for spell failure (inate attacks never fail) */
703 if (!spell_is_inate(thrown_spell) && (in_no_magic_dungeon || (MON_STUNNED(m_ptr) && one_in_(2))))
705 disturb(target_ptr, TRUE, TRUE);
706 if (see_m) msg_format(_("%^sは呪文を唱えようとしたが失敗した。",
707 "%^s tries to cast a spell, but fails."), m_name);
712 /* Hex: Anti Magic Barrier */
713 if (!spell_is_inate(thrown_spell) && magic_barrier(target_ptr, m_idx))
715 if (see_m) msg_format(_("反魔法バリアが%^sの呪文をかき消した。",
716 "Anti magic barrier cancels the spell which %^s casts."), m_name);
720 can_remember = is_original_ap_and_seen(m_ptr);
722 dam = monspell_to_monster(target_ptr, thrown_spell, y, x, m_idx, target_idx);
723 if (dam < 0) return FALSE;
725 if (m_ptr->ml && maneable && !current_world_ptr->timewalk_m_idx && !target_ptr->blind && (target_ptr->pclass == CLASS_IMITATOR))
727 if (thrown_spell != 167) /* Not RF6_SPECIAL */
729 if (target_ptr->mane_num == MAX_MANE)
731 target_ptr->mane_num--;
732 for (i = 0; i < target_ptr->mane_num - 1; i++)
734 target_ptr->mane_spell[i] = target_ptr->mane_spell[i+1];
735 target_ptr->mane_dam[i] = target_ptr->mane_dam[i+1];
739 target_ptr->mane_spell[target_ptr->mane_num] = thrown_spell - RF4_SPELL_START;
740 target_ptr->mane_dam[target_ptr->mane_num] = dam;
741 target_ptr->mane_num++;
742 target_ptr->new_mane = TRUE;
744 target_ptr->redraw |= (PR_IMITATION);
748 /* Remember what the monster did, if we saw it */
752 if (thrown_spell < RF4_SPELL_START + RF4_SPELL_SIZE)
754 r_ptr->r_flags4 |= (1L << (thrown_spell - RF4_SPELL_START));
755 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
759 else if (thrown_spell < RF5_SPELL_START + RF5_SPELL_SIZE)
761 r_ptr->r_flags5 |= (1L << (thrown_spell - RF5_SPELL_START));
762 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
766 else if (thrown_spell < RF6_SPELL_START + RF6_SPELL_SIZE)
768 r_ptr->r_flags6 |= (1L << (thrown_spell - RF6_SPELL_START));
769 if (r_ptr->r_cast_spell < MAX_UCHAR) r_ptr->r_cast_spell++;
773 /* Always take note of monsters that kill you */
774 if (target_ptr->is_dead && (r_ptr->r_deaths < MAX_SHORT) && !floor_ptr->inside_arena)
776 r_ptr->r_deaths++; /* Ignore appearance difference */
779 /* A spell was cast */