From a0c321eda969a3d7435fa3b9a369cfb9de82e484 Mon Sep 17 00:00:00 2001 From: mogami Date: Tue, 19 Nov 2002 20:45:47 +0000 Subject: [PATCH] =?utf8?q?=E3=81=A0=E3=81=84=E3=81=B6=E5=89=8D=E3=81=8B?= =?utf8?q?=E3=82=89=E3=81=82=E3=81=A3=E3=81=9F=20alloc=5Fmonster()?= =?utf8?q?=E3=81=AE=E5=91=BC=E3=81=B3=E6=96=B9=E3=81=AE=E9=96=93=E9=81=95?= =?utf8?q?=E3=81=88=E4=BF=AE=E6=AD=A3=E3=80=82=20=E3=83=A2=E3=83=B3?= =?utf8?q?=E3=82=B9=E3=82=BF=E3=83=BC=E3=81=AE=E5=8F=AC=E5=96=9A=E3=82=B3?= =?utf8?q?=E3=83=BC=E3=83=89=E3=82=92=E5=A4=9A=E6=95=B0=E3=81=AEbool?= =?utf8?q?=E5=9E=8B=E5=BC=95=E6=95=B0=E3=81=8B=E3=82=89u32b=E3=81=AEbit=20?= =?utf8?q?flag=E3=81=A7=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88=20=E3=81=9F?= =?utf8?q?=E6=99=82=E3=81=AB=E3=80=81alloc=5Fmonster()=E3=81=AE=E5=91=BC?= =?utf8?q?=E3=81=B3=E5=87=BA=E3=81=97=E3=81=AE=E3=82=B3=E3=83=BC=E3=83=89?= =?utf8?q?=E3=81=A0=E3=81=91=20bit=20flag=E7=94=A8=E3=81=AB=E6=9B=B8?= =?utf8?q?=E3=81=8D=E5=A4=89=E3=81=88=E5=BF=98=E3=82=8C=20=E3=81=A6?= =?utf8?q?=E3=81=84=E3=81=9F=E3=80=82(=E3=81=9F=E3=81=A0=E3=81=97=E3=80=81?= =?utf8?q?TRUE=20=3D=3D=200x01=20=3D=3D=20PM=5FALLOW=5FSLEEP=20=E3=81=A0?= =?utf8?q?=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E5=81=B6=E7=84=B6=E5=AE=9F?= =?utf8?q?=E5=AE=B3=E7=84=A1=E3=81=97=E3=80=82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/dungeon.c | 2 +- src/generate.c | 2 +- src/wild.c | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/dungeon.c b/src/dungeon.c index c52d2643f..39755e03b 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1833,7 +1833,7 @@ if (cheat_xtra) msg_print(" !p_ptr->inside_arena && !p_ptr->inside_quest && !p_ptr->inside_battle) { /* Make a new monster */ - (void)alloc_monster(MAX_SIGHT + 5, FALSE); + (void)alloc_monster(MAX_SIGHT + 5, 0); } /* Hack -- Check for creature regeneration */ diff --git a/src/generate.c b/src/generate.c index e210b7c62..df28dd0e9 100644 --- a/src/generate.c +++ b/src/generate.c @@ -1057,7 +1057,7 @@ msg_format(" /* Put some monsters in the dungeon */ for (i = i + k; i > 0; i--) { - (void)alloc_monster(0, TRUE); + (void)alloc_monster(0, PM_ALLOW_SLEEP); } /* Place some traps in the dungeon */ diff --git a/src/wild.c b/src/wild.c index 53f7661c3..19b372bc3 100644 --- a/src/wild.c +++ b/src/wild.c @@ -836,8 +836,13 @@ void wilderness_gen(void) /* Make some residents */ for (i = 0; i < lim; i++) { + u32b mode = 0; + + if (!(generate_encounter || (one_in_(2) && (!p_ptr->town_num)))) + mode |= PM_ALLOW_SLEEP; + /* Make a resident */ - (void)alloc_monster(generate_encounter ? 0 : 3, (bool)!(generate_encounter || (one_in_(2) && (!p_ptr->town_num)))); + (void)alloc_monster(generate_encounter ? 0 : 3, mode); } if(generate_encounter) ambush_flag = TRUE; -- 2.11.0