OSDN Git Service

モンスターが学習したプレイヤーの耐性フラグを1/100でリセットする際に
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 16 Jun 2003 16:08:19 +0000 (16:08 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 16 Jun 2003 16:08:19 +0000 (16:08 +0000)
m_ptr->smartを使っているクローンフラグまでクリアしてしまい, クローン
が本当のモンスターになってしまっていたバグを修正. クローン地獄でク
ローンのはずのユニークを倒したら実は本物のユニークだったというバグを
修正したことにもなる.

src/mspells1.c

index e5c1d1a..4fe8bd4 100644 (file)
@@ -88,7 +88,8 @@ static void remove_bad_spells(int m_idx, u32b *f4p, u32b *f5p, u32b *f6p)
        if (smart_learn)
        {
                /* Hack -- Occasionally forget player status */
-               if (m_ptr->smart && (randint0(100) < 1)) m_ptr->smart = 0L;
+               /* Only save SM_FRIENDLY, SM_PET or SM_CLONED */
+               if (m_ptr->smart && (randint0(100) < 1)) m_ptr->smart &= (SM_FRIENDLY | SM_PET | SM_CLONED);
 
                /* Use the memorized flags */
                smart = m_ptr->smart;