OSDN Git Service

Implement reinforcement system.
authordeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 6 Jun 2013 13:14:01 +0000 (13:14 +0000)
committerdeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 6 Jun 2013 13:14:01 +0000 (13:14 +0000)
lib/edit/r_info.txt
src/monster2.c

index 65dc188..5ab63b4 100644 (file)
@@ -15547,6 +15547,7 @@ S:1_IN_3 |
 S:SCARE | BLIND | CONF | TPORT | BLINK | TELE_AWAY | TELE_TO
 S:TRAPS | CAUSE_4 | BA_POIS | S_DEMON
 S:S_MONSTERS | PSY_SPEAR
+R:201:8d10
 D:$She is beautiful and deadly. "...I have always been very fond of Fiona. 
 D:$She is certainly the loveliest, most civilized of (all Amberites)."
 D:Èà½÷¤ÏÈþ¤·¤¯¡¢¤Þ¤¿´í¸±¤Ê¸ºß¤Ç¤â¤¢¤ë¡£¡Ö¡Ä¥Õ¥£¥ª¥Ê¤Î»ö¤Ï¤È¤Æ¤â¹¥¤­¤À¡£
@@ -15623,6 +15624,8 @@ F:OPEN_DOOR | BASH_DOOR |
 S:1_IN_4 |
 S:TPORT | TELE_TO | SHOOT | SHRIEK | SCARE | DARKNESS |
 S:S_ANT | S_SPIDER | S_HOUND | S_HYDRA | TRAPS | BO_WATE | BO_ELEC
+R:151:1d6
+R:829:5d10
 D:$Julian is at home in wild woodlands. He enjoys hunting a challenging 
 D:$prey: you. "Julian, dark hair hanging long, blue eyes containing neither 
 D:$passion nor compassion. He was dressed completely in scaled white armor, 
index 0bdadac..dc3a414 100644 (file)
@@ -3660,7 +3660,7 @@ static bool place_monster_okay(int r_idx)
  */
 bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
 {
-       int             i;
+       int             i, j, n;
        monster_race    *r_ptr = &r_info[r_idx];
 
        if (!(mode & PM_NO_KAGE) && one_in_(333))
@@ -3669,12 +3669,24 @@ bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
        /* Place one monster, or fail */
        if (!place_monster_one(who, y, x, r_idx, mode)) return (FALSE);
 
-
        /* Require the "group" flag */
        if (!(mode & PM_ALLOW_GROUP)) return (TRUE);
 
        place_monster_m_idx = hack_m_idx_ii;
 
+       /* Reinforcement */
+       for(i = 0; i < 6; i++)
+       {
+               if(!r_ptr->reinforce_id[i]) break;
+               n = damroll(r_ptr->reinforce_dd[i], r_ptr->reinforce_ds[i]);
+               for(j = 0; j < n; j++)
+               {
+                       int nx, ny, z, d = 7;
+                       scatter(&ny, &nx, y, x, d, 0);
+                       (void)place_monster_one(place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
+               }
+       }
+
        /* Friends for certain monsters */
        if (r_ptr->flags1 & (RF1_FRIENDS))
        {
@@ -3682,7 +3694,6 @@ bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
                (void)place_monster_group(who, y, x, r_idx, mode);
        }
 
-
        /* Escorts for certain monsters */
        if (r_ptr->flags1 & (RF1_ESCORT))
        {