Random figurines are of harder monsters

This commit is contained in:
Pasi Kallinen
2022-08-21 13:23:16 +03:00
parent 2b163d89b0
commit a9ca23e8f9
4 changed files with 22 additions and 4 deletions

View File

@@ -1598,6 +1598,13 @@ align_shift(register struct permonst *ptr)
/* select a random monster type */
struct permonst *
rndmonst(void)
{
return rndmonst_adj(0, 0);
}
/* select a random monster type, with adjusted difficulty */
struct permonst *
rndmonst_adj(int minadj, int maxadj)
{
register struct permonst *ptr;
register int mndx;
@@ -1608,8 +1615,8 @@ rndmonst(void)
return ptr;
zlevel = level_difficulty();
minmlev = monmin_difficulty(zlevel);
maxmlev = monmax_difficulty(zlevel);
minmlev = monmin_difficulty(zlevel) + minadj;
maxmlev = monmax_difficulty(zlevel) + maxadj;
upper = Is_rogue_level(&u.uz); /* prefer uppercase only on rogue level */
elemlevel = In_endgame(&u.uz) && !Is_astralevel(&u.uz); /* elmntl plane */