shrieker summoning purple worm
Consolidate a couple of makemon() calls. I thought that this would end up being clearer but it isn't actually much of an improvement. Should be no change in behavior.
This commit is contained in:
19
src/mon.c
19
src/mon.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 mon.c $NHDT-Date: 1655065140 2022/06/12 20:19:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.436 $ */
|
||||
/* NetHack 3.7 mon.c $NHDT-Date: 1679896593 2023/03/27 05:56:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.491 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -3638,15 +3638,14 @@ m_respond(struct monst* mtmp)
|
||||
pline("%s shrieks.", Monnam(mtmp));
|
||||
stop_occupation();
|
||||
}
|
||||
if (!rn2(10)) {
|
||||
if (!rn2(13)) {
|
||||
/* don't generate purple worms if too difficult */
|
||||
int pm = montoostrong(PM_PURPLE_WORM, monmax_difficulty_lev())
|
||||
? PM_BABY_PURPLE_WORM : PM_PURPLE_WORM;
|
||||
|
||||
(void) makemon(&mons[pm], 0, 0, NO_MM_FLAGS);
|
||||
} else
|
||||
(void) makemon((struct permonst *) 0, 0, 0, NO_MM_FLAGS);
|
||||
if (!rn2(10)) { /* 1/10 chance per shriek to create a monster */
|
||||
/* new monster has a 1/13 chance to be a purple worm, random
|
||||
otherwise; baby purple worm if adult is too difficult */
|
||||
(void) makemon(rn2(13) ? (struct permonst *) 0
|
||||
: &mons[montoostrong(PM_PURPLE_WORM,
|
||||
monmax_difficulty_lev())
|
||||
? PM_BABY_PURPLE_WORM : PM_PURPLE_WORM],
|
||||
0, 0, NO_MM_FLAGS);
|
||||
}
|
||||
aggravate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user