変愚蛮怒のメインリポジトリです
Revision | cb0c285e47c1c388edde34480a5576eb29f685df (tree) |
---|---|
Time | 2003-07-19 22:21:29 |
Author | nothere <nothere@0568...> |
Commiter | nothere |
練気術を使用した直後に盲目になった状況で, その練気術を'n'や'['で繰り
返して使用しようとするとrepeat_pull()でのスタックの読み出し順序が狂
い, get_mind_power()が呪文番号INVEN_FORCEを返し, その結果配列外アクセ
スを起こしたりMPが異常な値になったりしていたので, get_mind_power()で
repeat_pull()された呪文番号がINVEN_FORCEだった場合はもう1度だけ
repeat_pull()して正しい呪文番号を取得するように仮修正. その場しのぎに
過ぎないので, 後で別の方法を考える必要はある.
@@ -524,15 +524,18 @@ void mindcraft_info(char *p, int use_mind, int power) | ||
524 | 524 | |
525 | 525 | #ifdef ALLOW_REPEAT /* TNB */ |
526 | 526 | |
527 | - /* Get the spell, if available */ | |
528 | - if (repeat_pull(sn)) | |
527 | + /* Get the spell, if available */ | |
528 | + if (repeat_pull(sn)) | |
529 | 529 | { |
530 | - /* Verify the spell */ | |
531 | - if (mind_ptr->info[*sn].min_lev <= plev) | |
532 | - { | |
533 | - /* Success */ | |
534 | - return (TRUE); | |
535 | - } | |
530 | + /* Hack -- If requested INVEN_FORCE(1111), pull again */ | |
531 | + if (*sn == INVEN_FORCE) repeat_pull(sn); | |
532 | + | |
533 | + /* Verify the spell */ | |
534 | + if (mind_ptr->info[*sn].min_lev <= plev) | |
535 | + { | |
536 | + /* Success */ | |
537 | + return (TRUE); | |
538 | + } | |
536 | 539 | } |
537 | 540 | |
538 | 541 | #endif /* ALLOW_REPEAT -- TNB */ |