OSDN Git Service

王蟲のモルドばら撒きを呪文/攻撃としてではなく, 増殖の一種として実装.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 13 Jun 2003 16:02:58 +0000 (16:02 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 13 Jun 2003 16:02:58 +0000 (16:02 +0000)
process_monster()内で増える比較の回数はSPECIALなしのモンスターで1回,
王蟲以外のSPECIALありでも2回に留まる.

src/melee2.c
src/mspells1.c
src/mspells2.c

index 5b81efa..2efd8ba 100644 (file)
@@ -2521,6 +2521,31 @@ msg_format("%^s
        }
 
 
+       if (r_ptr->flags6 & RF6_SPECIAL)
+       {
+               /* Hack -- Ohmu scatters molds! */
+               if (m_ptr->r_idx == MON_OHMU)
+               {
+                       if (!p_ptr->inside_arena && !p_ptr->inside_battle)
+                       {
+                               if (r_ptr->freq_spell && (randint1(100) <= r_ptr->freq_spell))
+                               {
+                                       int  k, count = 0;
+                                       int  rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
+                                       u32b p_mode = is_pet(m_ptr) ? PM_FORCE_PET : 0L;
+
+                                       for (k = 0; k < 6; k++)
+                                       {
+                                               count += summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_BIZARRE1, (PM_ALLOW_GROUP | p_mode));
+                                       }
+
+                                       if (count && m_ptr->ml) r_ptr->r_flags6 |= (RF6_SPECIAL);
+                               }
+                       }
+               }
+       }
+
+
        if (!p_ptr->inside_battle)
        {
                /* Hack! "Cyber" monster makes noise... */
index 5938345..42b2e61 100644 (file)
@@ -3464,13 +3464,9 @@ msg_format("%^s
                        switch(m_ptr->r_idx)
                        {
                        case MON_OHMU:
-                               if (p_ptr->inside_arena || p_ptr->inside_battle) return FALSE;
-                               for (k = 0; k < 6; k++)
-                               {
-                                       count += summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_BIZARRE1, PM_ALLOW_GROUP);
-                               }
+                               /* Moved to process_monster(), like multiplication */
                                return FALSE;
-                               
+
                        case MON_BANORLUPART:
                                {
                                        int dummy_hp = (m_ptr->hp + 1) / 2;
index 2c3595b..d4288de 100644 (file)
@@ -3240,11 +3240,7 @@ bool monst_spell_monst(int m_idx)
                switch (m_ptr->r_idx)
                {
                case MON_OHMU:
-                       if (p_ptr->inside_arena || p_ptr->inside_battle) return FALSE;
-                       for (k = 0; k < 6; k++)
-                       {
-                               summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_BIZARRE1, (PM_ALLOW_GROUP | p_mode));
-                       }
+                       /* Moved to process_monster(), like multiplication */
                        return FALSE;
 
                default: