From: deskull Date: Thu, 6 Jun 2013 13:14:01 +0000 (+0000) Subject: Implement reinforcement system. X-Git-Tag: v2.1.3~31 X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=07736bb1241f4efba6aa2a5ac1aae0afdf896f05 Implement reinforcement system. --- diff --git a/lib/edit/r_info.txt b/lib/edit/r_info.txt index 65dc188ac..5ab63b400 100644 --- a/lib/edit/r_info.txt +++ b/lib/edit/r_info.txt @@ -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, diff --git a/src/monster2.c b/src/monster2.c index 0bdadacfd..dc3a4147d 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -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)) {