From: nothere Date: Sat, 19 Jul 2003 13:21:29 +0000 (+0000) Subject: 練気術を使用した直後に盲目になった状況で, その練気術を'n'や'['で繰り X-Git-Tag: v2.1.2~1258 X-Git-Url: http://git.osdn.net/view?p=hengbandforosx%2Fhengbandosx.git;a=commitdiff_plain;h=cb0c285e47c1c388edde34480a5576eb29f685df 練気術を使用した直後に盲目になった状況で, その練気術を'n'や'['で繰り 返して使用しようとするとrepeat_pull()でのスタックの読み出し順序が狂 い, get_mind_power()が呪文番号INVEN_FORCEを返し, その結果配列外アクセ スを起こしたりMPが異常な値になったりしていたので, get_mind_power()で repeat_pull()された呪文番号がINVEN_FORCEだった場合はもう1度だけ repeat_pull()して正しい呪文番号を取得するように仮修正. その場しのぎに 過ぎないので, 後で別の方法を考える必要はある. --- diff --git a/src/mind.c b/src/mind.c index f01766e09..839bdfb09 100644 --- a/src/mind.c +++ b/src/mind.c @@ -524,15 +524,18 @@ void mindcraft_info(char *p, int use_mind, int power) #ifdef ALLOW_REPEAT /* TNB */ - /* Get the spell, if available */ - if (repeat_pull(sn)) + /* Get the spell, if available */ + if (repeat_pull(sn)) { - /* Verify the spell */ - if (mind_ptr->info[*sn].min_lev <= plev) - { - /* Success */ - return (TRUE); - } + /* Hack -- If requested INVEN_FORCE(1111), pull again */ + if (*sn == INVEN_FORCE) repeat_pull(sn); + + /* Verify the spell */ + if (mind_ptr->info[*sn].min_lev <= plev) + { + /* Success */ + return (TRUE); + } } #endif /* ALLOW_REPEAT -- TNB */